@redocly/openapi-docs 3.0.0-alpha.46 → 3.0.0-alpha.48

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.
Files changed (56) hide show
  1. package/dist/console.redocly-openapi-docs.min.js +45 -44
  2. package/dist/oauth2-redirect.js +1 -1
  3. package/dist/redocly-openapi-docs.min.js +1255 -1611
  4. package/lib/components/ApiInfo/ApiInfo.js +1 -1
  5. package/lib/components/Download/DownloadLink.js +1 -1
  6. package/lib/components/Endpoint/ServerList.js +1 -1
  7. package/lib/components/Endpoint/styled.js +2 -2
  8. package/lib/components/ExternalDocumentation/ExternalDocumentation.js +2 -2
  9. package/lib/components/Fields/Extensions.js +2 -2
  10. package/lib/components/Fields/styled.d.ts +1 -2
  11. package/lib/components/Fields/styled.js +2 -2
  12. package/lib/components/Markdown/styled.d.ts +0 -8
  13. package/lib/components/Markdown/styled.js +1 -260
  14. package/lib/components/PayloadSamples/ExampleValue.js +1 -1
  15. package/lib/components/PayloadSamples/ExternalExample.js +1 -1
  16. package/lib/components/RequestSamples/CodeSample.js +1 -1
  17. package/lib/components/SectionContent/SectionContent.d.ts +2 -1
  18. package/lib/components/SectionContent/SectionContent.js +1 -1
  19. package/lib/components/SecurityRequirement/RequirementElement.js +3 -3
  20. package/lib/components/SecurityRequirement/SecurityDefs.js +1 -1
  21. package/lib/components/SecurityRequirement/SecurityRequirement.js +1 -1
  22. package/lib/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
  23. package/lib/components/TagItems/TagItems.js +1 -1
  24. package/lib/components/common/CheckboxList.js +5 -4
  25. package/lib/components/common/Fields/fields.js +11 -7
  26. package/lib/components/rightPanel/ResponseBody.js +1 -1
  27. package/lib/components/rightPanel/ResponseHeadersList.js +1 -1
  28. package/lib/components/rightPanel/styled.d.ts +0 -1
  29. package/lib/components/rightPanel/styled.js +4 -7
  30. package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
  31. package/lib-esm/components/Download/DownloadLink.js +1 -1
  32. package/lib-esm/components/Endpoint/ServerList.js +1 -1
  33. package/lib-esm/components/Endpoint/styled.js +2 -2
  34. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +3 -3
  35. package/lib-esm/components/Fields/Extensions.js +1 -1
  36. package/lib-esm/components/Fields/styled.d.ts +1 -2
  37. package/lib-esm/components/Fields/styled.js +2 -2
  38. package/lib-esm/components/Markdown/styled.d.ts +0 -8
  39. package/lib-esm/components/Markdown/styled.js +1 -260
  40. package/lib-esm/components/PayloadSamples/ExampleValue.js +1 -1
  41. package/lib-esm/components/PayloadSamples/ExternalExample.js +1 -1
  42. package/lib-esm/components/RequestSamples/CodeSample.js +1 -1
  43. package/lib-esm/components/SectionContent/SectionContent.d.ts +2 -1
  44. package/lib-esm/components/SectionContent/SectionContent.js +1 -1
  45. package/lib-esm/components/SecurityRequirement/RequirementElement.js +1 -1
  46. package/lib-esm/components/SecurityRequirement/SecurityDefs.js +1 -1
  47. package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +1 -1
  48. package/lib-esm/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
  49. package/lib-esm/components/TagItems/TagItems.js +1 -1
  50. package/lib-esm/components/common/CheckboxList.js +5 -4
  51. package/lib-esm/components/common/Fields/fields.js +9 -5
  52. package/lib-esm/components/rightPanel/ResponseBody.js +1 -1
  53. package/lib-esm/components/rightPanel/ResponseHeadersList.js +1 -1
  54. package/lib-esm/components/rightPanel/styled.d.ts +0 -1
  55. package/lib-esm/components/rightPanel/styled.js +1 -4
  56. package/package.json +2 -2
@@ -2,7 +2,7 @@ var et=(x,k,c)=>new Promise((m,w)=>{var b=O=>{try{A(c.next(O))}catch(j){w(j)}},_
2
2
  * Redocly OpenAPI Docs
3
3
  * (c) Copyright 2018 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: "3.0.0-alpha.46"
5
+ * Version: "3.0.0-alpha.48"
6
6
  */(this.webpackChunkRedoclyOpenAPIDocs=this.webpackChunkRedoclyOpenAPIDocs||[]).push([[290],{29641:(x,k,c)=>{(function(m){m(c(46944))})(function(m){var w={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},b=m.Pos;m.defineOption("autoCloseBrackets",!1,function(L,E,N){N&&N!=m.Init&&(L.removeKeyMap(A),L.state.closeBrackets=null),E&&(O(_(E,"pairs")),L.state.closeBrackets=E,L.addKeyMap(A))});function _(L,E){return E=="pairs"&&typeof L=="string"?L:typeof L=="object"&&L[E]!=null?L[E]:w[E]}var A={Backspace:K,Enter:ie};function O(L){for(var E=0;E<L.length;E++){var N=L.charAt(E),U="'"+N+"'";A[U]||(A[U]=j(N))}}O(w.pairs+"`");function j(L){return function(E){return q(E,L)}}function $(L){var E=L.state.closeBrackets;if(!E||E.override)return E;var N=L.getModeAt(L.getCursor());return N.closeBrackets||E}function K(L){var E=$(L);if(!E||L.getOption("disableInput"))return m.Pass;for(var N=_(E,"pairs"),U=L.listSelections(),se=0;se<U.length;se++){if(!U[se].empty())return m.Pass;var ne=V(L,U[se].head);if(!ne||N.indexOf(ne)%2!=0)return m.Pass}for(var se=U.length-1;se>=0;se--){var Y=U[se].head;L.replaceRange("",b(Y.line,Y.ch-1),b(Y.line,Y.ch+1),"+delete")}}function ie(L){var E=$(L),N=E&&_(E,"explode");if(!N||L.getOption("disableInput"))return m.Pass;for(var U=L.listSelections(),se=0;se<U.length;se++){if(!U[se].empty())return m.Pass;var ne=V(L,U[se].head);if(!ne||N.indexOf(ne)%2!=0)return m.Pass}L.operation(function(){var Y=L.lineSeparator()||`
7
7
  `;L.replaceSelection(Y+Y,null),ee(L,-1),U=L.listSelections();for(var X=0;X<U.length;X++){var Q=U[X].head.line;L.indentLine(Q,null,!0),L.indentLine(Q+1,null,!0)}})}function ee(L,E){for(var N=[],U=L.listSelections(),se=0,ne=0;ne<U.length;ne++){var Y=U[ne];Y.head==L.getCursor()&&(se=ne);var X=Y.head.ch||E>0?{line:Y.head.line,ch:Y.head.ch+E}:{line:Y.head.line-1};N.push({anchor:X,head:X})}L.setSelections(N,se)}function ae(L){var E=m.cmpPos(L.anchor,L.head)>0;return{anchor:new b(L.anchor.line,L.anchor.ch+(E?-1:1)),head:new b(L.head.line,L.head.ch+(E?1:-1))}}function q(L,E){var N=$(L);if(!N||L.getOption("disableInput"))return m.Pass;var U=_(N,"pairs"),se=U.indexOf(E);if(se==-1)return m.Pass;for(var ne=_(N,"closeBefore"),Y=_(N,"triples"),X=U.charAt(se+1)==E,Q=L.listSelections(),H=se%2==0,de,Ae=0;Ae<Q.length;Ae++){var Z=Q[Ae],xe=Z.head,ue,Ne=L.getRange(xe,b(xe.line,xe.ch+1));if(H&&!Z.empty())ue="surround";else if((X||!H)&&Ne==E)X&&J(L,xe)?ue="both":Y.indexOf(E)>=0&&L.getRange(xe,b(xe.line,xe.ch+3))==E+E+E?ue="skipThree":ue="skip";else if(X&&xe.ch>1&&Y.indexOf(E)>=0&&L.getRange(b(xe.line,xe.ch-2),xe)==E+E){if(xe.ch>2&&/\bstring/.test(L.getTokenTypeAt(b(xe.line,xe.ch-2))))return m.Pass;ue="addFour"}else if(X){var He=xe.ch==0?" ":L.getRange(b(xe.line,xe.ch-1),xe);if(!m.isWordChar(Ne)&&He!=E&&!m.isWordChar(He))ue="both";else return m.Pass}else if(H&&(Ne.length===0||/\s/.test(Ne)||ne.indexOf(Ne)>-1))ue="both";else return m.Pass;if(!de)de=ue;else if(de!=ue)return m.Pass}var Re=se%2?U.charAt(se-1):E,ze=se%2?E:U.charAt(se+1);L.operation(function(){if(de=="skip")ee(L,1);else if(de=="skipThree")ee(L,3);else if(de=="surround"){for(var Be=L.getSelections(),Ye=0;Ye<Be.length;Ye++)Be[Ye]=Re+Be[Ye]+ze;L.replaceSelections(Be,"around"),Be=L.listSelections().slice();for(var Ye=0;Ye<Be.length;Ye++)Be[Ye]=ae(Be[Ye]);L.setSelections(Be)}else de=="both"?(L.replaceSelection(Re+ze,null),L.triggerElectric(Re+ze),ee(L,-1)):de=="addFour"&&(L.replaceSelection(Re+Re+Re+Re,"before"),ee(L,1))})}function V(L,E){var N=L.getRange(b(E.line,E.ch-1),b(E.line,E.ch+1));return N.length==2?N:null}function J(L,E){var N=L.getTokenAt(b(E.line,E.ch+1));return/\bstring/.test(N.type)&&N.start==E.ch&&(E.ch==0||!/\bstring/.test(L.getTokenTypeAt(E)))}})},82518:(x,k,c)=>{(function(m){m(c(46944))})(function(m){var w=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),b=m.Pos,_={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function A(ee){return ee&&ee.bracketRegex||/[(){}[\]]/}function O(ee,ae,q){var V=ee.getLineHandle(ae.line),J=ae.ch-1,L=q&&q.afterCursor;L==null&&(L=/(^| )cm-fat-cursor($| )/.test(ee.getWrapperElement().className));var E=A(q),N=!L&&J>=0&&E.test(V.text.charAt(J))&&_[V.text.charAt(J)]||E.test(V.text.charAt(J+1))&&_[V.text.charAt(++J)];if(!N)return null;var U=N.charAt(1)==">"?1:-1;if(q&&q.strict&&U>0!=(J==ae.ch))return null;var se=ee.getTokenTypeAt(b(ae.line,J+1)),ne=j(ee,b(ae.line,J+(U>0?1:0)),U,se,q);return ne==null?null:{from:b(ae.line,J),to:ne&&ne.pos,match:ne&&ne.ch==N.charAt(0),forward:U>0}}function j(ee,ae,q,V,J){for(var L=J&&J.maxScanLineLength||1e4,E=J&&J.maxScanLines||1e3,N=[],U=A(J),se=q>0?Math.min(ae.line+E,ee.lastLine()+1):Math.max(ee.firstLine()-1,ae.line-E),ne=ae.line;ne!=se;ne+=q){var Y=ee.getLine(ne);if(Y){var X=q>0?0:Y.length-1,Q=q>0?Y.length:-1;if(!(Y.length>L))for(ne==ae.line&&(X=ae.ch-(q<0?1:0));X!=Q;X+=q){var H=Y.charAt(X);if(U.test(H)&&(V===void 0||(ee.getTokenTypeAt(b(ne,X+1))||"")==(V||""))){var de=_[H];if(de&&de.charAt(1)==">"==q>0)N.push(H);else if(N.length)N.pop();else return{pos:b(ne,X),ch:H}}}}}return ne-q==(q>0?ee.lastLine():ee.firstLine())?!1:null}function $(ee,ae,q){for(var V=ee.state.matchBrackets.maxHighlightLineLength||1e3,J=q&&q.highlightNonMatching,L=[],E=ee.listSelections(),N=0;N<E.length;N++){var U=E[N].empty()&&O(ee,E[N].head,q);if(U&&(U.match||J!==!1)&&ee.getLine(U.from.line).length<=V){var se=U.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";L.push(ee.markText(U.from,b(U.from.line,U.from.ch+1),{className:se})),U.to&&ee.getLine(U.to.line).length<=V&&L.push(ee.markText(U.to,b(U.to.line,U.to.ch+1),{className:se}))}}if(L.length){w&&ee.state.focused&&ee.focus();var ne=function(){ee.operation(function(){for(var Y=0;Y<L.length;Y++)L[Y].clear()})};if(ae)setTimeout(ne,800);else return ne}}function K(ee){ee.operation(function(){ee.state.matchBrackets.currentlyHighlighted&&(ee.state.matchBrackets.currentlyHighlighted(),ee.state.matchBrackets.currentlyHighlighted=null),ee.state.matchBrackets.currentlyHighlighted=$(ee,!1,ee.state.matchBrackets)})}function ie(ee){ee.state.matchBrackets&&ee.state.matchBrackets.currentlyHighlighted&&(ee.state.matchBrackets.currentlyHighlighted(),ee.state.matchBrackets.currentlyHighlighted=null)}m.defineOption("matchBrackets",!1,function(ee,ae,q){q&&q!=m.Init&&(ee.off("cursorActivity",K),ee.off("focus",K),ee.off("blur",ie),ie(ee)),ae&&(ee.state.matchBrackets=typeof ae=="object"?ae:{},ee.on("cursorActivity",K),ee.on("focus",K),ee.on("blur",ie))}),m.defineExtension("matchBrackets",function(){$(this,!0)}),m.defineExtension("findMatchingBracket",function(ee,ae,q){return(q||typeof ae=="boolean")&&(q?(q.strict=ae,ae=q):ae=ae?{strict:!0}:null),O(this,ee,ae)}),m.defineExtension("scanForBracket",function(ee,ae,q,V){return j(this,ee,ae,q,V)})})},77436:(x,k,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var w="CodeMirror-hint",b="CodeMirror-hint-active";m.showHint=function(L,E,N){if(!E)return L.showHint(N);N&&N.async&&(E.async=!0);var U={hint:E};if(N)for(var se in N)U[se]=N[se];return L.showHint(U)},m.defineExtension("showHint",function(L){L=j(this,this.getCursor("start"),L);var E=this.listSelections();if(!(E.length>1)){if(this.somethingSelected()){if(!L.hint.supportsSelection)return;for(var N=0;N<E.length;N++)if(E[N].head.line!=E[N].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var U=this.state.completionActive=new _(this,L);U.options.hint&&(m.signal(this,"startCompletion",this),U.update(!0))}}),m.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function _(L,E){if(this.cm=L,this.options=E,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 N=this;L.on("cursorActivity",this.activityFunc=function(){N.cursorActivity()})}}var A=window.requestAnimationFrame||function(L){return setTimeout(L,1e3/60)},O=window.cancelAnimationFrame||clearTimeout;_.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(L,E){var N=L.list[E],U=this;this.cm.operation(function(){N.hint?N.hint(U.cm,L,N):U.cm.replaceRange($(N),N.from||L.from,N.to||L.to,"complete"),m.signal(L,"pick",N),U.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(O(this.debounce),this.debounce=0);var L=this.startPos;this.data&&(L=this.data.from);var E=this.cm.getCursor(),N=this.cm.getLine(E.line);if(E.line!=this.startPos.line||N.length-E.ch!=this.startLen-this.startPos.ch||E.ch<L.ch||this.cm.somethingSelected()||!E.ch||this.options.closeCharacters.test(N.charAt(E.ch-1)))this.close();else{var U=this;this.debounce=A(function(){U.update()}),this.widget&&this.widget.disable()}},update:function(L){if(this.tick!=null){var E=this,N=++this.tick;q(this.options.hint,this.cm,this.options,function(U){E.tick==N&&E.finishUpdate(U,L)})}},finishUpdate:function(L,E){this.data&&m.signal(this.data,"update");var N=this.widget&&this.widget.picked||E&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=L,L&&L.list.length&&(N&&L.list.length==1?this.pick(L,0):(this.widget=new ee(this,L),m.signal(L,"shown")))}};function j(L,E,N){var U=L.options.hintOptions,se={};for(var ne in J)se[ne]=J[ne];if(U)for(var ne in U)U[ne]!==void 0&&(se[ne]=U[ne]);if(N)for(var ne in N)N[ne]!==void 0&&(se[ne]=N[ne]);return se.hint.resolve&&(se.hint=se.hint.resolve(L,E)),se}function $(L){return typeof L=="string"?L:L.text}function K(L,E){var N={Up:function(){E.moveFocus(-1)},Down:function(){E.moveFocus(1)},PageUp:function(){E.moveFocus(-E.menuSize()+1,!0)},PageDown:function(){E.moveFocus(E.menuSize()-1,!0)},Home:function(){E.setFocus(0)},End:function(){E.setFocus(E.length-1)},Enter:E.pick,Tab:E.pick,Esc:E.close},U=/Mac/.test(navigator.platform);U&&(N["Ctrl-P"]=function(){E.moveFocus(-1)},N["Ctrl-N"]=function(){E.moveFocus(1)});var se=L.options.customKeys,ne=se?{}:N;function Y(H,de){var Ae;typeof de!="string"?Ae=function(Z){return de(Z,E)}:N.hasOwnProperty(de)?Ae=N[de]:Ae=de,ne[H]=Ae}if(se)for(var X in se)se.hasOwnProperty(X)&&Y(X,se[X]);var Q=L.options.extraKeys;if(Q)for(var X in Q)Q.hasOwnProperty(X)&&Y(X,Q[X]);return ne}function ie(L,E){for(;E&&E!=L;){if(E.nodeName.toUpperCase()==="LI"&&E.parentNode==L)return E;E=E.parentNode}}function ee(L,E){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=L,this.data=E,this.picked=!1;var N=this,U=L.cm,se=U.getInputField().ownerDocument,ne=se.defaultView||se.parentWindow,Y=this.hints=se.createElement("ul");Y.setAttribute("role","listbox"),Y.setAttribute("aria-expanded","true"),Y.id=this.id;var X=L.cm.options.theme;Y.className="CodeMirror-hints "+X,this.selectedHint=E.selectedHint||0;for(var Q=E.list,H=0;H<Q.length;++H){var de=Y.appendChild(se.createElement("li")),Ae=Q[H],Z=w+(H!=this.selectedHint?"":" "+b);Ae.className!=null&&(Z=Ae.className+" "+Z),de.className=Z,H==this.selectedHint&&de.setAttribute("aria-selected","true"),de.id=this.id+"-"+H,de.setAttribute("role","option"),Ae.render?Ae.render(de,E,Ae):de.appendChild(se.createTextNode(Ae.displayText||$(Ae))),de.hintId=H}var xe=L.options.container||se.body,ue=U.cursorCoords(L.options.alignWithWord?E.from:null),Ne=ue.left,He=ue.bottom,Re=!0,ze=0,Be=0;if(xe!==se.body){var Ye=["absolute","relative","fixed"].indexOf(ne.getComputedStyle(xe).position)!==-1,gt=Ye?xe:xe.offsetParent,ut=gt.getBoundingClientRect(),yt=se.body.getBoundingClientRect();ze=ut.left-yt.left-gt.scrollLeft,Be=ut.top-yt.top-gt.scrollTop}Y.style.left=Ne-ze+"px",Y.style.top=He-Be+"px";var lt=ne.innerWidth||Math.max(se.body.offsetWidth,se.documentElement.offsetWidth),Ke=ne.innerHeight||Math.max(se.body.offsetHeight,se.documentElement.offsetHeight);xe.appendChild(Y),U.getInputField().setAttribute("aria-autocomplete","list"),U.getInputField().setAttribute("aria-owns",this.id),U.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Fe=L.options.moveOnOverlap?Y.getBoundingClientRect():new DOMRect,qe=L.options.paddingForScrollbar?Y.scrollHeight>Y.clientHeight+1:!1,bt;setTimeout(function(){bt=U.getScrollInfo()});var Lt=Fe.bottom-Ke;if(Lt>0){var Rt=Fe.bottom-Fe.top,zt=Fe.top-(ue.bottom-ue.top)-2;Ke-Fe.top<zt?(Rt>zt&&(Y.style.height=(Rt=zt)+"px"),Y.style.top=(He=ue.top-Rt)+Be+"px",Re=!1):Y.style.height=Ke-Fe.top-2+"px"}var kr=Fe.right-lt;if(qe&&(kr+=U.display.nativeBarWidth),kr>0&&(Fe.right-Fe.left>lt&&(Y.style.width=lt-5+"px",kr-=Fe.right-Fe.left-lt),Y.style.left=(Ne=Math.max(ue.left-kr-ze,0))+"px"),qe)for(var jr=Y.firstChild;jr;jr=jr.nextSibling)jr.style.paddingRight=U.display.nativeBarWidth+"px";if(U.addKeyMap(this.keyMap=K(L,{moveFocus:function($t,nr){N.changeActive(N.selectedHint+$t,nr)},setFocus:function($t){N.changeActive($t)},menuSize:function(){return N.screenAmount()},length:Q.length,close:function(){L.close()},pick:function(){N.pick()},data:E})),L.options.closeOnUnfocus){var qr;U.on("blur",this.onBlur=function(){qr=setTimeout(function(){L.close()},100)}),U.on("focus",this.onFocus=function(){clearTimeout(qr)})}U.on("scroll",this.onScroll=function(){var $t=U.getScrollInfo(),nr=U.getWrapperElement().getBoundingClientRect();bt||(bt=U.getScrollInfo());var er=He+bt.top-$t.top,kn=er-(ne.pageYOffset||(se.documentElement||se.body).scrollTop);if(Re||(kn+=Y.offsetHeight),kn<=nr.top||kn>=nr.bottom)return L.close();Y.style.top=er+"px",Y.style.left=Ne+bt.left-$t.left+"px"}),m.on(Y,"dblclick",function($t){var nr=ie(Y,$t.target||$t.srcElement);nr&&nr.hintId!=null&&(N.changeActive(nr.hintId),N.pick())}),m.on(Y,"click",function($t){var nr=ie(Y,$t.target||$t.srcElement);nr&&nr.hintId!=null&&(N.changeActive(nr.hintId),L.options.completeOnSingleClick&&N.pick())}),m.on(Y,"mousedown",function(){setTimeout(function(){U.focus()},20)});var ht=this.getSelectedHintRange();return(ht.from!==0||ht.to!==0)&&this.scrollToActive(),m.signal(E,"select",Q[this.selectedHint],Y.childNodes[this.selectedHint]),!0}ee.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 L=this.completion.cm.getInputField();L.removeAttribute("aria-activedescendant"),L.removeAttribute("aria-owns");var E=this.completion.cm;this.completion.options.closeOnUnfocus&&(E.off("blur",this.onBlur),E.off("focus",this.onFocus)),E.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var L=this;this.keyMap={Enter:function(){L.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(L,E){if(L>=this.data.list.length?L=E?this.data.list.length-1:0:L<0&&(L=E?0:this.data.list.length-1),this.selectedHint!=L){var N=this.hints.childNodes[this.selectedHint];N&&(N.className=N.className.replace(" "+b,""),N.removeAttribute("aria-selected")),N=this.hints.childNodes[this.selectedHint=L],N.className+=" "+b,N.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",N.id),this.scrollToActive(),m.signal(this.data,"select",this.data.list[this.selectedHint],N)}},scrollToActive:function(){var L=this.getSelectedHintRange(),E=this.hints.childNodes[L.from],N=this.hints.childNodes[L.to],U=this.hints.firstChild;E.offsetTop<this.hints.scrollTop?this.hints.scrollTop=E.offsetTop-U.offsetTop:N.offsetTop+N.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=N.offsetTop+N.offsetHeight-this.hints.clientHeight+U.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var L=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-L),to:Math.min(this.data.list.length-1,this.selectedHint+L)}}};function ae(L,E){if(!L.somethingSelected())return E;for(var N=[],U=0;U<E.length;U++)E[U].supportsSelection&&N.push(E[U]);return N}function q(L,E,N,U){if(L.async)L(E,U,N);else{var se=L(E,N);se&&se.then?se.then(U):U(se)}}function V(L,E){var N=L.getHelpers(E,"hint"),U;if(N.length){var se=function(ne,Y,X){var Q=ae(ne,N);function H(de){if(de==Q.length)return Y(null);q(Q[de],ne,X,function(Ae){Ae&&Ae.list.length>0?Y(Ae):H(de+1)})}H(0)};return se.async=!0,se.supportsSelection=!0,se}else return(U=L.getHelper(L.getCursor(),"hintWords"))?function(ne){return m.hint.fromList(ne,{words:U})}:m.hint.anyword?function(ne,Y){return m.hint.anyword(ne,Y)}:function(){}}m.registerHelper("hint","auto",{resolve:V}),m.registerHelper("hint","fromList",function(L,E){var N=L.getCursor(),U=L.getTokenAt(N),se,ne=m.Pos(N.line,U.start),Y=N;U.start<N.ch&&/\w/.test(U.string.charAt(N.ch-U.start-1))?se=U.string.substr(0,N.ch-U.start):(se="",ne=N);for(var X=[],Q=0;Q<E.words.length;Q++){var H=E.words[Q];H.slice(0,se.length)==se&&X.push(H)}if(X.length)return{list:X,from:ne,to:Y}}),m.commands.autocomplete=m.showHint;var J={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:(x,k,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var w="CodeMirror-lint-markers",b="CodeMirror-lint-line-";function _(Y,X,Q){var H=document.createElement("div");H.className="CodeMirror-lint-tooltip cm-s-"+Y.options.theme,H.appendChild(Q.cloneNode(!0)),Y.state.lint.options.selfContain?Y.getWrapperElement().appendChild(H):document.body.appendChild(H);function de(Ae){if(!H.parentNode)return m.off(document,"mousemove",de);H.style.top=Math.max(0,Ae.clientY-H.offsetHeight-5)+"px",H.style.left=Ae.clientX+5+"px"}return m.on(document,"mousemove",de),de(X),H.style.opacity!=null&&(H.style.opacity=1),H}function A(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}function O(Y){Y.parentNode&&(Y.style.opacity==null&&A(Y),Y.style.opacity=0,setTimeout(function(){A(Y)},600))}function j(Y,X,Q,H){var de=_(Y,X,Q);function Ae(){m.off(H,"mouseout",Ae),de&&(O(de),de=null)}var Z=setInterval(function(){if(de)for(var xe=H;;xe=xe.parentNode){if(xe&&xe.nodeType==11&&(xe=xe.host),xe==document.body)return;if(!xe){Ae();break}}if(!de)return clearInterval(Z)},400);m.on(H,"mouseout",Ae)}function $(Y,X,Q){this.marked=[],X instanceof Function&&(X={getAnnotations:X}),(!X||X===!0)&&(X={}),this.options={},this.linterOptions=X.options||{};for(var H in K)this.options[H]=K[H];for(var H in X)K.hasOwnProperty(H)?X[H]!=null&&(this.options[H]=X[H]):X.options||(this.linterOptions[H]=X[H]);this.timeout=null,this.hasGutter=Q,this.onMouseOver=function(de){ne(Y,de)},this.waitingFor=0}var K={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function ie(Y){var X=Y.state.lint;X.hasGutter&&Y.clearGutter(w),X.options.highlightLines&&ee(Y);for(var Q=0;Q<X.marked.length;++Q)X.marked[Q].clear();X.marked.length=0}function ee(Y){Y.eachLine(function(X){var Q=X.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(X.wrapClass);Q&&Y.removeLineClass(X,"wrap",Q[0])})}function ae(Y,X,Q,H,de){var Ae=document.createElement("div"),Z=Ae;return Ae.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+Q,H&&(Z=Ae.appendChild(document.createElement("div")),Z.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),de!=!1&&m.on(Z,"mouseover",function(xe){j(Y,xe,X,Z)}),Ae}function q(Y,X){return Y=="error"?Y:X}function V(Y){for(var X=[],Q=0;Q<Y.length;++Q){var H=Y[Q],de=H.from.line;(X[de]||(X[de]=[])).push(H)}return X}function J(Y){var X=Y.severity;X||(X="error");var Q=document.createElement("div");return Q.className="CodeMirror-lint-message CodeMirror-lint-message-"+X,typeof Y.messageHTML!="undefined"?Q.innerHTML=Y.messageHTML:Q.appendChild(document.createTextNode(Y.message)),Q}function L(Y,X){var Q=Y.state.lint,H=++Q.waitingFor;function de(){H=-1,Y.off("change",de)}Y.on("change",de),X(Y.getValue(),function(Ae,Z){Y.off("change",de),Q.waitingFor==H&&(Z&&Ae instanceof m&&(Ae=Z),Y.operation(function(){N(Y,Ae)}))},Q.linterOptions,Y)}function E(Y){var X=Y.state.lint;if(X){var Q=X.options,H=Q.getAnnotations||Y.getHelper(m.Pos(0,0),"lint");if(H)if(Q.async||H.async)L(Y,H);else{var de=H(Y.getValue(),X.linterOptions,Y);if(!de)return;de.then?de.then(function(Ae){Y.operation(function(){N(Y,Ae)})}):Y.operation(function(){N(Y,de)})}}}function N(Y,X){var Q=Y.state.lint;if(Q){var H=Q.options;ie(Y);for(var de=V(X),Ae=0;Ae<de.length;++Ae){var Z=de[Ae];if(Z){var xe=[];Z=Z.filter(function(Be){return xe.indexOf(Be.message)>-1?!1:xe.push(Be.message)});for(var ue=null,Ne=Q.hasGutter&&document.createDocumentFragment(),He=0;He<Z.length;++He){var Re=Z[He],ze=Re.severity;ze||(ze="error"),ue=q(ue,ze),H.formatAnnotation&&(Re=H.formatAnnotation(Re)),Q.hasGutter&&Ne.appendChild(J(Re)),Re.to&&Q.marked.push(Y.markText(Re.from,Re.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+ze,__annotation:Re}))}Q.hasGutter&&Y.setGutterMarker(Ae,w,ae(Y,Ne,ue,de[Ae].length>1,H.tooltips)),H.highlightLines&&Y.addLineClass(Ae,"wrap",b+ue)}}H.onUpdateLinting&&H.onUpdateLinting(X,de,Y)}}function U(Y){var X=Y.state.lint;X&&(clearTimeout(X.timeout),X.timeout=setTimeout(function(){E(Y)},X.options.delay))}function se(Y,X,Q){for(var H=Q.target||Q.srcElement,de=document.createDocumentFragment(),Ae=0;Ae<X.length;Ae++){var Z=X[Ae];de.appendChild(J(Z))}j(Y,Q,de,H)}function ne(Y,X){var Q=X.target||X.srcElement;if(/\bCodeMirror-lint-mark-/.test(Q.className)){for(var H=Q.getBoundingClientRect(),de=(H.left+H.right)/2,Ae=(H.top+H.bottom)/2,Z=Y.findMarksAt(Y.coordsChar({left:de,top:Ae},"client")),xe=[],ue=0;ue<Z.length;++ue){var Ne=Z[ue].__annotation;Ne&&xe.push(Ne)}xe.length&&se(Y,xe,X)}}m.defineOption("lint",!1,function(Y,X,Q){if(Q&&Q!=m.Init&&(ie(Y),Y.state.lint.options.lintOnChange!==!1&&Y.off("change",U),m.off(Y.getWrapperElement(),"mouseover",Y.state.lint.onMouseOver),clearTimeout(Y.state.lint.timeout),delete Y.state.lint),X){for(var H=Y.getOption("gutters"),de=!1,Ae=0;Ae<H.length;++Ae)H[Ae]==w&&(de=!0);var Z=Y.state.lint=new $(Y,X,de);Z.options.lintOnChange&&Y.on("change",U),Z.options.tooltips!=!1&&Z.options.tooltips!="gutter"&&m.on(Y.getWrapperElement(),"mouseover",Z.onMouseOver),E(Y)}}),m.defineExtension("performLint",function(){E(this)})})},71628:(x,k,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var w=m.Pos;function b(E){var N=E.flags;return N!=null?N:(E.ignoreCase?"i":"")+(E.global?"g":"")+(E.multiline?"m":"")}function _(E,N){for(var U=b(E),se=U,ne=0;ne<N.length;ne++)se.indexOf(N.charAt(ne))==-1&&(se+=N.charAt(ne));return U==se?E:new RegExp(E.source,se)}function A(E){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(E.source)}function O(E,N,U){N=_(N,"g");for(var se=U.line,ne=U.ch,Y=E.lastLine();se<=Y;se++,ne=0){N.lastIndex=ne;var X=E.getLine(se),Q=N.exec(X);if(Q)return{from:w(se,Q.index),to:w(se,Q.index+Q[0].length),match:Q}}}function j(E,N,U){if(!A(N))return O(E,N,U);N=_(N,"gm");for(var se,ne=1,Y=U.line,X=E.lastLine();Y<=X;){for(var Q=0;Q<ne&&!(Y>X);Q++){var H=E.getLine(Y++);se=se==null?H:se+`
8
8
  `+H}ne=ne*2,N.lastIndex=U.ch;var de=N.exec(se);if(de){var Ae=se.slice(0,de.index).split(`
@@ -10,58 +10,58 @@ var et=(x,k,c)=>new Promise((m,w)=>{var b=O=>{try{A(c.next(O))}catch(j){w(j)}},_
10
10
  `),xe=U.line+Ae.length-1,ue=Ae[Ae.length-1].length;return{from:w(xe,ue),to:w(xe+Z.length-1,Z.length==1?ue+Z[0].length:Z[Z.length-1].length),match:de}}}}function $(E,N,U){for(var se,ne=0;ne<=E.length;){N.lastIndex=ne;var Y=N.exec(E);if(!Y)break;var X=Y.index+Y[0].length;if(X>E.length-U)break;(!se||X>se.index+se[0].length)&&(se=Y),ne=Y.index+1}return se}function K(E,N,U){N=_(N,"g");for(var se=U.line,ne=U.ch,Y=E.firstLine();se>=Y;se--,ne=-1){var X=E.getLine(se),Q=$(X,N,ne<0?0:X.length-ne);if(Q)return{from:w(se,Q.index),to:w(se,Q.index+Q[0].length),match:Q}}}function ie(E,N,U){if(!A(N))return K(E,N,U);N=_(N,"gm");for(var se,ne=1,Y=E.getLine(U.line).length-U.ch,X=U.line,Q=E.firstLine();X>=Q;){for(var H=0;H<ne&&X>=Q;H++){var de=E.getLine(X--);se=se==null?de:de+`
11
11
  `+se}ne*=2;var Ae=$(se,N,Y);if(Ae){var Z=se.slice(0,Ae.index).split(`
12
12
  `),xe=Ae[0].split(`
13
- `),ue=X+Z.length,Ne=Z[Z.length-1].length;return{from:w(ue,Ne),to:w(ue+xe.length-1,xe.length==1?Ne+xe[0].length:xe[xe.length-1].length),match:Ae}}}}var ee,ae;String.prototype.normalize?(ee=function(E){return E.normalize("NFD").toLowerCase()},ae=function(E){return E.normalize("NFD")}):(ee=function(E){return E.toLowerCase()},ae=function(E){return E});function q(E,N,U,se){if(E.length==N.length)return U;for(var ne=0,Y=U+Math.max(0,E.length-N.length);;){if(ne==Y)return ne;var X=ne+Y>>1,Q=se(E.slice(0,X)).length;if(Q==U)return X;Q>U?Y=X:ne=X+1}}function V(E,N,U,se){if(!N.length)return null;var ne=se?ee:ae,Y=ne(N).split(/\r|\n\r?/);e:for(var X=U.line,Q=U.ch,H=E.lastLine()+1-Y.length;X<=H;X++,Q=0){var de=E.getLine(X).slice(Q),Ae=ne(de);if(Y.length==1){var Z=Ae.indexOf(Y[0]);if(Z==-1)continue e;var U=q(de,Ae,Z,ne)+Q;return{from:w(X,q(de,Ae,Z,ne)+Q),to:w(X,q(de,Ae,Z+Y[0].length,ne)+Q)}}else{var xe=Ae.length-Y[0].length;if(Ae.slice(xe)!=Y[0])continue e;for(var ue=1;ue<Y.length-1;ue++)if(ne(E.getLine(X+ue))!=Y[ue])continue e;var Ne=E.getLine(X+Y.length-1),He=ne(Ne),Re=Y[Y.length-1];if(He.slice(0,Re.length)!=Re)continue e;return{from:w(X,q(de,Ae,xe,ne)+Q),to:w(X+Y.length-1,q(Ne,He,Re.length,ne))}}}}function J(E,N,U,se){if(!N.length)return null;var ne=se?ee:ae,Y=ne(N).split(/\r|\n\r?/);e:for(var X=U.line,Q=U.ch,H=E.firstLine()-1+Y.length;X>=H;X--,Q=-1){var de=E.getLine(X);Q>-1&&(de=de.slice(0,Q));var Ae=ne(de);if(Y.length==1){var Z=Ae.lastIndexOf(Y[0]);if(Z==-1)continue e;return{from:w(X,q(de,Ae,Z,ne)),to:w(X,q(de,Ae,Z+Y[0].length,ne))}}else{var xe=Y[Y.length-1];if(Ae.slice(0,xe.length)!=xe)continue e;for(var ue=1,U=X-Y.length+1;ue<Y.length-1;ue++)if(ne(E.getLine(U+ue))!=Y[ue])continue e;var Ne=E.getLine(X+1-Y.length),He=ne(Ne);if(He.slice(He.length-Y[0].length)!=Y[0])continue e;return{from:w(X+1-Y.length,q(Ne,He,Ne.length-Y[0].length,ne)),to:w(X,q(de,Ae,xe.length,ne))}}}}function L(E,N,U,se){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=E,U=U?E.clipPos(U):w(0,0),this.pos={from:U,to:U};var ne;typeof se=="object"?ne=se.caseFold:(ne=se,se=null),typeof N=="string"?(ne==null&&(ne=!1),this.matches=function(Y,X){return(Y?J:V)(E,N,X,ne)}):(N=_(N,"gm"),!se||se.multiline!==!1?this.matches=function(Y,X){return(Y?ie:j)(E,N,X)}:this.matches=function(Y,X){return(Y?K:O)(E,N,X)})}L.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(E){var N=this.doc.clipPos(E?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(N=w(N.line,N.ch),E?(N.ch--,N.ch<0&&(N.line--,N.ch=(this.doc.getLine(N.line)||"").length)):(N.ch++,N.ch>(this.doc.getLine(N.line)||"").length&&(N.ch=0,N.line++)),m.cmpPos(N,this.doc.clipPos(N))!=0))return this.atOccurrence=!1;var U=this.matches(E,N);if(this.afterEmptyMatch=U&&m.cmpPos(U.from,U.to)==0,U)return this.pos=U,this.atOccurrence=!0,this.pos.match||!0;var se=w(E?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:se,to:se},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(E,N){if(this.atOccurrence){var U=m.splitLines(E);this.doc.replaceRange(U,this.pos.from,this.pos.to,N),this.pos.to=w(this.pos.from.line+U.length-1,U[U.length-1].length+(U.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(E,N,U){return new L(this.doc,E,N,U)}),m.defineDocExtension("getSearchCursor",function(E,N,U){return new L(this,E,N,U)}),m.defineExtension("selectMatches",function(E,N){for(var U=[],se=this.getSearchCursor(E,this.getCursor("from"),N);se.findNext()&&!(m.cmpPos(se.to(),this.getCursor("to"))>0);)U.push({anchor:se.from(),head:se.to()});U.length&&this.setSelections(U,0)})})},46944:function(x){(function(k,c){x.exports=c()})(this,function(){"use strict";var k=navigator.userAgent,c=navigator.platform,m=/gecko\/\d/i.test(k),w=/MSIE \d/.test(k),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(k),_=/Edge\/(\d+)/.exec(k),A=w||b||_,O=A&&(w?document.documentMode||6:+(_||b)[1]),j=!_&&/WebKit\//.test(k),$=j&&/Qt\/\d+\.\d+/.test(k),K=!_&&/Chrome\/(\d+)/.exec(k),ie=K&&+K[1],ee=/Opera\//.test(k),ae=/Apple Computer/.test(navigator.vendor),q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(k),V=/PhantomJS/.test(k),J=ae&&(/Mobile\/\w+/.test(k)||navigator.maxTouchPoints>2),L=/Android/.test(k),E=J||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(k),N=J||/Mac/.test(c),U=/\bCrOS\b/.test(k),se=/win/i.test(c),ne=ee&&k.match(/Version\/(\d*\.\d*)/);ne&&(ne=Number(ne[1])),ne&&ne>=15&&(ee=!1,j=!0);var Y=N&&($||ee&&(ne==null||ne<12.11)),X=m||A&&O>=9;function Q(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var H=function(i,o){var u=i.className,l=Q(o).exec(u);if(l){var f=u.slice(l.index+l[0].length);i.className=u.slice(0,l.index)+(f?l[1]+f:"")}};function de(i){for(var o=i.childNodes.length;o>0;--o)i.removeChild(i.firstChild);return i}function Ae(i,o){return de(i).appendChild(o)}function Z(i,o,u,l){var f=document.createElement(i);if(u&&(f.className=u),l&&(f.style.cssText=l),typeof o=="string")f.appendChild(document.createTextNode(o));else if(o)for(var v=0;v<o.length;++v)f.appendChild(o[v]);return f}function xe(i,o,u,l){var f=Z(i,o,u,l);return f.setAttribute("role","presentation"),f}var ue;document.createRange?ue=function(i,o,u,l){var f=document.createRange();return f.setEnd(l||i,u),f.setStart(i,o),f}:ue=function(i,o,u){var l=document.body.createTextRange();try{l.moveToElementText(i.parentNode)}catch(f){return l}return l.collapse(!0),l.moveEnd("character",u),l.moveStart("character",o),l};function Ne(i,o){if(o.nodeType==3&&(o=o.parentNode),i.contains)return i.contains(o);do if(o.nodeType==11&&(o=o.host),o==i)return!0;while(o=o.parentNode)}function He(i){var o;try{o=i.activeElement}catch(u){o=i.body||null}for(;o&&o.shadowRoot&&o.shadowRoot.activeElement;)o=o.shadowRoot.activeElement;return o}function Re(i,o){var u=i.className;Q(o).test(u)||(i.className+=(u?" ":"")+o)}function ze(i,o){for(var u=i.split(" "),l=0;l<u.length;l++)u[l]&&!Q(u[l]).test(o)&&(o+=" "+u[l]);return o}var Be=function(i){i.select()};J?Be=function(i){i.selectionStart=0,i.selectionEnd=i.value.length}:A&&(Be=function(i){try{i.select()}catch(o){}});function Ye(i){return i.display.wrapper.ownerDocument}function gt(i){return Ye(i).defaultView}function ut(i){var o=Array.prototype.slice.call(arguments,1);return function(){return i.apply(null,o)}}function yt(i,o,u){o||(o={});for(var l in i)i.hasOwnProperty(l)&&(u!==!1||!o.hasOwnProperty(l))&&(o[l]=i[l]);return o}function lt(i,o,u,l,f){o==null&&(o=i.search(/[^\s\u00a0]/),o==-1&&(o=i.length));for(var v=l||0,S=f||0;;){var P=i.indexOf(" ",v);if(P<0||P>=o)return S+(o-v);S+=P-v,S+=u-S%u,v=P+1}}var Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=ut(this.onTimeout,this)};Ke.prototype.onTimeout=function(i){i.id=0,i.time<=+new Date?i.f():setTimeout(i.handler,i.time-+new Date)},Ke.prototype.set=function(i,o){this.f=o;var u=+new Date+i;(!this.id||u<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,i),this.time=u)};function Fe(i,o){for(var u=0;u<i.length;++u)if(i[u]==o)return u;return-1}var qe=50,bt={toString:function(){return"CodeMirror.Pass"}},Lt={scroll:!1},Rt={origin:"*mouse"},zt={origin:"+move"};function kr(i,o,u){for(var l=0,f=0;;){var v=i.indexOf(" ",l);v==-1&&(v=i.length);var S=v-l;if(v==i.length||f+S>=o)return l+Math.min(S,o-f);if(f+=v-l,f+=u-f%u,l=v+1,f>=o)return l}}var jr=[""];function qr(i){for(;jr.length<=i;)jr.push(ht(jr)+" ");return jr[i]}function ht(i){return i[i.length-1]}function $t(i,o){for(var u=[],l=0;l<i.length;l++)u[l]=o(i[l],l);return u}function nr(i,o,u){for(var l=0,f=u(o);l<i.length&&u(i[l])<=f;)l++;i.splice(l,0,o)}function er(){}function kn(i,o){var u;return Object.create?u=Object.create(i):(er.prototype=i,u=new er),o&&yt(o,u),u}var ki=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Wn(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||ki.test(i))}function Hn(i,o){return o?o.source.indexOf("\\w")>-1&&Wn(i)?!0:o.test(i):Wn(i)}function ei(i){for(var o in i)if(i.hasOwnProperty(o)&&i[o])return!1;return!0}var ji=/[\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 vi(i){return i.charCodeAt(0)>=768&&ji.test(i)}function jn(i,o,u){for(;(u<0?o>0:o<i.length)&&vi(i.charAt(o));)o+=u;return o}function mn(i,o,u){for(var l=o>u?-1:1;;){if(o==u)return o;var f=(o+u)/2,v=l<0?Math.ceil(f):Math.floor(f);if(v==o)return i(v)?o:u;i(v)?u=v:o=v+l}}function vn(i,o,u,l){if(!i)return l(o,u,"ltr",0);for(var f=!1,v=0;v<i.length;++v){var S=i[v];(S.from<u&&S.to>o||o==u&&S.to==o)&&(l(Math.max(S.from,o),Math.min(S.to,u),S.level==1?"rtl":"ltr",v),f=!0)}f||l(o,u,"ltr")}var fr=null;function Ft(i,o,u){var l;fr=null;for(var f=0;f<i.length;++f){var v=i[f];if(v.from<o&&v.to>o)return f;v.to==o&&(v.from!=v.to&&u=="before"?l=f:fr=f),v.from==o&&(v.from!=v.to&&u!="before"?l=f:fr=f)}return l!=null?l:fr}var At=function(){var i="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(D){return D<=247?i.charAt(D):1424<=D&&D<=1524?"R":1536<=D&&D<=1785?o.charAt(D-1536):1774<=D&&D<=2220?"r":8192<=D&&D<=8203?"w":D==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,v=/[LRr]/,S=/[Lb1n]/,P=/[1n]/;function T(D,oe,fe){this.level=D,this.from=oe,this.to=fe}return function(D,oe){var fe=oe=="ltr"?"L":"R";if(D.length==0||oe=="ltr"&&!l.test(D))return!1;for(var we=D.length,ge=[],Ve=0;Ve<we;++Ve)ge.push(u(D.charCodeAt(Ve)));for(var Ie=0,De=fe;Ie<we;++Ie){var Ue=ge[Ie];Ue=="m"?ge[Ie]=De:De=Ue}for(var Ge=0,We=fe;Ge<we;++Ge){var Xe=ge[Ge];Xe=="1"&&We=="r"?ge[Ge]="n":v.test(Xe)&&(We=Xe,Xe=="r"&&(ge[Ge]="R"))}for(var ct=1,at=ge[0];ct<we-1;++ct){var It=ge[ct];It=="+"&&at=="1"&&ge[ct+1]=="1"?ge[ct]="1":It==","&&at==ge[ct+1]&&(at=="1"||at=="n")&&(ge[ct]=at),at=It}for(var mr=0;mr<we;++mr){var Gr=ge[mr];if(Gr==",")ge[mr]="N";else if(Gr=="%"){var Cr=void 0;for(Cr=mr+1;Cr<we&&ge[Cr]=="%";++Cr);for(var Ln=mr&&ge[mr-1]=="!"||Cr<we&&ge[Cr]=="1"?"1":"N",Pn=mr;Pn<Cr;++Pn)ge[Pn]=Ln;mr=Cr-1}}for(var Br=0,Dn=fe;Br<we;++Br){var pn=ge[Br];Dn=="L"&&pn=="1"?ge[Br]="L":v.test(pn)&&(Dn=pn)}for(var $r=0;$r<we;++$r)if(f.test(ge[$r])){var Mr=void 0;for(Mr=$r+1;Mr<we&&f.test(ge[Mr]);++Mr);for(var vr=($r?ge[$r-1]:fe)=="L",Tn=(Mr<we?ge[Mr]:fe)=="L",ya=vr==Tn?vr?"L":"R":fe,Eo=$r;Eo<Mr;++Eo)ge[Eo]=ya;$r=Mr-1}for(var bn=[],oi,Kr=0;Kr<we;)if(S.test(ge[Kr])){var nf=Kr;for(++Kr;Kr<we&&S.test(ge[Kr]);++Kr);bn.push(new T(0,nf,Kr))}else{var ys=Kr,Ao=bn.length,Co=oe=="rtl"?1:0;for(++Kr;Kr<we&&ge[Kr]!="L";++Kr);for(var rn=ys;rn<Kr;)if(P.test(ge[rn])){ys<rn&&(bn.splice(Ao,0,new T(1,ys,rn)),Ao+=Co);var ba=rn;for(++rn;rn<Kr&&P.test(ge[rn]);++rn);bn.splice(Ao,0,new T(2,ba,rn)),Ao+=Co,ys=rn}else++rn;ys<Kr&&bn.splice(Ao,0,new T(1,ys,Kr))}return oe=="ltr"&&(bn[0].level==1&&(oi=D.match(/^\s+/))&&(bn[0].from=oi[0].length,bn.unshift(new T(0,0,oi[0].length))),ht(bn).level==1&&(oi=D.match(/\s+$/))&&(ht(bn).to-=oi[0].length,bn.push(new T(0,we-oi[0].length,we)))),oe=="rtl"?bn.reverse():bn}}();function mt(i,o){var u=i.order;return u==null&&(u=i.order=At(i.text,o)),u}var Tt=[],pe=function(i,o,u){if(i.addEventListener)i.addEventListener(o,u,!1);else if(i.attachEvent)i.attachEvent("on"+o,u);else{var l=i._handlers||(i._handlers={});l[o]=(l[o]||Tt).concat(u)}};function Pe(i,o){return i._handlers&&i._handlers[o]||Tt}function Je(i,o,u){if(i.removeEventListener)i.removeEventListener(o,u,!1);else if(i.detachEvent)i.detachEvent("on"+o,u);else{var l=i._handlers,f=l&&l[o];if(f){var v=Fe(f,u);v>-1&&(l[o]=f.slice(0,v).concat(f.slice(v+1)))}}}function xt(i,o){var u=Pe(i,o);if(u.length)for(var l=Array.prototype.slice.call(arguments,2),f=0;f<u.length;++f)u[f].apply(null,l)}function _t(i,o,u){return typeof o=="string"&&(o={type:o,preventDefault:function(){this.defaultPrevented=!0}}),xt(i,u||o.type,i,o),rs(o)||o.codemirrorIgnore}function Ot(i){var o=i._handlers&&i._handlers.cursorActivity;if(o)for(var u=i.curOp.cursorActivityHandlers||(i.curOp.cursorActivityHandlers=[]),l=0;l<o.length;++l)Fe(u,o[l])==-1&&u.push(o[l])}function Sr(i,o){return Pe(i,o).length>0}function sn(i){i.prototype.on=function(o,u){pe(this,o,u)},i.prototype.off=function(o,u){Je(this,o,u)}}function Xt(i){i.preventDefault?i.preventDefault():i.returnValue=!1}function Fr(i){i.stopPropagation?i.stopPropagation():i.cancelBubble=!0}function rs(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==!1}function on(i){Xt(i),Fr(i)}function an(i){return i.target||i.srcElement}function ns(i){var o=i.which;return o==null&&(i.button&1?o=1:i.button&2?o=3:i.button&4&&(o=2)),N&&i.ctrlKey&&o==1&&(o=3),o}var ln=function(){if(A&&O<9)return!1;var i=Z("div");return"draggable"in i||"dragDrop"in i}(),Ii;function Ri(i){if(Ii==null){var o=Z("span","\u200B");Ae(i,Z("span",[o,document.createTextNode("x")])),i.firstChild.offsetHeight!=0&&(Ii=o.offsetWidth<=1&&o.offsetHeight>2&&!(A&&O<8))}var u=Ii?Z("span","\u200B"):Z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}var un;function ss(i){if(un!=null)return un;var o=Ae(i,document.createTextNode("A\u062EA")),u=ue(o,0,1).getBoundingClientRect(),l=ue(o,1,2).getBoundingClientRect();return de(i),!u||u.left==u.right?!1:un=l.right-u.right<3}var Fi=`
13
+ `),ue=X+Z.length,Ne=Z[Z.length-1].length;return{from:w(ue,Ne),to:w(ue+xe.length-1,xe.length==1?Ne+xe[0].length:xe[xe.length-1].length),match:Ae}}}}var ee,ae;String.prototype.normalize?(ee=function(E){return E.normalize("NFD").toLowerCase()},ae=function(E){return E.normalize("NFD")}):(ee=function(E){return E.toLowerCase()},ae=function(E){return E});function q(E,N,U,se){if(E.length==N.length)return U;for(var ne=0,Y=U+Math.max(0,E.length-N.length);;){if(ne==Y)return ne;var X=ne+Y>>1,Q=se(E.slice(0,X)).length;if(Q==U)return X;Q>U?Y=X:ne=X+1}}function V(E,N,U,se){if(!N.length)return null;var ne=se?ee:ae,Y=ne(N).split(/\r|\n\r?/);e:for(var X=U.line,Q=U.ch,H=E.lastLine()+1-Y.length;X<=H;X++,Q=0){var de=E.getLine(X).slice(Q),Ae=ne(de);if(Y.length==1){var Z=Ae.indexOf(Y[0]);if(Z==-1)continue e;var U=q(de,Ae,Z,ne)+Q;return{from:w(X,q(de,Ae,Z,ne)+Q),to:w(X,q(de,Ae,Z+Y[0].length,ne)+Q)}}else{var xe=Ae.length-Y[0].length;if(Ae.slice(xe)!=Y[0])continue e;for(var ue=1;ue<Y.length-1;ue++)if(ne(E.getLine(X+ue))!=Y[ue])continue e;var Ne=E.getLine(X+Y.length-1),He=ne(Ne),Re=Y[Y.length-1];if(He.slice(0,Re.length)!=Re)continue e;return{from:w(X,q(de,Ae,xe,ne)+Q),to:w(X+Y.length-1,q(Ne,He,Re.length,ne))}}}}function J(E,N,U,se){if(!N.length)return null;var ne=se?ee:ae,Y=ne(N).split(/\r|\n\r?/);e:for(var X=U.line,Q=U.ch,H=E.firstLine()-1+Y.length;X>=H;X--,Q=-1){var de=E.getLine(X);Q>-1&&(de=de.slice(0,Q));var Ae=ne(de);if(Y.length==1){var Z=Ae.lastIndexOf(Y[0]);if(Z==-1)continue e;return{from:w(X,q(de,Ae,Z,ne)),to:w(X,q(de,Ae,Z+Y[0].length,ne))}}else{var xe=Y[Y.length-1];if(Ae.slice(0,xe.length)!=xe)continue e;for(var ue=1,U=X-Y.length+1;ue<Y.length-1;ue++)if(ne(E.getLine(U+ue))!=Y[ue])continue e;var Ne=E.getLine(X+1-Y.length),He=ne(Ne);if(He.slice(He.length-Y[0].length)!=Y[0])continue e;return{from:w(X+1-Y.length,q(Ne,He,Ne.length-Y[0].length,ne)),to:w(X,q(de,Ae,xe.length,ne))}}}}function L(E,N,U,se){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=E,U=U?E.clipPos(U):w(0,0),this.pos={from:U,to:U};var ne;typeof se=="object"?ne=se.caseFold:(ne=se,se=null),typeof N=="string"?(ne==null&&(ne=!1),this.matches=function(Y,X){return(Y?J:V)(E,N,X,ne)}):(N=_(N,"gm"),!se||se.multiline!==!1?this.matches=function(Y,X){return(Y?ie:j)(E,N,X)}:this.matches=function(Y,X){return(Y?K:O)(E,N,X)})}L.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(E){var N=this.doc.clipPos(E?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(N=w(N.line,N.ch),E?(N.ch--,N.ch<0&&(N.line--,N.ch=(this.doc.getLine(N.line)||"").length)):(N.ch++,N.ch>(this.doc.getLine(N.line)||"").length&&(N.ch=0,N.line++)),m.cmpPos(N,this.doc.clipPos(N))!=0))return this.atOccurrence=!1;var U=this.matches(E,N);if(this.afterEmptyMatch=U&&m.cmpPos(U.from,U.to)==0,U)return this.pos=U,this.atOccurrence=!0,this.pos.match||!0;var se=w(E?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:se,to:se},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(E,N){if(this.atOccurrence){var U=m.splitLines(E);this.doc.replaceRange(U,this.pos.from,this.pos.to,N),this.pos.to=w(this.pos.from.line+U.length-1,U[U.length-1].length+(U.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(E,N,U){return new L(this.doc,E,N,U)}),m.defineDocExtension("getSearchCursor",function(E,N,U){return new L(this,E,N,U)}),m.defineExtension("selectMatches",function(E,N){for(var U=[],se=this.getSearchCursor(E,this.getCursor("from"),N);se.findNext()&&!(m.cmpPos(se.to(),this.getCursor("to"))>0);)U.push({anchor:se.from(),head:se.to()});U.length&&this.setSelections(U,0)})})},46944:function(x){(function(k,c){x.exports=c()})(this,function(){"use strict";var k=navigator.userAgent,c=navigator.platform,m=/gecko\/\d/i.test(k),w=/MSIE \d/.test(k),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(k),_=/Edge\/(\d+)/.exec(k),A=w||b||_,O=A&&(w?document.documentMode||6:+(_||b)[1]),j=!_&&/WebKit\//.test(k),$=j&&/Qt\/\d+\.\d+/.test(k),K=!_&&/Chrome\/(\d+)/.exec(k),ie=K&&+K[1],ee=/Opera\//.test(k),ae=/Apple Computer/.test(navigator.vendor),q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(k),V=/PhantomJS/.test(k),J=ae&&(/Mobile\/\w+/.test(k)||navigator.maxTouchPoints>2),L=/Android/.test(k),E=J||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(k),N=J||/Mac/.test(c),U=/\bCrOS\b/.test(k),se=/win/i.test(c),ne=ee&&k.match(/Version\/(\d*\.\d*)/);ne&&(ne=Number(ne[1])),ne&&ne>=15&&(ee=!1,j=!0);var Y=N&&($||ee&&(ne==null||ne<12.11)),X=m||A&&O>=9;function Q(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var H=function(i,o){var u=i.className,l=Q(o).exec(u);if(l){var f=u.slice(l.index+l[0].length);i.className=u.slice(0,l.index)+(f?l[1]+f:"")}};function de(i){for(var o=i.childNodes.length;o>0;--o)i.removeChild(i.firstChild);return i}function Ae(i,o){return de(i).appendChild(o)}function Z(i,o,u,l){var f=document.createElement(i);if(u&&(f.className=u),l&&(f.style.cssText=l),typeof o=="string")f.appendChild(document.createTextNode(o));else if(o)for(var v=0;v<o.length;++v)f.appendChild(o[v]);return f}function xe(i,o,u,l){var f=Z(i,o,u,l);return f.setAttribute("role","presentation"),f}var ue;document.createRange?ue=function(i,o,u,l){var f=document.createRange();return f.setEnd(l||i,u),f.setStart(i,o),f}:ue=function(i,o,u){var l=document.body.createTextRange();try{l.moveToElementText(i.parentNode)}catch(f){return l}return l.collapse(!0),l.moveEnd("character",u),l.moveStart("character",o),l};function Ne(i,o){if(o.nodeType==3&&(o=o.parentNode),i.contains)return i.contains(o);do if(o.nodeType==11&&(o=o.host),o==i)return!0;while(o=o.parentNode)}function He(i){var o;try{o=i.activeElement}catch(u){o=i.body||null}for(;o&&o.shadowRoot&&o.shadowRoot.activeElement;)o=o.shadowRoot.activeElement;return o}function Re(i,o){var u=i.className;Q(o).test(u)||(i.className+=(u?" ":"")+o)}function ze(i,o){for(var u=i.split(" "),l=0;l<u.length;l++)u[l]&&!Q(u[l]).test(o)&&(o+=" "+u[l]);return o}var Be=function(i){i.select()};J?Be=function(i){i.selectionStart=0,i.selectionEnd=i.value.length}:A&&(Be=function(i){try{i.select()}catch(o){}});function Ye(i){return i.display.wrapper.ownerDocument}function gt(i){return Ye(i).defaultView}function ut(i){var o=Array.prototype.slice.call(arguments,1);return function(){return i.apply(null,o)}}function yt(i,o,u){o||(o={});for(var l in i)i.hasOwnProperty(l)&&(u!==!1||!o.hasOwnProperty(l))&&(o[l]=i[l]);return o}function lt(i,o,u,l,f){o==null&&(o=i.search(/[^\s\u00a0]/),o==-1&&(o=i.length));for(var v=l||0,S=f||0;;){var P=i.indexOf(" ",v);if(P<0||P>=o)return S+(o-v);S+=P-v,S+=u-S%u,v=P+1}}var Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=ut(this.onTimeout,this)};Ke.prototype.onTimeout=function(i){i.id=0,i.time<=+new Date?i.f():setTimeout(i.handler,i.time-+new Date)},Ke.prototype.set=function(i,o){this.f=o;var u=+new Date+i;(!this.id||u<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,i),this.time=u)};function Fe(i,o){for(var u=0;u<i.length;++u)if(i[u]==o)return u;return-1}var qe=50,bt={toString:function(){return"CodeMirror.Pass"}},Lt={scroll:!1},Rt={origin:"*mouse"},zt={origin:"+move"};function kr(i,o,u){for(var l=0,f=0;;){var v=i.indexOf(" ",l);v==-1&&(v=i.length);var S=v-l;if(v==i.length||f+S>=o)return l+Math.min(S,o-f);if(f+=v-l,f+=u-f%u,l=v+1,f>=o)return l}}var jr=[""];function qr(i){for(;jr.length<=i;)jr.push(ht(jr)+" ");return jr[i]}function ht(i){return i[i.length-1]}function $t(i,o){for(var u=[],l=0;l<i.length;l++)u[l]=o(i[l],l);return u}function nr(i,o,u){for(var l=0,f=u(o);l<i.length&&u(i[l])<=f;)l++;i.splice(l,0,o)}function er(){}function kn(i,o){var u;return Object.create?u=Object.create(i):(er.prototype=i,u=new er),o&&yt(o,u),u}var Vi=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Wn(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||Vi.test(i))}function Hn(i,o){return o?o.source.indexOf("\\w")>-1&&Wn(i)?!0:o.test(i):Wn(i)}function ei(i){for(var o in i)if(i.hasOwnProperty(o)&&i[o])return!1;return!0}var ki=/[\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 mi(i){return i.charCodeAt(0)>=768&&ki.test(i)}function jn(i,o,u){for(;(u<0?o>0:o<i.length)&&mi(i.charAt(o));)o+=u;return o}function mn(i,o,u){for(var l=o>u?-1:1;;){if(o==u)return o;var f=(o+u)/2,v=l<0?Math.ceil(f):Math.floor(f);if(v==o)return i(v)?o:u;i(v)?u=v:o=v+l}}function vn(i,o,u,l){if(!i)return l(o,u,"ltr",0);for(var f=!1,v=0;v<i.length;++v){var S=i[v];(S.from<u&&S.to>o||o==u&&S.to==o)&&(l(Math.max(S.from,o),Math.min(S.to,u),S.level==1?"rtl":"ltr",v),f=!0)}f||l(o,u,"ltr")}var fr=null;function Ft(i,o,u){var l;fr=null;for(var f=0;f<i.length;++f){var v=i[f];if(v.from<o&&v.to>o)return f;v.to==o&&(v.from!=v.to&&u=="before"?l=f:fr=f),v.from==o&&(v.from!=v.to&&u!="before"?l=f:fr=f)}return l!=null?l:fr}var At=function(){var i="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(D){return D<=247?i.charAt(D):1424<=D&&D<=1524?"R":1536<=D&&D<=1785?o.charAt(D-1536):1774<=D&&D<=2220?"r":8192<=D&&D<=8203?"w":D==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,v=/[LRr]/,S=/[Lb1n]/,P=/[1n]/;function T(D,oe,fe){this.level=D,this.from=oe,this.to=fe}return function(D,oe){var fe=oe=="ltr"?"L":"R";if(D.length==0||oe=="ltr"&&!l.test(D))return!1;for(var we=D.length,ge=[],Ve=0;Ve<we;++Ve)ge.push(u(D.charCodeAt(Ve)));for(var Ie=0,De=fe;Ie<we;++Ie){var Ue=ge[Ie];Ue=="m"?ge[Ie]=De:De=Ue}for(var Ge=0,We=fe;Ge<we;++Ge){var Xe=ge[Ge];Xe=="1"&&We=="r"?ge[Ge]="n":v.test(Xe)&&(We=Xe,Xe=="r"&&(ge[Ge]="R"))}for(var ct=1,at=ge[0];ct<we-1;++ct){var It=ge[ct];It=="+"&&at=="1"&&ge[ct+1]=="1"?ge[ct]="1":It==","&&at==ge[ct+1]&&(at=="1"||at=="n")&&(ge[ct]=at),at=It}for(var mr=0;mr<we;++mr){var Gr=ge[mr];if(Gr==",")ge[mr]="N";else if(Gr=="%"){var Cr=void 0;for(Cr=mr+1;Cr<we&&ge[Cr]=="%";++Cr);for(var Ln=mr&&ge[mr-1]=="!"||Cr<we&&ge[Cr]=="1"?"1":"N",Pn=mr;Pn<Cr;++Pn)ge[Pn]=Ln;mr=Cr-1}}for(var Br=0,Dn=fe;Br<we;++Br){var pn=ge[Br];Dn=="L"&&pn=="1"?ge[Br]="L":v.test(pn)&&(Dn=pn)}for(var $r=0;$r<we;++$r)if(f.test(ge[$r])){var Mr=void 0;for(Mr=$r+1;Mr<we&&f.test(ge[Mr]);++Mr);for(var vr=($r?ge[$r-1]:fe)=="L",Tn=(Mr<we?ge[Mr]:fe)=="L",ya=vr==Tn?vr?"L":"R":fe,Eo=$r;Eo<Mr;++Eo)ge[Eo]=ya;$r=Mr-1}for(var bn=[],oi,Kr=0;Kr<we;)if(S.test(ge[Kr])){var nf=Kr;for(++Kr;Kr<we&&S.test(ge[Kr]);++Kr);bn.push(new T(0,nf,Kr))}else{var ys=Kr,Ao=bn.length,Co=oe=="rtl"?1:0;for(++Kr;Kr<we&&ge[Kr]!="L";++Kr);for(var rn=ys;rn<Kr;)if(P.test(ge[rn])){ys<rn&&(bn.splice(Ao,0,new T(1,ys,rn)),Ao+=Co);var ba=rn;for(++rn;rn<Kr&&P.test(ge[rn]);++rn);bn.splice(Ao,0,new T(2,ba,rn)),Ao+=Co,ys=rn}else++rn;ys<Kr&&bn.splice(Ao,0,new T(1,ys,Kr))}return oe=="ltr"&&(bn[0].level==1&&(oi=D.match(/^\s+/))&&(bn[0].from=oi[0].length,bn.unshift(new T(0,0,oi[0].length))),ht(bn).level==1&&(oi=D.match(/\s+$/))&&(ht(bn).to-=oi[0].length,bn.push(new T(0,we-oi[0].length,we)))),oe=="rtl"?bn.reverse():bn}}();function mt(i,o){var u=i.order;return u==null&&(u=i.order=At(i.text,o)),u}var Tt=[],pe=function(i,o,u){if(i.addEventListener)i.addEventListener(o,u,!1);else if(i.attachEvent)i.attachEvent("on"+o,u);else{var l=i._handlers||(i._handlers={});l[o]=(l[o]||Tt).concat(u)}};function Pe(i,o){return i._handlers&&i._handlers[o]||Tt}function Je(i,o,u){if(i.removeEventListener)i.removeEventListener(o,u,!1);else if(i.detachEvent)i.detachEvent("on"+o,u);else{var l=i._handlers,f=l&&l[o];if(f){var v=Fe(f,u);v>-1&&(l[o]=f.slice(0,v).concat(f.slice(v+1)))}}}function xt(i,o){var u=Pe(i,o);if(u.length)for(var l=Array.prototype.slice.call(arguments,2),f=0;f<u.length;++f)u[f].apply(null,l)}function _t(i,o,u){return typeof o=="string"&&(o={type:o,preventDefault:function(){this.defaultPrevented=!0}}),xt(i,u||o.type,i,o),rs(o)||o.codemirrorIgnore}function Ot(i){var o=i._handlers&&i._handlers.cursorActivity;if(o)for(var u=i.curOp.cursorActivityHandlers||(i.curOp.cursorActivityHandlers=[]),l=0;l<o.length;++l)Fe(u,o[l])==-1&&u.push(o[l])}function Sr(i,o){return Pe(i,o).length>0}function sn(i){i.prototype.on=function(o,u){pe(this,o,u)},i.prototype.off=function(o,u){Je(this,o,u)}}function Xt(i){i.preventDefault?i.preventDefault():i.returnValue=!1}function Fr(i){i.stopPropagation?i.stopPropagation():i.cancelBubble=!0}function rs(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==!1}function on(i){Xt(i),Fr(i)}function an(i){return i.target||i.srcElement}function ns(i){var o=i.which;return o==null&&(i.button&1?o=1:i.button&2?o=3:i.button&4&&(o=2)),N&&i.ctrlKey&&o==1&&(o=3),o}var ln=function(){if(A&&O<9)return!1;var i=Z("div");return"draggable"in i||"dragDrop"in i}(),ji;function Ii(i){if(ji==null){var o=Z("span","\u200B");Ae(i,Z("span",[o,document.createTextNode("x")])),i.firstChild.offsetHeight!=0&&(ji=o.offsetWidth<=1&&o.offsetHeight>2&&!(A&&O<8))}var u=ji?Z("span","\u200B"):Z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}var un;function ss(i){if(un!=null)return un;var o=Ae(i,document.createTextNode("A\u062EA")),u=ue(o,0,1).getBoundingClientRect(),l=ue(o,1,2).getBoundingClientRect();return de(i),!u||u.left==u.right?!1:un=l.right-u.right<3}var Ri=`
14
14
 
15
15
  b`.split(/\n/).length!=3?function(i){for(var o=0,u=[],l=i.length;o<=l;){var f=i.indexOf(`
16
- `,o);f==-1&&(f=i.length);var v=i.slice(o,i.charAt(f-1)=="\r"?f-1:f),S=v.indexOf("\r");S!=-1?(u.push(v.slice(0,S)),o+=S+1):(u.push(v),o=f+1)}return u}:function(i){return i.split(/\r\n?|\n/)},Ts=window.getSelection?function(i){try{return i.selectionStart!=i.selectionEnd}catch(o){return!1}}:function(i){var o;try{o=i.ownerDocument.selection.createRange()}catch(u){}return!o||o.parentElement()!=i?!1:o.compareEndPoints("StartToEnd",o)!=0},Wo=function(){var i=Z("div");return"oncopy"in i?!0:(i.setAttribute("oncopy","return;"),typeof i.oncopy=="function")}(),In=null;function Rn(i){if(In!=null)return In;var o=Ae(i,Z("span","x")),u=o.getBoundingClientRect(),l=ue(o,0,1).getBoundingClientRect();return In=Math.abs(u.left-l.left)>1}var Fn={},En={};function ti(i,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),Fn[i]=o}function ka(i,o){En[i]=o}function gi(i){if(typeof i=="string"&&En.hasOwnProperty(i))i=En[i];else if(i&&typeof i.name=="string"&&En.hasOwnProperty(i.name)){var o=En[i.name];typeof o=="string"&&(o={name:o}),i=kn(o,i),i.name=o.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i))return gi("application/xml");if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i))return gi("application/json")}return typeof i=="string"?{name:i}:i||{name:"null"}}function An(i,o){o=gi(o);var u=Fn[o.name];if(!u)return An(i,"text/plain");var l=u(i,o);if(Ir.hasOwnProperty(o.name)){var f=Ir[o.name];for(var v in f)f.hasOwnProperty(v)&&(l.hasOwnProperty(v)&&(l["_"+v]=l[v]),l[v]=f[v])}if(l.name=o.name,o.helperType&&(l.helperType=o.helperType),o.modeProps)for(var S in o.modeProps)l[S]=o.modeProps[S];return l}var Ir={};function os(i,o){var u=Ir.hasOwnProperty(i)?Ir[i]:Ir[i]={};yt(o,u)}function ri(i,o){if(o===!0)return o;if(i.copyState)return i.copyState(o);var u={};for(var l in o){var f=o[l];f instanceof Array&&(f=f.concat([])),u[l]=f}return u}function Ho(i,o){for(var u;i.innerMode&&(u=i.innerMode(o),!(!u||u.mode==i));)o=u.state,i=u.mode;return u||{mode:i,state:o}}function Ml(i,o,u){return i.startState?i.startState(o,u):!0}var hr=function(i,o,u){this.pos=this.start=0,this.string=i,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u};hr.prototype.eol=function(){return this.pos>=this.string.length},hr.prototype.sol=function(){return this.pos==this.lineStart},hr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},hr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},hr.prototype.eat=function(i){var o=this.string.charAt(this.pos),u;if(typeof i=="string"?u=o==i:u=o&&(i.test?i.test(o):i(o)),u)return++this.pos,o},hr.prototype.eatWhile=function(i){for(var o=this.pos;this.eat(i););return this.pos>o},hr.prototype.eatSpace=function(){for(var i=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>i},hr.prototype.skipToEnd=function(){this.pos=this.string.length},hr.prototype.skipTo=function(i){var o=this.string.indexOf(i,this.pos);if(o>-1)return this.pos=o,!0},hr.prototype.backUp=function(i){this.pos-=i},hr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},hr.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},hr.prototype.match=function(i,o,u){if(typeof i=="string"){var l=function(S){return u?S.toLowerCase():S},f=this.string.substr(this.pos,i.length);if(l(f)==l(i))return o!==!1&&(this.pos+=i.length),!0}else{var v=this.string.slice(this.pos).match(i);return v&&v.index>0?null:(v&&o!==!1&&(this.pos+=v[0].length),v)}},hr.prototype.current=function(){return this.string.slice(this.start,this.pos)},hr.prototype.hideFirstChars=function(i,o){this.lineStart+=i;try{return o()}finally{this.lineStart-=i}},hr.prototype.lookAhead=function(i){var o=this.lineOracle;return o&&o.lookAhead(i)},hr.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};function rt(i,o){if(o-=i.first,o<0||o>=i.size)throw new Error("There is no line "+(o+i.first)+" in the document.");for(var u=i;!u.lines;)for(var l=0;;++l){var f=u.children[l],v=f.chunkSize();if(o<v){u=f;break}o-=v}return u.lines[o]}function as(i,o,u){var l=[],f=o.line;return i.iter(o.line,u.line+1,function(v){var S=v.text;f==u.line&&(S=S.slice(0,u.ch)),f==o.line&&(S=S.slice(o.ch)),l.push(S),++f}),l}function oo(i,o,u){var l=[];return i.iter(o,u,function(f){l.push(f.text)}),l}function zn(i,o){var u=o-i.height;if(u)for(var l=i;l;l=l.parent)l.height+=u}function Qt(i){if(i.parent==null)return null;for(var o=i.parent,u=Fe(o.lines,i),l=o.parent;l;o=l,l=l.parent)for(var f=0;l.children[f]!=o;++f)u+=l.children[f].chunkSize();return u+o.first}function ls(i,o){var u=i.first;e:do{for(var l=0;l<i.children.length;++l){var f=i.children[l],v=f.height;if(o<v){i=f;continue e}o-=v,u+=f.chunkSize()}return u}while(!i.lines);for(var S=0;S<i.lines.length;++S){var P=i.lines[S],T=P.height;if(o<T)break;o-=T}return u+S}function ao(i,o){return o>=i.first&&o<i.first+i.size}function lo(i,o){return String(i.lineNumberFormatter(o+i.firstLineNumber))}function F(i,o,u){if(u===void 0&&(u=null),!(this instanceof F))return new F(i,o,u);this.line=i,this.ch=o,this.sticky=u}function re(i,o){return i.line-o.line||i.ch-o.ch}function je(i,o){return i.sticky==o.sticky&&re(i,o)==0}function Le(i){return F(i.line,i.ch)}function St(i,o){return re(i,o)<0?o:i}function jt(i,o){return re(i,o)<0?i:o}function Zt(i,o){return Math.max(i.first,Math.min(o,i.first+i.size-1))}function nt(i,o){if(o.line<i.first)return F(i.first,0);var u=i.first+i.size-1;return o.line>u?F(u,rt(i,u).text.length):Gn(o,rt(i,o.line).text.length)}function Gn(i,o){var u=i.ch;return u==null||u>o?F(i.line,o):u<0?F(i.line,0):i}function Ll(i,o){for(var u=[],l=0;l<o.length;l++)u[l]=nt(i,o[l]);return u}var Dl=function(i,o){this.state=i,this.lookAhead=o},Mi=function(i,o,u,l){this.state=o,this.doc=i,this.line=u,this.maxLookAhead=l||0,this.baseTokens=null,this.baseTokenPos=1};Mi.prototype.lookAhead=function(i){var o=this.doc.getLine(this.line+i);return o!=null&&i>this.maxLookAhead&&(this.maxLookAhead=i),o},Mi.prototype.baseToken=function(i){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=i;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-i}},Mi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mi.fromSaved=function(i,o,u){return o instanceof Dl?new Mi(i,ri(i.mode,o.state),u,o.lookAhead):new Mi(i,ri(i.mode,o),u)},Mi.prototype.save=function(i){var o=i!==!1?ri(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Dl(o,this.maxLookAhead):o};function nc(i,o,u,l){var f=[i.state.modeGen],v={};bp(i,o.text,i.doc.mode,u,function(D,oe){return f.push(D,oe)},v,l);for(var S=u.state,P=function(D){u.baseTokens=f;var oe=i.state.overlays[D],fe=1,we=0;u.state=!0,bp(i,o.text,oe.mode,u,function(ge,Ve){for(var Ie=fe;we<ge;){var De=f[fe];De>ge&&f.splice(fe,1,ge,f[fe+1],De),fe+=2,we=Math.min(ge,De)}if(Ve)if(oe.opaque)f.splice(Ie,fe-Ie,ge,"overlay "+Ve),fe=Ie+2;else for(;Ie<fe;Ie+=2){var Ue=f[Ie+1];f[Ie+1]=(Ue?Ue+" ":"")+"overlay "+Ve}},v),u.state=S,u.baseTokens=null,u.baseTokenPos=1},T=0;T<i.state.overlays.length;++T)P(T);return{styles:f,classes:v.bgClass||v.textClass?v:null}}function ic(i,o,u){if(!o.styles||o.styles[0]!=i.state.modeGen){var l=zo(i,Qt(o)),f=o.text.length>i.options.maxHighlightLength&&ri(i.doc.mode,l.state),v=nc(i,o,l);f&&(l.state=f),o.stateAfter=l.save(!f),o.styles=v.styles,v.classes?o.styleClasses=v.classes:o.styleClasses&&(o.styleClasses=null),u===i.doc.highlightFrontier&&(i.doc.modeFrontier=Math.max(i.doc.modeFrontier,++i.doc.highlightFrontier))}return o.styles}function zo(i,o,u){var l=i.doc,f=i.display;if(!l.mode.startState)return new Mi(l,!0,o);var v=xp(i,o,u),S=v>l.first&&rt(l,v-1).stateAfter,P=S?Mi.fromSaved(l,S,v):new Mi(l,Ml(l.mode),v);return l.iter(v,o,function(T){ni(i,T.text,P);var D=P.line;T.stateAfter=D==o-1||D%5==0||D>=f.viewFrom&&D<f.viewTo?P.save():null,P.nextLine()}),u&&(l.modeFrontier=P.line),P}function ni(i,o,u,l){var f=i.doc.mode,v=new hr(o,i.options.tabSize,u);for(v.start=v.pos=l||0,o==""&&Vs(f,u.state);!v.eol();)gn(f,v,u.state),v.start=v.pos}function Vs(i,o){if(i.blankLine)return i.blankLine(o);if(i.innerMode){var u=Ho(i,o);if(u.mode.blankLine)return u.mode.blankLine(u.state)}}function gn(i,o,u,l){for(var f=0;f<10;f++){l&&(l[0]=Ho(i,u).mode);var v=i.token(o,u);if(o.pos>o.start)return v}throw new Error("Mode "+i.name+" failed to advance stream.")}var uo=function(i,o,u){this.start=i.start,this.end=i.pos,this.string=i.current(),this.type=o||null,this.state=u};function gp(i,o,u,l){var f=i.doc,v=f.mode,S;o=nt(f,o);var P=rt(f,o.line),T=zo(i,o.line,u),D=new hr(P.text,i.options.tabSize,T),oe;for(l&&(oe=[]);(l||D.pos<o.ch)&&!D.eol();)D.start=D.pos,S=gn(v,D,T.state),l&&oe.push(new uo(D,S,ri(f.mode,T.state)));return l?oe:new uo(D,S,T.state)}function yp(i,o){if(i)for(;;){var u=i.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!u)break;i=i.slice(0,u.index)+i.slice(u.index+u[0].length);var l=u[1]?"bgClass":"textClass";o[l]==null?o[l]=u[2]:new RegExp("(?:^|\\s)"+u[2]+"(?:$|\\s)").test(o[l])||(o[l]+=" "+u[2])}return i}function bp(i,o,u,l,f,v,S){var P=u.flattenSpans;P==null&&(P=i.options.flattenSpans);var T=0,D=null,oe=new hr(o,i.options.tabSize,l),fe,we=i.options.addModeClass&&[null];for(o==""&&yp(Vs(u,l.state),v);!oe.eol();){if(oe.pos>i.options.maxHighlightLength?(P=!1,S&&ni(i,o,l,oe.pos),oe.pos=o.length,fe=null):fe=yp(gn(u,oe,l.state,we),v),we){var ge=we[0].name;ge&&(fe="m-"+(fe?ge+" "+fe:ge))}if(!P||D!=fe){for(;T<oe.start;)T=Math.min(oe.start,T+5e3),f(T,D);D=fe}oe.start=oe.pos}for(;T<oe.pos;){var Ve=Math.min(oe.pos,T+5e3);f(Ve,D),T=Ve}}function xp(i,o,u){for(var l,f,v=i.doc,S=u?-1:o-(i.doc.mode.innerMode?1e3:100),P=o;P>S;--P){if(P<=v.first)return v.first;var T=rt(v,P-1),D=T.stateAfter;if(D&&(!u||P+(D instanceof Dl?D.lookAhead:0)<=v.modeFrontier))return P;var oe=lt(T.text,null,i.options.tabSize);(f==null||l>oe)&&(f=P-1,l=oe)}return f}function lv(i,o){if(i.modeFrontier=Math.min(i.modeFrontier,o),!(i.highlightFrontier<o-10)){for(var u=i.first,l=o-1;l>u;l--){var f=rt(i,l).stateAfter;if(f&&(!(f instanceof Dl)||l+f.lookAhead<o)){u=l+1;break}}i.highlightFrontier=Math.min(i.highlightFrontier,u)}}var sc=!1,Li=!1;function Go(){sc=!0}function uv(){Li=!0}function ja(i,o,u){this.marker=i,this.from=o,this.to=u}function ot(i,o){if(i)for(var u=0;u<i.length;++u){var l=i[u];if(l.marker==o)return l}}function Nl(i,o){for(var u,l=0;l<i.length;++l)i[l]!=o&&(u||(u=[])).push(i[l]);return u}function Sp(i,o,u){var l=u&&window.WeakSet&&(u.markedSpans||(u.markedSpans=new WeakSet));l&&i.markedSpans&&l.has(i.markedSpans)?i.markedSpans.push(o):(i.markedSpans=i.markedSpans?i.markedSpans.concat([o]):[o],l&&l.add(i.markedSpans)),o.marker.attachLine(i)}function ks(i,o,u){var l;if(i)for(var f=0;f<i.length;++f){var v=i[f],S=v.marker,P=v.from==null||(S.inclusiveLeft?v.from<=o:v.from<o);if(P||v.from==o&&S.type=="bookmark"&&(!u||!v.marker.insertLeft)){var T=v.to==null||(S.inclusiveRight?v.to>=o:v.to>o);(l||(l=[])).push(new ja(S,v.from,T?null:v.to))}}return l}function wp(i,o,u){var l;if(i)for(var f=0;f<i.length;++f){var v=i[f],S=v.marker,P=v.to==null||(S.inclusiveRight?v.to>=o:v.to>o);if(P||v.from==o&&S.type=="bookmark"&&(!u||v.marker.insertLeft)){var T=v.from==null||(S.inclusiveLeft?v.from<=o:v.from<o);(l||(l=[])).push(new ja(S,T?null:v.from-o,v.to==null?null:v.to-o))}}return l}function js(i,o){if(o.full)return null;var u=ao(i,o.from.line)&&rt(i,o.from.line).markedSpans,l=ao(i,o.to.line)&&rt(i,o.to.line).markedSpans;if(!u&&!l)return null;var f=o.from.ch,v=o.to.ch,S=re(o.from,o.to)==0,P=ks(u,f,S),T=wp(l,v,S),D=o.text.length==1,oe=ht(o.text).length+(D?f:0);if(P)for(var fe=0;fe<P.length;++fe){var we=P[fe];if(we.to==null){var ge=ot(T,we.marker);ge?D&&(we.to=ge.to==null?null:ge.to+oe):we.to=f}}if(T)for(var Ve=0;Ve<T.length;++Ve){var Ie=T[Ve];if(Ie.to!=null&&(Ie.to+=oe),Ie.from==null){var De=ot(P,Ie.marker);De||(Ie.from=oe,D&&(P||(P=[])).push(Ie))}else Ie.from+=oe,D&&(P||(P=[])).push(Ie)}P&&(P=Bl(P)),T&&T!=P&&(T=Bl(T));var Ue=[P];if(!D){var Ge=o.text.length-2,We;if(Ge>0&&P)for(var Xe=0;Xe<P.length;++Xe)P[Xe].to==null&&(We||(We=[])).push(new ja(P[Xe].marker,null,null));for(var ct=0;ct<Ge;++ct)Ue.push(We);Ue.push(T)}return Ue}function Bl(i){for(var o=0;o<i.length;++o){var u=i[o];u.from!=null&&u.from==u.to&&u.marker.clearWhenEmpty!==!1&&i.splice(o--,1)}return i.length?i:null}function Dr(i,o,u){var l=null;if(i.iter(o.line,u.line+1,function(ge){if(ge.markedSpans)for(var Ve=0;Ve<ge.markedSpans.length;++Ve){var Ie=ge.markedSpans[Ve].marker;Ie.readOnly&&(!l||Fe(l,Ie)==-1)&&(l||(l=[])).push(Ie)}}),!l)return null;for(var f=[{from:o,to:u}],v=0;v<l.length;++v)for(var S=l[v],P=S.find(0),T=0;T<f.length;++T){var D=f[T];if(!(re(D.to,P.from)<0||re(D.from,P.to)>0)){var oe=[T,1],fe=re(D.from,P.from),we=re(D.to,P.to);(fe<0||!S.inclusiveLeft&&!fe)&&oe.push({from:D.from,to:P.from}),(we>0||!S.inclusiveRight&&!we)&&oe.push({from:P.to,to:D.to}),f.splice.apply(f,oe),T+=oe.length-3}}return f}function Ia(i){var o=i.markedSpans;if(o){for(var u=0;u<o.length;++u)o[u].marker.detachLine(i);i.markedSpans=null}}function $l(i,o){if(o){for(var u=0;u<o.length;++u)o[u].marker.attachLine(i);i.markedSpans=o}}function Ul(i){return i.inclusiveLeft?-1:0}function Wl(i){return i.inclusiveRight?1:0}function oc(i,o){var u=i.lines.length-o.lines.length;if(u!=0)return u;var l=i.find(),f=o.find(),v=re(l.from,f.from)||Ul(i)-Ul(o);if(v)return-v;var S=re(l.to,f.to)||Wl(i)-Wl(o);return S||o.id-i.id}function Op(i,o){var u=Li&&i.markedSpans,l;if(u)for(var f=void 0,v=0;v<u.length;++v)f=u[v],f.marker.collapsed&&(o?f.from:f.to)==null&&(!l||oc(l,f.marker)<0)&&(l=f.marker);return l}function Ep(i){return Op(i,!0)}function Ra(i){return Op(i,!1)}function cv(i,o){var u=Li&&i.markedSpans,l;if(u)for(var f=0;f<u.length;++f){var v=u[f];v.marker.collapsed&&(v.from==null||v.from<o)&&(v.to==null||v.to>o)&&(!l||oc(l,v.marker)<0)&&(l=v.marker)}return l}function Ap(i,o,u,l,f){var v=rt(i,o),S=Li&&v.markedSpans;if(S)for(var P=0;P<S.length;++P){var T=S[P];if(T.marker.collapsed){var D=T.marker.find(0),oe=re(D.from,u)||Ul(T.marker)-Ul(f),fe=re(D.to,l)||Wl(T.marker)-Wl(f);if(!(oe>=0&&fe<=0||oe<=0&&fe>=0)&&(oe<=0&&(T.marker.inclusiveRight&&f.inclusiveLeft?re(D.to,u)>=0:re(D.to,u)>0)||oe>=0&&(T.marker.inclusiveRight&&f.inclusiveLeft?re(D.from,l)<=0:re(D.from,l)<0)))return!0}}}function yi(i){for(var o;o=Ep(i);)i=o.find(-1,!0).line;return i}function fv(i){for(var o;o=Ra(i);)i=o.find(1,!0).line;return i}function Ko(i){for(var o,u;o=Ra(i);)i=o.find(1,!0).line,(u||(u=[])).push(i);return u}function ac(i,o){var u=rt(i,o),l=yi(u);return u==l?o:Qt(l)}function lc(i,o){if(o>i.lastLine())return o;var u=rt(i,o),l;if(!Is(i,u))return o;for(;l=Ra(u);)u=l.find(1,!0).line;return Qt(u)+1}function Is(i,o){var u=Li&&o.markedSpans;if(u){for(var l=void 0,f=0;f<u.length;++f)if(l=u[f],!!l.marker.collapsed){if(l.from==null)return!0;if(!l.marker.widgetNode&&l.from==0&&l.marker.inclusiveLeft&&uc(i,o,l))return!0}}}function uc(i,o,u){if(u.to==null){var l=u.marker.find(1,!0);return uc(i,l.line,ot(l.line.markedSpans,u.marker))}if(u.marker.inclusiveRight&&u.to==o.text.length)return!0;for(var f=void 0,v=0;v<o.markedSpans.length;++v)if(f=o.markedSpans[v],f.marker.collapsed&&!f.marker.widgetNode&&f.from==u.to&&(f.to==null||f.to!=u.from)&&(f.marker.inclusiveLeft||u.marker.inclusiveRight)&&uc(i,o,f))return!0}function us(i){i=yi(i);for(var o=0,u=i.parent,l=0;l<u.lines.length;++l){var f=u.lines[l];if(f==i)break;o+=f.height}for(var v=u.parent;v;u=v,v=u.parent)for(var S=0;S<v.children.length;++S){var P=v.children[S];if(P==u)break;o+=P.height}return o}function Hl(i){if(i.height==0)return 0;for(var o=i.text.length,u,l=i;u=Ep(l);){var f=u.find(0,!0);l=f.from.line,o+=f.from.ch-f.to.ch}for(l=i;u=Ra(l);){var v=u.find(0,!0);o-=l.text.length-v.from.ch,l=v.to.line,o+=l.text.length-v.to.ch}return o}function zl(i){var o=i.display,u=i.doc;o.maxLine=rt(u,u.first),o.maxLineLength=Hl(o.maxLine),o.maxLineChanged=!0,u.iter(function(l){var f=Hl(l);f>o.maxLineLength&&(o.maxLineLength=f,o.maxLine=l)})}var co=function(i,o,u){this.text=i,$l(this,o),this.height=u?u(this):1};co.prototype.lineNo=function(){return Qt(this)},sn(co);function Cp(i,o,u,l){i.text=o,i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null),i.order!=null&&(i.order=null),Ia(i),$l(i,u);var f=l?l(i):1;f!=i.height&&zn(i,f)}function cc(i){i.parent=null,Ia(i)}var pv={},Fa={};function _p(i,o){if(!i||/^\s*$/.test(i))return null;var u=o.addModeClass?Fa:pv;return u[i]||(u[i]=i.replace(/\S+/g,"cm-$&"))}function Pp(i,o){var u=xe("span",null,null,j?"padding-right: .1px":null),l={pre:xe("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:i,trailingSpace:!1,splitSpaces:i.getOption("lineWrapping")};o.measure={};for(var f=0;f<=(o.rest?o.rest.length:0);f++){var v=f?o.rest[f-1]:o.line,S=void 0;l.pos=0,l.addToken=hv,ss(i.display.measure)&&(S=mt(v,i.doc.direction))&&(l.addToken=mv(l.addToken,S)),l.map=[];var P=o!=i.display.externalMeasured&&Qt(v);vv(v,l,ic(i,v,P)),v.styleClasses&&(v.styleClasses.bgClass&&(l.bgClass=ze(v.styleClasses.bgClass,l.bgClass||"")),v.styleClasses.textClass&&(l.textClass=ze(v.styleClasses.textClass,l.textClass||""))),l.map.length==0&&l.map.push(0,0,l.content.appendChild(Ri(i.display.measure))),f==0?(o.measure.map=l.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(l.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(j){var T=l.content.lastChild;(/\bcm-tab\b/.test(T.className)||T.querySelector&&T.querySelector(".cm-tab"))&&(l.content.className="cm-tab-wrap-hack")}return xt(i,"renderLine",i,o.line,l.pre),l.pre.className&&(l.textClass=ze(l.pre.className,l.textClass||"")),l}function dv(i){var o=Z("span","\u2022","cm-invalidchar");return o.title="\\u"+i.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}function hv(i,o,u,l,f,v,S){if(o){var P=i.splitSpaces?fc(o,i.trailingSpace):o,T=i.cm.state.specialChars,D=!1,oe;if(!T.test(o))i.col+=o.length,oe=document.createTextNode(P),i.map.push(i.pos,i.pos+o.length,oe),A&&O<9&&(D=!0),i.pos+=o.length;else{oe=document.createDocumentFragment();for(var fe=0;;){T.lastIndex=fe;var we=T.exec(o),ge=we?we.index-fe:o.length-fe;if(ge){var Ve=document.createTextNode(P.slice(fe,fe+ge));A&&O<9?oe.appendChild(Z("span",[Ve])):oe.appendChild(Ve),i.map.push(i.pos,i.pos+ge,Ve),i.col+=ge,i.pos+=ge}if(!we)break;fe+=ge+1;var Ie=void 0;if(we[0]==" "){var De=i.cm.options.tabSize,Ue=De-i.col%De;Ie=oe.appendChild(Z("span",qr(Ue),"cm-tab")),Ie.setAttribute("role","presentation"),Ie.setAttribute("cm-text"," "),i.col+=Ue}else we[0]=="\r"||we[0]==`
17
- `?(Ie=oe.appendChild(Z("span",we[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ie.setAttribute("cm-text",we[0]),i.col+=1):(Ie=i.cm.options.specialCharPlaceholder(we[0]),Ie.setAttribute("cm-text",we[0]),A&&O<9?oe.appendChild(Z("span",[Ie])):oe.appendChild(Ie),i.col+=1);i.map.push(i.pos,i.pos+1,Ie),i.pos++}}if(i.trailingSpace=P.charCodeAt(o.length-1)==32,u||l||f||D||v||S){var Ge=u||"";l&&(Ge+=l),f&&(Ge+=f);var We=Z("span",[oe],Ge,v);if(S)for(var Xe in S)S.hasOwnProperty(Xe)&&Xe!="style"&&Xe!="class"&&We.setAttribute(Xe,S[Xe]);return i.content.appendChild(We)}i.content.appendChild(oe)}}function fc(i,o){if(i.length>1&&!/ /.test(i))return i;for(var u=o,l="",f=0;f<i.length;f++){var v=i.charAt(f);v==" "&&u&&(f==i.length-1||i.charCodeAt(f+1)==32)&&(v="\xA0"),l+=v,u=v==" "}return l}function mv(i,o){return function(u,l,f,v,S,P,T){f=f?f+" cm-force-border":"cm-force-border";for(var D=u.pos,oe=D+l.length;;){for(var fe=void 0,we=0;we<o.length&&(fe=o[we],!(fe.to>D&&fe.from<=D));we++);if(fe.to>=oe)return i(u,l,f,v,S,P,T);i(u,l.slice(0,fe.to-D),f,v,null,P,T),v=null,l=l.slice(fe.to-D),D=fe.to}}}function Tp(i,o,u,l){var f=!l&&u.widgetNode;f&&i.map.push(i.pos,i.pos+o,f),!l&&i.cm.display.input.needsContentAttribute&&(f||(f=i.content.appendChild(document.createElement("span"))),f.setAttribute("cm-marker",u.id)),f&&(i.cm.display.input.setUneditable(f),i.content.appendChild(f)),i.pos+=o,i.trailingSpace=!1}function vv(i,o,u){var l=i.markedSpans,f=i.text,v=0;if(!l){for(var S=1;S<u.length;S+=2)o.addToken(o,f.slice(v,v=u[S]),_p(u[S+1],o.cm.options));return}for(var P=f.length,T=0,D=1,oe="",fe,we,ge=0,Ve,Ie,De,Ue,Ge;;){if(ge==T){Ve=Ie=De=we="",Ge=null,Ue=null,ge=1/0;for(var We=[],Xe=void 0,ct=0;ct<l.length;++ct){var at=l[ct],It=at.marker;if(It.type=="bookmark"&&at.from==T&&It.widgetNode)We.push(It);else if(at.from<=T&&(at.to==null||at.to>T||It.collapsed&&at.to==T&&at.from==T)){if(at.to!=null&&at.to!=T&&ge>at.to&&(ge=at.to,Ie=""),It.className&&(Ve+=" "+It.className),It.css&&(we=(we?we+";":"")+It.css),It.startStyle&&at.from==T&&(De+=" "+It.startStyle),It.endStyle&&at.to==ge&&(Xe||(Xe=[])).push(It.endStyle,at.to),It.title&&((Ge||(Ge={})).title=It.title),It.attributes)for(var mr in It.attributes)(Ge||(Ge={}))[mr]=It.attributes[mr];It.collapsed&&(!Ue||oc(Ue.marker,It)<0)&&(Ue=at)}else at.from>T&&ge>at.from&&(ge=at.from)}if(Xe)for(var Gr=0;Gr<Xe.length;Gr+=2)Xe[Gr+1]==ge&&(Ie+=" "+Xe[Gr]);if(!Ue||Ue.from==T)for(var Cr=0;Cr<We.length;++Cr)Tp(o,0,We[Cr]);if(Ue&&(Ue.from||0)==T){if(Tp(o,(Ue.to==null?P+1:Ue.to)-T,Ue.marker,Ue.from==null),Ue.to==null)return;Ue.to==T&&(Ue=!1)}}if(T>=P)break;for(var Ln=Math.min(P,ge);;){if(oe){var Pn=T+oe.length;if(!Ue){var Br=Pn>Ln?oe.slice(0,Ln-T):oe;o.addToken(o,Br,fe?fe+Ve:Ve,De,T+Br.length==ge?Ie:"",we,Ge)}if(Pn>=Ln){oe=oe.slice(Ln-T),T=Ln;break}T=Pn,De=""}oe=f.slice(v,v=u[D++]),fe=_p(u[D++],o.cm.options)}}}function Vp(i,o,u){this.line=o,this.rest=Ko(o),this.size=this.rest?Qt(ht(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Is(i,o)}function Ma(i,o,u){for(var l=[],f,v=o;v<u;v=f){var S=new Vp(i.doc,rt(i.doc,v),v);f=v+S.size,l.push(S)}return l}var Jo=null;function Gl(i){Jo?Jo.ops.push(i):i.ownsGroup=Jo={ops:[i],delayedCallbacks:[]}}function gv(i){var o=i.delayedCallbacks,u=0;do{for(;u<o.length;u++)o[u].call(null);for(var l=0;l<i.ops.length;l++){var f=i.ops[l];if(f.cursorActivityHandlers)for(;f.cursorActivityCalled<f.cursorActivityHandlers.length;)f.cursorActivityHandlers[f.cursorActivityCalled++].call(null,f.cm)}}while(u<o.length)}function yv(i,o){var u=i.ownsGroup;if(u)try{gv(u)}finally{Jo=null,o(u)}}var La=null;function Hr(i,o){var u=Pe(i,o);if(u.length){var l=Array.prototype.slice.call(arguments,2),f;Jo?f=Jo.delayedCallbacks:La?f=La:(f=La=[],setTimeout(kp,0));for(var v=function(P){f.push(function(){return u[P].apply(null,l)})},S=0;S<u.length;++S)v(S)}}function kp(){var i=La;La=null;for(var o=0;o<i.length;++o)i[o]()}function pc(i,o,u,l){for(var f=0;f<o.changes.length;f++){var v=o.changes[f];v=="text"?Rp(i,o):v=="gutter"?Fp(i,o,u,l):v=="class"?en(i,o):v=="widget"&&bv(i,o,l)}o.changes=null}function Da(i){return i.node==i.text&&(i.node=Z("div",null,null,"position: relative"),i.text.parentNode&&i.text.parentNode.replaceChild(i.node,i.text),i.node.appendChild(i.text),A&&O<8&&(i.node.style.zIndex=2)),i.node}function jp(i,o){var u=o.bgClass?o.bgClass+" "+(o.line.bgClass||""):o.line.bgClass;if(u&&(u+=" CodeMirror-linebackground"),o.background)u?o.background.className=u:(o.background.parentNode.removeChild(o.background),o.background=null);else if(u){var l=Da(o);o.background=l.insertBefore(Z("div",null,u),l.firstChild),i.display.input.setUneditable(o.background)}}function Ip(i,o){var u=i.display.externalMeasured;return u&&u.line==o.line?(i.display.externalMeasured=null,o.measure=u.measure,u.built):Pp(i,o)}function Rp(i,o){var u=o.text.className,l=Ip(i,o);o.text==o.node&&(o.node=l.pre),o.text.parentNode.replaceChild(l.pre,o.text),o.text=l.pre,l.bgClass!=o.bgClass||l.textClass!=o.textClass?(o.bgClass=l.bgClass,o.textClass=l.textClass,en(i,o)):u&&(o.text.className=u)}function en(i,o){jp(i,o),o.line.wrapClass?Da(o).className=o.line.wrapClass:o.node!=o.text&&(o.node.className="");var u=o.textClass?o.textClass+" "+(o.line.textClass||""):o.line.textClass;o.text.className=u||""}function Fp(i,o,u,l){if(o.gutter&&(o.node.removeChild(o.gutter),o.gutter=null),o.gutterBackground&&(o.node.removeChild(o.gutterBackground),o.gutterBackground=null),o.line.gutterClass){var f=Da(o);o.gutterBackground=Z("div",null,"CodeMirror-gutter-background "+o.line.gutterClass,"left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),i.display.input.setUneditable(o.gutterBackground),f.insertBefore(o.gutterBackground,o.text)}var v=o.line.gutterMarkers;if(i.options.lineNumbers||v){var S=Da(o),P=o.gutter=Z("div",null,"CodeMirror-gutter-wrapper","left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(P.setAttribute("aria-hidden","true"),i.display.input.setUneditable(P),S.insertBefore(P,o.text),o.line.gutterClass&&(P.className+=" "+o.line.gutterClass),i.options.lineNumbers&&(!v||!v["CodeMirror-linenumbers"])&&(o.lineNumber=P.appendChild(Z("div",lo(i.options,u),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+i.display.lineNumInnerWidth+"px"))),v)for(var T=0;T<i.display.gutterSpecs.length;++T){var D=i.display.gutterSpecs[T].className,oe=v.hasOwnProperty(D)&&v[D];oe&&P.appendChild(Z("div",[oe],"CodeMirror-gutter-elt","left: "+l.gutterLeft[D]+"px; width: "+l.gutterWidth[D]+"px"))}}}function bv(i,o,u){o.alignable&&(o.alignable=null);for(var l=Q("CodeMirror-linewidget"),f=o.node.firstChild,v=void 0;f;f=v)v=f.nextSibling,l.test(f.className)&&o.node.removeChild(f);Mp(i,o,u)}function xv(i,o,u,l){var f=Ip(i,o);return o.text=o.node=f.pre,f.bgClass&&(o.bgClass=f.bgClass),f.textClass&&(o.textClass=f.textClass),en(i,o),Fp(i,o,u,l),Mp(i,o,l),o.node}function Mp(i,o,u){if(Lp(i,o.line,o,u,!0),o.rest)for(var l=0;l<o.rest.length;l++)Lp(i,o.rest[l],o,u,!1)}function Lp(i,o,u,l,f){if(o.widgets)for(var v=Da(u),S=0,P=o.widgets;S<P.length;++S){var T=P[S],D=Z("div",[T.node],"CodeMirror-linewidget"+(T.className?" "+T.className:""));T.handleMouseEvents||D.setAttribute("cm-ignore-events","true"),Na(T,D,u,l),i.display.input.setUneditable(D),f&&T.above?v.insertBefore(D,u.gutter||u.text):v.appendChild(D),Hr(T,"redraw")}}function Na(i,o,u,l){if(i.noHScroll){(u.alignable||(u.alignable=[])).push(o);var f=l.wrapperWidth;o.style.left=l.fixedPos+"px",i.coverGutter||(f-=l.gutterTotalWidth,o.style.paddingLeft=l.gutterTotalWidth+"px"),o.style.width=f+"px"}i.coverGutter&&(o.style.zIndex=5,o.style.position="relative",i.noHScroll||(o.style.marginLeft=-l.gutterTotalWidth+"px"))}function Ba(i){if(i.height!=null)return i.height;var o=i.doc.cm;if(!o)return 0;if(!Ne(document.body,i.node)){var u="position: relative;";i.coverGutter&&(u+="margin-left: -"+o.display.gutters.offsetWidth+"px;"),i.noHScroll&&(u+="width: "+o.display.wrapper.clientWidth+"px;"),Ae(o.display.measure,Z("div",[i.node],null,u))}return i.height=i.node.parentNode.offsetHeight}function Di(i,o){for(var u=an(o);u!=i.wrapper;u=u.parentNode)if(!u||u.nodeType==1&&u.getAttribute("cm-ignore-events")=="true"||u.parentNode==i.sizer&&u!=i.mover)return!0}function Yo(i){return i.lineSpace.offsetTop}function dc(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function $a(i){if(i.cachedPaddingH)return i.cachedPaddingH;var o=Ae(i.measure,Z("pre","x","CodeMirror-line-like")),u=window.getComputedStyle?window.getComputedStyle(o):o.currentStyle,l={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight)};return!isNaN(l.left)&&!isNaN(l.right)&&(i.cachedPaddingH=l),l}function Mn(i){return qe-i.display.nativeBarWidth}function Rs(i){return i.display.scroller.clientWidth-Mn(i)-i.display.barWidth}function Kl(i){return i.display.scroller.clientHeight-Mn(i)-i.display.barHeight}function Sv(i,o,u){var l=i.options.lineWrapping,f=l&&Rs(i);if(!o.measure.heights||l&&o.measure.width!=f){var v=o.measure.heights=[];if(l){o.measure.width=f;for(var S=o.text.firstChild.getClientRects(),P=0;P<S.length-1;P++){var T=S[P],D=S[P+1];Math.abs(T.bottom-D.bottom)>2&&v.push((T.bottom+D.top)/2-u.top)}}v.push(u.bottom-u.top)}}function Dp(i,o,u){if(i.line==o)return{map:i.measure.map,cache:i.measure.cache};if(i.rest){for(var l=0;l<i.rest.length;l++)if(i.rest[l]==o)return{map:i.measure.maps[l],cache:i.measure.caches[l]};for(var f=0;f<i.rest.length;f++)if(Qt(i.rest[f])>u)return{map:i.measure.maps[f],cache:i.measure.caches[f],before:!0}}}function Ua(i,o){o=yi(o);var u=Qt(o),l=i.display.externalMeasured=new Vp(i.doc,o,u);l.lineN=u;var f=l.built=Pp(i,l);return l.text=f.pre,Ae(i.display.lineMeasure,f.pre),l}function hc(i,o,u,l){return bi(i,Fs(i,o),u,l)}function Jl(i,o){if(o>=i.display.viewFrom&&o<i.display.viewTo)return i.display.view[ho(i,o)];var u=i.display.externalMeasured;if(u&&o>=u.lineN&&o<u.lineN+u.size)return u}function Fs(i,o){var u=Qt(o),l=Jl(i,u);l&&!l.text?l=null:l&&l.changes&&(pc(i,l,u,yc(i)),i.curOp.forceUpdate=!0),l||(l=Ua(i,o));var f=Dp(l,o,u);return{line:o,view:l,rect:null,map:f.map,cache:f.cache,before:f.before,hasHeights:!1}}function bi(i,o,u,l,f){o.before&&(u=-1);var v=u+(l||""),S;return o.cache.hasOwnProperty(v)?S=o.cache[v]:(o.rect||(o.rect=o.view.text.getBoundingClientRect()),o.hasHeights||(Sv(i,o.view,o.rect),o.hasHeights=!0),S=Ov(i,o,u,l),S.bogus||(o.cache[v]=S)),{left:S.left,right:S.right,top:f?S.rtop:S.top,bottom:f?S.rbottom:S.bottom}}var mc={left:0,right:0,top:0,bottom:0};function fo(i,o,u){for(var l,f,v,S,P,T,D=0;D<i.length;D+=3)if(P=i[D],T=i[D+1],o<P?(f=0,v=1,S="left"):o<T?(f=o-P,v=f+1):(D==i.length-3||o==T&&i[D+3]>o)&&(v=T-P,f=v-1,o>=T&&(S="right")),f!=null){if(l=i[D+2],P==T&&u==(l.insertLeft?"left":"right")&&(S=u),u=="left"&&f==0)for(;D&&i[D-2]==i[D-3]&&i[D-1].insertLeft;)l=i[(D-=3)+2],S="left";if(u=="right"&&f==T-P)for(;D<i.length-3&&i[D+3]==i[D+4]&&!i[D+5].insertLeft;)l=i[(D+=3)+2],S="right";break}return{node:l,start:f,end:v,collapse:S,coverStart:P,coverEnd:T}}function wv(i,o){var u=mc;if(o=="left")for(var l=0;l<i.length&&(u=i[l]).left==u.right;l++);else for(var f=i.length-1;f>=0&&(u=i[f]).left==u.right;f--);return u}function Ov(i,o,u,l){var f=fo(o.map,u,l),v=f.node,S=f.start,P=f.end,T=f.collapse,D;if(v.nodeType==3){for(var oe=0;oe<4;oe++){for(;S&&vi(o.line.text.charAt(f.coverStart+S));)--S;for(;f.coverStart+P<f.coverEnd&&vi(o.line.text.charAt(f.coverStart+P));)++P;if(A&&O<9&&S==0&&P==f.coverEnd-f.coverStart?D=v.parentNode.getBoundingClientRect():D=wv(ue(v,S,P).getClientRects(),l),D.left||D.right||S==0)break;P=S,S=S-1,T="right"}A&&O<11&&(D=Np(i.display.measure,D))}else{S>0&&(T=l="right");var fe;i.options.lineWrapping&&(fe=v.getClientRects()).length>1?D=fe[l=="right"?fe.length-1:0]:D=v.getBoundingClientRect()}if(A&&O<9&&!S&&(!D||!D.left&&!D.right)){var we=v.parentNode.getClientRects()[0];we?D={left:we.left,right:we.left+Zo(i.display),top:we.top,bottom:we.bottom}:D=mc}for(var ge=D.top-o.rect.top,Ve=D.bottom-o.rect.top,Ie=(ge+Ve)/2,De=o.view.measure.heights,Ue=0;Ue<De.length-1&&!(Ie<De[Ue]);Ue++);var Ge=Ue?De[Ue-1]:0,We=De[Ue],Xe={left:(T=="right"?D.right:D.left)-o.rect.left,right:(T=="left"?D.left:D.right)-o.rect.left,top:Ge,bottom:We};return!D.left&&!D.right&&(Xe.bogus=!0),i.options.singleCursorHeightPerLine||(Xe.rtop=ge,Xe.rbottom=Ve),Xe}function Np(i,o){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rn(i))return o;var u=screen.logicalXDPI/screen.deviceXDPI,l=screen.logicalYDPI/screen.deviceYDPI;return{left:o.left*u,right:o.right*u,top:o.top*l,bottom:o.bottom*l}}function vc(i){if(i.measure&&(i.measure.cache={},i.measure.heights=null,i.rest))for(var o=0;o<i.rest.length;o++)i.measure.caches[o]={}}function Bp(i){i.display.externalMeasure=null,de(i.display.lineMeasure);for(var o=0;o<i.display.view.length;o++)vc(i.display.view[o])}function Xo(i){Bp(i),i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null,i.options.lineWrapping||(i.display.maxLineChanged=!0),i.display.lineNumChars=null}function $p(i){return K&&L?-(i.body.getBoundingClientRect().left-parseInt(getComputedStyle(i.body).marginLeft)):i.defaultView.pageXOffset||(i.documentElement||i.body).scrollLeft}function Up(i){return K&&L?-(i.body.getBoundingClientRect().top-parseInt(getComputedStyle(i.body).marginTop)):i.defaultView.pageYOffset||(i.documentElement||i.body).scrollTop}function Yl(i){var o=yi(i),u=o.widgets,l=0;if(u)for(var f=0;f<u.length;++f)u[f].above&&(l+=Ba(u[f]));return l}function Xl(i,o,u,l,f){if(!f){var v=Yl(o);u.top+=v,u.bottom+=v}if(l=="line")return u;l||(l="local");var S=us(o);if(l=="local"?S+=Yo(i.display):S-=i.display.viewOffset,l=="page"||l=="window"){var P=i.display.lineSpace.getBoundingClientRect();S+=P.top+(l=="window"?0:Up(Ye(i)));var T=P.left+(l=="window"?0:$p(Ye(i)));u.left+=T,u.right+=T}return u.top+=S,u.bottom+=S,u}function Wp(i,o,u){if(u=="div")return o;var l=o.left,f=o.top;if(u=="page")l-=$p(Ye(i)),f-=Up(Ye(i));else if(u=="local"||!u){var v=i.display.sizer.getBoundingClientRect();l+=v.left,f+=v.top}var S=i.display.lineSpace.getBoundingClientRect();return{left:l-S.left,top:f-S.top}}function Wa(i,o,u,l,f){return l||(l=rt(i.doc,o.line)),Xl(i,l,hc(i,l,o.ch,f),u)}function zr(i,o,u,l,f,v){l=l||rt(i.doc,o.line),f||(f=Fs(i,l));function S(Ve,Ie){var De=bi(i,f,Ve,Ie?"right":"left",v);return Ie?De.left=De.right:De.right=De.left,Xl(i,l,De,u)}var P=mt(l,i.doc.direction),T=o.ch,D=o.sticky;if(T>=l.text.length?(T=l.text.length,D="before"):T<=0&&(T=0,D="after"),!P)return S(D=="before"?T-1:T,D=="before");function oe(Ve,Ie,De){var Ue=P[Ie],Ge=Ue.level==1;return S(De?Ve-1:Ve,Ge!=De)}var fe=Ft(P,T,D),we=fr,ge=oe(T,fe,D=="before");return we!=null&&(ge.other=oe(T,we,D!="before")),ge}function Hp(i,o){var u=0;o=nt(i.doc,o),i.options.lineWrapping||(u=Zo(i.display)*o.ch);var l=rt(i.doc,o.line),f=us(l)+Yo(i.display);return{left:u,right:u,top:f,bottom:f+l.height}}function Ha(i,o,u,l,f){var v=F(i,o,u);return v.xRel=f,l&&(v.outside=l),v}function gc(i,o,u){var l=i.doc;if(u+=i.display.viewOffset,u<0)return Ha(l.first,0,null,-1,-1);var f=ls(l,u),v=l.first+l.size-1;if(f>v)return Ha(l.first+l.size-1,rt(l,v).text.length,null,1,1);o<0&&(o=0);for(var S=rt(l,f);;){var P=Ev(i,S,f,o,u),T=cv(S,P.ch+(P.xRel>0||P.outside>0?1:0));if(!T)return P;var D=T.find(1);if(D.line==f)return D;S=rt(l,f=D.line)}}function zp(i,o,u,l){l-=Yl(o);var f=o.text.length,v=mn(function(S){return bi(i,u,S-1).bottom<=l},f,0);return f=mn(function(S){return bi(i,u,S).top>l},v,f),{begin:v,end:f}}function Gp(i,o,u,l){u||(u=Fs(i,o));var f=Xl(i,o,bi(i,u,l),"line").top;return zp(i,o,u,f)}function za(i,o,u,l){return i.bottom<=u?!1:i.top>u?!0:(l?i.left:i.right)>o}function Ev(i,o,u,l,f){f-=us(o);var v=Fs(i,o),S=Yl(o),P=0,T=o.text.length,D=!0,oe=mt(o,i.doc.direction);if(oe){var fe=(i.options.lineWrapping?Cv:Av)(i,o,u,v,oe,l,f);D=fe.level!=1,P=D?fe.from:fe.to-1,T=D?fe.to:fe.from-1}var we=null,ge=null,Ve=mn(function(ct){var at=bi(i,v,ct);return at.top+=S,at.bottom+=S,za(at,l,f,!1)?(at.top<=f&&at.left<=l&&(we=ct,ge=at),!0):!1},P,T),Ie,De,Ue=!1;if(ge){var Ge=l-ge.left<ge.right-l,We=Ge==D;Ve=we+(We?0:1),De=We?"after":"before",Ie=Ge?ge.left:ge.right}else{!D&&(Ve==T||Ve==P)&&Ve++,De=Ve==0?"after":Ve==o.text.length?"before":bi(i,v,Ve-(D?1:0)).bottom+S<=f==D?"after":"before";var Xe=zr(i,F(u,Ve,De),"line",o,v);Ie=Xe.left,Ue=f<Xe.top?-1:f>=Xe.bottom?1:0}return Ve=jn(o.text,Ve,1),Ha(u,Ve,De,Ue,l-Ie)}function Av(i,o,u,l,f,v,S){var P=mn(function(fe){var we=f[fe],ge=we.level!=1;return za(zr(i,F(u,ge?we.to:we.from,ge?"before":"after"),"line",o,l),v,S,!0)},0,f.length-1),T=f[P];if(P>0){var D=T.level!=1,oe=zr(i,F(u,D?T.from:T.to,D?"after":"before"),"line",o,l);za(oe,v,S,!0)&&oe.top>S&&(T=f[P-1])}return T}function Cv(i,o,u,l,f,v,S){var P=zp(i,o,l,S),T=P.begin,D=P.end;/\s/.test(o.text.charAt(D-1))&&D--;for(var oe=null,fe=null,we=0;we<f.length;we++){var ge=f[we];if(!(ge.from>=D||ge.to<=T)){var Ve=ge.level!=1,Ie=bi(i,l,Ve?Math.min(D,ge.to)-1:Math.max(T,ge.from)).right,De=Ie<v?v-Ie+1e9:Ie-v;(!oe||fe>De)&&(oe=ge,fe=De)}}return oe||(oe=f[f.length-1]),oe.from<T&&(oe={from:T,to:oe.to,level:oe.level}),oe.to>D&&(oe={from:oe.from,to:D,level:oe.level}),oe}var Ni;function Qo(i){if(i.cachedTextHeight!=null)return i.cachedTextHeight;if(Ni==null){Ni=Z("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)Ni.appendChild(document.createTextNode("x")),Ni.appendChild(Z("br"));Ni.appendChild(document.createTextNode("x"))}Ae(i.measure,Ni);var u=Ni.offsetHeight/50;return u>3&&(i.cachedTextHeight=u),de(i.measure),u||1}function Zo(i){if(i.cachedCharWidth!=null)return i.cachedCharWidth;var o=Z("span","xxxxxxxxxx"),u=Z("pre",[o],"CodeMirror-line-like");Ae(i.measure,u);var l=o.getBoundingClientRect(),f=(l.right-l.left)/10;return f>2&&(i.cachedCharWidth=f),f||10}function yc(i){for(var o=i.display,u={},l={},f=o.gutters.clientLeft,v=o.gutters.firstChild,S=0;v;v=v.nextSibling,++S){var P=i.display.gutterSpecs[S].className;u[P]=v.offsetLeft+v.clientLeft+f,l[P]=v.clientWidth}return{fixedPos:bc(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:u,gutterWidth:l,wrapperWidth:o.wrapper.clientWidth}}function bc(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function Kp(i){var o=Qo(i.display),u=i.options.lineWrapping,l=u&&Math.max(5,i.display.scroller.clientWidth/Zo(i.display)-3);return function(f){if(Is(i.doc,f))return 0;var v=0;if(f.widgets)for(var S=0;S<f.widgets.length;S++)f.widgets[S].height&&(v+=f.widgets[S].height);return u?v+(Math.ceil(f.text.length/l)||1)*o:v+o}}function xc(i){var o=i.doc,u=Kp(i);o.iter(function(l){var f=u(l);f!=l.height&&zn(l,f)})}function po(i,o,u,l){var f=i.display;if(!u&&an(o).getAttribute("cm-not-content")=="true")return null;var v,S,P=f.lineSpace.getBoundingClientRect();try{v=o.clientX-P.left,S=o.clientY-P.top}catch(fe){return null}var T=gc(i,v,S),D;if(l&&T.xRel>0&&(D=rt(i.doc,T.line).text).length==T.ch){var oe=lt(D,D.length,i.options.tabSize)-D.length;T=F(T.line,Math.max(0,Math.round((v-$a(i.display).left)/Zo(i.display))-oe))}return T}function ho(i,o){if(o>=i.display.viewTo||(o-=i.display.viewFrom,o<0))return null;for(var u=i.display.view,l=0;l<u.length;l++)if(o-=u[l].size,o<0)return l}function Cn(i,o,u,l){o==null&&(o=i.doc.first),u==null&&(u=i.doc.first+i.doc.size),l||(l=0);var f=i.display;if(l&&u<f.viewTo&&(f.updateLineNumbers==null||f.updateLineNumbers>o)&&(f.updateLineNumbers=o),i.curOp.viewChanged=!0,o>=f.viewTo)Li&&ac(i.doc,o)<f.viewTo&&Ls(i);else if(u<=f.viewFrom)Li&&lc(i.doc,u+l)>f.viewFrom?Ls(i):(f.viewFrom+=l,f.viewTo+=l);else if(o<=f.viewFrom&&u>=f.viewTo)Ls(i);else if(o<=f.viewFrom){var v=cs(i,u,u+l,1);v?(f.view=f.view.slice(v.index),f.viewFrom=v.lineN,f.viewTo+=l):Ls(i)}else if(u>=f.viewTo){var S=cs(i,o,o,-1);S?(f.view=f.view.slice(0,S.index),f.viewTo=S.lineN):Ls(i)}else{var P=cs(i,o,o,-1),T=cs(i,u,u+l,1);P&&T?(f.view=f.view.slice(0,P.index).concat(Ma(i,P.lineN,T.lineN)).concat(f.view.slice(T.index)),f.viewTo+=l):Ls(i)}var D=f.externalMeasured;D&&(u<D.lineN?D.lineN+=l:o<D.lineN+D.size&&(f.externalMeasured=null))}function Ms(i,o,u){i.curOp.viewChanged=!0;var l=i.display,f=i.display.externalMeasured;if(f&&o>=f.lineN&&o<f.lineN+f.size&&(l.externalMeasured=null),!(o<l.viewFrom||o>=l.viewTo)){var v=l.view[ho(i,o)];if(v.node!=null){var S=v.changes||(v.changes=[]);Fe(S,u)==-1&&S.push(u)}}}function Ls(i){i.display.viewFrom=i.display.viewTo=i.doc.first,i.display.view=[],i.display.viewOffset=0}function cs(i,o,u,l){var f=ho(i,o),v,S=i.display.view;if(!Li||u==i.doc.first+i.doc.size)return{index:f,lineN:u};for(var P=i.display.viewFrom,T=0;T<f;T++)P+=S[T].size;if(P!=o){if(l>0){if(f==S.length-1)return null;v=P+S[f].size-o,f++}else v=P-o;o+=v,u+=v}for(;ac(i.doc,u)!=u;){if(f==(l<0?0:S.length-1))return null;u+=l*S[f-(l<0?1:0)].size,f+=l}return{index:f,lineN:u}}function _v(i,o,u){var l=i.display,f=l.view;f.length==0||o>=l.viewTo||u<=l.viewFrom?(l.view=Ma(i,o,u),l.viewFrom=o):(l.viewFrom>o?l.view=Ma(i,o,l.viewFrom).concat(l.view):l.viewFrom<o&&(l.view=l.view.slice(ho(i,o))),l.viewFrom=o,l.viewTo<u?l.view=l.view.concat(Ma(i,l.viewTo,u)):l.viewTo>u&&(l.view=l.view.slice(0,ho(i,u)))),l.viewTo=u}function Sc(i){for(var o=i.display.view,u=0,l=0;l<o.length;l++){var f=o[l];!f.hidden&&(!f.node||f.changes)&&++u}return u}function Ds(i){i.display.input.showSelection(i.display.input.prepareSelection())}function wc(i,o){o===void 0&&(o=!0);var u=i.doc,l={},f=l.cursors=document.createDocumentFragment(),v=l.selection=document.createDocumentFragment(),S=i.options.$customCursor;S&&(o=!0);for(var P=0;P<u.sel.ranges.length;P++)if(!(!o&&P==u.sel.primIndex)){var T=u.sel.ranges[P];if(!(T.from().line>=i.display.viewTo||T.to().line<i.display.viewFrom)){var D=T.empty();if(S){var oe=S(i,T);oe&&Oc(i,oe,f)}else(D||i.options.showCursorWhenSelecting)&&Oc(i,T.head,f);D||qo(i,T,v)}}return l}function Oc(i,o,u){var l=zr(i,o,"div",null,null,!i.options.singleCursorHeightPerLine),f=u.appendChild(Z("div","\xA0","CodeMirror-cursor"));if(f.style.left=l.left+"px",f.style.top=l.top+"px",f.style.height=Math.max(0,l.bottom-l.top)*i.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(i.getWrapperElement().className)){var v=Wa(i,o,"div",null,null),S=v.right-v.left;f.style.width=(S>0?S:i.defaultCharWidth())+"px"}if(l.other){var P=u.appendChild(Z("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));P.style.display="",P.style.left=l.other.left+"px",P.style.top=l.other.top+"px",P.style.height=(l.other.bottom-l.other.top)*.85+"px"}}function Ql(i,o){return i.top-o.top||i.left-o.left}function qo(i,o,u){var l=i.display,f=i.doc,v=document.createDocumentFragment(),S=$a(i.display),P=S.left,T=Math.max(l.sizerWidth,Rs(i)-l.sizer.offsetLeft)-S.right,D=f.direction=="ltr";function oe(We,Xe,ct,at){Xe<0&&(Xe=0),Xe=Math.round(Xe),at=Math.round(at),v.appendChild(Z("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
16
+ `,o);f==-1&&(f=i.length);var v=i.slice(o,i.charAt(f-1)=="\r"?f-1:f),S=v.indexOf("\r");S!=-1?(u.push(v.slice(0,S)),o+=S+1):(u.push(v),o=f+1)}return u}:function(i){return i.split(/\r\n?|\n/)},Ts=window.getSelection?function(i){try{return i.selectionStart!=i.selectionEnd}catch(o){return!1}}:function(i){var o;try{o=i.ownerDocument.selection.createRange()}catch(u){}return!o||o.parentElement()!=i?!1:o.compareEndPoints("StartToEnd",o)!=0},Wo=function(){var i=Z("div");return"oncopy"in i?!0:(i.setAttribute("oncopy","return;"),typeof i.oncopy=="function")}(),In=null;function Rn(i){if(In!=null)return In;var o=Ae(i,Z("span","x")),u=o.getBoundingClientRect(),l=ue(o,0,1).getBoundingClientRect();return In=Math.abs(u.left-l.left)>1}var Fn={},En={};function ti(i,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),Fn[i]=o}function ka(i,o){En[i]=o}function vi(i){if(typeof i=="string"&&En.hasOwnProperty(i))i=En[i];else if(i&&typeof i.name=="string"&&En.hasOwnProperty(i.name)){var o=En[i.name];typeof o=="string"&&(o={name:o}),i=kn(o,i),i.name=o.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i))return vi("application/xml");if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i))return vi("application/json")}return typeof i=="string"?{name:i}:i||{name:"null"}}function An(i,o){o=vi(o);var u=Fn[o.name];if(!u)return An(i,"text/plain");var l=u(i,o);if(Ir.hasOwnProperty(o.name)){var f=Ir[o.name];for(var v in f)f.hasOwnProperty(v)&&(l.hasOwnProperty(v)&&(l["_"+v]=l[v]),l[v]=f[v])}if(l.name=o.name,o.helperType&&(l.helperType=o.helperType),o.modeProps)for(var S in o.modeProps)l[S]=o.modeProps[S];return l}var Ir={};function os(i,o){var u=Ir.hasOwnProperty(i)?Ir[i]:Ir[i]={};yt(o,u)}function ri(i,o){if(o===!0)return o;if(i.copyState)return i.copyState(o);var u={};for(var l in o){var f=o[l];f instanceof Array&&(f=f.concat([])),u[l]=f}return u}function Ho(i,o){for(var u;i.innerMode&&(u=i.innerMode(o),!(!u||u.mode==i));)o=u.state,i=u.mode;return u||{mode:i,state:o}}function Ml(i,o,u){return i.startState?i.startState(o,u):!0}var hr=function(i,o,u){this.pos=this.start=0,this.string=i,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u};hr.prototype.eol=function(){return this.pos>=this.string.length},hr.prototype.sol=function(){return this.pos==this.lineStart},hr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},hr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},hr.prototype.eat=function(i){var o=this.string.charAt(this.pos),u;if(typeof i=="string"?u=o==i:u=o&&(i.test?i.test(o):i(o)),u)return++this.pos,o},hr.prototype.eatWhile=function(i){for(var o=this.pos;this.eat(i););return this.pos>o},hr.prototype.eatSpace=function(){for(var i=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>i},hr.prototype.skipToEnd=function(){this.pos=this.string.length},hr.prototype.skipTo=function(i){var o=this.string.indexOf(i,this.pos);if(o>-1)return this.pos=o,!0},hr.prototype.backUp=function(i){this.pos-=i},hr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},hr.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},hr.prototype.match=function(i,o,u){if(typeof i=="string"){var l=function(S){return u?S.toLowerCase():S},f=this.string.substr(this.pos,i.length);if(l(f)==l(i))return o!==!1&&(this.pos+=i.length),!0}else{var v=this.string.slice(this.pos).match(i);return v&&v.index>0?null:(v&&o!==!1&&(this.pos+=v[0].length),v)}},hr.prototype.current=function(){return this.string.slice(this.start,this.pos)},hr.prototype.hideFirstChars=function(i,o){this.lineStart+=i;try{return o()}finally{this.lineStart-=i}},hr.prototype.lookAhead=function(i){var o=this.lineOracle;return o&&o.lookAhead(i)},hr.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};function rt(i,o){if(o-=i.first,o<0||o>=i.size)throw new Error("There is no line "+(o+i.first)+" in the document.");for(var u=i;!u.lines;)for(var l=0;;++l){var f=u.children[l],v=f.chunkSize();if(o<v){u=f;break}o-=v}return u.lines[o]}function as(i,o,u){var l=[],f=o.line;return i.iter(o.line,u.line+1,function(v){var S=v.text;f==u.line&&(S=S.slice(0,u.ch)),f==o.line&&(S=S.slice(o.ch)),l.push(S),++f}),l}function oo(i,o,u){var l=[];return i.iter(o,u,function(f){l.push(f.text)}),l}function zn(i,o){var u=o-i.height;if(u)for(var l=i;l;l=l.parent)l.height+=u}function Qt(i){if(i.parent==null)return null;for(var o=i.parent,u=Fe(o.lines,i),l=o.parent;l;o=l,l=l.parent)for(var f=0;l.children[f]!=o;++f)u+=l.children[f].chunkSize();return u+o.first}function ls(i,o){var u=i.first;e:do{for(var l=0;l<i.children.length;++l){var f=i.children[l],v=f.height;if(o<v){i=f;continue e}o-=v,u+=f.chunkSize()}return u}while(!i.lines);for(var S=0;S<i.lines.length;++S){var P=i.lines[S],T=P.height;if(o<T)break;o-=T}return u+S}function ao(i,o){return o>=i.first&&o<i.first+i.size}function lo(i,o){return String(i.lineNumberFormatter(o+i.firstLineNumber))}function F(i,o,u){if(u===void 0&&(u=null),!(this instanceof F))return new F(i,o,u);this.line=i,this.ch=o,this.sticky=u}function re(i,o){return i.line-o.line||i.ch-o.ch}function je(i,o){return i.sticky==o.sticky&&re(i,o)==0}function Le(i){return F(i.line,i.ch)}function St(i,o){return re(i,o)<0?o:i}function jt(i,o){return re(i,o)<0?i:o}function Zt(i,o){return Math.max(i.first,Math.min(o,i.first+i.size-1))}function nt(i,o){if(o.line<i.first)return F(i.first,0);var u=i.first+i.size-1;return o.line>u?F(u,rt(i,u).text.length):Gn(o,rt(i,o.line).text.length)}function Gn(i,o){var u=i.ch;return u==null||u>o?F(i.line,o):u<0?F(i.line,0):i}function Ll(i,o){for(var u=[],l=0;l<o.length;l++)u[l]=nt(i,o[l]);return u}var Dl=function(i,o){this.state=i,this.lookAhead=o},Fi=function(i,o,u,l){this.state=o,this.doc=i,this.line=u,this.maxLookAhead=l||0,this.baseTokens=null,this.baseTokenPos=1};Fi.prototype.lookAhead=function(i){var o=this.doc.getLine(this.line+i);return o!=null&&i>this.maxLookAhead&&(this.maxLookAhead=i),o},Fi.prototype.baseToken=function(i){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=i;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-i}},Fi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Fi.fromSaved=function(i,o,u){return o instanceof Dl?new Fi(i,ri(i.mode,o.state),u,o.lookAhead):new Fi(i,ri(i.mode,o),u)},Fi.prototype.save=function(i){var o=i!==!1?ri(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Dl(o,this.maxLookAhead):o};function nc(i,o,u,l){var f=[i.state.modeGen],v={};bp(i,o.text,i.doc.mode,u,function(D,oe){return f.push(D,oe)},v,l);for(var S=u.state,P=function(D){u.baseTokens=f;var oe=i.state.overlays[D],fe=1,we=0;u.state=!0,bp(i,o.text,oe.mode,u,function(ge,Ve){for(var Ie=fe;we<ge;){var De=f[fe];De>ge&&f.splice(fe,1,ge,f[fe+1],De),fe+=2,we=Math.min(ge,De)}if(Ve)if(oe.opaque)f.splice(Ie,fe-Ie,ge,"overlay "+Ve),fe=Ie+2;else for(;Ie<fe;Ie+=2){var Ue=f[Ie+1];f[Ie+1]=(Ue?Ue+" ":"")+"overlay "+Ve}},v),u.state=S,u.baseTokens=null,u.baseTokenPos=1},T=0;T<i.state.overlays.length;++T)P(T);return{styles:f,classes:v.bgClass||v.textClass?v:null}}function ic(i,o,u){if(!o.styles||o.styles[0]!=i.state.modeGen){var l=zo(i,Qt(o)),f=o.text.length>i.options.maxHighlightLength&&ri(i.doc.mode,l.state),v=nc(i,o,l);f&&(l.state=f),o.stateAfter=l.save(!f),o.styles=v.styles,v.classes?o.styleClasses=v.classes:o.styleClasses&&(o.styleClasses=null),u===i.doc.highlightFrontier&&(i.doc.modeFrontier=Math.max(i.doc.modeFrontier,++i.doc.highlightFrontier))}return o.styles}function zo(i,o,u){var l=i.doc,f=i.display;if(!l.mode.startState)return new Fi(l,!0,o);var v=xp(i,o,u),S=v>l.first&&rt(l,v-1).stateAfter,P=S?Fi.fromSaved(l,S,v):new Fi(l,Ml(l.mode),v);return l.iter(v,o,function(T){ni(i,T.text,P);var D=P.line;T.stateAfter=D==o-1||D%5==0||D>=f.viewFrom&&D<f.viewTo?P.save():null,P.nextLine()}),u&&(l.modeFrontier=P.line),P}function ni(i,o,u,l){var f=i.doc.mode,v=new hr(o,i.options.tabSize,u);for(v.start=v.pos=l||0,o==""&&Vs(f,u.state);!v.eol();)gn(f,v,u.state),v.start=v.pos}function Vs(i,o){if(i.blankLine)return i.blankLine(o);if(i.innerMode){var u=Ho(i,o);if(u.mode.blankLine)return u.mode.blankLine(u.state)}}function gn(i,o,u,l){for(var f=0;f<10;f++){l&&(l[0]=Ho(i,u).mode);var v=i.token(o,u);if(o.pos>o.start)return v}throw new Error("Mode "+i.name+" failed to advance stream.")}var uo=function(i,o,u){this.start=i.start,this.end=i.pos,this.string=i.current(),this.type=o||null,this.state=u};function gp(i,o,u,l){var f=i.doc,v=f.mode,S;o=nt(f,o);var P=rt(f,o.line),T=zo(i,o.line,u),D=new hr(P.text,i.options.tabSize,T),oe;for(l&&(oe=[]);(l||D.pos<o.ch)&&!D.eol();)D.start=D.pos,S=gn(v,D,T.state),l&&oe.push(new uo(D,S,ri(f.mode,T.state)));return l?oe:new uo(D,S,T.state)}function yp(i,o){if(i)for(;;){var u=i.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!u)break;i=i.slice(0,u.index)+i.slice(u.index+u[0].length);var l=u[1]?"bgClass":"textClass";o[l]==null?o[l]=u[2]:new RegExp("(?:^|\\s)"+u[2]+"(?:$|\\s)").test(o[l])||(o[l]+=" "+u[2])}return i}function bp(i,o,u,l,f,v,S){var P=u.flattenSpans;P==null&&(P=i.options.flattenSpans);var T=0,D=null,oe=new hr(o,i.options.tabSize,l),fe,we=i.options.addModeClass&&[null];for(o==""&&yp(Vs(u,l.state),v);!oe.eol();){if(oe.pos>i.options.maxHighlightLength?(P=!1,S&&ni(i,o,l,oe.pos),oe.pos=o.length,fe=null):fe=yp(gn(u,oe,l.state,we),v),we){var ge=we[0].name;ge&&(fe="m-"+(fe?ge+" "+fe:ge))}if(!P||D!=fe){for(;T<oe.start;)T=Math.min(oe.start,T+5e3),f(T,D);D=fe}oe.start=oe.pos}for(;T<oe.pos;){var Ve=Math.min(oe.pos,T+5e3);f(Ve,D),T=Ve}}function xp(i,o,u){for(var l,f,v=i.doc,S=u?-1:o-(i.doc.mode.innerMode?1e3:100),P=o;P>S;--P){if(P<=v.first)return v.first;var T=rt(v,P-1),D=T.stateAfter;if(D&&(!u||P+(D instanceof Dl?D.lookAhead:0)<=v.modeFrontier))return P;var oe=lt(T.text,null,i.options.tabSize);(f==null||l>oe)&&(f=P-1,l=oe)}return f}function lv(i,o){if(i.modeFrontier=Math.min(i.modeFrontier,o),!(i.highlightFrontier<o-10)){for(var u=i.first,l=o-1;l>u;l--){var f=rt(i,l).stateAfter;if(f&&(!(f instanceof Dl)||l+f.lookAhead<o)){u=l+1;break}}i.highlightFrontier=Math.min(i.highlightFrontier,u)}}var sc=!1,Mi=!1;function Go(){sc=!0}function uv(){Mi=!0}function ja(i,o,u){this.marker=i,this.from=o,this.to=u}function ot(i,o){if(i)for(var u=0;u<i.length;++u){var l=i[u];if(l.marker==o)return l}}function Nl(i,o){for(var u,l=0;l<i.length;++l)i[l]!=o&&(u||(u=[])).push(i[l]);return u}function Sp(i,o,u){var l=u&&window.WeakSet&&(u.markedSpans||(u.markedSpans=new WeakSet));l&&i.markedSpans&&l.has(i.markedSpans)?i.markedSpans.push(o):(i.markedSpans=i.markedSpans?i.markedSpans.concat([o]):[o],l&&l.add(i.markedSpans)),o.marker.attachLine(i)}function ks(i,o,u){var l;if(i)for(var f=0;f<i.length;++f){var v=i[f],S=v.marker,P=v.from==null||(S.inclusiveLeft?v.from<=o:v.from<o);if(P||v.from==o&&S.type=="bookmark"&&(!u||!v.marker.insertLeft)){var T=v.to==null||(S.inclusiveRight?v.to>=o:v.to>o);(l||(l=[])).push(new ja(S,v.from,T?null:v.to))}}return l}function wp(i,o,u){var l;if(i)for(var f=0;f<i.length;++f){var v=i[f],S=v.marker,P=v.to==null||(S.inclusiveRight?v.to>=o:v.to>o);if(P||v.from==o&&S.type=="bookmark"&&(!u||v.marker.insertLeft)){var T=v.from==null||(S.inclusiveLeft?v.from<=o:v.from<o);(l||(l=[])).push(new ja(S,T?null:v.from-o,v.to==null?null:v.to-o))}}return l}function js(i,o){if(o.full)return null;var u=ao(i,o.from.line)&&rt(i,o.from.line).markedSpans,l=ao(i,o.to.line)&&rt(i,o.to.line).markedSpans;if(!u&&!l)return null;var f=o.from.ch,v=o.to.ch,S=re(o.from,o.to)==0,P=ks(u,f,S),T=wp(l,v,S),D=o.text.length==1,oe=ht(o.text).length+(D?f:0);if(P)for(var fe=0;fe<P.length;++fe){var we=P[fe];if(we.to==null){var ge=ot(T,we.marker);ge?D&&(we.to=ge.to==null?null:ge.to+oe):we.to=f}}if(T)for(var Ve=0;Ve<T.length;++Ve){var Ie=T[Ve];if(Ie.to!=null&&(Ie.to+=oe),Ie.from==null){var De=ot(P,Ie.marker);De||(Ie.from=oe,D&&(P||(P=[])).push(Ie))}else Ie.from+=oe,D&&(P||(P=[])).push(Ie)}P&&(P=Bl(P)),T&&T!=P&&(T=Bl(T));var Ue=[P];if(!D){var Ge=o.text.length-2,We;if(Ge>0&&P)for(var Xe=0;Xe<P.length;++Xe)P[Xe].to==null&&(We||(We=[])).push(new ja(P[Xe].marker,null,null));for(var ct=0;ct<Ge;++ct)Ue.push(We);Ue.push(T)}return Ue}function Bl(i){for(var o=0;o<i.length;++o){var u=i[o];u.from!=null&&u.from==u.to&&u.marker.clearWhenEmpty!==!1&&i.splice(o--,1)}return i.length?i:null}function Dr(i,o,u){var l=null;if(i.iter(o.line,u.line+1,function(ge){if(ge.markedSpans)for(var Ve=0;Ve<ge.markedSpans.length;++Ve){var Ie=ge.markedSpans[Ve].marker;Ie.readOnly&&(!l||Fe(l,Ie)==-1)&&(l||(l=[])).push(Ie)}}),!l)return null;for(var f=[{from:o,to:u}],v=0;v<l.length;++v)for(var S=l[v],P=S.find(0),T=0;T<f.length;++T){var D=f[T];if(!(re(D.to,P.from)<0||re(D.from,P.to)>0)){var oe=[T,1],fe=re(D.from,P.from),we=re(D.to,P.to);(fe<0||!S.inclusiveLeft&&!fe)&&oe.push({from:D.from,to:P.from}),(we>0||!S.inclusiveRight&&!we)&&oe.push({from:P.to,to:D.to}),f.splice.apply(f,oe),T+=oe.length-3}}return f}function Ia(i){var o=i.markedSpans;if(o){for(var u=0;u<o.length;++u)o[u].marker.detachLine(i);i.markedSpans=null}}function $l(i,o){if(o){for(var u=0;u<o.length;++u)o[u].marker.attachLine(i);i.markedSpans=o}}function Ul(i){return i.inclusiveLeft?-1:0}function Wl(i){return i.inclusiveRight?1:0}function oc(i,o){var u=i.lines.length-o.lines.length;if(u!=0)return u;var l=i.find(),f=o.find(),v=re(l.from,f.from)||Ul(i)-Ul(o);if(v)return-v;var S=re(l.to,f.to)||Wl(i)-Wl(o);return S||o.id-i.id}function Op(i,o){var u=Mi&&i.markedSpans,l;if(u)for(var f=void 0,v=0;v<u.length;++v)f=u[v],f.marker.collapsed&&(o?f.from:f.to)==null&&(!l||oc(l,f.marker)<0)&&(l=f.marker);return l}function Ep(i){return Op(i,!0)}function Ra(i){return Op(i,!1)}function cv(i,o){var u=Mi&&i.markedSpans,l;if(u)for(var f=0;f<u.length;++f){var v=u[f];v.marker.collapsed&&(v.from==null||v.from<o)&&(v.to==null||v.to>o)&&(!l||oc(l,v.marker)<0)&&(l=v.marker)}return l}function Ap(i,o,u,l,f){var v=rt(i,o),S=Mi&&v.markedSpans;if(S)for(var P=0;P<S.length;++P){var T=S[P];if(T.marker.collapsed){var D=T.marker.find(0),oe=re(D.from,u)||Ul(T.marker)-Ul(f),fe=re(D.to,l)||Wl(T.marker)-Wl(f);if(!(oe>=0&&fe<=0||oe<=0&&fe>=0)&&(oe<=0&&(T.marker.inclusiveRight&&f.inclusiveLeft?re(D.to,u)>=0:re(D.to,u)>0)||oe>=0&&(T.marker.inclusiveRight&&f.inclusiveLeft?re(D.from,l)<=0:re(D.from,l)<0)))return!0}}}function gi(i){for(var o;o=Ep(i);)i=o.find(-1,!0).line;return i}function fv(i){for(var o;o=Ra(i);)i=o.find(1,!0).line;return i}function Ko(i){for(var o,u;o=Ra(i);)i=o.find(1,!0).line,(u||(u=[])).push(i);return u}function ac(i,o){var u=rt(i,o),l=gi(u);return u==l?o:Qt(l)}function lc(i,o){if(o>i.lastLine())return o;var u=rt(i,o),l;if(!Is(i,u))return o;for(;l=Ra(u);)u=l.find(1,!0).line;return Qt(u)+1}function Is(i,o){var u=Mi&&o.markedSpans;if(u){for(var l=void 0,f=0;f<u.length;++f)if(l=u[f],!!l.marker.collapsed){if(l.from==null)return!0;if(!l.marker.widgetNode&&l.from==0&&l.marker.inclusiveLeft&&uc(i,o,l))return!0}}}function uc(i,o,u){if(u.to==null){var l=u.marker.find(1,!0);return uc(i,l.line,ot(l.line.markedSpans,u.marker))}if(u.marker.inclusiveRight&&u.to==o.text.length)return!0;for(var f=void 0,v=0;v<o.markedSpans.length;++v)if(f=o.markedSpans[v],f.marker.collapsed&&!f.marker.widgetNode&&f.from==u.to&&(f.to==null||f.to!=u.from)&&(f.marker.inclusiveLeft||u.marker.inclusiveRight)&&uc(i,o,f))return!0}function us(i){i=gi(i);for(var o=0,u=i.parent,l=0;l<u.lines.length;++l){var f=u.lines[l];if(f==i)break;o+=f.height}for(var v=u.parent;v;u=v,v=u.parent)for(var S=0;S<v.children.length;++S){var P=v.children[S];if(P==u)break;o+=P.height}return o}function Hl(i){if(i.height==0)return 0;for(var o=i.text.length,u,l=i;u=Ep(l);){var f=u.find(0,!0);l=f.from.line,o+=f.from.ch-f.to.ch}for(l=i;u=Ra(l);){var v=u.find(0,!0);o-=l.text.length-v.from.ch,l=v.to.line,o+=l.text.length-v.to.ch}return o}function zl(i){var o=i.display,u=i.doc;o.maxLine=rt(u,u.first),o.maxLineLength=Hl(o.maxLine),o.maxLineChanged=!0,u.iter(function(l){var f=Hl(l);f>o.maxLineLength&&(o.maxLineLength=f,o.maxLine=l)})}var co=function(i,o,u){this.text=i,$l(this,o),this.height=u?u(this):1};co.prototype.lineNo=function(){return Qt(this)},sn(co);function Cp(i,o,u,l){i.text=o,i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null),i.order!=null&&(i.order=null),Ia(i),$l(i,u);var f=l?l(i):1;f!=i.height&&zn(i,f)}function cc(i){i.parent=null,Ia(i)}var pv={},Fa={};function _p(i,o){if(!i||/^\s*$/.test(i))return null;var u=o.addModeClass?Fa:pv;return u[i]||(u[i]=i.replace(/\S+/g,"cm-$&"))}function Pp(i,o){var u=xe("span",null,null,j?"padding-right: .1px":null),l={pre:xe("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:i,trailingSpace:!1,splitSpaces:i.getOption("lineWrapping")};o.measure={};for(var f=0;f<=(o.rest?o.rest.length:0);f++){var v=f?o.rest[f-1]:o.line,S=void 0;l.pos=0,l.addToken=hv,ss(i.display.measure)&&(S=mt(v,i.doc.direction))&&(l.addToken=mv(l.addToken,S)),l.map=[];var P=o!=i.display.externalMeasured&&Qt(v);vv(v,l,ic(i,v,P)),v.styleClasses&&(v.styleClasses.bgClass&&(l.bgClass=ze(v.styleClasses.bgClass,l.bgClass||"")),v.styleClasses.textClass&&(l.textClass=ze(v.styleClasses.textClass,l.textClass||""))),l.map.length==0&&l.map.push(0,0,l.content.appendChild(Ii(i.display.measure))),f==0?(o.measure.map=l.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(l.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(j){var T=l.content.lastChild;(/\bcm-tab\b/.test(T.className)||T.querySelector&&T.querySelector(".cm-tab"))&&(l.content.className="cm-tab-wrap-hack")}return xt(i,"renderLine",i,o.line,l.pre),l.pre.className&&(l.textClass=ze(l.pre.className,l.textClass||"")),l}function dv(i){var o=Z("span","\u2022","cm-invalidchar");return o.title="\\u"+i.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}function hv(i,o,u,l,f,v,S){if(o){var P=i.splitSpaces?fc(o,i.trailingSpace):o,T=i.cm.state.specialChars,D=!1,oe;if(!T.test(o))i.col+=o.length,oe=document.createTextNode(P),i.map.push(i.pos,i.pos+o.length,oe),A&&O<9&&(D=!0),i.pos+=o.length;else{oe=document.createDocumentFragment();for(var fe=0;;){T.lastIndex=fe;var we=T.exec(o),ge=we?we.index-fe:o.length-fe;if(ge){var Ve=document.createTextNode(P.slice(fe,fe+ge));A&&O<9?oe.appendChild(Z("span",[Ve])):oe.appendChild(Ve),i.map.push(i.pos,i.pos+ge,Ve),i.col+=ge,i.pos+=ge}if(!we)break;fe+=ge+1;var Ie=void 0;if(we[0]==" "){var De=i.cm.options.tabSize,Ue=De-i.col%De;Ie=oe.appendChild(Z("span",qr(Ue),"cm-tab")),Ie.setAttribute("role","presentation"),Ie.setAttribute("cm-text"," "),i.col+=Ue}else we[0]=="\r"||we[0]==`
17
+ `?(Ie=oe.appendChild(Z("span",we[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ie.setAttribute("cm-text",we[0]),i.col+=1):(Ie=i.cm.options.specialCharPlaceholder(we[0]),Ie.setAttribute("cm-text",we[0]),A&&O<9?oe.appendChild(Z("span",[Ie])):oe.appendChild(Ie),i.col+=1);i.map.push(i.pos,i.pos+1,Ie),i.pos++}}if(i.trailingSpace=P.charCodeAt(o.length-1)==32,u||l||f||D||v||S){var Ge=u||"";l&&(Ge+=l),f&&(Ge+=f);var We=Z("span",[oe],Ge,v);if(S)for(var Xe in S)S.hasOwnProperty(Xe)&&Xe!="style"&&Xe!="class"&&We.setAttribute(Xe,S[Xe]);return i.content.appendChild(We)}i.content.appendChild(oe)}}function fc(i,o){if(i.length>1&&!/ /.test(i))return i;for(var u=o,l="",f=0;f<i.length;f++){var v=i.charAt(f);v==" "&&u&&(f==i.length-1||i.charCodeAt(f+1)==32)&&(v="\xA0"),l+=v,u=v==" "}return l}function mv(i,o){return function(u,l,f,v,S,P,T){f=f?f+" cm-force-border":"cm-force-border";for(var D=u.pos,oe=D+l.length;;){for(var fe=void 0,we=0;we<o.length&&(fe=o[we],!(fe.to>D&&fe.from<=D));we++);if(fe.to>=oe)return i(u,l,f,v,S,P,T);i(u,l.slice(0,fe.to-D),f,v,null,P,T),v=null,l=l.slice(fe.to-D),D=fe.to}}}function Tp(i,o,u,l){var f=!l&&u.widgetNode;f&&i.map.push(i.pos,i.pos+o,f),!l&&i.cm.display.input.needsContentAttribute&&(f||(f=i.content.appendChild(document.createElement("span"))),f.setAttribute("cm-marker",u.id)),f&&(i.cm.display.input.setUneditable(f),i.content.appendChild(f)),i.pos+=o,i.trailingSpace=!1}function vv(i,o,u){var l=i.markedSpans,f=i.text,v=0;if(!l){for(var S=1;S<u.length;S+=2)o.addToken(o,f.slice(v,v=u[S]),_p(u[S+1],o.cm.options));return}for(var P=f.length,T=0,D=1,oe="",fe,we,ge=0,Ve,Ie,De,Ue,Ge;;){if(ge==T){Ve=Ie=De=we="",Ge=null,Ue=null,ge=1/0;for(var We=[],Xe=void 0,ct=0;ct<l.length;++ct){var at=l[ct],It=at.marker;if(It.type=="bookmark"&&at.from==T&&It.widgetNode)We.push(It);else if(at.from<=T&&(at.to==null||at.to>T||It.collapsed&&at.to==T&&at.from==T)){if(at.to!=null&&at.to!=T&&ge>at.to&&(ge=at.to,Ie=""),It.className&&(Ve+=" "+It.className),It.css&&(we=(we?we+";":"")+It.css),It.startStyle&&at.from==T&&(De+=" "+It.startStyle),It.endStyle&&at.to==ge&&(Xe||(Xe=[])).push(It.endStyle,at.to),It.title&&((Ge||(Ge={})).title=It.title),It.attributes)for(var mr in It.attributes)(Ge||(Ge={}))[mr]=It.attributes[mr];It.collapsed&&(!Ue||oc(Ue.marker,It)<0)&&(Ue=at)}else at.from>T&&ge>at.from&&(ge=at.from)}if(Xe)for(var Gr=0;Gr<Xe.length;Gr+=2)Xe[Gr+1]==ge&&(Ie+=" "+Xe[Gr]);if(!Ue||Ue.from==T)for(var Cr=0;Cr<We.length;++Cr)Tp(o,0,We[Cr]);if(Ue&&(Ue.from||0)==T){if(Tp(o,(Ue.to==null?P+1:Ue.to)-T,Ue.marker,Ue.from==null),Ue.to==null)return;Ue.to==T&&(Ue=!1)}}if(T>=P)break;for(var Ln=Math.min(P,ge);;){if(oe){var Pn=T+oe.length;if(!Ue){var Br=Pn>Ln?oe.slice(0,Ln-T):oe;o.addToken(o,Br,fe?fe+Ve:Ve,De,T+Br.length==ge?Ie:"",we,Ge)}if(Pn>=Ln){oe=oe.slice(Ln-T),T=Ln;break}T=Pn,De=""}oe=f.slice(v,v=u[D++]),fe=_p(u[D++],o.cm.options)}}}function Vp(i,o,u){this.line=o,this.rest=Ko(o),this.size=this.rest?Qt(ht(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Is(i,o)}function Ma(i,o,u){for(var l=[],f,v=o;v<u;v=f){var S=new Vp(i.doc,rt(i.doc,v),v);f=v+S.size,l.push(S)}return l}var Jo=null;function Gl(i){Jo?Jo.ops.push(i):i.ownsGroup=Jo={ops:[i],delayedCallbacks:[]}}function gv(i){var o=i.delayedCallbacks,u=0;do{for(;u<o.length;u++)o[u].call(null);for(var l=0;l<i.ops.length;l++){var f=i.ops[l];if(f.cursorActivityHandlers)for(;f.cursorActivityCalled<f.cursorActivityHandlers.length;)f.cursorActivityHandlers[f.cursorActivityCalled++].call(null,f.cm)}}while(u<o.length)}function yv(i,o){var u=i.ownsGroup;if(u)try{gv(u)}finally{Jo=null,o(u)}}var La=null;function Hr(i,o){var u=Pe(i,o);if(u.length){var l=Array.prototype.slice.call(arguments,2),f;Jo?f=Jo.delayedCallbacks:La?f=La:(f=La=[],setTimeout(kp,0));for(var v=function(P){f.push(function(){return u[P].apply(null,l)})},S=0;S<u.length;++S)v(S)}}function kp(){var i=La;La=null;for(var o=0;o<i.length;++o)i[o]()}function pc(i,o,u,l){for(var f=0;f<o.changes.length;f++){var v=o.changes[f];v=="text"?Rp(i,o):v=="gutter"?Fp(i,o,u,l):v=="class"?en(i,o):v=="widget"&&bv(i,o,l)}o.changes=null}function Da(i){return i.node==i.text&&(i.node=Z("div",null,null,"position: relative"),i.text.parentNode&&i.text.parentNode.replaceChild(i.node,i.text),i.node.appendChild(i.text),A&&O<8&&(i.node.style.zIndex=2)),i.node}function jp(i,o){var u=o.bgClass?o.bgClass+" "+(o.line.bgClass||""):o.line.bgClass;if(u&&(u+=" CodeMirror-linebackground"),o.background)u?o.background.className=u:(o.background.parentNode.removeChild(o.background),o.background=null);else if(u){var l=Da(o);o.background=l.insertBefore(Z("div",null,u),l.firstChild),i.display.input.setUneditable(o.background)}}function Ip(i,o){var u=i.display.externalMeasured;return u&&u.line==o.line?(i.display.externalMeasured=null,o.measure=u.measure,u.built):Pp(i,o)}function Rp(i,o){var u=o.text.className,l=Ip(i,o);o.text==o.node&&(o.node=l.pre),o.text.parentNode.replaceChild(l.pre,o.text),o.text=l.pre,l.bgClass!=o.bgClass||l.textClass!=o.textClass?(o.bgClass=l.bgClass,o.textClass=l.textClass,en(i,o)):u&&(o.text.className=u)}function en(i,o){jp(i,o),o.line.wrapClass?Da(o).className=o.line.wrapClass:o.node!=o.text&&(o.node.className="");var u=o.textClass?o.textClass+" "+(o.line.textClass||""):o.line.textClass;o.text.className=u||""}function Fp(i,o,u,l){if(o.gutter&&(o.node.removeChild(o.gutter),o.gutter=null),o.gutterBackground&&(o.node.removeChild(o.gutterBackground),o.gutterBackground=null),o.line.gutterClass){var f=Da(o);o.gutterBackground=Z("div",null,"CodeMirror-gutter-background "+o.line.gutterClass,"left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),i.display.input.setUneditable(o.gutterBackground),f.insertBefore(o.gutterBackground,o.text)}var v=o.line.gutterMarkers;if(i.options.lineNumbers||v){var S=Da(o),P=o.gutter=Z("div",null,"CodeMirror-gutter-wrapper","left: "+(i.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(P.setAttribute("aria-hidden","true"),i.display.input.setUneditable(P),S.insertBefore(P,o.text),o.line.gutterClass&&(P.className+=" "+o.line.gutterClass),i.options.lineNumbers&&(!v||!v["CodeMirror-linenumbers"])&&(o.lineNumber=P.appendChild(Z("div",lo(i.options,u),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+i.display.lineNumInnerWidth+"px"))),v)for(var T=0;T<i.display.gutterSpecs.length;++T){var D=i.display.gutterSpecs[T].className,oe=v.hasOwnProperty(D)&&v[D];oe&&P.appendChild(Z("div",[oe],"CodeMirror-gutter-elt","left: "+l.gutterLeft[D]+"px; width: "+l.gutterWidth[D]+"px"))}}}function bv(i,o,u){o.alignable&&(o.alignable=null);for(var l=Q("CodeMirror-linewidget"),f=o.node.firstChild,v=void 0;f;f=v)v=f.nextSibling,l.test(f.className)&&o.node.removeChild(f);Mp(i,o,u)}function xv(i,o,u,l){var f=Ip(i,o);return o.text=o.node=f.pre,f.bgClass&&(o.bgClass=f.bgClass),f.textClass&&(o.textClass=f.textClass),en(i,o),Fp(i,o,u,l),Mp(i,o,l),o.node}function Mp(i,o,u){if(Lp(i,o.line,o,u,!0),o.rest)for(var l=0;l<o.rest.length;l++)Lp(i,o.rest[l],o,u,!1)}function Lp(i,o,u,l,f){if(o.widgets)for(var v=Da(u),S=0,P=o.widgets;S<P.length;++S){var T=P[S],D=Z("div",[T.node],"CodeMirror-linewidget"+(T.className?" "+T.className:""));T.handleMouseEvents||D.setAttribute("cm-ignore-events","true"),Na(T,D,u,l),i.display.input.setUneditable(D),f&&T.above?v.insertBefore(D,u.gutter||u.text):v.appendChild(D),Hr(T,"redraw")}}function Na(i,o,u,l){if(i.noHScroll){(u.alignable||(u.alignable=[])).push(o);var f=l.wrapperWidth;o.style.left=l.fixedPos+"px",i.coverGutter||(f-=l.gutterTotalWidth,o.style.paddingLeft=l.gutterTotalWidth+"px"),o.style.width=f+"px"}i.coverGutter&&(o.style.zIndex=5,o.style.position="relative",i.noHScroll||(o.style.marginLeft=-l.gutterTotalWidth+"px"))}function Ba(i){if(i.height!=null)return i.height;var o=i.doc.cm;if(!o)return 0;if(!Ne(document.body,i.node)){var u="position: relative;";i.coverGutter&&(u+="margin-left: -"+o.display.gutters.offsetWidth+"px;"),i.noHScroll&&(u+="width: "+o.display.wrapper.clientWidth+"px;"),Ae(o.display.measure,Z("div",[i.node],null,u))}return i.height=i.node.parentNode.offsetHeight}function Li(i,o){for(var u=an(o);u!=i.wrapper;u=u.parentNode)if(!u||u.nodeType==1&&u.getAttribute("cm-ignore-events")=="true"||u.parentNode==i.sizer&&u!=i.mover)return!0}function Yo(i){return i.lineSpace.offsetTop}function dc(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function $a(i){if(i.cachedPaddingH)return i.cachedPaddingH;var o=Ae(i.measure,Z("pre","x","CodeMirror-line-like")),u=window.getComputedStyle?window.getComputedStyle(o):o.currentStyle,l={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight)};return!isNaN(l.left)&&!isNaN(l.right)&&(i.cachedPaddingH=l),l}function Mn(i){return qe-i.display.nativeBarWidth}function Rs(i){return i.display.scroller.clientWidth-Mn(i)-i.display.barWidth}function Kl(i){return i.display.scroller.clientHeight-Mn(i)-i.display.barHeight}function Sv(i,o,u){var l=i.options.lineWrapping,f=l&&Rs(i);if(!o.measure.heights||l&&o.measure.width!=f){var v=o.measure.heights=[];if(l){o.measure.width=f;for(var S=o.text.firstChild.getClientRects(),P=0;P<S.length-1;P++){var T=S[P],D=S[P+1];Math.abs(T.bottom-D.bottom)>2&&v.push((T.bottom+D.top)/2-u.top)}}v.push(u.bottom-u.top)}}function Dp(i,o,u){if(i.line==o)return{map:i.measure.map,cache:i.measure.cache};if(i.rest){for(var l=0;l<i.rest.length;l++)if(i.rest[l]==o)return{map:i.measure.maps[l],cache:i.measure.caches[l]};for(var f=0;f<i.rest.length;f++)if(Qt(i.rest[f])>u)return{map:i.measure.maps[f],cache:i.measure.caches[f],before:!0}}}function Ua(i,o){o=gi(o);var u=Qt(o),l=i.display.externalMeasured=new Vp(i.doc,o,u);l.lineN=u;var f=l.built=Pp(i,l);return l.text=f.pre,Ae(i.display.lineMeasure,f.pre),l}function hc(i,o,u,l){return yi(i,Fs(i,o),u,l)}function Jl(i,o){if(o>=i.display.viewFrom&&o<i.display.viewTo)return i.display.view[ho(i,o)];var u=i.display.externalMeasured;if(u&&o>=u.lineN&&o<u.lineN+u.size)return u}function Fs(i,o){var u=Qt(o),l=Jl(i,u);l&&!l.text?l=null:l&&l.changes&&(pc(i,l,u,yc(i)),i.curOp.forceUpdate=!0),l||(l=Ua(i,o));var f=Dp(l,o,u);return{line:o,view:l,rect:null,map:f.map,cache:f.cache,before:f.before,hasHeights:!1}}function yi(i,o,u,l,f){o.before&&(u=-1);var v=u+(l||""),S;return o.cache.hasOwnProperty(v)?S=o.cache[v]:(o.rect||(o.rect=o.view.text.getBoundingClientRect()),o.hasHeights||(Sv(i,o.view,o.rect),o.hasHeights=!0),S=Ov(i,o,u,l),S.bogus||(o.cache[v]=S)),{left:S.left,right:S.right,top:f?S.rtop:S.top,bottom:f?S.rbottom:S.bottom}}var mc={left:0,right:0,top:0,bottom:0};function fo(i,o,u){for(var l,f,v,S,P,T,D=0;D<i.length;D+=3)if(P=i[D],T=i[D+1],o<P?(f=0,v=1,S="left"):o<T?(f=o-P,v=f+1):(D==i.length-3||o==T&&i[D+3]>o)&&(v=T-P,f=v-1,o>=T&&(S="right")),f!=null){if(l=i[D+2],P==T&&u==(l.insertLeft?"left":"right")&&(S=u),u=="left"&&f==0)for(;D&&i[D-2]==i[D-3]&&i[D-1].insertLeft;)l=i[(D-=3)+2],S="left";if(u=="right"&&f==T-P)for(;D<i.length-3&&i[D+3]==i[D+4]&&!i[D+5].insertLeft;)l=i[(D+=3)+2],S="right";break}return{node:l,start:f,end:v,collapse:S,coverStart:P,coverEnd:T}}function wv(i,o){var u=mc;if(o=="left")for(var l=0;l<i.length&&(u=i[l]).left==u.right;l++);else for(var f=i.length-1;f>=0&&(u=i[f]).left==u.right;f--);return u}function Ov(i,o,u,l){var f=fo(o.map,u,l),v=f.node,S=f.start,P=f.end,T=f.collapse,D;if(v.nodeType==3){for(var oe=0;oe<4;oe++){for(;S&&mi(o.line.text.charAt(f.coverStart+S));)--S;for(;f.coverStart+P<f.coverEnd&&mi(o.line.text.charAt(f.coverStart+P));)++P;if(A&&O<9&&S==0&&P==f.coverEnd-f.coverStart?D=v.parentNode.getBoundingClientRect():D=wv(ue(v,S,P).getClientRects(),l),D.left||D.right||S==0)break;P=S,S=S-1,T="right"}A&&O<11&&(D=Np(i.display.measure,D))}else{S>0&&(T=l="right");var fe;i.options.lineWrapping&&(fe=v.getClientRects()).length>1?D=fe[l=="right"?fe.length-1:0]:D=v.getBoundingClientRect()}if(A&&O<9&&!S&&(!D||!D.left&&!D.right)){var we=v.parentNode.getClientRects()[0];we?D={left:we.left,right:we.left+Zo(i.display),top:we.top,bottom:we.bottom}:D=mc}for(var ge=D.top-o.rect.top,Ve=D.bottom-o.rect.top,Ie=(ge+Ve)/2,De=o.view.measure.heights,Ue=0;Ue<De.length-1&&!(Ie<De[Ue]);Ue++);var Ge=Ue?De[Ue-1]:0,We=De[Ue],Xe={left:(T=="right"?D.right:D.left)-o.rect.left,right:(T=="left"?D.left:D.right)-o.rect.left,top:Ge,bottom:We};return!D.left&&!D.right&&(Xe.bogus=!0),i.options.singleCursorHeightPerLine||(Xe.rtop=ge,Xe.rbottom=Ve),Xe}function Np(i,o){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rn(i))return o;var u=screen.logicalXDPI/screen.deviceXDPI,l=screen.logicalYDPI/screen.deviceYDPI;return{left:o.left*u,right:o.right*u,top:o.top*l,bottom:o.bottom*l}}function vc(i){if(i.measure&&(i.measure.cache={},i.measure.heights=null,i.rest))for(var o=0;o<i.rest.length;o++)i.measure.caches[o]={}}function Bp(i){i.display.externalMeasure=null,de(i.display.lineMeasure);for(var o=0;o<i.display.view.length;o++)vc(i.display.view[o])}function Xo(i){Bp(i),i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null,i.options.lineWrapping||(i.display.maxLineChanged=!0),i.display.lineNumChars=null}function $p(i){return K&&L?-(i.body.getBoundingClientRect().left-parseInt(getComputedStyle(i.body).marginLeft)):i.defaultView.pageXOffset||(i.documentElement||i.body).scrollLeft}function Up(i){return K&&L?-(i.body.getBoundingClientRect().top-parseInt(getComputedStyle(i.body).marginTop)):i.defaultView.pageYOffset||(i.documentElement||i.body).scrollTop}function Yl(i){var o=gi(i),u=o.widgets,l=0;if(u)for(var f=0;f<u.length;++f)u[f].above&&(l+=Ba(u[f]));return l}function Xl(i,o,u,l,f){if(!f){var v=Yl(o);u.top+=v,u.bottom+=v}if(l=="line")return u;l||(l="local");var S=us(o);if(l=="local"?S+=Yo(i.display):S-=i.display.viewOffset,l=="page"||l=="window"){var P=i.display.lineSpace.getBoundingClientRect();S+=P.top+(l=="window"?0:Up(Ye(i)));var T=P.left+(l=="window"?0:$p(Ye(i)));u.left+=T,u.right+=T}return u.top+=S,u.bottom+=S,u}function Wp(i,o,u){if(u=="div")return o;var l=o.left,f=o.top;if(u=="page")l-=$p(Ye(i)),f-=Up(Ye(i));else if(u=="local"||!u){var v=i.display.sizer.getBoundingClientRect();l+=v.left,f+=v.top}var S=i.display.lineSpace.getBoundingClientRect();return{left:l-S.left,top:f-S.top}}function Wa(i,o,u,l,f){return l||(l=rt(i.doc,o.line)),Xl(i,l,hc(i,l,o.ch,f),u)}function zr(i,o,u,l,f,v){l=l||rt(i.doc,o.line),f||(f=Fs(i,l));function S(Ve,Ie){var De=yi(i,f,Ve,Ie?"right":"left",v);return Ie?De.left=De.right:De.right=De.left,Xl(i,l,De,u)}var P=mt(l,i.doc.direction),T=o.ch,D=o.sticky;if(T>=l.text.length?(T=l.text.length,D="before"):T<=0&&(T=0,D="after"),!P)return S(D=="before"?T-1:T,D=="before");function oe(Ve,Ie,De){var Ue=P[Ie],Ge=Ue.level==1;return S(De?Ve-1:Ve,Ge!=De)}var fe=Ft(P,T,D),we=fr,ge=oe(T,fe,D=="before");return we!=null&&(ge.other=oe(T,we,D!="before")),ge}function Hp(i,o){var u=0;o=nt(i.doc,o),i.options.lineWrapping||(u=Zo(i.display)*o.ch);var l=rt(i.doc,o.line),f=us(l)+Yo(i.display);return{left:u,right:u,top:f,bottom:f+l.height}}function Ha(i,o,u,l,f){var v=F(i,o,u);return v.xRel=f,l&&(v.outside=l),v}function gc(i,o,u){var l=i.doc;if(u+=i.display.viewOffset,u<0)return Ha(l.first,0,null,-1,-1);var f=ls(l,u),v=l.first+l.size-1;if(f>v)return Ha(l.first+l.size-1,rt(l,v).text.length,null,1,1);o<0&&(o=0);for(var S=rt(l,f);;){var P=Ev(i,S,f,o,u),T=cv(S,P.ch+(P.xRel>0||P.outside>0?1:0));if(!T)return P;var D=T.find(1);if(D.line==f)return D;S=rt(l,f=D.line)}}function zp(i,o,u,l){l-=Yl(o);var f=o.text.length,v=mn(function(S){return yi(i,u,S-1).bottom<=l},f,0);return f=mn(function(S){return yi(i,u,S).top>l},v,f),{begin:v,end:f}}function Gp(i,o,u,l){u||(u=Fs(i,o));var f=Xl(i,o,yi(i,u,l),"line").top;return zp(i,o,u,f)}function za(i,o,u,l){return i.bottom<=u?!1:i.top>u?!0:(l?i.left:i.right)>o}function Ev(i,o,u,l,f){f-=us(o);var v=Fs(i,o),S=Yl(o),P=0,T=o.text.length,D=!0,oe=mt(o,i.doc.direction);if(oe){var fe=(i.options.lineWrapping?Cv:Av)(i,o,u,v,oe,l,f);D=fe.level!=1,P=D?fe.from:fe.to-1,T=D?fe.to:fe.from-1}var we=null,ge=null,Ve=mn(function(ct){var at=yi(i,v,ct);return at.top+=S,at.bottom+=S,za(at,l,f,!1)?(at.top<=f&&at.left<=l&&(we=ct,ge=at),!0):!1},P,T),Ie,De,Ue=!1;if(ge){var Ge=l-ge.left<ge.right-l,We=Ge==D;Ve=we+(We?0:1),De=We?"after":"before",Ie=Ge?ge.left:ge.right}else{!D&&(Ve==T||Ve==P)&&Ve++,De=Ve==0?"after":Ve==o.text.length?"before":yi(i,v,Ve-(D?1:0)).bottom+S<=f==D?"after":"before";var Xe=zr(i,F(u,Ve,De),"line",o,v);Ie=Xe.left,Ue=f<Xe.top?-1:f>=Xe.bottom?1:0}return Ve=jn(o.text,Ve,1),Ha(u,Ve,De,Ue,l-Ie)}function Av(i,o,u,l,f,v,S){var P=mn(function(fe){var we=f[fe],ge=we.level!=1;return za(zr(i,F(u,ge?we.to:we.from,ge?"before":"after"),"line",o,l),v,S,!0)},0,f.length-1),T=f[P];if(P>0){var D=T.level!=1,oe=zr(i,F(u,D?T.from:T.to,D?"after":"before"),"line",o,l);za(oe,v,S,!0)&&oe.top>S&&(T=f[P-1])}return T}function Cv(i,o,u,l,f,v,S){var P=zp(i,o,l,S),T=P.begin,D=P.end;/\s/.test(o.text.charAt(D-1))&&D--;for(var oe=null,fe=null,we=0;we<f.length;we++){var ge=f[we];if(!(ge.from>=D||ge.to<=T)){var Ve=ge.level!=1,Ie=yi(i,l,Ve?Math.min(D,ge.to)-1:Math.max(T,ge.from)).right,De=Ie<v?v-Ie+1e9:Ie-v;(!oe||fe>De)&&(oe=ge,fe=De)}}return oe||(oe=f[f.length-1]),oe.from<T&&(oe={from:T,to:oe.to,level:oe.level}),oe.to>D&&(oe={from:oe.from,to:D,level:oe.level}),oe}var Di;function Qo(i){if(i.cachedTextHeight!=null)return i.cachedTextHeight;if(Di==null){Di=Z("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)Di.appendChild(document.createTextNode("x")),Di.appendChild(Z("br"));Di.appendChild(document.createTextNode("x"))}Ae(i.measure,Di);var u=Di.offsetHeight/50;return u>3&&(i.cachedTextHeight=u),de(i.measure),u||1}function Zo(i){if(i.cachedCharWidth!=null)return i.cachedCharWidth;var o=Z("span","xxxxxxxxxx"),u=Z("pre",[o],"CodeMirror-line-like");Ae(i.measure,u);var l=o.getBoundingClientRect(),f=(l.right-l.left)/10;return f>2&&(i.cachedCharWidth=f),f||10}function yc(i){for(var o=i.display,u={},l={},f=o.gutters.clientLeft,v=o.gutters.firstChild,S=0;v;v=v.nextSibling,++S){var P=i.display.gutterSpecs[S].className;u[P]=v.offsetLeft+v.clientLeft+f,l[P]=v.clientWidth}return{fixedPos:bc(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:u,gutterWidth:l,wrapperWidth:o.wrapper.clientWidth}}function bc(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function Kp(i){var o=Qo(i.display),u=i.options.lineWrapping,l=u&&Math.max(5,i.display.scroller.clientWidth/Zo(i.display)-3);return function(f){if(Is(i.doc,f))return 0;var v=0;if(f.widgets)for(var S=0;S<f.widgets.length;S++)f.widgets[S].height&&(v+=f.widgets[S].height);return u?v+(Math.ceil(f.text.length/l)||1)*o:v+o}}function xc(i){var o=i.doc,u=Kp(i);o.iter(function(l){var f=u(l);f!=l.height&&zn(l,f)})}function po(i,o,u,l){var f=i.display;if(!u&&an(o).getAttribute("cm-not-content")=="true")return null;var v,S,P=f.lineSpace.getBoundingClientRect();try{v=o.clientX-P.left,S=o.clientY-P.top}catch(fe){return null}var T=gc(i,v,S),D;if(l&&T.xRel>0&&(D=rt(i.doc,T.line).text).length==T.ch){var oe=lt(D,D.length,i.options.tabSize)-D.length;T=F(T.line,Math.max(0,Math.round((v-$a(i.display).left)/Zo(i.display))-oe))}return T}function ho(i,o){if(o>=i.display.viewTo||(o-=i.display.viewFrom,o<0))return null;for(var u=i.display.view,l=0;l<u.length;l++)if(o-=u[l].size,o<0)return l}function Cn(i,o,u,l){o==null&&(o=i.doc.first),u==null&&(u=i.doc.first+i.doc.size),l||(l=0);var f=i.display;if(l&&u<f.viewTo&&(f.updateLineNumbers==null||f.updateLineNumbers>o)&&(f.updateLineNumbers=o),i.curOp.viewChanged=!0,o>=f.viewTo)Mi&&ac(i.doc,o)<f.viewTo&&Ls(i);else if(u<=f.viewFrom)Mi&&lc(i.doc,u+l)>f.viewFrom?Ls(i):(f.viewFrom+=l,f.viewTo+=l);else if(o<=f.viewFrom&&u>=f.viewTo)Ls(i);else if(o<=f.viewFrom){var v=cs(i,u,u+l,1);v?(f.view=f.view.slice(v.index),f.viewFrom=v.lineN,f.viewTo+=l):Ls(i)}else if(u>=f.viewTo){var S=cs(i,o,o,-1);S?(f.view=f.view.slice(0,S.index),f.viewTo=S.lineN):Ls(i)}else{var P=cs(i,o,o,-1),T=cs(i,u,u+l,1);P&&T?(f.view=f.view.slice(0,P.index).concat(Ma(i,P.lineN,T.lineN)).concat(f.view.slice(T.index)),f.viewTo+=l):Ls(i)}var D=f.externalMeasured;D&&(u<D.lineN?D.lineN+=l:o<D.lineN+D.size&&(f.externalMeasured=null))}function Ms(i,o,u){i.curOp.viewChanged=!0;var l=i.display,f=i.display.externalMeasured;if(f&&o>=f.lineN&&o<f.lineN+f.size&&(l.externalMeasured=null),!(o<l.viewFrom||o>=l.viewTo)){var v=l.view[ho(i,o)];if(v.node!=null){var S=v.changes||(v.changes=[]);Fe(S,u)==-1&&S.push(u)}}}function Ls(i){i.display.viewFrom=i.display.viewTo=i.doc.first,i.display.view=[],i.display.viewOffset=0}function cs(i,o,u,l){var f=ho(i,o),v,S=i.display.view;if(!Mi||u==i.doc.first+i.doc.size)return{index:f,lineN:u};for(var P=i.display.viewFrom,T=0;T<f;T++)P+=S[T].size;if(P!=o){if(l>0){if(f==S.length-1)return null;v=P+S[f].size-o,f++}else v=P-o;o+=v,u+=v}for(;ac(i.doc,u)!=u;){if(f==(l<0?0:S.length-1))return null;u+=l*S[f-(l<0?1:0)].size,f+=l}return{index:f,lineN:u}}function _v(i,o,u){var l=i.display,f=l.view;f.length==0||o>=l.viewTo||u<=l.viewFrom?(l.view=Ma(i,o,u),l.viewFrom=o):(l.viewFrom>o?l.view=Ma(i,o,l.viewFrom).concat(l.view):l.viewFrom<o&&(l.view=l.view.slice(ho(i,o))),l.viewFrom=o,l.viewTo<u?l.view=l.view.concat(Ma(i,l.viewTo,u)):l.viewTo>u&&(l.view=l.view.slice(0,ho(i,u)))),l.viewTo=u}function Sc(i){for(var o=i.display.view,u=0,l=0;l<o.length;l++){var f=o[l];!f.hidden&&(!f.node||f.changes)&&++u}return u}function Ds(i){i.display.input.showSelection(i.display.input.prepareSelection())}function wc(i,o){o===void 0&&(o=!0);var u=i.doc,l={},f=l.cursors=document.createDocumentFragment(),v=l.selection=document.createDocumentFragment(),S=i.options.$customCursor;S&&(o=!0);for(var P=0;P<u.sel.ranges.length;P++)if(!(!o&&P==u.sel.primIndex)){var T=u.sel.ranges[P];if(!(T.from().line>=i.display.viewTo||T.to().line<i.display.viewFrom)){var D=T.empty();if(S){var oe=S(i,T);oe&&Oc(i,oe,f)}else(D||i.options.showCursorWhenSelecting)&&Oc(i,T.head,f);D||qo(i,T,v)}}return l}function Oc(i,o,u){var l=zr(i,o,"div",null,null,!i.options.singleCursorHeightPerLine),f=u.appendChild(Z("div","\xA0","CodeMirror-cursor"));if(f.style.left=l.left+"px",f.style.top=l.top+"px",f.style.height=Math.max(0,l.bottom-l.top)*i.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(i.getWrapperElement().className)){var v=Wa(i,o,"div",null,null),S=v.right-v.left;f.style.width=(S>0?S:i.defaultCharWidth())+"px"}if(l.other){var P=u.appendChild(Z("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));P.style.display="",P.style.left=l.other.left+"px",P.style.top=l.other.top+"px",P.style.height=(l.other.bottom-l.other.top)*.85+"px"}}function Ql(i,o){return i.top-o.top||i.left-o.left}function qo(i,o,u){var l=i.display,f=i.doc,v=document.createDocumentFragment(),S=$a(i.display),P=S.left,T=Math.max(l.sizerWidth,Rs(i)-l.sizer.offsetLeft)-S.right,D=f.direction=="ltr";function oe(We,Xe,ct,at){Xe<0&&(Xe=0),Xe=Math.round(Xe),at=Math.round(at),v.appendChild(Z("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
18
18
  top: `+Xe+"px; width: "+(ct==null?T-We:ct)+`px;
19
- height: `+(at-Xe)+"px"))}function fe(We,Xe,ct){var at=rt(f,We),It=at.text.length,mr,Gr;function Cr(Br,Dn){return Wa(i,F(We,Br),"div",at,Dn)}function Ln(Br,Dn,pn){var $r=Gp(i,at,null,Br),Mr=Dn=="ltr"==(pn=="after")?"left":"right",vr=pn=="after"?$r.begin:$r.end-(/\s/.test(at.text.charAt($r.end-1))?2:1);return Cr(vr,Mr)[Mr]}var Pn=mt(at,f.direction);return vn(Pn,Xe||0,ct==null?It:ct,function(Br,Dn,pn,$r){var Mr=pn=="ltr",vr=Cr(Br,Mr?"left":"right"),Tn=Cr(Dn-1,Mr?"right":"left"),ya=Xe==null&&Br==0,Eo=ct==null&&Dn==It,bn=$r==0,oi=!Pn||$r==Pn.length-1;if(Tn.top-vr.top<=3){var Kr=(D?ya:Eo)&&bn,nf=(D?Eo:ya)&&oi,ys=Kr?P:(Mr?vr:Tn).left,Ao=nf?T:(Mr?Tn:vr).right;oe(ys,vr.top,Ao-ys,vr.bottom)}else{var Co,rn,ba,bs;Mr?(Co=D&&ya&&bn?P:vr.left,rn=D?T:Ln(Br,pn,"before"),ba=D?P:Ln(Dn,pn,"after"),bs=D&&Eo&&oi?T:Tn.right):(Co=D?Ln(Br,pn,"before"):P,rn=!D&&ya&&bn?T:vr.right,ba=!D&&Eo&&oi?P:Tn.left,bs=D?Ln(Dn,pn,"after"):T),oe(Co,vr.top,rn-Co,vr.bottom),vr.bottom<Tn.top&&oe(P,vr.bottom,null,Tn.top),oe(ba,Tn.top,bs-ba,Tn.bottom)}(!mr||Ql(vr,mr)<0)&&(mr=vr),Ql(Tn,mr)<0&&(mr=Tn),(!Gr||Ql(vr,Gr)<0)&&(Gr=vr),Ql(Tn,Gr)<0&&(Gr=Tn)}),{start:mr,end:Gr}}var we=o.from(),ge=o.to();if(we.line==ge.line)fe(we.line,we.ch,ge.ch);else{var Ve=rt(f,we.line),Ie=rt(f,ge.line),De=yi(Ve)==yi(Ie),Ue=fe(we.line,we.ch,De?Ve.text.length+1:null).end,Ge=fe(ge.line,De?0:null,ge.ch).start;De&&(Ue.top<Ge.top-2?(oe(Ue.right,Ue.top,null,Ue.bottom),oe(P,Ge.top,Ge.left,Ge.bottom)):oe(Ue.right,Ue.top,Ge.left-Ue.right,Ue.bottom)),Ue.bottom<Ge.top&&oe(P,Ue.bottom,null,Ge.top)}u.appendChild(v)}function Ga(i){if(i.state.focused){var o=i.display;clearInterval(o.blinker);var u=!0;o.cursorDiv.style.visibility="",i.options.cursorBlinkRate>0?o.blinker=setInterval(function(){i.hasFocus()||Ka(i),o.cursorDiv.style.visibility=(u=!u)?"":"hidden"},i.options.cursorBlinkRate):i.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}function Jp(i){i.hasFocus()||(i.display.input.focus(),i.state.focused||Ac(i))}function Ec(i){i.state.delayingBlurEvent=!0,setTimeout(function(){i.state.delayingBlurEvent&&(i.state.delayingBlurEvent=!1,i.state.focused&&Ka(i))},100)}function Ac(i,o){i.state.delayingBlurEvent&&!i.state.draggingText&&(i.state.delayingBlurEvent=!1),i.options.readOnly!="nocursor"&&(i.state.focused||(xt(i,"focus",i,o),i.state.focused=!0,Re(i.display.wrapper,"CodeMirror-focused"),!i.curOp&&i.display.selForContextMenu!=i.doc.sel&&(i.display.input.reset(),j&&setTimeout(function(){return i.display.input.reset(!0)},20)),i.display.input.receivedFocus()),Ga(i))}function Ka(i,o){i.state.delayingBlurEvent||(i.state.focused&&(xt(i,"blur",i,o),i.state.focused=!1,H(i.display.wrapper,"CodeMirror-focused")),clearInterval(i.display.blinker),setTimeout(function(){i.state.focused||(i.display.shift=!1)},150))}function Zl(i){for(var o=i.display,u=o.lineDiv.offsetTop,l=Math.max(0,o.scroller.getBoundingClientRect().top),f=o.lineDiv.getBoundingClientRect().top,v=0,S=0;S<o.view.length;S++){var P=o.view[S],T=i.options.lineWrapping,D=void 0,oe=0;if(!P.hidden){if(f+=P.line.height,A&&O<8){var fe=P.node.offsetTop+P.node.offsetHeight;D=fe-u,u=fe}else{var we=P.node.getBoundingClientRect();D=we.bottom-we.top,!T&&P.text.firstChild&&(oe=P.text.firstChild.getBoundingClientRect().right-we.left-1)}var ge=P.line.height-D;if((ge>.005||ge<-.005)&&(f<l&&(v-=ge),zn(P.line,D),ql(P.line),P.rest))for(var Ve=0;Ve<P.rest.length;Ve++)ql(P.rest[Ve]);if(oe>i.display.sizerWidth){var Ie=Math.ceil(oe/Zo(i.display));Ie>i.display.maxLineLength&&(i.display.maxLineLength=Ie,i.display.maxLine=P.line,i.display.maxLineChanged=!0)}}}Math.abs(v)>2&&(o.scroller.scrollTop+=v)}function ql(i){if(i.widgets)for(var o=0;o<i.widgets.length;++o){var u=i.widgets[o],l=u.node.parentNode;l&&(u.height=l.offsetHeight)}}function Ns(i,o,u){var l=u&&u.top!=null?Math.max(0,u.top):i.scroller.scrollTop;l=Math.floor(l-Yo(i));var f=u&&u.bottom!=null?u.bottom:l+i.wrapper.clientHeight,v=ls(o,l),S=ls(o,f);if(u&&u.ensure){var P=u.ensure.from.line,T=u.ensure.to.line;P<v?(v=P,S=ls(o,us(rt(o,P))+i.wrapper.clientHeight)):Math.min(T,o.lastLine())>=S&&(v=ls(o,us(rt(o,T))-i.wrapper.clientHeight),S=T)}return{from:v,to:Math.max(S,v+1)}}function Pv(i,o){if(!_t(i,"scrollCursorIntoView")){var u=i.display,l=u.sizer.getBoundingClientRect(),f=null,v=u.wrapper.ownerDocument;if(o.top+l.top<0?f=!0:o.bottom+l.top>(v.defaultView.innerHeight||v.documentElement.clientHeight)&&(f=!1),f!=null&&!V){var S=Z("div","\u200B",null,`position: absolute;
19
+ height: `+(at-Xe)+"px"))}function fe(We,Xe,ct){var at=rt(f,We),It=at.text.length,mr,Gr;function Cr(Br,Dn){return Wa(i,F(We,Br),"div",at,Dn)}function Ln(Br,Dn,pn){var $r=Gp(i,at,null,Br),Mr=Dn=="ltr"==(pn=="after")?"left":"right",vr=pn=="after"?$r.begin:$r.end-(/\s/.test(at.text.charAt($r.end-1))?2:1);return Cr(vr,Mr)[Mr]}var Pn=mt(at,f.direction);return vn(Pn,Xe||0,ct==null?It:ct,function(Br,Dn,pn,$r){var Mr=pn=="ltr",vr=Cr(Br,Mr?"left":"right"),Tn=Cr(Dn-1,Mr?"right":"left"),ya=Xe==null&&Br==0,Eo=ct==null&&Dn==It,bn=$r==0,oi=!Pn||$r==Pn.length-1;if(Tn.top-vr.top<=3){var Kr=(D?ya:Eo)&&bn,nf=(D?Eo:ya)&&oi,ys=Kr?P:(Mr?vr:Tn).left,Ao=nf?T:(Mr?Tn:vr).right;oe(ys,vr.top,Ao-ys,vr.bottom)}else{var Co,rn,ba,bs;Mr?(Co=D&&ya&&bn?P:vr.left,rn=D?T:Ln(Br,pn,"before"),ba=D?P:Ln(Dn,pn,"after"),bs=D&&Eo&&oi?T:Tn.right):(Co=D?Ln(Br,pn,"before"):P,rn=!D&&ya&&bn?T:vr.right,ba=!D&&Eo&&oi?P:Tn.left,bs=D?Ln(Dn,pn,"after"):T),oe(Co,vr.top,rn-Co,vr.bottom),vr.bottom<Tn.top&&oe(P,vr.bottom,null,Tn.top),oe(ba,Tn.top,bs-ba,Tn.bottom)}(!mr||Ql(vr,mr)<0)&&(mr=vr),Ql(Tn,mr)<0&&(mr=Tn),(!Gr||Ql(vr,Gr)<0)&&(Gr=vr),Ql(Tn,Gr)<0&&(Gr=Tn)}),{start:mr,end:Gr}}var we=o.from(),ge=o.to();if(we.line==ge.line)fe(we.line,we.ch,ge.ch);else{var Ve=rt(f,we.line),Ie=rt(f,ge.line),De=gi(Ve)==gi(Ie),Ue=fe(we.line,we.ch,De?Ve.text.length+1:null).end,Ge=fe(ge.line,De?0:null,ge.ch).start;De&&(Ue.top<Ge.top-2?(oe(Ue.right,Ue.top,null,Ue.bottom),oe(P,Ge.top,Ge.left,Ge.bottom)):oe(Ue.right,Ue.top,Ge.left-Ue.right,Ue.bottom)),Ue.bottom<Ge.top&&oe(P,Ue.bottom,null,Ge.top)}u.appendChild(v)}function Ga(i){if(i.state.focused){var o=i.display;clearInterval(o.blinker);var u=!0;o.cursorDiv.style.visibility="",i.options.cursorBlinkRate>0?o.blinker=setInterval(function(){i.hasFocus()||Ka(i),o.cursorDiv.style.visibility=(u=!u)?"":"hidden"},i.options.cursorBlinkRate):i.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}function Jp(i){i.hasFocus()||(i.display.input.focus(),i.state.focused||Ac(i))}function Ec(i){i.state.delayingBlurEvent=!0,setTimeout(function(){i.state.delayingBlurEvent&&(i.state.delayingBlurEvent=!1,i.state.focused&&Ka(i))},100)}function Ac(i,o){i.state.delayingBlurEvent&&!i.state.draggingText&&(i.state.delayingBlurEvent=!1),i.options.readOnly!="nocursor"&&(i.state.focused||(xt(i,"focus",i,o),i.state.focused=!0,Re(i.display.wrapper,"CodeMirror-focused"),!i.curOp&&i.display.selForContextMenu!=i.doc.sel&&(i.display.input.reset(),j&&setTimeout(function(){return i.display.input.reset(!0)},20)),i.display.input.receivedFocus()),Ga(i))}function Ka(i,o){i.state.delayingBlurEvent||(i.state.focused&&(xt(i,"blur",i,o),i.state.focused=!1,H(i.display.wrapper,"CodeMirror-focused")),clearInterval(i.display.blinker),setTimeout(function(){i.state.focused||(i.display.shift=!1)},150))}function Zl(i){for(var o=i.display,u=o.lineDiv.offsetTop,l=Math.max(0,o.scroller.getBoundingClientRect().top),f=o.lineDiv.getBoundingClientRect().top,v=0,S=0;S<o.view.length;S++){var P=o.view[S],T=i.options.lineWrapping,D=void 0,oe=0;if(!P.hidden){if(f+=P.line.height,A&&O<8){var fe=P.node.offsetTop+P.node.offsetHeight;D=fe-u,u=fe}else{var we=P.node.getBoundingClientRect();D=we.bottom-we.top,!T&&P.text.firstChild&&(oe=P.text.firstChild.getBoundingClientRect().right-we.left-1)}var ge=P.line.height-D;if((ge>.005||ge<-.005)&&(f<l&&(v-=ge),zn(P.line,D),ql(P.line),P.rest))for(var Ve=0;Ve<P.rest.length;Ve++)ql(P.rest[Ve]);if(oe>i.display.sizerWidth){var Ie=Math.ceil(oe/Zo(i.display));Ie>i.display.maxLineLength&&(i.display.maxLineLength=Ie,i.display.maxLine=P.line,i.display.maxLineChanged=!0)}}}Math.abs(v)>2&&(o.scroller.scrollTop+=v)}function ql(i){if(i.widgets)for(var o=0;o<i.widgets.length;++o){var u=i.widgets[o],l=u.node.parentNode;l&&(u.height=l.offsetHeight)}}function Ns(i,o,u){var l=u&&u.top!=null?Math.max(0,u.top):i.scroller.scrollTop;l=Math.floor(l-Yo(i));var f=u&&u.bottom!=null?u.bottom:l+i.wrapper.clientHeight,v=ls(o,l),S=ls(o,f);if(u&&u.ensure){var P=u.ensure.from.line,T=u.ensure.to.line;P<v?(v=P,S=ls(o,us(rt(o,P))+i.wrapper.clientHeight)):Math.min(T,o.lastLine())>=S&&(v=ls(o,us(rt(o,T))-i.wrapper.clientHeight),S=T)}return{from:v,to:Math.max(S,v+1)}}function Pv(i,o){if(!_t(i,"scrollCursorIntoView")){var u=i.display,l=u.sizer.getBoundingClientRect(),f=null,v=u.wrapper.ownerDocument;if(o.top+l.top<0?f=!0:o.bottom+l.top>(v.defaultView.innerHeight||v.documentElement.clientHeight)&&(f=!1),f!=null&&!V){var S=Z("div","\u200B",null,`position: absolute;
20
20
  top: `+(o.top-u.viewOffset-Yo(i.display))+`px;
21
21
  height: `+(o.bottom-o.top+Mn(i)+u.barHeight)+`px;
22
- left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");i.display.lineSpace.appendChild(S),S.scrollIntoView(f),i.display.lineSpace.removeChild(S)}}}function Tv(i,o,u,l){l==null&&(l=0);var f;!i.options.lineWrapping&&o==u&&(u=o.sticky=="before"?F(o.line,o.ch+1,"before"):o,o=o.ch?F(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var v=0;v<5;v++){var S=!1,P=zr(i,o),T=!u||u==o?P:zr(i,u);f={left:Math.min(P.left,T.left),top:Math.min(P.top,T.top)-l,right:Math.max(P.left,T.left),bottom:Math.max(P.bottom,T.bottom)+l};var D=Cc(i,f),oe=i.doc.scrollTop,fe=i.doc.scrollLeft;if(D.scrollTop!=null&&(ta(i,D.scrollTop),Math.abs(i.doc.scrollTop-oe)>1&&(S=!0)),D.scrollLeft!=null&&($s(i,D.scrollLeft),Math.abs(i.doc.scrollLeft-fe)>1&&(S=!0)),!S)break}return f}function Yp(i,o){var u=Cc(i,o);u.scrollTop!=null&&ta(i,u.scrollTop),u.scrollLeft!=null&&$s(i,u.scrollLeft)}function Cc(i,o){var u=i.display,l=Qo(i.display);o.top<0&&(o.top=0);var f=i.curOp&&i.curOp.scrollTop!=null?i.curOp.scrollTop:u.scroller.scrollTop,v=Kl(i),S={};o.bottom-o.top>v&&(o.bottom=o.top+v);var P=i.doc.height+dc(u),T=o.top<l,D=o.bottom>P-l;if(o.top<f)S.scrollTop=T?0:o.top;else if(o.bottom>f+v){var oe=Math.min(o.top,(D?P:o.bottom)-v);oe!=f&&(S.scrollTop=oe)}var fe=i.options.fixedGutter?0:u.gutters.offsetWidth,we=i.curOp&&i.curOp.scrollLeft!=null?i.curOp.scrollLeft:u.scroller.scrollLeft-fe,ge=Rs(i)-u.gutters.offsetWidth,Ve=o.right-o.left>ge;return Ve&&(o.right=o.left+ge),o.left<10?S.scrollLeft=0:o.left<we?S.scrollLeft=Math.max(0,o.left+fe-(Ve?0:10)):o.right>ge+we-3&&(S.scrollLeft=o.right+(Ve?0:10)-ge),S}function eu(i,o){o!=null&&(tu(i),i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+o)}function Bs(i){tu(i);var o=i.getCursor();i.curOp.scrollToPos={from:o,to:o,margin:i.options.cursorScrollMargin}}function ea(i,o,u){(o!=null||u!=null)&&tu(i),o!=null&&(i.curOp.scrollLeft=o),u!=null&&(i.curOp.scrollTop=u)}function Vv(i,o){tu(i),i.curOp.scrollToPos=o}function tu(i){var o=i.curOp.scrollToPos;if(o){i.curOp.scrollToPos=null;var u=Hp(i,o.from),l=Hp(i,o.to);_c(i,u,l,o.margin)}}function _c(i,o,u,l){var f=Cc(i,{left:Math.min(o.left,u.left),top:Math.min(o.top,u.top)-l,right:Math.max(o.right,u.right),bottom:Math.max(o.bottom,u.bottom)+l});ea(i,f.scrollLeft,f.scrollTop)}function ta(i,o){Math.abs(i.doc.scrollTop-o)<2||(m||iu(i,{top:o}),Xp(i,o,!0),m&&iu(i),Ja(i,100))}function Xp(i,o,u){o=Math.max(0,Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,o)),!(i.display.scroller.scrollTop==o&&!u)&&(i.doc.scrollTop=o,i.display.scrollbars.setScrollTop(o),i.display.scroller.scrollTop!=o&&(i.display.scroller.scrollTop=o))}function $s(i,o,u,l){o=Math.max(0,Math.min(o,i.display.scroller.scrollWidth-i.display.scroller.clientWidth)),!((u?o==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-o)<2)&&!l)&&(i.doc.scrollLeft=o,ed(i),i.display.scroller.scrollLeft!=o&&(i.display.scroller.scrollLeft=o),i.display.scrollbars.setScrollLeft(o))}function ra(i){var o=i.display,u=o.gutters.offsetWidth,l=Math.round(i.doc.height+dc(i.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:i.options.fixedGutter?u:0,docHeight:l,scrollHeight:l+Mn(i)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:u}}var mo=function(i,o,u){this.cm=u;var l=this.vert=Z("div",[Z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),f=this.horiz=Z("div",[Z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=f.tabIndex=-1,i(l),i(f),pe(l,"scroll",function(){l.clientHeight&&o(l.scrollTop,"vertical")}),pe(f,"scroll",function(){f.clientWidth&&o(f.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,A&&O<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mo.prototype.update=function(i){var o=i.scrollWidth>i.clientWidth+1,u=i.scrollHeight>i.clientHeight+1,l=i.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=o?l+"px":"0";var f=i.viewHeight-(o?l:0);this.vert.firstChild.style.height=Math.max(0,i.scrollHeight-i.clientHeight+f)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=u?l+"px":"0",this.horiz.style.left=i.barLeft+"px";var v=i.viewWidth-i.barLeft-(u?l:0);this.horiz.firstChild.style.width=Math.max(0,i.scrollWidth-i.clientWidth+v)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&i.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?l:0,bottom:o?l:0}},mo.prototype.setScrollLeft=function(i){this.horiz.scrollLeft!=i&&(this.horiz.scrollLeft=i),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mo.prototype.setScrollTop=function(i){this.vert.scrollTop!=i&&(this.vert.scrollTop=i),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mo.prototype.zeroWidthHack=function(){var i=N&&!q?"12px":"18px";this.horiz.style.height=this.vert.style.width=i,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ke,this.disableVert=new Ke},mo.prototype.enableZeroWidthBar=function(i,o,u){i.style.visibility="";function l(){var f=i.getBoundingClientRect(),v=u=="vert"?document.elementFromPoint(f.right-1,(f.top+f.bottom)/2):document.elementFromPoint((f.right+f.left)/2,f.bottom-1);v!=i?i.style.visibility="hidden":o.set(1e3,l)}o.set(1e3,l)},mo.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz),i.removeChild(this.vert)};var na=function(){};na.prototype.update=function(){return{bottom:0,right:0}},na.prototype.setScrollLeft=function(){},na.prototype.setScrollTop=function(){},na.prototype.clear=function(){};function vo(i,o){o||(o=ra(i));var u=i.display.barWidth,l=i.display.barHeight;ru(i,o);for(var f=0;f<4&&u!=i.display.barWidth||l!=i.display.barHeight;f++)u!=i.display.barWidth&&i.options.lineWrapping&&Zl(i),ru(i,ra(i)),u=i.display.barWidth,l=i.display.barHeight}function ru(i,o){var u=i.display,l=u.scrollbars.update(o);u.sizer.style.paddingRight=(u.barWidth=l.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=l.bottom)+"px",u.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=l.bottom+"px",u.scrollbarFiller.style.width=l.right+"px"):u.scrollbarFiller.style.display="",l.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=l.bottom+"px",u.gutterFiller.style.width=o.gutterWidth+"px"):u.gutterFiller.style.display=""}var Pc={native:mo,null:na};function Qp(i){i.display.scrollbars&&(i.display.scrollbars.clear(),i.display.scrollbars.addClass&&H(i.display.wrapper,i.display.scrollbars.addClass)),i.display.scrollbars=new Pc[i.options.scrollbarStyle](function(o){i.display.wrapper.insertBefore(o,i.display.scrollbarFiller),pe(o,"mousedown",function(){i.state.focused&&setTimeout(function(){return i.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,u){u=="horizontal"?$s(i,o):ta(i,o)},i),i.display.scrollbars.addClass&&Re(i.display.wrapper,i.display.scrollbars.addClass)}var kv=0;function Bi(i){i.curOp={cm:i,viewChanged:!1,startHeight:i.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:++kv,markArrays:null},Gl(i.curOp)}function fs(i){var o=i.curOp;o&&yv(o,function(u){for(var l=0;l<u.ops.length;l++)u.ops[l].cm.curOp=null;Kn(u)})}function Kn(i){for(var o=i.ops,u=0;u<o.length;u++)Tc(o[u]);for(var l=0;l<o.length;l++)ps(o[l]);for(var f=0;f<o.length;f++)Zp(o[f]);for(var v=0;v<o.length;v++)qp(o[v]);for(var S=0;S<o.length;S++)n0(o[S])}function Tc(i){var o=i.cm,u=o.display;Ya(o),i.updateMaxLine&&zl(o),i.mustUpdate=i.viewChanged||i.forceUpdate||i.scrollTop!=null||i.scrollToPos&&(i.scrollToPos.from.line<u.viewFrom||i.scrollToPos.to.line>=u.viewTo)||u.maxLineChanged&&o.options.lineWrapping,i.update=i.mustUpdate&&new nu(o,i.mustUpdate&&{top:i.scrollTop,ensure:i.scrollToPos},i.forceUpdate)}function ps(i){i.updatedDisplay=i.mustUpdate&&Vc(i.cm,i.update)}function Zp(i){var o=i.cm,u=o.display;i.updatedDisplay&&Zl(o),i.barMeasure=ra(o),u.maxLineChanged&&!o.options.lineWrapping&&(i.adjustWidthTo=hc(o,u.maxLine,u.maxLine.text.length).left+3,o.display.sizerWidth=i.adjustWidthTo,i.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+i.adjustWidthTo+Mn(o)+o.display.barWidth),i.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+i.adjustWidthTo-Rs(o))),(i.updatedDisplay||i.selectionChanged)&&(i.preparedSelection=u.input.prepareSelection())}function qp(i){var o=i.cm;i.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=i.adjustWidthTo+"px",i.maxScrollLeft<o.doc.scrollLeft&&$s(o,Math.min(o.display.scroller.scrollLeft,i.maxScrollLeft),!0),o.display.maxLineChanged=!1);var u=i.focus&&i.focus==He(Ye(o));i.preparedSelection&&o.display.input.showSelection(i.preparedSelection,u),(i.updatedDisplay||i.startHeight!=o.doc.height)&&vo(o,i.barMeasure),i.updatedDisplay&&kc(o,i.barMeasure),i.selectionChanged&&Ga(o),o.state.focused&&i.updateInput&&o.display.input.reset(i.typing),u&&Jp(i.cm)}function n0(i){var o=i.cm,u=o.display,l=o.doc;if(i.updatedDisplay&&Xa(o,i.update),u.wheelStartX!=null&&(i.scrollTop!=null||i.scrollLeft!=null||i.scrollToPos)&&(u.wheelStartX=u.wheelStartY=null),i.scrollTop!=null&&Xp(o,i.scrollTop,i.forceScroll),i.scrollLeft!=null&&$s(o,i.scrollLeft,!0,!0),i.scrollToPos){var f=Tv(o,nt(l,i.scrollToPos.from),nt(l,i.scrollToPos.to),i.scrollToPos.margin);Pv(o,f)}var v=i.maybeHiddenMarkers,S=i.maybeUnhiddenMarkers;if(v)for(var P=0;P<v.length;++P)v[P].lines.length||xt(v[P],"hide");if(S)for(var T=0;T<S.length;++T)S[T].lines.length&&xt(S[T],"unhide");u.wrapper.offsetHeight&&(l.scrollTop=o.display.scroller.scrollTop),i.changeObjs&&xt(o,"changes",o,i.changeObjs),i.update&&i.update.finish()}function yn(i,o){if(i.curOp)return o();Bi(i);try{return o()}finally{fs(i)}}function Nr(i,o){return function(){if(i.curOp)return o.apply(i,arguments);Bi(i);try{return o.apply(i,arguments)}finally{fs(i)}}}function cn(i){return function(){if(this.curOp)return i.apply(this,arguments);Bi(this);try{return i.apply(this,arguments)}finally{fs(this)}}}function Mt(i){return function(){var o=this.cm;if(!o||o.curOp)return i.apply(this,arguments);Bi(o);try{return i.apply(this,arguments)}finally{fs(o)}}}function Ja(i,o){i.doc.highlightFrontier<i.display.viewTo&&i.state.highlight.set(o,ut(ia,i))}function ia(i){var o=i.doc;if(!(o.highlightFrontier>=i.display.viewTo)){var u=+new Date+i.options.workTime,l=zo(i,o.highlightFrontier),f=[];o.iter(l.line,Math.min(o.first+o.size,i.display.viewTo+500),function(v){if(l.line>=i.display.viewFrom){var S=v.styles,P=v.text.length>i.options.maxHighlightLength?ri(o.mode,l.state):null,T=nc(i,v,l,!0);P&&(l.state=P),v.styles=T.styles;var D=v.styleClasses,oe=T.classes;oe?v.styleClasses=oe:D&&(v.styleClasses=null);for(var fe=!S||S.length!=v.styles.length||D!=oe&&(!D||!oe||D.bgClass!=oe.bgClass||D.textClass!=oe.textClass),we=0;!fe&&we<S.length;++we)fe=S[we]!=v.styles[we];fe&&f.push(l.line),v.stateAfter=l.save(),l.nextLine()}else v.text.length<=i.options.maxHighlightLength&&ni(i,v.text,l),v.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>u)return Ja(i,i.options.workDelay),!0}),o.highlightFrontier=l.line,o.modeFrontier=Math.max(o.modeFrontier,l.line),f.length&&yn(i,function(){for(var v=0;v<f.length;v++)Ms(i,f[v],"text")})}}var nu=function(i,o,u){var l=i.display;this.viewport=o,this.visible=Ns(l,i.doc,o),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Rs(i),this.force=u,this.dims=yc(i),this.events=[]};nu.prototype.signal=function(i,o){Sr(i,o)&&this.events.push(arguments)},nu.prototype.finish=function(){for(var i=0;i<this.events.length;i++)xt.apply(null,this.events[i])};function Ya(i){var o=i.display;!o.scrollbarsClipped&&o.scroller.offsetWidth&&(o.nativeBarWidth=o.scroller.offsetWidth-o.scroller.clientWidth,o.heightForcer.style.height=Mn(i)+"px",o.sizer.style.marginBottom=-o.nativeBarWidth+"px",o.sizer.style.borderRightWidth=Mn(i)+"px",o.scrollbarsClipped=!0)}function go(i){if(i.hasFocus())return null;var o=He(Ye(i));if(!o||!Ne(i.display.lineDiv,o))return null;var u={activeElt:o};if(window.getSelection){var l=gt(i).getSelection();l.anchorNode&&l.extend&&Ne(i.display.lineDiv,l.anchorNode)&&(u.anchorNode=l.anchorNode,u.anchorOffset=l.anchorOffset,u.focusNode=l.focusNode,u.focusOffset=l.focusOffset)}return u}function Us(i){if(!(!i||!i.activeElt||i.activeElt==He(i.activeElt.ownerDocument))&&(i.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(i.activeElt.nodeName)&&i.anchorNode&&Ne(document.body,i.anchorNode)&&Ne(document.body,i.focusNode))){var o=i.activeElt.ownerDocument,u=o.defaultView.getSelection(),l=o.createRange();l.setEnd(i.anchorNode,i.anchorOffset),l.collapse(!1),u.removeAllRanges(),u.addRange(l),u.extend(i.focusNode,i.focusOffset)}}function Vc(i,o){var u=i.display,l=i.doc;if(o.editorIsHidden)return Ls(i),!1;if(!o.force&&o.visible.from>=u.viewFrom&&o.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&Sc(i)==0)return!1;td(i)&&(Ls(i),o.dims=yc(i));var f=l.first+l.size,v=Math.max(o.visible.from-i.options.viewportMargin,l.first),S=Math.min(f,o.visible.to+i.options.viewportMargin);u.viewFrom<v&&v-u.viewFrom<20&&(v=Math.max(l.first,u.viewFrom)),u.viewTo>S&&u.viewTo-S<20&&(S=Math.min(f,u.viewTo)),Li&&(v=ac(i.doc,v),S=lc(i.doc,S));var P=v!=u.viewFrom||S!=u.viewTo||u.lastWrapHeight!=o.wrapperHeight||u.lastWrapWidth!=o.wrapperWidth;_v(i,v,S),u.viewOffset=us(rt(i.doc,u.viewFrom)),i.display.mover.style.top=u.viewOffset+"px";var T=Sc(i);if(!P&&T==0&&!o.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var D=go(i);return T>4&&(u.lineDiv.style.display="none"),Qa(i,u.updateLineNumbers,o.dims),T>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,Us(D),de(u.cursorDiv),de(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,P&&(u.lastWrapHeight=o.wrapperHeight,u.lastWrapWidth=o.wrapperWidth,Ja(i,400)),u.updateLineNumbers=null,!0}function Xa(i,o){for(var u=o.viewport,l=!0;;l=!1){if(!l||!i.options.lineWrapping||o.oldDisplayWidth==Rs(i)){if(u&&u.top!=null&&(u={top:Math.min(i.doc.height+dc(i.display)-Kl(i),u.top)}),o.visible=Ns(i.display,i.doc,u),o.visible.from>=i.display.viewFrom&&o.visible.to<=i.display.viewTo)break}else l&&(o.visible=Ns(i.display,i.doc,u));if(!Vc(i,o))break;Zl(i);var f=ra(i);Ds(i),vo(i,f),kc(i,f),o.force=!1}o.signal(i,"update",i),(i.display.viewFrom!=i.display.reportedViewFrom||i.display.viewTo!=i.display.reportedViewTo)&&(o.signal(i,"viewportChange",i,i.display.viewFrom,i.display.viewTo),i.display.reportedViewFrom=i.display.viewFrom,i.display.reportedViewTo=i.display.viewTo)}function iu(i,o){var u=new nu(i,o);if(Vc(i,u)){Zl(i),Xa(i,u);var l=ra(i);Ds(i),vo(i,l),kc(i,l),u.finish()}}function Qa(i,o,u){var l=i.display,f=i.options.lineNumbers,v=l.lineDiv,S=v.firstChild;function P(Ve){var Ie=Ve.nextSibling;return j&&N&&i.display.currentWheelTarget==Ve?Ve.style.display="none":Ve.parentNode.removeChild(Ve),Ie}for(var T=l.view,D=l.viewFrom,oe=0;oe<T.length;oe++){var fe=T[oe];if(!fe.hidden)if(!fe.node||fe.node.parentNode!=v){var we=xv(i,fe,D,u);v.insertBefore(we,S)}else{for(;S!=fe.node;)S=P(S);var ge=f&&o!=null&&o<=D&&fe.lineNumber;fe.changes&&(Fe(fe.changes,"gutter")>-1&&(ge=!1),pc(i,fe,D,u)),ge&&(de(fe.lineNumber),fe.lineNumber.appendChild(document.createTextNode(lo(i.options,D)))),S=fe.node.nextSibling}D+=fe.size}for(;S;)S=P(S)}function Za(i){var o=i.gutters.offsetWidth;i.sizer.style.marginLeft=o+"px",Hr(i,"gutterChanged",i)}function kc(i,o){i.display.sizer.style.minHeight=o.docHeight+"px",i.display.heightForcer.style.top=o.docHeight+"px",i.display.gutters.style.height=o.docHeight+i.display.barHeight+Mn(i)+"px"}function ed(i){var o=i.display,u=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!i.options.fixedGutter))){for(var l=bc(o)-o.scroller.scrollLeft+i.doc.scrollLeft,f=o.gutters.offsetWidth,v=l+"px",S=0;S<u.length;S++)if(!u[S].hidden){i.options.fixedGutter&&(u[S].gutter&&(u[S].gutter.style.left=v),u[S].gutterBackground&&(u[S].gutterBackground.style.left=v));var P=u[S].alignable;if(P)for(var T=0;T<P.length;T++)P[T].style.left=v}i.options.fixedGutter&&(o.gutters.style.left=l+f+"px")}}function td(i){if(!i.options.lineNumbers)return!1;var o=i.doc,u=lo(i.options,o.first+o.size-1),l=i.display;if(u.length!=l.lineNumChars){var f=l.measure.appendChild(Z("div",[Z("div",u)],"CodeMirror-linenumber CodeMirror-gutter-elt")),v=f.firstChild.offsetWidth,S=f.offsetWidth-v;return l.lineGutter.style.width="",l.lineNumInnerWidth=Math.max(v,l.lineGutter.offsetWidth-S)+1,l.lineNumWidth=l.lineNumInnerWidth+S,l.lineNumChars=l.lineNumInnerWidth?u.length:-1,l.lineGutter.style.width=l.lineNumWidth+"px",Za(i.display),!0}return!1}function jc(i,o){for(var u=[],l=!1,f=0;f<i.length;f++){var v=i[f],S=null;if(typeof v!="string"&&(S=v.style,v=v.className),v=="CodeMirror-linenumbers")if(o)l=!0;else continue;u.push({className:v,style:S})}return o&&!l&&u.push({className:"CodeMirror-linenumbers",style:null}),u}function rd(i){var o=i.gutters,u=i.gutterSpecs;de(o),i.lineGutter=null;for(var l=0;l<u.length;++l){var f=u[l],v=f.className,S=f.style,P=o.appendChild(Z("div",null,"CodeMirror-gutter "+v));S&&(P.style.cssText=S),v=="CodeMirror-linenumbers"&&(i.lineGutter=P,P.style.width=(i.lineNumWidth||1)+"px")}o.style.display=u.length?"":"none",Za(i)}function qa(i){rd(i.display),Cn(i),ed(i)}function jv(i,o,u,l){var f=this;this.input=u,f.scrollbarFiller=Z("div",null,"CodeMirror-scrollbar-filler"),f.scrollbarFiller.setAttribute("cm-not-content","true"),f.gutterFiller=Z("div",null,"CodeMirror-gutter-filler"),f.gutterFiller.setAttribute("cm-not-content","true"),f.lineDiv=xe("div",null,"CodeMirror-code"),f.selectionDiv=Z("div",null,null,"position: relative; z-index: 1"),f.cursorDiv=Z("div",null,"CodeMirror-cursors"),f.measure=Z("div",null,"CodeMirror-measure"),f.lineMeasure=Z("div",null,"CodeMirror-measure"),f.lineSpace=xe("div",[f.measure,f.lineMeasure,f.selectionDiv,f.cursorDiv,f.lineDiv],null,"position: relative; outline: none");var v=xe("div",[f.lineSpace],"CodeMirror-lines");f.mover=Z("div",[v],null,"position: relative"),f.sizer=Z("div",[f.mover],"CodeMirror-sizer"),f.sizerWidth=null,f.heightForcer=Z("div",null,null,"position: absolute; height: "+qe+"px; width: 1px;"),f.gutters=Z("div",null,"CodeMirror-gutters"),f.lineGutter=null,f.scroller=Z("div",[f.sizer,f.heightForcer,f.gutters],"CodeMirror-scroll"),f.scroller.setAttribute("tabIndex","-1"),f.wrapper=Z("div",[f.scrollbarFiller,f.gutterFiller,f.scroller],"CodeMirror"),K&&ie>=105&&(f.wrapper.style.clipPath="inset(0px)"),f.wrapper.setAttribute("translate","no"),A&&O<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),!j&&!(m&&E)&&(f.scroller.draggable=!0),i&&(i.appendChild?i.appendChild(f.wrapper):i(f.wrapper)),f.viewFrom=f.viewTo=o.first,f.reportedViewFrom=f.reportedViewTo=o.first,f.view=[],f.renderedView=null,f.externalMeasured=null,f.viewOffset=0,f.lastWrapHeight=f.lastWrapWidth=0,f.updateLineNumbers=null,f.nativeBarWidth=f.barHeight=f.barWidth=0,f.scrollbarsClipped=!1,f.lineNumWidth=f.lineNumInnerWidth=f.lineNumChars=null,f.alignWidgets=!1,f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.maxLine=null,f.maxLineLength=0,f.maxLineChanged=!1,f.wheelDX=f.wheelDY=f.wheelStartX=f.wheelStartY=null,f.shift=!1,f.selForContextMenu=null,f.activeTouch=null,f.gutterSpecs=jc(l.gutters,l.lineNumbers),rd(f),u.init(f)}var sa=0,xi=null;A?xi=-.53:m?xi=15:K?xi=-.7:ae&&(xi=-1/3);function nd(i){var o=i.wheelDeltaX,u=i.wheelDeltaY;return o==null&&i.detail&&i.axis==i.HORIZONTAL_AXIS&&(o=i.detail),u==null&&i.detail&&i.axis==i.VERTICAL_AXIS?u=i.detail:u==null&&(u=i.wheelDelta),{x:o,y:u}}function i0(i){var o=nd(i);return o.x*=xi,o.y*=xi,o}function id(i,o){K&&ie==102&&(i.display.chromeScrollHack==null?i.display.sizer.style.pointerEvents="none":clearTimeout(i.display.chromeScrollHack),i.display.chromeScrollHack=setTimeout(function(){i.display.chromeScrollHack=null,i.display.sizer.style.pointerEvents=""},100));var u=nd(o),l=u.x,f=u.y,v=xi;o.deltaMode===0&&(l=o.deltaX,f=o.deltaY,v=1);var S=i.display,P=S.scroller,T=P.scrollWidth>P.clientWidth,D=P.scrollHeight>P.clientHeight;if(l&&T||f&&D){if(f&&N&&j){e:for(var oe=o.target,fe=S.view;oe!=P;oe=oe.parentNode)for(var we=0;we<fe.length;we++)if(fe[we].node==oe){i.display.currentWheelTarget=oe;break e}}if(l&&!m&&!ee&&v!=null){f&&D&&ta(i,Math.max(0,P.scrollTop+f*v)),$s(i,Math.max(0,P.scrollLeft+l*v)),(!f||f&&D)&&Xt(o),S.wheelStartX=null;return}if(f&&v!=null){var ge=f*v,Ve=i.doc.scrollTop,Ie=Ve+S.wrapper.clientHeight;ge<0?Ve=Math.max(0,Ve+ge-50):Ie=Math.min(i.doc.height,Ie+ge+50),iu(i,{top:Ve,bottom:Ie})}sa<20&&o.deltaMode!==0&&(S.wheelStartX==null?(S.wheelStartX=P.scrollLeft,S.wheelStartY=P.scrollTop,S.wheelDX=l,S.wheelDY=f,setTimeout(function(){if(S.wheelStartX!=null){var De=P.scrollLeft-S.wheelStartX,Ue=P.scrollTop-S.wheelStartY,Ge=Ue&&S.wheelDY&&Ue/S.wheelDY||De&&S.wheelDX&&De/S.wheelDX;S.wheelStartX=S.wheelStartY=null,Ge&&(xi=(xi*sa+Ge)/(sa+1),++sa)}},200)):(S.wheelDX+=l,S.wheelDY+=f))}}var Jn=function(i,o){this.ranges=i,this.primIndex=o};Jn.prototype.primary=function(){return this.ranges[this.primIndex]},Jn.prototype.equals=function(i){if(i==this)return!0;if(i.primIndex!=this.primIndex||i.ranges.length!=this.ranges.length)return!1;for(var o=0;o<this.ranges.length;o++){var u=this.ranges[o],l=i.ranges[o];if(!je(u.anchor,l.anchor)||!je(u.head,l.head))return!1}return!0},Jn.prototype.deepCopy=function(){for(var i=[],o=0;o<this.ranges.length;o++)i[o]=new it(Le(this.ranges[o].anchor),Le(this.ranges[o].head));return new Jn(i,this.primIndex)},Jn.prototype.somethingSelected=function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},Jn.prototype.contains=function(i,o){o||(o=i);for(var u=0;u<this.ranges.length;u++){var l=this.ranges[u];if(re(o,l.from())>=0&&re(i,l.to())<=0)return u}return-1};var it=function(i,o){this.anchor=i,this.head=o};it.prototype.from=function(){return jt(this.anchor,this.head)},it.prototype.to=function(){return St(this.anchor,this.head)},it.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Si(i,o,u){var l=i&&i.options.selectionsMayTouch,f=o[u];o.sort(function(we,ge){return re(we.from(),ge.from())}),u=Fe(o,f);for(var v=1;v<o.length;v++){var S=o[v],P=o[v-1],T=re(P.to(),S.from());if(l&&!S.empty()?T>0:T>=0){var D=jt(P.from(),S.from()),oe=St(P.to(),S.to()),fe=P.empty()?S.from()==S.head:P.from()==P.head;v<=u&&--u,o.splice(--v,2,new it(fe?oe:D,fe?D:oe))}}return new Jn(o,u)}function ds(i,o){return new Jn([new it(i,o||i)],0)}function Ws(i){return i.text?F(i.from.line+i.text.length-1,ht(i.text).length+(i.text.length==1?i.from.ch:0)):i.to}function el(i,o){if(re(i,o.from)<0)return i;if(re(i,o.to)<=0)return Ws(o);var u=i.line+o.text.length-(o.to.line-o.from.line)-1,l=i.ch;return i.line==o.to.line&&(l+=Ws(o).ch-o.to.ch),F(u,l)}function Ic(i,o){for(var u=[],l=0;l<i.sel.ranges.length;l++){var f=i.sel.ranges[l];u.push(new it(el(f.anchor,o),el(f.head,o)))}return Si(i.cm,u,i.sel.primIndex)}function sd(i,o,u){return i.line==o.line?F(u.line,i.ch-o.ch+u.ch):F(u.line+(i.line-o.line),i.ch)}function Iv(i,o,u){for(var l=[],f=F(i.first,0),v=f,S=0;S<o.length;S++){var P=o[S],T=sd(P.from,f,v),D=sd(Ws(P),f,v);if(f=P.to,v=D,u=="around"){var oe=i.sel.ranges[S],fe=re(oe.head,oe.anchor)<0;l[S]=new it(fe?D:T,fe?T:D)}else l[S]=new it(T,T)}return new Jn(l,i.sel.primIndex)}function Rc(i){i.doc.mode=An(i.options,i.doc.modeOption),tl(i)}function tl(i){i.doc.iter(function(o){o.stateAfter&&(o.stateAfter=null),o.styles&&(o.styles=null)}),i.doc.modeFrontier=i.doc.highlightFrontier=i.doc.first,Ja(i,100),i.state.modeGen++,i.curOp&&Cn(i)}function od(i,o){return o.from.ch==0&&o.to.ch==0&&ht(o.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function su(i,o,u,l){function f(Ge){return u?u[Ge]:null}function v(Ge,We,Xe){Cp(Ge,We,Xe,l),Hr(Ge,"change",Ge,o)}function S(Ge,We){for(var Xe=[],ct=Ge;ct<We;++ct)Xe.push(new co(D[ct],f(ct),l));return Xe}var P=o.from,T=o.to,D=o.text,oe=rt(i,P.line),fe=rt(i,T.line),we=ht(D),ge=f(D.length-1),Ve=T.line-P.line;if(o.full)i.insert(0,S(0,D.length)),i.remove(D.length,i.size-D.length);else if(od(i,o)){var Ie=S(0,D.length-1);v(fe,fe.text,ge),Ve&&i.remove(P.line,Ve),Ie.length&&i.insert(P.line,Ie)}else if(oe==fe)if(D.length==1)v(oe,oe.text.slice(0,P.ch)+we+oe.text.slice(T.ch),ge);else{var De=S(1,D.length-1);De.push(new co(we+oe.text.slice(T.ch),ge,l)),v(oe,oe.text.slice(0,P.ch)+D[0],f(0)),i.insert(P.line+1,De)}else if(D.length==1)v(oe,oe.text.slice(0,P.ch)+D[0]+fe.text.slice(T.ch),f(0)),i.remove(P.line+1,Ve);else{v(oe,oe.text.slice(0,P.ch)+D[0],f(0)),v(fe,we+fe.text.slice(T.ch),ge);var Ue=S(1,D.length-1);Ve>1&&i.remove(P.line+1,Ve-1),i.insert(P.line+1,Ue)}Hr(i,"change",i,o)}function $i(i,o,u){function l(f,v,S){if(f.linked)for(var P=0;P<f.linked.length;++P){var T=f.linked[P];if(T.doc!=v){var D=S&&T.sharedHist;u&&!D||(o(T.doc,D),l(T.doc,f,D))}}}l(i,null,!0)}function ou(i,o){if(o.cm)throw new Error("This document is already in use.");i.doc=o,o.cm=i,xc(i),Rc(i),ad(i),i.options.direction=o.direction,i.options.lineWrapping||zl(i),i.options.mode=o.modeOption,Cn(i)}function ad(i){(i.doc.direction=="rtl"?Re:H)(i.display.lineDiv,"CodeMirror-rtl")}function Rv(i){yn(i,function(){ad(i),Cn(i)})}function au(i){this.done=[],this.undone=[],this.undoDepth=i?i.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=i?i.maxGeneration:1}function lu(i,o){var u={from:Le(o.from),to:Ws(o),text:as(i,o.from,o.to)};return Fc(i,u,o.from.line,o.to.line+1),$i(i,function(l){return Fc(l,u,o.from.line,o.to.line+1)},!0),u}function oa(i){for(;i.length;){var o=ht(i);if(o.ranges)i.pop();else break}}function ld(i,o){if(o)return oa(i.done),ht(i.done);if(i.done.length&&!ht(i.done).ranges)return ht(i.done);if(i.done.length>1&&!i.done[i.done.length-2].ranges)return i.done.pop(),ht(i.done)}function Hs(i,o,u,l){var f=i.history;f.undone.length=0;var v=+new Date,S,P;if((f.lastOp==l||f.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&f.lastModTime>v-(i.cm?i.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(S=ld(f,f.lastOp==l)))P=ht(S.changes),re(o.from,o.to)==0&&re(o.from,P.to)==0?P.to=Ws(o):S.changes.push(lu(i,o));else{var T=ht(f.done);for((!T||!T.ranges)&&uu(i.sel,f.done),S={changes:[lu(i,o)],generation:f.generation},f.done.push(S);f.done.length>f.undoDepth;)f.done.shift(),f.done[0].ranges||f.done.shift()}f.done.push(u),f.generation=++f.maxGeneration,f.lastModTime=f.lastSelTime=v,f.lastOp=f.lastSelOp=l,f.lastOrigin=f.lastSelOrigin=o.origin,P||xt(i,"historyAdded")}function Fv(i,o,u,l){var f=o.charAt(0);return f=="*"||f=="+"&&u.ranges.length==l.ranges.length&&u.somethingSelected()==l.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)}function ud(i,o,u,l){var f=i.history,v=l&&l.origin;u==f.lastSelOp||v&&f.lastSelOrigin==v&&(f.lastModTime==f.lastSelTime&&f.lastOrigin==v||Fv(i,v,ht(f.done),o))?f.done[f.done.length-1]=o:uu(o,f.done),f.lastSelTime=+new Date,f.lastSelOrigin=v,f.lastSelOp=u,l&&l.clearRedo!==!1&&oa(f.undone)}function uu(i,o){var u=ht(o);u&&u.ranges&&u.equals(i)||o.push(i)}function Fc(i,o,u,l){var f=o["spans_"+i.id],v=0;i.iter(Math.max(i.first,u),Math.min(i.first+i.size,l),function(S){S.markedSpans&&((f||(f=o["spans_"+i.id]={}))[v]=S.markedSpans),++v})}function Mv(i){if(!i)return null;for(var o,u=0;u<i.length;++u)i[u].marker.explicitlyCleared?o||(o=i.slice(0,u)):o&&o.push(i[u]);return o?o.length?o:null:i}function cd(i,o){var u=o["spans_"+i.id];if(!u)return null;for(var l=[],f=0;f<o.text.length;++f)l.push(Mv(u[f]));return l}function rl(i,o){var u=cd(i,o),l=js(i,o);if(!u)return l;if(!l)return u;for(var f=0;f<u.length;++f){var v=u[f],S=l[f];if(v&&S){e:for(var P=0;P<S.length;++P){for(var T=S[P],D=0;D<v.length;++D)if(v[D].marker==T.marker)continue e;v.push(T)}}else S&&(u[f]=S)}return u}function aa(i,o,u){for(var l=[],f=0;f<i.length;++f){var v=i[f];if(v.ranges){l.push(u?Jn.prototype.deepCopy.call(v):v);continue}var S=v.changes,P=[];l.push({changes:P});for(var T=0;T<S.length;++T){var D=S[T],oe=void 0;if(P.push({from:D.from,to:D.to,text:D.text}),o)for(var fe in D)(oe=fe.match(/^spans_(\d+)$/))&&Fe(o,Number(oe[1]))>-1&&(ht(P)[fe]=D[fe],delete D[fe])}}return l}function la(i,o,u,l){if(l){var f=i.anchor;if(u){var v=re(o,f)<0;v!=re(u,f)<0?(f=o,o=u):v!=re(o,u)<0&&(o=u)}return new it(f,o)}else return new it(u||o,o)}function ua(i,o,u,l,f){f==null&&(f=i.cm&&(i.cm.display.shift||i.extend)),fn(i,new Jn([la(i.sel.primary(),o,u,f)],0),l)}function cu(i,o,u){for(var l=[],f=i.cm&&(i.cm.display.shift||i.extend),v=0;v<i.sel.ranges.length;v++)l[v]=la(i.sel.ranges[v],o[v],null,f);var S=Si(i.cm,l,i.sel.primIndex);fn(i,S,u)}function Mc(i,o,u,l){var f=i.sel.ranges.slice(0);f[o]=u,fn(i,Si(i.cm,f,i.sel.primIndex),l)}function fd(i,o,u,l){fn(i,ds(o,u),l)}function Lv(i,o,u){var l={ranges:o.ranges,update:function(f){this.ranges=[];for(var v=0;v<f.length;v++)this.ranges[v]=new it(nt(i,f[v].anchor),nt(i,f[v].head))},origin:u&&u.origin};return xt(i,"beforeSelectionChange",i,l),i.cm&&xt(i.cm,"beforeSelectionChange",i.cm,l),l.ranges!=o.ranges?Si(i.cm,l.ranges,l.ranges.length-1):o}function pd(i,o,u){var l=i.history.done,f=ht(l);f&&f.ranges?(l[l.length-1]=o,fu(i,o,u)):fn(i,o,u)}function fn(i,o,u){fu(i,o,u),ud(i,i.sel,i.cm?i.cm.curOp.id:NaN,u)}function fu(i,o,u){(Sr(i,"beforeSelectionChange")||i.cm&&Sr(i.cm,"beforeSelectionChange"))&&(o=Lv(i,o,u));var l=u&&u.bias||(re(o.primary().head,i.sel.primary().head)<0?-1:1);Lc(i,pu(i,o,l,!0)),!(u&&u.scroll===!1)&&i.cm&&i.cm.getOption("readOnly")!="nocursor"&&Bs(i.cm)}function Lc(i,o){o.equals(i.sel)||(i.sel=o,i.cm&&(i.cm.curOp.updateInput=1,i.cm.curOp.selectionChanged=!0,Ot(i.cm)),Hr(i,"cursorActivity",i))}function dd(i){Lc(i,pu(i,i.sel,null,!1))}function pu(i,o,u,l){for(var f,v=0;v<o.ranges.length;v++){var S=o.ranges[v],P=o.ranges.length==i.sel.ranges.length&&i.sel.ranges[v],T=hs(i,S.anchor,P&&P.anchor,u,l),D=S.head==S.anchor?T:hs(i,S.head,P&&P.head,u,l);(f||T!=S.anchor||D!=S.head)&&(f||(f=o.ranges.slice(0,v)),f[v]=new it(T,D))}return f?Si(i.cm,f,o.primIndex):o}function ca(i,o,u,l,f){var v=rt(i,o.line);if(v.markedSpans)for(var S=0;S<v.markedSpans.length;++S){var P=v.markedSpans[S],T=P.marker,D="selectLeft"in T?!T.selectLeft:T.inclusiveLeft,oe="selectRight"in T?!T.selectRight:T.inclusiveRight;if((P.from==null||(D?P.from<=o.ch:P.from<o.ch))&&(P.to==null||(oe?P.to>=o.ch:P.to>o.ch))){if(f&&(xt(T,"beforeCursorEnter"),T.explicitlyCleared))if(v.markedSpans){--S;continue}else break;if(!T.atomic)continue;if(u){var fe=T.find(l<0?1:-1),we=void 0;if((l<0?oe:D)&&(fe=Ui(i,fe,-l,fe&&fe.line==o.line?v:null)),fe&&fe.line==o.line&&(we=re(fe,u))&&(l<0?we<0:we>0))return ca(i,fe,o,l,f)}var ge=T.find(l<0?-1:1);return(l<0?D:oe)&&(ge=Ui(i,ge,l,ge.line==o.line?v:null)),ge?ca(i,ge,o,l,f):null}}return o}function hs(i,o,u,l,f){var v=l||1,S=ca(i,o,u,v,f)||!f&&ca(i,o,u,v,!0)||ca(i,o,u,-v,f)||!f&&ca(i,o,u,-v,!0);return S||(i.cantEdit=!0,F(i.first,0))}function Ui(i,o,u,l){return u<0&&o.ch==0?o.line>i.first?nt(i,F(o.line-1)):null:u>0&&o.ch==(l||rt(i,o.line)).text.length?o.line<i.first+i.size-1?F(o.line+1,0):null:new F(o.line,o.ch+u)}function Dc(i){i.setSelection(F(i.firstLine(),0),F(i.lastLine()),Lt)}function hd(i,o,u){var l={canceled:!1,from:o.from,to:o.to,text:o.text,origin:o.origin,cancel:function(){return l.canceled=!0}};return u&&(l.update=function(f,v,S,P){f&&(l.from=nt(i,f)),v&&(l.to=nt(i,v)),S&&(l.text=S),P!==void 0&&(l.origin=P)}),xt(i,"beforeChange",i,l),i.cm&&xt(i.cm,"beforeChange",i.cm,l),l.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function fa(i,o,u){if(i.cm){if(!i.cm.curOp)return Nr(i.cm,fa)(i,o,u);if(i.cm.state.suppressEdits)return}if(!((Sr(i,"beforeChange")||i.cm&&Sr(i.cm,"beforeChange"))&&(o=hd(i,o,!0),!o))){var l=sc&&!u&&Dr(i,o.from,o.to);if(l)for(var f=l.length-1;f>=0;--f)Dv(i,{from:l[f].from,to:l[f].to,text:f?[""]:o.text,origin:o.origin});else Dv(i,o)}}function Dv(i,o){if(!(o.text.length==1&&o.text[0]==""&&re(o.from,o.to)==0)){var u=Ic(i,o);Hs(i,o,u,i.cm?i.cm.curOp.id:NaN),pa(i,o,u,js(i,o));var l=[];$i(i,function(f,v){!v&&Fe(l,f.history)==-1&&(Uc(f.history,o),l.push(f.history)),pa(f,o,null,js(f,o))})}}function nl(i,o,u){var l=i.cm&&i.cm.state.suppressEdits;if(!(l&&!u)){for(var f=i.history,v,S=i.sel,P=o=="undo"?f.done:f.undone,T=o=="undo"?f.undone:f.done,D=0;D<P.length&&(v=P[D],!(u?v.ranges&&!v.equals(i.sel):!v.ranges));D++);if(D!=P.length){for(f.lastOrigin=f.lastSelOrigin=null;;)if(v=P.pop(),v.ranges){if(uu(v,T),u&&!v.equals(i.sel)){fn(i,v,{clearRedo:!1});return}S=v}else if(l){P.push(v);return}else break;var oe=[];uu(S,T),T.push({changes:oe,generation:f.generation}),f.generation=v.generation||++f.maxGeneration;for(var fe=Sr(i,"beforeChange")||i.cm&&Sr(i.cm,"beforeChange"),we=function(Ie){var De=v.changes[Ie];if(De.origin=o,fe&&!hd(i,De,!1))return P.length=0,{};oe.push(lu(i,De));var Ue=Ie?Ic(i,De):ht(P);pa(i,De,Ue,rl(i,De)),!Ie&&i.cm&&i.cm.scrollIntoView({from:De.from,to:Ws(De)});var Ge=[];$i(i,function(We,Xe){!Xe&&Fe(Ge,We.history)==-1&&(Uc(We.history,De),Ge.push(We.history)),pa(We,De,null,rl(We,De))})},ge=v.changes.length-1;ge>=0;--ge){var Ve=we(ge);if(Ve)return Ve.v}}}}function Nc(i,o){if(o!=0&&(i.first+=o,i.sel=new Jn($t(i.sel.ranges,function(f){return new it(F(f.anchor.line+o,f.anchor.ch),F(f.head.line+o,f.head.ch))}),i.sel.primIndex),i.cm)){Cn(i.cm,i.first,i.first-o,o);for(var u=i.cm.display,l=u.viewFrom;l<u.viewTo;l++)Ms(i.cm,l,"gutter")}}function pa(i,o,u,l){if(i.cm&&!i.cm.curOp)return Nr(i.cm,pa)(i,o,u,l);if(o.to.line<i.first){Nc(i,o.text.length-1-(o.to.line-o.from.line));return}if(!(o.from.line>i.lastLine())){if(o.from.line<i.first){var f=o.text.length-1-(i.first-o.from.line);Nc(i,f),o={from:F(i.first,0),to:F(o.to.line+f,o.to.ch),text:[ht(o.text)],origin:o.origin}}var v=i.lastLine();o.to.line>v&&(o={from:o.from,to:F(v,rt(i,v).text.length),text:[o.text[0]],origin:o.origin}),o.removed=as(i,o.from,o.to),u||(u=Ic(i,o)),i.cm?Bc(i.cm,o,l):su(i,o,l),fu(i,u,Lt),i.cantEdit&&hs(i,F(i.firstLine(),0))&&(i.cantEdit=!1)}}function Bc(i,o,u){var l=i.doc,f=i.display,v=o.from,S=o.to,P=!1,T=v.line;i.options.lineWrapping||(T=Qt(yi(rt(l,v.line))),l.iter(T,S.line+1,function(ge){if(ge==f.maxLine)return P=!0,!0})),l.sel.contains(o.from,o.to)>-1&&Ot(i),su(l,o,u,Kp(i)),i.options.lineWrapping||(l.iter(T,v.line+o.text.length,function(ge){var Ve=Hl(ge);Ve>f.maxLineLength&&(f.maxLine=ge,f.maxLineLength=Ve,f.maxLineChanged=!0,P=!1)}),P&&(i.curOp.updateMaxLine=!0)),lv(l,v.line),Ja(i,400);var D=o.text.length-(S.line-v.line)-1;o.full?Cn(i):v.line==S.line&&o.text.length==1&&!od(i.doc,o)?Ms(i,v.line,"text"):Cn(i,v.line,S.line+1,D);var oe=Sr(i,"changes"),fe=Sr(i,"change");if(fe||oe){var we={from:v,to:S,text:o.text,removed:o.removed,origin:o.origin};fe&&Hr(i,"change",i,we),oe&&(i.curOp.changeObjs||(i.curOp.changeObjs=[])).push(we)}i.display.selForContextMenu=null}function yo(i,o,u,l,f){var v;l||(l=u),re(l,u)<0&&(v=[l,u],u=v[0],l=v[1]),typeof o=="string"&&(o=i.splitLines(o)),fa(i,{from:u,to:l,text:o,origin:f})}function $c(i,o,u,l){u<i.line?i.line+=l:o<i.line&&(i.line=o,i.ch=0)}function md(i,o,u,l){for(var f=0;f<i.length;++f){var v=i[f],S=!0;if(v.ranges){v.copied||(v=i[f]=v.deepCopy(),v.copied=!0);for(var P=0;P<v.ranges.length;P++)$c(v.ranges[P].anchor,o,u,l),$c(v.ranges[P].head,o,u,l);continue}for(var T=0;T<v.changes.length;++T){var D=v.changes[T];if(u<D.from.line)D.from=F(D.from.line+l,D.from.ch),D.to=F(D.to.line+l,D.to.ch);else if(o<=D.to.line){S=!1;break}}S||(i.splice(0,f+1),f=0)}}function Uc(i,o){var u=o.from.line,l=o.to.line,f=o.text.length-(l-u)-1;md(i.done,u,l,f),md(i.undone,u,l,f)}function il(i,o,u,l){var f=o,v=o;return typeof o=="number"?v=rt(i,Zt(i,o)):f=Qt(o),f==null?null:(l(v,f)&&i.cm&&Ms(i.cm,f,u),v)}function bo(i){this.lines=i,this.parent=null;for(var o=0,u=0;u<i.length;++u)i[u].parent=this,o+=i[u].height;this.height=o}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(i,o){for(var u=i,l=i+o;u<l;++u){var f=this.lines[u];this.height-=f.height,cc(f),Hr(f,"delete")}this.lines.splice(i,o)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(i,o,u){this.height+=u,this.lines=this.lines.slice(0,i).concat(o).concat(this.lines.slice(i));for(var l=0;l<o.length;++l)o[l].parent=this},iterN:function(i,o,u){for(var l=i+o;i<l;++i)if(u(this.lines[i]))return!0}};function xo(i){this.children=i;for(var o=0,u=0,l=0;l<i.length;++l){var f=i[l];o+=f.chunkSize(),u+=f.height,f.parent=this}this.size=o,this.height=u,this.parent=null}xo.prototype={chunkSize:function(){return this.size},removeInner:function(i,o){this.size-=o;for(var u=0;u<this.children.length;++u){var l=this.children[u],f=l.chunkSize();if(i<f){var v=Math.min(o,f-i),S=l.height;if(l.removeInner(i,v),this.height-=S-l.height,f==v&&(this.children.splice(u--,1),l.parent=null),(o-=v)==0)break;i=0}else i-=f}if(this.size-o<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var P=[];this.collapse(P),this.children=[new bo(P)],this.children[0].parent=this}},collapse:function(i){for(var o=0;o<this.children.length;++o)this.children[o].collapse(i)},insertInner:function(i,o,u){this.size+=o.length,this.height+=u;for(var l=0;l<this.children.length;++l){var f=this.children[l],v=f.chunkSize();if(i<=v){if(f.insertInner(i,o,u),f.lines&&f.lines.length>50){for(var S=f.lines.length%25+25,P=S;P<f.lines.length;){var T=new bo(f.lines.slice(P,P+=25));f.height-=T.height,this.children.splice(++l,0,T),T.parent=this}f.lines=f.lines.slice(0,S),this.maybeSpill()}break}i-=v}},maybeSpill:function(){if(!(this.children.length<=10)){var i=this;do{var o=i.children.splice(i.children.length-5,5),u=new xo(o);if(i.parent){i.size-=u.size,i.height-=u.height;var f=Fe(i.parent.children,i);i.parent.children.splice(f+1,0,u)}else{var l=new xo(i.children);l.parent=i,i.children=[l,u],i=l}u.parent=i.parent}while(i.children.length>10);i.parent.maybeSpill()}},iterN:function(i,o,u){for(var l=0;l<this.children.length;++l){var f=this.children[l],v=f.chunkSize();if(i<v){var S=Math.min(o,v-i);if(f.iterN(i,S,u))return!0;if((o-=S)==0)break;i=0}else i-=v}}};var da=function(i,o,u){if(u)for(var l in u)u.hasOwnProperty(l)&&(this[l]=u[l]);this.doc=i,this.node=o};da.prototype.clear=function(){var i=this.doc.cm,o=this.line.widgets,u=this.line,l=Qt(u);if(!(l==null||!o)){for(var f=0;f<o.length;++f)o[f]==this&&o.splice(f--,1);o.length||(u.widgets=null);var v=Ba(this);zn(u,Math.max(0,u.height-v)),i&&(yn(i,function(){Wc(i,u,-v),Ms(i,l,"widget")}),Hr(i,"lineWidgetCleared",i,this,l))}},da.prototype.changed=function(){var i=this,o=this.height,u=this.doc.cm,l=this.line;this.height=null;var f=Ba(this)-o;f&&(Is(this.doc,l)||zn(l,l.height+f),u&&yn(u,function(){u.curOp.forceUpdate=!0,Wc(u,l,f),Hr(u,"lineWidgetChanged",u,i,Qt(l))}))},sn(da);function Wc(i,o,u){us(o)<(i.curOp&&i.curOp.scrollTop||i.doc.scrollTop)&&eu(i,u)}function Nv(i,o,u,l){var f=new da(i,u,l),v=i.cm;return v&&f.noHScroll&&(v.display.alignWidgets=!0),il(i,o,"widget",function(S){var P=S.widgets||(S.widgets=[]);if(f.insertAt==null?P.push(f):P.splice(Math.min(P.length,Math.max(0,f.insertAt)),0,f),f.line=S,v&&!Is(i,S)){var T=us(S)<i.scrollTop;zn(S,S.height+Ba(f)),T&&eu(v,f.height),v.curOp.forceUpdate=!0}return!0}),v&&Hr(v,"lineWidgetAdded",v,f,typeof o=="number"?o:Qt(o)),f}var vd=0,Wi=function(i,o){this.lines=[],this.type=o,this.doc=i,this.id=++vd};Wi.prototype.clear=function(){if(!this.explicitlyCleared){var i=this.doc.cm,o=i&&!i.curOp;if(o&&Bi(i),Sr(this,"clear")){var u=this.find();u&&Hr(this,"clear",u.from,u.to)}for(var l=null,f=null,v=0;v<this.lines.length;++v){var S=this.lines[v],P=ot(S.markedSpans,this);i&&!this.collapsed?Ms(i,Qt(S),"text"):i&&(P.to!=null&&(f=Qt(S)),P.from!=null&&(l=Qt(S))),S.markedSpans=Nl(S.markedSpans,P),P.from==null&&this.collapsed&&!Is(this.doc,S)&&i&&zn(S,Qo(i.display))}if(i&&this.collapsed&&!i.options.lineWrapping)for(var T=0;T<this.lines.length;++T){var D=yi(this.lines[T]),oe=Hl(D);oe>i.display.maxLineLength&&(i.display.maxLine=D,i.display.maxLineLength=oe,i.display.maxLineChanged=!0)}l!=null&&i&&this.collapsed&&Cn(i,l,f+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,i&&dd(i.doc)),i&&Hr(i,"markerCleared",i,this,l,f),o&&fs(i),this.parent&&this.parent.clear()}},Wi.prototype.find=function(i,o){i==null&&this.type=="bookmark"&&(i=1);for(var u,l,f=0;f<this.lines.length;++f){var v=this.lines[f],S=ot(v.markedSpans,this);if(S.from!=null&&(u=F(o?v:Qt(v),S.from),i==-1))return u;if(S.to!=null&&(l=F(o?v:Qt(v),S.to),i==1))return l}return u&&{from:u,to:l}},Wi.prototype.changed=function(){var i=this,o=this.find(-1,!0),u=this,l=this.doc.cm;!o||!l||yn(l,function(){var f=o.line,v=Qt(o.line),S=Jl(l,v);if(S&&(vc(S),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!Is(u.doc,f)&&u.height!=null){var P=u.height;u.height=null;var T=Ba(u)-P;T&&zn(f,f.height+T)}Hr(l,"markerChanged",l,i)})},Wi.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var o=this.doc.cm.curOp;(!o.maybeHiddenMarkers||Fe(o.maybeHiddenMarkers,this)==-1)&&(o.maybeUnhiddenMarkers||(o.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(i)},Wi.prototype.detachLine=function(i){if(this.lines.splice(Fe(this.lines,i),1),!this.lines.length&&this.doc.cm){var o=this.doc.cm.curOp;(o.maybeHiddenMarkers||(o.maybeHiddenMarkers=[])).push(this)}},sn(Wi);function ha(i,o,u,l,f){if(l&&l.shared)return Bv(i,o,u,l,f);if(i.cm&&!i.cm.curOp)return Nr(i.cm,ha)(i,o,u,l,f);var v=new Wi(i,f),S=re(o,u);if(l&&yt(l,v,!1),S>0||S==0&&v.clearWhenEmpty!==!1)return v;if(v.replacedWith&&(v.collapsed=!0,v.widgetNode=xe("span",[v.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||v.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(v.widgetNode.insertLeft=!0)),v.collapsed){if(Ap(i,o.line,o,u,v)||o.line!=u.line&&Ap(i,u.line,o,u,v))throw new Error("Inserting collapsed marker partially overlapping an existing one");uv()}v.addToHistory&&Hs(i,{from:o,to:u,origin:"markText"},i.sel,NaN);var P=o.line,T=i.cm,D;if(i.iter(P,u.line+1,function(fe){T&&v.collapsed&&!T.options.lineWrapping&&yi(fe)==T.display.maxLine&&(D=!0),v.collapsed&&P!=o.line&&zn(fe,0),Sp(fe,new ja(v,P==o.line?o.ch:null,P==u.line?u.ch:null),i.cm&&i.cm.curOp),++P}),v.collapsed&&i.iter(o.line,u.line+1,function(fe){Is(i,fe)&&zn(fe,0)}),v.clearOnEnter&&pe(v,"beforeCursorEnter",function(){return v.clear()}),v.readOnly&&(Go(),(i.history.done.length||i.history.undone.length)&&i.clearHistory()),v.collapsed&&(v.id=++vd,v.atomic=!0),T){if(D&&(T.curOp.updateMaxLine=!0),v.collapsed)Cn(T,o.line,u.line+1);else if(v.className||v.startStyle||v.endStyle||v.css||v.attributes||v.title)for(var oe=o.line;oe<=u.line;oe++)Ms(T,oe,"text");v.atomic&&dd(T.doc),Hr(T,"markerAdded",T,v)}return v}var sl=function(i,o){this.markers=i,this.primary=o;for(var u=0;u<i.length;++u)i[u].parent=this};sl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();Hr(this,"clear")}},sl.prototype.find=function(i,o){return this.primary.find(i,o)},sn(sl);function Bv(i,o,u,l,f){l=yt(l),l.shared=!1;var v=[ha(i,o,u,l,f)],S=v[0],P=l.widgetNode;return $i(i,function(T){P&&(l.widgetNode=P.cloneNode(!0)),v.push(ha(T,nt(T,o),nt(T,u),l,f));for(var D=0;D<T.linked.length;++D)if(T.linked[D].isParent)return;S=ht(v)}),new sl(v,S)}function gd(i){return i.findMarks(F(i.first,0),i.clipPos(F(i.lastLine())),function(o){return o.parent})}function $v(i,o){for(var u=0;u<o.length;u++){var l=o[u],f=l.find(),v=i.clipPos(f.from),S=i.clipPos(f.to);if(re(v,S)){var P=ha(i,v,S,l.primary,l.primary.type);l.markers.push(P),P.parent=l}}}function Uv(i){for(var o=function(l){var f=i[l],v=[f.primary.doc];$i(f.primary.doc,function(T){return v.push(T)});for(var S=0;S<f.markers.length;S++){var P=f.markers[S];Fe(v,P.doc)==-1&&(P.parent=null,f.markers.splice(S--,1))}},u=0;u<i.length;u++)o(u)}var Hc=0,tn=function(i,o,u,l,f){if(!(this instanceof tn))return new tn(i,o,u,l,f);u==null&&(u=0),xo.call(this,[new bo([new co("",null)])]),this.first=u,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=u;var v=F(u,0);this.sel=ds(v),this.history=new au(null),this.id=++Hc,this.modeOption=o,this.lineSep=l,this.direction=f=="rtl"?"rtl":"ltr",this.extend=!1,typeof i=="string"&&(i=this.splitLines(i)),su(this,{from:v,to:v,text:i}),fn(this,ds(v),Lt)};tn.prototype=kn(xo.prototype,{constructor:tn,iter:function(i,o,u){u?this.iterN(i-this.first,o-i,u):this.iterN(this.first,this.first+this.size,i)},insert:function(i,o){for(var u=0,l=0;l<o.length;++l)u+=o[l].height;this.insertInner(i-this.first,o,u)},remove:function(i,o){this.removeInner(i-this.first,o)},getValue:function(i){var o=oo(this,this.first,this.first+this.size);return i===!1?o:o.join(i||this.lineSeparator())},setValue:Mt(function(i){var o=F(this.first,0),u=this.first+this.size-1;fa(this,{from:o,to:F(u,rt(this,u).text.length),text:this.splitLines(i),origin:"setValue",full:!0},!0),this.cm&&ea(this.cm,0,0),fn(this,ds(o),Lt)}),replaceRange:function(i,o,u,l){o=nt(this,o),u=u?nt(this,u):o,yo(this,i,o,u,l)},getRange:function(i,o,u){var l=as(this,nt(this,i),nt(this,o));return u===!1?l:u===""?l.join(""):l.join(u||this.lineSeparator())},getLine:function(i){var o=this.getLineHandle(i);return o&&o.text},getLineHandle:function(i){if(ao(this,i))return rt(this,i)},getLineNumber:function(i){return Qt(i)},getLineHandleVisualStart:function(i){return typeof i=="number"&&(i=rt(this,i)),yi(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return nt(this,i)},getCursor:function(i){var o=this.sel.primary(),u;return i==null||i=="head"?u=o.head:i=="anchor"?u=o.anchor:i=="end"||i=="to"||i===!1?u=o.to():u=o.from(),u},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mt(function(i,o,u){fd(this,nt(this,typeof i=="number"?F(i,o||0):i),null,u)}),setSelection:Mt(function(i,o,u){fd(this,nt(this,i),nt(this,o||i),u)}),extendSelection:Mt(function(i,o,u){ua(this,nt(this,i),o&&nt(this,o),u)}),extendSelections:Mt(function(i,o){cu(this,Ll(this,i),o)}),extendSelectionsBy:Mt(function(i,o){var u=$t(this.sel.ranges,i);cu(this,Ll(this,u),o)}),setSelections:Mt(function(i,o,u){if(i.length){for(var l=[],f=0;f<i.length;f++)l[f]=new it(nt(this,i[f].anchor),nt(this,i[f].head||i[f].anchor));o==null&&(o=Math.min(i.length-1,this.sel.primIndex)),fn(this,Si(this.cm,l,o),u)}}),addSelection:Mt(function(i,o,u){var l=this.sel.ranges.slice(0);l.push(new it(nt(this,i),nt(this,o||i))),fn(this,Si(this.cm,l,l.length-1),u)}),getSelection:function(i){for(var o=this.sel.ranges,u,l=0;l<o.length;l++){var f=as(this,o[l].from(),o[l].to());u=u?u.concat(f):f}return i===!1?u:u.join(i||this.lineSeparator())},getSelections:function(i){for(var o=[],u=this.sel.ranges,l=0;l<u.length;l++){var f=as(this,u[l].from(),u[l].to());i!==!1&&(f=f.join(i||this.lineSeparator())),o[l]=f}return o},replaceSelection:function(i,o,u){for(var l=[],f=0;f<this.sel.ranges.length;f++)l[f]=i;this.replaceSelections(l,o,u||"+input")},replaceSelections:Mt(function(i,o,u){for(var l=[],f=this.sel,v=0;v<f.ranges.length;v++){var S=f.ranges[v];l[v]={from:S.from(),to:S.to(),text:this.splitLines(i[v]),origin:u}}for(var P=o&&o!="end"&&Iv(this,l,o),T=l.length-1;T>=0;T--)fa(this,l[T]);P?pd(this,P):this.cm&&Bs(this.cm)}),undo:Mt(function(){nl(this,"undo")}),redo:Mt(function(){nl(this,"redo")}),undoSelection:Mt(function(){nl(this,"undo",!0)}),redoSelection:Mt(function(){nl(this,"redo",!0)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){for(var i=this.history,o=0,u=0,l=0;l<i.done.length;l++)i.done[l].ranges||++o;for(var f=0;f<i.undone.length;f++)i.undone[f].ranges||++u;return{undo:o,redo:u}},clearHistory:function(){var i=this;this.history=new au(this.history),$i(this,function(o){return o.history=i.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(i){return i&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:aa(this.history.done),undone:aa(this.history.undone)}},setHistory:function(i){var o=this.history=new au(this.history);o.done=aa(i.done.slice(0),null,!0),o.undone=aa(i.undone.slice(0),null,!0)},setGutterMarker:Mt(function(i,o,u){return il(this,i,"gutter",function(l){var f=l.gutterMarkers||(l.gutterMarkers={});return f[o]=u,!u&&ei(f)&&(l.gutterMarkers=null),!0})}),clearGutter:Mt(function(i){var o=this;this.iter(function(u){u.gutterMarkers&&u.gutterMarkers[i]&&il(o,u,"gutter",function(){return u.gutterMarkers[i]=null,ei(u.gutterMarkers)&&(u.gutterMarkers=null),!0})})}),lineInfo:function(i){var o;if(typeof i=="number"){if(!ao(this,i)||(o=i,i=rt(this,i),!i))return null}else if(o=Qt(i),o==null)return null;return{line:o,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:Mt(function(i,o,u){return il(this,i,o=="gutter"?"gutter":"class",function(l){var f=o=="text"?"textClass":o=="background"?"bgClass":o=="gutter"?"gutterClass":"wrapClass";if(!l[f])l[f]=u;else{if(Q(u).test(l[f]))return!1;l[f]+=" "+u}return!0})}),removeLineClass:Mt(function(i,o,u){return il(this,i,o=="gutter"?"gutter":"class",function(l){var f=o=="text"?"textClass":o=="background"?"bgClass":o=="gutter"?"gutterClass":"wrapClass",v=l[f];if(v)if(u==null)l[f]=null;else{var S=v.match(Q(u));if(!S)return!1;var P=S.index+S[0].length;l[f]=v.slice(0,S.index)+(!S.index||P==v.length?"":" ")+v.slice(P)||null}else return!1;return!0})}),addLineWidget:Mt(function(i,o,u){return Nv(this,i,o,u)}),removeLineWidget:function(i){i.clear()},markText:function(i,o,u){return ha(this,nt(this,i),nt(this,o),u,u&&u.type||"range")},setBookmark:function(i,o){var u={replacedWith:o&&(o.nodeType==null?o.widget:o),insertLeft:o&&o.insertLeft,clearWhenEmpty:!1,shared:o&&o.shared,handleMouseEvents:o&&o.handleMouseEvents};return i=nt(this,i),ha(this,i,i,u,"bookmark")},findMarksAt:function(i){i=nt(this,i);var o=[],u=rt(this,i.line).markedSpans;if(u)for(var l=0;l<u.length;++l){var f=u[l];(f.from==null||f.from<=i.ch)&&(f.to==null||f.to>=i.ch)&&o.push(f.marker.parent||f.marker)}return o},findMarks:function(i,o,u){i=nt(this,i),o=nt(this,o);var l=[],f=i.line;return this.iter(i.line,o.line+1,function(v){var S=v.markedSpans;if(S)for(var P=0;P<S.length;P++){var T=S[P];!(T.to!=null&&f==i.line&&i.ch>=T.to||T.from==null&&f!=i.line||T.from!=null&&f==o.line&&T.from>=o.ch)&&(!u||u(T.marker))&&l.push(T.marker.parent||T.marker)}++f}),l},getAllMarks:function(){var i=[];return this.iter(function(o){var u=o.markedSpans;if(u)for(var l=0;l<u.length;++l)u[l].from!=null&&i.push(u[l].marker)}),i},posFromIndex:function(i){var o,u=this.first,l=this.lineSeparator().length;return this.iter(function(f){var v=f.text.length+l;if(v>i)return o=i,!0;i-=v,++u}),nt(this,F(u,o))},indexFromPos:function(i){i=nt(this,i);var o=i.ch;if(i.line<this.first||i.ch<0)return 0;var u=this.lineSeparator().length;return this.iter(this.first,i.line,function(l){o+=l.text.length+u}),o},copy:function(i){var o=new tn(oo(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return o.scrollTop=this.scrollTop,o.scrollLeft=this.scrollLeft,o.sel=this.sel,o.extend=!1,i&&(o.history.undoDepth=this.history.undoDepth,o.setHistory(this.getHistory())),o},linkedDoc:function(i){i||(i={});var o=this.first,u=this.first+this.size;i.from!=null&&i.from>o&&(o=i.from),i.to!=null&&i.to<u&&(u=i.to);var l=new tn(oo(this,o,u),i.mode||this.modeOption,o,this.lineSep,this.direction);return i.sharedHist&&(l.history=this.history),(this.linked||(this.linked=[])).push({doc:l,sharedHist:i.sharedHist}),l.linked=[{doc:this,isParent:!0,sharedHist:i.sharedHist}],$v(l,gd(this)),l},unlinkDoc:function(i){if(i instanceof wr&&(i=i.doc),this.linked)for(var o=0;o<this.linked.length;++o){var u=this.linked[o];if(u.doc==i){this.linked.splice(o,1),i.unlinkDoc(this),Uv(gd(this));break}}if(i.history==this.history){var l=[i.id];$i(i,function(f){return l.push(f.id)},!0),i.history=new au(null),i.history.done=aa(this.history.done,l),i.history.undone=aa(this.history.undone,l)}},iterLinkedDocs:function(i){$i(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){return this.lineSep?i.split(this.lineSep):Fi(i)},lineSeparator:function(){return this.lineSep||`
23
- `},setDirection:Mt(function(i){i!="rtl"&&(i="ltr"),i!=this.direction&&(this.direction=i,this.iter(function(o){return o.order=null}),this.cm&&Rv(this.cm))})}),tn.prototype.eachLine=tn.prototype.iter;var zc=0;function yd(i){var o=this;if(zs(o),!(_t(o,i)||Di(o.display,i))){Xt(i),A&&(zc=+new Date);var u=po(o,i,!0),l=i.dataTransfer.files;if(!(!u||o.isReadOnly()))if(l&&l.length&&window.FileReader&&window.File)for(var f=l.length,v=Array(f),S=0,P=function(){++S==f&&Nr(o,function(){u=nt(o.doc,u);var ge={from:u,to:u,text:o.doc.splitLines(v.filter(function(Ve){return Ve!=null}).join(o.doc.lineSeparator())),origin:"paste"};fa(o.doc,ge),pd(o.doc,ds(nt(o.doc,u),nt(o.doc,Ws(ge))))})()},T=function(ge,Ve){if(o.options.allowDropFileTypes&&Fe(o.options.allowDropFileTypes,ge.type)==-1){P();return}var Ie=new FileReader;Ie.onerror=function(){return P()},Ie.onload=function(){var De=Ie.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(De)){P();return}v[Ve]=De,P()},Ie.readAsText(ge)},D=0;D<l.length;D++)T(l[D],D);else{if(o.state.draggingText&&o.doc.sel.contains(u)>-1){o.state.draggingText(i),setTimeout(function(){return o.display.input.focus()},20);return}try{var oe=i.dataTransfer.getData("Text");if(oe){var fe;if(o.state.draggingText&&!o.state.draggingText.copy&&(fe=o.listSelections()),fu(o.doc,ds(u,u)),fe)for(var we=0;we<fe.length;++we)yo(o.doc,"",fe[we].anchor,fe[we].head,"drag");o.replaceSelection(oe,"around","paste"),o.display.input.focus()}}catch(ge){}}}}function Wv(i,o){if(A&&(!i.state.draggingText||+new Date-zc<100)){on(o);return}if(!(_t(i,o)||Di(i.display,o))&&(o.dataTransfer.setData("Text",i.getSelection()),o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setDragImage&&!ae)){var u=Z("img",null,null,"position: fixed; left: 0; top: 0;");u.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ee&&(u.width=u.height=1,i.display.wrapper.appendChild(u),u._top=u.offsetTop),o.dataTransfer.setDragImage(u,0,0),ee&&u.parentNode.removeChild(u)}}function Hv(i,o){var u=po(i,o);if(u){var l=document.createDocumentFragment();Oc(i,u,l),i.display.dragCursor||(i.display.dragCursor=Z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)),Ae(i.display.dragCursor,l)}}function zs(i){i.display.dragCursor&&(i.display.lineSpace.removeChild(i.display.dragCursor),i.display.dragCursor=null)}function zv(i){if(document.getElementsByClassName){for(var o=document.getElementsByClassName("CodeMirror"),u=[],l=0;l<o.length;l++){var f=o[l].CodeMirror;f&&u.push(f)}u.length&&u[0].operation(function(){for(var v=0;v<u.length;v++)i(u[v])})}}var Gc=!1;function Gv(){Gc||(ol(),Gc=!0)}function ol(){var i;pe(window,"resize",function(){i==null&&(i=setTimeout(function(){i=null,zv(du)},100))}),pe(window,"blur",function(){return zv(Ka)})}function du(i){var o=i.display;o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.scrollbarsClipped=!1,i.setSize()}for(var Hi={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"},al=0;al<10;al++)Hi[al+48]=Hi[al+96]=String(al);for(var Kc=65;Kc<=90;Kc++)Hi[Kc]=String.fromCharCode(Kc);for(var So=1;So<=12;So++)Hi[So+111]=Hi[So+63235]="F"+So;var ms={};ms.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"},ms.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"},ms.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"},ms.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"]},ms.default=N?ms.macDefault:ms.pcDefault;function Kv(i){var o=i.split(/-(?!$)/);i=o[o.length-1];for(var u,l,f,v,S=0;S<o.length-1;S++){var P=o[S];if(/^(cmd|meta|m)$/i.test(P))v=!0;else if(/^a(lt)?$/i.test(P))u=!0;else if(/^(c|ctrl|control)$/i.test(P))l=!0;else if(/^s(hift)?$/i.test(P))f=!0;else throw new Error("Unrecognized modifier name: "+P)}return u&&(i="Alt-"+i),l&&(i="Ctrl-"+i),v&&(i="Cmd-"+i),f&&(i="Shift-"+i),i}function bd(i){var o={};for(var u in i)if(i.hasOwnProperty(u)){var l=i[u];if(/^(name|fallthrough|(de|at)tach)$/.test(u))continue;if(l=="..."){delete i[u];continue}for(var f=$t(u.split(" "),Kv),v=0;v<f.length;v++){var S=void 0,P=void 0;v==f.length-1?(P=f.join(" "),S=l):(P=f.slice(0,v+1).join(" "),S="...");var T=o[P];if(!T)o[P]=S;else if(T!=S)throw new Error("Inconsistent bindings for "+P)}delete i[u]}for(var D in o)i[D]=o[D];return i}function wo(i,o,u,l){o=mu(o);var f=o.call?o.call(i,l):o[i];if(f===!1)return"nothing";if(f==="...")return"multi";if(f!=null&&u(f))return"handled";if(o.fallthrough){if(Object.prototype.toString.call(o.fallthrough)!="[object Array]")return wo(i,o.fallthrough,u,l);for(var v=0;v<o.fallthrough.length;v++){var S=wo(i,o.fallthrough[v],u,l);if(S)return S}}}function Jc(i){var o=typeof i=="string"?i:Hi[i.keyCode];return o=="Ctrl"||o=="Alt"||o=="Shift"||o=="Mod"}function Jv(i,o,u){var l=i;return o.altKey&&l!="Alt"&&(i="Alt-"+i),(Y?o.metaKey:o.ctrlKey)&&l!="Ctrl"&&(i="Ctrl-"+i),(Y?o.ctrlKey:o.metaKey)&&l!="Mod"&&(i="Cmd-"+i),!u&&o.shiftKey&&l!="Shift"&&(i="Shift-"+i),i}function hu(i,o){if(ee&&i.keyCode==34&&i.char)return!1;var u=Hi[i.keyCode];return u==null||i.altGraphKey?!1:(i.keyCode==3&&i.code&&(u=i.code),Jv(u,i,o))}function mu(i){return typeof i=="string"?ms[i]:i}function ll(i,o){for(var u=i.doc.sel.ranges,l=[],f=0;f<u.length;f++){for(var v=o(u[f]);l.length&&re(v.from,ht(l).to)<=0;){var S=l.pop();if(re(S.from,v.from)<0){v.from=S.from;break}}l.push(v)}yn(i,function(){for(var P=l.length-1;P>=0;P--)yo(i.doc,"",l[P].from,l[P].to,"+delete");Bs(i)})}function ul(i,o,u){var l=jn(i.text,o+u,u);return l<0||l>i.text.length?null:l}function Yc(i,o,u){var l=ul(i,o.ch,u);return l==null?null:new F(o.line,l,u<0?"after":"before")}function vu(i,o,u,l,f){if(i){o.doc.direction=="rtl"&&(f=-f);var v=mt(u,o.doc.direction);if(v){var S=f<0?ht(v):v[0],P=f<0==(S.level==1),T=P?"after":"before",D;if(S.level>0||o.doc.direction=="rtl"){var oe=Fs(o,u);D=f<0?u.text.length-1:0;var fe=bi(o,oe,D).top;D=mn(function(we){return bi(o,oe,we).top==fe},f<0==(S.level==1)?S.from:S.to-1,D),T=="before"&&(D=ul(u,D,1))}else D=f<0?S.to:S.from;return new F(l,D,T)}}return new F(l,f<0?u.text.length:0,f<0?"before":"after")}function Yv(i,o,u,l){var f=mt(o,i.doc.direction);if(!f)return Yc(o,u,l);u.ch>=o.text.length?(u.ch=o.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var v=Ft(f,u.ch,u.sticky),S=f[v];if(i.doc.direction=="ltr"&&S.level%2==0&&(l>0?S.to>u.ch:S.from<u.ch))return Yc(o,u,l);var P=function(Ue,Ge){return ul(o,Ue instanceof F?Ue.ch:Ue,Ge)},T,D=function(Ue){return i.options.lineWrapping?(T=T||Fs(i,o),Gp(i,o,T,Ue)):{begin:0,end:o.text.length}},oe=D(u.sticky=="before"?P(u,-1):u.ch);if(i.doc.direction=="rtl"||S.level==1){var fe=S.level==1==l<0,we=P(u,fe?1:-1);if(we!=null&&(fe?we<=S.to&&we<=oe.end:we>=S.from&&we>=oe.begin)){var ge=fe?"before":"after";return new F(u.line,we,ge)}}var Ve=function(Ue,Ge,We){for(var Xe=function(mr,Gr){return Gr?new F(u.line,P(mr,1),"before"):new F(u.line,mr,"after")};Ue>=0&&Ue<f.length;Ue+=Ge){var ct=f[Ue],at=Ge>0==(ct.level!=1),It=at?We.begin:P(We.end,-1);if(ct.from<=It&&It<ct.to||(It=at?ct.from:P(ct.to,-1),We.begin<=It&&It<We.end))return Xe(It,at)}},Ie=Ve(v+l,l,oe);if(Ie)return Ie;var De=l>0?oe.end:P(oe.begin,-1);return De!=null&&!(l>0&&De==o.text.length)&&(Ie=Ve(l>0?0:f.length-1,l,D(De)),Ie)?Ie:null}var cl={selectAll:Dc,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),Lt)},killLine:function(i){return ll(i,function(o){if(o.empty()){var u=rt(i.doc,o.head.line).text.length;return o.head.ch==u&&o.head.line<i.lastLine()?{from:o.head,to:F(o.head.line+1,0)}:{from:o.head,to:F(o.head.line,u)}}else return{from:o.from(),to:o.to()}})},deleteLine:function(i){return ll(i,function(o){return{from:F(o.from().line,0),to:nt(i.doc,F(o.to().line+1,0))}})},delLineLeft:function(i){return ll(i,function(o){return{from:F(o.from().line,0),to:o.from()}})},delWrappedLineLeft:function(i){return ll(i,function(o){var u=i.charCoords(o.head,"div").top+5,l=i.coordsChar({left:0,top:u},"div");return{from:l,to:o.from()}})},delWrappedLineRight:function(i){return ll(i,function(o){var u=i.charCoords(o.head,"div").top+5,l=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:u},"div");return{from:o.from(),to:l}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(F(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(F(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(o){return ma(i,o.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(o){return Xc(i,o.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(o){return Xv(i,o.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:u},"div")},zt)},goLineLeft:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5;return i.coordsChar({left:0,top:u},"div")},zt)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5,l=i.coordsChar({left:0,top:u},"div");return l.ch<i.getLine(l.line).search(/\S/)?Xc(i,o.head):l},zt)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"codepoint")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection(" ")},insertSoftTab:function(i){for(var o=[],u=i.listSelections(),l=i.options.tabSize,f=0;f<u.length;f++){var v=u[f].from(),S=lt(i.getLine(v.line),v.ch,l);o.push(qr(l-S%l))}i.replaceSelections(o)},defaultTab:function(i){i.somethingSelected()?i.indentSelection("add"):i.execCommand("insertTab")},transposeChars:function(i){return yn(i,function(){for(var o=i.listSelections(),u=[],l=0;l<o.length;l++)if(o[l].empty()){var f=o[l].head,v=rt(i.doc,f.line).text;if(v){if(f.ch==v.length&&(f=new F(f.line,f.ch-1)),f.ch>0)f=new F(f.line,f.ch+1),i.replaceRange(v.charAt(f.ch-1)+v.charAt(f.ch-2),F(f.line,f.ch-2),f,"+transpose");else if(f.line>i.doc.first){var S=rt(i.doc,f.line-1).text;S&&(f=new F(f.line,1),i.replaceRange(v.charAt(0)+i.doc.lineSeparator()+S.charAt(S.length-1),F(f.line-1,S.length-1),f,"+transpose"))}}u.push(new it(f,f))}i.setSelections(u)})},newlineAndIndent:function(i){return yn(i,function(){for(var o=i.listSelections(),u=o.length-1;u>=0;u--)i.replaceRange(i.doc.lineSeparator(),o[u].anchor,o[u].head,"+input");o=i.listSelections();for(var l=0;l<o.length;l++)i.indentLine(o[l].from().line,null,!0);Bs(i)})},openLine:function(i){return i.replaceSelection(`
24
- `,"start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function ma(i,o){var u=rt(i.doc,o),l=yi(u);return l!=u&&(o=Qt(l)),vu(!0,i,l,o,1)}function Xv(i,o){var u=rt(i.doc,o),l=fv(u);return l!=u&&(o=Qt(l)),vu(!0,i,u,o,-1)}function Xc(i,o){var u=ma(i,o.line),l=rt(i.doc,u.line),f=mt(l,i.doc.direction);if(!f||f[0].level==0){var v=Math.max(u.ch,l.text.search(/\S/)),S=o.line==u.line&&o.ch<=v&&o.ch;return F(u.line,S?0:v,u.sticky)}return u}function Qc(i,o,u){if(typeof o=="string"&&(o=cl[o],!o))return!1;i.display.input.ensurePolled();var l=i.display.shift,f=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),u&&(i.display.shift=!1),f=o(i)!=bt}finally{i.display.shift=l,i.state.suppressEdits=!1}return f}function Te(i,o,u){for(var l=0;l<i.state.keyMaps.length;l++){var f=wo(o,i.state.keyMaps[l],u,i);if(f)return f}return i.options.extraKeys&&wo(o,i.options.extraKeys,u,i)||wo(o,i.options.keyMap,u,i)}var Qv=new Ke;function Gs(i,o,u,l){var f=i.state.keySeq;if(f){if(Jc(o))return"handled";if(/\'$/.test(o)?i.state.keySeq=null:Qv.set(50,function(){i.state.keySeq==f&&(i.state.keySeq=null,i.display.input.reset())}),xd(i,f+" "+o,u,l))return!0}return xd(i,o,u,l)}function xd(i,o,u,l){var f=Te(i,o,l);return f=="multi"&&(i.state.keySeq=o),f=="handled"&&Hr(i,"keyHandled",i,o,u),(f=="handled"||f=="multi")&&(Xt(u),Ga(i)),!!f}function fl(i,o){var u=hu(o,!0);return u?o.shiftKey&&!i.state.keySeq?Gs(i,"Shift-"+u,o,function(l){return Qc(i,l,!0)})||Gs(i,u,o,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return Qc(i,l)}):Gs(i,u,o,function(l){return Qc(i,l)}):!1}function Zv(i,o,u){return Gs(i,"'"+u+"'",o,function(l){return Qc(i,l,!0)})}var pl=null;function Sd(i){var o=this;if(!(i.target&&i.target!=o.display.input.getField())&&(o.curOp.focus=He(Ye(o)),!_t(o,i))){A&&O<11&&i.keyCode==27&&(i.returnValue=!1);var u=i.keyCode;o.display.shift=u==16||i.shiftKey;var l=fl(o,i);ee&&(pl=l?u:null,!l&&u==88&&!Wo&&(N?i.metaKey:i.ctrlKey)&&o.replaceSelection("",null,"cut")),m&&!N&&!l&&u==46&&i.shiftKey&&!i.ctrlKey&&document.execCommand&&document.execCommand("cut"),u==18&&!/\bCodeMirror-crosshair\b/.test(o.display.lineDiv.className)&&Ks(o)}}function Ks(i){var o=i.display.lineDiv;Re(o,"CodeMirror-crosshair");function u(l){(l.keyCode==18||!l.altKey)&&(H(o,"CodeMirror-crosshair"),Je(document,"keyup",u),Je(document,"mouseover",u))}pe(document,"keyup",u),pe(document,"mouseover",u)}function qv(i){i.keyCode==16&&(this.doc.sel.shift=!1),_t(this,i)}function br(i){var o=this;if(!(i.target&&i.target!=o.display.input.getField())&&!(Di(o.display,i)||_t(o,i)||i.ctrlKey&&!i.altKey||N&&i.metaKey)){var u=i.keyCode,l=i.charCode;if(ee&&u==pl){pl=null,Xt(i);return}if(!(ee&&(!i.which||i.which<10)&&fl(o,i))){var f=String.fromCharCode(l==null?u:l);f!="\b"&&(Zv(o,i,f)||o.display.input.onKeyPress(i))}}}var qt=400,$e=function(i,o,u){this.time=i,this.pos=o,this.button=u};$e.prototype.compare=function(i,o,u){return this.time+qt>i&&re(o,this.pos)==0&&u==this.button};var vs,dl;function Tr(i,o){var u=+new Date;return dl&&dl.compare(u,i,o)?(vs=dl=null,"triple"):vs&&vs.compare(u,i,o)?(dl=new $e(u,i,o),vs=null,"double"):(vs=new $e(u,i,o),dl=null,"single")}function gs(i){var o=this,u=o.display;if(!(_t(o,i)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=i.shiftKey,Di(u,i)){j||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!qc(o,i)){var l=po(o,i),f=ns(i),v=l?Tr(l,f):"single";gt(o).focus(),f==1&&o.state.selectingText&&o.state.selectingText(i),!(l&&Gt(o,f,l,v,i))&&(f==1?l?tg(o,l,v,i):an(i)==u.scroller&&Xt(i):f==2?(l&&ua(o.doc,l),setTimeout(function(){return u.input.focus()},20)):f==3&&(X?o.display.input.onContextMenu(i):Ec(o)))}}}function Gt(i,o,u,l,f){var v="Click";return l=="double"?v="Double"+v:l=="triple"&&(v="Triple"+v),v=(o==1?"Left":o==2?"Middle":"Right")+v,Gs(i,Jv(v,f),f,function(S){if(typeof S=="string"&&(S=cl[S]),!S)return!1;var P=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),P=S(i,u)!=bt}finally{i.state.suppressEdits=!1}return P})}function eg(i,o,u){var l=i.getOption("configureMouse"),f=l?l(i,o,u):{};if(f.unit==null){var v=U?u.shiftKey&&u.metaKey:u.altKey;f.unit=v?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(f.extend==null||i.doc.extend)&&(f.extend=i.doc.extend||u.shiftKey),f.addNew==null&&(f.addNew=N?u.metaKey:u.ctrlKey),f.moveOnDrag==null&&(f.moveOnDrag=!(N?u.altKey:u.ctrlKey)),f}function tg(i,o,u,l){A?setTimeout(ut(Jp,i),0):i.curOp.focus=He(Ye(i));var f=eg(i,u,l),v=i.doc.sel,S;i.options.dragDrop&&ln&&!i.isReadOnly()&&u=="single"&&(S=v.contains(o))>-1&&(re((S=v.ranges[S]).from(),o)<0||o.xRel>0)&&(re(S.to(),o)>0||o.xRel<0)?s0(i,l,o,f):Zc(i,l,o,f)}function s0(i,o,u,l){var f=i.display,v=!1,S=Nr(i,function(D){j&&(f.scroller.draggable=!1),i.state.draggingText=!1,i.state.delayingBlurEvent&&(i.hasFocus()?i.state.delayingBlurEvent=!1:Ec(i)),Je(f.wrapper.ownerDocument,"mouseup",S),Je(f.wrapper.ownerDocument,"mousemove",P),Je(f.scroller,"dragstart",T),Je(f.scroller,"drop",S),v||(Xt(D),l.addNew||ua(i.doc,u,null,null,l.extend),j&&!ae||A&&O==9?setTimeout(function(){f.wrapper.ownerDocument.body.focus({preventScroll:!0}),f.input.focus()},20):f.input.focus())}),P=function(D){v=v||Math.abs(o.clientX-D.clientX)+Math.abs(o.clientY-D.clientY)>=10},T=function(){return v=!0};j&&(f.scroller.draggable=!0),i.state.draggingText=S,S.copy=!l.moveOnDrag,pe(f.wrapper.ownerDocument,"mouseup",S),pe(f.wrapper.ownerDocument,"mousemove",P),pe(f.scroller,"dragstart",T),pe(f.scroller,"drop",S),i.state.delayingBlurEvent=!0,setTimeout(function(){return f.input.focus()},20),f.scroller.dragDrop&&f.scroller.dragDrop()}function wd(i,o,u){if(u=="char")return new it(o,o);if(u=="word")return i.findWordAt(o);if(u=="line")return new it(F(o.line,0),nt(i.doc,F(o.line+1,0)));var l=u(i,o);return new it(l.from,l.to)}function Zc(i,o,u,l){A&&Ec(i);var f=i.display,v=i.doc;Xt(o);var S,P,T=v.sel,D=T.ranges;if(l.addNew&&!l.extend?(P=v.sel.contains(u),P>-1?S=D[P]:S=new it(u,u)):(S=v.sel.primary(),P=v.sel.primIndex),l.unit=="rectangle")l.addNew||(S=new it(u,u)),u=po(i,o,!0,!0),P=-1;else{var oe=wd(i,u,l.unit);l.extend?S=la(S,oe.anchor,oe.head,l.extend):S=oe}l.addNew?P==-1?(P=D.length,fn(v,Si(i,D.concat([S]),P),{scroll:!1,origin:"*mouse"})):D.length>1&&D[P].empty()&&l.unit=="char"&&!l.extend?(fn(v,Si(i,D.slice(0,P).concat(D.slice(P+1)),0),{scroll:!1,origin:"*mouse"}),T=v.sel):Mc(v,P,S,Rt):(P=0,fn(v,new Jn([S],0),Rt),T=v.sel);var fe=u;function we(We){if(re(fe,We)!=0)if(fe=We,l.unit=="rectangle"){for(var Xe=[],ct=i.options.tabSize,at=lt(rt(v,u.line).text,u.ch,ct),It=lt(rt(v,We.line).text,We.ch,ct),mr=Math.min(at,It),Gr=Math.max(at,It),Cr=Math.min(u.line,We.line),Ln=Math.min(i.lastLine(),Math.max(u.line,We.line));Cr<=Ln;Cr++){var Pn=rt(v,Cr).text,Br=kr(Pn,mr,ct);mr==Gr?Xe.push(new it(F(Cr,Br),F(Cr,Br))):Pn.length>Br&&Xe.push(new it(F(Cr,Br),F(Cr,kr(Pn,Gr,ct))))}Xe.length||Xe.push(new it(u,u)),fn(v,Si(i,T.ranges.slice(0,P).concat(Xe),P),{origin:"*mouse",scroll:!1}),i.scrollIntoView(We)}else{var Dn=S,pn=wd(i,We,l.unit),$r=Dn.anchor,Mr;re(pn.anchor,$r)>0?(Mr=pn.head,$r=jt(Dn.from(),pn.anchor)):(Mr=pn.anchor,$r=St(Dn.to(),pn.head));var vr=T.ranges.slice(0);vr[P]=gu(i,new it(nt(v,$r),Mr)),fn(v,Si(i,vr,P),Rt)}}var ge=f.wrapper.getBoundingClientRect(),Ve=0;function Ie(We){var Xe=++Ve,ct=po(i,We,!0,l.unit=="rectangle");if(ct)if(re(ct,fe)!=0){i.curOp.focus=He(Ye(i)),we(ct);var at=Ns(f,v);(ct.line>=at.to||ct.line<at.from)&&setTimeout(Nr(i,function(){Ve==Xe&&Ie(We)}),150)}else{var It=We.clientY<ge.top?-20:We.clientY>ge.bottom?20:0;It&&setTimeout(Nr(i,function(){Ve==Xe&&(f.scroller.scrollTop+=It,Ie(We))}),50)}}function De(We){i.state.selectingText=!1,Ve=1/0,We&&(Xt(We),f.input.focus()),Je(f.wrapper.ownerDocument,"mousemove",Ue),Je(f.wrapper.ownerDocument,"mouseup",Ge),v.history.lastSelOrigin=null}var Ue=Nr(i,function(We){We.buttons===0||!ns(We)?De(We):Ie(We)}),Ge=Nr(i,De);i.state.selectingText=Ge,pe(f.wrapper.ownerDocument,"mousemove",Ue),pe(f.wrapper.ownerDocument,"mouseup",Ge)}function gu(i,o){var u=o.anchor,l=o.head,f=rt(i.doc,u.line);if(re(u,l)==0&&u.sticky==l.sticky)return o;var v=mt(f);if(!v)return o;var S=Ft(v,u.ch,u.sticky),P=v[S];if(P.from!=u.ch&&P.to!=u.ch)return o;var T=S+(P.from==u.ch==(P.level!=1)?0:1);if(T==0||T==v.length)return o;var D;if(l.line!=u.line)D=(l.line-u.line)*(i.doc.direction=="ltr"?1:-1)>0;else{var oe=Ft(v,l.ch,l.sticky),fe=oe-S||(l.ch-u.ch)*(P.level==1?-1:1);oe==T-1||oe==T?D=fe<0:D=fe>0}var we=v[T+(D?-1:0)],ge=D==(we.level==1),Ve=ge?we.from:we.to,Ie=ge?"after":"before";return u.ch==Ve&&u.sticky==Ie?o:new it(new F(u.line,Ve,Ie),l)}function hl(i,o,u,l){var f,v;if(o.touches)f=o.touches[0].clientX,v=o.touches[0].clientY;else try{f=o.clientX,v=o.clientY}catch(we){return!1}if(f>=Math.floor(i.display.gutters.getBoundingClientRect().right))return!1;l&&Xt(o);var S=i.display,P=S.lineDiv.getBoundingClientRect();if(v>P.bottom||!Sr(i,u))return rs(o);v-=P.top-S.viewOffset;for(var T=0;T<i.display.gutterSpecs.length;++T){var D=S.gutters.childNodes[T];if(D&&D.getBoundingClientRect().right>=f){var oe=ls(i.doc,v),fe=i.display.gutterSpecs[T];return xt(i,u,i,oe,fe.className,o),rs(o)}}}function qc(i,o){return hl(i,o,"gutterClick",!0)}function lr(i,o){Di(i.display,o)||rg(i,o)||_t(i,o,"contextmenu")||X||i.display.input.onContextMenu(o)}function rg(i,o){return Sr(i,"gutterContextMenu")?hl(i,o,"gutterContextMenu",!1):!1}function yu(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Xo(i)}var wi={toString:function(){return"CodeMirror.Init"}},ml={},bu={};function xu(i){var o=i.optionHandlers;function u(l,f,v,S){i.defaults[l]=f,v&&(o[l]=S?function(P,T,D){D!=wi&&v(P,T,D)}:v)}i.defineOption=u,i.Init=wi,u("value","",function(l,f){return l.setValue(f)},!0),u("mode",null,function(l,f){l.doc.modeOption=f,Rc(l)},!0),u("indentUnit",2,Rc,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(l){tl(l),Xo(l),Cn(l)},!0),u("lineSeparator",null,function(l,f){if(l.doc.lineSep=f,!!f){var v=[],S=l.doc.first;l.doc.iter(function(T){for(var D=0;;){var oe=T.text.indexOf(f,D);if(oe==-1)break;D=oe+f.length,v.push(F(S,oe))}S++});for(var P=v.length-1;P>=0;P--)yo(l.doc,f,v[P],F(v[P].line,v[P].ch+f.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(l,f,v){l.state.specialChars=new RegExp(f.source+(f.test(" ")?"":"| "),"g"),v!=wi&&l.refresh()}),u("specialCharPlaceholder",dv,function(l){return l.refresh()},!0),u("electricChars",!0),u("inputStyle",E?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(l,f){return l.getInputField().spellcheck=f},!0),u("autocorrect",!1,function(l,f){return l.getInputField().autocorrect=f},!0),u("autocapitalize",!1,function(l,f){return l.getInputField().autocapitalize=f},!0),u("rtlMoveVisually",!se),u("wholeLineUpdateBefore",!0),u("theme","default",function(l){yu(l),qa(l)},!0),u("keyMap","default",function(l,f,v){var S=mu(f),P=v!=wi&&mu(v);P&&P.detach&&P.detach(l,S),S.attach&&S.attach(l,P||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,ig,!0),u("gutters",[],function(l,f){l.display.gutterSpecs=jc(f,l.options.lineNumbers),qa(l)},!0),u("fixedGutter",!0,function(l,f){l.display.gutters.style.left=f?bc(l.display)+"px":"0",l.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(l){return vo(l)},!0),u("scrollbarStyle","native",function(l){Qp(l),vo(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),u("lineNumbers",!1,function(l,f){l.display.gutterSpecs=jc(l.options.gutters,f),qa(l)},!0),u("firstLineNumber",1,qa,!0),u("lineNumberFormatter",function(l){return l},qa,!0),u("showCursorWhenSelecting",!1,Ds,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(l,f){f=="nocursor"&&(Ka(l),l.display.input.blur()),l.display.input.readOnlyChanged(f)}),u("screenReaderLabel",null,function(l,f){f=f===""?null:f,l.display.input.screenReaderLabelChanged(f)}),u("disableInput",!1,function(l,f){f||l.display.input.reset()},!0),u("dragDrop",!0,ng),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Ds,!0),u("singleCursorHeightPerLine",!0,Ds,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,tl,!0),u("addModeClass",!1,tl,!0),u("pollInterval",100),u("undoDepth",200,function(l,f){return l.doc.history.undoDepth=f}),u("historyEventDelay",1250),u("viewportMargin",10,function(l){return l.refresh()},!0),u("maxHighlightLength",1e4,tl,!0),u("moveInputWithCursor",!0,function(l,f){f||l.display.input.resetPosition()}),u("tabindex",null,function(l,f){return l.display.input.getField().tabIndex=f||""}),u("autofocus",null),u("direction","ltr",function(l,f){return l.doc.setDirection(f)},!0),u("phrases",null)}function ng(i,o,u){var l=u&&u!=wi;if(!o!=!l){var f=i.display.dragFunctions,v=o?pe:Je;v(i.display.scroller,"dragstart",f.start),v(i.display.scroller,"dragenter",f.enter),v(i.display.scroller,"dragover",f.over),v(i.display.scroller,"dragleave",f.leave),v(i.display.scroller,"drop",f.drop)}}function ig(i){i.options.lineWrapping?(Re(i.display.wrapper,"CodeMirror-wrap"),i.display.sizer.style.minWidth="",i.display.sizerWidth=null):(H(i.display.wrapper,"CodeMirror-wrap"),zl(i)),xc(i),Cn(i),Xo(i),setTimeout(function(){return vo(i)},100)}function wr(i,o){var u=this;if(!(this instanceof wr))return new wr(i,o);this.options=o=o?yt(o):{},yt(ml,o,!1);var l=o.value;typeof l=="string"?l=new tn(l,o.mode,null,o.lineSeparator,o.direction):o.mode&&(l.modeOption=o.mode),this.doc=l;var f=new wr.inputStyles[o.inputStyle](this),v=this.display=new jv(i,l,f,o);v.wrapper.CodeMirror=this,yu(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Qp(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 Ke,keySeq:null,specialChars:null},o.autofocus&&!E&&v.input.focus(),A&&O<11&&setTimeout(function(){return u.display.input.reset(!0)},20),vl(this),Gv(),Bi(this),this.curOp.forceUpdate=!0,ou(this,l),o.autofocus&&!E||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&Ac(u)},20):Ka(this);for(var S in bu)bu.hasOwnProperty(S)&&bu[S](this,o[S],wi);td(this),o.finishInit&&o.finishInit(this);for(var P=0;P<ef.length;++P)ef[P](this);fs(this),j&&o.lineWrapping&&getComputedStyle(v.lineDiv).textRendering=="optimizelegibility"&&(v.lineDiv.style.textRendering="auto")}wr.defaults=ml,wr.optionHandlers=bu;function vl(i){var o=i.display;pe(o.scroller,"mousedown",Nr(i,gs)),A&&O<11?pe(o.scroller,"dblclick",Nr(i,function(T){if(!_t(i,T)){var D=po(i,T);if(!(!D||qc(i,T)||Di(i.display,T))){Xt(T);var oe=i.findWordAt(D);ua(i.doc,oe.anchor,oe.head)}}})):pe(o.scroller,"dblclick",function(T){return _t(i,T)||Xt(T)}),pe(o.scroller,"contextmenu",function(T){return lr(i,T)}),pe(o.input.getField(),"contextmenu",function(T){o.scroller.contains(T.target)||lr(i,T)});var u,l={end:0};function f(){o.activeTouch&&(u=setTimeout(function(){return o.activeTouch=null},1e3),l=o.activeTouch,l.end=+new Date)}function v(T){if(T.touches.length!=1)return!1;var D=T.touches[0];return D.radiusX<=1&&D.radiusY<=1}function S(T,D){if(D.left==null)return!0;var oe=D.left-T.left,fe=D.top-T.top;return oe*oe+fe*fe>20*20}pe(o.scroller,"touchstart",function(T){if(!_t(i,T)&&!v(T)&&!qc(i,T)){o.input.ensurePolled(),clearTimeout(u);var D=+new Date;o.activeTouch={start:D,moved:!1,prev:D-l.end<=300?l:null},T.touches.length==1&&(o.activeTouch.left=T.touches[0].pageX,o.activeTouch.top=T.touches[0].pageY)}}),pe(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),pe(o.scroller,"touchend",function(T){var D=o.activeTouch;if(D&&!Di(o,T)&&D.left!=null&&!D.moved&&new Date-D.start<300){var oe=i.coordsChar(o.activeTouch,"page"),fe;!D.prev||S(D,D.prev)?fe=new it(oe,oe):!D.prev.prev||S(D,D.prev.prev)?fe=i.findWordAt(oe):fe=new it(F(oe.line,0),nt(i.doc,F(oe.line+1,0))),i.setSelection(fe.anchor,fe.head),i.focus(),Xt(T)}f()}),pe(o.scroller,"touchcancel",f),pe(o.scroller,"scroll",function(){o.scroller.clientHeight&&(ta(i,o.scroller.scrollTop),$s(i,o.scroller.scrollLeft,!0),xt(i,"scroll",i))}),pe(o.scroller,"mousewheel",function(T){return id(i,T)}),pe(o.scroller,"DOMMouseScroll",function(T){return id(i,T)}),pe(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(T){_t(i,T)||on(T)},over:function(T){_t(i,T)||(Hv(i,T),on(T))},start:function(T){return Wv(i,T)},drop:Nr(i,yd),leave:function(T){_t(i,T)||zs(i)}};var P=o.input.getField();pe(P,"keyup",function(T){return qv.call(i,T)}),pe(P,"keydown",Nr(i,Sd)),pe(P,"keypress",Nr(i,br)),pe(P,"focus",function(T){return Ac(i,T)}),pe(P,"blur",function(T){return Ka(i,T)})}var ef=[];wr.defineInitHook=function(i){return ef.push(i)};function va(i,o,u,l){var f=i.doc,v;u==null&&(u="add"),u=="smart"&&(f.mode.indent?v=zo(i,o).state:u="prev");var S=i.options.tabSize,P=rt(f,o),T=lt(P.text,null,S);P.stateAfter&&(P.stateAfter=null);var D=P.text.match(/^\s*/)[0],oe;if(!l&&!/\S/.test(P.text))oe=0,u="not";else if(u=="smart"&&(oe=f.mode.indent(v,P.text.slice(D.length),P.text),oe==bt||oe>150)){if(!l)return;u="prev"}u=="prev"?o>f.first?oe=lt(rt(f,o-1).text,null,S):oe=0:u=="add"?oe=T+i.options.indentUnit:u=="subtract"?oe=T-i.options.indentUnit:typeof u=="number"&&(oe=T+u),oe=Math.max(0,oe);var fe="",we=0;if(i.options.indentWithTabs)for(var ge=Math.floor(oe/S);ge;--ge)we+=S,fe+=" ";if(we<oe&&(fe+=qr(oe-we)),fe!=D)return yo(f,fe,F(o,0),F(o,D.length),"+input"),P.stateAfter=null,!0;for(var Ve=0;Ve<f.sel.ranges.length;Ve++){var Ie=f.sel.ranges[Ve];if(Ie.head.line==o&&Ie.head.ch<D.length){var De=F(o,D.length);Mc(f,Ve,new it(De,De));break}}}var ii=null;function gl(i){ii=i}function si(i,o,u,l,f){var v=i.doc;i.display.shift=!1,l||(l=v.sel);var S=+new Date-200,P=f=="paste"||i.state.pasteIncoming>S,T=Fi(o),D=null;if(P&&l.ranges.length>1)if(ii&&ii.text.join(`
22
+ left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");i.display.lineSpace.appendChild(S),S.scrollIntoView(f),i.display.lineSpace.removeChild(S)}}}function Tv(i,o,u,l){l==null&&(l=0);var f;!i.options.lineWrapping&&o==u&&(u=o.sticky=="before"?F(o.line,o.ch+1,"before"):o,o=o.ch?F(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var v=0;v<5;v++){var S=!1,P=zr(i,o),T=!u||u==o?P:zr(i,u);f={left:Math.min(P.left,T.left),top:Math.min(P.top,T.top)-l,right:Math.max(P.left,T.left),bottom:Math.max(P.bottom,T.bottom)+l};var D=Cc(i,f),oe=i.doc.scrollTop,fe=i.doc.scrollLeft;if(D.scrollTop!=null&&(ta(i,D.scrollTop),Math.abs(i.doc.scrollTop-oe)>1&&(S=!0)),D.scrollLeft!=null&&($s(i,D.scrollLeft),Math.abs(i.doc.scrollLeft-fe)>1&&(S=!0)),!S)break}return f}function Yp(i,o){var u=Cc(i,o);u.scrollTop!=null&&ta(i,u.scrollTop),u.scrollLeft!=null&&$s(i,u.scrollLeft)}function Cc(i,o){var u=i.display,l=Qo(i.display);o.top<0&&(o.top=0);var f=i.curOp&&i.curOp.scrollTop!=null?i.curOp.scrollTop:u.scroller.scrollTop,v=Kl(i),S={};o.bottom-o.top>v&&(o.bottom=o.top+v);var P=i.doc.height+dc(u),T=o.top<l,D=o.bottom>P-l;if(o.top<f)S.scrollTop=T?0:o.top;else if(o.bottom>f+v){var oe=Math.min(o.top,(D?P:o.bottom)-v);oe!=f&&(S.scrollTop=oe)}var fe=i.options.fixedGutter?0:u.gutters.offsetWidth,we=i.curOp&&i.curOp.scrollLeft!=null?i.curOp.scrollLeft:u.scroller.scrollLeft-fe,ge=Rs(i)-u.gutters.offsetWidth,Ve=o.right-o.left>ge;return Ve&&(o.right=o.left+ge),o.left<10?S.scrollLeft=0:o.left<we?S.scrollLeft=Math.max(0,o.left+fe-(Ve?0:10)):o.right>ge+we-3&&(S.scrollLeft=o.right+(Ve?0:10)-ge),S}function eu(i,o){o!=null&&(tu(i),i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+o)}function Bs(i){tu(i);var o=i.getCursor();i.curOp.scrollToPos={from:o,to:o,margin:i.options.cursorScrollMargin}}function ea(i,o,u){(o!=null||u!=null)&&tu(i),o!=null&&(i.curOp.scrollLeft=o),u!=null&&(i.curOp.scrollTop=u)}function Vv(i,o){tu(i),i.curOp.scrollToPos=o}function tu(i){var o=i.curOp.scrollToPos;if(o){i.curOp.scrollToPos=null;var u=Hp(i,o.from),l=Hp(i,o.to);_c(i,u,l,o.margin)}}function _c(i,o,u,l){var f=Cc(i,{left:Math.min(o.left,u.left),top:Math.min(o.top,u.top)-l,right:Math.max(o.right,u.right),bottom:Math.max(o.bottom,u.bottom)+l});ea(i,f.scrollLeft,f.scrollTop)}function ta(i,o){Math.abs(i.doc.scrollTop-o)<2||(m||iu(i,{top:o}),Xp(i,o,!0),m&&iu(i),Ja(i,100))}function Xp(i,o,u){o=Math.max(0,Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,o)),!(i.display.scroller.scrollTop==o&&!u)&&(i.doc.scrollTop=o,i.display.scrollbars.setScrollTop(o),i.display.scroller.scrollTop!=o&&(i.display.scroller.scrollTop=o))}function $s(i,o,u,l){o=Math.max(0,Math.min(o,i.display.scroller.scrollWidth-i.display.scroller.clientWidth)),!((u?o==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-o)<2)&&!l)&&(i.doc.scrollLeft=o,ed(i),i.display.scroller.scrollLeft!=o&&(i.display.scroller.scrollLeft=o),i.display.scrollbars.setScrollLeft(o))}function ra(i){var o=i.display,u=o.gutters.offsetWidth,l=Math.round(i.doc.height+dc(i.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:i.options.fixedGutter?u:0,docHeight:l,scrollHeight:l+Mn(i)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:u}}var mo=function(i,o,u){this.cm=u;var l=this.vert=Z("div",[Z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),f=this.horiz=Z("div",[Z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=f.tabIndex=-1,i(l),i(f),pe(l,"scroll",function(){l.clientHeight&&o(l.scrollTop,"vertical")}),pe(f,"scroll",function(){f.clientWidth&&o(f.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,A&&O<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mo.prototype.update=function(i){var o=i.scrollWidth>i.clientWidth+1,u=i.scrollHeight>i.clientHeight+1,l=i.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=o?l+"px":"0";var f=i.viewHeight-(o?l:0);this.vert.firstChild.style.height=Math.max(0,i.scrollHeight-i.clientHeight+f)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=u?l+"px":"0",this.horiz.style.left=i.barLeft+"px";var v=i.viewWidth-i.barLeft-(u?l:0);this.horiz.firstChild.style.width=Math.max(0,i.scrollWidth-i.clientWidth+v)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&i.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?l:0,bottom:o?l:0}},mo.prototype.setScrollLeft=function(i){this.horiz.scrollLeft!=i&&(this.horiz.scrollLeft=i),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mo.prototype.setScrollTop=function(i){this.vert.scrollTop!=i&&(this.vert.scrollTop=i),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mo.prototype.zeroWidthHack=function(){var i=N&&!q?"12px":"18px";this.horiz.style.height=this.vert.style.width=i,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ke,this.disableVert=new Ke},mo.prototype.enableZeroWidthBar=function(i,o,u){i.style.visibility="";function l(){var f=i.getBoundingClientRect(),v=u=="vert"?document.elementFromPoint(f.right-1,(f.top+f.bottom)/2):document.elementFromPoint((f.right+f.left)/2,f.bottom-1);v!=i?i.style.visibility="hidden":o.set(1e3,l)}o.set(1e3,l)},mo.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz),i.removeChild(this.vert)};var na=function(){};na.prototype.update=function(){return{bottom:0,right:0}},na.prototype.setScrollLeft=function(){},na.prototype.setScrollTop=function(){},na.prototype.clear=function(){};function vo(i,o){o||(o=ra(i));var u=i.display.barWidth,l=i.display.barHeight;ru(i,o);for(var f=0;f<4&&u!=i.display.barWidth||l!=i.display.barHeight;f++)u!=i.display.barWidth&&i.options.lineWrapping&&Zl(i),ru(i,ra(i)),u=i.display.barWidth,l=i.display.barHeight}function ru(i,o){var u=i.display,l=u.scrollbars.update(o);u.sizer.style.paddingRight=(u.barWidth=l.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=l.bottom)+"px",u.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=l.bottom+"px",u.scrollbarFiller.style.width=l.right+"px"):u.scrollbarFiller.style.display="",l.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=l.bottom+"px",u.gutterFiller.style.width=o.gutterWidth+"px"):u.gutterFiller.style.display=""}var Pc={native:mo,null:na};function Qp(i){i.display.scrollbars&&(i.display.scrollbars.clear(),i.display.scrollbars.addClass&&H(i.display.wrapper,i.display.scrollbars.addClass)),i.display.scrollbars=new Pc[i.options.scrollbarStyle](function(o){i.display.wrapper.insertBefore(o,i.display.scrollbarFiller),pe(o,"mousedown",function(){i.state.focused&&setTimeout(function(){return i.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,u){u=="horizontal"?$s(i,o):ta(i,o)},i),i.display.scrollbars.addClass&&Re(i.display.wrapper,i.display.scrollbars.addClass)}var kv=0;function Ni(i){i.curOp={cm:i,viewChanged:!1,startHeight:i.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:++kv,markArrays:null},Gl(i.curOp)}function fs(i){var o=i.curOp;o&&yv(o,function(u){for(var l=0;l<u.ops.length;l++)u.ops[l].cm.curOp=null;Kn(u)})}function Kn(i){for(var o=i.ops,u=0;u<o.length;u++)Tc(o[u]);for(var l=0;l<o.length;l++)ps(o[l]);for(var f=0;f<o.length;f++)Zp(o[f]);for(var v=0;v<o.length;v++)qp(o[v]);for(var S=0;S<o.length;S++)n0(o[S])}function Tc(i){var o=i.cm,u=o.display;Ya(o),i.updateMaxLine&&zl(o),i.mustUpdate=i.viewChanged||i.forceUpdate||i.scrollTop!=null||i.scrollToPos&&(i.scrollToPos.from.line<u.viewFrom||i.scrollToPos.to.line>=u.viewTo)||u.maxLineChanged&&o.options.lineWrapping,i.update=i.mustUpdate&&new nu(o,i.mustUpdate&&{top:i.scrollTop,ensure:i.scrollToPos},i.forceUpdate)}function ps(i){i.updatedDisplay=i.mustUpdate&&Vc(i.cm,i.update)}function Zp(i){var o=i.cm,u=o.display;i.updatedDisplay&&Zl(o),i.barMeasure=ra(o),u.maxLineChanged&&!o.options.lineWrapping&&(i.adjustWidthTo=hc(o,u.maxLine,u.maxLine.text.length).left+3,o.display.sizerWidth=i.adjustWidthTo,i.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+i.adjustWidthTo+Mn(o)+o.display.barWidth),i.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+i.adjustWidthTo-Rs(o))),(i.updatedDisplay||i.selectionChanged)&&(i.preparedSelection=u.input.prepareSelection())}function qp(i){var o=i.cm;i.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=i.adjustWidthTo+"px",i.maxScrollLeft<o.doc.scrollLeft&&$s(o,Math.min(o.display.scroller.scrollLeft,i.maxScrollLeft),!0),o.display.maxLineChanged=!1);var u=i.focus&&i.focus==He(Ye(o));i.preparedSelection&&o.display.input.showSelection(i.preparedSelection,u),(i.updatedDisplay||i.startHeight!=o.doc.height)&&vo(o,i.barMeasure),i.updatedDisplay&&kc(o,i.barMeasure),i.selectionChanged&&Ga(o),o.state.focused&&i.updateInput&&o.display.input.reset(i.typing),u&&Jp(i.cm)}function n0(i){var o=i.cm,u=o.display,l=o.doc;if(i.updatedDisplay&&Xa(o,i.update),u.wheelStartX!=null&&(i.scrollTop!=null||i.scrollLeft!=null||i.scrollToPos)&&(u.wheelStartX=u.wheelStartY=null),i.scrollTop!=null&&Xp(o,i.scrollTop,i.forceScroll),i.scrollLeft!=null&&$s(o,i.scrollLeft,!0,!0),i.scrollToPos){var f=Tv(o,nt(l,i.scrollToPos.from),nt(l,i.scrollToPos.to),i.scrollToPos.margin);Pv(o,f)}var v=i.maybeHiddenMarkers,S=i.maybeUnhiddenMarkers;if(v)for(var P=0;P<v.length;++P)v[P].lines.length||xt(v[P],"hide");if(S)for(var T=0;T<S.length;++T)S[T].lines.length&&xt(S[T],"unhide");u.wrapper.offsetHeight&&(l.scrollTop=o.display.scroller.scrollTop),i.changeObjs&&xt(o,"changes",o,i.changeObjs),i.update&&i.update.finish()}function yn(i,o){if(i.curOp)return o();Ni(i);try{return o()}finally{fs(i)}}function Nr(i,o){return function(){if(i.curOp)return o.apply(i,arguments);Ni(i);try{return o.apply(i,arguments)}finally{fs(i)}}}function cn(i){return function(){if(this.curOp)return i.apply(this,arguments);Ni(this);try{return i.apply(this,arguments)}finally{fs(this)}}}function Mt(i){return function(){var o=this.cm;if(!o||o.curOp)return i.apply(this,arguments);Ni(o);try{return i.apply(this,arguments)}finally{fs(o)}}}function Ja(i,o){i.doc.highlightFrontier<i.display.viewTo&&i.state.highlight.set(o,ut(ia,i))}function ia(i){var o=i.doc;if(!(o.highlightFrontier>=i.display.viewTo)){var u=+new Date+i.options.workTime,l=zo(i,o.highlightFrontier),f=[];o.iter(l.line,Math.min(o.first+o.size,i.display.viewTo+500),function(v){if(l.line>=i.display.viewFrom){var S=v.styles,P=v.text.length>i.options.maxHighlightLength?ri(o.mode,l.state):null,T=nc(i,v,l,!0);P&&(l.state=P),v.styles=T.styles;var D=v.styleClasses,oe=T.classes;oe?v.styleClasses=oe:D&&(v.styleClasses=null);for(var fe=!S||S.length!=v.styles.length||D!=oe&&(!D||!oe||D.bgClass!=oe.bgClass||D.textClass!=oe.textClass),we=0;!fe&&we<S.length;++we)fe=S[we]!=v.styles[we];fe&&f.push(l.line),v.stateAfter=l.save(),l.nextLine()}else v.text.length<=i.options.maxHighlightLength&&ni(i,v.text,l),v.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>u)return Ja(i,i.options.workDelay),!0}),o.highlightFrontier=l.line,o.modeFrontier=Math.max(o.modeFrontier,l.line),f.length&&yn(i,function(){for(var v=0;v<f.length;v++)Ms(i,f[v],"text")})}}var nu=function(i,o,u){var l=i.display;this.viewport=o,this.visible=Ns(l,i.doc,o),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Rs(i),this.force=u,this.dims=yc(i),this.events=[]};nu.prototype.signal=function(i,o){Sr(i,o)&&this.events.push(arguments)},nu.prototype.finish=function(){for(var i=0;i<this.events.length;i++)xt.apply(null,this.events[i])};function Ya(i){var o=i.display;!o.scrollbarsClipped&&o.scroller.offsetWidth&&(o.nativeBarWidth=o.scroller.offsetWidth-o.scroller.clientWidth,o.heightForcer.style.height=Mn(i)+"px",o.sizer.style.marginBottom=-o.nativeBarWidth+"px",o.sizer.style.borderRightWidth=Mn(i)+"px",o.scrollbarsClipped=!0)}function go(i){if(i.hasFocus())return null;var o=He(Ye(i));if(!o||!Ne(i.display.lineDiv,o))return null;var u={activeElt:o};if(window.getSelection){var l=gt(i).getSelection();l.anchorNode&&l.extend&&Ne(i.display.lineDiv,l.anchorNode)&&(u.anchorNode=l.anchorNode,u.anchorOffset=l.anchorOffset,u.focusNode=l.focusNode,u.focusOffset=l.focusOffset)}return u}function Us(i){if(!(!i||!i.activeElt||i.activeElt==He(i.activeElt.ownerDocument))&&(i.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(i.activeElt.nodeName)&&i.anchorNode&&Ne(document.body,i.anchorNode)&&Ne(document.body,i.focusNode))){var o=i.activeElt.ownerDocument,u=o.defaultView.getSelection(),l=o.createRange();l.setEnd(i.anchorNode,i.anchorOffset),l.collapse(!1),u.removeAllRanges(),u.addRange(l),u.extend(i.focusNode,i.focusOffset)}}function Vc(i,o){var u=i.display,l=i.doc;if(o.editorIsHidden)return Ls(i),!1;if(!o.force&&o.visible.from>=u.viewFrom&&o.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&Sc(i)==0)return!1;td(i)&&(Ls(i),o.dims=yc(i));var f=l.first+l.size,v=Math.max(o.visible.from-i.options.viewportMargin,l.first),S=Math.min(f,o.visible.to+i.options.viewportMargin);u.viewFrom<v&&v-u.viewFrom<20&&(v=Math.max(l.first,u.viewFrom)),u.viewTo>S&&u.viewTo-S<20&&(S=Math.min(f,u.viewTo)),Mi&&(v=ac(i.doc,v),S=lc(i.doc,S));var P=v!=u.viewFrom||S!=u.viewTo||u.lastWrapHeight!=o.wrapperHeight||u.lastWrapWidth!=o.wrapperWidth;_v(i,v,S),u.viewOffset=us(rt(i.doc,u.viewFrom)),i.display.mover.style.top=u.viewOffset+"px";var T=Sc(i);if(!P&&T==0&&!o.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var D=go(i);return T>4&&(u.lineDiv.style.display="none"),Qa(i,u.updateLineNumbers,o.dims),T>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,Us(D),de(u.cursorDiv),de(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,P&&(u.lastWrapHeight=o.wrapperHeight,u.lastWrapWidth=o.wrapperWidth,Ja(i,400)),u.updateLineNumbers=null,!0}function Xa(i,o){for(var u=o.viewport,l=!0;;l=!1){if(!l||!i.options.lineWrapping||o.oldDisplayWidth==Rs(i)){if(u&&u.top!=null&&(u={top:Math.min(i.doc.height+dc(i.display)-Kl(i),u.top)}),o.visible=Ns(i.display,i.doc,u),o.visible.from>=i.display.viewFrom&&o.visible.to<=i.display.viewTo)break}else l&&(o.visible=Ns(i.display,i.doc,u));if(!Vc(i,o))break;Zl(i);var f=ra(i);Ds(i),vo(i,f),kc(i,f),o.force=!1}o.signal(i,"update",i),(i.display.viewFrom!=i.display.reportedViewFrom||i.display.viewTo!=i.display.reportedViewTo)&&(o.signal(i,"viewportChange",i,i.display.viewFrom,i.display.viewTo),i.display.reportedViewFrom=i.display.viewFrom,i.display.reportedViewTo=i.display.viewTo)}function iu(i,o){var u=new nu(i,o);if(Vc(i,u)){Zl(i),Xa(i,u);var l=ra(i);Ds(i),vo(i,l),kc(i,l),u.finish()}}function Qa(i,o,u){var l=i.display,f=i.options.lineNumbers,v=l.lineDiv,S=v.firstChild;function P(Ve){var Ie=Ve.nextSibling;return j&&N&&i.display.currentWheelTarget==Ve?Ve.style.display="none":Ve.parentNode.removeChild(Ve),Ie}for(var T=l.view,D=l.viewFrom,oe=0;oe<T.length;oe++){var fe=T[oe];if(!fe.hidden)if(!fe.node||fe.node.parentNode!=v){var we=xv(i,fe,D,u);v.insertBefore(we,S)}else{for(;S!=fe.node;)S=P(S);var ge=f&&o!=null&&o<=D&&fe.lineNumber;fe.changes&&(Fe(fe.changes,"gutter")>-1&&(ge=!1),pc(i,fe,D,u)),ge&&(de(fe.lineNumber),fe.lineNumber.appendChild(document.createTextNode(lo(i.options,D)))),S=fe.node.nextSibling}D+=fe.size}for(;S;)S=P(S)}function Za(i){var o=i.gutters.offsetWidth;i.sizer.style.marginLeft=o+"px",Hr(i,"gutterChanged",i)}function kc(i,o){i.display.sizer.style.minHeight=o.docHeight+"px",i.display.heightForcer.style.top=o.docHeight+"px",i.display.gutters.style.height=o.docHeight+i.display.barHeight+Mn(i)+"px"}function ed(i){var o=i.display,u=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!i.options.fixedGutter))){for(var l=bc(o)-o.scroller.scrollLeft+i.doc.scrollLeft,f=o.gutters.offsetWidth,v=l+"px",S=0;S<u.length;S++)if(!u[S].hidden){i.options.fixedGutter&&(u[S].gutter&&(u[S].gutter.style.left=v),u[S].gutterBackground&&(u[S].gutterBackground.style.left=v));var P=u[S].alignable;if(P)for(var T=0;T<P.length;T++)P[T].style.left=v}i.options.fixedGutter&&(o.gutters.style.left=l+f+"px")}}function td(i){if(!i.options.lineNumbers)return!1;var o=i.doc,u=lo(i.options,o.first+o.size-1),l=i.display;if(u.length!=l.lineNumChars){var f=l.measure.appendChild(Z("div",[Z("div",u)],"CodeMirror-linenumber CodeMirror-gutter-elt")),v=f.firstChild.offsetWidth,S=f.offsetWidth-v;return l.lineGutter.style.width="",l.lineNumInnerWidth=Math.max(v,l.lineGutter.offsetWidth-S)+1,l.lineNumWidth=l.lineNumInnerWidth+S,l.lineNumChars=l.lineNumInnerWidth?u.length:-1,l.lineGutter.style.width=l.lineNumWidth+"px",Za(i.display),!0}return!1}function jc(i,o){for(var u=[],l=!1,f=0;f<i.length;f++){var v=i[f],S=null;if(typeof v!="string"&&(S=v.style,v=v.className),v=="CodeMirror-linenumbers")if(o)l=!0;else continue;u.push({className:v,style:S})}return o&&!l&&u.push({className:"CodeMirror-linenumbers",style:null}),u}function rd(i){var o=i.gutters,u=i.gutterSpecs;de(o),i.lineGutter=null;for(var l=0;l<u.length;++l){var f=u[l],v=f.className,S=f.style,P=o.appendChild(Z("div",null,"CodeMirror-gutter "+v));S&&(P.style.cssText=S),v=="CodeMirror-linenumbers"&&(i.lineGutter=P,P.style.width=(i.lineNumWidth||1)+"px")}o.style.display=u.length?"":"none",Za(i)}function qa(i){rd(i.display),Cn(i),ed(i)}function jv(i,o,u,l){var f=this;this.input=u,f.scrollbarFiller=Z("div",null,"CodeMirror-scrollbar-filler"),f.scrollbarFiller.setAttribute("cm-not-content","true"),f.gutterFiller=Z("div",null,"CodeMirror-gutter-filler"),f.gutterFiller.setAttribute("cm-not-content","true"),f.lineDiv=xe("div",null,"CodeMirror-code"),f.selectionDiv=Z("div",null,null,"position: relative; z-index: 1"),f.cursorDiv=Z("div",null,"CodeMirror-cursors"),f.measure=Z("div",null,"CodeMirror-measure"),f.lineMeasure=Z("div",null,"CodeMirror-measure"),f.lineSpace=xe("div",[f.measure,f.lineMeasure,f.selectionDiv,f.cursorDiv,f.lineDiv],null,"position: relative; outline: none");var v=xe("div",[f.lineSpace],"CodeMirror-lines");f.mover=Z("div",[v],null,"position: relative"),f.sizer=Z("div",[f.mover],"CodeMirror-sizer"),f.sizerWidth=null,f.heightForcer=Z("div",null,null,"position: absolute; height: "+qe+"px; width: 1px;"),f.gutters=Z("div",null,"CodeMirror-gutters"),f.lineGutter=null,f.scroller=Z("div",[f.sizer,f.heightForcer,f.gutters],"CodeMirror-scroll"),f.scroller.setAttribute("tabIndex","-1"),f.wrapper=Z("div",[f.scrollbarFiller,f.gutterFiller,f.scroller],"CodeMirror"),K&&ie>=105&&(f.wrapper.style.clipPath="inset(0px)"),f.wrapper.setAttribute("translate","no"),A&&O<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),!j&&!(m&&E)&&(f.scroller.draggable=!0),i&&(i.appendChild?i.appendChild(f.wrapper):i(f.wrapper)),f.viewFrom=f.viewTo=o.first,f.reportedViewFrom=f.reportedViewTo=o.first,f.view=[],f.renderedView=null,f.externalMeasured=null,f.viewOffset=0,f.lastWrapHeight=f.lastWrapWidth=0,f.updateLineNumbers=null,f.nativeBarWidth=f.barHeight=f.barWidth=0,f.scrollbarsClipped=!1,f.lineNumWidth=f.lineNumInnerWidth=f.lineNumChars=null,f.alignWidgets=!1,f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.maxLine=null,f.maxLineLength=0,f.maxLineChanged=!1,f.wheelDX=f.wheelDY=f.wheelStartX=f.wheelStartY=null,f.shift=!1,f.selForContextMenu=null,f.activeTouch=null,f.gutterSpecs=jc(l.gutters,l.lineNumbers),rd(f),u.init(f)}var sa=0,bi=null;A?bi=-.53:m?bi=15:K?bi=-.7:ae&&(bi=-1/3);function nd(i){var o=i.wheelDeltaX,u=i.wheelDeltaY;return o==null&&i.detail&&i.axis==i.HORIZONTAL_AXIS&&(o=i.detail),u==null&&i.detail&&i.axis==i.VERTICAL_AXIS?u=i.detail:u==null&&(u=i.wheelDelta),{x:o,y:u}}function i0(i){var o=nd(i);return o.x*=bi,o.y*=bi,o}function id(i,o){K&&ie==102&&(i.display.chromeScrollHack==null?i.display.sizer.style.pointerEvents="none":clearTimeout(i.display.chromeScrollHack),i.display.chromeScrollHack=setTimeout(function(){i.display.chromeScrollHack=null,i.display.sizer.style.pointerEvents=""},100));var u=nd(o),l=u.x,f=u.y,v=bi;o.deltaMode===0&&(l=o.deltaX,f=o.deltaY,v=1);var S=i.display,P=S.scroller,T=P.scrollWidth>P.clientWidth,D=P.scrollHeight>P.clientHeight;if(l&&T||f&&D){if(f&&N&&j){e:for(var oe=o.target,fe=S.view;oe!=P;oe=oe.parentNode)for(var we=0;we<fe.length;we++)if(fe[we].node==oe){i.display.currentWheelTarget=oe;break e}}if(l&&!m&&!ee&&v!=null){f&&D&&ta(i,Math.max(0,P.scrollTop+f*v)),$s(i,Math.max(0,P.scrollLeft+l*v)),(!f||f&&D)&&Xt(o),S.wheelStartX=null;return}if(f&&v!=null){var ge=f*v,Ve=i.doc.scrollTop,Ie=Ve+S.wrapper.clientHeight;ge<0?Ve=Math.max(0,Ve+ge-50):Ie=Math.min(i.doc.height,Ie+ge+50),iu(i,{top:Ve,bottom:Ie})}sa<20&&o.deltaMode!==0&&(S.wheelStartX==null?(S.wheelStartX=P.scrollLeft,S.wheelStartY=P.scrollTop,S.wheelDX=l,S.wheelDY=f,setTimeout(function(){if(S.wheelStartX!=null){var De=P.scrollLeft-S.wheelStartX,Ue=P.scrollTop-S.wheelStartY,Ge=Ue&&S.wheelDY&&Ue/S.wheelDY||De&&S.wheelDX&&De/S.wheelDX;S.wheelStartX=S.wheelStartY=null,Ge&&(bi=(bi*sa+Ge)/(sa+1),++sa)}},200)):(S.wheelDX+=l,S.wheelDY+=f))}}var Jn=function(i,o){this.ranges=i,this.primIndex=o};Jn.prototype.primary=function(){return this.ranges[this.primIndex]},Jn.prototype.equals=function(i){if(i==this)return!0;if(i.primIndex!=this.primIndex||i.ranges.length!=this.ranges.length)return!1;for(var o=0;o<this.ranges.length;o++){var u=this.ranges[o],l=i.ranges[o];if(!je(u.anchor,l.anchor)||!je(u.head,l.head))return!1}return!0},Jn.prototype.deepCopy=function(){for(var i=[],o=0;o<this.ranges.length;o++)i[o]=new it(Le(this.ranges[o].anchor),Le(this.ranges[o].head));return new Jn(i,this.primIndex)},Jn.prototype.somethingSelected=function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},Jn.prototype.contains=function(i,o){o||(o=i);for(var u=0;u<this.ranges.length;u++){var l=this.ranges[u];if(re(o,l.from())>=0&&re(i,l.to())<=0)return u}return-1};var it=function(i,o){this.anchor=i,this.head=o};it.prototype.from=function(){return jt(this.anchor,this.head)},it.prototype.to=function(){return St(this.anchor,this.head)},it.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xi(i,o,u){var l=i&&i.options.selectionsMayTouch,f=o[u];o.sort(function(we,ge){return re(we.from(),ge.from())}),u=Fe(o,f);for(var v=1;v<o.length;v++){var S=o[v],P=o[v-1],T=re(P.to(),S.from());if(l&&!S.empty()?T>0:T>=0){var D=jt(P.from(),S.from()),oe=St(P.to(),S.to()),fe=P.empty()?S.from()==S.head:P.from()==P.head;v<=u&&--u,o.splice(--v,2,new it(fe?oe:D,fe?D:oe))}}return new Jn(o,u)}function ds(i,o){return new Jn([new it(i,o||i)],0)}function Ws(i){return i.text?F(i.from.line+i.text.length-1,ht(i.text).length+(i.text.length==1?i.from.ch:0)):i.to}function el(i,o){if(re(i,o.from)<0)return i;if(re(i,o.to)<=0)return Ws(o);var u=i.line+o.text.length-(o.to.line-o.from.line)-1,l=i.ch;return i.line==o.to.line&&(l+=Ws(o).ch-o.to.ch),F(u,l)}function Ic(i,o){for(var u=[],l=0;l<i.sel.ranges.length;l++){var f=i.sel.ranges[l];u.push(new it(el(f.anchor,o),el(f.head,o)))}return xi(i.cm,u,i.sel.primIndex)}function sd(i,o,u){return i.line==o.line?F(u.line,i.ch-o.ch+u.ch):F(u.line+(i.line-o.line),i.ch)}function Iv(i,o,u){for(var l=[],f=F(i.first,0),v=f,S=0;S<o.length;S++){var P=o[S],T=sd(P.from,f,v),D=sd(Ws(P),f,v);if(f=P.to,v=D,u=="around"){var oe=i.sel.ranges[S],fe=re(oe.head,oe.anchor)<0;l[S]=new it(fe?D:T,fe?T:D)}else l[S]=new it(T,T)}return new Jn(l,i.sel.primIndex)}function Rc(i){i.doc.mode=An(i.options,i.doc.modeOption),tl(i)}function tl(i){i.doc.iter(function(o){o.stateAfter&&(o.stateAfter=null),o.styles&&(o.styles=null)}),i.doc.modeFrontier=i.doc.highlightFrontier=i.doc.first,Ja(i,100),i.state.modeGen++,i.curOp&&Cn(i)}function od(i,o){return o.from.ch==0&&o.to.ch==0&&ht(o.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function su(i,o,u,l){function f(Ge){return u?u[Ge]:null}function v(Ge,We,Xe){Cp(Ge,We,Xe,l),Hr(Ge,"change",Ge,o)}function S(Ge,We){for(var Xe=[],ct=Ge;ct<We;++ct)Xe.push(new co(D[ct],f(ct),l));return Xe}var P=o.from,T=o.to,D=o.text,oe=rt(i,P.line),fe=rt(i,T.line),we=ht(D),ge=f(D.length-1),Ve=T.line-P.line;if(o.full)i.insert(0,S(0,D.length)),i.remove(D.length,i.size-D.length);else if(od(i,o)){var Ie=S(0,D.length-1);v(fe,fe.text,ge),Ve&&i.remove(P.line,Ve),Ie.length&&i.insert(P.line,Ie)}else if(oe==fe)if(D.length==1)v(oe,oe.text.slice(0,P.ch)+we+oe.text.slice(T.ch),ge);else{var De=S(1,D.length-1);De.push(new co(we+oe.text.slice(T.ch),ge,l)),v(oe,oe.text.slice(0,P.ch)+D[0],f(0)),i.insert(P.line+1,De)}else if(D.length==1)v(oe,oe.text.slice(0,P.ch)+D[0]+fe.text.slice(T.ch),f(0)),i.remove(P.line+1,Ve);else{v(oe,oe.text.slice(0,P.ch)+D[0],f(0)),v(fe,we+fe.text.slice(T.ch),ge);var Ue=S(1,D.length-1);Ve>1&&i.remove(P.line+1,Ve-1),i.insert(P.line+1,Ue)}Hr(i,"change",i,o)}function Bi(i,o,u){function l(f,v,S){if(f.linked)for(var P=0;P<f.linked.length;++P){var T=f.linked[P];if(T.doc!=v){var D=S&&T.sharedHist;u&&!D||(o(T.doc,D),l(T.doc,f,D))}}}l(i,null,!0)}function ou(i,o){if(o.cm)throw new Error("This document is already in use.");i.doc=o,o.cm=i,xc(i),Rc(i),ad(i),i.options.direction=o.direction,i.options.lineWrapping||zl(i),i.options.mode=o.modeOption,Cn(i)}function ad(i){(i.doc.direction=="rtl"?Re:H)(i.display.lineDiv,"CodeMirror-rtl")}function Rv(i){yn(i,function(){ad(i),Cn(i)})}function au(i){this.done=[],this.undone=[],this.undoDepth=i?i.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=i?i.maxGeneration:1}function lu(i,o){var u={from:Le(o.from),to:Ws(o),text:as(i,o.from,o.to)};return Fc(i,u,o.from.line,o.to.line+1),Bi(i,function(l){return Fc(l,u,o.from.line,o.to.line+1)},!0),u}function oa(i){for(;i.length;){var o=ht(i);if(o.ranges)i.pop();else break}}function ld(i,o){if(o)return oa(i.done),ht(i.done);if(i.done.length&&!ht(i.done).ranges)return ht(i.done);if(i.done.length>1&&!i.done[i.done.length-2].ranges)return i.done.pop(),ht(i.done)}function Hs(i,o,u,l){var f=i.history;f.undone.length=0;var v=+new Date,S,P;if((f.lastOp==l||f.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&f.lastModTime>v-(i.cm?i.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(S=ld(f,f.lastOp==l)))P=ht(S.changes),re(o.from,o.to)==0&&re(o.from,P.to)==0?P.to=Ws(o):S.changes.push(lu(i,o));else{var T=ht(f.done);for((!T||!T.ranges)&&uu(i.sel,f.done),S={changes:[lu(i,o)],generation:f.generation},f.done.push(S);f.done.length>f.undoDepth;)f.done.shift(),f.done[0].ranges||f.done.shift()}f.done.push(u),f.generation=++f.maxGeneration,f.lastModTime=f.lastSelTime=v,f.lastOp=f.lastSelOp=l,f.lastOrigin=f.lastSelOrigin=o.origin,P||xt(i,"historyAdded")}function Fv(i,o,u,l){var f=o.charAt(0);return f=="*"||f=="+"&&u.ranges.length==l.ranges.length&&u.somethingSelected()==l.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)}function ud(i,o,u,l){var f=i.history,v=l&&l.origin;u==f.lastSelOp||v&&f.lastSelOrigin==v&&(f.lastModTime==f.lastSelTime&&f.lastOrigin==v||Fv(i,v,ht(f.done),o))?f.done[f.done.length-1]=o:uu(o,f.done),f.lastSelTime=+new Date,f.lastSelOrigin=v,f.lastSelOp=u,l&&l.clearRedo!==!1&&oa(f.undone)}function uu(i,o){var u=ht(o);u&&u.ranges&&u.equals(i)||o.push(i)}function Fc(i,o,u,l){var f=o["spans_"+i.id],v=0;i.iter(Math.max(i.first,u),Math.min(i.first+i.size,l),function(S){S.markedSpans&&((f||(f=o["spans_"+i.id]={}))[v]=S.markedSpans),++v})}function Mv(i){if(!i)return null;for(var o,u=0;u<i.length;++u)i[u].marker.explicitlyCleared?o||(o=i.slice(0,u)):o&&o.push(i[u]);return o?o.length?o:null:i}function cd(i,o){var u=o["spans_"+i.id];if(!u)return null;for(var l=[],f=0;f<o.text.length;++f)l.push(Mv(u[f]));return l}function rl(i,o){var u=cd(i,o),l=js(i,o);if(!u)return l;if(!l)return u;for(var f=0;f<u.length;++f){var v=u[f],S=l[f];if(v&&S){e:for(var P=0;P<S.length;++P){for(var T=S[P],D=0;D<v.length;++D)if(v[D].marker==T.marker)continue e;v.push(T)}}else S&&(u[f]=S)}return u}function aa(i,o,u){for(var l=[],f=0;f<i.length;++f){var v=i[f];if(v.ranges){l.push(u?Jn.prototype.deepCopy.call(v):v);continue}var S=v.changes,P=[];l.push({changes:P});for(var T=0;T<S.length;++T){var D=S[T],oe=void 0;if(P.push({from:D.from,to:D.to,text:D.text}),o)for(var fe in D)(oe=fe.match(/^spans_(\d+)$/))&&Fe(o,Number(oe[1]))>-1&&(ht(P)[fe]=D[fe],delete D[fe])}}return l}function la(i,o,u,l){if(l){var f=i.anchor;if(u){var v=re(o,f)<0;v!=re(u,f)<0?(f=o,o=u):v!=re(o,u)<0&&(o=u)}return new it(f,o)}else return new it(u||o,o)}function ua(i,o,u,l,f){f==null&&(f=i.cm&&(i.cm.display.shift||i.extend)),fn(i,new Jn([la(i.sel.primary(),o,u,f)],0),l)}function cu(i,o,u){for(var l=[],f=i.cm&&(i.cm.display.shift||i.extend),v=0;v<i.sel.ranges.length;v++)l[v]=la(i.sel.ranges[v],o[v],null,f);var S=xi(i.cm,l,i.sel.primIndex);fn(i,S,u)}function Mc(i,o,u,l){var f=i.sel.ranges.slice(0);f[o]=u,fn(i,xi(i.cm,f,i.sel.primIndex),l)}function fd(i,o,u,l){fn(i,ds(o,u),l)}function Lv(i,o,u){var l={ranges:o.ranges,update:function(f){this.ranges=[];for(var v=0;v<f.length;v++)this.ranges[v]=new it(nt(i,f[v].anchor),nt(i,f[v].head))},origin:u&&u.origin};return xt(i,"beforeSelectionChange",i,l),i.cm&&xt(i.cm,"beforeSelectionChange",i.cm,l),l.ranges!=o.ranges?xi(i.cm,l.ranges,l.ranges.length-1):o}function pd(i,o,u){var l=i.history.done,f=ht(l);f&&f.ranges?(l[l.length-1]=o,fu(i,o,u)):fn(i,o,u)}function fn(i,o,u){fu(i,o,u),ud(i,i.sel,i.cm?i.cm.curOp.id:NaN,u)}function fu(i,o,u){(Sr(i,"beforeSelectionChange")||i.cm&&Sr(i.cm,"beforeSelectionChange"))&&(o=Lv(i,o,u));var l=u&&u.bias||(re(o.primary().head,i.sel.primary().head)<0?-1:1);Lc(i,pu(i,o,l,!0)),!(u&&u.scroll===!1)&&i.cm&&i.cm.getOption("readOnly")!="nocursor"&&Bs(i.cm)}function Lc(i,o){o.equals(i.sel)||(i.sel=o,i.cm&&(i.cm.curOp.updateInput=1,i.cm.curOp.selectionChanged=!0,Ot(i.cm)),Hr(i,"cursorActivity",i))}function dd(i){Lc(i,pu(i,i.sel,null,!1))}function pu(i,o,u,l){for(var f,v=0;v<o.ranges.length;v++){var S=o.ranges[v],P=o.ranges.length==i.sel.ranges.length&&i.sel.ranges[v],T=hs(i,S.anchor,P&&P.anchor,u,l),D=S.head==S.anchor?T:hs(i,S.head,P&&P.head,u,l);(f||T!=S.anchor||D!=S.head)&&(f||(f=o.ranges.slice(0,v)),f[v]=new it(T,D))}return f?xi(i.cm,f,o.primIndex):o}function ca(i,o,u,l,f){var v=rt(i,o.line);if(v.markedSpans)for(var S=0;S<v.markedSpans.length;++S){var P=v.markedSpans[S],T=P.marker,D="selectLeft"in T?!T.selectLeft:T.inclusiveLeft,oe="selectRight"in T?!T.selectRight:T.inclusiveRight;if((P.from==null||(D?P.from<=o.ch:P.from<o.ch))&&(P.to==null||(oe?P.to>=o.ch:P.to>o.ch))){if(f&&(xt(T,"beforeCursorEnter"),T.explicitlyCleared))if(v.markedSpans){--S;continue}else break;if(!T.atomic)continue;if(u){var fe=T.find(l<0?1:-1),we=void 0;if((l<0?oe:D)&&(fe=$i(i,fe,-l,fe&&fe.line==o.line?v:null)),fe&&fe.line==o.line&&(we=re(fe,u))&&(l<0?we<0:we>0))return ca(i,fe,o,l,f)}var ge=T.find(l<0?-1:1);return(l<0?D:oe)&&(ge=$i(i,ge,l,ge.line==o.line?v:null)),ge?ca(i,ge,o,l,f):null}}return o}function hs(i,o,u,l,f){var v=l||1,S=ca(i,o,u,v,f)||!f&&ca(i,o,u,v,!0)||ca(i,o,u,-v,f)||!f&&ca(i,o,u,-v,!0);return S||(i.cantEdit=!0,F(i.first,0))}function $i(i,o,u,l){return u<0&&o.ch==0?o.line>i.first?nt(i,F(o.line-1)):null:u>0&&o.ch==(l||rt(i,o.line)).text.length?o.line<i.first+i.size-1?F(o.line+1,0):null:new F(o.line,o.ch+u)}function Dc(i){i.setSelection(F(i.firstLine(),0),F(i.lastLine()),Lt)}function hd(i,o,u){var l={canceled:!1,from:o.from,to:o.to,text:o.text,origin:o.origin,cancel:function(){return l.canceled=!0}};return u&&(l.update=function(f,v,S,P){f&&(l.from=nt(i,f)),v&&(l.to=nt(i,v)),S&&(l.text=S),P!==void 0&&(l.origin=P)}),xt(i,"beforeChange",i,l),i.cm&&xt(i.cm,"beforeChange",i.cm,l),l.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function fa(i,o,u){if(i.cm){if(!i.cm.curOp)return Nr(i.cm,fa)(i,o,u);if(i.cm.state.suppressEdits)return}if(!((Sr(i,"beforeChange")||i.cm&&Sr(i.cm,"beforeChange"))&&(o=hd(i,o,!0),!o))){var l=sc&&!u&&Dr(i,o.from,o.to);if(l)for(var f=l.length-1;f>=0;--f)Dv(i,{from:l[f].from,to:l[f].to,text:f?[""]:o.text,origin:o.origin});else Dv(i,o)}}function Dv(i,o){if(!(o.text.length==1&&o.text[0]==""&&re(o.from,o.to)==0)){var u=Ic(i,o);Hs(i,o,u,i.cm?i.cm.curOp.id:NaN),pa(i,o,u,js(i,o));var l=[];Bi(i,function(f,v){!v&&Fe(l,f.history)==-1&&(Uc(f.history,o),l.push(f.history)),pa(f,o,null,js(f,o))})}}function nl(i,o,u){var l=i.cm&&i.cm.state.suppressEdits;if(!(l&&!u)){for(var f=i.history,v,S=i.sel,P=o=="undo"?f.done:f.undone,T=o=="undo"?f.undone:f.done,D=0;D<P.length&&(v=P[D],!(u?v.ranges&&!v.equals(i.sel):!v.ranges));D++);if(D!=P.length){for(f.lastOrigin=f.lastSelOrigin=null;;)if(v=P.pop(),v.ranges){if(uu(v,T),u&&!v.equals(i.sel)){fn(i,v,{clearRedo:!1});return}S=v}else if(l){P.push(v);return}else break;var oe=[];uu(S,T),T.push({changes:oe,generation:f.generation}),f.generation=v.generation||++f.maxGeneration;for(var fe=Sr(i,"beforeChange")||i.cm&&Sr(i.cm,"beforeChange"),we=function(Ie){var De=v.changes[Ie];if(De.origin=o,fe&&!hd(i,De,!1))return P.length=0,{};oe.push(lu(i,De));var Ue=Ie?Ic(i,De):ht(P);pa(i,De,Ue,rl(i,De)),!Ie&&i.cm&&i.cm.scrollIntoView({from:De.from,to:Ws(De)});var Ge=[];Bi(i,function(We,Xe){!Xe&&Fe(Ge,We.history)==-1&&(Uc(We.history,De),Ge.push(We.history)),pa(We,De,null,rl(We,De))})},ge=v.changes.length-1;ge>=0;--ge){var Ve=we(ge);if(Ve)return Ve.v}}}}function Nc(i,o){if(o!=0&&(i.first+=o,i.sel=new Jn($t(i.sel.ranges,function(f){return new it(F(f.anchor.line+o,f.anchor.ch),F(f.head.line+o,f.head.ch))}),i.sel.primIndex),i.cm)){Cn(i.cm,i.first,i.first-o,o);for(var u=i.cm.display,l=u.viewFrom;l<u.viewTo;l++)Ms(i.cm,l,"gutter")}}function pa(i,o,u,l){if(i.cm&&!i.cm.curOp)return Nr(i.cm,pa)(i,o,u,l);if(o.to.line<i.first){Nc(i,o.text.length-1-(o.to.line-o.from.line));return}if(!(o.from.line>i.lastLine())){if(o.from.line<i.first){var f=o.text.length-1-(i.first-o.from.line);Nc(i,f),o={from:F(i.first,0),to:F(o.to.line+f,o.to.ch),text:[ht(o.text)],origin:o.origin}}var v=i.lastLine();o.to.line>v&&(o={from:o.from,to:F(v,rt(i,v).text.length),text:[o.text[0]],origin:o.origin}),o.removed=as(i,o.from,o.to),u||(u=Ic(i,o)),i.cm?Bc(i.cm,o,l):su(i,o,l),fu(i,u,Lt),i.cantEdit&&hs(i,F(i.firstLine(),0))&&(i.cantEdit=!1)}}function Bc(i,o,u){var l=i.doc,f=i.display,v=o.from,S=o.to,P=!1,T=v.line;i.options.lineWrapping||(T=Qt(gi(rt(l,v.line))),l.iter(T,S.line+1,function(ge){if(ge==f.maxLine)return P=!0,!0})),l.sel.contains(o.from,o.to)>-1&&Ot(i),su(l,o,u,Kp(i)),i.options.lineWrapping||(l.iter(T,v.line+o.text.length,function(ge){var Ve=Hl(ge);Ve>f.maxLineLength&&(f.maxLine=ge,f.maxLineLength=Ve,f.maxLineChanged=!0,P=!1)}),P&&(i.curOp.updateMaxLine=!0)),lv(l,v.line),Ja(i,400);var D=o.text.length-(S.line-v.line)-1;o.full?Cn(i):v.line==S.line&&o.text.length==1&&!od(i.doc,o)?Ms(i,v.line,"text"):Cn(i,v.line,S.line+1,D);var oe=Sr(i,"changes"),fe=Sr(i,"change");if(fe||oe){var we={from:v,to:S,text:o.text,removed:o.removed,origin:o.origin};fe&&Hr(i,"change",i,we),oe&&(i.curOp.changeObjs||(i.curOp.changeObjs=[])).push(we)}i.display.selForContextMenu=null}function yo(i,o,u,l,f){var v;l||(l=u),re(l,u)<0&&(v=[l,u],u=v[0],l=v[1]),typeof o=="string"&&(o=i.splitLines(o)),fa(i,{from:u,to:l,text:o,origin:f})}function $c(i,o,u,l){u<i.line?i.line+=l:o<i.line&&(i.line=o,i.ch=0)}function md(i,o,u,l){for(var f=0;f<i.length;++f){var v=i[f],S=!0;if(v.ranges){v.copied||(v=i[f]=v.deepCopy(),v.copied=!0);for(var P=0;P<v.ranges.length;P++)$c(v.ranges[P].anchor,o,u,l),$c(v.ranges[P].head,o,u,l);continue}for(var T=0;T<v.changes.length;++T){var D=v.changes[T];if(u<D.from.line)D.from=F(D.from.line+l,D.from.ch),D.to=F(D.to.line+l,D.to.ch);else if(o<=D.to.line){S=!1;break}}S||(i.splice(0,f+1),f=0)}}function Uc(i,o){var u=o.from.line,l=o.to.line,f=o.text.length-(l-u)-1;md(i.done,u,l,f),md(i.undone,u,l,f)}function il(i,o,u,l){var f=o,v=o;return typeof o=="number"?v=rt(i,Zt(i,o)):f=Qt(o),f==null?null:(l(v,f)&&i.cm&&Ms(i.cm,f,u),v)}function bo(i){this.lines=i,this.parent=null;for(var o=0,u=0;u<i.length;++u)i[u].parent=this,o+=i[u].height;this.height=o}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(i,o){for(var u=i,l=i+o;u<l;++u){var f=this.lines[u];this.height-=f.height,cc(f),Hr(f,"delete")}this.lines.splice(i,o)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(i,o,u){this.height+=u,this.lines=this.lines.slice(0,i).concat(o).concat(this.lines.slice(i));for(var l=0;l<o.length;++l)o[l].parent=this},iterN:function(i,o,u){for(var l=i+o;i<l;++i)if(u(this.lines[i]))return!0}};function xo(i){this.children=i;for(var o=0,u=0,l=0;l<i.length;++l){var f=i[l];o+=f.chunkSize(),u+=f.height,f.parent=this}this.size=o,this.height=u,this.parent=null}xo.prototype={chunkSize:function(){return this.size},removeInner:function(i,o){this.size-=o;for(var u=0;u<this.children.length;++u){var l=this.children[u],f=l.chunkSize();if(i<f){var v=Math.min(o,f-i),S=l.height;if(l.removeInner(i,v),this.height-=S-l.height,f==v&&(this.children.splice(u--,1),l.parent=null),(o-=v)==0)break;i=0}else i-=f}if(this.size-o<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var P=[];this.collapse(P),this.children=[new bo(P)],this.children[0].parent=this}},collapse:function(i){for(var o=0;o<this.children.length;++o)this.children[o].collapse(i)},insertInner:function(i,o,u){this.size+=o.length,this.height+=u;for(var l=0;l<this.children.length;++l){var f=this.children[l],v=f.chunkSize();if(i<=v){if(f.insertInner(i,o,u),f.lines&&f.lines.length>50){for(var S=f.lines.length%25+25,P=S;P<f.lines.length;){var T=new bo(f.lines.slice(P,P+=25));f.height-=T.height,this.children.splice(++l,0,T),T.parent=this}f.lines=f.lines.slice(0,S),this.maybeSpill()}break}i-=v}},maybeSpill:function(){if(!(this.children.length<=10)){var i=this;do{var o=i.children.splice(i.children.length-5,5),u=new xo(o);if(i.parent){i.size-=u.size,i.height-=u.height;var f=Fe(i.parent.children,i);i.parent.children.splice(f+1,0,u)}else{var l=new xo(i.children);l.parent=i,i.children=[l,u],i=l}u.parent=i.parent}while(i.children.length>10);i.parent.maybeSpill()}},iterN:function(i,o,u){for(var l=0;l<this.children.length;++l){var f=this.children[l],v=f.chunkSize();if(i<v){var S=Math.min(o,v-i);if(f.iterN(i,S,u))return!0;if((o-=S)==0)break;i=0}else i-=v}}};var da=function(i,o,u){if(u)for(var l in u)u.hasOwnProperty(l)&&(this[l]=u[l]);this.doc=i,this.node=o};da.prototype.clear=function(){var i=this.doc.cm,o=this.line.widgets,u=this.line,l=Qt(u);if(!(l==null||!o)){for(var f=0;f<o.length;++f)o[f]==this&&o.splice(f--,1);o.length||(u.widgets=null);var v=Ba(this);zn(u,Math.max(0,u.height-v)),i&&(yn(i,function(){Wc(i,u,-v),Ms(i,l,"widget")}),Hr(i,"lineWidgetCleared",i,this,l))}},da.prototype.changed=function(){var i=this,o=this.height,u=this.doc.cm,l=this.line;this.height=null;var f=Ba(this)-o;f&&(Is(this.doc,l)||zn(l,l.height+f),u&&yn(u,function(){u.curOp.forceUpdate=!0,Wc(u,l,f),Hr(u,"lineWidgetChanged",u,i,Qt(l))}))},sn(da);function Wc(i,o,u){us(o)<(i.curOp&&i.curOp.scrollTop||i.doc.scrollTop)&&eu(i,u)}function Nv(i,o,u,l){var f=new da(i,u,l),v=i.cm;return v&&f.noHScroll&&(v.display.alignWidgets=!0),il(i,o,"widget",function(S){var P=S.widgets||(S.widgets=[]);if(f.insertAt==null?P.push(f):P.splice(Math.min(P.length,Math.max(0,f.insertAt)),0,f),f.line=S,v&&!Is(i,S)){var T=us(S)<i.scrollTop;zn(S,S.height+Ba(f)),T&&eu(v,f.height),v.curOp.forceUpdate=!0}return!0}),v&&Hr(v,"lineWidgetAdded",v,f,typeof o=="number"?o:Qt(o)),f}var vd=0,Ui=function(i,o){this.lines=[],this.type=o,this.doc=i,this.id=++vd};Ui.prototype.clear=function(){if(!this.explicitlyCleared){var i=this.doc.cm,o=i&&!i.curOp;if(o&&Ni(i),Sr(this,"clear")){var u=this.find();u&&Hr(this,"clear",u.from,u.to)}for(var l=null,f=null,v=0;v<this.lines.length;++v){var S=this.lines[v],P=ot(S.markedSpans,this);i&&!this.collapsed?Ms(i,Qt(S),"text"):i&&(P.to!=null&&(f=Qt(S)),P.from!=null&&(l=Qt(S))),S.markedSpans=Nl(S.markedSpans,P),P.from==null&&this.collapsed&&!Is(this.doc,S)&&i&&zn(S,Qo(i.display))}if(i&&this.collapsed&&!i.options.lineWrapping)for(var T=0;T<this.lines.length;++T){var D=gi(this.lines[T]),oe=Hl(D);oe>i.display.maxLineLength&&(i.display.maxLine=D,i.display.maxLineLength=oe,i.display.maxLineChanged=!0)}l!=null&&i&&this.collapsed&&Cn(i,l,f+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,i&&dd(i.doc)),i&&Hr(i,"markerCleared",i,this,l,f),o&&fs(i),this.parent&&this.parent.clear()}},Ui.prototype.find=function(i,o){i==null&&this.type=="bookmark"&&(i=1);for(var u,l,f=0;f<this.lines.length;++f){var v=this.lines[f],S=ot(v.markedSpans,this);if(S.from!=null&&(u=F(o?v:Qt(v),S.from),i==-1))return u;if(S.to!=null&&(l=F(o?v:Qt(v),S.to),i==1))return l}return u&&{from:u,to:l}},Ui.prototype.changed=function(){var i=this,o=this.find(-1,!0),u=this,l=this.doc.cm;!o||!l||yn(l,function(){var f=o.line,v=Qt(o.line),S=Jl(l,v);if(S&&(vc(S),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!Is(u.doc,f)&&u.height!=null){var P=u.height;u.height=null;var T=Ba(u)-P;T&&zn(f,f.height+T)}Hr(l,"markerChanged",l,i)})},Ui.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var o=this.doc.cm.curOp;(!o.maybeHiddenMarkers||Fe(o.maybeHiddenMarkers,this)==-1)&&(o.maybeUnhiddenMarkers||(o.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(i)},Ui.prototype.detachLine=function(i){if(this.lines.splice(Fe(this.lines,i),1),!this.lines.length&&this.doc.cm){var o=this.doc.cm.curOp;(o.maybeHiddenMarkers||(o.maybeHiddenMarkers=[])).push(this)}},sn(Ui);function ha(i,o,u,l,f){if(l&&l.shared)return Bv(i,o,u,l,f);if(i.cm&&!i.cm.curOp)return Nr(i.cm,ha)(i,o,u,l,f);var v=new Ui(i,f),S=re(o,u);if(l&&yt(l,v,!1),S>0||S==0&&v.clearWhenEmpty!==!1)return v;if(v.replacedWith&&(v.collapsed=!0,v.widgetNode=xe("span",[v.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||v.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(v.widgetNode.insertLeft=!0)),v.collapsed){if(Ap(i,o.line,o,u,v)||o.line!=u.line&&Ap(i,u.line,o,u,v))throw new Error("Inserting collapsed marker partially overlapping an existing one");uv()}v.addToHistory&&Hs(i,{from:o,to:u,origin:"markText"},i.sel,NaN);var P=o.line,T=i.cm,D;if(i.iter(P,u.line+1,function(fe){T&&v.collapsed&&!T.options.lineWrapping&&gi(fe)==T.display.maxLine&&(D=!0),v.collapsed&&P!=o.line&&zn(fe,0),Sp(fe,new ja(v,P==o.line?o.ch:null,P==u.line?u.ch:null),i.cm&&i.cm.curOp),++P}),v.collapsed&&i.iter(o.line,u.line+1,function(fe){Is(i,fe)&&zn(fe,0)}),v.clearOnEnter&&pe(v,"beforeCursorEnter",function(){return v.clear()}),v.readOnly&&(Go(),(i.history.done.length||i.history.undone.length)&&i.clearHistory()),v.collapsed&&(v.id=++vd,v.atomic=!0),T){if(D&&(T.curOp.updateMaxLine=!0),v.collapsed)Cn(T,o.line,u.line+1);else if(v.className||v.startStyle||v.endStyle||v.css||v.attributes||v.title)for(var oe=o.line;oe<=u.line;oe++)Ms(T,oe,"text");v.atomic&&dd(T.doc),Hr(T,"markerAdded",T,v)}return v}var sl=function(i,o){this.markers=i,this.primary=o;for(var u=0;u<i.length;++u)i[u].parent=this};sl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();Hr(this,"clear")}},sl.prototype.find=function(i,o){return this.primary.find(i,o)},sn(sl);function Bv(i,o,u,l,f){l=yt(l),l.shared=!1;var v=[ha(i,o,u,l,f)],S=v[0],P=l.widgetNode;return Bi(i,function(T){P&&(l.widgetNode=P.cloneNode(!0)),v.push(ha(T,nt(T,o),nt(T,u),l,f));for(var D=0;D<T.linked.length;++D)if(T.linked[D].isParent)return;S=ht(v)}),new sl(v,S)}function gd(i){return i.findMarks(F(i.first,0),i.clipPos(F(i.lastLine())),function(o){return o.parent})}function $v(i,o){for(var u=0;u<o.length;u++){var l=o[u],f=l.find(),v=i.clipPos(f.from),S=i.clipPos(f.to);if(re(v,S)){var P=ha(i,v,S,l.primary,l.primary.type);l.markers.push(P),P.parent=l}}}function Uv(i){for(var o=function(l){var f=i[l],v=[f.primary.doc];Bi(f.primary.doc,function(T){return v.push(T)});for(var S=0;S<f.markers.length;S++){var P=f.markers[S];Fe(v,P.doc)==-1&&(P.parent=null,f.markers.splice(S--,1))}},u=0;u<i.length;u++)o(u)}var Hc=0,tn=function(i,o,u,l,f){if(!(this instanceof tn))return new tn(i,o,u,l,f);u==null&&(u=0),xo.call(this,[new bo([new co("",null)])]),this.first=u,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=u;var v=F(u,0);this.sel=ds(v),this.history=new au(null),this.id=++Hc,this.modeOption=o,this.lineSep=l,this.direction=f=="rtl"?"rtl":"ltr",this.extend=!1,typeof i=="string"&&(i=this.splitLines(i)),su(this,{from:v,to:v,text:i}),fn(this,ds(v),Lt)};tn.prototype=kn(xo.prototype,{constructor:tn,iter:function(i,o,u){u?this.iterN(i-this.first,o-i,u):this.iterN(this.first,this.first+this.size,i)},insert:function(i,o){for(var u=0,l=0;l<o.length;++l)u+=o[l].height;this.insertInner(i-this.first,o,u)},remove:function(i,o){this.removeInner(i-this.first,o)},getValue:function(i){var o=oo(this,this.first,this.first+this.size);return i===!1?o:o.join(i||this.lineSeparator())},setValue:Mt(function(i){var o=F(this.first,0),u=this.first+this.size-1;fa(this,{from:o,to:F(u,rt(this,u).text.length),text:this.splitLines(i),origin:"setValue",full:!0},!0),this.cm&&ea(this.cm,0,0),fn(this,ds(o),Lt)}),replaceRange:function(i,o,u,l){o=nt(this,o),u=u?nt(this,u):o,yo(this,i,o,u,l)},getRange:function(i,o,u){var l=as(this,nt(this,i),nt(this,o));return u===!1?l:u===""?l.join(""):l.join(u||this.lineSeparator())},getLine:function(i){var o=this.getLineHandle(i);return o&&o.text},getLineHandle:function(i){if(ao(this,i))return rt(this,i)},getLineNumber:function(i){return Qt(i)},getLineHandleVisualStart:function(i){return typeof i=="number"&&(i=rt(this,i)),gi(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return nt(this,i)},getCursor:function(i){var o=this.sel.primary(),u;return i==null||i=="head"?u=o.head:i=="anchor"?u=o.anchor:i=="end"||i=="to"||i===!1?u=o.to():u=o.from(),u},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mt(function(i,o,u){fd(this,nt(this,typeof i=="number"?F(i,o||0):i),null,u)}),setSelection:Mt(function(i,o,u){fd(this,nt(this,i),nt(this,o||i),u)}),extendSelection:Mt(function(i,o,u){ua(this,nt(this,i),o&&nt(this,o),u)}),extendSelections:Mt(function(i,o){cu(this,Ll(this,i),o)}),extendSelectionsBy:Mt(function(i,o){var u=$t(this.sel.ranges,i);cu(this,Ll(this,u),o)}),setSelections:Mt(function(i,o,u){if(i.length){for(var l=[],f=0;f<i.length;f++)l[f]=new it(nt(this,i[f].anchor),nt(this,i[f].head||i[f].anchor));o==null&&(o=Math.min(i.length-1,this.sel.primIndex)),fn(this,xi(this.cm,l,o),u)}}),addSelection:Mt(function(i,o,u){var l=this.sel.ranges.slice(0);l.push(new it(nt(this,i),nt(this,o||i))),fn(this,xi(this.cm,l,l.length-1),u)}),getSelection:function(i){for(var o=this.sel.ranges,u,l=0;l<o.length;l++){var f=as(this,o[l].from(),o[l].to());u=u?u.concat(f):f}return i===!1?u:u.join(i||this.lineSeparator())},getSelections:function(i){for(var o=[],u=this.sel.ranges,l=0;l<u.length;l++){var f=as(this,u[l].from(),u[l].to());i!==!1&&(f=f.join(i||this.lineSeparator())),o[l]=f}return o},replaceSelection:function(i,o,u){for(var l=[],f=0;f<this.sel.ranges.length;f++)l[f]=i;this.replaceSelections(l,o,u||"+input")},replaceSelections:Mt(function(i,o,u){for(var l=[],f=this.sel,v=0;v<f.ranges.length;v++){var S=f.ranges[v];l[v]={from:S.from(),to:S.to(),text:this.splitLines(i[v]),origin:u}}for(var P=o&&o!="end"&&Iv(this,l,o),T=l.length-1;T>=0;T--)fa(this,l[T]);P?pd(this,P):this.cm&&Bs(this.cm)}),undo:Mt(function(){nl(this,"undo")}),redo:Mt(function(){nl(this,"redo")}),undoSelection:Mt(function(){nl(this,"undo",!0)}),redoSelection:Mt(function(){nl(this,"redo",!0)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){for(var i=this.history,o=0,u=0,l=0;l<i.done.length;l++)i.done[l].ranges||++o;for(var f=0;f<i.undone.length;f++)i.undone[f].ranges||++u;return{undo:o,redo:u}},clearHistory:function(){var i=this;this.history=new au(this.history),Bi(this,function(o){return o.history=i.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(i){return i&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:aa(this.history.done),undone:aa(this.history.undone)}},setHistory:function(i){var o=this.history=new au(this.history);o.done=aa(i.done.slice(0),null,!0),o.undone=aa(i.undone.slice(0),null,!0)},setGutterMarker:Mt(function(i,o,u){return il(this,i,"gutter",function(l){var f=l.gutterMarkers||(l.gutterMarkers={});return f[o]=u,!u&&ei(f)&&(l.gutterMarkers=null),!0})}),clearGutter:Mt(function(i){var o=this;this.iter(function(u){u.gutterMarkers&&u.gutterMarkers[i]&&il(o,u,"gutter",function(){return u.gutterMarkers[i]=null,ei(u.gutterMarkers)&&(u.gutterMarkers=null),!0})})}),lineInfo:function(i){var o;if(typeof i=="number"){if(!ao(this,i)||(o=i,i=rt(this,i),!i))return null}else if(o=Qt(i),o==null)return null;return{line:o,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:Mt(function(i,o,u){return il(this,i,o=="gutter"?"gutter":"class",function(l){var f=o=="text"?"textClass":o=="background"?"bgClass":o=="gutter"?"gutterClass":"wrapClass";if(!l[f])l[f]=u;else{if(Q(u).test(l[f]))return!1;l[f]+=" "+u}return!0})}),removeLineClass:Mt(function(i,o,u){return il(this,i,o=="gutter"?"gutter":"class",function(l){var f=o=="text"?"textClass":o=="background"?"bgClass":o=="gutter"?"gutterClass":"wrapClass",v=l[f];if(v)if(u==null)l[f]=null;else{var S=v.match(Q(u));if(!S)return!1;var P=S.index+S[0].length;l[f]=v.slice(0,S.index)+(!S.index||P==v.length?"":" ")+v.slice(P)||null}else return!1;return!0})}),addLineWidget:Mt(function(i,o,u){return Nv(this,i,o,u)}),removeLineWidget:function(i){i.clear()},markText:function(i,o,u){return ha(this,nt(this,i),nt(this,o),u,u&&u.type||"range")},setBookmark:function(i,o){var u={replacedWith:o&&(o.nodeType==null?o.widget:o),insertLeft:o&&o.insertLeft,clearWhenEmpty:!1,shared:o&&o.shared,handleMouseEvents:o&&o.handleMouseEvents};return i=nt(this,i),ha(this,i,i,u,"bookmark")},findMarksAt:function(i){i=nt(this,i);var o=[],u=rt(this,i.line).markedSpans;if(u)for(var l=0;l<u.length;++l){var f=u[l];(f.from==null||f.from<=i.ch)&&(f.to==null||f.to>=i.ch)&&o.push(f.marker.parent||f.marker)}return o},findMarks:function(i,o,u){i=nt(this,i),o=nt(this,o);var l=[],f=i.line;return this.iter(i.line,o.line+1,function(v){var S=v.markedSpans;if(S)for(var P=0;P<S.length;P++){var T=S[P];!(T.to!=null&&f==i.line&&i.ch>=T.to||T.from==null&&f!=i.line||T.from!=null&&f==o.line&&T.from>=o.ch)&&(!u||u(T.marker))&&l.push(T.marker.parent||T.marker)}++f}),l},getAllMarks:function(){var i=[];return this.iter(function(o){var u=o.markedSpans;if(u)for(var l=0;l<u.length;++l)u[l].from!=null&&i.push(u[l].marker)}),i},posFromIndex:function(i){var o,u=this.first,l=this.lineSeparator().length;return this.iter(function(f){var v=f.text.length+l;if(v>i)return o=i,!0;i-=v,++u}),nt(this,F(u,o))},indexFromPos:function(i){i=nt(this,i);var o=i.ch;if(i.line<this.first||i.ch<0)return 0;var u=this.lineSeparator().length;return this.iter(this.first,i.line,function(l){o+=l.text.length+u}),o},copy:function(i){var o=new tn(oo(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return o.scrollTop=this.scrollTop,o.scrollLeft=this.scrollLeft,o.sel=this.sel,o.extend=!1,i&&(o.history.undoDepth=this.history.undoDepth,o.setHistory(this.getHistory())),o},linkedDoc:function(i){i||(i={});var o=this.first,u=this.first+this.size;i.from!=null&&i.from>o&&(o=i.from),i.to!=null&&i.to<u&&(u=i.to);var l=new tn(oo(this,o,u),i.mode||this.modeOption,o,this.lineSep,this.direction);return i.sharedHist&&(l.history=this.history),(this.linked||(this.linked=[])).push({doc:l,sharedHist:i.sharedHist}),l.linked=[{doc:this,isParent:!0,sharedHist:i.sharedHist}],$v(l,gd(this)),l},unlinkDoc:function(i){if(i instanceof wr&&(i=i.doc),this.linked)for(var o=0;o<this.linked.length;++o){var u=this.linked[o];if(u.doc==i){this.linked.splice(o,1),i.unlinkDoc(this),Uv(gd(this));break}}if(i.history==this.history){var l=[i.id];Bi(i,function(f){return l.push(f.id)},!0),i.history=new au(null),i.history.done=aa(this.history.done,l),i.history.undone=aa(this.history.undone,l)}},iterLinkedDocs:function(i){Bi(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){return this.lineSep?i.split(this.lineSep):Ri(i)},lineSeparator:function(){return this.lineSep||`
23
+ `},setDirection:Mt(function(i){i!="rtl"&&(i="ltr"),i!=this.direction&&(this.direction=i,this.iter(function(o){return o.order=null}),this.cm&&Rv(this.cm))})}),tn.prototype.eachLine=tn.prototype.iter;var zc=0;function yd(i){var o=this;if(zs(o),!(_t(o,i)||Li(o.display,i))){Xt(i),A&&(zc=+new Date);var u=po(o,i,!0),l=i.dataTransfer.files;if(!(!u||o.isReadOnly()))if(l&&l.length&&window.FileReader&&window.File)for(var f=l.length,v=Array(f),S=0,P=function(){++S==f&&Nr(o,function(){u=nt(o.doc,u);var ge={from:u,to:u,text:o.doc.splitLines(v.filter(function(Ve){return Ve!=null}).join(o.doc.lineSeparator())),origin:"paste"};fa(o.doc,ge),pd(o.doc,ds(nt(o.doc,u),nt(o.doc,Ws(ge))))})()},T=function(ge,Ve){if(o.options.allowDropFileTypes&&Fe(o.options.allowDropFileTypes,ge.type)==-1){P();return}var Ie=new FileReader;Ie.onerror=function(){return P()},Ie.onload=function(){var De=Ie.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(De)){P();return}v[Ve]=De,P()},Ie.readAsText(ge)},D=0;D<l.length;D++)T(l[D],D);else{if(o.state.draggingText&&o.doc.sel.contains(u)>-1){o.state.draggingText(i),setTimeout(function(){return o.display.input.focus()},20);return}try{var oe=i.dataTransfer.getData("Text");if(oe){var fe;if(o.state.draggingText&&!o.state.draggingText.copy&&(fe=o.listSelections()),fu(o.doc,ds(u,u)),fe)for(var we=0;we<fe.length;++we)yo(o.doc,"",fe[we].anchor,fe[we].head,"drag");o.replaceSelection(oe,"around","paste"),o.display.input.focus()}}catch(ge){}}}}function Wv(i,o){if(A&&(!i.state.draggingText||+new Date-zc<100)){on(o);return}if(!(_t(i,o)||Li(i.display,o))&&(o.dataTransfer.setData("Text",i.getSelection()),o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setDragImage&&!ae)){var u=Z("img",null,null,"position: fixed; left: 0; top: 0;");u.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ee&&(u.width=u.height=1,i.display.wrapper.appendChild(u),u._top=u.offsetTop),o.dataTransfer.setDragImage(u,0,0),ee&&u.parentNode.removeChild(u)}}function Hv(i,o){var u=po(i,o);if(u){var l=document.createDocumentFragment();Oc(i,u,l),i.display.dragCursor||(i.display.dragCursor=Z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)),Ae(i.display.dragCursor,l)}}function zs(i){i.display.dragCursor&&(i.display.lineSpace.removeChild(i.display.dragCursor),i.display.dragCursor=null)}function zv(i){if(document.getElementsByClassName){for(var o=document.getElementsByClassName("CodeMirror"),u=[],l=0;l<o.length;l++){var f=o[l].CodeMirror;f&&u.push(f)}u.length&&u[0].operation(function(){for(var v=0;v<u.length;v++)i(u[v])})}}var Gc=!1;function Gv(){Gc||(ol(),Gc=!0)}function ol(){var i;pe(window,"resize",function(){i==null&&(i=setTimeout(function(){i=null,zv(du)},100))}),pe(window,"blur",function(){return zv(Ka)})}function du(i){var o=i.display;o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.scrollbarsClipped=!1,i.setSize()}for(var Wi={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"},al=0;al<10;al++)Wi[al+48]=Wi[al+96]=String(al);for(var Kc=65;Kc<=90;Kc++)Wi[Kc]=String.fromCharCode(Kc);for(var So=1;So<=12;So++)Wi[So+111]=Wi[So+63235]="F"+So;var ms={};ms.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"},ms.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"},ms.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"},ms.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"]},ms.default=N?ms.macDefault:ms.pcDefault;function Kv(i){var o=i.split(/-(?!$)/);i=o[o.length-1];for(var u,l,f,v,S=0;S<o.length-1;S++){var P=o[S];if(/^(cmd|meta|m)$/i.test(P))v=!0;else if(/^a(lt)?$/i.test(P))u=!0;else if(/^(c|ctrl|control)$/i.test(P))l=!0;else if(/^s(hift)?$/i.test(P))f=!0;else throw new Error("Unrecognized modifier name: "+P)}return u&&(i="Alt-"+i),l&&(i="Ctrl-"+i),v&&(i="Cmd-"+i),f&&(i="Shift-"+i),i}function bd(i){var o={};for(var u in i)if(i.hasOwnProperty(u)){var l=i[u];if(/^(name|fallthrough|(de|at)tach)$/.test(u))continue;if(l=="..."){delete i[u];continue}for(var f=$t(u.split(" "),Kv),v=0;v<f.length;v++){var S=void 0,P=void 0;v==f.length-1?(P=f.join(" "),S=l):(P=f.slice(0,v+1).join(" "),S="...");var T=o[P];if(!T)o[P]=S;else if(T!=S)throw new Error("Inconsistent bindings for "+P)}delete i[u]}for(var D in o)i[D]=o[D];return i}function wo(i,o,u,l){o=mu(o);var f=o.call?o.call(i,l):o[i];if(f===!1)return"nothing";if(f==="...")return"multi";if(f!=null&&u(f))return"handled";if(o.fallthrough){if(Object.prototype.toString.call(o.fallthrough)!="[object Array]")return wo(i,o.fallthrough,u,l);for(var v=0;v<o.fallthrough.length;v++){var S=wo(i,o.fallthrough[v],u,l);if(S)return S}}}function Jc(i){var o=typeof i=="string"?i:Wi[i.keyCode];return o=="Ctrl"||o=="Alt"||o=="Shift"||o=="Mod"}function Jv(i,o,u){var l=i;return o.altKey&&l!="Alt"&&(i="Alt-"+i),(Y?o.metaKey:o.ctrlKey)&&l!="Ctrl"&&(i="Ctrl-"+i),(Y?o.ctrlKey:o.metaKey)&&l!="Mod"&&(i="Cmd-"+i),!u&&o.shiftKey&&l!="Shift"&&(i="Shift-"+i),i}function hu(i,o){if(ee&&i.keyCode==34&&i.char)return!1;var u=Wi[i.keyCode];return u==null||i.altGraphKey?!1:(i.keyCode==3&&i.code&&(u=i.code),Jv(u,i,o))}function mu(i){return typeof i=="string"?ms[i]:i}function ll(i,o){for(var u=i.doc.sel.ranges,l=[],f=0;f<u.length;f++){for(var v=o(u[f]);l.length&&re(v.from,ht(l).to)<=0;){var S=l.pop();if(re(S.from,v.from)<0){v.from=S.from;break}}l.push(v)}yn(i,function(){for(var P=l.length-1;P>=0;P--)yo(i.doc,"",l[P].from,l[P].to,"+delete");Bs(i)})}function ul(i,o,u){var l=jn(i.text,o+u,u);return l<0||l>i.text.length?null:l}function Yc(i,o,u){var l=ul(i,o.ch,u);return l==null?null:new F(o.line,l,u<0?"after":"before")}function vu(i,o,u,l,f){if(i){o.doc.direction=="rtl"&&(f=-f);var v=mt(u,o.doc.direction);if(v){var S=f<0?ht(v):v[0],P=f<0==(S.level==1),T=P?"after":"before",D;if(S.level>0||o.doc.direction=="rtl"){var oe=Fs(o,u);D=f<0?u.text.length-1:0;var fe=yi(o,oe,D).top;D=mn(function(we){return yi(o,oe,we).top==fe},f<0==(S.level==1)?S.from:S.to-1,D),T=="before"&&(D=ul(u,D,1))}else D=f<0?S.to:S.from;return new F(l,D,T)}}return new F(l,f<0?u.text.length:0,f<0?"before":"after")}function Yv(i,o,u,l){var f=mt(o,i.doc.direction);if(!f)return Yc(o,u,l);u.ch>=o.text.length?(u.ch=o.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var v=Ft(f,u.ch,u.sticky),S=f[v];if(i.doc.direction=="ltr"&&S.level%2==0&&(l>0?S.to>u.ch:S.from<u.ch))return Yc(o,u,l);var P=function(Ue,Ge){return ul(o,Ue instanceof F?Ue.ch:Ue,Ge)},T,D=function(Ue){return i.options.lineWrapping?(T=T||Fs(i,o),Gp(i,o,T,Ue)):{begin:0,end:o.text.length}},oe=D(u.sticky=="before"?P(u,-1):u.ch);if(i.doc.direction=="rtl"||S.level==1){var fe=S.level==1==l<0,we=P(u,fe?1:-1);if(we!=null&&(fe?we<=S.to&&we<=oe.end:we>=S.from&&we>=oe.begin)){var ge=fe?"before":"after";return new F(u.line,we,ge)}}var Ve=function(Ue,Ge,We){for(var Xe=function(mr,Gr){return Gr?new F(u.line,P(mr,1),"before"):new F(u.line,mr,"after")};Ue>=0&&Ue<f.length;Ue+=Ge){var ct=f[Ue],at=Ge>0==(ct.level!=1),It=at?We.begin:P(We.end,-1);if(ct.from<=It&&It<ct.to||(It=at?ct.from:P(ct.to,-1),We.begin<=It&&It<We.end))return Xe(It,at)}},Ie=Ve(v+l,l,oe);if(Ie)return Ie;var De=l>0?oe.end:P(oe.begin,-1);return De!=null&&!(l>0&&De==o.text.length)&&(Ie=Ve(l>0?0:f.length-1,l,D(De)),Ie)?Ie:null}var cl={selectAll:Dc,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),Lt)},killLine:function(i){return ll(i,function(o){if(o.empty()){var u=rt(i.doc,o.head.line).text.length;return o.head.ch==u&&o.head.line<i.lastLine()?{from:o.head,to:F(o.head.line+1,0)}:{from:o.head,to:F(o.head.line,u)}}else return{from:o.from(),to:o.to()}})},deleteLine:function(i){return ll(i,function(o){return{from:F(o.from().line,0),to:nt(i.doc,F(o.to().line+1,0))}})},delLineLeft:function(i){return ll(i,function(o){return{from:F(o.from().line,0),to:o.from()}})},delWrappedLineLeft:function(i){return ll(i,function(o){var u=i.charCoords(o.head,"div").top+5,l=i.coordsChar({left:0,top:u},"div");return{from:l,to:o.from()}})},delWrappedLineRight:function(i){return ll(i,function(o){var u=i.charCoords(o.head,"div").top+5,l=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:u},"div");return{from:o.from(),to:l}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(F(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(F(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(o){return ma(i,o.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(o){return Xc(i,o.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(o){return Xv(i,o.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:u},"div")},zt)},goLineLeft:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5;return i.coordsChar({left:0,top:u},"div")},zt)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(o){var u=i.cursorCoords(o.head,"div").top+5,l=i.coordsChar({left:0,top:u},"div");return l.ch<i.getLine(l.line).search(/\S/)?Xc(i,o.head):l},zt)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"codepoint")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection(" ")},insertSoftTab:function(i){for(var o=[],u=i.listSelections(),l=i.options.tabSize,f=0;f<u.length;f++){var v=u[f].from(),S=lt(i.getLine(v.line),v.ch,l);o.push(qr(l-S%l))}i.replaceSelections(o)},defaultTab:function(i){i.somethingSelected()?i.indentSelection("add"):i.execCommand("insertTab")},transposeChars:function(i){return yn(i,function(){for(var o=i.listSelections(),u=[],l=0;l<o.length;l++)if(o[l].empty()){var f=o[l].head,v=rt(i.doc,f.line).text;if(v){if(f.ch==v.length&&(f=new F(f.line,f.ch-1)),f.ch>0)f=new F(f.line,f.ch+1),i.replaceRange(v.charAt(f.ch-1)+v.charAt(f.ch-2),F(f.line,f.ch-2),f,"+transpose");else if(f.line>i.doc.first){var S=rt(i.doc,f.line-1).text;S&&(f=new F(f.line,1),i.replaceRange(v.charAt(0)+i.doc.lineSeparator()+S.charAt(S.length-1),F(f.line-1,S.length-1),f,"+transpose"))}}u.push(new it(f,f))}i.setSelections(u)})},newlineAndIndent:function(i){return yn(i,function(){for(var o=i.listSelections(),u=o.length-1;u>=0;u--)i.replaceRange(i.doc.lineSeparator(),o[u].anchor,o[u].head,"+input");o=i.listSelections();for(var l=0;l<o.length;l++)i.indentLine(o[l].from().line,null,!0);Bs(i)})},openLine:function(i){return i.replaceSelection(`
24
+ `,"start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function ma(i,o){var u=rt(i.doc,o),l=gi(u);return l!=u&&(o=Qt(l)),vu(!0,i,l,o,1)}function Xv(i,o){var u=rt(i.doc,o),l=fv(u);return l!=u&&(o=Qt(l)),vu(!0,i,u,o,-1)}function Xc(i,o){var u=ma(i,o.line),l=rt(i.doc,u.line),f=mt(l,i.doc.direction);if(!f||f[0].level==0){var v=Math.max(u.ch,l.text.search(/\S/)),S=o.line==u.line&&o.ch<=v&&o.ch;return F(u.line,S?0:v,u.sticky)}return u}function Qc(i,o,u){if(typeof o=="string"&&(o=cl[o],!o))return!1;i.display.input.ensurePolled();var l=i.display.shift,f=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),u&&(i.display.shift=!1),f=o(i)!=bt}finally{i.display.shift=l,i.state.suppressEdits=!1}return f}function Te(i,o,u){for(var l=0;l<i.state.keyMaps.length;l++){var f=wo(o,i.state.keyMaps[l],u,i);if(f)return f}return i.options.extraKeys&&wo(o,i.options.extraKeys,u,i)||wo(o,i.options.keyMap,u,i)}var Qv=new Ke;function Gs(i,o,u,l){var f=i.state.keySeq;if(f){if(Jc(o))return"handled";if(/\'$/.test(o)?i.state.keySeq=null:Qv.set(50,function(){i.state.keySeq==f&&(i.state.keySeq=null,i.display.input.reset())}),xd(i,f+" "+o,u,l))return!0}return xd(i,o,u,l)}function xd(i,o,u,l){var f=Te(i,o,l);return f=="multi"&&(i.state.keySeq=o),f=="handled"&&Hr(i,"keyHandled",i,o,u),(f=="handled"||f=="multi")&&(Xt(u),Ga(i)),!!f}function fl(i,o){var u=hu(o,!0);return u?o.shiftKey&&!i.state.keySeq?Gs(i,"Shift-"+u,o,function(l){return Qc(i,l,!0)})||Gs(i,u,o,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return Qc(i,l)}):Gs(i,u,o,function(l){return Qc(i,l)}):!1}function Zv(i,o,u){return Gs(i,"'"+u+"'",o,function(l){return Qc(i,l,!0)})}var pl=null;function Sd(i){var o=this;if(!(i.target&&i.target!=o.display.input.getField())&&(o.curOp.focus=He(Ye(o)),!_t(o,i))){A&&O<11&&i.keyCode==27&&(i.returnValue=!1);var u=i.keyCode;o.display.shift=u==16||i.shiftKey;var l=fl(o,i);ee&&(pl=l?u:null,!l&&u==88&&!Wo&&(N?i.metaKey:i.ctrlKey)&&o.replaceSelection("",null,"cut")),m&&!N&&!l&&u==46&&i.shiftKey&&!i.ctrlKey&&document.execCommand&&document.execCommand("cut"),u==18&&!/\bCodeMirror-crosshair\b/.test(o.display.lineDiv.className)&&Ks(o)}}function Ks(i){var o=i.display.lineDiv;Re(o,"CodeMirror-crosshair");function u(l){(l.keyCode==18||!l.altKey)&&(H(o,"CodeMirror-crosshair"),Je(document,"keyup",u),Je(document,"mouseover",u))}pe(document,"keyup",u),pe(document,"mouseover",u)}function qv(i){i.keyCode==16&&(this.doc.sel.shift=!1),_t(this,i)}function br(i){var o=this;if(!(i.target&&i.target!=o.display.input.getField())&&!(Li(o.display,i)||_t(o,i)||i.ctrlKey&&!i.altKey||N&&i.metaKey)){var u=i.keyCode,l=i.charCode;if(ee&&u==pl){pl=null,Xt(i);return}if(!(ee&&(!i.which||i.which<10)&&fl(o,i))){var f=String.fromCharCode(l==null?u:l);f!="\b"&&(Zv(o,i,f)||o.display.input.onKeyPress(i))}}}var qt=400,$e=function(i,o,u){this.time=i,this.pos=o,this.button=u};$e.prototype.compare=function(i,o,u){return this.time+qt>i&&re(o,this.pos)==0&&u==this.button};var vs,dl;function Tr(i,o){var u=+new Date;return dl&&dl.compare(u,i,o)?(vs=dl=null,"triple"):vs&&vs.compare(u,i,o)?(dl=new $e(u,i,o),vs=null,"double"):(vs=new $e(u,i,o),dl=null,"single")}function gs(i){var o=this,u=o.display;if(!(_t(o,i)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=i.shiftKey,Li(u,i)){j||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!qc(o,i)){var l=po(o,i),f=ns(i),v=l?Tr(l,f):"single";gt(o).focus(),f==1&&o.state.selectingText&&o.state.selectingText(i),!(l&&Gt(o,f,l,v,i))&&(f==1?l?tg(o,l,v,i):an(i)==u.scroller&&Xt(i):f==2?(l&&ua(o.doc,l),setTimeout(function(){return u.input.focus()},20)):f==3&&(X?o.display.input.onContextMenu(i):Ec(o)))}}}function Gt(i,o,u,l,f){var v="Click";return l=="double"?v="Double"+v:l=="triple"&&(v="Triple"+v),v=(o==1?"Left":o==2?"Middle":"Right")+v,Gs(i,Jv(v,f),f,function(S){if(typeof S=="string"&&(S=cl[S]),!S)return!1;var P=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),P=S(i,u)!=bt}finally{i.state.suppressEdits=!1}return P})}function eg(i,o,u){var l=i.getOption("configureMouse"),f=l?l(i,o,u):{};if(f.unit==null){var v=U?u.shiftKey&&u.metaKey:u.altKey;f.unit=v?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(f.extend==null||i.doc.extend)&&(f.extend=i.doc.extend||u.shiftKey),f.addNew==null&&(f.addNew=N?u.metaKey:u.ctrlKey),f.moveOnDrag==null&&(f.moveOnDrag=!(N?u.altKey:u.ctrlKey)),f}function tg(i,o,u,l){A?setTimeout(ut(Jp,i),0):i.curOp.focus=He(Ye(i));var f=eg(i,u,l),v=i.doc.sel,S;i.options.dragDrop&&ln&&!i.isReadOnly()&&u=="single"&&(S=v.contains(o))>-1&&(re((S=v.ranges[S]).from(),o)<0||o.xRel>0)&&(re(S.to(),o)>0||o.xRel<0)?s0(i,l,o,f):Zc(i,l,o,f)}function s0(i,o,u,l){var f=i.display,v=!1,S=Nr(i,function(D){j&&(f.scroller.draggable=!1),i.state.draggingText=!1,i.state.delayingBlurEvent&&(i.hasFocus()?i.state.delayingBlurEvent=!1:Ec(i)),Je(f.wrapper.ownerDocument,"mouseup",S),Je(f.wrapper.ownerDocument,"mousemove",P),Je(f.scroller,"dragstart",T),Je(f.scroller,"drop",S),v||(Xt(D),l.addNew||ua(i.doc,u,null,null,l.extend),j&&!ae||A&&O==9?setTimeout(function(){f.wrapper.ownerDocument.body.focus({preventScroll:!0}),f.input.focus()},20):f.input.focus())}),P=function(D){v=v||Math.abs(o.clientX-D.clientX)+Math.abs(o.clientY-D.clientY)>=10},T=function(){return v=!0};j&&(f.scroller.draggable=!0),i.state.draggingText=S,S.copy=!l.moveOnDrag,pe(f.wrapper.ownerDocument,"mouseup",S),pe(f.wrapper.ownerDocument,"mousemove",P),pe(f.scroller,"dragstart",T),pe(f.scroller,"drop",S),i.state.delayingBlurEvent=!0,setTimeout(function(){return f.input.focus()},20),f.scroller.dragDrop&&f.scroller.dragDrop()}function wd(i,o,u){if(u=="char")return new it(o,o);if(u=="word")return i.findWordAt(o);if(u=="line")return new it(F(o.line,0),nt(i.doc,F(o.line+1,0)));var l=u(i,o);return new it(l.from,l.to)}function Zc(i,o,u,l){A&&Ec(i);var f=i.display,v=i.doc;Xt(o);var S,P,T=v.sel,D=T.ranges;if(l.addNew&&!l.extend?(P=v.sel.contains(u),P>-1?S=D[P]:S=new it(u,u)):(S=v.sel.primary(),P=v.sel.primIndex),l.unit=="rectangle")l.addNew||(S=new it(u,u)),u=po(i,o,!0,!0),P=-1;else{var oe=wd(i,u,l.unit);l.extend?S=la(S,oe.anchor,oe.head,l.extend):S=oe}l.addNew?P==-1?(P=D.length,fn(v,xi(i,D.concat([S]),P),{scroll:!1,origin:"*mouse"})):D.length>1&&D[P].empty()&&l.unit=="char"&&!l.extend?(fn(v,xi(i,D.slice(0,P).concat(D.slice(P+1)),0),{scroll:!1,origin:"*mouse"}),T=v.sel):Mc(v,P,S,Rt):(P=0,fn(v,new Jn([S],0),Rt),T=v.sel);var fe=u;function we(We){if(re(fe,We)!=0)if(fe=We,l.unit=="rectangle"){for(var Xe=[],ct=i.options.tabSize,at=lt(rt(v,u.line).text,u.ch,ct),It=lt(rt(v,We.line).text,We.ch,ct),mr=Math.min(at,It),Gr=Math.max(at,It),Cr=Math.min(u.line,We.line),Ln=Math.min(i.lastLine(),Math.max(u.line,We.line));Cr<=Ln;Cr++){var Pn=rt(v,Cr).text,Br=kr(Pn,mr,ct);mr==Gr?Xe.push(new it(F(Cr,Br),F(Cr,Br))):Pn.length>Br&&Xe.push(new it(F(Cr,Br),F(Cr,kr(Pn,Gr,ct))))}Xe.length||Xe.push(new it(u,u)),fn(v,xi(i,T.ranges.slice(0,P).concat(Xe),P),{origin:"*mouse",scroll:!1}),i.scrollIntoView(We)}else{var Dn=S,pn=wd(i,We,l.unit),$r=Dn.anchor,Mr;re(pn.anchor,$r)>0?(Mr=pn.head,$r=jt(Dn.from(),pn.anchor)):(Mr=pn.anchor,$r=St(Dn.to(),pn.head));var vr=T.ranges.slice(0);vr[P]=gu(i,new it(nt(v,$r),Mr)),fn(v,xi(i,vr,P),Rt)}}var ge=f.wrapper.getBoundingClientRect(),Ve=0;function Ie(We){var Xe=++Ve,ct=po(i,We,!0,l.unit=="rectangle");if(ct)if(re(ct,fe)!=0){i.curOp.focus=He(Ye(i)),we(ct);var at=Ns(f,v);(ct.line>=at.to||ct.line<at.from)&&setTimeout(Nr(i,function(){Ve==Xe&&Ie(We)}),150)}else{var It=We.clientY<ge.top?-20:We.clientY>ge.bottom?20:0;It&&setTimeout(Nr(i,function(){Ve==Xe&&(f.scroller.scrollTop+=It,Ie(We))}),50)}}function De(We){i.state.selectingText=!1,Ve=1/0,We&&(Xt(We),f.input.focus()),Je(f.wrapper.ownerDocument,"mousemove",Ue),Je(f.wrapper.ownerDocument,"mouseup",Ge),v.history.lastSelOrigin=null}var Ue=Nr(i,function(We){We.buttons===0||!ns(We)?De(We):Ie(We)}),Ge=Nr(i,De);i.state.selectingText=Ge,pe(f.wrapper.ownerDocument,"mousemove",Ue),pe(f.wrapper.ownerDocument,"mouseup",Ge)}function gu(i,o){var u=o.anchor,l=o.head,f=rt(i.doc,u.line);if(re(u,l)==0&&u.sticky==l.sticky)return o;var v=mt(f);if(!v)return o;var S=Ft(v,u.ch,u.sticky),P=v[S];if(P.from!=u.ch&&P.to!=u.ch)return o;var T=S+(P.from==u.ch==(P.level!=1)?0:1);if(T==0||T==v.length)return o;var D;if(l.line!=u.line)D=(l.line-u.line)*(i.doc.direction=="ltr"?1:-1)>0;else{var oe=Ft(v,l.ch,l.sticky),fe=oe-S||(l.ch-u.ch)*(P.level==1?-1:1);oe==T-1||oe==T?D=fe<0:D=fe>0}var we=v[T+(D?-1:0)],ge=D==(we.level==1),Ve=ge?we.from:we.to,Ie=ge?"after":"before";return u.ch==Ve&&u.sticky==Ie?o:new it(new F(u.line,Ve,Ie),l)}function hl(i,o,u,l){var f,v;if(o.touches)f=o.touches[0].clientX,v=o.touches[0].clientY;else try{f=o.clientX,v=o.clientY}catch(we){return!1}if(f>=Math.floor(i.display.gutters.getBoundingClientRect().right))return!1;l&&Xt(o);var S=i.display,P=S.lineDiv.getBoundingClientRect();if(v>P.bottom||!Sr(i,u))return rs(o);v-=P.top-S.viewOffset;for(var T=0;T<i.display.gutterSpecs.length;++T){var D=S.gutters.childNodes[T];if(D&&D.getBoundingClientRect().right>=f){var oe=ls(i.doc,v),fe=i.display.gutterSpecs[T];return xt(i,u,i,oe,fe.className,o),rs(o)}}}function qc(i,o){return hl(i,o,"gutterClick",!0)}function lr(i,o){Li(i.display,o)||rg(i,o)||_t(i,o,"contextmenu")||X||i.display.input.onContextMenu(o)}function rg(i,o){return Sr(i,"gutterContextMenu")?hl(i,o,"gutterContextMenu",!1):!1}function yu(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Xo(i)}var Si={toString:function(){return"CodeMirror.Init"}},ml={},bu={};function xu(i){var o=i.optionHandlers;function u(l,f,v,S){i.defaults[l]=f,v&&(o[l]=S?function(P,T,D){D!=Si&&v(P,T,D)}:v)}i.defineOption=u,i.Init=Si,u("value","",function(l,f){return l.setValue(f)},!0),u("mode",null,function(l,f){l.doc.modeOption=f,Rc(l)},!0),u("indentUnit",2,Rc,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(l){tl(l),Xo(l),Cn(l)},!0),u("lineSeparator",null,function(l,f){if(l.doc.lineSep=f,!!f){var v=[],S=l.doc.first;l.doc.iter(function(T){for(var D=0;;){var oe=T.text.indexOf(f,D);if(oe==-1)break;D=oe+f.length,v.push(F(S,oe))}S++});for(var P=v.length-1;P>=0;P--)yo(l.doc,f,v[P],F(v[P].line,v[P].ch+f.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(l,f,v){l.state.specialChars=new RegExp(f.source+(f.test(" ")?"":"| "),"g"),v!=Si&&l.refresh()}),u("specialCharPlaceholder",dv,function(l){return l.refresh()},!0),u("electricChars",!0),u("inputStyle",E?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(l,f){return l.getInputField().spellcheck=f},!0),u("autocorrect",!1,function(l,f){return l.getInputField().autocorrect=f},!0),u("autocapitalize",!1,function(l,f){return l.getInputField().autocapitalize=f},!0),u("rtlMoveVisually",!se),u("wholeLineUpdateBefore",!0),u("theme","default",function(l){yu(l),qa(l)},!0),u("keyMap","default",function(l,f,v){var S=mu(f),P=v!=Si&&mu(v);P&&P.detach&&P.detach(l,S),S.attach&&S.attach(l,P||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,ig,!0),u("gutters",[],function(l,f){l.display.gutterSpecs=jc(f,l.options.lineNumbers),qa(l)},!0),u("fixedGutter",!0,function(l,f){l.display.gutters.style.left=f?bc(l.display)+"px":"0",l.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(l){return vo(l)},!0),u("scrollbarStyle","native",function(l){Qp(l),vo(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),u("lineNumbers",!1,function(l,f){l.display.gutterSpecs=jc(l.options.gutters,f),qa(l)},!0),u("firstLineNumber",1,qa,!0),u("lineNumberFormatter",function(l){return l},qa,!0),u("showCursorWhenSelecting",!1,Ds,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(l,f){f=="nocursor"&&(Ka(l),l.display.input.blur()),l.display.input.readOnlyChanged(f)}),u("screenReaderLabel",null,function(l,f){f=f===""?null:f,l.display.input.screenReaderLabelChanged(f)}),u("disableInput",!1,function(l,f){f||l.display.input.reset()},!0),u("dragDrop",!0,ng),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Ds,!0),u("singleCursorHeightPerLine",!0,Ds,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,tl,!0),u("addModeClass",!1,tl,!0),u("pollInterval",100),u("undoDepth",200,function(l,f){return l.doc.history.undoDepth=f}),u("historyEventDelay",1250),u("viewportMargin",10,function(l){return l.refresh()},!0),u("maxHighlightLength",1e4,tl,!0),u("moveInputWithCursor",!0,function(l,f){f||l.display.input.resetPosition()}),u("tabindex",null,function(l,f){return l.display.input.getField().tabIndex=f||""}),u("autofocus",null),u("direction","ltr",function(l,f){return l.doc.setDirection(f)},!0),u("phrases",null)}function ng(i,o,u){var l=u&&u!=Si;if(!o!=!l){var f=i.display.dragFunctions,v=o?pe:Je;v(i.display.scroller,"dragstart",f.start),v(i.display.scroller,"dragenter",f.enter),v(i.display.scroller,"dragover",f.over),v(i.display.scroller,"dragleave",f.leave),v(i.display.scroller,"drop",f.drop)}}function ig(i){i.options.lineWrapping?(Re(i.display.wrapper,"CodeMirror-wrap"),i.display.sizer.style.minWidth="",i.display.sizerWidth=null):(H(i.display.wrapper,"CodeMirror-wrap"),zl(i)),xc(i),Cn(i),Xo(i),setTimeout(function(){return vo(i)},100)}function wr(i,o){var u=this;if(!(this instanceof wr))return new wr(i,o);this.options=o=o?yt(o):{},yt(ml,o,!1);var l=o.value;typeof l=="string"?l=new tn(l,o.mode,null,o.lineSeparator,o.direction):o.mode&&(l.modeOption=o.mode),this.doc=l;var f=new wr.inputStyles[o.inputStyle](this),v=this.display=new jv(i,l,f,o);v.wrapper.CodeMirror=this,yu(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Qp(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 Ke,keySeq:null,specialChars:null},o.autofocus&&!E&&v.input.focus(),A&&O<11&&setTimeout(function(){return u.display.input.reset(!0)},20),vl(this),Gv(),Ni(this),this.curOp.forceUpdate=!0,ou(this,l),o.autofocus&&!E||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&Ac(u)},20):Ka(this);for(var S in bu)bu.hasOwnProperty(S)&&bu[S](this,o[S],Si);td(this),o.finishInit&&o.finishInit(this);for(var P=0;P<ef.length;++P)ef[P](this);fs(this),j&&o.lineWrapping&&getComputedStyle(v.lineDiv).textRendering=="optimizelegibility"&&(v.lineDiv.style.textRendering="auto")}wr.defaults=ml,wr.optionHandlers=bu;function vl(i){var o=i.display;pe(o.scroller,"mousedown",Nr(i,gs)),A&&O<11?pe(o.scroller,"dblclick",Nr(i,function(T){if(!_t(i,T)){var D=po(i,T);if(!(!D||qc(i,T)||Li(i.display,T))){Xt(T);var oe=i.findWordAt(D);ua(i.doc,oe.anchor,oe.head)}}})):pe(o.scroller,"dblclick",function(T){return _t(i,T)||Xt(T)}),pe(o.scroller,"contextmenu",function(T){return lr(i,T)}),pe(o.input.getField(),"contextmenu",function(T){o.scroller.contains(T.target)||lr(i,T)});var u,l={end:0};function f(){o.activeTouch&&(u=setTimeout(function(){return o.activeTouch=null},1e3),l=o.activeTouch,l.end=+new Date)}function v(T){if(T.touches.length!=1)return!1;var D=T.touches[0];return D.radiusX<=1&&D.radiusY<=1}function S(T,D){if(D.left==null)return!0;var oe=D.left-T.left,fe=D.top-T.top;return oe*oe+fe*fe>20*20}pe(o.scroller,"touchstart",function(T){if(!_t(i,T)&&!v(T)&&!qc(i,T)){o.input.ensurePolled(),clearTimeout(u);var D=+new Date;o.activeTouch={start:D,moved:!1,prev:D-l.end<=300?l:null},T.touches.length==1&&(o.activeTouch.left=T.touches[0].pageX,o.activeTouch.top=T.touches[0].pageY)}}),pe(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),pe(o.scroller,"touchend",function(T){var D=o.activeTouch;if(D&&!Li(o,T)&&D.left!=null&&!D.moved&&new Date-D.start<300){var oe=i.coordsChar(o.activeTouch,"page"),fe;!D.prev||S(D,D.prev)?fe=new it(oe,oe):!D.prev.prev||S(D,D.prev.prev)?fe=i.findWordAt(oe):fe=new it(F(oe.line,0),nt(i.doc,F(oe.line+1,0))),i.setSelection(fe.anchor,fe.head),i.focus(),Xt(T)}f()}),pe(o.scroller,"touchcancel",f),pe(o.scroller,"scroll",function(){o.scroller.clientHeight&&(ta(i,o.scroller.scrollTop),$s(i,o.scroller.scrollLeft,!0),xt(i,"scroll",i))}),pe(o.scroller,"mousewheel",function(T){return id(i,T)}),pe(o.scroller,"DOMMouseScroll",function(T){return id(i,T)}),pe(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(T){_t(i,T)||on(T)},over:function(T){_t(i,T)||(Hv(i,T),on(T))},start:function(T){return Wv(i,T)},drop:Nr(i,yd),leave:function(T){_t(i,T)||zs(i)}};var P=o.input.getField();pe(P,"keyup",function(T){return qv.call(i,T)}),pe(P,"keydown",Nr(i,Sd)),pe(P,"keypress",Nr(i,br)),pe(P,"focus",function(T){return Ac(i,T)}),pe(P,"blur",function(T){return Ka(i,T)})}var ef=[];wr.defineInitHook=function(i){return ef.push(i)};function va(i,o,u,l){var f=i.doc,v;u==null&&(u="add"),u=="smart"&&(f.mode.indent?v=zo(i,o).state:u="prev");var S=i.options.tabSize,P=rt(f,o),T=lt(P.text,null,S);P.stateAfter&&(P.stateAfter=null);var D=P.text.match(/^\s*/)[0],oe;if(!l&&!/\S/.test(P.text))oe=0,u="not";else if(u=="smart"&&(oe=f.mode.indent(v,P.text.slice(D.length),P.text),oe==bt||oe>150)){if(!l)return;u="prev"}u=="prev"?o>f.first?oe=lt(rt(f,o-1).text,null,S):oe=0:u=="add"?oe=T+i.options.indentUnit:u=="subtract"?oe=T-i.options.indentUnit:typeof u=="number"&&(oe=T+u),oe=Math.max(0,oe);var fe="",we=0;if(i.options.indentWithTabs)for(var ge=Math.floor(oe/S);ge;--ge)we+=S,fe+=" ";if(we<oe&&(fe+=qr(oe-we)),fe!=D)return yo(f,fe,F(o,0),F(o,D.length),"+input"),P.stateAfter=null,!0;for(var Ve=0;Ve<f.sel.ranges.length;Ve++){var Ie=f.sel.ranges[Ve];if(Ie.head.line==o&&Ie.head.ch<D.length){var De=F(o,D.length);Mc(f,Ve,new it(De,De));break}}}var ii=null;function gl(i){ii=i}function si(i,o,u,l,f){var v=i.doc;i.display.shift=!1,l||(l=v.sel);var S=+new Date-200,P=f=="paste"||i.state.pasteIncoming>S,T=Ri(o),D=null;if(P&&l.ranges.length>1)if(ii&&ii.text.join(`
25
25
  `)==o){if(l.ranges.length%ii.text.length==0){D=[];for(var oe=0;oe<ii.text.length;oe++)D.push(v.splitLines(ii.text[oe]))}}else T.length==l.ranges.length&&i.options.pasteLinesPerSelection&&(D=$t(T,function(Ue){return[Ue]}));for(var fe=i.curOp.updateInput,we=l.ranges.length-1;we>=0;we--){var ge=l.ranges[we],Ve=ge.from(),Ie=ge.to();ge.empty()&&(u&&u>0?Ve=F(Ve.line,Ve.ch-u):i.state.overwrite&&!P?Ie=F(Ie.line,Math.min(rt(v,Ie.line).text.length,Ie.ch+ht(T).length)):P&&ii&&ii.lineWise&&ii.text.join(`
26
26
  `)==T.join(`
27
- `)&&(Ve=Ie=F(Ve.line,0)));var De={from:Ve,to:Ie,text:D?D[we%D.length]:T,origin:f||(P?"paste":i.state.cutIncoming>S?"cut":"+input")};fa(i.doc,De),Hr(i,"inputRead",i,De)}o&&!P&&Ed(i,o),Bs(i),i.curOp.updateInput<2&&(i.curOp.updateInput=fe),i.curOp.typing=!0,i.state.pasteIncoming=i.state.cutIncoming=-1}function Od(i,o){var u=i.clipboardData&&i.clipboardData.getData("Text");if(u)return i.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&yn(o,function(){return si(o,u,0,null,"paste")}),!0}function Ed(i,o){if(!(!i.options.electricChars||!i.options.smartIndent))for(var u=i.doc.sel,l=u.ranges.length-1;l>=0;l--){var f=u.ranges[l];if(!(f.head.ch>100||l&&u.ranges[l-1].head.line==f.head.line)){var v=i.getModeAt(f.head),S=!1;if(v.electricChars){for(var P=0;P<v.electricChars.length;P++)if(o.indexOf(v.electricChars.charAt(P))>-1){S=va(i,f.head.line,"smart");break}}else v.electricInput&&v.electricInput.test(rt(i.doc,f.head.line).text.slice(0,f.head.ch))&&(S=va(i,f.head.line,"smart"));S&&Hr(i,"electricInput",i,f.head.line)}}}function Ad(i){for(var o=[],u=[],l=0;l<i.doc.sel.ranges.length;l++){var f=i.doc.sel.ranges[l].head.line,v={anchor:F(f,0),head:F(f+1,0)};u.push(v),o.push(i.getRange(v.anchor,v.head))}return{text:o,ranges:u}}function _n(i,o,u,l){i.setAttribute("autocorrect",u?"on":"off"),i.setAttribute("autocapitalize",l?"on":"off"),i.setAttribute("spellcheck",!!o)}function tf(){var i=Z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),o=Z("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return j?i.style.width="1000px":i.setAttribute("wrap","off"),J&&(i.style.border="1px solid black"),o}function sg(i){var o=i.optionHandlers,u=i.helpers={};i.prototype={constructor:i,focus:function(){gt(this).focus(),this.display.input.focus()},setOption:function(l,f){var v=this.options,S=v[l];v[l]==f&&l!="mode"||(v[l]=f,o.hasOwnProperty(l)&&Nr(this,o[l])(this,f,S),xt(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,f){this.state.keyMaps[f?"push":"unshift"](mu(l))},removeKeyMap:function(l){for(var f=this.state.keyMaps,v=0;v<f.length;++v)if(f[v]==l||f[v].name==l)return f.splice(v,1),!0},addOverlay:cn(function(l,f){var v=l.token?l:i.getMode(this.options,l);if(v.startState)throw new Error("Overlays may not be stateful.");nr(this.state.overlays,{mode:v,modeSpec:l,opaque:f&&f.opaque,priority:f&&f.priority||0},function(S){return S.priority}),this.state.modeGen++,Cn(this)}),removeOverlay:cn(function(l){for(var f=this.state.overlays,v=0;v<f.length;++v){var S=f[v].modeSpec;if(S==l||typeof l=="string"&&S.name==l){f.splice(v,1),this.state.modeGen++,Cn(this);return}}}),indentLine:cn(function(l,f,v){typeof f!="string"&&typeof f!="number"&&(f==null?f=this.options.smartIndent?"smart":"prev":f=f?"add":"subtract"),ao(this.doc,l)&&va(this,l,f,v)}),indentSelection:cn(function(l){for(var f=this.doc.sel.ranges,v=-1,S=0;S<f.length;S++){var P=f[S];if(P.empty())P.head.line>v&&(va(this,P.head.line,l,!0),v=P.head.line,S==this.doc.sel.primIndex&&Bs(this));else{var T=P.from(),D=P.to(),oe=Math.max(v,T.line);v=Math.min(this.lastLine(),D.line-(D.ch?0:1))+1;for(var fe=oe;fe<v;++fe)va(this,fe,l);var we=this.doc.sel.ranges;T.ch==0&&f.length==we.length&&we[S].from().ch>0&&Mc(this.doc,S,new it(T,we[S].to()),Lt)}}}),getTokenAt:function(l,f){return gp(this,l,f)},getLineTokens:function(l,f){return gp(this,F(l),f,!0)},getTokenTypeAt:function(l){l=nt(this.doc,l);var f=ic(this,rt(this.doc,l.line)),v=0,S=(f.length-1)/2,P=l.ch,T;if(P==0)T=f[2];else for(;;){var D=v+S>>1;if((D?f[D*2-1]:0)>=P)S=D;else if(f[D*2+1]<P)v=D+1;else{T=f[D*2+2];break}}var oe=T?T.indexOf("overlay "):-1;return oe<0?T:oe==0?null:T.slice(0,oe-1)},getModeAt:function(l){var f=this.doc.mode;return f.innerMode?i.innerMode(f,this.getTokenAt(l).state).mode:f},getHelper:function(l,f){return this.getHelpers(l,f)[0]},getHelpers:function(l,f){var v=[];if(!u.hasOwnProperty(f))return v;var S=u[f],P=this.getModeAt(l);if(typeof P[f]=="string")S[P[f]]&&v.push(S[P[f]]);else if(P[f])for(var T=0;T<P[f].length;T++){var D=S[P[f][T]];D&&v.push(D)}else P.helperType&&S[P.helperType]?v.push(S[P.helperType]):S[P.name]&&v.push(S[P.name]);for(var oe=0;oe<S._global.length;oe++){var fe=S._global[oe];fe.pred(P,this)&&Fe(v,fe.val)==-1&&v.push(fe.val)}return v},getStateAfter:function(l,f){var v=this.doc;return l=Zt(v,l==null?v.first+v.size-1:l),zo(this,l+1,f).state},cursorCoords:function(l,f){var v,S=this.doc.sel.primary();return l==null?v=S.head:typeof l=="object"?v=nt(this.doc,l):v=l?S.from():S.to(),zr(this,v,f||"page")},charCoords:function(l,f){return Wa(this,nt(this.doc,l),f||"page")},coordsChar:function(l,f){return l=Wp(this,l,f||"page"),gc(this,l.left,l.top)},lineAtHeight:function(l,f){return l=Wp(this,{top:l,left:0},f||"page").top,ls(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,f,v){var S=!1,P;if(typeof l=="number"){var T=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>T&&(l=T,S=!0),P=rt(this.doc,l)}else P=l;return Xl(this,P,{top:0,left:0},f||"page",v||S).top+(S?this.doc.height-us(P):0)},defaultTextHeight:function(){return Qo(this.display)},defaultCharWidth:function(){return Zo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,f,v,S,P){var T=this.display;l=zr(this,nt(this.doc,l));var D=l.bottom,oe=l.left;if(f.style.position="absolute",f.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(f),T.sizer.appendChild(f),S=="over")D=l.top;else if(S=="above"||S=="near"){var fe=Math.max(T.wrapper.clientHeight,this.doc.height),we=Math.max(T.sizer.clientWidth,T.lineSpace.clientWidth);(S=="above"||l.bottom+f.offsetHeight>fe)&&l.top>f.offsetHeight?D=l.top-f.offsetHeight:l.bottom+f.offsetHeight<=fe&&(D=l.bottom),oe+f.offsetWidth>we&&(oe=we-f.offsetWidth)}f.style.top=D+"px",f.style.left=f.style.right="",P=="right"?(oe=T.sizer.clientWidth-f.offsetWidth,f.style.right="0px"):(P=="left"?oe=0:P=="middle"&&(oe=(T.sizer.clientWidth-f.offsetWidth)/2),f.style.left=oe+"px"),v&&Yp(this,{left:oe,top:D,right:oe+f.offsetWidth,bottom:D+f.offsetHeight})},triggerOnKeyDown:cn(Sd),triggerOnKeyPress:cn(br),triggerOnKeyUp:qv,triggerOnMouseDown:cn(gs),execCommand:function(l){if(cl.hasOwnProperty(l))return cl[l].call(null,this)},triggerElectric:cn(function(l){Ed(this,l)}),findPosH:function(l,f,v,S){var P=1;f<0&&(P=-1,f=-f);for(var T=nt(this.doc,l),D=0;D<f&&(T=Su(this.doc,T,P,v,S),!T.hitSide);++D);return T},moveH:cn(function(l,f){var v=this;this.extendSelectionsBy(function(S){return v.display.shift||v.doc.extend||S.empty()?Su(v.doc,S.head,l,f,v.options.rtlMoveVisually):l<0?S.from():S.to()},zt)}),deleteH:cn(function(l,f){var v=this.doc.sel,S=this.doc;v.somethingSelected()?S.replaceSelection("",null,"+delete"):ll(this,function(P){var T=Su(S,P.head,l,f,!1);return l<0?{from:T,to:P.head}:{from:P.head,to:T}})}),findPosV:function(l,f,v,S){var P=1,T=S;f<0&&(P=-1,f=-f);for(var D=nt(this.doc,l),oe=0;oe<f;++oe){var fe=zr(this,D,"div");if(T==null?T=fe.left:fe.left=T,D=Cd(this,fe,P,v),D.hitSide)break}return D},moveV:cn(function(l,f){var v=this,S=this.doc,P=[],T=!this.display.shift&&!S.extend&&S.sel.somethingSelected();if(S.extendSelectionsBy(function(oe){if(T)return l<0?oe.from():oe.to();var fe=zr(v,oe.head,"div");oe.goalColumn!=null&&(fe.left=oe.goalColumn),P.push(fe.left);var we=Cd(v,fe,l,f);return f=="page"&&oe==S.sel.primary()&&eu(v,Wa(v,we,"div").top-fe.top),we},zt),P.length)for(var D=0;D<S.sel.ranges.length;D++)S.sel.ranges[D].goalColumn=P[D]}),findWordAt:function(l){var f=this.doc,v=rt(f,l.line).text,S=l.ch,P=l.ch;if(v){var T=this.getHelper(l,"wordChars");(l.sticky=="before"||P==v.length)&&S?--S:++P;for(var D=v.charAt(S),oe=Hn(D,T)?function(fe){return Hn(fe,T)}:/\s/.test(D)?function(fe){return/\s/.test(fe)}:function(fe){return!/\s/.test(fe)&&!Hn(fe)};S>0&&oe(v.charAt(S-1));)--S;for(;P<v.length&&oe(v.charAt(P));)++P}return new it(F(l.line,S),F(l.line,P))},toggleOverwrite:function(l){l!=null&&l==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Re(this.display.cursorDiv,"CodeMirror-overwrite"):H(this.display.cursorDiv,"CodeMirror-overwrite"),xt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==He(Ye(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:cn(function(l,f){ea(this,l,f)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-Mn(this)-this.display.barHeight,width:l.scrollWidth-Mn(this)-this.display.barWidth,clientHeight:Kl(this),clientWidth:Rs(this)}},scrollIntoView:cn(function(l,f){l==null?(l={from:this.doc.sel.primary().head,to:null},f==null&&(f=this.options.cursorScrollMargin)):typeof l=="number"?l={from:F(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=f||0,l.from.line!=null?Vv(this,l):_c(this,l.from,l.to,l.margin)}),setSize:cn(function(l,f){var v=this,S=function(T){return typeof T=="number"||/^\d+$/.test(String(T))?T+"px":T};l!=null&&(this.display.wrapper.style.width=S(l)),f!=null&&(this.display.wrapper.style.height=S(f)),this.options.lineWrapping&&Bp(this);var P=this.display.viewFrom;this.doc.iter(P,this.display.viewTo,function(T){if(T.widgets){for(var D=0;D<T.widgets.length;D++)if(T.widgets[D].noHScroll){Ms(v,P,"widget");break}}++P}),this.curOp.forceUpdate=!0,xt(this,"refresh",this)}),operation:function(l){return yn(this,l)},startOperation:function(){return Bi(this)},endOperation:function(){return fs(this)},refresh:cn(function(){var l=this.display.cachedTextHeight;Cn(this),this.curOp.forceUpdate=!0,Xo(this),ea(this,this.doc.scrollLeft,this.doc.scrollTop),Za(this.display),(l==null||Math.abs(l-Qo(this.display))>.5||this.options.lineWrapping)&&xc(this),xt(this,"refresh",this)}),swapDoc:cn(function(l){var f=this.doc;return f.cm=null,this.state.selectingText&&this.state.selectingText(),ou(this,l),Xo(this),this.display.input.reset(),ea(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,Hr(this,"swapDoc",this,f),f}),phrase:function(l){var f=this.options.phrases;return f&&Object.prototype.hasOwnProperty.call(f,l)?f[l]:l},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}},sn(i),i.registerHelper=function(l,f,v){u.hasOwnProperty(l)||(u[l]=i[l]={_global:[]}),u[l][f]=v},i.registerGlobalHelper=function(l,f,v,S){i.registerHelper(l,f,S),u[l]._global.push({pred:v,val:S})}}function Su(i,o,u,l,f){var v=o,S=u,P=rt(i,o.line),T=f&&i.direction=="rtl"?-u:u;function D(){var Ge=o.line+T;return Ge<i.first||Ge>=i.first+i.size?!1:(o=new F(Ge,o.ch,o.sticky),P=rt(i,Ge))}function oe(Ge){var We;if(l=="codepoint"){var Xe=P.text.charCodeAt(o.ch+(u>0?0:-1));if(isNaN(Xe))We=null;else{var ct=u>0?Xe>=55296&&Xe<56320:Xe>=56320&&Xe<57343;We=new F(o.line,Math.max(0,Math.min(P.text.length,o.ch+u*(ct?2:1))),-u)}}else f?We=Yv(i.cm,P,o,u):We=Yc(P,o,u);if(We==null)if(!Ge&&D())o=vu(f,i.cm,P,o.line,T);else return!1;else o=We;return!0}if(l=="char"||l=="codepoint")oe();else if(l=="column")oe(!0);else if(l=="word"||l=="group")for(var fe=null,we=l=="group",ge=i.cm&&i.cm.getHelper(o,"wordChars"),Ve=!0;!(u<0&&!oe(!Ve));Ve=!1){var Ie=P.text.charAt(o.ch)||`
27
+ `)&&(Ve=Ie=F(Ve.line,0)));var De={from:Ve,to:Ie,text:D?D[we%D.length]:T,origin:f||(P?"paste":i.state.cutIncoming>S?"cut":"+input")};fa(i.doc,De),Hr(i,"inputRead",i,De)}o&&!P&&Ed(i,o),Bs(i),i.curOp.updateInput<2&&(i.curOp.updateInput=fe),i.curOp.typing=!0,i.state.pasteIncoming=i.state.cutIncoming=-1}function Od(i,o){var u=i.clipboardData&&i.clipboardData.getData("Text");if(u)return i.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&yn(o,function(){return si(o,u,0,null,"paste")}),!0}function Ed(i,o){if(!(!i.options.electricChars||!i.options.smartIndent))for(var u=i.doc.sel,l=u.ranges.length-1;l>=0;l--){var f=u.ranges[l];if(!(f.head.ch>100||l&&u.ranges[l-1].head.line==f.head.line)){var v=i.getModeAt(f.head),S=!1;if(v.electricChars){for(var P=0;P<v.electricChars.length;P++)if(o.indexOf(v.electricChars.charAt(P))>-1){S=va(i,f.head.line,"smart");break}}else v.electricInput&&v.electricInput.test(rt(i.doc,f.head.line).text.slice(0,f.head.ch))&&(S=va(i,f.head.line,"smart"));S&&Hr(i,"electricInput",i,f.head.line)}}}function Ad(i){for(var o=[],u=[],l=0;l<i.doc.sel.ranges.length;l++){var f=i.doc.sel.ranges[l].head.line,v={anchor:F(f,0),head:F(f+1,0)};u.push(v),o.push(i.getRange(v.anchor,v.head))}return{text:o,ranges:u}}function _n(i,o,u,l){i.setAttribute("autocorrect",u?"on":"off"),i.setAttribute("autocapitalize",l?"on":"off"),i.setAttribute("spellcheck",!!o)}function tf(){var i=Z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),o=Z("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return j?i.style.width="1000px":i.setAttribute("wrap","off"),J&&(i.style.border="1px solid black"),o}function sg(i){var o=i.optionHandlers,u=i.helpers={};i.prototype={constructor:i,focus:function(){gt(this).focus(),this.display.input.focus()},setOption:function(l,f){var v=this.options,S=v[l];v[l]==f&&l!="mode"||(v[l]=f,o.hasOwnProperty(l)&&Nr(this,o[l])(this,f,S),xt(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,f){this.state.keyMaps[f?"push":"unshift"](mu(l))},removeKeyMap:function(l){for(var f=this.state.keyMaps,v=0;v<f.length;++v)if(f[v]==l||f[v].name==l)return f.splice(v,1),!0},addOverlay:cn(function(l,f){var v=l.token?l:i.getMode(this.options,l);if(v.startState)throw new Error("Overlays may not be stateful.");nr(this.state.overlays,{mode:v,modeSpec:l,opaque:f&&f.opaque,priority:f&&f.priority||0},function(S){return S.priority}),this.state.modeGen++,Cn(this)}),removeOverlay:cn(function(l){for(var f=this.state.overlays,v=0;v<f.length;++v){var S=f[v].modeSpec;if(S==l||typeof l=="string"&&S.name==l){f.splice(v,1),this.state.modeGen++,Cn(this);return}}}),indentLine:cn(function(l,f,v){typeof f!="string"&&typeof f!="number"&&(f==null?f=this.options.smartIndent?"smart":"prev":f=f?"add":"subtract"),ao(this.doc,l)&&va(this,l,f,v)}),indentSelection:cn(function(l){for(var f=this.doc.sel.ranges,v=-1,S=0;S<f.length;S++){var P=f[S];if(P.empty())P.head.line>v&&(va(this,P.head.line,l,!0),v=P.head.line,S==this.doc.sel.primIndex&&Bs(this));else{var T=P.from(),D=P.to(),oe=Math.max(v,T.line);v=Math.min(this.lastLine(),D.line-(D.ch?0:1))+1;for(var fe=oe;fe<v;++fe)va(this,fe,l);var we=this.doc.sel.ranges;T.ch==0&&f.length==we.length&&we[S].from().ch>0&&Mc(this.doc,S,new it(T,we[S].to()),Lt)}}}),getTokenAt:function(l,f){return gp(this,l,f)},getLineTokens:function(l,f){return gp(this,F(l),f,!0)},getTokenTypeAt:function(l){l=nt(this.doc,l);var f=ic(this,rt(this.doc,l.line)),v=0,S=(f.length-1)/2,P=l.ch,T;if(P==0)T=f[2];else for(;;){var D=v+S>>1;if((D?f[D*2-1]:0)>=P)S=D;else if(f[D*2+1]<P)v=D+1;else{T=f[D*2+2];break}}var oe=T?T.indexOf("overlay "):-1;return oe<0?T:oe==0?null:T.slice(0,oe-1)},getModeAt:function(l){var f=this.doc.mode;return f.innerMode?i.innerMode(f,this.getTokenAt(l).state).mode:f},getHelper:function(l,f){return this.getHelpers(l,f)[0]},getHelpers:function(l,f){var v=[];if(!u.hasOwnProperty(f))return v;var S=u[f],P=this.getModeAt(l);if(typeof P[f]=="string")S[P[f]]&&v.push(S[P[f]]);else if(P[f])for(var T=0;T<P[f].length;T++){var D=S[P[f][T]];D&&v.push(D)}else P.helperType&&S[P.helperType]?v.push(S[P.helperType]):S[P.name]&&v.push(S[P.name]);for(var oe=0;oe<S._global.length;oe++){var fe=S._global[oe];fe.pred(P,this)&&Fe(v,fe.val)==-1&&v.push(fe.val)}return v},getStateAfter:function(l,f){var v=this.doc;return l=Zt(v,l==null?v.first+v.size-1:l),zo(this,l+1,f).state},cursorCoords:function(l,f){var v,S=this.doc.sel.primary();return l==null?v=S.head:typeof l=="object"?v=nt(this.doc,l):v=l?S.from():S.to(),zr(this,v,f||"page")},charCoords:function(l,f){return Wa(this,nt(this.doc,l),f||"page")},coordsChar:function(l,f){return l=Wp(this,l,f||"page"),gc(this,l.left,l.top)},lineAtHeight:function(l,f){return l=Wp(this,{top:l,left:0},f||"page").top,ls(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,f,v){var S=!1,P;if(typeof l=="number"){var T=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>T&&(l=T,S=!0),P=rt(this.doc,l)}else P=l;return Xl(this,P,{top:0,left:0},f||"page",v||S).top+(S?this.doc.height-us(P):0)},defaultTextHeight:function(){return Qo(this.display)},defaultCharWidth:function(){return Zo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,f,v,S,P){var T=this.display;l=zr(this,nt(this.doc,l));var D=l.bottom,oe=l.left;if(f.style.position="absolute",f.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(f),T.sizer.appendChild(f),S=="over")D=l.top;else if(S=="above"||S=="near"){var fe=Math.max(T.wrapper.clientHeight,this.doc.height),we=Math.max(T.sizer.clientWidth,T.lineSpace.clientWidth);(S=="above"||l.bottom+f.offsetHeight>fe)&&l.top>f.offsetHeight?D=l.top-f.offsetHeight:l.bottom+f.offsetHeight<=fe&&(D=l.bottom),oe+f.offsetWidth>we&&(oe=we-f.offsetWidth)}f.style.top=D+"px",f.style.left=f.style.right="",P=="right"?(oe=T.sizer.clientWidth-f.offsetWidth,f.style.right="0px"):(P=="left"?oe=0:P=="middle"&&(oe=(T.sizer.clientWidth-f.offsetWidth)/2),f.style.left=oe+"px"),v&&Yp(this,{left:oe,top:D,right:oe+f.offsetWidth,bottom:D+f.offsetHeight})},triggerOnKeyDown:cn(Sd),triggerOnKeyPress:cn(br),triggerOnKeyUp:qv,triggerOnMouseDown:cn(gs),execCommand:function(l){if(cl.hasOwnProperty(l))return cl[l].call(null,this)},triggerElectric:cn(function(l){Ed(this,l)}),findPosH:function(l,f,v,S){var P=1;f<0&&(P=-1,f=-f);for(var T=nt(this.doc,l),D=0;D<f&&(T=Su(this.doc,T,P,v,S),!T.hitSide);++D);return T},moveH:cn(function(l,f){var v=this;this.extendSelectionsBy(function(S){return v.display.shift||v.doc.extend||S.empty()?Su(v.doc,S.head,l,f,v.options.rtlMoveVisually):l<0?S.from():S.to()},zt)}),deleteH:cn(function(l,f){var v=this.doc.sel,S=this.doc;v.somethingSelected()?S.replaceSelection("",null,"+delete"):ll(this,function(P){var T=Su(S,P.head,l,f,!1);return l<0?{from:T,to:P.head}:{from:P.head,to:T}})}),findPosV:function(l,f,v,S){var P=1,T=S;f<0&&(P=-1,f=-f);for(var D=nt(this.doc,l),oe=0;oe<f;++oe){var fe=zr(this,D,"div");if(T==null?T=fe.left:fe.left=T,D=Cd(this,fe,P,v),D.hitSide)break}return D},moveV:cn(function(l,f){var v=this,S=this.doc,P=[],T=!this.display.shift&&!S.extend&&S.sel.somethingSelected();if(S.extendSelectionsBy(function(oe){if(T)return l<0?oe.from():oe.to();var fe=zr(v,oe.head,"div");oe.goalColumn!=null&&(fe.left=oe.goalColumn),P.push(fe.left);var we=Cd(v,fe,l,f);return f=="page"&&oe==S.sel.primary()&&eu(v,Wa(v,we,"div").top-fe.top),we},zt),P.length)for(var D=0;D<S.sel.ranges.length;D++)S.sel.ranges[D].goalColumn=P[D]}),findWordAt:function(l){var f=this.doc,v=rt(f,l.line).text,S=l.ch,P=l.ch;if(v){var T=this.getHelper(l,"wordChars");(l.sticky=="before"||P==v.length)&&S?--S:++P;for(var D=v.charAt(S),oe=Hn(D,T)?function(fe){return Hn(fe,T)}:/\s/.test(D)?function(fe){return/\s/.test(fe)}:function(fe){return!/\s/.test(fe)&&!Hn(fe)};S>0&&oe(v.charAt(S-1));)--S;for(;P<v.length&&oe(v.charAt(P));)++P}return new it(F(l.line,S),F(l.line,P))},toggleOverwrite:function(l){l!=null&&l==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Re(this.display.cursorDiv,"CodeMirror-overwrite"):H(this.display.cursorDiv,"CodeMirror-overwrite"),xt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==He(Ye(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:cn(function(l,f){ea(this,l,f)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-Mn(this)-this.display.barHeight,width:l.scrollWidth-Mn(this)-this.display.barWidth,clientHeight:Kl(this),clientWidth:Rs(this)}},scrollIntoView:cn(function(l,f){l==null?(l={from:this.doc.sel.primary().head,to:null},f==null&&(f=this.options.cursorScrollMargin)):typeof l=="number"?l={from:F(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=f||0,l.from.line!=null?Vv(this,l):_c(this,l.from,l.to,l.margin)}),setSize:cn(function(l,f){var v=this,S=function(T){return typeof T=="number"||/^\d+$/.test(String(T))?T+"px":T};l!=null&&(this.display.wrapper.style.width=S(l)),f!=null&&(this.display.wrapper.style.height=S(f)),this.options.lineWrapping&&Bp(this);var P=this.display.viewFrom;this.doc.iter(P,this.display.viewTo,function(T){if(T.widgets){for(var D=0;D<T.widgets.length;D++)if(T.widgets[D].noHScroll){Ms(v,P,"widget");break}}++P}),this.curOp.forceUpdate=!0,xt(this,"refresh",this)}),operation:function(l){return yn(this,l)},startOperation:function(){return Ni(this)},endOperation:function(){return fs(this)},refresh:cn(function(){var l=this.display.cachedTextHeight;Cn(this),this.curOp.forceUpdate=!0,Xo(this),ea(this,this.doc.scrollLeft,this.doc.scrollTop),Za(this.display),(l==null||Math.abs(l-Qo(this.display))>.5||this.options.lineWrapping)&&xc(this),xt(this,"refresh",this)}),swapDoc:cn(function(l){var f=this.doc;return f.cm=null,this.state.selectingText&&this.state.selectingText(),ou(this,l),Xo(this),this.display.input.reset(),ea(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,Hr(this,"swapDoc",this,f),f}),phrase:function(l){var f=this.options.phrases;return f&&Object.prototype.hasOwnProperty.call(f,l)?f[l]:l},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}},sn(i),i.registerHelper=function(l,f,v){u.hasOwnProperty(l)||(u[l]=i[l]={_global:[]}),u[l][f]=v},i.registerGlobalHelper=function(l,f,v,S){i.registerHelper(l,f,S),u[l]._global.push({pred:v,val:S})}}function Su(i,o,u,l,f){var v=o,S=u,P=rt(i,o.line),T=f&&i.direction=="rtl"?-u:u;function D(){var Ge=o.line+T;return Ge<i.first||Ge>=i.first+i.size?!1:(o=new F(Ge,o.ch,o.sticky),P=rt(i,Ge))}function oe(Ge){var We;if(l=="codepoint"){var Xe=P.text.charCodeAt(o.ch+(u>0?0:-1));if(isNaN(Xe))We=null;else{var ct=u>0?Xe>=55296&&Xe<56320:Xe>=56320&&Xe<57343;We=new F(o.line,Math.max(0,Math.min(P.text.length,o.ch+u*(ct?2:1))),-u)}}else f?We=Yv(i.cm,P,o,u):We=Yc(P,o,u);if(We==null)if(!Ge&&D())o=vu(f,i.cm,P,o.line,T);else return!1;else o=We;return!0}if(l=="char"||l=="codepoint")oe();else if(l=="column")oe(!0);else if(l=="word"||l=="group")for(var fe=null,we=l=="group",ge=i.cm&&i.cm.getHelper(o,"wordChars"),Ve=!0;!(u<0&&!oe(!Ve));Ve=!1){var Ie=P.text.charAt(o.ch)||`
28
28
  `,De=Hn(Ie,ge)?"w":we&&Ie==`
29
29
  `?"n":!we||/\s/.test(Ie)?null:"p";if(we&&!Ve&&!De&&(De="s"),fe&&fe!=De){u<0&&(u=1,oe(),o.sticky="after");break}if(De&&(fe=De),u>0&&!oe(!Ve))break}var Ue=hs(i,o,v,S,!0);return je(v,Ue)&&(Ue.hitSide=!0),Ue}function Cd(i,o,u,l){var f=i.doc,v=o.left,S;if(l=="page"){var P=Math.min(i.display.wrapper.clientHeight,gt(i).innerHeight||f(i).documentElement.clientHeight),T=Math.max(P-.5*Qo(i.display),3);S=(u>0?o.bottom:o.top)+u*T}else l=="line"&&(S=u>0?o.bottom+3:o.top-3);for(var D;D=gc(i,v,S),!!D.outside;){if(u<0?S<=0:S>=f.height){D.hitSide=!0;break}S+=u*5}return D}var ir=function(i){this.cm=i,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ke,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ir.prototype.init=function(i){var o=this,u=this,l=u.cm,f=u.div=i.lineDiv;f.contentEditable=!0,_n(f,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize);function v(P){for(var T=P.target;T;T=T.parentNode){if(T==f)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(T.className))break}return!1}pe(f,"paste",function(P){!v(P)||_t(l,P)||Od(P,l)||O<=11&&setTimeout(Nr(l,function(){return o.updateFromDOM()}),20)}),pe(f,"compositionstart",function(P){o.composing={data:P.data,done:!1}}),pe(f,"compositionupdate",function(P){o.composing||(o.composing={data:P.data,done:!1})}),pe(f,"compositionend",function(P){o.composing&&(P.data!=o.composing.data&&o.readFromDOMSoon(),o.composing.done=!0)}),pe(f,"touchstart",function(){return u.forceCompositionEnd()}),pe(f,"input",function(){o.composing||o.readFromDOMSoon()});function S(P){if(!(!v(P)||_t(l,P))){if(l.somethingSelected())gl({lineWise:!1,text:l.getSelections()}),P.type=="cut"&&l.replaceSelection("",null,"cut");else if(l.options.lineWiseCopyCut){var T=Ad(l);gl({lineWise:!0,text:T.text}),P.type=="cut"&&l.operation(function(){l.setSelections(T.ranges,0,Lt),l.replaceSelection("",null,"cut")})}else return;if(P.clipboardData){P.clipboardData.clearData();var D=ii.text.join(`
30
30
  `);if(P.clipboardData.setData("Text",D),P.clipboardData.getData("Text")==D){P.preventDefault();return}}var oe=tf(),fe=oe.firstChild;_n(fe),l.display.lineSpace.insertBefore(oe,l.display.lineSpace.firstChild),fe.value=ii.text.join(`
31
- `);var we=He(f.ownerDocument);Be(fe),setTimeout(function(){l.display.lineSpace.removeChild(oe),we.focus(),we==f&&u.showPrimarySelection()},50)}}pe(f,"copy",S),pe(f,"cut",S)},ir.prototype.screenReaderLabelChanged=function(i){i?this.div.setAttribute("aria-label",i):this.div.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var i=wc(this.cm,!1);return i.focus=He(this.div.ownerDocument)==this.div,i},ir.prototype.showSelection=function(i,o){!i||!this.cm.display.view.length||((i.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(i))},ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ir.prototype.showPrimarySelection=function(){var i=this.getSelection(),o=this.cm,u=o.doc.sel.primary(),l=u.from(),f=u.to();if(o.display.viewTo==o.display.viewFrom||l.line>=o.display.viewTo||f.line<o.display.viewFrom){i.removeAllRanges();return}var v=wu(o,i.anchorNode,i.anchorOffset),S=wu(o,i.focusNode,i.focusOffset);if(!(v&&!v.bad&&S&&!S.bad&&re(jt(v,S),l)==0&&re(St(v,S),f)==0)){var P=o.display.view,T=l.line>=o.display.viewFrom&&rf(o,l)||{node:P[0].measure.map[2],offset:0},D=f.line<o.display.viewTo&&rf(o,f);if(!D){var oe=P[P.length-1].measure,fe=oe.maps?oe.maps[oe.maps.length-1]:oe.map;D={node:fe[fe.length-1],offset:fe[fe.length-2]-fe[fe.length-3]}}if(!T||!D){i.removeAllRanges();return}var we=i.rangeCount&&i.getRangeAt(0),ge;try{ge=ue(T.node,T.offset,D.offset,D.node)}catch(Ve){}ge&&(!m&&o.state.focused?(i.collapse(T.node,T.offset),ge.collapsed||(i.removeAllRanges(),i.addRange(ge))):(i.removeAllRanges(),i.addRange(ge)),we&&i.anchorNode==null?i.addRange(we):m&&this.startGracePeriod()),this.rememberSelection()}},ir.prototype.startGracePeriod=function(){var i=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){i.gracePeriod=!1,i.selectionChanged()&&i.cm.operation(function(){return i.cm.curOp.selectionChanged=!0})},20)},ir.prototype.showMultipleSelections=function(i){Ae(this.cm.display.cursorDiv,i.cursors),Ae(this.cm.display.selectionDiv,i.selection)},ir.prototype.rememberSelection=function(){var i=this.getSelection();this.lastAnchorNode=i.anchorNode,this.lastAnchorOffset=i.anchorOffset,this.lastFocusNode=i.focusNode,this.lastFocusOffset=i.focusOffset},ir.prototype.selectionInEditor=function(){var i=this.getSelection();if(!i.rangeCount)return!1;var o=i.getRangeAt(0).commonAncestorContainer;return Ne(this.div,o)},ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||He(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ir.prototype.blur=function(){this.div.blur()},ir.prototype.getField=function(){return this.div},ir.prototype.supportsTouch=function(){return!0},ir.prototype.receivedFocus=function(){var i=this,o=this;this.selectionInEditor()?setTimeout(function(){return i.pollSelection()},20):yn(this.cm,function(){return o.cm.curOp.selectionChanged=!0});function u(){o.cm.state.focused&&(o.pollSelection(),o.polling.set(o.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},ir.prototype.selectionChanged=function(){var i=this.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset},ir.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var i=this.getSelection(),o=this.cm;if(L&&K&&this.cm.display.gutterSpecs.length&&og(i.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var u=wu(o,i.anchorNode,i.anchorOffset),l=wu(o,i.focusNode,i.focusOffset);u&&l&&yn(o,function(){fn(o.doc,ds(u,l),Lt),(u.bad||l.bad)&&(o.curOp.selectionChanged=!0)})}}},ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var i=this.cm,o=i.display,u=i.doc.sel.primary(),l=u.from(),f=u.to();if(l.ch==0&&l.line>i.firstLine()&&(l=F(l.line-1,rt(i.doc,l.line-1).length)),f.ch==rt(i.doc,f.line).text.length&&f.line<i.lastLine()&&(f=F(f.line+1,0)),l.line<o.viewFrom||f.line>o.viewTo-1)return!1;var v,S,P;l.line==o.viewFrom||(v=ho(i,l.line))==0?(S=Qt(o.view[0].line),P=o.view[0].node):(S=Qt(o.view[v].line),P=o.view[v-1].node.nextSibling);var T=ho(i,f.line),D,oe;if(T==o.view.length-1?(D=o.viewTo-1,oe=o.lineDiv.lastChild):(D=Qt(o.view[T+1].line)-1,oe=o.view[T+1].node.previousSibling),!P)return!1;for(var fe=i.doc.splitLines(zi(i,P,oe,S,D)),we=as(i.doc,F(S,0),F(D,rt(i.doc,D).text.length));fe.length>1&&we.length>1;)if(ht(fe)==ht(we))fe.pop(),we.pop(),D--;else if(fe[0]==we[0])fe.shift(),we.shift(),S++;else break;for(var ge=0,Ve=0,Ie=fe[0],De=we[0],Ue=Math.min(Ie.length,De.length);ge<Ue&&Ie.charCodeAt(ge)==De.charCodeAt(ge);)++ge;for(var Ge=ht(fe),We=ht(we),Xe=Math.min(Ge.length-(fe.length==1?ge:0),We.length-(we.length==1?ge:0));Ve<Xe&&Ge.charCodeAt(Ge.length-Ve-1)==We.charCodeAt(We.length-Ve-1);)++Ve;if(fe.length==1&&we.length==1&&S==l.line)for(;ge&&ge>l.ch&&Ge.charCodeAt(Ge.length-Ve-1)==We.charCodeAt(We.length-Ve-1);)ge--,Ve++;fe[fe.length-1]=Ge.slice(0,Ge.length-Ve).replace(/^\u200b+/,""),fe[0]=fe[0].slice(ge).replace(/\u200b+$/,"");var ct=F(S,ge),at=F(D,we.length?ht(we).length-Ve:0);if(fe.length>1||fe[0]||re(ct,at))return yo(i.doc,fe,ct,at,"+input"),!0},ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},ir.prototype.reset=function(){this.forceCompositionEnd()},ir.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ir.prototype.readFromDOMSoon=function(){var i=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(i.readDOMTimeout=null,i.composing)if(i.composing.done)i.composing=null;else return;i.updateFromDOM()},80))},ir.prototype.updateFromDOM=function(){var i=this;(this.cm.isReadOnly()||!this.pollContent())&&yn(this.cm,function(){return Cn(i.cm)})},ir.prototype.setUneditable=function(i){i.contentEditable="false"},ir.prototype.onKeyPress=function(i){i.charCode==0||this.composing||(i.preventDefault(),this.cm.isReadOnly()||Nr(this.cm,si)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0))},ir.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")},ir.prototype.onContextMenu=function(){},ir.prototype.resetPosition=function(){},ir.prototype.needsContentAttribute=!0;function rf(i,o){var u=Jl(i,o.line);if(!u||u.hidden)return null;var l=rt(i.doc,o.line),f=Dp(u,l,o.line),v=mt(l,i.doc.direction),S="left";if(v){var P=Ft(v,o.ch);S=P%2?"right":"left"}var T=fo(f.map,o.ch,S);return T.offset=T.collapse=="right"?T.end:T.start,T}function og(i){for(var o=i;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}function ga(i,o){return o&&(i.bad=!0),i}function zi(i,o,u,l,f){var v="",S=!1,P=i.doc.lineSeparator(),T=!1;function D(ge){return function(Ve){return Ve.id==ge}}function oe(){S&&(v+=P,T&&(v+=P),S=T=!1)}function fe(ge){ge&&(oe(),v+=ge)}function we(ge){if(ge.nodeType==1){var Ve=ge.getAttribute("cm-text");if(Ve){fe(Ve);return}var Ie=ge.getAttribute("cm-marker"),De;if(Ie){var Ue=i.findMarks(F(l,0),F(f+1,0),D(+Ie));Ue.length&&(De=Ue[0].find(0))&&fe(as(i.doc,De.from,De.to).join(P));return}if(ge.getAttribute("contenteditable")=="false")return;var Ge=/^(pre|div|p|li|table|br)$/i.test(ge.nodeName);if(!/^br$/i.test(ge.nodeName)&&ge.textContent.length==0)return;Ge&&oe();for(var We=0;We<ge.childNodes.length;We++)we(ge.childNodes[We]);/^(pre|p)$/i.test(ge.nodeName)&&(T=!0),Ge&&(S=!0)}else ge.nodeType==3&&fe(ge.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;we(o),o!=u;)o=o.nextSibling,T=!1;return v}function wu(i,o,u){var l;if(o==i.display.lineDiv){if(l=i.display.lineDiv.childNodes[u],!l)return ga(i.clipPos(F(i.display.viewTo-1)),!0);o=null,u=0}else for(l=o;;l=l.parentNode){if(!l||l==i.display.lineDiv)return null;if(l.parentNode&&l.parentNode==i.display.lineDiv)break}for(var f=0;f<i.display.view.length;f++){var v=i.display.view[f];if(v.node==l)return Oo(v,o,u)}}function Oo(i,o,u){var l=i.text.firstChild,f=!1;if(!o||!Ne(l,o))return ga(F(Qt(i.line),0),!0);if(o==l&&(f=!0,o=l.childNodes[u],u=0,!o)){var v=i.rest?ht(i.rest):i.line;return ga(F(Qt(v),v.text.length),f)}var S=o.nodeType==3?o:null,P=o;for(!S&&o.childNodes.length==1&&o.firstChild.nodeType==3&&(S=o.firstChild,u&&(u=S.nodeValue.length));P.parentNode!=l;)P=P.parentNode;var T=i.measure,D=T.maps;function oe(De,Ue,Ge){for(var We=-1;We<(D?D.length:0);We++)for(var Xe=We<0?T.map:D[We],ct=0;ct<Xe.length;ct+=3){var at=Xe[ct+2];if(at==De||at==Ue){var It=Qt(We<0?i.line:i.rest[We]),mr=Xe[ct]+Ge;return(Ge<0||at!=De)&&(mr=Xe[ct+(Ge?1:0)]),F(It,mr)}}}var fe=oe(S,P,u);if(fe)return ga(fe,f);for(var we=P.nextSibling,ge=S?S.nodeValue.length-u:0;we;we=we.nextSibling){if(fe=oe(we,we.firstChild,0),fe)return ga(F(fe.line,fe.ch-ge),f);ge+=we.textContent.length}for(var Ve=P.previousSibling,Ie=u;Ve;Ve=Ve.previousSibling){if(fe=oe(Ve,Ve.firstChild,-1),fe)return ga(F(fe.line,fe.ch+Ie),f);Ie+=Ve.textContent.length}}var Or=function(i){this.cm=i,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null,this.resetting=!1};Or.prototype.init=function(i){var o=this,u=this,l=this.cm;this.createField(i);var f=this.textarea;i.wrapper.insertBefore(this.wrapper,i.wrapper.firstChild),J&&(f.style.width="0px"),pe(f,"input",function(){A&&O>=9&&o.hasSelection&&(o.hasSelection=null),u.poll()}),pe(f,"paste",function(S){_t(l,S)||Od(S,l)||(l.state.pasteIncoming=+new Date,u.fastPoll())});function v(S){if(!_t(l,S)){if(l.somethingSelected())gl({lineWise:!1,text:l.getSelections()});else if(l.options.lineWiseCopyCut){var P=Ad(l);gl({lineWise:!0,text:P.text}),S.type=="cut"?l.setSelections(P.ranges,null,Lt):(u.prevInput="",f.value=P.text.join(`
32
- `),Be(f))}else return;S.type=="cut"&&(l.state.cutIncoming=+new Date)}}pe(f,"cut",v),pe(f,"copy",v),pe(i.scroller,"paste",function(S){if(!(Di(i,S)||_t(l,S))){if(!f.dispatchEvent){l.state.pasteIncoming=+new Date,u.focus();return}var P=new Event("paste");P.clipboardData=S.clipboardData,f.dispatchEvent(P)}}),pe(i.lineSpace,"selectstart",function(S){Di(i,S)||Xt(S)}),pe(f,"compositionstart",function(){var S=l.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:S,range:l.markText(S,l.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(f,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},Or.prototype.createField=function(i){this.wrapper=tf(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;_n(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},Or.prototype.screenReaderLabelChanged=function(i){i?this.textarea.setAttribute("aria-label",i):this.textarea.removeAttribute("aria-label")},Or.prototype.prepareSelection=function(){var i=this.cm,o=i.display,u=i.doc,l=wc(i);if(i.options.moveInputWithCursor){var f=zr(i,u.sel.primary().head,"div"),v=o.wrapper.getBoundingClientRect(),S=o.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,f.top+S.top-v.top)),l.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,f.left+S.left-v.left))}return l},Or.prototype.showSelection=function(i){var o=this.cm,u=o.display;Ae(u.cursorDiv,i.cursors),Ae(u.selectionDiv,i.selection),i.teTop!=null&&(this.wrapper.style.top=i.teTop+"px",this.wrapper.style.left=i.teLeft+"px")},Or.prototype.reset=function(i){if(!(this.contextMenuPending||this.composing&&i)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var u=o.getSelection();this.textarea.value=u,o.state.focused&&Be(this.textarea),A&&O>=9&&(this.hasSelection=u)}else i||(this.prevInput=this.textarea.value="",A&&O>=9&&(this.hasSelection=null));this.resetting=!1}},Or.prototype.getField=function(){return this.textarea},Or.prototype.supportsTouch=function(){return!1},Or.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!E||He(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(i){}},Or.prototype.blur=function(){this.textarea.blur()},Or.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Or.prototype.receivedFocus=function(){this.slowPoll()},Or.prototype.slowPoll=function(){var i=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){i.poll(),i.cm.state.focused&&i.slowPoll()})},Or.prototype.fastPoll=function(){var i=!1,o=this;o.pollingFast=!0;function u(){var l=o.poll();!l&&!i?(i=!0,o.polling.set(60,u)):(o.pollingFast=!1,o.slowPoll())}o.polling.set(20,u)},Or.prototype.poll=function(){var i=this,o=this.cm,u=this.textarea,l=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Ts(u)&&!l&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var f=u.value;if(f==l&&!o.somethingSelected())return!1;if(A&&O>=9&&this.hasSelection===f||N&&/[\uf700-\uf7ff]/.test(f))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var v=f.charCodeAt(0);if(v==8203&&!l&&(l="\u200B"),v==8666)return this.reset(),this.cm.execCommand("undo")}for(var S=0,P=Math.min(l.length,f.length);S<P&&l.charCodeAt(S)==f.charCodeAt(S);)++S;return yn(o,function(){si(o,f.slice(S),l.length-S,null,i.composing?"*compose":null),f.length>1e3||f.indexOf(`
31
+ `);var we=He(f.ownerDocument);Be(fe),setTimeout(function(){l.display.lineSpace.removeChild(oe),we.focus(),we==f&&u.showPrimarySelection()},50)}}pe(f,"copy",S),pe(f,"cut",S)},ir.prototype.screenReaderLabelChanged=function(i){i?this.div.setAttribute("aria-label",i):this.div.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var i=wc(this.cm,!1);return i.focus=He(this.div.ownerDocument)==this.div,i},ir.prototype.showSelection=function(i,o){!i||!this.cm.display.view.length||((i.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(i))},ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ir.prototype.showPrimarySelection=function(){var i=this.getSelection(),o=this.cm,u=o.doc.sel.primary(),l=u.from(),f=u.to();if(o.display.viewTo==o.display.viewFrom||l.line>=o.display.viewTo||f.line<o.display.viewFrom){i.removeAllRanges();return}var v=wu(o,i.anchorNode,i.anchorOffset),S=wu(o,i.focusNode,i.focusOffset);if(!(v&&!v.bad&&S&&!S.bad&&re(jt(v,S),l)==0&&re(St(v,S),f)==0)){var P=o.display.view,T=l.line>=o.display.viewFrom&&rf(o,l)||{node:P[0].measure.map[2],offset:0},D=f.line<o.display.viewTo&&rf(o,f);if(!D){var oe=P[P.length-1].measure,fe=oe.maps?oe.maps[oe.maps.length-1]:oe.map;D={node:fe[fe.length-1],offset:fe[fe.length-2]-fe[fe.length-3]}}if(!T||!D){i.removeAllRanges();return}var we=i.rangeCount&&i.getRangeAt(0),ge;try{ge=ue(T.node,T.offset,D.offset,D.node)}catch(Ve){}ge&&(!m&&o.state.focused?(i.collapse(T.node,T.offset),ge.collapsed||(i.removeAllRanges(),i.addRange(ge))):(i.removeAllRanges(),i.addRange(ge)),we&&i.anchorNode==null?i.addRange(we):m&&this.startGracePeriod()),this.rememberSelection()}},ir.prototype.startGracePeriod=function(){var i=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){i.gracePeriod=!1,i.selectionChanged()&&i.cm.operation(function(){return i.cm.curOp.selectionChanged=!0})},20)},ir.prototype.showMultipleSelections=function(i){Ae(this.cm.display.cursorDiv,i.cursors),Ae(this.cm.display.selectionDiv,i.selection)},ir.prototype.rememberSelection=function(){var i=this.getSelection();this.lastAnchorNode=i.anchorNode,this.lastAnchorOffset=i.anchorOffset,this.lastFocusNode=i.focusNode,this.lastFocusOffset=i.focusOffset},ir.prototype.selectionInEditor=function(){var i=this.getSelection();if(!i.rangeCount)return!1;var o=i.getRangeAt(0).commonAncestorContainer;return Ne(this.div,o)},ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||He(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ir.prototype.blur=function(){this.div.blur()},ir.prototype.getField=function(){return this.div},ir.prototype.supportsTouch=function(){return!0},ir.prototype.receivedFocus=function(){var i=this,o=this;this.selectionInEditor()?setTimeout(function(){return i.pollSelection()},20):yn(this.cm,function(){return o.cm.curOp.selectionChanged=!0});function u(){o.cm.state.focused&&(o.pollSelection(),o.polling.set(o.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},ir.prototype.selectionChanged=function(){var i=this.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset},ir.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var i=this.getSelection(),o=this.cm;if(L&&K&&this.cm.display.gutterSpecs.length&&og(i.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var u=wu(o,i.anchorNode,i.anchorOffset),l=wu(o,i.focusNode,i.focusOffset);u&&l&&yn(o,function(){fn(o.doc,ds(u,l),Lt),(u.bad||l.bad)&&(o.curOp.selectionChanged=!0)})}}},ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var i=this.cm,o=i.display,u=i.doc.sel.primary(),l=u.from(),f=u.to();if(l.ch==0&&l.line>i.firstLine()&&(l=F(l.line-1,rt(i.doc,l.line-1).length)),f.ch==rt(i.doc,f.line).text.length&&f.line<i.lastLine()&&(f=F(f.line+1,0)),l.line<o.viewFrom||f.line>o.viewTo-1)return!1;var v,S,P;l.line==o.viewFrom||(v=ho(i,l.line))==0?(S=Qt(o.view[0].line),P=o.view[0].node):(S=Qt(o.view[v].line),P=o.view[v-1].node.nextSibling);var T=ho(i,f.line),D,oe;if(T==o.view.length-1?(D=o.viewTo-1,oe=o.lineDiv.lastChild):(D=Qt(o.view[T+1].line)-1,oe=o.view[T+1].node.previousSibling),!P)return!1;for(var fe=i.doc.splitLines(Hi(i,P,oe,S,D)),we=as(i.doc,F(S,0),F(D,rt(i.doc,D).text.length));fe.length>1&&we.length>1;)if(ht(fe)==ht(we))fe.pop(),we.pop(),D--;else if(fe[0]==we[0])fe.shift(),we.shift(),S++;else break;for(var ge=0,Ve=0,Ie=fe[0],De=we[0],Ue=Math.min(Ie.length,De.length);ge<Ue&&Ie.charCodeAt(ge)==De.charCodeAt(ge);)++ge;for(var Ge=ht(fe),We=ht(we),Xe=Math.min(Ge.length-(fe.length==1?ge:0),We.length-(we.length==1?ge:0));Ve<Xe&&Ge.charCodeAt(Ge.length-Ve-1)==We.charCodeAt(We.length-Ve-1);)++Ve;if(fe.length==1&&we.length==1&&S==l.line)for(;ge&&ge>l.ch&&Ge.charCodeAt(Ge.length-Ve-1)==We.charCodeAt(We.length-Ve-1);)ge--,Ve++;fe[fe.length-1]=Ge.slice(0,Ge.length-Ve).replace(/^\u200b+/,""),fe[0]=fe[0].slice(ge).replace(/\u200b+$/,"");var ct=F(S,ge),at=F(D,we.length?ht(we).length-Ve:0);if(fe.length>1||fe[0]||re(ct,at))return yo(i.doc,fe,ct,at,"+input"),!0},ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},ir.prototype.reset=function(){this.forceCompositionEnd()},ir.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ir.prototype.readFromDOMSoon=function(){var i=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(i.readDOMTimeout=null,i.composing)if(i.composing.done)i.composing=null;else return;i.updateFromDOM()},80))},ir.prototype.updateFromDOM=function(){var i=this;(this.cm.isReadOnly()||!this.pollContent())&&yn(this.cm,function(){return Cn(i.cm)})},ir.prototype.setUneditable=function(i){i.contentEditable="false"},ir.prototype.onKeyPress=function(i){i.charCode==0||this.composing||(i.preventDefault(),this.cm.isReadOnly()||Nr(this.cm,si)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0))},ir.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")},ir.prototype.onContextMenu=function(){},ir.prototype.resetPosition=function(){},ir.prototype.needsContentAttribute=!0;function rf(i,o){var u=Jl(i,o.line);if(!u||u.hidden)return null;var l=rt(i.doc,o.line),f=Dp(u,l,o.line),v=mt(l,i.doc.direction),S="left";if(v){var P=Ft(v,o.ch);S=P%2?"right":"left"}var T=fo(f.map,o.ch,S);return T.offset=T.collapse=="right"?T.end:T.start,T}function og(i){for(var o=i;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}function ga(i,o){return o&&(i.bad=!0),i}function Hi(i,o,u,l,f){var v="",S=!1,P=i.doc.lineSeparator(),T=!1;function D(ge){return function(Ve){return Ve.id==ge}}function oe(){S&&(v+=P,T&&(v+=P),S=T=!1)}function fe(ge){ge&&(oe(),v+=ge)}function we(ge){if(ge.nodeType==1){var Ve=ge.getAttribute("cm-text");if(Ve){fe(Ve);return}var Ie=ge.getAttribute("cm-marker"),De;if(Ie){var Ue=i.findMarks(F(l,0),F(f+1,0),D(+Ie));Ue.length&&(De=Ue[0].find(0))&&fe(as(i.doc,De.from,De.to).join(P));return}if(ge.getAttribute("contenteditable")=="false")return;var Ge=/^(pre|div|p|li|table|br)$/i.test(ge.nodeName);if(!/^br$/i.test(ge.nodeName)&&ge.textContent.length==0)return;Ge&&oe();for(var We=0;We<ge.childNodes.length;We++)we(ge.childNodes[We]);/^(pre|p)$/i.test(ge.nodeName)&&(T=!0),Ge&&(S=!0)}else ge.nodeType==3&&fe(ge.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;we(o),o!=u;)o=o.nextSibling,T=!1;return v}function wu(i,o,u){var l;if(o==i.display.lineDiv){if(l=i.display.lineDiv.childNodes[u],!l)return ga(i.clipPos(F(i.display.viewTo-1)),!0);o=null,u=0}else for(l=o;;l=l.parentNode){if(!l||l==i.display.lineDiv)return null;if(l.parentNode&&l.parentNode==i.display.lineDiv)break}for(var f=0;f<i.display.view.length;f++){var v=i.display.view[f];if(v.node==l)return Oo(v,o,u)}}function Oo(i,o,u){var l=i.text.firstChild,f=!1;if(!o||!Ne(l,o))return ga(F(Qt(i.line),0),!0);if(o==l&&(f=!0,o=l.childNodes[u],u=0,!o)){var v=i.rest?ht(i.rest):i.line;return ga(F(Qt(v),v.text.length),f)}var S=o.nodeType==3?o:null,P=o;for(!S&&o.childNodes.length==1&&o.firstChild.nodeType==3&&(S=o.firstChild,u&&(u=S.nodeValue.length));P.parentNode!=l;)P=P.parentNode;var T=i.measure,D=T.maps;function oe(De,Ue,Ge){for(var We=-1;We<(D?D.length:0);We++)for(var Xe=We<0?T.map:D[We],ct=0;ct<Xe.length;ct+=3){var at=Xe[ct+2];if(at==De||at==Ue){var It=Qt(We<0?i.line:i.rest[We]),mr=Xe[ct]+Ge;return(Ge<0||at!=De)&&(mr=Xe[ct+(Ge?1:0)]),F(It,mr)}}}var fe=oe(S,P,u);if(fe)return ga(fe,f);for(var we=P.nextSibling,ge=S?S.nodeValue.length-u:0;we;we=we.nextSibling){if(fe=oe(we,we.firstChild,0),fe)return ga(F(fe.line,fe.ch-ge),f);ge+=we.textContent.length}for(var Ve=P.previousSibling,Ie=u;Ve;Ve=Ve.previousSibling){if(fe=oe(Ve,Ve.firstChild,-1),fe)return ga(F(fe.line,fe.ch+Ie),f);Ie+=Ve.textContent.length}}var Or=function(i){this.cm=i,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null,this.resetting=!1};Or.prototype.init=function(i){var o=this,u=this,l=this.cm;this.createField(i);var f=this.textarea;i.wrapper.insertBefore(this.wrapper,i.wrapper.firstChild),J&&(f.style.width="0px"),pe(f,"input",function(){A&&O>=9&&o.hasSelection&&(o.hasSelection=null),u.poll()}),pe(f,"paste",function(S){_t(l,S)||Od(S,l)||(l.state.pasteIncoming=+new Date,u.fastPoll())});function v(S){if(!_t(l,S)){if(l.somethingSelected())gl({lineWise:!1,text:l.getSelections()});else if(l.options.lineWiseCopyCut){var P=Ad(l);gl({lineWise:!0,text:P.text}),S.type=="cut"?l.setSelections(P.ranges,null,Lt):(u.prevInput="",f.value=P.text.join(`
32
+ `),Be(f))}else return;S.type=="cut"&&(l.state.cutIncoming=+new Date)}}pe(f,"cut",v),pe(f,"copy",v),pe(i.scroller,"paste",function(S){if(!(Li(i,S)||_t(l,S))){if(!f.dispatchEvent){l.state.pasteIncoming=+new Date,u.focus();return}var P=new Event("paste");P.clipboardData=S.clipboardData,f.dispatchEvent(P)}}),pe(i.lineSpace,"selectstart",function(S){Li(i,S)||Xt(S)}),pe(f,"compositionstart",function(){var S=l.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:S,range:l.markText(S,l.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(f,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},Or.prototype.createField=function(i){this.wrapper=tf(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;_n(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},Or.prototype.screenReaderLabelChanged=function(i){i?this.textarea.setAttribute("aria-label",i):this.textarea.removeAttribute("aria-label")},Or.prototype.prepareSelection=function(){var i=this.cm,o=i.display,u=i.doc,l=wc(i);if(i.options.moveInputWithCursor){var f=zr(i,u.sel.primary().head,"div"),v=o.wrapper.getBoundingClientRect(),S=o.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,f.top+S.top-v.top)),l.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,f.left+S.left-v.left))}return l},Or.prototype.showSelection=function(i){var o=this.cm,u=o.display;Ae(u.cursorDiv,i.cursors),Ae(u.selectionDiv,i.selection),i.teTop!=null&&(this.wrapper.style.top=i.teTop+"px",this.wrapper.style.left=i.teLeft+"px")},Or.prototype.reset=function(i){if(!(this.contextMenuPending||this.composing&&i)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var u=o.getSelection();this.textarea.value=u,o.state.focused&&Be(this.textarea),A&&O>=9&&(this.hasSelection=u)}else i||(this.prevInput=this.textarea.value="",A&&O>=9&&(this.hasSelection=null));this.resetting=!1}},Or.prototype.getField=function(){return this.textarea},Or.prototype.supportsTouch=function(){return!1},Or.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!E||He(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(i){}},Or.prototype.blur=function(){this.textarea.blur()},Or.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Or.prototype.receivedFocus=function(){this.slowPoll()},Or.prototype.slowPoll=function(){var i=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){i.poll(),i.cm.state.focused&&i.slowPoll()})},Or.prototype.fastPoll=function(){var i=!1,o=this;o.pollingFast=!0;function u(){var l=o.poll();!l&&!i?(i=!0,o.polling.set(60,u)):(o.pollingFast=!1,o.slowPoll())}o.polling.set(20,u)},Or.prototype.poll=function(){var i=this,o=this.cm,u=this.textarea,l=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Ts(u)&&!l&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var f=u.value;if(f==l&&!o.somethingSelected())return!1;if(A&&O>=9&&this.hasSelection===f||N&&/[\uf700-\uf7ff]/.test(f))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var v=f.charCodeAt(0);if(v==8203&&!l&&(l="\u200B"),v==8666)return this.reset(),this.cm.execCommand("undo")}for(var S=0,P=Math.min(l.length,f.length);S<P&&l.charCodeAt(S)==f.charCodeAt(S);)++S;return yn(o,function(){si(o,f.slice(S),l.length-S,null,i.composing?"*compose":null),f.length>1e3||f.indexOf(`
33
33
  `)>-1?u.value=i.prevInput="":i.prevInput=f,i.composing&&(i.composing.range.clear(),i.composing.range=o.markText(i.composing.start,o.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Or.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Or.prototype.onKeyPress=function(){A&&O>=9&&(this.hasSelection=null),this.fastPoll()},Or.prototype.onContextMenu=function(i){var o=this,u=o.cm,l=u.display,f=o.textarea;o.contextMenuPending&&o.contextMenuPending();var v=po(u,i),S=l.scroller.scrollTop;if(!v||ee)return;var P=u.options.resetSelectionOnContextMenu;P&&u.doc.sel.contains(v)==-1&&Nr(u,fn)(u.doc,ds(v),Lt);var T=f.style.cssText,D=o.wrapper.style.cssText,oe=o.wrapper.offsetParent.getBoundingClientRect();o.wrapper.style.cssText="position: static",f.style.cssText=`position: absolute; width: 30px; height: 30px;
34
34
  top: `+(i.clientY-oe.top-5)+"px; left: "+(i.clientX-oe.left-5)+`px;
35
35
  z-index: 1000; background: `+(A?"rgba(255, 255, 255, .05)":"transparent")+`;
36
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var fe;j&&(fe=f.ownerDocument.defaultView.scrollY),l.input.focus(),j&&f.ownerDocument.defaultView.scrollTo(null,fe),l.input.reset(),u.somethingSelected()||(f.value=o.prevInput=" "),o.contextMenuPending=ge,l.selForContextMenu=u.doc.sel,clearTimeout(l.detectingSelectAll);function we(){if(f.selectionStart!=null){var Ie=u.somethingSelected(),De="\u200B"+(Ie?f.value:"");f.value="\u21DA",f.value=De,o.prevInput=Ie?"":"\u200B",f.selectionStart=1,f.selectionEnd=De.length,l.selForContextMenu=u.doc.sel}}function ge(){if(o.contextMenuPending==ge&&(o.contextMenuPending=!1,o.wrapper.style.cssText=D,f.style.cssText=T,A&&O<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=S),f.selectionStart!=null)){(!A||A&&O<9)&&we();var Ie=0,De=function(){l.selForContextMenu==u.doc.sel&&f.selectionStart==0&&f.selectionEnd>0&&o.prevInput=="\u200B"?Nr(u,Dc)(u):Ie++<10?l.detectingSelectAll=setTimeout(De,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(De,200)}}if(A&&O>=9&&we(),X){on(i);var Ve=function(){Je(window,"mouseup",Ve),setTimeout(ge,20)};pe(window,"mouseup",Ve)}else setTimeout(ge,50)},Or.prototype.readOnlyChanged=function(i){i||this.reset(),this.textarea.disabled=i=="nocursor",this.textarea.readOnly=!!i},Or.prototype.setUneditable=function(){},Or.prototype.needsContentAttribute=!1;function ag(i,o){if(o=o?yt(o):{},o.value=i.value,!o.tabindex&&i.tabIndex&&(o.tabindex=i.tabIndex),!o.placeholder&&i.placeholder&&(o.placeholder=i.placeholder),o.autofocus==null){var u=He(i.ownerDocument);o.autofocus=u==i||i.getAttribute("autofocus")!=null&&u==document.body}function l(){i.value=P.getValue()}var f;if(i.form&&(pe(i.form,"submit",l),!o.leaveSubmitMethodAlone)){var v=i.form;f=v.submit;try{var S=v.submit=function(){l(),v.submit=f,v.submit(),v.submit=S}}catch(T){}}o.finishInit=function(T){T.save=l,T.getTextArea=function(){return i},T.toTextArea=function(){T.toTextArea=isNaN,l(),i.parentNode.removeChild(T.getWrapperElement()),i.style.display="",i.form&&(Je(i.form,"submit",l),!o.leaveSubmitMethodAlone&&typeof i.form.submit=="function"&&(i.form.submit=f))}},i.style.display="none";var P=wr(function(T){return i.parentNode.insertBefore(T,i.nextSibling)},o);return P}function Ou(i){i.off=Je,i.on=pe,i.wheelEventPixels=i0,i.Doc=tn,i.splitLines=Fi,i.countColumn=lt,i.findColumn=kr,i.isWordChar=Wn,i.Pass=bt,i.signal=xt,i.Line=co,i.changeEnd=Ws,i.scrollbarModel=Pc,i.Pos=F,i.cmpPos=re,i.modes=Fn,i.mimeModes=En,i.resolveMode=gi,i.getMode=An,i.modeExtensions=Ir,i.extendMode=os,i.copyState=ri,i.startState=Ml,i.innerMode=Ho,i.commands=cl,i.keyMap=ms,i.keyName=hu,i.isModifierKey=Jc,i.lookupKey=wo,i.normalizeKeyMap=bd,i.StringStream=hr,i.SharedTextMarker=sl,i.TextMarker=Wi,i.LineWidget=da,i.e_preventDefault=Xt,i.e_stopPropagation=Fr,i.e_stop=on,i.addClass=Re,i.contains=Ne,i.rmClass=H,i.keyNames=Hi}xu(wr),sg(wr);var lg="iter insert remove copy getEditor constructor".split(" ");for(var Js in tn.prototype)tn.prototype.hasOwnProperty(Js)&&Fe(lg,Js)<0&&(wr.prototype[Js]=function(i){return function(){return i.apply(this.doc,arguments)}}(tn.prototype[Js]));return sn(tn),wr.inputStyles={textarea:Or,contenteditable:ir},wr.defineMode=function(i){!wr.defaults.mode&&i!="null"&&(wr.defaults.mode=i),ti.apply(this,arguments)},wr.defineMIME=ka,wr.defineMode("null",function(){return{token:function(i){return i.skipToEnd()}}}),wr.defineMIME("text/plain","null"),wr.defineExtension=function(i,o){wr.prototype[i]=o},wr.defineDocExtension=function(i,o){tn.prototype[i]=o},wr.fromTextArea=ag,Ou(wr),wr.version="5.65.12",wr})},13156:(x,k,c)=>{(function(m){m(c(46944))})(function(m){"use strict";m.defineMode("javascript",function(w,b){var _=w.indentUnit,A=b.statementIndent,O=b.jsonld,j=b.json||O,$=b.trackScope!==!1,K=b.typescript,ie=b.wordCharacters||/[\w$\xa1-\uffff]/,ee=function(){function F(nt){return{type:nt,style:"keyword"}}var re=F("keyword a"),je=F("keyword b"),Le=F("keyword c"),St=F("keyword d"),jt=F("operator"),Zt={type:"atom",style:"atom"};return{if:F("if"),while:re,with:re,else:je,do:je,try:je,finally:je,return:St,break:St,continue:St,new:F("new"),delete:Le,void:Le,throw:Le,debugger:F("debugger"),var:F("var"),const:F("var"),let:F("var"),function:F("function"),catch:F("catch"),for:F("for"),switch:F("switch"),case:F("case"),default:F("default"),in:jt,typeof:jt,instanceof:jt,true:Zt,false:Zt,null:Zt,undefined:Zt,NaN:Zt,Infinity:Zt,this:F("this"),class:F("class"),super:F("atom"),yield:Le,export:F("export"),import:F("import"),extends:Le,await:Le}}(),ae=/[+\-*&%=<>!?|~^@]/,q=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(F){for(var re=!1,je,Le=!1;(je=F.next())!=null;){if(!re){if(je=="/"&&!Le)return;je=="["?Le=!0:Le&&je=="]"&&(Le=!1)}re=!re&&je=="\\"}}var J,L;function E(F,re,je){return J=F,L=je,re}function N(F,re){var je=F.next();if(je=='"'||je=="'")return re.tokenize=U(je),re.tokenize(F,re);if(je=="."&&F.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(je=="."&&F.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(je))return E(je);if(je=="="&&F.eat(">"))return E("=>","operator");if(je=="0"&&F.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(je))return F.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(je=="/")return F.eat("*")?(re.tokenize=se,se(F,re)):F.eat("/")?(F.skipToEnd(),E("comment","comment")):lo(F,re,1)?(V(F),F.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(F.eat("="),E("operator","operator",F.current()));if(je=="`")return re.tokenize=ne,ne(F,re);if(je=="#"&&F.peek()=="!")return F.skipToEnd(),E("meta","meta");if(je=="#"&&F.eatWhile(ie))return E("variable","property");if(je=="<"&&F.match("!--")||je=="-"&&F.match("->")&&!/\S/.test(F.string.slice(0,F.start)))return F.skipToEnd(),E("comment","comment");if(ae.test(je))return(je!=">"||!re.lexical||re.lexical.type!=">")&&(F.eat("=")?(je=="!"||je=="=")&&F.eat("="):/[<>*+\-|&?]/.test(je)&&(F.eat(je),je==">"&&F.eat(je))),je=="?"&&F.eat(".")?E("."):E("operator","operator",F.current());if(ie.test(je)){F.eatWhile(ie);var Le=F.current();if(re.lastType!="."){if(ee.propertyIsEnumerable(Le)){var St=ee[Le];return E(St.type,St.style,Le)}if(Le=="async"&&F.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",Le)}return E("variable","variable",Le)}}function U(F){return function(re,je){var Le=!1,St;if(O&&re.peek()=="@"&&re.match(q))return je.tokenize=N,E("jsonld-keyword","meta");for(;(St=re.next())!=null&&!(St==F&&!Le);)Le=!Le&&St=="\\";return Le||(je.tokenize=N),E("string","string")}}function se(F,re){for(var je=!1,Le;Le=F.next();){if(Le=="/"&&je){re.tokenize=N;break}je=Le=="*"}return E("comment","comment")}function ne(F,re){for(var je=!1,Le;(Le=F.next())!=null;){if(!je&&(Le=="`"||Le=="$"&&F.eat("{"))){re.tokenize=N;break}je=!je&&Le=="\\"}return E("quasi","string-2",F.current())}var Y="([{}])";function X(F,re){re.fatArrowAt&&(re.fatArrowAt=null);var je=F.string.indexOf("=>",F.start);if(!(je<0)){if(K){var Le=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(F.string.slice(F.start,je));Le&&(je=Le.index)}for(var St=0,jt=!1,Zt=je-1;Zt>=0;--Zt){var nt=F.string.charAt(Zt),Gn=Y.indexOf(nt);if(Gn>=0&&Gn<3){if(!St){++Zt;break}if(--St==0){nt=="("&&(jt=!0);break}}else if(Gn>=3&&Gn<6)++St;else if(ie.test(nt))jt=!0;else if(/["'\/`]/.test(nt))for(;;--Zt){if(Zt==0)return;var Ll=F.string.charAt(Zt-1);if(Ll==nt&&F.string.charAt(Zt-2)!="\\"){Zt--;break}}else if(jt&&!St){++Zt;break}}jt&&!St&&(re.fatArrowAt=Zt)}}var Q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function H(F,re,je,Le,St,jt){this.indented=F,this.column=re,this.type=je,this.prev=St,this.info=jt,Le!=null&&(this.align=Le)}function de(F,re){if(!$)return!1;for(var je=F.localVars;je;je=je.next)if(je.name==re)return!0;for(var Le=F.context;Le;Le=Le.prev)for(var je=Le.vars;je;je=je.next)if(je.name==re)return!0}function Ae(F,re,je,Le,St){var jt=F.cc;for(Z.state=F,Z.stream=St,Z.marked=null,Z.cc=jt,Z.style=re,F.lexical.hasOwnProperty("align")||(F.lexical.align=!0);;){var Zt=jt.length?jt.pop():j?Rt:bt;if(Zt(je,Le)){for(;jt.length&&jt[jt.length-1].lex;)jt.pop()();return Z.marked?Z.marked:je=="variable"&&de(F,Le)?"variable-2":re}}}var Z={state:null,column:null,marked:null,cc:null};function xe(){for(var F=arguments.length-1;F>=0;F--)Z.cc.push(arguments[F])}function ue(){return xe.apply(null,arguments),!0}function Ne(F,re){for(var je=re;je;je=je.next)if(je.name==F)return!0;return!1}function He(F){var re=Z.state;if(Z.marked="def",!!$){if(re.context){if(re.lexical.info=="var"&&re.context&&re.context.block){var je=Re(F,re.context);if(je!=null){re.context=je;return}}else if(!Ne(F,re.localVars)){re.localVars=new Ye(F,re.localVars);return}}b.globalVars&&!Ne(F,re.globalVars)&&(re.globalVars=new Ye(F,re.globalVars))}}function Re(F,re){if(re)if(re.block){var je=Re(F,re.prev);return je?je==re.prev?re:new Be(je,re.vars,!0):null}else return Ne(F,re.vars)?re:new Be(re.prev,new Ye(F,re.vars),!1);else return null}function ze(F){return F=="public"||F=="private"||F=="protected"||F=="abstract"||F=="readonly"}function Be(F,re,je){this.prev=F,this.vars=re,this.block=je}function Ye(F,re){this.name=F,this.next=re}var gt=new Ye("this",new Ye("arguments",null));function ut(){Z.state.context=new Be(Z.state.context,Z.state.localVars,!1),Z.state.localVars=gt}function yt(){Z.state.context=new Be(Z.state.context,Z.state.localVars,!0),Z.state.localVars=null}ut.lex=yt.lex=!0;function lt(){Z.state.localVars=Z.state.context.vars,Z.state.context=Z.state.context.prev}lt.lex=!0;function Ke(F,re){var je=function(){var Le=Z.state,St=Le.indented;if(Le.lexical.type=="stat")St=Le.lexical.indented;else for(var jt=Le.lexical;jt&&jt.type==")"&&jt.align;jt=jt.prev)St=jt.indented;Le.lexical=new H(St,Z.stream.column(),F,null,Le.lexical,re)};return je.lex=!0,je}function Fe(){var F=Z.state;F.lexical.prev&&(F.lexical.type==")"&&(F.indented=F.lexical.indented),F.lexical=F.lexical.prev)}Fe.lex=!0;function qe(F){function re(je){return je==F?ue():F==";"||je=="}"||je==")"||je=="]"?xe():ue(re)}return re}function bt(F,re){return F=="var"?ue(Ke("vardef",re),ns,qe(";"),Fe):F=="keyword a"?ue(Ke("form"),kr,bt,Fe):F=="keyword b"?ue(Ke("form"),bt,Fe):F=="keyword d"?Z.stream.match(/^\s*$/,!1)?ue():ue(Ke("stat"),qr,qe(";"),Fe):F=="debugger"?ue(qe(";")):F=="{"?ue(Ke("}"),yt,At,Fe,lt):F==";"?ue():F=="if"?(Z.state.lexical.info=="else"&&Z.state.cc[Z.state.cc.length-1]==Fe&&Z.state.cc.pop()(),ue(Ke("form"),kr,bt,Fe,Fi)):F=="function"?ue(Rn):F=="for"?ue(Ke("form"),yt,Ts,bt,lt,Fe):F=="class"||K&&re=="interface"?(Z.marked="keyword",ue(Ke("form",F=="class"?F:re),gi,Fe)):F=="variable"?K&&re=="declare"?(Z.marked="keyword",ue(bt)):K&&(re=="module"||re=="enum"||re=="type")&&Z.stream.match(/^\s*\w/,!1)?(Z.marked="keyword",re=="enum"?ue(Qt):re=="type"?ue(En,qe("operator"),Je,qe(";")):ue(Ke("form"),ln,qe("{"),Ke("}"),At,Fe,Fe)):K&&re=="namespace"?(Z.marked="keyword",ue(Ke("form"),Rt,bt,Fe)):K&&re=="abstract"?(Z.marked="keyword",ue(bt)):ue(Ke("stat"),ji):F=="switch"?ue(Ke("form"),kr,qe("{"),Ke("}","switch"),yt,At,Fe,Fe,lt):F=="case"?ue(Rt,qe(":")):F=="default"?ue(qe(":")):F=="catch"?ue(Ke("form"),ut,Lt,bt,Fe,lt):F=="export"?ue(Ke("stat"),ri,Fe):F=="import"?ue(Ke("stat"),Ml,Fe):F=="async"?ue(bt):re=="@"?ue(Rt,bt):xe(Ke("stat"),Rt,qe(";"),Fe)}function Lt(F){if(F=="(")return ue(ti,qe(")"))}function Rt(F,re){return jr(F,re,!1)}function zt(F,re){return jr(F,re,!0)}function kr(F){return F!="("?xe():ue(Ke(")"),qr,qe(")"),Fe)}function jr(F,re,je){if(Z.state.fatArrowAt==Z.stream.start){var Le=je?ki:kn;if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,qe("=>"),Le,lt);if(F=="variable")return xe(ut,ln,qe("=>"),Le,lt)}var St=je?$t:ht;return Q.hasOwnProperty(F)?ue(St):F=="function"?ue(Rn,St):F=="class"||K&&re=="interface"?(Z.marked="keyword",ue(Ke("form"),ka,Fe)):F=="keyword c"||F=="async"?ue(je?zt:Rt):F=="("?ue(Ke(")"),qr,qe(")"),Fe,St):F=="operator"||F=="spread"?ue(je?zt:Rt):F=="["?ue(Ke("]"),zn,Fe,St):F=="{"?Ft(jn,"}",null,St):F=="quasi"?xe(nr,St):F=="new"?ue(Wn(je)):ue()}function qr(F){return F.match(/[;\}\)\],]/)?xe():xe(Rt)}function ht(F,re){return F==","?ue(qr):$t(F,re,!1)}function $t(F,re,je){var Le=je==!1?ht:$t,St=je==!1?Rt:zt;if(F=="=>")return ue(ut,je?ki:kn,lt);if(F=="operator")return/\+\+|--/.test(re)||K&&re=="!"?ue(Le):K&&re=="<"&&Z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ue(Ke(">"),fr(Je,">"),Fe,Le):re=="?"?ue(Rt,qe(":"),St):ue(St);if(F=="quasi")return xe(nr,Le);if(F!=";"){if(F=="(")return Ft(zt,")","call",Le);if(F==".")return ue(vi,Le);if(F=="[")return ue(Ke("]"),qr,qe("]"),Fe,Le);if(K&&re=="as")return Z.marked="keyword",ue(Je,Le);if(F=="regexp")return Z.state.lastType=Z.marked="operator",Z.stream.backUp(Z.stream.pos-Z.stream.start-1),ue(St)}}function nr(F,re){return F!="quasi"?xe():re.slice(re.length-2)!="${"?ue(nr):ue(qr,er)}function er(F){if(F=="}")return Z.marked="string-2",Z.state.tokenize=ne,ue(nr)}function kn(F){return X(Z.stream,Z.state),xe(F=="{"?bt:Rt)}function ki(F){return X(Z.stream,Z.state),xe(F=="{"?bt:zt)}function Wn(F){return function(re){return re=="."?ue(F?ei:Hn):re=="variable"&&K?ue(rs,F?$t:ht):xe(F?zt:Rt)}}function Hn(F,re){if(re=="target")return Z.marked="keyword",ue(ht)}function ei(F,re){if(re=="target")return Z.marked="keyword",ue($t)}function ji(F){return F==":"?ue(Fe,bt):xe(ht,qe(";"),Fe)}function vi(F){if(F=="variable")return Z.marked="property",ue()}function jn(F,re){if(F=="async")return Z.marked="property",ue(jn);if(F=="variable"||Z.style=="keyword"){if(Z.marked="property",re=="get"||re=="set")return ue(mn);var je;return K&&Z.state.fatArrowAt==Z.stream.start&&(je=Z.stream.match(/^\s*:\s*/,!1))&&(Z.state.fatArrowAt=Z.stream.pos+je[0].length),ue(vn)}else{if(F=="number"||F=="string")return Z.marked=O?"property":Z.style+" property",ue(vn);if(F=="jsonld-keyword")return ue(vn);if(K&&ze(re))return Z.marked="keyword",ue(jn);if(F=="[")return ue(Rt,mt,qe("]"),vn);if(F=="spread")return ue(zt,vn);if(re=="*")return Z.marked="keyword",ue(jn);if(F==":")return xe(vn)}}function mn(F){return F!="variable"?xe(vn):(Z.marked="property",ue(Rn))}function vn(F){if(F==":")return ue(zt);if(F=="(")return xe(Rn)}function fr(F,re,je){function Le(St,jt){if(je?je.indexOf(St)>-1:St==","){var Zt=Z.state.lexical;return Zt.info=="call"&&(Zt.pos=(Zt.pos||0)+1),ue(function(nt,Gn){return nt==re||Gn==re?xe():xe(F)},Le)}return St==re||jt==re?ue():je&&je.indexOf(";")>-1?xe(F):ue(qe(re))}return function(St,jt){return St==re||jt==re?ue():xe(F,Le)}}function Ft(F,re,je){for(var Le=3;Le<arguments.length;Le++)Z.cc.push(arguments[Le]);return ue(Ke(re,je),fr(F,re),Fe)}function At(F){return F=="}"?ue():xe(bt,At)}function mt(F,re){if(K){if(F==":")return ue(Je);if(re=="?")return ue(mt)}}function Tt(F,re){if(K&&(F==":"||re=="in"))return ue(Je)}function pe(F){if(K&&F==":")return Z.stream.match(/^\s*\w+\s+is\b/,!1)?ue(Rt,Pe,Je):ue(Je)}function Pe(F,re){if(re=="is")return Z.marked="keyword",ue()}function Je(F,re){if(re=="keyof"||re=="typeof"||re=="infer"||re=="readonly")return Z.marked="keyword",ue(re=="typeof"?zt:Je);if(F=="variable"||re=="void")return Z.marked="type",ue(Fr);if(re=="|"||re=="&")return ue(Je);if(F=="string"||F=="number"||F=="atom")return ue(Fr);if(F=="[")return ue(Ke("]"),fr(Je,"]",","),Fe,Fr);if(F=="{")return ue(Ke("}"),_t,Fe,Fr);if(F=="(")return ue(fr(Xt,")"),xt,Fr);if(F=="<")return ue(fr(Je,">"),Je);if(F=="quasi")return xe(Sr,Fr)}function xt(F){if(F=="=>")return ue(Je)}function _t(F){return F.match(/[\}\)\]]/)?ue():F==","||F==";"?ue(_t):xe(Ot,_t)}function Ot(F,re){if(F=="variable"||Z.style=="keyword")return Z.marked="property",ue(Ot);if(re=="?"||F=="number"||F=="string")return ue(Ot);if(F==":")return ue(Je);if(F=="[")return ue(qe("variable"),Tt,qe("]"),Ot);if(F=="(")return xe(Fn,Ot);if(!F.match(/[;\}\)\],]/))return ue()}function Sr(F,re){return F!="quasi"?xe():re.slice(re.length-2)!="${"?ue(Sr):ue(Je,sn)}function sn(F){if(F=="}")return Z.marked="string-2",Z.state.tokenize=ne,ue(Sr)}function Xt(F,re){return F=="variable"&&Z.stream.match(/^\s*[?:]/,!1)||re=="?"?ue(Xt):F==":"?ue(Je):F=="spread"?ue(Xt):xe(Je)}function Fr(F,re){if(re=="<")return ue(Ke(">"),fr(Je,">"),Fe,Fr);if(re=="|"||F=="."||re=="&")return ue(Je);if(F=="[")return ue(Je,qe("]"),Fr);if(re=="extends"||re=="implements")return Z.marked="keyword",ue(Je);if(re=="?")return ue(Je,qe(":"),Je)}function rs(F,re){if(re=="<")return ue(Ke(">"),fr(Je,">"),Fe,Fr)}function on(){return xe(Je,an)}function an(F,re){if(re=="=")return ue(Je)}function ns(F,re){return re=="enum"?(Z.marked="keyword",ue(Qt)):xe(ln,mt,un,ss)}function ln(F,re){if(K&&ze(re))return Z.marked="keyword",ue(ln);if(F=="variable")return He(re),ue();if(F=="spread")return ue(ln);if(F=="[")return Ft(Ri,"]");if(F=="{")return Ft(Ii,"}")}function Ii(F,re){return F=="variable"&&!Z.stream.match(/^\s*:/,!1)?(He(re),ue(un)):(F=="variable"&&(Z.marked="property"),F=="spread"?ue(ln):F=="}"?xe():F=="["?ue(Rt,qe("]"),qe(":"),Ii):ue(qe(":"),ln,un))}function Ri(){return xe(ln,un)}function un(F,re){if(re=="=")return ue(zt)}function ss(F){if(F==",")return ue(ns)}function Fi(F,re){if(F=="keyword b"&&re=="else")return ue(Ke("form","else"),bt,Fe)}function Ts(F,re){if(re=="await")return ue(Ts);if(F=="(")return ue(Ke(")"),Wo,Fe)}function Wo(F){return F=="var"?ue(ns,In):F=="variable"?ue(In):xe(In)}function In(F,re){return F==")"?ue():F==";"?ue(In):re=="in"||re=="of"?(Z.marked="keyword",ue(Rt,In)):xe(Rt,In)}function Rn(F,re){if(re=="*")return Z.marked="keyword",ue(Rn);if(F=="variable")return He(re),ue(Rn);if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,pe,bt,lt);if(K&&re=="<")return ue(Ke(">"),fr(on,">"),Fe,Rn)}function Fn(F,re){if(re=="*")return Z.marked="keyword",ue(Fn);if(F=="variable")return He(re),ue(Fn);if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,pe,lt);if(K&&re=="<")return ue(Ke(">"),fr(on,">"),Fe,Fn)}function En(F,re){if(F=="keyword"||F=="variable")return Z.marked="type",ue(En);if(re=="<")return ue(Ke(">"),fr(on,">"),Fe)}function ti(F,re){return re=="@"&&ue(Rt,ti),F=="spread"?ue(ti):K&&ze(re)?(Z.marked="keyword",ue(ti)):K&&F=="this"?ue(mt,un):xe(ln,mt,un)}function ka(F,re){return F=="variable"?gi(F,re):An(F,re)}function gi(F,re){if(F=="variable")return He(re),ue(An)}function An(F,re){if(re=="<")return ue(Ke(">"),fr(on,">"),Fe,An);if(re=="extends"||re=="implements"||K&&F==",")return re=="implements"&&(Z.marked="keyword"),ue(K?Je:Rt,An);if(F=="{")return ue(Ke("}"),Ir,Fe)}function Ir(F,re){if(F=="async"||F=="variable"&&(re=="static"||re=="get"||re=="set"||K&&ze(re))&&Z.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Z.marked="keyword",ue(Ir);if(F=="variable"||Z.style=="keyword")return Z.marked="property",ue(os,Ir);if(F=="number"||F=="string")return ue(os,Ir);if(F=="[")return ue(Rt,mt,qe("]"),os,Ir);if(re=="*")return Z.marked="keyword",ue(Ir);if(K&&F=="(")return xe(Fn,Ir);if(F==";"||F==",")return ue(Ir);if(F=="}")return ue();if(re=="@")return ue(Rt,Ir)}function os(F,re){if(re=="!"||re=="?")return ue(os);if(F==":")return ue(Je,un);if(re=="=")return ue(zt);var je=Z.state.lexical.prev,Le=je&&je.info=="interface";return xe(Le?Fn:Rn)}function ri(F,re){return re=="*"?(Z.marked="keyword",ue(oo,qe(";"))):re=="default"?(Z.marked="keyword",ue(Rt,qe(";"))):F=="{"?ue(fr(Ho,"}"),oo,qe(";")):xe(bt)}function Ho(F,re){if(re=="as")return Z.marked="keyword",ue(qe("variable"));if(F=="variable")return xe(zt,Ho)}function Ml(F){return F=="string"?ue():F=="("?xe(Rt):F=="."?xe(ht):xe(hr,rt,oo)}function hr(F,re){return F=="{"?Ft(hr,"}"):(F=="variable"&&He(re),re=="*"&&(Z.marked="keyword"),ue(as))}function rt(F){if(F==",")return ue(hr,rt)}function as(F,re){if(re=="as")return Z.marked="keyword",ue(hr)}function oo(F,re){if(re=="from")return Z.marked="keyword",ue(Rt)}function zn(F){return F=="]"?ue():xe(fr(zt,"]"))}function Qt(){return xe(Ke("form"),ln,qe("{"),Ke("}"),fr(ls,"}"),Fe,Fe)}function ls(){return xe(ln,un)}function ao(F,re){return F.lastType=="operator"||F.lastType==","||ae.test(re.charAt(0))||/[,.]/.test(re.charAt(0))}function lo(F,re,je){return re.tokenize==N&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(re.lastType)||re.lastType=="quasi"&&/\{\s*$/.test(F.string.slice(0,F.pos-(je||0)))}return{startState:function(F){var re={tokenize:N,lastType:"sof",cc:[],lexical:new H((F||0)-_,0,"block",!1),localVars:b.localVars,context:b.localVars&&new Be(null,null,!1),indented:F||0};return b.globalVars&&typeof b.globalVars=="object"&&(re.globalVars=b.globalVars),re},token:function(F,re){if(F.sol()&&(re.lexical.hasOwnProperty("align")||(re.lexical.align=!1),re.indented=F.indentation(),X(F,re)),re.tokenize!=se&&F.eatSpace())return null;var je=re.tokenize(F,re);return J=="comment"?je:(re.lastType=J=="operator"&&(L=="++"||L=="--")?"incdec":J,Ae(re,je,J,L,F))},indent:function(F,re){if(F.tokenize==se||F.tokenize==ne)return m.Pass;if(F.tokenize!=N)return 0;var je=re&&re.charAt(0),Le=F.lexical,St;if(!/^\s*else\b/.test(re))for(var jt=F.cc.length-1;jt>=0;--jt){var Zt=F.cc[jt];if(Zt==Fe)Le=Le.prev;else if(Zt!=Fi&&Zt!=lt)break}for(;(Le.type=="stat"||Le.type=="form")&&(je=="}"||(St=F.cc[F.cc.length-1])&&(St==ht||St==$t)&&!/^[,\.=+\-*:?[\(]/.test(re));)Le=Le.prev;A&&Le.type==")"&&Le.prev.type=="stat"&&(Le=Le.prev);var nt=Le.type,Gn=je==nt;return nt=="vardef"?Le.indented+(F.lastType=="operator"||F.lastType==","?Le.info.length+1:0):nt=="form"&&je=="{"?Le.indented:nt=="form"?Le.indented+_:nt=="stat"?Le.indented+(ao(F,re)?A||_:0):Le.info=="switch"&&!Gn&&b.doubleIndentSwitch!=!1?Le.indented+(/^(?:case|default)\b/.test(re)?_:2*_):Le.align?Le.column+(Gn?0:1):Le.indented+(Gn?0:_)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:j?null:"/*",blockCommentEnd:j?null:"*/",blockCommentContinue:j?null:" * ",lineComment:j?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:j?"json":"javascript",jsonldMode:O,jsonMode:j,expressionAllowed:lo,skipExpression:function(F){Ae(F,"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:(x,k)=>{"use strict";/*!
36
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var fe;j&&(fe=f.ownerDocument.defaultView.scrollY),l.input.focus(),j&&f.ownerDocument.defaultView.scrollTo(null,fe),l.input.reset(),u.somethingSelected()||(f.value=o.prevInput=" "),o.contextMenuPending=ge,l.selForContextMenu=u.doc.sel,clearTimeout(l.detectingSelectAll);function we(){if(f.selectionStart!=null){var Ie=u.somethingSelected(),De="\u200B"+(Ie?f.value:"");f.value="\u21DA",f.value=De,o.prevInput=Ie?"":"\u200B",f.selectionStart=1,f.selectionEnd=De.length,l.selForContextMenu=u.doc.sel}}function ge(){if(o.contextMenuPending==ge&&(o.contextMenuPending=!1,o.wrapper.style.cssText=D,f.style.cssText=T,A&&O<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=S),f.selectionStart!=null)){(!A||A&&O<9)&&we();var Ie=0,De=function(){l.selForContextMenu==u.doc.sel&&f.selectionStart==0&&f.selectionEnd>0&&o.prevInput=="\u200B"?Nr(u,Dc)(u):Ie++<10?l.detectingSelectAll=setTimeout(De,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(De,200)}}if(A&&O>=9&&we(),X){on(i);var Ve=function(){Je(window,"mouseup",Ve),setTimeout(ge,20)};pe(window,"mouseup",Ve)}else setTimeout(ge,50)},Or.prototype.readOnlyChanged=function(i){i||this.reset(),this.textarea.disabled=i=="nocursor",this.textarea.readOnly=!!i},Or.prototype.setUneditable=function(){},Or.prototype.needsContentAttribute=!1;function ag(i,o){if(o=o?yt(o):{},o.value=i.value,!o.tabindex&&i.tabIndex&&(o.tabindex=i.tabIndex),!o.placeholder&&i.placeholder&&(o.placeholder=i.placeholder),o.autofocus==null){var u=He(i.ownerDocument);o.autofocus=u==i||i.getAttribute("autofocus")!=null&&u==document.body}function l(){i.value=P.getValue()}var f;if(i.form&&(pe(i.form,"submit",l),!o.leaveSubmitMethodAlone)){var v=i.form;f=v.submit;try{var S=v.submit=function(){l(),v.submit=f,v.submit(),v.submit=S}}catch(T){}}o.finishInit=function(T){T.save=l,T.getTextArea=function(){return i},T.toTextArea=function(){T.toTextArea=isNaN,l(),i.parentNode.removeChild(T.getWrapperElement()),i.style.display="",i.form&&(Je(i.form,"submit",l),!o.leaveSubmitMethodAlone&&typeof i.form.submit=="function"&&(i.form.submit=f))}},i.style.display="none";var P=wr(function(T){return i.parentNode.insertBefore(T,i.nextSibling)},o);return P}function Ou(i){i.off=Je,i.on=pe,i.wheelEventPixels=i0,i.Doc=tn,i.splitLines=Ri,i.countColumn=lt,i.findColumn=kr,i.isWordChar=Wn,i.Pass=bt,i.signal=xt,i.Line=co,i.changeEnd=Ws,i.scrollbarModel=Pc,i.Pos=F,i.cmpPos=re,i.modes=Fn,i.mimeModes=En,i.resolveMode=vi,i.getMode=An,i.modeExtensions=Ir,i.extendMode=os,i.copyState=ri,i.startState=Ml,i.innerMode=Ho,i.commands=cl,i.keyMap=ms,i.keyName=hu,i.isModifierKey=Jc,i.lookupKey=wo,i.normalizeKeyMap=bd,i.StringStream=hr,i.SharedTextMarker=sl,i.TextMarker=Ui,i.LineWidget=da,i.e_preventDefault=Xt,i.e_stopPropagation=Fr,i.e_stop=on,i.addClass=Re,i.contains=Ne,i.rmClass=H,i.keyNames=Wi}xu(wr),sg(wr);var lg="iter insert remove copy getEditor constructor".split(" ");for(var Js in tn.prototype)tn.prototype.hasOwnProperty(Js)&&Fe(lg,Js)<0&&(wr.prototype[Js]=function(i){return function(){return i.apply(this.doc,arguments)}}(tn.prototype[Js]));return sn(tn),wr.inputStyles={textarea:Or,contenteditable:ir},wr.defineMode=function(i){!wr.defaults.mode&&i!="null"&&(wr.defaults.mode=i),ti.apply(this,arguments)},wr.defineMIME=ka,wr.defineMode("null",function(){return{token:function(i){return i.skipToEnd()}}}),wr.defineMIME("text/plain","null"),wr.defineExtension=function(i,o){wr.prototype[i]=o},wr.defineDocExtension=function(i,o){tn.prototype[i]=o},wr.fromTextArea=ag,Ou(wr),wr.version="5.65.12",wr})},13156:(x,k,c)=>{(function(m){m(c(46944))})(function(m){"use strict";m.defineMode("javascript",function(w,b){var _=w.indentUnit,A=b.statementIndent,O=b.jsonld,j=b.json||O,$=b.trackScope!==!1,K=b.typescript,ie=b.wordCharacters||/[\w$\xa1-\uffff]/,ee=function(){function F(nt){return{type:nt,style:"keyword"}}var re=F("keyword a"),je=F("keyword b"),Le=F("keyword c"),St=F("keyword d"),jt=F("operator"),Zt={type:"atom",style:"atom"};return{if:F("if"),while:re,with:re,else:je,do:je,try:je,finally:je,return:St,break:St,continue:St,new:F("new"),delete:Le,void:Le,throw:Le,debugger:F("debugger"),var:F("var"),const:F("var"),let:F("var"),function:F("function"),catch:F("catch"),for:F("for"),switch:F("switch"),case:F("case"),default:F("default"),in:jt,typeof:jt,instanceof:jt,true:Zt,false:Zt,null:Zt,undefined:Zt,NaN:Zt,Infinity:Zt,this:F("this"),class:F("class"),super:F("atom"),yield:Le,export:F("export"),import:F("import"),extends:Le,await:Le}}(),ae=/[+\-*&%=<>!?|~^@]/,q=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(F){for(var re=!1,je,Le=!1;(je=F.next())!=null;){if(!re){if(je=="/"&&!Le)return;je=="["?Le=!0:Le&&je=="]"&&(Le=!1)}re=!re&&je=="\\"}}var J,L;function E(F,re,je){return J=F,L=je,re}function N(F,re){var je=F.next();if(je=='"'||je=="'")return re.tokenize=U(je),re.tokenize(F,re);if(je=="."&&F.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(je=="."&&F.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(je))return E(je);if(je=="="&&F.eat(">"))return E("=>","operator");if(je=="0"&&F.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(je))return F.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(je=="/")return F.eat("*")?(re.tokenize=se,se(F,re)):F.eat("/")?(F.skipToEnd(),E("comment","comment")):lo(F,re,1)?(V(F),F.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(F.eat("="),E("operator","operator",F.current()));if(je=="`")return re.tokenize=ne,ne(F,re);if(je=="#"&&F.peek()=="!")return F.skipToEnd(),E("meta","meta");if(je=="#"&&F.eatWhile(ie))return E("variable","property");if(je=="<"&&F.match("!--")||je=="-"&&F.match("->")&&!/\S/.test(F.string.slice(0,F.start)))return F.skipToEnd(),E("comment","comment");if(ae.test(je))return(je!=">"||!re.lexical||re.lexical.type!=">")&&(F.eat("=")?(je=="!"||je=="=")&&F.eat("="):/[<>*+\-|&?]/.test(je)&&(F.eat(je),je==">"&&F.eat(je))),je=="?"&&F.eat(".")?E("."):E("operator","operator",F.current());if(ie.test(je)){F.eatWhile(ie);var Le=F.current();if(re.lastType!="."){if(ee.propertyIsEnumerable(Le)){var St=ee[Le];return E(St.type,St.style,Le)}if(Le=="async"&&F.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",Le)}return E("variable","variable",Le)}}function U(F){return function(re,je){var Le=!1,St;if(O&&re.peek()=="@"&&re.match(q))return je.tokenize=N,E("jsonld-keyword","meta");for(;(St=re.next())!=null&&!(St==F&&!Le);)Le=!Le&&St=="\\";return Le||(je.tokenize=N),E("string","string")}}function se(F,re){for(var je=!1,Le;Le=F.next();){if(Le=="/"&&je){re.tokenize=N;break}je=Le=="*"}return E("comment","comment")}function ne(F,re){for(var je=!1,Le;(Le=F.next())!=null;){if(!je&&(Le=="`"||Le=="$"&&F.eat("{"))){re.tokenize=N;break}je=!je&&Le=="\\"}return E("quasi","string-2",F.current())}var Y="([{}])";function X(F,re){re.fatArrowAt&&(re.fatArrowAt=null);var je=F.string.indexOf("=>",F.start);if(!(je<0)){if(K){var Le=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(F.string.slice(F.start,je));Le&&(je=Le.index)}for(var St=0,jt=!1,Zt=je-1;Zt>=0;--Zt){var nt=F.string.charAt(Zt),Gn=Y.indexOf(nt);if(Gn>=0&&Gn<3){if(!St){++Zt;break}if(--St==0){nt=="("&&(jt=!0);break}}else if(Gn>=3&&Gn<6)++St;else if(ie.test(nt))jt=!0;else if(/["'\/`]/.test(nt))for(;;--Zt){if(Zt==0)return;var Ll=F.string.charAt(Zt-1);if(Ll==nt&&F.string.charAt(Zt-2)!="\\"){Zt--;break}}else if(jt&&!St){++Zt;break}}jt&&!St&&(re.fatArrowAt=Zt)}}var Q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function H(F,re,je,Le,St,jt){this.indented=F,this.column=re,this.type=je,this.prev=St,this.info=jt,Le!=null&&(this.align=Le)}function de(F,re){if(!$)return!1;for(var je=F.localVars;je;je=je.next)if(je.name==re)return!0;for(var Le=F.context;Le;Le=Le.prev)for(var je=Le.vars;je;je=je.next)if(je.name==re)return!0}function Ae(F,re,je,Le,St){var jt=F.cc;for(Z.state=F,Z.stream=St,Z.marked=null,Z.cc=jt,Z.style=re,F.lexical.hasOwnProperty("align")||(F.lexical.align=!0);;){var Zt=jt.length?jt.pop():j?Rt:bt;if(Zt(je,Le)){for(;jt.length&&jt[jt.length-1].lex;)jt.pop()();return Z.marked?Z.marked:je=="variable"&&de(F,Le)?"variable-2":re}}}var Z={state:null,column:null,marked:null,cc:null};function xe(){for(var F=arguments.length-1;F>=0;F--)Z.cc.push(arguments[F])}function ue(){return xe.apply(null,arguments),!0}function Ne(F,re){for(var je=re;je;je=je.next)if(je.name==F)return!0;return!1}function He(F){var re=Z.state;if(Z.marked="def",!!$){if(re.context){if(re.lexical.info=="var"&&re.context&&re.context.block){var je=Re(F,re.context);if(je!=null){re.context=je;return}}else if(!Ne(F,re.localVars)){re.localVars=new Ye(F,re.localVars);return}}b.globalVars&&!Ne(F,re.globalVars)&&(re.globalVars=new Ye(F,re.globalVars))}}function Re(F,re){if(re)if(re.block){var je=Re(F,re.prev);return je?je==re.prev?re:new Be(je,re.vars,!0):null}else return Ne(F,re.vars)?re:new Be(re.prev,new Ye(F,re.vars),!1);else return null}function ze(F){return F=="public"||F=="private"||F=="protected"||F=="abstract"||F=="readonly"}function Be(F,re,je){this.prev=F,this.vars=re,this.block=je}function Ye(F,re){this.name=F,this.next=re}var gt=new Ye("this",new Ye("arguments",null));function ut(){Z.state.context=new Be(Z.state.context,Z.state.localVars,!1),Z.state.localVars=gt}function yt(){Z.state.context=new Be(Z.state.context,Z.state.localVars,!0),Z.state.localVars=null}ut.lex=yt.lex=!0;function lt(){Z.state.localVars=Z.state.context.vars,Z.state.context=Z.state.context.prev}lt.lex=!0;function Ke(F,re){var je=function(){var Le=Z.state,St=Le.indented;if(Le.lexical.type=="stat")St=Le.lexical.indented;else for(var jt=Le.lexical;jt&&jt.type==")"&&jt.align;jt=jt.prev)St=jt.indented;Le.lexical=new H(St,Z.stream.column(),F,null,Le.lexical,re)};return je.lex=!0,je}function Fe(){var F=Z.state;F.lexical.prev&&(F.lexical.type==")"&&(F.indented=F.lexical.indented),F.lexical=F.lexical.prev)}Fe.lex=!0;function qe(F){function re(je){return je==F?ue():F==";"||je=="}"||je==")"||je=="]"?xe():ue(re)}return re}function bt(F,re){return F=="var"?ue(Ke("vardef",re),ns,qe(";"),Fe):F=="keyword a"?ue(Ke("form"),kr,bt,Fe):F=="keyword b"?ue(Ke("form"),bt,Fe):F=="keyword d"?Z.stream.match(/^\s*$/,!1)?ue():ue(Ke("stat"),qr,qe(";"),Fe):F=="debugger"?ue(qe(";")):F=="{"?ue(Ke("}"),yt,At,Fe,lt):F==";"?ue():F=="if"?(Z.state.lexical.info=="else"&&Z.state.cc[Z.state.cc.length-1]==Fe&&Z.state.cc.pop()(),ue(Ke("form"),kr,bt,Fe,Ri)):F=="function"?ue(Rn):F=="for"?ue(Ke("form"),yt,Ts,bt,lt,Fe):F=="class"||K&&re=="interface"?(Z.marked="keyword",ue(Ke("form",F=="class"?F:re),vi,Fe)):F=="variable"?K&&re=="declare"?(Z.marked="keyword",ue(bt)):K&&(re=="module"||re=="enum"||re=="type")&&Z.stream.match(/^\s*\w/,!1)?(Z.marked="keyword",re=="enum"?ue(Qt):re=="type"?ue(En,qe("operator"),Je,qe(";")):ue(Ke("form"),ln,qe("{"),Ke("}"),At,Fe,Fe)):K&&re=="namespace"?(Z.marked="keyword",ue(Ke("form"),Rt,bt,Fe)):K&&re=="abstract"?(Z.marked="keyword",ue(bt)):ue(Ke("stat"),ki):F=="switch"?ue(Ke("form"),kr,qe("{"),Ke("}","switch"),yt,At,Fe,Fe,lt):F=="case"?ue(Rt,qe(":")):F=="default"?ue(qe(":")):F=="catch"?ue(Ke("form"),ut,Lt,bt,Fe,lt):F=="export"?ue(Ke("stat"),ri,Fe):F=="import"?ue(Ke("stat"),Ml,Fe):F=="async"?ue(bt):re=="@"?ue(Rt,bt):xe(Ke("stat"),Rt,qe(";"),Fe)}function Lt(F){if(F=="(")return ue(ti,qe(")"))}function Rt(F,re){return jr(F,re,!1)}function zt(F,re){return jr(F,re,!0)}function kr(F){return F!="("?xe():ue(Ke(")"),qr,qe(")"),Fe)}function jr(F,re,je){if(Z.state.fatArrowAt==Z.stream.start){var Le=je?Vi:kn;if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,qe("=>"),Le,lt);if(F=="variable")return xe(ut,ln,qe("=>"),Le,lt)}var St=je?$t:ht;return Q.hasOwnProperty(F)?ue(St):F=="function"?ue(Rn,St):F=="class"||K&&re=="interface"?(Z.marked="keyword",ue(Ke("form"),ka,Fe)):F=="keyword c"||F=="async"?ue(je?zt:Rt):F=="("?ue(Ke(")"),qr,qe(")"),Fe,St):F=="operator"||F=="spread"?ue(je?zt:Rt):F=="["?ue(Ke("]"),zn,Fe,St):F=="{"?Ft(jn,"}",null,St):F=="quasi"?xe(nr,St):F=="new"?ue(Wn(je)):ue()}function qr(F){return F.match(/[;\}\)\],]/)?xe():xe(Rt)}function ht(F,re){return F==","?ue(qr):$t(F,re,!1)}function $t(F,re,je){var Le=je==!1?ht:$t,St=je==!1?Rt:zt;if(F=="=>")return ue(ut,je?Vi:kn,lt);if(F=="operator")return/\+\+|--/.test(re)||K&&re=="!"?ue(Le):K&&re=="<"&&Z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ue(Ke(">"),fr(Je,">"),Fe,Le):re=="?"?ue(Rt,qe(":"),St):ue(St);if(F=="quasi")return xe(nr,Le);if(F!=";"){if(F=="(")return Ft(zt,")","call",Le);if(F==".")return ue(mi,Le);if(F=="[")return ue(Ke("]"),qr,qe("]"),Fe,Le);if(K&&re=="as")return Z.marked="keyword",ue(Je,Le);if(F=="regexp")return Z.state.lastType=Z.marked="operator",Z.stream.backUp(Z.stream.pos-Z.stream.start-1),ue(St)}}function nr(F,re){return F!="quasi"?xe():re.slice(re.length-2)!="${"?ue(nr):ue(qr,er)}function er(F){if(F=="}")return Z.marked="string-2",Z.state.tokenize=ne,ue(nr)}function kn(F){return X(Z.stream,Z.state),xe(F=="{"?bt:Rt)}function Vi(F){return X(Z.stream,Z.state),xe(F=="{"?bt:zt)}function Wn(F){return function(re){return re=="."?ue(F?ei:Hn):re=="variable"&&K?ue(rs,F?$t:ht):xe(F?zt:Rt)}}function Hn(F,re){if(re=="target")return Z.marked="keyword",ue(ht)}function ei(F,re){if(re=="target")return Z.marked="keyword",ue($t)}function ki(F){return F==":"?ue(Fe,bt):xe(ht,qe(";"),Fe)}function mi(F){if(F=="variable")return Z.marked="property",ue()}function jn(F,re){if(F=="async")return Z.marked="property",ue(jn);if(F=="variable"||Z.style=="keyword"){if(Z.marked="property",re=="get"||re=="set")return ue(mn);var je;return K&&Z.state.fatArrowAt==Z.stream.start&&(je=Z.stream.match(/^\s*:\s*/,!1))&&(Z.state.fatArrowAt=Z.stream.pos+je[0].length),ue(vn)}else{if(F=="number"||F=="string")return Z.marked=O?"property":Z.style+" property",ue(vn);if(F=="jsonld-keyword")return ue(vn);if(K&&ze(re))return Z.marked="keyword",ue(jn);if(F=="[")return ue(Rt,mt,qe("]"),vn);if(F=="spread")return ue(zt,vn);if(re=="*")return Z.marked="keyword",ue(jn);if(F==":")return xe(vn)}}function mn(F){return F!="variable"?xe(vn):(Z.marked="property",ue(Rn))}function vn(F){if(F==":")return ue(zt);if(F=="(")return xe(Rn)}function fr(F,re,je){function Le(St,jt){if(je?je.indexOf(St)>-1:St==","){var Zt=Z.state.lexical;return Zt.info=="call"&&(Zt.pos=(Zt.pos||0)+1),ue(function(nt,Gn){return nt==re||Gn==re?xe():xe(F)},Le)}return St==re||jt==re?ue():je&&je.indexOf(";")>-1?xe(F):ue(qe(re))}return function(St,jt){return St==re||jt==re?ue():xe(F,Le)}}function Ft(F,re,je){for(var Le=3;Le<arguments.length;Le++)Z.cc.push(arguments[Le]);return ue(Ke(re,je),fr(F,re),Fe)}function At(F){return F=="}"?ue():xe(bt,At)}function mt(F,re){if(K){if(F==":")return ue(Je);if(re=="?")return ue(mt)}}function Tt(F,re){if(K&&(F==":"||re=="in"))return ue(Je)}function pe(F){if(K&&F==":")return Z.stream.match(/^\s*\w+\s+is\b/,!1)?ue(Rt,Pe,Je):ue(Je)}function Pe(F,re){if(re=="is")return Z.marked="keyword",ue()}function Je(F,re){if(re=="keyof"||re=="typeof"||re=="infer"||re=="readonly")return Z.marked="keyword",ue(re=="typeof"?zt:Je);if(F=="variable"||re=="void")return Z.marked="type",ue(Fr);if(re=="|"||re=="&")return ue(Je);if(F=="string"||F=="number"||F=="atom")return ue(Fr);if(F=="[")return ue(Ke("]"),fr(Je,"]",","),Fe,Fr);if(F=="{")return ue(Ke("}"),_t,Fe,Fr);if(F=="(")return ue(fr(Xt,")"),xt,Fr);if(F=="<")return ue(fr(Je,">"),Je);if(F=="quasi")return xe(Sr,Fr)}function xt(F){if(F=="=>")return ue(Je)}function _t(F){return F.match(/[\}\)\]]/)?ue():F==","||F==";"?ue(_t):xe(Ot,_t)}function Ot(F,re){if(F=="variable"||Z.style=="keyword")return Z.marked="property",ue(Ot);if(re=="?"||F=="number"||F=="string")return ue(Ot);if(F==":")return ue(Je);if(F=="[")return ue(qe("variable"),Tt,qe("]"),Ot);if(F=="(")return xe(Fn,Ot);if(!F.match(/[;\}\)\],]/))return ue()}function Sr(F,re){return F!="quasi"?xe():re.slice(re.length-2)!="${"?ue(Sr):ue(Je,sn)}function sn(F){if(F=="}")return Z.marked="string-2",Z.state.tokenize=ne,ue(Sr)}function Xt(F,re){return F=="variable"&&Z.stream.match(/^\s*[?:]/,!1)||re=="?"?ue(Xt):F==":"?ue(Je):F=="spread"?ue(Xt):xe(Je)}function Fr(F,re){if(re=="<")return ue(Ke(">"),fr(Je,">"),Fe,Fr);if(re=="|"||F=="."||re=="&")return ue(Je);if(F=="[")return ue(Je,qe("]"),Fr);if(re=="extends"||re=="implements")return Z.marked="keyword",ue(Je);if(re=="?")return ue(Je,qe(":"),Je)}function rs(F,re){if(re=="<")return ue(Ke(">"),fr(Je,">"),Fe,Fr)}function on(){return xe(Je,an)}function an(F,re){if(re=="=")return ue(Je)}function ns(F,re){return re=="enum"?(Z.marked="keyword",ue(Qt)):xe(ln,mt,un,ss)}function ln(F,re){if(K&&ze(re))return Z.marked="keyword",ue(ln);if(F=="variable")return He(re),ue();if(F=="spread")return ue(ln);if(F=="[")return Ft(Ii,"]");if(F=="{")return Ft(ji,"}")}function ji(F,re){return F=="variable"&&!Z.stream.match(/^\s*:/,!1)?(He(re),ue(un)):(F=="variable"&&(Z.marked="property"),F=="spread"?ue(ln):F=="}"?xe():F=="["?ue(Rt,qe("]"),qe(":"),ji):ue(qe(":"),ln,un))}function Ii(){return xe(ln,un)}function un(F,re){if(re=="=")return ue(zt)}function ss(F){if(F==",")return ue(ns)}function Ri(F,re){if(F=="keyword b"&&re=="else")return ue(Ke("form","else"),bt,Fe)}function Ts(F,re){if(re=="await")return ue(Ts);if(F=="(")return ue(Ke(")"),Wo,Fe)}function Wo(F){return F=="var"?ue(ns,In):F=="variable"?ue(In):xe(In)}function In(F,re){return F==")"?ue():F==";"?ue(In):re=="in"||re=="of"?(Z.marked="keyword",ue(Rt,In)):xe(Rt,In)}function Rn(F,re){if(re=="*")return Z.marked="keyword",ue(Rn);if(F=="variable")return He(re),ue(Rn);if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,pe,bt,lt);if(K&&re=="<")return ue(Ke(">"),fr(on,">"),Fe,Rn)}function Fn(F,re){if(re=="*")return Z.marked="keyword",ue(Fn);if(F=="variable")return He(re),ue(Fn);if(F=="(")return ue(ut,Ke(")"),fr(ti,")"),Fe,pe,lt);if(K&&re=="<")return ue(Ke(">"),fr(on,">"),Fe,Fn)}function En(F,re){if(F=="keyword"||F=="variable")return Z.marked="type",ue(En);if(re=="<")return ue(Ke(">"),fr(on,">"),Fe)}function ti(F,re){return re=="@"&&ue(Rt,ti),F=="spread"?ue(ti):K&&ze(re)?(Z.marked="keyword",ue(ti)):K&&F=="this"?ue(mt,un):xe(ln,mt,un)}function ka(F,re){return F=="variable"?vi(F,re):An(F,re)}function vi(F,re){if(F=="variable")return He(re),ue(An)}function An(F,re){if(re=="<")return ue(Ke(">"),fr(on,">"),Fe,An);if(re=="extends"||re=="implements"||K&&F==",")return re=="implements"&&(Z.marked="keyword"),ue(K?Je:Rt,An);if(F=="{")return ue(Ke("}"),Ir,Fe)}function Ir(F,re){if(F=="async"||F=="variable"&&(re=="static"||re=="get"||re=="set"||K&&ze(re))&&Z.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Z.marked="keyword",ue(Ir);if(F=="variable"||Z.style=="keyword")return Z.marked="property",ue(os,Ir);if(F=="number"||F=="string")return ue(os,Ir);if(F=="[")return ue(Rt,mt,qe("]"),os,Ir);if(re=="*")return Z.marked="keyword",ue(Ir);if(K&&F=="(")return xe(Fn,Ir);if(F==";"||F==",")return ue(Ir);if(F=="}")return ue();if(re=="@")return ue(Rt,Ir)}function os(F,re){if(re=="!"||re=="?")return ue(os);if(F==":")return ue(Je,un);if(re=="=")return ue(zt);var je=Z.state.lexical.prev,Le=je&&je.info=="interface";return xe(Le?Fn:Rn)}function ri(F,re){return re=="*"?(Z.marked="keyword",ue(oo,qe(";"))):re=="default"?(Z.marked="keyword",ue(Rt,qe(";"))):F=="{"?ue(fr(Ho,"}"),oo,qe(";")):xe(bt)}function Ho(F,re){if(re=="as")return Z.marked="keyword",ue(qe("variable"));if(F=="variable")return xe(zt,Ho)}function Ml(F){return F=="string"?ue():F=="("?xe(Rt):F=="."?xe(ht):xe(hr,rt,oo)}function hr(F,re){return F=="{"?Ft(hr,"}"):(F=="variable"&&He(re),re=="*"&&(Z.marked="keyword"),ue(as))}function rt(F){if(F==",")return ue(hr,rt)}function as(F,re){if(re=="as")return Z.marked="keyword",ue(hr)}function oo(F,re){if(re=="from")return Z.marked="keyword",ue(Rt)}function zn(F){return F=="]"?ue():xe(fr(zt,"]"))}function Qt(){return xe(Ke("form"),ln,qe("{"),Ke("}"),fr(ls,"}"),Fe,Fe)}function ls(){return xe(ln,un)}function ao(F,re){return F.lastType=="operator"||F.lastType==","||ae.test(re.charAt(0))||/[,.]/.test(re.charAt(0))}function lo(F,re,je){return re.tokenize==N&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(re.lastType)||re.lastType=="quasi"&&/\{\s*$/.test(F.string.slice(0,F.pos-(je||0)))}return{startState:function(F){var re={tokenize:N,lastType:"sof",cc:[],lexical:new H((F||0)-_,0,"block",!1),localVars:b.localVars,context:b.localVars&&new Be(null,null,!1),indented:F||0};return b.globalVars&&typeof b.globalVars=="object"&&(re.globalVars=b.globalVars),re},token:function(F,re){if(F.sol()&&(re.lexical.hasOwnProperty("align")||(re.lexical.align=!1),re.indented=F.indentation(),X(F,re)),re.tokenize!=se&&F.eatSpace())return null;var je=re.tokenize(F,re);return J=="comment"?je:(re.lastType=J=="operator"&&(L=="++"||L=="--")?"incdec":J,Ae(re,je,J,L,F))},indent:function(F,re){if(F.tokenize==se||F.tokenize==ne)return m.Pass;if(F.tokenize!=N)return 0;var je=re&&re.charAt(0),Le=F.lexical,St;if(!/^\s*else\b/.test(re))for(var jt=F.cc.length-1;jt>=0;--jt){var Zt=F.cc[jt];if(Zt==Fe)Le=Le.prev;else if(Zt!=Ri&&Zt!=lt)break}for(;(Le.type=="stat"||Le.type=="form")&&(je=="}"||(St=F.cc[F.cc.length-1])&&(St==ht||St==$t)&&!/^[,\.=+\-*:?[\(]/.test(re));)Le=Le.prev;A&&Le.type==")"&&Le.prev.type=="stat"&&(Le=Le.prev);var nt=Le.type,Gn=je==nt;return nt=="vardef"?Le.indented+(F.lastType=="operator"||F.lastType==","?Le.info.length+1:0):nt=="form"&&je=="{"?Le.indented:nt=="form"?Le.indented+_:nt=="stat"?Le.indented+(ao(F,re)?A||_:0):Le.info=="switch"&&!Gn&&b.doubleIndentSwitch!=!1?Le.indented+(/^(?:case|default)\b/.test(re)?_:2*_):Le.align?Le.column+(Gn?0:1):Le.indented+(Gn?0:_)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:j?null:"/*",blockCommentEnd:j?null:"*/",blockCommentContinue:j?null:" * ",lineComment:j?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:j?"json":"javascript",jsonldMode:O,jsonMode:j,expressionAllowed:lo,skipExpression:function(F){Ae(F,"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:(x,k)=>{"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
- */k.parse=w,k.serialize=b;var c=Object.prototype.toString,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function w($,K){if(typeof $!="string")throw new TypeError("argument str must be a string");for(var ie={},ee=K||{},ae=ee.decode||_,q=0;q<$.length;){var V=$.indexOf("=",q);if(V===-1)break;var J=$.indexOf(";",q);if(J===-1)J=$.length;else if(J<V){q=$.lastIndexOf(";",V-1)+1;continue}var L=$.slice(q,V).trim();if(ie[L]===void 0){var E=$.slice(V+1,J).trim();E.charCodeAt(0)===34&&(E=E.slice(1,-1)),ie[L]=j(E,ae)}q=J+1}return ie}function b($,K,ie){var ee=ie||{},ae=ee.encode||A;if(typeof ae!="function")throw new TypeError("option encode is invalid");if(!m.test($))throw new TypeError("argument name is invalid");var q=ae(K);if(q&&!m.test(q))throw new TypeError("argument val is invalid");var V=$+"="+q;if(ee.maxAge!=null){var J=ee.maxAge-0;if(isNaN(J)||!isFinite(J))throw new TypeError("option maxAge is invalid");V+="; Max-Age="+Math.floor(J)}if(ee.domain){if(!m.test(ee.domain))throw new TypeError("option domain is invalid");V+="; Domain="+ee.domain}if(ee.path){if(!m.test(ee.path))throw new TypeError("option path is invalid");V+="; Path="+ee.path}if(ee.expires){var L=ee.expires;if(!O(L)||isNaN(L.valueOf()))throw new TypeError("option expires is invalid");V+="; Expires="+L.toUTCString()}if(ee.httpOnly&&(V+="; HttpOnly"),ee.secure&&(V+="; Secure"),ee.priority){var E=typeof ee.priority=="string"?ee.priority.toLowerCase():ee.priority;switch(E){case"low":V+="; Priority=Low";break;case"medium":V+="; Priority=Medium";break;case"high":V+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(ee.sameSite){var N=typeof ee.sameSite=="string"?ee.sameSite.toLowerCase():ee.sameSite;switch(N){case!0:V+="; SameSite=Strict";break;case"lax":V+="; SameSite=Lax";break;case"strict":V+="; SameSite=Strict";break;case"none":V+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return V}function _($){return $.indexOf("%")!==-1?decodeURIComponent($):$}function A($){return encodeURIComponent($)}function O($){return c.call($)==="[object Date]"||$ instanceof Date}function j($,K){try{return K($)}catch(ie){return $}}},97529:(x,k,c)=>{var m=c(44928);x.exports=m},75342:(x,k,c)=>{var m=c(26087);x.exports=m},64218:(x,k,c)=>{var m=c(11783);x.exports=m},95050:(x,k,c)=>{var m=c(88462);x.exports=m},84779:(x,k,c)=>{var m=c(83531);x.exports=m},17190:(x,k,c)=>{var m=c(19941);x.exports=m},96589:(x,k,c)=>{var m=c(25081);x.exports=m},32276:(x,k,c)=>{var m=c(22145);x.exports=m},15064:(x,k,c)=>{var m=c(93690);x.exports=m},31986:(x,k,c)=>{var m=c(8429);c(42319),x.exports=m},69635:(x,k,c)=>{var m=c(13099);x.exports=m},3529:(x,k,c)=>{var m=c(44931);x.exports=m},85373:(x,k,c)=>{c(17802);var m=c(70291);x.exports=m("Array").filter},94537:(x,k,c)=>{c(64009);var m=c(70291);x.exports=m("Array").forEach},27794:(x,k,c)=>{c(32449);var m=c(70291);x.exports=m("Array").indexOf},55794:(x,k,c)=>{var m=c(15166),w=c(85373),b=Array.prototype;x.exports=function(_){var A=_.filter;return _===b||m(b,_)&&A===b.filter?w:A}},85838:(x,k,c)=>{var m=c(15166),w=c(27794),b=Array.prototype;x.exports=function(_){var A=_.indexOf;return _===b||m(b,_)&&A===b.indexOf?w:A}},95617:(x,k,c)=>{c(28135);var m=c(59921),w=m.Object,b=x.exports=function(A,O){return w.defineProperties(A,O)};w.defineProperties.sham&&(b.sham=!0)},11906:(x,k,c)=>{c(70829);var m=c(59921),w=m.Object,b=x.exports=function(A,O,j){return w.defineProperty(A,O,j)};w.defineProperty.sham&&(b.sham=!0)},59123:(x,k,c)=>{c(51964);var m=c(59921),w=m.Object,b=x.exports=function(A,O){return w.getOwnPropertyDescriptor(A,O)};w.getOwnPropertyDescriptor.sham&&(b.sham=!0)},63332:(x,k,c)=>{c(723);var m=c(59921);x.exports=m.Object.getOwnPropertyDescriptors},83606:(x,k,c)=>{c(68030);var m=c(59921);x.exports=m.Object.getOwnPropertySymbols},90660:(x,k,c)=>{c(38339);var m=c(59921);x.exports=m.Object.keys},49198:(x,k,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);x.exports=m.Symbol},15413:(x,k,c)=>{c(44390),c(97829),c(27626),c(84911);var m=c(39378);x.exports=m.f("iterator")},4793:(x,k,c)=>{c(91667),c(99921);var m=c(39378);x.exports=m.f("toPrimitive")},24018:(x,k,c)=>{x.exports=c(11226)},27411:(x,k,c)=>{x.exports=c(39743)},79155:(x,k,c)=>{x.exports=c(17018)},13375:(x,k,c)=>{x.exports=c(45057)},95442:(x,k,c)=>{x.exports=c(97947)},55334:(x,k,c)=>{x.exports=c(26452)},48261:(x,k,c)=>{x.exports=c(4477)},92864:(x,k,c)=>{x.exports=c(74013)},27923:(x,k,c)=>{x.exports=c(17685)},89225:(x,k,c)=>{x.exports=c(2371)},95281:(x,k,c)=>{x.exports=c(89061)},55468:(x,k,c)=>{x.exports=c(51553)},11226:(x,k,c)=>{var m=c(97529);x.exports=m},39743:(x,k,c)=>{var m=c(75342);x.exports=m},17018:(x,k,c)=>{var m=c(64218);x.exports=m},45057:(x,k,c)=>{var m=c(95050);x.exports=m},97947:(x,k,c)=>{var m=c(84779);x.exports=m},26452:(x,k,c)=>{var m=c(17190);x.exports=m},4477:(x,k,c)=>{var m=c(96589);x.exports=m},74013:(x,k,c)=>{var m=c(32276);x.exports=m},17685:(x,k,c)=>{var m=c(15064);x.exports=m},2371:(x,k,c)=>{var m=c(31986);c(45987),c(58052),c(90181),c(25129),c(90397),c(18097),c(82793),c(67574),c(20122),x.exports=m},89061:(x,k,c)=>{var m=c(69635);x.exports=m},51553:(x,k,c)=>{var m=c(3529);x.exports=m},81970:(x,k,c)=>{var m=c(43152),w=c(18342),b=TypeError;x.exports=function(_){if(m(_))return _;throw b(w(_)+" is not a function")}},72185:(x,k,c)=>{var m=c(43152),w=String,b=TypeError;x.exports=function(_){if(typeof _=="object"||m(_))return _;throw b("Can't set "+w(_)+" as a prototype")}},20844:x=>{x.exports=function(){}},35970:(x,k,c)=>{var m=c(92548),w=String,b=TypeError;x.exports=function(_){if(m(_))return _;throw b(w(_)+" is not an object")}},24782:(x,k,c)=>{"use strict";var m=c(93935).forEach,w=c(10454),b=w("forEach");x.exports=b?[].forEach:function(A){return m(this,A,arguments.length>1?arguments[1]:void 0)}},66322:(x,k,c)=>{var m=c(88966),w=c(13249),b=c(53387),_=function(A){return function(O,j,$){var K=m(O),ie=b(K),ee=w($,ie),ae;if(A&&j!=j){for(;ie>ee;)if(ae=K[ee++],ae!=ae)return!0}else for(;ie>ee;ee++)if((A||ee in K)&&K[ee]===j)return A||ee||0;return!A&&-1}};x.exports={includes:_(!0),indexOf:_(!1)}},93935:(x,k,c)=>{var m=c(7416),w=c(90406),b=c(38622),_=c(53254),A=c(53387),O=c(69573),j=w([].push),$=function(K){var ie=K==1,ee=K==2,ae=K==3,q=K==4,V=K==6,J=K==7,L=K==5||V;return function(E,N,U,se){for(var ne=_(E),Y=b(ne),X=m(N,U),Q=A(Y),H=0,de=se||O,Ae=ie?de(E,Q):ee||J?de(E,0):void 0,Z,xe;Q>H;H++)if((L||H in Y)&&(Z=Y[H],xe=X(Z,H,ne),K))if(ie)Ae[H]=xe;else if(xe)switch(K){case 3:return!0;case 5:return Z;case 6:return H;case 2:j(Ae,Z)}else switch(K){case 4:return!1;case 7:j(Ae,Z)}return V?-1:ae||q?q:Ae}};x.exports={forEach:$(0),map:$(1),filter:$(2),some:$(3),every:$(4),find:$(5),findIndex:$(6),filterReject:$(7)}},36844:(x,k,c)=>{var m=c(31982),w=c(33538),b=c(32438),_=w("species");x.exports=function(A){return b>=51||!m(function(){var O=[],j=O.constructor={};return j[_]=function(){return{foo:1}},O[A](Boolean).foo!==1})}},10454:(x,k,c)=>{"use strict";var m=c(31982);x.exports=function(w,b){var _=[][w];return!!_&&m(function(){_.call(null,b||function(){return 1},1)})}},67932:(x,k,c)=>{var m=c(13249),w=c(53387),b=c(53437),_=Array,A=Math.max;x.exports=function(O,j,$){for(var K=w(O),ie=m(j,K),ee=m($===void 0?K:$,K),ae=_(A(ee-ie,0)),q=0;ie<ee;ie++,q++)b(ae,q,O[ie]);return ae.length=q,ae}},53160:(x,k,c)=>{var m=c(90406);x.exports=m([].slice)},76562:(x,k,c)=>{var m=c(93053),w=c(43455),b=c(92548),_=c(33538),A=_("species"),O=Array;x.exports=function(j){var $;return m(j)&&($=j.constructor,w($)&&($===O||m($.prototype))?$=void 0:b($)&&($=$[A],$===null&&($=void 0))),$===void 0?O:$}},69573:(x,k,c)=>{var m=c(76562);x.exports=function(w,b){return new(m(w))(b===0?0:b)}},58310:(x,k,c)=>{var m=c(90406),w=m({}.toString),b=m("".slice);x.exports=function(_){return b(w(_),8,-1)}},82059:(x,k,c)=>{var m=c(48448),w=c(43152),b=c(58310),_=c(33538),A=_("toStringTag"),O=Object,j=b(function(){return arguments}())=="Arguments",$=function(K,ie){try{return K[ie]}catch(ee){}};x.exports=m?b:function(K){var ie,ee,ae;return K===void 0?"Undefined":K===null?"Null":typeof(ee=$(ie=O(K),A))=="string"?ee:j?b(ie):(ae=b(ie))=="Object"&&w(ie.callee)?"Arguments":ae}},74838:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){function w(){}return w.prototype.constructor=null,Object.getPrototypeOf(new w)!==w.prototype})},10248:x=>{x.exports=function(k,c){return{value:k,done:c}}},20410:(x,k,c)=>{var m=c(56049),w=c(36133),b=c(54686);x.exports=m?function(_,A,O){return w.f(_,A,b(1,O))}:function(_,A,O){return _[A]=O,_}},54686:x=>{x.exports=function(k,c){return{enumerable:!(k&1),configurable:!(k&2),writable:!(k&4),value:c}}},53437:(x,k,c)=>{"use strict";var m=c(5135),w=c(36133),b=c(54686);x.exports=function(_,A,O){var j=m(A);j in _?w.f(_,j,b(0,O)):_[j]=O}},37912:(x,k,c)=>{var m=c(36133);x.exports=function(w,b,_){return m.f(w,b,_)}},27519:(x,k,c)=>{var m=c(20410);x.exports=function(w,b,_,A){return A&&A.enumerable?w[b]=_:m(w,b,_),w}},9267:(x,k,c)=>{var m=c(62447),w=Object.defineProperty;x.exports=function(b,_){try{w(m,b,{value:_,configurable:!0,writable:!0})}catch(A){m[b]=_}return _}},56049:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:x=>{var k=typeof document=="object"&&document.all,c=typeof k=="undefined"&&k!==void 0;x.exports={all:k,IS_HTMLDDA:c}},45511:(x,k,c)=>{var m=c(62447),w=c(92548),b=m.document,_=w(b)&&w(b.createElement);x.exports=function(A){return _?b.createElement(A):{}}},11452:x=>{var k=TypeError,c=9007199254740991;x.exports=function(m){if(m>c)throw k("Maximum allowed index exceeded");return m}},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!="undefined"&&String(navigator.userAgent)||""},32438:(x,k,c)=>{var m=c(62447),w=c(90740),b=m.process,_=m.Deno,A=b&&b.versions||_&&_.version,O=A&&A.v8,j,$;O&&(j=O.split("."),$=j[0]>0&&j[0]<4?1:+(j[0]+j[1])),!$&&w&&(j=w.match(/Edge\/(\d+)/),(!j||j[1]>=74)&&(j=w.match(/Chrome\/(\d+)/),j&&($=+j[1]))),x.exports=$},70291:(x,k,c)=>{var m=c(59921);x.exports=function(w){return m[w+"Prototype"]}},11792:x=>{x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(x,k,c)=>{"use strict";var m=c(62447),w=c(82768),b=c(57953),_=c(43152),A=c(80016).f,O=c(51585),j=c(59921),$=c(7416),K=c(20410),ie=c(18768),ee=function(ae){var q=function(V,J,L){if(this instanceof q){switch(arguments.length){case 0:return new ae;case 1:return new ae(V);case 2:return new ae(V,J)}return new ae(V,J,L)}return w(ae,this,arguments)};return q.prototype=ae.prototype,q};x.exports=function(ae,q){var V=ae.target,J=ae.global,L=ae.stat,E=ae.proto,N=J?m:L?m[V]:(m[V]||{}).prototype,U=J?j:j[V]||K(j,V,{})[V],se=U.prototype,ne,Y,X,Q,H,de,Ae,Z,xe;for(Q in q)ne=O(J?Q:V+(L?".":"#")+Q,ae.forced),Y=!ne&&N&&ie(N,Q),de=U[Q],Y&&(ae.dontCallGetSet?(xe=A(N,Q),Ae=xe&&xe.value):Ae=N[Q]),H=Y&&Ae?Ae:q[Q],!(Y&&typeof de==typeof H)&&(ae.bind&&Y?Z=$(H,m):ae.wrap&&Y?Z=ee(H):E&&_(H)?Z=b(H):Z=H,(ae.sham||H&&H.sham||de&&de.sham)&&K(Z,"sham",!0),K(U,Q,Z),E&&(X=V+"Prototype",ie(j,X)||K(j,X,{}),K(j[X],Q,H),ae.real&&se&&(ne||!se[Q])&&K(se,Q,H)))}},31982:x=>{x.exports=function(k){try{return!!k()}catch(c){return!0}}},82768:(x,k,c)=>{var m=c(97966),w=Function.prototype,b=w.apply,_=w.call;x.exports=typeof Reflect=="object"&&Reflect.apply||(m?_.bind(b):function(){return _.apply(b,arguments)})},7416:(x,k,c)=>{var m=c(57953),w=c(81970),b=c(97966),_=m(m.bind);x.exports=function(A,O){return w(A),O===void 0?A:b?_(A,O):function(){return A.apply(O,arguments)}}},97966:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){var w=function(){}.bind();return typeof w!="function"||w.hasOwnProperty("prototype")})},12461:(x,k,c)=>{var m=c(97966),w=Function.prototype.call;x.exports=m?w.bind(w):function(){return w.apply(w,arguments)}},58100:(x,k,c)=>{var m=c(56049),w=c(18768),b=Function.prototype,_=m&&Object.getOwnPropertyDescriptor,A=w(b,"name"),O=A&&function(){}.name==="something",j=A&&(!m||m&&_(b,"name").configurable);x.exports={EXISTS:A,PROPER:O,CONFIGURABLE:j}},54518:(x,k,c)=>{var m=c(90406),w=c(81970);x.exports=function(b,_,A){try{return m(w(Object.getOwnPropertyDescriptor(b,_)[A]))}catch(O){}}},57953:(x,k,c)=>{var m=c(58310),w=c(90406);x.exports=function(b){if(m(b)==="Function")return w(b)}},90406:(x,k,c)=>{var m=c(97966),w=Function.prototype,b=w.call,_=m&&w.bind.bind(b,b);x.exports=m?_:function(A){return function(){return b.apply(A,arguments)}}},97080:(x,k,c)=>{var m=c(59921),w=c(62447),b=c(43152),_=function(A){return b(A)?A:void 0};x.exports=function(A,O){return arguments.length<2?_(m[A])||_(w[A]):m[A]&&m[A][O]||w[A]&&w[A][O]}},82850:(x,k,c)=>{var m=c(90406),w=c(93053),b=c(43152),_=c(58310),A=c(46025),O=m([].push);x.exports=function(j){if(b(j))return j;if(w(j)){for(var $=j.length,K=[],ie=0;ie<$;ie++){var ee=j[ie];typeof ee=="string"?O(K,ee):(typeof ee=="number"||_(ee)=="Number"||_(ee)=="String")&&O(K,A(ee))}var ae=K.length,q=!0;return function(V,J){if(q)return q=!1,J;if(w(this))return J;for(var L=0;L<ae;L++)if(K[L]===V)return J}}}},27529:(x,k,c)=>{var m=c(81970),w=c(71365);x.exports=function(b,_){var A=b[_];return w(A)?void 0:m(A)}},62447:(x,k,c)=>{var m=function(w){return w&&w.Math==Math&&w};x.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:(x,k,c)=>{var m=c(90406),w=c(53254),b=m({}.hasOwnProperty);x.exports=Object.hasOwn||function(A,O){return b(w(A),O)}},13477:x=>{x.exports={}},19552:(x,k,c)=>{var m=c(97080);x.exports=m("document","documentElement")},11314:(x,k,c)=>{var m=c(56049),w=c(31982),b=c(45511);x.exports=!m&&!w(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},38622:(x,k,c)=>{var m=c(90406),w=c(31982),b=c(58310),_=Object,A=m("".split);x.exports=w(function(){return!_("z").propertyIsEnumerable(0)})?function(O){return b(O)=="String"?A(O,""):_(O)}:_},41524:(x,k,c)=>{var m=c(90406),w=c(43152),b=c(70716),_=m(Function.toString);w(b.inspectSource)||(b.inspectSource=function(A){return _(A)}),x.exports=b.inspectSource},44083:(x,k,c)=>{var m=c(57761),w=c(62447),b=c(92548),_=c(20410),A=c(18768),O=c(70716),j=c(4580),$=c(13477),K="Object already initialized",ie=w.TypeError,ee=w.WeakMap,ae,q,V,J=function(U){return V(U)?q(U):ae(U,{})},L=function(U){return function(se){var ne;if(!b(se)||(ne=q(se)).type!==U)throw ie("Incompatible receiver, "+U+" required");return ne}};if(m||O.state){var E=O.state||(O.state=new ee);E.get=E.get,E.has=E.has,E.set=E.set,ae=function(U,se){if(E.has(U))throw ie(K);return se.facade=U,E.set(U,se),se},q=function(U){return E.get(U)||{}},V=function(U){return E.has(U)}}else{var N=j("state");$[N]=!0,ae=function(U,se){if(A(U,N))throw ie(K);return se.facade=U,_(U,N,se),se},q=function(U){return A(U,N)?U[N]:{}},V=function(U){return A(U,N)}}x.exports={set:ae,get:q,has:V,enforce:J,getterFor:L}},93053:(x,k,c)=>{var m=c(58310);x.exports=Array.isArray||function(b){return m(b)=="Array"}},43152:(x,k,c)=>{var m=c(51647),w=m.all;x.exports=m.IS_HTMLDDA?function(b){return typeof b=="function"||b===w}:function(b){return typeof b=="function"}},43455:(x,k,c)=>{var m=c(90406),w=c(31982),b=c(43152),_=c(82059),A=c(97080),O=c(41524),j=function(){},$=[],K=A("Reflect","construct"),ie=/^\s*(?:class|function)\b/,ee=m(ie.exec),ae=!ie.exec(j),q=function(L){if(!b(L))return!1;try{return K(j,$,L),!0}catch(E){return!1}},V=function(L){if(!b(L))return!1;switch(_(L)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(ie,O(L))}catch(E){return!0}};V.sham=!0,x.exports=!K||w(function(){var J;return q(q.call)||!q(Object)||!q(function(){J=!0})||J})?V:q},51585:(x,k,c)=>{var m=c(31982),w=c(43152),b=/#|\.prototype\./,_=function(K,ie){var ee=O[A(K)];return ee==$?!0:ee==j?!1:w(ie)?m(ie):!!ie},A=_.normalize=function(K){return String(K).replace(b,".").toLowerCase()},O=_.data={},j=_.NATIVE="N",$=_.POLYFILL="P";x.exports=_},71365:x=>{x.exports=function(k){return k==null}},92548:(x,k,c)=>{var m=c(43152),w=c(51647),b=w.all;x.exports=w.IS_HTMLDDA?function(_){return typeof _=="object"?_!==null:m(_)||_===b}:function(_){return typeof _=="object"?_!==null:m(_)}},39839:x=>{x.exports=!0},28609:(x,k,c)=>{var m=c(97080),w=c(43152),b=c(15166),_=c(27237),A=Object;x.exports=_?function(O){return typeof O=="symbol"}:function(O){var j=m("Symbol");return w(j)&&b(j.prototype,A(O))}},41709:(x,k,c)=>{"use strict";var m=c(98488).IteratorPrototype,w=c(73270),b=c(54686),_=c(98889),A=c(94609),O=function(){return this};x.exports=function(j,$,K,ie){var ee=$+" Iterator";return j.prototype=w(m,{next:b(+!ie,K)}),_(j,ee,!1,!0),A[ee]=O,j}},78107:(x,k,c)=>{"use strict";var m=c(30080),w=c(12461),b=c(39839),_=c(58100),A=c(43152),O=c(41709),j=c(90851),$=c(70738),K=c(98889),ie=c(20410),ee=c(27519),ae=c(33538),q=c(94609),V=c(98488),J=_.PROPER,L=_.CONFIGURABLE,E=V.IteratorPrototype,N=V.BUGGY_SAFARI_ITERATORS,U=ae("iterator"),se="keys",ne="values",Y="entries",X=function(){return this};x.exports=function(Q,H,de,Ae,Z,xe,ue){O(de,H,Ae);var Ne=function(Ke){if(Ke===Z&&Ye)return Ye;if(!N&&Ke in ze)return ze[Ke];switch(Ke){case se:return function(){return new de(this,Ke)};case ne:return function(){return new de(this,Ke)};case Y:return function(){return new de(this,Ke)}}return function(){return new de(this)}},He=H+" Iterator",Re=!1,ze=Q.prototype,Be=ze[U]||ze["@@iterator"]||Z&&ze[Z],Ye=!N&&Be||Ne(Z),gt=H=="Array"&&ze.entries||Be,ut,yt,lt;if(gt&&(ut=j(gt.call(new Q)),ut!==Object.prototype&&ut.next&&(!b&&j(ut)!==E&&($?$(ut,E):A(ut[U])||ee(ut,U,X)),K(ut,He,!0,!0),b&&(q[He]=X))),J&&Z==ne&&Be&&Be.name!==ne&&(!b&&L?ie(ze,"name",ne):(Re=!0,Ye=function(){return w(Be,this)})),Z)if(yt={values:Ne(ne),keys:xe?Ye:Ne(se),entries:Ne(Y)},ue)for(lt in yt)(N||Re||!(lt in ze))&&ee(ze,lt,yt[lt]);else m({target:H,proto:!0,forced:N||Re},yt);return(!b||ue)&&ze[U]!==Ye&&ee(ze,U,Ye,{name:Z}),q[H]=Ye,yt}},98488:(x,k,c)=>{"use strict";var m=c(31982),w=c(43152),b=c(92548),_=c(73270),A=c(90851),O=c(27519),j=c(33538),$=c(39839),K=j("iterator"),ie=!1,ee,ae,q;[].keys&&(q=[].keys(),"next"in q?(ae=A(A(q)),ae!==Object.prototype&&(ee=ae)):ie=!0);var V=!b(ee)||m(function(){var J={};return ee[K].call(J)!==J});V?ee={}:$&&(ee=_(ee)),w(ee[K])||O(ee,K,function(){return this}),x.exports={IteratorPrototype:ee,BUGGY_SAFARI_ITERATORS:ie}},94609:x=>{x.exports={}},53387:(x,k,c)=>{var m=c(62567);x.exports=function(w){return m(w.length)}},99295:x=>{var k=Math.ceil,c=Math.floor;x.exports=Math.trunc||function(w){var b=+w;return(b>0?c:k)(b)}},73270:(x,k,c)=>{var m=c(35970),w=c(98911),b=c(11792),_=c(13477),A=c(19552),O=c(45511),j=c(4580),$=">",K="<",ie="prototype",ee="script",ae=j("IE_PROTO"),q=function(){},V=function(U){return K+ee+$+U+K+"/"+ee+$},J=function(U){U.write(V("")),U.close();var se=U.parentWindow.Object;return U=null,se},L=function(){var U=O("iframe"),se="java"+ee+":",ne;return U.style.display="none",A.appendChild(U),U.src=String(se),ne=U.contentWindow.document,ne.open(),ne.write(V("document.F=Object")),ne.close(),ne.F},E,N=function(){try{E=new ActiveXObject("htmlfile")}catch(se){}N=typeof document!="undefined"?document.domain&&E?J(E):L():J(E);for(var U=b.length;U--;)delete N[ie][b[U]];return N()};_[ae]=!0,x.exports=Object.create||function(se,ne){var Y;return se!==null?(q[ie]=m(se),Y=new q,q[ie]=null,Y[ae]=se):Y=N(),ne===void 0?Y:w.f(Y,ne)}},98911:(x,k,c)=>{var m=c(56049),w=c(98715),b=c(36133),_=c(35970),A=c(88966),O=c(16619);k.f=m&&!w?Object.defineProperties:function($,K){_($);for(var ie=A(K),ee=O(K),ae=ee.length,q=0,V;ae>q;)b.f($,V=ee[q++],ie[V]);return $}},36133:(x,k,c)=>{var m=c(56049),w=c(11314),b=c(98715),_=c(35970),A=c(5135),O=TypeError,j=Object.defineProperty,$=Object.getOwnPropertyDescriptor,K="enumerable",ie="configurable",ee="writable";k.f=m?b?function(q,V,J){if(_(q),V=A(V),_(J),typeof q=="function"&&V==="prototype"&&"value"in J&&ee in J&&!J[ee]){var L=$(q,V);L&&L[ee]&&(q[V]=J.value,J={configurable:ie in J?J[ie]:L[ie],enumerable:K in J?J[K]:L[K],writable:!1})}return j(q,V,J)}:j:function(q,V,J){if(_(q),V=A(V),_(J),w)try{return j(q,V,J)}catch(L){}if("get"in J||"set"in J)throw O("Accessors not supported");return"value"in J&&(q[V]=J.value),q}},80016:(x,k,c)=>{var m=c(56049),w=c(12461),b=c(16457),_=c(54686),A=c(88966),O=c(5135),j=c(18768),$=c(11314),K=Object.getOwnPropertyDescriptor;k.f=m?K:function(ee,ae){if(ee=A(ee),ae=O(ae),$)try{return K(ee,ae)}catch(q){}if(j(ee,ae))return _(!w(b.f,ee,ae),ee[ae])}},53515:(x,k,c)=>{var m=c(58310),w=c(88966),b=c(51203).f,_=c(67932),A=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],O=function(j){try{return b(j)}catch($){return _(A)}};x.exports.f=function($){return A&&m($)=="Window"?O($):b(w($))}},51203:(x,k,c)=>{var m=c(4541),w=c(11792),b=w.concat("length","prototype");k.f=Object.getOwnPropertyNames||function(A){return m(A,b)}},97620:(x,k)=>{k.f=Object.getOwnPropertySymbols},90851:(x,k,c)=>{var m=c(18768),w=c(43152),b=c(53254),_=c(4580),A=c(74838),O=_("IE_PROTO"),j=Object,$=j.prototype;x.exports=A?j.getPrototypeOf:function(K){var ie=b(K);if(m(ie,O))return ie[O];var ee=ie.constructor;return w(ee)&&ie instanceof ee?ee.prototype:ie instanceof j?$:null}},15166:(x,k,c)=>{var m=c(90406);x.exports=m({}.isPrototypeOf)},4541:(x,k,c)=>{var m=c(90406),w=c(18768),b=c(88966),_=c(66322).indexOf,A=c(13477),O=m([].push);x.exports=function(j,$){var K=b(j),ie=0,ee=[],ae;for(ae in K)!w(A,ae)&&w(K,ae)&&O(ee,ae);for(;$.length>ie;)w(K,ae=$[ie++])&&(~_(ee,ae)||O(ee,ae));return ee}},16619:(x,k,c)=>{var m=c(4541),w=c(11792);x.exports=Object.keys||function(_){return m(_,w)}},16457:(x,k)=>{"use strict";var c={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,w=m&&!c.call({1:2},1);k.f=w?function(_){var A=m(this,_);return!!A&&A.enumerable}:c},70738:(x,k,c)=>{var m=c(54518),w=c(35970),b=c(72185);x.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _=!1,A={},O;try{O=m(Object.prototype,"__proto__","set"),O(A,[]),_=A instanceof Array}catch(j){}return function($,K){return w($),b(K),_?O($,K):$.__proto__=K,$}}():void 0)},68399:(x,k,c)=>{"use strict";var m=c(48448),w=c(82059);x.exports=m?{}.toString:function(){return"[object "+w(this)+"]"}},96380:(x,k,c)=>{var m=c(12461),w=c(43152),b=c(92548),_=TypeError;x.exports=function(A,O){var j,$;if(O==="string"&&w(j=A.toString)&&!b($=m(j,A))||w(j=A.valueOf)&&!b($=m(j,A))||O!=="string"&&w(j=A.toString)&&!b($=m(j,A)))return $;throw _("Can't convert object to primitive value")}},67349:(x,k,c)=>{var m=c(97080),w=c(90406),b=c(51203),_=c(97620),A=c(35970),O=w([].concat);x.exports=m("Reflect","ownKeys")||function($){var K=b.f(A($)),ie=_.f;return ie?O(K,ie($)):K}},59921:x=>{x.exports={}},31251:(x,k,c)=>{var m=c(71365),w=TypeError;x.exports=function(b){if(m(b))throw w("Can't call method on "+b);return b}},98889:(x,k,c)=>{var m=c(48448),w=c(36133).f,b=c(20410),_=c(18768),A=c(68399),O=c(33538),j=O("toStringTag");x.exports=function($,K,ie,ee){if($){var ae=ie?$:$.prototype;_(ae,j)||w(ae,j,{configurable:!0,value:K}),ee&&!m&&b(ae,"toString",A)}}},4580:(x,k,c)=>{var m=c(95976),w=c(91248),b=m("keys");x.exports=function(_){return b[_]||(b[_]=w(_))}},70716:(x,k,c)=>{var m=c(62447),w=c(9267),b="__core-js_shared__",_=m[b]||w(b,{});x.exports=_},95976:(x,k,c)=>{var m=c(39839),w=c(70716);(x.exports=function(b,_){return w[b]||(w[b]=_!==void 0?_:{})})("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:(x,k,c)=>{var m=c(90406),w=c(32041),b=c(46025),_=c(31251),A=m("".charAt),O=m("".charCodeAt),j=m("".slice),$=function(K){return function(ie,ee){var ae=b(_(ie)),q=w(ee),V=ae.length,J,L;return q<0||q>=V?K?"":void 0:(J=O(ae,q),J<55296||J>56319||q+1===V||(L=O(ae,q+1))<56320||L>57343?K?A(ae,q):J:K?j(ae,q,q+2):(J-55296<<10)+(L-56320)+65536)}};x.exports={codeAt:$(!1),charAt:$(!0)}},71775:(x,k,c)=>{var m=c(32438),w=c(31982);x.exports=!!Object.getOwnPropertySymbols&&!w(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&m&&m<41})},95679:(x,k,c)=>{var m=c(12461),w=c(97080),b=c(33538),_=c(27519);x.exports=function(){var A=w("Symbol"),O=A&&A.prototype,j=O&&O.valueOf,$=b("toPrimitive");O&&!O[$]&&_(O,$,function(K){return m(j,this)},{arity:1})}},82294:(x,k,c)=>{var m=c(71775);x.exports=m&&!!Symbol.for&&!!Symbol.keyFor},13249:(x,k,c)=>{var m=c(32041),w=Math.max,b=Math.min;x.exports=function(_,A){var O=m(_);return O<0?w(O+A,0):b(O,A)}},88966:(x,k,c)=>{var m=c(38622),w=c(31251);x.exports=function(b){return m(w(b))}},32041:(x,k,c)=>{var m=c(99295);x.exports=function(w){var b=+w;return b!==b||b===0?0:m(b)}},62567:(x,k,c)=>{var m=c(32041),w=Math.min;x.exports=function(b){return b>0?w(m(b),9007199254740991):0}},53254:(x,k,c)=>{var m=c(31251),w=Object;x.exports=function(b){return w(m(b))}},37505:(x,k,c)=>{var m=c(12461),w=c(92548),b=c(28609),_=c(27529),A=c(96380),O=c(33538),j=TypeError,$=O("toPrimitive");x.exports=function(K,ie){if(!w(K)||b(K))return K;var ee=_(K,$),ae;if(ee){if(ie===void 0&&(ie="default"),ae=m(ee,K,ie),!w(ae)||b(ae))return ae;throw j("Can't convert object to primitive value")}return ie===void 0&&(ie="number"),A(K,ie)}},5135:(x,k,c)=>{var m=c(37505),w=c(28609);x.exports=function(b){var _=m(b,"string");return w(_)?_:_+""}},48448:(x,k,c)=>{var m=c(33538),w=m("toStringTag"),b={};b[w]="z",x.exports=String(b)==="[object z]"},46025:(x,k,c)=>{var m=c(82059),w=String;x.exports=function(b){if(m(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return w(b)}},18342:x=>{var k=String;x.exports=function(c){try{return k(c)}catch(m){return"Object"}}},91248:(x,k,c)=>{var m=c(90406),w=0,b=Math.random(),_=m(1 .toString);x.exports=function(A){return"Symbol("+(A===void 0?"":A)+")_"+_(++w+b,36)}},27237:(x,k,c)=>{var m=c(71775);x.exports=m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(x,k,c)=>{var m=c(56049),w=c(31982);x.exports=m&&w(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(x,k,c)=>{var m=c(62447),w=c(43152),b=m.WeakMap;x.exports=w(b)&&/native code/.test(String(b))},64832:(x,k,c)=>{var m=c(59921),w=c(18768),b=c(39378),_=c(36133).f;x.exports=function(A){var O=m.Symbol||(m.Symbol={});w(O,A)||_(O,A,{value:b.f(A)})}},39378:(x,k,c)=>{var m=c(33538);k.f=m},33538:(x,k,c)=>{var m=c(62447),w=c(95976),b=c(18768),_=c(91248),A=c(71775),O=c(27237),j=m.Symbol,$=w("wks"),K=O?j.for||j:j&&j.withoutSetter||_;x.exports=function(ie){return b($,ie)||($[ie]=A&&b(j,ie)?j[ie]:K("Symbol."+ie)),$[ie]}},69825:(x,k,c)=>{"use strict";var m=c(30080),w=c(31982),b=c(93053),_=c(92548),A=c(53254),O=c(53387),j=c(11452),$=c(53437),K=c(69573),ie=c(36844),ee=c(33538),ae=c(32438),q=ee("isConcatSpreadable"),V=ae>=51||!w(function(){var E=[];return E[q]=!1,E.concat()[0]!==E}),J=function(E){if(!_(E))return!1;var N=E[q];return N!==void 0?!!N:b(E)},L=!V||!ie("concat");m({target:"Array",proto:!0,arity:1,forced:L},{concat:function(N){var U=A(this),se=K(U,0),ne=0,Y,X,Q,H,de;for(Y=-1,Q=arguments.length;Y<Q;Y++)if(de=Y===-1?U:arguments[Y],J(de))for(H=O(de),j(ne+H),X=0;X<H;X++,ne++)X in de&&$(se,ne,de[X]);else j(ne+1),$(se,ne++,de);return se.length=ne,se}})},17802:(x,k,c)=>{"use strict";var m=c(30080),w=c(93935).filter,b=c(36844),_=b("filter");m({target:"Array",proto:!0,forced:!_},{filter:function(O){return w(this,O,arguments.length>1?arguments[1]:void 0)}})},64009:(x,k,c)=>{"use strict";var m=c(30080),w=c(24782);m({target:"Array",proto:!0,forced:[].forEach!=w},{forEach:w})},32449:(x,k,c)=>{"use strict";var m=c(30080),w=c(57953),b=c(66322).indexOf,_=c(10454),A=w([].indexOf),O=!!A&&1/A([1],1,-0)<0,j=O||!_("indexOf");m({target:"Array",proto:!0,forced:j},{indexOf:function(K){var ie=arguments.length>1?arguments[1]:void 0;return O?A(this,K,ie)||0:b(this,K,ie)}})},44390:(x,k,c)=>{"use strict";var m=c(88966),w=c(20844),b=c(94609),_=c(44083),A=c(36133).f,O=c(78107),j=c(10248),$=c(39839),K=c(56049),ie="Array Iterator",ee=_.set,ae=_.getterFor(ie);x.exports=O(Array,"Array",function(V,J){ee(this,{type:ie,target:m(V),index:0,kind:J})},function(){var V=ae(this),J=V.target,L=V.kind,E=V.index++;return!J||E>=J.length?(V.target=void 0,j(void 0,!0)):L=="keys"?j(E,!1):L=="values"?j(J[E],!1):j([E,J[E]],!1)},"values");var q=b.Arguments=b.Array;if(w("keys"),w("values"),w("entries"),!$&&K&&q.name!=="values")try{A(q,"name",{value:"values"})}catch(V){}},91667:()=>{},39306:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(82768),_=c(12461),A=c(90406),O=c(31982),j=c(43152),$=c(28609),K=c(53160),ie=c(82850),ee=c(71775),ae=String,q=w("JSON","stringify"),V=A(/./.exec),J=A("".charAt),L=A("".charCodeAt),E=A("".replace),N=A(1 .toString),U=/[\uD800-\uDFFF]/g,se=/^[\uD800-\uDBFF]$/,ne=/^[\uDC00-\uDFFF]$/,Y=!ee||O(function(){var de=w("Symbol")();return q([de])!="[null]"||q({a:de})!="{}"||q(Object(de))!="{}"}),X=O(function(){return q("\uDF06\uD834")!=='"\\udf06\\ud834"'||q("\uDEAD")!=='"\\udead"'}),Q=function(de,Ae){var Z=K(arguments),xe=ie(Ae);if(!(!j(xe)&&(de===void 0||$(de))))return Z[1]=function(ue,Ne){if(j(xe)&&(Ne=_(xe,this,ae(ue),Ne)),!$(Ne))return Ne},b(q,null,Z)},H=function(de,Ae,Z){var xe=J(Z,Ae-1),ue=J(Z,Ae+1);return V(se,de)&&!V(ne,ue)||V(ne,de)&&!V(se,xe)?"\\u"+N(L(de,0),16):de};q&&m({target:"JSON",stat:!0,arity:3,forced:Y||X},{stringify:function(Ae,Z,xe){var ue=K(arguments),Ne=b(Y?Q:q,null,ue);return X&&typeof Ne=="string"?E(Ne,U,H):Ne}})},23870:(x,k,c)=>{var m=c(62447),w=c(98889);w(m.JSON,"JSON",!0)},5828:()=>{},28135:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(98911).f;m({target:"Object",stat:!0,forced:Object.defineProperties!==b,sham:!w},{defineProperties:b})},70829:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(36133).f;m({target:"Object",stat:!0,forced:Object.defineProperty!==b,sham:!w},{defineProperty:b})},51964:(x,k,c)=>{var m=c(30080),w=c(31982),b=c(88966),_=c(80016).f,A=c(56049),O=!A||w(function(){_(1)});m({target:"Object",stat:!0,forced:O,sham:!A},{getOwnPropertyDescriptor:function($,K){return _(b($),K)}})},723:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(67349),_=c(88966),A=c(80016),O=c(53437);m({target:"Object",stat:!0,sham:!w},{getOwnPropertyDescriptors:function($){for(var K=_($),ie=A.f,ee=b(K),ae={},q=0,V,J;ee.length>q;)J=ie(K,V=ee[q++]),J!==void 0&&O(ae,V,J);return ae}})},86884:(x,k,c)=>{var m=c(30080),w=c(71775),b=c(31982),_=c(97620),A=c(53254),O=!w||b(function(){_.f(1)});m({target:"Object",stat:!0,forced:O},{getOwnPropertySymbols:function($){var K=_.f;return K?K(A($)):[]}})},38339:(x,k,c)=>{var m=c(30080),w=c(53254),b=c(16619),_=c(31982),A=_(function(){b(1)});m({target:"Object",stat:!0,forced:A},{keys:function(j){return b(w(j))}})},97829:()=>{},5708:()=>{},27626:(x,k,c)=>{"use strict";var m=c(18143).charAt,w=c(46025),b=c(44083),_=c(78107),A=c(10248),O="String Iterator",j=b.set,$=b.getterFor(O);_(String,"String",function(K){j(this,{type:O,string:w(K),index:0})},function(){var ie=$(this),ee=ie.string,ae=ie.index,q;return ae>=ee.length?A(void 0,!0):(q=m(ee,ae),ie.index+=q.length,A(q,!1))})},95353:(x,k,c)=>{var m=c(64832);m("asyncIterator")},16212:(x,k,c)=>{"use strict";var m=c(30080),w=c(62447),b=c(12461),_=c(90406),A=c(39839),O=c(56049),j=c(71775),$=c(31982),K=c(18768),ie=c(15166),ee=c(35970),ae=c(88966),q=c(5135),V=c(46025),J=c(54686),L=c(73270),E=c(16619),N=c(51203),U=c(53515),se=c(97620),ne=c(80016),Y=c(36133),X=c(98911),Q=c(16457),H=c(27519),de=c(37912),Ae=c(95976),Z=c(4580),xe=c(13477),ue=c(91248),Ne=c(33538),He=c(39378),Re=c(64832),ze=c(95679),Be=c(98889),Ye=c(44083),gt=c(93935).forEach,ut=Z("hidden"),yt="Symbol",lt="prototype",Ke=Ye.set,Fe=Ye.getterFor(yt),qe=Object[lt],bt=w.Symbol,Lt=bt&&bt[lt],Rt=w.TypeError,zt=w.QObject,kr=ne.f,jr=Y.f,qr=U.f,ht=Q.f,$t=_([].push),nr=Ae("symbols"),er=Ae("op-symbols"),kn=Ae("wks"),ki=!zt||!zt[lt]||!zt[lt].findChild,Wn=O&&$(function(){return L(jr({},"a",{get:function(){return jr(this,"a",{value:7}).a}})).a!=7})?function(Ft,At,mt){var Tt=kr(qe,At);Tt&&delete qe[At],jr(Ft,At,mt),Tt&&Ft!==qe&&jr(qe,At,Tt)}:jr,Hn=function(Ft,At){var mt=nr[Ft]=L(Lt);return Ke(mt,{type:yt,tag:Ft,description:At}),O||(mt.description=At),mt},ei=function(At,mt,Tt){At===qe&&ei(er,mt,Tt),ee(At);var pe=q(mt);return ee(Tt),K(nr,pe)?(Tt.enumerable?(K(At,ut)&&At[ut][pe]&&(At[ut][pe]=!1),Tt=L(Tt,{enumerable:J(0,!1)})):(K(At,ut)||jr(At,ut,J(1,{})),At[ut][pe]=!0),Wn(At,pe,Tt)):jr(At,pe,Tt)},ji=function(At,mt){ee(At);var Tt=ae(mt),pe=E(Tt).concat(fr(Tt));return gt(pe,function(Pe){(!O||b(jn,Tt,Pe))&&ei(At,Pe,Tt[Pe])}),At},vi=function(At,mt){return mt===void 0?L(At):ji(L(At),mt)},jn=function(At){var mt=q(At),Tt=b(ht,this,mt);return this===qe&&K(nr,mt)&&!K(er,mt)?!1:Tt||!K(this,mt)||!K(nr,mt)||K(this,ut)&&this[ut][mt]?Tt:!0},mn=function(At,mt){var Tt=ae(At),pe=q(mt);if(!(Tt===qe&&K(nr,pe)&&!K(er,pe))){var Pe=kr(Tt,pe);return Pe&&K(nr,pe)&&!(K(Tt,ut)&&Tt[ut][pe])&&(Pe.enumerable=!0),Pe}},vn=function(At){var mt=qr(ae(At)),Tt=[];return gt(mt,function(pe){!K(nr,pe)&&!K(xe,pe)&&$t(Tt,pe)}),Tt},fr=function(Ft){var At=Ft===qe,mt=qr(At?er:ae(Ft)),Tt=[];return gt(mt,function(pe){K(nr,pe)&&(!At||K(qe,pe))&&$t(Tt,nr[pe])}),Tt};j||(bt=function(){if(ie(Lt,this))throw Rt("Symbol is not a constructor");var At=!arguments.length||arguments[0]===void 0?void 0:V(arguments[0]),mt=ue(At),Tt=function(pe){this===qe&&b(Tt,er,pe),K(this,ut)&&K(this[ut],mt)&&(this[ut][mt]=!1),Wn(this,mt,J(1,pe))};return O&&ki&&Wn(qe,mt,{configurable:!0,set:Tt}),Hn(mt,At)},Lt=bt[lt],H(Lt,"toString",function(){return Fe(this).tag}),H(bt,"withoutSetter",function(Ft){return Hn(ue(Ft),Ft)}),Q.f=jn,Y.f=ei,X.f=ji,ne.f=mn,N.f=U.f=vn,se.f=fr,He.f=function(Ft){return Hn(Ne(Ft),Ft)},O&&(de(Lt,"description",{configurable:!0,get:function(){return Fe(this).description}}),A||H(qe,"propertyIsEnumerable",jn,{unsafe:!0}))),m({global:!0,constructor:!0,wrap:!0,forced:!j,sham:!j},{Symbol:bt}),gt(E(kn),function(Ft){Re(Ft)}),m({target:yt,stat:!0,forced:!j},{useSetter:function(){ki=!0},useSimple:function(){ki=!1}}),m({target:"Object",stat:!0,forced:!j,sham:!O},{create:vi,defineProperty:ei,defineProperties:ji,getOwnPropertyDescriptor:mn}),m({target:"Object",stat:!0,forced:!j},{getOwnPropertyNames:vn}),ze(),Be(bt,yt),xe[ut]=!0},63906:()=>{},3598:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(18768),_=c(46025),A=c(95976),O=c(82294),j=A("string-to-symbol-registry"),$=A("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!O},{for:function(K){var ie=_(K);if(b(j,ie))return j[ie];var ee=w("Symbol")(ie);return j[ie]=ee,$[ee]=ie,ee}})},39542:(x,k,c)=>{var m=c(64832);m("hasInstance")},47882:(x,k,c)=>{var m=c(64832);m("isConcatSpreadable")},84911:(x,k,c)=>{var m=c(64832);m("iterator")},68030:(x,k,c)=>{c(16212),c(3598),c(50338),c(39306),c(86884)},50338:(x,k,c)=>{var m=c(30080),w=c(18768),b=c(28609),_=c(18342),A=c(95976),O=c(82294),j=A("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!O},{keyFor:function(K){if(!b(K))throw TypeError(_(K)+" is not a symbol");if(w(j,K))return j[K]}})},47954:(x,k,c)=>{var m=c(64832);m("matchAll")},88725:(x,k,c)=>{var m=c(64832);m("match")},67703:(x,k,c)=>{var m=c(64832);m("replace")},2220:(x,k,c)=>{var m=c(64832);m("search")},48990:(x,k,c)=>{var m=c(64832);m("species")},50240:(x,k,c)=>{var m=c(64832);m("split")},99921:(x,k,c)=>{var m=c(64832),w=c(95679);m("toPrimitive"),w()},3502:(x,k,c)=>{var m=c(97080),w=c(64832),b=c(98889);w("toStringTag"),b(m("Symbol"),"Symbol")},80220:(x,k,c)=>{var m=c(64832);m("unscopables")},45987:(x,k,c)=>{var m=c(64832);m("asyncDispose")},42319:(x,k,c)=>{var m=c(64832);m("dispose")},58052:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(90406),_=w("Symbol"),A=_.keyFor,O=b(_.prototype.valueOf);m({target:"Symbol",stat:!0},{isRegistered:function($){try{return A(O($))!==void 0}catch(K){return!1}}})},90181:(x,k,c)=>{for(var m=c(30080),w=c(95976),b=c(97080),_=c(90406),A=c(28609),O=c(33538),j=b("Symbol"),$=j.isWellKnown,K=b("Object","getOwnPropertyNames"),ie=_(j.prototype.valueOf),ee=w("wks"),ae=0,q=K(j),V=q.length;ae<V;ae++)try{var J=q[ae];A(j[J])&&O(J)}catch(L){}m({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(E){if($&&$(E))return!0;try{for(var N=ie(E),U=0,se=K(ee),ne=se.length;U<ne;U++)if(ee[se[U]]==N)return!0}catch(Y){}return!1}})},25129:(x,k,c)=>{var m=c(64832);m("matcher")},90397:(x,k,c)=>{var m=c(64832);m("metadataKey")},82793:(x,k,c)=>{var m=c(64832);m("metadata")},18097:(x,k,c)=>{var m=c(64832);m("observable")},67574:(x,k,c)=>{var m=c(64832);m("patternMatch")},20122:(x,k,c)=>{var m=c(64832);m("replaceAll")},48713:(x,k,c)=>{c(44390);var m=c(81595),w=c(62447),b=c(82059),_=c(20410),A=c(94609),O=c(33538),j=O("toStringTag");for(var $ in m){var K=w[$],ie=K&&K.prototype;ie&&b(ie)!==j&&_(ie,j,$),A[$]=A.Array}},41544:(x,k,c)=>{var m=c(94537);x.exports=m},44928:(x,k,c)=>{var m=c(55794);x.exports=m},26087:(x,k,c)=>{c(48713);var m=c(82059),w=c(18768),b=c(15166),_=c(41544),A=Array.prototype,O={DOMTokenList:!0,NodeList:!0};x.exports=function(j){var $=j.forEach;return j===A||b(A,j)&&$===A.forEach||w(O,m(j))?_:$}},11783:(x,k,c)=>{var m=c(85838);x.exports=m},88462:(x,k,c)=>{var m=c(95617);x.exports=m},83531:(x,k,c)=>{var m=c(11906);x.exports=m},19941:(x,k,c)=>{var m=c(59123);x.exports=m},25081:(x,k,c)=>{var m=c(63332);x.exports=m},22145:(x,k,c)=>{var m=c(83606);x.exports=m},93690:(x,k,c)=>{var m=c(90660);x.exports=m},8429:(x,k,c)=>{var m=c(49198);c(48713),x.exports=m},13099:(x,k,c)=>{var m=c(15413);c(48713),x.exports=m},44931:(x,k,c)=>{var m=c(4793);x.exports=m},81933:function(){(function(x){var k=function(c){var m={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(Q){return!1}}(),formData:"FormData"in x,arrayBuffer:"ArrayBuffer"in x};function w(Q){return Q&&DataView.prototype.isPrototypeOf(Q)}if(m.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=ArrayBuffer.isView||function(Q){return Q&&b.indexOf(Object.prototype.toString.call(Q))>-1};function A(Q){if(typeof Q!="string"&&(Q=String(Q)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Q))throw new TypeError("Invalid character in header field name");return Q.toLowerCase()}function O(Q){return typeof Q!="string"&&(Q=String(Q)),Q}function j(Q){var H={next:function(){var de=Q.shift();return{done:de===void 0,value:de}}};return m.iterable&&(H[Symbol.iterator]=function(){return H}),H}function $(Q){this.map={},Q instanceof $?Q.forEach(function(H,de){this.append(de,H)},this):Array.isArray(Q)?Q.forEach(function(H){this.append(H[0],H[1])},this):Q&&Object.getOwnPropertyNames(Q).forEach(function(H){this.append(H,Q[H])},this)}$.prototype.append=function(Q,H){Q=A(Q),H=O(H);var de=this.map[Q];this.map[Q]=de?de+", "+H:H},$.prototype.delete=function(Q){delete this.map[A(Q)]},$.prototype.get=function(Q){return Q=A(Q),this.has(Q)?this.map[Q]:null},$.prototype.has=function(Q){return this.map.hasOwnProperty(A(Q))},$.prototype.set=function(Q,H){this.map[A(Q)]=O(H)},$.prototype.forEach=function(Q,H){for(var de in this.map)this.map.hasOwnProperty(de)&&Q.call(H,this.map[de],de,this)},$.prototype.keys=function(){var Q=[];return this.forEach(function(H,de){Q.push(de)}),j(Q)},$.prototype.values=function(){var Q=[];return this.forEach(function(H){Q.push(H)}),j(Q)},$.prototype.entries=function(){var Q=[];return this.forEach(function(H,de){Q.push([de,H])}),j(Q)},m.iterable&&($.prototype[Symbol.iterator]=$.prototype.entries);function K(Q){if(Q.bodyUsed)return Promise.reject(new TypeError("Already read"));Q.bodyUsed=!0}function ie(Q){return new Promise(function(H,de){Q.onload=function(){H(Q.result)},Q.onerror=function(){de(Q.error)}})}function ee(Q){var H=new FileReader,de=ie(H);return H.readAsArrayBuffer(Q),de}function ae(Q){var H=new FileReader,de=ie(H);return H.readAsText(Q),de}function q(Q){for(var H=new Uint8Array(Q),de=new Array(H.length),Ae=0;Ae<H.length;Ae++)de[Ae]=String.fromCharCode(H[Ae]);return de.join("")}function V(Q){if(Q.slice)return Q.slice(0);var H=new Uint8Array(Q.byteLength);return H.set(new Uint8Array(Q)),H.buffer}function J(){return this.bodyUsed=!1,this._initBody=function(Q){this._bodyInit=Q,Q?typeof Q=="string"?this._bodyText=Q:m.blob&&Blob.prototype.isPrototypeOf(Q)?this._bodyBlob=Q:m.formData&&FormData.prototype.isPrototypeOf(Q)?this._bodyFormData=Q:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(Q)?this._bodyText=Q.toString():m.arrayBuffer&&m.blob&&w(Q)?(this._bodyArrayBuffer=V(Q.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Q)||_(Q))?this._bodyArrayBuffer=V(Q):this._bodyText=Q=Object.prototype.toString.call(Q):this._bodyText="",this.headers.get("content-type")||(typeof Q=="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(Q)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var Q=K(this);if(Q)return Q;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?K(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(ee)}),this.text=function(){var Q=K(this);if(Q)return Q;if(this._bodyBlob)return ae(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(q(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(U)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(Q){var H=Q.toUpperCase();return L.indexOf(H)>-1?H:Q}function N(Q,H){H=H||{};var de=H.body;if(Q instanceof N){if(Q.bodyUsed)throw new TypeError("Already read");this.url=Q.url,this.credentials=Q.credentials,H.headers||(this.headers=new $(Q.headers)),this.method=Q.method,this.mode=Q.mode,this.signal=Q.signal,!de&&Q._bodyInit!=null&&(de=Q._bodyInit,Q.bodyUsed=!0)}else this.url=String(Q);if(this.credentials=H.credentials||this.credentials||"same-origin",(H.headers||!this.headers)&&(this.headers=new $(H.headers)),this.method=E(H.method||this.method||"GET"),this.mode=H.mode||this.mode||null,this.signal=H.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&de)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(de)}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function U(Q){var H=new FormData;return Q.trim().split("&").forEach(function(de){if(de){var Ae=de.split("="),Z=Ae.shift().replace(/\+/g," "),xe=Ae.join("=").replace(/\+/g," ");H.append(decodeURIComponent(Z),decodeURIComponent(xe))}}),H}function se(Q){var H=new $,de=Q.replace(/\r?\n[\t ]+/g," ");return de.split(/\r?\n/).forEach(function(Ae){var Z=Ae.split(":"),xe=Z.shift().trim();if(xe){var ue=Z.join(":").trim();H.append(xe,ue)}}),H}J.call(N.prototype);function ne(Q,H){H||(H={}),this.type="default",this.status=H.status===void 0?200:H.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in H?H.statusText:"OK",this.headers=new $(H.headers),this.url=H.url||"",this._initBody(Q)}J.call(ne.prototype),ne.prototype.clone=function(){return new ne(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new $(this.headers),url:this.url})},ne.error=function(){var Q=new ne(null,{status:0,statusText:""});return Q.type="error",Q};var Y=[301,302,303,307,308];ne.redirect=function(Q,H){if(Y.indexOf(H)===-1)throw new RangeError("Invalid status code");return new ne(null,{status:H,headers:{location:Q}})},c.DOMException=x.DOMException;try{new c.DOMException}catch(Q){c.DOMException=function(H,de){this.message=H,this.name=de;var Ae=Error(H);this.stack=Ae.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function X(Q,H){return new Promise(function(de,Ae){var Z=new N(Q,H);if(Z.signal&&Z.signal.aborted)return Ae(new c.DOMException("Aborted","AbortError"));var xe=new XMLHttpRequest;function ue(){xe.abort()}xe.onload=function(){var Ne={status:xe.status,statusText:xe.statusText,headers:se(xe.getAllResponseHeaders()||"")};Ne.url="responseURL"in xe?xe.responseURL:Ne.headers.get("X-Request-URL");var He="response"in xe?xe.response:xe.responseText;de(new ne(He,Ne))},xe.onerror=function(){Ae(new TypeError("Network request failed"))},xe.ontimeout=function(){Ae(new TypeError("Network request failed"))},xe.onabort=function(){Ae(new c.DOMException("Aborted","AbortError"))},xe.open(Z.method,Z.url,!0),Z.credentials==="include"?xe.withCredentials=!0:Z.credentials==="omit"&&(xe.withCredentials=!1),"responseType"in xe&&m.blob&&(xe.responseType="blob"),Z.headers.forEach(function(Ne,He){xe.setRequestHeader(He,Ne)}),Z.signal&&(Z.signal.addEventListener("abort",ue),xe.onreadystatechange=function(){xe.readyState===4&&Z.signal.removeEventListener("abort",ue)}),xe.send(typeof Z._bodyInit=="undefined"?null:Z._bodyInit)})}return X.polyfill=!0,x.fetch||(x.fetch=X,x.Headers=$,x.Request=N,x.Response=ne),c.Headers=$,c.Request=N,c.Response=ne,c.fetch=X,Object.defineProperty(c,"__esModule",{value:!0}),c}({})})(typeof self!="undefined"?self:this)},58988:(x,k,c)=>{"use strict";c.r(k),c.d(k,{default:()=>O});var m=c(82163),w=c.n(m),b=c(85590),_=c.n(b),A=_()(w());A.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}
41
+ */k.parse=w,k.serialize=b;var c=Object.prototype.toString,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function w($,K){if(typeof $!="string")throw new TypeError("argument str must be a string");for(var ie={},ee=K||{},ae=ee.decode||_,q=0;q<$.length;){var V=$.indexOf("=",q);if(V===-1)break;var J=$.indexOf(";",q);if(J===-1)J=$.length;else if(J<V){q=$.lastIndexOf(";",V-1)+1;continue}var L=$.slice(q,V).trim();if(ie[L]===void 0){var E=$.slice(V+1,J).trim();E.charCodeAt(0)===34&&(E=E.slice(1,-1)),ie[L]=j(E,ae)}q=J+1}return ie}function b($,K,ie){var ee=ie||{},ae=ee.encode||A;if(typeof ae!="function")throw new TypeError("option encode is invalid");if(!m.test($))throw new TypeError("argument name is invalid");var q=ae(K);if(q&&!m.test(q))throw new TypeError("argument val is invalid");var V=$+"="+q;if(ee.maxAge!=null){var J=ee.maxAge-0;if(isNaN(J)||!isFinite(J))throw new TypeError("option maxAge is invalid");V+="; Max-Age="+Math.floor(J)}if(ee.domain){if(!m.test(ee.domain))throw new TypeError("option domain is invalid");V+="; Domain="+ee.domain}if(ee.path){if(!m.test(ee.path))throw new TypeError("option path is invalid");V+="; Path="+ee.path}if(ee.expires){var L=ee.expires;if(!O(L)||isNaN(L.valueOf()))throw new TypeError("option expires is invalid");V+="; Expires="+L.toUTCString()}if(ee.httpOnly&&(V+="; HttpOnly"),ee.secure&&(V+="; Secure"),ee.priority){var E=typeof ee.priority=="string"?ee.priority.toLowerCase():ee.priority;switch(E){case"low":V+="; Priority=Low";break;case"medium":V+="; Priority=Medium";break;case"high":V+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(ee.sameSite){var N=typeof ee.sameSite=="string"?ee.sameSite.toLowerCase():ee.sameSite;switch(N){case!0:V+="; SameSite=Strict";break;case"lax":V+="; SameSite=Lax";break;case"strict":V+="; SameSite=Strict";break;case"none":V+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return V}function _($){return $.indexOf("%")!==-1?decodeURIComponent($):$}function A($){return encodeURIComponent($)}function O($){return c.call($)==="[object Date]"||$ instanceof Date}function j($,K){try{return K($)}catch(ie){return $}}},97529:(x,k,c)=>{var m=c(44928);x.exports=m},75342:(x,k,c)=>{var m=c(26087);x.exports=m},64218:(x,k,c)=>{var m=c(11783);x.exports=m},95050:(x,k,c)=>{var m=c(88462);x.exports=m},84779:(x,k,c)=>{var m=c(83531);x.exports=m},17190:(x,k,c)=>{var m=c(19941);x.exports=m},96589:(x,k,c)=>{var m=c(25081);x.exports=m},32276:(x,k,c)=>{var m=c(22145);x.exports=m},15064:(x,k,c)=>{var m=c(93690);x.exports=m},31986:(x,k,c)=>{var m=c(8429);c(42319),x.exports=m},69635:(x,k,c)=>{var m=c(13099);x.exports=m},3529:(x,k,c)=>{var m=c(44931);x.exports=m},85373:(x,k,c)=>{c(17802);var m=c(70291);x.exports=m("Array").filter},94537:(x,k,c)=>{c(64009);var m=c(70291);x.exports=m("Array").forEach},27794:(x,k,c)=>{c(32449);var m=c(70291);x.exports=m("Array").indexOf},55794:(x,k,c)=>{var m=c(15166),w=c(85373),b=Array.prototype;x.exports=function(_){var A=_.filter;return _===b||m(b,_)&&A===b.filter?w:A}},85838:(x,k,c)=>{var m=c(15166),w=c(27794),b=Array.prototype;x.exports=function(_){var A=_.indexOf;return _===b||m(b,_)&&A===b.indexOf?w:A}},95617:(x,k,c)=>{c(28135);var m=c(59921),w=m.Object,b=x.exports=function(A,O){return w.defineProperties(A,O)};w.defineProperties.sham&&(b.sham=!0)},11906:(x,k,c)=>{c(70829);var m=c(59921),w=m.Object,b=x.exports=function(A,O,j){return w.defineProperty(A,O,j)};w.defineProperty.sham&&(b.sham=!0)},59123:(x,k,c)=>{c(51964);var m=c(59921),w=m.Object,b=x.exports=function(A,O){return w.getOwnPropertyDescriptor(A,O)};w.getOwnPropertyDescriptor.sham&&(b.sham=!0)},63332:(x,k,c)=>{c(723);var m=c(59921);x.exports=m.Object.getOwnPropertyDescriptors},83606:(x,k,c)=>{c(68030);var m=c(59921);x.exports=m.Object.getOwnPropertySymbols},90660:(x,k,c)=>{c(38339);var m=c(59921);x.exports=m.Object.keys},49198:(x,k,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);x.exports=m.Symbol},15413:(x,k,c)=>{c(44390),c(97829),c(27626),c(84911);var m=c(39378);x.exports=m.f("iterator")},4793:(x,k,c)=>{c(91667),c(99921);var m=c(39378);x.exports=m.f("toPrimitive")},24018:(x,k,c)=>{x.exports=c(11226)},27411:(x,k,c)=>{x.exports=c(39743)},79155:(x,k,c)=>{x.exports=c(17018)},13375:(x,k,c)=>{x.exports=c(45057)},95442:(x,k,c)=>{x.exports=c(97947)},55334:(x,k,c)=>{x.exports=c(26452)},48261:(x,k,c)=>{x.exports=c(4477)},92864:(x,k,c)=>{x.exports=c(74013)},27923:(x,k,c)=>{x.exports=c(17685)},89225:(x,k,c)=>{x.exports=c(2371)},95281:(x,k,c)=>{x.exports=c(89061)},55468:(x,k,c)=>{x.exports=c(51553)},11226:(x,k,c)=>{var m=c(97529);x.exports=m},39743:(x,k,c)=>{var m=c(75342);x.exports=m},17018:(x,k,c)=>{var m=c(64218);x.exports=m},45057:(x,k,c)=>{var m=c(95050);x.exports=m},97947:(x,k,c)=>{var m=c(84779);x.exports=m},26452:(x,k,c)=>{var m=c(17190);x.exports=m},4477:(x,k,c)=>{var m=c(96589);x.exports=m},74013:(x,k,c)=>{var m=c(32276);x.exports=m},17685:(x,k,c)=>{var m=c(15064);x.exports=m},2371:(x,k,c)=>{var m=c(31986);c(45987),c(58052),c(90181),c(25129),c(90397),c(18097),c(82793),c(67574),c(20122),x.exports=m},89061:(x,k,c)=>{var m=c(69635);x.exports=m},51553:(x,k,c)=>{var m=c(3529);x.exports=m},81970:(x,k,c)=>{var m=c(43152),w=c(18342),b=TypeError;x.exports=function(_){if(m(_))return _;throw b(w(_)+" is not a function")}},72185:(x,k,c)=>{var m=c(43152),w=String,b=TypeError;x.exports=function(_){if(typeof _=="object"||m(_))return _;throw b("Can't set "+w(_)+" as a prototype")}},20844:x=>{x.exports=function(){}},35970:(x,k,c)=>{var m=c(92548),w=String,b=TypeError;x.exports=function(_){if(m(_))return _;throw b(w(_)+" is not an object")}},24782:(x,k,c)=>{"use strict";var m=c(93935).forEach,w=c(10454),b=w("forEach");x.exports=b?[].forEach:function(A){return m(this,A,arguments.length>1?arguments[1]:void 0)}},66322:(x,k,c)=>{var m=c(88966),w=c(13249),b=c(53387),_=function(A){return function(O,j,$){var K=m(O),ie=b(K),ee=w($,ie),ae;if(A&&j!=j){for(;ie>ee;)if(ae=K[ee++],ae!=ae)return!0}else for(;ie>ee;ee++)if((A||ee in K)&&K[ee]===j)return A||ee||0;return!A&&-1}};x.exports={includes:_(!0),indexOf:_(!1)}},93935:(x,k,c)=>{var m=c(7416),w=c(90406),b=c(38622),_=c(53254),A=c(53387),O=c(69573),j=w([].push),$=function(K){var ie=K==1,ee=K==2,ae=K==3,q=K==4,V=K==6,J=K==7,L=K==5||V;return function(E,N,U,se){for(var ne=_(E),Y=b(ne),X=m(N,U),Q=A(Y),H=0,de=se||O,Ae=ie?de(E,Q):ee||J?de(E,0):void 0,Z,xe;Q>H;H++)if((L||H in Y)&&(Z=Y[H],xe=X(Z,H,ne),K))if(ie)Ae[H]=xe;else if(xe)switch(K){case 3:return!0;case 5:return Z;case 6:return H;case 2:j(Ae,Z)}else switch(K){case 4:return!1;case 7:j(Ae,Z)}return V?-1:ae||q?q:Ae}};x.exports={forEach:$(0),map:$(1),filter:$(2),some:$(3),every:$(4),find:$(5),findIndex:$(6),filterReject:$(7)}},36844:(x,k,c)=>{var m=c(31982),w=c(33538),b=c(32438),_=w("species");x.exports=function(A){return b>=51||!m(function(){var O=[],j=O.constructor={};return j[_]=function(){return{foo:1}},O[A](Boolean).foo!==1})}},10454:(x,k,c)=>{"use strict";var m=c(31982);x.exports=function(w,b){var _=[][w];return!!_&&m(function(){_.call(null,b||function(){return 1},1)})}},67932:(x,k,c)=>{var m=c(13249),w=c(53387),b=c(53437),_=Array,A=Math.max;x.exports=function(O,j,$){for(var K=w(O),ie=m(j,K),ee=m($===void 0?K:$,K),ae=_(A(ee-ie,0)),q=0;ie<ee;ie++,q++)b(ae,q,O[ie]);return ae.length=q,ae}},53160:(x,k,c)=>{var m=c(90406);x.exports=m([].slice)},76562:(x,k,c)=>{var m=c(93053),w=c(43455),b=c(92548),_=c(33538),A=_("species"),O=Array;x.exports=function(j){var $;return m(j)&&($=j.constructor,w($)&&($===O||m($.prototype))?$=void 0:b($)&&($=$[A],$===null&&($=void 0))),$===void 0?O:$}},69573:(x,k,c)=>{var m=c(76562);x.exports=function(w,b){return new(m(w))(b===0?0:b)}},58310:(x,k,c)=>{var m=c(90406),w=m({}.toString),b=m("".slice);x.exports=function(_){return b(w(_),8,-1)}},82059:(x,k,c)=>{var m=c(48448),w=c(43152),b=c(58310),_=c(33538),A=_("toStringTag"),O=Object,j=b(function(){return arguments}())=="Arguments",$=function(K,ie){try{return K[ie]}catch(ee){}};x.exports=m?b:function(K){var ie,ee,ae;return K===void 0?"Undefined":K===null?"Null":typeof(ee=$(ie=O(K),A))=="string"?ee:j?b(ie):(ae=b(ie))=="Object"&&w(ie.callee)?"Arguments":ae}},74838:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){function w(){}return w.prototype.constructor=null,Object.getPrototypeOf(new w)!==w.prototype})},10248:x=>{x.exports=function(k,c){return{value:k,done:c}}},20410:(x,k,c)=>{var m=c(56049),w=c(36133),b=c(54686);x.exports=m?function(_,A,O){return w.f(_,A,b(1,O))}:function(_,A,O){return _[A]=O,_}},54686:x=>{x.exports=function(k,c){return{enumerable:!(k&1),configurable:!(k&2),writable:!(k&4),value:c}}},53437:(x,k,c)=>{"use strict";var m=c(5135),w=c(36133),b=c(54686);x.exports=function(_,A,O){var j=m(A);j in _?w.f(_,j,b(0,O)):_[j]=O}},37912:(x,k,c)=>{var m=c(36133);x.exports=function(w,b,_){return m.f(w,b,_)}},27519:(x,k,c)=>{var m=c(20410);x.exports=function(w,b,_,A){return A&&A.enumerable?w[b]=_:m(w,b,_),w}},9267:(x,k,c)=>{var m=c(62447),w=Object.defineProperty;x.exports=function(b,_){try{w(m,b,{value:_,configurable:!0,writable:!0})}catch(A){m[b]=_}return _}},56049:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:x=>{var k=typeof document=="object"&&document.all,c=typeof k=="undefined"&&k!==void 0;x.exports={all:k,IS_HTMLDDA:c}},45511:(x,k,c)=>{var m=c(62447),w=c(92548),b=m.document,_=w(b)&&w(b.createElement);x.exports=function(A){return _?b.createElement(A):{}}},11452:x=>{var k=TypeError,c=9007199254740991;x.exports=function(m){if(m>c)throw k("Maximum allowed index exceeded");return m}},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!="undefined"&&String(navigator.userAgent)||""},32438:(x,k,c)=>{var m=c(62447),w=c(90740),b=m.process,_=m.Deno,A=b&&b.versions||_&&_.version,O=A&&A.v8,j,$;O&&(j=O.split("."),$=j[0]>0&&j[0]<4?1:+(j[0]+j[1])),!$&&w&&(j=w.match(/Edge\/(\d+)/),(!j||j[1]>=74)&&(j=w.match(/Chrome\/(\d+)/),j&&($=+j[1]))),x.exports=$},70291:(x,k,c)=>{var m=c(59921);x.exports=function(w){return m[w+"Prototype"]}},11792:x=>{x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(x,k,c)=>{"use strict";var m=c(62447),w=c(82768),b=c(57953),_=c(43152),A=c(80016).f,O=c(51585),j=c(59921),$=c(7416),K=c(20410),ie=c(18768),ee=function(ae){var q=function(V,J,L){if(this instanceof q){switch(arguments.length){case 0:return new ae;case 1:return new ae(V);case 2:return new ae(V,J)}return new ae(V,J,L)}return w(ae,this,arguments)};return q.prototype=ae.prototype,q};x.exports=function(ae,q){var V=ae.target,J=ae.global,L=ae.stat,E=ae.proto,N=J?m:L?m[V]:(m[V]||{}).prototype,U=J?j:j[V]||K(j,V,{})[V],se=U.prototype,ne,Y,X,Q,H,de,Ae,Z,xe;for(Q in q)ne=O(J?Q:V+(L?".":"#")+Q,ae.forced),Y=!ne&&N&&ie(N,Q),de=U[Q],Y&&(ae.dontCallGetSet?(xe=A(N,Q),Ae=xe&&xe.value):Ae=N[Q]),H=Y&&Ae?Ae:q[Q],!(Y&&typeof de==typeof H)&&(ae.bind&&Y?Z=$(H,m):ae.wrap&&Y?Z=ee(H):E&&_(H)?Z=b(H):Z=H,(ae.sham||H&&H.sham||de&&de.sham)&&K(Z,"sham",!0),K(U,Q,Z),E&&(X=V+"Prototype",ie(j,X)||K(j,X,{}),K(j[X],Q,H),ae.real&&se&&(ne||!se[Q])&&K(se,Q,H)))}},31982:x=>{x.exports=function(k){try{return!!k()}catch(c){return!0}}},82768:(x,k,c)=>{var m=c(97966),w=Function.prototype,b=w.apply,_=w.call;x.exports=typeof Reflect=="object"&&Reflect.apply||(m?_.bind(b):function(){return _.apply(b,arguments)})},7416:(x,k,c)=>{var m=c(57953),w=c(81970),b=c(97966),_=m(m.bind);x.exports=function(A,O){return w(A),O===void 0?A:b?_(A,O):function(){return A.apply(O,arguments)}}},97966:(x,k,c)=>{var m=c(31982);x.exports=!m(function(){var w=function(){}.bind();return typeof w!="function"||w.hasOwnProperty("prototype")})},12461:(x,k,c)=>{var m=c(97966),w=Function.prototype.call;x.exports=m?w.bind(w):function(){return w.apply(w,arguments)}},58100:(x,k,c)=>{var m=c(56049),w=c(18768),b=Function.prototype,_=m&&Object.getOwnPropertyDescriptor,A=w(b,"name"),O=A&&function(){}.name==="something",j=A&&(!m||m&&_(b,"name").configurable);x.exports={EXISTS:A,PROPER:O,CONFIGURABLE:j}},54518:(x,k,c)=>{var m=c(90406),w=c(81970);x.exports=function(b,_,A){try{return m(w(Object.getOwnPropertyDescriptor(b,_)[A]))}catch(O){}}},57953:(x,k,c)=>{var m=c(58310),w=c(90406);x.exports=function(b){if(m(b)==="Function")return w(b)}},90406:(x,k,c)=>{var m=c(97966),w=Function.prototype,b=w.call,_=m&&w.bind.bind(b,b);x.exports=m?_:function(A){return function(){return b.apply(A,arguments)}}},97080:(x,k,c)=>{var m=c(59921),w=c(62447),b=c(43152),_=function(A){return b(A)?A:void 0};x.exports=function(A,O){return arguments.length<2?_(m[A])||_(w[A]):m[A]&&m[A][O]||w[A]&&w[A][O]}},82850:(x,k,c)=>{var m=c(90406),w=c(93053),b=c(43152),_=c(58310),A=c(46025),O=m([].push);x.exports=function(j){if(b(j))return j;if(w(j)){for(var $=j.length,K=[],ie=0;ie<$;ie++){var ee=j[ie];typeof ee=="string"?O(K,ee):(typeof ee=="number"||_(ee)=="Number"||_(ee)=="String")&&O(K,A(ee))}var ae=K.length,q=!0;return function(V,J){if(q)return q=!1,J;if(w(this))return J;for(var L=0;L<ae;L++)if(K[L]===V)return J}}}},27529:(x,k,c)=>{var m=c(81970),w=c(71365);x.exports=function(b,_){var A=b[_];return w(A)?void 0:m(A)}},62447:(x,k,c)=>{var m=function(w){return w&&w.Math==Math&&w};x.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:(x,k,c)=>{var m=c(90406),w=c(53254),b=m({}.hasOwnProperty);x.exports=Object.hasOwn||function(A,O){return b(w(A),O)}},13477:x=>{x.exports={}},19552:(x,k,c)=>{var m=c(97080);x.exports=m("document","documentElement")},11314:(x,k,c)=>{var m=c(56049),w=c(31982),b=c(45511);x.exports=!m&&!w(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},38622:(x,k,c)=>{var m=c(90406),w=c(31982),b=c(58310),_=Object,A=m("".split);x.exports=w(function(){return!_("z").propertyIsEnumerable(0)})?function(O){return b(O)=="String"?A(O,""):_(O)}:_},41524:(x,k,c)=>{var m=c(90406),w=c(43152),b=c(70716),_=m(Function.toString);w(b.inspectSource)||(b.inspectSource=function(A){return _(A)}),x.exports=b.inspectSource},44083:(x,k,c)=>{var m=c(57761),w=c(62447),b=c(92548),_=c(20410),A=c(18768),O=c(70716),j=c(4580),$=c(13477),K="Object already initialized",ie=w.TypeError,ee=w.WeakMap,ae,q,V,J=function(U){return V(U)?q(U):ae(U,{})},L=function(U){return function(se){var ne;if(!b(se)||(ne=q(se)).type!==U)throw ie("Incompatible receiver, "+U+" required");return ne}};if(m||O.state){var E=O.state||(O.state=new ee);E.get=E.get,E.has=E.has,E.set=E.set,ae=function(U,se){if(E.has(U))throw ie(K);return se.facade=U,E.set(U,se),se},q=function(U){return E.get(U)||{}},V=function(U){return E.has(U)}}else{var N=j("state");$[N]=!0,ae=function(U,se){if(A(U,N))throw ie(K);return se.facade=U,_(U,N,se),se},q=function(U){return A(U,N)?U[N]:{}},V=function(U){return A(U,N)}}x.exports={set:ae,get:q,has:V,enforce:J,getterFor:L}},93053:(x,k,c)=>{var m=c(58310);x.exports=Array.isArray||function(b){return m(b)=="Array"}},43152:(x,k,c)=>{var m=c(51647),w=m.all;x.exports=m.IS_HTMLDDA?function(b){return typeof b=="function"||b===w}:function(b){return typeof b=="function"}},43455:(x,k,c)=>{var m=c(90406),w=c(31982),b=c(43152),_=c(82059),A=c(97080),O=c(41524),j=function(){},$=[],K=A("Reflect","construct"),ie=/^\s*(?:class|function)\b/,ee=m(ie.exec),ae=!ie.exec(j),q=function(L){if(!b(L))return!1;try{return K(j,$,L),!0}catch(E){return!1}},V=function(L){if(!b(L))return!1;switch(_(L)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(ie,O(L))}catch(E){return!0}};V.sham=!0,x.exports=!K||w(function(){var J;return q(q.call)||!q(Object)||!q(function(){J=!0})||J})?V:q},51585:(x,k,c)=>{var m=c(31982),w=c(43152),b=/#|\.prototype\./,_=function(K,ie){var ee=O[A(K)];return ee==$?!0:ee==j?!1:w(ie)?m(ie):!!ie},A=_.normalize=function(K){return String(K).replace(b,".").toLowerCase()},O=_.data={},j=_.NATIVE="N",$=_.POLYFILL="P";x.exports=_},71365:x=>{x.exports=function(k){return k==null}},92548:(x,k,c)=>{var m=c(43152),w=c(51647),b=w.all;x.exports=w.IS_HTMLDDA?function(_){return typeof _=="object"?_!==null:m(_)||_===b}:function(_){return typeof _=="object"?_!==null:m(_)}},39839:x=>{x.exports=!0},28609:(x,k,c)=>{var m=c(97080),w=c(43152),b=c(15166),_=c(27237),A=Object;x.exports=_?function(O){return typeof O=="symbol"}:function(O){var j=m("Symbol");return w(j)&&b(j.prototype,A(O))}},41709:(x,k,c)=>{"use strict";var m=c(98488).IteratorPrototype,w=c(73270),b=c(54686),_=c(98889),A=c(94609),O=function(){return this};x.exports=function(j,$,K,ie){var ee=$+" Iterator";return j.prototype=w(m,{next:b(+!ie,K)}),_(j,ee,!1,!0),A[ee]=O,j}},78107:(x,k,c)=>{"use strict";var m=c(30080),w=c(12461),b=c(39839),_=c(58100),A=c(43152),O=c(41709),j=c(90851),$=c(70738),K=c(98889),ie=c(20410),ee=c(27519),ae=c(33538),q=c(94609),V=c(98488),J=_.PROPER,L=_.CONFIGURABLE,E=V.IteratorPrototype,N=V.BUGGY_SAFARI_ITERATORS,U=ae("iterator"),se="keys",ne="values",Y="entries",X=function(){return this};x.exports=function(Q,H,de,Ae,Z,xe,ue){O(de,H,Ae);var Ne=function(Ke){if(Ke===Z&&Ye)return Ye;if(!N&&Ke in ze)return ze[Ke];switch(Ke){case se:return function(){return new de(this,Ke)};case ne:return function(){return new de(this,Ke)};case Y:return function(){return new de(this,Ke)}}return function(){return new de(this)}},He=H+" Iterator",Re=!1,ze=Q.prototype,Be=ze[U]||ze["@@iterator"]||Z&&ze[Z],Ye=!N&&Be||Ne(Z),gt=H=="Array"&&ze.entries||Be,ut,yt,lt;if(gt&&(ut=j(gt.call(new Q)),ut!==Object.prototype&&ut.next&&(!b&&j(ut)!==E&&($?$(ut,E):A(ut[U])||ee(ut,U,X)),K(ut,He,!0,!0),b&&(q[He]=X))),J&&Z==ne&&Be&&Be.name!==ne&&(!b&&L?ie(ze,"name",ne):(Re=!0,Ye=function(){return w(Be,this)})),Z)if(yt={values:Ne(ne),keys:xe?Ye:Ne(se),entries:Ne(Y)},ue)for(lt in yt)(N||Re||!(lt in ze))&&ee(ze,lt,yt[lt]);else m({target:H,proto:!0,forced:N||Re},yt);return(!b||ue)&&ze[U]!==Ye&&ee(ze,U,Ye,{name:Z}),q[H]=Ye,yt}},98488:(x,k,c)=>{"use strict";var m=c(31982),w=c(43152),b=c(92548),_=c(73270),A=c(90851),O=c(27519),j=c(33538),$=c(39839),K=j("iterator"),ie=!1,ee,ae,q;[].keys&&(q=[].keys(),"next"in q?(ae=A(A(q)),ae!==Object.prototype&&(ee=ae)):ie=!0);var V=!b(ee)||m(function(){var J={};return ee[K].call(J)!==J});V?ee={}:$&&(ee=_(ee)),w(ee[K])||O(ee,K,function(){return this}),x.exports={IteratorPrototype:ee,BUGGY_SAFARI_ITERATORS:ie}},94609:x=>{x.exports={}},53387:(x,k,c)=>{var m=c(62567);x.exports=function(w){return m(w.length)}},99295:x=>{var k=Math.ceil,c=Math.floor;x.exports=Math.trunc||function(w){var b=+w;return(b>0?c:k)(b)}},73270:(x,k,c)=>{var m=c(35970),w=c(98911),b=c(11792),_=c(13477),A=c(19552),O=c(45511),j=c(4580),$=">",K="<",ie="prototype",ee="script",ae=j("IE_PROTO"),q=function(){},V=function(U){return K+ee+$+U+K+"/"+ee+$},J=function(U){U.write(V("")),U.close();var se=U.parentWindow.Object;return U=null,se},L=function(){var U=O("iframe"),se="java"+ee+":",ne;return U.style.display="none",A.appendChild(U),U.src=String(se),ne=U.contentWindow.document,ne.open(),ne.write(V("document.F=Object")),ne.close(),ne.F},E,N=function(){try{E=new ActiveXObject("htmlfile")}catch(se){}N=typeof document!="undefined"?document.domain&&E?J(E):L():J(E);for(var U=b.length;U--;)delete N[ie][b[U]];return N()};_[ae]=!0,x.exports=Object.create||function(se,ne){var Y;return se!==null?(q[ie]=m(se),Y=new q,q[ie]=null,Y[ae]=se):Y=N(),ne===void 0?Y:w.f(Y,ne)}},98911:(x,k,c)=>{var m=c(56049),w=c(98715),b=c(36133),_=c(35970),A=c(88966),O=c(16619);k.f=m&&!w?Object.defineProperties:function($,K){_($);for(var ie=A(K),ee=O(K),ae=ee.length,q=0,V;ae>q;)b.f($,V=ee[q++],ie[V]);return $}},36133:(x,k,c)=>{var m=c(56049),w=c(11314),b=c(98715),_=c(35970),A=c(5135),O=TypeError,j=Object.defineProperty,$=Object.getOwnPropertyDescriptor,K="enumerable",ie="configurable",ee="writable";k.f=m?b?function(q,V,J){if(_(q),V=A(V),_(J),typeof q=="function"&&V==="prototype"&&"value"in J&&ee in J&&!J[ee]){var L=$(q,V);L&&L[ee]&&(q[V]=J.value,J={configurable:ie in J?J[ie]:L[ie],enumerable:K in J?J[K]:L[K],writable:!1})}return j(q,V,J)}:j:function(q,V,J){if(_(q),V=A(V),_(J),w)try{return j(q,V,J)}catch(L){}if("get"in J||"set"in J)throw O("Accessors not supported");return"value"in J&&(q[V]=J.value),q}},80016:(x,k,c)=>{var m=c(56049),w=c(12461),b=c(16457),_=c(54686),A=c(88966),O=c(5135),j=c(18768),$=c(11314),K=Object.getOwnPropertyDescriptor;k.f=m?K:function(ee,ae){if(ee=A(ee),ae=O(ae),$)try{return K(ee,ae)}catch(q){}if(j(ee,ae))return _(!w(b.f,ee,ae),ee[ae])}},53515:(x,k,c)=>{var m=c(58310),w=c(88966),b=c(51203).f,_=c(67932),A=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],O=function(j){try{return b(j)}catch($){return _(A)}};x.exports.f=function($){return A&&m($)=="Window"?O($):b(w($))}},51203:(x,k,c)=>{var m=c(4541),w=c(11792),b=w.concat("length","prototype");k.f=Object.getOwnPropertyNames||function(A){return m(A,b)}},97620:(x,k)=>{k.f=Object.getOwnPropertySymbols},90851:(x,k,c)=>{var m=c(18768),w=c(43152),b=c(53254),_=c(4580),A=c(74838),O=_("IE_PROTO"),j=Object,$=j.prototype;x.exports=A?j.getPrototypeOf:function(K){var ie=b(K);if(m(ie,O))return ie[O];var ee=ie.constructor;return w(ee)&&ie instanceof ee?ee.prototype:ie instanceof j?$:null}},15166:(x,k,c)=>{var m=c(90406);x.exports=m({}.isPrototypeOf)},4541:(x,k,c)=>{var m=c(90406),w=c(18768),b=c(88966),_=c(66322).indexOf,A=c(13477),O=m([].push);x.exports=function(j,$){var K=b(j),ie=0,ee=[],ae;for(ae in K)!w(A,ae)&&w(K,ae)&&O(ee,ae);for(;$.length>ie;)w(K,ae=$[ie++])&&(~_(ee,ae)||O(ee,ae));return ee}},16619:(x,k,c)=>{var m=c(4541),w=c(11792);x.exports=Object.keys||function(_){return m(_,w)}},16457:(x,k)=>{"use strict";var c={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,w=m&&!c.call({1:2},1);k.f=w?function(_){var A=m(this,_);return!!A&&A.enumerable}:c},70738:(x,k,c)=>{var m=c(54518),w=c(35970),b=c(72185);x.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _=!1,A={},O;try{O=m(Object.prototype,"__proto__","set"),O(A,[]),_=A instanceof Array}catch(j){}return function($,K){return w($),b(K),_?O($,K):$.__proto__=K,$}}():void 0)},68399:(x,k,c)=>{"use strict";var m=c(48448),w=c(82059);x.exports=m?{}.toString:function(){return"[object "+w(this)+"]"}},96380:(x,k,c)=>{var m=c(12461),w=c(43152),b=c(92548),_=TypeError;x.exports=function(A,O){var j,$;if(O==="string"&&w(j=A.toString)&&!b($=m(j,A))||w(j=A.valueOf)&&!b($=m(j,A))||O!=="string"&&w(j=A.toString)&&!b($=m(j,A)))return $;throw _("Can't convert object to primitive value")}},67349:(x,k,c)=>{var m=c(97080),w=c(90406),b=c(51203),_=c(97620),A=c(35970),O=w([].concat);x.exports=m("Reflect","ownKeys")||function($){var K=b.f(A($)),ie=_.f;return ie?O(K,ie($)):K}},59921:x=>{x.exports={}},31251:(x,k,c)=>{var m=c(71365),w=TypeError;x.exports=function(b){if(m(b))throw w("Can't call method on "+b);return b}},98889:(x,k,c)=>{var m=c(48448),w=c(36133).f,b=c(20410),_=c(18768),A=c(68399),O=c(33538),j=O("toStringTag");x.exports=function($,K,ie,ee){if($){var ae=ie?$:$.prototype;_(ae,j)||w(ae,j,{configurable:!0,value:K}),ee&&!m&&b(ae,"toString",A)}}},4580:(x,k,c)=>{var m=c(95976),w=c(91248),b=m("keys");x.exports=function(_){return b[_]||(b[_]=w(_))}},70716:(x,k,c)=>{var m=c(62447),w=c(9267),b="__core-js_shared__",_=m[b]||w(b,{});x.exports=_},95976:(x,k,c)=>{var m=c(39839),w=c(70716);(x.exports=function(b,_){return w[b]||(w[b]=_!==void 0?_:{})})("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:(x,k,c)=>{var m=c(90406),w=c(32041),b=c(46025),_=c(31251),A=m("".charAt),O=m("".charCodeAt),j=m("".slice),$=function(K){return function(ie,ee){var ae=b(_(ie)),q=w(ee),V=ae.length,J,L;return q<0||q>=V?K?"":void 0:(J=O(ae,q),J<55296||J>56319||q+1===V||(L=O(ae,q+1))<56320||L>57343?K?A(ae,q):J:K?j(ae,q,q+2):(J-55296<<10)+(L-56320)+65536)}};x.exports={codeAt:$(!1),charAt:$(!0)}},71775:(x,k,c)=>{var m=c(32438),w=c(31982);x.exports=!!Object.getOwnPropertySymbols&&!w(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&m&&m<41})},95679:(x,k,c)=>{var m=c(12461),w=c(97080),b=c(33538),_=c(27519);x.exports=function(){var A=w("Symbol"),O=A&&A.prototype,j=O&&O.valueOf,$=b("toPrimitive");O&&!O[$]&&_(O,$,function(K){return m(j,this)},{arity:1})}},82294:(x,k,c)=>{var m=c(71775);x.exports=m&&!!Symbol.for&&!!Symbol.keyFor},13249:(x,k,c)=>{var m=c(32041),w=Math.max,b=Math.min;x.exports=function(_,A){var O=m(_);return O<0?w(O+A,0):b(O,A)}},88966:(x,k,c)=>{var m=c(38622),w=c(31251);x.exports=function(b){return m(w(b))}},32041:(x,k,c)=>{var m=c(99295);x.exports=function(w){var b=+w;return b!==b||b===0?0:m(b)}},62567:(x,k,c)=>{var m=c(32041),w=Math.min;x.exports=function(b){return b>0?w(m(b),9007199254740991):0}},53254:(x,k,c)=>{var m=c(31251),w=Object;x.exports=function(b){return w(m(b))}},37505:(x,k,c)=>{var m=c(12461),w=c(92548),b=c(28609),_=c(27529),A=c(96380),O=c(33538),j=TypeError,$=O("toPrimitive");x.exports=function(K,ie){if(!w(K)||b(K))return K;var ee=_(K,$),ae;if(ee){if(ie===void 0&&(ie="default"),ae=m(ee,K,ie),!w(ae)||b(ae))return ae;throw j("Can't convert object to primitive value")}return ie===void 0&&(ie="number"),A(K,ie)}},5135:(x,k,c)=>{var m=c(37505),w=c(28609);x.exports=function(b){var _=m(b,"string");return w(_)?_:_+""}},48448:(x,k,c)=>{var m=c(33538),w=m("toStringTag"),b={};b[w]="z",x.exports=String(b)==="[object z]"},46025:(x,k,c)=>{var m=c(82059),w=String;x.exports=function(b){if(m(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return w(b)}},18342:x=>{var k=String;x.exports=function(c){try{return k(c)}catch(m){return"Object"}}},91248:(x,k,c)=>{var m=c(90406),w=0,b=Math.random(),_=m(1 .toString);x.exports=function(A){return"Symbol("+(A===void 0?"":A)+")_"+_(++w+b,36)}},27237:(x,k,c)=>{var m=c(71775);x.exports=m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(x,k,c)=>{var m=c(56049),w=c(31982);x.exports=m&&w(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(x,k,c)=>{var m=c(62447),w=c(43152),b=m.WeakMap;x.exports=w(b)&&/native code/.test(String(b))},64832:(x,k,c)=>{var m=c(59921),w=c(18768),b=c(39378),_=c(36133).f;x.exports=function(A){var O=m.Symbol||(m.Symbol={});w(O,A)||_(O,A,{value:b.f(A)})}},39378:(x,k,c)=>{var m=c(33538);k.f=m},33538:(x,k,c)=>{var m=c(62447),w=c(95976),b=c(18768),_=c(91248),A=c(71775),O=c(27237),j=m.Symbol,$=w("wks"),K=O?j.for||j:j&&j.withoutSetter||_;x.exports=function(ie){return b($,ie)||($[ie]=A&&b(j,ie)?j[ie]:K("Symbol."+ie)),$[ie]}},69825:(x,k,c)=>{"use strict";var m=c(30080),w=c(31982),b=c(93053),_=c(92548),A=c(53254),O=c(53387),j=c(11452),$=c(53437),K=c(69573),ie=c(36844),ee=c(33538),ae=c(32438),q=ee("isConcatSpreadable"),V=ae>=51||!w(function(){var E=[];return E[q]=!1,E.concat()[0]!==E}),J=function(E){if(!_(E))return!1;var N=E[q];return N!==void 0?!!N:b(E)},L=!V||!ie("concat");m({target:"Array",proto:!0,arity:1,forced:L},{concat:function(N){var U=A(this),se=K(U,0),ne=0,Y,X,Q,H,de;for(Y=-1,Q=arguments.length;Y<Q;Y++)if(de=Y===-1?U:arguments[Y],J(de))for(H=O(de),j(ne+H),X=0;X<H;X++,ne++)X in de&&$(se,ne,de[X]);else j(ne+1),$(se,ne++,de);return se.length=ne,se}})},17802:(x,k,c)=>{"use strict";var m=c(30080),w=c(93935).filter,b=c(36844),_=b("filter");m({target:"Array",proto:!0,forced:!_},{filter:function(O){return w(this,O,arguments.length>1?arguments[1]:void 0)}})},64009:(x,k,c)=>{"use strict";var m=c(30080),w=c(24782);m({target:"Array",proto:!0,forced:[].forEach!=w},{forEach:w})},32449:(x,k,c)=>{"use strict";var m=c(30080),w=c(57953),b=c(66322).indexOf,_=c(10454),A=w([].indexOf),O=!!A&&1/A([1],1,-0)<0,j=O||!_("indexOf");m({target:"Array",proto:!0,forced:j},{indexOf:function(K){var ie=arguments.length>1?arguments[1]:void 0;return O?A(this,K,ie)||0:b(this,K,ie)}})},44390:(x,k,c)=>{"use strict";var m=c(88966),w=c(20844),b=c(94609),_=c(44083),A=c(36133).f,O=c(78107),j=c(10248),$=c(39839),K=c(56049),ie="Array Iterator",ee=_.set,ae=_.getterFor(ie);x.exports=O(Array,"Array",function(V,J){ee(this,{type:ie,target:m(V),index:0,kind:J})},function(){var V=ae(this),J=V.target,L=V.kind,E=V.index++;return!J||E>=J.length?(V.target=void 0,j(void 0,!0)):L=="keys"?j(E,!1):L=="values"?j(J[E],!1):j([E,J[E]],!1)},"values");var q=b.Arguments=b.Array;if(w("keys"),w("values"),w("entries"),!$&&K&&q.name!=="values")try{A(q,"name",{value:"values"})}catch(V){}},91667:()=>{},39306:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(82768),_=c(12461),A=c(90406),O=c(31982),j=c(43152),$=c(28609),K=c(53160),ie=c(82850),ee=c(71775),ae=String,q=w("JSON","stringify"),V=A(/./.exec),J=A("".charAt),L=A("".charCodeAt),E=A("".replace),N=A(1 .toString),U=/[\uD800-\uDFFF]/g,se=/^[\uD800-\uDBFF]$/,ne=/^[\uDC00-\uDFFF]$/,Y=!ee||O(function(){var de=w("Symbol")();return q([de])!="[null]"||q({a:de})!="{}"||q(Object(de))!="{}"}),X=O(function(){return q("\uDF06\uD834")!=='"\\udf06\\ud834"'||q("\uDEAD")!=='"\\udead"'}),Q=function(de,Ae){var Z=K(arguments),xe=ie(Ae);if(!(!j(xe)&&(de===void 0||$(de))))return Z[1]=function(ue,Ne){if(j(xe)&&(Ne=_(xe,this,ae(ue),Ne)),!$(Ne))return Ne},b(q,null,Z)},H=function(de,Ae,Z){var xe=J(Z,Ae-1),ue=J(Z,Ae+1);return V(se,de)&&!V(ne,ue)||V(ne,de)&&!V(se,xe)?"\\u"+N(L(de,0),16):de};q&&m({target:"JSON",stat:!0,arity:3,forced:Y||X},{stringify:function(Ae,Z,xe){var ue=K(arguments),Ne=b(Y?Q:q,null,ue);return X&&typeof Ne=="string"?E(Ne,U,H):Ne}})},23870:(x,k,c)=>{var m=c(62447),w=c(98889);w(m.JSON,"JSON",!0)},5828:()=>{},28135:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(98911).f;m({target:"Object",stat:!0,forced:Object.defineProperties!==b,sham:!w},{defineProperties:b})},70829:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(36133).f;m({target:"Object",stat:!0,forced:Object.defineProperty!==b,sham:!w},{defineProperty:b})},51964:(x,k,c)=>{var m=c(30080),w=c(31982),b=c(88966),_=c(80016).f,A=c(56049),O=!A||w(function(){_(1)});m({target:"Object",stat:!0,forced:O,sham:!A},{getOwnPropertyDescriptor:function($,K){return _(b($),K)}})},723:(x,k,c)=>{var m=c(30080),w=c(56049),b=c(67349),_=c(88966),A=c(80016),O=c(53437);m({target:"Object",stat:!0,sham:!w},{getOwnPropertyDescriptors:function($){for(var K=_($),ie=A.f,ee=b(K),ae={},q=0,V,J;ee.length>q;)J=ie(K,V=ee[q++]),J!==void 0&&O(ae,V,J);return ae}})},86884:(x,k,c)=>{var m=c(30080),w=c(71775),b=c(31982),_=c(97620),A=c(53254),O=!w||b(function(){_.f(1)});m({target:"Object",stat:!0,forced:O},{getOwnPropertySymbols:function($){var K=_.f;return K?K(A($)):[]}})},38339:(x,k,c)=>{var m=c(30080),w=c(53254),b=c(16619),_=c(31982),A=_(function(){b(1)});m({target:"Object",stat:!0,forced:A},{keys:function(j){return b(w(j))}})},97829:()=>{},5708:()=>{},27626:(x,k,c)=>{"use strict";var m=c(18143).charAt,w=c(46025),b=c(44083),_=c(78107),A=c(10248),O="String Iterator",j=b.set,$=b.getterFor(O);_(String,"String",function(K){j(this,{type:O,string:w(K),index:0})},function(){var ie=$(this),ee=ie.string,ae=ie.index,q;return ae>=ee.length?A(void 0,!0):(q=m(ee,ae),ie.index+=q.length,A(q,!1))})},95353:(x,k,c)=>{var m=c(64832);m("asyncIterator")},16212:(x,k,c)=>{"use strict";var m=c(30080),w=c(62447),b=c(12461),_=c(90406),A=c(39839),O=c(56049),j=c(71775),$=c(31982),K=c(18768),ie=c(15166),ee=c(35970),ae=c(88966),q=c(5135),V=c(46025),J=c(54686),L=c(73270),E=c(16619),N=c(51203),U=c(53515),se=c(97620),ne=c(80016),Y=c(36133),X=c(98911),Q=c(16457),H=c(27519),de=c(37912),Ae=c(95976),Z=c(4580),xe=c(13477),ue=c(91248),Ne=c(33538),He=c(39378),Re=c(64832),ze=c(95679),Be=c(98889),Ye=c(44083),gt=c(93935).forEach,ut=Z("hidden"),yt="Symbol",lt="prototype",Ke=Ye.set,Fe=Ye.getterFor(yt),qe=Object[lt],bt=w.Symbol,Lt=bt&&bt[lt],Rt=w.TypeError,zt=w.QObject,kr=ne.f,jr=Y.f,qr=U.f,ht=Q.f,$t=_([].push),nr=Ae("symbols"),er=Ae("op-symbols"),kn=Ae("wks"),Vi=!zt||!zt[lt]||!zt[lt].findChild,Wn=O&&$(function(){return L(jr({},"a",{get:function(){return jr(this,"a",{value:7}).a}})).a!=7})?function(Ft,At,mt){var Tt=kr(qe,At);Tt&&delete qe[At],jr(Ft,At,mt),Tt&&Ft!==qe&&jr(qe,At,Tt)}:jr,Hn=function(Ft,At){var mt=nr[Ft]=L(Lt);return Ke(mt,{type:yt,tag:Ft,description:At}),O||(mt.description=At),mt},ei=function(At,mt,Tt){At===qe&&ei(er,mt,Tt),ee(At);var pe=q(mt);return ee(Tt),K(nr,pe)?(Tt.enumerable?(K(At,ut)&&At[ut][pe]&&(At[ut][pe]=!1),Tt=L(Tt,{enumerable:J(0,!1)})):(K(At,ut)||jr(At,ut,J(1,{})),At[ut][pe]=!0),Wn(At,pe,Tt)):jr(At,pe,Tt)},ki=function(At,mt){ee(At);var Tt=ae(mt),pe=E(Tt).concat(fr(Tt));return gt(pe,function(Pe){(!O||b(jn,Tt,Pe))&&ei(At,Pe,Tt[Pe])}),At},mi=function(At,mt){return mt===void 0?L(At):ki(L(At),mt)},jn=function(At){var mt=q(At),Tt=b(ht,this,mt);return this===qe&&K(nr,mt)&&!K(er,mt)?!1:Tt||!K(this,mt)||!K(nr,mt)||K(this,ut)&&this[ut][mt]?Tt:!0},mn=function(At,mt){var Tt=ae(At),pe=q(mt);if(!(Tt===qe&&K(nr,pe)&&!K(er,pe))){var Pe=kr(Tt,pe);return Pe&&K(nr,pe)&&!(K(Tt,ut)&&Tt[ut][pe])&&(Pe.enumerable=!0),Pe}},vn=function(At){var mt=qr(ae(At)),Tt=[];return gt(mt,function(pe){!K(nr,pe)&&!K(xe,pe)&&$t(Tt,pe)}),Tt},fr=function(Ft){var At=Ft===qe,mt=qr(At?er:ae(Ft)),Tt=[];return gt(mt,function(pe){K(nr,pe)&&(!At||K(qe,pe))&&$t(Tt,nr[pe])}),Tt};j||(bt=function(){if(ie(Lt,this))throw Rt("Symbol is not a constructor");var At=!arguments.length||arguments[0]===void 0?void 0:V(arguments[0]),mt=ue(At),Tt=function(pe){this===qe&&b(Tt,er,pe),K(this,ut)&&K(this[ut],mt)&&(this[ut][mt]=!1),Wn(this,mt,J(1,pe))};return O&&Vi&&Wn(qe,mt,{configurable:!0,set:Tt}),Hn(mt,At)},Lt=bt[lt],H(Lt,"toString",function(){return Fe(this).tag}),H(bt,"withoutSetter",function(Ft){return Hn(ue(Ft),Ft)}),Q.f=jn,Y.f=ei,X.f=ki,ne.f=mn,N.f=U.f=vn,se.f=fr,He.f=function(Ft){return Hn(Ne(Ft),Ft)},O&&(de(Lt,"description",{configurable:!0,get:function(){return Fe(this).description}}),A||H(qe,"propertyIsEnumerable",jn,{unsafe:!0}))),m({global:!0,constructor:!0,wrap:!0,forced:!j,sham:!j},{Symbol:bt}),gt(E(kn),function(Ft){Re(Ft)}),m({target:yt,stat:!0,forced:!j},{useSetter:function(){Vi=!0},useSimple:function(){Vi=!1}}),m({target:"Object",stat:!0,forced:!j,sham:!O},{create:mi,defineProperty:ei,defineProperties:ki,getOwnPropertyDescriptor:mn}),m({target:"Object",stat:!0,forced:!j},{getOwnPropertyNames:vn}),ze(),Be(bt,yt),xe[ut]=!0},63906:()=>{},3598:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(18768),_=c(46025),A=c(95976),O=c(82294),j=A("string-to-symbol-registry"),$=A("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!O},{for:function(K){var ie=_(K);if(b(j,ie))return j[ie];var ee=w("Symbol")(ie);return j[ie]=ee,$[ee]=ie,ee}})},39542:(x,k,c)=>{var m=c(64832);m("hasInstance")},47882:(x,k,c)=>{var m=c(64832);m("isConcatSpreadable")},84911:(x,k,c)=>{var m=c(64832);m("iterator")},68030:(x,k,c)=>{c(16212),c(3598),c(50338),c(39306),c(86884)},50338:(x,k,c)=>{var m=c(30080),w=c(18768),b=c(28609),_=c(18342),A=c(95976),O=c(82294),j=A("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!O},{keyFor:function(K){if(!b(K))throw TypeError(_(K)+" is not a symbol");if(w(j,K))return j[K]}})},47954:(x,k,c)=>{var m=c(64832);m("matchAll")},88725:(x,k,c)=>{var m=c(64832);m("match")},67703:(x,k,c)=>{var m=c(64832);m("replace")},2220:(x,k,c)=>{var m=c(64832);m("search")},48990:(x,k,c)=>{var m=c(64832);m("species")},50240:(x,k,c)=>{var m=c(64832);m("split")},99921:(x,k,c)=>{var m=c(64832),w=c(95679);m("toPrimitive"),w()},3502:(x,k,c)=>{var m=c(97080),w=c(64832),b=c(98889);w("toStringTag"),b(m("Symbol"),"Symbol")},80220:(x,k,c)=>{var m=c(64832);m("unscopables")},45987:(x,k,c)=>{var m=c(64832);m("asyncDispose")},42319:(x,k,c)=>{var m=c(64832);m("dispose")},58052:(x,k,c)=>{var m=c(30080),w=c(97080),b=c(90406),_=w("Symbol"),A=_.keyFor,O=b(_.prototype.valueOf);m({target:"Symbol",stat:!0},{isRegistered:function($){try{return A(O($))!==void 0}catch(K){return!1}}})},90181:(x,k,c)=>{for(var m=c(30080),w=c(95976),b=c(97080),_=c(90406),A=c(28609),O=c(33538),j=b("Symbol"),$=j.isWellKnown,K=b("Object","getOwnPropertyNames"),ie=_(j.prototype.valueOf),ee=w("wks"),ae=0,q=K(j),V=q.length;ae<V;ae++)try{var J=q[ae];A(j[J])&&O(J)}catch(L){}m({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(E){if($&&$(E))return!0;try{for(var N=ie(E),U=0,se=K(ee),ne=se.length;U<ne;U++)if(ee[se[U]]==N)return!0}catch(Y){}return!1}})},25129:(x,k,c)=>{var m=c(64832);m("matcher")},90397:(x,k,c)=>{var m=c(64832);m("metadataKey")},82793:(x,k,c)=>{var m=c(64832);m("metadata")},18097:(x,k,c)=>{var m=c(64832);m("observable")},67574:(x,k,c)=>{var m=c(64832);m("patternMatch")},20122:(x,k,c)=>{var m=c(64832);m("replaceAll")},48713:(x,k,c)=>{c(44390);var m=c(81595),w=c(62447),b=c(82059),_=c(20410),A=c(94609),O=c(33538),j=O("toStringTag");for(var $ in m){var K=w[$],ie=K&&K.prototype;ie&&b(ie)!==j&&_(ie,j,$),A[$]=A.Array}},41544:(x,k,c)=>{var m=c(94537);x.exports=m},44928:(x,k,c)=>{var m=c(55794);x.exports=m},26087:(x,k,c)=>{c(48713);var m=c(82059),w=c(18768),b=c(15166),_=c(41544),A=Array.prototype,O={DOMTokenList:!0,NodeList:!0};x.exports=function(j){var $=j.forEach;return j===A||b(A,j)&&$===A.forEach||w(O,m(j))?_:$}},11783:(x,k,c)=>{var m=c(85838);x.exports=m},88462:(x,k,c)=>{var m=c(95617);x.exports=m},83531:(x,k,c)=>{var m=c(11906);x.exports=m},19941:(x,k,c)=>{var m=c(59123);x.exports=m},25081:(x,k,c)=>{var m=c(63332);x.exports=m},22145:(x,k,c)=>{var m=c(83606);x.exports=m},93690:(x,k,c)=>{var m=c(90660);x.exports=m},8429:(x,k,c)=>{var m=c(49198);c(48713),x.exports=m},13099:(x,k,c)=>{var m=c(15413);c(48713),x.exports=m},44931:(x,k,c)=>{var m=c(4793);x.exports=m},81933:function(){(function(x){var k=function(c){var m={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(Q){return!1}}(),formData:"FormData"in x,arrayBuffer:"ArrayBuffer"in x};function w(Q){return Q&&DataView.prototype.isPrototypeOf(Q)}if(m.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=ArrayBuffer.isView||function(Q){return Q&&b.indexOf(Object.prototype.toString.call(Q))>-1};function A(Q){if(typeof Q!="string"&&(Q=String(Q)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Q))throw new TypeError("Invalid character in header field name");return Q.toLowerCase()}function O(Q){return typeof Q!="string"&&(Q=String(Q)),Q}function j(Q){var H={next:function(){var de=Q.shift();return{done:de===void 0,value:de}}};return m.iterable&&(H[Symbol.iterator]=function(){return H}),H}function $(Q){this.map={},Q instanceof $?Q.forEach(function(H,de){this.append(de,H)},this):Array.isArray(Q)?Q.forEach(function(H){this.append(H[0],H[1])},this):Q&&Object.getOwnPropertyNames(Q).forEach(function(H){this.append(H,Q[H])},this)}$.prototype.append=function(Q,H){Q=A(Q),H=O(H);var de=this.map[Q];this.map[Q]=de?de+", "+H:H},$.prototype.delete=function(Q){delete this.map[A(Q)]},$.prototype.get=function(Q){return Q=A(Q),this.has(Q)?this.map[Q]:null},$.prototype.has=function(Q){return this.map.hasOwnProperty(A(Q))},$.prototype.set=function(Q,H){this.map[A(Q)]=O(H)},$.prototype.forEach=function(Q,H){for(var de in this.map)this.map.hasOwnProperty(de)&&Q.call(H,this.map[de],de,this)},$.prototype.keys=function(){var Q=[];return this.forEach(function(H,de){Q.push(de)}),j(Q)},$.prototype.values=function(){var Q=[];return this.forEach(function(H){Q.push(H)}),j(Q)},$.prototype.entries=function(){var Q=[];return this.forEach(function(H,de){Q.push([de,H])}),j(Q)},m.iterable&&($.prototype[Symbol.iterator]=$.prototype.entries);function K(Q){if(Q.bodyUsed)return Promise.reject(new TypeError("Already read"));Q.bodyUsed=!0}function ie(Q){return new Promise(function(H,de){Q.onload=function(){H(Q.result)},Q.onerror=function(){de(Q.error)}})}function ee(Q){var H=new FileReader,de=ie(H);return H.readAsArrayBuffer(Q),de}function ae(Q){var H=new FileReader,de=ie(H);return H.readAsText(Q),de}function q(Q){for(var H=new Uint8Array(Q),de=new Array(H.length),Ae=0;Ae<H.length;Ae++)de[Ae]=String.fromCharCode(H[Ae]);return de.join("")}function V(Q){if(Q.slice)return Q.slice(0);var H=new Uint8Array(Q.byteLength);return H.set(new Uint8Array(Q)),H.buffer}function J(){return this.bodyUsed=!1,this._initBody=function(Q){this._bodyInit=Q,Q?typeof Q=="string"?this._bodyText=Q:m.blob&&Blob.prototype.isPrototypeOf(Q)?this._bodyBlob=Q:m.formData&&FormData.prototype.isPrototypeOf(Q)?this._bodyFormData=Q:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(Q)?this._bodyText=Q.toString():m.arrayBuffer&&m.blob&&w(Q)?(this._bodyArrayBuffer=V(Q.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Q)||_(Q))?this._bodyArrayBuffer=V(Q):this._bodyText=Q=Object.prototype.toString.call(Q):this._bodyText="",this.headers.get("content-type")||(typeof Q=="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(Q)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var Q=K(this);if(Q)return Q;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?K(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(ee)}),this.text=function(){var Q=K(this);if(Q)return Q;if(this._bodyBlob)return ae(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(q(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(U)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(Q){var H=Q.toUpperCase();return L.indexOf(H)>-1?H:Q}function N(Q,H){H=H||{};var de=H.body;if(Q instanceof N){if(Q.bodyUsed)throw new TypeError("Already read");this.url=Q.url,this.credentials=Q.credentials,H.headers||(this.headers=new $(Q.headers)),this.method=Q.method,this.mode=Q.mode,this.signal=Q.signal,!de&&Q._bodyInit!=null&&(de=Q._bodyInit,Q.bodyUsed=!0)}else this.url=String(Q);if(this.credentials=H.credentials||this.credentials||"same-origin",(H.headers||!this.headers)&&(this.headers=new $(H.headers)),this.method=E(H.method||this.method||"GET"),this.mode=H.mode||this.mode||null,this.signal=H.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&de)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(de)}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function U(Q){var H=new FormData;return Q.trim().split("&").forEach(function(de){if(de){var Ae=de.split("="),Z=Ae.shift().replace(/\+/g," "),xe=Ae.join("=").replace(/\+/g," ");H.append(decodeURIComponent(Z),decodeURIComponent(xe))}}),H}function se(Q){var H=new $,de=Q.replace(/\r?\n[\t ]+/g," ");return de.split(/\r?\n/).forEach(function(Ae){var Z=Ae.split(":"),xe=Z.shift().trim();if(xe){var ue=Z.join(":").trim();H.append(xe,ue)}}),H}J.call(N.prototype);function ne(Q,H){H||(H={}),this.type="default",this.status=H.status===void 0?200:H.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in H?H.statusText:"OK",this.headers=new $(H.headers),this.url=H.url||"",this._initBody(Q)}J.call(ne.prototype),ne.prototype.clone=function(){return new ne(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new $(this.headers),url:this.url})},ne.error=function(){var Q=new ne(null,{status:0,statusText:""});return Q.type="error",Q};var Y=[301,302,303,307,308];ne.redirect=function(Q,H){if(Y.indexOf(H)===-1)throw new RangeError("Invalid status code");return new ne(null,{status:H,headers:{location:Q}})},c.DOMException=x.DOMException;try{new c.DOMException}catch(Q){c.DOMException=function(H,de){this.message=H,this.name=de;var Ae=Error(H);this.stack=Ae.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function X(Q,H){return new Promise(function(de,Ae){var Z=new N(Q,H);if(Z.signal&&Z.signal.aborted)return Ae(new c.DOMException("Aborted","AbortError"));var xe=new XMLHttpRequest;function ue(){xe.abort()}xe.onload=function(){var Ne={status:xe.status,statusText:xe.statusText,headers:se(xe.getAllResponseHeaders()||"")};Ne.url="responseURL"in xe?xe.responseURL:Ne.headers.get("X-Request-URL");var He="response"in xe?xe.response:xe.responseText;de(new ne(He,Ne))},xe.onerror=function(){Ae(new TypeError("Network request failed"))},xe.ontimeout=function(){Ae(new TypeError("Network request failed"))},xe.onabort=function(){Ae(new c.DOMException("Aborted","AbortError"))},xe.open(Z.method,Z.url,!0),Z.credentials==="include"?xe.withCredentials=!0:Z.credentials==="omit"&&(xe.withCredentials=!1),"responseType"in xe&&m.blob&&(xe.responseType="blob"),Z.headers.forEach(function(Ne,He){xe.setRequestHeader(He,Ne)}),Z.signal&&(Z.signal.addEventListener("abort",ue),xe.onreadystatechange=function(){xe.readyState===4&&Z.signal.removeEventListener("abort",ue)}),xe.send(typeof Z._bodyInit=="undefined"?null:Z._bodyInit)})}return X.polyfill=!0,x.fetch||(x.fetch=X,x.Headers=$,x.Request=N,x.Response=ne),c.Headers=$,c.Request=N,c.Response=ne,c.fetch=X,Object.defineProperty(c,"__esModule",{value:!0}),c}({})})(typeof self!="undefined"?self:this)},58988:(x,k,c)=>{"use strict";c.r(k),c.d(k,{default:()=>O});var m=c(82163),w=c.n(m),b=c(85590),_=c.n(b),A=_()(w());A.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
42
  `,""]);const O=A},31738:(x,k,c)=>{"use strict";c.r(k),c.d(k,{default:()=>N});var m=c(82163),w=c.n(m),b=c(85590),_=c.n(b),A=c(79739),O=c.n(A),j=new URL(c(17735),c.b),$=new URL(c(56089),c.b),K=new URL(c(46050),c.b),ie=new URL(c(71090),c.b),ee=new URL(c(96192),c.b),ae=_()(w()),q=O()(j),V=O()($),J=O()(K),L=O()(ie),E=O()(ee);ae.push([x.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("+q+")}.CodeMirror-lint-mark-error{background-image:url("+V+")}.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("+J+")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("+L+")}.CodeMirror-lint-marker-multiple{background-image:url("+E+`);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
43
  `,""]);const N=ae},43395:(x,k,c)=>{"use strict";c.r(k),c.d(k,{default:()=>O});var m=c(82163),w=c.n(m),b=c(85590),_=c.n(b),A=_()(w());A.push([x.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
44
  `,""]);const O=A},98036:(x,k,c)=>{"use strict";c.r(k),c.d(k,{default:()=>O});var m=c(82163),w=c.n(m),b=c(85590),_=c.n(b),A=_()(w());A.push([x.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 O=A},79739:x=>{"use strict";x.exports=function(k,c){return c||(c={}),k&&(k=String(k.__esModule?k.default:k),/^['"].*['"]$/.test(k)&&(k=k.slice(1,-1)),c.hash&&(k+=c.hash),/["'() \t\n]|(%20)/.test(k)||c.needQuotes?'"'.concat(k.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):k)}},10512:(x,k,c)=>{"use strict";c.r(k),c.d(k,{Console:()=>x9});var m={};c.r(m),c.d(m,{JsonPatchError:()=>Mt,_areEquals:()=>Qa,applyOperation:()=>go,applyPatch:()=>Us,applyReducer:()=>Vc,deepClone:()=>Ja,getValueByPointer:()=>Ya,validate:()=>iu,validator:()=>Xa});var w={};c.r(w),c.d(w,{compare:()=>nd,generate:()=>sa,observe:()=>jv,unobserve:()=>qa});var b={};c.r(b),c.d(b,{hasElementSourceMap:()=>yg,includesClasses:()=>ff,includesSymbols:()=>eC,isAnnotationElement:()=>ZA,isArrayElement:()=>Ki,isBooleanElement:()=>Dd,isCommentElement:()=>qA,isElement:()=>Ld,isLinkElement:()=>T0,isMemberElement:()=>Vu,isNullElement:()=>P0,isNumberElement:()=>_0,isObjectElement:()=>sr,isParseResultElement:()=>k0,isPrimitiveElement:()=>To,isRefElement:()=>V0,isSourceMapElement:()=>j0,isStringElement:()=>Ct});var _={};c.r(_),c.d(_,{isJSONReferenceElement:()=>VP,isJSONSchemaElement:()=>TP,isLinkDescriptionElement:()=>jP,isMediaElement:()=>kP});var A={};c.r(A),c.d(A,{isOpenApi3_0LikeElement:()=>zP,isOpenApiExtension:()=>Tg,isParameterLikeElement:()=>GP,isReferenceLikeElement:()=>xr,isRequestBodyLikeElement:()=>KP,isResponseLikeElement:()=>JP,isServerLikeElement:()=>gb,isTagLikeElement:()=>yb});var O={};c.r(O),c.d(O,{isBooleanJsonSchemaElement:()=>zT,isCallbackElement:()=>PT,isComponentsElement:()=>TT,isContactElement:()=>VT,isExampleElement:()=>kT,isExternalDocumentationElement:()=>jT,isHeaderElement:()=>Lu,isInfoElement:()=>IT,isLicenseElement:()=>RT,isLinkElement:()=>bb,isLinkElementExternal:()=>FT,isMediaTypeElement:()=>lh,isOpenApi3_0Element:()=>LT,isOpenapiElement:()=>MT,isOperationElement:()=>xb,isParameterElement:()=>DT,isPathItemElement:()=>oh,isPathItemElementExternal:()=>NT,isPathsElement:()=>BT,isReferenceElement:()=>_r,isReferenceElementExternal:()=>$T,isRequestBodyElement:()=>UT,isResponseElement:()=>ah,isResponsesElement:()=>WT,isSchemaElement:()=>HT,isSecurityRequirementElement:()=>GT,isServerElement:()=>KT,isServerVariableElement:()=>JT});var j={};c.r(j),c.d(j,{isBooleanJsonSchemaElement:()=>Hg,isCallbackElement:()=>QI,isComponentsElement:()=>ZI,isContactElement:()=>qI,isExampleElement:()=>eR,isExternalDocumentationElement:()=>tR,isHeaderElement:()=>rR,isInfoElement:()=>nR,isJsonSchemaDialectElement:()=>Lb,isLicenseElement:()=>iR,isLinkElement:()=>Db,isLinkElementExternal:()=>sm,isMediaTypeElement:()=>hR,isOpenApi3_1Element:()=>Wg,isOpenapiElement:()=>sR,isOperationElement:()=>Nb,isParameterElement:()=>oR,isPathItemElement:()=>om,isPathItemElementExternal:()=>am,isPathsElement:()=>aR,isReferenceElement:()=>Nu,isReferenceElementExternal:()=>lm,isRequestBodyElement:()=>lR,isResponseElement:()=>uR,isResponsesElement:()=>cR,isSchemaElement:()=>Bu,isSecurityRequirementElement:()=>fR,isServerElement:()=>pR,isServerVariableElement:()=>dR});var $={};c.r($),c.d($,{cookie:()=>V2,header:()=>T2,path:()=>C2,query:()=>_2});var K=c(10954),ie=c(70762),ee=c(93652),ae=c(77844),q=c(10017),V=c(86351),J=c(86751),L=c(12953),E=c(55839),N=c(23422);function U(e){return U=typeof E=="function"&&typeof N=="symbol"?function(t){return typeof t}:function(t){return t&&typeof E=="function"&&t.constructor===E&&t!==E.prototype?"symbol":typeof t},U(e)}var se=c(47319);function ne(e,t){if(U(e)!=="object"||e===null)return e;var r=e[se];if(r!==void 0){var n=r.call(e,t||"default");if(U(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y(e){var t=ne(e,"string");return U(t)==="symbol"?t:String(t)}function X(e,t,r){return t=Y(t),t in e?L(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q(e,t){var r=K(e);if(ie){var n=ie(e);t&&(n=ee(n).call(n,function(s){return ae(e,s).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r,n,s=arguments[t]!=null?arguments[t]:{};t%2?q(r=Q(Object(s),!0)).call(r,function(a){X(e,a,s[a])}):V?J(e,V(s)):q(n=Q(Object(s))).call(n,function(a){L(e,a,ae(s,a))})}return e}var de=c(51121),Ae=c(81933),Z=c(71434),xe=c.n(Z);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ue(e){return typeof e=="undefined"||e===null}function Ne(e){return typeof e=="object"&&e!==null}function He(e){return Array.isArray(e)?e:ue(e)?[]:[e]}function Re(e,t){var r,n,s,a;if(t)for(a=Object.keys(t),r=0,n=a.length;r<n;r+=1)s=a[r],e[s]=t[s];return e}function ze(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function Be(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ye=ue,gt=Ne,ut=He,yt=ze,lt=Be,Ke=Re,Fe={isNothing:Ye,isObject:gt,toArray:ut,repeat:yt,isNegativeZero:lt,extend:Ke};function qe(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
45
+ `,""]);const O=A},79739:x=>{"use strict";x.exports=function(k,c){return c||(c={}),k&&(k=String(k.__esModule?k.default:k),/^['"].*['"]$/.test(k)&&(k=k.slice(1,-1)),c.hash&&(k+=c.hash),/["'() \t\n]|(%20)/.test(k)||c.needQuotes?'"'.concat(k.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):k)}},10512:(x,k,c)=>{"use strict";c.r(k),c.d(k,{Console:()=>x9});var m={};c.r(m),c.d(m,{JsonPatchError:()=>Mt,_areEquals:()=>Qa,applyOperation:()=>go,applyPatch:()=>Us,applyReducer:()=>Vc,deepClone:()=>Ja,getValueByPointer:()=>Ya,validate:()=>iu,validator:()=>Xa});var w={};c.r(w),c.d(w,{compare:()=>nd,generate:()=>sa,observe:()=>jv,unobserve:()=>qa});var b={};c.r(b),c.d(b,{hasElementSourceMap:()=>yg,includesClasses:()=>ff,includesSymbols:()=>eC,isAnnotationElement:()=>ZA,isArrayElement:()=>Gi,isBooleanElement:()=>Dd,isCommentElement:()=>qA,isElement:()=>Ld,isLinkElement:()=>T0,isMemberElement:()=>Vu,isNullElement:()=>P0,isNumberElement:()=>_0,isObjectElement:()=>sr,isParseResultElement:()=>k0,isPrimitiveElement:()=>To,isRefElement:()=>V0,isSourceMapElement:()=>j0,isStringElement:()=>Ct});var _={};c.r(_),c.d(_,{isJSONReferenceElement:()=>VP,isJSONSchemaElement:()=>TP,isLinkDescriptionElement:()=>jP,isMediaElement:()=>kP});var A={};c.r(A),c.d(A,{isOpenApi3_0LikeElement:()=>zP,isOpenApiExtension:()=>Tg,isParameterLikeElement:()=>GP,isReferenceLikeElement:()=>xr,isRequestBodyLikeElement:()=>KP,isResponseLikeElement:()=>JP,isServerLikeElement:()=>gb,isTagLikeElement:()=>yb});var O={};c.r(O),c.d(O,{isBooleanJsonSchemaElement:()=>zT,isCallbackElement:()=>PT,isComponentsElement:()=>TT,isContactElement:()=>VT,isExampleElement:()=>kT,isExternalDocumentationElement:()=>jT,isHeaderElement:()=>Lu,isInfoElement:()=>IT,isLicenseElement:()=>RT,isLinkElement:()=>bb,isLinkElementExternal:()=>FT,isMediaTypeElement:()=>lh,isOpenApi3_0Element:()=>LT,isOpenapiElement:()=>MT,isOperationElement:()=>xb,isParameterElement:()=>DT,isPathItemElement:()=>oh,isPathItemElementExternal:()=>NT,isPathsElement:()=>BT,isReferenceElement:()=>_r,isReferenceElementExternal:()=>$T,isRequestBodyElement:()=>UT,isResponseElement:()=>ah,isResponsesElement:()=>WT,isSchemaElement:()=>HT,isSecurityRequirementElement:()=>GT,isServerElement:()=>KT,isServerVariableElement:()=>JT});var j={};c.r(j),c.d(j,{isBooleanJsonSchemaElement:()=>Hg,isCallbackElement:()=>QI,isComponentsElement:()=>ZI,isContactElement:()=>qI,isExampleElement:()=>eR,isExternalDocumentationElement:()=>tR,isHeaderElement:()=>rR,isInfoElement:()=>nR,isJsonSchemaDialectElement:()=>Lb,isLicenseElement:()=>iR,isLinkElement:()=>Db,isLinkElementExternal:()=>sm,isMediaTypeElement:()=>hR,isOpenApi3_1Element:()=>Wg,isOpenapiElement:()=>sR,isOperationElement:()=>Nb,isParameterElement:()=>oR,isPathItemElement:()=>om,isPathItemElementExternal:()=>am,isPathsElement:()=>aR,isReferenceElement:()=>Nu,isReferenceElementExternal:()=>lm,isRequestBodyElement:()=>lR,isResponseElement:()=>uR,isResponsesElement:()=>cR,isSchemaElement:()=>Bu,isSecurityRequirementElement:()=>fR,isServerElement:()=>pR,isServerVariableElement:()=>dR});var $={};c.r($),c.d($,{cookie:()=>V2,header:()=>T2,path:()=>C2,query:()=>_2});var K=c(10954),ie=c(70762),ee=c(93652),ae=c(77844),q=c(10017),V=c(86351),J=c(86751),L=c(12953),E=c(55839),N=c(23422);function U(e){return U=typeof E=="function"&&typeof N=="symbol"?function(t){return typeof t}:function(t){return t&&typeof E=="function"&&t.constructor===E&&t!==E.prototype?"symbol":typeof t},U(e)}var se=c(47319);function ne(e,t){if(U(e)!=="object"||e===null)return e;var r=e[se];if(r!==void 0){var n=r.call(e,t||"default");if(U(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y(e){var t=ne(e,"string");return U(t)==="symbol"?t:String(t)}function X(e,t,r){return t=Y(t),t in e?L(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q(e,t){var r=K(e);if(ie){var n=ie(e);t&&(n=ee(n).call(n,function(s){return ae(e,s).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r,n,s=arguments[t]!=null?arguments[t]:{};t%2?q(r=Q(Object(s),!0)).call(r,function(a){X(e,a,s[a])}):V?J(e,V(s)):q(n=Q(Object(s))).call(n,function(a){L(e,a,ae(s,a))})}return e}var de=c(51121),Ae=c(81933),Z=c(71434),xe=c.n(Z);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ue(e){return typeof e=="undefined"||e===null}function Ne(e){return typeof e=="object"&&e!==null}function He(e){return Array.isArray(e)?e:ue(e)?[]:[e]}function Re(e,t){var r,n,s,a;if(t)for(a=Object.keys(t),r=0,n=a.length;r<n;r+=1)s=a[r],e[s]=t[s];return e}function ze(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function Be(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ye=ue,gt=Ne,ut=He,yt=ze,lt=Be,Ke=Re,Fe={isNothing:Ye,isObject:gt,toArray:ut,repeat:yt,isNegativeZero:lt,extend:Ke};function qe(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
46
46
 
47
47
  `+e.mark.snippet),n+" "+r):n}function bt(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}bt.prototype=Object.create(Error.prototype),bt.prototype.constructor=bt,bt.prototype.toString=function(t){return this.name+": "+qe(this,t)};var Lt=bt;function Rt(e,t,r,n,s){var a="",p="",d=Math.floor(s/2)-1;return n-t>d&&(a=" ... ",t=n-d+a.length),r-n>d&&(p=" ...",r=n+d-p.length),{str:a+e.slice(t,r).replace(/\t/g,"\u2192")+p,pos:n-t+a.length}}function zt(e,t){return Fe.repeat(" ",t-e.length)+e}function kr(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],s=[],a,p=-1;a=r.exec(e.buffer);)s.push(a.index),n.push(a.index+a[0].length),e.position<=a.index&&p<0&&(p=n.length-2);p<0&&(p=n.length-1);var d="",h,g,y=Math.min(e.line+t.linesAfter,s.length).toString().length,C=t.maxLength-(t.indent+y+3);for(h=1;h<=t.linesBefore&&!(p-h<0);h++)g=Rt(e.buffer,n[p-h],s[p-h],e.position-(n[p]-n[p-h]),C),d=Fe.repeat(" ",t.indent)+zt((e.line-h+1).toString(),y)+" | "+g.str+`
48
48
  `+d;for(g=Rt(e.buffer,n[p],s[p],e.position,C),d+=Fe.repeat(" ",t.indent)+zt((e.line+1).toString(),y)+" | "+g.str+`
49
49
  `,d+=Fe.repeat("-",t.indent+y+3+g.pos)+`^
50
50
  `,h=1;h<=t.linesAfter&&!(p+h>=s.length);h++)g=Rt(e.buffer,n[p+h],s[p+h],e.position-(n[p]-n[p+h]),C),d+=Fe.repeat(" ",t.indent)+zt((e.line+h+1).toString(),y)+" | "+g.str+`
51
- `;return d.replace(/\n$/,"")}var jr=kr,qr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ht=["scalar","sequence","mapping"];function $t(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function nr(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(qr.indexOf(r)===-1)throw new Lt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=$t(t.styleAliases||null),ht.indexOf(this.kind)===-1)throw new Lt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var er=nr;function kn(e,t){var r=[];return e[t].forEach(function(n){var s=r.length;r.forEach(function(a,p){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(s=p)}),r[s]=n}),r}function ki(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function Wn(e){return this.extend(e)}Wn.prototype.extend=function(t){var r=[],n=[];if(t instanceof er)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Lt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof er))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Lt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Lt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof er))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Wn.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=kn(s,"implicit"),s.compiledExplicit=kn(s,"explicit"),s.compiledTypeMap=ki(s.compiledImplicit,s.compiledExplicit),s};var Hn=Wn,ei=new er("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ji=new er("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),vi=new er("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),jn=new Hn({explicit:[ei,ji,vi]});function mn(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function vn(){return null}function fr(e){return e===null}var Ft=new er("tag:yaml.org,2002:null",{kind:"scalar",resolve:mn,construct:vn,predicate:fr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function At(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function mt(e){return e==="true"||e==="True"||e==="TRUE"}function Tt(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var pe=new er("tag:yaml.org,2002:bool",{kind:"scalar",resolve:At,construct:mt,predicate:Tt,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 Pe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Je(e){return 48<=e&&e<=55}function xt(e){return 48<=e&&e<=57}function _t(e){if(e===null)return!1;var t=e.length,r=0,n=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;n=!0}return n&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Pe(e.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Je(e.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!xt(e.charCodeAt(r)))return!1;n=!0}return!(!n||s==="_")}function Ot(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Sr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Fe.isNegativeZero(e)}var sn=new er("tag:yaml.org,2002:int",{kind:"scalar",resolve:_t,construct:Ot,predicate:Sr,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"]}}),Xt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fr(e){return!(e===null||!Xt.test(e)||e[e.length-1]==="_")}function rs(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var on=/^[-+]?[0-9]+e/;function an(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fe.isNegativeZero(e))return"-0.0";return r=e.toString(10),on.test(r)?r.replace("e",".e"):r}function ns(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Fe.isNegativeZero(e))}var ln=new er("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fr,construct:rs,predicate:ns,represent:an,defaultStyle:"lowercase"}),Ii=jn.extend({implicit:[Ft,pe,sn,ln]}),Ri=Ii,un=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ss=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 Fi(e){return e===null?!1:un.exec(e)!==null||ss.exec(e)!==null}function Ts(e){var t,r,n,s,a,p,d,h=0,g=null,y,C,M;if(t=un.exec(e),t===null&&(t=ss.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,n,s));if(a=+t[4],p=+t[5],d=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(y=+t[10],C=+(t[11]||0),g=(y*60+C)*6e4,t[9]==="-"&&(g=-g)),M=new Date(Date.UTC(r,n,s,a,p,d,h)),g&&M.setTime(M.getTime()-g),M}function Wo(e){return e.toISOString()}var In=new er("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Fi,construct:Ts,instanceOf:Date,represent:Wo});function Rn(e){return e==="<<"||e===null}var Fn=new er("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Rn}),En=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
52
- \r`;function ti(e){if(e===null)return!1;var t,r,n=0,s=e.length,a=En;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function ka(e){var t,r,n=e.replace(/[\r\n=]/g,""),s=n.length,a=En,p=0,d=[];for(t=0;t<s;t++)t%4===0&&t&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|a.indexOf(n.charAt(t));return r=s%4*6,r===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):r===18?(d.push(p>>10&255),d.push(p>>2&255)):r===12&&d.push(p>>4&255),new Uint8Array(d)}function gi(e){var t="",r=0,n,s,a=e.length,p=En;for(n=0;n<a;n++)n%3===0&&n&&(t+=p[r>>18&63],t+=p[r>>12&63],t+=p[r>>6&63],t+=p[r&63]),r=(r<<8)+e[n];return s=a%3,s===0?(t+=p[r>>18&63],t+=p[r>>12&63],t+=p[r>>6&63],t+=p[r&63]):s===2?(t+=p[r>>10&63],t+=p[r>>4&63],t+=p[r<<2&63],t+=p[64]):s===1&&(t+=p[r>>2&63],t+=p[r<<4&63],t+=p[64],t+=p[64]),t}function An(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ir=new er("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ti,construct:ka,predicate:An,represent:gi}),os=Object.prototype.hasOwnProperty,ri=Object.prototype.toString;function Ho(e){if(e===null)return!0;var t=[],r,n,s,a,p,d=e;for(r=0,n=d.length;r<n;r+=1){if(s=d[r],p=!1,ri.call(s)!=="[object Object]")return!1;for(a in s)if(os.call(s,a))if(!p)p=!0;else return!1;if(!p)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function Ml(e){return e!==null?e:[]}var hr=new er("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ho,construct:Ml}),rt=Object.prototype.toString;function as(e){if(e===null)return!0;var t,r,n,s,a,p=e;for(a=new Array(p.length),t=0,r=p.length;t<r;t+=1){if(n=p[t],rt.call(n)!=="[object Object]"||(s=Object.keys(n),s.length!==1))return!1;a[t]=[s[0],n[s[0]]]}return!0}function oo(e){if(e===null)return[];var t,r,n,s,a,p=e;for(a=new Array(p.length),t=0,r=p.length;t<r;t+=1)n=p[t],s=Object.keys(n),a[t]=[s[0],n[s[0]]];return a}var zn=new er("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:as,construct:oo}),Qt=Object.prototype.hasOwnProperty;function ls(e){if(e===null)return!0;var t,r=e;for(t in r)if(Qt.call(r,t)&&r[t]!==null)return!1;return!0}function ao(e){return e!==null?e:{}}var lo=new er("tag:yaml.org,2002:set",{kind:"mapping",resolve:ls,construct:ao}),F=Ri.extend({implicit:[In,Fn],explicit:[Ir,hr,zn,lo]}),re=Object.prototype.hasOwnProperty,je=1,Le=2,St=3,jt=4,Zt=1,nt=2,Gn=3,Ll=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dl=/[\x85\u2028\u2029]/,Mi=/[,\[\]\{\}]/,nc=/^(?:!|!!|![a-z\-]+!)$/i,ic=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function zo(e){return Object.prototype.toString.call(e)}function ni(e){return e===10||e===13}function Vs(e){return e===9||e===32}function gn(e){return e===9||e===32||e===10||e===13}function uo(e){return e===44||e===91||e===93||e===123||e===125}function gp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function yp(e){return e===120?2:e===117?4:e===85?8:0}function bp(e){return 48<=e&&e<=57?e-48:-1}function xp(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
53
- `: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 lv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var sc=new Array(256),Li=new Array(256),Go=0;Go<256;Go++)sc[Go]=xp(Go)?1:0,Li[Go]=xp(Go);function uv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||F,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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 ja(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jr(r),new Lt(t,r)}function ot(e,t){throw ja(e,t)}function Nl(e,t){e.onWarning&&e.onWarning.call(null,ja(e,t))}var Sp={YAML:function(t,r,n){var s,a,p;t.version!==null&&ot(t,"duplication of %YAML directive"),n.length!==1&&ot(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&ot(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),p=parseInt(s[2],10),a!==1&&ot(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=p<2,p!==1&&p!==2&&Nl(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var s,a;n.length!==2&&ot(t,"TAG directive accepts exactly two arguments"),s=n[0],a=n[1],nc.test(s)||ot(t,"ill-formed tag handle (first argument) of the TAG directive"),re.call(t.tagMap,s)&&ot(t,'there is a previously declared suffix for "'+s+'" tag handle'),ic.test(a)||ot(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(p){ot(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a}};function ks(e,t,r,n){var s,a,p,d;if(t<r){if(d=e.input.slice(t,r),n)for(s=0,a=d.length;s<a;s+=1)p=d.charCodeAt(s),p===9||32<=p&&p<=1114111||ot(e,"expected valid JSON character");else Ll.test(d)&&ot(e,"the stream contains non-printable characters");e.result+=d}}function wp(e,t,r,n){var s,a,p,d;for(Fe.isObject(r)||ot(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),p=0,d=s.length;p<d;p+=1)a=s[p],re.call(t,a)||(t[a]=r[a],n[a]=!0)}function js(e,t,r,n,s,a,p,d,h){var g,y;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),g=0,y=s.length;g<y;g+=1)Array.isArray(s[g])&&ot(e,"nested arrays are not supported inside keys"),typeof s=="object"&&zo(s[g])==="[object Object]"&&(s[g]="[object Object]");if(typeof s=="object"&&zo(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(g=0,y=a.length;g<y;g+=1)wp(e,t,a[g],r);else wp(e,t,a,r);else!e.json&&!re.call(r,s)&&re.call(t,s)&&(e.line=p||e.line,e.lineStart=d||e.lineStart,e.position=h||e.position,ot(e,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(t,s,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[s]=a,delete r[s];return t}function Bl(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ot(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Dr(e,t,r){for(var n=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Vs(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(ni(s))for(Bl(e),s=e.input.charCodeAt(e.position),n++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Nl(e,"deficient indentation"),n}function Ia(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||gn(r)))}function $l(e,t){t===1?e.result+=" ":t>1&&(e.result+=Fe.repeat(`
54
- `,t-1))}function Ul(e,t,r){var n,s,a,p,d,h,g,y,C=e.kind,M=e.result,I;if(I=e.input.charCodeAt(e.position),gn(I)||uo(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)&&(s=e.input.charCodeAt(e.position+1),gn(s)||r&&uo(s)))return!1;for(e.kind="scalar",e.result="",a=p=e.position,d=!1;I!==0;){if(I===58){if(s=e.input.charCodeAt(e.position+1),gn(s)||r&&uo(s))break}else if(I===35){if(n=e.input.charCodeAt(e.position-1),gn(n))break}else{if(e.position===e.lineStart&&Ia(e)||r&&uo(I))break;if(ni(I))if(h=e.line,g=e.lineStart,y=e.lineIndent,Dr(e,!1,-1),e.lineIndent>=t){d=!0,I=e.input.charCodeAt(e.position);continue}else{e.position=p,e.line=h,e.lineStart=g,e.lineIndent=y;break}}d&&(ks(e,a,p,!1),$l(e,e.line-h),a=p=e.position,d=!1),Vs(I)||(p=e.position+1),I=e.input.charCodeAt(++e.position)}return ks(e,a,p,!1),e.result?!0:(e.kind=C,e.result=M,!1)}function Wl(e,t){var r,n,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ks(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,s=e.position;else return!0;else ni(r)?(ks(e,n,s,!0),$l(e,Dr(e,!1,t)),n=s=e.position):e.position===e.lineStart&&Ia(e)?ot(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);ot(e,"unexpected end of the stream within a single quoted scalar")}function oc(e,t){var r,n,s,a,p,d;if(d=e.input.charCodeAt(e.position),d!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(d=e.input.charCodeAt(e.position))!==0;){if(d===34)return ks(e,r,e.position,!0),e.position++,!0;if(d===92){if(ks(e,r,e.position,!0),d=e.input.charCodeAt(++e.position),ni(d))Dr(e,!1,t);else if(d<256&&sc[d])e.result+=Li[d],e.position++;else if((p=yp(d))>0){for(s=p,a=0;s>0;s--)d=e.input.charCodeAt(++e.position),(p=gp(d))>=0?a=(a<<4)+p:ot(e,"expected hexadecimal character");e.result+=lv(a),e.position++}else ot(e,"unknown escape sequence");r=n=e.position}else ni(d)?(ks(e,r,n,!0),$l(e,Dr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Ia(e)?ot(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ot(e,"unexpected end of the stream within a double quoted scalar")}function Op(e,t){var r=!0,n,s,a,p=e.tag,d,h=e.anchor,g,y,C,M,I,B=Object.create(null),z,W,G,te;if(te=e.input.charCodeAt(e.position),te===91)y=93,I=!1,d=[];else if(te===123)y=125,I=!0,d={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),te=e.input.charCodeAt(++e.position);te!==0;){if(Dr(e,!0,t),te=e.input.charCodeAt(e.position),te===y)return e.position++,e.tag=p,e.anchor=h,e.kind=I?"mapping":"sequence",e.result=d,!0;r?te===44&&ot(e,"expected the node content, but found ','"):ot(e,"missed comma between flow collection entries"),W=z=G=null,C=M=!1,te===63&&(g=e.input.charCodeAt(e.position+1),gn(g)&&(C=M=!0,e.position++,Dr(e,!0,t))),n=e.line,s=e.lineStart,a=e.position,Ko(e,t,je,!1,!0),W=e.tag,z=e.result,Dr(e,!0,t),te=e.input.charCodeAt(e.position),(M||e.line===n)&&te===58&&(C=!0,te=e.input.charCodeAt(++e.position),Dr(e,!0,t),Ko(e,t,je,!1,!0),G=e.result),I?js(e,d,B,W,z,G,n,s,a):C?d.push(js(e,null,B,W,z,G,n,s,a)):d.push(z),Dr(e,!0,t),te=e.input.charCodeAt(e.position),te===44?(r=!0,te=e.input.charCodeAt(++e.position)):r=!1}ot(e,"unexpected end of the stream within a flow collection")}function Ep(e,t){var r,n,s=Zt,a=!1,p=!1,d=t,h=0,g=!1,y,C;if(C=e.input.charCodeAt(e.position),C===124)n=!1;else if(C===62)n=!0;else return!1;for(e.kind="scalar",e.result="";C!==0;)if(C=e.input.charCodeAt(++e.position),C===43||C===45)Zt===s?s=C===43?Gn:nt:ot(e,"repeat of a chomping mode identifier");else if((y=bp(C))>=0)y===0?ot(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?ot(e,"repeat of an indentation width identifier"):(d=t+y-1,p=!0);else break;if(Vs(C)){do C=e.input.charCodeAt(++e.position);while(Vs(C));if(C===35)do C=e.input.charCodeAt(++e.position);while(!ni(C)&&C!==0)}for(;C!==0;){for(Bl(e),e.lineIndent=0,C=e.input.charCodeAt(e.position);(!p||e.lineIndent<d)&&C===32;)e.lineIndent++,C=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>d&&(d=e.lineIndent),ni(C)){h++;continue}if(e.lineIndent<d){s===Gn?e.result+=Fe.repeat(`
51
+ `;return d.replace(/\n$/,"")}var jr=kr,qr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ht=["scalar","sequence","mapping"];function $t(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function nr(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(qr.indexOf(r)===-1)throw new Lt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=$t(t.styleAliases||null),ht.indexOf(this.kind)===-1)throw new Lt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var er=nr;function kn(e,t){var r=[];return e[t].forEach(function(n){var s=r.length;r.forEach(function(a,p){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(s=p)}),r[s]=n}),r}function Vi(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function Wn(e){return this.extend(e)}Wn.prototype.extend=function(t){var r=[],n=[];if(t instanceof er)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Lt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof er))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Lt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Lt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof er))throw new Lt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Wn.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=kn(s,"implicit"),s.compiledExplicit=kn(s,"explicit"),s.compiledTypeMap=Vi(s.compiledImplicit,s.compiledExplicit),s};var Hn=Wn,ei=new er("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ki=new er("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),mi=new er("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),jn=new Hn({explicit:[ei,ki,mi]});function mn(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function vn(){return null}function fr(e){return e===null}var Ft=new er("tag:yaml.org,2002:null",{kind:"scalar",resolve:mn,construct:vn,predicate:fr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function At(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function mt(e){return e==="true"||e==="True"||e==="TRUE"}function Tt(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var pe=new er("tag:yaml.org,2002:bool",{kind:"scalar",resolve:At,construct:mt,predicate:Tt,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 Pe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Je(e){return 48<=e&&e<=55}function xt(e){return 48<=e&&e<=57}function _t(e){if(e===null)return!1;var t=e.length,r=0,n=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;n=!0}return n&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Pe(e.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Je(e.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!xt(e.charCodeAt(r)))return!1;n=!0}return!(!n||s==="_")}function Ot(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Sr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Fe.isNegativeZero(e)}var sn=new er("tag:yaml.org,2002:int",{kind:"scalar",resolve:_t,construct:Ot,predicate:Sr,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"]}}),Xt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fr(e){return!(e===null||!Xt.test(e)||e[e.length-1]==="_")}function rs(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var on=/^[-+]?[0-9]+e/;function an(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fe.isNegativeZero(e))return"-0.0";return r=e.toString(10),on.test(r)?r.replace("e",".e"):r}function ns(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Fe.isNegativeZero(e))}var ln=new er("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fr,construct:rs,predicate:ns,represent:an,defaultStyle:"lowercase"}),ji=jn.extend({implicit:[Ft,pe,sn,ln]}),Ii=ji,un=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ss=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 Ri(e){return e===null?!1:un.exec(e)!==null||ss.exec(e)!==null}function Ts(e){var t,r,n,s,a,p,d,h=0,g=null,y,C,M;if(t=un.exec(e),t===null&&(t=ss.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,n,s));if(a=+t[4],p=+t[5],d=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(y=+t[10],C=+(t[11]||0),g=(y*60+C)*6e4,t[9]==="-"&&(g=-g)),M=new Date(Date.UTC(r,n,s,a,p,d,h)),g&&M.setTime(M.getTime()-g),M}function Wo(e){return e.toISOString()}var In=new er("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ri,construct:Ts,instanceOf:Date,represent:Wo});function Rn(e){return e==="<<"||e===null}var Fn=new er("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Rn}),En=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
52
+ \r`;function ti(e){if(e===null)return!1;var t,r,n=0,s=e.length,a=En;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function ka(e){var t,r,n=e.replace(/[\r\n=]/g,""),s=n.length,a=En,p=0,d=[];for(t=0;t<s;t++)t%4===0&&t&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|a.indexOf(n.charAt(t));return r=s%4*6,r===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):r===18?(d.push(p>>10&255),d.push(p>>2&255)):r===12&&d.push(p>>4&255),new Uint8Array(d)}function vi(e){var t="",r=0,n,s,a=e.length,p=En;for(n=0;n<a;n++)n%3===0&&n&&(t+=p[r>>18&63],t+=p[r>>12&63],t+=p[r>>6&63],t+=p[r&63]),r=(r<<8)+e[n];return s=a%3,s===0?(t+=p[r>>18&63],t+=p[r>>12&63],t+=p[r>>6&63],t+=p[r&63]):s===2?(t+=p[r>>10&63],t+=p[r>>4&63],t+=p[r<<2&63],t+=p[64]):s===1&&(t+=p[r>>2&63],t+=p[r<<4&63],t+=p[64],t+=p[64]),t}function An(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ir=new er("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ti,construct:ka,predicate:An,represent:vi}),os=Object.prototype.hasOwnProperty,ri=Object.prototype.toString;function Ho(e){if(e===null)return!0;var t=[],r,n,s,a,p,d=e;for(r=0,n=d.length;r<n;r+=1){if(s=d[r],p=!1,ri.call(s)!=="[object Object]")return!1;for(a in s)if(os.call(s,a))if(!p)p=!0;else return!1;if(!p)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function Ml(e){return e!==null?e:[]}var hr=new er("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ho,construct:Ml}),rt=Object.prototype.toString;function as(e){if(e===null)return!0;var t,r,n,s,a,p=e;for(a=new Array(p.length),t=0,r=p.length;t<r;t+=1){if(n=p[t],rt.call(n)!=="[object Object]"||(s=Object.keys(n),s.length!==1))return!1;a[t]=[s[0],n[s[0]]]}return!0}function oo(e){if(e===null)return[];var t,r,n,s,a,p=e;for(a=new Array(p.length),t=0,r=p.length;t<r;t+=1)n=p[t],s=Object.keys(n),a[t]=[s[0],n[s[0]]];return a}var zn=new er("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:as,construct:oo}),Qt=Object.prototype.hasOwnProperty;function ls(e){if(e===null)return!0;var t,r=e;for(t in r)if(Qt.call(r,t)&&r[t]!==null)return!1;return!0}function ao(e){return e!==null?e:{}}var lo=new er("tag:yaml.org,2002:set",{kind:"mapping",resolve:ls,construct:ao}),F=Ii.extend({implicit:[In,Fn],explicit:[Ir,hr,zn,lo]}),re=Object.prototype.hasOwnProperty,je=1,Le=2,St=3,jt=4,Zt=1,nt=2,Gn=3,Ll=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dl=/[\x85\u2028\u2029]/,Fi=/[,\[\]\{\}]/,nc=/^(?:!|!!|![a-z\-]+!)$/i,ic=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function zo(e){return Object.prototype.toString.call(e)}function ni(e){return e===10||e===13}function Vs(e){return e===9||e===32}function gn(e){return e===9||e===32||e===10||e===13}function uo(e){return e===44||e===91||e===93||e===123||e===125}function gp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function yp(e){return e===120?2:e===117?4:e===85?8:0}function bp(e){return 48<=e&&e<=57?e-48:-1}function xp(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
53
+ `: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 lv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var sc=new Array(256),Mi=new Array(256),Go=0;Go<256;Go++)sc[Go]=xp(Go)?1:0,Mi[Go]=xp(Go);function uv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||F,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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 ja(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jr(r),new Lt(t,r)}function ot(e,t){throw ja(e,t)}function Nl(e,t){e.onWarning&&e.onWarning.call(null,ja(e,t))}var Sp={YAML:function(t,r,n){var s,a,p;t.version!==null&&ot(t,"duplication of %YAML directive"),n.length!==1&&ot(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&ot(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),p=parseInt(s[2],10),a!==1&&ot(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=p<2,p!==1&&p!==2&&Nl(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var s,a;n.length!==2&&ot(t,"TAG directive accepts exactly two arguments"),s=n[0],a=n[1],nc.test(s)||ot(t,"ill-formed tag handle (first argument) of the TAG directive"),re.call(t.tagMap,s)&&ot(t,'there is a previously declared suffix for "'+s+'" tag handle'),ic.test(a)||ot(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(p){ot(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a}};function ks(e,t,r,n){var s,a,p,d;if(t<r){if(d=e.input.slice(t,r),n)for(s=0,a=d.length;s<a;s+=1)p=d.charCodeAt(s),p===9||32<=p&&p<=1114111||ot(e,"expected valid JSON character");else Ll.test(d)&&ot(e,"the stream contains non-printable characters");e.result+=d}}function wp(e,t,r,n){var s,a,p,d;for(Fe.isObject(r)||ot(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),p=0,d=s.length;p<d;p+=1)a=s[p],re.call(t,a)||(t[a]=r[a],n[a]=!0)}function js(e,t,r,n,s,a,p,d,h){var g,y;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),g=0,y=s.length;g<y;g+=1)Array.isArray(s[g])&&ot(e,"nested arrays are not supported inside keys"),typeof s=="object"&&zo(s[g])==="[object Object]"&&(s[g]="[object Object]");if(typeof s=="object"&&zo(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(g=0,y=a.length;g<y;g+=1)wp(e,t,a[g],r);else wp(e,t,a,r);else!e.json&&!re.call(r,s)&&re.call(t,s)&&(e.line=p||e.line,e.lineStart=d||e.lineStart,e.position=h||e.position,ot(e,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(t,s,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[s]=a,delete r[s];return t}function Bl(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ot(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Dr(e,t,r){for(var n=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Vs(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(ni(s))for(Bl(e),s=e.input.charCodeAt(e.position),n++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Nl(e,"deficient indentation"),n}function Ia(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||gn(r)))}function $l(e,t){t===1?e.result+=" ":t>1&&(e.result+=Fe.repeat(`
54
+ `,t-1))}function Ul(e,t,r){var n,s,a,p,d,h,g,y,C=e.kind,M=e.result,I;if(I=e.input.charCodeAt(e.position),gn(I)||uo(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)&&(s=e.input.charCodeAt(e.position+1),gn(s)||r&&uo(s)))return!1;for(e.kind="scalar",e.result="",a=p=e.position,d=!1;I!==0;){if(I===58){if(s=e.input.charCodeAt(e.position+1),gn(s)||r&&uo(s))break}else if(I===35){if(n=e.input.charCodeAt(e.position-1),gn(n))break}else{if(e.position===e.lineStart&&Ia(e)||r&&uo(I))break;if(ni(I))if(h=e.line,g=e.lineStart,y=e.lineIndent,Dr(e,!1,-1),e.lineIndent>=t){d=!0,I=e.input.charCodeAt(e.position);continue}else{e.position=p,e.line=h,e.lineStart=g,e.lineIndent=y;break}}d&&(ks(e,a,p,!1),$l(e,e.line-h),a=p=e.position,d=!1),Vs(I)||(p=e.position+1),I=e.input.charCodeAt(++e.position)}return ks(e,a,p,!1),e.result?!0:(e.kind=C,e.result=M,!1)}function Wl(e,t){var r,n,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ks(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,s=e.position;else return!0;else ni(r)?(ks(e,n,s,!0),$l(e,Dr(e,!1,t)),n=s=e.position):e.position===e.lineStart&&Ia(e)?ot(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);ot(e,"unexpected end of the stream within a single quoted scalar")}function oc(e,t){var r,n,s,a,p,d;if(d=e.input.charCodeAt(e.position),d!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(d=e.input.charCodeAt(e.position))!==0;){if(d===34)return ks(e,r,e.position,!0),e.position++,!0;if(d===92){if(ks(e,r,e.position,!0),d=e.input.charCodeAt(++e.position),ni(d))Dr(e,!1,t);else if(d<256&&sc[d])e.result+=Mi[d],e.position++;else if((p=yp(d))>0){for(s=p,a=0;s>0;s--)d=e.input.charCodeAt(++e.position),(p=gp(d))>=0?a=(a<<4)+p:ot(e,"expected hexadecimal character");e.result+=lv(a),e.position++}else ot(e,"unknown escape sequence");r=n=e.position}else ni(d)?(ks(e,r,n,!0),$l(e,Dr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Ia(e)?ot(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ot(e,"unexpected end of the stream within a double quoted scalar")}function Op(e,t){var r=!0,n,s,a,p=e.tag,d,h=e.anchor,g,y,C,M,I,B=Object.create(null),z,W,G,te;if(te=e.input.charCodeAt(e.position),te===91)y=93,I=!1,d=[];else if(te===123)y=125,I=!0,d={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),te=e.input.charCodeAt(++e.position);te!==0;){if(Dr(e,!0,t),te=e.input.charCodeAt(e.position),te===y)return e.position++,e.tag=p,e.anchor=h,e.kind=I?"mapping":"sequence",e.result=d,!0;r?te===44&&ot(e,"expected the node content, but found ','"):ot(e,"missed comma between flow collection entries"),W=z=G=null,C=M=!1,te===63&&(g=e.input.charCodeAt(e.position+1),gn(g)&&(C=M=!0,e.position++,Dr(e,!0,t))),n=e.line,s=e.lineStart,a=e.position,Ko(e,t,je,!1,!0),W=e.tag,z=e.result,Dr(e,!0,t),te=e.input.charCodeAt(e.position),(M||e.line===n)&&te===58&&(C=!0,te=e.input.charCodeAt(++e.position),Dr(e,!0,t),Ko(e,t,je,!1,!0),G=e.result),I?js(e,d,B,W,z,G,n,s,a):C?d.push(js(e,null,B,W,z,G,n,s,a)):d.push(z),Dr(e,!0,t),te=e.input.charCodeAt(e.position),te===44?(r=!0,te=e.input.charCodeAt(++e.position)):r=!1}ot(e,"unexpected end of the stream within a flow collection")}function Ep(e,t){var r,n,s=Zt,a=!1,p=!1,d=t,h=0,g=!1,y,C;if(C=e.input.charCodeAt(e.position),C===124)n=!1;else if(C===62)n=!0;else return!1;for(e.kind="scalar",e.result="";C!==0;)if(C=e.input.charCodeAt(++e.position),C===43||C===45)Zt===s?s=C===43?Gn:nt:ot(e,"repeat of a chomping mode identifier");else if((y=bp(C))>=0)y===0?ot(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?ot(e,"repeat of an indentation width identifier"):(d=t+y-1,p=!0);else break;if(Vs(C)){do C=e.input.charCodeAt(++e.position);while(Vs(C));if(C===35)do C=e.input.charCodeAt(++e.position);while(!ni(C)&&C!==0)}for(;C!==0;){for(Bl(e),e.lineIndent=0,C=e.input.charCodeAt(e.position);(!p||e.lineIndent<d)&&C===32;)e.lineIndent++,C=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>d&&(d=e.lineIndent),ni(C)){h++;continue}if(e.lineIndent<d){s===Gn?e.result+=Fe.repeat(`
55
55
  `,a?1+h:h):s===Zt&&a&&(e.result+=`
56
56
  `);break}for(n?Vs(C)?(g=!0,e.result+=Fe.repeat(`
57
57
  `,a?1+h:h)):g?(g=!1,e.result+=Fe.repeat(`
58
58
  `,h+1)):h===0?a&&(e.result+=" "):e.result+=Fe.repeat(`
59
59
  `,h):e.result+=Fe.repeat(`
60
- `,a?1+h:h),a=!0,p=!0,h=0,r=e.position;!ni(C)&&C!==0;)C=e.input.charCodeAt(++e.position);ks(e,r,e.position,!1)}return!0}function Ra(e,t){var r,n=e.tag,s=e.anchor,a=[],p,d=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),!(h!==45||(p=e.input.charCodeAt(e.position+1),!gn(p))));){if(d=!0,e.position++,Dr(e,!0,-1)&&e.lineIndent<=t){a.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Ko(e,t,St,!1,!0),a.push(e.result),Dr(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)ot(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return d?(e.tag=n,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}function cv(e,t,r){var n,s,a,p,d,h,g=e.tag,y=e.anchor,C={},M=Object.create(null),I=null,B=null,z=null,W=!1,G=!1,te;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=C),te=e.input.charCodeAt(e.position);te!==0;){if(!W&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(te===63||te===58)&&gn(n))te===63?(W&&(js(e,C,M,I,B,null,p,d,h),I=B=z=null),G=!0,W=!0,s=!0):W?(W=!1,s=!0):ot(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,te=n;else{if(p=e.line,d=e.lineStart,h=e.position,!Ko(e,r,Le,!1,!0))break;if(e.line===a){for(te=e.input.charCodeAt(e.position);Vs(te);)te=e.input.charCodeAt(++e.position);if(te===58)te=e.input.charCodeAt(++e.position),gn(te)||ot(e,"a whitespace character is expected after the key-value separator within a block mapping"),W&&(js(e,C,M,I,B,null,p,d,h),I=B=z=null),G=!0,W=!1,s=!1,I=e.tag,B=e.result;else if(G)ot(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=y,!0}else if(G)ot(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=y,!0}if((e.line===a||e.lineIndent>t)&&(W&&(p=e.line,d=e.lineStart,h=e.position),Ko(e,t,jt,!0,s)&&(W?B=e.result:z=e.result),W||(js(e,C,M,I,B,z,p,d,h),I=B=z=null),Dr(e,!0,-1),te=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&te!==0)ot(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return W&&js(e,C,M,I,B,null,p,d,h),G&&(e.tag=g,e.anchor=y,e.kind="mapping",e.result=C),G}function Ap(e){var t,r=!1,n=!1,s,a,p;if(p=e.input.charCodeAt(e.position),p!==33)return!1;if(e.tag!==null&&ot(e,"duplication of a tag property"),p=e.input.charCodeAt(++e.position),p===60?(r=!0,p=e.input.charCodeAt(++e.position)):p===33?(n=!0,s="!!",p=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do p=e.input.charCodeAt(++e.position);while(p!==0&&p!==62);e.position<e.length?(a=e.input.slice(t,e.position),p=e.input.charCodeAt(++e.position)):ot(e,"unexpected end of the stream within a verbatim tag")}else{for(;p!==0&&!gn(p);)p===33&&(n?ot(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),nc.test(s)||ot(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),p=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Mi.test(a)&&ot(e,"tag suffix cannot contain flow indicator characters")}a&&!ic.test(a)&&ot(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch(d){ot(e,"tag name is malformed: "+a)}return r?e.tag=a:re.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:ot(e,'undeclared tag handle "'+s+'"'),!0}function yi(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ot(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!gn(r)&&!uo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function fv(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!gn(n)&&!uo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),re.call(e.anchorMap,r)||ot(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Dr(e,!0,-1),!0}function Ko(e,t,r,n,s){var a,p,d,h=1,g=!1,y=!1,C,M,I,B,z,W;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=p=d=jt===r||St===r,n&&Dr(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;Ap(e)||yi(e);)Dr(e,!0,-1)?(g=!0,d=a,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):d=!1;if(d&&(d=g||s),(h===1||jt===r)&&(je===r||Le===r?z=t:z=t+1,W=e.position-e.lineStart,h===1?d&&(Ra(e,W)||cv(e,W,z))||Op(e,z)?y=!0:(p&&Ep(e,z)||Wl(e,z)||oc(e,z)?y=!0:fv(e)?(y=!0,(e.tag!==null||e.anchor!==null)&&ot(e,"alias node should not have any properties")):Ul(e,z,je===r)&&(y=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(y=d&&Ra(e,W))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ot(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),C=0,M=e.implicitTypes.length;C<M;C+=1)if(B=e.implicitTypes[C],B.resolve(e.result)){e.result=B.construct(e.result),e.tag=B.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(re.call(e.typeMap[e.kind||"fallback"],e.tag))B=e.typeMap[e.kind||"fallback"][e.tag];else for(B=null,I=e.typeMap.multi[e.kind||"fallback"],C=0,M=I.length;C<M;C+=1)if(e.tag.slice(0,I[C].tag.length)===I[C].tag){B=I[C];break}B||ot(e,"unknown tag !<"+e.tag+">"),e.result!==null&&B.kind!==e.kind&&ot(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+B.kind+'", not "'+e.kind+'"'),B.resolve(e.result,e.tag)?(e.result=B.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ot(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||y}function ac(e){var t=e.position,r,n,s,a=!1,p;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(p=e.input.charCodeAt(e.position))!==0&&(Dr(e,!0,-1),p=e.input.charCodeAt(e.position),!(e.lineIndent>0||p!==37));){for(a=!0,p=e.input.charCodeAt(++e.position),r=e.position;p!==0&&!gn(p);)p=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),s=[],n.length<1&&ot(e,"directive name must not be less than one character in length");p!==0;){for(;Vs(p);)p=e.input.charCodeAt(++e.position);if(p===35){do p=e.input.charCodeAt(++e.position);while(p!==0&&!ni(p));break}if(ni(p))break;for(r=e.position;p!==0&&!gn(p);)p=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}p!==0&&Bl(e),re.call(Sp,n)?Sp[n](e,n,s):Nl(e,'unknown document directive "'+n+'"')}if(Dr(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,Dr(e,!0,-1)):a&&ot(e,"directives end mark is expected"),Ko(e,e.lineIndent-1,jt,!1,!0),Dr(e,!0,-1),e.checkLineBreaks&&Dl.test(e.input.slice(t,e.position))&&Nl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ia(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Dr(e,!0,-1));return}if(e.position<e.length-1)ot(e,"end of the stream or a document separator is expected");else return}function lc(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
61
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new uv(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,ot(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ac(r);return r.documents}function Is(e,t,r){t!==null&&typeof t=="object"&&typeof r=="undefined"&&(r=t,t=null);var n=lc(e,r);if(typeof t!="function")return n;for(var s=0,a=n.length;s<a;s+=1)t(n[s])}function uc(e,t){var r=lc(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Lt("expected a single document in the stream, but found more")}}var us=Is,Hl=uc,zl={loadAll:us,load:Hl},co=Object.prototype.toString,Cp=Object.prototype.hasOwnProperty,cc=65279,pv=9,Fa=10,_p=13,Pp=32,dv=33,hv=34,fc=35,mv=37,Tp=38,vv=39,Vp=42,Ma=44,Jo=45,Gl=58,gv=61,yv=62,La=63,Hr=64,kp=91,pc=93,Da=96,jp=123,Ip=124,Rp=125,en={};en[0]="\\0",en[7]="\\a",en[8]="\\b",en[9]="\\t",en[10]="\\n",en[11]="\\v",en[12]="\\f",en[13]="\\r",en[27]="\\e",en[34]='\\"',en[92]="\\\\",en[133]="\\N",en[160]="\\_",en[8232]="\\L",en[8233]="\\P";var Fp=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],bv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function xv(e,t){var r,n,s,a,p,d,h;if(t===null)return{};for(r={},n=Object.keys(t),s=0,a=n.length;s<a;s+=1)p=n[s],d=String(t[p]),p.slice(0,2)==="!!"&&(p="tag:yaml.org,2002:"+p.slice(2)),h=e.compiledTypeMap.fallback[p],h&&Cp.call(h.styleAliases,d)&&(d=h.styleAliases[d]),r[p]=d;return r}function Mp(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Lt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Fe.repeat("0",n-t.length)+t}var Lp=1,Na=2;function Ba(e){this.schema=e.schema||F,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Fe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=xv(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==='"'?Na:Lp,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 Di(e,t){for(var r=Fe.repeat(" ",t),n=0,s=-1,a="",p,d=e.length;n<d;)s=e.indexOf(`
60
+ `,a?1+h:h),a=!0,p=!0,h=0,r=e.position;!ni(C)&&C!==0;)C=e.input.charCodeAt(++e.position);ks(e,r,e.position,!1)}return!0}function Ra(e,t){var r,n=e.tag,s=e.anchor,a=[],p,d=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),!(h!==45||(p=e.input.charCodeAt(e.position+1),!gn(p))));){if(d=!0,e.position++,Dr(e,!0,-1)&&e.lineIndent<=t){a.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Ko(e,t,St,!1,!0),a.push(e.result),Dr(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)ot(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return d?(e.tag=n,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}function cv(e,t,r){var n,s,a,p,d,h,g=e.tag,y=e.anchor,C={},M=Object.create(null),I=null,B=null,z=null,W=!1,G=!1,te;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=C),te=e.input.charCodeAt(e.position);te!==0;){if(!W&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ot(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(te===63||te===58)&&gn(n))te===63?(W&&(js(e,C,M,I,B,null,p,d,h),I=B=z=null),G=!0,W=!0,s=!0):W?(W=!1,s=!0):ot(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,te=n;else{if(p=e.line,d=e.lineStart,h=e.position,!Ko(e,r,Le,!1,!0))break;if(e.line===a){for(te=e.input.charCodeAt(e.position);Vs(te);)te=e.input.charCodeAt(++e.position);if(te===58)te=e.input.charCodeAt(++e.position),gn(te)||ot(e,"a whitespace character is expected after the key-value separator within a block mapping"),W&&(js(e,C,M,I,B,null,p,d,h),I=B=z=null),G=!0,W=!1,s=!1,I=e.tag,B=e.result;else if(G)ot(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=y,!0}else if(G)ot(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=y,!0}if((e.line===a||e.lineIndent>t)&&(W&&(p=e.line,d=e.lineStart,h=e.position),Ko(e,t,jt,!0,s)&&(W?B=e.result:z=e.result),W||(js(e,C,M,I,B,z,p,d,h),I=B=z=null),Dr(e,!0,-1),te=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&te!==0)ot(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return W&&js(e,C,M,I,B,null,p,d,h),G&&(e.tag=g,e.anchor=y,e.kind="mapping",e.result=C),G}function Ap(e){var t,r=!1,n=!1,s,a,p;if(p=e.input.charCodeAt(e.position),p!==33)return!1;if(e.tag!==null&&ot(e,"duplication of a tag property"),p=e.input.charCodeAt(++e.position),p===60?(r=!0,p=e.input.charCodeAt(++e.position)):p===33?(n=!0,s="!!",p=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do p=e.input.charCodeAt(++e.position);while(p!==0&&p!==62);e.position<e.length?(a=e.input.slice(t,e.position),p=e.input.charCodeAt(++e.position)):ot(e,"unexpected end of the stream within a verbatim tag")}else{for(;p!==0&&!gn(p);)p===33&&(n?ot(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),nc.test(s)||ot(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),p=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Fi.test(a)&&ot(e,"tag suffix cannot contain flow indicator characters")}a&&!ic.test(a)&&ot(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch(d){ot(e,"tag name is malformed: "+a)}return r?e.tag=a:re.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:ot(e,'undeclared tag handle "'+s+'"'),!0}function gi(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ot(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!gn(r)&&!uo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function fv(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!gn(n)&&!uo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ot(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),re.call(e.anchorMap,r)||ot(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Dr(e,!0,-1),!0}function Ko(e,t,r,n,s){var a,p,d,h=1,g=!1,y=!1,C,M,I,B,z,W;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=p=d=jt===r||St===r,n&&Dr(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;Ap(e)||gi(e);)Dr(e,!0,-1)?(g=!0,d=a,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):d=!1;if(d&&(d=g||s),(h===1||jt===r)&&(je===r||Le===r?z=t:z=t+1,W=e.position-e.lineStart,h===1?d&&(Ra(e,W)||cv(e,W,z))||Op(e,z)?y=!0:(p&&Ep(e,z)||Wl(e,z)||oc(e,z)?y=!0:fv(e)?(y=!0,(e.tag!==null||e.anchor!==null)&&ot(e,"alias node should not have any properties")):Ul(e,z,je===r)&&(y=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(y=d&&Ra(e,W))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ot(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),C=0,M=e.implicitTypes.length;C<M;C+=1)if(B=e.implicitTypes[C],B.resolve(e.result)){e.result=B.construct(e.result),e.tag=B.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(re.call(e.typeMap[e.kind||"fallback"],e.tag))B=e.typeMap[e.kind||"fallback"][e.tag];else for(B=null,I=e.typeMap.multi[e.kind||"fallback"],C=0,M=I.length;C<M;C+=1)if(e.tag.slice(0,I[C].tag.length)===I[C].tag){B=I[C];break}B||ot(e,"unknown tag !<"+e.tag+">"),e.result!==null&&B.kind!==e.kind&&ot(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+B.kind+'", not "'+e.kind+'"'),B.resolve(e.result,e.tag)?(e.result=B.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ot(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||y}function ac(e){var t=e.position,r,n,s,a=!1,p;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(p=e.input.charCodeAt(e.position))!==0&&(Dr(e,!0,-1),p=e.input.charCodeAt(e.position),!(e.lineIndent>0||p!==37));){for(a=!0,p=e.input.charCodeAt(++e.position),r=e.position;p!==0&&!gn(p);)p=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),s=[],n.length<1&&ot(e,"directive name must not be less than one character in length");p!==0;){for(;Vs(p);)p=e.input.charCodeAt(++e.position);if(p===35){do p=e.input.charCodeAt(++e.position);while(p!==0&&!ni(p));break}if(ni(p))break;for(r=e.position;p!==0&&!gn(p);)p=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}p!==0&&Bl(e),re.call(Sp,n)?Sp[n](e,n,s):Nl(e,'unknown document directive "'+n+'"')}if(Dr(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,Dr(e,!0,-1)):a&&ot(e,"directives end mark is expected"),Ko(e,e.lineIndent-1,jt,!1,!0),Dr(e,!0,-1),e.checkLineBreaks&&Dl.test(e.input.slice(t,e.position))&&Nl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ia(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Dr(e,!0,-1));return}if(e.position<e.length-1)ot(e,"end of the stream or a document separator is expected");else return}function lc(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
61
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new uv(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,ot(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ac(r);return r.documents}function Is(e,t,r){t!==null&&typeof t=="object"&&typeof r=="undefined"&&(r=t,t=null);var n=lc(e,r);if(typeof t!="function")return n;for(var s=0,a=n.length;s<a;s+=1)t(n[s])}function uc(e,t){var r=lc(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Lt("expected a single document in the stream, but found more")}}var us=Is,Hl=uc,zl={loadAll:us,load:Hl},co=Object.prototype.toString,Cp=Object.prototype.hasOwnProperty,cc=65279,pv=9,Fa=10,_p=13,Pp=32,dv=33,hv=34,fc=35,mv=37,Tp=38,vv=39,Vp=42,Ma=44,Jo=45,Gl=58,gv=61,yv=62,La=63,Hr=64,kp=91,pc=93,Da=96,jp=123,Ip=124,Rp=125,en={};en[0]="\\0",en[7]="\\a",en[8]="\\b",en[9]="\\t",en[10]="\\n",en[11]="\\v",en[12]="\\f",en[13]="\\r",en[27]="\\e",en[34]='\\"',en[92]="\\\\",en[133]="\\N",en[160]="\\_",en[8232]="\\L",en[8233]="\\P";var Fp=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],bv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function xv(e,t){var r,n,s,a,p,d,h;if(t===null)return{};for(r={},n=Object.keys(t),s=0,a=n.length;s<a;s+=1)p=n[s],d=String(t[p]),p.slice(0,2)==="!!"&&(p="tag:yaml.org,2002:"+p.slice(2)),h=e.compiledTypeMap.fallback[p],h&&Cp.call(h.styleAliases,d)&&(d=h.styleAliases[d]),r[p]=d;return r}function Mp(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Lt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Fe.repeat("0",n-t.length)+t}var Lp=1,Na=2;function Ba(e){this.schema=e.schema||F,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Fe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=xv(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==='"'?Na:Lp,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 Li(e,t){for(var r=Fe.repeat(" ",t),n=0,s=-1,a="",p,d=e.length;n<d;)s=e.indexOf(`
62
62
  `,n),s===-1?(p=e.slice(n),n=d):(p=e.slice(n,s+1),n=s+1),p.length&&p!==`
63
63
  `&&(a+=r),a+=p;return a}function Yo(e,t){return`
64
- `+Fe.repeat(" ",e.indent*t)}function dc(e,t){var r,n,s;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}function $a(e){return e===Pp||e===pv}function Mn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==cc||65536<=e&&e<=1114111}function Rs(e){return Mn(e)&&e!==cc&&e!==_p&&e!==Fa}function Kl(e,t,r){var n=Rs(e),s=n&&!$a(e);return(r?n:n&&e!==Ma&&e!==kp&&e!==pc&&e!==jp&&e!==Rp)&&e!==fc&&!(t===Gl&&!s)||Rs(t)&&!$a(t)&&e===fc||t===Gl&&s}function Sv(e){return Mn(e)&&e!==cc&&!$a(e)&&e!==Jo&&e!==La&&e!==Gl&&e!==Ma&&e!==kp&&e!==pc&&e!==jp&&e!==Rp&&e!==fc&&e!==Tp&&e!==Vp&&e!==dv&&e!==Ip&&e!==gv&&e!==yv&&e!==vv&&e!==hv&&e!==mv&&e!==Hr&&e!==Da}function Dp(e){return!$a(e)&&e!==Gl}function Ua(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function hc(e){var t=/^\n* /;return t.test(e)}var Jl=1,Fs=2,bi=3,mc=4,fo=5;function wv(e,t,r,n,s,a,p,d){var h,g=0,y=null,C=!1,M=!1,I=n!==-1,B=-1,z=Sv(Ua(e,0))&&Dp(Ua(e,e.length-1));if(t||p)for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Ua(e,h),!Mn(g))return fo;z=z&&Kl(g,y,d),y=g}else{for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Ua(e,h),g===Fa)C=!0,I&&(M=M||h-B-1>n&&e[B+1]!==" ",B=h);else if(!Mn(g))return fo;z=z&&Kl(g,y,d),y=g}M=M||I&&h-B-1>n&&e[B+1]!==" "}return!C&&!M?z&&!p&&!s(e)?Jl:a===Na?fo:Fs:r>9&&hc(e)?fo:p?a===Na?fo:Fs:M?mc:bi}function Ov(e,t,r,n,s){e.dump=function(){if(t.length===0)return e.quotingType===Na?'""':"''";if(!e.noCompatMode&&(Fp.indexOf(t)!==-1||bv.test(t)))return e.quotingType===Na?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),p=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),d=n||e.flowLevel>-1&&r>=e.flowLevel;function h(g){return dc(e,g)}switch(wv(t,d,e.indent,p,h,e.quotingType,e.forceQuotes&&!n,s)){case Jl:return t;case Fs:return"'"+t.replace(/'/g,"''")+"'";case bi:return"|"+Np(t,e.indent)+vc(Di(t,a));case mc:return">"+Np(t,e.indent)+vc(Di(Bp(t,p),a));case fo:return'"'+$p(t)+'"';default:throw new Lt("impossible error: invalid scalar style")}}()}function Np(e,t){var r=hc(e)?String(t):"",n=e[e.length-1]===`
64
+ `+Fe.repeat(" ",e.indent*t)}function dc(e,t){var r,n,s;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}function $a(e){return e===Pp||e===pv}function Mn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==cc||65536<=e&&e<=1114111}function Rs(e){return Mn(e)&&e!==cc&&e!==_p&&e!==Fa}function Kl(e,t,r){var n=Rs(e),s=n&&!$a(e);return(r?n:n&&e!==Ma&&e!==kp&&e!==pc&&e!==jp&&e!==Rp)&&e!==fc&&!(t===Gl&&!s)||Rs(t)&&!$a(t)&&e===fc||t===Gl&&s}function Sv(e){return Mn(e)&&e!==cc&&!$a(e)&&e!==Jo&&e!==La&&e!==Gl&&e!==Ma&&e!==kp&&e!==pc&&e!==jp&&e!==Rp&&e!==fc&&e!==Tp&&e!==Vp&&e!==dv&&e!==Ip&&e!==gv&&e!==yv&&e!==vv&&e!==hv&&e!==mv&&e!==Hr&&e!==Da}function Dp(e){return!$a(e)&&e!==Gl}function Ua(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function hc(e){var t=/^\n* /;return t.test(e)}var Jl=1,Fs=2,yi=3,mc=4,fo=5;function wv(e,t,r,n,s,a,p,d){var h,g=0,y=null,C=!1,M=!1,I=n!==-1,B=-1,z=Sv(Ua(e,0))&&Dp(Ua(e,e.length-1));if(t||p)for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Ua(e,h),!Mn(g))return fo;z=z&&Kl(g,y,d),y=g}else{for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Ua(e,h),g===Fa)C=!0,I&&(M=M||h-B-1>n&&e[B+1]!==" ",B=h);else if(!Mn(g))return fo;z=z&&Kl(g,y,d),y=g}M=M||I&&h-B-1>n&&e[B+1]!==" "}return!C&&!M?z&&!p&&!s(e)?Jl:a===Na?fo:Fs:r>9&&hc(e)?fo:p?a===Na?fo:Fs:M?mc:yi}function Ov(e,t,r,n,s){e.dump=function(){if(t.length===0)return e.quotingType===Na?'""':"''";if(!e.noCompatMode&&(Fp.indexOf(t)!==-1||bv.test(t)))return e.quotingType===Na?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),p=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),d=n||e.flowLevel>-1&&r>=e.flowLevel;function h(g){return dc(e,g)}switch(wv(t,d,e.indent,p,h,e.quotingType,e.forceQuotes&&!n,s)){case Jl:return t;case Fs:return"'"+t.replace(/'/g,"''")+"'";case yi:return"|"+Np(t,e.indent)+vc(Li(t,a));case mc:return">"+Np(t,e.indent)+vc(Li(Bp(t,p),a));case fo:return'"'+$p(t)+'"';default:throw new Lt("impossible error: invalid scalar style")}}()}function Np(e,t){var r=hc(e)?String(t):"",n=e[e.length-1]===`
65
65
  `,s=n&&(e[e.length-2]===`
66
66
  `||e===`
67
67
  `),a=s?"+":n?"":"-";return r+a+`
@@ -73,24 +73,24 @@ b`.split(/\n/).length!=3?function(i){for(var o=0,u=[],l=i.length;o<=l;){var f=i.
73
73
  `+e.slice(s,a),s=a+1),p=d;return h+=`
74
74
  `,e.length-s>t&&p>s?h+=e.slice(s,p)+`
75
75
  `+e.slice(p+1):h+=e.slice(s),h.slice(1)}function $p(e){for(var t="",r=0,n,s=0;s<e.length;r>=65536?s+=2:s++)r=Ua(e,s),n=en[r],!n&&Mn(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=n||Mp(r);return t}function Up(e,t,r){var n="",s=e.tag,a,p,d;for(a=0,p=r.length;a<p;a+=1)d=r[a],e.replacer&&(d=e.replacer.call(r,String(a),d)),(zr(e,t,d,!1,!1)||typeof d=="undefined"&&zr(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=s,e.dump="["+n+"]"}function Yl(e,t,r,n){var s="",a=e.tag,p,d,h;for(p=0,d=r.length;p<d;p+=1)h=r[p],e.replacer&&(h=e.replacer.call(r,String(p),h)),(zr(e,t+1,h,!0,!0,!1,!0)||typeof h=="undefined"&&zr(e,t+1,null,!0,!0,!1,!0))&&((!n||s!=="")&&(s+=Yo(e,t)),e.dump&&Fa===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}function Xl(e,t,r){var n="",s=e.tag,a=Object.keys(r),p,d,h,g,y;for(p=0,d=a.length;p<d;p+=1)y="",n!==""&&(y+=", "),e.condenseFlow&&(y+='"'),h=a[p],g=r[h],e.replacer&&(g=e.replacer.call(r,h,g)),zr(e,t,h,!1,!1)&&(e.dump.length>1024&&(y+="? "),y+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),zr(e,t,g,!1,!1)&&(y+=e.dump,n+=y));e.tag=s,e.dump="{"+n+"}"}function Wp(e,t,r,n){var s="",a=e.tag,p=Object.keys(r),d,h,g,y,C,M;if(e.sortKeys===!0)p.sort();else if(typeof e.sortKeys=="function")p.sort(e.sortKeys);else if(e.sortKeys)throw new Lt("sortKeys must be a boolean or a function");for(d=0,h=p.length;d<h;d+=1)M="",(!n||s!=="")&&(M+=Yo(e,t)),g=p[d],y=r[g],e.replacer&&(y=e.replacer.call(r,g,y)),zr(e,t+1,g,!0,!0,!0)&&(C=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,C&&(e.dump&&Fa===e.dump.charCodeAt(0)?M+="?":M+="? "),M+=e.dump,C&&(M+=Yo(e,t)),zr(e,t+1,y,!0,C)&&(e.dump&&Fa===e.dump.charCodeAt(0)?M+=":":M+=": ",M+=e.dump,s+=M));e.tag=a,e.dump=s||"{}"}function Wa(e,t,r){var n,s,a,p,d,h;for(s=r?e.explicitTypes:e.implicitTypes,a=0,p=s.length;a<p;a+=1)if(d=s[a],(d.instanceOf||d.predicate)&&(!d.instanceOf||typeof t=="object"&&t instanceof d.instanceOf)&&(!d.predicate||d.predicate(t))){if(r?d.multi&&d.representName?e.tag=d.representName(t):e.tag=d.tag:e.tag="?",d.represent){if(h=e.styleMap[d.tag]||d.defaultStyle,co.call(d.represent)==="[object Function]")n=d.represent(t,h);else if(Cp.call(d.represent,h))n=d.represent[h](t,h);else throw new Lt("!<"+d.tag+'> tag resolver accepts not "'+h+'" style');e.dump=n}return!0}return!1}function zr(e,t,r,n,s,a,p){e.tag=null,e.dump=r,Wa(e,r,!1)||Wa(e,r,!0);var d=co.call(e.dump),h=n,g;n&&(n=e.flowLevel<0||e.flowLevel>t);var y=d==="[object Object]"||d==="[object Array]",C,M;if(y&&(C=e.duplicates.indexOf(r),M=C!==-1),(e.tag!==null&&e.tag!=="?"||M||e.indent!==2&&t>0)&&(s=!1),M&&e.usedDuplicates[C])e.dump="*ref_"+C;else{if(y&&M&&!e.usedDuplicates[C]&&(e.usedDuplicates[C]=!0),d==="[object Object]")n&&Object.keys(e.dump).length!==0?(Wp(e,t,e.dump,s),M&&(e.dump="&ref_"+C+e.dump)):(Xl(e,t,e.dump),M&&(e.dump="&ref_"+C+" "+e.dump));else if(d==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!p&&t>0?Yl(e,t-1,e.dump,s):Yl(e,t,e.dump,s),M&&(e.dump="&ref_"+C+e.dump)):(Up(e,t,e.dump),M&&(e.dump="&ref_"+C+" "+e.dump));else if(d==="[object String]")e.tag!=="?"&&Ov(e,e.dump,t,a,h);else{if(d==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Lt("unacceptable kind of an object to dump "+d)}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 Hp(e,t){var r=[],n=[],s,a;for(Ha(e,r,n),s=0,a=n.length;s<a;s+=1)t.duplicates.push(r[n[s]]);t.usedDuplicates=new Array(a)}function Ha(e,t,r){var n,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Ha(e[s],t,r);else for(n=Object.keys(e),s=0,a=n.length;s<a;s+=1)Ha(e[n[s]],t,r)}function gc(e,t){t=t||{};var r=new Ba(t);r.noRefs||Hp(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),zr(r,0,n,!0,!0)?r.dump+`
76
- `:""}var zp=gc,Gp={dump:zp};function za(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Ev=er,Av=Hn,Cv=jn,Ni=Ii,Qo=Ri,Zo=F,yc=zl.load,bc=zl.loadAll,Kp=Gp.dump,xc=Lt,po={binary:Ir,float:ln,map:vi,null:Ft,pairs:zn,set:lo,timestamp:In,bool:pe,int:sn,merge:Fn,omap:hr,seq:ji,str:ei},ho=za("safeLoad","load"),Cn=za("safeLoadAll","loadAll"),Ms=za("safeDump","dump"),Ls={Type:Ev,Schema:Av,FAILSAFE_SCHEMA:Cv,JSON_SCHEMA:Ni,CORE_SCHEMA:Qo,DEFAULT_SCHEMA:Zo,load:yc,loadAll:bc,dump:Kp,YAMLException:xc,types:po,safeLoad:ho,safeLoadAll:Cn,safeDump:Ms};const cs=Ls,_v=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window}(),{FormData:Sc,Blob:Ds,File:wc}=_v,Oc=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,Ql=e=>/^[a-z0-9\-._~]+$/i.test(e);function qo(e){let{escape:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return typeof e=="number"&&(e=e.toString()),typeof e!="string"||!e.length||!t?e:r?JSON.parse(e):[...e].map(n=>{if(Ql(n)||Oc(n)&&t==="unsafe")return n;const s=new TextEncoder;return Array.from(s.encode(n)).map(p=>`0${p.toString(16).toUpperCase()}`.slice(-2)).map(p=>`%${p}`).join("")}).join("")}function Ga(e){const{value:t}=e;return Array.isArray(t)?Jp(e):typeof t=="object"?Ec(e):Ac(e)}function Jp(e){let{key:t,value:r,style:n,explode:s,escape:a}=e;const p=d=>qo(d,{escape:a});if(n==="simple")return r.map(d=>p(d)).join(",");if(n==="label")return`.${r.map(d=>p(d)).join(".")}`;if(n==="matrix")return r.map(d=>p(d)).reduce((d,h)=>!d||s?`${d||""};${t}=${h}`:`${d},${h}`,"");if(n==="form"){const d=s?`&${t}=`:",";return r.map(h=>p(h)).join(d)}if(n==="spaceDelimited"){const d=s?`${t}=`:"";return r.map(h=>p(h)).join(` ${d}`)}if(n==="pipeDelimited"){const d=s?`${t}=`:"";return r.map(h=>p(h)).join(`|${d}`)}}function Ec(e){let{key:t,value:r,style:n,explode:s,escape:a}=e;const p=h=>qo(h,{escape:a}),d=Object.keys(r);if(n==="simple")return d.reduce((h,g)=>{const y=p(r[g]),C=s?"=":",";return`${h?`${h},`:""}${g}${C}${y}`},"");if(n==="label")return d.reduce((h,g)=>{const y=p(r[g]),C=s?"=":".";return`${h?`${h}.`:"."}${g}${C}${y}`},"");if(n==="matrix"&&s)return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h};`:";"}${g}=${y}`},"");if(n==="matrix")return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h},`:`;${t}=`}${g},${y}`},"");if(n==="form")return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h}${s?"&":","}`:""}${g}${s?"=":","}${y}`},"")}function Ac(e){let{key:t,value:r,style:n,escape:s}=e;const a=p=>qo(p,{escape:s});if(n==="simple")return a(r);if(n==="label")return`.${a(r)}`;if(n==="matrix")return`;${t}=${a(r)}`;if(n==="form")return a(r);if(n==="deepObject")return a(r,{},!0)}const Zl=(e,t)=>{t.body=e},ql={serializeRes:Yp,mergeInQueryOrForm:ra};function Ns(t){return et(this,arguments,function*(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"&&(r=e,e=r.url),r.headers=r.headers||{},ql.mergeInQueryOrForm(r),r.headers&&Object.keys(r.headers).forEach(a=>{const p=r.headers[a];typeof p=="string"&&(r.headers[a]=p.replace(/\n+/g," "))}),r.requestInterceptor&&(r=(yield r.requestInterceptor(r))||r);const n=r.headers["content-type"]||r.headers["Content-Type"];/multipart\/form-data/i.test(n)&&r.body instanceof Sc&&(delete r.headers["content-type"],delete r.headers["Content-Type"]);let s;try{s=yield(r.userFetch||fetch)(r.url,r),s=yield ql.serializeRes(s,e,r),r.responseInterceptor&&(s=(yield r.responseInterceptor(s))||s)}catch(a){if(!s)throw a;const p=new Error(s.statusText||`response status is ${s.status}`);throw p.status=s.status,p.statusCode=s.status,p.responseError=a,p}if(!s.ok){const a=new Error(s.statusText||`response status is ${s.status}`);throw a.status=s.status,a.statusCode=s.status,a.response=s,a}return s})}const Pv=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function Tv(e,t){return t&&(t.indexOf("application/json")===0||t.indexOf("+json")>0)?JSON.parse(e):cs.load(e)}function Yp(e,t){let{loadSpec:r=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:eu(e.headers)},s=n.headers["content-type"],a=r||Pv(s);return(a?e.text:e.blob||e.buffer).call(e).then(d=>{if(n.text=d,n.data=d,a)try{const h=Tv(d,s);n.body=h,n.obj=h}catch(h){n.parseError=h}return n})}function Cc(e){return e.includes(", ")?e.split(", "):e}function eu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof e.entries!="function"?{}:Array.from(e.entries()).reduce((t,r)=>{let[n,s]=r;return t[n]=Cc(s),t},{})}function Bs(e,t){return!t&&typeof navigator!="undefined"&&(t=navigator),t&&t.product==="ReactNative"?!!(e&&typeof e=="object"&&typeof e.uri=="string"):typeof wc!="undefined"&&e instanceof wc||typeof Ds!="undefined"&&e instanceof Ds||ArrayBuffer.isView(e)?!0:e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function ea(e,t){return Array.isArray(e)&&e.some(r=>Bs(r,t))}const Vv={form:",",spaceDelimited:"%20",pipeDelimited:"|"},tu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function _c(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:n,allowEmptyValue:s,serializationOption:a,encoding:p}=t,d=typeof t=="object"&&!Array.isArray(t)?t.value:t,h=r?y=>y.toString():y=>encodeURIComponent(y),g=h(e);if(typeof d=="undefined"&&s)return[[g,""]];if(Bs(d)||ea(d))return[[g,d]];if(a)return ta(e,d,r,a);if(p){if([typeof p.style,typeof p.explode,typeof p.allowReserved].some(y=>y!=="undefined")){const{style:y,explode:C,allowReserved:M}=p;return ta(e,d,r,{style:y,explode:C,allowReserved:M})}if(p.contentType){if(p.contentType==="application/json"){const y=typeof d=="string"?d:JSON.stringify(d);return[[g,h(y)]]}return[[g,h(d.toString())]]}return typeof d!="object"?[[g,h(d)]]:Array.isArray(d)&&d.every(y=>typeof y!="object")?[[g,d.map(h).join(",")]]:[[g,h(JSON.stringify(d))]]}return typeof d!="object"?[[g,h(d)]]:Array.isArray(d)?n==="multi"?[[g,d.map(h)]]:[[g,d.map(h).join(tu[n||"csv"])]]:[[g,""]]}function ta(e,t,r,n){const s=n.style||"form",a=typeof n.explode=="undefined"?s==="form":n.explode,p=r?!1:n&&n.allowReserved?"unsafe":"reserved",d=g=>qo(g,{escape:p}),h=r?g=>g:g=>qo(g,{escape:p});return typeof t!="object"?[[h(e),d(t)]]:Array.isArray(t)?a?[[h(e),t.map(d)]]:[[h(e),t.map(d).join(Vv[s])]]:s==="deepObject"?Object.keys(t).map(g=>[h(`${e}[${g}]`),d(t[g])]):a?Object.keys(t).map(g=>[h(g),d(t[g])]):[[h(e),Object.keys(t).map(g=>[`${h(g)},${d(t[g])}`]).join(",")]]}function Xp(e){return Object.entries(e).reduce((t,r)=>{let[n,s]=r;for(const[a,p]of _c(n,s,!0))if(Array.isArray(p))for(const d of p)if(ArrayBuffer.isView(d)){const h=new Ds([d]);t.append(a,h)}else t.append(a,d);else if(ArrayBuffer.isView(p)){const d=new Ds([p]);t.append(a,d)}else t.append(a,p);return t},new Sc)}function $s(e){const t=Object.keys(e).reduce((r,n)=>{for(const[s,a]of _c(n,e[n]))r[s]=a;return r},{});return xe().stringify(t,{encode:!1,indices:!1})||""}function ra(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:t="",query:r,form:n}=e,s=function(){for(var a=arguments.length,p=new Array(a),d=0;d<a;d++)p[d]=arguments[d];const h=p.filter(g=>g).join("&");return h?`?${h}`:""};if(n){const a=Object.keys(n).some(d=>{const{value:h}=n[d];return Bs(h)||ea(h)}),p=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(p)){const d=Xp(e.form);Zl(d,e)}else e.body=$s(n);delete e.form}if(r){const[a,p]=t.split("?");let d="";if(p){const g=xe().parse(p);Object.keys(r).forEach(C=>delete g[C]),d=xe().stringify(g,{encode:!0})}const h=s(d,$s(r));e.url=a+h,delete e.query}return e}function mo(e,t,r){return r=r||(n=>n),t=t||(n=>n),n=>(typeof n=="string"&&(n={url:n}),ql.mergeInQueryOrForm(n),n=t(n),r(e(n)))}const na="application/json, application/yaml";function vo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{requestInterceptor:r,responseInterceptor:n}=t,s=e.withCredentials?"include":"same-origin";return a=>e({url:a,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:na},credentials:s}).then(p=>p.body)}const ru=e=>{const{baseDoc:t,url:r}=e;return t||r},Pc=e=>{const{fetch:t,http:r}=e;return t||r||Ns};/*!
76
+ `:""}var zp=gc,Gp={dump:zp};function za(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Ev=er,Av=Hn,Cv=jn,Di=ji,Qo=Ii,Zo=F,yc=zl.load,bc=zl.loadAll,Kp=Gp.dump,xc=Lt,po={binary:Ir,float:ln,map:mi,null:Ft,pairs:zn,set:lo,timestamp:In,bool:pe,int:sn,merge:Fn,omap:hr,seq:ki,str:ei},ho=za("safeLoad","load"),Cn=za("safeLoadAll","loadAll"),Ms=za("safeDump","dump"),Ls={Type:Ev,Schema:Av,FAILSAFE_SCHEMA:Cv,JSON_SCHEMA:Di,CORE_SCHEMA:Qo,DEFAULT_SCHEMA:Zo,load:yc,loadAll:bc,dump:Kp,YAMLException:xc,types:po,safeLoad:ho,safeLoadAll:Cn,safeDump:Ms};const cs=Ls,_v=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window}(),{FormData:Sc,Blob:Ds,File:wc}=_v,Oc=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,Ql=e=>/^[a-z0-9\-._~]+$/i.test(e);function qo(e){let{escape:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return typeof e=="number"&&(e=e.toString()),typeof e!="string"||!e.length||!t?e:r?JSON.parse(e):[...e].map(n=>{if(Ql(n)||Oc(n)&&t==="unsafe")return n;const s=new TextEncoder;return Array.from(s.encode(n)).map(p=>`0${p.toString(16).toUpperCase()}`.slice(-2)).map(p=>`%${p}`).join("")}).join("")}function Ga(e){const{value:t}=e;return Array.isArray(t)?Jp(e):typeof t=="object"?Ec(e):Ac(e)}function Jp(e){let{key:t,value:r,style:n,explode:s,escape:a}=e;const p=d=>qo(d,{escape:a});if(n==="simple")return r.map(d=>p(d)).join(",");if(n==="label")return`.${r.map(d=>p(d)).join(".")}`;if(n==="matrix")return r.map(d=>p(d)).reduce((d,h)=>!d||s?`${d||""};${t}=${h}`:`${d},${h}`,"");if(n==="form"){const d=s?`&${t}=`:",";return r.map(h=>p(h)).join(d)}if(n==="spaceDelimited"){const d=s?`${t}=`:"";return r.map(h=>p(h)).join(` ${d}`)}if(n==="pipeDelimited"){const d=s?`${t}=`:"";return r.map(h=>p(h)).join(`|${d}`)}}function Ec(e){let{key:t,value:r,style:n,explode:s,escape:a}=e;const p=h=>qo(h,{escape:a}),d=Object.keys(r);if(n==="simple")return d.reduce((h,g)=>{const y=p(r[g]),C=s?"=":",";return`${h?`${h},`:""}${g}${C}${y}`},"");if(n==="label")return d.reduce((h,g)=>{const y=p(r[g]),C=s?"=":".";return`${h?`${h}.`:"."}${g}${C}${y}`},"");if(n==="matrix"&&s)return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h};`:";"}${g}=${y}`},"");if(n==="matrix")return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h},`:`;${t}=`}${g},${y}`},"");if(n==="form")return d.reduce((h,g)=>{const y=p(r[g]);return`${h?`${h}${s?"&":","}`:""}${g}${s?"=":","}${y}`},"")}function Ac(e){let{key:t,value:r,style:n,escape:s}=e;const a=p=>qo(p,{escape:s});if(n==="simple")return a(r);if(n==="label")return`.${a(r)}`;if(n==="matrix")return`;${t}=${a(r)}`;if(n==="form")return a(r);if(n==="deepObject")return a(r,{},!0)}const Zl=(e,t)=>{t.body=e},ql={serializeRes:Yp,mergeInQueryOrForm:ra};function Ns(t){return et(this,arguments,function*(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"&&(r=e,e=r.url),r.headers=r.headers||{},ql.mergeInQueryOrForm(r),r.headers&&Object.keys(r.headers).forEach(a=>{const p=r.headers[a];typeof p=="string"&&(r.headers[a]=p.replace(/\n+/g," "))}),r.requestInterceptor&&(r=(yield r.requestInterceptor(r))||r);const n=r.headers["content-type"]||r.headers["Content-Type"];/multipart\/form-data/i.test(n)&&r.body instanceof Sc&&(delete r.headers["content-type"],delete r.headers["Content-Type"]);let s;try{s=yield(r.userFetch||fetch)(r.url,r),s=yield ql.serializeRes(s,e,r),r.responseInterceptor&&(s=(yield r.responseInterceptor(s))||s)}catch(a){if(!s)throw a;const p=new Error(s.statusText||`response status is ${s.status}`);throw p.status=s.status,p.statusCode=s.status,p.responseError=a,p}if(!s.ok){const a=new Error(s.statusText||`response status is ${s.status}`);throw a.status=s.status,a.statusCode=s.status,a.response=s,a}return s})}const Pv=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function Tv(e,t){return t&&(t.indexOf("application/json")===0||t.indexOf("+json")>0)?JSON.parse(e):cs.load(e)}function Yp(e,t){let{loadSpec:r=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:eu(e.headers)},s=n.headers["content-type"],a=r||Pv(s);return(a?e.text:e.blob||e.buffer).call(e).then(d=>{if(n.text=d,n.data=d,a)try{const h=Tv(d,s);n.body=h,n.obj=h}catch(h){n.parseError=h}return n})}function Cc(e){return e.includes(", ")?e.split(", "):e}function eu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof e.entries!="function"?{}:Array.from(e.entries()).reduce((t,r)=>{let[n,s]=r;return t[n]=Cc(s),t},{})}function Bs(e,t){return!t&&typeof navigator!="undefined"&&(t=navigator),t&&t.product==="ReactNative"?!!(e&&typeof e=="object"&&typeof e.uri=="string"):typeof wc!="undefined"&&e instanceof wc||typeof Ds!="undefined"&&e instanceof Ds||ArrayBuffer.isView(e)?!0:e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function ea(e,t){return Array.isArray(e)&&e.some(r=>Bs(r,t))}const Vv={form:",",spaceDelimited:"%20",pipeDelimited:"|"},tu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function _c(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:n,allowEmptyValue:s,serializationOption:a,encoding:p}=t,d=typeof t=="object"&&!Array.isArray(t)?t.value:t,h=r?y=>y.toString():y=>encodeURIComponent(y),g=h(e);if(typeof d=="undefined"&&s)return[[g,""]];if(Bs(d)||ea(d))return[[g,d]];if(a)return ta(e,d,r,a);if(p){if([typeof p.style,typeof p.explode,typeof p.allowReserved].some(y=>y!=="undefined")){const{style:y,explode:C,allowReserved:M}=p;return ta(e,d,r,{style:y,explode:C,allowReserved:M})}if(p.contentType){if(p.contentType==="application/json"){const y=typeof d=="string"?d:JSON.stringify(d);return[[g,h(y)]]}return[[g,h(d.toString())]]}return typeof d!="object"?[[g,h(d)]]:Array.isArray(d)&&d.every(y=>typeof y!="object")?[[g,d.map(h).join(",")]]:[[g,h(JSON.stringify(d))]]}return typeof d!="object"?[[g,h(d)]]:Array.isArray(d)?n==="multi"?[[g,d.map(h)]]:[[g,d.map(h).join(tu[n||"csv"])]]:[[g,""]]}function ta(e,t,r,n){const s=n.style||"form",a=typeof n.explode=="undefined"?s==="form":n.explode,p=r?!1:n&&n.allowReserved?"unsafe":"reserved",d=g=>qo(g,{escape:p}),h=r?g=>g:g=>qo(g,{escape:p});return typeof t!="object"?[[h(e),d(t)]]:Array.isArray(t)?a?[[h(e),t.map(d)]]:[[h(e),t.map(d).join(Vv[s])]]:s==="deepObject"?Object.keys(t).map(g=>[h(`${e}[${g}]`),d(t[g])]):a?Object.keys(t).map(g=>[h(g),d(t[g])]):[[h(e),Object.keys(t).map(g=>[`${h(g)},${d(t[g])}`]).join(",")]]}function Xp(e){return Object.entries(e).reduce((t,r)=>{let[n,s]=r;for(const[a,p]of _c(n,s,!0))if(Array.isArray(p))for(const d of p)if(ArrayBuffer.isView(d)){const h=new Ds([d]);t.append(a,h)}else t.append(a,d);else if(ArrayBuffer.isView(p)){const d=new Ds([p]);t.append(a,d)}else t.append(a,p);return t},new Sc)}function $s(e){const t=Object.keys(e).reduce((r,n)=>{for(const[s,a]of _c(n,e[n]))r[s]=a;return r},{});return xe().stringify(t,{encode:!1,indices:!1})||""}function ra(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:t="",query:r,form:n}=e,s=function(){for(var a=arguments.length,p=new Array(a),d=0;d<a;d++)p[d]=arguments[d];const h=p.filter(g=>g).join("&");return h?`?${h}`:""};if(n){const a=Object.keys(n).some(d=>{const{value:h}=n[d];return Bs(h)||ea(h)}),p=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(p)){const d=Xp(e.form);Zl(d,e)}else e.body=$s(n);delete e.form}if(r){const[a,p]=t.split("?");let d="";if(p){const g=xe().parse(p);Object.keys(r).forEach(C=>delete g[C]),d=xe().stringify(g,{encode:!0})}const h=s(d,$s(r));e.url=a+h,delete e.query}return e}function mo(e,t,r){return r=r||(n=>n),t=t||(n=>n),n=>(typeof n=="string"&&(n={url:n}),ql.mergeInQueryOrForm(n),n=t(n),r(e(n)))}const na="application/json, application/yaml";function vo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{requestInterceptor:r,responseInterceptor:n}=t,s=e.withCredentials?"include":"same-origin";return a=>e({url:a,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:na},credentials:s}).then(p=>p.body)}const ru=e=>{const{baseDoc:t,url:r}=e;return t||r},Pc=e=>{const{fetch:t,http:r}=e;return t||r||Ns};/*!
77
77
  * https://github.com/Starcounter-Jack/JSON-Patch
78
78
  * (c) 2017-2022 Joachim Wester
79
79
  * MIT licensed
80
- */var Qp=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),kv=Object.prototype.hasOwnProperty;function Bi(e,t){return kv.call(e,t)}function fs(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var s in e)Bi(e,s)&&n.push(s);return n}function Kn(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Tc(e){for(var t=0,r=e.length,n;t<r;){if(n=e.charCodeAt(t),n>=48&&n<=57){t++;continue}return!1}return!0}function ps(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Zp(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qp(e,t){var r;for(var n in e)if(Bi(e,n)){if(e[n]===t)return ps(n)+"/";if(typeof e[n]=="object"&&(r=qp(e[n],t),r!=""))return ps(n)+"/"+r}return""}function n0(e,t){if(e===t)return"/";var r=qp(e,t);if(r==="")throw new Error("Object not found in root");return"/"+r}function yn(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(yn(e[t]))return!0}else if(typeof e=="object"){for(var n=fs(e),s=n.length,a=0;a<s;a++)if(yn(e[n[a]]))return!0}}return!1}function Nr(e,t){var r=[e];for(var n in t){var s=typeof t[n]=="object"?JSON.stringify(t[n],null,2):t[n];typeof s!="undefined"&&r.push(n+": "+s)}return r.join(`
80
+ */var Qp=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),kv=Object.prototype.hasOwnProperty;function Ni(e,t){return kv.call(e,t)}function fs(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var s in e)Ni(e,s)&&n.push(s);return n}function Kn(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Tc(e){for(var t=0,r=e.length,n;t<r;){if(n=e.charCodeAt(t),n>=48&&n<=57){t++;continue}return!1}return!0}function ps(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Zp(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qp(e,t){var r;for(var n in e)if(Ni(e,n)){if(e[n]===t)return ps(n)+"/";if(typeof e[n]=="object"&&(r=qp(e[n],t),r!=""))return ps(n)+"/"+r}return""}function n0(e,t){if(e===t)return"/";var r=qp(e,t);if(r==="")throw new Error("Object not found in root");return"/"+r}function yn(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(yn(e[t]))return!0}else if(typeof e=="object"){for(var n=fs(e),s=n.length,a=0;a<s;a++)if(yn(e[n[a]]))return!0}}return!1}function Nr(e,t){var r=[e];for(var n in t){var s=typeof t[n]=="object"?JSON.stringify(t[n],null,2):t[n];typeof s!="undefined"&&r.push(n+": "+s)}return r.join(`
81
81
  `)}var cn=function(e){Qp(t,e);function t(r,n,s,a,p){var d=this.constructor,h=e.call(this,Nr(r,{name:n,index:s,operation:a,tree:p}))||this;return h.name=n,h.index=s,h.operation=a,h.tree=p,Object.setPrototypeOf(h,d.prototype),h.message=Nr(r,{name:n,index:s,operation:a,tree:p}),h}return t}(Error),Mt=cn,Ja=Kn,ia={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=Ya(r,this.path);n&&(n=Kn(n));var s=go(r,{op:"remove",path:this.from}).removed;return go(r,{op:"add",path:this.path,value:s}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=Ya(r,this.from);return go(r,{op:"add",path:this.path,value:Kn(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:Qa(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},nu={add:function(e,t,r){return Tc(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return{newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:ia.move,copy:ia.copy,test:ia.test,_get:ia._get};function Ya(e,t){if(t=="")return e;var r={op:"_get",path:t};return go(e,r),r.value}function go(e,t,r,n,s,a){if(r===void 0&&(r=!1),n===void 0&&(n=!0),s===void 0&&(s=!0),a===void 0&&(a=0),r&&(typeof r=="function"?r(t,0,e,t.path):Xa(t,0)),t.path===""){var p={newDocument:e};if(t.op==="add")return p.newDocument=t.value,p;if(t.op==="replace")return p.newDocument=t.value,p.removed=e,p;if(t.op==="move"||t.op==="copy")return p.newDocument=Ya(e,t.from),t.op==="move"&&(p.removed=e),p;if(t.op==="test"){if(p.test=Qa(e,t.value),p.test===!1)throw new Mt("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return p.newDocument=e,p}else{if(t.op==="remove")return p.removed=e,p.newDocument=null,p;if(t.op==="_get")return t.value=e,p;if(r)throw new Mt("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return p}}else{n||(e=Kn(e));var d=t.path||"",h=d.split("/"),g=e,y=1,C=h.length,M=void 0,I=void 0,B=void 0;for(typeof r=="function"?B=r:B=Xa;;){if(I=h[y],I&&I.indexOf("~")!=-1&&(I=Zp(I)),s&&(I=="__proto__"||I=="prototype"&&y>0&&h[y-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&M===void 0&&(g[I]===void 0?M=h.slice(0,y).join("/"):y==C-1&&(M=t.path),M!==void 0&&B(t,0,e,M)),y++,Array.isArray(g)){if(I==="-")I=g.length;else{if(r&&!Tc(I))throw new Mt("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Tc(I)&&(I=~~I)}if(y>=C){if(r&&t.op==="add"&&I>g.length)throw new Mt("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var p=nu[t.op].call(t,g,I,e);if(p.test===!1)throw new Mt("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return p}}else if(y>=C){var p=ia[t.op].call(t,g,I,e);if(p.test===!1)throw new Mt("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return p}if(g=g[I],r&&y<C&&(!g||typeof g!="object"))throw new Mt("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Us(e,t,r,n,s){if(n===void 0&&(n=!0),s===void 0&&(s=!0),r&&!Array.isArray(t))throw new Mt("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=Kn(e));for(var a=new Array(t.length),p=0,d=t.length;p<d;p++)a[p]=go(e,t[p],r,!0,s,p),e=a[p].newDocument;return a.newDocument=e,a}function Vc(e,t,r){var n=go(e,t);if(n.test===!1)throw new Mt("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function Xa(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new Mt("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);if(ia[e.op]){if(typeof e.path!="string")throw new Mt("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new Mt('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Mt("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Mt("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&yn(e.value))throw new Mt("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var s=e.path.split("/").length,a=n.split("/").length;if(s!==a+1&&s!==a)throw new Mt("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new Mt("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var p={op:"_get",path:e.from,value:void 0},d=iu([p],r);if(d&&d.name==="OPERATION_PATH_UNRESOLVABLE")throw new Mt("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Mt("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function iu(e,t,r){try{if(!Array.isArray(e))throw new Mt("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Us(Kn(t),Kn(e),r||!0);else{r=r||Xa;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0)}}catch(s){if(s instanceof Mt)return s;throw s}}function Qa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=Array.isArray(e),n=Array.isArray(t),s,a,p;if(r&&n){if(a=e.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!Qa(e[s],t[s]))return!1;return!0}if(r!=n)return!1;var d=Object.keys(e);if(a=d.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!t.hasOwnProperty(d[s]))return!1;for(s=a;s--!==0;)if(p=d[s],!Qa(e[p],t[p]))return!1;return!0}return e!==e&&t!==t}/*!
82
82
  * https://github.com/Starcounter-Jack/JSON-Patch
83
83
  * (c) 2017-2021 Joachim Wester
84
84
  * MIT license
85
- */var Za=new WeakMap,kc=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),ed=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function td(e){return Za.get(e)}function jc(e,t){return e.observers.get(t)}function rd(e,t){e.observers.delete(t.callback)}function qa(e,t){t.unobserve()}function jv(e,t){var r=[],n,s=td(e);if(!s)s=new kc(e),Za.set(e,s);else{var a=jc(s,t);n=a&&a.observer}if(n)return n;if(n={},s.value=Kn(e),t){n.callback=t,n.next=null;var p=function(){sa(n)},d=function(){clearTimeout(n.next),n.next=setTimeout(p)};typeof window!="undefined"&&(window.addEventListener("mouseup",d),window.addEventListener("keyup",d),window.addEventListener("mousedown",d),window.addEventListener("keydown",d),window.addEventListener("change",d))}return n.patches=r,n.object=e,n.unobserve=function(){sa(n),clearTimeout(n.next),rd(s,n),typeof window!="undefined"&&(window.removeEventListener("mouseup",d),window.removeEventListener("keyup",d),window.removeEventListener("mousedown",d),window.removeEventListener("keydown",d),window.removeEventListener("change",d))},s.observers.set(t,new ed(t,n)),n}function sa(e,t){t===void 0&&(t=!1);var r=Za.get(e.object);xi(r.value,e.object,e.patches,"",t),e.patches.length&&Us(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function xi(e,t,r,n,s){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=fs(t),p=fs(e),d=!1,h=!1,g=p.length-1;g>=0;g--){var y=p[g],C=e[y];if(Bi(t,y)&&!(t[y]===void 0&&C!==void 0&&Array.isArray(t)===!1)){var M=t[y];typeof C=="object"&&C!=null&&typeof M=="object"&&M!=null&&Array.isArray(C)===Array.isArray(M)?xi(C,M,r,n+"/"+ps(y),s):C!==M&&(d=!0,s&&r.push({op:"test",path:n+"/"+ps(y),value:Kn(C)}),r.push({op:"replace",path:n+"/"+ps(y),value:Kn(M)}))}else Array.isArray(e)===Array.isArray(t)?(s&&r.push({op:"test",path:n+"/"+ps(y),value:Kn(C)}),r.push({op:"remove",path:n+"/"+ps(y)}),h=!0):(s&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),d=!0)}if(!(!h&&a.length==p.length))for(var g=0;g<a.length;g++){var y=a[g];!Bi(e,y)&&t[y]!==void 0&&r.push({op:"add",path:n+"/"+ps(y),value:Kn(t[y])})}}}function nd(e,t,r){r===void 0&&(r=!1);var n=[];return xi(e,t,n,"",r),n}const i0=Object.assign({},m,w,{JsonPatchError:cn,deepClone:Kn,escapePathComponent:ps,unescapePathComponent:Zp});var id=c(64876),Jn=c.n(id);const it={add:Ws,replace:el,remove:Ic,merge:sd,mergeDeep:Iv,context:Rc,getIn:Rv,applyPatch:Si,parentPathMatch:ad,flatten:oa,fullyNormalizeArray:au,normalizeArray:lu,isPromise:Fv,forEachNew:tl,forEachNewPrimitive:od,isJsonPatch:Fc,isContextPatch:aa,isPatch:la,isMutation:cd,isAdditiveMutation:rl,isGenerator:Mv,isFunction:ud,isObject:Hs,isError:uu};function Si(e,t,r){if(r=r||{},t=H(H({},t),{},{path:t.path&&ds(t.path)}),t.op==="merge"){const n=ua(e,t.path);Object.assign(n,t.value),Us(e,[el(t.path,n)])}else if(t.op==="mergeDeep"){const n=ua(e,t.path),s=Jn()(n,t.value);e=Us(e,[el(t.path,s)]).newDocument}else if(t.op==="add"&&t.path===""&&Hs(t.value)){const n=Object.keys(t.value).reduce((s,a)=>(s.push({op:"add",path:`/${ds(a)}`,value:t.value[a]}),s),[]);Us(e,n)}else if(t.op==="replace"&&t.path===""){let{value:n}=t;r.allowMetaPatches&&t.meta&&rl(t)&&(Array.isArray(t.value)||Hs(t.value))&&(n=H(H({},n),t.meta)),e=n}else if(Us(e,[t]),r.allowMetaPatches&&t.meta&&rl(t)&&(Array.isArray(t.value)||Hs(t.value))){const n=ua(e,t.path),s=H(H({},n),t.meta);Us(e,[el(t.path,s)])}return e}function ds(e){return Array.isArray(e)?e.length<1?"":`/${e.map(t=>(t+"").replace(/~/g,"~0").replace(/\//g,"~1")).join("/")}`:e}function Ws(e,t){return{op:"add",path:e,value:t}}function el(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function Ic(e){return{op:"remove",path:e}}function sd(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function Iv(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function Rc(e,t){return{type:"context",path:e,value:t}}function tl(e,t){try{return su(e,ou,t)}catch(r){return r}}function od(e,t){try{return su(e,$i,t)}catch(r){return r}}function su(e,t,r){const n=e.filter(rl).map(p=>t(p.value,r,p.path))||[],s=oa(n);return ld(s)}function $i(e,t,r){return r=r||[],Array.isArray(e)?e.map((n,s)=>$i(n,t,r.concat(s))):Hs(e)?Object.keys(e).map(n=>$i(e[n],t,r.concat(n))):t(e,r[r.length-1],r)}function ou(e,t,r){r=r||[];let n=[];if(r.length>0){const s=t(e,r[r.length-1],r);s&&(n=n.concat(s))}if(Array.isArray(e)){const s=e.map((a,p)=>ou(a,t,r.concat(p)));s&&(n=n.concat(s))}else if(Hs(e)){const s=Object.keys(e).map(a=>ou(e[a],t,r.concat(a)));s&&(n=n.concat(s))}return n=oa(n),n}function ad(e,t){if(!Array.isArray(t))return!1;for(let r=0,n=t.length;r<n;r+=1)if(t[r]!==e[r])return!1;return!0}function Rv(e,t){return t.reduce((r,n)=>typeof n!="undefined"&&r?r[n]:r,e)}function au(e){return ld(oa(lu(e)))}function lu(e){return Array.isArray(e)?e:[e]}function oa(e){return[].concat(...e.map(t=>Array.isArray(t)?oa(t):t))}function ld(e){return e.filter(t=>typeof t!="undefined")}function Hs(e){return e&&typeof e=="object"}function Fv(e){return Hs(e)&&ud(e.then)}function ud(e){return e&&typeof e=="function"}function uu(e){return e instanceof Error}function Fc(e){if(la(e)){const{op:t}=e;return t==="add"||t==="remove"||t==="replace"}return!1}function Mv(e){return Object.prototype.toString.call(e)==="[object GeneratorFunction]"}function cd(e){return Fc(e)||la(e)&&e.type==="mutation"}function rl(e){return cd(e)&&(e.op==="add"||e.op==="replace"||e.op==="merge"||e.op==="mergeDeep")}function aa(e){return la(e)&&e.type==="context"}function la(e){return e&&typeof e=="object"}function ua(e,t){try{return Ya(e,t)}catch(r){return console.error(r),{}}}function cu(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];[this.message]=s,t&&t.apply(this,s)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}var Mc=c(87767),fd=c.n(Mc);const Lv=["properties"],pd=["properties"],fn=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],fu=["schema/example","items/example"];function Lc(e){const t=e[e.length-1],r=e[e.length-2],n=e.join("/");return Lv.indexOf(t)>-1&&pd.indexOf(r)===-1||fn.indexOf(n)>-1||fu.some(s=>n.indexOf(s)>-1)}function dd(e,t){let{specmap:r,getBaseUrlForNodePath:n=p=>r.getContext([...t,...p]).baseDoc,targetKeys:s=["$ref","$$ref"]}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=[];return fd()(e).forEach(function(){if(s.includes(this.key)&&typeof this.node=="string"){const d=this.path,h=t.concat(this.path),g=pu(this.node,n(d));a.push(r.replace(h,g))}}),a}function pu(e,t){const[r,n]=e.split("#"),s=de.resolve(r||"",t||"");return n?`${s}#${n}`:s}const ca=/^([a-z]+:\/\/|\/\/)/i,hs=cu("JSONRefError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),Ui={},Dc=new WeakMap,hd=[e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="examples",e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="content"&&e[7]==="example",e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="content"&&e[7]==="examples"&&e[9]==="value",e=>e[0]==="paths"&&e[3]==="requestBody"&&e[4]==="content"&&e[6]==="example",e=>e[0]==="paths"&&e[3]==="requestBody"&&e[4]==="content"&&e[6]==="examples"&&e[8]==="value",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="example",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="example",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="examples"&&e[6]==="value",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="examples"&&e[7]==="value",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="content"&&e[6]==="example",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="content"&&e[6]==="examples"&&e[8]==="value",e=>e[0]==="paths"&&e[3]==="parameters"&&e[4]==="content"&&e[7]==="example",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="content"&&e[7]==="examples"&&e[9]==="value"],fa=e=>hd.some(t=>t(e)),nl=Object.assign({key:"$ref",plugin:(e,t,r,n)=>{const s=n.getInstance(),a=r.slice(0,-1);if(Lc(a)||fa(a))return;const{baseDoc:p}=n.getContext(r);if(typeof e!="string")return new hs("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:p,fullPath:r});const d=yo(e),h=d[0],g=d[1]||"";let y;try{y=p||h?pa(h,p):null}catch(z){return Bc(z,{pointer:g,$ref:e,basePath:y,fullPath:r})}let C,M;if(ha(g,y,a,n)&&!s.useCircularStructures){const z=pu(e,y);return e===z?null:it.replace(r,z)}if(y==null?(M=xo(g),C=n.get(M),typeof C=="undefined"&&(C=new hs(`Could not resolve reference: ${e}`,{pointer:g,$ref:e,baseDoc:p,fullPath:r}))):(C=$c(y,g),C.__value!=null?C=C.__value:C=C.catch(z=>{throw Bc(z,{pointer:g,$ref:e,baseDoc:p,fullPath:r})})),C instanceof Error)return[it.remove(r),C];const I=pu(e,y),B=it.replace(a,C,{$$ref:I});if(y&&y!==p)return[B,it.context(a,{baseDoc:y})];try{if(!sl(n.state,B)||s.useCircularStructures)return B}catch(z){return null}}},{docCache:Ui,absoluteify:pa,clearCache:md,JSONRefError:hs,wrapError:Bc,getDoc:Uc,split:yo,extractFromDoc:$c,fetchJSON:il,extract:bo,jsonPointerToArray:xo,unescapeJsonPointerToken:da}),Nc=nl;function pa(e,t){if(!ca.test(e)){if(!t)throw new hs(`Tried to resolve a relative URL, without having a basePath. path: '${e}' basePath: '${t}'`);return de.resolve(t,e)}return e}function Bc(e,t){let r;return e&&e.response&&e.response.body?r=`${e.response.body.code} ${e.response.body.message}`:r=e.message,new hs(`Could not resolve reference: ${r}`,t,e)}function yo(e){return(e+"").split("#")}function $c(e,t){const r=Ui[e];if(r&&!it.isPromise(r))try{const n=bo(t,r);return Object.assign(Promise.resolve(n),{__value:n})}catch(n){return Promise.reject(n)}return Uc(e).then(n=>bo(t,n))}function md(e){typeof e!="undefined"?delete Ui[e]:Object.keys(Ui).forEach(t=>{delete Ui[t]})}function Uc(e){const t=Ui[e];return t?it.isPromise(t)?t:Promise.resolve(t):(Ui[e]=nl.fetchJSON(e).then(r=>(Ui[e]=r,r)),Ui[e])}function il(e){return fetch(e,{headers:{Accept:na},loadSpec:!0}).then(t=>t.text()).then(t=>cs.load(t))}function bo(e,t){const r=xo(e);if(r.length<1)return t;const n=it.getIn(t,r);if(typeof n=="undefined")throw new hs(`Could not resolve pointer: ${e} does not exist in document`,{pointer:e});return n}function xo(e){if(typeof e!="string")throw new TypeError(`Expected a string, got a ${typeof e}`);return e[0]==="/"&&(e=e.substr(1)),e===""?[]:e.split("/").map(da)}function da(e){return typeof e!="string"?e:new URLSearchParams(`=${e.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function Wc(e){return new URLSearchParams([["",e.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function Nv(e){return e.length===0?"":`/${e.map(Wc).join("/")}`}const vd=e=>!e||e==="/"||e==="#";function Wi(e,t){if(vd(t))return!0;const r=e.charAt(t.length),n=t.slice(-1);return e.indexOf(t)===0&&(!r||r==="/"||r==="#")&&n!=="#"}function ha(e,t,r,n){let s=Dc.get(n);s||(s={},Dc.set(n,s));const a=Nv(r),p=`${t||"<specmap-base>"}#${e}`,d=a.replace(/allOf\/\d+\/?/g,""),h=n.contextTree.get([]).baseDoc;if(t===h&&Wi(d,e))return!0;let g="";if(r.some(C=>(g=`${g}/${Wc(C)}`,s[g]&&s[g].some(M=>Wi(M,p)||Wi(p,M)))))return!0;s[d]=(s[d]||[]).concat(p)}function sl(e,t){const r=[e];return t.path.reduce((s,a)=>(r.push(s[a]),s[a]),e),n(t.value);function n(s){return it.isObject(s)&&(r.indexOf(s)>=0||Object.keys(s).some(a=>n(s[a])))}}const Bv={key:"allOf",plugin:(e,t,r,n,s)=>{if(s.meta&&s.meta.$$ref)return;const a=r.slice(0,-1);if(Lc(a))return;if(!Array.isArray(e)){const g=new TypeError("allOf must be an array");return g.fullPath=r,g}let p=!1,d=s.value;if(a.forEach(g=>{d&&(d=d[g])}),d=H({},d),Object.keys(d).length===0)return;delete d.allOf;const h=[];return h.push(n.replace(a,{})),e.forEach((g,y)=>{if(!n.isObject(g)){if(p)return null;p=!0;const I=new TypeError("Elements in allOf must be objects");return I.fullPath=r,h.push(I)}h.push(n.mergeDeep(a,g));const C=r.slice(0,-1),M=dd(g,C,{getBaseUrlForNodePath:I=>n.getContext([...r,y,...I]).baseDoc,specmap:n});h.push(...M)}),d.example&&h.push(n.remove([].concat(a,"example"))),h.push(n.mergeDeep(a,d)),d.$$ref||h.push(n.remove([].concat(a,"$$ref"))),h}},gd={key:"parameters",plugin:(e,t,r,n)=>{if(Array.isArray(e)&&e.length){const s=Object.assign([],e),a=r.slice(0,-1),p=H({},it.getIn(n.spec,a));for(let d=0;d<e.length;d+=1){const h=e[d];try{s[d].default=n.parameterMacro(p,h)}catch(g){const y=new Error(g);return y.fullPath=r,y}}return it.replace(r,s)}return it.replace(r,e)}},$v={key:"properties",plugin:(e,t,r,n)=>{const s=H({},e);for(const p in e)try{s[p].default=n.modelPropertyMacro(s[p])}catch(d){const h=new Error(d);return h.fullPath=r,h}return it.replace(r,s)}};class Uv{constructor(t){this.root=Hc(t||{})}set(t,r){const n=this.getParent(t,!0);if(!n){tn(this.root,r,null);return}const s=t[t.length-1],{children:a}=n;if(a[s]){tn(a[s],r,n);return}a[s]=Hc(r,n)}get(t){if(t=t||[],t.length<1)return this.root.value;let r=this.root,n,s;for(let a=0;a<t.length&&(s=t[a],n=r.children,!!n[s]);a+=1)r=n[s];return r&&r.protoValue}getParent(t,r){return!t||t.length<1?null:t.length<2?this.root:t.slice(0,-1).reduce((n,s)=>{if(!n)return n;const{children:a}=n;return!a[s]&&r&&(a[s]=Hc(null,n)),a[s]},this.root)}}function Hc(e,t){return tn({children:{}},e,t)}function tn(e,t,r){return e.value=t||{},e.protoValue=r?H(H({},r.protoValue),e.value):e.value,Object.keys(e.children).forEach(n=>{const s=e.children[n];e.children[n]=tn(s,s.value,e)}),e}const zc=100,yd=()=>{};class Wv{static getPluginName(t){return t.pluginName}static getPatchesOfType(t,r){return t.filter(r)}constructor(t){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new Uv,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),it,{getInstance:()=>this}),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(it.isFunction),this.patches.push(it.add([],this.spec)),this.patches.push(it.context([],this.context)),this.updatePatches(this.patches)}debug(t){if(this.debugLevel===t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];console.log(...n)}}verbose(t){if(this.debugLevel==="verbose"){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];console.log(`[${t}] `,...n)}}wrapPlugin(t,r){const{pathDiscriminator:n}=this;let s=null,a;return t[this.pluginProp]?(s=t,a=t[this.pluginProp]):it.isFunction(t)?a=t:it.isObject(t)&&(a=p(t)),Object.assign(a.bind(s),{pluginName:t.name||r,isGenerator:it.isGenerator(a)});function p(d){const h=(g,y)=>Array.isArray(g)?g.every((C,M)=>C===y[M]):!0;return function*(y,C){const M={};for(const B of y.filter(it.isAdditiveMutation))yield*I(B.value,B.path,B);function*I(B,z,W){if(!it.isObject(B))d.key===z[z.length-1]&&(yield d.plugin(B,d.key,z,C));else{const G=z.length-1,te=z[G],le=z.indexOf("properties"),ye=te==="properties"&&G===le,he=C.allowMetaPatches&&M[B.$$ref];for(const Ee of Object.keys(B)){const me=B[Ee],ve=z.concat(Ee),ce=it.isObject(me),Se=B.$$ref;if(he||ce&&(C.allowMetaPatches&&Se&&(M[Se]=!0),yield*I(me,ve,W)),!ye&&Ee===d.key){const Ce=h(n,z);(!n||Ce)&&(yield d.plugin(me,Ee,ve,C,W))}}}}}}}nextPlugin(){return this.wrappedPlugins.find(t=>this.getMutationsForPlugin(t).length>0)}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map(t=>t.value))}getPluginHistory(t){const r=this.constructor.getPluginName(t);return this.pluginHistory[r]||[]}getPluginRunCount(t){return this.getPluginHistory(t).length}getPluginHistoryTip(t){const r=this.getPluginHistory(t);return r&&r[r.length-1]||{}}getPluginMutationIndex(t){const r=this.getPluginHistoryTip(t).mutationIndex;return typeof r!="number"?-1:r}updatePluginHistory(t,r){const n=this.constructor.getPluginName(t);this.pluginHistory[n]=this.pluginHistory[n]||[],this.pluginHistory[n].push(r)}updatePatches(t){it.normalizeArray(t).forEach(r=>{if(r instanceof Error){this.errors.push(r);return}try{if(!it.isObject(r)){this.debug("updatePatches","Got a non-object patch",r);return}if(this.showDebug&&this.allPatches.push(r),it.isPromise(r.value)){this.promisedPatches.push(r),this.promisedPatchThen(r);return}if(it.isContextPatch(r)){this.setContext(r.path,r.value);return}if(it.isMutation(r)){this.updateMutations(r);return}}catch(n){console.error(n),this.errors.push(n)}})}updateMutations(t){typeof t.value=="object"&&!Array.isArray(t.value)&&this.allowMetaPatches&&(t.value=H({},t.value));const r=it.applyPatch(this.state,t,{allowMetaPatches:this.allowMetaPatches});r&&(this.mutations.push(t),this.state=r)}removePromisedPatch(t){const r=this.promisedPatches.indexOf(t);if(r<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}this.promisedPatches.splice(r,1)}promisedPatchThen(t){return t.value=t.value.then(r=>{const n=H(H({},t),{},{value:r});this.removePromisedPatch(t),this.updatePatches(n)}).catch(r=>{this.removePromisedPatch(t),this.updatePatches(r)}),t.value}getMutations(t,r){return t=t||0,typeof r!="number"&&(r=this.mutations.length),this.mutations.slice(t,r)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(t){const r=this.getPluginMutationIndex(t);return this.getMutations(r+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(t){return it.getIn(this.state,t)}_getContext(t){return this.contextTree.get(t)}setContext(t,r){return this.contextTree.set(t,r)}_hasRun(t){return this.getPluginRunCount(this.getCurrentPlugin())>(t||0)}dispatch(){const t=this,r=this.nextPlugin();if(!r){const a=this.nextPromisedPatch();if(a)return a.then(()=>this.dispatch()).catch(()=>this.dispatch());const p={spec:this.state,errors:this.errors};return this.showDebug&&(p.patches=this.allPatches),Promise.resolve(p)}if(t.pluginCount=t.pluginCount||{},t.pluginCount[r]=(t.pluginCount[r]||0)+1,t.pluginCount[r]>zc)return Promise.resolve({spec:t.state,errors:t.errors.concat(new Error(`We've reached a hard limit of ${zc} plugin runs`))});if(r!==this.currentPlugin&&this.promisedPatches.length){const a=this.promisedPatches.map(p=>p.value);return Promise.all(a.map(p=>p.then(yd,yd))).then(()=>this.dispatch())}return n();function n(){t.currentPlugin=r;const a=t.getCurrentMutations(),p=t.mutations.length-1;try{if(r.isGenerator)for(const d of r(a,t.getLib()))s(d);else{const d=r(a,t.getLib());s(d)}}catch(d){console.error(d),s([Object.assign(Object.create(d),{plugin:r})])}finally{t.updatePluginHistory(r,{mutationIndex:p})}return t.dispatch()}function s(a){a&&(a=it.fullyNormalizeArray(a),t.updatePatches(a,r))}}}function Hv(e){return new Wv(e).dispatch()}const zs={refs:Nc,allOf:Bv,parameters:gd,properties:$v},Gc=e=>e.replace(/\W/gi,"_");function Gv(e,t){let{v2OperationIdCompatibilityMode:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r){let n=`${t.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return n=n||`${e.substring(1)}_${t}`,n.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${t.toLowerCase()}${Gc(e)}`}function ol(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:n}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!e||typeof e!="object"?null:(e.operationId||"").replace(/\s/g,"").length?Gc(e.operationId):Gv(t,r,{v2OperationIdCompatibilityMode:n})}function du(e){const{spec:t}=e,{paths:r}=t,n={};if(!r||t.$$normalized)return e;for(const s in r){const a=r[s];if(a==null||!["object","function"].includes(typeof a))continue;const p=a.parameters;for(const d in a){const h=a[d];if(h==null||!["object","function"].includes(typeof h))continue;const g=ol(h,s,d);if(g){n[g]?n[g].push(h):n[g]=[h];const y=n[g];if(y.length>1)y.forEach((C,M)=>{C.__originalOperationId=C.__originalOperationId||C.operationId,C.operationId=`${g}${M+1}`});else if(typeof h.operationId!="undefined"){const C=y[0];C.__originalOperationId=C.__originalOperationId||h.operationId,C.operationId=g}}if(d!=="parameters"){const y=[],C={};for(const M in t)(M==="produces"||M==="consumes"||M==="security")&&(C[M]=t[M],y.push(C));if(p&&(C.parameters=p,y.push(C)),y.length){for(const M of y)for(const I in M)if(!h[I])h[I]=M[I];else if(I==="parameters")for(const B of M[I])h[I].some(W=>W.name&&W.name===B.name||W.$ref&&W.$ref===B.$ref||W.$$ref&&W.$$ref===B.$$ref||W===B)||h[I].push(B)}}}}return t.$$normalized=!0,e}function Hi(e){return et(this,null,function*(){const{spec:t,mode:r,allowMetaPatches:n=!0,pathDiscriminator:s,modelPropertyMacro:a,parameterMacro:p,requestInterceptor:d,responseInterceptor:h,skipNormalization:g,useCircularStructures:y}=e,C=ru(e),M=Pc(e);return I(t);function I(B){C&&(zs.refs.docCache[C]=B),zs.refs.fetchJSON=vo(M,{requestInterceptor:d,responseInterceptor:h});const z=[zs.refs];return typeof p=="function"&&z.push(zs.parameters),typeof a=="function"&&z.push(zs.properties),r!=="strict"&&z.push(zs.allOf),Hv({spec:B,context:{baseDoc:C},plugins:z,allowMetaPatches:n,pathDiscriminator:s,parameterMacro:p,modelPropertyMacro:a,useCircularStructures:y}).then(g?W=>et(this,null,function*(){return W}):du)}})}function al(){zs.refs.clearCache()}const So={name:"generic",match(){return!0},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return Hi(e)})}};function ms(e){return et(this,null,function*(){return Hi(e)})}const Kv=e=>{try{const{swagger:t}=e;return t==="2.0"}catch(t){return!1}},bd=e=>{try{const{openapi:t}=e;return typeof t=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(t)}catch(t){return!1}},wo=e=>{try{const{openapi:t}=e;return typeof t=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(t)}catch(t){return!1}},Jc=e=>bd(e)||wo(e),hu={name:"openapi-2",match(e){let{spec:t}=e;return Kv(t)},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return ms(e)})}};function mu(e){return et(this,null,function*(){return Hi(e)})}const ul={name:"openapi-3-0",match(e){let{spec:t}=e;return bd(t)},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return mu(e)})}},Yc=e=>et(this,null,function*(){const{spec:t,requestInterceptor:r,responseInterceptor:n}=e,s=ru(e),a=Pc(e),p=t||(yield vo(a,{requestInterceptor:r,responseInterceptor:n})(s)),d=H(H({},e),{},{spec:p});return e.strategies.find(g=>g.match(d)).resolve(d)}),vu=e=>t=>et(this,null,function*(){const r=H(H({},e),t);return Yc(r)}),Yv=vu({strategies:[ul,hu,So]});var cl=c(13546),ma=c.n(cl);const Xv=function(r,n){return et(this,arguments,function*(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{returnEntireTree:a,baseDoc:p,requestInterceptor:d,responseInterceptor:h,parameterMacro:g,modelPropertyMacro:y,useCircularStructures:C,strategies:M}=s,I={spec:e,pathDiscriminator:t,baseDoc:p,requestInterceptor:d,responseInterceptor:h,parameterMacro:g,modelPropertyMacro:y,useCircularStructures:C,strategies:M},z=M.find(G=>G.match(I)).normalize(I),W=yield Yv(H(H({},I),{},{spec:z,allowMetaPatches:!0,skipNormalization:!0}));return!a&&Array.isArray(t)&&t.length&&(W.spec=ma()(W.spec,t)||null),W})},Xc=e=>function(n,s){return et(this,arguments,function*(t,r){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const p=H(H({},e),a);return Xv(t,r,p)})},Qc=Xc({strategies:[ul,hu,So]});var Te=c(33030);class Qv extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(t){this.attributes.set("code",t)}}const Gs=Qv;class xd extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="comment"}}const fl=xd;var Zv=function(){return!1};const pl=Zv;var Sd=function(){return!0};const Ks=Sd,qv={"@@functional/placeholder":!0};function br(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function qt(e){return function t(r){return arguments.length===0||br(r)?t:e.apply(this,arguments)}}function $e(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return br(r)?t:qt(function(s){return e(r,s)});default:return br(r)&&br(n)?t:br(r)?qt(function(s){return e(s,n)}):br(n)?qt(function(s){return e(r,s)}):e(r,n)}}}const vs=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function dl(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Tr(e,t,r){return function(){if(arguments.length===0)return r();var n=arguments[arguments.length-1];if(!vs(n)){for(var s=0;s<e.length;){if(typeof n[e[s]]=="function")return n[e[s]].apply(n,Array.prototype.slice.call(arguments,0,-1));s+=1}if(dl(n)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(n)}}return r.apply(this,arguments)}}function gs(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Gt={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var eg=function(){function e(t,r){this.xf=r,this.f=t,this.all=!0}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)||(this.all=!1,t=gs(this.xf["@@transducer/step"](t,!1))),t},e}(),tg=$e(function(t,r){return new eg(t,r)}),wd=$e(Tr(["all"],tg,function(t,r){for(var n=0;n<r.length;){if(!t(r[n]))return!1;n+=1}return!0}));const Zc=wd;function gu(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(r){return t.apply(this,arguments)};case 2:return function(r,n){return t.apply(this,arguments)};case 3:return function(r,n,s){return t.apply(this,arguments)};case 4:return function(r,n,s,a){return t.apply(this,arguments)};case 5:return function(r,n,s,a,p){return t.apply(this,arguments)};case 6:return function(r,n,s,a,p,d){return t.apply(this,arguments)};case 7:return function(r,n,s,a,p,d,h){return t.apply(this,arguments)};case 8:return function(r,n,s,a,p,d,h,g){return t.apply(this,arguments)};case 9:return function(r,n,s,a,p,d,h,g,y){return t.apply(this,arguments)};case 10:return function(r,n,s,a,p,d,h,g,y,C){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function hl(e,t,r){return function(){for(var n=[],s=0,a=e,p=0;p<t.length||s<arguments.length;){var d;p<t.length&&(!br(t[p])||s>=arguments.length)?d=t[p]:(d=arguments[s],s+=1),n[p]=d,br(d)||(a-=1),p+=1}return a<=0?r.apply(this,n):gu(a,hl(e,n,r))}}var qc=$e(function(t,r){return t===1?qt(r):gu(t,hl(t,[],r))});const lr=qc;var rg=$e(function(t,r){return r>t?r:t});const yu=rg;function wi(e,t){for(var r=0,n=t.length,s=Array(n);r<n;)s[r]=e(t[r]),r+=1;return s}function ml(e){return Object.prototype.toString.call(e)==="[object String]"}var bu=qt(function(t){return vs(t)?!0:!t||typeof t!="object"||ml(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const xu=bu;var ng=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,r){return this.f(t,r)},e}();function ig(e){return new ng(e)}var wr=$e(function(t,r){return gu(t.length,function(){return t.apply(r,arguments)})});const vl=wr;function ef(e,t,r){for(var n=0,s=r.length;n<s;){if(t=e["@@transducer/step"](t,r[n]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}function va(e,t,r){for(var n=r.next();!n.done;){if(t=e["@@transducer/step"](t,n.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function ii(e,t,r,n){return e["@@transducer/result"](r[n](vl(e["@@transducer/step"],e),t))}var gl=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator";function si(e,t,r){if(typeof e=="function"&&(e=ig(e)),xu(r))return ef(e,t,r);if(typeof r["fantasy-land/reduce"]=="function")return ii(e,t,r,"fantasy-land/reduce");if(r[gl]!=null)return va(e,t,r[gl]());if(typeof r.next=="function")return va(e,t,r);if(typeof r.reduce=="function")return ii(e,t,r,"reduce");throw new TypeError("reduce: list must be array or iterable")}var Od=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,this.f(r))},e}(),Ed=$e(function(t,r){return new Od(t,r)});const Ad=Ed;function _n(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var tf=Object.prototype.toString,sg=function(){return tf.call(arguments)==="[object Arguments]"?function(t){return tf.call(t)==="[object Arguments]"}:function(t){return _n("callee",t)}}();const Su=sg;var Cd=!{toString:null}.propertyIsEnumerable("toString"),ir=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],rf=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),og=function(t,r){for(var n=0;n<t.length;){if(t[n]===r)return!0;n+=1}return!1},ga=qt(typeof Object.keys=="function"&&!rf?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var r,n,s=[],a=rf&&Su(t);for(r in t)_n(r,t)&&(!a||r!=="length")&&(s[s.length]=r);if(Cd)for(n=ir.length-1;n>=0;)r=ir[n],_n(r,t)&&!og(s,r)&&(s[s.length]=r),n-=1;return s});const zi=ga;var wu=$e(Tr(["fantasy-land/map","map"],Ad,function(t,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return lr(r.length,function(){return t.call(this,r.apply(this,arguments))});case"[object Object]":return si(function(n,s){return n[s]=t(r[s]),n},{},zi(r));default:return wi(t,r)}}));const Oo=wu,Or=Number.isInteger||function(t){return t<<0===t};var ag=$e(function(t,r){var n=t<0?r.length+t:t;return ml(r)?r.charAt(n):r[n]});const Ou=ag;var lg=$e(function(t,r){if(r!=null)return Or(t)?Ou(t,r):r[t]});const Js=lg;var i=$e(function(t,r){return Oo(Js(t),r)});const o=i;function u(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return br(r)?t:$e(function(a,p){return e(r,a,p)});case 2:return br(r)&&br(n)?t:br(r)?$e(function(a,p){return e(a,n,p)}):br(n)?$e(function(a,p){return e(r,a,p)}):qt(function(a){return e(r,n,a)});default:return br(r)&&br(n)&&br(s)?t:br(r)&&br(n)?$e(function(a,p){return e(a,p,s)}):br(r)&&br(s)?$e(function(a,p){return e(a,n,p)}):br(n)&&br(s)?$e(function(a,p){return e(r,a,p)}):br(r)?qt(function(a){return e(a,n,s)}):br(n)?qt(function(a){return e(r,a,s)}):br(s)?qt(function(a){return e(r,n,a)}):e(r,n,s)}}}var l=u(si);const f=l;var v=qt(function(t){return lr(f(yu,0,o("length",t)),function(){for(var r=0,n=t.length;r<n;){if(!t[r].apply(this,arguments))return!1;r+=1}return!0})});const S=v;var P=qt(function(t){return function(){return t}});const T=P;var D=function(){function e(t,r){this.xf=r,this.f=t,this.any=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.any=!0,t=gs(this.xf["@@transducer/step"](t,!0))),t},e}(),oe=$e(function(t,r){return new D(t,r)}),we=$e(Tr(["any"],oe,function(t,r){for(var n=0;n<r.length;){if(t(r[n]))return!0;n+=1}return!1}));const ge=null;var Ve=qt(function(t){return lr(f(yu,0,o("length",t)),function(){for(var r=0,n=t.length;r<n;){if(t[r].apply(this,arguments))return!0;r+=1}return!1})});const Ie=Ve;function De(e,t){e=e||[],t=t||[];var r,n=e.length,s=t.length,a=[];for(r=0;r<n;)a[a.length]=e[r],r+=1;for(r=0;r<s;)a[a.length]=t[r],r+=1;return a}var Ue=$e(function(t,r){return typeof r["fantasy-land/ap"]=="function"?r["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(r):typeof t=="function"?function(n){return t(n)(r(n))}:si(function(n,s){return De(n,Oo(s,r))},[],t)});const Ge=Ue;function We(e,t){for(var r=0,n=t.length-(e-1),s=new Array(n>=0?n:0);r<n;)s[r]=Array.prototype.slice.call(t,r,r+e),r+=1;return s}var Xe=function(){function e(t,r){this.xf=r,this.pos=0,this.full=!1,this.acc=new Array(t)}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.store(r),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},e.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},e.prototype.getCopy=function(){return De(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},e}(),ct=$e(function(t,r){return new Xe(t,r)}),It=$e(Tr([],ct,We));const mr=null;var Gr=$e(function(t,r){return t.apply(this,r)});const Cr=Gr;var Ln=qt(function(t){for(var r=zi(t),n=r.length,s=[],a=0;a<n;)s[a]=t[r[a]],a+=1;return s});const Pn=Ln;function Br(e,t){return _isArray(t)?t.map(e):keys(t).reduce(function(r,n){return r[n]=e(t[n]),r},{})}var Dn=null;const pn=null;function $r(e,t,r){if(Or(e)&&vs(r)){var n=[].concat(r);return n[e]=t,n}var s={};for(var a in r)s[a]=r[a];return s[e]=t,s}var Mr=qt(function(t){return t==null});const vr=Mr;var Tn=u(function e(t,r,n){if(t.length===0)return r;var s=t[0];if(t.length>1){var a=!vr(n)&&_n(s,n)?n[s]:Or(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,a)}return $r(s,r,n)});const ya=Tn;var Eo=null;const bn=null;function oi(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var Kr=$e(function(t,r){return t&&r});const nf=Kr;var ys=$e(function(t,r){var n=lr(t,r);return lr(t,function(){return si(Ge,Oo(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Ao=ys;var Co=qt(function(t){return Ao(t.length,t)});const rn=Co;var ba=$e(function(t,r){return oi(t)?function(){return t.apply(this,arguments)&&r.apply(this,arguments)}:rn(nf)(t,r)});const bs=ba;function VO(e){return function t(r){for(var n,s,a,p=[],d=0,h=r.length;d<h;){if(xu(r[d]))for(n=e?t(r[d]):r[d],a=0,s=n.length;a<s;)p[p.length]=n[a],a+=1;else p[p.length]=r[d];d+=1}return p}}function kO(e){return{"@@transducer/value":e,"@@transducer/reduced":!0}}var jO=function(e){return{"@@transducer/init":Gt.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,r){var n=e["@@transducer/step"](t,r);return n["@@transducer/reduced"]?kO(n):n}}},IO=function(t){var r=jO(t);return{"@@transducer/init":Gt.init,"@@transducer/result":function(n){return r["@@transducer/result"](n)},"@@transducer/step":function(n,s){return xu(s)?si(r,n,s):si(r,n,[s])}}};const RO=IO;var FO=$e(function(t,r){return Oo(t,RO(r))}),MO=$e(Tr(["fantasy-land/chain","chain"],FO,function(t,r){return typeof r=="function"?function(n){return t(r(n))(n)}:VO(!1)(Oo(t,r))}));const LO=MO;var B9=null;const $9=null;var DO=qt(function(t){return function(r,n){return t(r,n)?-1:t(n,r)?1:0}});const NO=DO;var BO=qt(function(t){return!t}),$O=rn(BO);const Eu=$O;function UO(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function ug(e,t){return function(){var r=arguments.length;if(r===0)return t();var n=arguments[r-1];return vs(n)||typeof n[e]!="function"?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}var WO=u(ug("slice",function(t,r,n){return Array.prototype.slice.call(n,t,r)}));const yl=WO;var HO=qt(ug("tail",yl(1,1/0)));const o0=HO;function Jr(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return gu(arguments[0].length,f(UO,arguments[0],o0(arguments)))}var zO=qt(function(t){return ml(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});const GO=zO;function KO(){if(arguments.length===0)throw new Error("compose requires at least one argument");return Jr.apply(this,GO(arguments))}var W9=null;const H9=null;var z9=null;const G9=null;function a0(e){for(var t=[],r;!(r=e.next()).done;)t.push(r.value);return t}function _d(e,t,r){for(var n=0,s=r.length;n<s;){if(e(t,r[n]))return!0;n+=1}return!1}function JO(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function YO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const Pd=typeof Object.is=="function"?Object.is:YO;var XO=qt(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});const Gi=XO;function l0(e,t,r,n){var s=a0(e),a=a0(t);function p(d,h){return cg(d,h,r.slice(),n.slice())}return!_d(function(d,h){return!_d(p,h,d)},a,s)}function cg(e,t,r,n){if(Pd(e,t))return!0;var s=Gi(e);if(s!==Gi(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&JO(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Pd(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Pd(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===e)return n[a]===t;a-=1}switch(s){case"Map":return e.size!==t.size?!1:l0(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size!==t.size?!1:l0(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var p=zi(e);if(p.length!==zi(t).length)return!1;var d=r.concat([e]),h=n.concat([t]);for(a=p.length-1;a>=0;){var g=p[a];if(!(_n(g,t)&&cg(t[g],e[g],d,h)))return!1;a-=1}return!0}var QO=$e(function(t,r){return cg(t,r,[],[])});const xs=QO;function ZO(e,t,r){var n,s;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(n=1/t;r<e.length;){if(s=e[r],s===0&&1/s===n)return r;r+=1}return-1}else if(t!==t){for(;r<e.length;){if(s=e[r],typeof s=="number"&&s!==s)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(t===null)return e.indexOf(t,r)}for(;r<e.length;){if(xs(e[r],t))return r;r+=1}return-1}function Td(e,t){return ZO(t,e,0)>=0}function fg(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var sf=function(t){return(t<10?"0":"")+t},qO=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+sf(t.getUTCMonth()+1)+"-"+sf(t.getUTCDate())+"T"+sf(t.getUTCHours())+":"+sf(t.getUTCMinutes())+":"+sf(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const eE=qO;function u0(e){return function(){return!e.apply(this,arguments)}}function tE(e,t){for(var r=0,n=t.length,s=[];r<n;)e(t[r])&&(s[s.length]=t[r]),r+=1;return s}function Vd(e){return Object.prototype.toString.call(e)==="[object Object]"}var rE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):t},e}(),nE=$e(function(t,r){return new rE(t,r)}),iE=$e(Tr(["fantasy-land/filter","filter"],nE,function(e,t){return Vd(t)?si(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},zi(t)):tE(e,t)}));const c0=iE;var sE=$e(function(t,r){return c0(u0(t),r)});const f0=sE;function p0(e,t){var r=function(p){var d=t.concat([e]);return Td(p,d)?"<Circular>":p0(p,d)},n=function(a,p){return wi(function(d){return fg(d)+": "+r(a[d])},p.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+wi(r,e).join(", ")+"))";case"[object Array]":return"["+wi(r,e).concat(n(e,f0(function(a){return/^\d+$/.test(a)},zi(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):fg(eE(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+r(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+r(e.valueOf())+")":fg(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var s=e.toString();if(s!=="[object Object]")return s}return"{"+n(e,zi(e)).join(", ")+"}"}}var oE=qt(function(t){return p0(t,[])});const kd=oE;var J9=null;const Y9=null;var X9=null;const Q9=null;var aE=$e(function(t,r){return lr(f(yu,0,o("length",r)),function(){var n=arguments,s=this;return t.apply(s,wi(function(a){return a.apply(s,n)},r))})});const d0=aE;var Z9=null;const q9=null;function h0(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}function m0(e,t,r,n){var s=function(p){for(var d=t.length,h=0;h<d;){if(e===t[h])return r[h];h+=1}t[h]=e,r[h]=p;for(var g in e)e.hasOwnProperty(g)&&(p[g]=n?m0(e[g],t,r,!0):e[g]);return p};switch(Gi(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s([]);case"Date":return new Date(e.valueOf());case"RegExp":return h0(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var lE=function(){function e(t,r,n,s){this.valueFn=t,this.valueAcc=r,this.keyFn=n,this.xf=s,this.inputs={}}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){var r;for(r in this.inputs)if(_n(r,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[r]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){var n=this.keyFn(r);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],r),t},e}(),uE=hl(4,[],function(t,r,n,s){return new lE(t,r,n,s)}),cE=hl(4,[],Tr([],uE,function(t,r,n,s){return si(function(a,p){var d=n(p),h=t(_n(d,a)?a[d]:m0(r,[],[],!1),p);return h&&h["@@transducer/reduced"]?gs(a):(a[d]=h,a)},{},s)}));const fE=cE;var t8=null;const r8=null;var pE=qt(function(t){return lr(t.length,t)});const jd=pE;var dE=$e(function(t,r){return r==null||r!==r?t:r});const bl=dE;var hE=function(){function e(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return e.prototype.add=function(t){return!v0(t,!0,this)},e.prototype.has=function(t){return v0(t,!1,this)},e}();function v0(e,t,r){var n=typeof e,s,a;switch(n){case"string":case"number":return e===0&&1/e===-1/0?r._items["-0"]?!0:(t&&(r._items["-0"]=!0),!1):r._nativeSet!==null?t?(s=r._nativeSet.size,r._nativeSet.add(e),a=r._nativeSet.size,a===s):r._nativeSet.has(e):n in r._items?e in r._items[n]?!0:(t&&(r._items[n][e]=!0),!1):(t&&(r._items[n]={},r._items[n][e]=!0),!1);case"boolean":if(n in r._items){var p=e?1:0;return r._items[n][p]?!0:(t&&(r._items[n][p]=!0),!1)}else return t&&(r._items[n]=e?[!1,!0]:[!0,!1]),!1;case"function":return r._nativeSet!==null?t?(s=r._nativeSet.size,r._nativeSet.add(e),a=r._nativeSet.size,a===s):r._nativeSet.has(e):n in r._items?Td(e,r._items[n])?!0:(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1);case"undefined":return r._items[n]?!0:(t&&(r._items[n]=!0),!1);case"object":if(e===null)return r._items.null?!0:(t&&(r._items.null=!0),!1);default:return n=Object.prototype.toString.call(e),n in r._items?Td(e,r._items[n])?!0:(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1)}}const pg=hE;var mE=$e(function(t,r){for(var n=[],s=0,a=t.length,p=r.length,d=new pg,h=0;h<p;h+=1)d.add(r[h]);for(;s<a;)d.add(t[s])&&(n[n.length]=t[s]),s+=1;return n});const vE=mE;function n8(e,t){if(t==null)return t;if(_isInteger(e)&&_isArray(t))return remove(e,1,t);var r={};for(var n in t)r[n]=t[n];return delete r[e],r}function i8(e,t){if(_isInteger(e)&&_isArray(t))return[].concat(t);var r={};for(var n in t)r[n]=t[n];return r}var s8=null;const o8=null;var a8=null;const l8=null;var gE=function(){function e(t,r){this.xf=r,this.n=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,r)},e}(),yE=$e(function(t,r){return new gE(t,r)}),c8=$e(Tr(["drop"],yE,function(t,r){return yl(Math.max(0,t),1/0,r)}));const f8=null;var bE=function(){function e(t,r){this.xf=r,this.n=t,this.i=0}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){this.i+=1;var n=this.n===0?t:this.xf["@@transducer/step"](t,r);return this.n>=0&&this.i>=this.n?gs(n):n},e}(),xE=$e(function(t,r){return new bE(t,r)}),SE=$e(Tr(["take"],xE,function(t,r){return yl(0,t<0?1/0:t,r)}));const g0=SE;function wE(e,t){return g0(e<t.length?t.length-e:0,t)}var OE=function(){function e(t,r){this.xf=r,this.pos=0,this.full=!1,this.acc=new Array(t)}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(r),t},e.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},e}(),EE=$e(function(t,r){return new OE(t,r)}),h8=$e(Tr([],EE,wE));const m8=null;function AE(e,t){for(var r=t.length-1;r>=0&&e(t[r]);)r-=1;return yl(0,r+1,t)}var CE=function(){function e(t,r){this.f=t,this.retained=[],this.xf=r}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.retain(t,r):this.flush(t,r)},e.prototype.flush=function(t,r){return t=si(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,r)},e.prototype.retain=function(t,r){return this.retained.push(r),t},e}(),_E=$e(function(t,r){return new CE(t,r)}),PE=$e(Tr([],_E,AE));const TE=PE;var VE=function(){function e(t,r){this.xf=r,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){var n=!1;return this.seenFirstValue?this.pred(this.lastValue,r)&&(n=!0):this.seenFirstValue=!0,this.lastValue=r,n?t:this.xf["@@transducer/step"](t,r)},e}(),kE=$e(function(t,r){return new VE(t,r)});const y0=kE;var jE=Ou(-1);const Au=jE;var IE=$e(Tr([],y0,function(t,r){var n=[],s=1,a=r.length;if(a!==0)for(n[0]=r[0];s<a;)t(Au(n),r[s])||(n[n.length]=r[s]),s+=1;return n})),y8=qt(Tr([],y0(xs),IE(xs)));const b8=null;var RE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){if(this.f){if(this.f(r))return t;this.f=null}return this.xf["@@transducer/step"](t,r)},e}(),FE=$e(function(t,r){return new RE(t,r)}),ME=$e(Tr(["dropWhile"],FE,function(t,r){for(var n=0,s=r.length;n<s&&t(r[n]);)n+=1;return yl(n,1/0,r)}));const LE=ME;var DE=$e(function(t,r){return t||r});const NE=DE;var BE=$e(function(t,r){return oi(t)?function(){return t.apply(this,arguments)||r.apply(this,arguments)}:rn(NE)(t,r)});const $E=BE;function UE(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var WE=qt(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():vs(t)?[]:ml(t)?"":Vd(t)?{}:Su(t)?function(){return arguments}():UE(t)?t.constructor.from(""):void 0});const HE=WE;var S8=null;const w8=null;var O8=null;const E8=null;var A8=null;const C8=null;var _8=null;const P8=null;var T8=null;const V8=null;var zE=function(){function e(t,r){this.xf=r,this.f=t,this.found=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.found=!0,t=gs(this.xf["@@transducer/step"](t,r))),t},e}(),GE=$e(function(t,r){return new zE(t,r)}),j8=$e(Tr(["find"],GE,function(t,r){for(var n=0,s=r.length;n<s;){if(t(r[n]))return r[n];n+=1}}));const I8=null;var KE=function(){function e(t,r){this.xf=r,this.f=t,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.idx+=1,this.f(r)&&(this.found=!0,t=gs(this.xf["@@transducer/step"](t,this.idx))),t},e}(),JE=$e(function(t,r){return new KE(t,r)}),F8=$e(Tr([],JE,function(t,r){for(var n=0,s=r.length;n<s;){if(t(r[n]))return n;n+=1}return-1}));const M8=null;var YE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.last=r),t},e}(),XE=$e(function(t,r){return new YE(t,r)}),D8=$e(Tr([],XE,function(t,r){for(var n=r.length-1;n>=0;){if(t(r[n]))return r[n];n-=1}}));const N8=null;var QE=function(){function e(t,r){this.xf=r,this.f=t,this.idx=-1,this.lastIdx=-1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},e.prototype["@@transducer/step"]=function(t,r){return this.idx+=1,this.f(r)&&(this.lastIdx=this.idx),t},e}(),ZE=$e(function(t,r){return new QE(t,r)}),$8=$e(Tr([],ZE,function(t,r){for(var n=r.length-1;n>=0;){if(t(r[n]))return n;n-=1}return-1}));const U8=null;var W8=null;const H8=null;var qE=qt(function(t){return lr(t.length,function(r,n){var s=Array.prototype.slice.call(arguments,0);return s[0]=n,s[1]=r,t.apply(this,s)})});const e1=qE;var z8=null;const G8=null;var K8=null;const J8=null;var t1=$e(ug("groupBy",fE(function(e,t){return e.push(t),e},[])));const r1=t1;var n1=$e(function(t,r){if(t.length===0||vr(r))return!1;for(var n=r,s=0;s<t.length;)if(!vr(n)&&_n(t[s],n))n=n[t[s]],s+=1;else return!1;return!0});const i1=n1;var s1=$e(function(t,r){return i1([t],r)});const xl=s1;var o1=$e(function(t,r){return vr(r)?!1:t in r});const of=o1;var a1=Ou(0);const l1=a1;var u1=$e(Pd);const xa=u1;function af(e){return e}var c1=qt(af);const dg=c1;var f1=u(function(t,r,n){return lr(Math.max(t.length,r.length,n.length),function(){return t.apply(this,arguments)?r.apply(this,arguments):n.apply(this,arguments)})});const hg=f1;var p1=$e(Td);const d1=p1;var Y8=null;const X8=null;var Q8=null;const Z8=null;var h1=yl(0,-1);const m1=h1;var v1=function(){function e(t,r){this.xf=r,this.f=t,this.set=new pg}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.set.add(this.f(r))?this.xf["@@transducer/step"](t,r):t},e}(),g1=$e(function(t,r){return new v1(t,r)}),y1=$e(Tr([],g1,function(e,t){for(var r=new pg,n=[],s=0,a,p;s<t.length;)p=t[s],a=e(p),r.add(a)&&n.push(p),s+=1;return n})),b1=y1(dg);const x1=b1;var t6=null;const r6=null;var n6=null;const i6=null;function S1(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var s=arguments[r];if(s!=null)for(var a in s)_n(a,s)&&(t[a]=s[a]);r+=1}return t}const w1=typeof Object.assign=="function"?Object.assign:S1;var O1=$e(function(t,r){var n={};return n[t]=r,n});const E1=O1;var A1={"@@transducer/init":Array,"@@transducer/step":function(e,t){return e.push(t),e},"@@transducer/result":af},C1={"@@transducer/init":String,"@@transducer/step":function(e,t){return e+t},"@@transducer/result":af},_1={"@@transducer/init":Object,"@@transducer/step":function(e,t){return w1(e,xu(t)?E1(t[0],t[1]):t)},"@@transducer/result":af};function s6(e){if(_isTransformer(e))return e;if(_isArrayLike(e))return A1;if(typeof e=="string")return C1;if(typeof e=="object")return _1;throw new Error("Cannot create transformer for "+e)}var o6=null;const a6=null;var l6=null;const u6=null;var c6=null;const f6=null;var P1=$e(function(t,r){return lr(t+1,function(){var n=arguments[t];if(n!=null&&oi(n[r]))return n[r].apply(n,Array.prototype.slice.call(arguments,0,t));throw new TypeError(kd(n)+' does not have a method named "'+r+'"')})});const mg=P1;var T1=qt(function(t){return t!=null&&xs(t,HE(t))});const lf=T1;var V1=mg(1,"join");const b0=V1;var k1=qt(function(t){return d0(function(){return Array.prototype.slice.call(arguments,0)},t)});const j1=k1;var p6=null;const d6=null;var I1=$e(function(t,r){return function(n){return function(s){return Oo(function(a){return r(a,s)},n(t(s)))}}});const R1=I1;var h6=null;const m6=null;var F1=$e(function(t,r){return t.map(function(n){for(var s=r,a=0,p;a<n.length;){if(s==null)return;p=n[a],s=Or(p)?Ou(p,s):s[p],a+=1}return s})});const M1=F1;var L1=$e(function(t,r){return M1([t],r)[0]});const Oi=L1;var v6=null;const g6=null;var y6=null;const b6=null;var D1=$e(function(t,r){return si(function(n,s){return n[s]=t(r[s],s,r),n},{},zi(r))});const N1=D1;var x6=null;const S6=null;var B1=$e(function(t,r){return Number(t)+Number(r)}),O6=f(B1,0);const E6=null;var A6=null;const C6=null;var _6=null;const P6=null;var T6=null;const V6=null;var $1=u(function(t,r,n){var s={},a;for(a in r)_n(a,r)&&(s[a]=_n(a,n)?t(a,r[a],n[a]):r[a]);for(a in n)_n(a,n)&&!_n(a,s)&&(s[a]=n[a]);return s});const U1=$1;var W1=u(function e(t,r,n){return U1(function(s,a,p){return Vd(a)&&Vd(p)?e(t,a,p):t(s,a,p)},r,n)});const H1=W1;var z1=$e(function(t,r){return H1(function(n,s,a){return a},t,r)});const G1=z1;var k6=null;const j6=null;var I6=null;const R6=null;function F6(e,t,r){if(_isInteger(e)&&_isArray(r)){var n=[].concat(r);return n[e]=t(n[e]),n}var s={};for(var a in r)s[a]=r[a];return s[e]=t(s[e]),s}var M6=null;const L6=null;var D6=null;const N6=null;var K1=$e(function(t,r){return Zc(u0(t),r)});const vg=K1;function B6(e,t){if(t==null||!_isFunction(t.then))throw new TypeError("`"+e+"` expected a Promise, received "+_toString(t,[]))}var $6=null;const U6=null;var x0=function(e){return{value:e,map:function(t){return x0(t(e))}}},J1=u(function(t,r,n){return t(function(s){return x0(r(s))})(n).value});const Y1=J1;var W6=j1([c0,f0]);const H6=null;var z6=null;const G6=null;var X1=u(function(t,r,n){return bl(t,Oi(r,n))});const S0=X1;var Q1=u(function(t,r,n){return t(Oi(r,n))});const Cu=Q1;var Z1=$e(function(t,r){for(var n={},s=0;s<t.length;)t[s]in r&&(n[t[s]]=r[t[s]]),s+=1;return n});const w0=Z1;var q1=$e(function(t,r){return t*r}),J6=f(q1,1);const Y6=null;var eA=$e(function(t,r){for(var n={},s=0,a=t.length;s<a;){var p=t[s];n[p]=r[p],s+=1}return n});const tA=eA;var rA=$e(function(t,r){return lr(r.length,function(){for(var n=[],s=0;s<r.length;)n.push(r[s].call(this,arguments[s])),s+=1;return t.apply(this,n.concat(Array.prototype.slice.call(arguments,r.length)))})}),Q6=rA(wi,[tA,dg]);const Z6=null;function O0(e,t,r){return function(n){return t(r(e(n)))}}var nA=function(){function e(t,r,n){this.xf=n,this.f=t,this.g=r}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,O0(this.f,this.g,r))},e}(),iA=u(function(t,r,n){return new nA(t,r,n)}),e4=u(Tr(["fantasy-land/promap","promap"],iA,O0));const t4=null;var sA=u(function(t,r,n){return xs(r,Js(t,n))});const Id=sA;var r4=null;const n4=null;var oA=u(function(t,r,n){return bl(t,Js(r,n))});const _u=oA;var aA=u(function(t,r,n){return t(Js(r,n))});const lA=aA;var i4=null;const s4=null;function E0(e){return Object.prototype.toString.call(e)==="[object Number]"}var uA=$e(function(t,r){if(!(E0(t)&&E0(r)))throw new TypeError("Both arguments to range must be numbers");for(var n=[],s=t;s<r;)n.push(s),s+=1;return n});const cA=uA;var o4=null;const a4=null;var fA=qt(gs);const pA=fA;var dA=u(function(t,r,n){return n.replace(t,r)});const Pu=dA;var l4=null;const u4=null;var hA=$e(function(t,r){return Array.prototype.slice.call(r,0).sort(t)});const mA=hA;var vA=mg(1,"split");const gg=vA;var c4=null;const f4=null;var p4=null;const d4=null;var gA=$e(function(e,t){return xs(g0(e.length,t),e)});const A0=gA;var h4=null;const m4=null;var v4=null;const g4=null;var y4=null;const b4=null;var yA=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):gs(t)},e}(),bA=$e(function(t,r){return new yA(t,r)}),S4=$e(Tr(["takeWhile"],bA,function(t,r){for(var n=0,s=r.length;n<s&&t(r[n]);)n+=1;return yl(0,n,r)}));const w4=null;var xA=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r),this.xf["@@transducer/step"](t,r)},e}(),SA=$e(function(t,r){return new xA(t,r)}),E4=$e(Tr([],SA,function(t,r){return t(r),r}));const A4=null;function wA(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var OA=$e(function(t,r){if(!wA(t))throw new TypeError("\u2018test\u2019 requires a value of type RegExp as its first argument; received "+kd(t));return h0(t).test(r)});const Rd=OA;var C4=null;const _4=null;var P4=null;const T4=null;var V4=null;const k4=null;var j4=null;const I4=null;var R4=null;const F4=null;var uf=`
86
- \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,EA="\u200B",AA=typeof String.prototype.trim=="function",M4=qt(!AA||uf.trim()||!EA.trim()?function(t){var r=new RegExp("^["+uf+"]["+uf+"]*"),n=new RegExp("["+uf+"]["+uf+"]*$");return t.replace(r,"").replace(n,"")}:function(t){return t.trim()});const L4=null;var D4=$e(KO(x1,De));const N4=null;var CA=function(){function e(t,r){this.xf=r,this.pred=t,this.items=[]}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return _d(this.pred,r,this.items)?t:(this.items.push(r),this.xf["@@transducer/step"](t,r))},e}(),_A=$e(function(t,r){return new CA(t,r)}),PA=$e(Tr([],_A,function(e,t){for(var r=0,n=t.length,s=[],a;r<n;)a=t[r],_d(e,a,s)||(s[s.length]=a),r+=1;return s}));const TA=PA;var $4=null;const U4=null;var W4=LO(af);const H4=null;var z4=null;const G4=null;var VA=u(function(t,r,n){return t(n)?r(n):n});const kA=VA;var K4=null;const J4=null;var Y4=null;const X4=null;var jA=T(void 0);const cf=jA;var IA=xs(cf());const _o=IA;class RA extends Te.ON{constructor(t,r,n){super(t,r,n),this.element="parseResult"}get api(){return this.children.filter(t=>t.classes.contains("api")).first}get results(){return this.children.filter(t=>t.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(t=>t.element==="annotation")}get warnings(){return this.children.filter(t=>t.element==="annotation"&&t.classes.contains("warning"))}get errors(){return this.children.filter(t=>t.element==="annotation"&&t.classes.contains("error"))}get isEmpty(){return this.children.reject(t=>t.element==="annotation").isEmpty}replaceResult(t){const{result:r}=this;if(_o(r))return!1;const n=this.content.findIndex(s=>s===r);return n===-1?!1:(this.content[n]=t,!0)}}const Ss=RA;class FA extends Te.ON{constructor(t,r,n){super(t,r,n),this.element="sourceMap"}get positionStart(){return this.children.filter(t=>t.classes.contains("position")).get(0)}get positionEnd(){return this.children.filter(t=>t.classes.contains("position")).get(1)}set position(t){if(t===null)return;const r=new Te.ON([t.start.row,t.start.column,t.start.char]),n=new Te.ON([t.end.row,t.end.column,t.end.char]);r.classes.push("position"),n.classes.push("position"),this.push(r).push(n)}}const Fd=FA;var MA=lr(1,Jr(Gi,xa("GeneratorFunction")));const LA=MA;var DA=lr(1,Jr(Gi,xa("AsyncFunction")));const NA=DA;var BA=Ie([Jr(Gi,xa("Function")),LA,NA]);const Po=BA;var $A=Eu(Po);const UA=$A;var WA=lr(1,Po(Array.isArray)?Array.isArray:Jr(Gi,xa("Array")));const C0=WA;var HA=bs(C0,lf);const zA=HA;var GA=lr(3,function(e,t,r){var n=Oi(e,r),s=Oi(m1(e),r);if(!UA(n)&&!zA(e)){var a=vl(n,s);return Cr(a,t)}});const Tu=GA;var KA=e1(d1);const Md=KA,JA=(e,t)=>typeof(t==null?void 0:t[e])=="function",YA=e=>e!=null&&Object.prototype.hasOwnProperty.call(e,"_storedElement")&&Object.prototype.hasOwnProperty.call(e,"_content"),XA=(e,t)=>{var r;return(t==null||(r=t.primitive)===null||r===void 0?void 0:r.call(t))===e},QA=(e,t)=>{var r,n;return(t==null||(r=t.classes)===null||r===void 0||(n=r.includes)===null||n===void 0?void 0:n.call(r,e))||!1},Sa=(e,t)=>(t==null?void 0:t.element)===e,tt=e=>e({hasMethod:JA,hasBasicElementProps:YA,primitiveEq:XA,isElementType:Sa,hasClass:QA}),Ld=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.W_||e(r)&&t(void 0,r)),Ct=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.RP||e(r)&&t("string",r)),_0=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.VL||e(r)&&t("number",r)),P0=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.zr||e(r)&&t("null",r)),Dd=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.hh||e(r)&&t("boolean",r)),sr=tt(({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Te.Sb||e(n)&&t("object",n)&&r("keys",n)&&r("values",n)&&r("items",n)),Ki=tt(({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Te.ON&&!(n instanceof Te.Sb)||e(n)&&t("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n)),Vu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.c6||e(n)&&t("member",n)&&r(void 0,n)),T0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.EA||e(n)&&t("link",n)&&r(void 0,n)),V0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.tK||e(n)&&t("ref",n)&&r(void 0,n)),ZA=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Gs||e(n)&&t("annotation",n)&&r("array",n)),qA=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof fl||e(n)&&t("comment",n)&&r("string",n)),k0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ss||e(n)&&t("parseResult",n)&&r("array",n)),j0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Fd||e(n)&&t("sourceMap",n)&&r("array",n)),To=e=>Sa("object",e)||Sa("array",e)||Sa("boolean",e)||Sa("number",e)||Sa("string",e)||Sa("null",e)||Sa("member",e),yg=e=>{var t,r;return j0(e==null||(t=e.meta)===null||t===void 0||(r=t.get)===null||r===void 0?void 0:r.call(t,"sourceMap"))},eC=(e,t)=>{if(e.length===0)return!0;const r=t.attributes.get("symbols");return Ki(r)?Zc(Md(r.toValue()),e):!1},ff=(e,t)=>e.length===0?!0:Zc(Md(t.classes.toValue()),e);var tC=xs(null);const bg=tC;var rC=Eu(bg);const I0=rC;function xg(e){return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(e)}var nC=function(t){return xg(t)==="object"};const R0=nC;var iC=lr(1,bs(I0,R0));const sC=iC;var oC=Jr(Gi,xa("Object")),aC=Jr(kd,xs(kd(Object))),lC=Cu(bs(Po,aC),["constructor"]),uC=lr(1,function(e){if(!sC(e)||!oC(e))return!1;var t=Object.getPrototypeOf(e);return bg(t)?!0:lC(t)});const pf=uC;class F0 extends Te.lS{constructor(){super(),this.register("annotation",Gs),this.register("comment",fl),this.register("parseResult",Ss),this.register("sourceMap",Fd)}}const cC=new F0,ku=e=>{const t=new F0;return pf(e)&&t.use(e),t},M0=cC;function L0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function fC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const D0=()=>({predicates:fC({},b),namespace:M0});var N0=c(34961);function pC(e,t){if(e==null)return{};var r={},n=K(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(N0(t).call(t,s)>=0)&&(r[s]=e[s]);return r}function df(e,t){if(e==null)return{};var r=pC(e,t),n,s;if(ie){var a=ie(e);for(s=0;s<a.length;s++)n=a[s],!(N0(t).call(t,n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Oe=c(56182),dC=lr(1,Jr(Gi,xa("String")));const Sl=dC,Sg=(e,t,r)=>{const n=e[t];if(n!=null){if(!r&&typeof n=="function")return n;const s=r?n.leave:n.enter;if(typeof s=="function")return s}else{const s=r?e.leave:e.enter;if(s!=null){if(typeof s=="function")return s;const a=s[t];if(typeof a=="function")return a}}return null},pt={},Nd=e=>e==null?void 0:e.type,B0=e=>typeof Nd(e)=="string",$0=(e,{visitFnGetter:t=Sg,nodeTypeGetter:r=Nd}={})=>{const n=new Array(e.length);return{enter(s,...a){for(let p=0;p<e.length;p+=1)if(n[p]==null){const d=t(e[p],r(s),!1);if(typeof d=="function"){const h=d.call(e[p],s,...a);if(h===!1)n[p]=s;else if(h===pt)n[p]=pt;else if(h!==void 0)return h}}},leave(s,...a){for(let p=0;p<e.length;p+=1)if(n[p]==null){const d=t(e[p],r(s),!0);if(typeof d=="function"){const h=d.call(e[p],s,...a);if(h===pt)n[p]=pt;else if(h!==void 0&&h!==!1)return h}}else n[p]===s&&(n[p]=null)}}},wg=(e,t,{keyMap:r=null,state:n={},breakSymbol:s=pt,deleteNodeSymbol:a=null,skipVisitingNodeSymbol:p=!1,visitFnGetter:d=Sg,nodeTypeGetter:h=Nd,nodePredicate:g=B0,detectCycles:y=!0}={})=>{const C=r||{};let M,I=Array.isArray(e),B=[e],z=-1,W,G=[];const te=[],le=[];let ye=e;do{z+=1;const he=z===B.length;let Ee,me;const ve=he&&G.length!==0;if(he){if(Ee=le.length===0?void 0:te.pop(),me=W,W=le.pop(),ve){I?me=me.slice():me=Object.create(Object.getPrototypeOf(me),Object.getOwnPropertyDescriptors(me));let Se=0;for(let Ce=0;Ce<G.length;Ce+=1){let Me=G[Ce][0];const Qe=G[Ce][1];I&&(Me-=Se),I&&Qe===a?(me.splice(Me,1),Se+=1):me[Me]=Qe}}z=M.index,B=M.keys,G=M.edits,I=M.inArray,M=M.prev}else{if(Ee=W?I?z:B[z]:void 0,me=W?W[Ee]:ye,me===a||me===void 0)continue;W&&te.push(Ee)}if(le.includes(me))continue;let ce;if(!Array.isArray(me)){if(!g(me))throw new Error(`Invalid AST Node: ${JSON.stringify(me)}`);if(y&&le.includes(me)){te.pop();continue}const Se=d(t,h(me),he);if(Se){for(const[Ce,Me]of Object.entries(n))t[Ce]=Me;if(ce=Se.call(t,me,Ee,W,te,le),ce===s)break;if(ce===p){if(!he){te.pop();continue}}else if(ce!==void 0&&(G.push([Ee,ce]),!he))if(g(ce))me=ce;else{te.pop();continue}}}ce===void 0&&ve&&G.push([Ee,me]),he||(M={inArray:I,index:z,keys:B,edits:G,prev:M},I=Array.isArray(me),B=I?me:C[h(me)]||[],z=-1,G=[],W&&le.push(W),W=me)}while(M!==void 0);return G.length!==0&&([,ye]=G[G.length-1]),ye};wg[Symbol.for("nodejs.util.promisify.custom")]=(C,M,...I)=>et(this,[C,M,...I],function*(e,t,{keyMap:r=null,state:n={},breakSymbol:s=pt,deleteNodeSymbol:a=null,skipVisitingNodeSymbol:p=!1,visitFnGetter:d=Sg,nodeTypeGetter:h=Nd,nodePredicate:g=B0,detectCycles:y=!0}={}){const B=r||{};let z,W=Array.isArray(e),G=[e],te=-1,le,ye=[];const he=[],Ee=[];let me=e;do{te+=1;const ve=te===G.length;let ce,Se;const Ce=ve&&ye.length!==0;if(ve){if(ce=Ee.length===0?void 0:he.pop(),Se=le,le=Ee.pop(),Ce){W?Se=Se.slice():Se=Object.create(Object.getPrototypeOf(Se),Object.getOwnPropertyDescriptors(Se));let Qe=0;for(let wt=0;wt<ye.length;wt+=1){let ft=ye[wt][0];const Ar=ye[wt][1];W&&(ft-=Qe),W&&Ar===a?(Se.splice(ft,1),Qe+=1):Se[ft]=Ar}}te=z.index,G=z.keys,ye=z.edits,W=z.inArray,z=z.prev}else{if(ce=le?W?te:G[te]:void 0,Se=le?le[ce]:me,Se===a||Se===void 0)continue;le&&he.push(ce)}let Me;if(!Array.isArray(Se)){if(!g(Se))throw new Error(`Invalid AST Node: ${JSON.stringify(Se)}`);if(y&&Ee.includes(Se)){he.pop();continue}const Qe=d(t,h(Se),ve);if(Qe){for(const[wt,ft]of Object.entries(n))t[wt]=ft;if(Me=yield Qe.call(t,Se,ce,le,he,Ee),Me===s)break;if(Me===p){if(!ve){he.pop();continue}}else if(Me!==void 0&&(ye.push([ce,Me]),!ve))if(g(Me))Se=Me;else{he.pop();continue}}}Me===void 0&&Ce&&ye.push([ce,Se]),ve||(z={inArray:W,index:te,keys:G,edits:ye,prev:z},W=Array.isArray(Se),G=W?Se:B[h(Se)]||[],te=-1,ye=[],le&&Ee.push(le),le=Se)}while(z!==void 0);return ye.length!==0&&([,me]=ye[ye.length-1]),me});const hC=["keyMap"],mC=["keyMap"];function U0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function W0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ju=e=>sr(e)?"ObjectElement":Ki(e)?"ArrayElement":Vu(e)?"MemberElement":Ct(e)?"StringElement":Dd(e)?"BooleanElement":_0(e)?"NumberElement":P0(e)?"NullElement":T0(e)?"LinkElement":V0(e)?"RefElement":void 0,H0=lr(1,Jr(ju,Sl)),Iu={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]},vC=Oe({props:{result:[],predicate:pl,returnOnTrue:void 0,returnOnFalse:void 0},init({predicate:e=this.predicate,returnOnTrue:t=this.returnOnTrue,returnOnFalse:r=this.returnOnFalse}={}){this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=r},methods:{enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}}),Nn=(e,t,r={})=>{let{keyMap:n=Iu}=r,s=df(r,hC);return wg(e,t,W0({keyMap:n,nodeTypeGetter:ju,nodePredicate:H0},s))};Nn[Symbol.for("nodejs.util.promisify.custom")]=(n,s,...a)=>et(this,[n,s,...a],function*(e,t,r={}){let{keyMap:p=Iu}=r,d=df(r,mC);return wg[Symbol.for("nodejs.util.promisify.custom")](e,t,W0({keyMap:p,nodeTypeGetter:ju,nodePredicate:H0},d))});const hf=(e,t,r={})=>{if(t.length===0)return e;const n=_u(D0,"toolboxCreator",r),s=_u({},"visitorOptions",r),a=_u(ju,"nodeTypeGetter",s),p=n(),d=t.map(y=>y(p)),h=$0(d.map(_u({},"visitor")),{nodeTypeGetter:a});d.forEach(Tu(["pre"],[]));const g=Nn(e,h,s);return d.forEach(Tu(["post"],[])),g};function z0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function G0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const gC=(e,{Type:t,plugins:r=[]})=>{const n=new t(e);return hf(n,r,{toolboxCreator:D0,visitorOptions:{nodeTypeGetter:ju}})},Ji=e=>(t,r={})=>gC(t,G0(G0({},r),{},{Type:e})),q4=null;Te.Sb.refract=Ji(Te.Sb),Te.ON.refract=Ji(Te.ON),Te.RP.refract=Ji(Te.RP),Te.hh.refract=Ji(Te.hh),Te.zr.refract=Ji(Te.zr),Te.VL.refract=Ji(Te.VL),Te.EA.refract=Ji(Te.EA),Te.tK.refract=Ji(Te.tK),Gs.refract=Ji(Gs),fl.refract=Ji(fl),Ss.refract=Ji(Ss),Fd.refract=Ji(Fd);const Bd=(e,t=new WeakMap)=>(Vu(e)?(t.set(e.key,e),Bd(e.key,t),t.set(e.value,e),Bd(e.value,t)):e.children.forEach(r=>{t.set(r,e),Bd(r,t)}),t),yC=(e,t,r)=>{const n=r.get(e);Vu(n)&&(n.key===e&&(n.key=t,r.delete(e),r.set(t,n)),n.value===e&&(n.value=t,r.delete(e),r.set(t,n)))},bC=(e,t,r)=>{const n=r.get(e);sr(n)&&(n.content=n.map((s,a,p)=>p===e?(r.delete(e),r.set(t,n),t):p))},xC=(e,t,r)=>{const n=r.get(e);Ki(n)&&(n.content=n.map(s=>s===e?(r.delete(e),r.set(t,n),t):s))},SC=Oe.init(function({element:t}){let r;this.transclude=function(s,a){var p;if(s===t)return a;if(s===a)return t;r=(p=r)!==null&&p!==void 0?p:Bd(t);const d=r.get(s);if(!_o(d))return sr(d)?bC(s,a,r):Ki(d)?xC(s,a,r):Vu(d)&&yC(s,a,r),t}}),wC=(e,t,r)=>SC({element:r}).transclude(e,t),tB=null,OC=["keyMap"],EC=["keyMap"];function K0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const J0=e=>typeof(e==null?void 0:e.type)=="string"?e.type:ju(e),Y0=Og({EphemeralObject:["content"],EphemeralArray:["content"]},Iu),X0=(e,t,r={})=>{let{keyMap:n=Y0}=r,s=df(r,OC);return Nn(e,t,Og({keyMap:n,nodeTypeGetter:J0,nodePredicate:Ks,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node")},s))};X0[Symbol.for("nodejs.util.promisify.custom")]=(r,...n)=>et(this,[r,...n],function*(e,t={}){let{keyMap:s=Y0}=t,a=df(t,EC);return Nn[Symbol.for("nodejs.util.promisify.custom")](e,visitor,Og({keyMap:s,nodeTypeGetter:J0,nodePredicate:Ks,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node")},a))});class AC{constructor(t){X(this,"type","EphemeralArray"),X(this,"content",[]),X(this,"reference",void 0),this.content=t,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}const CC=AC;class _C{constructor(t){X(this,"type","EphemeralObject"),X(this,"content",[]),X(this,"reference",void 0),this.content=t,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const PC=_C,TC=Oe.init(function(){const t=new WeakMap;this.BooleanElement=function(n){return n.toValue()},this.NumberElement=function(n){return n.toValue()},this.StringElement=function(n){return n.toValue()},this.NullElement=function(){return null},this.ObjectElement={enter(r){if(t.has(r))return t.get(r).toReference();const n=new PC(r.content);return t.set(r,n),n}},this.EphemeralObject={leave(r){return r.toObject()}},this.MemberElement={enter(r){return[r.key,r.value]}},this.ArrayElement={enter(r){if(t.has(r))return t.get(r).toReference();const n=new CC(r.content);return t.set(r,n),n}},this.EphemeralArray={leave(r){return r.toArray()}}}),VC=e=>X0(e,TC()),Q0=(e,t=M0)=>{if(Sl(e))try{return t.fromRefract(JSON.parse(e))}catch(r){}return pf(e)&&xl("element",e)?t.fromRefract(e):t.toElement(e)},Yn=VC,nB=null,iB=null,kC=(e,t=defaultNamespaceInstance)=>t.toRefract(e),sB=(e,t=defaultNamespaceInstance)=>{const r=kC(e,t);return JSON.stringify(r)};var jC=xs("");const Z0=jC;var IC=lr(1,Jr(Gi,xa("Number"))),RC=bs(IC,isFinite),FC=lr(1,RC),MC=Po(Number.isFinite)?lr(1,vl(Number.isFinite,Number)):FC,LC=bs(MC,d0(xs,[Math.floor,dg])),DC=lr(1,LC),NC=Po(Number.isInteger)?lr(1,vl(Number.isInteger,Number)):DC;const BC=NC;var $C=jd(function(e,t){return Jr(gg(""),LE(Md(e)),b0(""))(t)});const Eg=$C;class q0 extends Error{constructor(t){super(`Invalid $ref pointer "${t}". Pointers must begin with "/"`),this.name=this.constructor.name,this.message=`Invalid $ref pointer "${t}". Pointers must begin with "/"`,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(`Invalid $ref pointer "${t}". Pointers must begin with "/"`).stack}}class $d extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}const UC=e=>{try{return decodeURIComponent(e)}catch(t){return e}},WC=Jr(Pu(/~/g,"~0"),Pu(/\//g,"~1"),encodeURIComponent),HC=Jr(Pu(/~1/g,"/"),Pu(/~0/g,"~"),UC),zC=e=>{if(Z0(e))return[];if(!A0("/",e))throw new q0(e);const t=Jr(gg("/"),Oo(HC))(e);return o0(t)},GC=e=>e.length===0?"":`/${e.map(WC).join("/")}`,Xn=(e,t)=>zC(e).reduce((n,s)=>{if(sr(n)){if(!n.hasKey(s))throw new $d(`Evaluation failed on token: "${s}"`);return n.get(s)}if(Ki(n)){if(!(s in n.content)||!BC(Number(s)))throw new $d(`Evaluation failed on token: "${s}"`);return n.get(Number(s))}throw new $d(`Evaluation failed on token: "${s}"`)},t),KC=e=>{const t=e.indexOf("#");return t!==-1?e.substring(t):"#"},Bn=e=>{const t=KC(e);return Eg("#",t)};class JC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="callback"}}const mf=JC;class YC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="components"}get schemas(){return this.get("schemas")}set schemas(t){this.set("schemas",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get requestBodies(){return this.get("requestBodies")}set requestBodies(t){this.set("requestBodies",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(t){this.set("securitySchemes",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}}const vf=YC;class XC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="contact"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}get email(){return this.get("email")}set email(t){this.set("email",t)}}const gf=XC;class QC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(t){this.set("propertyName",t)}get mapping(){return this.get("mapping")}set mapping(t){this.set("mapping",t)}}const Ud=QC;class ZC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(t){this.set("contentType",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(t){this.set("allowedReserved",t)}}const Wd=ZC;class qC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="example"}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get value(){return this.get("value")}set value(t){this.set("value",t)}get externalValue(){return this.get("externalValue")}set externalValue(t){this.set("externalValue",t)}}const yf=qC;class e_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="externalDocumentation"}get description(){return this.get("description")}set description(t){this.set("description",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}}const bf=e_;class eb extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}}Object.defineProperty(eb.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});const xf=eb;class t_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get termsOfService(){return this.get("termsOfService")}set termsOfService(t){this.set("termsOfService",t)}get contact(){return this.get("contact")}set contact(t){this.set("contact",t)}get license(){return this.get("license")}set license(t){this.set("license",t)}get version(){return this.get("version")}set version(t){this.set("version",t)}}const Sf=t_;class r_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="license"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}}const wf=r_;class n_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(t){this.set("operationRef",t)}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get operation(){if(Ct(this.operationRef)){var t;return(t=this.operationRef)===null||t===void 0?void 0:t.meta.get("operation")}if(Ct(this.operationId)){var r;return(r=this.operationId)===null||r===void 0?void 0:r.meta.get("operation")}}set operation(t){this.set("operation",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get server(){return this.get("server")}set server(t){this.set("server",t)}}const Of=n_;class i_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="mediaType"}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get encoding(){return this.get("encoding")}set encoding(t){this.set("encoding",t)}}const Ef=i_;class s_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(t){this.set("authorizationUrl",t)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(t){this.set("tokenUrl",t)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(t){this.set("refreshUrl",t)}get scopes(){return this.get("scopes")}set scopes(t){this.set("scopes",t)}}const Hd=s_;class o_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(t){this.set("implicit",t)}get password(){return this.get("password")}set password(t){this.set("password",t)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(t){this.set("clientCredentials",t)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(t){this.set("authorizationCode",t)}}const zd=o_;class a_ extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}}const Af=a_;class l_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(t){this.set("openapi",t)}get info(){return this.get("info")}set info(t){this.set("info",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get paths(){return this.get("paths")}set paths(t){this.set("paths",t)}get components(){return this.get("components")}set components(t){this.set("components",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}}const Gd=l_;class u_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="operation"}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}set externalDocs(t){this.set("externalDocs",t)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get servers(){return this.get("severs")}set servers(t){this.set("servers",t)}}const Cf=u_;class tb extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="parameter"}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}}Object.defineProperty(tb.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});const _f=tb;class c_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}}const Pf=c_;class f_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="paths"}}const Tf=f_;class p_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}}const Vf=p_;class d_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="requestBody"}get description(){return this.get("description")}set description(t){this.set("description",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}}const kf=d_;class h_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="response"}get description(){return this.get("description")}set description(t){this.set("description",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}}const jf=h_;class m_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="responses"}get default(){return this.get("default")}set default(t){this.set("default",t)}}const If=m_;class v_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(t){this.set("id",t)}get $schema(){return this.get("$schema")}set $schema(t){this.set("idProp",t)}get multipleOf(){return this.get("multipleOf")}set multipleOf(t){this.set("multipleOf",t)}get maximum(){return this.get("maximum")}set maximum(t){this.set("maximum",t)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(t){this.set("exclusiveMaximum",t)}get minimum(){return this.get("minimum")}set minimum(t){this.set("minimum",t)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(t){this.set("exclusiveMinimum",t)}get maxLength(){return this.get("maxLength")}set maxLength(t){this.set("maxLength",t)}get minLength(){return this.get("minLength")}set minLength(t){this.set("minLength",t)}get pattern(){return this.get("pattern")}set pattern(t){this.set("pattern",t)}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get maxItems(){return this.get("maxItems")}set maxItems(t){this.set("maxItems",t)}get minItems(){return this.get("minItems")}set minItems(t){this.set("minItems",t)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(t){this.set("uniqueItems",t)}get maxProperties(){return this.get("maxProperties")}set maxProperties(t){this.set("maxProperties",t)}get minProperties(){return this.get("minProperties")}set minProperties(t){this.set("minProperties",t)}get required(){return this.get("required")}set required(t){this.set("required",t)}get properties(){return this.get("properties")}set properties(t){this.set("properties",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get patternProperties(){return this.get("patternProperties")}set patternProperties(t){this.set("patternProperties",t)}get dependencies(){return this.get("dependencies")}set dependencies(t){this.set("dependencies",t)}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get allOf(){return this.get("allOf")}set allOf(t){this.set("allOf",t)}get anyOf(){return this.get("anyOf")}set anyOf(t){this.set("anyOf",t)}get oneOf(){return this.get("oneOf")}set oneOf(t){this.set("oneOf",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get definitions(){return this.get("definitions")}set definitions(t){this.set("definitions",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get format(){return this.get("format")}set format(t){this.set("format",t)}get base(){return this.get("base")}set base(t){this.set("base",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get media(){return this.get("media")}set media(t){this.set("media",t)}get readOnly(){return this.get("readOnly")}set readOnly(t){this.set("readOnly",t)}}const Rf=v_;class g_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}}const Kd=g_;class y_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(t){this.set("binaryEncoding",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}}const Jd=y_;class b_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="linkDescription"}get href(){return this.get("href")}set href(t){this.set("href",t)}get rel(){return this.get("rel")}set rel(t){this.set("rel",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get targetSchema(){return this.get("targetSchema")}set targetSchema(t){this.set("targetSchema",t)}get mediaType(){return this.get("mediaType")}set mediaType(t){this.set("mediaType",t)}get method(){return this.get("method")}set method(t){this.set("method",t)}get encType(){return this.get("encType")}set encType(t){this.set("encType",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Yd=b_,Xd=(e,t)=>{const r=bl(e,t);return N1(n=>{if(pf(n)&&xl("$ref",n)&&lA(Sl,"$ref",n)){const s=Oi(["$ref"],n),a=Eg("#/",s);return Oi(a.split("/"),r)}return pf(n)?Xd(n,r):n},e)},rb=Oe({props:{element:null},methods:{copyMetaAndAttributes(e,t){yg(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))}}}),Pt=Oe(rb,{methods:{enter(e){return this.element=e.clone(),pt}}});var x_=T(cf());const Ru=x_;function nb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function S_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ib=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},sb=S_({JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"]},Iu);function ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const wa=Oe(rb,{props:{specObj:null,passingOptionsNames:["specObj"]},init({specObj:e=this.specObj}){this.specObj=e},methods:{retrievePassingOptions(){return w0(this.passingOptionsNames,this)},retrieveFixedFields(e){return Jr(Oi(["visitors",...e,"fixedFields"]),zi)(this.specObj)},retrieveVisitor(e){return Cu(Po,["visitors",...e],this.specObj)?Oi(["visitors",...e],this.specObj):Oi(["visitors",...e,"$visitor"],this.specObj)},retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return this.retrieveVisitor(e)(Ag(Ag({},r),t))},toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r),s=Object.getPrototypeOf(n);return _o(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance(["value"]))),this.fallbackVisitorPrototype===s?t.clone():(Nn(t,n,Ag({keyMap:sb,nodeTypeGetter:ib},r)),n.element)}}}),Ff=Oe(wa,{props:{specPath:Ru,ignoredFields:[]},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields}={}){this.specPath=e,this.ignoredFields=t},methods:{ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach((n,s,a)=>{if(Ct(s)&&r.includes(s.toValue())&&!this.ignoredFields.includes(s.toValue())){const p=this.toRefractedElement([...t,"fixedFields",s.toValue()],n),d=new Te.c6(s.clone(),p);this.copyMetaAndAttributes(a,d),d.classes.push("fixed-field"),this.element.content.push(d)}else this.ignoredFields.includes(s.toValue())||this.element.content.push(a.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),w_=Oe(Ff,Pt,{props:{specPath:T(["document","objects","JSONSchema"])},init(){this.element=new Rf}}),O_=Pt,E_=Pt,A_=Pt,C_=Pt,__=Pt,P_=Pt,T_=Pt,V_=Pt,k_=Pt,j_=Pt,Vo=Oe({props:{parent:null},init({parent:e=this.parent}){this.parent=e,this.passingOptionsNames=[...this.passingOptionsNames,"parent"]}}),Ys=e=>sr(e)&&e.hasKey("$ref"),I_=Oe(wa,Vo,Pt,{methods:{ObjectElement(e){const t=Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),pt},ArrayElement(e){return this.element=new Te.ON,this.element.classes.push("json-schema-items"),e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),R_=Pt,F_=Pt,M_=Pt,L_=Pt,D_=Pt,N_=Oe(Pt,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-required"),pt}}});var B_=lr(1,bs(I0,$E(R0,Po))),$_=Eu(B_);const U_=$_;var W_=Eu(lf);const ab=W_;var H_=S([Sl,U_,ab]);const Cg=H_,z_=Oe(wa,{props:{fieldPatternPredicate:pl,specPath:Ru,ignoredFields:[]},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields}={}){this.specPath=e,this.ignoredFields=t},methods:{ObjectElement(e){return e.forEach((t,r,n)=>{if(!this.ignoredFields.includes(r.toValue())&&this.fieldPatternPredicate(r.toValue())){const s=this.specPath(t),a=this.toRefractedElement(s,t),p=new Te.c6(r.clone(),a);this.copyMetaAndAttributes(n,p),p.classes.push("patterned-field"),this.element.content.push(p)}else this.ignoredFields.includes(r.toValue())||this.element.content.push(n.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),Qd=Oe(z_,{props:{fieldPatternPredicate:Cg}}),G_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-properties")}}),K_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-patternProperties")}}),J_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-dependencies")}}),Y_=Oe(Pt,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-enum"),pt}}}),X_=Oe(Pt,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt},ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt}}}),Q_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-allOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),Z_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-anyOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),q_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-oneOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),eP=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-definitions")}}),tP=Pt,rP=Pt,nP=Pt,iP=Pt,sP=Pt,oP=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-links")},methods:{ArrayElement(e){return e.forEach(t=>{const r=this.toRefractedElement(["document","objects","LinkDescription"],t);this.element.push(r)}),this.copyMetaAndAttributes(e,this.element),pt}}}),aP=Pt,lP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","JSONReference"])},init(){this.element=new Kd},methods:{ObjectElement(e){const t=Ff.compose.methods.ObjectElement.call(this,e);return Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),uP=Oe(Pt,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}});var cP=Eu(vr);const fP=cP;var pP=bs(C0,ab);const dP=pP;function hP(e){return yP(e)||gP(e)||vP(e)||mP()}function mP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vP(e,t){if(e){if(typeof e=="string")return _g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _g(e,t)}}function gP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yP(e){if(Array.isArray(e))return _g(e)}function _g(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var bP=NO(function(e,t){return e.length>t.length}),xP=Jr(mA(bP),l1,Js("length")),SP=jd(function(e,t,r){var n=r.apply(void 0,hP(e));return fP(n)?pA(n):t}),wP=function(t){var r=xP(t);return lr(r,function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return f(SP(s),void 0,t)})},OP=hg(dP,wP,cf);const lb=OP,EP=Oe(wa,{props:{alternator:[]},methods:{enter(e){const t=this.alternator.map(({predicate:n,specPath:s})=>hg(n,T(s),cf)),r=lb(t)(e);return this.element=this.toRefractedElement(r,e),pt}}}),Fu=Oe(EP,{props:{alternator:[{predicate:Ys,specPath:["document","objects","JSONReference"]},{predicate:Ks,specPath:["document","objects","JSONSchema"]}]}}),AP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","Media"])},init(){this.element=new Jd}}),CP=Pt,_P=Pt,PP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","LinkDescription"])},init(){this.element=new Yd}}),ko={visitors:{value:Pt,JSONSchemaOrJSONReferenceVisitor:Fu,document:{objects:{JSONSchema:{$visitor:w_,fixedFields:{id:O_,$schema:E_,multipleOf:A_,maximum:C_,exclusiveMaximum:__,minimum:P_,exclusiveMinimum:T_,maxLength:V_,minLength:k_,pattern:j_,additionalItems:Fu,items:I_,maxItems:R_,minItems:F_,uniqueItems:M_,maxProperties:L_,minProperties:D_,required:N_,properties:G_,additionalProperties:Fu,patternProperties:K_,dependencies:J_,enum:Y_,type:X_,allOf:Q_,anyOf:Z_,oneOf:q_,not:Fu,definitions:eP,title:tP,description:rP,default:nP,format:iP,base:sP,links:oP,media:{$ref:"#/visitors/document/objects/Media"},readOnly:aP}},JSONReference:{$visitor:lP,fixedFields:{$ref:uP}},Media:{$visitor:AP,fixedFields:{binaryEncoding:CP,type:_P}},LinkDescription:{$visitor:PP,fixedFields:{href:Pt,rel:Pt,title:Pt,targetSchema:Fu,mediaType:Pt,method:Pt,encType:Pt,schema:Fu}}}}}},TP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Rf||e(n)&&t("JSONSchemaDraft4",n)&&r("object",n)),VP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Kd||e(n)&&t("JSONReference",n)&&r("object",n)),kP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Jd||e(n)&&t("media",n)&&r("object",n)),jP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Yd||e(n)&&t("linkDescription",n)&&r("object",n)),IP={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",Rf),t.register("jSONReference",Kd),t.register("media",Jd),t.register("linkDescription",Yd),t}};function ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function cb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ub(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const RP=()=>{const e=ku(IP);return{predicates:cb(cb({},_),{},{isStringElement:Ct}),namespace:e}};function fb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function FP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const MP=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=ko}={})=>{const s=(0,Te.Qc)(e),a=Xd(n),p=Tu(t,[],a);return Nn(s,p,{state:{specObj:a}}),hf(p.element,r,{toolboxCreator:RP,visitorOptions:{keyMap:sb,nodeTypeGetter:ib}})},Zd=e=>(t,r={})=>MP(t,FP({specPath:e},r)),S$=null;Rf.refract=Zd(["visitors","document","objects","JSONSchema","$visitor"]),Kd.refract=Zd(["visitors","document","objects","JSONReference","$visitor"]),Jd.refract=Zd(["visitors","document","objects","Media","$visitor"]),Yd.refract=Zd(["visitors","document","objects","LinkDescription","$visitor"]);class LP extends Rf{constructor(t,r,n){super(t,r,n),this.element="schema",this.classes.push("json-schema-draft-4")}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get nullable(){return this.get("nullable")}set nullable(t){this.set("nullable",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}}const qd=LP;class DP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="securityRequirement"}}const Mf=DP;class NP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="securityScheme"}get type(){return this.get("type")}set type(t){this.set("type",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get scheme(){return this.get("scheme")}set scheme(t){this.set("scheme",t)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(t){this.set("bearerFormat",t)}get flows(){return this.get("flows")}set flows(t){this.set("flows",t)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(t){this.set("openIdConnectUrl",t)}}const eh=NP;class BP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="server"}get url(){return this.get("url")}set url(t){this.set("url",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get variables(){return this.get("variables")}set variables(t){this.set("variables",t)}}const Lf=BP;class $P extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}}const Df=$P;class UP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="tag"}get name(){return this.get("name")}set name(t){this.set("name",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}}const th=UP;class WP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="xml"}get name(){return this.get("name")}set name(t){this.set("name",t)}get namespace(){return this.get("namespace")}set namespace(t){this.set("namespace",t)}get prefix(){return this.get("prefix")}set prefix(t){this.set("prefix",t)}get attribute(){return this.get("attribute")}set attribute(t){this.set("attribute",t)}get wrapped(){return this.get("wrapped")}set wrapped(t){this.set("wrapped",t)}}const rh=WP,pb=Oe({props:{element:null},methods:{copyMetaAndAttributes(e,t){yg(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))}}});function db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function HP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?db(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const hb=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},mb=HP({CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"]},Iu);function vb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Pg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Qn=Oe(pb,{props:{passingOptionsNames:["specObj","openApiGenericElement","openApiSemanticElement"],specObj:null,openApiGenericElement:null,openApiSemanticElement:null},init({specObj:e=this.specObj,openApiGenericElement:t=this.openApiGenericElement,openApiSemanticElement:r=this.openApiSemanticElement}){this.specObj=e,this.openApiGenericElement=t,this.openApiSemanticElement=r},methods:{retrievePassingOptions(){return w0(this.passingOptionsNames,this)},retrieveFixedFields(e){return Jr(Oi(["visitors",...e,"fixedFields"]),zi)(this.specObj)},retrieveVisitor(e){return Cu(Po,["visitors",...e],this.specObj)?Oi(["visitors",...e],this.specObj):Oi(["visitors",...e,"$visitor"],this.specObj)},retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return this.retrieveVisitor(e)(Pg(Pg({},r),t))},toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r),s=Object.getPrototypeOf(n);return _o(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance(["value"]))),this.fallbackVisitorPrototype===s?t.clone():(Nn(t,n,Pg({keyMap:mb,nodeTypeGetter:hb},r)),n.element)}}}),zP=e=>sr(e)&&e.hasKey("openapi")&&e.hasKey("info"),GP=e=>sr(e)&&e.hasKey("name")&&e.hasKey("in"),xr=e=>sr(e)&&e.hasKey("$ref"),KP=e=>sr(e)&&e.hasKey("content"),JP=e=>sr(e)&&e.hasKey("description"),gb=sr,yb=sr,Tg=e=>Ct(e.key)&&A0("x-",e.key.toValue()),Dt=Oe(Qn,{props:{specPath:Ru,ignoredFields:[],canSupportSpecificationExtensions:!0,specificationExtensionPredicate:Tg},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields,canSupportSpecificationExtensions:r=this.canSupportSpecificationExtensions,specificationExtensionPredicate:n=this.specificationExtensionPredicate}={}){this.specPath=e,this.ignoredFields=t,this.canSupportSpecificationExtensions=r,this.specificationExtensionPredicate=n},methods:{ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach((n,s,a)=>{if(Ct(s)&&r.includes(s.toValue())&&!this.ignoredFields.includes(s.toValue())){const p=this.toRefractedElement([...t,"fixedFields",s.toValue()],n),d=new Te.c6(s.clone(),p);this.copyMetaAndAttributes(a,d),d.classes.push("fixed-field"),this.element.content.push(d)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(a)){const p=this.toRefractedElement(["document","extension"],a);this.element.content.push(p)}else this.ignoredFields.includes(s.toValue())||this.element.content.push(a.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),be=Oe(pb,{methods:{enter(e){return this.element=e.clone(),pt}}}),YP=Oe(Dt,be,{props:{specPath:T(["document","objects","OpenApi"]),canSupportSpecificationExtensions:!0},init(){this.element=new Gd},methods:{ObjectElement(e){return this.unrefractedElement=e,Dt.compose.methods.ObjectElement.call(this,e)}}}),XP=Oe(Qn,be,{methods:{StringElement(e){const t=new Af(e.toValue());return this.copyMetaAndAttributes(e,t),this.element=t,pt}}}),QP=Oe(Qn,{methods:{MemberElement(e){return this.element=e.clone(),this.element.classes.push("specification-extension"),pt}}}),ZP=Oe(Dt,be,{props:{specPath:T(["document","objects","Info"]),canSupportSpecificationExtensions:!0},init(){this.element=new Sf}}),qP=be,eT=be,tT=be,rT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("api-version"),this.element.classes.push("version"),pt}}}),nT=Oe(Dt,be,{props:{specPath:T(["document","objects","Contact"]),canSupportSpecificationExtensions:!0},init(){this.element=new gf}}),iT=be,sT=be,oT=be,aT=Oe(Dt,be,{props:{specPath:T(["document","objects","License"]),canSupportSpecificationExtensions:!0},init(){this.element=new wf}}),lT=be,uT=be,cT=Oe(Dt,be,{props:{specPath:T(["document","objects","Link"]),canSupportSpecificationExtensions:!0},init(){this.element=new Of},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return(Ct(this.element.operationId)||Ct(this.element.operationRef))&&this.element.classes.push("reference-element"),t}}}),fT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),pT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),Mu=Oe(Qn,{props:{fieldPatternPredicate:pl,specPath:Ru,ignoredFields:[],canSupportSpecificationExtensions:!1,specificationExtensionPredicate:Tg},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields,canSupportSpecificationExtensions:r=this.canSupportSpecificationExtensions,specificationExtensionPredicate:n=this.specificationExtensionPredicate}={}){this.specPath=e,this.ignoredFields=t,this.canSupportSpecificationExtensions=r,this.specificationExtensionPredicate=n},methods:{ObjectElement(e){return e.forEach((t,r,n)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(n)){const s=this.toRefractedElement(["document","extension"],n);this.element.content.push(s)}else if(!this.ignoredFields.includes(r.toValue())&&this.fieldPatternPredicate(r.toValue())){const s=this.specPath(t),a=this.toRefractedElement(s,t),p=new Te.c6(r.clone(),a);this.copyMetaAndAttributes(n,p),p.classes.push("patterned-field"),this.element.content.push(p)}else this.ignoredFields.includes(r.toValue())||this.element.content.push(n.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),Vt=Oe(Mu,{props:{fieldPatternPredicate:Cg}});class nh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(nh.primaryClass)}}X(nh,"primaryClass","link-parameters");const dT=nh,hT=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new dT}}),mT=be,vT=be,gT=Oe(Dt,be,{props:{specPath:T(["document","objects","Server"]),canSupportSpecificationExtensions:!0},init(){this.element=new Lf}}),yT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("server-url"),pt}}}),bT=be;class ih extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(ih.primaryClass)}}X(ih,"primaryClass","servers");const xT=ih,Vg=Oe(Qn,be,{init(){this.element=new xT},methods:{ArrayElement(e){return e.forEach(t=>{const r=gb(t)?["document","objects","Server"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),ST=Oe(Dt,be,{props:{specPath:T(["document","objects","ServerVariable"]),canSupportSpecificationExtensions:!0},init(){this.element=new Df}}),wT=be,OT=be,ET=be;class sh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(sh.primaryClass)}}X(sh,"primaryClass","server-variables");const AT=sh,CT=Oe(Vt,be,{props:{specPath:T(["document","objects","ServerVariable"])},init(){this.element=new AT}}),_T=Oe(Dt,be,{props:{specPath:T(["document","objects","MediaType"]),canSupportSpecificationExtensions:!0},init(){this.element=new Ef}}),Xs=Oe(Qn,{props:{alternator:[]},methods:{enter(e){const t=this.alternator.map(({predicate:n,specPath:s})=>hg(n,T(s),cf)),r=lb(t)(e);return this.element=this.toRefractedElement(r,e),pt}}}),PT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof mf||e(n)&&t("callback",n)&&r("object",n)),TT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof vf||e(n)&&t("components",n)&&r("object",n)),VT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof gf||e(n)&&t("contact",n)&&r("object",n)),kT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof yf||e(n)&&t("example",n)&&r("object",n)),jT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof bf||e(n)&&t("externalDocumentation",n)&&r("object",n)),Lu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof xf||e(n)&&t("header",n)&&r("object",n)),IT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Sf||e(n)&&t("info",n)&&r("object",n)),RT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof wf||e(n)&&t("license",n)&&r("object",n)),bb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Of||e(n)&&t("link",n)&&r("object",n)),FT=e=>{if(!bb(e)||!Ct(e.operationRef))return!1;const t=e.operationRef.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},MT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Af||e(n)&&t("openapi",n)&&r("string",n)),LT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof Gd||e(s)&&t("openApi3_0",s)&&r("object",s)&&n("api",s)),xb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Cf||e(n)&&t("operation",n)&&r("object",n)),DT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof _f||e(n)&&t("parameter",n)&&r("object",n)),oh=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Pf||e(n)&&t("pathItem",n)&&r("object",n)),NT=e=>{if(!oh(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},BT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Tf||e(n)&&t("paths",n)&&r("object",n)),_r=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Vf||e(n)&&t("reference",n)&&r("object",n)),$T=e=>{if(!_r(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},UT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof kf||e(n)&&t("requestBody",n)&&r("object",n)),ah=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof jf||e(n)&&t("response",n)&&r("object",n)),WT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof If||e(n)&&t("responses",n)&&r("object",n)),HT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof qd||e(n)&&t("schema",n)&&r("object",n)),zT=e=>Dd(e)&&e.classes.includes("boolean-json-schema"),GT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Mf||e(n)&&t("securityRequirement",n)&&r("object",n)),KT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Lf||e(n)&&t("server",n)&&r("object",n)),JT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Df||e(n)&&t("serverVariable",n)&&r("object",n)),lh=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ef||e(n)&&t("mediaType",n)&&r("object",n)),YT=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),XT=be,kg=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Example"],canSupportSpecificationExtensions:!0},init(){this.element=new Te.Sb,this.element.classes.push("examples")},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","example")}),t}}});class uh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(uh.primaryClass),this.classes.push("examples")}}X(uh,"primaryClass","media-type-examples");const QT=uh,ZT=Oe(kg,{init(){this.element=new QT}});class ch extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(ch.primaryClass)}}X(ch,"primaryClass","media-type-encoding");const qT=ch,eV=Oe(Vt,be,{props:{specPath:T(["document","objects","Encoding"])},init(){this.element=new qT}}),tV=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new Mf}});class fh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(fh.primaryClass)}}X(fh,"primaryClass","security");const rV=fh,nV=Oe(Qn,be,{init(){this.element=new rV},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","SecurityRequirement"],t);this.element.push(r)}else this.element.push(t.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),iV=Oe(Dt,be,{props:{specPath:T(["document","objects","Components"]),canSupportSpecificationExtensions:!0},init(){this.element=new vf}}),sV=Oe(Dt,be,{props:{specPath:T(["document","objects","Tag"]),canSupportSpecificationExtensions:!0},init(){this.element=new th}}),oV=be,aV=be,lV=Oe(Dt,be,{props:{specPath:T(["document","objects","Reference"]),canSupportSpecificationExtensions:!1},init(){this.element=new Vf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),uV=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),cV=Oe(Dt,be,{props:{specPath:T(["document","objects","Parameter"]),canSupportSpecificationExtensions:!0},init(){this.element=new _f},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),t}}}),fV=be,pV=be,dV=be,hV=be,mV=be,vV=be,gV=be,yV=be,bV=be,xV=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),SV=Oe(Dt,be,{props:{specPath:T(["document","objects","Header"]),canSupportSpecificationExtensions:!0},init(){this.element=new xf}}),wV=be,OV=be,EV=be,AV=be,CV=be,_V=be,PV=be,TV=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),VV=be;class ph extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(ph.primaryClass),this.classes.push("examples")}}X(ph,"primaryClass","header-examples");const kV=ph,jV=Oe(kg,{init(){this.element=new kV}}),dh=Oe(Vt,be,{props:{specPath:T(["document","objects","MediaType"])},init(){this.element=new Te.Sb,this.element.classes.push("content")}});class hh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(hh.primaryClass),this.classes.push("content")}}X(hh,"primaryClass","header-content");const IV=hh,RV=Oe(dh,{init(){this.element=new IV}}),FV=Oe(Dt,be,{props:{specPath:T(["document","objects","Schema"]),canSupportSpecificationExtensions:!0},init(){this.element=new qd}}),{items:Sb}=ko.visitors.document.objects.JSONSchema.fixedFields,MV=Oe(Sb,{methods:{ObjectElement(e){const t=Sb.compose.methods.ObjectElement.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t},ArrayElement(e){return this.element=e.clone(),pt}}}),{properties:wb}=ko.visitors.document.objects.JSONSchema.fixedFields,LV=Oe(wb,{methods:{ObjectElement(e){const t=wb.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","schema")}),t}}}),{type:DV}=ko.visitors.document.objects.JSONSchema.fixedFields,NV=Oe(DV,{methods:{ArrayElement(e){return this.element=e.clone(),pt}}}),BV=be,$V=be,UV=be,WV=be,{JSONSchemaOrJSONReferenceVisitor:Ob}=ko.visitors,HV=Oe(Ob,{methods:{ObjectElement(e){const t=Ob.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),zV=Object.fromEntries(Object.entries(ko.visitors.document.objects.JSONSchema.fixedFields).map(([e,t])=>t===ko.visitors.JSONSchemaOrJSONReferenceVisitor?[e,HV]:[e,t])),GV=Oe(Dt,be,{props:{specPath:T(["document","objects","Discriminator"]),canSupportSpecificationExtensions:!1},init(){this.element=new Ud}}),KV=be;class mh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(mh.primaryClass)}}X(mh,"primaryClass","discriminator-mapping");const JV=mh,YV=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new JV}}),XV=Oe(Dt,be,{props:{specPath:T(["document","objects","XML"]),canSupportSpecificationExtensions:!0},init(){this.element=new rh}}),QV=be,ZV=be,qV=be,ek=be,tk=be,rk=be;class vh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(vh.primaryClass),this.classes.push("examples")}}X(vh,"primaryClass","parameter-examples");const nk=vh,ik=Oe(kg,{init(){this.element=new nk}});class gh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(gh.primaryClass),this.classes.push("content")}}X(gh,"primaryClass","parameter-content");const sk=gh,ok=Oe(dh,{init(){this.element=new sk}});class yh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(yh.primaryClass)}}X(yh,"primaryClass","components-schemas");const Eb=yh,ak=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Schema"]},init(){this.element=new Eb},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","schema")}),t}}});class bh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(bh.primaryClass)}}X(bh,"primaryClass","components-responses");const lk=bh,uk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Response"]},init(){this.element=new lk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","response")}),this.element.filter(ah).forEach((r,n)=>{r.setMetaProperty("http-status-code",n.toValue())}),t}}});class xh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(xh.primaryClass),this.classes.push("parameters")}}X(xh,"primaryClass","components-parameters");const ck=xh,fk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Parameter"]},init(){this.element=new ck},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","parameter")}),t}}});class Sh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Sh.primaryClass),this.classes.push("examples")}}X(Sh,"primaryClass","components-examples");const pk=Sh,dk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Example"]},init(){this.element=new pk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","example")}),t}}});class wh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(wh.primaryClass)}}X(wh,"primaryClass","components-request-bodies");const hk=wh,mk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","RequestBody"]},init(){this.element=new hk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","requestBody")}),t}}});class Oh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Oh.primaryClass)}}X(Oh,"primaryClass","components-headers");const vk=Oh,gk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new vk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}});class Eh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Eh.primaryClass)}}X(Eh,"primaryClass","components-security-schemes");const yk=Eh,bk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","SecurityScheme"]},init(){this.element=new yk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","securityScheme")}),t}}});class Ah extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ah.primaryClass)}}X(Ah,"primaryClass","components-links");const xk=Ah,Sk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Link"]},init(){this.element=new xk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","link")}),t}}});class Ch extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ch.primaryClass)}}X(Ch,"primaryClass","components-callbacks");const wk=Ch,Ok=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Callback"]},init(){this.element=new wk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","callback")}),t}}}),Ek=Oe(Dt,be,{props:{specPath:T(["document","objects","Example"]),canSupportSpecificationExtensions:!0},init(){this.element=new yf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return Ct(this.element.externalValue)&&this.element.classes.push("reference-element"),t}}}),Ak=be,Ck=be,_k=be,Pk=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),Tk=Oe(Dt,be,{props:{specPath:T(["document","objects","ExternalDocumentation"]),canSupportSpecificationExtensions:!0},init(){this.element=new bf}}),Vk=be,kk=be,jk=Oe(Dt,be,{props:{specPath:T(["document","objects","Encoding"]),canSupportSpecificationExtensions:!0},init(){this.element=new Wd},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.headers)&&this.element.headers.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}}),Ik=be;class _h extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(_h.primaryClass)}}X(_h,"primaryClass","encoding-headers");const Rk=_h,Fk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new Rk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.forEach((r,n)=>{if(!Lu(r))return;const s=n.toValue();r.setMetaProperty("headerName",s)}),t}}}),Mk=be,Lk=be,Dk=be,Nk=Oe(Mu,be,{props:{fieldPatternPredicate:Rd(new RegExp("^\\/(?<path>.*)$")),specPath:T(["document","objects","PathItem"]),canSupportSpecificationExtensions:!0},init(){this.element=new Tf},methods:{ObjectElement(e){const t=Mu.compose.methods.ObjectElement.call(this,e);return this.element.filter(oh).forEach((r,n)=>{r.setMetaProperty("path",n.clone())}),t}}}),Bk=Oe(Dt,be,{props:{specPath:T(["document","objects","RequestBody"])},init(){this.element=new kf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),t}}}),$k=be;class Ph extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ph.primaryClass),this.classes.push("content")}}X(Ph,"primaryClass","request-body-content");const Uk=Ph,Wk=Oe(dh,{init(){this.element=new Uk}}),Hk=be,zk=Oe(Mu,be,{props:{fieldPatternPredicate:Rd(new RegExp("{(?<expression>.*)}")),specPath:T(["document","objects","PathItem"]),canSupportSpecificationExtensions:!0},init(){this.element=new mf},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(oh).forEach((r,n)=>{r.setMetaProperty("runtime-expression",n.toValue())}),t}}}),Gk=Oe(Dt,be,{props:{specPath:T(["document","objects","Response"])},init(){this.element=new jf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),sr(this.element.headers)&&this.element.headers.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}}),Kk=be;class Th extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Th.primaryClass)}}X(Th,"primaryClass","response-headers");const Jk=Th,Yk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new Jk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.forEach((r,n)=>{if(!Lu(r))return;const s=n.toValue();r.setMetaProperty("header-name",s)}),t}}});class Vh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Vh.primaryClass),this.classes.push("content")}}X(Vh,"primaryClass","response-content");const Xk=Vh,Qk=Oe(dh,{init(){this.element=new Xk}});class kh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(kh.primaryClass)}}X(kh,"primaryClass","response-links");const Zk=kh,qk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Link"]},init(){this.element=new Zk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","link")}),t}}}),Ab=Oe(Dt,Mu,{props:{specPathFixedFields:Ru,specPathPatternedFields:Ru},methods:{ObjectElement(e){const{specPath:t,ignoredFields:r}=this;try{this.specPath=this.specPathFixedFields;const n=this.retrieveFixedFields(this.specPath(e));this.ignoredFields=[...r,...vE(e.keys(),n)],Dt.compose.methods.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=n,Mu.compose.methods.ObjectElement.call(this,e)}catch(n){throw this.specPath=t,n}return pt}}}),ej=Oe(Ab,be,{props:{specPathFixedFields:T(["document","objects","Responses"]),specPathPatternedFields:e=>xr(e)?["document","objects","Reference"]:["document","objects","Response"],fieldPatternPredicate:Rd(new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${cA(100,600).join("|")})$`)),canSupportSpecificationExtensions:!0},init(){this.element=new If},methods:{ObjectElement(e){const t=Ab.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","response")}),this.element.filter(ah).forEach((r,n)=>{const s=n.clone();this.fieldPatternPredicate(s.toValue())&&r.setMetaProperty("http-status-code",s)}),t}}}),tj=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Response"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)?this.element.setMetaProperty("referenced-element","response"):ah(this.element)&&this.element.setMetaProperty("http-status-code","default"),t}}}),rj=Oe(Dt,be,{props:{specPath:T(["document","objects","Operation"])},init(){this.element=new Cf}});class jh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(jh.primaryClass)}}X(jh,"primaryClass","operation-tags");const nj=jh,ij=Oe(be,{init(){this.element=new nj},methods:{ArrayElement(e){return this.element=this.element.concat(e.clone()),pt}}}),sj=be,oj=be,aj=be;class Ih extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Ih.primaryClass),this.classes.push("parameters")}}X(Ih,"primaryClass","operation-parameters");const Cb=Ih,_b=Oe(Qn,be,{init(){this.element=new Te.ON,this.element.classes.push("parameters")},methods:{ArrayElement(e){return e.forEach(t=>{const r=xr(t)?["document","objects","Reference"]:["document","objects","Parameter"],n=this.toRefractedElement(r,t);_r(n)&&n.setMetaProperty("referenced-element","parameter"),this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),lj=Oe(_b,{init(){this.element=new Cb}}),uj=Oe(Xs,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","RequestBody"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),t}}});class Rh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Rh.primaryClass)}}X(Rh,"primaryClass","operation-callbacks");const cj=Rh,fj=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Callback"]},init(){this.element=new cj},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","callback")}),t}}}),pj=be;class Fh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Fh.primaryClass),this.classes.push("security")}}X(Fh,"primaryClass","operation-security");const Pb=Fh,dj=Oe(Qn,be,{init(){this.element=new Pb},methods:{ArrayElement(e){return e.forEach(t=>{const r=sr(t)?["document","objects","SecurityRequirement"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}});class Mh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Mh.primaryClass),this.classes.push("servers")}}X(Mh,"primaryClass","operation-servers");const Tb=Mh,hj=Oe(Vg,{init(){this.element=new Tb}}),mj=Oe(Dt,be,{props:{specPath:T(["document","objects","PathItem"])},init(){this.element=new Pf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return this.element.filter(xb).forEach((r,n)=>{const s=n.clone();s.content=s.toValue().toUpperCase(),r.setMetaProperty("http-method",s)}),Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),vj=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),gj=be,yj=be;class Lh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Lh.primaryClass),this.classes.push("servers")}}X(Lh,"primaryClass","path-item-servers");const Vb=Lh,bj=Oe(Vg,{init(){this.element=new Vb}});class Dh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Dh.primaryClass),this.classes.push("parameters")}}X(Dh,"primaryClass","path-item-parameters");const xj=Dh,Sj=Oe(_b,{init(){this.element=new xj}}),wj=Oe(Dt,be,{props:{specPath:T(["document","objects","SecurityScheme"]),canSupportSpecificationExtensions:!0},init(){this.element=new eh}}),Oj=be,Ej=be,Aj=be,Cj=be,_j=be,Pj=be,Tj=be,Vj=Oe(Dt,be,{props:{specPath:T(["document","objects","OAuthFlows"]),canSupportSpecificationExtensions:!0},init(){this.element=new zd}}),kj=Oe(Dt,be,{props:{specPath:T(["document","objects","OAuthFlow"]),canSupportSpecificationExtensions:!0},init(){this.element=new Hd}}),jj=be,Ij=be,Rj=be;class Nh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Nh.primaryClass)}}X(Nh,"primaryClass","oauth-flow-scopes");const Fj=Nh,Mj=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new Fj}});class Bh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Bh.primaryClass)}}X(Bh,"primaryClass","tags");const Lj=Bh,Dj=Oe(Qn,be,{init(){this.element=new Lj},methods:{ArrayElement(e){return e.forEach(t=>{const r=yb(t)?["document","objects","Tag"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}});function kb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function jb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Ib={$visitor:lV,fixedFields:{$ref:uV}},Rb={$visitor:FV,fixedFields:jb(jb({},zV),{},{items:MV,properties:LV,type:NV,nullable:BV,discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:$V,xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:UV,deprecated:WV})},ke={visitors:{value:be,document:{objects:{OpenApi:{$visitor:YP,fixedFields:{openapi:XP,info:{$ref:"#/visitors/document/objects/Info"},servers:Vg,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:nV,tags:Dj,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:ZP,fixedFields:{title:qP,description:eT,termsOfService:tT,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:rT}},Contact:{$visitor:nT,fixedFields:{name:iT,url:sT,email:oT}},License:{$visitor:aT,fixedFields:{name:lT,url:uT}},Server:{$visitor:gT,fixedFields:{url:yT,description:bT,variables:CT}},ServerVariable:{$visitor:ST,fixedFields:{enum:wT,default:OT,description:ET}},Components:{$visitor:iV,fixedFields:{schemas:ak,responses:uk,parameters:fk,examples:dk,requestBodies:mk,headers:gk,securitySchemes:bk,links:Sk,callbacks:Ok}},Paths:{$visitor:Nk},PathItem:{$visitor:mj,fixedFields:{$ref:vj,summary:gj,description:yj,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:bj,parameters:Sj}},Operation:{$visitor:rj,fixedFields:{tags:ij,summary:sj,description:oj,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:aj,parameters:lj,requestBody:uj,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:fj,deprecated:pj,security:dj,servers:hj}},ExternalDocumentation:{$visitor:Tk,fixedFields:{description:Vk,url:kk}},Parameter:{$visitor:cV,fixedFields:{name:fV,in:pV,description:dV,required:hV,deprecated:mV,allowEmptyValue:vV,style:gV,explode:yV,allowReserved:bV,schema:xV,example:rk,examples:ik,content:ok}},RequestBody:{$visitor:Bk,fixedFields:{description:$k,content:Wk,required:Hk}},MediaType:{$visitor:_T,fixedFields:{schema:YT,example:XT,examples:ZT,encoding:eV}},Encoding:{$visitor:jk,fixedFields:{contentType:Ik,headers:Fk,style:Mk,explode:Lk,allowReserved:Dk}},Responses:{$visitor:ej,fixedFields:{default:tj}},Response:{$visitor:Gk,fixedFields:{description:Kk,headers:Yk,content:Qk,links:qk}},Callback:{$visitor:zk},Example:{$visitor:Ek,fixedFields:{summary:Ak,description:Ck,value:_k,externalValue:Pk}},Link:{$visitor:cT,fixedFields:{operationRef:fT,operationId:pT,parameters:hT,requestBody:mT,description:vT,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:SV,fixedFields:{description:wV,required:OV,deprecated:EV,allowEmptyValue:AV,style:CV,explode:_V,allowReserved:PV,schema:TV,example:VV,examples:jV,content:RV}},Tag:{$visitor:sV,fixedFields:{name:oV,description:aV,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},JSONReference:Ib,Reference:Ib,JSONSchema:Rb,Schema:Rb,LinkDescription:ko.visitors.document.objects.LinkDescription,Media:ko.visitors.document.objects.Media,Discriminator:{$visitor:GV,fixedFields:{propertyName:KV,mapping:YV}},XML:{$visitor:XV,fixedFields:{name:QV,namespace:ZV,prefix:qV,attribute:ek,wrapped:tk}},SecurityScheme:{$visitor:wj,fixedFields:{type:Oj,description:Ej,name:Aj,in:Cj,scheme:_j,bearerFormat:Pj,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Tj}},OAuthFlows:{$visitor:Vj,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:kj,fixedFields:{authorizationUrl:jj,tokenUrl:Ij,refreshUrl:Rj,scopes:Mj}},SecurityRequirement:{$visitor:tV}},extension:{$visitor:QP}}}},Nj={namespace:e=>{const{base:t}=e;return t.register("callback",mf),t.register("components",vf),t.register("contact",gf),t.register("discriminator",Ud),t.register("encoding",Wd),t.register("example",yf),t.register("externalDocumentation",bf),t.register("header",xf),t.register("info",Sf),t.register("license",wf),t.register("link",Of),t.register("mediaType",Ef),t.register("oAuthFlow",Hd),t.register("oAuthFlows",zd),t.register("openapi",Af),t.register("openApi3_0",Gd),t.register("operation",Cf),t.register("parameter",_f),t.register("pathItem",Pf),t.register("paths",Tf),t.register("reference",Vf),t.register("requestBody",kf),t.register("response",jf),t.register("responses",If),t.register("schema",qd),t.register("securityRequirement",Mf),t.register("securityScheme",eh),t.register("server",Lf),t.register("serverVariable",Df),t.register("tag",th),t.register("xml",rh),t}};function Fb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function jg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Bj=()=>{const e=ku(Nj);return{predicates:jg(jg(jg({},A),O),{},{isStringElement:Ct}),namespace:e}};function Mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function $j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Uj=(e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=(0,Te.Qc)(e),s=Xd(ke),a=Tu(t,[],s);return Nn(n,a,{state:{specObj:s}}),hf(a.element,r,{toolboxCreator:Bj,visitorOptions:{keyMap:mb,nodeTypeGetter:hb}})},pr=e=>(t,r={})=>Uj(t,$j({specPath:e},r)),VW=null;mf.refract=pr(["visitors","document","objects","Callback","$visitor"]),vf.refract=pr(["visitors","document","objects","Components","$visitor"]),gf.refract=pr(["visitors","document","objects","Contact","$visitor"]),yf.refract=pr(["visitors","document","objects","Example","$visitor"]),Ud.refract=pr(["visitors","document","objects","Discriminator","$visitor"]),Wd.refract=pr(["visitors","document","objects","Encoding","$visitor"]),bf.refract=pr(["visitors","document","objects","ExternalDocumentation","$visitor"]),xf.refract=pr(["visitors","document","objects","Header","$visitor"]),Sf.refract=pr(["visitors","document","objects","Info","$visitor"]),wf.refract=pr(["visitors","document","objects","License","$visitor"]),Of.refract=pr(["visitors","document","objects","Link","$visitor"]),Ef.refract=pr(["visitors","document","objects","MediaType","$visitor"]),Hd.refract=pr(["visitors","document","objects","OAuthFlow","$visitor"]),zd.refract=pr(["visitors","document","objects","OAuthFlows","$visitor"]),Af.refract=pr(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Gd.refract=pr(["visitors","document","objects","OpenApi","$visitor"]),Cf.refract=pr(["visitors","document","objects","Operation","$visitor"]),_f.refract=pr(["visitors","document","objects","Parameter","$visitor"]),Pf.refract=pr(["visitors","document","objects","PathItem","$visitor"]),Tf.refract=pr(["visitors","document","objects","Paths","$visitor"]),Vf.refract=pr(["visitors","document","objects","Reference","$visitor"]),kf.refract=pr(["visitors","document","objects","RequestBody","$visitor"]),jf.refract=pr(["visitors","document","objects","Response","$visitor"]),If.refract=pr(["visitors","document","objects","Responses","$visitor"]),qd.refract=pr(["visitors","document","objects","Schema","$visitor"]),Mf.refract=pr(["visitors","document","objects","SecurityRequirement","$visitor"]),eh.refract=pr(["visitors","document","objects","SecurityScheme","$visitor"]),Lf.refract=pr(["visitors","document","objects","Server","$visitor"]),Df.refract=pr(["visitors","document","objects","ServerVariable","$visitor"]),th.refract=pr(["visitors","document","objects","Tag","$visitor"]),rh.refract=pr(["visitors","document","objects","XML","$visitor"]);class Wj extends mf{}const $h=Wj;class Hj extends vf{get pathItems(){return this.get("pathItems")}set pathItems(t){this.set("pathItems",t)}}const Uh=Hj;class zj extends gf{}const Wh=zj;class Gj extends Ud{}const Ig=Gj;class Kj extends Wd{}const Rg=Kj;class Jj extends yf{}const Hh=Jj;class Yj extends bf{}const zh=Yj;class Xj extends xf{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Gh=Xj;class Qj extends Sf{get license(){return this.get("license")}set license(t){this.set("license",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}}const Kh=Qj;class Fg extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="jsonSchemaDialect"}}X(Fg,"default",new Fg("https://spec.openapis.org/oas/3.1/dialect/base"));const Nf=Fg;class Zj extends wf{get identifier(){return this.get("identifier")}set identifier(t){this.set("identifier",t)}}const Jh=Zj;class qj extends Of{}const Yh=qj;class eI extends Ef{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Xh=eI;class tI extends Hd{}const Mg=tI;class rI extends zd{}const Lg=rI;class nI extends Af{}const Dg=nI;class iI extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(t){this.set("openapi",t)}get info(){return this.get("info")}set info(t){this.set("info",t)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(t){this.set("jsonSchemaDialect",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get paths(){return this.get("paths")}set paths(t){this.set("paths",t)}get components(){return this.get("components")}set components(t){this.set("components",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get webhooks(){return this.get("webhooks")}set webhooks(t){this.set("webhooks",t)}}const Oa=iI;class sI extends Cf{get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}}const Du=sI;class oI extends _f{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Qh=oI;class aI extends Pf{get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}}const Qs=aI;class lI extends Tf{}const Zh=lI;class Ng extends Vf{}Object.defineProperty(Ng.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0}),Object.defineProperty(Ng.prototype,"summary",{get(){return this.get("summary")},set(e){this.set("summary",e)},enumerable:!0});const Ea=Ng;class uI extends kf{}const qh=uI;class cI extends jf{}const em=cI;class fI extends If{}const tm=fI;class pI extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(t){this.set("$schema",t)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(t){this.set("$vocabulary",t)}get $id(){return this.get("$id")}set $id(t){this.set("$id",t)}get $anchor(){return this.get("$anchor")}set $anchor(t){this.set("$anchor",t)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(t){this.set("$dynamicAnchor",t)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(t){this.set("$dynamicRef",t)}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get $defs(){return this.get("$defs")}set $defs(t){this.set("$defs",t)}get $comment(){return this.get("$comment")}set $comment(t){this.set("$comment",t)}get allOf(){return this.get("allOf")}set allOf(t){this.set("allOf",t)}get anyOf(){return this.get("anyOf")}set anyOf(t){this.set("anyOf",t)}get oneOf(){return this.get("oneOf")}set oneOf(t){this.set("oneOf",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get if(){return this.get("if")}set if(t){this.set("if",t)}get then(){return this.get("then")}set then(t){this.set("then",t)}get else(){return this.get("else")}set else(t){this.set("else",t)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(t){this.set("dependentSchemas",t)}get prefixItems(){return this.get("prefixItems")}set prefixItems(t){this.set("prefixItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get containsProp(){return this.get("contains")}set containsProp(t){this.set("contains",t)}get properties(){return this.get("properties")}set properties(t){this.set("properties",t)}get patternProperties(){return this.get("patternProperties")}set patternProperties(t){this.set("patternProperties",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get propertyNames(){return this.get("propertyNames")}set propertyNames(t){this.set("propertyNames",t)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(t){this.set("unevaluatedItems",t)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(t){this.set("unevaluatedProperties",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get const(){return this.get("const")}set const(t){this.set("const",t)}get multipleOf(){return this.get("multipleOf")}set multipleOf(t){this.set("multipleOf",t)}get maximum(){return this.get("maximum")}set maximum(t){this.set("maximum",t)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(t){this.set("exclusiveMaximum",t)}get minimum(){return this.get("minimum")}set minimum(t){this.set("minimum",t)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(t){this.set("exclusiveMinimum",t)}get maxLength(){return this.get("maxLength")}set maxLength(t){this.set("maxLength",t)}get minLength(){return this.get("minLength")}set minLength(t){this.set("minLength",t)}get pattern(){return this.get("pattern")}set pattern(t){this.set("pattern",t)}get maxItems(){return this.get("maxItems")}set maxItems(t){this.set("maxItems",t)}get minItems(){return this.get("minItems")}set minItems(t){this.set("minItems",t)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(t){this.set("uniqueItems",t)}get maxContains(){return this.get("maxContains")}set maxContains(t){this.set("maxContains",t)}get minContains(){return this.get("minContains")}set minContains(t){this.set("minContains",t)}get maxProperties(){return this.get("maxProperties")}set maxProperties(t){this.set("maxProperties",t)}get minProperties(){return this.get("minProperties")}set minProperties(t){this.set("minProperties",t)}get required(){return this.get("required")}set required(t){this.set("required",t)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(t){this.set("dependentRequired",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}get readOnly(){return this.get("readOnly")}set readOnly(t){this.set("readOnly",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get format(){return this.get("format")}set format(t){this.set("format",t)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(t){this.set("contentEncoding",t)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(t){this.set("contentMediaType",t)}get contentSchema(){return this.get("contentSchema")}set contentSchema(t){this.set("contentSchema",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}}const jo=pI;class dI extends Mf{}const rm=dI;class hI extends eh{}const Bg=hI;class mI extends Lf{}const nm=mI;class vI extends Df{}const im=vI;class gI extends th{}const $g=gI;class yI extends rh{}const Ug=yI,bI=Oe(Dt,be,{props:{specPath:T(["document","objects","OpenApi"]),canSupportSpecificationExtensions:!0},init(){this.element=new Oa,this.openApiSemanticElement=this.element},methods:{ObjectElement(e){return this.openApiGenericElement=e,Dt.compose.methods.ObjectElement.call(this,e)}}}),{visitors:{document:{objects:{Info:{$visitor:xI}}}}}=ke,SI=Oe(xI,{init(){this.element=new Kh}}),wI=be,{visitors:{document:{objects:{Contact:{$visitor:OI}}}}}=ke,EI=Oe(OI,{init(){this.element=new Wh}}),{visitors:{document:{objects:{License:{$visitor:AI}}}}}=ke,CI=Oe(AI,{init(){this.element=new Jh}}),_I=be,{visitors:{document:{objects:{Link:{$visitor:PI}}}}}=ke,TI=Oe(PI,{init(){this.element=new Yh}}),VI=Oe(Qn,be,{methods:{StringElement(e){const t=new Nf(e.toValue());return this.copyMetaAndAttributes(e,t),this.element=t,pt}}}),{visitors:{document:{objects:{Server:{$visitor:kI}}}}}=ke,jI=Oe(kI,{init(){this.element=new nm}}),{visitors:{document:{objects:{ServerVariable:{$visitor:II}}}}}=ke,RI=Oe(II,{init(){this.element=new im}}),{visitors:{document:{objects:{MediaType:{$visitor:FI}}}}}=ke,MI=Oe(FI,{init(){this.element=new Xh}}),{visitors:{document:{objects:{SecurityRequirement:{$visitor:LI}}}}}=ke,DI=Oe(LI,{init(){this.element=new rm}}),{visitors:{document:{objects:{Components:{$visitor:NI}}}}}=ke,BI=Oe(NI,{init(){this.element=new Uh}}),{visitors:{document:{objects:{Tag:{$visitor:$I}}}}}=ke,UI=Oe($I,{init(){this.element=new $g}}),{visitors:{document:{objects:{Reference:{$visitor:WI}}}}}=ke,HI=Oe(WI,{init(){this.element=new Ea}}),zI=be,GI=be,{visitors:{document:{objects:{Parameter:{$visitor:KI}}}}}=ke,JI=Oe(KI,{init(){this.element=new Qh}}),{visitors:{document:{objects:{Header:{$visitor:YI}}}}}=ke,XI=Oe(YI,{init(){this.element=new Gh}}),QI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof $h||e(n)&&t("callback",n)&&r("object",n)),ZI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Uh||e(n)&&t("components",n)&&r("object",n)),qI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Wh||e(n)&&t("contact",n)&&r("object",n)),eR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Hh||e(n)&&t("example",n)&&r("object",n)),tR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof zh||e(n)&&t("externalDocumentation",n)&&r("object",n)),rR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Gh||e(n)&&t("header",n)&&r("object",n)),nR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Kh||e(n)&&t("info",n)&&r("object",n)),Lb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Nf||e(n)&&t("jsonSchemaDialect",n)&&r("string",n)),iR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Jh||e(n)&&t("license",n)&&r("object",n)),Db=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Yh||e(n)&&t("link",n)&&r("object",n)),sm=e=>{if(!Db(e)||!Ct(e.operationRef))return!1;const t=e.operationRef.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},sR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Dg||e(n)&&t("openapi",n)&&r("string",n)),Wg=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof Oa||e(s)&&t("openApi3_1",s)&&r("object",s)&&n("api",s)),Nb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Du||e(n)&&t("operation",n)&&r("object",n)),oR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Qh||e(n)&&t("parameter",n)&&r("object",n)),om=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Qs||e(n)&&t("pathItem",n)&&r("object",n)),am=e=>{if(!om(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},aR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Zh||e(n)&&t("paths",n)&&r("object",n)),Nu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ea||e(n)&&t("reference",n)&&r("object",n)),lm=e=>{if(!Nu(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},lR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof qh||e(n)&&t("requestBody",n)&&r("object",n)),uR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof em||e(n)&&t("response",n)&&r("object",n)),cR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof tm||e(n)&&t("responses",n)&&r("object",n)),Bu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof jo||e(n)&&t("schema",n)&&r("object",n)),Hg=e=>Dd(e)&&e.classes.includes("boolean-json-schema"),fR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof rm||e(n)&&t("securityRequirement",n)&&r("object",n)),pR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof nm||e(n)&&t("server",n)&&r("object",n)),dR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof im||e(n)&&t("serverVariable",n)&&r("object",n)),hR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Xh||e(n)&&t("mediaType",n)&&r("object",n)),Io=Oe({props:{parent:null},init({parent:e=this.parent}){this.parent=e,this.passingOptionsNames=[...this.passingOptionsNames,"parent"]}}),mR=Oe(Dt,Io,be,{props:{specPath:T(["document","objects","Schema"]),canSupportSpecificationExtensions:!0},init(){const e=()=>{let n;return this.openApiSemanticElement!==null&&Lb(this.openApiSemanticElement.jsonSchemaDialect)?n=this.openApiSemanticElement.jsonSchemaDialect.toValue():this.openApiGenericElement!==null&&Ct(this.openApiGenericElement.get("jsonSchemaDialect"))?n=this.openApiGenericElement.get("jsonSchemaDialect").toValue():n=Nf.default.toValue(),n},t=n=>{if(bg(this.parent)&&!Ct(n.get("$schema")))this.element.setMetaProperty("inherited$schema",e());else if(Bu(this.parent)&&!Ct(n.get("$schema"))){var s,a;const p=bl((s=this.parent.meta.get("inherited$schema"))===null||s===void 0?void 0:s.toValue(),(a=this.parent.$schema)===null||a===void 0?void 0:a.toValue());this.element.setMetaProperty("inherited$schema",p)}},r=n=>{var s;const a=this.parent!==null?this.parent.getMetaProperty("inherited$id",[]).clone():new Te.ON,p=(s=n.get("$id"))===null||s===void 0?void 0:s.toValue();Cg(p)&&a.push(p),this.element.setMetaProperty("inherited$id",a)};this.ObjectElement=function(s){this.element=new jo,t(s),r(s),this.parent=this.element;const a=Dt.compose.methods.ObjectElement.call(this,s);return Ct(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),a},this.BooleanElement=function(s){return this.element=s.clone(),this.element.classes.push("boolean-json-schema"),pt}}}),vR=be,gR=Oe(be,{methods:{ObjectElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-$vocabulary"),pt}}}),yR=be,bR=be,xR=be,SR=be,wR=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),OR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-$defs")}}),ER=be,AR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-allOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),CR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-anyOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),_R=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-oneOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),PR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-dependentSchemas")}}),TR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-prefixItems")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),VR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-properties")}}),kR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-patternProperties")}}),jR=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt},ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt}}}),IR=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-enum"),pt}}}),RR=be,FR=be,MR=be,LR=be,DR=be,NR=be,BR=be,$R=be,UR=be,WR=be,HR=be,zR=be,GR=be,KR=be,JR=be,YR=be,XR=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-required"),pt}}}),QR=Oe(be,{methods:{ObjectElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-dependentRequired"),pt}}}),ZR=be,qR=be,eF=be,tF=be,rF=be,nF=be,iF=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-examples"),pt}}}),sF=be,oF=be,aF=be,lF=be,{visitors:{document:{objects:{Discriminator:{$visitor:uF}}}}}=ke,cF=Oe(uF,{props:{canSupportSpecificationExtensions:!0},init(){this.element=new Ig}}),{visitors:{document:{objects:{XML:{$visitor:fF}}}}}=ke,pF=Oe(fF,{init(){this.element=new Ug}}),dF=Oe(Vt,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Eb}});class um extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(um.primaryClass)}}X(um,"primaryClass","components-path-items");const hF=um,mF=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new hF},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),t}}}),{visitors:{document:{objects:{Example:{$visitor:vF}}}}}=ke,gF=Oe(vF,{init(){this.element=new Hh}}),{visitors:{document:{objects:{ExternalDocumentation:{$visitor:yF}}}}}=ke,bF=Oe(yF,{init(){this.element=new zh}}),{visitors:{document:{objects:{Encoding:{$visitor:xF}}}}}=ke,SF=Oe(xF,{init(){this.element=new Rg}}),{visitors:{document:{objects:{Paths:{$visitor:wF}}}}}=ke,OF=Oe(wF,{init(){this.element=new Zh}}),{visitors:{document:{objects:{RequestBody:{$visitor:EF}}}}}=ke,AF=Oe(EF,{init(){this.element=new qh}}),{visitors:{document:{objects:{Callback:{$visitor:Bb}}}}}=ke,CF=Oe(Bb,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new $h},methods:{ObjectElement(e){const t=Bb.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),t}}}),{visitors:{document:{objects:{Response:{$visitor:_F}}}}}=ke,PF=Oe(_F,{init(){this.element=new em}}),{visitors:{document:{objects:{Responses:{$visitor:TF}}}}}=ke,VF=Oe(TF,{init(){this.element=new tm}}),{visitors:{document:{objects:{Operation:{$visitor:kF}}}}}=ke,jF=Oe(kF,{init(){this.element=new Du}}),{visitors:{document:{objects:{PathItem:{$visitor:IF}}}}}=ke,RF=Oe(IF,{init(){this.element=new Qs}}),{visitors:{document:{objects:{SecurityScheme:{$visitor:FF}}}}}=ke,MF=Oe(FF,{init(){this.element=new Bg}}),{visitors:{document:{objects:{OAuthFlows:{$visitor:LF}}}}}=ke,DF=Oe(LF,{init(){this.element=new Lg}}),{visitors:{document:{objects:{OAuthFlow:{$visitor:NF}}}}}=ke,BF=Oe(NF,{init(){this.element=new Mg}});class cm extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(cm.primaryClass)}}X(cm,"primaryClass","webhooks");const $F=cm,UF=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new $F},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),this.element.filter(om).forEach((r,n)=>{r.setMetaProperty("webhook-name",n.toValue())}),t}}}),WF={visitors:{value:ke.visitors.value,document:{objects:{OpenApi:{$visitor:bI,fixedFields:{openapi:ke.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:VI,servers:ke.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:UF,components:{$ref:"#/visitors/document/objects/Components"},security:ke.visitors.document.objects.OpenApi.fixedFields.security,tags:ke.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:SI,fixedFields:{title:ke.visitors.document.objects.Info.fixedFields.title,description:ke.visitors.document.objects.Info.fixedFields.description,summary:wI,termsOfService:ke.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:ke.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:EI,fixedFields:{name:ke.visitors.document.objects.Contact.fixedFields.name,url:ke.visitors.document.objects.Contact.fixedFields.url,email:ke.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:CI,fixedFields:{name:ke.visitors.document.objects.License.fixedFields.name,identifier:_I,url:ke.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:jI,fixedFields:{url:ke.visitors.document.objects.Server.fixedFields.url,description:ke.visitors.document.objects.Server.fixedFields.description,variables:ke.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:RI,fixedFields:{enum:ke.visitors.document.objects.ServerVariable.fixedFields.enum,default:ke.visitors.document.objects.ServerVariable.fixedFields.default,description:ke.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:BI,fixedFields:{schemas:dF,responses:ke.visitors.document.objects.Components.fixedFields.responses,parameters:ke.visitors.document.objects.Components.fixedFields.parameters,examples:ke.visitors.document.objects.Components.fixedFields.examples,requestBodies:ke.visitors.document.objects.Components.fixedFields.requestBodies,headers:ke.visitors.document.objects.Components.fixedFields.headers,securitySchemes:ke.visitors.document.objects.Components.fixedFields.securitySchemes,links:ke.visitors.document.objects.Components.fixedFields.links,callbacks:ke.visitors.document.objects.Components.fixedFields.callbacks,pathItems:mF}},Paths:{$visitor:OF},PathItem:{$visitor:RF,fixedFields:{$ref:ke.visitors.document.objects.PathItem.fixedFields.$ref,summary:ke.visitors.document.objects.PathItem.fixedFields.summary,description:ke.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:ke.visitors.document.objects.PathItem.fixedFields.servers,parameters:ke.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:jF,fixedFields:{tags:ke.visitors.document.objects.Operation.fixedFields.tags,summary:ke.visitors.document.objects.Operation.fixedFields.summary,description:ke.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:ke.visitors.document.objects.Operation.fixedFields.operationId,parameters:ke.visitors.document.objects.Operation.fixedFields.parameters,requestBody:ke.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:ke.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:ke.visitors.document.objects.Operation.fixedFields.deprecated,security:ke.visitors.document.objects.Operation.fixedFields.security,servers:ke.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:bF,fixedFields:{description:ke.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:ke.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:JI,fixedFields:{name:ke.visitors.document.objects.Parameter.fixedFields.name,in:ke.visitors.document.objects.Parameter.fixedFields.in,description:ke.visitors.document.objects.Parameter.fixedFields.description,required:ke.visitors.document.objects.Parameter.fixedFields.required,deprecated:ke.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:ke.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:ke.visitors.document.objects.Parameter.fixedFields.style,explode:ke.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:ke.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.Parameter.fixedFields.example,examples:ke.visitors.document.objects.Parameter.fixedFields.examples,content:ke.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:AF,fixedFields:{description:ke.visitors.document.objects.RequestBody.fixedFields.description,content:ke.visitors.document.objects.RequestBody.fixedFields.content,required:ke.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:MI,fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.MediaType.fixedFields.example,examples:ke.visitors.document.objects.MediaType.fixedFields.examples,encoding:ke.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:SF,fixedFields:{contentType:ke.visitors.document.objects.Encoding.fixedFields.contentType,headers:ke.visitors.document.objects.Encoding.fixedFields.headers,style:ke.visitors.document.objects.Encoding.fixedFields.style,explode:ke.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:ke.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:VF,fixedFields:{default:ke.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:PF,fixedFields:{description:ke.visitors.document.objects.Response.fixedFields.description,headers:ke.visitors.document.objects.Response.fixedFields.headers,content:ke.visitors.document.objects.Response.fixedFields.content,links:ke.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:CF},Example:{$visitor:gF,fixedFields:{summary:ke.visitors.document.objects.Example.fixedFields.summary,description:ke.visitors.document.objects.Example.fixedFields.description,value:ke.visitors.document.objects.Example.fixedFields.value,externalValue:ke.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:TI,fixedFields:{operationRef:ke.visitors.document.objects.Link.fixedFields.operationRef,operationId:ke.visitors.document.objects.Link.fixedFields.operationId,parameters:ke.visitors.document.objects.Link.fixedFields.parameters,requestBody:ke.visitors.document.objects.Link.fixedFields.requestBody,description:ke.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:XI,fixedFields:{description:ke.visitors.document.objects.Header.fixedFields.description,required:ke.visitors.document.objects.Header.fixedFields.required,deprecated:ke.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:ke.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:ke.visitors.document.objects.Header.fixedFields.style,explode:ke.visitors.document.objects.Header.fixedFields.explode,allowReserved:ke.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.Header.fixedFields.example,examples:ke.visitors.document.objects.Header.fixedFields.examples,content:ke.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:UI,fixedFields:{name:ke.visitors.document.objects.Tag.fixedFields.name,description:ke.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:HI,fixedFields:{$ref:ke.visitors.document.objects.Reference.fixedFields.$ref,summary:zI,description:GI}},Schema:{$visitor:mR,fixedFields:{$schema:vR,$vocabulary:gR,$id:yR,$anchor:bR,$dynamicAnchor:xR,$dynamicRef:SR,$ref:wR,$defs:OR,$comment:ER,allOf:AR,anyOf:CR,oneOf:_R,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:PR,prefixItems:TR,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:VR,patternProperties:kR,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:jR,enum:IR,const:RR,multipleOf:FR,maximum:MR,exclusiveMaximum:LR,minimum:DR,exclusiveMinimum:NR,maxLength:BR,minLength:$R,pattern:UR,maxItems:WR,minItems:HR,uniqueItems:zR,maxContains:GR,minContains:KR,maxProperties:JR,minProperties:YR,required:XR,dependentRequired:QR,title:ZR,description:qR,default:eF,deprecated:tF,readOnly:rF,writeOnly:nF,examples:iF,format:sF,contentEncoding:oF,contentMediaType:aF,contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:lF}},Discriminator:{$visitor:cF,fixedFields:{propertyName:ke.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:ke.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:pF,fixedFields:{name:ke.visitors.document.objects.XML.fixedFields.name,namespace:ke.visitors.document.objects.XML.fixedFields.namespace,prefix:ke.visitors.document.objects.XML.fixedFields.prefix,attribute:ke.visitors.document.objects.XML.fixedFields.attribute,wrapped:ke.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:MF,fixedFields:{type:ke.visitors.document.objects.SecurityScheme.fixedFields.type,description:ke.visitors.document.objects.SecurityScheme.fixedFields.description,name:ke.visitors.document.objects.SecurityScheme.fixedFields.name,in:ke.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:ke.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:ke.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:ke.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:DF,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:BF,fixedFields:{authorizationUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:ke.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:DI}},extension:{$visitor:ke.visitors.document.extension.$visitor}}}};function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function HF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Zn=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},ai=HF({CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"]},Iu),fm={namespace:e=>{const{base:t}=e;return t.register("callback",$h),t.register("components",Uh),t.register("contact",Wh),t.register("discriminator",Ig),t.register("encoding",Rg),t.register("example",Hh),t.register("externalDocumentation",zh),t.register("header",Gh),t.register("info",Kh),t.register("jsonSchemaDialect",Nf),t.register("license",Jh),t.register("link",Yh),t.register("mediaType",Xh),t.register("oAuthFlow",Mg),t.register("oAuthFlows",Lg),t.register("openapi",Dg),t.register("openApi3_1",Oa),t.register("operation",Du),t.register("parameter",Qh),t.register("pathItem",Qs),t.register("paths",Zh),t.register("reference",Ea),t.register("requestBody",qh),t.register("response",em),t.register("responses",tm),t.register("schema",jo),t.register("securityRequirement",rm),t.register("securityScheme",Bg),t.register("server",nm),t.register("serverVariable",im),t.register("tag",$g),t.register("xml",Ug),t}};function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Wb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Hb=()=>{const e=ku(fm);return{predicates:Wb(Wb({},j),{},{isStringElement:Ct,isArrayElement:Ki,isObjectElement:sr,includesClasses:ff}),namespace:e}};function zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function zF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const GF=(e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=(0,Te.Qc)(e),s=Xd(WF),a=Tu(t,[],s);return Nn(n,a,{state:{specObj:s}}),hf(a.element,r,{toolboxCreator:Hb,visitorOptions:{keyMap:ai,nodeTypeGetter:Zn}})},ur=e=>(t,r={})=>GF(t,zF({specPath:e},r)),pz=null;$h.refract=ur(["visitors","document","objects","Callback","$visitor"]),Uh.refract=ur(["visitors","document","objects","Components","$visitor"]),Wh.refract=ur(["visitors","document","objects","Contact","$visitor"]),Hh.refract=ur(["visitors","document","objects","Example","$visitor"]),Ig.refract=ur(["visitors","document","objects","Discriminator","$visitor"]),Rg.refract=ur(["visitors","document","objects","Encoding","$visitor"]),zh.refract=ur(["visitors","document","objects","ExternalDocumentation","$visitor"]),Gh.refract=ur(["visitors","document","objects","Header","$visitor"]),Kh.refract=ur(["visitors","document","objects","Info","$visitor"]),Nf.refract=ur(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),Jh.refract=ur(["visitors","document","objects","License","$visitor"]),Yh.refract=ur(["visitors","document","objects","Link","$visitor"]),Xh.refract=ur(["visitors","document","objects","MediaType","$visitor"]),Mg.refract=ur(["visitors","document","objects","OAuthFlow","$visitor"]),Lg.refract=ur(["visitors","document","objects","OAuthFlows","$visitor"]),Dg.refract=ur(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Oa.refract=ur(["visitors","document","objects","OpenApi","$visitor"]),Du.refract=ur(["visitors","document","objects","Operation","$visitor"]),Qh.refract=ur(["visitors","document","objects","Parameter","$visitor"]),Qs.refract=ur(["visitors","document","objects","PathItem","$visitor"]),Zh.refract=ur(["visitors","document","objects","Paths","$visitor"]),Ea.refract=ur(["visitors","document","objects","Reference","$visitor"]),qh.refract=ur(["visitors","document","objects","RequestBody","$visitor"]),em.refract=ur(["visitors","document","objects","Response","$visitor"]),tm.refract=ur(["visitors","document","objects","Responses","$visitor"]),jo.refract=ur(["visitors","document","objects","Schema","$visitor"]),rm.refract=ur(["visitors","document","objects","SecurityRequirement","$visitor"]),Bg.refract=ur(["visitors","document","objects","SecurityScheme","$visitor"]),nm.refract=ur(["visitors","document","objects","Server","$visitor"]),im.refract=ur(["visitors","document","objects","ServerVariable","$visitor"]),$g.refract=ur(["visitors","document","objects","Tag","$visitor"]),Ug.refract=ur(["visitors","document","objects","XML","$visitor"]);class KF extends Array{constructor(...t){super(...t),X(this,"unknownMediaType","application/octet-stream")}filterByFormat(){throw new Error("Not implemented!")}findBy(){throw new Error("Not implemented")}latest(){throw new Error("Not implemented!")}}const JF=KF;class zg extends JF{filterByFormat(t="generic"){const r=t==="generic"?"openapi;version":t;return this.filter(n=>n.includes(r))}findBy(t="3.1.0",r="generic"){const n=r==="generic"?`vnd.oai.openapi;version=${t}`:`vnd.oai.openapi+${r};version=${t}`;return this.find(a=>a.includes(n))||this.unknownMediaType}latest(t="generic"){return Au(this.filterByFormat(t))}}const wl=new zg("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");var pm=c(73656),YF=jd(function(e,t){return Jr(gg(""),TE(Md(e)),b0(""))(t)});const XF=YF;var QF=Eu(_o);const dm=QF;var ZF=lr(1,Jr(Gi,xa("RegExp")));const qF=ZF;var eM=kA(Sl,Pu(/[.*+?^${}()|[\]\\-]/g,"\\$&"));const tM=eM;var rM=function(t,r,n){if(n==null||t==null||r==null)throw TypeError("Input values must not be `null` or `undefined`")},Gb=function(t,r){if(typeof t!="string"&&!(t instanceof String))throw TypeError("`".concat(r,"` must be a string"))},nM=function(t){if(typeof t!="string"&&!(t instanceof String)&&!(t instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")},iM=function(t,r,n){rM(t,r,n),Gb(n,"str"),Gb(r,"replaceValue"),nM(t);var s=new RegExp(qF(t)?t:tM(t),"g");return Pu(s,r,n)},sM=lr(3,iM),oM=mg(2,"replaceAll"),aM=Po(String.prototype.replaceAll)?oM:sM;const lM=aM,Gg=()=>Cu(Rd(/^win/),["platform"],pm),Kg=e=>{try{const t=new URL(e);return XF(":",t.protocol)}catch(t){return}},mz=Jr(Kg,dm),uM=e=>{const t=e.lastIndexOf(".");return t>=0?e.substr(t).toLowerCase():""},Bf=e=>{if(pm.browser)return!1;const t=Kg(e);return _o(t)||t==="file"||/^[a-zA-Z]$/.test(t)},$f=e=>{const t=Kg(e);return t==="http"||t==="https"},vz=e=>{try{return new URL(e)&&!0}catch(t){return!1}},Kb=(e,t)=>{const r=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],n=_u(!1,"keepFileProtocol",t),s=_u(Gg,"isWindows",t);let a=decodeURI(e);for(let d=0;d<r.length;d+=2)a=a.replace(r[d],r[d+1]);let p=a.substr(0,7).toLowerCase()==="file://";return p&&(a=a[7]==="/"?a.substr(8):a.substr(7),s()&&a[1]==="/"&&(a=`${a[0]}:${a.substr(1)}`),n?a=`file:///${a}`:(p=!1,a=s()?a:`/${a}`)),s()&&!p&&(a=lM("/","\\",a),a.substr(1,2)===":\\"&&(a=a[0].toUpperCase()+a.substr(1))),a},cM=e=>{const t=[/\?/g,"%3F",/#/g,"%23"];let r=e;Gg()&&(r=r.replace(/\\/g,"/")),r=encodeURI(r);for(let n=0;n<t.length;n+=2)r=r.replace(t[n],t[n+1]);return r},Jb=e=>{const t=e.indexOf("#");return t!==-1?e.substr(t):"#"},ws=e=>{const t=e.indexOf("#");let r=e;return t>=0&&(r=e.substr(0,t)),r},Yb=()=>{if(pm.browser)return ws(globalThis.location.href);const e=pm.cwd(),t=Au(e);return["/","\\"].includes(t)?e:e+(Gg()?"\\":"/")},Yi=(e,t)=>{const r=new URL(t,new URL(e,"resolve://"));if(r.protocol==="resolve:"){const{pathname:n,search:s,hash:a}=r;return n+s+a}return r.toString()},Uf=e=>Bf(e)?cM(Kb(e)):encodeURI(decodeURI(e)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Ei=e=>Bf(e)?Kb(e):decodeURI(e),$u=Oe({props:{uri:"",value:null,depth:0,refSet:null,errors:[]},init({depth:e=this.depth,refSet:t=this.refSet,uri:r=this.uri,value:n=this.value}={}){this.uri=r,this.value=n,this.depth=e,this.refSet=t,this.errors=[]}}),hm=Oe({props:{rootRef:null,refs:[],circular:!1},init({refs:e=[]}={}){this.refs=[],e.forEach(t=>this.add(t))},methods:{get size(){return this.refs.length},add(e){return this.has(e)||(this.refs.push(e),this.rootRef=this.rootRef===null?e:this.rootRef,e.refSet=this),this},merge(e){for(const t of e.values())this.add(t);return this},has(e){const t=Sl(e)?e:e.uri;return dm(this.find(Id("uri",t)))},find(e){return this.refs.find(e)},*values(){yield*this.refs},clean(){this.refs.forEach(e=>{e.refSet=null}),this.refs=[]}}}),fM={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],external:!0,maxDepth:1/0},dereference:{strategies:[],refSet:null,maxDepth:1/0}},pM=R1(Oi(["resolve","baseURI"]),ya(["resolve","baseURI"])),dM=e=>Z0(e)?Yb():e,hM=(e,t)=>{const r=G1(e,t);return Y1(pM,dM,r)},Ol=Oe({props:{uri:null,mediaType:"text/plain",data:null,parseResult:null},init({uri:e=this.uri,mediaType:t=this.mediaType,data:r=this.data,parseResult:n=this.parseResult}={}){this.uri=e,this.mediaType=t,this.data=r,this.parseResult=n},methods:{get extension(){return Sl(this.uri)?uM(this.uri):""},toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(Gi(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}}});class mM extends Error{constructor(t,r){if(super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,pf(r)&&of("cause",r)&&!of("cause",this)){const{cause:n}=r;this.cause=n,of("stack",n)&&(this.stack=`${this.stack}
88
- CAUSE: ${n==null?void 0:n.stack}`)}}}const Uu=mM;class vM extends Uu{constructor(t,r){super(t,{cause:r.cause}),X(this,"plugin",void 0),this.plugin=r.plugin}}const gM=vM,Jg=(e,t,r)=>et(this,null,function*(){const n=yield Promise.all(r.map(Tu([e],[t])));return r.filter((s,a)=>n[a])}),Yg=(e,t,r)=>et(this,null,function*(){let n;for(const s of r)try{const a=yield s[e].call(s,...t);return{plugin:s,result:a}}catch(a){n=new gM("Error while running plugin",{cause:a,plugin:s})}return Promise.reject(n)});class yM extends Uu{}const Xi=yM;class bM extends Xi{}const xM=bM;class SM extends Uu{}const Xb=SM,Qb=(e,t)=>et(this,null,function*(){let r=e,n=!1;if(!k0(e)){const p=new e.constructor(e.content,e.meta.clone(),e.attributes);p.classes.push("result"),r=new Ss([p]),n=!0}const s=Ol({uri:t.resolve.baseURI,parseResult:r,mediaType:t.parse.mediaType}),a=yield Jg("canDereference",s,t.dereference.strategies);if(lf(a))throw new xM(s.uri);try{const{result:p}=yield Yg("dereference",[s,t],a);return n?p.get(0):p}catch(p){throw new Xb(`Error while dereferencing file "${s.uri}"`,{cause:p})}}),Sz=(e,t)=>et(this,null,function*(){const{refSet:r}=t.dereference,n=url.sanitize(e);let s;r!==null&&r.has(n)?{value:s}=r.find(propEq("uri",n)):s=yield parse(e,t);const a=mergeOptions(t,{resolve:{baseURI:n}});return Qb(s,a)}),wz=null,Oz=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t),a=File({uri:url.sanitize(e)});return readFileFn(a,s)}),Ez=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return parseFn(e,s)}),Az=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return resolveFn(e,s)}),Cz=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return resolveApiDOMFn(e,s)}),_z=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return dereferenceFn(e,s)}),wM=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=hM(fM,t);return Qb(e,s)});class OM extends Uu{constructor(t="Not Implemented",r){super(t,r)}}const El=OM,Wf=Oe({props:{name:"",allowEmpty:!0,sourceMap:!1,fileExtensions:[],mediaTypes:[]},init({allowEmpty:e=this.allowEmpty,sourceMap:t=this.sourceMap,fileExtensions:r=this.fileExtensions,mediaTypes:n=this.mediaTypes}={}){this.allowEmpty=e,this.sourceMap=t,this.fileExtensions=r,this.mediaTypes=n},methods:{canParse(){return et(this,null,function*(){throw new El})},parse(){return et(this,null,function*(){throw new El})}}}),EM=Oe(Wf,{props:{name:"binary"},methods:{canParse(e){return et(this,null,function*(){return this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension)})},parse(e){return et(this,null,function*(){try{const t=unescape(encodeURIComponent(e.toString())),r=btoa(t),n=new Ss;if(r.length!==0){const s=new Te.RP(r);s.classes.push("result"),n.push(s)}return n}catch(t){throw new Xi(`Error parsing "${e.uri}"`,{cause:t})}})}}}),AM=Oe({props:{name:null},methods:{canResolve(){return!1},resolve(){return et(this,null,function*(){throw new El})}}});var CM=lr(1,vl(Promise.all,Promise));const _M=CM;class PM extends Uu{}const mm=PM;class TM extends mm{}const Zb=TM;class VM extends Xb{}const Ro=VM;class kM extends mm{}const qb=kM,jM=(e,t)=>et(this,null,function*(){const r=t.resolve.resolvers.map(s=>{const a=Object.create(s);return Object.assign(a,t.resolve.resolverOpts)}),n=yield Jg("canRead",e,r);if(lf(n))throw new qb(e.uri);try{const{result:s}=yield Yg("read",[e],n);return s}catch(s){throw new mm(`Error while reading file "${e.uri}"`,{cause:s})}});function ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function tx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ex(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const IM=(e,t)=>et(this,null,function*(){const r=t.parse.parsers.map(s=>{const a=Object.create(s);return Object.assign(a,t.parse.parserOpts)}),n=yield Jg("canParse",e,r);if(lf(n))throw new qb(e.uri);try{const{plugin:s,result:a}=yield Yg("parse",[e],n);return!s.allowEmpty&&a.isEmpty?Promise.reject(new Xi(`Error while parsing file "${e.uri}". File is empty.`)):a}catch(s){throw new Xi(`Error while parsing file "${e.uri}"`,{cause:s})}}),rx=(e,t)=>et(this,null,function*(){const r=Ol({uri:Uf(ws(e)),mediaType:t.parse.mediaType}),n=yield jM(r,t);return IM(Ol(tx(tx({},r),{},{data:n})),t)}),Xg=jd((e,t)=>{const r=vC({predicate:e,returnOnTrue:pt});return Nn(t,r),S0(void 0,[0],r.result)});class Hf extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}class RM extends Uu{}const FM=RM;class MM extends FM{constructor(t){super(`Invalid JSON Schema $anchor "${t}".`)}}class LM extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}const zf=e=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(e),Aa=e=>{const t=Jb(e);return Eg("#",t)},DM=e=>{if(!zf(e))throw new MM(e);return e},vm=(e,t)=>{const r=DM(e),n=Xg(s=>{var a;return Bu(s)&&((a=s.$anchor)===null||a===void 0?void 0:a.toValue())===r},t);if(_o(n))throw new LM(`Evaluation failed on token: "${r}"`);return n},gm=(e,t)=>{if(typeof t.$ref=="undefined")return;const r=Jb(t.$ref.toValue()),n=t.meta.get("inherited$id").toValue();return`${f((a,p)=>Yi(a,Uf(ws(p))),e,[...n,t.$ref.toValue()])}${r==="#"?"":r}`},NM=(e,t)=>{if(typeof t.$id=="undefined")return;const r=t.meta.get("inherited$id").toValue();return f((n,s)=>Yi(n,Uf(ws(s))),e,[...r,t.$id.toValue()])},Gf=e=>{if(Gf.cache.has(e))return Gf.cache.get(e);const t=jo.refract(e);return Gf.cache.set(e,t),t};Gf.cache=new WeakMap;const Qi=e=>To(e)?Gf(e):e,Qg=(e,t)=>{const r=ws(e),n=Xg(p=>!Bu(p)||typeof p.$id=="undefined"?!1:NM(r,p)===r,t);if(_o(n))throw new Hf(`Evaluation failed on URI: "${e}"`);let s,a;return zf(Aa(e))?(s=vm,a=Aa(e)):(s=Xn,a=Bn(e)),s(a,n)};function nx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ym(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nx(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Zg=Nn[Symbol.for("nodejs.util.promisify.custom")],bm=Oe({props:{indirections:[],namespace:null,reference:null,crawledElements:null,crawlingMap:null,visited:null,options:null},init({reference:e,namespace:t,indirections:r=[],visited:n=new WeakSet,options:s}){this.indirections=r,this.namespace=t,this.reference=e,this.crawledElements=[],this.crawlingMap={},this.visited=n,this.options=s},methods:{toBaseURI(e){return Yi(this.reference.uri,Uf(ws(e)))},toReference(e){return et(this,null,function*(){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Zb(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(Id("uri",t));const n=yield rx(Ei(t),ym(ym({},this.options),{},{parse:ym(ym({},this.options.parse),{},{mediaType:"text/plain"})})),s=$u({uri:t,value:n,depth:this.reference.depth+1});return r.add(s),s})},ReferenceElement(e){var t;if(!this.options.resolve.external&&lm(e))return!1;const r=(t=e.$ref)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r)),this.crawledElements.push(e)},PathItemElement(e){var t;if(!Ct(e.$ref)||!this.options.resolve.external&&am(e))return;const r=(t=e.$ref)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r)),this.crawledElements.push(e)},LinkElement(e){if(!(!Ct(e.operationRef)&&!Ct(e.operationId))&&!(!this.options.resolve.external&&sm(e))){if(Ct(e.operationRef)&&Ct(e.operationId))throw new Error("LinkElement operationRef and operationId are mutually exclusive.");if(sm(e)){var t;const r=(t=e.operationRef)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r))}}},ExampleElement(e){var t;if(!Ct(e.externalValue)||!this.options.resolve.external&&Ct(e.externalValue))return;if(e.hasKey("value")&&Ct(e.externalValue))throw new Error("ExampleElement value and externalValue fields are mutually exclusive.");const r=(t=e.externalValue)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r))},SchemaElement(e){if(this.visited.has(e))return!1;if(!Ct(e.$ref)){this.visited.add(e);return}const t=this.reference.uri,r=gm(t,e),n=ws(r),s=Ol({uri:n}),a=vg(h=>h.canRead(s),this.options.resolve.resolvers),p=!a,d=!a&&this.reference.uri!==n;if(!this.options.resolve.external&&d){this.visited.add(e);return}if(!xl(n,this.crawlingMap))try{a||p?this.crawlingMap[n]=this.reference:this.crawlingMap[n]=this.toReference(Ei(r))}catch(h){if(p&&h instanceof Hf)this.crawlingMap[n]=this.toReference(Ei(r));else throw h}this.crawledElements.push(e)},crawlReferenceElement(e){return et(this,null,function*(){var t;const r=yield this.toReference(e.$ref.toValue());this.indirections.push(e);const n=Bn((t=e.$ref)===null||t===void 0?void 0:t.toValue());let s=Xn(n,r.value.result);if(To(s)){const p=e.meta.get("referenced-element").toValue();xr(s)?(s=Ea.refract(s),s.setMetaProperty("referenced-element",p)):s=this.namespace.getElementClass(p).refract(s)}if(this.indirections.includes(s))throw new Error("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const a=bm({reference:r,namespace:this.namespace,indirections:[...this.indirections],options:this.options});yield Zg(s,a,{keyMap:ai,nodeTypeGetter:Zn}),yield a.crawl(),this.indirections.pop()})},crawlPathItemElement(e){return et(this,null,function*(){var t;const r=yield this.toReference(e.$ref.toValue());this.indirections.push(e);const n=Bn((t=e.$ref)===null||t===void 0?void 0:t.toValue());let s=Xn(n,r.value.result);if(To(s)&&(s=Qs.refract(s)),this.indirections.includes(s))throw new Error("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const a=bm({reference:r,namespace:this.namespace,indirections:[...this.indirections],options:this.options});yield Zg(s,a,{keyMap:ai,nodeTypeGetter:Zn}),yield a.crawl(),this.indirections.pop()})},crawlSchemaElement(e){return et(this,null,function*(){const t=this.reference.uri,r=gm(t,e),n=ws(r),s=Ol({uri:n}),a=vg(y=>y.canRead(s),this.options.resolve.resolvers),p=!a;this.indirections.push(e);let d,h;try{if(a||p)d=this.reference,h=Qg(r,Qi(d.value.result));else{d=yield this.toReference(Ei(r));const y=Bn(r);h=Qi(Xn(y,d.value.result))}}catch(y){if(p&&y instanceof Hf)if(zf(Aa(r))){d=yield this.toReference(Ei(r));const C=Aa(r);h=vm(C,Qi(d.value.result))}else{d=yield this.toReference(Ei(r));const C=Bn(r);h=Qi(Xn(C,d.value.result))}else throw y}if(this.visited.add(e),this.indirections.includes(h))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const g=bm({reference:d,namespace:this.namespace,indirections:[...this.indirections],options:this.options,visited:this.visited});yield Zg(h,g,{keyMap:ai,nodeTypeGetter:Zn}),yield g.crawl(),this.indirections.pop()})},crawl(){return et(this,null,function*(){yield Jr(Pn,_M)(this.crawlingMap),this.crawlingMap=null;for(const e of this.crawledElements)Nu(e)?yield this.crawlReferenceElement(e):Bu(e)?yield this.crawlSchemaElement(e):om(e)&&(yield this.crawlPathItemElement(e))})}}}),BM=bm,$M=Nn[Symbol.for("nodejs.util.promisify.custom")],UM=Oe(AM,{init(){this.name="openapi-3-1"},methods:{canResolve(e){var t;return e.mediaType!=="text/plain"?wl.includes(e.mediaType):Wg((t=e.parseResult)===null||t===void 0?void 0:t.result)},resolve(e,t){return et(this,null,function*(){const r=ku(fm),n=$u({uri:e.uri,value:e.parseResult}),s=BM({reference:n,namespace:r,options:t}),a=hm();return a.add(n),yield $M(a.rootRef.value,s,{keyMap:ai,nodeTypeGetter:Zn}),yield s.crawl(),a})}}}),qg=e=>e.replace(/\s/g,""),ey=e=>e.replace(/\W/gi,"_"),WM=(e,t)=>{const r=ey(qg(t.toLowerCase())),n=ey(qg(e));return`${r}${n}`},HM=(e,t,r)=>{const n=qg(e);return n.length>0?ey(n):WM(t,r)},zM=({operationIdNormalizer:e=HM}={})=>({predicates:t,namespace:r})=>{const n=[],s=[],a=[];return{visitor:{OpenApi3_1Element:{leave(){const p=r1(d=>Yn(d.operationId),s);Object.entries(p).forEach(([d,h])=>{h.length<=1||h.forEach((g,y)=>{const C=`${d}${y+1}`;g.operationId=new r.elements.String(C)})}),a.forEach(d=>{var h;if(typeof d.operationId=="undefined")return;const g=String(Yn(d.operationId)),y=s.find(C=>Yn(C.meta.get("originalOperationId"))===g);typeof y!="undefined"&&(d.operationId=(h=y.operationId)===null||h===void 0?void 0:h.clone(),d.meta.set("originalOperationId",g),d.set("__originalOperationId",g))}),s.length=0,a.length=0}},PathItemElement:{enter(p){const d=bl("path",Yn(p.meta.get("path")));n.push(d)},leave(){n.pop()}},OperationElement:{enter(p){if(typeof p.operationId=="undefined")return;const d=String(Yn(p.operationId)),h=Au(n),g=bl("method",Yn(p.meta.get("http-method"))),y=e(d,h,g);d!==y&&(p.operationId=new r.elements.String(y),p.set("__originalOperationId",d),p.meta.set("originalOperationId",d),s.push(p))}},LinkElement:{leave(p){t.isLinkElement(p)&&typeof p.operationId!="undefined"&&a.push(p)}}}}},GM=()=>({predicates:e})=>{const t=(n,s)=>!e.isParameterElement(n)||!e.isParameterElement(s)||!e.isStringElement(n.name)||!e.isStringElement(n.in)||!e.isStringElement(s.name)||!e.isStringElement(s.in)?!1:Yn(n.name)===Yn(s.name)&&Yn(n.in)===Yn(s.in),r=[];return{visitor:{PathItemElement:{enter(n,s,a,p,d){if(d.some(e.isComponentsElement))return;const{parameters:h}=n;e.isArrayElement(h)?r.push([...h.content]):r.push([])},leave(){r.pop()}},OperationElement:{leave(n){const s=Au(r);if(!Array.isArray(s)||s.length===0)return;const a=S0([],["parameters","content"],n),p=TA(t,[...a,...s]);n.parameters=new Cb(p)}}}}},KM=()=>({predicates:e})=>{let t;return{visitor:{OpenApi3_1Element:{enter(r){e.isArrayElement(r.security)&&(t=r.security)},leave(){t=void 0}},OperationElement:{leave(r,n,s,a,p){if(p.some(e.isComponentsElement))return;if(typeof r.security=="undefined"&&typeof t!="undefined"){var g;r.security=new Pb((g=t)===null||g===void 0?void 0:g.content)}}}}}},JM=()=>({predicates:e})=>{let t;const r=[];return{visitor:{OpenApi3_1Element:{enter(n){if(e.isArrayElement(n.servers)){var s;t=(s=n.servers)===null||s===void 0?void 0:s.content}},leave(){t=void 0}},PathItemElement:{enter(n,s,a,p,d){if(d.some(e.isComponentsElement))return;typeof n.servers=="undefined"&&typeof t!="undefined"&&(n.servers=new Vb(t));const{servers:h}=n;typeof h!="undefined"&&e.isArrayElement(h)?r.push([...h.content]):r.push(void 0)},leave(){r.pop()}},OperationElement:{enter(n){const s=Au(r);typeof s!="undefined"&&(e.isArrayElement(n.servers)||(n.servers=new Tb(s)))}}}}},YM=()=>({predicates:e})=>({visitor:{ParameterElement:{leave(t,r,n,s,a){var p,d;if(!a.some(e.isComponentsElement)&&!(typeof t.schema=="undefined"||!e.isSchemaElement(t.schema))&&!(typeof((p=t.schema)===null||p===void 0?void 0:p.example)=="undefined"&&typeof((d=t.schema)===null||d===void 0?void 0:d.examples)=="undefined")){if(typeof t.examples!="undefined"&&e.isObjectElement(t.examples)){const h=t.examples.map(g=>{var y;return(y=g.value)===null||y===void 0?void 0:y.clone()});typeof t.schema.examples!="undefined"&&t.schema.set("examples",h),typeof t.schema.example!="undefined"&&t.schema.set("example",h);return}typeof t.example!="undefined"&&(typeof t.schema.examples!="undefined"&&t.schema.set("examples",[t.example.clone()]),typeof t.schema.example!="undefined"&&t.schema.set("example",t.example.clone()))}}}}}),XM=()=>({predicates:e})=>({visitor:{HeaderElement:{leave(t,r,n,s,a){var p,d;if(!a.some(e.isComponentsElement)&&!(typeof t.schema=="undefined"||!e.isSchemaElement(t.schema))&&!(typeof((p=t.schema)===null||p===void 0?void 0:p.example)=="undefined"&&typeof((d=t.schema)===null||d===void 0?void 0:d.examples)=="undefined")){if(typeof t.examples!="undefined"&&e.isObjectElement(t.examples)){const h=t.examples.map(g=>{var y;return(y=g.value)===null||y===void 0?void 0:y.clone()});typeof t.schema.examples!="undefined"&&t.schema.set("examples",h),typeof t.schema.example!="undefined"&&t.schema.set("example",h);return}typeof t.example!="undefined"&&(typeof t.schema.examples!="undefined"&&t.schema.set("examples",[t.example.clone()]),typeof t.schema.example!="undefined"&&t.schema.set("example",t.example.clone()))}}}}}),QM=e=>{if(!sr(e)||e.hasKey("$$normalized"))return e;const t=[zM({operationIdNormalizer:(n,s,a)=>ol({operationId:n},s,a,{v2OperationIdCompatibilityMode:!1})}),GM(),KM(),JM(),YM(),XM()],r=hf(e,t,{toolboxCreator:Hb,visitorOptions:{keyMap:ai,nodeTypeGetter:Zn}});return r.set("$$normalized",!0),r},ZM=e=>t=>{if(t!=null&&t.$$normalized)return t;const r=Oa.refract(t),n=e(r);return Yn(n)},ix=QM,qM=Oe({props:{name:null},methods:{canRead(){return!1},read(){return et(this,null,function*(){throw new El})}}}),sx=Oe(qM,{props:{timeout:5e3,redirects:5,withCredentials:!1},init({timeout:e=this.timeout,redirects:t=this.redirects,withCredentials:r=this.withCredentials}={}){this.timeout=e,this.redirects=t,this.withCredentials=r},methods:{canRead(e){return $f(e.uri)},read(){return et(this,null,function*(){throw new El})},getHttpClient(){throw new El}}}).compose({props:{name:"http-swagger-client",swaggerHTTPClient:Ns,swaggerHTTPClientConfig:{}},init(){let{swaggerHTTPClient:e=this.swaggerHTTPClient}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.swaggerHTTPClient=e},methods:{getHttpClient(){return this.swaggerHTTPClient},read(e){return et(this,null,function*(){const t=this.getHttpClient(),r=new AbortController,{signal:n}=r,s=setTimeout(()=>{r.abort()},this.timeout),a=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",p=this.redirects===0?"error":"follow",d=this.redirects>0?this.redirects:void 0;try{return(yield t(H({url:e.uri,signal:n,userFetch:(g,y)=>et(this,null,function*(){const C=yield fetch(g,y);return C.headers.delete("Content-Type"),C}),credentials:a,redirects:p,follow:d},this.swaggerHTTPClientConfig))).text.arrayBuffer()}catch(h){throw new mm(`Error downloading "${e.uri}"`,{cause:h})}finally{clearTimeout(s)}})}}}),ox=Wf.compose({props:{name:"json-swagger-client",fileExtensions:[".json"],mediaTypes:["application/json"]},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return JSON.parse(e.toString()),!0}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Xi("json-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();if(this.allowEmpty&&r.trim()==="")return t;try{const n=Q0(JSON.parse(r));return n.classes.push("result"),t.push(n),t}catch(n){throw new Xi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),ax=Wf.compose({props:{name:"yaml-1-2-swagger-client",fileExtensions:[".yaml",".yml"],mediaTypes:["text/yaml","application/yaml"]},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return cs.load(e.toString(),{schema:Ni}),!0}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Xi("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();try{const n=cs.load(r,{schema:Ni});if(this.allowEmpty&&typeof n=="undefined")return t;const s=Q0(n);return s.classes.push("result"),t.push(s),t}catch(n){throw new Xi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),lx=Wf.compose({props:{name:"openapi-json-3-1-swagger-client",fileExtensions:[".json"],mediaTypes:new zg(...wl.filterByFormat("generic"),...wl.filterByFormat("json")),detectionRegExp:new RegExp('"openapi"\\s*:\\s*"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))"')},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const n=e.toString();return JSON.parse(n),this.detectionRegExp.test(n)}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Xi("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();if(this.allowEmpty&&r.trim()==="")return t;try{const n=JSON.parse(r),s=Oa.refract(n,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(n){throw new Xi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),ux=Wf.compose({props:{name:"openapi-yaml-3-1-swagger-client",fileExtensions:[".yaml",".yml"],mediaTypes:new zg(...wl.filterByFormat("generic"),...wl.filterByFormat("yaml")),detectionRegExp:new RegExp(`(?<YAML>^(["']?)openapi\\2\\s*:\\s*(["']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>"openapi"\\s*:\\s*"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))")`,"m")},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const n=e.toString();return cs.load(n),this.detectionRegExp.test(n)}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Xi("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();try{const n=cs.load(r,{schema:Ni});if(this.allowEmpty&&typeof n=="undefined")return t;const s=Oa.refract(n,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(n){throw new Xi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),e2=Oe({props:{name:null},methods:{canDereference(){return!1},dereference(){return et(this,null,function*(){throw new El})}}});function cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cx(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ty=Nn[Symbol.for("nodejs.util.promisify.custom")],Sm=Oe({props:{indirections:null,namespace:null,reference:null,options:null,ancestors:null},init({indirections:e=[],reference:t,namespace:r,options:n,ancestors:s=[]}){this.indirections=e,this.namespace=r,this.reference=t,this.options=n,this.ancestors=[...s]},methods:{toBaseURI(e){return Yi(this.reference.uri,Uf(ws(e)))},toAncestorLineage(e){const t=new WeakSet(e.flat());return[[...this.ancestors,t],t]},toReference(e){return et(this,null,function*(){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Zb(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(Id("uri",t));const n=yield rx(Ei(t),xm(xm({},this.options),{},{parse:xm(xm({},this.options.parse),{},{mediaType:"text/plain"})})),s=$u({uri:t,value:n,depth:this.reference.depth+1});return r.add(s),s})},ReferenceElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g;const[y,C]=this.toAncestorLineage(s);if(y.some(ye=>ye.has(e))||!this.options.resolve.external&&lm(e))return!1;const M=yield this.toReference((a=e.$ref)===null||a===void 0?void 0:a.toValue()),I=M.uri,B=Yi(I,(p=e.$ref)===null||p===void 0?void 0:p.toValue());this.indirections.push(e);const z=Bn(B);let W=Xn(z,M.value.result);if(To(W)){const ye=e.meta.get("referenced-element").toValue();xr(W)?(W=Ea.refract(W),W.setMetaProperty("referenced-element",ye)):W=this.namespace.getElementClass(ye).refract(W)}if(this.indirections.includes(W))throw new Error("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);C.add(e);const G=Sm({reference:M,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:y});W=yield ty(W,G,{keyMap:ai,nodeTypeGetter:Zn}),C.delete(e),this.indirections.pop(),W=W.clone(),W.setMetaProperty("ref-fields",{$ref:(d=e.$ref)===null||d===void 0?void 0:d.toValue(),description:(h=e.description)===null||h===void 0?void 0:h.toValue(),summary:(g=e.summary)===null||g===void 0?void 0:g.toValue()}),W.setMetaProperty("ref-origin",M.uri);const te=Cu(dm,["description"],e),le=Cu(dm,["summary"],e);return te&&of("description",W)&&(W.description=e.description),le&&of("summary",W)&&(W.summary=e.summary),this.indirections.pop(),W})},PathItemElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d;const[h,g]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(h.some(G=>G.has(e)))return!1;if(!this.options.resolve.external&&am(e))return;const y=yield this.toReference((a=e.$ref)===null||a===void 0?void 0:a.toValue()),C=y.uri,M=Yi(C,(p=e.$ref)===null||p===void 0?void 0:p.toValue());this.indirections.push(e);const I=Bn(M);let B=Xn(I,y.value.result);if(To(B)&&(B=Qs.refract(B)),this.indirections.includes(B))throw new Error("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);g.add(e);const z=Sm({reference:y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:h});B=yield ty(B,z,{keyMap:ai,nodeTypeGetter:Zn}),g.delete(e),this.indirections.pop();const W=new Qs([...B.content],B.meta.clone(),B.attributes.clone());return e.forEach((G,te,le)=>{W.remove(te.toValue()),W.content.push(le)}),W.remove("$ref"),W.setMetaProperty("ref-fields",{$ref:(d=e.$ref)===null||d===void 0?void 0:d.toValue()}),W.setMetaProperty("ref-origin",y.uri),W})},LinkElement(e){return et(this,null,function*(){if(!Ct(e.operationRef)&&!Ct(e.operationId)||!this.options.resolve.external&&sm(e))return;if(Ct(e.operationRef)&&Ct(e.operationId))throw new Error("LinkElement operationRef and operationId fields are mutually exclusive.");let t;if(Ct(e.operationRef)){var r,n,s;const d=Bn((r=e.operationRef)===null||r===void 0?void 0:r.toValue()),h=yield this.toReference((n=e.operationRef)===null||n===void 0?void 0:n.toValue());t=Xn(d,h.value.result),To(t)&&(t=Du.refract(t)),t=new Du([...t.content],t.meta.clone(),t.attributes.clone()),t.setMetaProperty("ref-origin",h.uri),(s=e.operationRef)===null||s===void 0||s.meta.set("operation",t)}else if(Ct(e.operationId)){var a,p;const d=(a=e.operationId)===null||a===void 0?void 0:a.toValue();if(t=Xg(h=>Nb(h)&&h.operationId.equals(d),this.reference.value.result),_o(t))throw new Error(`OperationElement(operationId=${d}) not found.`);(p=e.operationId)===null||p===void 0||p.meta.set("operation",t)}})},ExampleElement(e){return et(this,null,function*(){var t;if(!Ct(e.externalValue)||!this.options.resolve.external&&Ct(e.externalValue))return;if(e.hasKey("value")&&Ct(e.externalValue))throw new Error("ExampleElement value and externalValue fields are mutually exclusive.");const r=yield this.toReference((t=e.externalValue)===null||t===void 0?void 0:t.toValue()),n=new r.value.result.constructor(r.value.result.content,r.value.result.meta.clone(),r.value.result.attributes.clone());n.setMetaProperty("ref-origin",r.uri),e.value=n})},SchemaElement(e,t,r,n,s){return et(this,null,function*(){var a;const[p,d]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(p.some(ye=>ye.has(e)))return!1;let{reference:h}=this,{uri:g}=h;const y=gm(g,e),C=ws(y),M=Ol({uri:C}),I=vg(ye=>ye.canRead(M),this.options.resolve.resolvers),B=!I,z=B&&g!==C;if(!this.options.resolve.external&&z)return;this.indirections.push(e);let W;try{if(I||B)W=Qg(y,Qi(h.value.result));else{h=yield this.toReference(Ei(y));const ye=Bn(y);W=Qi(Xn(ye,h.value.result))}}catch(ye){if(B&&ye instanceof Hf)if(zf(Aa(y))){h=yield this.toReference(Ei(y)),g=h.uri;const he=Aa(y);W=vm(he,Qi(h.value.result))}else{h=yield this.toReference(Ei(y)),g=h.uri;const he=Bn(y);W=Qi(Xn(he,h.value.result))}else throw ye}if(this.indirections.includes(W))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);d.add(e);const G=Sm({reference:h,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:p});if(W=yield ty(W,G,{keyMap:ai,nodeTypeGetter:Zn}),d.delete(e),this.indirections.pop(),Hg(W)){var te;const ye=W.clone();return ye.setMetaProperty("ref-fields",{$ref:(te=e.$ref)===null||te===void 0?void 0:te.toValue()}),ye.setMetaProperty("ref-origin",h.uri),ye}const le=new jo([...W.content],W.meta.clone(),W.attributes.clone());return e.forEach((ye,he,Ee)=>{le.remove(he.toValue()),le.content.push(Ee)}),le.remove("$ref"),le.setMetaProperty("ref-fields",{$ref:(a=e.$ref)===null||a===void 0?void 0:a.toValue()}),le.setMetaProperty("ref-origin",h.uri),le})}}}),ry=Sm,t2=Nn[Symbol.for("nodejs.util.promisify.custom")],fx=Oe(e2,{init(){this.name="openapi-3-1"},methods:{canDereference(e){var t;return e.mediaType!=="text/plain"?wl.includes(e.mediaType):Wg((t=e.parseResult)===null||t===void 0?void 0:t.result)},dereference(e,t){return et(this,null,function*(){const r=ku(fm),n=bl(hm(),t.dereference.refSet);let s;n.has(e.uri)?s=n.find(Id("uri",e.uri)):(s=$u({uri:e.uri,value:e.parseResult}),n.add(s));const a=ry({reference:s,namespace:r,options:t}),p=yield t2(n.rootRef.value,a,{keyMap:ai,nodeTypeGetter:Zn});return t.dereference.refSet===null&&n.clean(),p})}}}),r2=e=>e.slice(2),Os=e=>{const t=r2(e);return t.reduce((r,n,s)=>{if(Vu(n)){const a=String(n.key.toValue());r.push(a)}else if(Ki(t[s-2])){const a=t[s-2].content.indexOf(n);r.push(a)}return r},[])},wm=e=>{if(e.cause==null)return e;let{cause:t}=e;for(;t.cause!=null;)t=t.cause;return t},n2=cu("SchemaRefError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),{wrapError:ny}=Nc,iy=Nn[Symbol.for("nodejs.util.promisify.custom")],Om=ry.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,basePath:null},init(e){let{allowMetaPatches:t=this.allowMetaPatches,useCircularStructures:r=this.useCircularStructures,basePath:n=this.basePath}=e;this.allowMetaPatches=t,this.useCircularStructures=r,this.basePath=n},methods:{ReferenceElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y,C,M;try{const[I,B]=this.toAncestorLineage(s);if(ff(["cycle"],e.$ref)||I.some(me=>me.has(e))||!this.options.resolve.external&&lm(e))return!1;const z=yield this.toReference(e.$ref.toValue()),W=z.uri,G=Yi(W,e.$ref.toValue());this.indirections.push(e);const te=Bn(G);let le=Xn(te,z.value.result);if(To(le)){const me=e.meta.get("referenced-element").toValue();xr(le)?(le=Ea.refract(le),le.setMetaProperty("referenced-element",me)):le=this.namespace.getElementClass(me).refract(le)}if(this.indirections.includes(le))throw new Error("Recursive JSON Pointer detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);B.add(e);const ye=Om({reference:z,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:I,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(le=yield iy(le,ye,{keyMap:ai,nodeTypeGetter:Zn}),B.delete(e),this.indirections.pop(),!this.useCircularStructures&&I.some(ve=>ve.has(le))){if($f(W)||Bf(W)){const ve=new Ea({$ref:G},e.meta.clone(),e.attributes.clone());return ve.get("$ref").classes.push("cycle"),ve}return!1}le=le.clone(),le.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue(),description:(d=e.description)==null?void 0:d.toValue(),summary:(h=e.summary)==null?void 0:h.toValue()}),le.setMetaProperty("ref-origin",z.uri);const he=typeof e.description!="undefined",Ee=typeof e.summary!="undefined";if(he&&"description"in le&&(le.description=e.description),Ee&&"summary"in le&&(le.summary=e.summary),this.allowMetaPatches&&sr(le)){const me=le;if(typeof me.get("$$ref")=="undefined"){const ve=Yi(W,G);me.set("$$ref",ve)}}return le}catch(I){const B=wm(I),z=ny(B,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),pointer:Bn(e.$ref.toValue()),fullPath:(g=this.basePath)!=null?g:[...Os([...s,r,e]),"$ref"]});(M=(C=(y=this.options.dereference.dereferenceOpts)==null?void 0:y.errors)==null?void 0:C.push)==null||M.call(C,z);return}})},PathItemElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y;try{const[C,M]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(ff(["cycle"],e.$ref)||C.some(ye=>ye.has(e)))return!1;if(!this.options.resolve.external&&am(e))return;const I=yield this.toReference(e.$ref.toValue()),B=I.uri,z=Yi(B,e.$ref.toValue());this.indirections.push(e);const W=Bn(z);let G=Xn(W,I.value.result);if(To(G)&&(G=Qs.refract(G)),this.indirections.includes(G))throw new Error("Recursive JSON Pointer detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);M.add(e);const te=Om({reference:I,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:C,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(G=yield iy(G,te,{keyMap:ai,nodeTypeGetter:Zn}),M.delete(e),this.indirections.pop(),!this.useCircularStructures&&C.some(he=>he.has(G))){if($f(B)||Bf(B)){const he=new Qs({$ref:z},e.meta.clone(),e.attributes.clone());return he.get("$ref").classes.push("cycle"),he}return!1}const le=new Qs([...G.content],G.meta.clone(),G.attributes.clone());if(e.forEach((ye,he,Ee)=>{le.remove(he.toValue()),le.content.push(Ee)}),le.remove("$ref"),le.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue()}),le.setMetaProperty("ref-origin",I.uri),this.allowMetaPatches&&typeof le.get("$$ref")=="undefined"){const ye=Yi(B,z);le.set("$$ref",ye)}return le}catch(C){const M=wm(C),I=ny(M,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),pointer:Bn(e.$ref.toValue()),fullPath:(d=this.basePath)!=null?d:[...Os([...s,r,e]),"$ref"]});(y=(g=(h=this.options.dereference.dereferenceOpts)==null?void 0:h.errors)==null?void 0:g.push)==null||y.call(g,I);return}})},SchemaElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y,C;try{const[M,I]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(ff(["cycle"],e.$ref)||M.some(ce=>ce.has(e)))return!1;let{reference:B}=this,{uri:z}=B;const W=gm(z,e),G=ws(W),te=Ol({uri:G}),le=!this.options.resolve.resolvers.some(ce=>ce.canRead(te)),ye=!le,he=ye&&z!==G;if(!this.options.resolve.external&&he)return;this.indirections.push(e);let Ee;try{if(le||ye)Ee=Qg(W,Qi(B.value.result));else{B=yield this.toReference(Ei(W)),z=B.uri;const ce=Bn(W);Ee=Qi(Xn(ce,B.value.result))}}catch(ce){if(ye&&ce instanceof Hf)if(zf(Aa(W))){B=yield this.toReference(Ei(W)),z=B.uri;const Se=Aa(W);Ee=vm(Se,Qi(B.value.result))}else{B=yield this.toReference(Ei(W)),z=B.uri;const Se=Bn(W);Ee=Qi(Xn(Se,B.value.result))}else throw ce}if(this.indirections.includes(Ee))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);I.add(e);const me=Om({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:M,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(Ee=yield iy(Ee,me,{keyMap:ai,nodeTypeGetter:Zn}),I.delete(e),this.indirections.pop(),Hg(Ee)){const ce=Ee.clone();return ce.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue()}),ce.setMetaProperty("ref-origin",z),ce}if(!this.useCircularStructures&&M.some(Se=>Se.has(Ee))){if($f(z)||Bf(z)){const Se=Yi(z,W),Ce=new jo({$ref:Se},e.meta.clone(),e.attributes.clone());return Ce.get("$ref").classes.push("cycle"),Ce}return!1}const ve=new jo([...Ee.content],Ee.meta.clone(),Ee.attributes.clone());if(e.forEach((ce,Se,Ce)=>{ve.remove(Se.toValue()),ve.content.push(Ce)}),ve.remove("$ref"),ve.setMetaProperty("ref-fields",{$ref:(d=e.$ref)==null?void 0:d.toValue()}),ve.setMetaProperty("ref-origin",z),this.allowMetaPatches&&typeof ve.get("$$ref")=="undefined"){const ce=Yi(z,W);ve.set("$$ref",ce)}return ve}catch(M){const I=wm(M),B=new n2(`Could not resolve reference: ${I.message}`,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),fullPath:(h=this.basePath)!=null?h:[...Os([...s,r,e]),"$ref"]},I);(C=(y=(g=this.options.dereference.dereferenceOpts)==null?void 0:g.errors)==null?void 0:y.push)==null||C.call(y,B);return}})},LinkElement(){return et(this,null,function*(){})},ExampleElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g;try{return yield ry.compose.methods.ExampleElement.call(this,e,t,r,n,s)}catch(y){const C=wm(y),M=ny(C,{baseDoc:this.reference.uri,externalValue:(a=e.externalValue)==null?void 0:a.toValue(),fullPath:(p=this.basePath)!=null?p:[...Os([...s,r,e]),"externalValue"]});(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,M);return}})}}}),i2=Om,sy=fx.compose.bind(),s2=sy({init(e){let{parameterMacro:t,options:r}=e;this.parameterMacro=t,this.options=r},props:{parameterMacro:null,options:null,macroOperation:null,OperationElement:{enter(e){this.macroOperation=e},leave(){this.macroOperation=null}},ParameterElement:{leave(e,t,r,n,s){var d,h,g;const a=this.macroOperation===null?null:Yn(this.macroOperation),p=Yn(e);try{const y=this.parameterMacro(a,p);e.set("default",y)}catch(y){const C=new Error(y,{cause:y});C.fullPath=Os([...s,r]),(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,C)}}}}}),o2=sy({init(e){let{modelPropertyMacro:t,options:r}=e;this.modelPropertyMacro=t,this.options=r},props:{modelPropertyMacro:null,options:null,SchemaElement:{leave(e,t,r,n,s){typeof e.properties!="undefined"&&sr(e.properties)&&e.properties.forEach(a=>{var p,d,h;if(sr(a))try{const g=this.modelPropertyMacro(Yn(a));a.set("default",g)}catch(g){const y=new Error(g,{cause:g});y.fullPath=[...Os([...s,r,e]),"properties"],(h=(d=(p=this.options.dereference.dereferenceOpts)==null?void 0:p.errors)==null?void 0:d.push)==null||h.call(d,y)}})}}}});function px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function dx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?px(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Em=e=>{const t=e.meta.clone(),r=e.attributes.clone();return new e.constructor(void 0,t,r)},oy=e=>new Te.c6(e.key,e.value,e.meta.clone(),e.attributes.clone()),Am=(e,t)=>t.clone&&t.isMergeableElement(e)?Wu(Em(e),e,t):e,a2=(e,t)=>{if(typeof t.customMerge!="function")return Wu;const r=t.customMerge(e,t);return typeof r=="function"?r:Wu},l2=(e,t,r)=>e.concat(t)["fantasy-land/map"](n=>Am(n,r)),u2=(e,t,r)=>{const n=sr(e)?Em(e):Em(t);return sr(e)&&e.forEach((s,a,p)=>{const d=oy(p);d.value=Am(s,r),n.content.push(d)}),t.forEach((s,a,p)=>{const d=a.toValue();let h;if(sr(e)&&e.hasKey(d)&&r.isMergeableElement(s)){const g=e.get(d);h=oy(p),h.value=a2(a,r)(g,s)}else h=oy(p),h.value=Am(s,r);n.remove(d),n.content.push(h)}),n};function Wu(e,t,r){var n,s,a;const p={clone:!0,isMergeableElement:C=>sr(C)||Ki(C),arrayElementMerge:l2,objectElementMerge:u2,customMerge:void 0},d=dx(dx({},p),r);d.isMergeableElement=(n=d.isMergeableElement)!==null&&n!==void 0?n:p.isMergeableElement,d.arrayElementMerge=(s=d.arrayElementMerge)!==null&&s!==void 0?s:p.arrayElementMerge,d.objectElementMerge=(a=d.objectElementMerge)!==null&&a!==void 0?a:p.objectElementMerge;const h=Ki(t),g=Ki(e);return h===g?h&&typeof d.arrayElementMerge=="function"?d.arrayElementMerge(e,t,d):d.objectElementMerge(e,t,d):Am(t,d)}Wu.all=(e,t)=>{if(!Array.isArray(e))throw new Error("first argument should be an array");return e.length===0?new Te.Sb:e.reduce((r,n)=>Wu(r,n,t),Em(e[0]))};const c2=sy({init(e){let{options:t}=e;this.options=t},props:{options:null,SchemaElement:{leave(e,t,r,n,s){var d,h,g,y,C,M;if(typeof e.allOf=="undefined")return;if(!Ki(e.allOf)){const I=new TypeError("allOf must be an array");I.fullPath=[...Os([...s,r,e]),"allOf"],(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,I);return}if(e.allOf.isEmpty)return new jo(e.content.filter(I=>I.key.toValue()!=="allOf"),e.meta.clone(),e.attributes.clone());if(!e.allOf.content.every(Bu)){const I=new TypeError("Elements in allOf must be objects");I.fullPath=[...Os([...s,r,e]),"allOf"],(M=(C=(y=this.options.dereference.dereferenceOpts)==null?void 0:y.errors)==null?void 0:C.push)==null||M.call(C,I);return}const p=Wu.all([...e.allOf.content,e]);if(e.hasKey("$$ref")||p.remove("$$ref"),e.hasKey("example")){const I=p.getMember("example");I.value=e.get("example")}if(e.hasKey("examples")){const I=p.getMember("examples");I.value=e.get("examples")}return p.remove("allOf"),p}}}}),f2=Nn[Symbol.for("nodejs.util.promisify.custom")],hx=fx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,parameterMacro:null,modelPropertyMacro:null,mode:"non-strict"},init(){let{useCircularStructures:e=this.useCircularStructures,allowMetaPatches:t=this.allowMetaPatches,parameterMacro:r=this.parameterMacro,modelPropertyMacro:n=this.modelPropertyMacro,mode:s=this.mode}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.name="openapi-3-1-swagger-client",this.useCircularStructures=e,this.allowMetaPatches=t,this.parameterMacro=r,this.modelPropertyMacro=n,this.mode=s},methods:{dereference(e,t){return et(this,null,function*(){var g;const r=[],n=ku(fm),s=(g=t.dereference.refSet)!=null?g:hm();let a;s.has(e.uri)?a=s.find(y=>y.uri===e.uri):(a=$u({uri:e.uri,value:e.parseResult}),s.add(a));const p=i2({reference:a,namespace:n,options:t,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches});if(r.push(p),typeof this.parameterMacro=="function"){const y=s2({parameterMacro:this.parameterMacro,options:t});r.push(y)}if(typeof this.modelPropertyMacro=="function"){const y=o2({modelPropertyMacro:this.modelPropertyMacro,options:t});r.push(y)}if(this.mode!=="strict"){const y=c2({options:t});r.push(y)}const d=$0(r,{nodeTypeGetter:Zn}),h=yield f2(s.rootRef.value,d,{keyMap:ai,nodeTypeGetter:Zn});return t.dereference.refSet===null&&s.clean(),h})}}}),p2=e=>et(this,null,function*(){var I;const{spec:t,timeout:r,redirects:n,requestInterceptor:s,responseInterceptor:a,pathDiscriminator:p=[],allowMetaPatches:d=!1,useCircularStructures:h=!1,skipNormalization:g=!1,parameterMacro:y=null,modelPropertyMacro:C=null,mode:M="non-strict"}=e;try{const B="https://smartbear.com/",z=(I=ru(e))!=null?I:Yb(),W=$f(z)?z:B,G=Oa.refract(t);G.classes.push("result");const te=new Ss([G]),le=GC(p),ye=le===""?"":`#${le}`,he=Xn(le,G),Ee=$u({uri:W,value:te}),me=hm({refs:[Ee]});le!==""&&(me.rootRef=null);const ve=[],ce=yield wM(he,{resolve:{baseURI:`${W}${ye}`,resolvers:[sx({timeout:r||1e4,redirects:n||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:s,responseInterceptor:a}},strategies:[UM()]},parse:{mediaType:wl.latest(),parsers:[lx({allowEmpty:!1,sourceMap:!1}),ux({allowEmpty:!1,sourceMap:!1}),ox({allowEmpty:!1,sourceMap:!1}),ax({allowEmpty:!1,sourceMap:!1}),EM({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[hx({allowMetaPatches:d,useCircularStructures:h,parameterMacro:y,modelPropertyMacro:C,mode:M})],refSet:me,dereferenceOpts:{errors:ve}}}),Se=wC(he,ce,G),Ce=g?Se:ix(Se);return{spec:Yn(Ce),errors:ve}}catch(B){if(B instanceof q0||B instanceof $d)return{spec:null,errors:[]};throw B}}),d2={name:"openapi-3-1-apidom",match(e){let{spec:t}=e;return wo(t)},normalize(e){let{spec:t}=e;return ZM(ix)(t)},resolve(e){return et(this,null,function*(){return p2(e)})}};function mx(e,t,r){if(!e||typeof e!="object"||!e.paths||typeof e.paths!="object")return null;const{paths:n}=e;for(const s in n)for(const a in n[s]){if(a.toUpperCase()==="PARAMETERS")continue;const p=n[s][a];if(!p||typeof p!="object")continue;const d={spec:e,pathName:s,method:a.toUpperCase(),operation:p},h=t(d);if(r&&h)return d}}const h2=()=>null,m2=e=>Array.isArray(e)?e:[e],Cm={mapTagOperations:y2,makeExecute:v2};function v2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t=>{let{pathName:r,method:n,operationId:s}=t;return function(a){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{requestInterceptor:d,responseInterceptor:h,userFetch:g}=e;return e.execute(H({spec:e.spec,requestInterceptor:d,responseInterceptor:h,userFetch:g,pathName:r,method:n,parameters:a,operationId:s},p))}}}function sG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Cm.makeExecute(e),r=Cm.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t}),n={};for(const s in r){n[s]={operations:{}};for(const a in r[s])n[s].operations[a]={execute:r[s][a]}}return{apis:n}}function g2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Cm.makeExecute(e);return{apis:Cm.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}}function y2(e){let{spec:t,cb:r=h2,defaultTag:n="default",v2OperationIdCompatibilityMode:s}=e;const a={},p={};return mx(t,d=>{let{pathName:h,method:g,operation:y}=d;(y.tags?m2(y.tags):[n]).forEach(M=>{if(typeof M!="string")return;p[M]=p[M]||{};const I=p[M],B=ol(y,h,g,{v2OperationIdCompatibilityMode:s}),z=r({spec:t,pathName:h,method:g,operation:y,operationId:B});if(a[B])a[B]+=1,I[`${B}${a[B]}`]=z;else if(typeof I[B]!="undefined"){const W=a[B]||1;a[B]=W+1,I[`${B}${a[B]}`]=z;const G=I[B];delete I[B],I[`${B}${W}`]=G}else I[B]=z})}),p}var b2=c(26179);/*!
85
+ */var Za=new WeakMap,kc=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),ed=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function td(e){return Za.get(e)}function jc(e,t){return e.observers.get(t)}function rd(e,t){e.observers.delete(t.callback)}function qa(e,t){t.unobserve()}function jv(e,t){var r=[],n,s=td(e);if(!s)s=new kc(e),Za.set(e,s);else{var a=jc(s,t);n=a&&a.observer}if(n)return n;if(n={},s.value=Kn(e),t){n.callback=t,n.next=null;var p=function(){sa(n)},d=function(){clearTimeout(n.next),n.next=setTimeout(p)};typeof window!="undefined"&&(window.addEventListener("mouseup",d),window.addEventListener("keyup",d),window.addEventListener("mousedown",d),window.addEventListener("keydown",d),window.addEventListener("change",d))}return n.patches=r,n.object=e,n.unobserve=function(){sa(n),clearTimeout(n.next),rd(s,n),typeof window!="undefined"&&(window.removeEventListener("mouseup",d),window.removeEventListener("keyup",d),window.removeEventListener("mousedown",d),window.removeEventListener("keydown",d),window.removeEventListener("change",d))},s.observers.set(t,new ed(t,n)),n}function sa(e,t){t===void 0&&(t=!1);var r=Za.get(e.object);bi(r.value,e.object,e.patches,"",t),e.patches.length&&Us(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function bi(e,t,r,n,s){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=fs(t),p=fs(e),d=!1,h=!1,g=p.length-1;g>=0;g--){var y=p[g],C=e[y];if(Ni(t,y)&&!(t[y]===void 0&&C!==void 0&&Array.isArray(t)===!1)){var M=t[y];typeof C=="object"&&C!=null&&typeof M=="object"&&M!=null&&Array.isArray(C)===Array.isArray(M)?bi(C,M,r,n+"/"+ps(y),s):C!==M&&(d=!0,s&&r.push({op:"test",path:n+"/"+ps(y),value:Kn(C)}),r.push({op:"replace",path:n+"/"+ps(y),value:Kn(M)}))}else Array.isArray(e)===Array.isArray(t)?(s&&r.push({op:"test",path:n+"/"+ps(y),value:Kn(C)}),r.push({op:"remove",path:n+"/"+ps(y)}),h=!0):(s&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),d=!0)}if(!(!h&&a.length==p.length))for(var g=0;g<a.length;g++){var y=a[g];!Ni(e,y)&&t[y]!==void 0&&r.push({op:"add",path:n+"/"+ps(y),value:Kn(t[y])})}}}function nd(e,t,r){r===void 0&&(r=!1);var n=[];return bi(e,t,n,"",r),n}const i0=Object.assign({},m,w,{JsonPatchError:cn,deepClone:Kn,escapePathComponent:ps,unescapePathComponent:Zp});var id=c(64876),Jn=c.n(id);const it={add:Ws,replace:el,remove:Ic,merge:sd,mergeDeep:Iv,context:Rc,getIn:Rv,applyPatch:xi,parentPathMatch:ad,flatten:oa,fullyNormalizeArray:au,normalizeArray:lu,isPromise:Fv,forEachNew:tl,forEachNewPrimitive:od,isJsonPatch:Fc,isContextPatch:aa,isPatch:la,isMutation:cd,isAdditiveMutation:rl,isGenerator:Mv,isFunction:ud,isObject:Hs,isError:uu};function xi(e,t,r){if(r=r||{},t=H(H({},t),{},{path:t.path&&ds(t.path)}),t.op==="merge"){const n=ua(e,t.path);Object.assign(n,t.value),Us(e,[el(t.path,n)])}else if(t.op==="mergeDeep"){const n=ua(e,t.path),s=Jn()(n,t.value);e=Us(e,[el(t.path,s)]).newDocument}else if(t.op==="add"&&t.path===""&&Hs(t.value)){const n=Object.keys(t.value).reduce((s,a)=>(s.push({op:"add",path:`/${ds(a)}`,value:t.value[a]}),s),[]);Us(e,n)}else if(t.op==="replace"&&t.path===""){let{value:n}=t;r.allowMetaPatches&&t.meta&&rl(t)&&(Array.isArray(t.value)||Hs(t.value))&&(n=H(H({},n),t.meta)),e=n}else if(Us(e,[t]),r.allowMetaPatches&&t.meta&&rl(t)&&(Array.isArray(t.value)||Hs(t.value))){const n=ua(e,t.path),s=H(H({},n),t.meta);Us(e,[el(t.path,s)])}return e}function ds(e){return Array.isArray(e)?e.length<1?"":`/${e.map(t=>(t+"").replace(/~/g,"~0").replace(/\//g,"~1")).join("/")}`:e}function Ws(e,t){return{op:"add",path:e,value:t}}function el(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function Ic(e){return{op:"remove",path:e}}function sd(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function Iv(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function Rc(e,t){return{type:"context",path:e,value:t}}function tl(e,t){try{return su(e,ou,t)}catch(r){return r}}function od(e,t){try{return su(e,Bi,t)}catch(r){return r}}function su(e,t,r){const n=e.filter(rl).map(p=>t(p.value,r,p.path))||[],s=oa(n);return ld(s)}function Bi(e,t,r){return r=r||[],Array.isArray(e)?e.map((n,s)=>Bi(n,t,r.concat(s))):Hs(e)?Object.keys(e).map(n=>Bi(e[n],t,r.concat(n))):t(e,r[r.length-1],r)}function ou(e,t,r){r=r||[];let n=[];if(r.length>0){const s=t(e,r[r.length-1],r);s&&(n=n.concat(s))}if(Array.isArray(e)){const s=e.map((a,p)=>ou(a,t,r.concat(p)));s&&(n=n.concat(s))}else if(Hs(e)){const s=Object.keys(e).map(a=>ou(e[a],t,r.concat(a)));s&&(n=n.concat(s))}return n=oa(n),n}function ad(e,t){if(!Array.isArray(t))return!1;for(let r=0,n=t.length;r<n;r+=1)if(t[r]!==e[r])return!1;return!0}function Rv(e,t){return t.reduce((r,n)=>typeof n!="undefined"&&r?r[n]:r,e)}function au(e){return ld(oa(lu(e)))}function lu(e){return Array.isArray(e)?e:[e]}function oa(e){return[].concat(...e.map(t=>Array.isArray(t)?oa(t):t))}function ld(e){return e.filter(t=>typeof t!="undefined")}function Hs(e){return e&&typeof e=="object"}function Fv(e){return Hs(e)&&ud(e.then)}function ud(e){return e&&typeof e=="function"}function uu(e){return e instanceof Error}function Fc(e){if(la(e)){const{op:t}=e;return t==="add"||t==="remove"||t==="replace"}return!1}function Mv(e){return Object.prototype.toString.call(e)==="[object GeneratorFunction]"}function cd(e){return Fc(e)||la(e)&&e.type==="mutation"}function rl(e){return cd(e)&&(e.op==="add"||e.op==="replace"||e.op==="merge"||e.op==="mergeDeep")}function aa(e){return la(e)&&e.type==="context"}function la(e){return e&&typeof e=="object"}function ua(e,t){try{return Ya(e,t)}catch(r){return console.error(r),{}}}function cu(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];[this.message]=s,t&&t.apply(this,s)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}var Mc=c(87767),fd=c.n(Mc);const Lv=["properties"],pd=["properties"],fn=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],fu=["schema/example","items/example"];function Lc(e){const t=e[e.length-1],r=e[e.length-2],n=e.join("/");return Lv.indexOf(t)>-1&&pd.indexOf(r)===-1||fn.indexOf(n)>-1||fu.some(s=>n.indexOf(s)>-1)}function dd(e,t){let{specmap:r,getBaseUrlForNodePath:n=p=>r.getContext([...t,...p]).baseDoc,targetKeys:s=["$ref","$$ref"]}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=[];return fd()(e).forEach(function(){if(s.includes(this.key)&&typeof this.node=="string"){const d=this.path,h=t.concat(this.path),g=pu(this.node,n(d));a.push(r.replace(h,g))}}),a}function pu(e,t){const[r,n]=e.split("#"),s=de.resolve(r||"",t||"");return n?`${s}#${n}`:s}const ca=/^([a-z]+:\/\/|\/\/)/i,hs=cu("JSONRefError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),$i={},Dc=new WeakMap,hd=[e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="examples",e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="content"&&e[7]==="example",e=>e[0]==="paths"&&e[3]==="responses"&&e[5]==="content"&&e[7]==="examples"&&e[9]==="value",e=>e[0]==="paths"&&e[3]==="requestBody"&&e[4]==="content"&&e[6]==="example",e=>e[0]==="paths"&&e[3]==="requestBody"&&e[4]==="content"&&e[6]==="examples"&&e[8]==="value",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="example",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="example",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="examples"&&e[6]==="value",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="examples"&&e[7]==="value",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="content"&&e[6]==="example",e=>e[0]==="paths"&&e[2]==="parameters"&&e[4]==="content"&&e[6]==="examples"&&e[8]==="value",e=>e[0]==="paths"&&e[3]==="parameters"&&e[4]==="content"&&e[7]==="example",e=>e[0]==="paths"&&e[3]==="parameters"&&e[5]==="content"&&e[7]==="examples"&&e[9]==="value"],fa=e=>hd.some(t=>t(e)),nl=Object.assign({key:"$ref",plugin:(e,t,r,n)=>{const s=n.getInstance(),a=r.slice(0,-1);if(Lc(a)||fa(a))return;const{baseDoc:p}=n.getContext(r);if(typeof e!="string")return new hs("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:p,fullPath:r});const d=yo(e),h=d[0],g=d[1]||"";let y;try{y=p||h?pa(h,p):null}catch(z){return Bc(z,{pointer:g,$ref:e,basePath:y,fullPath:r})}let C,M;if(ha(g,y,a,n)&&!s.useCircularStructures){const z=pu(e,y);return e===z?null:it.replace(r,z)}if(y==null?(M=xo(g),C=n.get(M),typeof C=="undefined"&&(C=new hs(`Could not resolve reference: ${e}`,{pointer:g,$ref:e,baseDoc:p,fullPath:r}))):(C=$c(y,g),C.__value!=null?C=C.__value:C=C.catch(z=>{throw Bc(z,{pointer:g,$ref:e,baseDoc:p,fullPath:r})})),C instanceof Error)return[it.remove(r),C];const I=pu(e,y),B=it.replace(a,C,{$$ref:I});if(y&&y!==p)return[B,it.context(a,{baseDoc:y})];try{if(!sl(n.state,B)||s.useCircularStructures)return B}catch(z){return null}}},{docCache:$i,absoluteify:pa,clearCache:md,JSONRefError:hs,wrapError:Bc,getDoc:Uc,split:yo,extractFromDoc:$c,fetchJSON:il,extract:bo,jsonPointerToArray:xo,unescapeJsonPointerToken:da}),Nc=nl;function pa(e,t){if(!ca.test(e)){if(!t)throw new hs(`Tried to resolve a relative URL, without having a basePath. path: '${e}' basePath: '${t}'`);return de.resolve(t,e)}return e}function Bc(e,t){let r;return e&&e.response&&e.response.body?r=`${e.response.body.code} ${e.response.body.message}`:r=e.message,new hs(`Could not resolve reference: ${r}`,t,e)}function yo(e){return(e+"").split("#")}function $c(e,t){const r=$i[e];if(r&&!it.isPromise(r))try{const n=bo(t,r);return Object.assign(Promise.resolve(n),{__value:n})}catch(n){return Promise.reject(n)}return Uc(e).then(n=>bo(t,n))}function md(e){typeof e!="undefined"?delete $i[e]:Object.keys($i).forEach(t=>{delete $i[t]})}function Uc(e){const t=$i[e];return t?it.isPromise(t)?t:Promise.resolve(t):($i[e]=nl.fetchJSON(e).then(r=>($i[e]=r,r)),$i[e])}function il(e){return fetch(e,{headers:{Accept:na},loadSpec:!0}).then(t=>t.text()).then(t=>cs.load(t))}function bo(e,t){const r=xo(e);if(r.length<1)return t;const n=it.getIn(t,r);if(typeof n=="undefined")throw new hs(`Could not resolve pointer: ${e} does not exist in document`,{pointer:e});return n}function xo(e){if(typeof e!="string")throw new TypeError(`Expected a string, got a ${typeof e}`);return e[0]==="/"&&(e=e.substr(1)),e===""?[]:e.split("/").map(da)}function da(e){return typeof e!="string"?e:new URLSearchParams(`=${e.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function Wc(e){return new URLSearchParams([["",e.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function Nv(e){return e.length===0?"":`/${e.map(Wc).join("/")}`}const vd=e=>!e||e==="/"||e==="#";function Ui(e,t){if(vd(t))return!0;const r=e.charAt(t.length),n=t.slice(-1);return e.indexOf(t)===0&&(!r||r==="/"||r==="#")&&n!=="#"}function ha(e,t,r,n){let s=Dc.get(n);s||(s={},Dc.set(n,s));const a=Nv(r),p=`${t||"<specmap-base>"}#${e}`,d=a.replace(/allOf\/\d+\/?/g,""),h=n.contextTree.get([]).baseDoc;if(t===h&&Ui(d,e))return!0;let g="";if(r.some(C=>(g=`${g}/${Wc(C)}`,s[g]&&s[g].some(M=>Ui(M,p)||Ui(p,M)))))return!0;s[d]=(s[d]||[]).concat(p)}function sl(e,t){const r=[e];return t.path.reduce((s,a)=>(r.push(s[a]),s[a]),e),n(t.value);function n(s){return it.isObject(s)&&(r.indexOf(s)>=0||Object.keys(s).some(a=>n(s[a])))}}const Bv={key:"allOf",plugin:(e,t,r,n,s)=>{if(s.meta&&s.meta.$$ref)return;const a=r.slice(0,-1);if(Lc(a))return;if(!Array.isArray(e)){const g=new TypeError("allOf must be an array");return g.fullPath=r,g}let p=!1,d=s.value;if(a.forEach(g=>{d&&(d=d[g])}),d=H({},d),Object.keys(d).length===0)return;delete d.allOf;const h=[];return h.push(n.replace(a,{})),e.forEach((g,y)=>{if(!n.isObject(g)){if(p)return null;p=!0;const I=new TypeError("Elements in allOf must be objects");return I.fullPath=r,h.push(I)}h.push(n.mergeDeep(a,g));const C=r.slice(0,-1),M=dd(g,C,{getBaseUrlForNodePath:I=>n.getContext([...r,y,...I]).baseDoc,specmap:n});h.push(...M)}),d.example&&h.push(n.remove([].concat(a,"example"))),h.push(n.mergeDeep(a,d)),d.$$ref||h.push(n.remove([].concat(a,"$$ref"))),h}},gd={key:"parameters",plugin:(e,t,r,n)=>{if(Array.isArray(e)&&e.length){const s=Object.assign([],e),a=r.slice(0,-1),p=H({},it.getIn(n.spec,a));for(let d=0;d<e.length;d+=1){const h=e[d];try{s[d].default=n.parameterMacro(p,h)}catch(g){const y=new Error(g);return y.fullPath=r,y}}return it.replace(r,s)}return it.replace(r,e)}},$v={key:"properties",plugin:(e,t,r,n)=>{const s=H({},e);for(const p in e)try{s[p].default=n.modelPropertyMacro(s[p])}catch(d){const h=new Error(d);return h.fullPath=r,h}return it.replace(r,s)}};class Uv{constructor(t){this.root=Hc(t||{})}set(t,r){const n=this.getParent(t,!0);if(!n){tn(this.root,r,null);return}const s=t[t.length-1],{children:a}=n;if(a[s]){tn(a[s],r,n);return}a[s]=Hc(r,n)}get(t){if(t=t||[],t.length<1)return this.root.value;let r=this.root,n,s;for(let a=0;a<t.length&&(s=t[a],n=r.children,!!n[s]);a+=1)r=n[s];return r&&r.protoValue}getParent(t,r){return!t||t.length<1?null:t.length<2?this.root:t.slice(0,-1).reduce((n,s)=>{if(!n)return n;const{children:a}=n;return!a[s]&&r&&(a[s]=Hc(null,n)),a[s]},this.root)}}function Hc(e,t){return tn({children:{}},e,t)}function tn(e,t,r){return e.value=t||{},e.protoValue=r?H(H({},r.protoValue),e.value):e.value,Object.keys(e.children).forEach(n=>{const s=e.children[n];e.children[n]=tn(s,s.value,e)}),e}const zc=100,yd=()=>{};class Wv{static getPluginName(t){return t.pluginName}static getPatchesOfType(t,r){return t.filter(r)}constructor(t){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new Uv,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),it,{getInstance:()=>this}),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(it.isFunction),this.patches.push(it.add([],this.spec)),this.patches.push(it.context([],this.context)),this.updatePatches(this.patches)}debug(t){if(this.debugLevel===t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];console.log(...n)}}verbose(t){if(this.debugLevel==="verbose"){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];console.log(`[${t}] `,...n)}}wrapPlugin(t,r){const{pathDiscriminator:n}=this;let s=null,a;return t[this.pluginProp]?(s=t,a=t[this.pluginProp]):it.isFunction(t)?a=t:it.isObject(t)&&(a=p(t)),Object.assign(a.bind(s),{pluginName:t.name||r,isGenerator:it.isGenerator(a)});function p(d){const h=(g,y)=>Array.isArray(g)?g.every((C,M)=>C===y[M]):!0;return function*(y,C){const M={};for(const B of y.filter(it.isAdditiveMutation))yield*I(B.value,B.path,B);function*I(B,z,W){if(!it.isObject(B))d.key===z[z.length-1]&&(yield d.plugin(B,d.key,z,C));else{const G=z.length-1,te=z[G],le=z.indexOf("properties"),ye=te==="properties"&&G===le,he=C.allowMetaPatches&&M[B.$$ref];for(const Ee of Object.keys(B)){const me=B[Ee],ve=z.concat(Ee),ce=it.isObject(me),Se=B.$$ref;if(he||ce&&(C.allowMetaPatches&&Se&&(M[Se]=!0),yield*I(me,ve,W)),!ye&&Ee===d.key){const Ce=h(n,z);(!n||Ce)&&(yield d.plugin(me,Ee,ve,C,W))}}}}}}}nextPlugin(){return this.wrappedPlugins.find(t=>this.getMutationsForPlugin(t).length>0)}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map(t=>t.value))}getPluginHistory(t){const r=this.constructor.getPluginName(t);return this.pluginHistory[r]||[]}getPluginRunCount(t){return this.getPluginHistory(t).length}getPluginHistoryTip(t){const r=this.getPluginHistory(t);return r&&r[r.length-1]||{}}getPluginMutationIndex(t){const r=this.getPluginHistoryTip(t).mutationIndex;return typeof r!="number"?-1:r}updatePluginHistory(t,r){const n=this.constructor.getPluginName(t);this.pluginHistory[n]=this.pluginHistory[n]||[],this.pluginHistory[n].push(r)}updatePatches(t){it.normalizeArray(t).forEach(r=>{if(r instanceof Error){this.errors.push(r);return}try{if(!it.isObject(r)){this.debug("updatePatches","Got a non-object patch",r);return}if(this.showDebug&&this.allPatches.push(r),it.isPromise(r.value)){this.promisedPatches.push(r),this.promisedPatchThen(r);return}if(it.isContextPatch(r)){this.setContext(r.path,r.value);return}if(it.isMutation(r)){this.updateMutations(r);return}}catch(n){console.error(n),this.errors.push(n)}})}updateMutations(t){typeof t.value=="object"&&!Array.isArray(t.value)&&this.allowMetaPatches&&(t.value=H({},t.value));const r=it.applyPatch(this.state,t,{allowMetaPatches:this.allowMetaPatches});r&&(this.mutations.push(t),this.state=r)}removePromisedPatch(t){const r=this.promisedPatches.indexOf(t);if(r<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}this.promisedPatches.splice(r,1)}promisedPatchThen(t){return t.value=t.value.then(r=>{const n=H(H({},t),{},{value:r});this.removePromisedPatch(t),this.updatePatches(n)}).catch(r=>{this.removePromisedPatch(t),this.updatePatches(r)}),t.value}getMutations(t,r){return t=t||0,typeof r!="number"&&(r=this.mutations.length),this.mutations.slice(t,r)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(t){const r=this.getPluginMutationIndex(t);return this.getMutations(r+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(t){return it.getIn(this.state,t)}_getContext(t){return this.contextTree.get(t)}setContext(t,r){return this.contextTree.set(t,r)}_hasRun(t){return this.getPluginRunCount(this.getCurrentPlugin())>(t||0)}dispatch(){const t=this,r=this.nextPlugin();if(!r){const a=this.nextPromisedPatch();if(a)return a.then(()=>this.dispatch()).catch(()=>this.dispatch());const p={spec:this.state,errors:this.errors};return this.showDebug&&(p.patches=this.allPatches),Promise.resolve(p)}if(t.pluginCount=t.pluginCount||{},t.pluginCount[r]=(t.pluginCount[r]||0)+1,t.pluginCount[r]>zc)return Promise.resolve({spec:t.state,errors:t.errors.concat(new Error(`We've reached a hard limit of ${zc} plugin runs`))});if(r!==this.currentPlugin&&this.promisedPatches.length){const a=this.promisedPatches.map(p=>p.value);return Promise.all(a.map(p=>p.then(yd,yd))).then(()=>this.dispatch())}return n();function n(){t.currentPlugin=r;const a=t.getCurrentMutations(),p=t.mutations.length-1;try{if(r.isGenerator)for(const d of r(a,t.getLib()))s(d);else{const d=r(a,t.getLib());s(d)}}catch(d){console.error(d),s([Object.assign(Object.create(d),{plugin:r})])}finally{t.updatePluginHistory(r,{mutationIndex:p})}return t.dispatch()}function s(a){a&&(a=it.fullyNormalizeArray(a),t.updatePatches(a,r))}}}function Hv(e){return new Wv(e).dispatch()}const zs={refs:Nc,allOf:Bv,parameters:gd,properties:$v},Gc=e=>e.replace(/\W/gi,"_");function Gv(e,t){let{v2OperationIdCompatibilityMode:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r){let n=`${t.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return n=n||`${e.substring(1)}_${t}`,n.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${t.toLowerCase()}${Gc(e)}`}function ol(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:n}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!e||typeof e!="object"?null:(e.operationId||"").replace(/\s/g,"").length?Gc(e.operationId):Gv(t,r,{v2OperationIdCompatibilityMode:n})}function du(e){const{spec:t}=e,{paths:r}=t,n={};if(!r||t.$$normalized)return e;for(const s in r){const a=r[s];if(a==null||!["object","function"].includes(typeof a))continue;const p=a.parameters;for(const d in a){const h=a[d];if(h==null||!["object","function"].includes(typeof h))continue;const g=ol(h,s,d);if(g){n[g]?n[g].push(h):n[g]=[h];const y=n[g];if(y.length>1)y.forEach((C,M)=>{C.__originalOperationId=C.__originalOperationId||C.operationId,C.operationId=`${g}${M+1}`});else if(typeof h.operationId!="undefined"){const C=y[0];C.__originalOperationId=C.__originalOperationId||h.operationId,C.operationId=g}}if(d!=="parameters"){const y=[],C={};for(const M in t)(M==="produces"||M==="consumes"||M==="security")&&(C[M]=t[M],y.push(C));if(p&&(C.parameters=p,y.push(C)),y.length){for(const M of y)for(const I in M)if(!h[I])h[I]=M[I];else if(I==="parameters")for(const B of M[I])h[I].some(W=>W.name&&W.name===B.name||W.$ref&&W.$ref===B.$ref||W.$$ref&&W.$$ref===B.$$ref||W===B)||h[I].push(B)}}}}return t.$$normalized=!0,e}function Wi(e){return et(this,null,function*(){const{spec:t,mode:r,allowMetaPatches:n=!0,pathDiscriminator:s,modelPropertyMacro:a,parameterMacro:p,requestInterceptor:d,responseInterceptor:h,skipNormalization:g,useCircularStructures:y}=e,C=ru(e),M=Pc(e);return I(t);function I(B){C&&(zs.refs.docCache[C]=B),zs.refs.fetchJSON=vo(M,{requestInterceptor:d,responseInterceptor:h});const z=[zs.refs];return typeof p=="function"&&z.push(zs.parameters),typeof a=="function"&&z.push(zs.properties),r!=="strict"&&z.push(zs.allOf),Hv({spec:B,context:{baseDoc:C},plugins:z,allowMetaPatches:n,pathDiscriminator:s,parameterMacro:p,modelPropertyMacro:a,useCircularStructures:y}).then(g?W=>et(this,null,function*(){return W}):du)}})}function al(){zs.refs.clearCache()}const So={name:"generic",match(){return!0},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return Wi(e)})}};function ms(e){return et(this,null,function*(){return Wi(e)})}const Kv=e=>{try{const{swagger:t}=e;return t==="2.0"}catch(t){return!1}},bd=e=>{try{const{openapi:t}=e;return typeof t=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(t)}catch(t){return!1}},wo=e=>{try{const{openapi:t}=e;return typeof t=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(t)}catch(t){return!1}},Jc=e=>bd(e)||wo(e),hu={name:"openapi-2",match(e){let{spec:t}=e;return Kv(t)},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return ms(e)})}};function mu(e){return et(this,null,function*(){return Wi(e)})}const ul={name:"openapi-3-0",match(e){let{spec:t}=e;return bd(t)},normalize(e){let{spec:t}=e;const{spec:r}=du({spec:t});return r},resolve(e){return et(this,null,function*(){return mu(e)})}},Yc=e=>et(this,null,function*(){const{spec:t,requestInterceptor:r,responseInterceptor:n}=e,s=ru(e),a=Pc(e),p=t||(yield vo(a,{requestInterceptor:r,responseInterceptor:n})(s)),d=H(H({},e),{},{spec:p});return e.strategies.find(g=>g.match(d)).resolve(d)}),vu=e=>t=>et(this,null,function*(){const r=H(H({},e),t);return Yc(r)}),Yv=vu({strategies:[ul,hu,So]});var cl=c(13546),ma=c.n(cl);const Xv=function(r,n){return et(this,arguments,function*(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{returnEntireTree:a,baseDoc:p,requestInterceptor:d,responseInterceptor:h,parameterMacro:g,modelPropertyMacro:y,useCircularStructures:C,strategies:M}=s,I={spec:e,pathDiscriminator:t,baseDoc:p,requestInterceptor:d,responseInterceptor:h,parameterMacro:g,modelPropertyMacro:y,useCircularStructures:C,strategies:M},z=M.find(G=>G.match(I)).normalize(I),W=yield Yv(H(H({},I),{},{spec:z,allowMetaPatches:!0,skipNormalization:!0}));return!a&&Array.isArray(t)&&t.length&&(W.spec=ma()(W.spec,t)||null),W})},Xc=e=>function(n,s){return et(this,arguments,function*(t,r){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const p=H(H({},e),a);return Xv(t,r,p)})},Qc=Xc({strategies:[ul,hu,So]});var Te=c(33030);class Qv extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(t){this.attributes.set("code",t)}}const Gs=Qv;class xd extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="comment"}}const fl=xd;var Zv=function(){return!1};const pl=Zv;var Sd=function(){return!0};const Ks=Sd,qv={"@@functional/placeholder":!0};function br(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function qt(e){return function t(r){return arguments.length===0||br(r)?t:e.apply(this,arguments)}}function $e(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return br(r)?t:qt(function(s){return e(r,s)});default:return br(r)&&br(n)?t:br(r)?qt(function(s){return e(s,n)}):br(n)?qt(function(s){return e(r,s)}):e(r,n)}}}const vs=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function dl(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Tr(e,t,r){return function(){if(arguments.length===0)return r();var n=arguments[arguments.length-1];if(!vs(n)){for(var s=0;s<e.length;){if(typeof n[e[s]]=="function")return n[e[s]].apply(n,Array.prototype.slice.call(arguments,0,-1));s+=1}if(dl(n)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(n)}}return r.apply(this,arguments)}}function gs(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Gt={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var eg=function(){function e(t,r){this.xf=r,this.f=t,this.all=!0}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)||(this.all=!1,t=gs(this.xf["@@transducer/step"](t,!1))),t},e}(),tg=$e(function(t,r){return new eg(t,r)}),wd=$e(Tr(["all"],tg,function(t,r){for(var n=0;n<r.length;){if(!t(r[n]))return!1;n+=1}return!0}));const Zc=wd;function gu(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(r){return t.apply(this,arguments)};case 2:return function(r,n){return t.apply(this,arguments)};case 3:return function(r,n,s){return t.apply(this,arguments)};case 4:return function(r,n,s,a){return t.apply(this,arguments)};case 5:return function(r,n,s,a,p){return t.apply(this,arguments)};case 6:return function(r,n,s,a,p,d){return t.apply(this,arguments)};case 7:return function(r,n,s,a,p,d,h){return t.apply(this,arguments)};case 8:return function(r,n,s,a,p,d,h,g){return t.apply(this,arguments)};case 9:return function(r,n,s,a,p,d,h,g,y){return t.apply(this,arguments)};case 10:return function(r,n,s,a,p,d,h,g,y,C){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function hl(e,t,r){return function(){for(var n=[],s=0,a=e,p=0;p<t.length||s<arguments.length;){var d;p<t.length&&(!br(t[p])||s>=arguments.length)?d=t[p]:(d=arguments[s],s+=1),n[p]=d,br(d)||(a-=1),p+=1}return a<=0?r.apply(this,n):gu(a,hl(e,n,r))}}var qc=$e(function(t,r){return t===1?qt(r):gu(t,hl(t,[],r))});const lr=qc;var rg=$e(function(t,r){return r>t?r:t});const yu=rg;function Si(e,t){for(var r=0,n=t.length,s=Array(n);r<n;)s[r]=e(t[r]),r+=1;return s}function ml(e){return Object.prototype.toString.call(e)==="[object String]"}var bu=qt(function(t){return vs(t)?!0:!t||typeof t!="object"||ml(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const xu=bu;var ng=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,r){return this.f(t,r)},e}();function ig(e){return new ng(e)}var wr=$e(function(t,r){return gu(t.length,function(){return t.apply(r,arguments)})});const vl=wr;function ef(e,t,r){for(var n=0,s=r.length;n<s;){if(t=e["@@transducer/step"](t,r[n]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}function va(e,t,r){for(var n=r.next();!n.done;){if(t=e["@@transducer/step"](t,n.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function ii(e,t,r,n){return e["@@transducer/result"](r[n](vl(e["@@transducer/step"],e),t))}var gl=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator";function si(e,t,r){if(typeof e=="function"&&(e=ig(e)),xu(r))return ef(e,t,r);if(typeof r["fantasy-land/reduce"]=="function")return ii(e,t,r,"fantasy-land/reduce");if(r[gl]!=null)return va(e,t,r[gl]());if(typeof r.next=="function")return va(e,t,r);if(typeof r.reduce=="function")return ii(e,t,r,"reduce");throw new TypeError("reduce: list must be array or iterable")}var Od=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,this.f(r))},e}(),Ed=$e(function(t,r){return new Od(t,r)});const Ad=Ed;function _n(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var tf=Object.prototype.toString,sg=function(){return tf.call(arguments)==="[object Arguments]"?function(t){return tf.call(t)==="[object Arguments]"}:function(t){return _n("callee",t)}}();const Su=sg;var Cd=!{toString:null}.propertyIsEnumerable("toString"),ir=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],rf=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),og=function(t,r){for(var n=0;n<t.length;){if(t[n]===r)return!0;n+=1}return!1},ga=qt(typeof Object.keys=="function"&&!rf?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var r,n,s=[],a=rf&&Su(t);for(r in t)_n(r,t)&&(!a||r!=="length")&&(s[s.length]=r);if(Cd)for(n=ir.length-1;n>=0;)r=ir[n],_n(r,t)&&!og(s,r)&&(s[s.length]=r),n-=1;return s});const Hi=ga;var wu=$e(Tr(["fantasy-land/map","map"],Ad,function(t,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return lr(r.length,function(){return t.call(this,r.apply(this,arguments))});case"[object Object]":return si(function(n,s){return n[s]=t(r[s]),n},{},Hi(r));default:return Si(t,r)}}));const Oo=wu,Or=Number.isInteger||function(t){return t<<0===t};var ag=$e(function(t,r){var n=t<0?r.length+t:t;return ml(r)?r.charAt(n):r[n]});const Ou=ag;var lg=$e(function(t,r){if(r!=null)return Or(t)?Ou(t,r):r[t]});const Js=lg;var i=$e(function(t,r){return Oo(Js(t),r)});const o=i;function u(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return br(r)?t:$e(function(a,p){return e(r,a,p)});case 2:return br(r)&&br(n)?t:br(r)?$e(function(a,p){return e(a,n,p)}):br(n)?$e(function(a,p){return e(r,a,p)}):qt(function(a){return e(r,n,a)});default:return br(r)&&br(n)&&br(s)?t:br(r)&&br(n)?$e(function(a,p){return e(a,p,s)}):br(r)&&br(s)?$e(function(a,p){return e(a,n,p)}):br(n)&&br(s)?$e(function(a,p){return e(r,a,p)}):br(r)?qt(function(a){return e(a,n,s)}):br(n)?qt(function(a){return e(r,a,s)}):br(s)?qt(function(a){return e(r,n,a)}):e(r,n,s)}}}var l=u(si);const f=l;var v=qt(function(t){return lr(f(yu,0,o("length",t)),function(){for(var r=0,n=t.length;r<n;){if(!t[r].apply(this,arguments))return!1;r+=1}return!0})});const S=v;var P=qt(function(t){return function(){return t}});const T=P;var D=function(){function e(t,r){this.xf=r,this.f=t,this.any=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.any=!0,t=gs(this.xf["@@transducer/step"](t,!0))),t},e}(),oe=$e(function(t,r){return new D(t,r)}),we=$e(Tr(["any"],oe,function(t,r){for(var n=0;n<r.length;){if(t(r[n]))return!0;n+=1}return!1}));const ge=null;var Ve=qt(function(t){return lr(f(yu,0,o("length",t)),function(){for(var r=0,n=t.length;r<n;){if(t[r].apply(this,arguments))return!0;r+=1}return!1})});const Ie=Ve;function De(e,t){e=e||[],t=t||[];var r,n=e.length,s=t.length,a=[];for(r=0;r<n;)a[a.length]=e[r],r+=1;for(r=0;r<s;)a[a.length]=t[r],r+=1;return a}var Ue=$e(function(t,r){return typeof r["fantasy-land/ap"]=="function"?r["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(r):typeof t=="function"?function(n){return t(n)(r(n))}:si(function(n,s){return De(n,Oo(s,r))},[],t)});const Ge=Ue;function We(e,t){for(var r=0,n=t.length-(e-1),s=new Array(n>=0?n:0);r<n;)s[r]=Array.prototype.slice.call(t,r,r+e),r+=1;return s}var Xe=function(){function e(t,r){this.xf=r,this.pos=0,this.full=!1,this.acc=new Array(t)}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.store(r),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},e.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},e.prototype.getCopy=function(){return De(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},e}(),ct=$e(function(t,r){return new Xe(t,r)}),It=$e(Tr([],ct,We));const mr=null;var Gr=$e(function(t,r){return t.apply(this,r)});const Cr=Gr;var Ln=qt(function(t){for(var r=Hi(t),n=r.length,s=[],a=0;a<n;)s[a]=t[r[a]],a+=1;return s});const Pn=Ln;function Br(e,t){return _isArray(t)?t.map(e):keys(t).reduce(function(r,n){return r[n]=e(t[n]),r},{})}var Dn=null;const pn=null;function $r(e,t,r){if(Or(e)&&vs(r)){var n=[].concat(r);return n[e]=t,n}var s={};for(var a in r)s[a]=r[a];return s[e]=t,s}var Mr=qt(function(t){return t==null});const vr=Mr;var Tn=u(function e(t,r,n){if(t.length===0)return r;var s=t[0];if(t.length>1){var a=!vr(n)&&_n(s,n)?n[s]:Or(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,a)}return $r(s,r,n)});const ya=Tn;var Eo=null;const bn=null;function oi(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var Kr=$e(function(t,r){return t&&r});const nf=Kr;var ys=$e(function(t,r){var n=lr(t,r);return lr(t,function(){return si(Ge,Oo(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Ao=ys;var Co=qt(function(t){return Ao(t.length,t)});const rn=Co;var ba=$e(function(t,r){return oi(t)?function(){return t.apply(this,arguments)&&r.apply(this,arguments)}:rn(nf)(t,r)});const bs=ba;function VO(e){return function t(r){for(var n,s,a,p=[],d=0,h=r.length;d<h;){if(xu(r[d]))for(n=e?t(r[d]):r[d],a=0,s=n.length;a<s;)p[p.length]=n[a],a+=1;else p[p.length]=r[d];d+=1}return p}}function kO(e){return{"@@transducer/value":e,"@@transducer/reduced":!0}}var jO=function(e){return{"@@transducer/init":Gt.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,r){var n=e["@@transducer/step"](t,r);return n["@@transducer/reduced"]?kO(n):n}}},IO=function(t){var r=jO(t);return{"@@transducer/init":Gt.init,"@@transducer/result":function(n){return r["@@transducer/result"](n)},"@@transducer/step":function(n,s){return xu(s)?si(r,n,s):si(r,n,[s])}}};const RO=IO;var FO=$e(function(t,r){return Oo(t,RO(r))}),MO=$e(Tr(["fantasy-land/chain","chain"],FO,function(t,r){return typeof r=="function"?function(n){return t(r(n))(n)}:VO(!1)(Oo(t,r))}));const LO=MO;var B9=null;const $9=null;var DO=qt(function(t){return function(r,n){return t(r,n)?-1:t(n,r)?1:0}});const NO=DO;var BO=qt(function(t){return!t}),$O=rn(BO);const Eu=$O;function UO(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function ug(e,t){return function(){var r=arguments.length;if(r===0)return t();var n=arguments[r-1];return vs(n)||typeof n[e]!="function"?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}var WO=u(ug("slice",function(t,r,n){return Array.prototype.slice.call(n,t,r)}));const yl=WO;var HO=qt(ug("tail",yl(1,1/0)));const o0=HO;function Jr(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return gu(arguments[0].length,f(UO,arguments[0],o0(arguments)))}var zO=qt(function(t){return ml(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});const GO=zO;function KO(){if(arguments.length===0)throw new Error("compose requires at least one argument");return Jr.apply(this,GO(arguments))}var W9=null;const H9=null;var z9=null;const G9=null;function a0(e){for(var t=[],r;!(r=e.next()).done;)t.push(r.value);return t}function _d(e,t,r){for(var n=0,s=r.length;n<s;){if(e(t,r[n]))return!0;n+=1}return!1}function JO(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function YO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const Pd=typeof Object.is=="function"?Object.is:YO;var XO=qt(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});const zi=XO;function l0(e,t,r,n){var s=a0(e),a=a0(t);function p(d,h){return cg(d,h,r.slice(),n.slice())}return!_d(function(d,h){return!_d(p,h,d)},a,s)}function cg(e,t,r,n){if(Pd(e,t))return!0;var s=zi(e);if(s!==zi(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&JO(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Pd(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Pd(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=r.length-1;a>=0;){if(r[a]===e)return n[a]===t;a-=1}switch(s){case"Map":return e.size!==t.size?!1:l0(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size!==t.size?!1:l0(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var p=Hi(e);if(p.length!==Hi(t).length)return!1;var d=r.concat([e]),h=n.concat([t]);for(a=p.length-1;a>=0;){var g=p[a];if(!(_n(g,t)&&cg(t[g],e[g],d,h)))return!1;a-=1}return!0}var QO=$e(function(t,r){return cg(t,r,[],[])});const xs=QO;function ZO(e,t,r){var n,s;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(n=1/t;r<e.length;){if(s=e[r],s===0&&1/s===n)return r;r+=1}return-1}else if(t!==t){for(;r<e.length;){if(s=e[r],typeof s=="number"&&s!==s)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(t===null)return e.indexOf(t,r)}for(;r<e.length;){if(xs(e[r],t))return r;r+=1}return-1}function Td(e,t){return ZO(t,e,0)>=0}function fg(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var sf=function(t){return(t<10?"0":"")+t},qO=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+sf(t.getUTCMonth()+1)+"-"+sf(t.getUTCDate())+"T"+sf(t.getUTCHours())+":"+sf(t.getUTCMinutes())+":"+sf(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const eE=qO;function u0(e){return function(){return!e.apply(this,arguments)}}function tE(e,t){for(var r=0,n=t.length,s=[];r<n;)e(t[r])&&(s[s.length]=t[r]),r+=1;return s}function Vd(e){return Object.prototype.toString.call(e)==="[object Object]"}var rE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):t},e}(),nE=$e(function(t,r){return new rE(t,r)}),iE=$e(Tr(["fantasy-land/filter","filter"],nE,function(e,t){return Vd(t)?si(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},Hi(t)):tE(e,t)}));const c0=iE;var sE=$e(function(t,r){return c0(u0(t),r)});const f0=sE;function p0(e,t){var r=function(p){var d=t.concat([e]);return Td(p,d)?"<Circular>":p0(p,d)},n=function(a,p){return Si(function(d){return fg(d)+": "+r(a[d])},p.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Si(r,e).join(", ")+"))";case"[object Array]":return"["+Si(r,e).concat(n(e,f0(function(a){return/^\d+$/.test(a)},Hi(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):fg(eE(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+r(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+r(e.valueOf())+")":fg(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var s=e.toString();if(s!=="[object Object]")return s}return"{"+n(e,Hi(e)).join(", ")+"}"}}var oE=qt(function(t){return p0(t,[])});const kd=oE;var J9=null;const Y9=null;var X9=null;const Q9=null;var aE=$e(function(t,r){return lr(f(yu,0,o("length",r)),function(){var n=arguments,s=this;return t.apply(s,Si(function(a){return a.apply(s,n)},r))})});const d0=aE;var Z9=null;const q9=null;function h0(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}function m0(e,t,r,n){var s=function(p){for(var d=t.length,h=0;h<d;){if(e===t[h])return r[h];h+=1}t[h]=e,r[h]=p;for(var g in e)e.hasOwnProperty(g)&&(p[g]=n?m0(e[g],t,r,!0):e[g]);return p};switch(zi(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s([]);case"Date":return new Date(e.valueOf());case"RegExp":return h0(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var lE=function(){function e(t,r,n,s){this.valueFn=t,this.valueAcc=r,this.keyFn=n,this.xf=s,this.inputs={}}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){var r;for(r in this.inputs)if(_n(r,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[r]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){var n=this.keyFn(r);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],r),t},e}(),uE=hl(4,[],function(t,r,n,s){return new lE(t,r,n,s)}),cE=hl(4,[],Tr([],uE,function(t,r,n,s){return si(function(a,p){var d=n(p),h=t(_n(d,a)?a[d]:m0(r,[],[],!1),p);return h&&h["@@transducer/reduced"]?gs(a):(a[d]=h,a)},{},s)}));const fE=cE;var t8=null;const r8=null;var pE=qt(function(t){return lr(t.length,t)});const jd=pE;var dE=$e(function(t,r){return r==null||r!==r?t:r});const bl=dE;var hE=function(){function e(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return e.prototype.add=function(t){return!v0(t,!0,this)},e.prototype.has=function(t){return v0(t,!1,this)},e}();function v0(e,t,r){var n=typeof e,s,a;switch(n){case"string":case"number":return e===0&&1/e===-1/0?r._items["-0"]?!0:(t&&(r._items["-0"]=!0),!1):r._nativeSet!==null?t?(s=r._nativeSet.size,r._nativeSet.add(e),a=r._nativeSet.size,a===s):r._nativeSet.has(e):n in r._items?e in r._items[n]?!0:(t&&(r._items[n][e]=!0),!1):(t&&(r._items[n]={},r._items[n][e]=!0),!1);case"boolean":if(n in r._items){var p=e?1:0;return r._items[n][p]?!0:(t&&(r._items[n][p]=!0),!1)}else return t&&(r._items[n]=e?[!1,!0]:[!0,!1]),!1;case"function":return r._nativeSet!==null?t?(s=r._nativeSet.size,r._nativeSet.add(e),a=r._nativeSet.size,a===s):r._nativeSet.has(e):n in r._items?Td(e,r._items[n])?!0:(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1);case"undefined":return r._items[n]?!0:(t&&(r._items[n]=!0),!1);case"object":if(e===null)return r._items.null?!0:(t&&(r._items.null=!0),!1);default:return n=Object.prototype.toString.call(e),n in r._items?Td(e,r._items[n])?!0:(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1)}}const pg=hE;var mE=$e(function(t,r){for(var n=[],s=0,a=t.length,p=r.length,d=new pg,h=0;h<p;h+=1)d.add(r[h]);for(;s<a;)d.add(t[s])&&(n[n.length]=t[s]),s+=1;return n});const vE=mE;function n8(e,t){if(t==null)return t;if(_isInteger(e)&&_isArray(t))return remove(e,1,t);var r={};for(var n in t)r[n]=t[n];return delete r[e],r}function i8(e,t){if(_isInteger(e)&&_isArray(t))return[].concat(t);var r={};for(var n in t)r[n]=t[n];return r}var s8=null;const o8=null;var a8=null;const l8=null;var gE=function(){function e(t,r){this.xf=r,this.n=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,r)},e}(),yE=$e(function(t,r){return new gE(t,r)}),c8=$e(Tr(["drop"],yE,function(t,r){return yl(Math.max(0,t),1/0,r)}));const f8=null;var bE=function(){function e(t,r){this.xf=r,this.n=t,this.i=0}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){this.i+=1;var n=this.n===0?t:this.xf["@@transducer/step"](t,r);return this.n>=0&&this.i>=this.n?gs(n):n},e}(),xE=$e(function(t,r){return new bE(t,r)}),SE=$e(Tr(["take"],xE,function(t,r){return yl(0,t<0?1/0:t,r)}));const g0=SE;function wE(e,t){return g0(e<t.length?t.length-e:0,t)}var OE=function(){function e(t,r){this.xf=r,this.pos=0,this.full=!1,this.acc=new Array(t)}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(r),t},e.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},e}(),EE=$e(function(t,r){return new OE(t,r)}),h8=$e(Tr([],EE,wE));const m8=null;function AE(e,t){for(var r=t.length-1;r>=0&&e(t[r]);)r-=1;return yl(0,r+1,t)}var CE=function(){function e(t,r){this.f=t,this.retained=[],this.xf=r}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.retain(t,r):this.flush(t,r)},e.prototype.flush=function(t,r){return t=si(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,r)},e.prototype.retain=function(t,r){return this.retained.push(r),t},e}(),_E=$e(function(t,r){return new CE(t,r)}),PE=$e(Tr([],_E,AE));const TE=PE;var VE=function(){function e(t,r){this.xf=r,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){var n=!1;return this.seenFirstValue?this.pred(this.lastValue,r)&&(n=!0):this.seenFirstValue=!0,this.lastValue=r,n?t:this.xf["@@transducer/step"](t,r)},e}(),kE=$e(function(t,r){return new VE(t,r)});const y0=kE;var jE=Ou(-1);const Au=jE;var IE=$e(Tr([],y0,function(t,r){var n=[],s=1,a=r.length;if(a!==0)for(n[0]=r[0];s<a;)t(Au(n),r[s])||(n[n.length]=r[s]),s+=1;return n})),y8=qt(Tr([],y0(xs),IE(xs)));const b8=null;var RE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){if(this.f){if(this.f(r))return t;this.f=null}return this.xf["@@transducer/step"](t,r)},e}(),FE=$e(function(t,r){return new RE(t,r)}),ME=$e(Tr(["dropWhile"],FE,function(t,r){for(var n=0,s=r.length;n<s&&t(r[n]);)n+=1;return yl(n,1/0,r)}));const LE=ME;var DE=$e(function(t,r){return t||r});const NE=DE;var BE=$e(function(t,r){return oi(t)?function(){return t.apply(this,arguments)||r.apply(this,arguments)}:rn(NE)(t,r)});const $E=BE;function UE(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var WE=qt(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():vs(t)?[]:ml(t)?"":Vd(t)?{}:Su(t)?function(){return arguments}():UE(t)?t.constructor.from(""):void 0});const HE=WE;var S8=null;const w8=null;var O8=null;const E8=null;var A8=null;const C8=null;var _8=null;const P8=null;var T8=null;const V8=null;var zE=function(){function e(t,r){this.xf=r,this.f=t,this.found=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.found=!0,t=gs(this.xf["@@transducer/step"](t,r))),t},e}(),GE=$e(function(t,r){return new zE(t,r)}),j8=$e(Tr(["find"],GE,function(t,r){for(var n=0,s=r.length;n<s;){if(t(r[n]))return r[n];n+=1}}));const I8=null;var KE=function(){function e(t,r){this.xf=r,this.f=t,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.idx+=1,this.f(r)&&(this.found=!0,t=gs(this.xf["@@transducer/step"](t,this.idx))),t},e}(),JE=$e(function(t,r){return new KE(t,r)}),F8=$e(Tr([],JE,function(t,r){for(var n=0,s=r.length;n<s;){if(t(r[n]))return n;n+=1}return-1}));const M8=null;var YE=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)&&(this.last=r),t},e}(),XE=$e(function(t,r){return new YE(t,r)}),D8=$e(Tr([],XE,function(t,r){for(var n=r.length-1;n>=0;){if(t(r[n]))return r[n];n-=1}}));const N8=null;var QE=function(){function e(t,r){this.xf=r,this.f=t,this.idx=-1,this.lastIdx=-1}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},e.prototype["@@transducer/step"]=function(t,r){return this.idx+=1,this.f(r)&&(this.lastIdx=this.idx),t},e}(),ZE=$e(function(t,r){return new QE(t,r)}),$8=$e(Tr([],ZE,function(t,r){for(var n=r.length-1;n>=0;){if(t(r[n]))return n;n-=1}return-1}));const U8=null;var W8=null;const H8=null;var qE=qt(function(t){return lr(t.length,function(r,n){var s=Array.prototype.slice.call(arguments,0);return s[0]=n,s[1]=r,t.apply(this,s)})});const e1=qE;var z8=null;const G8=null;var K8=null;const J8=null;var t1=$e(ug("groupBy",fE(function(e,t){return e.push(t),e},[])));const r1=t1;var n1=$e(function(t,r){if(t.length===0||vr(r))return!1;for(var n=r,s=0;s<t.length;)if(!vr(n)&&_n(t[s],n))n=n[t[s]],s+=1;else return!1;return!0});const i1=n1;var s1=$e(function(t,r){return i1([t],r)});const xl=s1;var o1=$e(function(t,r){return vr(r)?!1:t in r});const of=o1;var a1=Ou(0);const l1=a1;var u1=$e(Pd);const xa=u1;function af(e){return e}var c1=qt(af);const dg=c1;var f1=u(function(t,r,n){return lr(Math.max(t.length,r.length,n.length),function(){return t.apply(this,arguments)?r.apply(this,arguments):n.apply(this,arguments)})});const hg=f1;var p1=$e(Td);const d1=p1;var Y8=null;const X8=null;var Q8=null;const Z8=null;var h1=yl(0,-1);const m1=h1;var v1=function(){function e(t,r){this.xf=r,this.f=t,this.set=new pg}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.set.add(this.f(r))?this.xf["@@transducer/step"](t,r):t},e}(),g1=$e(function(t,r){return new v1(t,r)}),y1=$e(Tr([],g1,function(e,t){for(var r=new pg,n=[],s=0,a,p;s<t.length;)p=t[s],a=e(p),r.add(a)&&n.push(p),s+=1;return n})),b1=y1(dg);const x1=b1;var t6=null;const r6=null;var n6=null;const i6=null;function S1(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;r<n;){var s=arguments[r];if(s!=null)for(var a in s)_n(a,s)&&(t[a]=s[a]);r+=1}return t}const w1=typeof Object.assign=="function"?Object.assign:S1;var O1=$e(function(t,r){var n={};return n[t]=r,n});const E1=O1;var A1={"@@transducer/init":Array,"@@transducer/step":function(e,t){return e.push(t),e},"@@transducer/result":af},C1={"@@transducer/init":String,"@@transducer/step":function(e,t){return e+t},"@@transducer/result":af},_1={"@@transducer/init":Object,"@@transducer/step":function(e,t){return w1(e,xu(t)?E1(t[0],t[1]):t)},"@@transducer/result":af};function s6(e){if(_isTransformer(e))return e;if(_isArrayLike(e))return A1;if(typeof e=="string")return C1;if(typeof e=="object")return _1;throw new Error("Cannot create transformer for "+e)}var o6=null;const a6=null;var l6=null;const u6=null;var c6=null;const f6=null;var P1=$e(function(t,r){return lr(t+1,function(){var n=arguments[t];if(n!=null&&oi(n[r]))return n[r].apply(n,Array.prototype.slice.call(arguments,0,t));throw new TypeError(kd(n)+' does not have a method named "'+r+'"')})});const mg=P1;var T1=qt(function(t){return t!=null&&xs(t,HE(t))});const lf=T1;var V1=mg(1,"join");const b0=V1;var k1=qt(function(t){return d0(function(){return Array.prototype.slice.call(arguments,0)},t)});const j1=k1;var p6=null;const d6=null;var I1=$e(function(t,r){return function(n){return function(s){return Oo(function(a){return r(a,s)},n(t(s)))}}});const R1=I1;var h6=null;const m6=null;var F1=$e(function(t,r){return t.map(function(n){for(var s=r,a=0,p;a<n.length;){if(s==null)return;p=n[a],s=Or(p)?Ou(p,s):s[p],a+=1}return s})});const M1=F1;var L1=$e(function(t,r){return M1([t],r)[0]});const wi=L1;var v6=null;const g6=null;var y6=null;const b6=null;var D1=$e(function(t,r){return si(function(n,s){return n[s]=t(r[s],s,r),n},{},Hi(r))});const N1=D1;var x6=null;const S6=null;var B1=$e(function(t,r){return Number(t)+Number(r)}),O6=f(B1,0);const E6=null;var A6=null;const C6=null;var _6=null;const P6=null;var T6=null;const V6=null;var $1=u(function(t,r,n){var s={},a;for(a in r)_n(a,r)&&(s[a]=_n(a,n)?t(a,r[a],n[a]):r[a]);for(a in n)_n(a,n)&&!_n(a,s)&&(s[a]=n[a]);return s});const U1=$1;var W1=u(function e(t,r,n){return U1(function(s,a,p){return Vd(a)&&Vd(p)?e(t,a,p):t(s,a,p)},r,n)});const H1=W1;var z1=$e(function(t,r){return H1(function(n,s,a){return a},t,r)});const G1=z1;var k6=null;const j6=null;var I6=null;const R6=null;function F6(e,t,r){if(_isInteger(e)&&_isArray(r)){var n=[].concat(r);return n[e]=t(n[e]),n}var s={};for(var a in r)s[a]=r[a];return s[e]=t(s[e]),s}var M6=null;const L6=null;var D6=null;const N6=null;var K1=$e(function(t,r){return Zc(u0(t),r)});const vg=K1;function B6(e,t){if(t==null||!_isFunction(t.then))throw new TypeError("`"+e+"` expected a Promise, received "+_toString(t,[]))}var $6=null;const U6=null;var x0=function(e){return{value:e,map:function(t){return x0(t(e))}}},J1=u(function(t,r,n){return t(function(s){return x0(r(s))})(n).value});const Y1=J1;var W6=j1([c0,f0]);const H6=null;var z6=null;const G6=null;var X1=u(function(t,r,n){return bl(t,wi(r,n))});const S0=X1;var Q1=u(function(t,r,n){return t(wi(r,n))});const Cu=Q1;var Z1=$e(function(t,r){for(var n={},s=0;s<t.length;)t[s]in r&&(n[t[s]]=r[t[s]]),s+=1;return n});const w0=Z1;var q1=$e(function(t,r){return t*r}),J6=f(q1,1);const Y6=null;var eA=$e(function(t,r){for(var n={},s=0,a=t.length;s<a;){var p=t[s];n[p]=r[p],s+=1}return n});const tA=eA;var rA=$e(function(t,r){return lr(r.length,function(){for(var n=[],s=0;s<r.length;)n.push(r[s].call(this,arguments[s])),s+=1;return t.apply(this,n.concat(Array.prototype.slice.call(arguments,r.length)))})}),Q6=rA(Si,[tA,dg]);const Z6=null;function O0(e,t,r){return function(n){return t(r(e(n)))}}var nA=function(){function e(t,r,n){this.xf=n,this.f=t,this.g=r}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,O0(this.f,this.g,r))},e}(),iA=u(function(t,r,n){return new nA(t,r,n)}),e4=u(Tr(["fantasy-land/promap","promap"],iA,O0));const t4=null;var sA=u(function(t,r,n){return xs(r,Js(t,n))});const Id=sA;var r4=null;const n4=null;var oA=u(function(t,r,n){return bl(t,Js(r,n))});const _u=oA;var aA=u(function(t,r,n){return t(Js(r,n))});const lA=aA;var i4=null;const s4=null;function E0(e){return Object.prototype.toString.call(e)==="[object Number]"}var uA=$e(function(t,r){if(!(E0(t)&&E0(r)))throw new TypeError("Both arguments to range must be numbers");for(var n=[],s=t;s<r;)n.push(s),s+=1;return n});const cA=uA;var o4=null;const a4=null;var fA=qt(gs);const pA=fA;var dA=u(function(t,r,n){return n.replace(t,r)});const Pu=dA;var l4=null;const u4=null;var hA=$e(function(t,r){return Array.prototype.slice.call(r,0).sort(t)});const mA=hA;var vA=mg(1,"split");const gg=vA;var c4=null;const f4=null;var p4=null;const d4=null;var gA=$e(function(e,t){return xs(g0(e.length,t),e)});const A0=gA;var h4=null;const m4=null;var v4=null;const g4=null;var y4=null;const b4=null;var yA=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.xf["@@transducer/step"](t,r):gs(t)},e}(),bA=$e(function(t,r){return new yA(t,r)}),S4=$e(Tr(["takeWhile"],bA,function(t,r){for(var n=0,s=r.length;n<s&&t(r[n]);)n+=1;return yl(0,n,r)}));const w4=null;var xA=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return this.f(r),this.xf["@@transducer/step"](t,r)},e}(),SA=$e(function(t,r){return new xA(t,r)}),E4=$e(Tr([],SA,function(t,r){return t(r),r}));const A4=null;function wA(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var OA=$e(function(t,r){if(!wA(t))throw new TypeError("\u2018test\u2019 requires a value of type RegExp as its first argument; received "+kd(t));return h0(t).test(r)});const Rd=OA;var C4=null;const _4=null;var P4=null;const T4=null;var V4=null;const k4=null;var j4=null;const I4=null;var R4=null;const F4=null;var uf=`
86
+ \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,EA="\u200B",AA=typeof String.prototype.trim=="function",M4=qt(!AA||uf.trim()||!EA.trim()?function(t){var r=new RegExp("^["+uf+"]["+uf+"]*"),n=new RegExp("["+uf+"]["+uf+"]*$");return t.replace(r,"").replace(n,"")}:function(t){return t.trim()});const L4=null;var D4=$e(KO(x1,De));const N4=null;var CA=function(){function e(t,r){this.xf=r,this.pred=t,this.items=[]}return e.prototype["@@transducer/init"]=Gt.init,e.prototype["@@transducer/result"]=Gt.result,e.prototype["@@transducer/step"]=function(t,r){return _d(this.pred,r,this.items)?t:(this.items.push(r),this.xf["@@transducer/step"](t,r))},e}(),_A=$e(function(t,r){return new CA(t,r)}),PA=$e(Tr([],_A,function(e,t){for(var r=0,n=t.length,s=[],a;r<n;)a=t[r],_d(e,a,s)||(s[s.length]=a),r+=1;return s}));const TA=PA;var $4=null;const U4=null;var W4=LO(af);const H4=null;var z4=null;const G4=null;var VA=u(function(t,r,n){return t(n)?r(n):n});const kA=VA;var K4=null;const J4=null;var Y4=null;const X4=null;var jA=T(void 0);const cf=jA;var IA=xs(cf());const _o=IA;class RA extends Te.ON{constructor(t,r,n){super(t,r,n),this.element="parseResult"}get api(){return this.children.filter(t=>t.classes.contains("api")).first}get results(){return this.children.filter(t=>t.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(t=>t.element==="annotation")}get warnings(){return this.children.filter(t=>t.element==="annotation"&&t.classes.contains("warning"))}get errors(){return this.children.filter(t=>t.element==="annotation"&&t.classes.contains("error"))}get isEmpty(){return this.children.reject(t=>t.element==="annotation").isEmpty}replaceResult(t){const{result:r}=this;if(_o(r))return!1;const n=this.content.findIndex(s=>s===r);return n===-1?!1:(this.content[n]=t,!0)}}const Ss=RA;class FA extends Te.ON{constructor(t,r,n){super(t,r,n),this.element="sourceMap"}get positionStart(){return this.children.filter(t=>t.classes.contains("position")).get(0)}get positionEnd(){return this.children.filter(t=>t.classes.contains("position")).get(1)}set position(t){if(t===null)return;const r=new Te.ON([t.start.row,t.start.column,t.start.char]),n=new Te.ON([t.end.row,t.end.column,t.end.char]);r.classes.push("position"),n.classes.push("position"),this.push(r).push(n)}}const Fd=FA;var MA=lr(1,Jr(zi,xa("GeneratorFunction")));const LA=MA;var DA=lr(1,Jr(zi,xa("AsyncFunction")));const NA=DA;var BA=Ie([Jr(zi,xa("Function")),LA,NA]);const Po=BA;var $A=Eu(Po);const UA=$A;var WA=lr(1,Po(Array.isArray)?Array.isArray:Jr(zi,xa("Array")));const C0=WA;var HA=bs(C0,lf);const zA=HA;var GA=lr(3,function(e,t,r){var n=wi(e,r),s=wi(m1(e),r);if(!UA(n)&&!zA(e)){var a=vl(n,s);return Cr(a,t)}});const Tu=GA;var KA=e1(d1);const Md=KA,JA=(e,t)=>typeof(t==null?void 0:t[e])=="function",YA=e=>e!=null&&Object.prototype.hasOwnProperty.call(e,"_storedElement")&&Object.prototype.hasOwnProperty.call(e,"_content"),XA=(e,t)=>{var r;return(t==null||(r=t.primitive)===null||r===void 0?void 0:r.call(t))===e},QA=(e,t)=>{var r,n;return(t==null||(r=t.classes)===null||r===void 0||(n=r.includes)===null||n===void 0?void 0:n.call(r,e))||!1},Sa=(e,t)=>(t==null?void 0:t.element)===e,tt=e=>e({hasMethod:JA,hasBasicElementProps:YA,primitiveEq:XA,isElementType:Sa,hasClass:QA}),Ld=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.W_||e(r)&&t(void 0,r)),Ct=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.RP||e(r)&&t("string",r)),_0=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.VL||e(r)&&t("number",r)),P0=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.zr||e(r)&&t("null",r)),Dd=tt(({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Te.hh||e(r)&&t("boolean",r)),sr=tt(({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Te.Sb||e(n)&&t("object",n)&&r("keys",n)&&r("values",n)&&r("items",n)),Gi=tt(({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Te.ON&&!(n instanceof Te.Sb)||e(n)&&t("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n)),Vu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.c6||e(n)&&t("member",n)&&r(void 0,n)),T0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.EA||e(n)&&t("link",n)&&r(void 0,n)),V0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Te.tK||e(n)&&t("ref",n)&&r(void 0,n)),ZA=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Gs||e(n)&&t("annotation",n)&&r("array",n)),qA=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof fl||e(n)&&t("comment",n)&&r("string",n)),k0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ss||e(n)&&t("parseResult",n)&&r("array",n)),j0=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Fd||e(n)&&t("sourceMap",n)&&r("array",n)),To=e=>Sa("object",e)||Sa("array",e)||Sa("boolean",e)||Sa("number",e)||Sa("string",e)||Sa("null",e)||Sa("member",e),yg=e=>{var t,r;return j0(e==null||(t=e.meta)===null||t===void 0||(r=t.get)===null||r===void 0?void 0:r.call(t,"sourceMap"))},eC=(e,t)=>{if(e.length===0)return!0;const r=t.attributes.get("symbols");return Gi(r)?Zc(Md(r.toValue()),e):!1},ff=(e,t)=>e.length===0?!0:Zc(Md(t.classes.toValue()),e);var tC=xs(null);const bg=tC;var rC=Eu(bg);const I0=rC;function xg(e){return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(e)}var nC=function(t){return xg(t)==="object"};const R0=nC;var iC=lr(1,bs(I0,R0));const sC=iC;var oC=Jr(zi,xa("Object")),aC=Jr(kd,xs(kd(Object))),lC=Cu(bs(Po,aC),["constructor"]),uC=lr(1,function(e){if(!sC(e)||!oC(e))return!1;var t=Object.getPrototypeOf(e);return bg(t)?!0:lC(t)});const pf=uC;class F0 extends Te.lS{constructor(){super(),this.register("annotation",Gs),this.register("comment",fl),this.register("parseResult",Ss),this.register("sourceMap",Fd)}}const cC=new F0,ku=e=>{const t=new F0;return pf(e)&&t.use(e),t},M0=cC;function L0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function fC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const D0=()=>({predicates:fC({},b),namespace:M0});var N0=c(34961);function pC(e,t){if(e==null)return{};var r={},n=K(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(N0(t).call(t,s)>=0)&&(r[s]=e[s]);return r}function df(e,t){if(e==null)return{};var r=pC(e,t),n,s;if(ie){var a=ie(e);for(s=0;s<a.length;s++)n=a[s],!(N0(t).call(t,n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Oe=c(56182),dC=lr(1,Jr(zi,xa("String")));const Sl=dC,Sg=(e,t,r)=>{const n=e[t];if(n!=null){if(!r&&typeof n=="function")return n;const s=r?n.leave:n.enter;if(typeof s=="function")return s}else{const s=r?e.leave:e.enter;if(s!=null){if(typeof s=="function")return s;const a=s[t];if(typeof a=="function")return a}}return null},pt={},Nd=e=>e==null?void 0:e.type,B0=e=>typeof Nd(e)=="string",$0=(e,{visitFnGetter:t=Sg,nodeTypeGetter:r=Nd}={})=>{const n=new Array(e.length);return{enter(s,...a){for(let p=0;p<e.length;p+=1)if(n[p]==null){const d=t(e[p],r(s),!1);if(typeof d=="function"){const h=d.call(e[p],s,...a);if(h===!1)n[p]=s;else if(h===pt)n[p]=pt;else if(h!==void 0)return h}}},leave(s,...a){for(let p=0;p<e.length;p+=1)if(n[p]==null){const d=t(e[p],r(s),!0);if(typeof d=="function"){const h=d.call(e[p],s,...a);if(h===pt)n[p]=pt;else if(h!==void 0&&h!==!1)return h}}else n[p]===s&&(n[p]=null)}}},wg=(e,t,{keyMap:r=null,state:n={},breakSymbol:s=pt,deleteNodeSymbol:a=null,skipVisitingNodeSymbol:p=!1,visitFnGetter:d=Sg,nodeTypeGetter:h=Nd,nodePredicate:g=B0,detectCycles:y=!0}={})=>{const C=r||{};let M,I=Array.isArray(e),B=[e],z=-1,W,G=[];const te=[],le=[];let ye=e;do{z+=1;const he=z===B.length;let Ee,me;const ve=he&&G.length!==0;if(he){if(Ee=le.length===0?void 0:te.pop(),me=W,W=le.pop(),ve){I?me=me.slice():me=Object.create(Object.getPrototypeOf(me),Object.getOwnPropertyDescriptors(me));let Se=0;for(let Ce=0;Ce<G.length;Ce+=1){let Me=G[Ce][0];const Qe=G[Ce][1];I&&(Me-=Se),I&&Qe===a?(me.splice(Me,1),Se+=1):me[Me]=Qe}}z=M.index,B=M.keys,G=M.edits,I=M.inArray,M=M.prev}else{if(Ee=W?I?z:B[z]:void 0,me=W?W[Ee]:ye,me===a||me===void 0)continue;W&&te.push(Ee)}if(le.includes(me))continue;let ce;if(!Array.isArray(me)){if(!g(me))throw new Error(`Invalid AST Node: ${JSON.stringify(me)}`);if(y&&le.includes(me)){te.pop();continue}const Se=d(t,h(me),he);if(Se){for(const[Ce,Me]of Object.entries(n))t[Ce]=Me;if(ce=Se.call(t,me,Ee,W,te,le),ce===s)break;if(ce===p){if(!he){te.pop();continue}}else if(ce!==void 0&&(G.push([Ee,ce]),!he))if(g(ce))me=ce;else{te.pop();continue}}}ce===void 0&&ve&&G.push([Ee,me]),he||(M={inArray:I,index:z,keys:B,edits:G,prev:M},I=Array.isArray(me),B=I?me:C[h(me)]||[],z=-1,G=[],W&&le.push(W),W=me)}while(M!==void 0);return G.length!==0&&([,ye]=G[G.length-1]),ye};wg[Symbol.for("nodejs.util.promisify.custom")]=(C,M,...I)=>et(this,[C,M,...I],function*(e,t,{keyMap:r=null,state:n={},breakSymbol:s=pt,deleteNodeSymbol:a=null,skipVisitingNodeSymbol:p=!1,visitFnGetter:d=Sg,nodeTypeGetter:h=Nd,nodePredicate:g=B0,detectCycles:y=!0}={}){const B=r||{};let z,W=Array.isArray(e),G=[e],te=-1,le,ye=[];const he=[],Ee=[];let me=e;do{te+=1;const ve=te===G.length;let ce,Se;const Ce=ve&&ye.length!==0;if(ve){if(ce=Ee.length===0?void 0:he.pop(),Se=le,le=Ee.pop(),Ce){W?Se=Se.slice():Se=Object.create(Object.getPrototypeOf(Se),Object.getOwnPropertyDescriptors(Se));let Qe=0;for(let wt=0;wt<ye.length;wt+=1){let ft=ye[wt][0];const Ar=ye[wt][1];W&&(ft-=Qe),W&&Ar===a?(Se.splice(ft,1),Qe+=1):Se[ft]=Ar}}te=z.index,G=z.keys,ye=z.edits,W=z.inArray,z=z.prev}else{if(ce=le?W?te:G[te]:void 0,Se=le?le[ce]:me,Se===a||Se===void 0)continue;le&&he.push(ce)}let Me;if(!Array.isArray(Se)){if(!g(Se))throw new Error(`Invalid AST Node: ${JSON.stringify(Se)}`);if(y&&Ee.includes(Se)){he.pop();continue}const Qe=d(t,h(Se),ve);if(Qe){for(const[wt,ft]of Object.entries(n))t[wt]=ft;if(Me=yield Qe.call(t,Se,ce,le,he,Ee),Me===s)break;if(Me===p){if(!ve){he.pop();continue}}else if(Me!==void 0&&(ye.push([ce,Me]),!ve))if(g(Me))Se=Me;else{he.pop();continue}}}Me===void 0&&Ce&&ye.push([ce,Se]),ve||(z={inArray:W,index:te,keys:G,edits:ye,prev:z},W=Array.isArray(Se),G=W?Se:B[h(Se)]||[],te=-1,ye=[],le&&Ee.push(le),le=Se)}while(z!==void 0);return ye.length!==0&&([,me]=ye[ye.length-1]),me});const hC=["keyMap"],mC=["keyMap"];function U0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function W0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ju=e=>sr(e)?"ObjectElement":Gi(e)?"ArrayElement":Vu(e)?"MemberElement":Ct(e)?"StringElement":Dd(e)?"BooleanElement":_0(e)?"NumberElement":P0(e)?"NullElement":T0(e)?"LinkElement":V0(e)?"RefElement":void 0,H0=lr(1,Jr(ju,Sl)),Iu={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]},vC=Oe({props:{result:[],predicate:pl,returnOnTrue:void 0,returnOnFalse:void 0},init({predicate:e=this.predicate,returnOnTrue:t=this.returnOnTrue,returnOnFalse:r=this.returnOnFalse}={}){this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=r},methods:{enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}}),Nn=(e,t,r={})=>{let{keyMap:n=Iu}=r,s=df(r,hC);return wg(e,t,W0({keyMap:n,nodeTypeGetter:ju,nodePredicate:H0},s))};Nn[Symbol.for("nodejs.util.promisify.custom")]=(n,s,...a)=>et(this,[n,s,...a],function*(e,t,r={}){let{keyMap:p=Iu}=r,d=df(r,mC);return wg[Symbol.for("nodejs.util.promisify.custom")](e,t,W0({keyMap:p,nodeTypeGetter:ju,nodePredicate:H0},d))});const hf=(e,t,r={})=>{if(t.length===0)return e;const n=_u(D0,"toolboxCreator",r),s=_u({},"visitorOptions",r),a=_u(ju,"nodeTypeGetter",s),p=n(),d=t.map(y=>y(p)),h=$0(d.map(_u({},"visitor")),{nodeTypeGetter:a});d.forEach(Tu(["pre"],[]));const g=Nn(e,h,s);return d.forEach(Tu(["post"],[])),g};function z0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function G0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const gC=(e,{Type:t,plugins:r=[]})=>{const n=new t(e);return hf(n,r,{toolboxCreator:D0,visitorOptions:{nodeTypeGetter:ju}})},Ki=e=>(t,r={})=>gC(t,G0(G0({},r),{},{Type:e})),q4=null;Te.Sb.refract=Ki(Te.Sb),Te.ON.refract=Ki(Te.ON),Te.RP.refract=Ki(Te.RP),Te.hh.refract=Ki(Te.hh),Te.zr.refract=Ki(Te.zr),Te.VL.refract=Ki(Te.VL),Te.EA.refract=Ki(Te.EA),Te.tK.refract=Ki(Te.tK),Gs.refract=Ki(Gs),fl.refract=Ki(fl),Ss.refract=Ki(Ss),Fd.refract=Ki(Fd);const Bd=(e,t=new WeakMap)=>(Vu(e)?(t.set(e.key,e),Bd(e.key,t),t.set(e.value,e),Bd(e.value,t)):e.children.forEach(r=>{t.set(r,e),Bd(r,t)}),t),yC=(e,t,r)=>{const n=r.get(e);Vu(n)&&(n.key===e&&(n.key=t,r.delete(e),r.set(t,n)),n.value===e&&(n.value=t,r.delete(e),r.set(t,n)))},bC=(e,t,r)=>{const n=r.get(e);sr(n)&&(n.content=n.map((s,a,p)=>p===e?(r.delete(e),r.set(t,n),t):p))},xC=(e,t,r)=>{const n=r.get(e);Gi(n)&&(n.content=n.map(s=>s===e?(r.delete(e),r.set(t,n),t):s))},SC=Oe.init(function({element:t}){let r;this.transclude=function(s,a){var p;if(s===t)return a;if(s===a)return t;r=(p=r)!==null&&p!==void 0?p:Bd(t);const d=r.get(s);if(!_o(d))return sr(d)?bC(s,a,r):Gi(d)?xC(s,a,r):Vu(d)&&yC(s,a,r),t}}),wC=(e,t,r)=>SC({element:r}).transclude(e,t),tB=null,OC=["keyMap"],EC=["keyMap"];function K0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const J0=e=>typeof(e==null?void 0:e.type)=="string"?e.type:ju(e),Y0=Og({EphemeralObject:["content"],EphemeralArray:["content"]},Iu),X0=(e,t,r={})=>{let{keyMap:n=Y0}=r,s=df(r,OC);return Nn(e,t,Og({keyMap:n,nodeTypeGetter:J0,nodePredicate:Ks,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node")},s))};X0[Symbol.for("nodejs.util.promisify.custom")]=(r,...n)=>et(this,[r,...n],function*(e,t={}){let{keyMap:s=Y0}=t,a=df(t,EC);return Nn[Symbol.for("nodejs.util.promisify.custom")](e,visitor,Og({keyMap:s,nodeTypeGetter:J0,nodePredicate:Ks,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node")},a))});class AC{constructor(t){X(this,"type","EphemeralArray"),X(this,"content",[]),X(this,"reference",void 0),this.content=t,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}const CC=AC;class _C{constructor(t){X(this,"type","EphemeralObject"),X(this,"content",[]),X(this,"reference",void 0),this.content=t,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const PC=_C,TC=Oe.init(function(){const t=new WeakMap;this.BooleanElement=function(n){return n.toValue()},this.NumberElement=function(n){return n.toValue()},this.StringElement=function(n){return n.toValue()},this.NullElement=function(){return null},this.ObjectElement={enter(r){if(t.has(r))return t.get(r).toReference();const n=new PC(r.content);return t.set(r,n),n}},this.EphemeralObject={leave(r){return r.toObject()}},this.MemberElement={enter(r){return[r.key,r.value]}},this.ArrayElement={enter(r){if(t.has(r))return t.get(r).toReference();const n=new CC(r.content);return t.set(r,n),n}},this.EphemeralArray={leave(r){return r.toArray()}}}),VC=e=>X0(e,TC()),Q0=(e,t=M0)=>{if(Sl(e))try{return t.fromRefract(JSON.parse(e))}catch(r){}return pf(e)&&xl("element",e)?t.fromRefract(e):t.toElement(e)},Yn=VC,nB=null,iB=null,kC=(e,t=defaultNamespaceInstance)=>t.toRefract(e),sB=(e,t=defaultNamespaceInstance)=>{const r=kC(e,t);return JSON.stringify(r)};var jC=xs("");const Z0=jC;var IC=lr(1,Jr(zi,xa("Number"))),RC=bs(IC,isFinite),FC=lr(1,RC),MC=Po(Number.isFinite)?lr(1,vl(Number.isFinite,Number)):FC,LC=bs(MC,d0(xs,[Math.floor,dg])),DC=lr(1,LC),NC=Po(Number.isInteger)?lr(1,vl(Number.isInteger,Number)):DC;const BC=NC;var $C=jd(function(e,t){return Jr(gg(""),LE(Md(e)),b0(""))(t)});const Eg=$C;class q0 extends Error{constructor(t){super(`Invalid $ref pointer "${t}". Pointers must begin with "/"`),this.name=this.constructor.name,this.message=`Invalid $ref pointer "${t}". Pointers must begin with "/"`,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(`Invalid $ref pointer "${t}". Pointers must begin with "/"`).stack}}class $d extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}const UC=e=>{try{return decodeURIComponent(e)}catch(t){return e}},WC=Jr(Pu(/~/g,"~0"),Pu(/\//g,"~1"),encodeURIComponent),HC=Jr(Pu(/~1/g,"/"),Pu(/~0/g,"~"),UC),zC=e=>{if(Z0(e))return[];if(!A0("/",e))throw new q0(e);const t=Jr(gg("/"),Oo(HC))(e);return o0(t)},GC=e=>e.length===0?"":`/${e.map(WC).join("/")}`,Xn=(e,t)=>zC(e).reduce((n,s)=>{if(sr(n)){if(!n.hasKey(s))throw new $d(`Evaluation failed on token: "${s}"`);return n.get(s)}if(Gi(n)){if(!(s in n.content)||!BC(Number(s)))throw new $d(`Evaluation failed on token: "${s}"`);return n.get(Number(s))}throw new $d(`Evaluation failed on token: "${s}"`)},t),KC=e=>{const t=e.indexOf("#");return t!==-1?e.substring(t):"#"},Bn=e=>{const t=KC(e);return Eg("#",t)};class JC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="callback"}}const mf=JC;class YC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="components"}get schemas(){return this.get("schemas")}set schemas(t){this.set("schemas",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get requestBodies(){return this.get("requestBodies")}set requestBodies(t){this.set("requestBodies",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(t){this.set("securitySchemes",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}}const vf=YC;class XC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="contact"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}get email(){return this.get("email")}set email(t){this.set("email",t)}}const gf=XC;class QC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(t){this.set("propertyName",t)}get mapping(){return this.get("mapping")}set mapping(t){this.set("mapping",t)}}const Ud=QC;class ZC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(t){this.set("contentType",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(t){this.set("allowedReserved",t)}}const Wd=ZC;class qC extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="example"}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get value(){return this.get("value")}set value(t){this.set("value",t)}get externalValue(){return this.get("externalValue")}set externalValue(t){this.set("externalValue",t)}}const yf=qC;class e_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="externalDocumentation"}get description(){return this.get("description")}set description(t){this.set("description",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}}const bf=e_;class eb extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}}Object.defineProperty(eb.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});const xf=eb;class t_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get termsOfService(){return this.get("termsOfService")}set termsOfService(t){this.set("termsOfService",t)}get contact(){return this.get("contact")}set contact(t){this.set("contact",t)}get license(){return this.get("license")}set license(t){this.set("license",t)}get version(){return this.get("version")}set version(t){this.set("version",t)}}const Sf=t_;class r_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="license"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}}const wf=r_;class n_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(t){this.set("operationRef",t)}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get operation(){if(Ct(this.operationRef)){var t;return(t=this.operationRef)===null||t===void 0?void 0:t.meta.get("operation")}if(Ct(this.operationId)){var r;return(r=this.operationId)===null||r===void 0?void 0:r.meta.get("operation")}}set operation(t){this.set("operation",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get server(){return this.get("server")}set server(t){this.set("server",t)}}const Of=n_;class i_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="mediaType"}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get encoding(){return this.get("encoding")}set encoding(t){this.set("encoding",t)}}const Ef=i_;class s_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(t){this.set("authorizationUrl",t)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(t){this.set("tokenUrl",t)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(t){this.set("refreshUrl",t)}get scopes(){return this.get("scopes")}set scopes(t){this.set("scopes",t)}}const Hd=s_;class o_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(t){this.set("implicit",t)}get password(){return this.get("password")}set password(t){this.set("password",t)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(t){this.set("clientCredentials",t)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(t){this.set("authorizationCode",t)}}const zd=o_;class a_ extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}}const Af=a_;class l_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(t){this.set("openapi",t)}get info(){return this.get("info")}set info(t){this.set("info",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get paths(){return this.get("paths")}set paths(t){this.set("paths",t)}get components(){return this.get("components")}set components(t){this.set("components",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}}const Gd=l_;class u_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="operation"}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}set externalDocs(t){this.set("externalDocs",t)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get servers(){return this.get("severs")}set servers(t){this.set("servers",t)}}const Cf=u_;class tb extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="parameter"}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Te.hh(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}}Object.defineProperty(tb.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});const _f=tb;class c_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}}const Pf=c_;class f_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="paths"}}const Tf=f_;class p_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}}const Vf=p_;class d_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="requestBody"}get description(){return this.get("description")}set description(t){this.set("description",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get required(){return this.hasKey("required")?this.get("required"):new Te.hh(!1)}set required(t){this.set("required",t)}}const kf=d_;class h_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="response"}get description(){return this.get("description")}set description(t){this.set("description",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}}const jf=h_;class m_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="responses"}get default(){return this.get("default")}set default(t){this.set("default",t)}}const If=m_;class v_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(t){this.set("id",t)}get $schema(){return this.get("$schema")}set $schema(t){this.set("idProp",t)}get multipleOf(){return this.get("multipleOf")}set multipleOf(t){this.set("multipleOf",t)}get maximum(){return this.get("maximum")}set maximum(t){this.set("maximum",t)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(t){this.set("exclusiveMaximum",t)}get minimum(){return this.get("minimum")}set minimum(t){this.set("minimum",t)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(t){this.set("exclusiveMinimum",t)}get maxLength(){return this.get("maxLength")}set maxLength(t){this.set("maxLength",t)}get minLength(){return this.get("minLength")}set minLength(t){this.set("minLength",t)}get pattern(){return this.get("pattern")}set pattern(t){this.set("pattern",t)}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get maxItems(){return this.get("maxItems")}set maxItems(t){this.set("maxItems",t)}get minItems(){return this.get("minItems")}set minItems(t){this.set("minItems",t)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(t){this.set("uniqueItems",t)}get maxProperties(){return this.get("maxProperties")}set maxProperties(t){this.set("maxProperties",t)}get minProperties(){return this.get("minProperties")}set minProperties(t){this.set("minProperties",t)}get required(){return this.get("required")}set required(t){this.set("required",t)}get properties(){return this.get("properties")}set properties(t){this.set("properties",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get patternProperties(){return this.get("patternProperties")}set patternProperties(t){this.set("patternProperties",t)}get dependencies(){return this.get("dependencies")}set dependencies(t){this.set("dependencies",t)}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get allOf(){return this.get("allOf")}set allOf(t){this.set("allOf",t)}get anyOf(){return this.get("anyOf")}set anyOf(t){this.set("anyOf",t)}get oneOf(){return this.get("oneOf")}set oneOf(t){this.set("oneOf",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get definitions(){return this.get("definitions")}set definitions(t){this.set("definitions",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get format(){return this.get("format")}set format(t){this.set("format",t)}get base(){return this.get("base")}set base(t){this.set("base",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get media(){return this.get("media")}set media(t){this.set("media",t)}get readOnly(){return this.get("readOnly")}set readOnly(t){this.set("readOnly",t)}}const Rf=v_;class g_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}}const Kd=g_;class y_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(t){this.set("binaryEncoding",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}}const Jd=y_;class b_ extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="linkDescription"}get href(){return this.get("href")}set href(t){this.set("href",t)}get rel(){return this.get("rel")}set rel(t){this.set("rel",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get targetSchema(){return this.get("targetSchema")}set targetSchema(t){this.set("targetSchema",t)}get mediaType(){return this.get("mediaType")}set mediaType(t){this.set("mediaType",t)}get method(){return this.get("method")}set method(t){this.set("method",t)}get encType(){return this.get("encType")}set encType(t){this.set("encType",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Yd=b_,Xd=(e,t)=>{const r=bl(e,t);return N1(n=>{if(pf(n)&&xl("$ref",n)&&lA(Sl,"$ref",n)){const s=wi(["$ref"],n),a=Eg("#/",s);return wi(a.split("/"),r)}return pf(n)?Xd(n,r):n},e)},rb=Oe({props:{element:null},methods:{copyMetaAndAttributes(e,t){yg(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))}}}),Pt=Oe(rb,{methods:{enter(e){return this.element=e.clone(),pt}}});var x_=T(cf());const Ru=x_;function nb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function S_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ib=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},sb=S_({JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"]},Iu);function ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const wa=Oe(rb,{props:{specObj:null,passingOptionsNames:["specObj"]},init({specObj:e=this.specObj}){this.specObj=e},methods:{retrievePassingOptions(){return w0(this.passingOptionsNames,this)},retrieveFixedFields(e){return Jr(wi(["visitors",...e,"fixedFields"]),Hi)(this.specObj)},retrieveVisitor(e){return Cu(Po,["visitors",...e],this.specObj)?wi(["visitors",...e],this.specObj):wi(["visitors",...e,"$visitor"],this.specObj)},retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return this.retrieveVisitor(e)(Ag(Ag({},r),t))},toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r),s=Object.getPrototypeOf(n);return _o(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance(["value"]))),this.fallbackVisitorPrototype===s?t.clone():(Nn(t,n,Ag({keyMap:sb,nodeTypeGetter:ib},r)),n.element)}}}),Ff=Oe(wa,{props:{specPath:Ru,ignoredFields:[]},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields}={}){this.specPath=e,this.ignoredFields=t},methods:{ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach((n,s,a)=>{if(Ct(s)&&r.includes(s.toValue())&&!this.ignoredFields.includes(s.toValue())){const p=this.toRefractedElement([...t,"fixedFields",s.toValue()],n),d=new Te.c6(s.clone(),p);this.copyMetaAndAttributes(a,d),d.classes.push("fixed-field"),this.element.content.push(d)}else this.ignoredFields.includes(s.toValue())||this.element.content.push(a.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),w_=Oe(Ff,Pt,{props:{specPath:T(["document","objects","JSONSchema"])},init(){this.element=new Rf}}),O_=Pt,E_=Pt,A_=Pt,C_=Pt,__=Pt,P_=Pt,T_=Pt,V_=Pt,k_=Pt,j_=Pt,Vo=Oe({props:{parent:null},init({parent:e=this.parent}){this.parent=e,this.passingOptionsNames=[...this.passingOptionsNames,"parent"]}}),Ys=e=>sr(e)&&e.hasKey("$ref"),I_=Oe(wa,Vo,Pt,{methods:{ObjectElement(e){const t=Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),pt},ArrayElement(e){return this.element=new Te.ON,this.element.classes.push("json-schema-items"),e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),R_=Pt,F_=Pt,M_=Pt,L_=Pt,D_=Pt,N_=Oe(Pt,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-required"),pt}}});var B_=lr(1,bs(I0,$E(R0,Po))),$_=Eu(B_);const U_=$_;var W_=Eu(lf);const ab=W_;var H_=S([Sl,U_,ab]);const Cg=H_,z_=Oe(wa,{props:{fieldPatternPredicate:pl,specPath:Ru,ignoredFields:[]},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields}={}){this.specPath=e,this.ignoredFields=t},methods:{ObjectElement(e){return e.forEach((t,r,n)=>{if(!this.ignoredFields.includes(r.toValue())&&this.fieldPatternPredicate(r.toValue())){const s=this.specPath(t),a=this.toRefractedElement(s,t),p=new Te.c6(r.clone(),a);this.copyMetaAndAttributes(n,p),p.classes.push("patterned-field"),this.element.content.push(p)}else this.ignoredFields.includes(r.toValue())||this.element.content.push(n.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),Qd=Oe(z_,{props:{fieldPatternPredicate:Cg}}),G_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-properties")}}),K_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-patternProperties")}}),J_=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-dependencies")}}),Y_=Oe(Pt,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-enum"),pt}}}),X_=Oe(Pt,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt},ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt}}}),Q_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-allOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),Z_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-anyOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),q_=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-oneOf")},methods:{ArrayElement(e){return e.forEach(t=>{const r=Ys(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),eP=Oe(Qd,Vo,Pt,{props:{specPath:e=>Ys(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-definitions")}}),tP=Pt,rP=Pt,nP=Pt,iP=Pt,sP=Pt,oP=Oe(wa,Vo,Pt,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-links")},methods:{ArrayElement(e){return e.forEach(t=>{const r=this.toRefractedElement(["document","objects","LinkDescription"],t);this.element.push(r)}),this.copyMetaAndAttributes(e,this.element),pt}}}),aP=Pt,lP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","JSONReference"])},init(){this.element=new Kd},methods:{ObjectElement(e){const t=Ff.compose.methods.ObjectElement.call(this,e);return Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),uP=Oe(Pt,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}});var cP=Eu(vr);const fP=cP;var pP=bs(C0,ab);const dP=pP;function hP(e){return yP(e)||gP(e)||vP(e)||mP()}function mP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
87
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vP(e,t){if(e){if(typeof e=="string")return _g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _g(e,t)}}function gP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yP(e){if(Array.isArray(e))return _g(e)}function _g(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var bP=NO(function(e,t){return e.length>t.length}),xP=Jr(mA(bP),l1,Js("length")),SP=jd(function(e,t,r){var n=r.apply(void 0,hP(e));return fP(n)?pA(n):t}),wP=function(t){var r=xP(t);return lr(r,function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return f(SP(s),void 0,t)})},OP=hg(dP,wP,cf);const lb=OP,EP=Oe(wa,{props:{alternator:[]},methods:{enter(e){const t=this.alternator.map(({predicate:n,specPath:s})=>hg(n,T(s),cf)),r=lb(t)(e);return this.element=this.toRefractedElement(r,e),pt}}}),Fu=Oe(EP,{props:{alternator:[{predicate:Ys,specPath:["document","objects","JSONReference"]},{predicate:Ks,specPath:["document","objects","JSONSchema"]}]}}),AP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","Media"])},init(){this.element=new Jd}}),CP=Pt,_P=Pt,PP=Oe(Ff,Pt,{props:{specPath:T(["document","objects","LinkDescription"])},init(){this.element=new Yd}}),ko={visitors:{value:Pt,JSONSchemaOrJSONReferenceVisitor:Fu,document:{objects:{JSONSchema:{$visitor:w_,fixedFields:{id:O_,$schema:E_,multipleOf:A_,maximum:C_,exclusiveMaximum:__,minimum:P_,exclusiveMinimum:T_,maxLength:V_,minLength:k_,pattern:j_,additionalItems:Fu,items:I_,maxItems:R_,minItems:F_,uniqueItems:M_,maxProperties:L_,minProperties:D_,required:N_,properties:G_,additionalProperties:Fu,patternProperties:K_,dependencies:J_,enum:Y_,type:X_,allOf:Q_,anyOf:Z_,oneOf:q_,not:Fu,definitions:eP,title:tP,description:rP,default:nP,format:iP,base:sP,links:oP,media:{$ref:"#/visitors/document/objects/Media"},readOnly:aP}},JSONReference:{$visitor:lP,fixedFields:{$ref:uP}},Media:{$visitor:AP,fixedFields:{binaryEncoding:CP,type:_P}},LinkDescription:{$visitor:PP,fixedFields:{href:Pt,rel:Pt,title:Pt,targetSchema:Fu,mediaType:Pt,method:Pt,encType:Pt,schema:Fu}}}}}},TP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Rf||e(n)&&t("JSONSchemaDraft4",n)&&r("object",n)),VP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Kd||e(n)&&t("JSONReference",n)&&r("object",n)),kP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Jd||e(n)&&t("media",n)&&r("object",n)),jP=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Yd||e(n)&&t("linkDescription",n)&&r("object",n)),IP={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",Rf),t.register("jSONReference",Kd),t.register("media",Jd),t.register("linkDescription",Yd),t}};function ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function cb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ub(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const RP=()=>{const e=ku(IP);return{predicates:cb(cb({},_),{},{isStringElement:Ct}),namespace:e}};function fb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function FP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const MP=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=ko}={})=>{const s=(0,Te.Qc)(e),a=Xd(n),p=Tu(t,[],a);return Nn(s,p,{state:{specObj:a}}),hf(p.element,r,{toolboxCreator:RP,visitorOptions:{keyMap:sb,nodeTypeGetter:ib}})},Zd=e=>(t,r={})=>MP(t,FP({specPath:e},r)),S$=null;Rf.refract=Zd(["visitors","document","objects","JSONSchema","$visitor"]),Kd.refract=Zd(["visitors","document","objects","JSONReference","$visitor"]),Jd.refract=Zd(["visitors","document","objects","Media","$visitor"]),Yd.refract=Zd(["visitors","document","objects","LinkDescription","$visitor"]);class LP extends Rf{constructor(t,r,n){super(t,r,n),this.element="schema",this.classes.push("json-schema-draft-4")}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get nullable(){return this.get("nullable")}set nullable(t){this.set("nullable",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}}const qd=LP;class DP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="securityRequirement"}}const Mf=DP;class NP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="securityScheme"}get type(){return this.get("type")}set type(t){this.set("type",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get scheme(){return this.get("scheme")}set scheme(t){this.set("scheme",t)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(t){this.set("bearerFormat",t)}get flows(){return this.get("flows")}set flows(t){this.set("flows",t)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(t){this.set("openIdConnectUrl",t)}}const eh=NP;class BP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="server"}get url(){return this.get("url")}set url(t){this.set("url",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get variables(){return this.get("variables")}set variables(t){this.set("variables",t)}}const Lf=BP;class $P extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}}const Df=$P;class UP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="tag"}get name(){return this.get("name")}set name(t){this.set("name",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}}const th=UP;class WP extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="xml"}get name(){return this.get("name")}set name(t){this.set("name",t)}get namespace(){return this.get("namespace")}set namespace(t){this.set("namespace",t)}get prefix(){return this.get("prefix")}set prefix(t){this.set("prefix",t)}get attribute(){return this.get("attribute")}set attribute(t){this.set("attribute",t)}get wrapped(){return this.get("wrapped")}set wrapped(t){this.set("wrapped",t)}}const rh=WP,pb=Oe({props:{element:null},methods:{copyMetaAndAttributes(e,t){yg(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))}}});function db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function HP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?db(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const hb=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},mb=HP({CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"]},Iu);function vb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Pg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Qn=Oe(pb,{props:{passingOptionsNames:["specObj","openApiGenericElement","openApiSemanticElement"],specObj:null,openApiGenericElement:null,openApiSemanticElement:null},init({specObj:e=this.specObj,openApiGenericElement:t=this.openApiGenericElement,openApiSemanticElement:r=this.openApiSemanticElement}){this.specObj=e,this.openApiGenericElement=t,this.openApiSemanticElement=r},methods:{retrievePassingOptions(){return w0(this.passingOptionsNames,this)},retrieveFixedFields(e){return Jr(wi(["visitors",...e,"fixedFields"]),Hi)(this.specObj)},retrieveVisitor(e){return Cu(Po,["visitors",...e],this.specObj)?wi(["visitors",...e],this.specObj):wi(["visitors",...e,"$visitor"],this.specObj)},retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return this.retrieveVisitor(e)(Pg(Pg({},r),t))},toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r),s=Object.getPrototypeOf(n);return _o(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance(["value"]))),this.fallbackVisitorPrototype===s?t.clone():(Nn(t,n,Pg({keyMap:mb,nodeTypeGetter:hb},r)),n.element)}}}),zP=e=>sr(e)&&e.hasKey("openapi")&&e.hasKey("info"),GP=e=>sr(e)&&e.hasKey("name")&&e.hasKey("in"),xr=e=>sr(e)&&e.hasKey("$ref"),KP=e=>sr(e)&&e.hasKey("content"),JP=e=>sr(e)&&e.hasKey("description"),gb=sr,yb=sr,Tg=e=>Ct(e.key)&&A0("x-",e.key.toValue()),Dt=Oe(Qn,{props:{specPath:Ru,ignoredFields:[],canSupportSpecificationExtensions:!0,specificationExtensionPredicate:Tg},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields,canSupportSpecificationExtensions:r=this.canSupportSpecificationExtensions,specificationExtensionPredicate:n=this.specificationExtensionPredicate}={}){this.specPath=e,this.ignoredFields=t,this.canSupportSpecificationExtensions=r,this.specificationExtensionPredicate=n},methods:{ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach((n,s,a)=>{if(Ct(s)&&r.includes(s.toValue())&&!this.ignoredFields.includes(s.toValue())){const p=this.toRefractedElement([...t,"fixedFields",s.toValue()],n),d=new Te.c6(s.clone(),p);this.copyMetaAndAttributes(a,d),d.classes.push("fixed-field"),this.element.content.push(d)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(a)){const p=this.toRefractedElement(["document","extension"],a);this.element.content.push(p)}else this.ignoredFields.includes(s.toValue())||this.element.content.push(a.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),be=Oe(pb,{methods:{enter(e){return this.element=e.clone(),pt}}}),YP=Oe(Dt,be,{props:{specPath:T(["document","objects","OpenApi"]),canSupportSpecificationExtensions:!0},init(){this.element=new Gd},methods:{ObjectElement(e){return this.unrefractedElement=e,Dt.compose.methods.ObjectElement.call(this,e)}}}),XP=Oe(Qn,be,{methods:{StringElement(e){const t=new Af(e.toValue());return this.copyMetaAndAttributes(e,t),this.element=t,pt}}}),QP=Oe(Qn,{methods:{MemberElement(e){return this.element=e.clone(),this.element.classes.push("specification-extension"),pt}}}),ZP=Oe(Dt,be,{props:{specPath:T(["document","objects","Info"]),canSupportSpecificationExtensions:!0},init(){this.element=new Sf}}),qP=be,eT=be,tT=be,rT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("api-version"),this.element.classes.push("version"),pt}}}),nT=Oe(Dt,be,{props:{specPath:T(["document","objects","Contact"]),canSupportSpecificationExtensions:!0},init(){this.element=new gf}}),iT=be,sT=be,oT=be,aT=Oe(Dt,be,{props:{specPath:T(["document","objects","License"]),canSupportSpecificationExtensions:!0},init(){this.element=new wf}}),lT=be,uT=be,cT=Oe(Dt,be,{props:{specPath:T(["document","objects","Link"]),canSupportSpecificationExtensions:!0},init(){this.element=new Of},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return(Ct(this.element.operationId)||Ct(this.element.operationRef))&&this.element.classes.push("reference-element"),t}}}),fT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),pT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),Mu=Oe(Qn,{props:{fieldPatternPredicate:pl,specPath:Ru,ignoredFields:[],canSupportSpecificationExtensions:!1,specificationExtensionPredicate:Tg},init({specPath:e=this.specPath,ignoredFields:t=this.ignoredFields,canSupportSpecificationExtensions:r=this.canSupportSpecificationExtensions,specificationExtensionPredicate:n=this.specificationExtensionPredicate}={}){this.specPath=e,this.ignoredFields=t,this.canSupportSpecificationExtensions=r,this.specificationExtensionPredicate=n},methods:{ObjectElement(e){return e.forEach((t,r,n)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(n)){const s=this.toRefractedElement(["document","extension"],n);this.element.content.push(s)}else if(!this.ignoredFields.includes(r.toValue())&&this.fieldPatternPredicate(r.toValue())){const s=this.specPath(t),a=this.toRefractedElement(s,t),p=new Te.c6(r.clone(),a);this.copyMetaAndAttributes(n,p),p.classes.push("patterned-field"),this.element.content.push(p)}else this.ignoredFields.includes(r.toValue())||this.element.content.push(n.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),Vt=Oe(Mu,{props:{fieldPatternPredicate:Cg}});class nh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(nh.primaryClass)}}X(nh,"primaryClass","link-parameters");const dT=nh,hT=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new dT}}),mT=be,vT=be,gT=Oe(Dt,be,{props:{specPath:T(["document","objects","Server"]),canSupportSpecificationExtensions:!0},init(){this.element=new Lf}}),yT=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("server-url"),pt}}}),bT=be;class ih extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(ih.primaryClass)}}X(ih,"primaryClass","servers");const xT=ih,Vg=Oe(Qn,be,{init(){this.element=new xT},methods:{ArrayElement(e){return e.forEach(t=>{const r=gb(t)?["document","objects","Server"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),ST=Oe(Dt,be,{props:{specPath:T(["document","objects","ServerVariable"]),canSupportSpecificationExtensions:!0},init(){this.element=new Df}}),wT=be,OT=be,ET=be;class sh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(sh.primaryClass)}}X(sh,"primaryClass","server-variables");const AT=sh,CT=Oe(Vt,be,{props:{specPath:T(["document","objects","ServerVariable"])},init(){this.element=new AT}}),_T=Oe(Dt,be,{props:{specPath:T(["document","objects","MediaType"]),canSupportSpecificationExtensions:!0},init(){this.element=new Ef}}),Xs=Oe(Qn,{props:{alternator:[]},methods:{enter(e){const t=this.alternator.map(({predicate:n,specPath:s})=>hg(n,T(s),cf)),r=lb(t)(e);return this.element=this.toRefractedElement(r,e),pt}}}),PT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof mf||e(n)&&t("callback",n)&&r("object",n)),TT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof vf||e(n)&&t("components",n)&&r("object",n)),VT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof gf||e(n)&&t("contact",n)&&r("object",n)),kT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof yf||e(n)&&t("example",n)&&r("object",n)),jT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof bf||e(n)&&t("externalDocumentation",n)&&r("object",n)),Lu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof xf||e(n)&&t("header",n)&&r("object",n)),IT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Sf||e(n)&&t("info",n)&&r("object",n)),RT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof wf||e(n)&&t("license",n)&&r("object",n)),bb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Of||e(n)&&t("link",n)&&r("object",n)),FT=e=>{if(!bb(e)||!Ct(e.operationRef))return!1;const t=e.operationRef.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},MT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Af||e(n)&&t("openapi",n)&&r("string",n)),LT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof Gd||e(s)&&t("openApi3_0",s)&&r("object",s)&&n("api",s)),xb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Cf||e(n)&&t("operation",n)&&r("object",n)),DT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof _f||e(n)&&t("parameter",n)&&r("object",n)),oh=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Pf||e(n)&&t("pathItem",n)&&r("object",n)),NT=e=>{if(!oh(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},BT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Tf||e(n)&&t("paths",n)&&r("object",n)),_r=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Vf||e(n)&&t("reference",n)&&r("object",n)),$T=e=>{if(!_r(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},UT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof kf||e(n)&&t("requestBody",n)&&r("object",n)),ah=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof jf||e(n)&&t("response",n)&&r("object",n)),WT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof If||e(n)&&t("responses",n)&&r("object",n)),HT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof qd||e(n)&&t("schema",n)&&r("object",n)),zT=e=>Dd(e)&&e.classes.includes("boolean-json-schema"),GT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Mf||e(n)&&t("securityRequirement",n)&&r("object",n)),KT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Lf||e(n)&&t("server",n)&&r("object",n)),JT=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Df||e(n)&&t("serverVariable",n)&&r("object",n)),lh=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ef||e(n)&&t("mediaType",n)&&r("object",n)),YT=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),XT=be,kg=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Example"],canSupportSpecificationExtensions:!0},init(){this.element=new Te.Sb,this.element.classes.push("examples")},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","example")}),t}}});class uh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(uh.primaryClass),this.classes.push("examples")}}X(uh,"primaryClass","media-type-examples");const QT=uh,ZT=Oe(kg,{init(){this.element=new QT}});class ch extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(ch.primaryClass)}}X(ch,"primaryClass","media-type-encoding");const qT=ch,eV=Oe(Vt,be,{props:{specPath:T(["document","objects","Encoding"])},init(){this.element=new qT}}),tV=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new Mf}});class fh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(fh.primaryClass)}}X(fh,"primaryClass","security");const rV=fh,nV=Oe(Qn,be,{init(){this.element=new rV},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","SecurityRequirement"],t);this.element.push(r)}else this.element.push(t.clone())}),this.copyMetaAndAttributes(e,this.element),pt}}}),iV=Oe(Dt,be,{props:{specPath:T(["document","objects","Components"]),canSupportSpecificationExtensions:!0},init(){this.element=new vf}}),sV=Oe(Dt,be,{props:{specPath:T(["document","objects","Tag"]),canSupportSpecificationExtensions:!0},init(){this.element=new th}}),oV=be,aV=be,lV=Oe(Dt,be,{props:{specPath:T(["document","objects","Reference"]),canSupportSpecificationExtensions:!1},init(){this.element=new Vf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),uV=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),cV=Oe(Dt,be,{props:{specPath:T(["document","objects","Parameter"]),canSupportSpecificationExtensions:!0},init(){this.element=new _f},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),t}}}),fV=be,pV=be,dV=be,hV=be,mV=be,vV=be,gV=be,yV=be,bV=be,xV=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),SV=Oe(Dt,be,{props:{specPath:T(["document","objects","Header"]),canSupportSpecificationExtensions:!0},init(){this.element=new xf}}),wV=be,OV=be,EV=be,AV=be,CV=be,_V=be,PV=be,TV=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Schema"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),VV=be;class ph extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(ph.primaryClass),this.classes.push("examples")}}X(ph,"primaryClass","header-examples");const kV=ph,jV=Oe(kg,{init(){this.element=new kV}}),dh=Oe(Vt,be,{props:{specPath:T(["document","objects","MediaType"])},init(){this.element=new Te.Sb,this.element.classes.push("content")}});class hh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(hh.primaryClass),this.classes.push("content")}}X(hh,"primaryClass","header-content");const IV=hh,RV=Oe(dh,{init(){this.element=new IV}}),FV=Oe(Dt,be,{props:{specPath:T(["document","objects","Schema"]),canSupportSpecificationExtensions:!0},init(){this.element=new qd}}),{items:Sb}=ko.visitors.document.objects.JSONSchema.fixedFields,MV=Oe(Sb,{methods:{ObjectElement(e){const t=Sb.compose.methods.ObjectElement.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t},ArrayElement(e){return this.element=e.clone(),pt}}}),{properties:wb}=ko.visitors.document.objects.JSONSchema.fixedFields,LV=Oe(wb,{methods:{ObjectElement(e){const t=wb.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","schema")}),t}}}),{type:DV}=ko.visitors.document.objects.JSONSchema.fixedFields,NV=Oe(DV,{methods:{ArrayElement(e){return this.element=e.clone(),pt}}}),BV=be,$V=be,UV=be,WV=be,{JSONSchemaOrJSONReferenceVisitor:Ob}=ko.visitors,HV=Oe(Ob,{methods:{ObjectElement(e){const t=Ob.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}}),zV=Object.fromEntries(Object.entries(ko.visitors.document.objects.JSONSchema.fixedFields).map(([e,t])=>t===ko.visitors.JSONSchemaOrJSONReferenceVisitor?[e,HV]:[e,t])),GV=Oe(Dt,be,{props:{specPath:T(["document","objects","Discriminator"]),canSupportSpecificationExtensions:!1},init(){this.element=new Ud}}),KV=be;class mh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(mh.primaryClass)}}X(mh,"primaryClass","discriminator-mapping");const JV=mh,YV=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new JV}}),XV=Oe(Dt,be,{props:{specPath:T(["document","objects","XML"]),canSupportSpecificationExtensions:!0},init(){this.element=new rh}}),QV=be,ZV=be,qV=be,ek=be,tk=be,rk=be;class vh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(vh.primaryClass),this.classes.push("examples")}}X(vh,"primaryClass","parameter-examples");const nk=vh,ik=Oe(kg,{init(){this.element=new nk}});class gh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(gh.primaryClass),this.classes.push("content")}}X(gh,"primaryClass","parameter-content");const sk=gh,ok=Oe(dh,{init(){this.element=new sk}});class yh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(yh.primaryClass)}}X(yh,"primaryClass","components-schemas");const Eb=yh,ak=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Schema"]},init(){this.element=new Eb},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","schema")}),t}}});class bh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(bh.primaryClass)}}X(bh,"primaryClass","components-responses");const lk=bh,uk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Response"]},init(){this.element=new lk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","response")}),this.element.filter(ah).forEach((r,n)=>{r.setMetaProperty("http-status-code",n.toValue())}),t}}});class xh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(xh.primaryClass),this.classes.push("parameters")}}X(xh,"primaryClass","components-parameters");const ck=xh,fk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Parameter"]},init(){this.element=new ck},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","parameter")}),t}}});class Sh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Sh.primaryClass),this.classes.push("examples")}}X(Sh,"primaryClass","components-examples");const pk=Sh,dk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Example"]},init(){this.element=new pk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","example")}),t}}});class wh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(wh.primaryClass)}}X(wh,"primaryClass","components-request-bodies");const hk=wh,mk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","RequestBody"]},init(){this.element=new hk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","requestBody")}),t}}});class Oh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Oh.primaryClass)}}X(Oh,"primaryClass","components-headers");const vk=Oh,gk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new vk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}});class Eh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Eh.primaryClass)}}X(Eh,"primaryClass","components-security-schemes");const yk=Eh,bk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","SecurityScheme"]},init(){this.element=new yk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","securityScheme")}),t}}});class Ah extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ah.primaryClass)}}X(Ah,"primaryClass","components-links");const xk=Ah,Sk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Link"]},init(){this.element=new xk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","link")}),t}}});class Ch extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ch.primaryClass)}}X(Ch,"primaryClass","components-callbacks");const wk=Ch,Ok=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Callback"]},init(){this.element=new wk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","callback")}),t}}}),Ek=Oe(Dt,be,{props:{specPath:T(["document","objects","Example"]),canSupportSpecificationExtensions:!0},init(){this.element=new yf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return Ct(this.element.externalValue)&&this.element.classes.push("reference-element"),t}}}),Ak=be,Ck=be,_k=be,Pk=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),Tk=Oe(Dt,be,{props:{specPath:T(["document","objects","ExternalDocumentation"]),canSupportSpecificationExtensions:!0},init(){this.element=new bf}}),Vk=be,kk=be,jk=Oe(Dt,be,{props:{specPath:T(["document","objects","Encoding"]),canSupportSpecificationExtensions:!0},init(){this.element=new Wd},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.headers)&&this.element.headers.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}}),Ik=be;class _h extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(_h.primaryClass)}}X(_h,"primaryClass","encoding-headers");const Rk=_h,Fk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new Rk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.forEach((r,n)=>{if(!Lu(r))return;const s=n.toValue();r.setMetaProperty("headerName",s)}),t}}}),Mk=be,Lk=be,Dk=be,Nk=Oe(Mu,be,{props:{fieldPatternPredicate:Rd(new RegExp("^\\/(?<path>.*)$")),specPath:T(["document","objects","PathItem"]),canSupportSpecificationExtensions:!0},init(){this.element=new Tf},methods:{ObjectElement(e){const t=Mu.compose.methods.ObjectElement.call(this,e);return this.element.filter(oh).forEach((r,n)=>{r.setMetaProperty("path",n.clone())}),t}}}),Bk=Oe(Dt,be,{props:{specPath:T(["document","objects","RequestBody"])},init(){this.element=new kf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),t}}}),$k=be;class Ph extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Ph.primaryClass),this.classes.push("content")}}X(Ph,"primaryClass","request-body-content");const Uk=Ph,Wk=Oe(dh,{init(){this.element=new Uk}}),Hk=be,zk=Oe(Mu,be,{props:{fieldPatternPredicate:Rd(new RegExp("{(?<expression>.*)}")),specPath:T(["document","objects","PathItem"]),canSupportSpecificationExtensions:!0},init(){this.element=new mf},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(oh).forEach((r,n)=>{r.setMetaProperty("runtime-expression",n.toValue())}),t}}}),Gk=Oe(Dt,be,{props:{specPath:T(["document","objects","Response"])},init(){this.element=new jf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return sr(this.element.contentProp)&&this.element.contentProp.filter(lh).forEach((r,n)=>{r.setMetaProperty("media-type",n.toValue())}),sr(this.element.headers)&&this.element.headers.filter(Lu).forEach((r,n)=>{r.setMetaProperty("header-name",n.toValue())}),t}}}),Kk=be;class Th extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Th.primaryClass)}}X(Th,"primaryClass","response-headers");const Jk=Th,Yk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Header"]},init(){this.element=new Jk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","header")}),this.element.forEach((r,n)=>{if(!Lu(r))return;const s=n.toValue();r.setMetaProperty("header-name",s)}),t}}});class Vh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Vh.primaryClass),this.classes.push("content")}}X(Vh,"primaryClass","response-content");const Xk=Vh,Qk=Oe(dh,{init(){this.element=new Xk}});class kh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(kh.primaryClass)}}X(kh,"primaryClass","response-links");const Zk=kh,qk=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Link"]},init(){this.element=new Zk},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","link")}),t}}}),Ab=Oe(Dt,Mu,{props:{specPathFixedFields:Ru,specPathPatternedFields:Ru},methods:{ObjectElement(e){const{specPath:t,ignoredFields:r}=this;try{this.specPath=this.specPathFixedFields;const n=this.retrieveFixedFields(this.specPath(e));this.ignoredFields=[...r,...vE(e.keys(),n)],Dt.compose.methods.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=n,Mu.compose.methods.ObjectElement.call(this,e)}catch(n){throw this.specPath=t,n}return pt}}}),ej=Oe(Ab,be,{props:{specPathFixedFields:T(["document","objects","Responses"]),specPathPatternedFields:e=>xr(e)?["document","objects","Reference"]:["document","objects","Response"],fieldPatternPredicate:Rd(new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${cA(100,600).join("|")})$`)),canSupportSpecificationExtensions:!0},init(){this.element=new If},methods:{ObjectElement(e){const t=Ab.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","response")}),this.element.filter(ah).forEach((r,n)=>{const s=n.clone();this.fieldPatternPredicate(s.toValue())&&r.setMetaProperty("http-status-code",s)}),t}}}),tj=Oe(Xs,be,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","Response"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)?this.element.setMetaProperty("referenced-element","response"):ah(this.element)&&this.element.setMetaProperty("http-status-code","default"),t}}}),rj=Oe(Dt,be,{props:{specPath:T(["document","objects","Operation"])},init(){this.element=new Cf}});class jh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(jh.primaryClass)}}X(jh,"primaryClass","operation-tags");const nj=jh,ij=Oe(be,{init(){this.element=new nj},methods:{ArrayElement(e){return this.element=this.element.concat(e.clone()),pt}}}),sj=be,oj=be,aj=be;class Ih extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Ih.primaryClass),this.classes.push("parameters")}}X(Ih,"primaryClass","operation-parameters");const Cb=Ih,_b=Oe(Qn,be,{init(){this.element=new Te.ON,this.element.classes.push("parameters")},methods:{ArrayElement(e){return e.forEach(t=>{const r=xr(t)?["document","objects","Reference"]:["document","objects","Parameter"],n=this.toRefractedElement(r,t);_r(n)&&n.setMetaProperty("referenced-element","parameter"),this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}}),lj=Oe(_b,{init(){this.element=new Cb}}),uj=Oe(Xs,{props:{alternator:[{predicate:xr,specPath:["document","objects","Reference"]},{predicate:Ks,specPath:["document","objects","RequestBody"]}]},methods:{ObjectElement(e){const t=Xs.compose.methods.enter.call(this,e);return _r(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),t}}});class Rh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Rh.primaryClass)}}X(Rh,"primaryClass","operation-callbacks");const cj=Rh,fj=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","Callback"]},init(){this.element=new cj},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(_r).forEach(r=>{r.setMetaProperty("referenced-element","callback")}),t}}}),pj=be;class Fh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Fh.primaryClass),this.classes.push("security")}}X(Fh,"primaryClass","operation-security");const Pb=Fh,dj=Oe(Qn,be,{init(){this.element=new Pb},methods:{ArrayElement(e){return e.forEach(t=>{const r=sr(t)?["document","objects","SecurityRequirement"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}});class Mh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Mh.primaryClass),this.classes.push("servers")}}X(Mh,"primaryClass","operation-servers");const Tb=Mh,hj=Oe(Vg,{init(){this.element=new Tb}}),mj=Oe(Dt,be,{props:{specPath:T(["document","objects","PathItem"])},init(){this.element=new Pf},methods:{ObjectElement(e){const t=Dt.compose.methods.ObjectElement.call(this,e);return this.element.filter(xb).forEach((r,n)=>{const s=n.clone();s.content=s.toValue().toUpperCase(),r.setMetaProperty("http-method",s)}),Ct(this.element.$ref)&&this.element.classes.push("reference-element"),t}}}),vj=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),gj=be,yj=be;class Lh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Lh.primaryClass),this.classes.push("servers")}}X(Lh,"primaryClass","path-item-servers");const Vb=Lh,bj=Oe(Vg,{init(){this.element=new Vb}});class Dh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Dh.primaryClass),this.classes.push("parameters")}}X(Dh,"primaryClass","path-item-parameters");const xj=Dh,Sj=Oe(_b,{init(){this.element=new xj}}),wj=Oe(Dt,be,{props:{specPath:T(["document","objects","SecurityScheme"]),canSupportSpecificationExtensions:!0},init(){this.element=new eh}}),Oj=be,Ej=be,Aj=be,Cj=be,_j=be,Pj=be,Tj=be,Vj=Oe(Dt,be,{props:{specPath:T(["document","objects","OAuthFlows"]),canSupportSpecificationExtensions:!0},init(){this.element=new zd}}),kj=Oe(Dt,be,{props:{specPath:T(["document","objects","OAuthFlow"]),canSupportSpecificationExtensions:!0},init(){this.element=new Hd}}),jj=be,Ij=be,Rj=be;class Nh extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(Nh.primaryClass)}}X(Nh,"primaryClass","oauth-flow-scopes");const Fj=Nh,Mj=Oe(Vt,be,{props:{specPath:T(["value"])},init(){this.element=new Fj}});class Bh extends Te.ON{constructor(t,r,n){super(t,r,n),this.classes.push(Bh.primaryClass)}}X(Bh,"primaryClass","tags");const Lj=Bh,Dj=Oe(Qn,be,{init(){this.element=new Lj},methods:{ArrayElement(e){return e.forEach(t=>{const r=yb(t)?["document","objects","Tag"]:["value"],n=this.toRefractedElement(r,t);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),pt}}});function kb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function jb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Ib={$visitor:lV,fixedFields:{$ref:uV}},Rb={$visitor:FV,fixedFields:jb(jb({},zV),{},{items:MV,properties:LV,type:NV,nullable:BV,discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:$V,xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:UV,deprecated:WV})},ke={visitors:{value:be,document:{objects:{OpenApi:{$visitor:YP,fixedFields:{openapi:XP,info:{$ref:"#/visitors/document/objects/Info"},servers:Vg,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:nV,tags:Dj,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:ZP,fixedFields:{title:qP,description:eT,termsOfService:tT,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:rT}},Contact:{$visitor:nT,fixedFields:{name:iT,url:sT,email:oT}},License:{$visitor:aT,fixedFields:{name:lT,url:uT}},Server:{$visitor:gT,fixedFields:{url:yT,description:bT,variables:CT}},ServerVariable:{$visitor:ST,fixedFields:{enum:wT,default:OT,description:ET}},Components:{$visitor:iV,fixedFields:{schemas:ak,responses:uk,parameters:fk,examples:dk,requestBodies:mk,headers:gk,securitySchemes:bk,links:Sk,callbacks:Ok}},Paths:{$visitor:Nk},PathItem:{$visitor:mj,fixedFields:{$ref:vj,summary:gj,description:yj,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:bj,parameters:Sj}},Operation:{$visitor:rj,fixedFields:{tags:ij,summary:sj,description:oj,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:aj,parameters:lj,requestBody:uj,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:fj,deprecated:pj,security:dj,servers:hj}},ExternalDocumentation:{$visitor:Tk,fixedFields:{description:Vk,url:kk}},Parameter:{$visitor:cV,fixedFields:{name:fV,in:pV,description:dV,required:hV,deprecated:mV,allowEmptyValue:vV,style:gV,explode:yV,allowReserved:bV,schema:xV,example:rk,examples:ik,content:ok}},RequestBody:{$visitor:Bk,fixedFields:{description:$k,content:Wk,required:Hk}},MediaType:{$visitor:_T,fixedFields:{schema:YT,example:XT,examples:ZT,encoding:eV}},Encoding:{$visitor:jk,fixedFields:{contentType:Ik,headers:Fk,style:Mk,explode:Lk,allowReserved:Dk}},Responses:{$visitor:ej,fixedFields:{default:tj}},Response:{$visitor:Gk,fixedFields:{description:Kk,headers:Yk,content:Qk,links:qk}},Callback:{$visitor:zk},Example:{$visitor:Ek,fixedFields:{summary:Ak,description:Ck,value:_k,externalValue:Pk}},Link:{$visitor:cT,fixedFields:{operationRef:fT,operationId:pT,parameters:hT,requestBody:mT,description:vT,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:SV,fixedFields:{description:wV,required:OV,deprecated:EV,allowEmptyValue:AV,style:CV,explode:_V,allowReserved:PV,schema:TV,example:VV,examples:jV,content:RV}},Tag:{$visitor:sV,fixedFields:{name:oV,description:aV,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},JSONReference:Ib,Reference:Ib,JSONSchema:Rb,Schema:Rb,LinkDescription:ko.visitors.document.objects.LinkDescription,Media:ko.visitors.document.objects.Media,Discriminator:{$visitor:GV,fixedFields:{propertyName:KV,mapping:YV}},XML:{$visitor:XV,fixedFields:{name:QV,namespace:ZV,prefix:qV,attribute:ek,wrapped:tk}},SecurityScheme:{$visitor:wj,fixedFields:{type:Oj,description:Ej,name:Aj,in:Cj,scheme:_j,bearerFormat:Pj,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Tj}},OAuthFlows:{$visitor:Vj,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:kj,fixedFields:{authorizationUrl:jj,tokenUrl:Ij,refreshUrl:Rj,scopes:Mj}},SecurityRequirement:{$visitor:tV}},extension:{$visitor:QP}}}},Nj={namespace:e=>{const{base:t}=e;return t.register("callback",mf),t.register("components",vf),t.register("contact",gf),t.register("discriminator",Ud),t.register("encoding",Wd),t.register("example",yf),t.register("externalDocumentation",bf),t.register("header",xf),t.register("info",Sf),t.register("license",wf),t.register("link",Of),t.register("mediaType",Ef),t.register("oAuthFlow",Hd),t.register("oAuthFlows",zd),t.register("openapi",Af),t.register("openApi3_0",Gd),t.register("operation",Cf),t.register("parameter",_f),t.register("pathItem",Pf),t.register("paths",Tf),t.register("reference",Vf),t.register("requestBody",kf),t.register("response",jf),t.register("responses",If),t.register("schema",qd),t.register("securityRequirement",Mf),t.register("securityScheme",eh),t.register("server",Lf),t.register("serverVariable",Df),t.register("tag",th),t.register("xml",rh),t}};function Fb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function jg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Bj=()=>{const e=ku(Nj);return{predicates:jg(jg(jg({},A),O),{},{isStringElement:Ct}),namespace:e}};function Mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function $j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Uj=(e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=(0,Te.Qc)(e),s=Xd(ke),a=Tu(t,[],s);return Nn(n,a,{state:{specObj:s}}),hf(a.element,r,{toolboxCreator:Bj,visitorOptions:{keyMap:mb,nodeTypeGetter:hb}})},pr=e=>(t,r={})=>Uj(t,$j({specPath:e},r)),VW=null;mf.refract=pr(["visitors","document","objects","Callback","$visitor"]),vf.refract=pr(["visitors","document","objects","Components","$visitor"]),gf.refract=pr(["visitors","document","objects","Contact","$visitor"]),yf.refract=pr(["visitors","document","objects","Example","$visitor"]),Ud.refract=pr(["visitors","document","objects","Discriminator","$visitor"]),Wd.refract=pr(["visitors","document","objects","Encoding","$visitor"]),bf.refract=pr(["visitors","document","objects","ExternalDocumentation","$visitor"]),xf.refract=pr(["visitors","document","objects","Header","$visitor"]),Sf.refract=pr(["visitors","document","objects","Info","$visitor"]),wf.refract=pr(["visitors","document","objects","License","$visitor"]),Of.refract=pr(["visitors","document","objects","Link","$visitor"]),Ef.refract=pr(["visitors","document","objects","MediaType","$visitor"]),Hd.refract=pr(["visitors","document","objects","OAuthFlow","$visitor"]),zd.refract=pr(["visitors","document","objects","OAuthFlows","$visitor"]),Af.refract=pr(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Gd.refract=pr(["visitors","document","objects","OpenApi","$visitor"]),Cf.refract=pr(["visitors","document","objects","Operation","$visitor"]),_f.refract=pr(["visitors","document","objects","Parameter","$visitor"]),Pf.refract=pr(["visitors","document","objects","PathItem","$visitor"]),Tf.refract=pr(["visitors","document","objects","Paths","$visitor"]),Vf.refract=pr(["visitors","document","objects","Reference","$visitor"]),kf.refract=pr(["visitors","document","objects","RequestBody","$visitor"]),jf.refract=pr(["visitors","document","objects","Response","$visitor"]),If.refract=pr(["visitors","document","objects","Responses","$visitor"]),qd.refract=pr(["visitors","document","objects","Schema","$visitor"]),Mf.refract=pr(["visitors","document","objects","SecurityRequirement","$visitor"]),eh.refract=pr(["visitors","document","objects","SecurityScheme","$visitor"]),Lf.refract=pr(["visitors","document","objects","Server","$visitor"]),Df.refract=pr(["visitors","document","objects","ServerVariable","$visitor"]),th.refract=pr(["visitors","document","objects","Tag","$visitor"]),rh.refract=pr(["visitors","document","objects","XML","$visitor"]);class Wj extends mf{}const $h=Wj;class Hj extends vf{get pathItems(){return this.get("pathItems")}set pathItems(t){this.set("pathItems",t)}}const Uh=Hj;class zj extends gf{}const Wh=zj;class Gj extends Ud{}const Ig=Gj;class Kj extends Wd{}const Rg=Kj;class Jj extends yf{}const Hh=Jj;class Yj extends bf{}const zh=Yj;class Xj extends xf{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Gh=Xj;class Qj extends Sf{get license(){return this.get("license")}set license(t){this.set("license",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}}const Kh=Qj;class Fg extends Te.RP{constructor(t,r,n){super(t,r,n),this.element="jsonSchemaDialect"}}X(Fg,"default",new Fg("https://spec.openapis.org/oas/3.1/dialect/base"));const Nf=Fg;class Zj extends wf{get identifier(){return this.get("identifier")}set identifier(t){this.set("identifier",t)}}const Jh=Zj;class qj extends Of{}const Yh=qj;class eI extends Ef{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Xh=eI;class tI extends Hd{}const Mg=tI;class rI extends zd{}const Lg=rI;class nI extends Af{}const Dg=nI;class iI extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(t){this.set("openapi",t)}get info(){return this.get("info")}set info(t){this.set("info",t)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(t){this.set("jsonSchemaDialect",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get paths(){return this.get("paths")}set paths(t){this.set("paths",t)}get components(){return this.get("components")}set components(t){this.set("components",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get webhooks(){return this.get("webhooks")}set webhooks(t){this.set("webhooks",t)}}const Oa=iI;class sI extends Cf{get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}}const Du=sI;class oI extends _f{get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}}const Qh=oI;class aI extends Pf{get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}}const Qs=aI;class lI extends Tf{}const Zh=lI;class Ng extends Vf{}Object.defineProperty(Ng.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0}),Object.defineProperty(Ng.prototype,"summary",{get(){return this.get("summary")},set(e){this.set("summary",e)},enumerable:!0});const Ea=Ng;class uI extends kf{}const qh=uI;class cI extends jf{}const em=cI;class fI extends If{}const tm=fI;class pI extends Te.Sb{constructor(t,r,n){super(t,r,n),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(t){this.set("$schema",t)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(t){this.set("$vocabulary",t)}get $id(){return this.get("$id")}set $id(t){this.set("$id",t)}get $anchor(){return this.get("$anchor")}set $anchor(t){this.set("$anchor",t)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(t){this.set("$dynamicAnchor",t)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(t){this.set("$dynamicRef",t)}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get $defs(){return this.get("$defs")}set $defs(t){this.set("$defs",t)}get $comment(){return this.get("$comment")}set $comment(t){this.set("$comment",t)}get allOf(){return this.get("allOf")}set allOf(t){this.set("allOf",t)}get anyOf(){return this.get("anyOf")}set anyOf(t){this.set("anyOf",t)}get oneOf(){return this.get("oneOf")}set oneOf(t){this.set("oneOf",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get if(){return this.get("if")}set if(t){this.set("if",t)}get then(){return this.get("then")}set then(t){this.set("then",t)}get else(){return this.get("else")}set else(t){this.set("else",t)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(t){this.set("dependentSchemas",t)}get prefixItems(){return this.get("prefixItems")}set prefixItems(t){this.set("prefixItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get containsProp(){return this.get("contains")}set containsProp(t){this.set("contains",t)}get properties(){return this.get("properties")}set properties(t){this.set("properties",t)}get patternProperties(){return this.get("patternProperties")}set patternProperties(t){this.set("patternProperties",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get propertyNames(){return this.get("propertyNames")}set propertyNames(t){this.set("propertyNames",t)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(t){this.set("unevaluatedItems",t)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(t){this.set("unevaluatedProperties",t)}get type(){return this.get("type")}set type(t){this.set("type",t)}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get const(){return this.get("const")}set const(t){this.set("const",t)}get multipleOf(){return this.get("multipleOf")}set multipleOf(t){this.set("multipleOf",t)}get maximum(){return this.get("maximum")}set maximum(t){this.set("maximum",t)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(t){this.set("exclusiveMaximum",t)}get minimum(){return this.get("minimum")}set minimum(t){this.set("minimum",t)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(t){this.set("exclusiveMinimum",t)}get maxLength(){return this.get("maxLength")}set maxLength(t){this.set("maxLength",t)}get minLength(){return this.get("minLength")}set minLength(t){this.set("minLength",t)}get pattern(){return this.get("pattern")}set pattern(t){this.set("pattern",t)}get maxItems(){return this.get("maxItems")}set maxItems(t){this.set("maxItems",t)}get minItems(){return this.get("minItems")}set minItems(t){this.set("minItems",t)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(t){this.set("uniqueItems",t)}get maxContains(){return this.get("maxContains")}set maxContains(t){this.set("maxContains",t)}get minContains(){return this.get("minContains")}set minContains(t){this.set("minContains",t)}get maxProperties(){return this.get("maxProperties")}set maxProperties(t){this.set("maxProperties",t)}get minProperties(){return this.get("minProperties")}set minProperties(t){this.set("minProperties",t)}get required(){return this.get("required")}set required(t){this.set("required",t)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(t){this.set("dependentRequired",t)}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}get readOnly(){return this.get("readOnly")}set readOnly(t){this.set("readOnly",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get format(){return this.get("format")}set format(t){this.set("format",t)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(t){this.set("contentEncoding",t)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(t){this.set("contentMediaType",t)}get contentSchema(){return this.get("contentSchema")}set contentSchema(t){this.set("contentSchema",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}}const jo=pI;class dI extends Mf{}const rm=dI;class hI extends eh{}const Bg=hI;class mI extends Lf{}const nm=mI;class vI extends Df{}const im=vI;class gI extends th{}const $g=gI;class yI extends rh{}const Ug=yI,bI=Oe(Dt,be,{props:{specPath:T(["document","objects","OpenApi"]),canSupportSpecificationExtensions:!0},init(){this.element=new Oa,this.openApiSemanticElement=this.element},methods:{ObjectElement(e){return this.openApiGenericElement=e,Dt.compose.methods.ObjectElement.call(this,e)}}}),{visitors:{document:{objects:{Info:{$visitor:xI}}}}}=ke,SI=Oe(xI,{init(){this.element=new Kh}}),wI=be,{visitors:{document:{objects:{Contact:{$visitor:OI}}}}}=ke,EI=Oe(OI,{init(){this.element=new Wh}}),{visitors:{document:{objects:{License:{$visitor:AI}}}}}=ke,CI=Oe(AI,{init(){this.element=new Jh}}),_I=be,{visitors:{document:{objects:{Link:{$visitor:PI}}}}}=ke,TI=Oe(PI,{init(){this.element=new Yh}}),VI=Oe(Qn,be,{methods:{StringElement(e){const t=new Nf(e.toValue());return this.copyMetaAndAttributes(e,t),this.element=t,pt}}}),{visitors:{document:{objects:{Server:{$visitor:kI}}}}}=ke,jI=Oe(kI,{init(){this.element=new nm}}),{visitors:{document:{objects:{ServerVariable:{$visitor:II}}}}}=ke,RI=Oe(II,{init(){this.element=new im}}),{visitors:{document:{objects:{MediaType:{$visitor:FI}}}}}=ke,MI=Oe(FI,{init(){this.element=new Xh}}),{visitors:{document:{objects:{SecurityRequirement:{$visitor:LI}}}}}=ke,DI=Oe(LI,{init(){this.element=new rm}}),{visitors:{document:{objects:{Components:{$visitor:NI}}}}}=ke,BI=Oe(NI,{init(){this.element=new Uh}}),{visitors:{document:{objects:{Tag:{$visitor:$I}}}}}=ke,UI=Oe($I,{init(){this.element=new $g}}),{visitors:{document:{objects:{Reference:{$visitor:WI}}}}}=ke,HI=Oe(WI,{init(){this.element=new Ea}}),zI=be,GI=be,{visitors:{document:{objects:{Parameter:{$visitor:KI}}}}}=ke,JI=Oe(KI,{init(){this.element=new Qh}}),{visitors:{document:{objects:{Header:{$visitor:YI}}}}}=ke,XI=Oe(YI,{init(){this.element=new Gh}}),QI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof $h||e(n)&&t("callback",n)&&r("object",n)),ZI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Uh||e(n)&&t("components",n)&&r("object",n)),qI=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Wh||e(n)&&t("contact",n)&&r("object",n)),eR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Hh||e(n)&&t("example",n)&&r("object",n)),tR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof zh||e(n)&&t("externalDocumentation",n)&&r("object",n)),rR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Gh||e(n)&&t("header",n)&&r("object",n)),nR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Kh||e(n)&&t("info",n)&&r("object",n)),Lb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Nf||e(n)&&t("jsonSchemaDialect",n)&&r("string",n)),iR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Jh||e(n)&&t("license",n)&&r("object",n)),Db=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Yh||e(n)&&t("link",n)&&r("object",n)),sm=e=>{if(!Db(e)||!Ct(e.operationRef))return!1;const t=e.operationRef.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},sR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Dg||e(n)&&t("openapi",n)&&r("string",n)),Wg=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof Oa||e(s)&&t("openApi3_1",s)&&r("object",s)&&n("api",s)),Nb=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Du||e(n)&&t("operation",n)&&r("object",n)),oR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Qh||e(n)&&t("parameter",n)&&r("object",n)),om=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Qs||e(n)&&t("pathItem",n)&&r("object",n)),am=e=>{if(!om(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},aR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Zh||e(n)&&t("paths",n)&&r("object",n)),Nu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Ea||e(n)&&t("reference",n)&&r("object",n)),lm=e=>{if(!Nu(e)||!Ct(e.$ref))return!1;const t=e.$ref.toValue();return typeof t=="string"&&t.length>0&&!t.startsWith("#")},lR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof qh||e(n)&&t("requestBody",n)&&r("object",n)),uR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof em||e(n)&&t("response",n)&&r("object",n)),cR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof tm||e(n)&&t("responses",n)&&r("object",n)),Bu=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof jo||e(n)&&t("schema",n)&&r("object",n)),Hg=e=>Dd(e)&&e.classes.includes("boolean-json-schema"),fR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof rm||e(n)&&t("securityRequirement",n)&&r("object",n)),pR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof nm||e(n)&&t("server",n)&&r("object",n)),dR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof im||e(n)&&t("serverVariable",n)&&r("object",n)),hR=tt(({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Xh||e(n)&&t("mediaType",n)&&r("object",n)),Io=Oe({props:{parent:null},init({parent:e=this.parent}){this.parent=e,this.passingOptionsNames=[...this.passingOptionsNames,"parent"]}}),mR=Oe(Dt,Io,be,{props:{specPath:T(["document","objects","Schema"]),canSupportSpecificationExtensions:!0},init(){const e=()=>{let n;return this.openApiSemanticElement!==null&&Lb(this.openApiSemanticElement.jsonSchemaDialect)?n=this.openApiSemanticElement.jsonSchemaDialect.toValue():this.openApiGenericElement!==null&&Ct(this.openApiGenericElement.get("jsonSchemaDialect"))?n=this.openApiGenericElement.get("jsonSchemaDialect").toValue():n=Nf.default.toValue(),n},t=n=>{if(bg(this.parent)&&!Ct(n.get("$schema")))this.element.setMetaProperty("inherited$schema",e());else if(Bu(this.parent)&&!Ct(n.get("$schema"))){var s,a;const p=bl((s=this.parent.meta.get("inherited$schema"))===null||s===void 0?void 0:s.toValue(),(a=this.parent.$schema)===null||a===void 0?void 0:a.toValue());this.element.setMetaProperty("inherited$schema",p)}},r=n=>{var s;const a=this.parent!==null?this.parent.getMetaProperty("inherited$id",[]).clone():new Te.ON,p=(s=n.get("$id"))===null||s===void 0?void 0:s.toValue();Cg(p)&&a.push(p),this.element.setMetaProperty("inherited$id",a)};this.ObjectElement=function(s){this.element=new jo,t(s),r(s),this.parent=this.element;const a=Dt.compose.methods.ObjectElement.call(this,s);return Ct(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),a},this.BooleanElement=function(s){return this.element=s.clone(),this.element.classes.push("boolean-json-schema"),pt}}}),vR=be,gR=Oe(be,{methods:{ObjectElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-$vocabulary"),pt}}}),yR=be,bR=be,xR=be,SR=be,wR=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("reference-value"),pt}}}),OR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-$defs")}}),ER=be,AR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-allOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),CR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-anyOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),_R=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-oneOf")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),PR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-dependentSchemas")}}),TR=Oe(Qn,Io,be,{init(){this.element=new Te.ON,this.element.classes.push("json-schema-prefixItems")},methods:{ArrayElement(e){return e.forEach(t=>{if(sr(t)){const r=this.toRefractedElement(["document","objects","Schema"],t);this.element.push(r)}else{const r=t.clone();this.element.push(r)}}),this.copyMetaAndAttributes(e,this.element),pt}}}),VR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-properties")}}),kR=Oe(Vt,Io,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Te.Sb,this.element.classes.push("json-schema-patternProperties")}}),jR=Oe(be,{methods:{StringElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt},ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-type"),pt}}}),IR=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-enum"),pt}}}),RR=be,FR=be,MR=be,LR=be,DR=be,NR=be,BR=be,$R=be,UR=be,WR=be,HR=be,zR=be,GR=be,KR=be,JR=be,YR=be,XR=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-required"),pt}}}),QR=Oe(be,{methods:{ObjectElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-dependentRequired"),pt}}}),ZR=be,qR=be,eF=be,tF=be,rF=be,nF=be,iF=Oe(be,{methods:{ArrayElement(e){return this.element=e.clone(),this.element.classes.push("json-schema-examples"),pt}}}),sF=be,oF=be,aF=be,lF=be,{visitors:{document:{objects:{Discriminator:{$visitor:uF}}}}}=ke,cF=Oe(uF,{props:{canSupportSpecificationExtensions:!0},init(){this.element=new Ig}}),{visitors:{document:{objects:{XML:{$visitor:fF}}}}}=ke,pF=Oe(fF,{init(){this.element=new Ug}}),dF=Oe(Vt,be,{props:{specPath:T(["document","objects","Schema"])},init(){this.element=new Eb}});class um extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(um.primaryClass)}}X(um,"primaryClass","components-path-items");const hF=um,mF=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new hF},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),t}}}),{visitors:{document:{objects:{Example:{$visitor:vF}}}}}=ke,gF=Oe(vF,{init(){this.element=new Hh}}),{visitors:{document:{objects:{ExternalDocumentation:{$visitor:yF}}}}}=ke,bF=Oe(yF,{init(){this.element=new zh}}),{visitors:{document:{objects:{Encoding:{$visitor:xF}}}}}=ke,SF=Oe(xF,{init(){this.element=new Rg}}),{visitors:{document:{objects:{Paths:{$visitor:wF}}}}}=ke,OF=Oe(wF,{init(){this.element=new Zh}}),{visitors:{document:{objects:{RequestBody:{$visitor:EF}}}}}=ke,AF=Oe(EF,{init(){this.element=new qh}}),{visitors:{document:{objects:{Callback:{$visitor:Bb}}}}}=ke,CF=Oe(Bb,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new $h},methods:{ObjectElement(e){const t=Bb.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),t}}}),{visitors:{document:{objects:{Response:{$visitor:_F}}}}}=ke,PF=Oe(_F,{init(){this.element=new em}}),{visitors:{document:{objects:{Responses:{$visitor:TF}}}}}=ke,VF=Oe(TF,{init(){this.element=new tm}}),{visitors:{document:{objects:{Operation:{$visitor:kF}}}}}=ke,jF=Oe(kF,{init(){this.element=new Du}}),{visitors:{document:{objects:{PathItem:{$visitor:IF}}}}}=ke,RF=Oe(IF,{init(){this.element=new Qs}}),{visitors:{document:{objects:{SecurityScheme:{$visitor:FF}}}}}=ke,MF=Oe(FF,{init(){this.element=new Bg}}),{visitors:{document:{objects:{OAuthFlows:{$visitor:LF}}}}}=ke,DF=Oe(LF,{init(){this.element=new Lg}}),{visitors:{document:{objects:{OAuthFlow:{$visitor:NF}}}}}=ke,BF=Oe(NF,{init(){this.element=new Mg}});class cm extends Te.Sb{constructor(t,r,n){super(t,r,n),this.classes.push(cm.primaryClass)}}X(cm,"primaryClass","webhooks");const $F=cm,UF=Oe(Vt,be,{props:{specPath:e=>xr(e)?["document","objects","Reference"]:["document","objects","PathItem"]},init(){this.element=new $F},methods:{ObjectElement(e){const t=Vt.compose.methods.ObjectElement.call(this,e);return this.element.filter(Nu).forEach(r=>{r.setMetaProperty("referenced-element","pathItem")}),this.element.filter(om).forEach((r,n)=>{r.setMetaProperty("webhook-name",n.toValue())}),t}}}),WF={visitors:{value:ke.visitors.value,document:{objects:{OpenApi:{$visitor:bI,fixedFields:{openapi:ke.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:VI,servers:ke.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:UF,components:{$ref:"#/visitors/document/objects/Components"},security:ke.visitors.document.objects.OpenApi.fixedFields.security,tags:ke.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:SI,fixedFields:{title:ke.visitors.document.objects.Info.fixedFields.title,description:ke.visitors.document.objects.Info.fixedFields.description,summary:wI,termsOfService:ke.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:ke.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:EI,fixedFields:{name:ke.visitors.document.objects.Contact.fixedFields.name,url:ke.visitors.document.objects.Contact.fixedFields.url,email:ke.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:CI,fixedFields:{name:ke.visitors.document.objects.License.fixedFields.name,identifier:_I,url:ke.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:jI,fixedFields:{url:ke.visitors.document.objects.Server.fixedFields.url,description:ke.visitors.document.objects.Server.fixedFields.description,variables:ke.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:RI,fixedFields:{enum:ke.visitors.document.objects.ServerVariable.fixedFields.enum,default:ke.visitors.document.objects.ServerVariable.fixedFields.default,description:ke.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:BI,fixedFields:{schemas:dF,responses:ke.visitors.document.objects.Components.fixedFields.responses,parameters:ke.visitors.document.objects.Components.fixedFields.parameters,examples:ke.visitors.document.objects.Components.fixedFields.examples,requestBodies:ke.visitors.document.objects.Components.fixedFields.requestBodies,headers:ke.visitors.document.objects.Components.fixedFields.headers,securitySchemes:ke.visitors.document.objects.Components.fixedFields.securitySchemes,links:ke.visitors.document.objects.Components.fixedFields.links,callbacks:ke.visitors.document.objects.Components.fixedFields.callbacks,pathItems:mF}},Paths:{$visitor:OF},PathItem:{$visitor:RF,fixedFields:{$ref:ke.visitors.document.objects.PathItem.fixedFields.$ref,summary:ke.visitors.document.objects.PathItem.fixedFields.summary,description:ke.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:ke.visitors.document.objects.PathItem.fixedFields.servers,parameters:ke.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:jF,fixedFields:{tags:ke.visitors.document.objects.Operation.fixedFields.tags,summary:ke.visitors.document.objects.Operation.fixedFields.summary,description:ke.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:ke.visitors.document.objects.Operation.fixedFields.operationId,parameters:ke.visitors.document.objects.Operation.fixedFields.parameters,requestBody:ke.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:ke.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:ke.visitors.document.objects.Operation.fixedFields.deprecated,security:ke.visitors.document.objects.Operation.fixedFields.security,servers:ke.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:bF,fixedFields:{description:ke.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:ke.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:JI,fixedFields:{name:ke.visitors.document.objects.Parameter.fixedFields.name,in:ke.visitors.document.objects.Parameter.fixedFields.in,description:ke.visitors.document.objects.Parameter.fixedFields.description,required:ke.visitors.document.objects.Parameter.fixedFields.required,deprecated:ke.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:ke.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:ke.visitors.document.objects.Parameter.fixedFields.style,explode:ke.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:ke.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.Parameter.fixedFields.example,examples:ke.visitors.document.objects.Parameter.fixedFields.examples,content:ke.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:AF,fixedFields:{description:ke.visitors.document.objects.RequestBody.fixedFields.description,content:ke.visitors.document.objects.RequestBody.fixedFields.content,required:ke.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:MI,fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.MediaType.fixedFields.example,examples:ke.visitors.document.objects.MediaType.fixedFields.examples,encoding:ke.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:SF,fixedFields:{contentType:ke.visitors.document.objects.Encoding.fixedFields.contentType,headers:ke.visitors.document.objects.Encoding.fixedFields.headers,style:ke.visitors.document.objects.Encoding.fixedFields.style,explode:ke.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:ke.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:VF,fixedFields:{default:ke.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:PF,fixedFields:{description:ke.visitors.document.objects.Response.fixedFields.description,headers:ke.visitors.document.objects.Response.fixedFields.headers,content:ke.visitors.document.objects.Response.fixedFields.content,links:ke.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:CF},Example:{$visitor:gF,fixedFields:{summary:ke.visitors.document.objects.Example.fixedFields.summary,description:ke.visitors.document.objects.Example.fixedFields.description,value:ke.visitors.document.objects.Example.fixedFields.value,externalValue:ke.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:TI,fixedFields:{operationRef:ke.visitors.document.objects.Link.fixedFields.operationRef,operationId:ke.visitors.document.objects.Link.fixedFields.operationId,parameters:ke.visitors.document.objects.Link.fixedFields.parameters,requestBody:ke.visitors.document.objects.Link.fixedFields.requestBody,description:ke.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:XI,fixedFields:{description:ke.visitors.document.objects.Header.fixedFields.description,required:ke.visitors.document.objects.Header.fixedFields.required,deprecated:ke.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:ke.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:ke.visitors.document.objects.Header.fixedFields.style,explode:ke.visitors.document.objects.Header.fixedFields.explode,allowReserved:ke.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:ke.visitors.document.objects.Header.fixedFields.example,examples:ke.visitors.document.objects.Header.fixedFields.examples,content:ke.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:UI,fixedFields:{name:ke.visitors.document.objects.Tag.fixedFields.name,description:ke.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:HI,fixedFields:{$ref:ke.visitors.document.objects.Reference.fixedFields.$ref,summary:zI,description:GI}},Schema:{$visitor:mR,fixedFields:{$schema:vR,$vocabulary:gR,$id:yR,$anchor:bR,$dynamicAnchor:xR,$dynamicRef:SR,$ref:wR,$defs:OR,$comment:ER,allOf:AR,anyOf:CR,oneOf:_R,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:PR,prefixItems:TR,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:VR,patternProperties:kR,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:jR,enum:IR,const:RR,multipleOf:FR,maximum:MR,exclusiveMaximum:LR,minimum:DR,exclusiveMinimum:NR,maxLength:BR,minLength:$R,pattern:UR,maxItems:WR,minItems:HR,uniqueItems:zR,maxContains:GR,minContains:KR,maxProperties:JR,minProperties:YR,required:XR,dependentRequired:QR,title:ZR,description:qR,default:eF,deprecated:tF,readOnly:rF,writeOnly:nF,examples:iF,format:sF,contentEncoding:oF,contentMediaType:aF,contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:lF}},Discriminator:{$visitor:cF,fixedFields:{propertyName:ke.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:ke.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:pF,fixedFields:{name:ke.visitors.document.objects.XML.fixedFields.name,namespace:ke.visitors.document.objects.XML.fixedFields.namespace,prefix:ke.visitors.document.objects.XML.fixedFields.prefix,attribute:ke.visitors.document.objects.XML.fixedFields.attribute,wrapped:ke.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:MF,fixedFields:{type:ke.visitors.document.objects.SecurityScheme.fixedFields.type,description:ke.visitors.document.objects.SecurityScheme.fixedFields.description,name:ke.visitors.document.objects.SecurityScheme.fixedFields.name,in:ke.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:ke.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:ke.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:ke.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:DF,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:BF,fixedFields:{authorizationUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:ke.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:ke.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:DI}},extension:{$visitor:ke.visitors.document.extension.$visitor}}}};function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function HF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Zn=e=>{if(Ld(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},ai=HF({CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"]},Iu),fm={namespace:e=>{const{base:t}=e;return t.register("callback",$h),t.register("components",Uh),t.register("contact",Wh),t.register("discriminator",Ig),t.register("encoding",Rg),t.register("example",Hh),t.register("externalDocumentation",zh),t.register("header",Gh),t.register("info",Kh),t.register("jsonSchemaDialect",Nf),t.register("license",Jh),t.register("link",Yh),t.register("mediaType",Xh),t.register("oAuthFlow",Mg),t.register("oAuthFlows",Lg),t.register("openapi",Dg),t.register("openApi3_1",Oa),t.register("operation",Du),t.register("parameter",Qh),t.register("pathItem",Qs),t.register("paths",Zh),t.register("reference",Ea),t.register("requestBody",qh),t.register("response",em),t.register("responses",tm),t.register("schema",jo),t.register("securityRequirement",rm),t.register("securityScheme",Bg),t.register("server",nm),t.register("serverVariable",im),t.register("tag",$g),t.register("xml",Ug),t}};function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Wb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Hb=()=>{const e=ku(fm);return{predicates:Wb(Wb({},j),{},{isStringElement:Ct,isArrayElement:Gi,isObjectElement:sr,includesClasses:ff}),namespace:e}};function zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function zF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zb(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const GF=(e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=(0,Te.Qc)(e),s=Xd(WF),a=Tu(t,[],s);return Nn(n,a,{state:{specObj:s}}),hf(a.element,r,{toolboxCreator:Hb,visitorOptions:{keyMap:ai,nodeTypeGetter:Zn}})},ur=e=>(t,r={})=>GF(t,zF({specPath:e},r)),pz=null;$h.refract=ur(["visitors","document","objects","Callback","$visitor"]),Uh.refract=ur(["visitors","document","objects","Components","$visitor"]),Wh.refract=ur(["visitors","document","objects","Contact","$visitor"]),Hh.refract=ur(["visitors","document","objects","Example","$visitor"]),Ig.refract=ur(["visitors","document","objects","Discriminator","$visitor"]),Rg.refract=ur(["visitors","document","objects","Encoding","$visitor"]),zh.refract=ur(["visitors","document","objects","ExternalDocumentation","$visitor"]),Gh.refract=ur(["visitors","document","objects","Header","$visitor"]),Kh.refract=ur(["visitors","document","objects","Info","$visitor"]),Nf.refract=ur(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),Jh.refract=ur(["visitors","document","objects","License","$visitor"]),Yh.refract=ur(["visitors","document","objects","Link","$visitor"]),Xh.refract=ur(["visitors","document","objects","MediaType","$visitor"]),Mg.refract=ur(["visitors","document","objects","OAuthFlow","$visitor"]),Lg.refract=ur(["visitors","document","objects","OAuthFlows","$visitor"]),Dg.refract=ur(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Oa.refract=ur(["visitors","document","objects","OpenApi","$visitor"]),Du.refract=ur(["visitors","document","objects","Operation","$visitor"]),Qh.refract=ur(["visitors","document","objects","Parameter","$visitor"]),Qs.refract=ur(["visitors","document","objects","PathItem","$visitor"]),Zh.refract=ur(["visitors","document","objects","Paths","$visitor"]),Ea.refract=ur(["visitors","document","objects","Reference","$visitor"]),qh.refract=ur(["visitors","document","objects","RequestBody","$visitor"]),em.refract=ur(["visitors","document","objects","Response","$visitor"]),tm.refract=ur(["visitors","document","objects","Responses","$visitor"]),jo.refract=ur(["visitors","document","objects","Schema","$visitor"]),rm.refract=ur(["visitors","document","objects","SecurityRequirement","$visitor"]),Bg.refract=ur(["visitors","document","objects","SecurityScheme","$visitor"]),nm.refract=ur(["visitors","document","objects","Server","$visitor"]),im.refract=ur(["visitors","document","objects","ServerVariable","$visitor"]),$g.refract=ur(["visitors","document","objects","Tag","$visitor"]),Ug.refract=ur(["visitors","document","objects","XML","$visitor"]);class KF extends Array{constructor(...t){super(...t),X(this,"unknownMediaType","application/octet-stream")}filterByFormat(){throw new Error("Not implemented!")}findBy(){throw new Error("Not implemented")}latest(){throw new Error("Not implemented!")}}const JF=KF;class zg extends JF{filterByFormat(t="generic"){const r=t==="generic"?"openapi;version":t;return this.filter(n=>n.includes(r))}findBy(t="3.1.0",r="generic"){const n=r==="generic"?`vnd.oai.openapi;version=${t}`:`vnd.oai.openapi+${r};version=${t}`;return this.find(a=>a.includes(n))||this.unknownMediaType}latest(t="generic"){return Au(this.filterByFormat(t))}}const wl=new zg("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");var pm=c(73656),YF=jd(function(e,t){return Jr(gg(""),TE(Md(e)),b0(""))(t)});const XF=YF;var QF=Eu(_o);const dm=QF;var ZF=lr(1,Jr(zi,xa("RegExp")));const qF=ZF;var eM=kA(Sl,Pu(/[.*+?^${}()|[\]\\-]/g,"\\$&"));const tM=eM;var rM=function(t,r,n){if(n==null||t==null||r==null)throw TypeError("Input values must not be `null` or `undefined`")},Gb=function(t,r){if(typeof t!="string"&&!(t instanceof String))throw TypeError("`".concat(r,"` must be a string"))},nM=function(t){if(typeof t!="string"&&!(t instanceof String)&&!(t instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")},iM=function(t,r,n){rM(t,r,n),Gb(n,"str"),Gb(r,"replaceValue"),nM(t);var s=new RegExp(qF(t)?t:tM(t),"g");return Pu(s,r,n)},sM=lr(3,iM),oM=mg(2,"replaceAll"),aM=Po(String.prototype.replaceAll)?oM:sM;const lM=aM,Gg=()=>Cu(Rd(/^win/),["platform"],pm),Kg=e=>{try{const t=new URL(e);return XF(":",t.protocol)}catch(t){return}},mz=Jr(Kg,dm),uM=e=>{const t=e.lastIndexOf(".");return t>=0?e.substr(t).toLowerCase():""},Bf=e=>{if(pm.browser)return!1;const t=Kg(e);return _o(t)||t==="file"||/^[a-zA-Z]$/.test(t)},$f=e=>{const t=Kg(e);return t==="http"||t==="https"},vz=e=>{try{return new URL(e)&&!0}catch(t){return!1}},Kb=(e,t)=>{const r=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],n=_u(!1,"keepFileProtocol",t),s=_u(Gg,"isWindows",t);let a=decodeURI(e);for(let d=0;d<r.length;d+=2)a=a.replace(r[d],r[d+1]);let p=a.substr(0,7).toLowerCase()==="file://";return p&&(a=a[7]==="/"?a.substr(8):a.substr(7),s()&&a[1]==="/"&&(a=`${a[0]}:${a.substr(1)}`),n?a=`file:///${a}`:(p=!1,a=s()?a:`/${a}`)),s()&&!p&&(a=lM("/","\\",a),a.substr(1,2)===":\\"&&(a=a[0].toUpperCase()+a.substr(1))),a},cM=e=>{const t=[/\?/g,"%3F",/#/g,"%23"];let r=e;Gg()&&(r=r.replace(/\\/g,"/")),r=encodeURI(r);for(let n=0;n<t.length;n+=2)r=r.replace(t[n],t[n+1]);return r},Jb=e=>{const t=e.indexOf("#");return t!==-1?e.substr(t):"#"},ws=e=>{const t=e.indexOf("#");let r=e;return t>=0&&(r=e.substr(0,t)),r},Yb=()=>{if(pm.browser)return ws(globalThis.location.href);const e=pm.cwd(),t=Au(e);return["/","\\"].includes(t)?e:e+(Gg()?"\\":"/")},Ji=(e,t)=>{const r=new URL(t,new URL(e,"resolve://"));if(r.protocol==="resolve:"){const{pathname:n,search:s,hash:a}=r;return n+s+a}return r.toString()},Uf=e=>Bf(e)?cM(Kb(e)):encodeURI(decodeURI(e)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Oi=e=>Bf(e)?Kb(e):decodeURI(e),$u=Oe({props:{uri:"",value:null,depth:0,refSet:null,errors:[]},init({depth:e=this.depth,refSet:t=this.refSet,uri:r=this.uri,value:n=this.value}={}){this.uri=r,this.value=n,this.depth=e,this.refSet=t,this.errors=[]}}),hm=Oe({props:{rootRef:null,refs:[],circular:!1},init({refs:e=[]}={}){this.refs=[],e.forEach(t=>this.add(t))},methods:{get size(){return this.refs.length},add(e){return this.has(e)||(this.refs.push(e),this.rootRef=this.rootRef===null?e:this.rootRef,e.refSet=this),this},merge(e){for(const t of e.values())this.add(t);return this},has(e){const t=Sl(e)?e:e.uri;return dm(this.find(Id("uri",t)))},find(e){return this.refs.find(e)},*values(){yield*this.refs},clean(){this.refs.forEach(e=>{e.refSet=null}),this.refs=[]}}}),fM={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],external:!0,maxDepth:1/0},dereference:{strategies:[],refSet:null,maxDepth:1/0}},pM=R1(wi(["resolve","baseURI"]),ya(["resolve","baseURI"])),dM=e=>Z0(e)?Yb():e,hM=(e,t)=>{const r=G1(e,t);return Y1(pM,dM,r)},Ol=Oe({props:{uri:null,mediaType:"text/plain",data:null,parseResult:null},init({uri:e=this.uri,mediaType:t=this.mediaType,data:r=this.data,parseResult:n=this.parseResult}={}){this.uri=e,this.mediaType=t,this.data=r,this.parseResult=n},methods:{get extension(){return Sl(this.uri)?uM(this.uri):""},toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(zi(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}}});class mM extends Error{constructor(t,r){if(super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,pf(r)&&of("cause",r)&&!of("cause",this)){const{cause:n}=r;this.cause=n,of("stack",n)&&(this.stack=`${this.stack}
88
+ CAUSE: ${n==null?void 0:n.stack}`)}}}const Uu=mM;class vM extends Uu{constructor(t,r){super(t,{cause:r.cause}),X(this,"plugin",void 0),this.plugin=r.plugin}}const gM=vM,Jg=(e,t,r)=>et(this,null,function*(){const n=yield Promise.all(r.map(Tu([e],[t])));return r.filter((s,a)=>n[a])}),Yg=(e,t,r)=>et(this,null,function*(){let n;for(const s of r)try{const a=yield s[e].call(s,...t);return{plugin:s,result:a}}catch(a){n=new gM("Error while running plugin",{cause:a,plugin:s})}return Promise.reject(n)});class yM extends Uu{}const Yi=yM;class bM extends Yi{}const xM=bM;class SM extends Uu{}const Xb=SM,Qb=(e,t)=>et(this,null,function*(){let r=e,n=!1;if(!k0(e)){const p=new e.constructor(e.content,e.meta.clone(),e.attributes);p.classes.push("result"),r=new Ss([p]),n=!0}const s=Ol({uri:t.resolve.baseURI,parseResult:r,mediaType:t.parse.mediaType}),a=yield Jg("canDereference",s,t.dereference.strategies);if(lf(a))throw new xM(s.uri);try{const{result:p}=yield Yg("dereference",[s,t],a);return n?p.get(0):p}catch(p){throw new Xb(`Error while dereferencing file "${s.uri}"`,{cause:p})}}),Sz=(e,t)=>et(this,null,function*(){const{refSet:r}=t.dereference,n=url.sanitize(e);let s;r!==null&&r.has(n)?{value:s}=r.find(propEq("uri",n)):s=yield parse(e,t);const a=mergeOptions(t,{resolve:{baseURI:n}});return Qb(s,a)}),wz=null,Oz=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t),a=File({uri:url.sanitize(e)});return readFileFn(a,s)}),Ez=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return parseFn(e,s)}),Az=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return resolveFn(e,s)}),Cz=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return resolveApiDOMFn(e,s)}),_z=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=mergeOptions(defaultOptions,t);return dereferenceFn(e,s)}),wM=(r,...n)=>et(this,[r,...n],function*(e,t={}){const s=hM(fM,t);return Qb(e,s)});class OM extends Uu{constructor(t="Not Implemented",r){super(t,r)}}const El=OM,Wf=Oe({props:{name:"",allowEmpty:!0,sourceMap:!1,fileExtensions:[],mediaTypes:[]},init({allowEmpty:e=this.allowEmpty,sourceMap:t=this.sourceMap,fileExtensions:r=this.fileExtensions,mediaTypes:n=this.mediaTypes}={}){this.allowEmpty=e,this.sourceMap=t,this.fileExtensions=r,this.mediaTypes=n},methods:{canParse(){return et(this,null,function*(){throw new El})},parse(){return et(this,null,function*(){throw new El})}}}),EM=Oe(Wf,{props:{name:"binary"},methods:{canParse(e){return et(this,null,function*(){return this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension)})},parse(e){return et(this,null,function*(){try{const t=unescape(encodeURIComponent(e.toString())),r=btoa(t),n=new Ss;if(r.length!==0){const s=new Te.RP(r);s.classes.push("result"),n.push(s)}return n}catch(t){throw new Yi(`Error parsing "${e.uri}"`,{cause:t})}})}}}),AM=Oe({props:{name:null},methods:{canResolve(){return!1},resolve(){return et(this,null,function*(){throw new El})}}});var CM=lr(1,vl(Promise.all,Promise));const _M=CM;class PM extends Uu{}const mm=PM;class TM extends mm{}const Zb=TM;class VM extends Xb{}const Ro=VM;class kM extends mm{}const qb=kM,jM=(e,t)=>et(this,null,function*(){const r=t.resolve.resolvers.map(s=>{const a=Object.create(s);return Object.assign(a,t.resolve.resolverOpts)}),n=yield Jg("canRead",e,r);if(lf(n))throw new qb(e.uri);try{const{result:s}=yield Yg("read",[e],n);return s}catch(s){throw new mm(`Error while reading file "${e.uri}"`,{cause:s})}});function ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function tx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ex(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const IM=(e,t)=>et(this,null,function*(){const r=t.parse.parsers.map(s=>{const a=Object.create(s);return Object.assign(a,t.parse.parserOpts)}),n=yield Jg("canParse",e,r);if(lf(n))throw new qb(e.uri);try{const{plugin:s,result:a}=yield Yg("parse",[e],n);return!s.allowEmpty&&a.isEmpty?Promise.reject(new Yi(`Error while parsing file "${e.uri}". File is empty.`)):a}catch(s){throw new Yi(`Error while parsing file "${e.uri}"`,{cause:s})}}),rx=(e,t)=>et(this,null,function*(){const r=Ol({uri:Uf(ws(e)),mediaType:t.parse.mediaType}),n=yield jM(r,t);return IM(Ol(tx(tx({},r),{},{data:n})),t)}),Xg=jd((e,t)=>{const r=vC({predicate:e,returnOnTrue:pt});return Nn(t,r),S0(void 0,[0],r.result)});class Hf extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}class RM extends Uu{}const FM=RM;class MM extends FM{constructor(t){super(`Invalid JSON Schema $anchor "${t}".`)}}class LM extends Error{constructor(t){super(t),this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}const zf=e=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(e),Aa=e=>{const t=Jb(e);return Eg("#",t)},DM=e=>{if(!zf(e))throw new MM(e);return e},vm=(e,t)=>{const r=DM(e),n=Xg(s=>{var a;return Bu(s)&&((a=s.$anchor)===null||a===void 0?void 0:a.toValue())===r},t);if(_o(n))throw new LM(`Evaluation failed on token: "${r}"`);return n},gm=(e,t)=>{if(typeof t.$ref=="undefined")return;const r=Jb(t.$ref.toValue()),n=t.meta.get("inherited$id").toValue();return`${f((a,p)=>Ji(a,Uf(ws(p))),e,[...n,t.$ref.toValue()])}${r==="#"?"":r}`},NM=(e,t)=>{if(typeof t.$id=="undefined")return;const r=t.meta.get("inherited$id").toValue();return f((n,s)=>Ji(n,Uf(ws(s))),e,[...r,t.$id.toValue()])},Gf=e=>{if(Gf.cache.has(e))return Gf.cache.get(e);const t=jo.refract(e);return Gf.cache.set(e,t),t};Gf.cache=new WeakMap;const Xi=e=>To(e)?Gf(e):e,Qg=(e,t)=>{const r=ws(e),n=Xg(p=>!Bu(p)||typeof p.$id=="undefined"?!1:NM(r,p)===r,t);if(_o(n))throw new Hf(`Evaluation failed on URI: "${e}"`);let s,a;return zf(Aa(e))?(s=vm,a=Aa(e)):(s=Xn,a=Bn(e)),s(a,n)};function nx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ym(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nx(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Zg=Nn[Symbol.for("nodejs.util.promisify.custom")],bm=Oe({props:{indirections:[],namespace:null,reference:null,crawledElements:null,crawlingMap:null,visited:null,options:null},init({reference:e,namespace:t,indirections:r=[],visited:n=new WeakSet,options:s}){this.indirections=r,this.namespace=t,this.reference=e,this.crawledElements=[],this.crawlingMap={},this.visited=n,this.options=s},methods:{toBaseURI(e){return Ji(this.reference.uri,Uf(ws(e)))},toReference(e){return et(this,null,function*(){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Zb(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(Id("uri",t));const n=yield rx(Oi(t),ym(ym({},this.options),{},{parse:ym(ym({},this.options.parse),{},{mediaType:"text/plain"})})),s=$u({uri:t,value:n,depth:this.reference.depth+1});return r.add(s),s})},ReferenceElement(e){var t;if(!this.options.resolve.external&&lm(e))return!1;const r=(t=e.$ref)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r)),this.crawledElements.push(e)},PathItemElement(e){var t;if(!Ct(e.$ref)||!this.options.resolve.external&&am(e))return;const r=(t=e.$ref)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r)),this.crawledElements.push(e)},LinkElement(e){if(!(!Ct(e.operationRef)&&!Ct(e.operationId))&&!(!this.options.resolve.external&&sm(e))){if(Ct(e.operationRef)&&Ct(e.operationId))throw new Error("LinkElement operationRef and operationId are mutually exclusive.");if(sm(e)){var t;const r=(t=e.operationRef)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r))}}},ExampleElement(e){var t;if(!Ct(e.externalValue)||!this.options.resolve.external&&Ct(e.externalValue))return;if(e.hasKey("value")&&Ct(e.externalValue))throw new Error("ExampleElement value and externalValue fields are mutually exclusive.");const r=(t=e.externalValue)===null||t===void 0?void 0:t.toValue(),n=this.toBaseURI(r);xl(n,this.crawlingMap)||(this.crawlingMap[n]=this.toReference(r))},SchemaElement(e){if(this.visited.has(e))return!1;if(!Ct(e.$ref)){this.visited.add(e);return}const t=this.reference.uri,r=gm(t,e),n=ws(r),s=Ol({uri:n}),a=vg(h=>h.canRead(s),this.options.resolve.resolvers),p=!a,d=!a&&this.reference.uri!==n;if(!this.options.resolve.external&&d){this.visited.add(e);return}if(!xl(n,this.crawlingMap))try{a||p?this.crawlingMap[n]=this.reference:this.crawlingMap[n]=this.toReference(Oi(r))}catch(h){if(p&&h instanceof Hf)this.crawlingMap[n]=this.toReference(Oi(r));else throw h}this.crawledElements.push(e)},crawlReferenceElement(e){return et(this,null,function*(){var t;const r=yield this.toReference(e.$ref.toValue());this.indirections.push(e);const n=Bn((t=e.$ref)===null||t===void 0?void 0:t.toValue());let s=Xn(n,r.value.result);if(To(s)){const p=e.meta.get("referenced-element").toValue();xr(s)?(s=Ea.refract(s),s.setMetaProperty("referenced-element",p)):s=this.namespace.getElementClass(p).refract(s)}if(this.indirections.includes(s))throw new Error("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const a=bm({reference:r,namespace:this.namespace,indirections:[...this.indirections],options:this.options});yield Zg(s,a,{keyMap:ai,nodeTypeGetter:Zn}),yield a.crawl(),this.indirections.pop()})},crawlPathItemElement(e){return et(this,null,function*(){var t;const r=yield this.toReference(e.$ref.toValue());this.indirections.push(e);const n=Bn((t=e.$ref)===null||t===void 0?void 0:t.toValue());let s=Xn(n,r.value.result);if(To(s)&&(s=Qs.refract(s)),this.indirections.includes(s))throw new Error("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const a=bm({reference:r,namespace:this.namespace,indirections:[...this.indirections],options:this.options});yield Zg(s,a,{keyMap:ai,nodeTypeGetter:Zn}),yield a.crawl(),this.indirections.pop()})},crawlSchemaElement(e){return et(this,null,function*(){const t=this.reference.uri,r=gm(t,e),n=ws(r),s=Ol({uri:n}),a=vg(y=>y.canRead(s),this.options.resolve.resolvers),p=!a;this.indirections.push(e);let d,h;try{if(a||p)d=this.reference,h=Qg(r,Xi(d.value.result));else{d=yield this.toReference(Oi(r));const y=Bn(r);h=Xi(Xn(y,d.value.result))}}catch(y){if(p&&y instanceof Hf)if(zf(Aa(r))){d=yield this.toReference(Oi(r));const C=Aa(r);h=vm(C,Xi(d.value.result))}else{d=yield this.toReference(Oi(r));const C=Bn(r);h=Xi(Xn(C,d.value.result))}else throw y}if(this.visited.add(e),this.indirections.includes(h))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);const g=bm({reference:d,namespace:this.namespace,indirections:[...this.indirections],options:this.options,visited:this.visited});yield Zg(h,g,{keyMap:ai,nodeTypeGetter:Zn}),yield g.crawl(),this.indirections.pop()})},crawl(){return et(this,null,function*(){yield Jr(Pn,_M)(this.crawlingMap),this.crawlingMap=null;for(const e of this.crawledElements)Nu(e)?yield this.crawlReferenceElement(e):Bu(e)?yield this.crawlSchemaElement(e):om(e)&&(yield this.crawlPathItemElement(e))})}}}),BM=bm,$M=Nn[Symbol.for("nodejs.util.promisify.custom")],UM=Oe(AM,{init(){this.name="openapi-3-1"},methods:{canResolve(e){var t;return e.mediaType!=="text/plain"?wl.includes(e.mediaType):Wg((t=e.parseResult)===null||t===void 0?void 0:t.result)},resolve(e,t){return et(this,null,function*(){const r=ku(fm),n=$u({uri:e.uri,value:e.parseResult}),s=BM({reference:n,namespace:r,options:t}),a=hm();return a.add(n),yield $M(a.rootRef.value,s,{keyMap:ai,nodeTypeGetter:Zn}),yield s.crawl(),a})}}}),qg=e=>e.replace(/\s/g,""),ey=e=>e.replace(/\W/gi,"_"),WM=(e,t)=>{const r=ey(qg(t.toLowerCase())),n=ey(qg(e));return`${r}${n}`},HM=(e,t,r)=>{const n=qg(e);return n.length>0?ey(n):WM(t,r)},zM=({operationIdNormalizer:e=HM}={})=>({predicates:t,namespace:r})=>{const n=[],s=[],a=[];return{visitor:{OpenApi3_1Element:{leave(){const p=r1(d=>Yn(d.operationId),s);Object.entries(p).forEach(([d,h])=>{h.length<=1||h.forEach((g,y)=>{const C=`${d}${y+1}`;g.operationId=new r.elements.String(C)})}),a.forEach(d=>{var h;if(typeof d.operationId=="undefined")return;const g=String(Yn(d.operationId)),y=s.find(C=>Yn(C.meta.get("originalOperationId"))===g);typeof y!="undefined"&&(d.operationId=(h=y.operationId)===null||h===void 0?void 0:h.clone(),d.meta.set("originalOperationId",g),d.set("__originalOperationId",g))}),s.length=0,a.length=0}},PathItemElement:{enter(p){const d=bl("path",Yn(p.meta.get("path")));n.push(d)},leave(){n.pop()}},OperationElement:{enter(p){if(typeof p.operationId=="undefined")return;const d=String(Yn(p.operationId)),h=Au(n),g=bl("method",Yn(p.meta.get("http-method"))),y=e(d,h,g);d!==y&&(p.operationId=new r.elements.String(y),p.set("__originalOperationId",d),p.meta.set("originalOperationId",d),s.push(p))}},LinkElement:{leave(p){t.isLinkElement(p)&&typeof p.operationId!="undefined"&&a.push(p)}}}}},GM=()=>({predicates:e})=>{const t=(n,s)=>!e.isParameterElement(n)||!e.isParameterElement(s)||!e.isStringElement(n.name)||!e.isStringElement(n.in)||!e.isStringElement(s.name)||!e.isStringElement(s.in)?!1:Yn(n.name)===Yn(s.name)&&Yn(n.in)===Yn(s.in),r=[];return{visitor:{PathItemElement:{enter(n,s,a,p,d){if(d.some(e.isComponentsElement))return;const{parameters:h}=n;e.isArrayElement(h)?r.push([...h.content]):r.push([])},leave(){r.pop()}},OperationElement:{leave(n){const s=Au(r);if(!Array.isArray(s)||s.length===0)return;const a=S0([],["parameters","content"],n),p=TA(t,[...a,...s]);n.parameters=new Cb(p)}}}}},KM=()=>({predicates:e})=>{let t;return{visitor:{OpenApi3_1Element:{enter(r){e.isArrayElement(r.security)&&(t=r.security)},leave(){t=void 0}},OperationElement:{leave(r,n,s,a,p){if(p.some(e.isComponentsElement))return;if(typeof r.security=="undefined"&&typeof t!="undefined"){var g;r.security=new Pb((g=t)===null||g===void 0?void 0:g.content)}}}}}},JM=()=>({predicates:e})=>{let t;const r=[];return{visitor:{OpenApi3_1Element:{enter(n){if(e.isArrayElement(n.servers)){var s;t=(s=n.servers)===null||s===void 0?void 0:s.content}},leave(){t=void 0}},PathItemElement:{enter(n,s,a,p,d){if(d.some(e.isComponentsElement))return;typeof n.servers=="undefined"&&typeof t!="undefined"&&(n.servers=new Vb(t));const{servers:h}=n;typeof h!="undefined"&&e.isArrayElement(h)?r.push([...h.content]):r.push(void 0)},leave(){r.pop()}},OperationElement:{enter(n){const s=Au(r);typeof s!="undefined"&&(e.isArrayElement(n.servers)||(n.servers=new Tb(s)))}}}}},YM=()=>({predicates:e})=>({visitor:{ParameterElement:{leave(t,r,n,s,a){var p,d;if(!a.some(e.isComponentsElement)&&!(typeof t.schema=="undefined"||!e.isSchemaElement(t.schema))&&!(typeof((p=t.schema)===null||p===void 0?void 0:p.example)=="undefined"&&typeof((d=t.schema)===null||d===void 0?void 0:d.examples)=="undefined")){if(typeof t.examples!="undefined"&&e.isObjectElement(t.examples)){const h=t.examples.map(g=>{var y;return(y=g.value)===null||y===void 0?void 0:y.clone()});typeof t.schema.examples!="undefined"&&t.schema.set("examples",h),typeof t.schema.example!="undefined"&&t.schema.set("example",h);return}typeof t.example!="undefined"&&(typeof t.schema.examples!="undefined"&&t.schema.set("examples",[t.example.clone()]),typeof t.schema.example!="undefined"&&t.schema.set("example",t.example.clone()))}}}}}),XM=()=>({predicates:e})=>({visitor:{HeaderElement:{leave(t,r,n,s,a){var p,d;if(!a.some(e.isComponentsElement)&&!(typeof t.schema=="undefined"||!e.isSchemaElement(t.schema))&&!(typeof((p=t.schema)===null||p===void 0?void 0:p.example)=="undefined"&&typeof((d=t.schema)===null||d===void 0?void 0:d.examples)=="undefined")){if(typeof t.examples!="undefined"&&e.isObjectElement(t.examples)){const h=t.examples.map(g=>{var y;return(y=g.value)===null||y===void 0?void 0:y.clone()});typeof t.schema.examples!="undefined"&&t.schema.set("examples",h),typeof t.schema.example!="undefined"&&t.schema.set("example",h);return}typeof t.example!="undefined"&&(typeof t.schema.examples!="undefined"&&t.schema.set("examples",[t.example.clone()]),typeof t.schema.example!="undefined"&&t.schema.set("example",t.example.clone()))}}}}}),QM=e=>{if(!sr(e)||e.hasKey("$$normalized"))return e;const t=[zM({operationIdNormalizer:(n,s,a)=>ol({operationId:n},s,a,{v2OperationIdCompatibilityMode:!1})}),GM(),KM(),JM(),YM(),XM()],r=hf(e,t,{toolboxCreator:Hb,visitorOptions:{keyMap:ai,nodeTypeGetter:Zn}});return r.set("$$normalized",!0),r},ZM=e=>t=>{if(t!=null&&t.$$normalized)return t;const r=Oa.refract(t),n=e(r);return Yn(n)},ix=QM,qM=Oe({props:{name:null},methods:{canRead(){return!1},read(){return et(this,null,function*(){throw new El})}}}),sx=Oe(qM,{props:{timeout:5e3,redirects:5,withCredentials:!1},init({timeout:e=this.timeout,redirects:t=this.redirects,withCredentials:r=this.withCredentials}={}){this.timeout=e,this.redirects=t,this.withCredentials=r},methods:{canRead(e){return $f(e.uri)},read(){return et(this,null,function*(){throw new El})},getHttpClient(){throw new El}}}).compose({props:{name:"http-swagger-client",swaggerHTTPClient:Ns,swaggerHTTPClientConfig:{}},init(){let{swaggerHTTPClient:e=this.swaggerHTTPClient}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.swaggerHTTPClient=e},methods:{getHttpClient(){return this.swaggerHTTPClient},read(e){return et(this,null,function*(){const t=this.getHttpClient(),r=new AbortController,{signal:n}=r,s=setTimeout(()=>{r.abort()},this.timeout),a=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",p=this.redirects===0?"error":"follow",d=this.redirects>0?this.redirects:void 0;try{return(yield t(H({url:e.uri,signal:n,userFetch:(g,y)=>et(this,null,function*(){const C=yield fetch(g,y);return C.headers.delete("Content-Type"),C}),credentials:a,redirects:p,follow:d},this.swaggerHTTPClientConfig))).text.arrayBuffer()}catch(h){throw new mm(`Error downloading "${e.uri}"`,{cause:h})}finally{clearTimeout(s)}})}}}),ox=Wf.compose({props:{name:"json-swagger-client",fileExtensions:[".json"],mediaTypes:["application/json"]},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return JSON.parse(e.toString()),!0}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Yi("json-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();if(this.allowEmpty&&r.trim()==="")return t;try{const n=Q0(JSON.parse(r));return n.classes.push("result"),t.push(n),t}catch(n){throw new Yi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),ax=Wf.compose({props:{name:"yaml-1-2-swagger-client",fileExtensions:[".yaml",".yml"],mediaTypes:["text/yaml","application/yaml"]},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return cs.load(e.toString(),{schema:Di}),!0}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Yi("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();try{const n=cs.load(r,{schema:Di});if(this.allowEmpty&&typeof n=="undefined")return t;const s=Q0(n);return s.classes.push("result"),t.push(s),t}catch(n){throw new Yi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),lx=Wf.compose({props:{name:"openapi-json-3-1-swagger-client",fileExtensions:[".json"],mediaTypes:new zg(...wl.filterByFormat("generic"),...wl.filterByFormat("json")),detectionRegExp:new RegExp('"openapi"\\s*:\\s*"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))"')},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const n=e.toString();return JSON.parse(n),this.detectionRegExp.test(n)}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Yi("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();if(this.allowEmpty&&r.trim()==="")return t;try{const n=JSON.parse(r),s=Oa.refract(n,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(n){throw new Yi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),ux=Wf.compose({props:{name:"openapi-yaml-3-1-swagger-client",fileExtensions:[".yaml",".yml"],mediaTypes:new zg(...wl.filterByFormat("generic"),...wl.filterByFormat("yaml")),detectionRegExp:new RegExp(`(?<YAML>^(["']?)openapi\\2\\s*:\\s*(["']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>"openapi"\\s*:\\s*"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))")`,"m")},methods:{canParse(e){return et(this,null,function*(){const t=this.fileExtensions.length===0?!0:this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const n=e.toString();return cs.load(n),this.detectionRegExp.test(n)}catch(n){return!1}return!1})},parse(e){return et(this,null,function*(){if(this.sourceMap)throw new Yi("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Ss,r=e.toString();try{const n=cs.load(r,{schema:Di});if(this.allowEmpty&&typeof n=="undefined")return t;const s=Oa.refract(n,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(n){throw new Yi(`Error parsing "${e.uri}"`,{cause:n})}})}}}),e2=Oe({props:{name:null},methods:{canDereference(){return!1},dereference(){return et(this,null,function*(){throw new El})}}});function cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cx(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ty=Nn[Symbol.for("nodejs.util.promisify.custom")],Sm=Oe({props:{indirections:null,namespace:null,reference:null,options:null,ancestors:null},init({indirections:e=[],reference:t,namespace:r,options:n,ancestors:s=[]}){this.indirections=e,this.namespace=r,this.reference=t,this.options=n,this.ancestors=[...s]},methods:{toBaseURI(e){return Ji(this.reference.uri,Uf(ws(e)))},toAncestorLineage(e){const t=new WeakSet(e.flat());return[[...this.ancestors,t],t]},toReference(e){return et(this,null,function*(){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Zb(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(Id("uri",t));const n=yield rx(Oi(t),xm(xm({},this.options),{},{parse:xm(xm({},this.options.parse),{},{mediaType:"text/plain"})})),s=$u({uri:t,value:n,depth:this.reference.depth+1});return r.add(s),s})},ReferenceElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g;const[y,C]=this.toAncestorLineage(s);if(y.some(ye=>ye.has(e))||!this.options.resolve.external&&lm(e))return!1;const M=yield this.toReference((a=e.$ref)===null||a===void 0?void 0:a.toValue()),I=M.uri,B=Ji(I,(p=e.$ref)===null||p===void 0?void 0:p.toValue());this.indirections.push(e);const z=Bn(B);let W=Xn(z,M.value.result);if(To(W)){const ye=e.meta.get("referenced-element").toValue();xr(W)?(W=Ea.refract(W),W.setMetaProperty("referenced-element",ye)):W=this.namespace.getElementClass(ye).refract(W)}if(this.indirections.includes(W))throw new Error("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);C.add(e);const G=Sm({reference:M,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:y});W=yield ty(W,G,{keyMap:ai,nodeTypeGetter:Zn}),C.delete(e),this.indirections.pop(),W=W.clone(),W.setMetaProperty("ref-fields",{$ref:(d=e.$ref)===null||d===void 0?void 0:d.toValue(),description:(h=e.description)===null||h===void 0?void 0:h.toValue(),summary:(g=e.summary)===null||g===void 0?void 0:g.toValue()}),W.setMetaProperty("ref-origin",M.uri);const te=Cu(dm,["description"],e),le=Cu(dm,["summary"],e);return te&&of("description",W)&&(W.description=e.description),le&&of("summary",W)&&(W.summary=e.summary),this.indirections.pop(),W})},PathItemElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d;const[h,g]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(h.some(G=>G.has(e)))return!1;if(!this.options.resolve.external&&am(e))return;const y=yield this.toReference((a=e.$ref)===null||a===void 0?void 0:a.toValue()),C=y.uri,M=Ji(C,(p=e.$ref)===null||p===void 0?void 0:p.toValue());this.indirections.push(e);const I=Bn(M);let B=Xn(I,y.value.result);if(To(B)&&(B=Qs.refract(B)),this.indirections.includes(B))throw new Error("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);g.add(e);const z=Sm({reference:y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:h});B=yield ty(B,z,{keyMap:ai,nodeTypeGetter:Zn}),g.delete(e),this.indirections.pop();const W=new Qs([...B.content],B.meta.clone(),B.attributes.clone());return e.forEach((G,te,le)=>{W.remove(te.toValue()),W.content.push(le)}),W.remove("$ref"),W.setMetaProperty("ref-fields",{$ref:(d=e.$ref)===null||d===void 0?void 0:d.toValue()}),W.setMetaProperty("ref-origin",y.uri),W})},LinkElement(e){return et(this,null,function*(){if(!Ct(e.operationRef)&&!Ct(e.operationId)||!this.options.resolve.external&&sm(e))return;if(Ct(e.operationRef)&&Ct(e.operationId))throw new Error("LinkElement operationRef and operationId fields are mutually exclusive.");let t;if(Ct(e.operationRef)){var r,n,s;const d=Bn((r=e.operationRef)===null||r===void 0?void 0:r.toValue()),h=yield this.toReference((n=e.operationRef)===null||n===void 0?void 0:n.toValue());t=Xn(d,h.value.result),To(t)&&(t=Du.refract(t)),t=new Du([...t.content],t.meta.clone(),t.attributes.clone()),t.setMetaProperty("ref-origin",h.uri),(s=e.operationRef)===null||s===void 0||s.meta.set("operation",t)}else if(Ct(e.operationId)){var a,p;const d=(a=e.operationId)===null||a===void 0?void 0:a.toValue();if(t=Xg(h=>Nb(h)&&h.operationId.equals(d),this.reference.value.result),_o(t))throw new Error(`OperationElement(operationId=${d}) not found.`);(p=e.operationId)===null||p===void 0||p.meta.set("operation",t)}})},ExampleElement(e){return et(this,null,function*(){var t;if(!Ct(e.externalValue)||!this.options.resolve.external&&Ct(e.externalValue))return;if(e.hasKey("value")&&Ct(e.externalValue))throw new Error("ExampleElement value and externalValue fields are mutually exclusive.");const r=yield this.toReference((t=e.externalValue)===null||t===void 0?void 0:t.toValue()),n=new r.value.result.constructor(r.value.result.content,r.value.result.meta.clone(),r.value.result.attributes.clone());n.setMetaProperty("ref-origin",r.uri),e.value=n})},SchemaElement(e,t,r,n,s){return et(this,null,function*(){var a;const[p,d]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(p.some(ye=>ye.has(e)))return!1;let{reference:h}=this,{uri:g}=h;const y=gm(g,e),C=ws(y),M=Ol({uri:C}),I=vg(ye=>ye.canRead(M),this.options.resolve.resolvers),B=!I,z=B&&g!==C;if(!this.options.resolve.external&&z)return;this.indirections.push(e);let W;try{if(I||B)W=Qg(y,Xi(h.value.result));else{h=yield this.toReference(Oi(y));const ye=Bn(y);W=Xi(Xn(ye,h.value.result))}}catch(ye){if(B&&ye instanceof Hf)if(zf(Aa(y))){h=yield this.toReference(Oi(y)),g=h.uri;const he=Aa(y);W=vm(he,Xi(h.value.result))}else{h=yield this.toReference(Oi(y)),g=h.uri;const he=Bn(y);W=Xi(Xn(he,h.value.result))}else throw ye}if(this.indirections.includes(W))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);d.add(e);const G=Sm({reference:h,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:p});if(W=yield ty(W,G,{keyMap:ai,nodeTypeGetter:Zn}),d.delete(e),this.indirections.pop(),Hg(W)){var te;const ye=W.clone();return ye.setMetaProperty("ref-fields",{$ref:(te=e.$ref)===null||te===void 0?void 0:te.toValue()}),ye.setMetaProperty("ref-origin",h.uri),ye}const le=new jo([...W.content],W.meta.clone(),W.attributes.clone());return e.forEach((ye,he,Ee)=>{le.remove(he.toValue()),le.content.push(Ee)}),le.remove("$ref"),le.setMetaProperty("ref-fields",{$ref:(a=e.$ref)===null||a===void 0?void 0:a.toValue()}),le.setMetaProperty("ref-origin",h.uri),le})}}}),ry=Sm,t2=Nn[Symbol.for("nodejs.util.promisify.custom")],fx=Oe(e2,{init(){this.name="openapi-3-1"},methods:{canDereference(e){var t;return e.mediaType!=="text/plain"?wl.includes(e.mediaType):Wg((t=e.parseResult)===null||t===void 0?void 0:t.result)},dereference(e,t){return et(this,null,function*(){const r=ku(fm),n=bl(hm(),t.dereference.refSet);let s;n.has(e.uri)?s=n.find(Id("uri",e.uri)):(s=$u({uri:e.uri,value:e.parseResult}),n.add(s));const a=ry({reference:s,namespace:r,options:t}),p=yield t2(n.rootRef.value,a,{keyMap:ai,nodeTypeGetter:Zn});return t.dereference.refSet===null&&n.clean(),p})}}}),r2=e=>e.slice(2),Os=e=>{const t=r2(e);return t.reduce((r,n,s)=>{if(Vu(n)){const a=String(n.key.toValue());r.push(a)}else if(Gi(t[s-2])){const a=t[s-2].content.indexOf(n);r.push(a)}return r},[])},wm=e=>{if(e.cause==null)return e;let{cause:t}=e;for(;t.cause!=null;)t=t.cause;return t},n2=cu("SchemaRefError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),{wrapError:ny}=Nc,iy=Nn[Symbol.for("nodejs.util.promisify.custom")],Om=ry.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,basePath:null},init(e){let{allowMetaPatches:t=this.allowMetaPatches,useCircularStructures:r=this.useCircularStructures,basePath:n=this.basePath}=e;this.allowMetaPatches=t,this.useCircularStructures=r,this.basePath=n},methods:{ReferenceElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y,C,M;try{const[I,B]=this.toAncestorLineage(s);if(ff(["cycle"],e.$ref)||I.some(me=>me.has(e))||!this.options.resolve.external&&lm(e))return!1;const z=yield this.toReference(e.$ref.toValue()),W=z.uri,G=Ji(W,e.$ref.toValue());this.indirections.push(e);const te=Bn(G);let le=Xn(te,z.value.result);if(To(le)){const me=e.meta.get("referenced-element").toValue();xr(le)?(le=Ea.refract(le),le.setMetaProperty("referenced-element",me)):le=this.namespace.getElementClass(me).refract(le)}if(this.indirections.includes(le))throw new Error("Recursive JSON Pointer detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);B.add(e);const ye=Om({reference:z,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:I,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(le=yield iy(le,ye,{keyMap:ai,nodeTypeGetter:Zn}),B.delete(e),this.indirections.pop(),!this.useCircularStructures&&I.some(ve=>ve.has(le))){if($f(W)||Bf(W)){const ve=new Ea({$ref:G},e.meta.clone(),e.attributes.clone());return ve.get("$ref").classes.push("cycle"),ve}return!1}le=le.clone(),le.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue(),description:(d=e.description)==null?void 0:d.toValue(),summary:(h=e.summary)==null?void 0:h.toValue()}),le.setMetaProperty("ref-origin",z.uri);const he=typeof e.description!="undefined",Ee=typeof e.summary!="undefined";if(he&&"description"in le&&(le.description=e.description),Ee&&"summary"in le&&(le.summary=e.summary),this.allowMetaPatches&&sr(le)){const me=le;if(typeof me.get("$$ref")=="undefined"){const ve=Ji(W,G);me.set("$$ref",ve)}}return le}catch(I){const B=wm(I),z=ny(B,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),pointer:Bn(e.$ref.toValue()),fullPath:(g=this.basePath)!=null?g:[...Os([...s,r,e]),"$ref"]});(M=(C=(y=this.options.dereference.dereferenceOpts)==null?void 0:y.errors)==null?void 0:C.push)==null||M.call(C,z);return}})},PathItemElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y;try{const[C,M]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(ff(["cycle"],e.$ref)||C.some(ye=>ye.has(e)))return!1;if(!this.options.resolve.external&&am(e))return;const I=yield this.toReference(e.$ref.toValue()),B=I.uri,z=Ji(B,e.$ref.toValue());this.indirections.push(e);const W=Bn(z);let G=Xn(W,I.value.result);if(To(G)&&(G=Qs.refract(G)),this.indirections.includes(G))throw new Error("Recursive JSON Pointer detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);M.add(e);const te=Om({reference:I,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:C,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(G=yield iy(G,te,{keyMap:ai,nodeTypeGetter:Zn}),M.delete(e),this.indirections.pop(),!this.useCircularStructures&&C.some(he=>he.has(G))){if($f(B)||Bf(B)){const he=new Qs({$ref:z},e.meta.clone(),e.attributes.clone());return he.get("$ref").classes.push("cycle"),he}return!1}const le=new Qs([...G.content],G.meta.clone(),G.attributes.clone());if(e.forEach((ye,he,Ee)=>{le.remove(he.toValue()),le.content.push(Ee)}),le.remove("$ref"),le.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue()}),le.setMetaProperty("ref-origin",I.uri),this.allowMetaPatches&&typeof le.get("$$ref")=="undefined"){const ye=Ji(B,z);le.set("$$ref",ye)}return le}catch(C){const M=wm(C),I=ny(M,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),pointer:Bn(e.$ref.toValue()),fullPath:(d=this.basePath)!=null?d:[...Os([...s,r,e]),"$ref"]});(y=(g=(h=this.options.dereference.dereferenceOpts)==null?void 0:h.errors)==null?void 0:g.push)==null||y.call(g,I);return}})},SchemaElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g,y,C;try{const[M,I]=this.toAncestorLineage(s);if(!Ct(e.$ref))return;if(ff(["cycle"],e.$ref)||M.some(ce=>ce.has(e)))return!1;let{reference:B}=this,{uri:z}=B;const W=gm(z,e),G=ws(W),te=Ol({uri:G}),le=!this.options.resolve.resolvers.some(ce=>ce.canRead(te)),ye=!le,he=ye&&z!==G;if(!this.options.resolve.external&&he)return;this.indirections.push(e);let Ee;try{if(le||ye)Ee=Qg(W,Xi(B.value.result));else{B=yield this.toReference(Oi(W)),z=B.uri;const ce=Bn(W);Ee=Xi(Xn(ce,B.value.result))}}catch(ce){if(ye&&ce instanceof Hf)if(zf(Aa(W))){B=yield this.toReference(Oi(W)),z=B.uri;const Se=Aa(W);Ee=vm(Se,Xi(B.value.result))}else{B=yield this.toReference(Oi(W)),z=B.uri;const Se=Bn(W);Ee=Xi(Xn(Se,B.value.result))}else throw ce}if(this.indirections.includes(Ee))throw new Error("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Ro(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);I.add(e);const me=Om({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:M,basePath:(a=this.basePath)!=null?a:[...Os([...s,r,e]),"$ref"]});if(Ee=yield iy(Ee,me,{keyMap:ai,nodeTypeGetter:Zn}),I.delete(e),this.indirections.pop(),Hg(Ee)){const ce=Ee.clone();return ce.setMetaProperty("ref-fields",{$ref:(p=e.$ref)==null?void 0:p.toValue()}),ce.setMetaProperty("ref-origin",z),ce}if(!this.useCircularStructures&&M.some(Se=>Se.has(Ee))){if($f(z)||Bf(z)){const Se=Ji(z,W),Ce=new jo({$ref:Se},e.meta.clone(),e.attributes.clone());return Ce.get("$ref").classes.push("cycle"),Ce}return!1}const ve=new jo([...Ee.content],Ee.meta.clone(),Ee.attributes.clone());if(e.forEach((ce,Se,Ce)=>{ve.remove(Se.toValue()),ve.content.push(Ce)}),ve.remove("$ref"),ve.setMetaProperty("ref-fields",{$ref:(d=e.$ref)==null?void 0:d.toValue()}),ve.setMetaProperty("ref-origin",z),this.allowMetaPatches&&typeof ve.get("$$ref")=="undefined"){const ce=Ji(z,W);ve.set("$$ref",ce)}return ve}catch(M){const I=wm(M),B=new n2(`Could not resolve reference: ${I.message}`,{baseDoc:this.reference.uri,$ref:e.$ref.toValue(),fullPath:(h=this.basePath)!=null?h:[...Os([...s,r,e]),"$ref"]},I);(C=(y=(g=this.options.dereference.dereferenceOpts)==null?void 0:g.errors)==null?void 0:y.push)==null||C.call(y,B);return}})},LinkElement(){return et(this,null,function*(){})},ExampleElement(e,t,r,n,s){return et(this,null,function*(){var a,p,d,h,g;try{return yield ry.compose.methods.ExampleElement.call(this,e,t,r,n,s)}catch(y){const C=wm(y),M=ny(C,{baseDoc:this.reference.uri,externalValue:(a=e.externalValue)==null?void 0:a.toValue(),fullPath:(p=this.basePath)!=null?p:[...Os([...s,r,e]),"externalValue"]});(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,M);return}})}}}),i2=Om,sy=fx.compose.bind(),s2=sy({init(e){let{parameterMacro:t,options:r}=e;this.parameterMacro=t,this.options=r},props:{parameterMacro:null,options:null,macroOperation:null,OperationElement:{enter(e){this.macroOperation=e},leave(){this.macroOperation=null}},ParameterElement:{leave(e,t,r,n,s){var d,h,g;const a=this.macroOperation===null?null:Yn(this.macroOperation),p=Yn(e);try{const y=this.parameterMacro(a,p);e.set("default",y)}catch(y){const C=new Error(y,{cause:y});C.fullPath=Os([...s,r]),(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,C)}}}}}),o2=sy({init(e){let{modelPropertyMacro:t,options:r}=e;this.modelPropertyMacro=t,this.options=r},props:{modelPropertyMacro:null,options:null,SchemaElement:{leave(e,t,r,n,s){typeof e.properties!="undefined"&&sr(e.properties)&&e.properties.forEach(a=>{var p,d,h;if(sr(a))try{const g=this.modelPropertyMacro(Yn(a));a.set("default",g)}catch(g){const y=new Error(g,{cause:g});y.fullPath=[...Os([...s,r,e]),"properties"],(h=(d=(p=this.options.dereference.dereferenceOpts)==null?void 0:p.errors)==null?void 0:d.push)==null||h.call(d,y)}})}}}});function px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function dx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?px(Object(r),!0).forEach(function(n){X(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Em=e=>{const t=e.meta.clone(),r=e.attributes.clone();return new e.constructor(void 0,t,r)},oy=e=>new Te.c6(e.key,e.value,e.meta.clone(),e.attributes.clone()),Am=(e,t)=>t.clone&&t.isMergeableElement(e)?Wu(Em(e),e,t):e,a2=(e,t)=>{if(typeof t.customMerge!="function")return Wu;const r=t.customMerge(e,t);return typeof r=="function"?r:Wu},l2=(e,t,r)=>e.concat(t)["fantasy-land/map"](n=>Am(n,r)),u2=(e,t,r)=>{const n=sr(e)?Em(e):Em(t);return sr(e)&&e.forEach((s,a,p)=>{const d=oy(p);d.value=Am(s,r),n.content.push(d)}),t.forEach((s,a,p)=>{const d=a.toValue();let h;if(sr(e)&&e.hasKey(d)&&r.isMergeableElement(s)){const g=e.get(d);h=oy(p),h.value=a2(a,r)(g,s)}else h=oy(p),h.value=Am(s,r);n.remove(d),n.content.push(h)}),n};function Wu(e,t,r){var n,s,a;const p={clone:!0,isMergeableElement:C=>sr(C)||Gi(C),arrayElementMerge:l2,objectElementMerge:u2,customMerge:void 0},d=dx(dx({},p),r);d.isMergeableElement=(n=d.isMergeableElement)!==null&&n!==void 0?n:p.isMergeableElement,d.arrayElementMerge=(s=d.arrayElementMerge)!==null&&s!==void 0?s:p.arrayElementMerge,d.objectElementMerge=(a=d.objectElementMerge)!==null&&a!==void 0?a:p.objectElementMerge;const h=Gi(t),g=Gi(e);return h===g?h&&typeof d.arrayElementMerge=="function"?d.arrayElementMerge(e,t,d):d.objectElementMerge(e,t,d):Am(t,d)}Wu.all=(e,t)=>{if(!Array.isArray(e))throw new Error("first argument should be an array");return e.length===0?new Te.Sb:e.reduce((r,n)=>Wu(r,n,t),Em(e[0]))};const c2=sy({init(e){let{options:t}=e;this.options=t},props:{options:null,SchemaElement:{leave(e,t,r,n,s){var d,h,g,y,C,M;if(typeof e.allOf=="undefined")return;if(!Gi(e.allOf)){const I=new TypeError("allOf must be an array");I.fullPath=[...Os([...s,r,e]),"allOf"],(g=(h=(d=this.options.dereference.dereferenceOpts)==null?void 0:d.errors)==null?void 0:h.push)==null||g.call(h,I);return}if(e.allOf.isEmpty)return new jo(e.content.filter(I=>I.key.toValue()!=="allOf"),e.meta.clone(),e.attributes.clone());if(!e.allOf.content.every(Bu)){const I=new TypeError("Elements in allOf must be objects");I.fullPath=[...Os([...s,r,e]),"allOf"],(M=(C=(y=this.options.dereference.dereferenceOpts)==null?void 0:y.errors)==null?void 0:C.push)==null||M.call(C,I);return}const p=Wu.all([...e.allOf.content,e]);if(e.hasKey("$$ref")||p.remove("$$ref"),e.hasKey("example")){const I=p.getMember("example");I.value=e.get("example")}if(e.hasKey("examples")){const I=p.getMember("examples");I.value=e.get("examples")}return p.remove("allOf"),p}}}}),f2=Nn[Symbol.for("nodejs.util.promisify.custom")],hx=fx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,parameterMacro:null,modelPropertyMacro:null,mode:"non-strict"},init(){let{useCircularStructures:e=this.useCircularStructures,allowMetaPatches:t=this.allowMetaPatches,parameterMacro:r=this.parameterMacro,modelPropertyMacro:n=this.modelPropertyMacro,mode:s=this.mode}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.name="openapi-3-1-swagger-client",this.useCircularStructures=e,this.allowMetaPatches=t,this.parameterMacro=r,this.modelPropertyMacro=n,this.mode=s},methods:{dereference(e,t){return et(this,null,function*(){var g;const r=[],n=ku(fm),s=(g=t.dereference.refSet)!=null?g:hm();let a;s.has(e.uri)?a=s.find(y=>y.uri===e.uri):(a=$u({uri:e.uri,value:e.parseResult}),s.add(a));const p=i2({reference:a,namespace:n,options:t,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches});if(r.push(p),typeof this.parameterMacro=="function"){const y=s2({parameterMacro:this.parameterMacro,options:t});r.push(y)}if(typeof this.modelPropertyMacro=="function"){const y=o2({modelPropertyMacro:this.modelPropertyMacro,options:t});r.push(y)}if(this.mode!=="strict"){const y=c2({options:t});r.push(y)}const d=$0(r,{nodeTypeGetter:Zn}),h=yield f2(s.rootRef.value,d,{keyMap:ai,nodeTypeGetter:Zn});return t.dereference.refSet===null&&s.clean(),h})}}}),p2=e=>et(this,null,function*(){var I;const{spec:t,timeout:r,redirects:n,requestInterceptor:s,responseInterceptor:a,pathDiscriminator:p=[],allowMetaPatches:d=!1,useCircularStructures:h=!1,skipNormalization:g=!1,parameterMacro:y=null,modelPropertyMacro:C=null,mode:M="non-strict"}=e;try{const B="https://smartbear.com/",z=(I=ru(e))!=null?I:Yb(),W=$f(z)?z:B,G=Oa.refract(t);G.classes.push("result");const te=new Ss([G]),le=GC(p),ye=le===""?"":`#${le}`,he=Xn(le,G),Ee=$u({uri:W,value:te}),me=hm({refs:[Ee]});le!==""&&(me.rootRef=null);const ve=[],ce=yield wM(he,{resolve:{baseURI:`${W}${ye}`,resolvers:[sx({timeout:r||1e4,redirects:n||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:s,responseInterceptor:a}},strategies:[UM()]},parse:{mediaType:wl.latest(),parsers:[lx({allowEmpty:!1,sourceMap:!1}),ux({allowEmpty:!1,sourceMap:!1}),ox({allowEmpty:!1,sourceMap:!1}),ax({allowEmpty:!1,sourceMap:!1}),EM({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[hx({allowMetaPatches:d,useCircularStructures:h,parameterMacro:y,modelPropertyMacro:C,mode:M})],refSet:me,dereferenceOpts:{errors:ve}}}),Se=wC(he,ce,G),Ce=g?Se:ix(Se);return{spec:Yn(Ce),errors:ve}}catch(B){if(B instanceof q0||B instanceof $d)return{spec:null,errors:[]};throw B}}),d2={name:"openapi-3-1-apidom",match(e){let{spec:t}=e;return wo(t)},normalize(e){let{spec:t}=e;return ZM(ix)(t)},resolve(e){return et(this,null,function*(){return p2(e)})}};function mx(e,t,r){if(!e||typeof e!="object"||!e.paths||typeof e.paths!="object")return null;const{paths:n}=e;for(const s in n)for(const a in n[s]){if(a.toUpperCase()==="PARAMETERS")continue;const p=n[s][a];if(!p||typeof p!="object")continue;const d={spec:e,pathName:s,method:a.toUpperCase(),operation:p},h=t(d);if(r&&h)return d}}const h2=()=>null,m2=e=>Array.isArray(e)?e:[e],Cm={mapTagOperations:y2,makeExecute:v2};function v2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t=>{let{pathName:r,method:n,operationId:s}=t;return function(a){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{requestInterceptor:d,responseInterceptor:h,userFetch:g}=e;return e.execute(H({spec:e.spec,requestInterceptor:d,responseInterceptor:h,userFetch:g,pathName:r,method:n,parameters:a,operationId:s},p))}}}function sG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Cm.makeExecute(e),r=Cm.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t}),n={};for(const s in r){n[s]={operations:{}};for(const a in r[s])n[s].operations[a]={execute:r[s][a]}}return{apis:n}}function g2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Cm.makeExecute(e);return{apis:Cm.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}}function y2(e){let{spec:t,cb:r=h2,defaultTag:n="default",v2OperationIdCompatibilityMode:s}=e;const a={},p={};return mx(t,d=>{let{pathName:h,method:g,operation:y}=d;(y.tags?m2(y.tags):[n]).forEach(M=>{if(typeof M!="string")return;p[M]=p[M]||{};const I=p[M],B=ol(y,h,g,{v2OperationIdCompatibilityMode:s}),z=r({spec:t,pathName:h,method:g,operation:y,operationId:B});if(a[B])a[B]+=1,I[`${B}${a[B]}`]=z;else if(typeof I[B]!="undefined"){const W=a[B]||1;a[B]=W+1,I[`${B}${a[B]}`]=z;const G=I[B];delete I[B],I[`${B}${W}`]=G}else I[B]=z})}),p}var b2=c(26179);/*!
89
89
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
90
90
  *
91
91
  * Copyright (c) 2014-2017, Jon Schlinkert.
92
92
  * Released under the MIT License.
93
- */function vx(e){return Object.prototype.toString.call(e)==="[object Object]"}function gx(e){var t,r;return vx(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(vx(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}const x2={body:S2,header:O2,query:A2,path:E2,formData:w2};function S2(e){let{req:t,value:r}=e;t.body=r}function w2(e){let{req:t,value:r,parameter:n}=e;(r||n.allowEmptyValue)&&(t.form=t.form||{},t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function O2(e){let{req:t,parameter:r,value:n}=e;t.headers=t.headers||{},typeof n!="undefined"&&(t.headers[r.name]=n)}function E2(e){let{req:t,value:r,parameter:n}=e;t.url=t.url.split(`{${n.name}}`).join(encodeURIComponent(r))}function A2(e){let{req:t,value:r,parameter:n}=e;if(t.query=t.query||{},r===!1&&n.type==="boolean"&&(r="false"),r===0&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue&&r!==void 0){const s=n.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}function _m(e,t){return t.includes("application/json")?typeof e=="string"?e:JSON.stringify(e):e.toString()}function C2(e){let{req:t,value:r,parameter:n}=e;const{name:s,style:a,explode:p,content:d}=n;if(d){const g=Object.keys(d)[0];t.url=t.url.split(`{${s}}`).join(qo(_m(r,g),{escape:!0}));return}const h=Ga({key:n.name,value:r,style:a||"simple",explode:p||!1,escape:!0});t.url=t.url.split(`{${s}}`).join(h)}function _2(e){let{req:t,value:r,parameter:n}=e;if(t.query=t.query||{},n.content){const s=Object.keys(n.content)[0],a=_m(r,s);if(a)t.query[n.name]=a;else if(n.allowEmptyValue&&r!==void 0){const p=n.name;t.query[p]=t.query[p]||{},t.query[p].allowEmptyValue=!0}return}if(r===!1&&(r="false"),r===0&&(r="0"),r){const{style:s,explode:a,allowReserved:p}=n;t.query[n.name]={value:r,serializationOption:{style:s,explode:a,allowReserved:p}}}else if(n.allowEmptyValue&&r!==void 0){const s=n.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}const P2=["accept","authorization","content-type"];function T2(e){let{req:t,parameter:r,value:n}=e;if(t.headers=t.headers||{},!(P2.indexOf(r.name.toLowerCase())>-1)){if(r.content){const s=Object.keys(r.content)[0];t.headers[r.name]=_m(n,s);return}typeof n!="undefined"&&(t.headers[r.name]=Ga({key:r.name,value:n,style:r.style||"simple",explode:typeof r.explode=="undefined"?!1:r.explode,escape:!1}))}}function V2(e){let{req:t,parameter:r,value:n}=e;t.headers=t.headers||{};const s=typeof n;if(r.content){const a=Object.keys(r.content)[0];t.headers.Cookie=`${r.name}=${_m(n,a)}`;return}if(s!=="undefined"){const a=s==="object"&&!Array.isArray(n)&&r.explode?"":`${r.name}=`;t.headers.Cookie=a+Ga({key:r.name,value:n,escape:!1,style:r.style||"form",explode:typeof r.explode=="undefined"?!1:r.explode})}}const k2=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window)(),{btoa:j2}=k2,yx=j2;function I2(e,t){const{operation:r,requestBody:n,securities:s,spec:a,attachContentTypeForEmptyPayload:p}=e;let{requestContentType:d}=e;t=R2({request:t,securities:s,operation:r,spec:a});const h=r.requestBody||{},g=Object.keys(h.content||{}),y=d&&g.indexOf(d)>-1;if(n||p){if(d&&y)t.headers["Content-Type"]=d;else if(!d){const C=g[0];C&&(t.headers["Content-Type"]=C,d=C)}}else d&&y&&(t.headers["Content-Type"]=d);if(!e.responseContentType&&r.responses){const C=Object.entries(r.responses).filter(M=>{let[I,B]=M;const z=parseInt(I,10);return z>=200&&z<300&&gx(B.content)}).reduce((M,I)=>{let[,B]=I;return M.concat(Object.keys(B.content))},[]);C.length>0&&(t.headers.accept=C.join(", "))}if(n)if(d){if(g.indexOf(d)>-1)if(d==="application/x-www-form-urlencoded"||d==="multipart/form-data")if(typeof n=="object"){const C=(h.content[d]||{}).encoding||{};t.form={},Object.keys(n).forEach(M=>{t.form[M]={value:n[M],encoding:C[M]||{}}})}else t.form=n;else t.body=n}else t.body=n;return t}function R2(e){let{request:t,securities:r={},operation:n={},spec:s}=e;const a=H({},t),{authorized:p={}}=r,d=n.security||s.security||[],h=p&&!!Object.keys(p).length,g=ma()(s,["components","securitySchemes"])||{};return a.headers=a.headers||{},a.query=a.query||{},!Object.keys(r).length||!h||!d||Array.isArray(n.security)&&!n.security.length?t:(d.forEach(y=>{Object.keys(y).forEach(C=>{const M=p[C],I=g[C];if(!M)return;const B=M.value||M,{type:z}=I;if(M){if(z==="apiKey")I.in==="query"&&(a.query[I.name]=B),I.in==="header"&&(a.headers[I.name]=B),I.in==="cookie"&&(a.cookies[I.name]=B);else if(z==="http"){if(/^basic$/i.test(I.scheme)){const W=B.username||"",G=B.password||"",te=yx(`${W}:${G}`);a.headers.Authorization=`Basic ${te}`}/^bearer$/i.test(I.scheme)&&(a.headers.Authorization=`Bearer ${B}`)}else if(z==="oauth2"||z==="openIdConnect"){const W=M.token||{},G=I["x-tokenName"]||"access_token",te=W[G];let le=W.token_type;(!le||le.toLowerCase()==="bearer")&&(le="Bearer"),a.headers.Authorization=`${le} ${te}`}}})}),a)}function F2(e,t){const{spec:r,operation:n,securities:s,requestContentType:a,responseContentType:p,attachContentTypeForEmptyPayload:d}=e;if(t=M2({request:t,securities:s,operation:n,spec:r}),t.body||t.form||d)a?t.headers["Content-Type"]=a:Array.isArray(n.consumes)?[t.headers["Content-Type"]]=n.consumes:Array.isArray(r.consumes)?[t.headers["Content-Type"]]=r.consumes:n.parameters&&n.parameters.filter(h=>h.type==="file").length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(h=>h.in==="formData").length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(a){const h=n.parameters&&n.parameters.filter(y=>y.in==="body").length>0,g=n.parameters&&n.parameters.filter(y=>y.in==="formData").length>0;(h||g)&&(t.headers["Content-Type"]=a)}return!p&&Array.isArray(n.produces)&&n.produces.length>0&&(t.headers.accept=n.produces.join(", ")),t}function M2(e){let{request:t,securities:r={},operation:n={},spec:s}=e;const a=H({},t),{authorized:p={},specSecurity:d=[]}=r,h=n.security||d,g=p&&!!Object.keys(p).length,y=s.securityDefinitions;return a.headers=a.headers||{},a.query=a.query||{},!Object.keys(r).length||!g||!h||Array.isArray(n.security)&&!n.security.length?t:(h.forEach(C=>{Object.keys(C).forEach(M=>{const I=p[M];if(!I)return;const{token:B}=I,z=I.value||I,W=y[M],{type:G}=W,te=W["x-tokenName"]||"access_token",le=B&&B[te];let ye=B&&B.token_type;if(I)if(G==="apiKey"){const he=W.in==="query"?"query":"headers";a[he]=a[he]||{},a[he][W.name]=z}else if(G==="basic")if(z.header)a.headers.authorization=z.header;else{const he=z.username||"",Ee=z.password||"";z.base64=yx(`${he}:${Ee}`),a.headers.authorization=`Basic ${z.base64}`}else G==="oauth2"&&le&&(ye=!ye||ye.toLowerCase()==="bearer"?"Bearer":ye,a.headers.authorization=`${ye} ${le}`)})}),a)}function bx(e,t){return`${t.toLowerCase()}-${e}`}function L2(e,t){return mx(e,t,!0)||null}function D2(e,t){return!e||!e.paths?null:L2(e,r=>{let{pathName:n,method:s,operation:a}=r;if(!a||typeof a!="object")return!1;const p=a.operationId,d=ol(a,n,s),h=bx(n,s);return[d,h,p].some(g=>g&&g===t)})}const N2=["http","fetch","spec","operationId","pathName","method","parameters","securities"],xx=e=>Array.isArray(e)?e:[],B2=cu("OperationNotFoundError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),$2=(e,t)=>t.filter(r=>r.name===e),U2=e=>{const t={};e.forEach(n=>{t[n.in]||(t[n.in]={}),t[n.in][n.name]=n});const r=[];return Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(s=>{r.push(t[n][s])})}),r},W2={buildRequest:Sx};function H2(e){let{http:t,fetch:r,spec:n,operationId:s,pathName:a,method:p,parameters:d,securities:h}=e,g=df(e,N2);const y=t||r||Ns;a&&p&&!s&&(s=bx(a,p));const C=W2.buildRequest(H({spec:n,operationId:s,parameters:d,securities:h,http:y},g));return C.body&&(gx(C.body)||Array.isArray(C.body))&&(C.body=JSON.stringify(C.body)),y(C)}function Sx(e){const{spec:t,operationId:r,responseContentType:n,scheme:s,requestInterceptor:a,responseInterceptor:p,contextUrl:d,userFetch:h,server:g,serverVariables:y,http:C,signal:M}=e;let{parameters:I,parameterBuilders:B}=e;const z=Jc(t);B||(z?B=$:B=x2);let G={url:"",credentials:C&&C.withCredentials?"include":"same-origin",headers:{},cookies:{}};M&&(G.signal=M),a&&(G.requestInterceptor=a),p&&(G.responseInterceptor=p),h&&(G.userFetch=h);const te=D2(t,r);if(!te)throw new B2(`Operation ${r} not found`);const{operation:le={},method:ye,pathName:he}=te;if(G.url+=wx({spec:t,scheme:s,contextUrl:d,server:g,serverVariables:y,pathName:he,method:ye}),!r)return delete G.cookies,G;G.url+=he,G.method=`${ye}`.toUpperCase(),I=I||{};const Ee=t.paths[he]||{};n&&(G.headers.accept=n);const me=U2([].concat(xx(le.parameters)).concat(xx(Ee.parameters)));me.forEach(ce=>{const Se=B[ce.in];let Ce;if(ce.in==="body"&&ce.schema&&ce.schema.properties&&(Ce=I),Ce=ce&&ce.name&&I[ce.name],typeof Ce=="undefined"?Ce=ce&&ce.name&&I[`${ce.in}.${ce.name}`]:$2(ce.name,me).length>1&&console.warn(`Parameter '${ce.name}' is ambiguous because the defined spec has more than one parameter with the name: '${ce.name}' and the passed-in parameter values did not define an 'in' value.`),Ce!==null){if(typeof ce.default!="undefined"&&typeof Ce=="undefined"&&(Ce=ce.default),typeof Ce=="undefined"&&ce.required&&!ce.allowEmptyValue)throw new Error(`Required parameter ${ce.name} is not provided`);if(z&&ce.schema&&ce.schema.type==="object"&&typeof Ce=="string")try{Ce=JSON.parse(Ce)}catch(Me){throw new Error("Could not parse object parameter value string as JSON")}Se&&Se({req:G,parameter:ce,value:Ce,operation:le,spec:t})}});const ve=H(H({},e),{},{operation:le});if(z?G=I2(ve,G):G=F2(ve,G),G.cookies&&Object.keys(G.cookies).length){const ce=Object.keys(G.cookies).reduce((Se,Ce)=>{const Me=G.cookies[Ce],Qe=Se?"&":"",wt=b2.serialize(Ce,Me);return Se+Qe+wt},"");G.headers.Cookie=ce}return G.cookies&&delete G.cookies,ra(G),G}const ay=e=>e?e.replace(/\W/g,""):null;function wx(e){return Jc(e.spec)?z2(e):J2(e)}function z2(e){let{spec:t,pathName:r,method:n,server:s,contextUrl:a,serverVariables:p={}}=e;const d=ma()(t,["paths",r,(n||"").toLowerCase(),"servers"])||ma()(t,["paths",r,"servers"])||ma()(t,["servers"]);let h="",g=null;if(s&&d&&d.length){const y=d.map(C=>C.url);y.indexOf(s)>-1&&(h=s,g=d[y.indexOf(s)])}return!h&&d&&d.length&&(h=d[0].url,[g]=d),h.indexOf("{")>-1&&K2(h).forEach(C=>{if(g.variables&&g.variables[C]){const M=g.variables[C],I=p[C]||M.default,B=new RegExp(`{${C}}`,"g");h=h.replace(B,I)}}),G2(h,a)}function G2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e&&t?de.parse(de.resolve(t,e)):de.parse(e),n=de.parse(t),s=ay(r.protocol)||ay(n.protocol)||"",a=r.host||n.host,p=r.pathname||"";let d;return s&&a?d=`${s}://${a+p}`:d=p,d[d.length-1]==="/"?d.slice(0,-1):d}function K2(e){const t=[],r=/{([^}]+)}/g;let n;for(;n=r.exec(e);)t.push(n[1]);return t}function J2(e){let{spec:t,scheme:r,contextUrl:n=""}=e;const s=de.parse(n),a=Array.isArray(t.schemes)?t.schemes[0]:null,p=r||a||ay(s.protocol)||"http",d=t.host||s.host||"",h=t.basePath||"";let g;return p&&d?g=`${p}://${d+h}`:g=h,g[g.length-1]==="/"?g.slice(0,-1):g}cr.http=Ns,cr.makeHttp=mo.bind(null,cr.http),cr.resolveStrategies={"openapi-3-1-apidom":d2,"openapi-3-0":ul,"openapi-2-0":hu,generic:So},cr.resolve=vu({strategies:[cr.resolveStrategies["openapi-3-1-apidom"],cr.resolveStrategies["openapi-3-0"],cr.resolveStrategies["openapi-2-0"],cr.resolveStrategies.generic]}),cr.resolveSubtree=Xc({strategies:[cr.resolveStrategies["openapi-3-1-apidom"],cr.resolveStrategies["openapi-3-0"],cr.resolveStrategies["openapi-2-0"],cr.resolveStrategies.generic]}),cr.execute=H2,cr.serializeRes=Yp,cr.serializeHeaders=eu,cr.clearCache=al,cr.makeApisTagOperation=g2,cr.buildRequest=Sx,cr.helpers={opId:ol},cr.getBaseUrl=wx,cr.apidom={resolve:{resolvers:{HttpResolverSwaggerClient:sx}},parse:{parsers:{JsonParser:ox,YamlParser:ax,OpenApiJson3_1Parser:lx,OpenApiYaml3_1Parser:ux}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:hx}}};function cr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"?t.url=e:t=e,!(this instanceof cr))return new cr(t);Object.assign(this,t);const r=this.resolve().then(()=>(this.disableInterfaces||Object.assign(this,cr.makeApisTagOperation(this)),this));return r.client=this,r}cr.prototype={http:Ns,execute(e){return this.applyDefaults(),cr.execute(H({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},e))},resolve(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return cr.resolve(H({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1},e)).then(t=>(this.originalSpec=this.spec,this.spec=t.spec,this.errors=t.errors,this))}},cr.prototype.applyDefaults=function(){const{spec:t}=this,r=this.url;if(r&&r.startsWith("http")){const n=de.parse(r);t.host||(t.host=n.host),t.schemes||(t.schemes=[n.protocol.replace(":","")]),t.basePath||(t.basePath="/")}};const{helpers:oG}=cr,Y2=cr;var R=c(29901),Vr=c(87722),Fo=c(21999),X2=c(1452),Q2=c(36505),Z2=c(94440),q2=Object.defineProperty,eL=Object.defineProperties,tL=Object.getOwnPropertyDescriptors,Ox=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,nL=Object.prototype.propertyIsEnumerable,Ex=(e,t,r)=>t in e?q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iL=(e,t)=>{for(var r in t||(t={}))rL.call(t,r)&&Ex(e,r,t[r]);if(Ox)for(var r of Ox(t))nL.call(t,r)&&Ex(e,r,t[r]);return e},sL=(e,t)=>eL(e,tL(t)),oL=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function aL(e,t){return oL(this,null,function*(){var r,n,s,a;const p=JSON.parse(JSON.stringify(t)),d=p.openapi?{openapi:p.openapi}:p.swagger?{swagger:p.swagger}:{},h=sL(iL({},d),{components:p.components,paths:{[e.path]:{[e.httpVerb]:(n=(r=p.paths)==null?void 0:r[e.path])==null?void 0:n[e.httpVerb],parameters:(a=(s=p.paths)==null?void 0:s[e.path])==null?void 0:a.parameters}}}),g=new Q2.Config({}),y=(0,Z2.I)(h),C={config:g,doc:y,dereference:!0};return yield(0,X2.bundle)(C),p})}var lL=c(58455),Pm=c(77304),Zs=c(86997),Ax=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const Cx=Object.values(Zs.FileUploadFormats),uL=["application/octet-stream","application/pdf","application/gzip","application/zip"],_x=["image/","audio/","video/"];function Px(e){if(_x.some(t=>e.startsWith(t)))return e}function Tm(e){return uL.includes(e)?!0:_x.some(t=>e.startsWith(t))}function cL(e){const t=e.type==="array"?e.items:e;if(!t||!t.type||(t==null?void 0:t.type)==="any")return!0;const r=t.contentMediaType||"",n=t.format||t.contentEncoding||(Tm(r)?"binary":"");return t.type===Zs.DefinitionTypes.STRING&&Cx.includes(n)}function Tx(e,t){if(!e||!e.type||e.type==="any")return Tm(t);const r=e.format||e.contentEncoding||"";return e.type===Zs.DefinitionTypes.STRING&&Cx.includes(r)}function Vx(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const a=n.result.replace(/data:.*\/.*;base64,/g,"");t(a)},n.onerror=()=>r(n.error),n.readAsDataURL(e)})}function kx({format:e,contentEncoding:t,contentMediaType:r}){return[e,t,r].includes(Zs.FileUploadFormats.BASE64)}function fL(e,t){return Ax(this,null,function*(){const r=Object.values(e);let n=r.length===1?r[0]:r;return t.type===Zs.DefinitionTypes.STRING&&kx(t)?n=yield Vx(r[0]):t.type===Zs.DefinitionTypes.ARRAY&&t.items&&(kx(t.items)?n=yield Promise.all(r.map(a=>Ax(this,null,function*(){return yield Vx(a)}))):n=r),n})}var jx=c(75210),Wt=c(69056),Kt=c(11991),kt=c(28838),li=c(41336),pL=c(4944);function dL({response:e}){return R.createElement(R.Fragment,null,R.createElement(li.EE,null," Body: "),hL(e))}function hL(e){return e.body?R.createElement(Vr.JsonViewer,{data:e.body,jsonSampleExpandLevel:1}):e.fileInfo?R.createElement(pL.s,{fileInfo:e.fileInfo}):e.data!==null?e.data?R.createElement(Vr.SourceCode,{lang:(0,kt.M)(e.headers["Content-Type"]||"text/plain"),source:e.data,withCopyButton:!0}):R.createElement(li.w3,null,R.createElement("i",null,"(no content)")):null}var Hu=c(50323);function mL({headers:e}){const t=(0,Fo.useRecoilValue)(Hu.lk),[r,n]=(0,R.useState)(!0),{maxResponseHeadersToShowInTryIt:s}=t,a=Object.keys(e),p=!!s&&a.length>s,d=p&&r?[...a].splice(0,s):[...a],h=()=>{n(!r)};return R.createElement(R.Fragment,null,R.createElement(li.EE,null," Headers: "),R.createElement(li.w3,null,d.map(g=>R.createElement("div",{key:g},R.createElement(Ix,null,g,":"),R.createElement("code",null,e[g]))),p&&R.createElement(Rx,{onClick:h},r?"Show more...":"Hide headers")))}const Ix=Kt.ZP.strong`
93
+ */function vx(e){return Object.prototype.toString.call(e)==="[object Object]"}function gx(e){var t,r;return vx(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(vx(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}const x2={body:S2,header:O2,query:A2,path:E2,formData:w2};function S2(e){let{req:t,value:r}=e;t.body=r}function w2(e){let{req:t,value:r,parameter:n}=e;(r||n.allowEmptyValue)&&(t.form=t.form||{},t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function O2(e){let{req:t,parameter:r,value:n}=e;t.headers=t.headers||{},typeof n!="undefined"&&(t.headers[r.name]=n)}function E2(e){let{req:t,value:r,parameter:n}=e;t.url=t.url.split(`{${n.name}}`).join(encodeURIComponent(r))}function A2(e){let{req:t,value:r,parameter:n}=e;if(t.query=t.query||{},r===!1&&n.type==="boolean"&&(r="false"),r===0&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue&&r!==void 0){const s=n.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}function _m(e,t){return t.includes("application/json")?typeof e=="string"?e:JSON.stringify(e):e.toString()}function C2(e){let{req:t,value:r,parameter:n}=e;const{name:s,style:a,explode:p,content:d}=n;if(d){const g=Object.keys(d)[0];t.url=t.url.split(`{${s}}`).join(qo(_m(r,g),{escape:!0}));return}const h=Ga({key:n.name,value:r,style:a||"simple",explode:p||!1,escape:!0});t.url=t.url.split(`{${s}}`).join(h)}function _2(e){let{req:t,value:r,parameter:n}=e;if(t.query=t.query||{},n.content){const s=Object.keys(n.content)[0],a=_m(r,s);if(a)t.query[n.name]=a;else if(n.allowEmptyValue&&r!==void 0){const p=n.name;t.query[p]=t.query[p]||{},t.query[p].allowEmptyValue=!0}return}if(r===!1&&(r="false"),r===0&&(r="0"),r){const{style:s,explode:a,allowReserved:p}=n;t.query[n.name]={value:r,serializationOption:{style:s,explode:a,allowReserved:p}}}else if(n.allowEmptyValue&&r!==void 0){const s=n.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}const P2=["accept","authorization","content-type"];function T2(e){let{req:t,parameter:r,value:n}=e;if(t.headers=t.headers||{},!(P2.indexOf(r.name.toLowerCase())>-1)){if(r.content){const s=Object.keys(r.content)[0];t.headers[r.name]=_m(n,s);return}typeof n!="undefined"&&(t.headers[r.name]=Ga({key:r.name,value:n,style:r.style||"simple",explode:typeof r.explode=="undefined"?!1:r.explode,escape:!1}))}}function V2(e){let{req:t,parameter:r,value:n}=e;t.headers=t.headers||{};const s=typeof n;if(r.content){const a=Object.keys(r.content)[0];t.headers.Cookie=`${r.name}=${_m(n,a)}`;return}if(s!=="undefined"){const a=s==="object"&&!Array.isArray(n)&&r.explode?"":`${r.name}=`;t.headers.Cookie=a+Ga({key:r.name,value:n,escape:!1,style:r.style||"form",explode:typeof r.explode=="undefined"?!1:r.explode})}}const k2=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:window)(),{btoa:j2}=k2,yx=j2;function I2(e,t){const{operation:r,requestBody:n,securities:s,spec:a,attachContentTypeForEmptyPayload:p}=e;let{requestContentType:d}=e;t=R2({request:t,securities:s,operation:r,spec:a});const h=r.requestBody||{},g=Object.keys(h.content||{}),y=d&&g.indexOf(d)>-1;if(n||p){if(d&&y)t.headers["Content-Type"]=d;else if(!d){const C=g[0];C&&(t.headers["Content-Type"]=C,d=C)}}else d&&y&&(t.headers["Content-Type"]=d);if(!e.responseContentType&&r.responses){const C=Object.entries(r.responses).filter(M=>{let[I,B]=M;const z=parseInt(I,10);return z>=200&&z<300&&gx(B.content)}).reduce((M,I)=>{let[,B]=I;return M.concat(Object.keys(B.content))},[]);C.length>0&&(t.headers.accept=C.join(", "))}if(n)if(d){if(g.indexOf(d)>-1)if(d==="application/x-www-form-urlencoded"||d==="multipart/form-data")if(typeof n=="object"){const C=(h.content[d]||{}).encoding||{};t.form={},Object.keys(n).forEach(M=>{t.form[M]={value:n[M],encoding:C[M]||{}}})}else t.form=n;else t.body=n}else t.body=n;return t}function R2(e){let{request:t,securities:r={},operation:n={},spec:s}=e;const a=H({},t),{authorized:p={}}=r,d=n.security||s.security||[],h=p&&!!Object.keys(p).length,g=ma()(s,["components","securitySchemes"])||{};return a.headers=a.headers||{},a.query=a.query||{},!Object.keys(r).length||!h||!d||Array.isArray(n.security)&&!n.security.length?t:(d.forEach(y=>{Object.keys(y).forEach(C=>{const M=p[C],I=g[C];if(!M)return;const B=M.value||M,{type:z}=I;if(M){if(z==="apiKey")I.in==="query"&&(a.query[I.name]=B),I.in==="header"&&(a.headers[I.name]=B),I.in==="cookie"&&(a.cookies[I.name]=B);else if(z==="http"){if(/^basic$/i.test(I.scheme)){const W=B.username||"",G=B.password||"",te=yx(`${W}:${G}`);a.headers.Authorization=`Basic ${te}`}/^bearer$/i.test(I.scheme)&&(a.headers.Authorization=`Bearer ${B}`)}else if(z==="oauth2"||z==="openIdConnect"){const W=M.token||{},G=I["x-tokenName"]||"access_token",te=W[G];let le=W.token_type;(!le||le.toLowerCase()==="bearer")&&(le="Bearer"),a.headers.Authorization=`${le} ${te}`}}})}),a)}function F2(e,t){const{spec:r,operation:n,securities:s,requestContentType:a,responseContentType:p,attachContentTypeForEmptyPayload:d}=e;if(t=M2({request:t,securities:s,operation:n,spec:r}),t.body||t.form||d)a?t.headers["Content-Type"]=a:Array.isArray(n.consumes)?[t.headers["Content-Type"]]=n.consumes:Array.isArray(r.consumes)?[t.headers["Content-Type"]]=r.consumes:n.parameters&&n.parameters.filter(h=>h.type==="file").length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(h=>h.in==="formData").length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(a){const h=n.parameters&&n.parameters.filter(y=>y.in==="body").length>0,g=n.parameters&&n.parameters.filter(y=>y.in==="formData").length>0;(h||g)&&(t.headers["Content-Type"]=a)}return!p&&Array.isArray(n.produces)&&n.produces.length>0&&(t.headers.accept=n.produces.join(", ")),t}function M2(e){let{request:t,securities:r={},operation:n={},spec:s}=e;const a=H({},t),{authorized:p={},specSecurity:d=[]}=r,h=n.security||d,g=p&&!!Object.keys(p).length,y=s.securityDefinitions;return a.headers=a.headers||{},a.query=a.query||{},!Object.keys(r).length||!g||!h||Array.isArray(n.security)&&!n.security.length?t:(h.forEach(C=>{Object.keys(C).forEach(M=>{const I=p[M];if(!I)return;const{token:B}=I,z=I.value||I,W=y[M],{type:G}=W,te=W["x-tokenName"]||"access_token",le=B&&B[te];let ye=B&&B.token_type;if(I)if(G==="apiKey"){const he=W.in==="query"?"query":"headers";a[he]=a[he]||{},a[he][W.name]=z}else if(G==="basic")if(z.header)a.headers.authorization=z.header;else{const he=z.username||"",Ee=z.password||"";z.base64=yx(`${he}:${Ee}`),a.headers.authorization=`Basic ${z.base64}`}else G==="oauth2"&&le&&(ye=!ye||ye.toLowerCase()==="bearer"?"Bearer":ye,a.headers.authorization=`${ye} ${le}`)})}),a)}function bx(e,t){return`${t.toLowerCase()}-${e}`}function L2(e,t){return mx(e,t,!0)||null}function D2(e,t){return!e||!e.paths?null:L2(e,r=>{let{pathName:n,method:s,operation:a}=r;if(!a||typeof a!="object")return!1;const p=a.operationId,d=ol(a,n,s),h=bx(n,s);return[d,h,p].some(g=>g&&g===t)})}const N2=["http","fetch","spec","operationId","pathName","method","parameters","securities"],xx=e=>Array.isArray(e)?e:[],B2=cu("OperationNotFoundError",function(t,r,n){this.originalError=n,Object.assign(this,r||{})}),$2=(e,t)=>t.filter(r=>r.name===e),U2=e=>{const t={};e.forEach(n=>{t[n.in]||(t[n.in]={}),t[n.in][n.name]=n});const r=[];return Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(s=>{r.push(t[n][s])})}),r},W2={buildRequest:Sx};function H2(e){let{http:t,fetch:r,spec:n,operationId:s,pathName:a,method:p,parameters:d,securities:h}=e,g=df(e,N2);const y=t||r||Ns;a&&p&&!s&&(s=bx(a,p));const C=W2.buildRequest(H({spec:n,operationId:s,parameters:d,securities:h,http:y},g));return C.body&&(gx(C.body)||Array.isArray(C.body))&&(C.body=JSON.stringify(C.body)),y(C)}function Sx(e){const{spec:t,operationId:r,responseContentType:n,scheme:s,requestInterceptor:a,responseInterceptor:p,contextUrl:d,userFetch:h,server:g,serverVariables:y,http:C,signal:M}=e;let{parameters:I,parameterBuilders:B}=e;const z=Jc(t);B||(z?B=$:B=x2);let G={url:"",credentials:C&&C.withCredentials?"include":"same-origin",headers:{},cookies:{}};M&&(G.signal=M),a&&(G.requestInterceptor=a),p&&(G.responseInterceptor=p),h&&(G.userFetch=h);const te=D2(t,r);if(!te)throw new B2(`Operation ${r} not found`);const{operation:le={},method:ye,pathName:he}=te;if(G.url+=wx({spec:t,scheme:s,contextUrl:d,server:g,serverVariables:y,pathName:he,method:ye}),!r)return delete G.cookies,G;G.url+=he,G.method=`${ye}`.toUpperCase(),I=I||{};const Ee=t.paths[he]||{};n&&(G.headers.accept=n);const me=U2([].concat(xx(le.parameters)).concat(xx(Ee.parameters)));me.forEach(ce=>{const Se=B[ce.in];let Ce;if(ce.in==="body"&&ce.schema&&ce.schema.properties&&(Ce=I),Ce=ce&&ce.name&&I[ce.name],typeof Ce=="undefined"?Ce=ce&&ce.name&&I[`${ce.in}.${ce.name}`]:$2(ce.name,me).length>1&&console.warn(`Parameter '${ce.name}' is ambiguous because the defined spec has more than one parameter with the name: '${ce.name}' and the passed-in parameter values did not define an 'in' value.`),Ce!==null){if(typeof ce.default!="undefined"&&typeof Ce=="undefined"&&(Ce=ce.default),typeof Ce=="undefined"&&ce.required&&!ce.allowEmptyValue)throw new Error(`Required parameter ${ce.name} is not provided`);if(z&&ce.schema&&ce.schema.type==="object"&&typeof Ce=="string")try{Ce=JSON.parse(Ce)}catch(Me){throw new Error("Could not parse object parameter value string as JSON")}Se&&Se({req:G,parameter:ce,value:Ce,operation:le,spec:t})}});const ve=H(H({},e),{},{operation:le});if(z?G=I2(ve,G):G=F2(ve,G),G.cookies&&Object.keys(G.cookies).length){const ce=Object.keys(G.cookies).reduce((Se,Ce)=>{const Me=G.cookies[Ce],Qe=Se?"&":"",wt=b2.serialize(Ce,Me);return Se+Qe+wt},"");G.headers.Cookie=ce}return G.cookies&&delete G.cookies,ra(G),G}const ay=e=>e?e.replace(/\W/g,""):null;function wx(e){return Jc(e.spec)?z2(e):J2(e)}function z2(e){let{spec:t,pathName:r,method:n,server:s,contextUrl:a,serverVariables:p={}}=e;const d=ma()(t,["paths",r,(n||"").toLowerCase(),"servers"])||ma()(t,["paths",r,"servers"])||ma()(t,["servers"]);let h="",g=null;if(s&&d&&d.length){const y=d.map(C=>C.url);y.indexOf(s)>-1&&(h=s,g=d[y.indexOf(s)])}return!h&&d&&d.length&&(h=d[0].url,[g]=d),h.indexOf("{")>-1&&K2(h).forEach(C=>{if(g.variables&&g.variables[C]){const M=g.variables[C],I=p[C]||M.default,B=new RegExp(`{${C}}`,"g");h=h.replace(B,I)}}),G2(h,a)}function G2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e&&t?de.parse(de.resolve(t,e)):de.parse(e),n=de.parse(t),s=ay(r.protocol)||ay(n.protocol)||"",a=r.host||n.host,p=r.pathname||"";let d;return s&&a?d=`${s}://${a+p}`:d=p,d[d.length-1]==="/"?d.slice(0,-1):d}function K2(e){const t=[],r=/{([^}]+)}/g;let n;for(;n=r.exec(e);)t.push(n[1]);return t}function J2(e){let{spec:t,scheme:r,contextUrl:n=""}=e;const s=de.parse(n),a=Array.isArray(t.schemes)?t.schemes[0]:null,p=r||a||ay(s.protocol)||"http",d=t.host||s.host||"",h=t.basePath||"";let g;return p&&d?g=`${p}://${d+h}`:g=h,g[g.length-1]==="/"?g.slice(0,-1):g}cr.http=Ns,cr.makeHttp=mo.bind(null,cr.http),cr.resolveStrategies={"openapi-3-1-apidom":d2,"openapi-3-0":ul,"openapi-2-0":hu,generic:So},cr.resolve=vu({strategies:[cr.resolveStrategies["openapi-3-1-apidom"],cr.resolveStrategies["openapi-3-0"],cr.resolveStrategies["openapi-2-0"],cr.resolveStrategies.generic]}),cr.resolveSubtree=Xc({strategies:[cr.resolveStrategies["openapi-3-1-apidom"],cr.resolveStrategies["openapi-3-0"],cr.resolveStrategies["openapi-2-0"],cr.resolveStrategies.generic]}),cr.execute=H2,cr.serializeRes=Yp,cr.serializeHeaders=eu,cr.clearCache=al,cr.makeApisTagOperation=g2,cr.buildRequest=Sx,cr.helpers={opId:ol},cr.getBaseUrl=wx,cr.apidom={resolve:{resolvers:{HttpResolverSwaggerClient:sx}},parse:{parsers:{JsonParser:ox,YamlParser:ax,OpenApiJson3_1Parser:lx,OpenApiYaml3_1Parser:ux}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:hx}}};function cr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"?t.url=e:t=e,!(this instanceof cr))return new cr(t);Object.assign(this,t);const r=this.resolve().then(()=>(this.disableInterfaces||Object.assign(this,cr.makeApisTagOperation(this)),this));return r.client=this,r}cr.prototype={http:Ns,execute(e){return this.applyDefaults(),cr.execute(H({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},e))},resolve(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return cr.resolve(H({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1},e)).then(t=>(this.originalSpec=this.spec,this.spec=t.spec,this.errors=t.errors,this))}},cr.prototype.applyDefaults=function(){const{spec:t}=this,r=this.url;if(r&&r.startsWith("http")){const n=de.parse(r);t.host||(t.host=n.host),t.schemes||(t.schemes=[n.protocol.replace(":","")]),t.basePath||(t.basePath="/")}};const{helpers:oG}=cr,Y2=cr;var R=c(29901),Vr=c(87722),Fo=c(21999),X2=c(1452),Q2=c(36505),Z2=c(94440),q2=Object.defineProperty,eL=Object.defineProperties,tL=Object.getOwnPropertyDescriptors,Ox=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,nL=Object.prototype.propertyIsEnumerable,Ex=(e,t,r)=>t in e?q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iL=(e,t)=>{for(var r in t||(t={}))rL.call(t,r)&&Ex(e,r,t[r]);if(Ox)for(var r of Ox(t))nL.call(t,r)&&Ex(e,r,t[r]);return e},sL=(e,t)=>eL(e,tL(t)),oL=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function aL(e,t){return oL(this,null,function*(){var r,n,s,a;const p=JSON.parse(JSON.stringify(t)),d=p.openapi?{openapi:p.openapi}:p.swagger?{swagger:p.swagger}:{},h=sL(iL({},d),{components:p.components,paths:{[e.path]:{[e.httpVerb]:(n=(r=p.paths)==null?void 0:r[e.path])==null?void 0:n[e.httpVerb],parameters:(a=(s=p.paths)==null?void 0:s[e.path])==null?void 0:a.parameters}}}),g=new Q2.Config({}),y=(0,Z2.I)(h),C={config:g,doc:y,dereference:!0};return yield(0,X2.bundle)(C),p})}var lL=c(58455),Pm=c(77304),Zs=c(86997),Ax=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const Cx=Object.values(Zs.FileUploadFormats),uL=["application/octet-stream","application/pdf","application/gzip","application/zip"],_x=["image/","audio/","video/"];function Px(e){if(_x.some(t=>e.startsWith(t)))return e}function Tm(e){return uL.includes(e)?!0:_x.some(t=>e.startsWith(t))}function cL(e){const t=e.type==="array"?e.items:e;if(!t||!t.type||(t==null?void 0:t.type)==="any")return!0;const r=t.contentMediaType||"",n=t.format||t.contentEncoding||(Tm(r)?"binary":"");return t.type===Zs.DefinitionTypes.STRING&&Cx.includes(n)}function Tx(e,t){if(!e||!e.type||e.type==="any")return Tm(t);const r=e.format||e.contentEncoding||"";return e.type===Zs.DefinitionTypes.STRING&&Cx.includes(r)}function Vx(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const a=n.result.replace(/data:.*\/.*;base64,/g,"");t(a)},n.onerror=()=>r(n.error),n.readAsDataURL(e)})}function kx({format:e,contentEncoding:t,contentMediaType:r}){return[e,t,r].includes(Zs.FileUploadFormats.BASE64)}function fL(e,t){return Ax(this,null,function*(){const r=Object.values(e);let n=r.length===1?r[0]:r;return t.type===Zs.DefinitionTypes.STRING&&kx(t)?n=yield Vx(r[0]):t.type===Zs.DefinitionTypes.ARRAY&&t.items&&(kx(t.items)?n=yield Promise.all(r.map(a=>Ax(this,null,function*(){return yield Vx(a)}))):n=r),n})}var jx=c(75210),Wt=c(69056),Kt=c(11991),kt=c(28838),Qi=c(41336),pL=c(4944);function dL({response:e}){return R.createElement(R.Fragment,null,R.createElement(Qi.EE,null," Body: "),hL(e))}function hL(e){return e.body?R.createElement(Vr.JsonViewer,{data:e.body,jsonSampleExpandLevel:1}):e.fileInfo?R.createElement(pL.s,{fileInfo:e.fileInfo}):e.data!==null?e.data?R.createElement(Vr.CodeBlock,{lang:(0,kt.M)(e.headers["Content-Type"]||"text/plain"),source:e.data,header:{controls:{copy:{}}}}):R.createElement(Vr.CodeBlockContainer,{withControls:!0},R.createElement("i",null,"(no content)")):null}var Hu=c(50323);function mL({headers:e}){const t=(0,Fo.useRecoilValue)(Hu.lk),[r,n]=(0,R.useState)(!0),{maxResponseHeadersToShowInTryIt:s}=t,a=Object.keys(e),p=!!s&&a.length>s,d=p&&r?[...a].splice(0,s):[...a],h=()=>{n(!r)};return R.createElement(R.Fragment,null,R.createElement(Qi.EE,null," Headers: "),R.createElement(Vr.CodeBlockContainer,{withControls:!0},d.map(g=>R.createElement("div",{key:g},R.createElement(Ix,null,g,":"),R.createElement("code",null,e[g]))),p&&R.createElement(Rx,{onClick:h},r?"Show more...":"Hide headers")))}const Ix=Kt.ZP.strong`
94
94
  text-transform: capitalize;
95
95
  display: inline-block;
96
96
  padding-right: 5px;
@@ -167,7 +167,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
167
167
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NL(e,t){var r;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=dy(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
168
168
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,p=!1,d;return{s:function(){r=e[Symbol.iterator]()},n:function(){var h=r.next();return a=h.done,h},e:function(h){p=!0,d=h},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(p)throw d}}}}function BL(e,t){return t={exports:{}},e(t,t.exports),t.exports}var qs=BL(function(e){function t(y,C){for(var M=0,I=0;I<y.length;I++)M=(M<<5)-M+y.charCodeAt(I),M|=0;return C[Math.abs(M)%C.length]}function r(y,C){var M=C.namespace;if(C.useColors){var I=C.color,B="\x1B[3"+(I<8?I:"8;5;"+I),z=" ".concat(B,";1m").concat(M," \x1B[0m");y[0]=z+y[0].split(`
169
169
  `).join(`
170
- `+z)}else y[0]=M+" "+y[0]}function n(y,C){if(y[0]=(C.useColors?"%c":"")+C.namespace,!!C.useColors){var M="color: "+C.color,I=0,B=0;y[0].replace(/%[a-zA-Z%]/g,function(z){z!=="%%"&&(I++,z==="%c"&&(B=I))}),y.splice(B,0,M)}}var s=["#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 a(){var y;try{y=localStorage.getItem("debug")}catch(C){}return!y&&typeof process!="undefined"&&"env"in process&&(y={}.DEBUG),{namespaces:y||"",colors:s,useColors:!0,formatArgs:n}}function p(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:r}}function d(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,C=arguments.length>1?arguments[1]:void 0;return function(){for(var M=arguments.length,I=new Array(M),B=0;B<M;B++)I[B]=arguments[B];y&&I.unshift(y);var z=C.namespaces.split(",").map(function(le){return le[le.length-1]==="*"?new RegExp("^"+le.slice(0,le.length-1)+".*$"):new RegExp("^"+le+"$")}),W=z.some(function(le){return le.test(y)}),G={color:t(y,C.colors),namespace:y,useColors:C.useColors};if(!1)var te}}function h(y){return d(y,p())}function g(y){return d(y,a())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?e.exports=g:e.exports=h}),Al=qs("informed:ObjMap "),km=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},jm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,s=String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(a,p){return a!=null?a[p]:a},t);return s===void 0||s===t?n:s},Bx=function(t){return".".concat(t).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},$L=function(t){return t.replace(Bx(t),"").replace(/\./,"")},UL=function(t,r){var n=Bx(r),s=$L(r),a=n?jm(t,n):t;return!!(a&&Object.hasOwnProperty.call(a,s.replace(/\[(.*)\]/,"$1")))},$x=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return p===d.length-1?(s[a]=n,s[a]):s[a]===void 0?(Number.isInteger(+d[p+1])?s[a]=[]:s[a]={},s[a]):(Number.isInteger(+d[p+1])&&!Array.isArray(s[a])&&(s[a]=[]),s[a])},t)},Ux=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=!1;return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return s===void 0?s:(p===d.length-1&&(delete s[a],n=!0),s[a])},t),n},WL=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n;return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return s===void 0?s:(p===d.length-1&&Array.isArray(s)&&(n=s.splice(a,1)),s[a])},t),n},HL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=Object.keys(t);return r.map(function(n){return t[n]})},my=function(t){var r=km(t);return Number.isInteger(+r[r.length-1])},vt=function(){function e(){cy(this,e)}return fy(e,null,[{key:"empty",value:function(r){return HL(r).length===0}},{key:"get",value:function(r,n){var s=jm(r,n);return s}},{key:"has",value:function(r,n){return UL(r,n)}},{key:"set",value:function(r,n,s){if(s!==void 0)Al("SETTING",n,s),$x(r,n,s);else if(my(n)&&e.get(r,n)!==void 0){Al("Special case SETTING",n,"to undefined"),$x(r,n,void 0);var a=km(n);a=a.slice(0,a.length-1),Im(r,a)}else!my(n)&&e.get(r,n)!==void 0&&(Al("Special case REMOVING",n,"from object completley"),e.delete(r,n))}},{key:"delete",value:function(r,n){Al("DELETE",n),my(n)?(Al("ARRAY",n),this.pullOut(r,n)):Ux(r,n);var s=km(n);s=s.slice(0,s.length-1),Im(r,s)}},{key:"pullOut",value:function(r,n){var s=km(n),a=s[s.length-1];s=s.slice(0,s.length-1),Al("Pulling out:",s,"index",a);var p=jm(r,s);Al("Array",p),Array.isArray(p)&&WL(p,a),Im(r,s)}}]),e}();function Im(e,t){if(t.length!==0){var r=jm(e,t);(Array.isArray(r)?r.every(function(n){return n==null}):JSON.stringify(r)==="{}")&&Ux(e,t),Im(e,t.slice(0,t.length-1))}}var Ai=R.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Kf=R.createContext({}),Jf=R.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),Wx=R.createContext(),Hx=R.createContext(),zx=R.createContext(),vy=R.createContext(),Gx=R.createContext(),Kx=R.createContext(),Jx=R.createContext(),Yx=R.createContext();function Es(){var e=(0,R.useContext)(Jf);return e}function Mo(e){var t=(0,R.useRef)(),r=(0,R.useRef)(!0),n=(0,R.useState)(e),s=Lr(n,2),a=s[0],p=s[1];t.current=a;var d=function(y){t.current=y,r.current&&p(y)},h=function(){return t.current};return(0,R.useEffect)(function(){return function(){r.current=!1}},[]),[a,d,h]}var Xx=function(t){return t.type&&t.type.name?t.type.name:t.displayName||t.name||"Component"},Qx=function(t){var r={};if(t.inner){if(t.inner.length===0){vt.set(r,t.path,t.message);return}var n=NL(t.inner),s;try{for(n.s();!(s=n.n()).done;){var a=s.value;vt.get(r,a.path)||vt.set(r,a.path,a.message)}}catch(p){n.e(p)}finally{n.f()}}return r},Zx=function(t,r){try{t.validateSync(r,{abortEarly:!1})}catch(s){var n=Qx(s);return n}},qx=function(t){if(t.inner){if(t.inner.length===0)return;var r=t.inner[0];return r.message}},eS=function(t,r){try{t.validateSync(r,{abortEarly:!1})}catch(n){return qx(n)}},tS=function(t,r){t(r);var n={};return t.errors&&t.errors.forEach(function(s){var a=s.message,p=s.dataPath,d=s.keyword,h=s.params,g=p;d==="required"&&(g="".concat(g,".").concat(h.missingProperty)),g=g.replace(".",""),vt.set(n,g,a)}),n},Cl=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=Math.random()*16|0,n=t=="x"?r:r&3|8;return n.toString(16)})},zL=function(t,r){var n;return function(){for(var a=arguments.length,p=new Array(a),d=0;d<a;d++)p[d]=arguments[d];var h=function(){clearTimeout(n),t.apply(void 0,p)};clearTimeout(n),n=setTimeout(h,r)}},gy=function(t,r,n){var s=r["ui:control"],a=r["informed:props"],p=r["input:props"],d=r["ui:before"],h=r["ui:after"],g=r.oneOf,y=r.items,C=r.enum,M=r.title,I=r.minimum,B=r.maximum,z=r.minLength,W=r.maxLength,G=r.pattern,te=r.type,le=r.properties,ye=Cl();p&&p.id&&(ye=p.id);var he={componentType:s,field:n?"".concat(n,".").concat(t):t,type:te,uiBefore:d,uiAfter:h,properties:te==="object"?le:void 0,items:te==="array"?y:void 0,props:Et(Et({label:M,id:ye,min:I,max:B,minLength:z,maxLength:W,pattern:G},a),p)};if(g){var Ee=r.oneOf.map(function(ce){var Se=ce["input:props"],Ce=Se===void 0?{}:Se;return Et({value:ce.const,label:ce.title},Ce)});he.props.options=Ee}if(C){var me=r.enum.map(function(ce){return{value:ce,label:ce}});he.props.options=me}if(y&&y.oneOf){var ve=y.oneOf.map(function(ce){var Se=ce["input:props"],Ce=Se===void 0?{}:Se;return Et({value:ce.const,label:ce.title},Ce)});he.props.options=ve}return he},rS=function(t,r,n){if(!t||r)return[];var s=t.properties,a=s===void 0?{}:s,p=t.allOf,d=t.propertyOrder,h=d===void 0?[]:d;if(Object.keys(a).length>0){var g=Object.keys(a).sort(function(y,C){var M=h.indexOf(y),I=h.indexOf(C);return(M>-1?M:h.length+1)-(I>-1?I:h.length+1)}).map(function(y){var C=a[y],M=gy(y,C,n);return M});return p&&g.push({componentType:"conditionals",allOf:p}),g}return[]},nS=function(t){var r=t.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return r="properties.".concat(r),r},GL=function(t,r){if(typeof t=="string")return t.split("").map(function(n){return n==="#"?/\d/:n==="*"?/[\w]/:n});if(typeof t=="function")return t(r);if(Array.isArray(t))return t;throw new Error("Formatter must be string, array, or function")},KL=function(t,r){for(var n=0,s=-1,a=!0;a&&n<t.length;)t[n]==r[n]?s=n:a=!1,n=n+1;return s},Rm=function(t,r){if(!t)return{val:t,offset:0};var n="".concat(t),s=GL(r,n),a=s.findIndex(function(W){return typeof W!="string"}),p=s.length-xn(s).reverse().findIndex(function(W){return typeof W!="string"}),d=[],h=n.split(""),g=0,y=0,C=KL(s.slice(0,a),h.slice(0,a));C>-1&&(g=C+1,d=d.concat(s.slice(0,C+1)),y=C+1),C<0&&(d=d.concat(s.slice(0,a)),y=a);for(var M=y;M<s.length;M++){var I=s[M];if(g!=h.length){var B=h[g];if(typeof I=="function")d.push(I(B)),g=g+1;else{var z=typeof I=="string"?I===B:I.test(B);z&&typeof I=="string"?(d.push(I),g=g+1):!z&&typeof I=="string"?g!=h.length&&d.push(I):z&&typeof I!="string"?(d.push(B),g=g+1):!z&&typeof I!="string"&&(g=g+1,M=M-1)}}else if(typeof I=="string"&&M>=p)d.push(I);else break}return{value:d.join(""),offset:n?d.length-n.length:0}},JL=function(t,r){var n,s,a=new Intl.NumberFormat(t,r),p=new Intl.NumberFormat(t),d=(n=(s=p.formatToParts(.1).find(function(W){var G=W.type;return G==="decimal"}))===null||s===void 0?void 0:s.value)!==null&&n!==void 0?n:".";function h(W,G){return W instanceof RegExp&&G instanceof RegExp&&W.source===G.source&&W.global===G.global&&W.ignoreCase===G.ignoreCase&&W.multiline===G.multiline}function g(W,G){for(var te=W.length;te--;)if(G(W[te]))return te;return-1}function y(W,G,te){var le=xn(W);return Array.isArray(te)?le.splice.apply(le,[G,0].concat(xn(te))):le.splice(G,0,te),le}function C(W){return"".concat(W).replace(/\D/g,"")}function M(W){return"".concat(W).split(d).map(function(G){return C(G)}).join(".")}function I(W){if(typeof W=="number")return W;var G=parseFloat(M(W));return Number.isNaN(G)?void 0:G}function B(W){var G=M(W),te="".concat(G).split(".")[1],le=a.formatToParts(Number(G));te==="0"&&le.push({type:"decimal",value:d},{type:"fraction",value:te});var ye=le.reduce(function(me,ve){var ce=ve.type,Se=ve.value;return["decimal","fraction"].includes(ce)&&te==null?me:["integer","fraction"].includes(ce)?[].concat(xn(me),xn(Se.split("").filter(function(Ce,Me){return ce==="fraction"?Me<te.length:!0}).map(function(){return/\d/}))):ce==="currency"?[].concat(xn(me),xn(Se.split(""))):[].concat(xn(me),[Se])},[]),he=g(ye,function(me){return h(me,/\d/)});ye.indexOf(d)===-1&&"".concat(W).indexOf(d)!==-1&&(ye=y(ye,he+1,[d,"[]"]),he+=2);var Ee=ye.slice(he+1).join("");return ye=[].concat(xn(ye.slice(0,he+1)),[Ee]),ye}var z=function(G){if(G!=null)return I(G)};return{formatter:B,parser:z}},aG=Object.freeze({__proto__:null,getChildDisplayName:Xx,yupToFormErrors:Qx,validateYupSchema:Zx,yupToFormError:qx,validateYupField:eS,validateAjvSchema:tS,uuidv4:Cl,debounce:zL,computeFieldFromProperty:gy,computeFieldsFromSchema:rS,getSchemaPathFromJsonPath:nS,informedFormat:Rm,createIntlNumberFormatter:JL}),As=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?R.useLayoutEffect:R.useEffect,YL=function(t){var r=t.value,n=t.inputRef,s=t.maintainCursor,a=s===void 0?!0:s,p=Mo(0),d=Lr(p,3),h=d[0],g=d[1],y=d[2],C=Mo(0),M=Lr(C,3),I=M[0],B=M[1],z=M[2];return As(function(){if(n.current!=null&&y()){var W=y()+z();z()!=0&&a?n.current.setSelectionRange(W+1,W+1):a&&n.current.setSelectionRange(W,W)}},[r]),{setCursorOffset:B,setCursor:g,cursor:h,getCursor:y,cursorOffset:I}},XL=function(t,r){var n=(0,R.useRef)(!0),s=n.current;(0,R.useEffect)(function(){if(s)n.current=!1;else return t()},r)},ui=qs("informed:useField "),iS=function(t,r,n,s,a){if(t!=null){if(a)return a(t);if(r)return r(t);if(n&&!s){var p=Rm(t,n);return p.value}return t}},QL=function(t,r,n,s){if(r&&n)return r(t);if(s){var a=Rm(t,s);return a.value}return t},ZL=function(t,r,n){var s=n.required;if(t||r)return function(a,p){if(r)return eS(r,a);if(t)return t(a,p)};if(s)return function(a){return nD(a,s)}},qL=function(t){var r=t.fieldType,n=t.setValue,s=t.onChange,a=t.multiple,p=t.ref,d=function(g){return n(g)};return(r==="text"||r==="textArea"||r==="number")&&(d=function(g){return n(g.target.value,g)}),r==="select"&&(d=function(){var g=Array.from(p.current).filter(function(y){return y.selected}).map(function(y){return y.value});n(a?g:g[0]||"")}),r==="checkbox"&&(d=function(g){n(g.target.checked),s&&s(g)}),function(h){d(h)}},eD=function(t){var r=t.setTouched,n=t.onBlur;return function(s){r(!0),n&&n(s)}},tD=function(t){var r=t.fieldType,n=t.maskedValue,s=t.multiple,a=t.value;switch(r){case"text":case"number":return!n&&n!==0?"":n;case"textArea":return n||"";case"select":return a||(s?[]:"");case"checkbox":return!!a;default:return a}},rD=function(t){switch(t){case"text":return t;case"number":return t;case"checkbox":return t;default:return}},nD=function(t,r){if(r&&(t==null||t===""))return typeof r=="string"?r:"This field is required"};function Yf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=e.field,n=e.validate,s=e.asyncValidate,a=e.validationSchema,p=e.mask,d=e.maskWithCursorOffset,h=e.format,g=e.parse,y=e.formatter,C=e.parser,M=e.initialValue,I=e.validateOnChange,B=e.validateOnBlur,z=e.validateOnMount,W=e.asyncValidateOnBlur,G=e.maskOnBlur,te=e.allowEmptyString,le=e.onValueChange,ye=e.notify,he=e.keepState,Ee=e.maintainCursor,me=e.debug,ve=e.shadow,ce=e.step,Se=e.fieldType,Ce=e.multiple,Me=e.onChange,Qe=e.onBlur,wt=e.formController,ft=e.relevant,Ar=e.required,Qr=e.keepStateIfRelevant,Rr=e.initialize,Zr=e.formatterDependencies,Pr=Zr===void 0?[]:Zr,Ht=Wr(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"]),yr=(0,R.useState)(Cl()),ar=Lr(yr,1),Ze=ar[0],dt=(0,R.useContext)(Ai),Ut=(0,R.useContext)(Yx),rr=Ut||Qr,Bt=Es(),Un=(0,R.useRef)(),ro=(0,R.useRef)(!0),Pi=(0,R.useRef)(),Sn=(0,R.useRef)(!1),Va=function(){return!Sn.current},jl=function(){return Sn.current};wt&&(dt=wt.updater,Bt=wt.getFormApi());var di=ZL(n,a,{required:Ar}),Bo=(0,R.useState)(function(){return dt.getInitialValue(r)}),ov=Lr(Bo,1),Ps=ov[0],tc=dt.getSavedValue(r),no,$o;(he||rr)&&tc?(ui("Setting field ".concat(r0,"'s kept state"),tc),no=tc.value,$o=tc.touched,Bt.removeSavedState(r0)):M!=null?no=M:no=Ps;var Hy=Mo(iS(no,p,y,C,Rr)),io=Lr(Hy,3),wn=io[0],rc=io[1],fp=io[2],zy=Mo(z?di(wn):void 0),Ti=Lr(zy,3),Uo=Ti[0],Il=Ti[1],pp=Ti[2],dp=Mo($o),Jt=Lr(dp,3),Vi=Jt[0],S9=Jt[1],OO=Jt[2],w9=(0,R.useState)(function(){return QL(wn,h,g,y)}),EO=Lr(w9,2),Gy=EO[0],Ky=EO[1],AO=(0,R.useRef)();AO.current=Gy;var CO=(0,R.useRef)(M),Rl=(0,R.useRef)(r),_O=(0,R.useRef)();CO.current=M,Rl.current=r;var O9=(0,R.useRef)(null),so=R.useMemo(function(){return t||O9},[]),Jy=YL({value:wn,inputRef:so,maintainCursor:!!Ee}),Yy=Jy.getCursor,E9=Jy.setCursor,Xy=Jy.setCursorOffset,A9=function(){return!0},Qy=function(dr){var On=ft||A9,hi=Bt.getFullField(Rl.current)||Rl.current,Yt={path:hi,parentPath:hi.replace(/(.*)[.[].*/,"$1"),get:function(mi,vp){return vt.get(mi,vp)}};return Ut&&Ut.relevant?On(dr,Yt)&&Ut.relevant(dr,Yt):On(dr,Yt)},C9=Mo(Qy(Bt.getValues())),Zy=Lr(C9,3),av=Zy[0],_9=Zy[1],PO=Zy[2],P9=function(dr){return Ut&&Ut.relevant?Ut.relevant(dr):!0},T9=function(){var dr=Qy(Bt.getValues()),On=PO();return dr!=On&&_9(dr),dr};(0,R.useEffect)(function(){!av&&!he&&Un.current.reset()},[av]);var ts=function(){return ve?Bt.getDerrivedValue(r):fp()},hp=function(dr){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},hi=On.preventUpdate;ce&&Bt.getStep()<ce?(ui("Setting ".concat(r,"'s error to undefined as we are not at that step")),Il(void 0),dt.setError(Ze,void 0,!hi)):(ui("Setting ".concat(r,"'s error to ").concat(dr)),Il(dr),dt.setError(Ze,dr,!hi))},qy=function(dr,On){var hi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Yt=dr;Sn.current=!0,ui("Setting ".concat(r," to ").concat(Yt)),Rr&&(Yt=Rr(Yt));var Fl=Bt.getOptions(),mi=Yt;if(Yt===""&&!te&&!hi.allowEmptyString&&!Fl.allowEmptyStrings&&(Yt=void 0),(e.type==="number"||Se==="number")&&Yt!==void 0&&(Yt=+Yt),On&&On.target&&On.target.selectionStart&&E9(On.target.selectionStart),p&&!G&&(mi=p(Yt,Yy()),Yt=p(Yt,Yy())),d&&!G){var vp=d(Yt,Yy());mi=vp.value,Yt=vp.value,Xy(vp.offset)}if(h&&g&&(Yt=g(Yt),mi=h(Yt)),y){var TO=Rm(Yt,y);Xy(TO.offset),mi=TO.value,Yt=mi}C&&(Yt=Yt!=null?C(Yt):Yt),di&&I&&!hi.initial&&(ui("Validating after change ".concat(r," ").concat(Yt)),hp(di(Yt,Bt.getValues()))),rc(Yt),Ky(mi),le&&le(Yt),dt.setValue(Ze,Yt,!hi.preventUpdate)};XL(function(){Un.current.setValue(AO.current)},xn(Pr));var e0=function(dr,On){var hi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Yt=hi.preventUpdate;if(ui("Field ".concat(r," has been touched")),di&&B&&!On&&dr&&(ui("Validating after blur ".concat(r," ").concat(ts())),hp(di(ts(),Bt.getValues()))),s&&W&&!On&&dr&&(ui("Validating async after blur ".concat(r," ").concat(ts())),s(ts(),Bt.getValues())),p&&G){var Fl=p(ts());rc(Fl),Ky(Fl),le&&le(Fl),dt.setValue(Ze,Fl,!Yt)}if(d&&G){var mi=d(ts());Xy(mi.offset),rc(mi.value),Ky(mi.value),le&&le(mi.value),dt.setValue(Ze,mi.value,!Yt)}S9(dr),dt.setTouched(Ze,dr,!Yt)},V9=function(){var dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},On=dr.preventUpdate,hi=iS(CO.current||dt.getInitialValue(Rl.current),p,y,C,Rr);qy(hi,null,{initial:!0,preventUpdate:On}),hp(z?di(hi):void 0,{preventUpdate:On}),e0(void 0,!0,{preventUpdate:On}),Sn.current=!1},k9=function(dr){di&&(ui("Field validating ".concat(r," ").concat(ts())),hp(di(ts(),dr||Bt.getValues())))},j9=function(dr){s&&(ui("Field async validating ".concat(r," ").concat(ts())),s(ts(),dr||Bt.getValues()))},t0={setValue:qy,setTouched:e0,setError:hp,reset:V9,validate:k9,asyncValidate:j9,getValue:ts,getTouched:OO,getError:pp,getIsRelevant:PO,getDirty:jl,getPristine:Va,getFieldState:function(){return{value:ts(),touched:OO(),dirty:jl(),pristine:Va()}},relevant:Qy,multistepRelevant:P9,checkRelevant:T9};Un.current=t0;var mp={value:wn,error:Uo,touched:Vi,maskedValue:Gy,isRelevant:av,dirty:Sn.current,pristine:!Sn.current};ve&&(mp={error:Uo,touched:Vi}),ui("Render",Bt.getFullField(r),mp),As(function(){var hn=Bt.getFullField(Rl.current);return ui("Register",Ze,Rl.current),Pi.current={field:hn,fieldId:Ze,fieldApi:t0,fieldState:mp,notify:ye,keepState:he,inMultistep:rr,shadow:ve},dt.register(Ze,Pi.current),function(){var dr=Bt.getFullField(Rl.current);ui("Deregister",Ze,dr),dt.deregister(Ze)}},[]),(0,R.useEffect)(function(){var hn=Bt.getFullField(r);return ro.current?ro.current=!1:(ui("Update",r,rr),Pi.current.field=hn,dt.update(Ze,Pi.current,_O.current)),function(){_O.current=hn}},[r]),As(function(){me&&so&&(so.current.style.border="5px solid orange",setTimeout(function(){so.current.style.borderWidth="2px",so.current.style.borderStyle="inset",so.current.style.borderColor="initial",so.current.style.borderImage="initial"},500))});var I9=[].concat(xn(Object.values(mp)),xn(Object.values(e)),xn(Object.values(Ht))),R9=function(dr){return(0,R.useMemo)(function(){return av?dr:null},xn(I9))},r0=r,F9=qL({fieldType:Se,setValue:qy,onChange:Me,multiple:Ce,ref:so}),M9=eD({setTouched:e0,onBlur:Qe}),L9=tD({fieldType:Se,maskedValue:Gy,multiple:Ce,value:wn}),D9=rD(Se);return{fieldState:mp,fieldApi:t0,render:R9,ref:so,userProps:Et(Et({},Ht),{},{multiple:Ce,onChange:Me,onBlur:Qe,id:Ht.id||Ze}),informed:Et({name:r0,multiple:Ce,onChange:F9,onBlur:M9,value:L9,ref:so,type:D9,id:Ht.id||Ze},Ht)}}var Lo=function(t){var r=R.forwardRef(function(n,s){var a=Yf(n,s),p=a.fieldState,d=a.fieldApi,h=a.render,g=a.ref,y=a.userProps;return h(R.createElement(t,Ur({fieldApi:d,fieldState:p,field:n.field,forwardedRef:g,debug:n.debug,type:n.type},y)))});return r.displayName="asField(".concat(Xx(t),")"),r},iD=qs("informed:Text "),sD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.maskedValue,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.forwardedRef,I=s.debug,B=s.label,z=s.title,W=s.id,G=Wr(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return iD("Render",y),As(function(){I&&M&&(M.current.style.background="red",setTimeout(function(){M.current.style.background="white"},500))}),R.createElement(R.Fragment,null,B?R.createElement("label",{htmlFor:W}," ",B," "):null,R.createElement("input",Ur({},G,{id:W,name:y,ref:M,value:!a&&a!==0?"":a,onChange:function(le){p(le.target.value,le),h&&h(le)},onBlur:function(le){d(!0),g&&g(le)}})))},oD=Lo(sD),aD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.maskedValue,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.forwardedRef,I=s.debug,B=s.label,z=s.id,W=Wr(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return As(function(){I&&M&&(M.current.style.background="red",setTimeout(function(){M.current.style.background="white"},500))}),R.createElement(R.Fragment,null,B?R.createElement("label",{htmlFor:z}," ",B," "):null,R.createElement("textarea",Ur({},W,{id:z,name:y,ref:M,value:a||"",onChange:function(te){p(te.target.value,te),h&&h(te)},onBlur:function(te){d(!0),g&&g(te)}})))},lD=Lo(aD),uD=qs("informed:Select "),cD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.value,p=r.setTouched,d=s.onChange,h=s.onBlur,g=s.field,y=s.initialValue,C=s.options,M=s.children,I=s.forwardedRef,B=s.debug,z=s.multiple,W=s.label,G=s.id,te=Wr(s,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),le=(0,R.useRef)(),ye=function(Ee){var me=Array.from((I||le).current).filter(function(ve){return ve.selected}).map(function(ve){return ve.value});r.setValue(z?me:me[0]||""),d&&Ee&&d(Ee)};return As(function(){B&&I&&(I.current.style.background="red",setTimeout(function(){I.current.style.background="white"},500))}),uD("Render",g,a),R.createElement(R.Fragment,null,W?R.createElement("label",{htmlFor:G}," ",W," "):null,R.createElement("select",Ur({},te,{id:G,multiple:z,name:g,ref:I||le,value:a||(z?[]:""),onChange:ye,onBlur:function(Ee){p(!0),h&&h(Ee)}}),C?C.map(function(he){return R.createElement("option",{key:he.value,value:he.value,disabled:he.disabled},he.label)}):M))},fD=Lo(cD),pD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.value,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.debug,I=s.forwardedRef,B=s.id,z=s.label,W=Wr(s,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return R.createElement(R.Fragment,null,z?R.createElement("label",{htmlFor:B}," ",z," "):null,R.createElement("input",Ur({},W,{id:B,name:y,ref:I,checked:!!a,onChange:function(te){p(te.target.checked),h&&h(te)},onBlur:function(te){d(!0),g&&g(te)},type:"checkbox"})))},dD=Lo(pD),hD=function(t){return R.forwardRef(function(r,n){return R.createElement(Wx.Consumer,null,function(s){var a=s.radioGroupApi,p=s.radioGroupState;return R.createElement(t,Ur({radioGroupApi:a,radioGroupState:p,ref:n},r))})})},mD=function(t){var r=t.radioGroupApi,n=t.radioGroupState,s=Wr(t,["radioGroupApi","radioGroupState"]),a=n.value,p=r.setValue,d=r.setTouched,h=r.onChange,g=r.onBlur,y=s.value,C=s.onChange,M=s.onBlur,I=s.field,B=s.initialValue,z=s.forwardedRef,W=Wr(s,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return R.createElement("input",Ur({},W,{name:I,ref:z,value:y,checked:a===y,onChange:function(te){te.target.checked&&(p(y),C&&C(te),h&&h(te))},onBlur:function(te){d(!0),M&&M(te),g&&g(te)},type:"radio"}))},vD=hD(mD),gD=function(e){_L(r,e);var t=jL(r);function r(){return cy(this,r),t.apply(this,arguments)}return fy(r,[{key:"render",value:function(){var s=this.props,a=s.options,p=s.children;return R.createElement(Wx.Provider,{value:this.groupContext},a?a.map(function(d){return R.createElement("label",{key:d.value},d.label," ",R.createElement(vD,{value:d.value}))}):p)}},{key:"groupContext",get:function(){return{radioGroupApi:Et(Et({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),r}(R.Component),yD=Lo(gD);function bD(){return(0,R.useContext)(zx)}var xD=function(){var t=bD(),r=t.add;return R.createElement("button",{onClick:function(){r()},type:"button"},"Add")};function SD(){return(0,R.useContext)(vy)}var wD=function(){var t=SD(),r=t.remove;return R.createElement("button",{onClick:function(){r()},type:"button"},"Remove")},Fm=qs("informed:useArrayField "),OD=function(t){var r=t.field,n=t.initialValue,s=t.validate,a=t.arrayFieldApiRef,p=Wr(t,["field","initialValue","validate","arrayFieldApiRef"]),d=Es(),h=(0,R.useState)(new Map),g=Lr(h,1),y=g[0],C=(0,R.useContext)(Ai),M=d.getFullField(r),I=C.getInitialValue(r)||n||[],B=d.getSavedValue(M)&&d.getSavedValue(M).value,z=Mo(B||I),W=Lr(z,3),G=W[0],te=W[1],le=W[2],ye=G?G.map(function(){return Cl()}):[],he=Mo(ye),Ee=Lr(he,3),me=Ee[0],ve=Ee[1],ce=Ee[2],Se=(0,R.useMemo)(function(){return function(ar,Ze){var dt=ce()==null?0:ce().length;return s?s(ar,dt,Ze):void 0}}),Ce=Yf(Et({field:r,validate:s?Se:void 0,shadow:!0},p)),Me=Ce.fieldApi;As(function(){var ar=function(dt){dt!==M&&(Fm("".concat(M," changed")),RegExp("".concat(M,"\\[[0-9]+\\]")).test(dt)&&Me.validate())};return d.emitter.on("value",ar),function(){d.emitter.removeListener("value",ar)}},[r]);var Qe=function(Ze){Fm("EXPECTING REMOVAL OF","".concat(r,"[").concat(Ze,"] and ").concat(r,"[").concat(me.length-1,"]")),C.expectRemoval("".concat(r,"[").concat(Ze,"]")),C.expectRemoval("".concat(r,"[").concat(me.length-1,"]"));var dt=me.slice(0,Ze).concat(me.slice(Ze+1,me.length));ve(dt);var Ut=le(),rr=Ut.slice(0,Ze).concat(Ut.slice(Ze+1,Ut.length));te(rr)},wt=function(Ze,dt){Fm("Swapping","".concat(r,"[").concat(Ze,"] and ").concat(r,"[").concat(dt,"]"));var Ut=xn(me);me[Ze]&&me[dt]?(Ut[Ze]=me[dt],Ut[dt]=me[Ze]):console.warn("Attempted to swap ".concat(Ze," with ").concat(dt," but one of them does not exist :(")),ve(Ut)},ft=function(){me.push(Cl()),ve(xn(me))},Ar=function(Ze){me.push(Cl()),ve(xn(me));var dt=xn(le());dt[me.length-1]=Ze,te(dt)},Qr=function(){var Ze=C.getInitialValue(r)||n||[];te(Ze);var dt=Ze?Ze.map(function(){return Cl()}):[];ve(dt)},Rr=me.map(function(ar,Ze){var dt={remove:function(){return Qe(Ze)}},Ut={initialValue:G&&G[Ze],key:ar,field:"".concat(r,"[").concat(Ze,"]"),index:Ze};return Et(Et({arrayFieldItemApi:dt,arrayFieldItemState:Ut},dt),Ut)}),Zr={add:ft,swap:wt,addWithInitialValue:Ar,reset:Qr};a&&(a.current=Zr);var Pr={fields:Rr,field:r},Ht=Et(Et({},C),{},{register:function(Ze,dt){y.set(Ze,dt);for(var Ut=arguments.length,rr=new Array(Ut>2?Ut-2:0),Bt=2;Bt<Ut;Bt++)rr[Bt-2]=arguments[Bt];C.register.apply(C,[Ze,dt].concat(rr))},deregister:function(Ze){y.delete(Ze);for(var dt=arguments.length,Ut=new Array(dt>1?dt-1:0),rr=1;rr<dt;rr++)Ut[rr-1]=arguments[rr];C.deregister.apply(C,[Ze].concat(Ut))},getInitialValue:function(Ze){if(RegExp("".concat(M,"\\[[0-9]+\\]")).test(Ze)){var dt=Ze.replace(r,""),Ut=vt.get(le(),dt);return Fm("Resetting ".concat(dt," to ").concat(Ut)),Ut}return C.getInitialValue(Ze)}}),yr=function(Ze){return R.createElement(Ai.Provider,{value:Ht},R.createElement(zx.Provider,{value:Zr},R.createElement(Hx.Provider,{value:Pr},Ze)))};return{render:yr,add:ft,swap:wt,addWithInitialValue:Ar,fields:Rr,arrayFieldState:Pr,arrayFieldApi:Zr,field:r}},ED=function(t,r){return Et(Et({},r),{},{getValue:function(s){return r.getValue("".concat(t,".").concat(s))},getTouched:function(s){return r.getTouched("".concat(t,".").concat(s))},getError:function(s){return r.getError("".concat(t,".").concat(s))},setValue:function(s,a){return r.setValue("".concat(t,".").concat(s),a)},setTouched:function(s,a){return r.setTouched("".concat(t,".").concat(s),a)},setError:function(s,a){return r.setError("".concat(t,".").concat(s),a)},getInitialValue:function(s){return r.getInitialValue("".concat(t,".").concat(s))},getSavedValue:function(s){return r.getSavedValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(r.getFullField(t),".").concat(s)}})};function AD(e){var t=Es(),r=(0,R.useMemo)(function(){return ED(e,t)},[e]);return r}function Mm(){var e=(0,R.useContext)(Kf);return e}var sS=function(t){var r=t.when,n=t.children,s=Mm(),a=r(s);return a?n:null},yy=function(t){var r=t.relevant,n=t.field,s=Wr(t,["relevant","field"]),a=Es();if(r){var p=a.getFullField(n),d={path:p,parentPath:p.replace(/(.*)[.[].*/,"$1"),get:function(y,C){return vt.get(y,C)}},h=function(y){var C=y.values;return r(C,d)};return R.createElement(sS,{when:h},R.createElement(oS,Ur({field:n},s)))}else return R.createElement(oS,Ur({field:n},s))},oS=function(t){var r=t.children,n=Wr(t,["children"]),s=OD(n),a=s.render,p=s.arrayFieldState,d=s.arrayFieldApi,h=s.field;return a(typeof r=="function"?r(Et(Et({field:h,arrayFieldApi:d,arrayFieldState:p},d),p)):r)},CD=function(t){var r=t.arrayFieldItemState,n=t.arrayFieldItemApi,s=t.children,a=(0,R.useContext)(Ai),p=Es(),d=(0,R.useState)(0),h=Lr(d,2),g=h[0],y=h[1],C=(0,R.useState)(new Map),M=Lr(C,1),I=M[0],B=r.field,z=AD(B),W=function(){var me=p.getState(),ve=me.values,ce=me.errors,Se=me.touched,Ce={values:vt.get(ve,B),errors:vt.get(ce,B),touched:vt.get(Se,B)};return Ce};(0,R.useEffect)(function(){var Ee=function(ve){var ce=ve.slice(0,ve.lastIndexOf("[")!=-1?ve.lastIndexOf("]")+1:ve.length);ce===B&&y(Math.random())};return p.emitter.on("value",Ee),function(){p.emitter.removeListener("value",Ee)}},[B]);var G=function(){I.forEach(function(me){me.fieldApi.reset()})},te=W(),le=Et(Et({},a),{},{register:function(me,ve,ce){I.set(me,ve),a.register(me,ve,ce)},deregister:function(me){I.delete(me);for(var ve=arguments.length,ce=new Array(ve>1?ve-1:0),Se=1;Se<ve;Se++)ce[Se-1]=arguments[Se];a.deregister.apply(a,[me].concat(ce))}}),ye=Et(Et(Et({},n),z),{},{reset:G}),he=Et(Et({},r),te);return typeof s=="function"?R.createElement(Ai.Provider,{value:le},R.createElement(vy.Provider,{value:ye},R.createElement(Gx.Provider,{value:he},s(Et(Et({arrayFieldItemApi:ye,arrayFieldItemState:he},ye),he))))):R.createElement(Ai.Provider,{value:le},R.createElement(vy.Provider,{value:ye},R.createElement(Gx.Provider,{value:he},s)))};yy.Items=function(e){var t=e.children,r=(0,R.useContext)(Hx),n=r.fields;return n.map(function(s){var a=s.arrayFieldItemState,p=s.arrayFieldItemApi,d=a.key;return R.createElement(CD,{key:d,arrayFieldItemApi:p,arrayFieldItemState:a},t)})};var Lm=function(t){var r=t.components,n=(0,R.useContext)(Ai),s=n.fieldMap;return r?r.map(function(a,p){var d=a["ui:control"],h=s[d];return R.createElement(h,{key:"ui-comp-".concat(p)})}):null},_D=qs("informed:FormFields "),by=function e(t){var r=t.schema,n=t.prefix,s=t.onlyValidateSchema,a=(0,R.useContext)(Ai),p=a.fieldMap,d=(0,R.useMemo)(function(){var h=rS(r,s,n),g=h.map(function(y,C){var M=y.field,I=y.props,B=y.type,z=y.properties,W=y.items,G=y.componentType,te=y.uiBefore,le=y.uiAfter,ye=y.allOf,he=p[G];return _D("Rendering Field",M,y),!he&&B==="object"&&z?R.createElement(e,{schema:y,prefix:M,key:"ScheamField-".concat(C)}):!he&&B==="array"&&W?R.createElement(aS,Ur({key:"ScheamField-".concat(C),field:M,items:W,uiBefore:te,uiAfter:le},I)):he&&G==="array"&&W&&B==="array"?R.createElement(he,Ur({key:"ScheamField-".concat(C),field:M,items:W,uiBefore:te,uiAfter:le},I)):G==="conditionals"?ye.map(function(Ee){var me=Ee.then,ve=Ee.if.properties,ce=function(Ce){var Me=Ce.values;return Object.keys(ve).every(function(Qe){var wt=ve[Qe];return Me[Qe]===wt.const})};return R.createElement(sS,{key:"ScheamField-".concat(C),when:ce},R.createElement(e,{schema:me}))}):he?R.createElement(he,Ur({key:"ScheamField-".concat(C),field:M},I)):null});return g},[r,n]);return d},aS=function(t){var r=t.field,n=t.items,s=t.uiBefore,a=t.uiAfter,p=Wr(t,["field","items","uiBefore","uiAfter"]);return R.createElement(yy,Ur({field:r},p),R.createElement(Lm,{components:s}),R.createElement(yy.Items,null,function(d){var h=d.field;return R.createElement(R.Fragment,null,R.createElement(Lm,{components:n["ui:before"]}),R.createElement(by,{schema:n,prefix:h}),R.createElement(Lm,{components:n["ui:after"]}))}),R.createElement(Lm,{components:a}))},PD={select:fD,input:oD,textarea:lD,checkbox:dD,radio:yD,add:xD,remove:wD,array:aS},gr=qs("informed:Controller "),TD=function(t,r){var n=Object.keys(r).find(function(a){return t.includes(a)});if(n){var s=t.slice(0,n.length);return s===n}},Zi=function(){},VD=function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cy(this,e),this.options=r,this.subscriptions=new Map;var n=r.ajv,s=r.schema,a=r.fieldMap;this.ajv=n?new n({allErrors:!0}):null,this.ajvValidate=n?this.ajv.compile(s):null,this.fieldMap=a||PD,this.fieldsById=new Map,this.fieldsByName={get:function(d){var h;return t.fieldsById.forEach(function(g){g&&g.field===d&&(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:Zi,setTouched:Zi,setError:Zi,reset:Zi,validate:Zi,getValue:Zi,getTouched:Zi,getError:Zi,getFieldState:Zi,checkRelevant:Zi,getPristine:Zi,getDirty:Zi}},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(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);y.shadow||vt.set(t.state.values,y.field,y.fieldApi.getValue()),y.fieldApi.relevant(t.state.values)||vt.delete(t.state.values,y.field),t.fieldsById.forEach(function(C){var M=C.fieldApi.checkRelevant();(!C.fieldApi.multistepRelevant(t.state.values)||!M&&!C.keepState)&&(vt.delete(t.state.values,C.field),vt.delete(t.state.touched,C.field),vt.delete(t.state.errors,C.field))}),g&&(t.emit("change"),t.emit("field",y.field),t.emit("value",y.field,h))},setTouched:function(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);!y.shadow&&y.fieldApi.getIsRelevant()&&vt.set(t.state.touched,y.field,y.fieldApi.getTouched()),y.shadow&&y.fieldApi.getError()!=null&&y.fieldApi.relevant(t.state.values)&&vt.set(t.state.touched,y.field,y.fieldApi.getTouched()),g&&(t.emit("change"),t.emit("field",y.field))},setError:function(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);!y.shadow&&y.fieldApi.getIsRelevant()&&vt.set(t.state.errors,y.field,y.fieldApi.getError());var C=vt.get(t.state.errors,y.field);(y.shadow&&y.fieldApi.getError()!=null&&y.fieldApi.relevant(t.state.values)||y.shadow&&y.fieldApi.getError()===void 0&&y.fieldApi.relevant(t.state.values)&&typeof C=="string")&&vt.set(t.state.errors,y.field,y.fieldApi.getError()),g&&(t.emit("change"),t.emit("field",y.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(p){delete t.state.error,t.notify(p)})}return fy(e,[{key:"emit",value:function(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];var p=this.subscriptions.get(r);p&&p.forEach(function(d){return d.apply(void 0,s)})}},{key:"on",value:function(r,n){this.subscriptions.get(r)||this.subscriptions.set(r,new Set);var s=this.subscriptions.get(r);s.add(n)}},{key:"removeListener",value:function(r,n){var s=this.subscriptions.get(r);s.delete(n)}},{key:"setOptions",value:function(r){this.options=r}},{key:"setValue",value:function(r,n,s){this.getField(r).fieldApi.setValue(n,null,Et({allowEmptyString:this.options.allowEmptyStrings},s))}},{key:"setTouched",value:function(r,n){this.getField(r).fieldApi.setTouched(n)}},{key:"setError",value:function(r,n){this.getField(r).fieldApi.setError(n)}},{key:"setFormError",value:function(r){this.state.error=r,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(r,n){if(this.state.validating=this.state.validating-1,this.getError(r)||this.setError(r,n),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(gr("Submit",this.state),this.emit("submit")):(gr("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(r){this.state.step=r,this.emit("change")}},{key:"setCurrent",value:function(r){this.state.Current=r,this.emit("change")}},{key:"back",value:function(r){this.state.step=this.state.step-1,this.state.Current=r,this.emit("change")}},{key:"next",value:function(r){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=r),this.emit("change")}},{key:"setInitialValue",value:function(r,n){vt.set(this.options.initialValues,r,n)}},{key:"getFormState",value:function(){return gr("Returning form state"),Et(Et({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(r){var n=this.getValues();return vt.get(n,r)}},{key:"getValue",value:function(r){var n=this.getField(r).fieldApi.getValue();return gr("Getting value for",r,n),n}},{key:"getTouched",value:function(r){var n=this.getField(r).fieldApi.getTouched();return gr("Getting touched for",r,n),n}},{key:"getError",value:function(r){var n=this.getField(r).fieldApi.getError();return gr("Getting error for",r,n),n}},{key:"getDirty",value:function(r){var n=this.getField(r).fieldApi.getDirty();return gr("Getting dirty for",r,n),n}},{key:"getPristine",value:function(r){var n=this.getField(r).fieldApi.getPristine();return gr("Getting pristine for",r,n),n}},{key:"getValues",value:function(){return gr("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return gr("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return gr("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(r){var n=this.fieldsByName.get(r);return n&&n.shadow?vt.get(this.savedValues,"shadow-".concat(r)):vt.get(this.savedValues,r)}},{key:"removeSavedState",value:function(r){var n=this.fieldsByName.get(r);return n&&n.shadow?vt.delete(this.savedValues,"shadow-".concat(r)):vt.delete(this.savedValues,r)}},{key:"getFullField",value:function(r){return r}},{key:"getInitialValue",value:function(r){return vt.get(this.options.initialValues,r)}},{key:"getField",value:function(r){gr("Getting Field",r);var n=this.fieldsByName.get(r);return n||(console.warn("Attempting to get field ".concat(r," but it does not exist")),this.dummyField)}},{key:"notify",value:function(r){var n=this,s=this.getField(r);s&&s.notify&&s.notify.forEach(function(a){var p=".".concat(r),d="".concat(p.replace(/(.*)[.[].*/,"$1"),".").concat(a).slice(1),h=n.getField(d);h&&(gr("Notifying",h.field),h.fieldApi.validate(),h.fieldApi.checkRelevant())})}},{key:"validateField",value:function(r){this.getField(r).fieldApi.validate()}},{key:"resetField",value:function(r){this.getField(r).fieldApi.reset()}},{key:"fieldExists",value:function(r){return this.fieldsByName.get(r)!=null}},{key:"valid",value:function(){var r=this.getErrors();return!!(vt.empty(r)&&!this.state.error)}},{key:"screenValid",value:function(){var r=Object.entries(this.onScreen).some(function(n){var s=Lr(n,2),a=s[1];return a.fieldApi.getError()});return!r}},{key:"invalid",value:function(){var r=this.getErrors();return!!(!vt.empty(r)||this.state.error)}},{key:"pristine",value:function(){var r=!0;return this.fieldsById.forEach(function(n){n.fieldApi.getPristine()||(r=!1)}),r}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){gr("Resetting"),this.fieldsById.forEach(function(r){r.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(r){gr("Setting values"),this.fieldsById.forEach(function(n){var s=vt.get(r,n.field);s!==void 0&&n.fieldApi.setValue(s,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var r=this;gr("Validating all fields");var n=this.getValues();if(this.options.validationSchema){var s=Zx(this.options.validationSchema,n);this.fieldsById.forEach(function(h){if(vt.has(s,h.field)){var g=vt.get(s,h.field);r.setError(h.field,g)}else r.setError(h.field,void 0)})}if(this.options.schema&&this.options.ajv){var a=tS(this.ajvValidate,n);this.fieldsById.forEach(function(h){if(vt.has(a,h.field)){var g=vt.get(a,h.field);r.setError(h.field,g)}else r.setError(h.field,void 0)})}if(this.fieldsById.forEach(function(h){h.fieldApi.validate(n),h.fieldApi.setTouched(!0,!0)}),this.options.validate){var p=this.options.validate(n);this.setFormError(p)}if(this.options.validateFields){var d=this.options.validateFields(n);this.fieldsById.forEach(function(h){if(vt.has(d,h.field)){var g=vt.get(d,h.field);r.setError(h.field,g)}})}}},{key:"asyncValidate",value:function(){gr("Async Validating all fields");var r=this.getValues();this.fieldsById.forEach(function(n){n.fieldApi.asyncValidate(r)})}},{key:"keyDown",value:function(r){if(r.keyCode==13&&this.options.preventEnter)return r.preventDefault(r),!1}},{key:"submitForm",value:function(r){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&r&&r.preventDefault(r),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(gr("Submit",this.state),this.emit("submit")):(gr("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var r=this;this.fieldsById.forEach(function(n){r.emit("field",n.field)})}},{key:"register",value:function(r,n,s){var a=n.field,p=n.state;gr("Register ID:",r,"Name:",a,p,"Initial",s);var d=a.slice(0,a.lastIndexOf("[")!=-1?a.lastIndexOf("]")+1:a.length),h;this.fieldsById.forEach(function(g,y){g&&g.field===a&&(h=y)}),h&&(n.keepState||n.inMultistep)?(gr("Already Registered",a),this.fieldsById.delete(h)):h&&(!n.keepState||!n.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",a),gr("Fields Registered",this.fieldsById.size),this.onScreen[r]=n,this.fieldsById.set(r,n),gr("clearing expected removal",d),delete this.expectedRemovals[d],delete this.pulledOut[d],!n.shadow&&(this.updater.setValue(r,n.fieldApi.getValue(),!1),this.updater.setError(r,n.fieldApi.getError(),!1),this.updater.setTouched(r,n.fieldApi.getTouched(),!1),s||this.emit("change"),this.emit("field",a))}},{key:"deregister",value:function(r){var n=this.fieldsById.get(r),s=n.field;gr("Deregister",r,s),delete this.onScreen[r];var a=TD(s,this.expectedRemovals),p=s.slice(0,s.lastIndexOf("[")!=-1?s.lastIndexOf("]")+1:s.length);(n.keepState||n.inMultistep)&&!a&&(gr("Saving field ".concat(s,"'s value"),n.fieldApi.getFieldState()),n.shadow?vt.set(this.savedValues,"shadow-".concat(s),n.fieldApi.getFieldState()):vt.set(this.savedValues,s,n.fieldApi.getFieldState())),(a||!n.keepState&&!n.inMultistep||!n.fieldApi.getIsRelevant()&&!n.keepState)&&(gr("Removing field",s),this.fieldsById.delete(r),a||(vt.delete(this.state.values,s),vt.delete(this.state.touched,s),vt.delete(this.state.errors,s),n.shadow?vt.delete(this.savedValues,"shadow-".concat(s)):vt.delete(this.savedValues,s)),a&&this.pulledOut[p]&&(gr("Pulling out",s,"with magic value",p),vt.pullOut(this.state.values,p),vt.pullOut(this.state.touched,p),vt.pullOut(this.state.errors,p),vt.pullOut(this.savedValues,p),delete this.pulledOut[p])),this.emit("change")}},{key:"expectRemoval",value:function(r){gr("Expecting removal of",r),this.expectedRemovals[r]=!0,this.pulledOut[r]=!0}},{key:"update",value:function(r,n,s){gr("Update",r,n.field,s,n.fieldState.value);var a=n.fieldApi.getValue(),p=n.fieldApi.getError(),d=n.fieldApi.getTouched(),h=this.fieldsByName.get(s);s&&!h&&(vt.set(this.state.values,s),vt.set(this.state.errors,s),vt.set(this.state.touched,s)),vt.set(this.state.values,n.field,a),vt.set(this.state.errors,n.field,p),vt.set(this.state.touched,n.field,d),this.emit("change")}}]),e}(),xy=qs("informed:FormProvider "),kD=function(t){var r=t.children,n=t.formApi,s=t.formController,a=t.formState,p=Wr(t,["children","formApi","formController","formState"]);if(xy("Render FormProvider"),n)return xy("Render FormProvider with given values"),R.createElement(Ai.Provider,{value:s.updater},R.createElement(Jf.Provider,{value:n},R.createElement(Kf.Provider,{value:a},r)));xy("Render FormProvider with generated values");var d=uS(p);return R.createElement(Ai.Provider,{value:d.formController.updater},R.createElement(Jf.Provider,{value:d.formApi},R.createElement(Kf.Provider,{value:d.formState},r)))},lS=qs("informed:useForm "),uS=function(t){var r=t.dontPreventDefault,n=t.initialValues,s=t.validate,a=t.validateFields,p=t.allowEmptyStrings,d=t.preventEnter,h=t.getApi,g=t.apiRef,y=t.onChange,C=t.onReset,M=t.onSubmit,I=t.onValueChange,B=t.onSubmitFailure,z=t.validationSchema,W=t.schema,G=t.ajv,te=t.fieldMap,le=t.onlyValidateSchema,ye=Wr(t,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);lS("Render useForm");var he=(0,R.useMemo)(function(){return{dontPreventDefault:r,initialValues:n,validate:s,validateFields:a,allowEmptyStrings:p,preventEnter:d,validationSchema:z,schema:W,ajv:G,fieldMap:te}},[r,n,s,a,p,d,z,W,G,te]),Ee=(0,R.useState)(function(){return new VD(he)}),me=Lr(Ee,1),ve=me[0];(0,R.useEffect)(function(){ve.setOptions(he)},[he]),As(function(){ve.mount()},[]);var ce=(0,R.useState)(function(){return ve.getFormState()}),Se=Lr(ce,2),Ce=Se[0],Me=Se[1];As(function(){var Qr=function(){return y&&y(ve.getFormState())},Rr=function(){return C&&C()},Zr=function(){return M&&M(ve.getFormState().values)},Pr=function(){return I&&I(ve.getFormState().values)},Ht=function(){return B&&B(ve.getFormState().errors)};return ve.on("change",Qr),ve.on("reset",Rr),ve.on("submit",Zr),ve.on("value",Pr),ve.on("failure",Ht),function(){ve.removeListener("change",Qr),ve.removeListener("reset",Rr),ve.removeListener("submit",Zr),ve.removeListener("value",Pr),ve.removeListener("failure",Ht)}},[y,C,M,I,B]),(0,R.useState)(function(){var Qr=function(){lS("Setting form state"),Me(ve.getFormState())};ve.on("change",Qr),h&&h(ve.getFormApi()),g&&(g.current=ve.getFormApi())});var Qe=(0,R.useState)(function(){return ve.getFormApi()}),wt=Lr(Qe,1),ft=wt[0],Ar=function(Rr){return R.createElement(kD,{formApi:ft,formState:Ce,formController:ve},R.createElement(R.Fragment,null,Rr||R.createElement(by,{schema:W,onlyValidateSchema:le})))};return{formApi:ft,formState:Ce,formController:ve,render:Ar,userProps:ye}},jD=qs("informed:Form "),ID=function(t){var r=t.children,n=t.render,s=t.component,a=Wr(t,["children","render","component"]);jD("Render FORM");var p=uS(a),d=p.formApi,h=p.formController,g=p.formState,y=p.render,C=p.userProps,M=function(){var B={formState:g,formApi:d};return s?R.createElement(s,B,r):n?n(B):typeof r=="function"?r(B):r};return y(R.createElement("form",Ur({},C,{onReset:h.reset,onSubmit:h.submitForm,onKeyDown:h.keyDown}),M()))},RD=function(t,r){return Et(Et({},r),{},{getValue:function(s){return r.getValue("".concat(t,".").concat(s))},getTouched:function(s){return r.getTouched("".concat(t,".").concat(s))},getError:function(s){return r.getError("".concat(t,".").concat(s))},setValue:function(s,a){return r.setValue("".concat(t,".").concat(s),a)},setTouched:function(s,a){return r.setTouched("".concat(t,".").concat(s),a)},setError:function(s,a){return r.setError("".concat(t,".").concat(s),a)},getInitialValue:function(s){return r.getInitialValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(r.getFullField(t),".").concat(s)}})},FD=function(t,r){var n=r.register,s=r.deregister,a=r.setValue,p=r.setTouched,d=r.setError,h=r.update,g=r.getField,y=r.expectRemoval,C=r.getInitialValue,M=r.fieldMap,I=r.getSavedValue;return{register:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return n.apply(void 0,["".concat(t,".").concat(z)].concat(G))},deregister:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return s.apply(void 0,["".concat(t,".").concat(z)].concat(G))},update:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return h.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setValue:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return a.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setTouched:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return p.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setError:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return d.apply(void 0,["".concat(t,".").concat(z)].concat(G))},getField:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return g.apply(void 0,["".concat(t,".").concat(z)].concat(G))},expectRemoval:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return y.apply(void 0,["".concat(t,".").concat(z)].concat(G))},getInitialValue:function(z){return C("".concat(t,".").concat(z))},getSavedValue:function(z){return I("".concat(t,".").concat(z))},fieldMap:M}},lG=function(t){var r=t.scope,n=t.children,s=useContext(Ai),a=Es(),p=Mm(),d=useMemo(function(){return RD(r,a)},[r]),h=useMemo(function(){return FD(r,s)},[r]);return React.createElement(Ai.Provider,{value:h},React.createElement(Jf.Provider,{value:d},React.createElement(Kf.Provider,{value:p},n)))},uG=function(t){var r=Mm(),n={};Object.keys(t).length>0?Object.keys(t).forEach(function(I){n[I]=r[I]}):n=r;var s=n,a=s.pristine,p=s.dirty,d=s.invalid,h=s.values,g=s.errors,y=s.touched,C=s.validating,M=s.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:a,dirty:p,invalid:d,values:h,errors:g,touched:y,validating:C,submitting:M},null,2)))},MD=function(t){var r=t.initialStep,n=t.multistepApiRef,s=Es(),a=s.getValues,p=s.validate,d=s.screenValid,h=(0,R.useState)(new Map),g=Lr(h,1),y=g[0],C=(0,R.useRef)(0),M=Mo({current:r,steps:[],goal:null}),I=Lr(M,3),B=I[0],z=I[1],W=I[2],G=(0,R.useState)(function(){var he=function(){var ve=W(),ce=ve.current,Se=y.get(ce);return Se},Ee={getState:function(){return W()},getCurrentStep:he,getStep:function(ve){return y.get(ve)},getNumberOfSteps:function(){return y.size},next:function(){if(p(),d()){var ve=he(),ce=ve.getNext,Se=ce(),Ce=typeof Se=="function"?Se(a()):Se;Ce&&z(function(Me){return Et(Et({},Me),{},{current:Ce})})}},back:function(){var ve=he(),ce=ve.getPrevious,Se=ce(),Ce=typeof Se=="function"?Se(a()):Se;Ce&&z(function(Me){return Et(Et({},Me),{},{current:Ce})})},setCurrent:function(ve){if(ve){var ce=y.get(ve).index;ce<he().index?z(function(Se){return Et(Et({},Se),{},{current:ve,goal:null})}):z(function(Se){return Et(Et({},Se),{},{goal:ve})})}},register:function(ve,ce,Se){Se?(C.current=C.current+1,y.set(ve,Et(Et({},ce),{},{index:C.current}))):z(function(Ce){return Et(Et({},Ce),{},{steps:Array.from(y.keys())})})},deregister:function(ve){y.delete(ve),C.current=C.current-1,z(function(ce){return Et(Et({},ce),{},{steps:Array.from(y.keys())})})}};return n&&(n.current=Ee),Ee}),te=Lr(G,1),le=te[0],ye=function(Ee){return R.createElement(Jx.Provider,{value:le},R.createElement(Kx.Provider,{value:B},Ee))};return Et(Et(Et({},le),B),{},{render:ye})};function LD(){return(0,R.useContext)(Kx)}function DD(){return(0,R.useContext)(Jx)}var ND=function(t){var r=t.step,n=t.next,s=t.previous,a=t.relevant,p=Mm(),d=p.values,h=LD(),g=h.current,y=h.goal,C=DD(),M=C.register,I=C.deregister,B=C.next,z=r===g,W=a?a(d):!0,G=(0,R.useRef)(n),te=(0,R.useRef)(s),le=(0,R.useRef)();G.current=n,te.current=s,le.current=a,(0,R.useState)(function(){M(r,{name:r,getNext:function(){return G.current},getPrevious:function(){return te.current}},!0)}),(0,R.useEffect)(function(){return M(r,{name:r,getNext:function(){return G.current},getPrevious:function(){return te.current}}),function(){I(r)}},[r]),(0,R.useEffect)(function(){y&&z&&y!==r&&B()},[y,z]);var ye=function(Ee){return R.createElement(Yx.Provider,{value:{relevant:function(ve){return le.current?le.current(ve):!0},multistep:!0}},z&&W?Ee:null)};return{isCurrent:z,isRelevant:W,step:r,render:ye}};function BD(e){var t=e.children,r=Wr(e,["children"]),n=MD(r),s=n.render,a=Wr(n,["render"]);return s(typeof t=="function"?t(a):t)}BD.Step=function(t){var r=t.children,n=Wr(t,["children"]),s=ND(n),a=s.render;return a(r)};var cG=function(t){var r=t.field,n=useContext(Ai),s=n.fieldMap,a=Es(),p=a.getFullField,d=a.getOptions,h=p(r),g=d(),y=g.schema,C=nS(h),M=vt.get(y,C);if(!M)return null;var I=gy(r,M),B=I.props,z=I.componentType,W=s[z];return React.createElement(W,Ur({field:r},B))},fG=function(){var t=Es(),r=t.getOptions,n=r(),s=n.schema;return React.createElement(by,{schema:s})},pG=function(t){return React.forwardRef(function(r,n){return React.createElement(Jf.Consumer,null,function(s){return React.createElement(t,Ur({formApi:s,ref:n},r))})})},dG=function(t){return React.forwardRef(function(r,n){return React.createElement(Kf.Consumer,null,function(s){return React.createElement(t,Ur({formState:s,ref:n},r))})})},$D=function(t,r){return{getValue:function(){return t.getValue(r)},setValue:function(s){return t.setValue(r,s)},getTouched:function(){return t.getTouched(r)},setTouched:function(s){return t.setTouched(r,s)},getError:function(){return t.getError(r)},setError:function(s){return t.setError(r,s)},reset:function(){return t.resetField(r)},validate:function(){return t.validateField(r)},exists:function(){return t.fieldExists(r)},getDirty:function(){return t.getDirty(r)},getPristine:function(){return t.getPristine(r)},getFieldState:function(){return t.getField(r).fieldApi.getFieldState()}}};function cS(e){var t=Es(),r=useMemo(function(){return $D(t,e)},[e]);return r}function UD(e){var t=cS(e),r=Es(),n=React.useState(),s=Lr(n,2),a=s[1],p=React.useCallback(function(){return a({})},[]);return As(function(){var d=function(g){g===e&&p()};return r.emitter.on("field",d),function(){r.emitter.removeListener("field",d)}},[]),As(function(){p()},[]),t.getFieldState()||{}}var hG=function(t){return function(r){return function(n){var s=UD(t);return React.createElement(r,Ur({fieldState:s},n))}}},mG=function(t){return function(r){return function(n){var s=cS(t);return React.createElement(r,Ur({fieldApi:s},n))}}},vG=function(t){var r=t.value,n=t.forwardedRef,s=t.children,a=Wr(t,["value","forwardedRef","children"]);return React.createElement("option",Ur({ref:n,value:r,key:r},a),s)},gG=null,fS=c(81105),_l=c(93266),WD=Object.defineProperty,HD=Object.defineProperties,zD=Object.getOwnPropertyDescriptors,pS=Object.getOwnPropertySymbols,GD=Object.prototype.hasOwnProperty,KD=Object.prototype.propertyIsEnumerable,dS=(e,t,r)=>t in e?WD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xf=(e,t)=>{for(var r in t||(t={}))GD.call(t,r)&&dS(e,r,t[r]);if(pS)for(var r of pS(t))KD.call(t,r)&&dS(e,r,t[r]);return e},JD=(e,t)=>HD(e,zD(t)),Dm=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const hS="/oauth2-redirect.html";class Cs{static authorizeImplicit({authorizationUrl:t,clientId:r,scopes:n,extraParams:s={},routingBasePath:a,redirectUri:p,successCallback:d,errorCallback:h}){const g=(0,_l.p8)({date:new Date().toString()}),y=new URL(t),C=a==="/"?"":a,M=`${window.location.origin}${C}${hS}`;y.searchParams.set("client_id",r),y.searchParams.set("redirect_uri",p||M),y.searchParams.set("response_type","token"),y.searchParams.set("state",g),Array.isArray(n)&&y.searchParams.set("scope",n.join(" "));for(const I in s)y.searchParams.set(I,s[I]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:t,clientId:r,scopes:n},state:g,successCallback:I=>{d(I),Cs.clearRedirectData("implicit")},errorCallback:I=>{h(I),Cs.clearRedirectData("implicit")}},window.open(y.toString())}static authorizeAuthorizationCode({authorizationUrl:t,tokenUrl:r,clientId:n,clientSecret:s,codeVerifier:a,codeChallenge:p,scopes:d,extraParams:h={},extraHeaders:g={},routingBasePath:y,redirectUri:C,successCallback:M,errorCallback:I}){const B=new URL(t),z=y==="/"?"":y,W=`${window.location.origin}${z}${hS}`,G=(0,_l.p8)({date:new Date().toString()});B.searchParams.set("client_id",n),B.searchParams.set("redirect_uri",C||W),B.searchParams.set("response_type","code"),B.searchParams.set("state",G),Array.isArray(d)&&B.searchParams.set("scope",d.join(" ")),p&&(B.searchParams.set("code_challenge",p),B.searchParams.set("code_challenge_method","S256"));for(const te in h)B.searchParams.set(te,h[te]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:t,clientId:n,scopes:d},state:G,successCallback:te=>Dm(this,[te],function*({auth_code:le}){try{const ye=yield fetch(r,{method:"POST",headers:Xf({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},g),body:fS.stringify(Xf(JD(Xf({client_id:n,client_secret:s},a&&{code_verifier:a}),{code:le,grant_type:"authorization_code",redirect_uri:C||W}),h))});yield mS(ye,M,I)}catch(ye){I(ye)}Cs.clearRedirectData("authorizationCode")}),errorCallback:te=>{I(te),Cs.clearRedirectData("authorizationCode")}},window.open(B.toString())}static clearRedirectData(t){window.redirectOAuth2={flow:t,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(t){return Dm(this,arguments,function*({tokenUrl:r,clientId:n,clientSecret:s,scopes:a=[],extraParams:p={},extraHeaders:d={},successCallback:h,errorCallback:g}){try{const y=JSON.parse(JSON.stringify(Xf({client_id:n,client_secret:s,grant_type:"client_credentials",scope:Array.isArray(a)&&a.length?a.join(" "):void 0},p))),C=yield fetch(r,{method:"POST",headers:Xf({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},d),body:fS.stringify(y)});yield mS(C,h,g)}catch(y){g(y)}})}}const yG=new Cs;function mS(e,t,r){return Dm(this,null,function*(){if(e.ok){const n=yield e.json();t(n)}else r(new Error((e.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield e.json()):yield e.text()))})}function vS(e){return Dm(this,null,function*(){return(0,_l.rS)(yield(0,_l.JQ)(e))})}var Qf=c(73624),st=c(88075),YD=c(86981),XD=c(46396),QD=Object.defineProperty,ZD=Object.defineProperties,qD=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,gS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,bS=(e,t,r)=>t in e?QD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bm=(e,t)=>{for(var r in t||(t={}))gS.call(t,r)&&bS(e,r,t[r]);if(Nm)for(var r of Nm(t))yS.call(t,r)&&bS(e,r,t[r]);return e},e3=(e,t)=>ZD(e,qD(t)),t3=(e,t)=>{var r={};for(var n in e)gS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nm)for(var n of Nm(e))t.indexOf(n)<0&&yS.call(e,n)&&(r[n]=e[n]);return r};const xS=e=>Kt.iv`
170
+ `+z)}else y[0]=M+" "+y[0]}function n(y,C){if(y[0]=(C.useColors?"%c":"")+C.namespace,!!C.useColors){var M="color: "+C.color,I=0,B=0;y[0].replace(/%[a-zA-Z%]/g,function(z){z!=="%%"&&(I++,z==="%c"&&(B=I))}),y.splice(B,0,M)}}var s=["#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 a(){var y;try{y=localStorage.getItem("debug")}catch(C){}return!y&&typeof process!="undefined"&&"env"in process&&(y={}.DEBUG),{namespaces:y||"",colors:s,useColors:!0,formatArgs:n}}function p(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:r}}function d(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,C=arguments.length>1?arguments[1]:void 0;return function(){for(var M=arguments.length,I=new Array(M),B=0;B<M;B++)I[B]=arguments[B];y&&I.unshift(y);var z=C.namespaces.split(",").map(function(le){return le[le.length-1]==="*"?new RegExp("^"+le.slice(0,le.length-1)+".*$"):new RegExp("^"+le+"$")}),W=z.some(function(le){return le.test(y)}),G={color:t(y,C.colors),namespace:y,useColors:C.useColors};if(!1)var te}}function h(y){return d(y,p())}function g(y){return d(y,a())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?e.exports=g:e.exports=h}),Al=qs("informed:ObjMap "),km=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},jm=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,s=String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(a,p){return a!=null?a[p]:a},t);return s===void 0||s===t?n:s},Bx=function(t){return".".concat(t).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},$L=function(t){return t.replace(Bx(t),"").replace(/\./,"")},UL=function(t,r){var n=Bx(r),s=$L(r),a=n?jm(t,n):t;return!!(a&&Object.hasOwnProperty.call(a,s.replace(/\[(.*)\]/,"$1")))},$x=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return p===d.length-1?(s[a]=n,s[a]):s[a]===void 0?(Number.isInteger(+d[p+1])?s[a]=[]:s[a]={},s[a]):(Number.isInteger(+d[p+1])&&!Array.isArray(s[a])&&(s[a]=[]),s[a])},t)},Ux=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=!1;return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return s===void 0?s:(p===d.length-1&&(delete s[a],n=!0),s[a])},t),n},WL=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n;return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a,p,d){return s===void 0?s:(p===d.length-1&&Array.isArray(s)&&(n=s.splice(a,1)),s[a])},t),n},HL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=Object.keys(t);return r.map(function(n){return t[n]})},my=function(t){var r=km(t);return Number.isInteger(+r[r.length-1])},vt=function(){function e(){cy(this,e)}return fy(e,null,[{key:"empty",value:function(r){return HL(r).length===0}},{key:"get",value:function(r,n){var s=jm(r,n);return s}},{key:"has",value:function(r,n){return UL(r,n)}},{key:"set",value:function(r,n,s){if(s!==void 0)Al("SETTING",n,s),$x(r,n,s);else if(my(n)&&e.get(r,n)!==void 0){Al("Special case SETTING",n,"to undefined"),$x(r,n,void 0);var a=km(n);a=a.slice(0,a.length-1),Im(r,a)}else!my(n)&&e.get(r,n)!==void 0&&(Al("Special case REMOVING",n,"from object completley"),e.delete(r,n))}},{key:"delete",value:function(r,n){Al("DELETE",n),my(n)?(Al("ARRAY",n),this.pullOut(r,n)):Ux(r,n);var s=km(n);s=s.slice(0,s.length-1),Im(r,s)}},{key:"pullOut",value:function(r,n){var s=km(n),a=s[s.length-1];s=s.slice(0,s.length-1),Al("Pulling out:",s,"index",a);var p=jm(r,s);Al("Array",p),Array.isArray(p)&&WL(p,a),Im(r,s)}}]),e}();function Im(e,t){if(t.length!==0){var r=jm(e,t);(Array.isArray(r)?r.every(function(n){return n==null}):JSON.stringify(r)==="{}")&&Ux(e,t),Im(e,t.slice(0,t.length-1))}}var Ei=R.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Kf=R.createContext({}),Jf=R.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),Wx=R.createContext(),Hx=R.createContext(),zx=R.createContext(),vy=R.createContext(),Gx=R.createContext(),Kx=R.createContext(),Jx=R.createContext(),Yx=R.createContext();function Es(){var e=(0,R.useContext)(Jf);return e}function Mo(e){var t=(0,R.useRef)(),r=(0,R.useRef)(!0),n=(0,R.useState)(e),s=Lr(n,2),a=s[0],p=s[1];t.current=a;var d=function(y){t.current=y,r.current&&p(y)},h=function(){return t.current};return(0,R.useEffect)(function(){return function(){r.current=!1}},[]),[a,d,h]}var Xx=function(t){return t.type&&t.type.name?t.type.name:t.displayName||t.name||"Component"},Qx=function(t){var r={};if(t.inner){if(t.inner.length===0){vt.set(r,t.path,t.message);return}var n=NL(t.inner),s;try{for(n.s();!(s=n.n()).done;){var a=s.value;vt.get(r,a.path)||vt.set(r,a.path,a.message)}}catch(p){n.e(p)}finally{n.f()}}return r},Zx=function(t,r){try{t.validateSync(r,{abortEarly:!1})}catch(s){var n=Qx(s);return n}},qx=function(t){if(t.inner){if(t.inner.length===0)return;var r=t.inner[0];return r.message}},eS=function(t,r){try{t.validateSync(r,{abortEarly:!1})}catch(n){return qx(n)}},tS=function(t,r){t(r);var n={};return t.errors&&t.errors.forEach(function(s){var a=s.message,p=s.dataPath,d=s.keyword,h=s.params,g=p;d==="required"&&(g="".concat(g,".").concat(h.missingProperty)),g=g.replace(".",""),vt.set(n,g,a)}),n},Cl=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=Math.random()*16|0,n=t=="x"?r:r&3|8;return n.toString(16)})},zL=function(t,r){var n;return function(){for(var a=arguments.length,p=new Array(a),d=0;d<a;d++)p[d]=arguments[d];var h=function(){clearTimeout(n),t.apply(void 0,p)};clearTimeout(n),n=setTimeout(h,r)}},gy=function(t,r,n){var s=r["ui:control"],a=r["informed:props"],p=r["input:props"],d=r["ui:before"],h=r["ui:after"],g=r.oneOf,y=r.items,C=r.enum,M=r.title,I=r.minimum,B=r.maximum,z=r.minLength,W=r.maxLength,G=r.pattern,te=r.type,le=r.properties,ye=Cl();p&&p.id&&(ye=p.id);var he={componentType:s,field:n?"".concat(n,".").concat(t):t,type:te,uiBefore:d,uiAfter:h,properties:te==="object"?le:void 0,items:te==="array"?y:void 0,props:Et(Et({label:M,id:ye,min:I,max:B,minLength:z,maxLength:W,pattern:G},a),p)};if(g){var Ee=r.oneOf.map(function(ce){var Se=ce["input:props"],Ce=Se===void 0?{}:Se;return Et({value:ce.const,label:ce.title},Ce)});he.props.options=Ee}if(C){var me=r.enum.map(function(ce){return{value:ce,label:ce}});he.props.options=me}if(y&&y.oneOf){var ve=y.oneOf.map(function(ce){var Se=ce["input:props"],Ce=Se===void 0?{}:Se;return Et({value:ce.const,label:ce.title},Ce)});he.props.options=ve}return he},rS=function(t,r,n){if(!t||r)return[];var s=t.properties,a=s===void 0?{}:s,p=t.allOf,d=t.propertyOrder,h=d===void 0?[]:d;if(Object.keys(a).length>0){var g=Object.keys(a).sort(function(y,C){var M=h.indexOf(y),I=h.indexOf(C);return(M>-1?M:h.length+1)-(I>-1?I:h.length+1)}).map(function(y){var C=a[y],M=gy(y,C,n);return M});return p&&g.push({componentType:"conditionals",allOf:p}),g}return[]},nS=function(t){var r=t.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return r="properties.".concat(r),r},GL=function(t,r){if(typeof t=="string")return t.split("").map(function(n){return n==="#"?/\d/:n==="*"?/[\w]/:n});if(typeof t=="function")return t(r);if(Array.isArray(t))return t;throw new Error("Formatter must be string, array, or function")},KL=function(t,r){for(var n=0,s=-1,a=!0;a&&n<t.length;)t[n]==r[n]?s=n:a=!1,n=n+1;return s},Rm=function(t,r){if(!t)return{val:t,offset:0};var n="".concat(t),s=GL(r,n),a=s.findIndex(function(W){return typeof W!="string"}),p=s.length-xn(s).reverse().findIndex(function(W){return typeof W!="string"}),d=[],h=n.split(""),g=0,y=0,C=KL(s.slice(0,a),h.slice(0,a));C>-1&&(g=C+1,d=d.concat(s.slice(0,C+1)),y=C+1),C<0&&(d=d.concat(s.slice(0,a)),y=a);for(var M=y;M<s.length;M++){var I=s[M];if(g!=h.length){var B=h[g];if(typeof I=="function")d.push(I(B)),g=g+1;else{var z=typeof I=="string"?I===B:I.test(B);z&&typeof I=="string"?(d.push(I),g=g+1):!z&&typeof I=="string"?g!=h.length&&d.push(I):z&&typeof I!="string"?(d.push(B),g=g+1):!z&&typeof I!="string"&&(g=g+1,M=M-1)}}else if(typeof I=="string"&&M>=p)d.push(I);else break}return{value:d.join(""),offset:n?d.length-n.length:0}},JL=function(t,r){var n,s,a=new Intl.NumberFormat(t,r),p=new Intl.NumberFormat(t),d=(n=(s=p.formatToParts(.1).find(function(W){var G=W.type;return G==="decimal"}))===null||s===void 0?void 0:s.value)!==null&&n!==void 0?n:".";function h(W,G){return W instanceof RegExp&&G instanceof RegExp&&W.source===G.source&&W.global===G.global&&W.ignoreCase===G.ignoreCase&&W.multiline===G.multiline}function g(W,G){for(var te=W.length;te--;)if(G(W[te]))return te;return-1}function y(W,G,te){var le=xn(W);return Array.isArray(te)?le.splice.apply(le,[G,0].concat(xn(te))):le.splice(G,0,te),le}function C(W){return"".concat(W).replace(/\D/g,"")}function M(W){return"".concat(W).split(d).map(function(G){return C(G)}).join(".")}function I(W){if(typeof W=="number")return W;var G=parseFloat(M(W));return Number.isNaN(G)?void 0:G}function B(W){var G=M(W),te="".concat(G).split(".")[1],le=a.formatToParts(Number(G));te==="0"&&le.push({type:"decimal",value:d},{type:"fraction",value:te});var ye=le.reduce(function(me,ve){var ce=ve.type,Se=ve.value;return["decimal","fraction"].includes(ce)&&te==null?me:["integer","fraction"].includes(ce)?[].concat(xn(me),xn(Se.split("").filter(function(Ce,Me){return ce==="fraction"?Me<te.length:!0}).map(function(){return/\d/}))):ce==="currency"?[].concat(xn(me),xn(Se.split(""))):[].concat(xn(me),[Se])},[]),he=g(ye,function(me){return h(me,/\d/)});ye.indexOf(d)===-1&&"".concat(W).indexOf(d)!==-1&&(ye=y(ye,he+1,[d,"[]"]),he+=2);var Ee=ye.slice(he+1).join("");return ye=[].concat(xn(ye.slice(0,he+1)),[Ee]),ye}var z=function(G){if(G!=null)return I(G)};return{formatter:B,parser:z}},aG=Object.freeze({__proto__:null,getChildDisplayName:Xx,yupToFormErrors:Qx,validateYupSchema:Zx,yupToFormError:qx,validateYupField:eS,validateAjvSchema:tS,uuidv4:Cl,debounce:zL,computeFieldFromProperty:gy,computeFieldsFromSchema:rS,getSchemaPathFromJsonPath:nS,informedFormat:Rm,createIntlNumberFormatter:JL}),As=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?R.useLayoutEffect:R.useEffect,YL=function(t){var r=t.value,n=t.inputRef,s=t.maintainCursor,a=s===void 0?!0:s,p=Mo(0),d=Lr(p,3),h=d[0],g=d[1],y=d[2],C=Mo(0),M=Lr(C,3),I=M[0],B=M[1],z=M[2];return As(function(){if(n.current!=null&&y()){var W=y()+z();z()!=0&&a?n.current.setSelectionRange(W+1,W+1):a&&n.current.setSelectionRange(W,W)}},[r]),{setCursorOffset:B,setCursor:g,cursor:h,getCursor:y,cursorOffset:I}},XL=function(t,r){var n=(0,R.useRef)(!0),s=n.current;(0,R.useEffect)(function(){if(s)n.current=!1;else return t()},r)},li=qs("informed:useField "),iS=function(t,r,n,s,a){if(t!=null){if(a)return a(t);if(r)return r(t);if(n&&!s){var p=Rm(t,n);return p.value}return t}},QL=function(t,r,n,s){if(r&&n)return r(t);if(s){var a=Rm(t,s);return a.value}return t},ZL=function(t,r,n){var s=n.required;if(t||r)return function(a,p){if(r)return eS(r,a);if(t)return t(a,p)};if(s)return function(a){return nD(a,s)}},qL=function(t){var r=t.fieldType,n=t.setValue,s=t.onChange,a=t.multiple,p=t.ref,d=function(g){return n(g)};return(r==="text"||r==="textArea"||r==="number")&&(d=function(g){return n(g.target.value,g)}),r==="select"&&(d=function(){var g=Array.from(p.current).filter(function(y){return y.selected}).map(function(y){return y.value});n(a?g:g[0]||"")}),r==="checkbox"&&(d=function(g){n(g.target.checked),s&&s(g)}),function(h){d(h)}},eD=function(t){var r=t.setTouched,n=t.onBlur;return function(s){r(!0),n&&n(s)}},tD=function(t){var r=t.fieldType,n=t.maskedValue,s=t.multiple,a=t.value;switch(r){case"text":case"number":return!n&&n!==0?"":n;case"textArea":return n||"";case"select":return a||(s?[]:"");case"checkbox":return!!a;default:return a}},rD=function(t){switch(t){case"text":return t;case"number":return t;case"checkbox":return t;default:return}},nD=function(t,r){if(r&&(t==null||t===""))return typeof r=="string"?r:"This field is required"};function Yf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=e.field,n=e.validate,s=e.asyncValidate,a=e.validationSchema,p=e.mask,d=e.maskWithCursorOffset,h=e.format,g=e.parse,y=e.formatter,C=e.parser,M=e.initialValue,I=e.validateOnChange,B=e.validateOnBlur,z=e.validateOnMount,W=e.asyncValidateOnBlur,G=e.maskOnBlur,te=e.allowEmptyString,le=e.onValueChange,ye=e.notify,he=e.keepState,Ee=e.maintainCursor,me=e.debug,ve=e.shadow,ce=e.step,Se=e.fieldType,Ce=e.multiple,Me=e.onChange,Qe=e.onBlur,wt=e.formController,ft=e.relevant,Ar=e.required,Qr=e.keepStateIfRelevant,Rr=e.initialize,Zr=e.formatterDependencies,Pr=Zr===void 0?[]:Zr,Ht=Wr(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"]),yr=(0,R.useState)(Cl()),ar=Lr(yr,1),Ze=ar[0],dt=(0,R.useContext)(Ei),Ut=(0,R.useContext)(Yx),rr=Ut||Qr,Bt=Es(),Un=(0,R.useRef)(),ro=(0,R.useRef)(!0),_i=(0,R.useRef)(),Sn=(0,R.useRef)(!1),Va=function(){return!Sn.current},jl=function(){return Sn.current};wt&&(dt=wt.updater,Bt=wt.getFormApi());var pi=ZL(n,a,{required:Ar}),Bo=(0,R.useState)(function(){return dt.getInitialValue(r)}),ov=Lr(Bo,1),Ps=ov[0],tc=dt.getSavedValue(r),no,$o;(he||rr)&&tc?(li("Setting field ".concat(r0,"'s kept state"),tc),no=tc.value,$o=tc.touched,Bt.removeSavedState(r0)):M!=null?no=M:no=Ps;var Hy=Mo(iS(no,p,y,C,Rr)),io=Lr(Hy,3),wn=io[0],rc=io[1],fp=io[2],zy=Mo(z?pi(wn):void 0),Pi=Lr(zy,3),Uo=Pi[0],Il=Pi[1],pp=Pi[2],dp=Mo($o),Jt=Lr(dp,3),Ti=Jt[0],S9=Jt[1],OO=Jt[2],w9=(0,R.useState)(function(){return QL(wn,h,g,y)}),EO=Lr(w9,2),Gy=EO[0],Ky=EO[1],AO=(0,R.useRef)();AO.current=Gy;var CO=(0,R.useRef)(M),Rl=(0,R.useRef)(r),_O=(0,R.useRef)();CO.current=M,Rl.current=r;var O9=(0,R.useRef)(null),so=R.useMemo(function(){return t||O9},[]),Jy=YL({value:wn,inputRef:so,maintainCursor:!!Ee}),Yy=Jy.getCursor,E9=Jy.setCursor,Xy=Jy.setCursorOffset,A9=function(){return!0},Qy=function(dr){var On=ft||A9,di=Bt.getFullField(Rl.current)||Rl.current,Yt={path:di,parentPath:di.replace(/(.*)[.[].*/,"$1"),get:function(hi,vp){return vt.get(hi,vp)}};return Ut&&Ut.relevant?On(dr,Yt)&&Ut.relevant(dr,Yt):On(dr,Yt)},C9=Mo(Qy(Bt.getValues())),Zy=Lr(C9,3),av=Zy[0],_9=Zy[1],PO=Zy[2],P9=function(dr){return Ut&&Ut.relevant?Ut.relevant(dr):!0},T9=function(){var dr=Qy(Bt.getValues()),On=PO();return dr!=On&&_9(dr),dr};(0,R.useEffect)(function(){!av&&!he&&Un.current.reset()},[av]);var ts=function(){return ve?Bt.getDerrivedValue(r):fp()},hp=function(dr){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},di=On.preventUpdate;ce&&Bt.getStep()<ce?(li("Setting ".concat(r,"'s error to undefined as we are not at that step")),Il(void 0),dt.setError(Ze,void 0,!di)):(li("Setting ".concat(r,"'s error to ").concat(dr)),Il(dr),dt.setError(Ze,dr,!di))},qy=function(dr,On){var di=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Yt=dr;Sn.current=!0,li("Setting ".concat(r," to ").concat(Yt)),Rr&&(Yt=Rr(Yt));var Fl=Bt.getOptions(),hi=Yt;if(Yt===""&&!te&&!di.allowEmptyString&&!Fl.allowEmptyStrings&&(Yt=void 0),(e.type==="number"||Se==="number")&&Yt!==void 0&&(Yt=+Yt),On&&On.target&&On.target.selectionStart&&E9(On.target.selectionStart),p&&!G&&(hi=p(Yt,Yy()),Yt=p(Yt,Yy())),d&&!G){var vp=d(Yt,Yy());hi=vp.value,Yt=vp.value,Xy(vp.offset)}if(h&&g&&(Yt=g(Yt),hi=h(Yt)),y){var TO=Rm(Yt,y);Xy(TO.offset),hi=TO.value,Yt=hi}C&&(Yt=Yt!=null?C(Yt):Yt),pi&&I&&!di.initial&&(li("Validating after change ".concat(r," ").concat(Yt)),hp(pi(Yt,Bt.getValues()))),rc(Yt),Ky(hi),le&&le(Yt),dt.setValue(Ze,Yt,!di.preventUpdate)};XL(function(){Un.current.setValue(AO.current)},xn(Pr));var e0=function(dr,On){var di=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Yt=di.preventUpdate;if(li("Field ".concat(r," has been touched")),pi&&B&&!On&&dr&&(li("Validating after blur ".concat(r," ").concat(ts())),hp(pi(ts(),Bt.getValues()))),s&&W&&!On&&dr&&(li("Validating async after blur ".concat(r," ").concat(ts())),s(ts(),Bt.getValues())),p&&G){var Fl=p(ts());rc(Fl),Ky(Fl),le&&le(Fl),dt.setValue(Ze,Fl,!Yt)}if(d&&G){var hi=d(ts());Xy(hi.offset),rc(hi.value),Ky(hi.value),le&&le(hi.value),dt.setValue(Ze,hi.value,!Yt)}S9(dr),dt.setTouched(Ze,dr,!Yt)},V9=function(){var dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},On=dr.preventUpdate,di=iS(CO.current||dt.getInitialValue(Rl.current),p,y,C,Rr);qy(di,null,{initial:!0,preventUpdate:On}),hp(z?pi(di):void 0,{preventUpdate:On}),e0(void 0,!0,{preventUpdate:On}),Sn.current=!1},k9=function(dr){pi&&(li("Field validating ".concat(r," ").concat(ts())),hp(pi(ts(),dr||Bt.getValues())))},j9=function(dr){s&&(li("Field async validating ".concat(r," ").concat(ts())),s(ts(),dr||Bt.getValues()))},t0={setValue:qy,setTouched:e0,setError:hp,reset:V9,validate:k9,asyncValidate:j9,getValue:ts,getTouched:OO,getError:pp,getIsRelevant:PO,getDirty:jl,getPristine:Va,getFieldState:function(){return{value:ts(),touched:OO(),dirty:jl(),pristine:Va()}},relevant:Qy,multistepRelevant:P9,checkRelevant:T9};Un.current=t0;var mp={value:wn,error:Uo,touched:Ti,maskedValue:Gy,isRelevant:av,dirty:Sn.current,pristine:!Sn.current};ve&&(mp={error:Uo,touched:Ti}),li("Render",Bt.getFullField(r),mp),As(function(){var hn=Bt.getFullField(Rl.current);return li("Register",Ze,Rl.current),_i.current={field:hn,fieldId:Ze,fieldApi:t0,fieldState:mp,notify:ye,keepState:he,inMultistep:rr,shadow:ve},dt.register(Ze,_i.current),function(){var dr=Bt.getFullField(Rl.current);li("Deregister",Ze,dr),dt.deregister(Ze)}},[]),(0,R.useEffect)(function(){var hn=Bt.getFullField(r);return ro.current?ro.current=!1:(li("Update",r,rr),_i.current.field=hn,dt.update(Ze,_i.current,_O.current)),function(){_O.current=hn}},[r]),As(function(){me&&so&&(so.current.style.border="5px solid orange",setTimeout(function(){so.current.style.borderWidth="2px",so.current.style.borderStyle="inset",so.current.style.borderColor="initial",so.current.style.borderImage="initial"},500))});var I9=[].concat(xn(Object.values(mp)),xn(Object.values(e)),xn(Object.values(Ht))),R9=function(dr){return(0,R.useMemo)(function(){return av?dr:null},xn(I9))},r0=r,F9=qL({fieldType:Se,setValue:qy,onChange:Me,multiple:Ce,ref:so}),M9=eD({setTouched:e0,onBlur:Qe}),L9=tD({fieldType:Se,maskedValue:Gy,multiple:Ce,value:wn}),D9=rD(Se);return{fieldState:mp,fieldApi:t0,render:R9,ref:so,userProps:Et(Et({},Ht),{},{multiple:Ce,onChange:Me,onBlur:Qe,id:Ht.id||Ze}),informed:Et({name:r0,multiple:Ce,onChange:F9,onBlur:M9,value:L9,ref:so,type:D9,id:Ht.id||Ze},Ht)}}var Lo=function(t){var r=R.forwardRef(function(n,s){var a=Yf(n,s),p=a.fieldState,d=a.fieldApi,h=a.render,g=a.ref,y=a.userProps;return h(R.createElement(t,Ur({fieldApi:d,fieldState:p,field:n.field,forwardedRef:g,debug:n.debug,type:n.type},y)))});return r.displayName="asField(".concat(Xx(t),")"),r},iD=qs("informed:Text "),sD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.maskedValue,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.forwardedRef,I=s.debug,B=s.label,z=s.title,W=s.id,G=Wr(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return iD("Render",y),As(function(){I&&M&&(M.current.style.background="red",setTimeout(function(){M.current.style.background="white"},500))}),R.createElement(R.Fragment,null,B?R.createElement("label",{htmlFor:W}," ",B," "):null,R.createElement("input",Ur({},G,{id:W,name:y,ref:M,value:!a&&a!==0?"":a,onChange:function(le){p(le.target.value,le),h&&h(le)},onBlur:function(le){d(!0),g&&g(le)}})))},oD=Lo(sD),aD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.maskedValue,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.forwardedRef,I=s.debug,B=s.label,z=s.id,W=Wr(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return As(function(){I&&M&&(M.current.style.background="red",setTimeout(function(){M.current.style.background="white"},500))}),R.createElement(R.Fragment,null,B?R.createElement("label",{htmlFor:z}," ",B," "):null,R.createElement("textarea",Ur({},W,{id:z,name:y,ref:M,value:a||"",onChange:function(te){p(te.target.value,te),h&&h(te)},onBlur:function(te){d(!0),g&&g(te)}})))},lD=Lo(aD),uD=qs("informed:Select "),cD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.value,p=r.setTouched,d=s.onChange,h=s.onBlur,g=s.field,y=s.initialValue,C=s.options,M=s.children,I=s.forwardedRef,B=s.debug,z=s.multiple,W=s.label,G=s.id,te=Wr(s,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),le=(0,R.useRef)(),ye=function(Ee){var me=Array.from((I||le).current).filter(function(ve){return ve.selected}).map(function(ve){return ve.value});r.setValue(z?me:me[0]||""),d&&Ee&&d(Ee)};return As(function(){B&&I&&(I.current.style.background="red",setTimeout(function(){I.current.style.background="white"},500))}),uD("Render",g,a),R.createElement(R.Fragment,null,W?R.createElement("label",{htmlFor:G}," ",W," "):null,R.createElement("select",Ur({},te,{id:G,multiple:z,name:g,ref:I||le,value:a||(z?[]:""),onChange:ye,onBlur:function(Ee){p(!0),h&&h(Ee)}}),C?C.map(function(he){return R.createElement("option",{key:he.value,value:he.value,disabled:he.disabled},he.label)}):M))},fD=Lo(cD),pD=function(t){var r=t.fieldApi,n=t.fieldState,s=Wr(t,["fieldApi","fieldState"]),a=n.value,p=r.setValue,d=r.setTouched,h=s.onChange,g=s.onBlur,y=s.field,C=s.initialValue,M=s.debug,I=s.forwardedRef,B=s.id,z=s.label,W=Wr(s,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return R.createElement(R.Fragment,null,z?R.createElement("label",{htmlFor:B}," ",z," "):null,R.createElement("input",Ur({},W,{id:B,name:y,ref:I,checked:!!a,onChange:function(te){p(te.target.checked),h&&h(te)},onBlur:function(te){d(!0),g&&g(te)},type:"checkbox"})))},dD=Lo(pD),hD=function(t){return R.forwardRef(function(r,n){return R.createElement(Wx.Consumer,null,function(s){var a=s.radioGroupApi,p=s.radioGroupState;return R.createElement(t,Ur({radioGroupApi:a,radioGroupState:p,ref:n},r))})})},mD=function(t){var r=t.radioGroupApi,n=t.radioGroupState,s=Wr(t,["radioGroupApi","radioGroupState"]),a=n.value,p=r.setValue,d=r.setTouched,h=r.onChange,g=r.onBlur,y=s.value,C=s.onChange,M=s.onBlur,I=s.field,B=s.initialValue,z=s.forwardedRef,W=Wr(s,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return R.createElement("input",Ur({},W,{name:I,ref:z,value:y,checked:a===y,onChange:function(te){te.target.checked&&(p(y),C&&C(te),h&&h(te))},onBlur:function(te){d(!0),M&&M(te),g&&g(te)},type:"radio"}))},vD=hD(mD),gD=function(e){_L(r,e);var t=jL(r);function r(){return cy(this,r),t.apply(this,arguments)}return fy(r,[{key:"render",value:function(){var s=this.props,a=s.options,p=s.children;return R.createElement(Wx.Provider,{value:this.groupContext},a?a.map(function(d){return R.createElement("label",{key:d.value},d.label," ",R.createElement(vD,{value:d.value}))}):p)}},{key:"groupContext",get:function(){return{radioGroupApi:Et(Et({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),r}(R.Component),yD=Lo(gD);function bD(){return(0,R.useContext)(zx)}var xD=function(){var t=bD(),r=t.add;return R.createElement("button",{onClick:function(){r()},type:"button"},"Add")};function SD(){return(0,R.useContext)(vy)}var wD=function(){var t=SD(),r=t.remove;return R.createElement("button",{onClick:function(){r()},type:"button"},"Remove")},Fm=qs("informed:useArrayField "),OD=function(t){var r=t.field,n=t.initialValue,s=t.validate,a=t.arrayFieldApiRef,p=Wr(t,["field","initialValue","validate","arrayFieldApiRef"]),d=Es(),h=(0,R.useState)(new Map),g=Lr(h,1),y=g[0],C=(0,R.useContext)(Ei),M=d.getFullField(r),I=C.getInitialValue(r)||n||[],B=d.getSavedValue(M)&&d.getSavedValue(M).value,z=Mo(B||I),W=Lr(z,3),G=W[0],te=W[1],le=W[2],ye=G?G.map(function(){return Cl()}):[],he=Mo(ye),Ee=Lr(he,3),me=Ee[0],ve=Ee[1],ce=Ee[2],Se=(0,R.useMemo)(function(){return function(ar,Ze){var dt=ce()==null?0:ce().length;return s?s(ar,dt,Ze):void 0}}),Ce=Yf(Et({field:r,validate:s?Se:void 0,shadow:!0},p)),Me=Ce.fieldApi;As(function(){var ar=function(dt){dt!==M&&(Fm("".concat(M," changed")),RegExp("".concat(M,"\\[[0-9]+\\]")).test(dt)&&Me.validate())};return d.emitter.on("value",ar),function(){d.emitter.removeListener("value",ar)}},[r]);var Qe=function(Ze){Fm("EXPECTING REMOVAL OF","".concat(r,"[").concat(Ze,"] and ").concat(r,"[").concat(me.length-1,"]")),C.expectRemoval("".concat(r,"[").concat(Ze,"]")),C.expectRemoval("".concat(r,"[").concat(me.length-1,"]"));var dt=me.slice(0,Ze).concat(me.slice(Ze+1,me.length));ve(dt);var Ut=le(),rr=Ut.slice(0,Ze).concat(Ut.slice(Ze+1,Ut.length));te(rr)},wt=function(Ze,dt){Fm("Swapping","".concat(r,"[").concat(Ze,"] and ").concat(r,"[").concat(dt,"]"));var Ut=xn(me);me[Ze]&&me[dt]?(Ut[Ze]=me[dt],Ut[dt]=me[Ze]):console.warn("Attempted to swap ".concat(Ze," with ").concat(dt," but one of them does not exist :(")),ve(Ut)},ft=function(){me.push(Cl()),ve(xn(me))},Ar=function(Ze){me.push(Cl()),ve(xn(me));var dt=xn(le());dt[me.length-1]=Ze,te(dt)},Qr=function(){var Ze=C.getInitialValue(r)||n||[];te(Ze);var dt=Ze?Ze.map(function(){return Cl()}):[];ve(dt)},Rr=me.map(function(ar,Ze){var dt={remove:function(){return Qe(Ze)}},Ut={initialValue:G&&G[Ze],key:ar,field:"".concat(r,"[").concat(Ze,"]"),index:Ze};return Et(Et({arrayFieldItemApi:dt,arrayFieldItemState:Ut},dt),Ut)}),Zr={add:ft,swap:wt,addWithInitialValue:Ar,reset:Qr};a&&(a.current=Zr);var Pr={fields:Rr,field:r},Ht=Et(Et({},C),{},{register:function(Ze,dt){y.set(Ze,dt);for(var Ut=arguments.length,rr=new Array(Ut>2?Ut-2:0),Bt=2;Bt<Ut;Bt++)rr[Bt-2]=arguments[Bt];C.register.apply(C,[Ze,dt].concat(rr))},deregister:function(Ze){y.delete(Ze);for(var dt=arguments.length,Ut=new Array(dt>1?dt-1:0),rr=1;rr<dt;rr++)Ut[rr-1]=arguments[rr];C.deregister.apply(C,[Ze].concat(Ut))},getInitialValue:function(Ze){if(RegExp("".concat(M,"\\[[0-9]+\\]")).test(Ze)){var dt=Ze.replace(r,""),Ut=vt.get(le(),dt);return Fm("Resetting ".concat(dt," to ").concat(Ut)),Ut}return C.getInitialValue(Ze)}}),yr=function(Ze){return R.createElement(Ei.Provider,{value:Ht},R.createElement(zx.Provider,{value:Zr},R.createElement(Hx.Provider,{value:Pr},Ze)))};return{render:yr,add:ft,swap:wt,addWithInitialValue:Ar,fields:Rr,arrayFieldState:Pr,arrayFieldApi:Zr,field:r}},ED=function(t,r){return Et(Et({},r),{},{getValue:function(s){return r.getValue("".concat(t,".").concat(s))},getTouched:function(s){return r.getTouched("".concat(t,".").concat(s))},getError:function(s){return r.getError("".concat(t,".").concat(s))},setValue:function(s,a){return r.setValue("".concat(t,".").concat(s),a)},setTouched:function(s,a){return r.setTouched("".concat(t,".").concat(s),a)},setError:function(s,a){return r.setError("".concat(t,".").concat(s),a)},getInitialValue:function(s){return r.getInitialValue("".concat(t,".").concat(s))},getSavedValue:function(s){return r.getSavedValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(r.getFullField(t),".").concat(s)}})};function AD(e){var t=Es(),r=(0,R.useMemo)(function(){return ED(e,t)},[e]);return r}function Mm(){var e=(0,R.useContext)(Kf);return e}var sS=function(t){var r=t.when,n=t.children,s=Mm(),a=r(s);return a?n:null},yy=function(t){var r=t.relevant,n=t.field,s=Wr(t,["relevant","field"]),a=Es();if(r){var p=a.getFullField(n),d={path:p,parentPath:p.replace(/(.*)[.[].*/,"$1"),get:function(y,C){return vt.get(y,C)}},h=function(y){var C=y.values;return r(C,d)};return R.createElement(sS,{when:h},R.createElement(oS,Ur({field:n},s)))}else return R.createElement(oS,Ur({field:n},s))},oS=function(t){var r=t.children,n=Wr(t,["children"]),s=OD(n),a=s.render,p=s.arrayFieldState,d=s.arrayFieldApi,h=s.field;return a(typeof r=="function"?r(Et(Et({field:h,arrayFieldApi:d,arrayFieldState:p},d),p)):r)},CD=function(t){var r=t.arrayFieldItemState,n=t.arrayFieldItemApi,s=t.children,a=(0,R.useContext)(Ei),p=Es(),d=(0,R.useState)(0),h=Lr(d,2),g=h[0],y=h[1],C=(0,R.useState)(new Map),M=Lr(C,1),I=M[0],B=r.field,z=AD(B),W=function(){var me=p.getState(),ve=me.values,ce=me.errors,Se=me.touched,Ce={values:vt.get(ve,B),errors:vt.get(ce,B),touched:vt.get(Se,B)};return Ce};(0,R.useEffect)(function(){var Ee=function(ve){var ce=ve.slice(0,ve.lastIndexOf("[")!=-1?ve.lastIndexOf("]")+1:ve.length);ce===B&&y(Math.random())};return p.emitter.on("value",Ee),function(){p.emitter.removeListener("value",Ee)}},[B]);var G=function(){I.forEach(function(me){me.fieldApi.reset()})},te=W(),le=Et(Et({},a),{},{register:function(me,ve,ce){I.set(me,ve),a.register(me,ve,ce)},deregister:function(me){I.delete(me);for(var ve=arguments.length,ce=new Array(ve>1?ve-1:0),Se=1;Se<ve;Se++)ce[Se-1]=arguments[Se];a.deregister.apply(a,[me].concat(ce))}}),ye=Et(Et(Et({},n),z),{},{reset:G}),he=Et(Et({},r),te);return typeof s=="function"?R.createElement(Ei.Provider,{value:le},R.createElement(vy.Provider,{value:ye},R.createElement(Gx.Provider,{value:he},s(Et(Et({arrayFieldItemApi:ye,arrayFieldItemState:he},ye),he))))):R.createElement(Ei.Provider,{value:le},R.createElement(vy.Provider,{value:ye},R.createElement(Gx.Provider,{value:he},s)))};yy.Items=function(e){var t=e.children,r=(0,R.useContext)(Hx),n=r.fields;return n.map(function(s){var a=s.arrayFieldItemState,p=s.arrayFieldItemApi,d=a.key;return R.createElement(CD,{key:d,arrayFieldItemApi:p,arrayFieldItemState:a},t)})};var Lm=function(t){var r=t.components,n=(0,R.useContext)(Ei),s=n.fieldMap;return r?r.map(function(a,p){var d=a["ui:control"],h=s[d];return R.createElement(h,{key:"ui-comp-".concat(p)})}):null},_D=qs("informed:FormFields "),by=function e(t){var r=t.schema,n=t.prefix,s=t.onlyValidateSchema,a=(0,R.useContext)(Ei),p=a.fieldMap,d=(0,R.useMemo)(function(){var h=rS(r,s,n),g=h.map(function(y,C){var M=y.field,I=y.props,B=y.type,z=y.properties,W=y.items,G=y.componentType,te=y.uiBefore,le=y.uiAfter,ye=y.allOf,he=p[G];return _D("Rendering Field",M,y),!he&&B==="object"&&z?R.createElement(e,{schema:y,prefix:M,key:"ScheamField-".concat(C)}):!he&&B==="array"&&W?R.createElement(aS,Ur({key:"ScheamField-".concat(C),field:M,items:W,uiBefore:te,uiAfter:le},I)):he&&G==="array"&&W&&B==="array"?R.createElement(he,Ur({key:"ScheamField-".concat(C),field:M,items:W,uiBefore:te,uiAfter:le},I)):G==="conditionals"?ye.map(function(Ee){var me=Ee.then,ve=Ee.if.properties,ce=function(Ce){var Me=Ce.values;return Object.keys(ve).every(function(Qe){var wt=ve[Qe];return Me[Qe]===wt.const})};return R.createElement(sS,{key:"ScheamField-".concat(C),when:ce},R.createElement(e,{schema:me}))}):he?R.createElement(he,Ur({key:"ScheamField-".concat(C),field:M},I)):null});return g},[r,n]);return d},aS=function(t){var r=t.field,n=t.items,s=t.uiBefore,a=t.uiAfter,p=Wr(t,["field","items","uiBefore","uiAfter"]);return R.createElement(yy,Ur({field:r},p),R.createElement(Lm,{components:s}),R.createElement(yy.Items,null,function(d){var h=d.field;return R.createElement(R.Fragment,null,R.createElement(Lm,{components:n["ui:before"]}),R.createElement(by,{schema:n,prefix:h}),R.createElement(Lm,{components:n["ui:after"]}))}),R.createElement(Lm,{components:a}))},PD={select:fD,input:oD,textarea:lD,checkbox:dD,radio:yD,add:xD,remove:wD,array:aS},gr=qs("informed:Controller "),TD=function(t,r){var n=Object.keys(r).find(function(a){return t.includes(a)});if(n){var s=t.slice(0,n.length);return s===n}},Zi=function(){},VD=function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cy(this,e),this.options=r,this.subscriptions=new Map;var n=r.ajv,s=r.schema,a=r.fieldMap;this.ajv=n?new n({allErrors:!0}):null,this.ajvValidate=n?this.ajv.compile(s):null,this.fieldMap=a||PD,this.fieldsById=new Map,this.fieldsByName={get:function(d){var h;return t.fieldsById.forEach(function(g){g&&g.field===d&&(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:Zi,setTouched:Zi,setError:Zi,reset:Zi,validate:Zi,getValue:Zi,getTouched:Zi,getError:Zi,getFieldState:Zi,checkRelevant:Zi,getPristine:Zi,getDirty:Zi}},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(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);y.shadow||vt.set(t.state.values,y.field,y.fieldApi.getValue()),y.fieldApi.relevant(t.state.values)||vt.delete(t.state.values,y.field),t.fieldsById.forEach(function(C){var M=C.fieldApi.checkRelevant();(!C.fieldApi.multistepRelevant(t.state.values)||!M&&!C.keepState)&&(vt.delete(t.state.values,C.field),vt.delete(t.state.touched,C.field),vt.delete(t.state.errors,C.field))}),g&&(t.emit("change"),t.emit("field",y.field),t.emit("value",y.field,h))},setTouched:function(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);!y.shadow&&y.fieldApi.getIsRelevant()&&vt.set(t.state.touched,y.field,y.fieldApi.getTouched()),y.shadow&&y.fieldApi.getError()!=null&&y.fieldApi.relevant(t.state.values)&&vt.set(t.state.touched,y.field,y.fieldApi.getTouched()),g&&(t.emit("change"),t.emit("field",y.field))},setError:function(d,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,y=t.fieldsById.get(d);!y.shadow&&y.fieldApi.getIsRelevant()&&vt.set(t.state.errors,y.field,y.fieldApi.getError());var C=vt.get(t.state.errors,y.field);(y.shadow&&y.fieldApi.getError()!=null&&y.fieldApi.relevant(t.state.values)||y.shadow&&y.fieldApi.getError()===void 0&&y.fieldApi.relevant(t.state.values)&&typeof C=="string")&&vt.set(t.state.errors,y.field,y.fieldApi.getError()),g&&(t.emit("change"),t.emit("field",y.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(p){delete t.state.error,t.notify(p)})}return fy(e,[{key:"emit",value:function(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];var p=this.subscriptions.get(r);p&&p.forEach(function(d){return d.apply(void 0,s)})}},{key:"on",value:function(r,n){this.subscriptions.get(r)||this.subscriptions.set(r,new Set);var s=this.subscriptions.get(r);s.add(n)}},{key:"removeListener",value:function(r,n){var s=this.subscriptions.get(r);s.delete(n)}},{key:"setOptions",value:function(r){this.options=r}},{key:"setValue",value:function(r,n,s){this.getField(r).fieldApi.setValue(n,null,Et({allowEmptyString:this.options.allowEmptyStrings},s))}},{key:"setTouched",value:function(r,n){this.getField(r).fieldApi.setTouched(n)}},{key:"setError",value:function(r,n){this.getField(r).fieldApi.setError(n)}},{key:"setFormError",value:function(r){this.state.error=r,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(r,n){if(this.state.validating=this.state.validating-1,this.getError(r)||this.setError(r,n),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(gr("Submit",this.state),this.emit("submit")):(gr("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(r){this.state.step=r,this.emit("change")}},{key:"setCurrent",value:function(r){this.state.Current=r,this.emit("change")}},{key:"back",value:function(r){this.state.step=this.state.step-1,this.state.Current=r,this.emit("change")}},{key:"next",value:function(r){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=r),this.emit("change")}},{key:"setInitialValue",value:function(r,n){vt.set(this.options.initialValues,r,n)}},{key:"getFormState",value:function(){return gr("Returning form state"),Et(Et({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(r){var n=this.getValues();return vt.get(n,r)}},{key:"getValue",value:function(r){var n=this.getField(r).fieldApi.getValue();return gr("Getting value for",r,n),n}},{key:"getTouched",value:function(r){var n=this.getField(r).fieldApi.getTouched();return gr("Getting touched for",r,n),n}},{key:"getError",value:function(r){var n=this.getField(r).fieldApi.getError();return gr("Getting error for",r,n),n}},{key:"getDirty",value:function(r){var n=this.getField(r).fieldApi.getDirty();return gr("Getting dirty for",r,n),n}},{key:"getPristine",value:function(r){var n=this.getField(r).fieldApi.getPristine();return gr("Getting pristine for",r,n),n}},{key:"getValues",value:function(){return gr("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return gr("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return gr("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(r){var n=this.fieldsByName.get(r);return n&&n.shadow?vt.get(this.savedValues,"shadow-".concat(r)):vt.get(this.savedValues,r)}},{key:"removeSavedState",value:function(r){var n=this.fieldsByName.get(r);return n&&n.shadow?vt.delete(this.savedValues,"shadow-".concat(r)):vt.delete(this.savedValues,r)}},{key:"getFullField",value:function(r){return r}},{key:"getInitialValue",value:function(r){return vt.get(this.options.initialValues,r)}},{key:"getField",value:function(r){gr("Getting Field",r);var n=this.fieldsByName.get(r);return n||(console.warn("Attempting to get field ".concat(r," but it does not exist")),this.dummyField)}},{key:"notify",value:function(r){var n=this,s=this.getField(r);s&&s.notify&&s.notify.forEach(function(a){var p=".".concat(r),d="".concat(p.replace(/(.*)[.[].*/,"$1"),".").concat(a).slice(1),h=n.getField(d);h&&(gr("Notifying",h.field),h.fieldApi.validate(),h.fieldApi.checkRelevant())})}},{key:"validateField",value:function(r){this.getField(r).fieldApi.validate()}},{key:"resetField",value:function(r){this.getField(r).fieldApi.reset()}},{key:"fieldExists",value:function(r){return this.fieldsByName.get(r)!=null}},{key:"valid",value:function(){var r=this.getErrors();return!!(vt.empty(r)&&!this.state.error)}},{key:"screenValid",value:function(){var r=Object.entries(this.onScreen).some(function(n){var s=Lr(n,2),a=s[1];return a.fieldApi.getError()});return!r}},{key:"invalid",value:function(){var r=this.getErrors();return!!(!vt.empty(r)||this.state.error)}},{key:"pristine",value:function(){var r=!0;return this.fieldsById.forEach(function(n){n.fieldApi.getPristine()||(r=!1)}),r}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){gr("Resetting"),this.fieldsById.forEach(function(r){r.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(r){gr("Setting values"),this.fieldsById.forEach(function(n){var s=vt.get(r,n.field);s!==void 0&&n.fieldApi.setValue(s,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var r=this;gr("Validating all fields");var n=this.getValues();if(this.options.validationSchema){var s=Zx(this.options.validationSchema,n);this.fieldsById.forEach(function(h){if(vt.has(s,h.field)){var g=vt.get(s,h.field);r.setError(h.field,g)}else r.setError(h.field,void 0)})}if(this.options.schema&&this.options.ajv){var a=tS(this.ajvValidate,n);this.fieldsById.forEach(function(h){if(vt.has(a,h.field)){var g=vt.get(a,h.field);r.setError(h.field,g)}else r.setError(h.field,void 0)})}if(this.fieldsById.forEach(function(h){h.fieldApi.validate(n),h.fieldApi.setTouched(!0,!0)}),this.options.validate){var p=this.options.validate(n);this.setFormError(p)}if(this.options.validateFields){var d=this.options.validateFields(n);this.fieldsById.forEach(function(h){if(vt.has(d,h.field)){var g=vt.get(d,h.field);r.setError(h.field,g)}})}}},{key:"asyncValidate",value:function(){gr("Async Validating all fields");var r=this.getValues();this.fieldsById.forEach(function(n){n.fieldApi.asyncValidate(r)})}},{key:"keyDown",value:function(r){if(r.keyCode==13&&this.options.preventEnter)return r.preventDefault(r),!1}},{key:"submitForm",value:function(r){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&r&&r.preventDefault(r),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(gr("Submit",this.state),this.emit("submit")):(gr("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var r=this;this.fieldsById.forEach(function(n){r.emit("field",n.field)})}},{key:"register",value:function(r,n,s){var a=n.field,p=n.state;gr("Register ID:",r,"Name:",a,p,"Initial",s);var d=a.slice(0,a.lastIndexOf("[")!=-1?a.lastIndexOf("]")+1:a.length),h;this.fieldsById.forEach(function(g,y){g&&g.field===a&&(h=y)}),h&&(n.keepState||n.inMultistep)?(gr("Already Registered",a),this.fieldsById.delete(h)):h&&(!n.keepState||!n.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",a),gr("Fields Registered",this.fieldsById.size),this.onScreen[r]=n,this.fieldsById.set(r,n),gr("clearing expected removal",d),delete this.expectedRemovals[d],delete this.pulledOut[d],!n.shadow&&(this.updater.setValue(r,n.fieldApi.getValue(),!1),this.updater.setError(r,n.fieldApi.getError(),!1),this.updater.setTouched(r,n.fieldApi.getTouched(),!1),s||this.emit("change"),this.emit("field",a))}},{key:"deregister",value:function(r){var n=this.fieldsById.get(r),s=n.field;gr("Deregister",r,s),delete this.onScreen[r];var a=TD(s,this.expectedRemovals),p=s.slice(0,s.lastIndexOf("[")!=-1?s.lastIndexOf("]")+1:s.length);(n.keepState||n.inMultistep)&&!a&&(gr("Saving field ".concat(s,"'s value"),n.fieldApi.getFieldState()),n.shadow?vt.set(this.savedValues,"shadow-".concat(s),n.fieldApi.getFieldState()):vt.set(this.savedValues,s,n.fieldApi.getFieldState())),(a||!n.keepState&&!n.inMultistep||!n.fieldApi.getIsRelevant()&&!n.keepState)&&(gr("Removing field",s),this.fieldsById.delete(r),a||(vt.delete(this.state.values,s),vt.delete(this.state.touched,s),vt.delete(this.state.errors,s),n.shadow?vt.delete(this.savedValues,"shadow-".concat(s)):vt.delete(this.savedValues,s)),a&&this.pulledOut[p]&&(gr("Pulling out",s,"with magic value",p),vt.pullOut(this.state.values,p),vt.pullOut(this.state.touched,p),vt.pullOut(this.state.errors,p),vt.pullOut(this.savedValues,p),delete this.pulledOut[p])),this.emit("change")}},{key:"expectRemoval",value:function(r){gr("Expecting removal of",r),this.expectedRemovals[r]=!0,this.pulledOut[r]=!0}},{key:"update",value:function(r,n,s){gr("Update",r,n.field,s,n.fieldState.value);var a=n.fieldApi.getValue(),p=n.fieldApi.getError(),d=n.fieldApi.getTouched(),h=this.fieldsByName.get(s);s&&!h&&(vt.set(this.state.values,s),vt.set(this.state.errors,s),vt.set(this.state.touched,s)),vt.set(this.state.values,n.field,a),vt.set(this.state.errors,n.field,p),vt.set(this.state.touched,n.field,d),this.emit("change")}}]),e}(),xy=qs("informed:FormProvider "),kD=function(t){var r=t.children,n=t.formApi,s=t.formController,a=t.formState,p=Wr(t,["children","formApi","formController","formState"]);if(xy("Render FormProvider"),n)return xy("Render FormProvider with given values"),R.createElement(Ei.Provider,{value:s.updater},R.createElement(Jf.Provider,{value:n},R.createElement(Kf.Provider,{value:a},r)));xy("Render FormProvider with generated values");var d=uS(p);return R.createElement(Ei.Provider,{value:d.formController.updater},R.createElement(Jf.Provider,{value:d.formApi},R.createElement(Kf.Provider,{value:d.formState},r)))},lS=qs("informed:useForm "),uS=function(t){var r=t.dontPreventDefault,n=t.initialValues,s=t.validate,a=t.validateFields,p=t.allowEmptyStrings,d=t.preventEnter,h=t.getApi,g=t.apiRef,y=t.onChange,C=t.onReset,M=t.onSubmit,I=t.onValueChange,B=t.onSubmitFailure,z=t.validationSchema,W=t.schema,G=t.ajv,te=t.fieldMap,le=t.onlyValidateSchema,ye=Wr(t,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);lS("Render useForm");var he=(0,R.useMemo)(function(){return{dontPreventDefault:r,initialValues:n,validate:s,validateFields:a,allowEmptyStrings:p,preventEnter:d,validationSchema:z,schema:W,ajv:G,fieldMap:te}},[r,n,s,a,p,d,z,W,G,te]),Ee=(0,R.useState)(function(){return new VD(he)}),me=Lr(Ee,1),ve=me[0];(0,R.useEffect)(function(){ve.setOptions(he)},[he]),As(function(){ve.mount()},[]);var ce=(0,R.useState)(function(){return ve.getFormState()}),Se=Lr(ce,2),Ce=Se[0],Me=Se[1];As(function(){var Qr=function(){return y&&y(ve.getFormState())},Rr=function(){return C&&C()},Zr=function(){return M&&M(ve.getFormState().values)},Pr=function(){return I&&I(ve.getFormState().values)},Ht=function(){return B&&B(ve.getFormState().errors)};return ve.on("change",Qr),ve.on("reset",Rr),ve.on("submit",Zr),ve.on("value",Pr),ve.on("failure",Ht),function(){ve.removeListener("change",Qr),ve.removeListener("reset",Rr),ve.removeListener("submit",Zr),ve.removeListener("value",Pr),ve.removeListener("failure",Ht)}},[y,C,M,I,B]),(0,R.useState)(function(){var Qr=function(){lS("Setting form state"),Me(ve.getFormState())};ve.on("change",Qr),h&&h(ve.getFormApi()),g&&(g.current=ve.getFormApi())});var Qe=(0,R.useState)(function(){return ve.getFormApi()}),wt=Lr(Qe,1),ft=wt[0],Ar=function(Rr){return R.createElement(kD,{formApi:ft,formState:Ce,formController:ve},R.createElement(R.Fragment,null,Rr||R.createElement(by,{schema:W,onlyValidateSchema:le})))};return{formApi:ft,formState:Ce,formController:ve,render:Ar,userProps:ye}},jD=qs("informed:Form "),ID=function(t){var r=t.children,n=t.render,s=t.component,a=Wr(t,["children","render","component"]);jD("Render FORM");var p=uS(a),d=p.formApi,h=p.formController,g=p.formState,y=p.render,C=p.userProps,M=function(){var B={formState:g,formApi:d};return s?R.createElement(s,B,r):n?n(B):typeof r=="function"?r(B):r};return y(R.createElement("form",Ur({},C,{onReset:h.reset,onSubmit:h.submitForm,onKeyDown:h.keyDown}),M()))},RD=function(t,r){return Et(Et({},r),{},{getValue:function(s){return r.getValue("".concat(t,".").concat(s))},getTouched:function(s){return r.getTouched("".concat(t,".").concat(s))},getError:function(s){return r.getError("".concat(t,".").concat(s))},setValue:function(s,a){return r.setValue("".concat(t,".").concat(s),a)},setTouched:function(s,a){return r.setTouched("".concat(t,".").concat(s),a)},setError:function(s,a){return r.setError("".concat(t,".").concat(s),a)},getInitialValue:function(s){return r.getInitialValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(r.getFullField(t),".").concat(s)}})},FD=function(t,r){var n=r.register,s=r.deregister,a=r.setValue,p=r.setTouched,d=r.setError,h=r.update,g=r.getField,y=r.expectRemoval,C=r.getInitialValue,M=r.fieldMap,I=r.getSavedValue;return{register:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return n.apply(void 0,["".concat(t,".").concat(z)].concat(G))},deregister:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return s.apply(void 0,["".concat(t,".").concat(z)].concat(G))},update:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return h.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setValue:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return a.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setTouched:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return p.apply(void 0,["".concat(t,".").concat(z)].concat(G))},setError:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return d.apply(void 0,["".concat(t,".").concat(z)].concat(G))},getField:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return g.apply(void 0,["".concat(t,".").concat(z)].concat(G))},expectRemoval:function(z){for(var W=arguments.length,G=new Array(W>1?W-1:0),te=1;te<W;te++)G[te-1]=arguments[te];return y.apply(void 0,["".concat(t,".").concat(z)].concat(G))},getInitialValue:function(z){return C("".concat(t,".").concat(z))},getSavedValue:function(z){return I("".concat(t,".").concat(z))},fieldMap:M}},lG=function(t){var r=t.scope,n=t.children,s=useContext(Ei),a=Es(),p=Mm(),d=useMemo(function(){return RD(r,a)},[r]),h=useMemo(function(){return FD(r,s)},[r]);return React.createElement(Ei.Provider,{value:h},React.createElement(Jf.Provider,{value:d},React.createElement(Kf.Provider,{value:p},n)))},uG=function(t){var r=Mm(),n={};Object.keys(t).length>0?Object.keys(t).forEach(function(I){n[I]=r[I]}):n=r;var s=n,a=s.pristine,p=s.dirty,d=s.invalid,h=s.values,g=s.errors,y=s.touched,C=s.validating,M=s.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:a,dirty:p,invalid:d,values:h,errors:g,touched:y,validating:C,submitting:M},null,2)))},MD=function(t){var r=t.initialStep,n=t.multistepApiRef,s=Es(),a=s.getValues,p=s.validate,d=s.screenValid,h=(0,R.useState)(new Map),g=Lr(h,1),y=g[0],C=(0,R.useRef)(0),M=Mo({current:r,steps:[],goal:null}),I=Lr(M,3),B=I[0],z=I[1],W=I[2],G=(0,R.useState)(function(){var he=function(){var ve=W(),ce=ve.current,Se=y.get(ce);return Se},Ee={getState:function(){return W()},getCurrentStep:he,getStep:function(ve){return y.get(ve)},getNumberOfSteps:function(){return y.size},next:function(){if(p(),d()){var ve=he(),ce=ve.getNext,Se=ce(),Ce=typeof Se=="function"?Se(a()):Se;Ce&&z(function(Me){return Et(Et({},Me),{},{current:Ce})})}},back:function(){var ve=he(),ce=ve.getPrevious,Se=ce(),Ce=typeof Se=="function"?Se(a()):Se;Ce&&z(function(Me){return Et(Et({},Me),{},{current:Ce})})},setCurrent:function(ve){if(ve){var ce=y.get(ve).index;ce<he().index?z(function(Se){return Et(Et({},Se),{},{current:ve,goal:null})}):z(function(Se){return Et(Et({},Se),{},{goal:ve})})}},register:function(ve,ce,Se){Se?(C.current=C.current+1,y.set(ve,Et(Et({},ce),{},{index:C.current}))):z(function(Ce){return Et(Et({},Ce),{},{steps:Array.from(y.keys())})})},deregister:function(ve){y.delete(ve),C.current=C.current-1,z(function(ce){return Et(Et({},ce),{},{steps:Array.from(y.keys())})})}};return n&&(n.current=Ee),Ee}),te=Lr(G,1),le=te[0],ye=function(Ee){return R.createElement(Jx.Provider,{value:le},R.createElement(Kx.Provider,{value:B},Ee))};return Et(Et(Et({},le),B),{},{render:ye})};function LD(){return(0,R.useContext)(Kx)}function DD(){return(0,R.useContext)(Jx)}var ND=function(t){var r=t.step,n=t.next,s=t.previous,a=t.relevant,p=Mm(),d=p.values,h=LD(),g=h.current,y=h.goal,C=DD(),M=C.register,I=C.deregister,B=C.next,z=r===g,W=a?a(d):!0,G=(0,R.useRef)(n),te=(0,R.useRef)(s),le=(0,R.useRef)();G.current=n,te.current=s,le.current=a,(0,R.useState)(function(){M(r,{name:r,getNext:function(){return G.current},getPrevious:function(){return te.current}},!0)}),(0,R.useEffect)(function(){return M(r,{name:r,getNext:function(){return G.current},getPrevious:function(){return te.current}}),function(){I(r)}},[r]),(0,R.useEffect)(function(){y&&z&&y!==r&&B()},[y,z]);var ye=function(Ee){return R.createElement(Yx.Provider,{value:{relevant:function(ve){return le.current?le.current(ve):!0},multistep:!0}},z&&W?Ee:null)};return{isCurrent:z,isRelevant:W,step:r,render:ye}};function BD(e){var t=e.children,r=Wr(e,["children"]),n=MD(r),s=n.render,a=Wr(n,["render"]);return s(typeof t=="function"?t(a):t)}BD.Step=function(t){var r=t.children,n=Wr(t,["children"]),s=ND(n),a=s.render;return a(r)};var cG=function(t){var r=t.field,n=useContext(Ei),s=n.fieldMap,a=Es(),p=a.getFullField,d=a.getOptions,h=p(r),g=d(),y=g.schema,C=nS(h),M=vt.get(y,C);if(!M)return null;var I=gy(r,M),B=I.props,z=I.componentType,W=s[z];return React.createElement(W,Ur({field:r},B))},fG=function(){var t=Es(),r=t.getOptions,n=r(),s=n.schema;return React.createElement(by,{schema:s})},pG=function(t){return React.forwardRef(function(r,n){return React.createElement(Jf.Consumer,null,function(s){return React.createElement(t,Ur({formApi:s,ref:n},r))})})},dG=function(t){return React.forwardRef(function(r,n){return React.createElement(Kf.Consumer,null,function(s){return React.createElement(t,Ur({formState:s,ref:n},r))})})},$D=function(t,r){return{getValue:function(){return t.getValue(r)},setValue:function(s){return t.setValue(r,s)},getTouched:function(){return t.getTouched(r)},setTouched:function(s){return t.setTouched(r,s)},getError:function(){return t.getError(r)},setError:function(s){return t.setError(r,s)},reset:function(){return t.resetField(r)},validate:function(){return t.validateField(r)},exists:function(){return t.fieldExists(r)},getDirty:function(){return t.getDirty(r)},getPristine:function(){return t.getPristine(r)},getFieldState:function(){return t.getField(r).fieldApi.getFieldState()}}};function cS(e){var t=Es(),r=useMemo(function(){return $D(t,e)},[e]);return r}function UD(e){var t=cS(e),r=Es(),n=React.useState(),s=Lr(n,2),a=s[1],p=React.useCallback(function(){return a({})},[]);return As(function(){var d=function(g){g===e&&p()};return r.emitter.on("field",d),function(){r.emitter.removeListener("field",d)}},[]),As(function(){p()},[]),t.getFieldState()||{}}var hG=function(t){return function(r){return function(n){var s=UD(t);return React.createElement(r,Ur({fieldState:s},n))}}},mG=function(t){return function(r){return function(n){var s=cS(t);return React.createElement(r,Ur({fieldApi:s},n))}}},vG=function(t){var r=t.value,n=t.forwardedRef,s=t.children,a=Wr(t,["value","forwardedRef","children"]);return React.createElement("option",Ur({ref:n,value:r,key:r},a),s)},gG=null,fS=c(81105),_l=c(93266),WD=Object.defineProperty,HD=Object.defineProperties,zD=Object.getOwnPropertyDescriptors,pS=Object.getOwnPropertySymbols,GD=Object.prototype.hasOwnProperty,KD=Object.prototype.propertyIsEnumerable,dS=(e,t,r)=>t in e?WD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xf=(e,t)=>{for(var r in t||(t={}))GD.call(t,r)&&dS(e,r,t[r]);if(pS)for(var r of pS(t))KD.call(t,r)&&dS(e,r,t[r]);return e},JD=(e,t)=>HD(e,zD(t)),Dm=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const hS="/oauth2-redirect.html";class Cs{static authorizeImplicit({authorizationUrl:t,clientId:r,scopes:n,extraParams:s={},routingBasePath:a,redirectUri:p,successCallback:d,errorCallback:h}){const g=(0,_l.p8)({date:new Date().toString()}),y=new URL(t),C=a==="/"?"":a,M=`${window.location.origin}${C}${hS}`;y.searchParams.set("client_id",r),y.searchParams.set("redirect_uri",p||M),y.searchParams.set("response_type","token"),y.searchParams.set("state",g),Array.isArray(n)&&y.searchParams.set("scope",n.join(" "));for(const I in s)y.searchParams.set(I,s[I]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:t,clientId:r,scopes:n},state:g,successCallback:I=>{d(I),Cs.clearRedirectData("implicit")},errorCallback:I=>{h(I),Cs.clearRedirectData("implicit")}},window.open(y.toString())}static authorizeAuthorizationCode({authorizationUrl:t,tokenUrl:r,clientId:n,clientSecret:s,codeVerifier:a,codeChallenge:p,scopes:d,extraParams:h={},extraHeaders:g={},routingBasePath:y,redirectUri:C,successCallback:M,errorCallback:I}){const B=new URL(t),z=y==="/"?"":y,W=`${window.location.origin}${z}${hS}`,G=(0,_l.p8)({date:new Date().toString()});B.searchParams.set("client_id",n),B.searchParams.set("redirect_uri",C||W),B.searchParams.set("response_type","code"),B.searchParams.set("state",G),Array.isArray(d)&&B.searchParams.set("scope",d.join(" ")),p&&(B.searchParams.set("code_challenge",p),B.searchParams.set("code_challenge_method","S256"));for(const te in h)B.searchParams.set(te,h[te]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:t,clientId:n,scopes:d},state:G,successCallback:te=>Dm(this,[te],function*({auth_code:le}){try{const ye=yield fetch(r,{method:"POST",headers:Xf({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},g),body:fS.stringify(Xf(JD(Xf({client_id:n,client_secret:s},a&&{code_verifier:a}),{code:le,grant_type:"authorization_code",redirect_uri:C||W}),h))});yield mS(ye,M,I)}catch(ye){I(ye)}Cs.clearRedirectData("authorizationCode")}),errorCallback:te=>{I(te),Cs.clearRedirectData("authorizationCode")}},window.open(B.toString())}static clearRedirectData(t){window.redirectOAuth2={flow:t,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(t){return Dm(this,arguments,function*({tokenUrl:r,clientId:n,clientSecret:s,scopes:a=[],extraParams:p={},extraHeaders:d={},successCallback:h,errorCallback:g}){try{const y=JSON.parse(JSON.stringify(Xf({client_id:n,client_secret:s,grant_type:"client_credentials",scope:Array.isArray(a)&&a.length?a.join(" "):void 0},p))),C=yield fetch(r,{method:"POST",headers:Xf({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},d),body:fS.stringify(y)});yield mS(C,h,g)}catch(y){g(y)}})}}const yG=new Cs;function mS(e,t,r){return Dm(this,null,function*(){if(e.ok){const n=yield e.json();t(n)}else r(new Error((e.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield e.json()):yield e.text()))})}function vS(e){return Dm(this,null,function*(){return(0,_l.rS)(yield(0,_l.JQ)(e))})}var Qf=c(73624),st=c(88075),YD=c(86981),XD=c(46396),QD=Object.defineProperty,ZD=Object.defineProperties,qD=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,gS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,bS=(e,t,r)=>t in e?QD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bm=(e,t)=>{for(var r in t||(t={}))gS.call(t,r)&&bS(e,r,t[r]);if(Nm)for(var r of Nm(t))yS.call(t,r)&&bS(e,r,t[r]);return e},e3=(e,t)=>ZD(e,qD(t)),t3=(e,t)=>{var r={};for(var n in e)gS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nm)for(var n of Nm(e))t.indexOf(n)<0&&yS.call(e,n)&&(r[n]=e[n]);return r};const xS=e=>Kt.iv`
171
171
  border: var(--input-border);
172
172
  outline: none;
173
173
  padding: var(--input-padding);
@@ -215,13 +215,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215
215
  cursor: pointer;
216
216
  text-align: center;
217
217
  color: var(--panel-samples-text-color);
218
- `;function i3(e,t){var r=e,{fullWidth:n,errorMessage:s,type:a,inputActionButton:p,panel:d="samples"}=r,h=t3(r,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[g,y]=(0,R.useState)(a==="password"),C=(0,R.useCallback)(()=>{y(!g)},[g]);return R.createElement(SS,{fullWidth:n,type:a},R.createElement(r3,null,R.createElement(n3,Bm({fullWidth:n,inputActionButton:p,type:g?"password":"text",inputType:a,ref:t,panel:d},h)),p?R.createElement(wS,{onClick:p.onClick},p.label):a==="password"?R.createElement(wS,{onClick:C},g?"show":"hide"):null),s?R.createElement(st.Xq,null,s):null)}const Zf=(0,R.forwardRef)(i3);function ci(e){const t=Yf(Bm({fieldType:"text"},e)),{userProps:r,render:n,fieldState:s}=t,a=t.informed;return n(R.createElement(Zf,e3(Bm(Bm({},r),a),{errorMessage:s.error})))}const qf=Lo(({initValue:e,options:t,fieldApi:r,fieldState:n})=>{const s=t.map((g,y)=>({value:g.title||g.value,idx:y,origValue:g.value})),a=s.find(g=>g.origValue===e),[p,d]=(0,R.useState)(a==null?void 0:a.value);(0,Vr.useMount)(()=>{e&&r.setValue(e)});const h=(0,R.useCallback)(g=>{r.setValue(s[g.idx].origValue),d(s[g.idx].value)},[r,s]);return R.createElement(SS,{fullWidth:!0},R.createElement(XD.Dropdown,{fullWidth:!0,variant:"dark",value:p,options:s,onChange:h}),n.error?R.createElement(st.Xq,null,n.error):null)});function s3({name:e,value:t,description:r,variableEnum:n,onChange:s,defaultValue:a}){const p=(0,R.useCallback)(g=>s(g.target.value),[s]),d=(0,R.useCallback)(g=>s(g.value),[s]),h=n?n.map((g,y)=>({value:g,idx:y})):[];return R.createElement(st.NI,null,R.createElement(st.lX,null,e,":"),h&&h.length?R.createElement(li.VD,{fullWidth:!0,variant:"dark",value:t,options:h,onChange:d}):R.createElement(Zf,{fullWidth:!0,value:t,onChange:p,placeholder:a,panel:"try-it"}),r&&R.createElement(o3,{source:r}))}const o3=(0,Kt.ZP)(YD.Markdown)`
218
+ `;function i3(e,t){var r=e,{fullWidth:n,errorMessage:s,type:a,inputActionButton:p,panel:d="samples"}=r,h=t3(r,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[g,y]=(0,R.useState)(a==="password"),C=(0,R.useCallback)(()=>{y(!g)},[g]);return R.createElement(SS,{fullWidth:n,type:a},R.createElement(r3,null,R.createElement(n3,Bm({fullWidth:n,inputActionButton:p,type:g?"password":"text",inputType:a,ref:t,panel:d},h)),p?R.createElement(wS,{onClick:p.onClick},p.label):a==="password"?R.createElement(wS,{onClick:C},g?"show":"hide"):null),s?R.createElement(st.Xq,null,s):null)}const Zf=(0,R.forwardRef)(i3);function ui(e){const t=Yf(Bm({fieldType:"text"},e)),{userProps:r,render:n,fieldState:s}=t,a=t.informed;return n(R.createElement(Zf,e3(Bm(Bm({},r),a),{errorMessage:s.error})))}const qf=Lo(({initValue:e,options:t,fieldApi:r,fieldState:n})=>{const s=t.map((g,y)=>({value:g.title||g.value,idx:y,origValue:g.value})),a=s.find(g=>g.origValue===e),[p,d]=(0,R.useState)(a==null?void 0:a.value);(0,Vr.useMount)(()=>{e&&r.setValue(e)});const h=(0,R.useCallback)(g=>{r.setValue(s[g.idx].origValue),d(s[g.idx].value)},[r,s]);return R.createElement(SS,{fullWidth:!0},R.createElement(XD.Dropdown,{fullWidth:!0,variant:"dark",value:p,options:s,onChange:h}),n.error?R.createElement(st.Xq,null,n.error):null)});function s3({name:e,value:t,description:r,variableEnum:n,onChange:s,defaultValue:a}){const p=(0,R.useCallback)(g=>s(g.target.value),[s]),d=(0,R.useCallback)(g=>s(g.value),[s]),h=n?n.map((g,y)=>({value:g,idx:y})):[];return R.createElement(st.NI,null,R.createElement(st.lX,null,e,":"),h&&h.length?R.createElement(Qi.VD,{fullWidth:!0,variant:"dark",value:t,options:h,onChange:d}):R.createElement(Zf,{fullWidth:!0,value:t,onChange:p,placeholder:a,panel:"try-it"}),r&&R.createElement(o3,{source:r}))}const o3=(0,Kt.ZP)(YD.Markdown)`
219
219
  margin-top: 5px;
220
220
  color: #d0d0d0;
221
221
  `;var a3=Object.defineProperty,l3=Object.defineProperties,u3=Object.getOwnPropertyDescriptors,OS=Object.getOwnPropertySymbols,c3=Object.prototype.hasOwnProperty,f3=Object.prototype.propertyIsEnumerable,ES=(e,t,r)=>t in e?a3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AS=(e,t)=>{for(var r in t||(t={}))c3.call(t,r)&&ES(e,r,t[r]);if(OS)for(var r of OS(t))f3.call(t,r)&&ES(e,r,t[r]);return e},CS=(e,t)=>l3(e,u3(t));function p3({operation:e,onChange:t}){const r=(0,kt.YQ)("serverUrl"),n=e.servers.findIndex(M=>M.url===r),[s,a]=(0,R.useState)(n<0?0:n),[p,d]=(0,R.useState)({});(0,Vr.useMount)(()=>{const M=(0,Wt.fz)(e.servers,s);t(M),d(M.variables)});const h=M=>{const I=e.servers.find(W=>W.url===M.serverUrl),B=e.servers.findIndex(W=>W.url===M.serverUrl),z=(0,Wt.mj)(I);t({url:M.serverUrl||"",variables:z}),(0,kt.WW)("serverUrl",M.serverUrl||""),a(B),d(z)},g=(M,I)=>{const B=e.servers[s],z=I||I===""?I:(0,Wt.mj)(B)[M],W=CS(AS({},p),{[M]:z});d(W),(0,Wt.UY)(M,z),t(CS(AS({},B),{variables:W}))},y=e.servers.map((M,I)=>({idx:I,serverUrl:M.url,value:`
222
222
  ${(0,Wt.nq)((0,Wt.v5)(M.url,p),M.variables)}
223
223
  - ${(0,kt.bG)(M.description)||"Default"}
224
- `})),C=Object.keys(p);return R.createElement(h3,{"data-cy":"console-target-server"},R.createElement(st.lX,{htmlFor:"server"},"Target server: "),R.createElement(st.NI,null,R.createElement(li.VD,{variant:"dark",value:y[s].value,options:y,fullWidth:!0,onChange:h})),C==null?void 0:C.map(M=>{var I;const B=(I=e.servers[s].variables)==null?void 0:I[M];if(B)return R.createElement(s3,{key:M,name:M,value:p[M],defaultValue:B.default,onChange:z=>g(M,z),variableEnum:B.enum,description:B.description})}))}const d3=(0,R.memo)(p3),h3=Kt.ZP.div`
224
+ `})),C=Object.keys(p);return R.createElement(h3,{"data-cy":"console-target-server"},R.createElement(st.lX,{htmlFor:"server"},"Target server: "),R.createElement(st.NI,null,R.createElement(Qi.VD,{variant:"dark",value:y[s].value,options:y,fullWidth:!0,onChange:h})),C==null?void 0:C.map(M=>{var I;const B=(I=e.servers[s].variables)==null?void 0:I[M];if(B)return R.createElement(s3,{key:M,name:M,value:p[M],defaultValue:B.default,onChange:z=>g(M,z),variableEnum:B.enum,description:B.description})}))}const d3=(0,R.memo)(p3),h3=Kt.ZP.div`
225
225
  margin-bottom: 20px;
226
226
  `;var _S=c(44777),m3=Object.defineProperty,v3=Object.defineProperties,g3=Object.getOwnPropertyDescriptors,$m=Object.getOwnPropertySymbols,PS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,VS=(e,t,r)=>t in e?m3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y3=(e,t)=>{for(var r in t||(t={}))PS.call(t,r)&&VS(e,r,t[r]);if($m)for(var r of $m(t))TS.call(t,r)&&VS(e,r,t[r]);return e},b3=(e,t)=>v3(e,g3(t)),x3=(e,t)=>{var r={};for(var n in e)PS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$m)for(var n of $m(e))t.indexOf(n)<0&&TS.call(e,n)&&(r[n]=e[n]);return r};function Sy(e){var t=e,{header:r,error:n,success:s}=t,a=x3(t,["header","error","success"]);const p=({toggle:d,expanded:h=!1})=>R.createElement(Vr.PanelHeader,{onClick:d,expanded:h,"data-cy":a["data-cy"]},R.createElement(Pm.xz,null,R.createElement(Vr.PanelHeaderTitle,null,r),R.createElement(Vr.ShelfIcon,{direction:h?"down":"right"})),n&&R.createElement(_S.CrossIcon,{size:"14px",color:"--color-error-500"})||null,s&&R.createElement(_S.LockIcon,{size:"14px",color:"--color-success-500"})||null);return R.createElement(S3,b3(y3({className:"panel-try-it-nested"},a),{header:p}))}const S3=(0,Kt.ZP)(Vr.Panel)`
227
227
  ${Vr.PanelHeader} {
@@ -238,7 +238,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
238
238
  `;var w3=c(33300),O3=c(7362),E3=c(75372);const A3=(0,Kt.ZP)(Lx.A3)`
239
239
  border-radius: var(--panel-border-radius);
240
240
  margin-bottom: 10px;
241
- `;var Um=c(39889),wy=c(82183),C3=c(43507),_3=Object.defineProperty,Wm=Object.getOwnPropertySymbols,kS=Object.prototype.hasOwnProperty,jS=Object.prototype.propertyIsEnumerable,IS=(e,t,r)=>t in e?_3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P3=(e,t)=>{for(var r in t||(t={}))kS.call(t,r)&&IS(e,r,t[r]);if(Wm)for(var r of Wm(t))jS.call(t,r)&&IS(e,r,t[r]);return e},RS=(e,t)=>{var r={};for(var n in e)kS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wm)for(var n of Wm(e))t.indexOf(n)<0&&jS.call(e,n)&&(r[n]=e[n]);return r},T3=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const FS=(0,R.forwardRef)((e,t)=>{var r=RS(e,[]);const n=r,{schema:s,contentName:a,onChange:p,name:d}=n,h=RS(n,["schema","contentName","onChange","name"]),{render:g}=Yf(P3({field:d},h)),y=C=>T3(void 0,null,function*(){const M=yield fL(C.target.files,s);p(a,M)});return g(R.createElement("input",{"data-cy":"file-upload-input",type:"file",id:r.id,className:r.className,name:r.name,onChange:y,multiple:r.multiple,accept:r.accept,ref:t}))});FS.displayName="FileUpload";var Oy=c(57135);function V3({mediaType:e,onChange:t,formApi:r}){var n;const s=e.examples||{},{exampleKey:a}=(0,wy.C6)(e.operation,s),p=(n=s[a])==null?void 0:n.rawValue,d=j3(e);(0,R.useEffect)(()=>r&&d.forEach(g=>{var y,C;const M=p==null?void 0:p[g.name],I=(C=(y=g.example)!=null?y:M==null?void 0:M.example)!=null?C:M,B=typeof I=="object"?JSON.stringify(I):I;I!==void 0&&r.setValue("body."+g.name,`${B}`)}),[a]);const h=e.schema||{};return Tx(h,e.name)?R.createElement(MS,null,R.createElement(st.NI,null,R.createElement(LS,{fullWidth:!0,id:`body.${e.name}`,name:`body.${e.name}`,accept:Px(e.name),schema:h,contentName:e.name,onChange:t}))):h.type!==Zs.DefinitionTypes.OBJECT&&!d?(console.warn(`Invalid schema for request body and mime type: "${e.name}"`,h),null):R.createElement(MS,null,d.map(g=>{const y=g.schema||{contentMediaType:"",type:"",description:""},C=e.name===Um.Tr.MULTIPART&&cL(y),M=y.contentMediaType||"",I=C?R.createElement(LS,{fullWidth:!0,id:"body."+g.name,name:"body."+g.name,accept:Px(M),multiple:y.type==="array",schema:y,contentName:g.name,onChange:t}):R.createElement(ci,{fullWidth:!0,id:"body."+g.name,field:"body."+g.name,placeholder:(0,kt.bG)(y.description)||g.name,panel:"try-it"});return R.createElement(st.NI,{key:g.name},R.createElement(st.lX,null,g.name,":"),I)}))}const k3=(0,R.memo)(V3);function j3(e){var t,r,n,s;const{activeOneOf:a}=(0,C3.$l)((0,Oy.N)(e.operation.pointer));return((r=(t=e.schema)==null?void 0:t.oneOf)!=null&&r.length?((n=e.schema)==null?void 0:n.oneOf[a].fields)||[]:((s=e.schema)==null?void 0:s.fields)||[]).filter(p=>!p.schema.readOnly)}const MS=Kt.ZP.div`
241
+ `;var Um=c(39889),wy=c(82183),C3=c(43507),_3=Object.defineProperty,Wm=Object.getOwnPropertySymbols,kS=Object.prototype.hasOwnProperty,jS=Object.prototype.propertyIsEnumerable,IS=(e,t,r)=>t in e?_3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P3=(e,t)=>{for(var r in t||(t={}))kS.call(t,r)&&IS(e,r,t[r]);if(Wm)for(var r of Wm(t))jS.call(t,r)&&IS(e,r,t[r]);return e},RS=(e,t)=>{var r={};for(var n in e)kS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wm)for(var n of Wm(e))t.indexOf(n)<0&&jS.call(e,n)&&(r[n]=e[n]);return r},T3=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});const FS=(0,R.forwardRef)((e,t)=>{var r=RS(e,[]);const n=r,{schema:s,contentName:a,onChange:p,name:d}=n,h=RS(n,["schema","contentName","onChange","name"]),{render:g}=Yf(P3({field:d},h)),y=C=>T3(void 0,null,function*(){const M=yield fL(C.target.files,s);p(a,M)});return g(R.createElement("input",{"data-cy":"file-upload-input",type:"file",id:r.id,className:r.className,name:r.name,onChange:y,multiple:r.multiple,accept:r.accept,ref:t}))});FS.displayName="FileUpload";var Oy=c(57135);function V3({mediaType:e,onChange:t,formApi:r}){var n;const s=e.examples||{},{exampleKey:a}=(0,wy.C6)(e.operation,s),p=(n=s[a])==null?void 0:n.rawValue,d=j3(e);(0,R.useEffect)(()=>r&&d.forEach(g=>{var y,C;const M=p==null?void 0:p[g.name],I=(C=(y=g.example)!=null?y:M==null?void 0:M.example)!=null?C:M,B=typeof I=="object"?JSON.stringify(I):I;I!==void 0&&r.setValue("body."+g.name,`${B}`)}),[a]);const h=e.schema||{};return Tx(h,e.name)?R.createElement(MS,null,R.createElement(st.NI,null,R.createElement(LS,{fullWidth:!0,id:`body.${e.name}`,name:`body.${e.name}`,accept:Px(e.name),schema:h,contentName:e.name,onChange:t}))):h.type!==Zs.DefinitionTypes.OBJECT&&!d?(console.warn(`Invalid schema for request body and mime type: "${e.name}"`,h),null):R.createElement(MS,null,d.map(g=>{const y=g.schema||{contentMediaType:"",type:"",description:""},C=e.name===Um.Tr.MULTIPART&&cL(y),M=y.contentMediaType||"",I=C?R.createElement(LS,{fullWidth:!0,id:"body."+g.name,name:"body."+g.name,accept:Px(M),multiple:y.type==="array",schema:y,contentName:g.name,onChange:t}):R.createElement(ui,{fullWidth:!0,id:"body."+g.name,field:"body."+g.name,placeholder:(0,kt.bG)(y.description)||g.name,panel:"try-it"});return R.createElement(st.NI,{key:g.name},R.createElement(st.lX,null,g.name,":"),I)}))}const k3=(0,R.memo)(V3);function j3(e){var t,r,n,s;const{activeOneOf:a}=(0,C3.$l)((0,Oy.N)(e.operation.pointer));return((r=(t=e.schema)==null?void 0:t.oneOf)!=null&&r.length?((n=e.schema)==null?void 0:n.oneOf[a].fields)||[]:((s=e.schema)==null?void 0:s.fields)||[]).filter(p=>!p.schema.readOnly)}const MS=Kt.ZP.div`
242
242
  > div {
243
243
  margin-top: 10px;
244
244
  }
@@ -255,24 +255,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
255
255
  `}return e&&e.eol||`
256
256
  `}function DS(e,t){return`\r
257
257
  `.indexOf(e.charAt(t))!==-1}var tp;(function(e){e.DEFAULT={allowTrailingComma:!1}})(tp||(tp={}));function L3(e,t){var r=[],n=new Object,s=void 0,a={value:{},offset:0,length:0,type:"object",parent:void 0},p=!1;function d(h,g,y,C){a.value=h,a.offset=g,a.length=y,a.type=C,a.colonOffset=void 0,s=a}try{zm(e,{onObjectBegin:function(h,g){if(t<=h)throw n;s=void 0,p=t>h,r.push("")},onObjectProperty:function(h,g,y){if(t<g||(d(h,g,y,"property"),r[r.length-1]=h,t<=g+y))throw n},onObjectEnd:function(h,g){if(t<=h)throw n;s=void 0,r.pop()},onArrayBegin:function(h,g){if(t<=h)throw n;s=void 0,r.push(0)},onArrayEnd:function(h,g){if(t<=h)throw n;s=void 0,r.pop()},onLiteralValue:function(h,g,y){if(t<g||(d(h,g,y,$S(h)),t<=g+y))throw n},onSeparator:function(h,g,y){if(t<=g)throw n;if(h===":"&&s&&s.type==="property")s.colonOffset=g,p=!1,s=void 0;else if(h===","){var C=r[r.length-1];typeof C=="number"?r[r.length-1]=C+1:(p=!0,r[r.length-1]=""),s=void 0}}})}catch(h){if(h!==n)throw h}return{path:r,previousNode:s,isAtPropertyKey:p,matches:function(h){for(var g=0,y=0;g<h.length&&y<r.length;y++)if(h[g]===r[y]||h[g]==="*")g++;else if(h[g]!=="**")return!1;return g===h.length}}}function D3(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=tp.DEFAULT);var n=null,s=[],a=[];function p(h){Array.isArray(s)?s.push(h):n!==null&&(s[n]=h)}var d={onObjectBegin:function(){var h={};p(h),a.push(s),s=h,n=null},onObjectProperty:function(h){n=h},onObjectEnd:function(){s=a.pop()},onArrayBegin:function(){var h=[];p(h),a.push(s),s=h,n=null},onArrayEnd:function(){s=a.pop()},onLiteralValue:p,onError:function(h,g,y){t.push({error:h,offset:g,length:y})}};return zm(e,d,r),s[0]}function N3(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=tp.DEFAULT);var n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(h){n.type==="property"&&(n.length=h-n.offset,n=n.parent)}function a(h){return n.children.push(h),h}var p={onObjectBegin:function(h){n=a({type:"object",offset:h,length:-1,parent:n,children:[]})},onObjectProperty:function(h,g,y){n=a({type:"property",offset:g,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:h,offset:g,length:y,parent:n})},onObjectEnd:function(h,g){s(h+g),n.length=h+g-n.offset,n=n.parent,s(h+g)},onArrayBegin:function(h,g){n=a({type:"array",offset:h,length:-1,parent:n,children:[]})},onArrayEnd:function(h,g){n.length=h+g-n.offset,n=n.parent,s(h+g)},onLiteralValue:function(h,g,y){a({type:$S(h),offset:g,length:y,parent:n,value:h}),s(g+y)},onSeparator:function(h,g,y){n.type==="property"&&(h===":"?n.colonOffset=g:h===","&&s(g))},onError:function(h,g,y){t.push({error:h,offset:g,length:y})}};zm(e,p,r);var d=n.children[0];return d&&delete d.parent,d}function B3(e,t){if(e){for(var r=e,n=0,s=t;n<s.length;n++){var a=s[n];if(typeof a=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;for(var p=!1,d=0,h=r.children;d<h.length;d++){var g=h[d];if(Array.isArray(g.children)&&g.children[0].value===a){r=g.children[1],p=!0;break}}if(!p)return}else{var y=a;if(r.type!=="array"||y<0||!Array.isArray(r.children)||y>=r.children.length)return;r=r.children[y]}}return r}}function NS(e){if(!e.parent||!e.parent.children)return[];var t=NS(e.parent);if(e.parent.type==="property"){var r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){var n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Cy(e){switch(e.type){case"array":return e.children.map(Cy);case"object":for(var t=Object.create(null),r=0,n=e.children;r<n.length;r++){var s=n[r],a=s.children[1];a&&(t[s.children[0].value]=Cy(a))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function $3(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function BS(e,t,r){if(r===void 0&&(r=!1),$3(e,t,r)){var n=e.children;if(Array.isArray(n))for(var s=0;s<n.length&&n[s].offset<=t;s++){var a=BS(n[s],t,r);if(a)return a}return e}}function zm(e,t,r){r===void 0&&(r=tp.DEFAULT);var n=Hm(e,!1);function s(ce){return ce?function(){return ce(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}function a(ce){return ce?function(Se){return ce(Se,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}var p=s(t.onObjectBegin),d=a(t.onObjectProperty),h=s(t.onObjectEnd),g=s(t.onArrayBegin),y=s(t.onArrayEnd),C=a(t.onLiteralValue),M=a(t.onSeparator),I=s(t.onComment),B=a(t.onError),z=r&&r.disallowComments,W=r&&r.allowTrailingComma;function G(){for(;;){var ce=n.scan();switch(n.getTokenError()){case 4:te(14);break;case 5:te(15);break;case 3:te(13);break;case 1:z||te(11);break;case 2:te(12);break;case 6:te(16);break}switch(ce){case 12:case 13:z?te(10):I();break;case 16:te(1);break;case 15:case 14:break;default:return ce}}}function te(ce,Se,Ce){if(Se===void 0&&(Se=[]),Ce===void 0&&(Ce=[]),B(ce),Se.length+Ce.length>0)for(var Me=n.getToken();Me!==17;){if(Se.indexOf(Me)!==-1){G();break}else if(Ce.indexOf(Me)!==-1)break;Me=G()}}function le(ce){var Se=n.getTokenValue();return ce?C(Se):d(Se),G(),!0}function ye(){switch(n.getToken()){case 11:var ce=n.getTokenValue(),Se=Number(ce);isNaN(Se)&&(te(2),Se=0),C(Se);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return G(),!0}function he(){return n.getToken()!==10?(te(3,[],[2,5]),!1):(le(!1),n.getToken()===6?(M(":"),G(),ve()||te(4,[],[2,5])):te(5,[],[2,5]),!0)}function Ee(){p(),G();for(var ce=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(ce||te(4,[],[]),M(","),G(),n.getToken()===2&&W)break}else ce&&te(6,[],[]);he()||te(4,[],[2,5]),ce=!0}return h(),n.getToken()!==2?te(7,[2],[]):G(),!0}function me(){g(),G();for(var ce=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(ce||te(4,[],[]),M(","),G(),n.getToken()===4&&W)break}else ce&&te(6,[],[]);ve()||te(4,[],[4,5]),ce=!0}return y(),n.getToken()!==4?te(8,[4],[]):G(),!0}function ve(){switch(n.getToken()){case 3:return me();case 1:return Ee();case 10:return le(!0);default:return ye()}}return G(),n.getToken()===17?r.allowEmptyContent?!0:(te(4,[],[]),!1):ve()?(n.getToken()!==17&&te(9,[],[]),!0):(te(4,[],[]),!1)}function U3(e,t){var r=Hm(e),n=[],s,a=0,p;do switch(p=r.getPosition(),s=r.scan(),s){case 12:case 13:case 17:a!==p&&n.push(e.substring(a,p)),t!==void 0&&n.push(r.getTokenValue().replace(/[^\r\n]/g,t)),a=r.getPosition();break}while(s!==17);return n.join("")}function $S(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 xG(e,t,r){return W3(e,t,void 0,r)}function W3(e,t,r,n){for(var s,a=t.slice(),p=[],d=parseTree(e,p),h=void 0,g=void 0;a.length>0&&(g=a.pop(),h=findNodeAtLocation(d,a),h===void 0&&r!==void 0);)typeof g=="string"?r=(s={},s[g]=r,s):r=[r];if(h)if(h.type==="object"&&typeof g=="string"&&Array.isArray(h.children)){var y=findNodeAtLocation(h,[g]);if(y!==void 0)if(r===void 0){if(!y.parent)throw new Error("Malformed AST");var C=h.children.indexOf(y.parent),M=void 0,I=y.parent.offset+y.parent.length;if(C>0){var B=h.children[C-1];M=B.offset+B.length}else if(M=h.offset+1,h.children.length>1){var z=h.children[1];I=z.offset}return Pl(e,{offset:M,length:I-M,content:""},n)}else return Pl(e,{offset:y.offset,length:y.length,content:JSON.stringify(r)},n);else{if(r===void 0)return[];var W=JSON.stringify(g)+": "+JSON.stringify(r),G=n.getInsertionIndex?n.getInsertionIndex(h.children.map(function(ce){return ce.children[0].value})):h.children.length,te=void 0;if(G>0){var B=h.children[G-1];te={offset:B.offset+B.length,length:0,content:","+W}}else h.children.length===0?te={offset:h.offset+1,length:0,content:W}:te={offset:h.offset+1,length:0,content:W+","};return Pl(e,te,n)}}else if(h.type==="array"&&typeof g=="number"&&Array.isArray(h.children)){var le=g;if(le===-1){var W=""+JSON.stringify(r),te=void 0;if(h.children.length===0)te={offset:h.offset+1,length:0,content:W};else{var B=h.children[h.children.length-1];te={offset:B.offset+B.length,length:0,content:","+W}}return Pl(e,te,n)}else if(r===void 0&&h.children.length>=0){var ye=g,he=h.children[ye],te=void 0;if(h.children.length===1)te={offset:h.offset+1,length:h.length-2,content:""};else if(h.children.length-1===ye){var B=h.children[ye-1],Ee=B.offset+B.length,me=h.offset+h.length;te={offset:Ee,length:me-2-Ee,content:""}}else te={offset:he.offset,length:h.children[ye+1].offset-he.offset,content:""};return Pl(e,te,n)}else if(r!==void 0){var te=void 0,W=""+JSON.stringify(r);if(!n.isArrayInsertion&&h.children.length>g){var ve=h.children[g];te={offset:ve.offset,length:ve.length,content:W}}else if(h.children.length===0||g===0)te={offset:h.offset+1,length:0,content:h.children.length===0?W:W+","};else{var G=g>h.children.length?h.children.length:g,B=h.children[G-1];te={offset:B.offset+B.length,length:0,content:","+W}}return Pl(e,te,n)}else throw new Error("Can not "+(r===void 0?"remove":n.isArrayInsertion?"insert":"modify")+" Array index "+le+" 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(r===void 0)throw new Error("Can not delete in empty document");return Pl(e,{offset:d?d.offset:0,length:d?d.length:0,content:JSON.stringify(r)},n)}}function Pl(e,t,r){if(!r.formattingOptions)return[t];var n=US(e,t),s=t.offset,a=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;s>0&&!isEOL(n,s-1);)s--;for(;a<n.length&&!isEOL(n,a);)a++}for(var p=format(n,{offset:s,length:a-s},r.formattingOptions),d=p.length-1;d>=0;d--){var h=p[d];n=US(n,h),s=Math.min(s,h.offset),a=Math.max(a,h.offset+h.length),a+=h.content.length-h.length}var g=e.length-(n.length-a)-s;return[{offset:s,length:g,content:n.substring(s,a)}]}function US(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}function SG(e,t){return`\r
258
- `.indexOf(e.charAt(t))!==-1}var Gu=Hm,wG=L3,H3=D3,OG=N3,EG=B3,z3=BS,G3=NS,K3=Cy,AG=zm,CG=U3;function _G(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 J3(e,t,r){return R3(e,t,r)}function PG(e,t,r,n){return edit.setProperty(e,t,r,n)}function TG(e,t){for(var r=t.length-1;r>=0;r--)e=edit.applyEdit(e,t[r]);return e}function rp(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!rp(e[r],t[r]))return!1}else{var s=[];for(n in e)s.push(n);s.sort();var a=[];for(n in t)a.push(n);if(a.sort(),!rp(s,a))return!1;for(r=0;r<s.length;r++)if(!rp(e[s[r]],t[s[r]]))return!1}return!0}function Ci(e){return typeof e=="number"}function Do(e){return typeof e!="undefined"}function eo(e){return typeof e=="boolean"}function Y3(e){return typeof e=="string"}var WS;(function(e){function t(r){return typeof r=="string"}e.is=t})(WS||(WS={}));var _y;(function(e){function t(r){return typeof r=="string"}e.is=t})(_y||(_y={}));var HS;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(HS||(HS={}));var Gm;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(Gm||(Gm={}));var qi;(function(e){function t(n,s){return n===Number.MAX_VALUE&&(n=Gm.MAX_VALUE),s===Number.MAX_VALUE&&(s=Gm.MAX_VALUE),{line:n,character:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.uinteger(s.line)&&_e.uinteger(s.character)}e.is=r})(qi||(qi={}));var or;(function(e){function t(n,s,a,p){if(_e.uinteger(n)&&_e.uinteger(s)&&_e.uinteger(a)&&_e.uinteger(p))return{start:qi.create(n,s),end:qi.create(a,p)};if(qi.is(n)&&qi.is(s))return{start:n,end:s};throw new Error("Range#create called with invalid arguments[".concat(n,", ").concat(s,", ").concat(a,", ").concat(p,"]"))}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&qi.is(s.start)&&qi.is(s.end)}e.is=r})(or||(or={}));var Ku;(function(e){function t(n,s){return{uri:n,range:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&(_e.string(s.uri)||_e.undefined(s.uri))}e.is=r})(Ku||(Ku={}));var zS;(function(e){function t(n,s,a,p){return{targetUri:n,targetRange:s,targetSelectionRange:a,originSelectionRange:p}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.targetRange)&&_e.string(s.targetUri)&&or.is(s.targetSelectionRange)&&(or.is(s.originSelectionRange)||_e.undefined(s.originSelectionRange))}e.is=r})(zS||(zS={}));var Py;(function(e){function t(n,s,a,p){return{red:n,green:s,blue:a,alpha:p}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.numberRange(s.red,0,1)&&_e.numberRange(s.green,0,1)&&_e.numberRange(s.blue,0,1)&&_e.numberRange(s.alpha,0,1)}e.is=r})(Py||(Py={}));var GS;(function(e){function t(n,s){return{range:n,color:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&Py.is(s.color)}e.is=r})(GS||(GS={}));var KS;(function(e){function t(n,s,a){return{label:n,textEdit:s,additionalTextEdits:a}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.string(s.label)&&(_e.undefined(s.textEdit)||es.is(s))&&(_e.undefined(s.additionalTextEdits)||_e.typedArray(s.additionalTextEdits,es.is))}e.is=r})(KS||(KS={}));var np;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(np||(np={}));var JS;(function(e){function t(n,s,a,p,d,h){var g={startLine:n,endLine:s};return _e.defined(a)&&(g.startCharacter=a),_e.defined(p)&&(g.endCharacter=p),_e.defined(d)&&(g.kind=d),_e.defined(h)&&(g.collapsedText=h),g}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.uinteger(s.startLine)&&_e.uinteger(s.startLine)&&(_e.undefined(s.startCharacter)||_e.uinteger(s.startCharacter))&&(_e.undefined(s.endCharacter)||_e.uinteger(s.endCharacter))&&(_e.undefined(s.kind)||_e.string(s.kind))}e.is=r})(JS||(JS={}));var Ty;(function(e){function t(n,s){return{location:n,message:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&Ku.is(s.location)&&_e.string(s.message)}e.is=r})(Ty||(Ty={}));var Nt;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Nt||(Nt={}));var YS;(function(e){e.Unnecessary=1,e.Deprecated=2})(YS||(YS={}));var XS;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&_e.string(n.href)}e.is=t})(XS||(XS={}));var No;(function(e){function t(n,s,a,p,d,h){var g={range:n,message:s};return _e.defined(a)&&(g.severity=a),_e.defined(p)&&(g.code=p),_e.defined(d)&&(g.source=d),_e.defined(h)&&(g.relatedInformation=h),g}e.create=t;function r(n){var s,a=n;return _e.defined(a)&&or.is(a.range)&&_e.string(a.message)&&(_e.number(a.severity)||_e.undefined(a.severity))&&(_e.integer(a.code)||_e.string(a.code)||_e.undefined(a.code))&&(_e.undefined(a.codeDescription)||_e.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(_e.string(a.source)||_e.undefined(a.source))&&(_e.undefined(a.relatedInformation)||_e.typedArray(a.relatedInformation,Ty.is))}e.is=r})(No||(No={}));var Ju;(function(e){function t(n,s){for(var a=[],p=2;p<arguments.length;p++)a[p-2]=arguments[p];var d={title:n,command:s};return _e.defined(a)&&a.length>0&&(d.arguments=a),d}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.title)&&_e.string(s.command)}e.is=r})(Ju||(Ju={}));var es;(function(e){function t(a,p){return{range:a,newText:p}}e.replace=t;function r(a,p){return{range:{start:a,end:a},newText:p}}e.insert=r;function n(a){return{range:a,newText:""}}e.del=n;function s(a){var p=a;return _e.objectLiteral(p)&&_e.string(p.newText)&&or.is(p.range)}e.is=s})(es||(es={}));var Yu;(function(e){function t(n,s,a){var p={label:n};return s!==void 0&&(p.needsConfirmation=s),a!==void 0&&(p.description=a),p}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.string(s.label)&&(_e.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(_e.string(s.description)||s.description===void 0)}e.is=r})(Yu||(Yu={}));var $n;(function(e){function t(r){var n=r;return _e.string(n)}e.is=t})($n||($n={}));var Ca;(function(e){function t(a,p,d){return{range:a,newText:p,annotationId:d}}e.replace=t;function r(a,p,d){return{range:{start:a,end:a},newText:p,annotationId:d}}e.insert=r;function n(a,p){return{range:a,newText:"",annotationId:p}}e.del=n;function s(a){var p=a;return es.is(p)&&(Yu.is(p.annotationId)||$n.is(p.annotationId))}e.is=s})(Ca||(Ca={}));var Km;(function(e){function t(n,s){return{textDocument:n,edits:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&Ym.is(s.textDocument)&&Array.isArray(s.edits)}e.is=r})(Km||(Km={}));var ip;(function(e){function t(n,s,a){var p={kind:"create",uri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(p.options=s),a!==void 0&&(p.annotationId=a),p}e.create=t;function r(n){var s=n;return s&&s.kind==="create"&&_e.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(ip||(ip={}));var sp;(function(e){function t(n,s,a,p){var d={kind:"rename",oldUri:n,newUri:s};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(d.options=a),p!==void 0&&(d.annotationId=p),d}e.create=t;function r(n){var s=n;return s&&s.kind==="rename"&&_e.string(s.oldUri)&&_e.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(sp||(sp={}));var op;(function(e){function t(n,s,a){var p={kind:"delete",uri:n};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(p.options=s),a!==void 0&&(p.annotationId=a),p}e.create=t;function r(n){var s=n;return s&&s.kind==="delete"&&_e.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||_e.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||_e.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(op||(op={}));var Vy;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(s){return _e.string(s.kind)?ip.is(s)||sp.is(s)||op.is(s):Km.is(s)}))}e.is=t})(Vy||(Vy={}));var Jm=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var s,a;if(n===void 0?s=es.insert(t,r):$n.is(n)?(a=n,s=Ca.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(n),s=Ca.insert(t,r,a)),this.edits.push(s),a!==void 0)return a},e.prototype.replace=function(t,r,n){var s,a;if(n===void 0?s=es.replace(t,r):$n.is(n)?(a=n,s=Ca.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(n),s=Ca.replace(t,r,a)),this.edits.push(s),a!==void 0)return a},e.prototype.delete=function(t,r){var n,s;if(r===void 0?n=es.del(t):$n.is(r)?(s=r,n=Ca.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),n=Ca.del(t,s)),this.edits.push(n),s!==void 0)return s},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),QS=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,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(t,r){var n;if($n.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id ".concat(n," is already in use."));if(r===void 0)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),VG=function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new QS(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Km.is(n)){var s=new Jm(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=s}})):t.changes&&Object.keys(t.changes).forEach(function(n){var s=new Jm(t.changes[n]);r._textEditChanges[n]=s})):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(t){if(Ym.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var s=[],a={textDocument:r,edits:s};this._workspaceEdit.documentChanges.push(a),n=new Jm(s,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var s=[];this._workspaceEdit.changes[t]=s,n=new Jm(s),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new QS,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(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Yu.is(r)||$n.is(r)?s=r:n=r;var a,p;if(s===void 0?a=ip.create(t,n):(p=$n.is(s)?s:this._changeAnnotations.manage(s),a=ip.create(t,n,p)),this._workspaceEdit.documentChanges.push(a),p!==void 0)return p},e.prototype.renameFile=function(t,r,n,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Yu.is(n)||$n.is(n)?a=n:s=n;var p,d;if(a===void 0?p=sp.create(t,r,s):(d=$n.is(a)?a:this._changeAnnotations.manage(a),p=sp.create(t,r,s,d)),this._workspaceEdit.documentChanges.push(p),d!==void 0)return d},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Yu.is(r)||$n.is(r)?s=r:n=r;var a,p;if(s===void 0?a=op.create(t,n):(p=$n.is(s)?s:this._changeAnnotations.manage(s),a=op.create(t,n,p)),this._workspaceEdit.documentChanges.push(a),p!==void 0)return p},e}(),ZS;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)}e.is=r})(ZS||(ZS={}));var qS;(function(e){function t(n,s){return{uri:n,version:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&_e.integer(s.version)}e.is=r})(qS||(qS={}));var Ym;(function(e){function t(n,s){return{uri:n,version:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&(s.version===null||_e.integer(s.version))}e.is=r})(Ym||(Ym={}));var ew;(function(e){function t(n,s,a,p){return{uri:n,languageId:s,version:a,text:p}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&_e.string(s.languageId)&&_e.integer(s.version)&&_e.string(s.text)}e.is=r})(ew||(ew={}));var Tl;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t})(Tl||(Tl={}));var lp;(function(e){function t(r){var n=r;return _e.objectLiteral(r)&&Tl.is(n.kind)&&_e.string(n.value)}e.is=t})(lp||(lp={}));var _i;(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})(_i||(_i={}));var dn;(function(e){e.PlainText=1,e.Snippet=2})(dn||(dn={}));var tw;(function(e){e.Deprecated=1})(tw||(tw={}));var rw;(function(e){function t(n,s,a){return{newText:n,insert:s,replace:a}}e.create=t;function r(n){var s=n;return s&&_e.string(s.newText)&&or.is(s.insert)&&or.is(s.replace)}e.is=r})(rw||(rw={}));var nw;(function(e){e.asIs=1,e.adjustIndentation=2})(nw||(nw={}));var iw;(function(e){function t(r){var n=r;return n&&(_e.string(n.detail)||n.detail===void 0)&&(_e.string(n.description)||n.description===void 0)}e.is=t})(iw||(iw={}));var ky;(function(e){function t(r){return{label:r}}e.create=t})(ky||(ky={}));var sw;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(sw||(sw={}));var Xm;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var s=n;return _e.string(s)||_e.objectLiteral(s)&&_e.string(s.language)&&_e.string(s.value)}e.is=r})(Xm||(Xm={}));var ow;(function(e){function t(r){var n=r;return!!n&&_e.objectLiteral(n)&&(lp.is(n.contents)||Xm.is(n.contents)||_e.typedArray(n.contents,Xm.is))&&(r.range===void 0||or.is(r.range))}e.is=t})(ow||(ow={}));var aw;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(aw||(aw={}));var lw;(function(e){function t(r,n){for(var s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];var p={label:r};return _e.defined(n)&&(p.documentation=n),_e.defined(s)?p.parameters=s:p.parameters=[],p}e.create=t})(lw||(lw={}));var uw;(function(e){e.Text=1,e.Read=2,e.Write=3})(uw||(uw={}));var cw;(function(e){function t(r,n){var s={range:r};return _e.number(n)&&(s.kind=n),s}e.create=t})(cw||(cw={}));var to;(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})(to||(to={}));var fw;(function(e){e.Deprecated=1})(fw||(fw={}));var pw;(function(e){function t(r,n,s,a,p){var d={name:r,kind:n,location:{uri:a,range:s}};return p&&(d.containerName=p),d}e.create=t})(pw||(pw={}));var dw;(function(e){function t(r,n,s,a){return a!==void 0?{name:r,kind:n,location:{uri:s,range:a}}:{name:r,kind:n,location:{uri:s}}}e.create=t})(dw||(dw={}));var hw;(function(e){function t(n,s,a,p,d,h){var g={name:n,detail:s,kind:a,range:p,selectionRange:d};return h!==void 0&&(g.children=h),g}e.create=t;function r(n){var s=n;return s&&_e.string(s.name)&&_e.number(s.kind)&&or.is(s.range)&&or.is(s.selectionRange)&&(s.detail===void 0||_e.string(s.detail))&&(s.deprecated===void 0||_e.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}e.is=r})(hw||(hw={}));var mw;(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"})(mw||(mw={}));var Qm;(function(e){e.Invoked=1,e.Automatic=2})(Qm||(Qm={}));var vw;(function(e){function t(n,s,a){var p={diagnostics:n};return s!=null&&(p.only=s),a!=null&&(p.triggerKind=a),p}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.typedArray(s.diagnostics,No.is)&&(s.only===void 0||_e.typedArray(s.only,_e.string))&&(s.triggerKind===void 0||s.triggerKind===Qm.Invoked||s.triggerKind===Qm.Automatic)}e.is=r})(vw||(vw={}));var gw;(function(e){function t(n,s,a){var p={title:n},d=!0;return typeof s=="string"?(d=!1,p.kind=s):Ju.is(s)?p.command=s:p.edit=s,d&&a!==void 0&&(p.kind=a),p}e.create=t;function r(n){var s=n;return s&&_e.string(s.title)&&(s.diagnostics===void 0||_e.typedArray(s.diagnostics,No.is))&&(s.kind===void 0||_e.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||Ju.is(s.command))&&(s.isPreferred===void 0||_e.boolean(s.isPreferred))&&(s.edit===void 0||Vy.is(s.edit))}e.is=r})(gw||(gw={}));var yw;(function(e){function t(n,s){var a={range:n};return _e.defined(s)&&(a.data=s),a}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(s.range)&&(_e.undefined(s.command)||Ju.is(s.command))}e.is=r})(yw||(yw={}));var bw;(function(e){function t(n,s){return{tabSize:n,insertSpaces:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.uinteger(s.tabSize)&&_e.boolean(s.insertSpaces)}e.is=r})(bw||(bw={}));var xw;(function(e){function t(n,s,a){return{range:n,target:s,data:a}}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(s.range)&&(_e.undefined(s.target)||_e.string(s.target))}e.is=r})(xw||(xw={}));var Zm;(function(e){function t(n,s){return{range:n,parent:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&(s.parent===void 0||e.is(s.parent))}e.is=r})(Zm||(Zm={}));var Sw;(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"})(Sw||(Sw={}));var ww;(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"})(ww||(ww={}));var Ow;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=t})(Ow||(Ow={}));var Ew;(function(e){function t(n,s){return{range:n,text:s}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&_e.string(s.text)}e.is=r})(Ew||(Ew={}));var Aw;(function(e){function t(n,s,a){return{range:n,variableName:s,caseSensitiveLookup:a}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&_e.boolean(s.caseSensitiveLookup)&&(_e.string(s.variableName)||s.variableName===void 0)}e.is=r})(Aw||(Aw={}));var Cw;(function(e){function t(n,s){return{range:n,expression:s}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&(_e.string(s.expression)||s.expression===void 0)}e.is=r})(Cw||(Cw={}));var _w;(function(e){function t(n,s){return{frameId:n,stoppedLocation:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(n.stoppedLocation)}e.is=r})(_w||(_w={}));var jy;(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}e.is=t})(jy||(jy={}));var Iy;(function(e){function t(n){return{value:n}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&(s.tooltip===void 0||_e.string(s.tooltip)||lp.is(s.tooltip))&&(s.location===void 0||Ku.is(s.location))&&(s.command===void 0||Ju.is(s.command))}e.is=r})(Iy||(Iy={}));var Pw;(function(e){function t(n,s,a){var p={position:n,label:s};return a!==void 0&&(p.kind=a),p}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&qi.is(s.position)&&(_e.string(s.label)||_e.typedArray(s.label,Iy.is))&&(s.kind===void 0||jy.is(s.kind))&&s.textEdits===void 0||_e.typedArray(s.textEdits,es.is)&&(s.tooltip===void 0||_e.string(s.tooltip)||lp.is(s.tooltip))&&(s.paddingLeft===void 0||_e.boolean(s.paddingLeft))&&(s.paddingRight===void 0||_e.boolean(s.paddingRight))}e.is=r})(Pw||(Pw={}));var Tw;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&_y.is(n.uri)&&_e.string(n.name)}e.is=t})(Tw||(Tw={}));var kG=null,Vw;(function(e){function t(a,p,d,h){return new X3(a,p,d,h)}e.create=t;function r(a){var p=a;return!!(_e.defined(p)&&_e.string(p.uri)&&(_e.undefined(p.languageId)||_e.string(p.languageId))&&_e.uinteger(p.lineCount)&&_e.func(p.getText)&&_e.func(p.positionAt)&&_e.func(p.offsetAt))}e.is=r;function n(a,p){for(var d=a.getText(),h=s(p,function(B,z){var W=B.range.start.line-z.range.start.line;return W===0?B.range.start.character-z.range.start.character:W}),g=d.length,y=h.length-1;y>=0;y--){var C=h[y],M=a.offsetAt(C.range.start),I=a.offsetAt(C.range.end);if(I<=g)d=d.substring(0,M)+C.newText+d.substring(I,d.length);else throw new Error("Overlapping edit");g=M}return d}e.applyEdits=n;function s(a,p){if(a.length<=1)return a;var d=a.length/2|0,h=a.slice(0,d),g=a.slice(d);s(h,p),s(g,p);for(var y=0,C=0,M=0;y<h.length&&C<g.length;){var I=p(h[y],g[C]);I<=0?a[M++]=h[y++]:a[M++]=g[C++]}for(;y<h.length;)a[M++]=h[y++];for(;C<g.length;)a[M++]=g[C++];return a}})(Vw||(Vw={}));var X3=function(){function e(t,r,n,s){this._uri=t,this._languageId=r,this._version=n,this._content=s,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(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,s=0;s<r.length;s++){n&&(t.push(s),n=!1);var a=r.charAt(s);n=a==="\r"||a===`
258
+ `.indexOf(e.charAt(t))!==-1}var Gu=Hm,wG=L3,H3=D3,OG=N3,EG=B3,z3=BS,G3=NS,K3=Cy,AG=zm,CG=U3;function _G(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 J3(e,t,r){return R3(e,t,r)}function PG(e,t,r,n){return edit.setProperty(e,t,r,n)}function TG(e,t){for(var r=t.length-1;r>=0;r--)e=edit.applyEdit(e,t[r]);return e}function rp(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!rp(e[r],t[r]))return!1}else{var s=[];for(n in e)s.push(n);s.sort();var a=[];for(n in t)a.push(n);if(a.sort(),!rp(s,a))return!1;for(r=0;r<s.length;r++)if(!rp(e[s[r]],t[s[r]]))return!1}return!0}function Ai(e){return typeof e=="number"}function Do(e){return typeof e!="undefined"}function eo(e){return typeof e=="boolean"}function Y3(e){return typeof e=="string"}var WS;(function(e){function t(r){return typeof r=="string"}e.is=t})(WS||(WS={}));var _y;(function(e){function t(r){return typeof r=="string"}e.is=t})(_y||(_y={}));var HS;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(HS||(HS={}));var Gm;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(Gm||(Gm={}));var qi;(function(e){function t(n,s){return n===Number.MAX_VALUE&&(n=Gm.MAX_VALUE),s===Number.MAX_VALUE&&(s=Gm.MAX_VALUE),{line:n,character:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.uinteger(s.line)&&_e.uinteger(s.character)}e.is=r})(qi||(qi={}));var or;(function(e){function t(n,s,a,p){if(_e.uinteger(n)&&_e.uinteger(s)&&_e.uinteger(a)&&_e.uinteger(p))return{start:qi.create(n,s),end:qi.create(a,p)};if(qi.is(n)&&qi.is(s))return{start:n,end:s};throw new Error("Range#create called with invalid arguments[".concat(n,", ").concat(s,", ").concat(a,", ").concat(p,"]"))}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&qi.is(s.start)&&qi.is(s.end)}e.is=r})(or||(or={}));var Ku;(function(e){function t(n,s){return{uri:n,range:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&(_e.string(s.uri)||_e.undefined(s.uri))}e.is=r})(Ku||(Ku={}));var zS;(function(e){function t(n,s,a,p){return{targetUri:n,targetRange:s,targetSelectionRange:a,originSelectionRange:p}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.targetRange)&&_e.string(s.targetUri)&&or.is(s.targetSelectionRange)&&(or.is(s.originSelectionRange)||_e.undefined(s.originSelectionRange))}e.is=r})(zS||(zS={}));var Py;(function(e){function t(n,s,a,p){return{red:n,green:s,blue:a,alpha:p}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.numberRange(s.red,0,1)&&_e.numberRange(s.green,0,1)&&_e.numberRange(s.blue,0,1)&&_e.numberRange(s.alpha,0,1)}e.is=r})(Py||(Py={}));var GS;(function(e){function t(n,s){return{range:n,color:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&Py.is(s.color)}e.is=r})(GS||(GS={}));var KS;(function(e){function t(n,s,a){return{label:n,textEdit:s,additionalTextEdits:a}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.string(s.label)&&(_e.undefined(s.textEdit)||es.is(s))&&(_e.undefined(s.additionalTextEdits)||_e.typedArray(s.additionalTextEdits,es.is))}e.is=r})(KS||(KS={}));var np;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(np||(np={}));var JS;(function(e){function t(n,s,a,p,d,h){var g={startLine:n,endLine:s};return _e.defined(a)&&(g.startCharacter=a),_e.defined(p)&&(g.endCharacter=p),_e.defined(d)&&(g.kind=d),_e.defined(h)&&(g.collapsedText=h),g}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.uinteger(s.startLine)&&_e.uinteger(s.startLine)&&(_e.undefined(s.startCharacter)||_e.uinteger(s.startCharacter))&&(_e.undefined(s.endCharacter)||_e.uinteger(s.endCharacter))&&(_e.undefined(s.kind)||_e.string(s.kind))}e.is=r})(JS||(JS={}));var Ty;(function(e){function t(n,s){return{location:n,message:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&Ku.is(s.location)&&_e.string(s.message)}e.is=r})(Ty||(Ty={}));var Nt;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Nt||(Nt={}));var YS;(function(e){e.Unnecessary=1,e.Deprecated=2})(YS||(YS={}));var XS;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&_e.string(n.href)}e.is=t})(XS||(XS={}));var No;(function(e){function t(n,s,a,p,d,h){var g={range:n,message:s};return _e.defined(a)&&(g.severity=a),_e.defined(p)&&(g.code=p),_e.defined(d)&&(g.source=d),_e.defined(h)&&(g.relatedInformation=h),g}e.create=t;function r(n){var s,a=n;return _e.defined(a)&&or.is(a.range)&&_e.string(a.message)&&(_e.number(a.severity)||_e.undefined(a.severity))&&(_e.integer(a.code)||_e.string(a.code)||_e.undefined(a.code))&&(_e.undefined(a.codeDescription)||_e.string((s=a.codeDescription)===null||s===void 0?void 0:s.href))&&(_e.string(a.source)||_e.undefined(a.source))&&(_e.undefined(a.relatedInformation)||_e.typedArray(a.relatedInformation,Ty.is))}e.is=r})(No||(No={}));var Ju;(function(e){function t(n,s){for(var a=[],p=2;p<arguments.length;p++)a[p-2]=arguments[p];var d={title:n,command:s};return _e.defined(a)&&a.length>0&&(d.arguments=a),d}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.title)&&_e.string(s.command)}e.is=r})(Ju||(Ju={}));var es;(function(e){function t(a,p){return{range:a,newText:p}}e.replace=t;function r(a,p){return{range:{start:a,end:a},newText:p}}e.insert=r;function n(a){return{range:a,newText:""}}e.del=n;function s(a){var p=a;return _e.objectLiteral(p)&&_e.string(p.newText)&&or.is(p.range)}e.is=s})(es||(es={}));var Yu;(function(e){function t(n,s,a){var p={label:n};return s!==void 0&&(p.needsConfirmation=s),a!==void 0&&(p.description=a),p}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&_e.string(s.label)&&(_e.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(_e.string(s.description)||s.description===void 0)}e.is=r})(Yu||(Yu={}));var $n;(function(e){function t(r){var n=r;return _e.string(n)}e.is=t})($n||($n={}));var Ca;(function(e){function t(a,p,d){return{range:a,newText:p,annotationId:d}}e.replace=t;function r(a,p,d){return{range:{start:a,end:a},newText:p,annotationId:d}}e.insert=r;function n(a,p){return{range:a,newText:"",annotationId:p}}e.del=n;function s(a){var p=a;return es.is(p)&&(Yu.is(p.annotationId)||$n.is(p.annotationId))}e.is=s})(Ca||(Ca={}));var Km;(function(e){function t(n,s){return{textDocument:n,edits:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&Ym.is(s.textDocument)&&Array.isArray(s.edits)}e.is=r})(Km||(Km={}));var ip;(function(e){function t(n,s,a){var p={kind:"create",uri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(p.options=s),a!==void 0&&(p.annotationId=a),p}e.create=t;function r(n){var s=n;return s&&s.kind==="create"&&_e.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(ip||(ip={}));var sp;(function(e){function t(n,s,a,p){var d={kind:"rename",oldUri:n,newUri:s};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(d.options=a),p!==void 0&&(d.annotationId=p),d}e.create=t;function r(n){var s=n;return s&&s.kind==="rename"&&_e.string(s.oldUri)&&_e.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(sp||(sp={}));var op;(function(e){function t(n,s,a){var p={kind:"delete",uri:n};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(p.options=s),a!==void 0&&(p.annotationId=a),p}e.create=t;function r(n){var s=n;return s&&s.kind==="delete"&&_e.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||_e.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||_e.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||$n.is(s.annotationId))}e.is=r})(op||(op={}));var Vy;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(s){return _e.string(s.kind)?ip.is(s)||sp.is(s)||op.is(s):Km.is(s)}))}e.is=t})(Vy||(Vy={}));var Jm=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var s,a;if(n===void 0?s=es.insert(t,r):$n.is(n)?(a=n,s=Ca.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(n),s=Ca.insert(t,r,a)),this.edits.push(s),a!==void 0)return a},e.prototype.replace=function(t,r,n){var s,a;if(n===void 0?s=es.replace(t,r):$n.is(n)?(a=n,s=Ca.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(n),s=Ca.replace(t,r,a)),this.edits.push(s),a!==void 0)return a},e.prototype.delete=function(t,r){var n,s;if(r===void 0?n=es.del(t):$n.is(r)?(s=r,n=Ca.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),n=Ca.del(t,s)),this.edits.push(n),s!==void 0)return s},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),QS=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,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(t,r){var n;if($n.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id ".concat(n," is already in use."));if(r===void 0)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),VG=function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new QS(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Km.is(n)){var s=new Jm(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=s}})):t.changes&&Object.keys(t.changes).forEach(function(n){var s=new Jm(t.changes[n]);r._textEditChanges[n]=s})):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(t){if(Ym.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var s=[],a={textDocument:r,edits:s};this._workspaceEdit.documentChanges.push(a),n=new Jm(s,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var s=[];this._workspaceEdit.changes[t]=s,n=new Jm(s),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new QS,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(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Yu.is(r)||$n.is(r)?s=r:n=r;var a,p;if(s===void 0?a=ip.create(t,n):(p=$n.is(s)?s:this._changeAnnotations.manage(s),a=ip.create(t,n,p)),this._workspaceEdit.documentChanges.push(a),p!==void 0)return p},e.prototype.renameFile=function(t,r,n,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Yu.is(n)||$n.is(n)?a=n:s=n;var p,d;if(a===void 0?p=sp.create(t,r,s):(d=$n.is(a)?a:this._changeAnnotations.manage(a),p=sp.create(t,r,s,d)),this._workspaceEdit.documentChanges.push(p),d!==void 0)return d},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Yu.is(r)||$n.is(r)?s=r:n=r;var a,p;if(s===void 0?a=op.create(t,n):(p=$n.is(s)?s:this._changeAnnotations.manage(s),a=op.create(t,n,p)),this._workspaceEdit.documentChanges.push(a),p!==void 0)return p},e}(),ZS;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)}e.is=r})(ZS||(ZS={}));var qS;(function(e){function t(n,s){return{uri:n,version:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&_e.integer(s.version)}e.is=r})(qS||(qS={}));var Ym;(function(e){function t(n,s){return{uri:n,version:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&(s.version===null||_e.integer(s.version))}e.is=r})(Ym||(Ym={}));var ew;(function(e){function t(n,s,a,p){return{uri:n,languageId:s,version:a,text:p}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.string(s.uri)&&_e.string(s.languageId)&&_e.integer(s.version)&&_e.string(s.text)}e.is=r})(ew||(ew={}));var Tl;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t})(Tl||(Tl={}));var lp;(function(e){function t(r){var n=r;return _e.objectLiteral(r)&&Tl.is(n.kind)&&_e.string(n.value)}e.is=t})(lp||(lp={}));var Ci;(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})(Ci||(Ci={}));var dn;(function(e){e.PlainText=1,e.Snippet=2})(dn||(dn={}));var tw;(function(e){e.Deprecated=1})(tw||(tw={}));var rw;(function(e){function t(n,s,a){return{newText:n,insert:s,replace:a}}e.create=t;function r(n){var s=n;return s&&_e.string(s.newText)&&or.is(s.insert)&&or.is(s.replace)}e.is=r})(rw||(rw={}));var nw;(function(e){e.asIs=1,e.adjustIndentation=2})(nw||(nw={}));var iw;(function(e){function t(r){var n=r;return n&&(_e.string(n.detail)||n.detail===void 0)&&(_e.string(n.description)||n.description===void 0)}e.is=t})(iw||(iw={}));var ky;(function(e){function t(r){return{label:r}}e.create=t})(ky||(ky={}));var sw;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(sw||(sw={}));var Xm;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var s=n;return _e.string(s)||_e.objectLiteral(s)&&_e.string(s.language)&&_e.string(s.value)}e.is=r})(Xm||(Xm={}));var ow;(function(e){function t(r){var n=r;return!!n&&_e.objectLiteral(n)&&(lp.is(n.contents)||Xm.is(n.contents)||_e.typedArray(n.contents,Xm.is))&&(r.range===void 0||or.is(r.range))}e.is=t})(ow||(ow={}));var aw;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(aw||(aw={}));var lw;(function(e){function t(r,n){for(var s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];var p={label:r};return _e.defined(n)&&(p.documentation=n),_e.defined(s)?p.parameters=s:p.parameters=[],p}e.create=t})(lw||(lw={}));var uw;(function(e){e.Text=1,e.Read=2,e.Write=3})(uw||(uw={}));var cw;(function(e){function t(r,n){var s={range:r};return _e.number(n)&&(s.kind=n),s}e.create=t})(cw||(cw={}));var to;(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})(to||(to={}));var fw;(function(e){e.Deprecated=1})(fw||(fw={}));var pw;(function(e){function t(r,n,s,a,p){var d={name:r,kind:n,location:{uri:a,range:s}};return p&&(d.containerName=p),d}e.create=t})(pw||(pw={}));var dw;(function(e){function t(r,n,s,a){return a!==void 0?{name:r,kind:n,location:{uri:s,range:a}}:{name:r,kind:n,location:{uri:s}}}e.create=t})(dw||(dw={}));var hw;(function(e){function t(n,s,a,p,d,h){var g={name:n,detail:s,kind:a,range:p,selectionRange:d};return h!==void 0&&(g.children=h),g}e.create=t;function r(n){var s=n;return s&&_e.string(s.name)&&_e.number(s.kind)&&or.is(s.range)&&or.is(s.selectionRange)&&(s.detail===void 0||_e.string(s.detail))&&(s.deprecated===void 0||_e.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}e.is=r})(hw||(hw={}));var mw;(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"})(mw||(mw={}));var Qm;(function(e){e.Invoked=1,e.Automatic=2})(Qm||(Qm={}));var vw;(function(e){function t(n,s,a){var p={diagnostics:n};return s!=null&&(p.only=s),a!=null&&(p.triggerKind=a),p}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.typedArray(s.diagnostics,No.is)&&(s.only===void 0||_e.typedArray(s.only,_e.string))&&(s.triggerKind===void 0||s.triggerKind===Qm.Invoked||s.triggerKind===Qm.Automatic)}e.is=r})(vw||(vw={}));var gw;(function(e){function t(n,s,a){var p={title:n},d=!0;return typeof s=="string"?(d=!1,p.kind=s):Ju.is(s)?p.command=s:p.edit=s,d&&a!==void 0&&(p.kind=a),p}e.create=t;function r(n){var s=n;return s&&_e.string(s.title)&&(s.diagnostics===void 0||_e.typedArray(s.diagnostics,No.is))&&(s.kind===void 0||_e.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||Ju.is(s.command))&&(s.isPreferred===void 0||_e.boolean(s.isPreferred))&&(s.edit===void 0||Vy.is(s.edit))}e.is=r})(gw||(gw={}));var yw;(function(e){function t(n,s){var a={range:n};return _e.defined(s)&&(a.data=s),a}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(s.range)&&(_e.undefined(s.command)||Ju.is(s.command))}e.is=r})(yw||(yw={}));var bw;(function(e){function t(n,s){return{tabSize:n,insertSpaces:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&_e.uinteger(s.tabSize)&&_e.boolean(s.insertSpaces)}e.is=r})(bw||(bw={}));var xw;(function(e){function t(n,s,a){return{range:n,target:s,data:a}}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(s.range)&&(_e.undefined(s.target)||_e.string(s.target))}e.is=r})(xw||(xw={}));var Zm;(function(e){function t(n,s){return{range:n,parent:s}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&or.is(s.range)&&(s.parent===void 0||e.is(s.parent))}e.is=r})(Zm||(Zm={}));var Sw;(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"})(Sw||(Sw={}));var ww;(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"})(ww||(ww={}));var Ow;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=t})(Ow||(Ow={}));var Ew;(function(e){function t(n,s){return{range:n,text:s}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&_e.string(s.text)}e.is=r})(Ew||(Ew={}));var Aw;(function(e){function t(n,s,a){return{range:n,variableName:s,caseSensitiveLookup:a}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&_e.boolean(s.caseSensitiveLookup)&&(_e.string(s.variableName)||s.variableName===void 0)}e.is=r})(Aw||(Aw={}));var Cw;(function(e){function t(n,s){return{range:n,expression:s}}e.create=t;function r(n){var s=n;return s!=null&&or.is(s.range)&&(_e.string(s.expression)||s.expression===void 0)}e.is=r})(Cw||(Cw={}));var _w;(function(e){function t(n,s){return{frameId:n,stoppedLocation:s}}e.create=t;function r(n){var s=n;return _e.defined(s)&&or.is(n.stoppedLocation)}e.is=r})(_w||(_w={}));var jy;(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}e.is=t})(jy||(jy={}));var Iy;(function(e){function t(n){return{value:n}}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&(s.tooltip===void 0||_e.string(s.tooltip)||lp.is(s.tooltip))&&(s.location===void 0||Ku.is(s.location))&&(s.command===void 0||Ju.is(s.command))}e.is=r})(Iy||(Iy={}));var Pw;(function(e){function t(n,s,a){var p={position:n,label:s};return a!==void 0&&(p.kind=a),p}e.create=t;function r(n){var s=n;return _e.objectLiteral(s)&&qi.is(s.position)&&(_e.string(s.label)||_e.typedArray(s.label,Iy.is))&&(s.kind===void 0||jy.is(s.kind))&&s.textEdits===void 0||_e.typedArray(s.textEdits,es.is)&&(s.tooltip===void 0||_e.string(s.tooltip)||lp.is(s.tooltip))&&(s.paddingLeft===void 0||_e.boolean(s.paddingLeft))&&(s.paddingRight===void 0||_e.boolean(s.paddingRight))}e.is=r})(Pw||(Pw={}));var Tw;(function(e){function t(r){var n=r;return _e.objectLiteral(n)&&_y.is(n.uri)&&_e.string(n.name)}e.is=t})(Tw||(Tw={}));var kG=null,Vw;(function(e){function t(a,p,d,h){return new X3(a,p,d,h)}e.create=t;function r(a){var p=a;return!!(_e.defined(p)&&_e.string(p.uri)&&(_e.undefined(p.languageId)||_e.string(p.languageId))&&_e.uinteger(p.lineCount)&&_e.func(p.getText)&&_e.func(p.positionAt)&&_e.func(p.offsetAt))}e.is=r;function n(a,p){for(var d=a.getText(),h=s(p,function(B,z){var W=B.range.start.line-z.range.start.line;return W===0?B.range.start.character-z.range.start.character:W}),g=d.length,y=h.length-1;y>=0;y--){var C=h[y],M=a.offsetAt(C.range.start),I=a.offsetAt(C.range.end);if(I<=g)d=d.substring(0,M)+C.newText+d.substring(I,d.length);else throw new Error("Overlapping edit");g=M}return d}e.applyEdits=n;function s(a,p){if(a.length<=1)return a;var d=a.length/2|0,h=a.slice(0,d),g=a.slice(d);s(h,p),s(g,p);for(var y=0,C=0,M=0;y<h.length&&C<g.length;){var I=p(h[y],g[C]);I<=0?a[M++]=h[y++]:a[M++]=g[C++]}for(;y<h.length;)a[M++]=h[y++];for(;C<g.length;)a[M++]=g[C++];return a}})(Vw||(Vw={}));var X3=function(){function e(t,r,n,s){this._uri=t,this._languageId=r,this._version=n,this._content=s,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(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,s=0;s<r.length;s++){n&&(t.push(s),n=!1);var a=r.charAt(s);n=a==="\r"||a===`
259
259
  `,a==="\r"&&s+1<r.length&&r.charAt(s+1)===`
260
- `&&s++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,s=r.length;if(s===0)return qi.create(0,t);for(;n<s;){var a=Math.floor((n+s)/2);r[a]>t?s=a:n=a+1}var p=n-1;return qi.create(p,t-r[p])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],s=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,s),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),_e;(function(e){var t=Object.prototype.toString;function r(I){return typeof I!="undefined"}e.defined=r;function n(I){return typeof I=="undefined"}e.undefined=n;function s(I){return I===!0||I===!1}e.boolean=s;function a(I){return t.call(I)==="[object String]"}e.string=a;function p(I){return t.call(I)==="[object Number]"}e.number=p;function d(I,B,z){return t.call(I)==="[object Number]"&&B<=I&&I<=z}e.numberRange=d;function h(I){return t.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=h;function g(I){return t.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function y(I){return t.call(I)==="[object Function]"}e.func=y;function C(I){return I!==null&&typeof I=="object"}e.objectLiteral=C;function M(I,B){return Array.isArray(I)&&I.every(B)}e.typedArray=M})(_e||(_e={}));var Q3=function(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},kw=function(){function e(t,r,n,s){this._uri=t,this._languageId=r,this._version=n,this._content=s,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(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,s=t;n<s.length;n++){var a=s[n];if(e.isIncremental(a)){var p=Iw(a.range),d=this.offsetAt(p.start),h=this.offsetAt(p.end);this._content=this._content.substring(0,d)+a.text+this._content.substring(h,this._content.length);var g=Math.max(p.start.line,0),y=Math.max(p.end.line,0),C=this._lineOffsets,M=jw(a.text,!1,d);if(y-g===M.length)for(var I=0,B=M.length;I<B;I++)C[I+g+1]=M[I];else M.length<1e4?C.splice.apply(C,Q3([g+1,y-g],M,!1)):this._lineOffsets=C=C.slice(0,g+1).concat(M,C.slice(y+1));var z=a.text.length-(h-d);if(z!==0)for(var I=g+1+M.length,B=C.length;I<B;I++)C[I]=C[I]+z}else if(e.isFull(a))this._content=a.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=jw(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,s=r.length;if(s===0)return{line:0,character:t};for(;n<s;){var a=Math.floor((n+s)/2);r[a]>t?s=a:n=a+1}var p=n-1;return{line:p,character:t-r[p]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],s=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,s),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),qm;(function(e){function t(s,a,p,d){return new kw(s,a,p,d)}e.create=t;function r(s,a,p){if(s instanceof kw)return s.update(a,p),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(s,a){for(var p=s.getText(),d=Ry(a.map(Z3),function(B,z){var W=B.range.start.line-z.range.start.line;return W===0?B.range.start.character-z.range.start.character:W}),h=0,g=[],y=0,C=d;y<C.length;y++){var M=C[y],I=s.offsetAt(M.range.start);if(I<h)throw new Error("Overlapping edit");I>h&&g.push(p.substring(h,I)),M.newText.length&&g.push(M.newText),h=s.offsetAt(M.range.end)}return g.push(p.substr(h)),g.join("")}e.applyEdits=n})(qm||(qm={}));function Ry(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),s=e.slice(r);Ry(n,t),Ry(s,t);for(var a=0,p=0,d=0;a<n.length&&p<s.length;){var h=t(n[a],s[p]);h<=0?e[d++]=n[a++]:e[d++]=s[p++]}for(;a<n.length;)e[d++]=n[a++];for(;p<s.length;)e[d++]=s[p++];return e}function jw(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],s=0;s<e.length;s++){var a=e.charCodeAt(s);(a===13||a===10)&&(a===13&&s+1<e.length&&e.charCodeAt(s+1)===10&&s++,n.push(r+s+1))}return n}function Iw(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function Z3(e){var t=Iw(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var tr;(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"})(tr||(tr={}));var Rw;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Tl.Markdown,Tl.PlainText],commitCharactersSupport:!0}}}}})(Rw||(Rw={}));var Vl=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),q3={"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,}))$/}},kl=function(){function e(t,r,n){this.offset=r,this.length=n,this.parent=t}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}(),eN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="null",s.value=null,s}return t}(kl),Fw=function(e){Vl(t,e);function t(r,n,s){var a=e.call(this,r,s)||this;return a.type="boolean",a.value=n,a}return t}(kl),tN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="array",s.items=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(kl),rN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return t}(kl),Mw=function(e){Vl(t,e);function t(r,n,s){var a=e.call(this,r,n,s)||this;return a.type="string",a.value="",a}return t}(kl),nN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="property",s.colonOffset=-1,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(kl),iN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(kl);function fi(e){return eo(e)?e?{}:{not:{}}:e}var Lw;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Lw||(Lw={}));var sN=function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=null),this.focusOffset=t,this.exclude=r,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){var r;(r=this.schemas).push.apply(r,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||Dw(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Fy=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),pi=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(t){for(var r=0,n=t;r<n.length;r++){var s=n[r];this.merge(s)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var r=0,n=this.problems;r<n.length;r++){var s=n[r];s.code===tr.EnumValueMismatch&&(s.message="Value is not accepted. Valid values: "+this.enumValues.map(function(a){return JSON.stringify(a)}).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function oN(e,t){return t===void 0&&(t=[]),new Nw(e,t,[])}function _a(e){return K3(e)}function My(e){return G3(e)}function Dw(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var Nw=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return z3(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var s=t(n),a=n.children;if(Array.isArray(a))for(var p=0;p<a.length&&s;p++)s=r(a[p]);return s};r(this.root)}},e.prototype.validate=function(t,r){if(this.root&&r){var n=new pi;return Vn(this.root,r,n,Fy.instance),n.problems.map(function(s){var a=or.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return No.create(a,s.message,s.severity,s.code)})}return null},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1),n===void 0&&(n=null);var s=new sN(r,n);return this.root&&t&&Vn(this.root,t,new pi,s),s.schemas},e}();function Vn(e,t,r,n){if(!e||!n.include(e))return;switch(e.type){case"object":h(e,t,r,n);break;case"array":d(e,t,r,n);break;case"string":p(e,t,r,n);break;case"number":a(e,t,r,n);break;case"property":return Vn(e.valueNode,t,r,n)}s(),n.add({node:e,schema:t});function s(){function g(Me){return e.type===Me||Me==="integer"&&e.type==="number"&&e.isInteger||t.nullable&&e.value===null}if(Array.isArray(t.type)?t.type.some(g)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:t.errorMessage||"Incorrect type. Expected one of "+t.type.join(", ")+"."}):t.type&&(g(t.type)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:t.errorMessage||'Incorrect type. Expected "'+t.type+'".'})),Array.isArray(t.allOf))for(var y=0,C=t.allOf;y<C.length;y++){var M=C[y];Vn(e,fi(M),r,n)}var I=fi(t.not);if(I){var B=new pi,z=n.newSub();Vn(e,I,B,z),B.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:"Matches a schema that is not allowed."});for(var W=0,G=z.schemas;W<G.length;W++){var te=G[W];te.inverted=!te.inverted,n.add(te)}}var le=function(Me,Qe){for(var wt=[],ft=null,Ar=0,Qr=Me;Ar<Qr.length;Ar++){var Rr=Qr[Ar],Zr=fi(Rr),Pr=new pi,Ht=n.newSub();if(Vn(e,Zr,Pr,Ht),Pr.hasProblems()||wt.push(Zr),!ft)ft={schema:Zr,validationResult:Pr,matchingSchemas:Ht};else if(!Qe&&!Pr.hasProblems()&&!ft.validationResult.hasProblems())ft.matchingSchemas.merge(Ht),ft.validationResult.propertiesMatches+=Pr.propertiesMatches,ft.validationResult.propertiesValueMatches+=Pr.propertiesValueMatches;else{var yr=Pr.compare(ft.validationResult);yr>0?ft={schema:Zr,validationResult:Pr,matchingSchemas:Ht}:yr===0&&(ft.matchingSchemas.merge(Ht),ft.validationResult.mergeEnumValues(Pr))}}return wt.length>1&&Qe&&r.problems.push({location:{offset:e.offset,length:1},severity:Nt.Warning,message:"Matches multiple schemas when only one must validate."}),ft!==null&&(r.merge(ft.validationResult),r.propertiesMatches+=ft.validationResult.propertiesMatches,r.propertiesValueMatches+=ft.validationResult.propertiesValueMatches,n.merge(ft.matchingSchemas)),wt.length};Array.isArray(t.anyOf)&&le(t.anyOf,!1),Array.isArray(t.oneOf)&&le(t.oneOf,!0);var ye=function(Me){var Qe=new pi,wt=n.newSub();Vn(e,fi(Me),Qe,wt),r.merge(Qe),r.propertiesMatches+=Qe.propertiesMatches,r.propertiesValueMatches+=Qe.propertiesValueMatches,n.merge(wt)},he=function(Me,Qe,wt){var ft=fi(Me),Ar=new pi,Qr=n.newSub();Vn(e,ft,Ar,Qr),n.merge(Qr),Ar.hasProblems()?wt&&ye(wt):Qe&&ye(Qe)},Ee=fi(t.if);if(Ee&&he(Ee,fi(t.then),fi(t.else)),Array.isArray(t.enum)){for(var me=_a(e),ve=!1,ce=0,Se=t.enum;ce<Se.length;ce++){var Ce=Se[ce];if(rp(me,Ce)){ve=!0;break}}r.enumValues=t.enum,r.enumValueMatch=ve,ve||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,code:tr.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map(function(Me){return JSON.stringify(Me)}).join(", ")+"."})}if(Do(t.const)){var me=_a(e);rp(me,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,code:tr.EnumValueMismatch,message:t.errorMessage||"Value must be "+JSON.stringify(t.const)+"."}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Nt.Warning,message:t.deprecationMessage})}function a(g,y,C,M){var I=g.value;Ci(y.multipleOf)&&I%y.multipleOf!==0&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is not divisible by "+y.multipleOf+"."});function B(ye,he){if(Ci(he))return he;if(eo(he)&&he)return ye}function z(ye,he){if(!eo(he)||!he)return ye}var W=B(y.minimum,y.exclusiveMinimum);Ci(W)&&I<=W&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is below the exclusive minimum of "+W+"."});var G=B(y.maximum,y.exclusiveMaximum);Ci(G)&&I>=G&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is above the exclusive maximum of "+G+"."});var te=z(y.minimum,y.exclusiveMinimum);Ci(te)&&I<te&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is below the minimum of "+te+"."});var le=z(y.maximum,y.exclusiveMaximum);Ci(le)&&I>le&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is above the maximum of "+le+"."})}function p(g,y,C,M){if(Ci(y.minLength)&&g.value.length<y.minLength&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"String is shorter than the minimum length of "+y.minLength+"."}),Ci(y.maxLength)&&g.value.length>y.maxLength&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"String is longer than the maximum length of "+y.maxLength+"."}),Y3(y.pattern)){var I=new RegExp(y.pattern);I.test(g.value)||C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||'String does not match the pattern of "'+y.pattern+'".'})}if(y.format)switch(y.format){case"uri":case"uri-reference":{var B=void 0;if(!g.value)B="URI expected.";else{var z=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(g.value);z?!z[2]&&y.format==="uri"&&(B="URI with a scheme is expected."):B="URI is expected."}B&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||"String is not a URI: "+B})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var W=q3[y.format];(!g.value||!W.pattern.exec(g.value))&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||W.errorMessage});break;default:}}function d(g,y,C,M){if(Array.isArray(y.items)){for(var I=y.items,B=0;B<I.length;B++){var z=I[B],W=fi(z),G=new pi,te=g.items[B];te?(Vn(te,W,G,M),C.mergePropertyMatch(G)):g.items.length>=I.length&&C.propertiesValueMatches++}if(g.items.length>I.length)if(typeof y.additionalItems=="object")for(var le=I.length;le<g.items.length;le++){var G=new pi;Vn(g.items[le],y.additionalItems,G,M),C.mergePropertyMatch(G)}else y.additionalItems===!1&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too many items according to schema. Expected "+I.length+" or fewer."})}else{var ye=fi(y.items);if(ye)for(var he=0,Ee=g.items;he<Ee.length;he++){var te=Ee[he],G=new pi;Vn(te,ye,G,M),C.mergePropertyMatch(G)}}var me=fi(y.contains);if(me){var ve=g.items.some(function(Ce){var Me=new pi;return Vn(Ce,me,Me,Fy.instance),!Me.hasProblems()});ve||C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.errorMessage||"Array does not contain required item."})}if(Ci(y.minItems)&&g.items.length<y.minItems&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too few items. Expected "+y.minItems+" or more."}),Ci(y.maxItems)&&g.items.length>y.maxItems&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too many items. Expected "+y.maxItems+" or fewer."}),y.uniqueItems===!0){var ce=_a(g),Se=ce.some(function(Ce,Me){return Me!==ce.lastIndexOf(Ce)});Se&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has duplicate items."})}}function h(g,y,C,M){for(var I=Object.create(null),B=[],z=0,W=g.properties;z<W.length;z++){var G=W[z],te=G.keyNode.value;I[te]=G.valueNode,B.push(te)}if(Array.isArray(y.required))for(var le=0,ye=y.required;le<ye.length;le++){var he=ye[le];if(!I[he]){var Ee=g.parent&&g.parent.type==="property"&&g.parent.keyNode,me=Ee?{offset:Ee.offset,length:Ee.length}:{offset:g.offset,length:1};C.problems.push({location:me,severity:Nt.Warning,message:'Missing property "'+he+'".'})}}var ve=function(di){for(var Bo=B.indexOf(di);Bo>=0;)B.splice(Bo,1),Bo=B.indexOf(di)};if(y.properties)for(var ce=0,Se=Object.keys(y.properties);ce<Se.length;ce++){var he=Se[ce];ve(he);var Ce=y.properties[he],Me=I[he];if(Me)if(eo(Ce))if(Ce)C.propertiesMatches++,C.propertiesValueMatches++;else{var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}else{var Qe=new pi;Vn(Me,Ce,Qe,M),C.mergePropertyMatch(Qe)}}if(y.patternProperties)for(var wt=0,ft=Object.keys(y.patternProperties);wt<ft.length;wt++)for(var Ar=ft[wt],Qr=new RegExp(Ar),Rr=0,Zr=B.slice(0);Rr<Zr.length;Rr++){var he=Zr[Rr];if(Qr.test(he)){ve(he);var Me=I[he];if(Me){var Ce=y.patternProperties[Ar];if(eo(Ce))if(Ce)C.propertiesMatches++,C.propertiesValueMatches++;else{var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}else{var Qe=new pi;Vn(Me,Ce,Qe,M),C.mergePropertyMatch(Qe)}}}}if(typeof y.additionalProperties=="object")for(var Pr=0,Ht=B;Pr<Ht.length;Pr++){var he=Ht[Pr],Me=I[he];if(Me){var Qe=new pi;Vn(Me,y.additionalProperties,Qe,M),C.mergePropertyMatch(Qe)}}else if(y.additionalProperties===!1&&B.length>0)for(var yr=0,ar=B;yr<ar.length;yr++){var he=ar[yr],Me=I[he];if(Me){var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}}if(Ci(y.maxProperties)&&g.properties.length>y.maxProperties&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object has more properties than limit of "+y.maxProperties+"."}),Ci(y.minProperties)&&g.properties.length<y.minProperties&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object has fewer properties than the required number of "+y.minProperties}),y.dependencies)for(var Ze=0,dt=Object.keys(y.dependencies);Ze<dt.length;Ze++){var te=dt[Ze],Ut=I[te];if(Ut){var rr=y.dependencies[te];if(Array.isArray(rr))for(var Bt=0,Un=rr;Bt<Un.length;Bt++){var ro=Un[Bt];I[ro]?C.propertiesValueMatches++:C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object is missing property "+ro+" required by property {$key}."})}else{var Ce=fi(rr);if(Ce){var Qe=new pi;Vn(g,Ce,Qe,M),C.mergePropertyMatch(Qe)}}}}var Pi=fi(y.propertyNames);if(Pi)for(var Sn=0,Va=g.properties;Sn<Va.length;Sn++){var jl=Va[Sn],te=jl.keyNode;te&&Vn(te,Pi,C,Fy.instance)}}}function aN(e,t){var r=[],n=-1,s=e.getText(),a=Gu(s,!1),p=t&&t.collectComments?[]:void 0;function d(){for(;;){var Ee=a.scan();switch(C(),Ee){case 12:case 13:Array.isArray(p)&&p.push(or.create(e.positionAt(a.getTokenOffset()),e.positionAt(a.getTokenOffset()+a.getTokenLength())));break;case 15:case 14:break;default:return Ee}}}function h(Ee){return a.getToken()===Ee?(d(),!0):!1}function g(Ee,me,ve,ce,Se){if(Se===void 0&&(Se=Nt.Error),r.length===0||ve!==n){var Ce=or.create(e.positionAt(ve),e.positionAt(ce));r.push(No.create(Ce,Ee,Se,me,e.languageId)),n=ve}}function y(Ee,me,ve,ce,Se){ve===void 0&&(ve=null),ce===void 0&&(ce=[]),Se===void 0&&(Se=[]);var Ce=a.getTokenOffset(),Me=a.getTokenOffset()+a.getTokenLength();if(Ce===Me&&Ce>0){for(Ce--;Ce>0&&/\s/.test(s.charAt(Ce));)Ce--;Me=Ce+1}if(g(Ee,me,Ce,Me),ve&&M(ve,!1),ce.length+Se.length>0)for(var Qe=a.getToken();Qe!==17;){if(ce.indexOf(Qe)!==-1){d();break}else if(Se.indexOf(Qe)!==-1)break;Qe=d()}return ve}function C(){switch(a.getTokenError()){case 4:return y("Invalid unicode sequence in string.",tr.InvalidUnicode),!0;case 5:return y("Invalid escape character in string.",tr.InvalidEscapeCharacter),!0;case 3:return y("Unexpected end of number.",tr.UnexpectedEndOfNumber),!0;case 1:return y("Unexpected end of comment.",tr.UnexpectedEndOfComment),!0;case 2:return y("Unexpected end of string.",tr.UnexpectedEndOfString),!0;case 6:return y("Invalid characters in string. Control characters must be escaped.",tr.InvalidCharacter),!0}return!1}function M(Ee,me){return Ee.length=a.getTokenOffset()+a.getTokenLength()-Ee.offset,me&&d(),Ee}function I(Ee){if(a.getToken()!==3)return null;var me=new tN(Ee,a.getTokenOffset());d();for(var ve=0,ce=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){ce||y("Value expected",tr.ValueExpected);var Se=a.getTokenOffset();if(d(),a.getToken()===4){ce&&g("Trailing comma",tr.TrailingComma,Se,Se+1);continue}}else ce&&y("Expected comma",tr.CommaExpected);var Ce=le(me,ve++);Ce?me.items.push(Ce):y("Value expected",tr.ValueExpected,null,[],[4,5]),ce=!0}return a.getToken()!==4?y("Expected comma or closing bracket",tr.CommaOrCloseBacketExpected,me):M(me,!0)}function B(Ee,me){var ve=new nN(Ee,a.getTokenOffset()),ce=W(ve);if(!ce)if(a.getToken()===16){y("Property keys must be doublequoted",tr.Undefined);var Se=new Mw(ve,a.getTokenOffset(),a.getTokenLength());Se.value=a.getTokenValue(),ce=Se,d()}else return null;ve.keyNode=ce;var Ce=me[ce.value];if(Ce?(g("Duplicate object key",tr.DuplicateKey,ve.keyNode.offset,ve.keyNode.offset+ve.keyNode.length,Nt.Warning),typeof Ce=="object"&&g("DuplicateKeyWarning",tr.DuplicateKey,Ce.keyNode.offset,Ce.keyNode.offset+Ce.keyNode.length,Nt.Warning),me[ce.value]=!0):me[ce.value]=ve,a.getToken()===6)ve.colonOffset=a.getTokenOffset(),d();else if(y("Colon expected",tr.ColonExpected),a.getToken()===10&&e.positionAt(ce.offset+ce.length).line<e.positionAt(a.getTokenOffset()).line)return ve.length=ce.length,ve;var Me=le(ve,ce.value);return Me?(ve.valueNode=Me,ve.length=Me.offset+Me.length-ve.offset,ve):y("Value expected",tr.ValueExpected,ve,[],[2,5])}function z(Ee){if(a.getToken()!==1)return null;var me=new iN(Ee,a.getTokenOffset()),ve=Object.create(null);d();for(var ce=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){ce||y("Property expected",tr.PropertyExpected);var Se=a.getTokenOffset();if(d(),a.getToken()===2){ce&&g("Trailing comma",tr.TrailingComma,Se,Se+1);continue}}else ce&&y("Expected comma",tr.CommaExpected);var Ce=B(me,ve);Ce?me.properties.push(Ce):y("Property expected",tr.PropertyExpected,null,[],[2,5]),ce=!0}return a.getToken()!==2?y("Expected comma or closing brace",tr.CommaOrCloseBraceExpected,me):M(me,!0)}function W(Ee){if(a.getToken()!==10)return null;var me=new Mw(Ee,a.getTokenOffset());return me.value=a.getTokenValue(),M(me,!0)}function G(Ee){if(a.getToken()!==11)return null;var me=new rN(Ee,a.getTokenOffset());if(a.getTokenError()===0){var ve=a.getTokenValue();try{var ce=JSON.parse(ve);if(!Ci(ce))return y("Invalid number format.",tr.Undefined,me);me.value=ce}catch(Se){return y("Invalid number format.",tr.Undefined,me)}me.isInteger=ve.indexOf(".")===-1}return M(me,!0)}function te(Ee){var me;switch(a.getToken()){case 7:return M(new eN(Ee,a.getTokenOffset()),!0);case 8:return M(new Fw(Ee,!0,a.getTokenOffset()),!0);case 9:return M(new Fw(Ee,!1,a.getTokenOffset()),!0);default:return null}}function le(Ee,me){return I(Ee)||z(Ee)||W(Ee)||G(Ee)||te(Ee)}var ye=null,he=d();return he!==17&&(ye=le(null,null),ye?a.getToken()!==17&&y("End of file expected.",tr.Undefined):y("Expected a JSON object, array or literal.",tr.Undefined)),new Nw(ye,r,p)}function Ly(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var s=`[
260
+ `&&s++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,s=r.length;if(s===0)return qi.create(0,t);for(;n<s;){var a=Math.floor((n+s)/2);r[a]>t?s=a:n=a+1}var p=n-1;return qi.create(p,t-r[p])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],s=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,s),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),_e;(function(e){var t=Object.prototype.toString;function r(I){return typeof I!="undefined"}e.defined=r;function n(I){return typeof I=="undefined"}e.undefined=n;function s(I){return I===!0||I===!1}e.boolean=s;function a(I){return t.call(I)==="[object String]"}e.string=a;function p(I){return t.call(I)==="[object Number]"}e.number=p;function d(I,B,z){return t.call(I)==="[object Number]"&&B<=I&&I<=z}e.numberRange=d;function h(I){return t.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=h;function g(I){return t.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function y(I){return t.call(I)==="[object Function]"}e.func=y;function C(I){return I!==null&&typeof I=="object"}e.objectLiteral=C;function M(I,B){return Array.isArray(I)&&I.every(B)}e.typedArray=M})(_e||(_e={}));var Q3=function(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},kw=function(){function e(t,r,n,s){this._uri=t,this._languageId=r,this._version=n,this._content=s,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(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,s=t;n<s.length;n++){var a=s[n];if(e.isIncremental(a)){var p=Iw(a.range),d=this.offsetAt(p.start),h=this.offsetAt(p.end);this._content=this._content.substring(0,d)+a.text+this._content.substring(h,this._content.length);var g=Math.max(p.start.line,0),y=Math.max(p.end.line,0),C=this._lineOffsets,M=jw(a.text,!1,d);if(y-g===M.length)for(var I=0,B=M.length;I<B;I++)C[I+g+1]=M[I];else M.length<1e4?C.splice.apply(C,Q3([g+1,y-g],M,!1)):this._lineOffsets=C=C.slice(0,g+1).concat(M,C.slice(y+1));var z=a.text.length-(h-d);if(z!==0)for(var I=g+1+M.length,B=C.length;I<B;I++)C[I]=C[I]+z}else if(e.isFull(a))this._content=a.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=jw(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,s=r.length;if(s===0)return{line:0,character:t};for(;n<s;){var a=Math.floor((n+s)/2);r[a]>t?s=a:n=a+1}var p=n-1;return{line:p,character:t-r[p]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],s=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,s),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),qm;(function(e){function t(s,a,p,d){return new kw(s,a,p,d)}e.create=t;function r(s,a,p){if(s instanceof kw)return s.update(a,p),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(s,a){for(var p=s.getText(),d=Ry(a.map(Z3),function(B,z){var W=B.range.start.line-z.range.start.line;return W===0?B.range.start.character-z.range.start.character:W}),h=0,g=[],y=0,C=d;y<C.length;y++){var M=C[y],I=s.offsetAt(M.range.start);if(I<h)throw new Error("Overlapping edit");I>h&&g.push(p.substring(h,I)),M.newText.length&&g.push(M.newText),h=s.offsetAt(M.range.end)}return g.push(p.substr(h)),g.join("")}e.applyEdits=n})(qm||(qm={}));function Ry(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),s=e.slice(r);Ry(n,t),Ry(s,t);for(var a=0,p=0,d=0;a<n.length&&p<s.length;){var h=t(n[a],s[p]);h<=0?e[d++]=n[a++]:e[d++]=s[p++]}for(;a<n.length;)e[d++]=n[a++];for(;p<s.length;)e[d++]=s[p++];return e}function jw(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],s=0;s<e.length;s++){var a=e.charCodeAt(s);(a===13||a===10)&&(a===13&&s+1<e.length&&e.charCodeAt(s+1)===10&&s++,n.push(r+s+1))}return n}function Iw(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function Z3(e){var t=Iw(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var tr;(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"})(tr||(tr={}));var Rw;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Tl.Markdown,Tl.PlainText],commitCharactersSupport:!0}}}}})(Rw||(Rw={}));var Vl=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),q3={"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,}))$/}},kl=function(){function e(t,r,n){this.offset=r,this.length=n,this.parent=t}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}(),eN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="null",s.value=null,s}return t}(kl),Fw=function(e){Vl(t,e);function t(r,n,s){var a=e.call(this,r,s)||this;return a.type="boolean",a.value=n,a}return t}(kl),tN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="array",s.items=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(kl),rN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return t}(kl),Mw=function(e){Vl(t,e);function t(r,n,s){var a=e.call(this,r,n,s)||this;return a.type="string",a.value="",a}return t}(kl),nN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="property",s.colonOffset=-1,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(kl),iN=function(e){Vl(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(kl);function ci(e){return eo(e)?e?{}:{not:{}}:e}var Lw;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Lw||(Lw={}));var sN=function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=null),this.focusOffset=t,this.exclude=r,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){var r;(r=this.schemas).push.apply(r,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||Dw(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Fy=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),fi=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(t){for(var r=0,n=t;r<n.length;r++){var s=n[r];this.merge(s)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var r=0,n=this.problems;r<n.length;r++){var s=n[r];s.code===tr.EnumValueMismatch&&(s.message="Value is not accepted. Valid values: "+this.enumValues.map(function(a){return JSON.stringify(a)}).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function oN(e,t){return t===void 0&&(t=[]),new Nw(e,t,[])}function _a(e){return K3(e)}function My(e){return G3(e)}function Dw(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var Nw=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return z3(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var s=t(n),a=n.children;if(Array.isArray(a))for(var p=0;p<a.length&&s;p++)s=r(a[p]);return s};r(this.root)}},e.prototype.validate=function(t,r){if(this.root&&r){var n=new fi;return Vn(this.root,r,n,Fy.instance),n.problems.map(function(s){var a=or.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return No.create(a,s.message,s.severity,s.code)})}return null},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1),n===void 0&&(n=null);var s=new sN(r,n);return this.root&&t&&Vn(this.root,t,new fi,s),s.schemas},e}();function Vn(e,t,r,n){if(!e||!n.include(e))return;switch(e.type){case"object":h(e,t,r,n);break;case"array":d(e,t,r,n);break;case"string":p(e,t,r,n);break;case"number":a(e,t,r,n);break;case"property":return Vn(e.valueNode,t,r,n)}s(),n.add({node:e,schema:t});function s(){function g(Me){return e.type===Me||Me==="integer"&&e.type==="number"&&e.isInteger||t.nullable&&e.value===null}if(Array.isArray(t.type)?t.type.some(g)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:t.errorMessage||"Incorrect type. Expected one of "+t.type.join(", ")+"."}):t.type&&(g(t.type)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:t.errorMessage||'Incorrect type. Expected "'+t.type+'".'})),Array.isArray(t.allOf))for(var y=0,C=t.allOf;y<C.length;y++){var M=C[y];Vn(e,ci(M),r,n)}var I=ci(t.not);if(I){var B=new fi,z=n.newSub();Vn(e,I,B,z),B.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,message:"Matches a schema that is not allowed."});for(var W=0,G=z.schemas;W<G.length;W++){var te=G[W];te.inverted=!te.inverted,n.add(te)}}var le=function(Me,Qe){for(var wt=[],ft=null,Ar=0,Qr=Me;Ar<Qr.length;Ar++){var Rr=Qr[Ar],Zr=ci(Rr),Pr=new fi,Ht=n.newSub();if(Vn(e,Zr,Pr,Ht),Pr.hasProblems()||wt.push(Zr),!ft)ft={schema:Zr,validationResult:Pr,matchingSchemas:Ht};else if(!Qe&&!Pr.hasProblems()&&!ft.validationResult.hasProblems())ft.matchingSchemas.merge(Ht),ft.validationResult.propertiesMatches+=Pr.propertiesMatches,ft.validationResult.propertiesValueMatches+=Pr.propertiesValueMatches;else{var yr=Pr.compare(ft.validationResult);yr>0?ft={schema:Zr,validationResult:Pr,matchingSchemas:Ht}:yr===0&&(ft.matchingSchemas.merge(Ht),ft.validationResult.mergeEnumValues(Pr))}}return wt.length>1&&Qe&&r.problems.push({location:{offset:e.offset,length:1},severity:Nt.Warning,message:"Matches multiple schemas when only one must validate."}),ft!==null&&(r.merge(ft.validationResult),r.propertiesMatches+=ft.validationResult.propertiesMatches,r.propertiesValueMatches+=ft.validationResult.propertiesValueMatches,n.merge(ft.matchingSchemas)),wt.length};Array.isArray(t.anyOf)&&le(t.anyOf,!1),Array.isArray(t.oneOf)&&le(t.oneOf,!0);var ye=function(Me){var Qe=new fi,wt=n.newSub();Vn(e,ci(Me),Qe,wt),r.merge(Qe),r.propertiesMatches+=Qe.propertiesMatches,r.propertiesValueMatches+=Qe.propertiesValueMatches,n.merge(wt)},he=function(Me,Qe,wt){var ft=ci(Me),Ar=new fi,Qr=n.newSub();Vn(e,ft,Ar,Qr),n.merge(Qr),Ar.hasProblems()?wt&&ye(wt):Qe&&ye(Qe)},Ee=ci(t.if);if(Ee&&he(Ee,ci(t.then),ci(t.else)),Array.isArray(t.enum)){for(var me=_a(e),ve=!1,ce=0,Se=t.enum;ce<Se.length;ce++){var Ce=Se[ce];if(rp(me,Ce)){ve=!0;break}}r.enumValues=t.enum,r.enumValueMatch=ve,ve||r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,code:tr.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map(function(Me){return JSON.stringify(Me)}).join(", ")+"."})}if(Do(t.const)){var me=_a(e);rp(me,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:e.offset,length:e.length},severity:Nt.Warning,code:tr.EnumValueMismatch,message:t.errorMessage||"Value must be "+JSON.stringify(t.const)+"."}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Nt.Warning,message:t.deprecationMessage})}function a(g,y,C,M){var I=g.value;Ai(y.multipleOf)&&I%y.multipleOf!==0&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is not divisible by "+y.multipleOf+"."});function B(ye,he){if(Ai(he))return he;if(eo(he)&&he)return ye}function z(ye,he){if(!eo(he)||!he)return ye}var W=B(y.minimum,y.exclusiveMinimum);Ai(W)&&I<=W&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is below the exclusive minimum of "+W+"."});var G=B(y.maximum,y.exclusiveMaximum);Ai(G)&&I>=G&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is above the exclusive maximum of "+G+"."});var te=z(y.minimum,y.exclusiveMinimum);Ai(te)&&I<te&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is below the minimum of "+te+"."});var le=z(y.maximum,y.exclusiveMaximum);Ai(le)&&I>le&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Value is above the maximum of "+le+"."})}function p(g,y,C,M){if(Ai(y.minLength)&&g.value.length<y.minLength&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"String is shorter than the minimum length of "+y.minLength+"."}),Ai(y.maxLength)&&g.value.length>y.maxLength&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"String is longer than the maximum length of "+y.maxLength+"."}),Y3(y.pattern)){var I=new RegExp(y.pattern);I.test(g.value)||C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||'String does not match the pattern of "'+y.pattern+'".'})}if(y.format)switch(y.format){case"uri":case"uri-reference":{var B=void 0;if(!g.value)B="URI expected.";else{var z=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(g.value);z?!z[2]&&y.format==="uri"&&(B="URI with a scheme is expected."):B="URI is expected."}B&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||"String is not a URI: "+B})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var W=q3[y.format];(!g.value||!W.pattern.exec(g.value))&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.patternErrorMessage||y.errorMessage||W.errorMessage});break;default:}}function d(g,y,C,M){if(Array.isArray(y.items)){for(var I=y.items,B=0;B<I.length;B++){var z=I[B],W=ci(z),G=new fi,te=g.items[B];te?(Vn(te,W,G,M),C.mergePropertyMatch(G)):g.items.length>=I.length&&C.propertiesValueMatches++}if(g.items.length>I.length)if(typeof y.additionalItems=="object")for(var le=I.length;le<g.items.length;le++){var G=new fi;Vn(g.items[le],y.additionalItems,G,M),C.mergePropertyMatch(G)}else y.additionalItems===!1&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too many items according to schema. Expected "+I.length+" or fewer."})}else{var ye=ci(y.items);if(ye)for(var he=0,Ee=g.items;he<Ee.length;he++){var te=Ee[he],G=new fi;Vn(te,ye,G,M),C.mergePropertyMatch(G)}}var me=ci(y.contains);if(me){var ve=g.items.some(function(Ce){var Me=new fi;return Vn(Ce,me,Me,Fy.instance),!Me.hasProblems()});ve||C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:y.errorMessage||"Array does not contain required item."})}if(Ai(y.minItems)&&g.items.length<y.minItems&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too few items. Expected "+y.minItems+" or more."}),Ai(y.maxItems)&&g.items.length>y.maxItems&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has too many items. Expected "+y.maxItems+" or fewer."}),y.uniqueItems===!0){var ce=_a(g),Se=ce.some(function(Ce,Me){return Me!==ce.lastIndexOf(Ce)});Se&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Array has duplicate items."})}}function h(g,y,C,M){for(var I=Object.create(null),B=[],z=0,W=g.properties;z<W.length;z++){var G=W[z],te=G.keyNode.value;I[te]=G.valueNode,B.push(te)}if(Array.isArray(y.required))for(var le=0,ye=y.required;le<ye.length;le++){var he=ye[le];if(!I[he]){var Ee=g.parent&&g.parent.type==="property"&&g.parent.keyNode,me=Ee?{offset:Ee.offset,length:Ee.length}:{offset:g.offset,length:1};C.problems.push({location:me,severity:Nt.Warning,message:'Missing property "'+he+'".'})}}var ve=function(pi){for(var Bo=B.indexOf(pi);Bo>=0;)B.splice(Bo,1),Bo=B.indexOf(pi)};if(y.properties)for(var ce=0,Se=Object.keys(y.properties);ce<Se.length;ce++){var he=Se[ce];ve(he);var Ce=y.properties[he],Me=I[he];if(Me)if(eo(Ce))if(Ce)C.propertiesMatches++,C.propertiesValueMatches++;else{var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}else{var Qe=new fi;Vn(Me,Ce,Qe,M),C.mergePropertyMatch(Qe)}}if(y.patternProperties)for(var wt=0,ft=Object.keys(y.patternProperties);wt<ft.length;wt++)for(var Ar=ft[wt],Qr=new RegExp(Ar),Rr=0,Zr=B.slice(0);Rr<Zr.length;Rr++){var he=Zr[Rr];if(Qr.test(he)){ve(he);var Me=I[he];if(Me){var Ce=y.patternProperties[Ar];if(eo(Ce))if(Ce)C.propertiesMatches++,C.propertiesValueMatches++;else{var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}else{var Qe=new fi;Vn(Me,Ce,Qe,M),C.mergePropertyMatch(Qe)}}}}if(typeof y.additionalProperties=="object")for(var Pr=0,Ht=B;Pr<Ht.length;Pr++){var he=Ht[Pr],Me=I[he];if(Me){var Qe=new fi;Vn(Me,y.additionalProperties,Qe,M),C.mergePropertyMatch(Qe)}}else if(y.additionalProperties===!1&&B.length>0)for(var yr=0,ar=B;yr<ar.length;yr++){var he=ar[yr],Me=I[he];if(Me){var G=Me.parent;C.problems.push({location:{offset:G.keyNode.offset,length:G.keyNode.length},severity:Nt.Warning,message:y.errorMessage||"Property "+he+" is not allowed."})}}if(Ai(y.maxProperties)&&g.properties.length>y.maxProperties&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object has more properties than limit of "+y.maxProperties+"."}),Ai(y.minProperties)&&g.properties.length<y.minProperties&&C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object has fewer properties than the required number of "+y.minProperties}),y.dependencies)for(var Ze=0,dt=Object.keys(y.dependencies);Ze<dt.length;Ze++){var te=dt[Ze],Ut=I[te];if(Ut){var rr=y.dependencies[te];if(Array.isArray(rr))for(var Bt=0,Un=rr;Bt<Un.length;Bt++){var ro=Un[Bt];I[ro]?C.propertiesValueMatches++:C.problems.push({location:{offset:g.offset,length:g.length},severity:Nt.Warning,message:"Object is missing property "+ro+" required by property {$key}."})}else{var Ce=ci(rr);if(Ce){var Qe=new fi;Vn(g,Ce,Qe,M),C.mergePropertyMatch(Qe)}}}}var _i=ci(y.propertyNames);if(_i)for(var Sn=0,Va=g.properties;Sn<Va.length;Sn++){var jl=Va[Sn],te=jl.keyNode;te&&Vn(te,_i,C,Fy.instance)}}}function aN(e,t){var r=[],n=-1,s=e.getText(),a=Gu(s,!1),p=t&&t.collectComments?[]:void 0;function d(){for(;;){var Ee=a.scan();switch(C(),Ee){case 12:case 13:Array.isArray(p)&&p.push(or.create(e.positionAt(a.getTokenOffset()),e.positionAt(a.getTokenOffset()+a.getTokenLength())));break;case 15:case 14:break;default:return Ee}}}function h(Ee){return a.getToken()===Ee?(d(),!0):!1}function g(Ee,me,ve,ce,Se){if(Se===void 0&&(Se=Nt.Error),r.length===0||ve!==n){var Ce=or.create(e.positionAt(ve),e.positionAt(ce));r.push(No.create(Ce,Ee,Se,me,e.languageId)),n=ve}}function y(Ee,me,ve,ce,Se){ve===void 0&&(ve=null),ce===void 0&&(ce=[]),Se===void 0&&(Se=[]);var Ce=a.getTokenOffset(),Me=a.getTokenOffset()+a.getTokenLength();if(Ce===Me&&Ce>0){for(Ce--;Ce>0&&/\s/.test(s.charAt(Ce));)Ce--;Me=Ce+1}if(g(Ee,me,Ce,Me),ve&&M(ve,!1),ce.length+Se.length>0)for(var Qe=a.getToken();Qe!==17;){if(ce.indexOf(Qe)!==-1){d();break}else if(Se.indexOf(Qe)!==-1)break;Qe=d()}return ve}function C(){switch(a.getTokenError()){case 4:return y("Invalid unicode sequence in string.",tr.InvalidUnicode),!0;case 5:return y("Invalid escape character in string.",tr.InvalidEscapeCharacter),!0;case 3:return y("Unexpected end of number.",tr.UnexpectedEndOfNumber),!0;case 1:return y("Unexpected end of comment.",tr.UnexpectedEndOfComment),!0;case 2:return y("Unexpected end of string.",tr.UnexpectedEndOfString),!0;case 6:return y("Invalid characters in string. Control characters must be escaped.",tr.InvalidCharacter),!0}return!1}function M(Ee,me){return Ee.length=a.getTokenOffset()+a.getTokenLength()-Ee.offset,me&&d(),Ee}function I(Ee){if(a.getToken()!==3)return null;var me=new tN(Ee,a.getTokenOffset());d();for(var ve=0,ce=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){ce||y("Value expected",tr.ValueExpected);var Se=a.getTokenOffset();if(d(),a.getToken()===4){ce&&g("Trailing comma",tr.TrailingComma,Se,Se+1);continue}}else ce&&y("Expected comma",tr.CommaExpected);var Ce=le(me,ve++);Ce?me.items.push(Ce):y("Value expected",tr.ValueExpected,null,[],[4,5]),ce=!0}return a.getToken()!==4?y("Expected comma or closing bracket",tr.CommaOrCloseBacketExpected,me):M(me,!0)}function B(Ee,me){var ve=new nN(Ee,a.getTokenOffset()),ce=W(ve);if(!ce)if(a.getToken()===16){y("Property keys must be doublequoted",tr.Undefined);var Se=new Mw(ve,a.getTokenOffset(),a.getTokenLength());Se.value=a.getTokenValue(),ce=Se,d()}else return null;ve.keyNode=ce;var Ce=me[ce.value];if(Ce?(g("Duplicate object key",tr.DuplicateKey,ve.keyNode.offset,ve.keyNode.offset+ve.keyNode.length,Nt.Warning),typeof Ce=="object"&&g("DuplicateKeyWarning",tr.DuplicateKey,Ce.keyNode.offset,Ce.keyNode.offset+Ce.keyNode.length,Nt.Warning),me[ce.value]=!0):me[ce.value]=ve,a.getToken()===6)ve.colonOffset=a.getTokenOffset(),d();else if(y("Colon expected",tr.ColonExpected),a.getToken()===10&&e.positionAt(ce.offset+ce.length).line<e.positionAt(a.getTokenOffset()).line)return ve.length=ce.length,ve;var Me=le(ve,ce.value);return Me?(ve.valueNode=Me,ve.length=Me.offset+Me.length-ve.offset,ve):y("Value expected",tr.ValueExpected,ve,[],[2,5])}function z(Ee){if(a.getToken()!==1)return null;var me=new iN(Ee,a.getTokenOffset()),ve=Object.create(null);d();for(var ce=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){ce||y("Property expected",tr.PropertyExpected);var Se=a.getTokenOffset();if(d(),a.getToken()===2){ce&&g("Trailing comma",tr.TrailingComma,Se,Se+1);continue}}else ce&&y("Expected comma",tr.CommaExpected);var Ce=B(me,ve);Ce?me.properties.push(Ce):y("Property expected",tr.PropertyExpected,null,[],[2,5]),ce=!0}return a.getToken()!==2?y("Expected comma or closing brace",tr.CommaOrCloseBraceExpected,me):M(me,!0)}function W(Ee){if(a.getToken()!==10)return null;var me=new Mw(Ee,a.getTokenOffset());return me.value=a.getTokenValue(),M(me,!0)}function G(Ee){if(a.getToken()!==11)return null;var me=new rN(Ee,a.getTokenOffset());if(a.getTokenError()===0){var ve=a.getTokenValue();try{var ce=JSON.parse(ve);if(!Ai(ce))return y("Invalid number format.",tr.Undefined,me);me.value=ce}catch(Se){return y("Invalid number format.",tr.Undefined,me)}me.isInteger=ve.indexOf(".")===-1}return M(me,!0)}function te(Ee){var me;switch(a.getToken()){case 7:return M(new eN(Ee,a.getTokenOffset()),!0);case 8:return M(new Fw(Ee,!0,a.getTokenOffset()),!0);case 9:return M(new Fw(Ee,!1,a.getTokenOffset()),!0);default:return null}}function le(Ee,me){return I(Ee)||z(Ee)||W(Ee)||G(Ee)||te(Ee)}var ye=null,he=d();return he!==17&&(ye=le(null,null),ye?a.getToken()!==17&&y("End of file expected.",tr.Undefined):y("Expected a JSON object, array or literal.",tr.Undefined)),new Nw(ye,r,p)}function Ly(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var s=`[
261
261
  `,a=0;a<e.length;a++)s+=n+Ly(e[a],n,r),a<e.length-1&&(s+=","),s+=`
262
262
  `;return s+=t+"]",s}else{var p=Object.keys(e);if(p.length===0)return"{}";for(var s=`{
263
263
  `,a=0;a<p.length;a++){var d=p[a];s+=n+JSON.stringify(d)+": "+Ly(e[d],n,r),a<p.length-1&&(s+=","),s+=`
264
- `}return s+=t+"}",s}}return r(e)}function lN(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function Dy(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function uN(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function jG(e,t){for(var r="";t>0;)(t&1)===1&&(r+=e),e+=e,t=t>>>1;return r}var cN=[",","}","]"],fN=[":"],pN=function(){function e(t,r,n,s){r===void 0&&(r=[]),n===void 0&&(n=Promise),s===void 0&&(s={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=s,this.templateVarIdCounter=0}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--)if(this.contributions[r].resolveCompletion){var n=this.contributions[r].resolveCompletion(t);if(n)return n}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var s=this,a={items:[],isIncomplete:!1},p=t.getText(),d=t.offsetAt(r),h=n.getNodeFromOffset(d,!0);if(this.isInComment(t,h?h.offset:0,d))return Promise.resolve(a);if(h&&d===h.offset+h.length&&d>0){var g=p[d-1];(h.type==="object"&&g==="}"||h.type==="array"&&g==="]")&&(h=h.parent)}var y=this.getCurrentWord(t,d),C=null;if(h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null"))C=or.create(t.positionAt(h.offset),t.positionAt(h.offset+h.length));else{var M=d-y.length;M>0&&p[M-1]==='"'&&M--,C=or.create(t.positionAt(M),r)}var I=this.doesSupportsCommitCharacters(),B={},z={add:function(W){var G=B[W.label];G?G.documentation||(G.documentation=W.documentation):(B[W.label]=W,C&&(W.textEdit=es.replace(C,W.insertText)),I&&(W.commitCharacters=W.kind===_i.Property?fN:cN),a.items.push(W))},setAsIncomplete:function(){a.isIncomplete=!0},error:function(W){console.error(W)},log:function(W){console.log(W)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(W){var G=[],te=!0,le="",ye=null;if(h&&h.type==="string"){var he=h.parent;he&&he.type==="property"&&he.keyNode===h&&(te=!he.valueNode,ye=he,le=p.substr(h.offset+1,h.length-2),he&&(h=he.parent))}if(h&&h.type==="object"){if(h.offset===d)return a;var Ee=h.properties;Ee.forEach(function(Se){(!ye||ye!==Se)&&(B[Se.keyNode.value]=ky.create("__"))});var me="";te&&(me=s.evaluateSeparatorAfter(t,t.offsetAt(C.end))),W?s.getPropertyCompletions(W,n,h,te,me,z):s.getSchemaLessPropertyCompletions(n,h,le,z);var ve=My(h);s.contributions.forEach(function(Se){var Ce=Se.collectPropertyCompletions(t.uri,ve,y,te,me==="",z);Ce&&G.push(Ce)}),!W&&y.length>0&&p.charAt(d-y.length-1)!=='"'&&(z.add({kind:_i.Property,label:s.getLabelForValue(y),insertText:s.getInsertTextForProperty(y,null,!1,me),insertTextFormat:dn.Snippet,documentation:""}),z.setAsIncomplete())}var ce={};return W?s.getValueCompletions(W,n,h,d,t,z,ce):s.getSchemaLessValueCompletions(n,h,d,t,z),s.contributions.length>0&&s.getContributedValueCompletions(n,h,d,t,z,G),s.promiseConstructor.all(G).then(function(){if(z.getNumberOfProposals()===0){var Se=d;h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null")&&(Se=h.offset+h.length);var Ce=s.evaluateSeparatorAfter(t,Se);s.addFillerValueCompletions(ce,Ce,z)}return a})})},e.prototype.getPropertyCompletions=function(t,r,n,s,a,p){var d=this,h=r.getMatchingSchemas(t.schema,n.offset);h.forEach(function(g){if(g.node===n&&!g.inverted){var y=g.schema.properties;y&&Object.keys(y).forEach(function(C){var M=y[C],I=!1;if(typeof M=="object"&&M.allOf)for(var B=0,z=M.allOf;B<z.length;B++){var W=z[B];if(W.readOnly){I=!0;break}}if(typeof M=="object"&&!M.deprecationMessage&&!M.doNotSuggest&&!I){var G={kind:_i.Property,label:d.sanitizeLabel(C),insertText:d.getInsertTextForProperty(C,M,s,a),insertTextFormat:dn.Snippet,filterText:d.getFilterTextForValue(C),documentation:d.fromMarkup(M.markdownDescription)||M.description||""};Dy(G.insertText,"$1"+a)&&(G.command={title:"Suggest",command:"editor.action.triggerSuggest"}),p.add(G)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,s){var a=this,p=function(h){h.properties.forEach(function(g){var y=g.keyNode.value;s.add({kind:_i.Property,label:a.sanitizeLabel(y),insertText:a.getInsertTextForValue(y,""),insertTextFormat:dn.Snippet,filterText:a.getFilterTextForValue(y),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var d=r.parent.keyNode.value;t.visit(function(h){return h.type==="property"&&h!==r.parent&&h.keyNode.value===d&&h.valueNode&&h.valueNode.type==="object"&&p(h.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(h){h.type==="object"&&h!==r&&p(h)});else r.type==="object"&&s.add({kind:_i.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:dn.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,s,a){var p=this,d=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(d=r.offset+r.length,r=r.parent),!r){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:dn.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:dn.Snippet,documentation:""});return}var h=this.evaluateSeparatorAfter(s,d),g=function(I){Dw(I.parent,n,!0)||a.add({kind:p.getSuggestionKind(I.type),label:p.getLabelTextForMatchingNode(I,s),insertText:p.getInsertTextForMatchingNode(I,s,h),insertTextFormat:dn.Snippet,documentation:""}),I.type==="boolean"&&p.addBooleanValueCompletion(!I.value,h,a)};if(r.type==="property"&&n>r.colonOffset){var y=r.valueNode;if(y&&(n>y.offset+y.length||y.type==="object"||y.type==="array"))return;var C=r.keyNode.value;t.visit(function(I){return I.type==="property"&&I.keyNode.value===C&&I.valueNode&&g(I.valueNode),!0}),C==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(h,a)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var M=r.parent.keyNode.value;t.visit(function(I){return I.type==="property"&&I.keyNode.value===M&&I.valueNode&&I.valueNode.type==="array"&&I.valueNode.items.forEach(g),!0})}else r.items.forEach(g)},e.prototype.getValueCompletions=function(t,r,n,s,a,p,d){var h=this,g=s,y=null,C=null;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(g=n.offset+n.length,C=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",p,d);return}if(n.type==="property"&&s>n.colonOffset){var M=n.valueNode;if(M&&s>M.offset+M.length)return;y=n.keyNode.value,n=n.parent}if(n&&(y!==null||n.type==="array")){var I=this.evaluateSeparatorAfter(a,g),B=r.getMatchingSchemas(t.schema,n.offset,C);B.forEach(function(z){if(z.node===n&&!z.inverted&&z.schema){if(n.type==="array"&&z.schema.items)if(Array.isArray(z.schema.items)){var W=h.findItemAtOffset(n,a,s);W<z.schema.items.length&&h.addSchemaValueCompletions(z.schema.items[W],I,p,d)}else h.addSchemaValueCompletions(z.schema.items,I,p,d);if(z.schema.properties){var G=z.schema.properties[y];G&&h.addSchemaValueCompletions(G,I,p,d)}}}),y==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(I,p),d.boolean&&(this.addBooleanValueCompletion(!0,I,p),this.addBooleanValueCompletion(!1,I,p)),d.null&&this.addNullValueCompletion(I,p)}},e.prototype.getContributedValueCompletions=function(t,r,n,s,a,p){if(!r)this.contributions.forEach(function(y){var C=y.collectDefaultCompletions(s.uri,a);C&&p.push(C)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r.type==="property"&&n>r.colonOffset){var d=r.keyNode.value,h=r.valueNode;if(!h||n<=h.offset+h.length){var g=My(r.parent);this.contributions.forEach(function(y){var C=y.collectValueCompletions(s.uri,g,d,a);C&&p.push(C)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,s){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,s),Array.isArray(t.allOf)&&t.allOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,s){var a=this;s===void 0&&(s=0);var p=!1;if(Do(t.default)){for(var d=t.type,h=t.default,g=s;g>0;g--)h=[h],d="array";n.add({kind:this.getSuggestionKind(d),label:this.getLabelForValue(h),insertText:this.getInsertTextForValue(h,r),insertTextFormat:dn.Snippet}),p=!0}Array.isArray(t.examples)&&t.examples.forEach(function(y){for(var C=t.type,M=y,I=s;I>0;I--)M=[M],C="array";n.add({kind:a.getSuggestionKind(C),label:a.getLabelForValue(M),insertText:a.getInsertTextForValue(M,r),insertTextFormat:dn.Snippet}),p=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(y){var C=t.type,M=y.body,I=y.label,B,z;if(Do(M)){for(var W=t.type,G=s;G>0;G--)M=[M],W="array";B=a.getInsertTextForSnippetValue(M,r),z=a.getFilterTextForSnippetValue(M),I=I||a.getLabelForSnippetValue(M)}else if(typeof y.bodyText=="string"){for(var te="",le="",ye="",G=s;G>0;G--)te=te+ye+`[
264
+ `}return s+=t+"}",s}}return r(e)}function lN(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function Dy(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function uN(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function jG(e,t){for(var r="";t>0;)(t&1)===1&&(r+=e),e+=e,t=t>>>1;return r}var cN=[",","}","]"],fN=[":"],pN=function(){function e(t,r,n,s){r===void 0&&(r=[]),n===void 0&&(n=Promise),s===void 0&&(s={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=s,this.templateVarIdCounter=0}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--)if(this.contributions[r].resolveCompletion){var n=this.contributions[r].resolveCompletion(t);if(n)return n}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var s=this,a={items:[],isIncomplete:!1},p=t.getText(),d=t.offsetAt(r),h=n.getNodeFromOffset(d,!0);if(this.isInComment(t,h?h.offset:0,d))return Promise.resolve(a);if(h&&d===h.offset+h.length&&d>0){var g=p[d-1];(h.type==="object"&&g==="}"||h.type==="array"&&g==="]")&&(h=h.parent)}var y=this.getCurrentWord(t,d),C=null;if(h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null"))C=or.create(t.positionAt(h.offset),t.positionAt(h.offset+h.length));else{var M=d-y.length;M>0&&p[M-1]==='"'&&M--,C=or.create(t.positionAt(M),r)}var I=this.doesSupportsCommitCharacters(),B={},z={add:function(W){var G=B[W.label];G?G.documentation||(G.documentation=W.documentation):(B[W.label]=W,C&&(W.textEdit=es.replace(C,W.insertText)),I&&(W.commitCharacters=W.kind===Ci.Property?fN:cN),a.items.push(W))},setAsIncomplete:function(){a.isIncomplete=!0},error:function(W){console.error(W)},log:function(W){console.log(W)},getNumberOfProposals:function(){return a.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(W){var G=[],te=!0,le="",ye=null;if(h&&h.type==="string"){var he=h.parent;he&&he.type==="property"&&he.keyNode===h&&(te=!he.valueNode,ye=he,le=p.substr(h.offset+1,h.length-2),he&&(h=he.parent))}if(h&&h.type==="object"){if(h.offset===d)return a;var Ee=h.properties;Ee.forEach(function(Se){(!ye||ye!==Se)&&(B[Se.keyNode.value]=ky.create("__"))});var me="";te&&(me=s.evaluateSeparatorAfter(t,t.offsetAt(C.end))),W?s.getPropertyCompletions(W,n,h,te,me,z):s.getSchemaLessPropertyCompletions(n,h,le,z);var ve=My(h);s.contributions.forEach(function(Se){var Ce=Se.collectPropertyCompletions(t.uri,ve,y,te,me==="",z);Ce&&G.push(Ce)}),!W&&y.length>0&&p.charAt(d-y.length-1)!=='"'&&(z.add({kind:Ci.Property,label:s.getLabelForValue(y),insertText:s.getInsertTextForProperty(y,null,!1,me),insertTextFormat:dn.Snippet,documentation:""}),z.setAsIncomplete())}var ce={};return W?s.getValueCompletions(W,n,h,d,t,z,ce):s.getSchemaLessValueCompletions(n,h,d,t,z),s.contributions.length>0&&s.getContributedValueCompletions(n,h,d,t,z,G),s.promiseConstructor.all(G).then(function(){if(z.getNumberOfProposals()===0){var Se=d;h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null")&&(Se=h.offset+h.length);var Ce=s.evaluateSeparatorAfter(t,Se);s.addFillerValueCompletions(ce,Ce,z)}return a})})},e.prototype.getPropertyCompletions=function(t,r,n,s,a,p){var d=this,h=r.getMatchingSchemas(t.schema,n.offset);h.forEach(function(g){if(g.node===n&&!g.inverted){var y=g.schema.properties;y&&Object.keys(y).forEach(function(C){var M=y[C],I=!1;if(typeof M=="object"&&M.allOf)for(var B=0,z=M.allOf;B<z.length;B++){var W=z[B];if(W.readOnly){I=!0;break}}if(typeof M=="object"&&!M.deprecationMessage&&!M.doNotSuggest&&!I){var G={kind:Ci.Property,label:d.sanitizeLabel(C),insertText:d.getInsertTextForProperty(C,M,s,a),insertTextFormat:dn.Snippet,filterText:d.getFilterTextForValue(C),documentation:d.fromMarkup(M.markdownDescription)||M.description||""};Dy(G.insertText,"$1"+a)&&(G.command={title:"Suggest",command:"editor.action.triggerSuggest"}),p.add(G)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,s){var a=this,p=function(h){h.properties.forEach(function(g){var y=g.keyNode.value;s.add({kind:Ci.Property,label:a.sanitizeLabel(y),insertText:a.getInsertTextForValue(y,""),insertTextFormat:dn.Snippet,filterText:a.getFilterTextForValue(y),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var d=r.parent.keyNode.value;t.visit(function(h){return h.type==="property"&&h!==r.parent&&h.keyNode.value===d&&h.valueNode&&h.valueNode.type==="object"&&p(h.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(h){h.type==="object"&&h!==r&&p(h)});else r.type==="object"&&s.add({kind:Ci.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:dn.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,s,a){var p=this,d=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(d=r.offset+r.length,r=r.parent),!r){a.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:dn.Snippet,documentation:""}),a.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:dn.Snippet,documentation:""});return}var h=this.evaluateSeparatorAfter(s,d),g=function(I){Dw(I.parent,n,!0)||a.add({kind:p.getSuggestionKind(I.type),label:p.getLabelTextForMatchingNode(I,s),insertText:p.getInsertTextForMatchingNode(I,s,h),insertTextFormat:dn.Snippet,documentation:""}),I.type==="boolean"&&p.addBooleanValueCompletion(!I.value,h,a)};if(r.type==="property"&&n>r.colonOffset){var y=r.valueNode;if(y&&(n>y.offset+y.length||y.type==="object"||y.type==="array"))return;var C=r.keyNode.value;t.visit(function(I){return I.type==="property"&&I.keyNode.value===C&&I.valueNode&&g(I.valueNode),!0}),C==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(h,a)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var M=r.parent.keyNode.value;t.visit(function(I){return I.type==="property"&&I.keyNode.value===M&&I.valueNode&&I.valueNode.type==="array"&&I.valueNode.items.forEach(g),!0})}else r.items.forEach(g)},e.prototype.getValueCompletions=function(t,r,n,s,a,p,d){var h=this,g=s,y=null,C=null;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(g=n.offset+n.length,C=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",p,d);return}if(n.type==="property"&&s>n.colonOffset){var M=n.valueNode;if(M&&s>M.offset+M.length)return;y=n.keyNode.value,n=n.parent}if(n&&(y!==null||n.type==="array")){var I=this.evaluateSeparatorAfter(a,g),B=r.getMatchingSchemas(t.schema,n.offset,C);B.forEach(function(z){if(z.node===n&&!z.inverted&&z.schema){if(n.type==="array"&&z.schema.items)if(Array.isArray(z.schema.items)){var W=h.findItemAtOffset(n,a,s);W<z.schema.items.length&&h.addSchemaValueCompletions(z.schema.items[W],I,p,d)}else h.addSchemaValueCompletions(z.schema.items,I,p,d);if(z.schema.properties){var G=z.schema.properties[y];G&&h.addSchemaValueCompletions(G,I,p,d)}}}),y==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(I,p),d.boolean&&(this.addBooleanValueCompletion(!0,I,p),this.addBooleanValueCompletion(!1,I,p)),d.null&&this.addNullValueCompletion(I,p)}},e.prototype.getContributedValueCompletions=function(t,r,n,s,a,p){if(!r)this.contributions.forEach(function(y){var C=y.collectDefaultCompletions(s.uri,a);C&&p.push(C)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r.type==="property"&&n>r.colonOffset){var d=r.keyNode.value,h=r.valueNode;if(!h||n<=h.offset+h.length){var g=My(r.parent);this.contributions.forEach(function(y){var C=y.collectValueCompletions(s.uri,g,d,a);C&&p.push(C)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,s){var a=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,s),Array.isArray(t.allOf)&&t.allOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(p){return a.addSchemaValueCompletions(p,r,n,s)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,s){var a=this;s===void 0&&(s=0);var p=!1;if(Do(t.default)){for(var d=t.type,h=t.default,g=s;g>0;g--)h=[h],d="array";n.add({kind:this.getSuggestionKind(d),label:this.getLabelForValue(h),insertText:this.getInsertTextForValue(h,r),insertTextFormat:dn.Snippet}),p=!0}Array.isArray(t.examples)&&t.examples.forEach(function(y){for(var C=t.type,M=y,I=s;I>0;I--)M=[M],C="array";n.add({kind:a.getSuggestionKind(C),label:a.getLabelForValue(M),insertText:a.getInsertTextForValue(M,r),insertTextFormat:dn.Snippet}),p=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(y){var C=t.type,M=y.body,I=y.label,B,z;if(Do(M)){for(var W=t.type,G=s;G>0;G--)M=[M],W="array";B=a.getInsertTextForSnippetValue(M,r),z=a.getFilterTextForSnippetValue(M),I=I||a.getLabelForSnippetValue(M)}else if(typeof y.bodyText=="string"){for(var te="",le="",ye="",G=s;G>0;G--)te=te+ye+`[
265
265
  `,le=le+`
266
266
  `+ye+"]",ye+=" ",C="array";B=te+ye+y.bodyText.split(`
267
267
  `).join(`
268
- `+ye)+le+r,I=I||a.sanitizeLabel(B),z=B.replace(/[\n]/g,"")}n.add({kind:a.getSuggestionKind(C),label:I,documentation:a.fromMarkup(y.markdownDescription)||y.description,insertText:B,insertTextFormat:dn.Snippet,filterText:z}),p=!0}),!p&&typeof t.items=="object"&&!Array.isArray(t.items)&&this.addDefaultValueCompletions(t.items,r,n,s+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Do(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:dn.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var s=0,a=t.enum.length;s<a;s++){var p=t.enum[s],d=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&s<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?d=this.fromMarkup(t.markdownEnumDescriptions[s]):t.enumDescriptions&&s<t.enumDescriptions.length&&(d=t.enumDescriptions[s]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(p),insertText:this.getInsertTextForValue(p,r),insertTextFormat:dn.Snippet,documentation:d})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||Do(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(s){return r[s]=!0}):r[n]=!0}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:dn.Snippet,detail:"New object",documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:dn.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:dn.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:dn.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,s=this.schemaService.getRegisteredSchemaIds(function(a){return a==="http"||a==="https"});s.forEach(function(a){return r.add({kind:_i.Module,label:n.getLabelForValue(a),filterText:n.getFilterTextForValue(a),insertText:n.getInsertTextForValue(a,t),insertTextFormat:dn.Snippet,documentation:""})})},e.prototype.sanitizeLabel=function(t){return t=t.replace(/[\n]/g,"\u21B5"),t.length>57&&(t=t.substr(0,57).trim()+"..."),t},e.prototype.getLabelForValue=function(t){return this.sanitizeLabel(JSON.stringify(t))},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var r=JSON.stringify(t);return r=r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(r)},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(s){return typeof s=="string"&&s[0]==="^"?s.substr(1):JSON.stringify(s)};return Ly(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?r[0]:null}if(!t)return _i.Value;switch(t){case"string":return _i.Value;case"object":return _i.Module;case"property":return _i.Property;default:return _i.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var s=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(s)}},e.prototype.getInsertTextForProperty=function(t,r,n,s){var a=this.getInsertTextForValue(t,"");if(!n)return a;var p=a+": ",d,h=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var g=r.defaultSnippets[0].body;Do(g)&&(d=this.getInsertTextForSnippetValue(g,""))}h+=r.defaultSnippets.length}if(r.enum&&(!d&&r.enum.length===1&&(d=this.getInsertTextForGuessedValue(r.enum[0],"")),h+=r.enum.length),Do(r.default)&&(d||(d=this.getInsertTextForGuessedValue(r.default,"")),h++),h===0){var y=Array.isArray(r.type)?r.type[0]:r.type;switch(y||(r.properties?y="object":r.items&&(y="array")),y){case"boolean":d="$1";break;case"string":d='"$1"';break;case"object":d="{$1}";break;case"array":d="[$1]";break;case"number":case"integer":d="${1:0}";break;case"null":d="${1:null}";break;default:return a}}}return(!d||h>1)&&(d="$1"),p+d+s},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,s=t.getText();n>=0&&`
268
+ `+ye)+le+r,I=I||a.sanitizeLabel(B),z=B.replace(/[\n]/g,"")}n.add({kind:a.getSuggestionKind(C),label:I,documentation:a.fromMarkup(y.markdownDescription)||y.description,insertText:B,insertTextFormat:dn.Snippet,filterText:z}),p=!0}),!p&&typeof t.items=="object"&&!Array.isArray(t.items)&&this.addDefaultValueCompletions(t.items,r,n,s+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Do(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:dn.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var s=0,a=t.enum.length;s<a;s++){var p=t.enum[s],d=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&s<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?d=this.fromMarkup(t.markdownEnumDescriptions[s]):t.enumDescriptions&&s<t.enumDescriptions.length&&(d=t.enumDescriptions[s]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(p),insertText:this.getInsertTextForValue(p,r),insertTextFormat:dn.Snippet,documentation:d})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||Do(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(s){return r[s]=!0}):r[n]=!0}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:dn.Snippet,detail:"New object",documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:dn.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:dn.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:dn.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,s=this.schemaService.getRegisteredSchemaIds(function(a){return a==="http"||a==="https"});s.forEach(function(a){return r.add({kind:Ci.Module,label:n.getLabelForValue(a),filterText:n.getFilterTextForValue(a),insertText:n.getInsertTextForValue(a,t),insertTextFormat:dn.Snippet,documentation:""})})},e.prototype.sanitizeLabel=function(t){return t=t.replace(/[\n]/g,"\u21B5"),t.length>57&&(t=t.substr(0,57).trim()+"..."),t},e.prototype.getLabelForValue=function(t){return this.sanitizeLabel(JSON.stringify(t))},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var r=JSON.stringify(t);return r=r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(r)},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(s){return typeof s=="string"&&s[0]==="^"?s.substr(1):JSON.stringify(s)};return Ly(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?r[0]:null}if(!t)return Ci.Value;switch(t){case"string":return Ci.Value;case"object":return Ci.Module;case"property":return Ci.Property;default:return Ci.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var s=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(s)}},e.prototype.getInsertTextForProperty=function(t,r,n,s){var a=this.getInsertTextForValue(t,"");if(!n)return a;var p=a+": ",d,h=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var g=r.defaultSnippets[0].body;Do(g)&&(d=this.getInsertTextForSnippetValue(g,""))}h+=r.defaultSnippets.length}if(r.enum&&(!d&&r.enum.length===1&&(d=this.getInsertTextForGuessedValue(r.enum[0],"")),h+=r.enum.length),Do(r.default)&&(d||(d=this.getInsertTextForGuessedValue(r.default,"")),h++),h===0){var y=Array.isArray(r.type)?r.type[0]:r.type;switch(y||(r.properties?y="object":r.items&&(y="array")),y){case"boolean":d="$1";break;case"string":d='"$1"';break;case"object":d="{$1}";break;case"array":d="[$1]";break;case"number":case"integer":d="${1:0}";break;case"null":d="${1:null}";break;default:return a}}}return(!d||h>1)&&(d="$1"),p+d+s},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,s=t.getText();n>=0&&`
269
269
  \r\v":{[,]}`.indexOf(s.charAt(n))===-1;)n--;return s.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=Gu(t.getText(),!0);n.setPosition(r);var s=n.scan();switch(s){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var s=Gu(r.getText(),!0),a=t.items,p=a.length-1;p>=0;p--){var d=a[p];if(n>d.offset+d.length){s.setPosition(d.offset+d.length);var h=s.scan();return h===5&&n>=s.getTokenOffset()+s.getTokenLength()?p+1:p}else if(n>=d.offset)return p}return 0},e.prototype.isInComment=function(t,r,n){var s=Gu(t.getText(),!1);s.setPosition(r);for(var a=s.scan();a!==17&&s.getTokenOffset()+s.getTokenLength()<n;)a=s.scan();return(a===12||a===13)&&s.getTokenOffset()<=n},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:Tl.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!Do(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(Tl.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!Do(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),dN=function(){function e(t,r,n){r===void 0&&(r=[]),this.schemaService=t,this.contributions=r,this.promise=n||Promise}return e.prototype.doHover=function(t,r,n){var s=t.offsetAt(r),a=n.getNodeFromOffset(s);if(!a||(a.type==="object"||a.type==="array")&&s>a.offset+1&&s<a.offset+a.length-1)return this.promise.resolve(null);var p=a;if(a.type==="string"){var d=a.parent;if(d&&d.type==="property"&&d.keyNode===a&&(a=d.valueNode,!a))return this.promise.resolve(null)}for(var h=or.create(t.positionAt(p.offset),t.positionAt(p.offset+p.length)),g=function(B){var z={contents:B,range:h};return z},y=My(a),C=this.contributions.length-1;C>=0;C--){var M=this.contributions[C],I=M.getInfoContribution(t.uri,y);if(I)return I.then(function(B){return g(B)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(B){if(B){var z=n.getMatchingSchemas(B.schema,a.offset),W=null,G=null,te=null,le=null;z.every(function(he){if(he.node===a&&!he.inverted&&he.schema&&(W=W||he.schema.title,G=G||he.schema.markdownDescription||Ny(he.schema.description),he.schema.enum)){var Ee=he.schema.enum.indexOf(_a(a));he.schema.markdownEnumDescriptions?te=he.schema.markdownEnumDescriptions[Ee]:he.schema.enumDescriptions&&(te=Ny(he.schema.enumDescriptions[Ee])),te&&(le=he.schema.enum[Ee],typeof le!="string"&&(le=JSON.stringify(le)))}return!0});var ye="";return W&&(ye=Ny(W)),G&&(ye.length>0&&(ye+=`
270
270
 
271
271
  `),ye+=G),te&&(ye.length>0&&(ye+=`
272
272
 
273
273
  `),ye+="`"+hN(le)+"`: "+te),g([ye])}return null})},e}();function Ny(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
274
274
 
275
- $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hN(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var mN=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yr,up;if(typeof process=="object")up=!1;else if(typeof navigator=="object"){var vN=navigator.userAgent;up=vN.indexOf("Windows")>=0}function IG(e){return 55296<=e&&e<=56319}function RG(e){return 56320<=e&&e<=57343}function FG(e){return e>=97&&e<=102}function gN(e){return e>=97&&e<=122}function yN(e){return e>=65&&e<=90}function MG(e){return gN(e)||yN(e)}var bN=/^\w[\w\d+.-]*$/,xN=/^\//,SN=/^\/\//;function wN(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!bN.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!xN.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(SN.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 ON(e,t){return!e&&!t?"file":e}function EN(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==_s&&(t=_s+t):t=_s;break}return t}var Er="",_s="/",AN=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,By=function(){function e(t,r,n,s,a,p){p===void 0&&(p=!1),typeof t=="object"?(this.scheme=t.scheme||Er,this.authority=t.authority||Er,this.path=t.path||Er,this.query=t.query||Er,this.fragment=t.fragment||Er):(this.scheme=ON(t,p),this.authority=r||Er,this.path=EN(this.scheme,n||Er),this.query=s||Er,this.fragment=a||Er,wN(this,p))}return e.isUri=function(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="function"&&typeof t.with=="function"&&typeof t.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Ww(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var r=t.scheme,n=t.authority,s=t.path,a=t.query,p=t.fragment;return r===void 0?r=this.scheme:r===null&&(r=Er),n===void 0?n=this.authority:n===null&&(n=Er),s===void 0?s=this.path:s===null&&(s=Er),a===void 0?a=this.query:a===null&&(a=Er),p===void 0?p=this.fragment:p===null&&(p=Er),r===this.scheme&&n===this.authority&&s===this.path&&a===this.query&&p===this.fragment?this:new Xu(r,n,s,a,p)},e.parse=function(t,r){r===void 0&&(r=!1);var n=AN.exec(t);return n?new Xu(n[2]||Er,ev(n[4]||Er),ev(n[5]||Er),ev(n[7]||Er),ev(n[9]||Er),r):new Xu(Er,Er,Er,Er,Er)},e.file=function(t){var r=Er;if(up&&(t=t.replace(/\\/g,_s)),t[0]===_s&&t[1]===_s){var n=t.indexOf(_s,2);n===-1?(r=t.substring(2),t=_s):(r=t.substring(2,n),t=t.substring(n)||_s)}return new Xu("file",r,t,Er,Er)},e.from=function(t){return new Xu(t.scheme,t.authority,t.path,t.query,t.fragment)},e.prototype.toString=function(t){return t===void 0&&(t=!1),$y(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new Xu(t);return r._formatted=t.external,r._fsPath=t._sep===Bw?t.fsPath:null,r}else return t},e}(),Bw=up?1:void 0,Xu=function(e){mN(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._formatted=null,r._fsPath=null,r}return Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Ww(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(r){return r===void 0&&(r=!1),r?$y(this,!0):(this._formatted||(this._formatted=$y(this,!1)),this._formatted)},t.prototype.toJSON=function(){var r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=Bw),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r},t}(By),$w=(Yr={},Yr[58]="%3A",Yr[47]="%2F",Yr[63]="%3F",Yr[35]="%23",Yr[91]="%5B",Yr[93]="%5D",Yr[64]="%40",Yr[33]="%21",Yr[36]="%24",Yr[38]="%26",Yr[39]="%27",Yr[40]="%28",Yr[41]="%29",Yr[42]="%2A",Yr[43]="%2B",Yr[44]="%2C",Yr[59]="%3B",Yr[61]="%3D",Yr[32]="%20",Yr);function Uw(e,t){for(var r=void 0,n=-1,s=0;s<e.length;s++){var a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));var p=$w[a];p!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),r+=p):n===-1&&(n=s)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function CN(e){for(var t=void 0,r=0;r<e.length;r++){var n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=$w[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function Ww(e,t){var r;return e.authority&&e.path.length>1&&e.scheme==="file"?r="//"+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?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,up&&(r=r.replace(/\//g,"\\")),r}function $y(e,t){var r=t?CN:Uw,n="",s=e.scheme,a=e.authority,p=e.path,d=e.query,h=e.fragment;if(s&&(n+=s,n+=":"),(a||s==="file")&&(n+=_s,n+=_s),a){var g=a.indexOf("@");if(g!==-1){var y=a.substr(0,g);a=a.substr(g+1),g=y.indexOf(":"),g===-1?n+=r(y,!1):(n+=r(y.substr(0,g),!1),n+=":",n+=r(y.substr(g+1),!1)),n+="@"}a=a.toLowerCase(),g=a.indexOf(":"),g===-1?n+=r(a,!1):(n+=r(a.substr(0,g),!1),n+=a.substr(g))}if(p){if(p.length>=3&&p.charCodeAt(0)===47&&p.charCodeAt(2)===58){var C=p.charCodeAt(1);C>=65&&C<=90&&(p="/"+String.fromCharCode(C+32)+":"+p.substr(3))}else if(p.length>=2&&p.charCodeAt(1)===58){var C=p.charCodeAt(0);C>=65&&C<=90&&(p=String.fromCharCode(C+32)+":"+p.substr(2))}n+=r(p,!0)}return d&&(n+="?",n+=r(d,!1)),h&&(n+="#",n+=t?h:Uw(h,!1)),n}function Hw(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Hw(e.substr(3)):e}}var zw=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ev(e){return e.match(zw)?e.replace(zw,function(t){return Hw(t)}):e}var _N=function(){function e(t){try{this.patternRegExp=new RegExp(uN(t)+"$")}catch(r){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(t){this.schemas.push(t)},e.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},e.prototype.getSchemas=function(){return this.schemas},e}(),PN=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new Qu(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Qu=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}(),Gw=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){return fi(this.getSectionRecursive(t,this.schema))},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var s=0,a=Object.keys(r.patternProperties);s<a.length;s++){var p=a[s],d=new RegExp(p);if(d.test(n))return this.getSectionRecursive(t,r.patternProperties[p])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var h=parseInt(n,10);if(!isNaN(h)&&r.items[h])return this.getSectionRecursive(t,r.items[h])}else if(r.items)return this.getSectionRecursive(t,r.items)}}return null},e}(),TN=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(r){var n=By.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},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(t){var r=this,n=!1;t=this.normalizeId(t);for(var s=[t],a=Object.keys(this.schemasById).map(function(g){return r.schemasById[g]});s.length;)for(var p=s.pop(),d=0;d<a.length;d++){var h=a[d];h&&(h.url===p||h.dependencies[p])&&(h.url!==p&&s.push(h.url),h.clearSchema(),a[d]=void 0,n=!0)}return n},e.prototype.normalizeId=function(t){try{return By.parse(t).toString()}catch(r){return t}},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var s=this.normalizeId(n);this.contributionSchemas[s]=this.addSchemaHandle(s,r[n])}}if(t.schemaAssociations){var a=t.schemaAssociations;for(var p in a){var d=a[p];this.contributionAssociations[p]=d;for(var h=this.getOrAddFilePatternAssociation(p),g=0,y=d;g<y.length;g++){var C=y[g],n=this.normalizeId(C);h.addSchema(n)}}}},e.prototype.addSchemaHandle=function(t,r){var n=new PN(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.getOrAddFilePatternAssociation=function(t){var r=this.filePatternAssociationById[t];return r||(r=new _N(t),this.filePatternAssociationById[t]=r,this.filePatternAssociations.push(r)),r},e.prototype.registerExternalSchema=function(t,r,n){r===void 0&&(r=null);var s=this.normalizeId(t);if(this.registeredSchemasIds[s]=!0,r)for(var a=0,p=r;a<p.length;a++){var d=p[a];this.getOrAddFilePatternAssociation(d).addSchema(s)}return n?this.addSchemaHandle(s,n):this.getOrAddSchemaHandle(s)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var r in this.contributionAssociations)for(var n=this.getOrAddFilePatternAssociation(r),s=0,a=this.contributionAssociations[r];s<a.length;s++){var p=a[s],t=this.normalizeId(p);n.addSchema(t)}},e.prototype.getResolvedSchema=function(t){var r=this.normalizeId(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(t){if(!this.requestService){var r="Unable to load schema from '"+tv(t)+"'. No schema request service available";return this.promise.resolve(new Qu({},[r]))}return this.requestService(t).then(function(n){if(!n){var s="Unable to load schema from '"+tv(t)+"': No content.";return new Qu({},[s])}var a={},p=[];a=H3(n,p);var d=p.length?["Unable to parse content from '"+tv(t)+"': Parse error at offset "+p[0].offset]:[];return new Qu(a,d)},function(n){var s="Unable to load schema from '"+tv(t)+"': "+n.toString();return new Qu({},[s])})},e.prototype.resolveSchemaContent=function(t,r,n){var s=this,a=t.errors.slice(0),p=t.schema;if(p.$schema){var d=this.normalizeId(p.$schema);if(d==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Gw({},["Draft-03 schemas are not supported."]));d==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var h=this.contextService,g=function(I,B){if(!B)return I;var z=I;return B[0]==="/"&&(B=B.substr(1)),B.split("/").some(function(W){return z=z[W],!z}),z},y=function(I,B,z,W){var G=g(B,W);if(G)for(var te in G)G.hasOwnProperty(te)&&!I.hasOwnProperty(te)&&(I[te]=G[te]);else a.push("$ref '"+W+"' in '"+z+"' can not be resolved.")},C=function(I,B,z,W,G){h&&!/^\w+:\/\/.*/.test(B)&&(B=h.resolveRelativePath(B,W)),B=s.normalizeId(B);var te=s.getOrAddSchemaHandle(B);return te.getUnresolvedSchema().then(function(le){if(G[B]=!0,le.errors.length){var ye=z?B+"#"+z:B;a.push("Problems loading reference '"+ye+"': "+le.errors[0]+".")}return y(I,le.schema,B,z),M(I,le.schema,B,te.dependencies)})},M=function(I,B,z,W){if(!I||typeof I!="object")return Promise.resolve(null);for(var G=[I],te=[],le=[],ye=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];typeof Qe=="object"&&G.push(Qe)}},he=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];if(typeof Qe=="object")for(var wt in Qe){var ft=Qe[wt];typeof ft=="object"&&G.push(ft)}}},Ee=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];if(Array.isArray(Qe))for(var wt=0,ft=Qe;wt<ft.length;wt++){var Ar=ft[wt];typeof Ar=="object"&&G.push(Ar)}}},me=function(ce){for(var Se=[];ce.$ref;){var Ce=ce.$ref,Me=Ce.split("#",2);if(delete ce.$ref,Me[0].length>0){le.push(C(ce,Me[0],Me[1],z,W));return}else Se.indexOf(Ce)===-1&&(y(ce,B,z,Me[1]),Se.push(Ce))}ye(ce.items,ce.additionalProperties,ce.not,ce.contains,ce.propertyNames,ce.if,ce.then,ce.else),he(ce.definitions,ce.properties,ce.patternProperties,ce.dependencies),Ee(ce.anyOf,ce.allOf,ce.oneOf,ce.items)};G.length;){var ve=G.pop();te.indexOf(ve)>=0||(te.push(ve),me(ve))}return s.promise.all(le)};return M(p,p,r,n).then(function(I){return new Gw(p,a)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(B){return B.keyNode.value==="$schema"&&B.valueNode&&B.valueNode.type==="string"});if(n.length>0){var s=_a(n[0].valueNode);if(s&&lN(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=this.normalizeId(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}for(var p=Object.create(null),d=[],h=0,g=this.filePatternAssociations;h<g.length;h++){var y=g[h];if(y.matchesPattern(t))for(var C=0,M=y.getSchemas();C<M.length;C++){var I=M[C];p[I]||(d.push(I),p[I]=!0)}}return d.length>0?this.createCombinedSchema(t,d).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),s={allOf:r.map(function(a){return{$ref:a}})};return this.addSchemaHandle(n,s)},e}();function tv(e){try{}catch(t){}return e}var VN=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:Nt.Error)},e.prototype.doValidation=function(t,r,n,s){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var p=[],d={},h=function(C){var M=C.range.start.line+" "+C.range.start.character+" "+C.message;d[M]||(d[M]=!0,p.push(C))},g=function(C){var M=n?Yw(n.trailingCommas):Nt.Error,I=n?Yw(n.comments):a.commentSeverity;if(C){if(C.errors.length&&r.root){var B=r.root,z=B.type==="object"?B.properties[0]:null;if(z&&z.keyNode.value==="$schema"){var W=z.valueNode||z,G=or.create(t.positionAt(W.offset),t.positionAt(W.offset+W.length));h(No.create(G,C.errors[0],Nt.Warning,tr.SchemaResolveError))}else{var G=or.create(t.positionAt(B.offset),t.positionAt(B.offset+1));h(No.create(G,C.errors[0],Nt.Warning,tr.SchemaResolveError))}}else{var te=r.validate(t,C.schema);te&&te.forEach(h)}Kw(C.schema)&&(I=void 0),Jw(C.schema)&&(M=void 0)}for(var le=0,ye=r.syntaxErrors;le<ye.length;le++){var he=ye[le];if(he.code===tr.TrailingComma){if(typeof M!="number")continue;he.severity=M}h(he)}if(typeof I=="number"){var Ee="Comments are not permitted in JSON.";r.comments.forEach(function(me){h(No.create(me,Ee,I,tr.CommentNotPermitted))})}return p};if(s){var y=s.id||"schemaservice://untitled/"+kN++;return this.jsonSchemaService.resolveSchemaContent(new Qu(s),y,{}).then(function(C){return g(C)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(C){return g(C)})},e}(),kN=0;function Kw(e){if(e&&typeof e=="object"){if(eo(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],s=Kw(n);if(eo(s))return s}}}function Jw(e){if(e&&typeof e=="object"){if(eo(e.allowTrailingCommas))return e.allowTrailingCommas;if(eo(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],s=Jw(n);if(eo(s))return s}}}function Yw(e){switch(e){case"error":return Nt.Error;case"warning":return Nt.Warning;case"ignore":return}}var Xw=48,jN=57,IN=65,rv=97,RN=102;function Xr(e){return e<Xw?0:e<=jN?e-Xw:(e<rv&&(e+=rv-IN),e>=rv&&e<=RN?e-rv+10:0)}function FN(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Xr(e.charCodeAt(1))*17/255,green:Xr(e.charCodeAt(2))*17/255,blue:Xr(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Xr(e.charCodeAt(1))*17/255,green:Xr(e.charCodeAt(2))*17/255,blue:Xr(e.charCodeAt(3))*17/255,alpha:Xr(e.charCodeAt(4))*17/255};case 7:return{red:(Xr(e.charCodeAt(1))*16+Xr(e.charCodeAt(2)))/255,green:(Xr(e.charCodeAt(3))*16+Xr(e.charCodeAt(4)))/255,blue:(Xr(e.charCodeAt(5))*16+Xr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Xr(e.charCodeAt(1))*16+Xr(e.charCodeAt(2)))/255,green:(Xr(e.charCodeAt(3))*16+Xr(e.charCodeAt(4)))/255,blue:(Xr(e.charCodeAt(5))*16+Xr(e.charCodeAt(6)))/255,alpha:(Xr(e.charCodeAt(7))*16+Xr(e.charCodeAt(8)))/255}}return null}function LG(e,t,r,n){return n===void 0&&(n=1),{red:e/255,green:t/255,blue:r/255,alpha:n}}var MN=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var s=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var a=r.root;if(!a)return null;var p=n.resultLimit,d=t.uri;if((d==="vscode://defaultsettings/keybindings.json"||Dy(d.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var h=[],g=0,y=a.items;g<y.length;g++){var C=y[g];if(C.type==="object")for(var M=0,I=C.properties;M<I.length;M++){var B=I[M];if(B.keyNode.value==="key"&&B.valueNode){var z=Ku.create(t.uri,Pa(t,C));if(h.push({name:_a(B.valueNode),kind:to.Function,location:z}),p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d),h}}}return h}var W=function(te,le,ye){return p>=0&&(le.type==="array"?le.items.forEach(function(he){return W(te,he,ye)}):le.type==="object"&&le.properties.forEach(function(he){if(p>=0){var Ee=he.valueNode;if(Ee){p--;var me=Ku.create(t.uri,Pa(t,he)),ve=ye?ye+"."+he.keyNode.value:he.keyNode.value;te.push({name:s.getKeyLabel(he),kind:s.getSymbolKind(Ee.type),location:me,containerName:ye}),W(te,Ee,ve)}}})),te},G=W([],a,void 0);return p<0&&(G.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d)),G},e.prototype.findDocumentSymbols2=function(t,r,n){var s=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var a=r.root;if(!a)return null;var p=n.resultLimit,d=t.uri;if((d==="vscode://defaultsettings/keybindings.json"||Dy(d.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var h=[],g=0,y=a.items;g<y.length;g++){var C=y[g];if(C.type==="object")for(var M=0,I=C.properties;M<I.length;M++){var B=I[M];if(B.keyNode.value==="key"&&B.valueNode){var z=Pa(t,C),W=Pa(t,B.keyNode);if(h.push({name:_a(B.valueNode),kind:to.Function,range:z,selectionRange:W}),p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d),h}}}return h}var G=function(le,ye){return p>=0&&(ye.type==="array"?ye.items.forEach(function(he,Ee){if(he&&p>=0){p--;var me=Pa(t,he),ve=me,ce=String(Ee),Se=G([],he);le.push({name:ce,kind:s.getSymbolKind(he.type),range:me,selectionRange:ve,children:Se})}}):ye.type==="object"&&ye.properties.forEach(function(he){var Ee=he.valueNode;if(Ee&&p>=0){p--;var me=Pa(t,he),ve=Pa(t,he.keyNode),ce=G([],Ee);le.push({name:s.getKeyLabel(he),kind:s.getSymbolKind(Ee.type),range:me,selectionRange:ve,children:ce})}})),le},te=G([],a);return p<0&&(te.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d)),te},e.prototype.getSymbolKind=function(t){switch(t){case"object":return to.Module;case"string":return to.String;case"number":return to.Number;case"array":return to.Array;case"boolean":return to.Boolean;default:return to.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:'"'+r+'"'},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(s){var a=[];if(s)for(var p=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,d=r.getMatchingSchemas(s.schema),h={},g=0,y=d;g<y.length;g++){var C=y[g];if(!C.inverted&&C.schema&&(C.schema.format==="color"||C.schema.format==="color-hex")&&C.node&&C.node.type==="string"){var M=String(C.node.offset);if(!h[M]){var I=FN(_a(C.node));if(I){var B=Pa(t,C.node);a.push({color:I,range:B})}if(h[M]=!0,p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),a}}}return a})},e.prototype.getColorPresentations=function(t,r,n,s){var a=[],p=Math.round(n.red*255),d=Math.round(n.green*255),h=Math.round(n.blue*255);function g(C){var M=C.toString(16);return M.length!==2?"0"+M:M}var y;return n.alpha===1?y="#"+g(p)+g(d)+g(h):y="#"+g(p)+g(d)+g(h)+g(Math.round(n.alpha*255)),a.push({label:y,textEdit:es.replace(s,JSON.stringify(y))}),a},e}();function Pa(e,t){return or.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var LN={schemaAssociations:{},schemas:{}};function DN(e,t){var r=[],n=[],s=[],a=-1,p=Gu(e.getText(),!1),d=p.scan();function h(Se){r.push(Se),n.push(s.length)}for(;d!==17;){switch(d){case 1:case 3:{var g=e.positionAt(p.getTokenOffset()).line,y={startLine:g,endLine:g,kind:d===1?"object":"array"};s.push(y);break}case 2:case 4:{var C=d===2?"object":"array";if(s.length>0&&s[s.length-1].kind===C){var y=s.pop(),M=e.positionAt(p.getTokenOffset()).line;y&&M>y.startLine+1&&a!==y.startLine&&(y.endLine=M-1,h(y),a=y.startLine)}break}case 13:{var g=e.positionAt(p.getTokenOffset()).line,I=e.positionAt(p.getTokenOffset()+p.getTokenLength()).line;p.getTokenError()===1&&g+1<e.lineCount?p.setPosition(e.offsetAt(qi.create(g+1,0))):g<I&&(h({startLine:g,endLine:I,kind:np.Comment}),a=g);break}case 12:{var B=e.getText().substr(p.getTokenOffset(),p.getTokenLength()),z=B.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(z){var M=e.positionAt(p.getTokenOffset()).line;if(z[1]){var y={startLine:M,endLine:M,kind:np.Region};s.push(y)}else{for(var W=s.length-1;W>=0&&s[W].kind!==np.Region;)W--;if(W>=0){var y=s[W];s.length=W,M>y.startLine&&a!==y.startLine&&(y.endLine=M,h(y),a=y.startLine)}}}break}}d=p.scan()}var G=t&&t.rangeLimit;if(typeof G!="number"||r.length<=G)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var te=[],le=0,ye=n;le<ye.length;le++){var he=ye[le];he<30&&(te[he]=(te[he]||0)+1)}for(var Ee=0,me=0,W=0;W<te.length;W++){var ve=te[W];if(ve){if(ve+Ee>G){me=W;break}Ee+=ve}}for(var ce=[],W=0;W<r.length;W++){var he=n[W];typeof he=="number"&&(he<me||he===me&&Ee++<G)&&ce.push(r[W])}return ce}function NN(e,t,r){function n(d){for(var h=e.offsetAt(d),g=r.getNodeFromOffset(h,!0),y=[];g;){switch(g.type){case"string":case"object":case"array":var C=g.offset+1,M=g.offset+g.length-1;C<M&&h>=C&&h<=M&&y.push(s(C,M)),y.push(s(g.offset,g.offset+g.length));break;case"number":case"boolean":case"null":case"property":y.push(s(g.offset,g.offset+g.length));break}if(g.type==="property"||g.parent&&g.parent.type==="array"){var I=p(g.offset+g.length,5);I!==-1&&y.push(s(g.offset,I))}g=g.parent}for(var B=void 0,z=y.length-1;z>=0;z--)B=Zm.create(y[z],B);return B||(B=Zm.create(or.create(d,d))),B}function s(d,h){return or.create(e.positionAt(d),e.positionAt(h))}var a=Gu(e.getText(),!0);function p(d,h){a.setPosition(d);var g=a.scan();return g===h?a.getTokenOffset()+a.getTokenLength():-1}return t.map(n)}function BN(e){var t=e.promiseConstructor||Promise,r=new TN(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(LN);var n=new pN(r,e.contributions,t,e.clientCapabilities),s=new dN(r,e.contributions,t),a=new MN(r),p=new VN(r,t);return{configure:function(d){r.clearExternalSchemas(),d.schemas&&d.schemas.forEach(function(h){r.registerExternalSchema(h.uri,h.fileMatch,h.schema)}),p.configure(d)},resetSchema:function(d){return r.onResourceChange(d)},doValidation:p.doValidation.bind(p),parseJSONDocument:function(d){return aN(d,{collectComments:!0})},newJSONDocument:function(d,h){return oN(d,h)},doComplete:n.doComplete.bind(n),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findColorSymbols:function(d,h){return a.findDocumentColors(d,h).then(function(g){return g.map(function(y){return y.range})})},findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:s.doHover.bind(s),getFoldingRanges:DN,getSelectionRanges:NN,format:function(d,h,g){var y=void 0;if(h){var C=d.offsetAt(h.start),M=d.offsetAt(h.end)-C;y={offset:C,length:M}}var I={tabSize:g?g.tabSize:4,insertSpaces:g?g.insertSpaces:!0,eol:`
275
+ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hN(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var mN=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yr,up;if(typeof process=="object")up=!1;else if(typeof navigator=="object"){var vN=navigator.userAgent;up=vN.indexOf("Windows")>=0}function IG(e){return 55296<=e&&e<=56319}function RG(e){return 56320<=e&&e<=57343}function FG(e){return e>=97&&e<=102}function gN(e){return e>=97&&e<=122}function yN(e){return e>=65&&e<=90}function MG(e){return gN(e)||yN(e)}var bN=/^\w[\w\d+.-]*$/,xN=/^\//,SN=/^\/\//;function wN(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!bN.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!xN.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(SN.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 ON(e,t){return!e&&!t?"file":e}function EN(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==_s&&(t=_s+t):t=_s;break}return t}var Er="",_s="/",AN=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,By=function(){function e(t,r,n,s,a,p){p===void 0&&(p=!1),typeof t=="object"?(this.scheme=t.scheme||Er,this.authority=t.authority||Er,this.path=t.path||Er,this.query=t.query||Er,this.fragment=t.fragment||Er):(this.scheme=ON(t,p),this.authority=r||Er,this.path=EN(this.scheme,n||Er),this.query=s||Er,this.fragment=a||Er,wN(this,p))}return e.isUri=function(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="function"&&typeof t.with=="function"&&typeof t.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Ww(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var r=t.scheme,n=t.authority,s=t.path,a=t.query,p=t.fragment;return r===void 0?r=this.scheme:r===null&&(r=Er),n===void 0?n=this.authority:n===null&&(n=Er),s===void 0?s=this.path:s===null&&(s=Er),a===void 0?a=this.query:a===null&&(a=Er),p===void 0?p=this.fragment:p===null&&(p=Er),r===this.scheme&&n===this.authority&&s===this.path&&a===this.query&&p===this.fragment?this:new Xu(r,n,s,a,p)},e.parse=function(t,r){r===void 0&&(r=!1);var n=AN.exec(t);return n?new Xu(n[2]||Er,ev(n[4]||Er),ev(n[5]||Er),ev(n[7]||Er),ev(n[9]||Er),r):new Xu(Er,Er,Er,Er,Er)},e.file=function(t){var r=Er;if(up&&(t=t.replace(/\\/g,_s)),t[0]===_s&&t[1]===_s){var n=t.indexOf(_s,2);n===-1?(r=t.substring(2),t=_s):(r=t.substring(2,n),t=t.substring(n)||_s)}return new Xu("file",r,t,Er,Er)},e.from=function(t){return new Xu(t.scheme,t.authority,t.path,t.query,t.fragment)},e.prototype.toString=function(t){return t===void 0&&(t=!1),$y(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new Xu(t);return r._formatted=t.external,r._fsPath=t._sep===Bw?t.fsPath:null,r}else return t},e}(),Bw=up?1:void 0,Xu=function(e){mN(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._formatted=null,r._fsPath=null,r}return Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Ww(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(r){return r===void 0&&(r=!1),r?$y(this,!0):(this._formatted||(this._formatted=$y(this,!1)),this._formatted)},t.prototype.toJSON=function(){var r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=Bw),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r},t}(By),$w=(Yr={},Yr[58]="%3A",Yr[47]="%2F",Yr[63]="%3F",Yr[35]="%23",Yr[91]="%5B",Yr[93]="%5D",Yr[64]="%40",Yr[33]="%21",Yr[36]="%24",Yr[38]="%26",Yr[39]="%27",Yr[40]="%28",Yr[41]="%29",Yr[42]="%2A",Yr[43]="%2B",Yr[44]="%2C",Yr[59]="%3B",Yr[61]="%3D",Yr[32]="%20",Yr);function Uw(e,t){for(var r=void 0,n=-1,s=0;s<e.length;s++){var a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));var p=$w[a];p!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,s)),n=-1),r+=p):n===-1&&(n=s)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function CN(e){for(var t=void 0,r=0;r<e.length;r++){var n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=$w[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function Ww(e,t){var r;return e.authority&&e.path.length>1&&e.scheme==="file"?r="//"+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?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,up&&(r=r.replace(/\//g,"\\")),r}function $y(e,t){var r=t?CN:Uw,n="",s=e.scheme,a=e.authority,p=e.path,d=e.query,h=e.fragment;if(s&&(n+=s,n+=":"),(a||s==="file")&&(n+=_s,n+=_s),a){var g=a.indexOf("@");if(g!==-1){var y=a.substr(0,g);a=a.substr(g+1),g=y.indexOf(":"),g===-1?n+=r(y,!1):(n+=r(y.substr(0,g),!1),n+=":",n+=r(y.substr(g+1),!1)),n+="@"}a=a.toLowerCase(),g=a.indexOf(":"),g===-1?n+=r(a,!1):(n+=r(a.substr(0,g),!1),n+=a.substr(g))}if(p){if(p.length>=3&&p.charCodeAt(0)===47&&p.charCodeAt(2)===58){var C=p.charCodeAt(1);C>=65&&C<=90&&(p="/"+String.fromCharCode(C+32)+":"+p.substr(3))}else if(p.length>=2&&p.charCodeAt(1)===58){var C=p.charCodeAt(0);C>=65&&C<=90&&(p=String.fromCharCode(C+32)+":"+p.substr(2))}n+=r(p,!0)}return d&&(n+="?",n+=r(d,!1)),h&&(n+="#",n+=t?h:Uw(h,!1)),n}function Hw(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Hw(e.substr(3)):e}}var zw=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ev(e){return e.match(zw)?e.replace(zw,function(t){return Hw(t)}):e}var _N=function(){function e(t){try{this.patternRegExp=new RegExp(uN(t)+"$")}catch(r){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(t){this.schemas.push(t)},e.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},e.prototype.getSchemas=function(){return this.schemas},e}(),PN=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new Qu(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Qu=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}(),Gw=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){return ci(this.getSectionRecursive(t,this.schema))},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var s=0,a=Object.keys(r.patternProperties);s<a.length;s++){var p=a[s],d=new RegExp(p);if(d.test(n))return this.getSectionRecursive(t,r.patternProperties[p])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var h=parseInt(n,10);if(!isNaN(h)&&r.items[h])return this.getSectionRecursive(t,r.items[h])}else if(r.items)return this.getSectionRecursive(t,r.items)}}return null},e}(),TN=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(r){var n=By.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},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(t){var r=this,n=!1;t=this.normalizeId(t);for(var s=[t],a=Object.keys(this.schemasById).map(function(g){return r.schemasById[g]});s.length;)for(var p=s.pop(),d=0;d<a.length;d++){var h=a[d];h&&(h.url===p||h.dependencies[p])&&(h.url!==p&&s.push(h.url),h.clearSchema(),a[d]=void 0,n=!0)}return n},e.prototype.normalizeId=function(t){try{return By.parse(t).toString()}catch(r){return t}},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var s=this.normalizeId(n);this.contributionSchemas[s]=this.addSchemaHandle(s,r[n])}}if(t.schemaAssociations){var a=t.schemaAssociations;for(var p in a){var d=a[p];this.contributionAssociations[p]=d;for(var h=this.getOrAddFilePatternAssociation(p),g=0,y=d;g<y.length;g++){var C=y[g],n=this.normalizeId(C);h.addSchema(n)}}}},e.prototype.addSchemaHandle=function(t,r){var n=new PN(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.getOrAddFilePatternAssociation=function(t){var r=this.filePatternAssociationById[t];return r||(r=new _N(t),this.filePatternAssociationById[t]=r,this.filePatternAssociations.push(r)),r},e.prototype.registerExternalSchema=function(t,r,n){r===void 0&&(r=null);var s=this.normalizeId(t);if(this.registeredSchemasIds[s]=!0,r)for(var a=0,p=r;a<p.length;a++){var d=p[a];this.getOrAddFilePatternAssociation(d).addSchema(s)}return n?this.addSchemaHandle(s,n):this.getOrAddSchemaHandle(s)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var r in this.contributionAssociations)for(var n=this.getOrAddFilePatternAssociation(r),s=0,a=this.contributionAssociations[r];s<a.length;s++){var p=a[s],t=this.normalizeId(p);n.addSchema(t)}},e.prototype.getResolvedSchema=function(t){var r=this.normalizeId(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(t){if(!this.requestService){var r="Unable to load schema from '"+tv(t)+"'. No schema request service available";return this.promise.resolve(new Qu({},[r]))}return this.requestService(t).then(function(n){if(!n){var s="Unable to load schema from '"+tv(t)+"': No content.";return new Qu({},[s])}var a={},p=[];a=H3(n,p);var d=p.length?["Unable to parse content from '"+tv(t)+"': Parse error at offset "+p[0].offset]:[];return new Qu(a,d)},function(n){var s="Unable to load schema from '"+tv(t)+"': "+n.toString();return new Qu({},[s])})},e.prototype.resolveSchemaContent=function(t,r,n){var s=this,a=t.errors.slice(0),p=t.schema;if(p.$schema){var d=this.normalizeId(p.$schema);if(d==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Gw({},["Draft-03 schemas are not supported."]));d==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var h=this.contextService,g=function(I,B){if(!B)return I;var z=I;return B[0]==="/"&&(B=B.substr(1)),B.split("/").some(function(W){return z=z[W],!z}),z},y=function(I,B,z,W){var G=g(B,W);if(G)for(var te in G)G.hasOwnProperty(te)&&!I.hasOwnProperty(te)&&(I[te]=G[te]);else a.push("$ref '"+W+"' in '"+z+"' can not be resolved.")},C=function(I,B,z,W,G){h&&!/^\w+:\/\/.*/.test(B)&&(B=h.resolveRelativePath(B,W)),B=s.normalizeId(B);var te=s.getOrAddSchemaHandle(B);return te.getUnresolvedSchema().then(function(le){if(G[B]=!0,le.errors.length){var ye=z?B+"#"+z:B;a.push("Problems loading reference '"+ye+"': "+le.errors[0]+".")}return y(I,le.schema,B,z),M(I,le.schema,B,te.dependencies)})},M=function(I,B,z,W){if(!I||typeof I!="object")return Promise.resolve(null);for(var G=[I],te=[],le=[],ye=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];typeof Qe=="object"&&G.push(Qe)}},he=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];if(typeof Qe=="object")for(var wt in Qe){var ft=Qe[wt];typeof ft=="object"&&G.push(ft)}}},Ee=function(){for(var ce=[],Se=0;Se<arguments.length;Se++)ce[Se]=arguments[Se];for(var Ce=0,Me=ce;Ce<Me.length;Ce++){var Qe=Me[Ce];if(Array.isArray(Qe))for(var wt=0,ft=Qe;wt<ft.length;wt++){var Ar=ft[wt];typeof Ar=="object"&&G.push(Ar)}}},me=function(ce){for(var Se=[];ce.$ref;){var Ce=ce.$ref,Me=Ce.split("#",2);if(delete ce.$ref,Me[0].length>0){le.push(C(ce,Me[0],Me[1],z,W));return}else Se.indexOf(Ce)===-1&&(y(ce,B,z,Me[1]),Se.push(Ce))}ye(ce.items,ce.additionalProperties,ce.not,ce.contains,ce.propertyNames,ce.if,ce.then,ce.else),he(ce.definitions,ce.properties,ce.patternProperties,ce.dependencies),Ee(ce.anyOf,ce.allOf,ce.oneOf,ce.items)};G.length;){var ve=G.pop();te.indexOf(ve)>=0||(te.push(ve),me(ve))}return s.promise.all(le)};return M(p,p,r,n).then(function(I){return new Gw(p,a)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(B){return B.keyNode.value==="$schema"&&B.valueNode&&B.valueNode.type==="string"});if(n.length>0){var s=_a(n[0].valueNode);if(s&&lN(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=this.normalizeId(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}for(var p=Object.create(null),d=[],h=0,g=this.filePatternAssociations;h<g.length;h++){var y=g[h];if(y.matchesPattern(t))for(var C=0,M=y.getSchemas();C<M.length;C++){var I=M[C];p[I]||(d.push(I),p[I]=!0)}}return d.length>0?this.createCombinedSchema(t,d).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),s={allOf:r.map(function(a){return{$ref:a}})};return this.addSchemaHandle(n,s)},e}();function tv(e){try{}catch(t){}return e}var VN=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:Nt.Error)},e.prototype.doValidation=function(t,r,n,s){var a=this;if(!this.validationEnabled)return this.promise.resolve([]);var p=[],d={},h=function(C){var M=C.range.start.line+" "+C.range.start.character+" "+C.message;d[M]||(d[M]=!0,p.push(C))},g=function(C){var M=n?Yw(n.trailingCommas):Nt.Error,I=n?Yw(n.comments):a.commentSeverity;if(C){if(C.errors.length&&r.root){var B=r.root,z=B.type==="object"?B.properties[0]:null;if(z&&z.keyNode.value==="$schema"){var W=z.valueNode||z,G=or.create(t.positionAt(W.offset),t.positionAt(W.offset+W.length));h(No.create(G,C.errors[0],Nt.Warning,tr.SchemaResolveError))}else{var G=or.create(t.positionAt(B.offset),t.positionAt(B.offset+1));h(No.create(G,C.errors[0],Nt.Warning,tr.SchemaResolveError))}}else{var te=r.validate(t,C.schema);te&&te.forEach(h)}Kw(C.schema)&&(I=void 0),Jw(C.schema)&&(M=void 0)}for(var le=0,ye=r.syntaxErrors;le<ye.length;le++){var he=ye[le];if(he.code===tr.TrailingComma){if(typeof M!="number")continue;he.severity=M}h(he)}if(typeof I=="number"){var Ee="Comments are not permitted in JSON.";r.comments.forEach(function(me){h(No.create(me,Ee,I,tr.CommentNotPermitted))})}return p};if(s){var y=s.id||"schemaservice://untitled/"+kN++;return this.jsonSchemaService.resolveSchemaContent(new Qu(s),y,{}).then(function(C){return g(C)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(C){return g(C)})},e}(),kN=0;function Kw(e){if(e&&typeof e=="object"){if(eo(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],s=Kw(n);if(eo(s))return s}}}function Jw(e){if(e&&typeof e=="object"){if(eo(e.allowTrailingCommas))return e.allowTrailingCommas;if(eo(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],s=Jw(n);if(eo(s))return s}}}function Yw(e){switch(e){case"error":return Nt.Error;case"warning":return Nt.Warning;case"ignore":return}}var Xw=48,jN=57,IN=65,rv=97,RN=102;function Xr(e){return e<Xw?0:e<=jN?e-Xw:(e<rv&&(e+=rv-IN),e>=rv&&e<=RN?e-rv+10:0)}function FN(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Xr(e.charCodeAt(1))*17/255,green:Xr(e.charCodeAt(2))*17/255,blue:Xr(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Xr(e.charCodeAt(1))*17/255,green:Xr(e.charCodeAt(2))*17/255,blue:Xr(e.charCodeAt(3))*17/255,alpha:Xr(e.charCodeAt(4))*17/255};case 7:return{red:(Xr(e.charCodeAt(1))*16+Xr(e.charCodeAt(2)))/255,green:(Xr(e.charCodeAt(3))*16+Xr(e.charCodeAt(4)))/255,blue:(Xr(e.charCodeAt(5))*16+Xr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Xr(e.charCodeAt(1))*16+Xr(e.charCodeAt(2)))/255,green:(Xr(e.charCodeAt(3))*16+Xr(e.charCodeAt(4)))/255,blue:(Xr(e.charCodeAt(5))*16+Xr(e.charCodeAt(6)))/255,alpha:(Xr(e.charCodeAt(7))*16+Xr(e.charCodeAt(8)))/255}}return null}function LG(e,t,r,n){return n===void 0&&(n=1),{red:e/255,green:t/255,blue:r/255,alpha:n}}var MN=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var s=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var a=r.root;if(!a)return null;var p=n.resultLimit,d=t.uri;if((d==="vscode://defaultsettings/keybindings.json"||Dy(d.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var h=[],g=0,y=a.items;g<y.length;g++){var C=y[g];if(C.type==="object")for(var M=0,I=C.properties;M<I.length;M++){var B=I[M];if(B.keyNode.value==="key"&&B.valueNode){var z=Ku.create(t.uri,Pa(t,C));if(h.push({name:_a(B.valueNode),kind:to.Function,location:z}),p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d),h}}}return h}var W=function(te,le,ye){return p>=0&&(le.type==="array"?le.items.forEach(function(he){return W(te,he,ye)}):le.type==="object"&&le.properties.forEach(function(he){if(p>=0){var Ee=he.valueNode;if(Ee){p--;var me=Ku.create(t.uri,Pa(t,he)),ve=ye?ye+"."+he.keyNode.value:he.keyNode.value;te.push({name:s.getKeyLabel(he),kind:s.getSymbolKind(Ee.type),location:me,containerName:ye}),W(te,Ee,ve)}}})),te},G=W([],a,void 0);return p<0&&(G.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d)),G},e.prototype.findDocumentSymbols2=function(t,r,n){var s=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var a=r.root;if(!a)return null;var p=n.resultLimit,d=t.uri;if((d==="vscode://defaultsettings/keybindings.json"||Dy(d.toLowerCase(),"/user/keybindings.json"))&&a.type==="array"){for(var h=[],g=0,y=a.items;g<y.length;g++){var C=y[g];if(C.type==="object")for(var M=0,I=C.properties;M<I.length;M++){var B=I[M];if(B.keyNode.value==="key"&&B.valueNode){var z=Pa(t,C),W=Pa(t,B.keyNode);if(h.push({name:_a(B.valueNode),kind:to.Function,range:z,selectionRange:W}),p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d),h}}}return h}var G=function(le,ye){return p>=0&&(ye.type==="array"?ye.items.forEach(function(he,Ee){if(he&&p>=0){p--;var me=Pa(t,he),ve=me,ce=String(Ee),Se=G([],he);le.push({name:ce,kind:s.getSymbolKind(he.type),range:me,selectionRange:ve,children:Se})}}):ye.type==="object"&&ye.properties.forEach(function(he){var Ee=he.valueNode;if(Ee&&p>=0){p--;var me=Pa(t,he),ve=Pa(t,he.keyNode),ce=G([],Ee);le.push({name:s.getKeyLabel(he),kind:s.getSymbolKind(Ee.type),range:me,selectionRange:ve,children:ce})}})),le},te=G([],a);return p<0&&(te.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(d)),te},e.prototype.getSymbolKind=function(t){switch(t){case"object":return to.Module;case"string":return to.String;case"number":return to.Number;case"array":return to.Array;case"boolean":return to.Boolean;default:return to.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:'"'+r+'"'},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(s){var a=[];if(s)for(var p=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,d=r.getMatchingSchemas(s.schema),h={},g=0,y=d;g<y.length;g++){var C=y[g];if(!C.inverted&&C.schema&&(C.schema.format==="color"||C.schema.format==="color-hex")&&C.node&&C.node.type==="string"){var M=String(C.node.offset);if(!h[M]){var I=FN(_a(C.node));if(I){var B=Pa(t,C.node);a.push({color:I,range:B})}if(h[M]=!0,p--,p<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),a}}}return a})},e.prototype.getColorPresentations=function(t,r,n,s){var a=[],p=Math.round(n.red*255),d=Math.round(n.green*255),h=Math.round(n.blue*255);function g(C){var M=C.toString(16);return M.length!==2?"0"+M:M}var y;return n.alpha===1?y="#"+g(p)+g(d)+g(h):y="#"+g(p)+g(d)+g(h)+g(Math.round(n.alpha*255)),a.push({label:y,textEdit:es.replace(s,JSON.stringify(y))}),a},e}();function Pa(e,t){return or.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var LN={schemaAssociations:{},schemas:{}};function DN(e,t){var r=[],n=[],s=[],a=-1,p=Gu(e.getText(),!1),d=p.scan();function h(Se){r.push(Se),n.push(s.length)}for(;d!==17;){switch(d){case 1:case 3:{var g=e.positionAt(p.getTokenOffset()).line,y={startLine:g,endLine:g,kind:d===1?"object":"array"};s.push(y);break}case 2:case 4:{var C=d===2?"object":"array";if(s.length>0&&s[s.length-1].kind===C){var y=s.pop(),M=e.positionAt(p.getTokenOffset()).line;y&&M>y.startLine+1&&a!==y.startLine&&(y.endLine=M-1,h(y),a=y.startLine)}break}case 13:{var g=e.positionAt(p.getTokenOffset()).line,I=e.positionAt(p.getTokenOffset()+p.getTokenLength()).line;p.getTokenError()===1&&g+1<e.lineCount?p.setPosition(e.offsetAt(qi.create(g+1,0))):g<I&&(h({startLine:g,endLine:I,kind:np.Comment}),a=g);break}case 12:{var B=e.getText().substr(p.getTokenOffset(),p.getTokenLength()),z=B.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(z){var M=e.positionAt(p.getTokenOffset()).line;if(z[1]){var y={startLine:M,endLine:M,kind:np.Region};s.push(y)}else{for(var W=s.length-1;W>=0&&s[W].kind!==np.Region;)W--;if(W>=0){var y=s[W];s.length=W,M>y.startLine&&a!==y.startLine&&(y.endLine=M,h(y),a=y.startLine)}}}break}}d=p.scan()}var G=t&&t.rangeLimit;if(typeof G!="number"||r.length<=G)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var te=[],le=0,ye=n;le<ye.length;le++){var he=ye[le];he<30&&(te[he]=(te[he]||0)+1)}for(var Ee=0,me=0,W=0;W<te.length;W++){var ve=te[W];if(ve){if(ve+Ee>G){me=W;break}Ee+=ve}}for(var ce=[],W=0;W<r.length;W++){var he=n[W];typeof he=="number"&&(he<me||he===me&&Ee++<G)&&ce.push(r[W])}return ce}function NN(e,t,r){function n(d){for(var h=e.offsetAt(d),g=r.getNodeFromOffset(h,!0),y=[];g;){switch(g.type){case"string":case"object":case"array":var C=g.offset+1,M=g.offset+g.length-1;C<M&&h>=C&&h<=M&&y.push(s(C,M)),y.push(s(g.offset,g.offset+g.length));break;case"number":case"boolean":case"null":case"property":y.push(s(g.offset,g.offset+g.length));break}if(g.type==="property"||g.parent&&g.parent.type==="array"){var I=p(g.offset+g.length,5);I!==-1&&y.push(s(g.offset,I))}g=g.parent}for(var B=void 0,z=y.length-1;z>=0;z--)B=Zm.create(y[z],B);return B||(B=Zm.create(or.create(d,d))),B}function s(d,h){return or.create(e.positionAt(d),e.positionAt(h))}var a=Gu(e.getText(),!0);function p(d,h){a.setPosition(d);var g=a.scan();return g===h?a.getTokenOffset()+a.getTokenLength():-1}return t.map(n)}function BN(e){var t=e.promiseConstructor||Promise,r=new TN(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(LN);var n=new pN(r,e.contributions,t,e.clientCapabilities),s=new dN(r,e.contributions,t),a=new MN(r),p=new VN(r,t);return{configure:function(d){r.clearExternalSchemas(),d.schemas&&d.schemas.forEach(function(h){r.registerExternalSchema(h.uri,h.fileMatch,h.schema)}),p.configure(d)},resetSchema:function(d){return r.onResourceChange(d)},doValidation:p.doValidation.bind(p),parseJSONDocument:function(d){return aN(d,{collectComments:!0})},newJSONDocument:function(d,h){return oN(d,h)},doComplete:n.doComplete.bind(n),findDocumentSymbols:a.findDocumentSymbols.bind(a),findDocumentSymbols2:a.findDocumentSymbols2.bind(a),findColorSymbols:function(d,h){return a.findDocumentColors(d,h).then(function(g){return g.map(function(y){return y.range})})},findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:s.doHover.bind(s),getFoldingRanges:DN,getSelectionRanges:NN,format:function(d,h,g){var y=void 0;if(h){var C=d.offsetAt(h.start),M=d.offsetAt(h.end)-C;y={offset:C,length:M}}var I={tabSize:g?g.tabSize:4,insertSpaces:g?g.insertSpaces:!0,eol:`
276
276
  `};return J3(d.getText(),y,I).map(function(B){return es.replace(or.create(d.positionAt(B.offset),d.positionAt(B.offset+B.length)),B.content)})}}}var Qw=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});let Ta=null;kt.Qg&&(Ta=c(46944),c(13156),c(82518),c(33201),c(77436),c(29641),c(71628),c(19372),c(47629),c(68286),c(47463));const Zu=BN({});Ta&&(Ta.registerHelper("lint","json",function(e,t){return Qw(this,null,function*(){const{schema:r,setError:n}=t;Zu.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:r}]});const s=qm.create(t.id+".json","json",0,e),a=Zu.parseJSONDocument(s),p=yield Zu.doValidation(s,a);return p.length?n&&n(p[0].message):n&&n(void 0),p.map(d=>({from:Ta.Pos(d.range.start.line,d.range.start.character),to:Ta.Pos(d.range.end.line,d.range.end.character),message:d.message}))})}),Ta.registerHelper("hint","json",(e,t)=>Qw(void 0,null,function*(){const r=t.schema;if(!r)return;Zu.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:r}]});const n=e.getDoc().getCursor(),s=e.getTokenAt(n),a=qm.create(t.id+".json","json",0,e.getValue()),p=Zu.parseJSONDocument(a),d=yield Zu.doComplete(a,{line:n.line,character:n.ch},p),h=y=>{let C="";for(;y--;)C+=" ";return C};let g=d?d.items.map(y=>({text:y.insertText,displayText:y.label,filter:y.filterText||y.label,from:{line:y.textEdit.range.start.line,ch:y.textEdit.range.start.character},to:{line:y.textEdit.range.end.line,ch:y.textEdit.range.end.character},hint:(C,M,I)=>{const B="_$__REDOC_CURSOR_HERE";let z=I.text.replace(/(\$1|\${1:[^}]+})/,B)||"";if(z=z.replace(/(\$\d+|\${[^}]+})/g,"")||"",C.setSelection(I.from,I.to),z.indexOf(`
277
277
  `)>-1){const G=C.getLine(C.getCursor().line).search(/(\S|$)/);z=z.replace(/\n/g,`
278
278
  `+h(G))}C.replaceSelection(z);const W=C.getSearchCursor(B,I.from);W.findNext()&&(C.setCursor(W.from()),W.replace(""))}})):[];return/(property|string)/.test(s.type||"")&&(g=g.filter(y=>y.filter.replace(/(^"|"$)/g,"").startsWith(s.string.replace(/(^"|"$)/g,"")))),{from:Ta.Pos(n.line,s.start),to:Ta.Pos(n.line,n.ch),list:g}})));const $N=Kt.vJ`
@@ -323,7 +323,7 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hN(e){return e.i
323
323
  flex: 1;
324
324
  border-radius: var(--panel-border-radius);
325
325
  }
326
- `,UN=Lo(({fieldState:e,fieldApi:t,onChange:r,onBlur:n,forwardedRef:s,id:a,mode:p,schema:d})=>{let h;const g=(W,G)=>{/^[a-zA-Z0-9_":]$/.test(G.key)&&h.execCommand("autocomplete")},y=W=>{h=W,h.on("keyup",g)},C=()=>{h.refresh()},M=()=>h.showHint({completeSingle:!0});(0,Vr.useMount)(()=>{setTimeout(()=>{h.refresh()},0),document.addEventListener("click",C)}),(0,Vr.useUnmount)(()=>{document.removeEventListener("click",C)});const{value:I}=e,{setValue:B,setTouched:z}=t;return R.createElement(R.Fragment,null,R.createElement($N,null),R.createElement(I3.fk,{editorDidMount:y,value:I||"",ref:s,onBeforeChange:(W,G,te)=>{B(te),r&&r(te)},onBlur:W=>{z(!1),n&&n(W)},options:{mode:p||Um.Tr.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":M,"Ctrl-Space":M},hintOptions:{id:a,completeSingle:!1,schema:d}}}))});var Uy=c(79966);function WN({mediaType:e,mediaContent:t,properties:r,id:n,resolvedBody:s,formApi:a,getActiveSample:p,validate:d}){const h=(0,Uy.yN)(t),g=e.examples||{},y=Object.keys(g),C=e.schema,M=Tx(C||{},e.name)||e.name===Um.Tr.MULTIPART||e.name===Um.Tr.URL_ENCODED,{exampleKey:I}=(0,wy.C6)(e.operation,g),B=(0,kt.YQ)((0,Wt.P6)(n,e.name,I,g))||(0,Wt.oY)(g[I],r),z=(0,R.useCallback)((te="",le="",ye=[])=>he=>{(0,kt.WW)((0,Wt.P6)(n,te,le,ye),he)},[n]),W=(0,R.useCallback)(te=>{h&&h(te),a.setValue("body",p(te))},[a,p,h]),G=(0,R.useCallback)((te,le)=>{a.setValue(`body.${te}`,le)},[a]);return R.createElement(R.Fragment,null,y.length&&y.length!==1&&R.createElement(wy.b_,{examples:g,onChange:W,exampleKey:I,panel:"try-it"})||null,M?R.createElement(k3,{mediaType:e,formApi:a,onChange:G}):R.createElement(UN,{id:"body"+n,field:"body",initialValue:B,schema:((s==null?void 0:s.content[e.name])||{}).schema,mode:e.name,validate:d,onChange:z(e.name,I,g)}))}const HN=(0,R.memo)(WN);var zN=c(17397),GN=Object.defineProperty,KN=Object.defineProperties,JN=Object.getOwnPropertyDescriptors,Zw=Object.getOwnPropertySymbols,YN=Object.prototype.hasOwnProperty,XN=Object.prototype.propertyIsEnumerable,qw=(e,t,r)=>t in e?GN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QN=(e,t)=>{for(var r in t||(t={}))YN.call(t,r)&&qw(e,r,t[r]);if(Zw)for(var r of Zw(t))XN.call(t,r)&&qw(e,r,t[r]);return e},ZN=(e,t)=>KN(e,JN(t));function qN({body:{content:e},formApi:t,resolvedBody:r,properties:n,id:s,validate:a,pointer:p}){const d=(0,Fo.useRecoilValue)(zN.UF),{examples:h,name:g}=e&&(0,Zs.getActiveMediaType)(e,d)||{},y=(0,R.useCallback)(I=>{if(!e||!e.hasSample||!(h!=null&&h[I]))return"";const B=g&&(0,kt.YQ)((0,Wt.P6)(s,g,I,h)),z=B?JSON.parse(B):h==null?void 0:h[I];return(0,Wt.oY)(z,n)},[g,h,s,e,n]),{activeExampleName:C}=(0,Fo.useRecoilValue)((0,Oy.N)(p));(0,R.useEffect)(()=>{if(g){const I=(0,Wt.P6)(s,g,C,h);t.setValue("body",(0,kt.YQ)(I)||y(C||""))}else t.setValue("body",JSON.stringify(n||{},null,2))},[h,C,g,t,y,s,n]);const M=I=>R.createElement(w3.C,ZN(QN({},I),{variant:"dark",fullWidth:!0,Label:A3,Dropdown:E3.Lt}));return R.createElement(R.Fragment,null,R.createElement(O3.d,{content:e,renderDropdown:M},I=>R.createElement(HN,{mediaType:I,mediaContent:e,resolvedBody:r,id:s,properties:n,getActiveSample:y,formApi:t,validate:a})))}const e5=(0,R.memo)(qN),t5=Lo(({initValue:e,paramEnum:t,fieldApi:r})=>{const[n,s]=(0,R.useState)(),a=t.map((h,g)=>({idx:g,value:h})),p=h=>{r.setValue(h.value),s(h.value)};(0,Vr.useMount)(()=>{if(e)if(Array.isArray(e)){const h=e.length?e[0]:"";s(h),r.setValue(h)}else s(e),r.setValue(e)});const d=()=>{r.setValue(""),s("")};return R.createElement(li.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:n,options:a,handleClear:d,onChange:p})}),r5=({name:e,param:t,place:r,renderParameter:n})=>{var s,a,p,d,h;const[g,y]=R.useState([]),C=()=>{y([...g,g.length?g[g.length-1]+1:0])},M=B=>{y(g.filter(z=>z!==B))},I=(s=t.schema.items)!=null&&s.fields?(a=t.schema.items)==null?void 0:a.fields:[{schema:((p=t.schema.items)==null?void 0:p.schema)||t.schema.items,name:"",required:t.required,description:(d=t.schema.items)==null?void 0:d.description,externalDocs:(h=t.schema.items)==null?void 0:h.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return R.createElement(R.Fragment,null,R.createElement(eO,null,R.createElement(st.lX,{required:t.required},e,"(",g.length," items)"),R.createElement("span",{onClick:C},"Add item +")),g==null?void 0:g.map((B,z)=>R.createElement(eO,{key:B},I.map(W=>n(W,r,`${e}.[${B}]`,`[${z}]${W.name&&"."+W.name}`,R.createElement(n5,{onClick:()=>M(B)},"Delete"))))))},eO=Kt.ZP.div`
326
+ `,UN=Lo(({fieldState:e,fieldApi:t,onChange:r,onBlur:n,forwardedRef:s,id:a,mode:p,schema:d})=>{let h;const g=(W,G)=>{/^[a-zA-Z0-9_":]$/.test(G.key)&&h.execCommand("autocomplete")},y=W=>{h=W,h.on("keyup",g)},C=()=>{h.refresh()},M=()=>h.showHint({completeSingle:!0});(0,Vr.useMount)(()=>{setTimeout(()=>{h.refresh()},0),document.addEventListener("click",C)}),(0,Vr.useUnmount)(()=>{document.removeEventListener("click",C)});const{value:I}=e,{setValue:B,setTouched:z}=t;return R.createElement(R.Fragment,null,R.createElement($N,null),R.createElement(I3.fk,{editorDidMount:y,value:I||"",ref:s,onBeforeChange:(W,G,te)=>{B(te),r&&r(te)},onBlur:W=>{z(!1),n&&n(W)},options:{mode:p||Um.Tr.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":M,"Ctrl-Space":M},hintOptions:{id:a,completeSingle:!1,schema:d}}}))});var Uy=c(79966);function WN({mediaType:e,mediaContent:t,properties:r,id:n,resolvedBody:s,formApi:a,getActiveSample:p,validate:d}){const h=(0,Uy.yN)(t),g=e.examples||{},y=Object.keys(g),C=e.schema,M=Tx(C||{},e.name)||e.name===Um.Tr.MULTIPART||e.name===Um.Tr.URL_ENCODED,{exampleKey:I}=(0,wy.C6)(e.operation,g),B=(0,kt.YQ)((0,Wt.P6)(n,e.name,I,g))||(0,Wt.oY)(g[I],r),z=(0,R.useCallback)((te="",le="",ye=[])=>he=>{(0,kt.WW)((0,Wt.P6)(n,te,le,ye),he)},[n]),W=(0,R.useCallback)(te=>{h&&h(te),a.setValue("body",p(te))},[a,p,h]),G=(0,R.useCallback)((te,le)=>{a.setValue(`body.${te}`,le)},[a]);return R.createElement(R.Fragment,null,y.length&&y.length!==1&&R.createElement(wy.b_,{examples:g,onChange:W,exampleKey:I,panel:"try-it"})||null,M?R.createElement(k3,{mediaType:e,formApi:a,onChange:G}):R.createElement(UN,{id:"body"+n,field:"body",initialValue:B,schema:((s==null?void 0:s.content[e.name])||{}).schema,mode:e.name,validate:d,onChange:z(e.name,I,g)}))}const HN=(0,R.memo)(WN);var zN=c(17397),GN=Object.defineProperty,KN=Object.defineProperties,JN=Object.getOwnPropertyDescriptors,Zw=Object.getOwnPropertySymbols,YN=Object.prototype.hasOwnProperty,XN=Object.prototype.propertyIsEnumerable,qw=(e,t,r)=>t in e?GN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QN=(e,t)=>{for(var r in t||(t={}))YN.call(t,r)&&qw(e,r,t[r]);if(Zw)for(var r of Zw(t))XN.call(t,r)&&qw(e,r,t[r]);return e},ZN=(e,t)=>KN(e,JN(t));function qN({body:{content:e},formApi:t,resolvedBody:r,properties:n,id:s,validate:a,pointer:p}){const d=(0,Fo.useRecoilValue)(zN.UF),{examples:h,name:g}=e&&(0,Zs.getActiveMediaType)(e,d)||{},y=(0,R.useCallback)(I=>{if(!e||!e.hasSample||!(h!=null&&h[I]))return"";const B=g&&(0,kt.YQ)((0,Wt.P6)(s,g,I,h)),z=B?JSON.parse(B):h==null?void 0:h[I];return(0,Wt.oY)(z,n)},[g,h,s,e,n]),{activeExampleName:C}=(0,Fo.useRecoilValue)((0,Oy.N)(p));(0,R.useEffect)(()=>{if(g){const I=(0,Wt.P6)(s,g,C,h);t.setValue("body",(0,kt.YQ)(I)||y(C||""))}else t.setValue("body",JSON.stringify(n||{},null,2))},[h,C,g,t,y,s,n]);const M=I=>R.createElement(w3.C,ZN(QN({},I),{variant:"dark",fullWidth:!0,Label:A3,Dropdown:E3.Lt}));return R.createElement(R.Fragment,null,R.createElement(O3.d,{content:e,renderDropdown:M},I=>R.createElement(HN,{mediaType:I,mediaContent:e,resolvedBody:r,id:s,properties:n,getActiveSample:y,formApi:t,validate:a})))}const e5=(0,R.memo)(qN),t5=Lo(({initValue:e,paramEnum:t,fieldApi:r})=>{const[n,s]=(0,R.useState)(),a=t.map((h,g)=>({idx:g,value:h})),p=h=>{r.setValue(h.value),s(h.value)};(0,Vr.useMount)(()=>{if(e)if(Array.isArray(e)){const h=e.length?e[0]:"";s(h),r.setValue(h)}else s(e),r.setValue(e)});const d=()=>{r.setValue(""),s("")};return R.createElement(Qi.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:n,options:a,handleClear:d,onChange:p})}),r5=({name:e,param:t,place:r,renderParameter:n})=>{var s,a,p,d,h;const[g,y]=R.useState([]),C=()=>{y([...g,g.length?g[g.length-1]+1:0])},M=B=>{y(g.filter(z=>z!==B))},I=(s=t.schema.items)!=null&&s.fields?(a=t.schema.items)==null?void 0:a.fields:[{schema:((p=t.schema.items)==null?void 0:p.schema)||t.schema.items,name:"",required:t.required,description:(d=t.schema.items)==null?void 0:d.description,externalDocs:(h=t.schema.items)==null?void 0:h.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return R.createElement(R.Fragment,null,R.createElement(eO,null,R.createElement(st.lX,{required:t.required},e,"(",g.length," items)"),R.createElement("span",{onClick:C},"Add item +")),g==null?void 0:g.map((B,z)=>R.createElement(eO,{key:B},I.map(W=>n(W,r,`${e}.[${B}]`,`[${z}]${W.name&&"."+W.name}`,R.createElement(n5,{onClick:()=>M(B)},"Delete"))))))},eO=Kt.ZP.div`
327
327
  display: flex;
328
328
  width: 100%;
329
329
  align-items: center;
@@ -351,7 +351,7 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hN(e){return e.i
351
351
  position: relative;
352
352
  margin-left: 5px;
353
353
  display: inline-block;
354
- `;var cp=(e=>(e.ARRAY="array",e.OBJECT="object",e))(cp||{});function i5({schema:e,example:t}){return`(${e.type})`+(t?` ${t}`:"")}function s5(e){const t={};return e.forEach(r=>{r.in&&(t[r.in]||(t[r.in]=[]),t[r.in].push(r))}),t}function o5({schema:e,required:t}){return r=>{if(t&&!r)return"Field is required";if(t&&e.type===cp.ARRAY&&Array.isArray(r)){if(r.length>(e.rawSchema&&e.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${e.rawSchema.maxItems}`;if(r.length<(e.rawSchema&&e.rawSchema.minItems||0)){const n=e.rawSchema.minItems;return`You should select at least ${n===1?`${n} item`:`${n} items`}`}}}}function a5(e){if(e.type===cp.ARRAY){const t=e.default||e.example;if(!t&&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(!t&&typeof e.rawSchema.items!="boolean"&&!Array.isArray(e.rawSchema.items)&&(0,kt.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 t||[]}else return(Number.isInteger(e.default)?e.default.toString():e.default)||e.example}function l5({oneOfType:e}){return e}const u5=["path","query","cookie","header"];function c5({id:e,param:t,values:r}){const n=(0,R.useMemo)(()=>o5(t),[t]),s=Array.isArray(t.schema.enum)&&t.schema.enum.length?t.schema.enum:void 0,a=a5(t.schema),p=e.split(".").map(d=>(0,kt.dw)(d));return s?R.createElement(st.NI,null,R.createElement(t5,{initValue:a,paramEnum:s,field:e})):R.createElement(ci,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:i5(t),validate:n,initialValue:a||(0,kt.U2)(r,p),validateOnBlur:!0,validateOnChange:!0})}function f5({values:e,operation:t}){const r=(0,R.useMemo)(()=>s5(t.parameters||[]),[t]),n=(a,p,d,h,g)=>{var y;const C=d?(0,kt.s1)(d,a.name):a.name,M=l5(a.schema),I=d?[p,d]:[a.in],B=(0,kt.s1)(...I,(0,kt.A8)(a.name));return M&&console.warn(`Unsupported parameter definition: "${M}"`),(Array.isArray(a.schema.type)?a.schema.type:[a.schema.type]).includes(cp.ARRAY)?R.createElement(r5,{key:B,name:C,param:a,place:p,renderParameter:n}):a.schema.type===cp.OBJECT?(y=a.schema.fields)==null?void 0:y.map(W=>n(W,p,C)):R.createElement(st.NI,{key:B},R.createElement(st.lX,{required:a.required},h||C,": ",g),M?R.createElement(st.GE,null,"Unsupported field schema definition"):R.createElement(c5,{id:B,param:a,values:e}))},s=a=>{const p=r[a];return!p||!p.length?null:R.createElement(R.Fragment,{key:a},R.createElement(st.NI,null,R.createElement(st.iG,null," # ",a," parameters "),R.createElement("span",null,"\xA0")),p.map(d=>n(d,a)))};return R.createElement(st.iA,null,u5.map(s))}var p5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function d5(e){return p5(this,null,function*(){return(yield fetch(e)).json()})}const h5=Kt.ZP.div`
354
+ `;var cp=(e=>(e.ARRAY="array",e.OBJECT="object",e))(cp||{});function i5({schema:e,example:t}){return`(${e.type})`+(t?` ${t}`:"")}function s5(e){const t={};return e.forEach(r=>{r.in&&(t[r.in]||(t[r.in]=[]),t[r.in].push(r))}),t}function o5({schema:e,required:t}){return r=>{if(t&&!r)return"Field is required";if(t&&e.type===cp.ARRAY&&Array.isArray(r)){if(r.length>(e.rawSchema&&e.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${e.rawSchema.maxItems}`;if(r.length<(e.rawSchema&&e.rawSchema.minItems||0)){const n=e.rawSchema.minItems;return`You should select at least ${n===1?`${n} item`:`${n} items`}`}}}}function a5(e){if(e.type===cp.ARRAY){const t=e.default||e.example;if(!t&&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(!t&&typeof e.rawSchema.items!="boolean"&&!Array.isArray(e.rawSchema.items)&&(0,kt.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 t||[]}else return(Number.isInteger(e.default)?e.default.toString():e.default)||e.example}function l5({oneOfType:e}){return e}const u5=["path","query","cookie","header"];function c5({id:e,param:t,values:r}){const n=(0,R.useMemo)(()=>o5(t),[t]),s=Array.isArray(t.schema.enum)&&t.schema.enum.length?t.schema.enum:void 0,a=a5(t.schema),p=e.split(".").map(d=>(0,kt.dw)(d));return s?R.createElement(st.NI,null,R.createElement(t5,{initValue:a,paramEnum:s,field:e})):R.createElement(ui,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:i5(t),validate:n,initialValue:a||(0,kt.U2)(r,p),validateOnBlur:!0,validateOnChange:!0})}function f5({values:e,operation:t}){const r=(0,R.useMemo)(()=>s5(t.parameters||[]),[t]),n=(a,p,d,h,g)=>{var y;const C=d?(0,kt.s1)(d,a.name):a.name,M=l5(a.schema),I=d?[p,d]:[a.in],B=(0,kt.s1)(...I,(0,kt.A8)(a.name));return M&&console.warn(`Unsupported parameter definition: "${M}"`),(Array.isArray(a.schema.type)?a.schema.type:[a.schema.type]).includes(cp.ARRAY)?R.createElement(r5,{key:B,name:C,param:a,place:p,renderParameter:n}):a.schema.type===cp.OBJECT?(y=a.schema.fields)==null?void 0:y.map(W=>n(W,p,C)):R.createElement(st.NI,{key:B},R.createElement(st.lX,{required:a.required},h||C,": ",g),M?R.createElement(st.GE,null,"Unsupported field schema definition"):R.createElement(c5,{id:B,param:a,values:e}))},s=a=>{const p=r[a];return!p||!p.length?null:R.createElement(R.Fragment,{key:a},R.createElement(st.NI,null,R.createElement(st.iG,null," # ",a," parameters "),R.createElement("span",null,"\xA0")),p.map(d=>n(d,a)))};return R.createElement(st.iA,null,u5.map(s))}var p5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function d5(e){return p5(this,null,function*(){return(yield fetch(e)).json()})}const h5=Kt.ZP.div`
355
355
  position: relative;
356
356
  height: 4px;
357
357
  display: block;
@@ -498,12 +498,13 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function hN(e){return e.i
498
498
  margin-top: 5px;
499
499
  }
500
500
  `}
501
- `;function T5(e,t){const{fullWidth:r,id:n,label:s,nowrap:a}=e;return R.createElement(P5,{fullWidth:r,nowrap:a},R.createElement(C5,A5(E5({},e),{type:"checkbox",ref:t})),R.createElement(_5,{htmlFor:n},s))}const iO=(0,R.forwardRef)(T5),V5=11,k5=Lo(({items:e,fieldApi:t,validateOnChange:r,maxDisplayedItems:n,showControls:s,trimItemsLength:a})=>{const[p,d]=(0,R.useState)(!0),h=W=>{const G=W.target.value,te=W.target.checked;t.setTouched(!0);const le=t.getValue()||[];let ye;if(te)ye=[...le,G];else{const he=le.indexOf(G);ye=[...le.slice(0,he),...le.slice(he+1)]}t.setValue(ye)},g=W=>t.getValue().includes(W),y=()=>{d(W=>!W)},C=()=>{t.setValue(e)},M=()=>{t.setValue([])},I=t.getError(),B=n||V5,z=a&&p?e.slice(0,B):e;return R.createElement("div",null,s?R.createElement(j5,null,R.createElement(Vr.SamplesControlButton,{onClick:()=>{C()}},"Select all"),R.createElement(Vr.SamplesControlButton,{onClick:()=>{M()}},"Clear")):null,R.createElement("div",null,z.map(W=>R.createElement(iO,{fullWidth:!0,id:W,value:W,checked:g(W),label:W,key:W,onChange:G=>{h(G),r&&t.validate()}})),e.length>B&&a?R.createElement(I5,{onClick:()=>{y()}},p?"Show all":"Collapse"):null),I?R.createElement(st.Xq,null,I):"")}),j5=(0,Kt.ZP)(Vr.SampleControls)`
502
- opacity: 1;
503
- text-align: left;
504
- `,I5=(0,Kt.ZP)(Vr.SamplesControlButton)`
501
+ `;function T5(e,t){const{fullWidth:r,id:n,label:s,nowrap:a}=e;return R.createElement(P5,{fullWidth:r,nowrap:a},R.createElement(C5,A5(E5({},e),{type:"checkbox",ref:t})),R.createElement(_5,{htmlFor:n},s))}const iO=(0,R.forwardRef)(T5),V5=11,k5=Lo(({items:e,fieldApi:t,validateOnChange:r,maxDisplayedItems:n,showControls:s,trimItemsLength:a})=>{const[p,d]=(0,R.useState)(!0),h=W=>{const G=W.target.value,te=W.target.checked;t.setTouched(!0);const le=t.getValue()||[];let ye;if(te)ye=[...le,G];else{const he=le.indexOf(G);ye=[...le.slice(0,he),...le.slice(he+1)]}t.setValue(ye)},g=W=>t.getValue().includes(W),y=()=>{d(W=>!W)},C=()=>{t.setValue(e)},M=()=>{t.setValue([])},I=t.getError(),B=n||V5,z=a&&p?e.slice(0,B):e;return R.createElement("div",null,s?R.createElement(Vr.CodeBlockControls,{controls:{select:{onClick:C,label:"Select all",tooltipText:"Select all checkboxes"},deselect:{onClick:M,label:"Deselect all",tooltipText:"Deselect all checkboxes"}}}):null,R.createElement(j5,null,z.map(W=>R.createElement(iO,{fullWidth:!0,id:W,value:W,checked:g(W),label:W,key:W,onChange:G=>{h(G),r&&t.validate()}})),e.length>B&&a?R.createElement(I5,{onClick:()=>{y()}},p?"Show all":"Collapse"):null),I?R.createElement(st.Xq,null,I):"")}),j5=Kt.ZP.div`
502
+ padding: 10px;
503
+ background-color: var(--panel-samples-input-background-color);
504
+ border-radius: 0 0 var(--border-radius) var(--border-radius);
505
+ `,I5=(0,Kt.ZP)(Vr.CodeBlockControlButton)`
505
506
  float: right;
506
- `;function sO(e){const{scopes:t,id:r}=e;let n=[];try{n=JSON.parse((0,kt.YQ)(`auth.${r}.scopes`))}catch(s){}return!t||!t.length?R.createElement(R.Fragment,null):R.createElement(st.NI,null,R.createElement(st.lX,null," Scopes: "),R.createElement(k5,{field:`auth.${r}.scopes`,initialValue:n,items:t,showControls:!0,trimItemsLength:!0}))}const R5=({token:e,loading:t,error:r})=>t?R.createElement(st.GE,null,"Please, finish your authorization flow or cancel authorization."):r?R.createElement(m5,null,R.createElement(st.Xq,null,r)):e!=null&&e.access_token?null:R.createElement(st.GE,null," No Access Token. Please, Authorize. ");var F5=Object.defineProperty,M5=Object.defineProperties,L5=Object.getOwnPropertyDescriptors,oO=Object.getOwnPropertySymbols,D5=Object.prototype.hasOwnProperty,N5=Object.prototype.propertyIsEnumerable,aO=(e,t,r)=>t in e?F5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nv=(e,t)=>{for(var r in t||(t={}))D5.call(t,r)&&aO(e,r,t[r]);if(oO)for(var r of oO(t))N5.call(t,r)&&aO(e,r,t[r]);return e},Wy=(e,t)=>M5(e,L5(t)),B5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function $5(e){if(!e)return"Field is required"}const iv=({usePkce:e,form:t,id:r,formApi:n,flow:s,tokenUrl:a,authCorsProxyUrl:p,tokenEndpointAuthMethod:d,server:h,scopes:g,authorizationUrl:y,defaultValues:C,clientId:M})=>{var I,B,z,W;const{oAuth2RedirectURI:G,routingBasePath:te}=(0,Fo.useRecoilValue)(Hu.lk),[le,ye]=(0,R.useState)(null),[he,Ee]=(0,R.useState)(!1),[me,ve]=(0,R.useState)(!1),[ce,Se]=(0,R.useState)(void 0),[Ce,Me]=(0,R.useState)(void 0),[Qe,wt]=(0,R.useState)(void 0),ft=((B=(I=t.values)==null?void 0:I.auth)==null?void 0:B[r])||{},Ar=((W=(z=t.errors)==null?void 0:z.auth)==null?void 0:W[r])||{},Qr=ce!==void 0&&Ce!==Qe?{label:"sync",onClick:()=>{ce&&Me(Qe)}}:void 0;(0,R.useEffect)(()=>{if(e){const rr=(0,_l.CY)(43);vS(rr).then(Bt=>{Se(rr),Me(Bt),wt(Bt)})}},[e]);const Rr=rr=>{if(!rr||(n.validate(),!(0,_l.Qr)(Ar)))return;Ee(!0),ye(null);const Bt=p?p+(0,Wt.jg)(rr):rr,Un=p&&a?p+(0,Wt.jg)(a):a,ro=n.getValue(`auth.${r}.scopes`),Pi={authorizationUrl:Bt.startsWith("http")?Bt:h+Bt,clientId:ft.client_id,scopes:ro,redirectUri:G,routingBasePath:te,successCallback:Sn=>{n.setValue(`auth.${r}.token`,Sn),Ee(!1),ye(null)},errorCallback:Sn=>{Ee(!1),ye((Sn==null?void 0:Sn.message)||"Failed to retrieve the access token")}};if(s==="implicit"&&Cs.authorizeImplicit(Pi),!(0,Wt.xl)(d)){console.log(`Unsupported token endpoint auth method: ${d}`);return}s==="authorizationCode"&&Cs.authorizeAuthorizationCode(nv(Wy(nv({},Pi),{tokenUrl:Un!=null&&Un.startsWith("http")?Un:h+Un,clientSecret:ft.client_secret,extraHeaders:(0,Wt.Or)({authMethod:d,clientId:ft.client_id,clientSecret:ft.client_secret})}),e&&{codeVerifier:ce,codeChallenge:Ce}))},Zr=()=>{Ht(),ye(null)},Pr=()=>{Ee(!1),ye(null),Cs.clearRedirectData(s)},Ht=()=>{n.setValue(`auth.${r}.token`,"")},yr=()=>{ve(rr=>!rr)},ar=rr=>B5(void 0,[rr],function*({target:{value:Bt}}){const Un=yield vS(Bt);Se(Bt),wt(Un)});if(!y)return R.createElement(st.Xq,null,"No flow info");let Ze=(0,kt.YQ)(`auth.${r}.token`)||JSON.stringify(C==null?void 0:C.token);Ze=Ze?JSON.parse(Ze):"";const dt=(0,kt.Al)(r,"client_id"),Ut={field:`auth.${r}.client_id`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${r}.client_id`)||M||(C==null?void 0:C.client_id),initValue:(0,kt.YQ)(`auth.${r}.client_id`)||M||(C==null?void 0:C.client_id),placeholder:"Your OAuth2 app Client ID",validate:$5,validateOnBlur:!0,validateOnChange:!0};return R.createElement("div",null,R.createElement(st.n5,null,R.createElement(st.NI,null,R.createElement(st.lX,null," Client ID: "),dt?R.createElement(qf,Wy(nv({},Ut),{options:dt})):R.createElement(ci,Wy(nv({},Ut),{"data-cy":"client-id-input",panel:"try-it"}))),s==="authorizationCode"&&R.createElement(R.Fragment,null,(!(e!=null&&e.hideClientSecretInput)||!e)&&R.createElement(st.NI,null,R.createElement(st.lX,null,"Client Secret:"),R.createElement(ci,{type:"password",fullWidth:!0,field:`auth.${r}.client_secret`,initialValue:(0,kt.YQ)(`auth.${r}.client_secret`)||(C==null?void 0:C.client_secret),validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),e&&!e.disableManualConfiguration&&R.createElement(g5,null,R.createElement(iO,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:me,onChange:yr,"data-cy":"pkce-options-toggle"}),me&&R.createElement(y5,null,R.createElement(st.NI,null,R.createElement(st.lX,null,"Code Verifier"),R.createElement(Zf,{fullWidth:!0,value:ce,onChange:ar,panel:"try-it","data-cy":"code-verifier-input"})),R.createElement(st.NI,null,R.createElement(st.lX,null,"Code Challenge"),R.createElement(Zf,{fullWidth:!0,value:Ce,onChange:({target:{value:rr}})=>{Me(rr)},inputActionButton:Qr,panel:"try-it","data-cy":"code-challenge-input"}))))),R.createElement(ci,{fullWidth:!0,field:`auth.${r}.token`,type:"hidden",initialValue:Ze,panel:"try-it"}),R.createElement(sO,{id:r,scopes:g}),ft.token&&ft.token.access_token?R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token: "),R.createElement(Zf,{disabled:!0,type:"password",fullWidth:!0,value:ft.token.access_token,panel:"try-it"})):null),R.createElement(v5,null,ft.token&&ft.token.access_token?R.createElement(Vr.Button,{fullWidth:!0,onClick:Zr},"Log out"):he?R.createElement(R.Fragment,null,R.createElement(Vr.Button,{fullWidth:!0,onClick:Pr},"Cancel"),R.createElement(tO,null)):R.createElement(Vr.Button,{fullWidth:!0,color:"secondary",disabled:!(0,_l.Qr)(Ar),onClick:()=>{Rr(y)}},"Authorize")),he||le||!ft.token||!ft.token.access_token&&R.createElement(R5,{loading:he,error:le,token:ft.token}))};var U5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function W5(e){var t,r;const{scheme:n,defaultValues:s}=e,[a,p]=(0,R.useState)({}),[d,h]=(0,R.useState)(),[g,y]=(0,R.useState)(!1);(0,R.useEffect)(()=>{C(n.openIdConnectUrl)},[n.openIdConnectUrl]);const C=M=>U5(this,null,function*(){y(!0),h("");try{const I=yield d5(M);p(I)}catch(I){h(I.message)}y(!1)});return g?R.createElement(H5,null):d?R.createElement(lO,{message:d}):R.createElement("div",null,R.createElement("div",null,(t=a==null?void 0:a.response_types_supported)!=null&&t.includes("token")?R.createElement(R.Fragment,null,R.createElement(li.S6,null,"OAuth2 Implicit Flow"),R.createElement(iv,{key:e.id,authorizationUrl:a.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:a.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:s})):(r=a==null?void 0:a.response_types_supported)!=null&&r.includes("code")?R.createElement(R.Fragment,null,R.createElement(li.S6,null,"OAuth2 Authorization Flow"),R.createElement(iv,{key:e.id,authorizationUrl:a.authorization_endpoint,tokenUrl:a.token_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:a.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,tokenEndpointAuthMethod:a==null?void 0:a.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:s})):R.createElement("div",null,"Unsupported flow")))}function H5(){return R.createElement("div",null,R.createElement("div",null,R.createElement("div",null,"Fetching OpenID Connect metadata..."),R.createElement(tO,null)))}function lO({message:e}){return R.createElement("div",null,R.createElement("div",null,R.createElement(st.Xq,null,e)))}var z5=Object.defineProperty,G5=Object.defineProperties,K5=Object.getOwnPropertyDescriptors,uO=Object.getOwnPropertySymbols,J5=Object.prototype.hasOwnProperty,Y5=Object.prototype.propertyIsEnumerable,cO=(e,t,r)=>t in e?z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fO=(e,t)=>{for(var r in t||(t={}))J5.call(t,r)&&cO(e,r,t[r]);if(uO)for(var r of uO(t))Y5.call(t,r)&&cO(e,r,t[r]);return e},pO=(e,t)=>G5(e,K5(t)),X5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function Q5(e){if(!e)return"Token is required"}const Z5=({form:e,id:t,formApi:r,server:n,flow:s,authCorsProxyUrl:a,defaultValues:p,clientId:d})=>{var h,g,y,C;const[M,I]=(0,R.useState)(""),[B,z]=(0,R.useState)(!1),[W,G]=(0,R.useState)(!0),te=((g=(h=e==null?void 0:e.values)==null?void 0:h.auth)==null?void 0:g[t])||{},le=((C=(y=e.errors)==null?void 0:y.auth)==null?void 0:C[t])||{},ye=()=>{r.setValue(`auth.${t}.token`,""),(0,kt.WW)(`auth.${t}.token`,"")},he=()=>{G(Ce=>!Ce)},Ee=()=>X5(void 0,null,function*(){if(B)return;const Ce=a&&s.tokenUrl?a+(0,Wt.jg)(s.tokenUrl):s.tokenUrl;if(le.client_id||le.client_secret){console.log("Provide client_id and client_secret");return}const Me=te.client_id,Qe=te.client_secret;if(!Me||!Qe){console.log("Provide client_id and client_secret");return}z(!0);const wt=s["x-tokenEndpointAuthMethod"];if(!(0,Wt.xl)(wt)){console.log(`Unsupported token endpoint auth method: ${wt}`);return}yield Cs.authorizeClientCredentials({tokenUrl:Ce.startsWith("http")?Ce:n+Ce,clientId:Me,clientSecret:Qe,scopes:te.scopes,extraHeaders:(0,Wt.Or)({authMethod:wt,clientId:Me,clientSecret:Qe}),successCallback:ft=>{r.setValue(`auth.${t}.token`,ft),z(!1)},errorCallback:ft=>{ye(),I(ft.message),z(!1)}})}),me=Object.keys(s.scopes);let ve=(0,kt.YQ)(`auth.${t}.token`)||JSON.stringify(p==null?void 0:p.token);ve=ve?JSON.parse(ve):"";const ce=(0,kt.Al)(t,"client_id"),Se={field:`auth.${t}.client_id`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${t}.client_id`)||d||(p==null?void 0:p.client_id),initValue:(0,kt.YQ)(`auth.${t}.client_id`)||d||(p==null?void 0:p.client_id),placeholder:"Your OAuth2 app Client ID"};return R.createElement(R.Fragment,null,R.createElement(st.n5,null,R.createElement(st.NI,null,R.createElement(st.lX,null,"Client ID:"),ce?R.createElement(qf,pO(fO({},Se),{options:ce})):R.createElement(ci,pO(fO({},Se),{type:"password",panel:"try-it"}))),R.createElement(st.NI,null,R.createElement(st.lX,null,"Client Secret:"),R.createElement(ci,{type:"password",fullWidth:!0,field:`auth.${t}.client_secret`,initialValue:(0,kt.YQ)(`auth.${t}.client_secret`)||(p==null?void 0:p.client_secret),panel:"try-it"})),R.createElement(ci,{fullWidth:!0,field:`auth.${t}.token`,type:"hidden",initialValue:ve,validate:Q5}),R.createElement(sO,{id:t,scopes:me})),R.createElement(Vr.Button,{color:"primary",onClick:Ee,blinking:B},B?"Loading...":"Request Token"),R.createElement(st.ph,null," Access Token "),M?R.createElement(st.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",R.createElement("pre",null,M)," "):te.token&&te.token.access_token?R.createElement(st.TR,null,R.createElement(st.WA,{length:te.token.access_token.length,masked:W},te.token.access_token),R.createElement(st.lf,{onClick:he},W?"Show":"Hide"," "),R.createElement(st.h,{onClick:ye}," Clear ")):R.createElement(st.Xq,{style:{marginBottom:"1em"}},"No token"))};var q5=Object.defineProperty,e9=Object.defineProperties,t9=Object.getOwnPropertyDescriptors,dO=Object.getOwnPropertySymbols,r9=Object.prototype.hasOwnProperty,n9=Object.prototype.propertyIsEnumerable,hO=(e,t,r)=>t in e?q5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qu=(e,t)=>{for(var r in t||(t={}))r9.call(t,r)&&hO(e,r,t[r]);if(dO)for(var r of dO(t))n9.call(t,r)&&hO(e,r,t[r]);return e},ec=(e,t)=>e9(e,t9(t));const i9=({securityDefaults:e,operation:t,activeServer:r,authCorsProxyUrl:n,form:s,formApi:a})=>{var p,d;const[h,g]=(0,R.useState)(0),{parser:y}=(0,Fo.useRecoilValue)(Hu.cS);(0,R.useEffect)(()=>{const G=t.security.map(ye=>ye.schemes.map(he=>he.id).join(" and ")),te=(0,kt.YQ)("securityRequirementName"),le=G.findIndex(ye=>ye===te);g(le<0?0:le)},[t]);const C=G=>{g(G.idx),(0,kt.WW)("securityRequirementName",G.value)},M=t.security,B=M.map(G=>G.schemes.map(te=>te.id).join(" and ")).filter(Boolean).map((G,te)=>({value:G,idx:te}));if(B.length===0)return R.createElement(lO,{message:"Cannot find security schema in the definition"});const z=M[h],W=(0,kt.A8)(z.schemes[0].id);return R.createElement(R.Fragment,null,R.createElement(st.n5,null,B.length>1&&R.createElement(st.NI,null,R.createElement(st.lX,null," Security scheme: "),R.createElement(li.VD,{variant:"dark",fullWidth:!0,options:B,value:B[h].value,onChange:C}))||null,R.createElement(Vr.TryItSecurityApps,{apiId:(d=(p=y==null?void 0:y.definition.info)==null?void 0:p["x-metadata"])==null?void 0:d.apiId,value:a.getValue(`auth.${W}`),onChange:G=>{a.setValue(`auth.${W}`,G)}}),M[h].schemes.map(G=>{var te,le,ye,he,Ee,me,ve;const ce=(0,kt.A8)(G.id);if(G.type==="apiKey"){const Se=(0,kt.Al)(ce,""),Ce={field:`auth.${ce}`,fullWidth:!0,initialValue:(0,Wt.NG)(G)||(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),initValue:(0,Wt.NG)(G)||(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(st.NI,{key:ce},R.createElement(st.lX,null," ",G.name,": "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ci,ec(qu({},Ce),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(G.type==="http"){if(G.scheme==="basic"){const Se=(0,kt.Al)(ce,"username"),Ce={field:`auth.${ce}.username`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${ce}.username`)||((te=e==null?void 0:e[ce])==null?void 0:te.username),initValue:(0,kt.YQ)(`auth.${ce}.username`)||((le=e==null?void 0:e[ce])==null?void 0:le.username),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," ",(0,Qf.l)("tryItAuthBasicUsername"),": "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ci,ec(qu({},Ce),{panel:"try-it"}))),R.createElement(st.NI,null,R.createElement(st.lX,null," ",(0,Qf.l)("tryItAuthBasicPassword"),": "),R.createElement(ci,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${ce}.password`,initialValue:(0,kt.YQ)(`auth.${ce}.password`)||((ye=e==null?void 0:e[ce])==null?void 0:ye.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(G.scheme==="bearer"){const Se=(0,kt.Al)(ce,""),Ce={field:`auth.${ce}`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),initValue:(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," Bearer Token: "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ci,ec(qu({},Ce),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(G.type==="oauth2"&&G.flows&&G.flows.clientCredentials)return R.createElement(Z5,{key:ce,flow:G.flows.clientCredentials,server:r,authCorsProxyUrl:n,id:ce,form:s,formApi:a,clientId:G.flows.clientCredentials["x-defaultClientId"]||G["x-defaultClientId"],defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"&&G.flows&&G.flows.implicit)return R.createElement(iv,{key:ce,authorizationUrl:G.flows.implicit.authorizationUrl,authCorsProxyUrl:n,scopes:Object.keys(((Ee=(he=G==null?void 0:G.flows)==null?void 0:he.implicit)==null?void 0:Ee.scopes)||{}),server:r,id:ce,form:s,formApi:a,clientId:G.flows.implicit["x-defaultClientId"]||G["x-defaultClientId"],flow:"implicit",defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"&&G.flows&&G.flows.authorizationCode)return R.createElement(iv,{key:ce,authorizationUrl:G.flows.authorizationCode.authorizationUrl,tokenUrl:G.flows.authorizationCode.tokenUrl,authCorsProxyUrl:n,scopes:Object.keys(((me=G.flows.authorizationCode)==null?void 0:me.scopes)||{}),server:r,id:ce,form:s,formApi:a,clientId:G.flows.authorizationCode["x-defaultClientId"]||G["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:G.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:G.flows.authorizationCode["x-usePkce"],defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"){let Se=(0,kt.YQ)(`auth.${ce}.token`)||JSON.stringify((ve=e==null?void 0:e[ce])==null?void 0:ve.token);return Se=Se?JSON.parse(Se):{},R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token Type: "),R.createElement(ci,{fullWidth:!0,field:`auth.${ce}.token.token_type`,initialValue:Se.token_type||"Bearer",panel:"try-it"})),R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token: "),R.createElement(ci,{type:"password",fullWidth:!0,field:`auth.${ce}.token.access_token`,validate:Wt.np,initialValue:Se.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(G.type==="openIdConnect")return R.createElement(W5,{key:ce,server:r,authCorsProxyUrl:n,id:ce,form:s,formApi:a,scheme:G,clientId:G["x-defaultClientId"],defaultValues:e==null?void 0:e[ce]})}})),R.createElement("small",null,R.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var s9=c(75726),o9=Object.defineProperty,mO=Object.getOwnPropertySymbols,a9=Object.prototype.hasOwnProperty,l9=Object.prototype.propertyIsEnumerable,vO=(e,t,r)=>t in e?o9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u9=(e,t)=>{for(var r in t||(t={}))a9.call(t,r)&&vO(e,r,t[r]);if(mO)for(var r of mO(t))l9.call(t,r)&&vO(e,r,t[r]);return e};function c9({operation:e,properties:t,securityDefaults:r,form:n,resolvedRawSpec:s,server:a,formApi:p,setFormApi:d,handleChange:h,handleServerChange:g}){const y=n.errors||{},C=y.path||y.cookie||y.header||y.query,{hooks:M,authCorsProxyUrl:I}=(0,Fo.useRecoilValue)(Hu.lk),B=s&&kt.IB.get(s,e.pointer);let z=n.values&&n.values.auth&&Object.keys(n.values.auth)[0];(!z||!n.values.auth[z])&&(z=void 0),z&&(n.values.auth[z].token!==void 0||n.values.auth[z].client_id!==void 0||n.values.auth[z].client_secret!==void 0)&&(!n.values.auth[z].token||!n.values.auth[z].token.access_token)&&(z=void 0),z&&n.values.auth[z].username!=null&&(!n.values.auth[z].username||!n.values.auth[z].password)&&(z=void 0);const W=e.parameters||[];return!s&&R.createElement(R.Fragment,null,"Loading...")||R.createElement(ID,{onChange:h,getApi:d,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},R.createElement(d3,{operation:e,onChange:g}),R.createElement(Pm.UQ,{initialActiveIdx:e.security.length&&z?1:0},e.security.length&&p&&R.createElement(Sy,{header:(0,Qf.l)("tryItAuth"),"data-cy":"security-trigger",error:!z&&!!y.auth,success:!!z,renderChildrenHidden:!0},Vr.OpenApiTryItSecurityPanel||M!=null&&M.ReplaceTryItSecurityPanel?R.createElement(f9,{field:"auth",validate:Wt.np},G=>R.createElement(s9.Q,{Hook:Vr.OpenApiTryItSecurityPanel||(M==null?void 0:M.ReplaceTryItSecurityPanel),props:{server:a,operation:e,onChange:G,OAuth2:Cs}})):R.createElement(i9,{formApi:p,form:n,operation:e,activeServer:a.url,authCorsProxyUrl:I,securityDefaults:r}))||null,e.requestBody&&p&&R.createElement(Sy,{header:(0,Qf.l)("tryItBody"),"data-cy":"body-trigger",error:!!y.body,renderChildrenHidden:!0},R.createElement(e5,{validate:p9,formApi:p,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:B==null?void 0:B.requestBody,properties:t}))||null,W.length&&R.createElement(Sy,{header:(0,Qf.l)("tryItParameters"),"data-cy":"parameters-trigger",error:C,renderChildrenHidden:!0},R.createElement(f5,{operation:e,values:n.values,errors:n.errors||{}}))||null))}function f9(e){const{fieldApi:t,render:r,userProps:n}=Yf(u9({},e)),{setValue:s}=t,{children:a}=n;return r(R.createElement(R.Fragment,null,a(s)))}function p9(){}const d9=(0,R.memo)(c9);function h9({shaking:e,className:t,children:r,rootElement:n}){const[s]=(0,Uy.Bs)(n),a=(0,Fo.useRecoilValue)(Hu.lk);return R.createElement(li.q2,{scrollYOffset:a.scrollYOffset,shaking:e,className:t,"data-cy":"console",fullWidth:s==null?void 0:s.width},r)}const m9=(0,R.memo)(h9);var v9=Object.defineProperty,g9=Object.defineProperties,y9=Object.getOwnPropertyDescriptors,sv=Object.getOwnPropertySymbols,gO=Object.prototype.hasOwnProperty,yO=Object.prototype.propertyIsEnumerable,bO=(e,t,r)=>t in e?v9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nn=(e,t)=>{for(var r in t||(t={}))gO.call(t,r)&&bO(e,r,t[r]);if(sv)for(var r of sv(t))yO.call(t,r)&&bO(e,r,t[r]);return e},qn=(e,t)=>g9(e,y9(t)),xO=(e,t)=>{var r={};for(var n in e)gO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sv)for(var n of sv(e))t.indexOf(n)<0&&yO.call(e,n)&&(r[n]=e[n]);return r},SO=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function wO(e){return e.startsWith("//")?"https:"+e:e}function b9({operation:e,onResponse:t,className:r,rootElement:n,properties:s,securityDefaults:a,onClose:p}){let d=(0,R.useRef)();const[h,g]=(0,Fo.useRecoilState)((0,Oy.N)(e.pointer)),[y,C]=(0,R.useState)(h.activeServer||e.activeServer),[M,I]=(0,R.useState)(0),[B,z]=(0,R.useState)(!1),[W,G]=(0,R.useState)(!1),[te,le]=(0,R.useState)({values:{path:(0,Wt.ZS)(e.parameters,"path"),cookie:(0,Wt.ZS)(e.parameters,"cookie"),header:(0,Wt.ZS)(e.parameters,"header"),query:(0,Wt.ZS)(e.parameters,"query")}}),[ye,he]=(0,R.useState)(),[Ee,me]=(0,R.useState)(),[ve,ce]=(0,R.useState)(),[Se,Ce]=(0,R.useState)(),Me=(0,Uy.D9)(e),{parser:Qe,options:wt}=(0,Fo.useRecoilValue)(Hu.cS),ft=(0,R.useCallback)((Ht,yr=Ht.getState())=>{var ar=yr,{values:Ze}=ar,dt=xO(ar,["values"]);d.current=Ht,setTimeout(()=>{le(qn(nn({},dt),{values:qn(nn({},Ze),{query:(0,Wt.FU)(Ze.query||{})})}))},0)},[]),Ar=(0,R.useCallback)(Ht=>{var yr=Ht,{values:ar}=yr,Ze=xO(yr,["values"]);const dt=qn(nn({},Ze),{values:qn(nn({},ar),{query:(0,Wt.FU)(ar.query||{})})});g(Ut=>qn(nn({},Ut),{requestValues:JSON.parse(JSON.stringify(ar))})),le(dt),(0,Wt.Hc)(dt)},[g]),Qr=(0,R.useCallback)(Ht=>{I(Ht)},[]),Rr=(0,R.useCallback)(Ht=>{C(Ht),g(yr=>qn(nn({},yr),{activeServer:Ht}))},[g]),Zr=(0,R.useCallback)(()=>SO(this,null,function*(){var Ht,yr,ar,Ze,dt,Ut,rr,Bt,Un,ro,Pi,Sn,Va,jl,di,Bo,ov;const{values:Ps,invalid:tc}=((Ht=d==null?void 0:d.current)==null?void 0:Ht.getState())||te||{};if((yr=d.current)==null||yr.submitForm(),tc){G(!0),setTimeout(()=>G(!1),1e3),(Ze=(ar=wt.events)==null?void 0:ar.tryItSent)==null||Ze.call(ar,{eventType:jx.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description});return}const{servers:no,requestBody:$o}=e,Hy=$o&&$o.content&&((dt=(0,Zs.getActiveMediaType)($o.content))==null?void 0:dt.name)||"";let io=Ps.body;if(/json/.test(Hy))try{io=JSON.parse(io)}catch(Jt){console.error(Jt)}z(!0);const wn=ye,rc=(e.httpVerb||"").toLowerCase();if(!no)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 fp=no.find(Jt=>y.url.endsWith(Jt.url.endsWith("/")?Jt.url.substring(0,Jt.url.length-1):Jt.url)),zy=Date.now();let Ti,Uo=Ps.auth;if(Ps.auth){const Jt=Object.keys(Ps.auth)[0],Vi=(0,lL.dw)(Jt);Ti=qn(nn({},wn),{components:qn(nn({},wn==null?void 0:wn.components),{securitySchemes:qn(nn({},(Ut=wn==null?void 0:wn.components)==null?void 0:Ut.securitySchemes),{[Vi]:qn(nn({},(Bt=(rr=wn==null?void 0:wn.components)==null?void 0:rr.securitySchemes)==null?void 0:Bt[Vi]),{type:((Pi=(ro=(Un=wn==null?void 0:wn.components)==null?void 0:Un.securitySchemes)==null?void 0:ro[Vi])==null?void 0:Pi.type)==="openIdConnect"?"oauth2":((Va=(Sn=wn==null?void 0:wn.components)==null?void 0:Sn.securitySchemes)==null?void 0:Va[Vi]).type})})})}),Uo=qn(nn({},Uo),{[Vi]:Uo[Jt]})}else Ti=nn({},wn);Ti.servers=no;const Il=wt.corsProxyUrl;Il&&no.length&&(Ti.servers=no.map(Jt=>qn(nn({},Jt),{url:Il+wO(Jt.url)})),Ti.paths=qn(nn({},Ti.paths),{[e.path]:qn(nn({},Ti.paths[e.path]),{[rc]:qn(nn({},Ti.paths[e.path][rc]),{servers:void 0}),servers:void 0})}));const pp=($o==null?void 0:$o.content)&&((jl=(0,Zs.getActiveMediaType)($o.content))==null?void 0:jl.name)||null;if(pp&&io&&Tm(pp)){const Jt=Object.values(io);io=Jt.length>1?Jt:Jt[0]}const dp={server:Il?Il+wO(fp.url):fp.url,serverVariables:(0,Wt.mj)(fp),spec:Ti,pathName:e.path,method:e.httpVerb,parameters:nn(nn(nn(nn({},Ps.path),Ps.query),Ps.header),Ps.cookie),securities:{authorized:Uo},requestBody:io,requestContentType:pp,responseContentType:((di=Ps.header)==null?void 0:di.Accept)||null,requestInterceptor:(0,Wt.Tz)(wt,e,Uo==null?void 0:Uo.Authorization)};try{const Jt=yield Y2.execute(dp),Vi=Jt==null?void 0:Jt.data;Vi instanceof Blob&&(Tm(Vi.type)&&(Jt.fileInfo={rawData:Vi,fileName:(0,Wt.AM)(Jt.headers)}),Jt.data=yield Vi.text()),t==null||t({request:dp,response:Jt}),Ce(Jt),ce(void 0)}catch(Jt){Jt&&Jt.response&&Jt.response.data instanceof Blob&&(Jt.response.data=yield Jt.response.data.text(),t==null||t({request:dp,response:Jt.response})),Ce(void 0),ce(Jt)}finally{z(!1),I(1),me(Date.now()-zy),(ov=(Bo=wt.events)==null?void 0:Bo.tryItSent)==null||ov.call(Bo,{eventType:jx.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description})}}),[y.url,te,t,e,wt,ye]);(0,Vr.useMount)(()=>SO(this,null,function*(){var Ht;const yr=yield aL(e,Qe.definition);he(yr),(Ht=d.current)==null||Ht.setValues({})})),(0,R.useEffect)(()=>{Me&&Me!==e&&(Ce(void 0),ce(void 0),I(0))},[e,Me]);const Pr=!!(Se||ve);return R.createElement(m9,{shaking:W,className:r,rootElement:n},R.createElement(Pm.Hc,null,R.createElement(SL,{active:M,hasResponse:Pr,onChange:Qr}),p&&R.createElement(li.PZ,{onClick:p}," \u2715 ")),R.createElement(li.RE,{hidden:M!==0,"data-cy":"console-request-body"},R.createElement(d9,{operation:e,properties:s,securityDefaults:a,form:te,resolvedRawSpec:ye,server:y,formApi:d.current,setFormApi:ft,handleChange:Ar,handleServerChange:Rr})),R.createElement(li.RE,{hidden:M!==1,"data-cy":"console-response-body"},R.createElement(bL,{response:Se,error:ve,time:Ee})),R.createElement(AL,{hasResponse:Pr,params:te.values,operation:e,loading:B,execute:Zr}))}const x9=(0,R.memo)(b9)},94466:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"DataView");x.exports=b},85208:(x,k,c)=>{var m=c(34440),w=c(84108),b=c(61085),_=c(77706),A=c(8636);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},81998:(x,k,c)=>{var m=c(90266),w=c(42875),b=c(45828),_=c(24115),A=c(67690);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},72887:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Map");x.exports=b},95678:(x,k,c)=>{var m=c(39016),w=c(62363),b=c(64348),_=c(53062),A=c(30262);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},95747:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Promise");x.exports=b},56616:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Set");x.exports=b},84546:(x,k,c)=>{var m=c(95678),w=c(83937),b=c(15009);function _(A){var O=-1,j=A==null?0:A.length;for(this.__data__=new m;++O<j;)this.add(A[O])}_.prototype.add=_.prototype.push=w,_.prototype.has=b,x.exports=_},19549:(x,k,c)=>{var m=c(81998),w=c(93210),b=c(48603),_=c(38947),A=c(70885),O=c(98938);function j($){var K=this.__data__=new m($);this.size=K.size}j.prototype.clear=w,j.prototype.delete=b,j.prototype.get=_,j.prototype.has=A,j.prototype.set=O,x.exports=j},70861:(x,k,c)=>{var m=c(84100),w=m.Symbol;x.exports=w},3526:(x,k,c)=>{var m=c(84100),w=m.Uint8Array;x.exports=w},98001:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"WeakMap");x.exports=b},82493:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length,_=0,A=[];++w<b;){var O=c[w];m(O,w,c)&&(A[_++]=O)}return A}x.exports=k},75825:(x,k,c)=>{var m=c(18509),w=c(79312),b=c(55589),_=c(85778),A=c(5023),O=c(50922),j=Object.prototype,$=j.hasOwnProperty;function K(ie,ee){var ae=b(ie),q=!ae&&w(ie),V=!ae&&!q&&_(ie),J=!ae&&!q&&!V&&O(ie),L=ae||q||V||J,E=L?m(ie.length,String):[],N=E.length;for(var U in ie)(ee||$.call(ie,U))&&!(L&&(U=="length"||V&&(U=="offset"||U=="parent")||J&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||A(U,N)))&&E.push(U);return E}x.exports=K},29233:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length,_=Array(b);++w<b;)_[w]=m(c[w],w,c);return _}x.exports=k},10111:x=>{function k(c,m){for(var w=-1,b=m.length,_=c.length;++w<b;)c[_+w]=m[w];return c}x.exports=k},1831:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length;++w<b;)if(m(c[w],w,c))return!0;return!1}x.exports=k},18498:(x,k,c)=>{var m=c(58260);function w(b,_){for(var A=b.length;A--;)if(m(b[A][0],_))return A;return-1}x.exports=w},40548:(x,k,c)=>{var m=c(24007),w=c(86040);function b(_,A){A=m(A,_);for(var O=0,j=A.length;_!=null&&O<j;)_=_[w(A[O++])];return O&&O==j?_:void 0}x.exports=b},4468:(x,k,c)=>{var m=c(10111),w=c(55589);function b(_,A,O){var j=A(_);return w(_)?j:m(j,O(_))}x.exports=b},69823:(x,k,c)=>{var m=c(70861),w=c(91339),b=c(25151),_="[object Null]",A="[object Undefined]",O=m?m.toStringTag:void 0;function j($){return $==null?$===void 0?A:_:O&&O in Object($)?w($):b($)}x.exports=j},33016:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Arguments]";function _(A){return w(A)&&m(A)==b}x.exports=_},34662:(x,k,c)=>{var m=c(88968),w=c(50440);function b(_,A,O,j,$){return _===A?!0:_==null||A==null||!w(_)&&!w(A)?_!==_&&A!==A:m(_,A,O,j,b,$)}x.exports=b},88968:(x,k,c)=>{var m=c(19549),w=c(14952),b=c(21080),_=c(86524),A=c(87493),O=c(55589),j=c(85778),$=c(50922),K=1,ie="[object Arguments]",ee="[object Array]",ae="[object Object]",q=Object.prototype,V=q.hasOwnProperty;function J(L,E,N,U,se,ne){var Y=O(L),X=O(E),Q=Y?ee:A(L),H=X?ee:A(E);Q=Q==ie?ae:Q,H=H==ie?ae:H;var de=Q==ae,Ae=H==ae,Z=Q==H;if(Z&&j(L)){if(!j(E))return!1;Y=!0,de=!1}if(Z&&!de)return ne||(ne=new m),Y||$(L)?w(L,E,N,U,se,ne):b(L,E,Q,N,U,se,ne);if(!(N&K)){var xe=de&&V.call(L,"__wrapped__"),ue=Ae&&V.call(E,"__wrapped__");if(xe||ue){var Ne=xe?L.value():L,He=ue?E.value():E;return ne||(ne=new m),se(Ne,He,N,U,ne)}}return Z?(ne||(ne=new m),_(L,E,N,U,se,ne)):!1}x.exports=J},99817:(x,k,c)=>{var m=c(45563),w=c(28597),b=c(93702),_=c(55784),A=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,j=Function.prototype,$=Object.prototype,K=j.toString,ie=$.hasOwnProperty,ee=RegExp("^"+K.call(ie).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ae(q){if(!b(q)||w(q))return!1;var V=m(q)?ee:O;return V.test(_(q))}x.exports=ae},42448:(x,k,c)=>{var m=c(69823),w=c(66052),b=c(50440),_="[object Arguments]",A="[object Array]",O="[object Boolean]",j="[object Date]",$="[object Error]",K="[object Function]",ie="[object Map]",ee="[object Number]",ae="[object Object]",q="[object RegExp]",V="[object Set]",J="[object String]",L="[object WeakMap]",E="[object ArrayBuffer]",N="[object DataView]",U="[object Float32Array]",se="[object Float64Array]",ne="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",Q="[object Uint8Array]",H="[object Uint8ClampedArray]",de="[object Uint16Array]",Ae="[object Uint32Array]",Z={};Z[U]=Z[se]=Z[ne]=Z[Y]=Z[X]=Z[Q]=Z[H]=Z[de]=Z[Ae]=!0,Z[_]=Z[A]=Z[E]=Z[O]=Z[N]=Z[j]=Z[$]=Z[K]=Z[ie]=Z[ee]=Z[ae]=Z[q]=Z[V]=Z[J]=Z[L]=!1;function xe(ue){return b(ue)&&w(ue.length)&&!!Z[m(ue)]}x.exports=xe},41351:(x,k,c)=>{var m=c(32840),w=c(82825),b=Object.prototype,_=b.hasOwnProperty;function A(O){if(!m(O))return w(O);var j=[];for(var $ in Object(O))_.call(O,$)&&$!="constructor"&&j.push($);return j}x.exports=A},18509:x=>{function k(c,m){for(var w=-1,b=Array(c);++w<c;)b[w]=m(w);return b}x.exports=k},86245:(x,k,c)=>{var m=c(70861),w=c(29233),b=c(55589),_=c(52624),A=1/0,O=m?m.prototype:void 0,j=O?O.toString:void 0;function $(K){if(typeof K=="string")return K;if(b(K))return w(K,$)+"";if(_(K))return j?j.call(K):"";var ie=K+"";return ie=="0"&&1/K==-A?"-0":ie}x.exports=$},31525:x=>{function k(c){return function(m){return c(m)}}x.exports=k},77026:x=>{function k(c,m){return c.has(m)}x.exports=k},24007:(x,k,c)=>{var m=c(55589),w=c(5130),b=c(44041),_=c(99835);function A(O,j){return m(O)?O:w(O,j)?[O]:b(_(O))}x.exports=A},1622:(x,k,c)=>{var m=c(84100),w=m["__core-js_shared__"];x.exports=w},14952:(x,k,c)=>{var m=c(84546),w=c(1831),b=c(77026),_=1,A=2;function O(j,$,K,ie,ee,ae){var q=K&_,V=j.length,J=$.length;if(V!=J&&!(q&&J>V))return!1;var L=ae.get(j),E=ae.get($);if(L&&E)return L==$&&E==j;var N=-1,U=!0,se=K&A?new m:void 0;for(ae.set(j,$),ae.set($,j);++N<V;){var ne=j[N],Y=$[N];if(ie)var X=q?ie(Y,ne,N,$,j,ae):ie(ne,Y,N,j,$,ae);if(X!==void 0){if(X)continue;U=!1;break}if(se){if(!w($,function(Q,H){if(!b(se,H)&&(ne===Q||ee(ne,Q,K,ie,ae)))return se.push(H)})){U=!1;break}}else if(!(ne===Y||ee(ne,Y,K,ie,ae))){U=!1;break}}return ae.delete(j),ae.delete($),U}x.exports=O},21080:(x,k,c)=>{var m=c(70861),w=c(3526),b=c(58260),_=c(14952),A=c(81140),O=c(77969),j=1,$=2,K="[object Boolean]",ie="[object Date]",ee="[object Error]",ae="[object Map]",q="[object Number]",V="[object RegExp]",J="[object Set]",L="[object String]",E="[object Symbol]",N="[object ArrayBuffer]",U="[object DataView]",se=m?m.prototype:void 0,ne=se?se.valueOf:void 0;function Y(X,Q,H,de,Ae,Z,xe){switch(H){case U:if(X.byteLength!=Q.byteLength||X.byteOffset!=Q.byteOffset)return!1;X=X.buffer,Q=Q.buffer;case N:return!(X.byteLength!=Q.byteLength||!Z(new w(X),new w(Q)));case K:case ie:case q:return b(+X,+Q);case ee:return X.name==Q.name&&X.message==Q.message;case V:case L:return X==Q+"";case ae:var ue=A;case J:var Ne=de&j;if(ue||(ue=O),X.size!=Q.size&&!Ne)return!1;var He=xe.get(X);if(He)return He==Q;de|=$,xe.set(X,Q);var Re=_(ue(X),ue(Q),de,Ae,Z,xe);return xe.delete(X),Re;case E:if(ne)return ne.call(X)==ne.call(Q)}return!1}x.exports=Y},86524:(x,k,c)=>{var m=c(54357),w=1,b=Object.prototype,_=b.hasOwnProperty;function A(O,j,$,K,ie,ee){var ae=$&w,q=m(O),V=q.length,J=m(j),L=J.length;if(V!=L&&!ae)return!1;for(var E=V;E--;){var N=q[E];if(!(ae?N in j:_.call(j,N)))return!1}var U=ee.get(O),se=ee.get(j);if(U&&se)return U==j&&se==O;var ne=!0;ee.set(O,j),ee.set(j,O);for(var Y=ae;++E<V;){N=q[E];var X=O[N],Q=j[N];if(K)var H=ae?K(Q,X,N,j,O,ee):K(X,Q,N,O,j,ee);if(!(H===void 0?X===Q||ie(X,Q,$,K,ee):H)){ne=!1;break}Y||(Y=N=="constructor")}if(ne&&!Y){var de=O.constructor,Ae=j.constructor;de!=Ae&&"constructor"in O&&"constructor"in j&&!(typeof de=="function"&&de instanceof de&&typeof Ae=="function"&&Ae instanceof Ae)&&(ne=!1)}return ee.delete(O),ee.delete(j),ne}x.exports=A},20302:(x,k,c)=>{var m=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;x.exports=m},54357:(x,k,c)=>{var m=c(4468),w=c(44450),b=c(62096);function _(A){return m(A,b,w)}x.exports=_},77570:(x,k,c)=>{var m=c(58949);function w(b,_){var A=b.__data__;return m(_)?A[typeof _=="string"?"string":"hash"]:A.map}x.exports=w},65234:(x,k,c)=>{var m=c(99817),w=c(67736);function b(_,A){var O=w(_,A);return m(O)?O:void 0}x.exports=b},91339:(x,k,c)=>{var m=c(70861),w=Object.prototype,b=w.hasOwnProperty,_=w.toString,A=m?m.toStringTag:void 0;function O(j){var $=b.call(j,A),K=j[A];try{j[A]=void 0;var ie=!0}catch(ae){}var ee=_.call(j);return ie&&($?j[A]=K:delete j[A]),ee}x.exports=O},44450:(x,k,c)=>{var m=c(82493),w=c(84506),b=Object.prototype,_=b.propertyIsEnumerable,A=Object.getOwnPropertySymbols,O=A?function(j){return j==null?[]:(j=Object(j),m(A(j),function($){return _.call(j,$)}))}:w;x.exports=O},87493:(x,k,c)=>{var m=c(94466),w=c(72887),b=c(95747),_=c(56616),A=c(98001),O=c(69823),j=c(55784),$="[object Map]",K="[object Object]",ie="[object Promise]",ee="[object Set]",ae="[object WeakMap]",q="[object DataView]",V=j(m),J=j(w),L=j(b),E=j(_),N=j(A),U=O;(m&&U(new m(new ArrayBuffer(1)))!=q||w&&U(new w)!=$||b&&U(b.resolve())!=ie||_&&U(new _)!=ee||A&&U(new A)!=ae)&&(U=function(se){var ne=O(se),Y=ne==K?se.constructor:void 0,X=Y?j(Y):"";if(X)switch(X){case V:return q;case J:return $;case L:return ie;case E:return ee;case N:return ae}return ne}),x.exports=U},67736:x=>{function k(c,m){return c==null?void 0:c[m]}x.exports=k},34440:(x,k,c)=>{var m=c(24545);function w(){this.__data__=m?m(null):{},this.size=0}x.exports=w},84108:x=>{function k(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}x.exports=k},61085:(x,k,c)=>{var m=c(24545),w="__lodash_hash_undefined__",b=Object.prototype,_=b.hasOwnProperty;function A(O){var j=this.__data__;if(m){var $=j[O];return $===w?void 0:$}return _.call(j,O)?j[O]:void 0}x.exports=A},77706:(x,k,c)=>{var m=c(24545),w=Object.prototype,b=w.hasOwnProperty;function _(A){var O=this.__data__;return m?O[A]!==void 0:b.call(O,A)}x.exports=_},8636:(x,k,c)=>{var m=c(24545),w="__lodash_hash_undefined__";function b(_,A){var O=this.__data__;return this.size+=this.has(_)?0:1,O[_]=m&&A===void 0?w:A,this}x.exports=b},5023:x=>{var k=9007199254740991,c=/^(?:0|[1-9]\d*)$/;function m(w,b){var _=typeof w;return b=b==null?k:b,!!b&&(_=="number"||_!="symbol"&&c.test(w))&&w>-1&&w%1==0&&w<b}x.exports=m},5130:(x,k,c)=>{var m=c(55589),w=c(52624),b=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_=/^\w*$/;function A(O,j){if(m(O))return!1;var $=typeof O;return $=="number"||$=="symbol"||$=="boolean"||O==null||w(O)?!0:_.test(O)||!b.test(O)||j!=null&&O in Object(j)}x.exports=A},58949:x=>{function k(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}x.exports=k},28597:(x,k,c)=>{var m=c(1622),w=function(){var _=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}();function b(_){return!!w&&w in _}x.exports=b},32840:x=>{var k=Object.prototype;function c(m){var w=m&&m.constructor,b=typeof w=="function"&&w.prototype||k;return m===b}x.exports=c},90266:x=>{function k(){this.__data__=[],this.size=0}x.exports=k},42875:(x,k,c)=>{var m=c(18498),w=Array.prototype,b=w.splice;function _(A){var O=this.__data__,j=m(O,A);if(j<0)return!1;var $=O.length-1;return j==$?O.pop():b.call(O,j,1),--this.size,!0}x.exports=_},45828:(x,k,c)=>{var m=c(18498);function w(b){var _=this.__data__,A=m(_,b);return A<0?void 0:_[A][1]}x.exports=w},24115:(x,k,c)=>{var m=c(18498);function w(b){return m(this.__data__,b)>-1}x.exports=w},67690:(x,k,c)=>{var m=c(18498);function w(b,_){var A=this.__data__,O=m(A,b);return O<0?(++this.size,A.push([b,_])):A[O][1]=_,this}x.exports=w},39016:(x,k,c)=>{var m=c(85208),w=c(81998),b=c(72887);function _(){this.size=0,this.__data__={hash:new m,map:new(b||w),string:new m}}x.exports=_},62363:(x,k,c)=>{var m=c(77570);function w(b){var _=m(this,b).delete(b);return this.size-=_?1:0,_}x.exports=w},64348:(x,k,c)=>{var m=c(77570);function w(b){return m(this,b).get(b)}x.exports=w},53062:(x,k,c)=>{var m=c(77570);function w(b){return m(this,b).has(b)}x.exports=w},30262:(x,k,c)=>{var m=c(77570);function w(b,_){var A=m(this,b),O=A.size;return A.set(b,_),this.size+=A.size==O?0:1,this}x.exports=w},81140:x=>{function k(c){var m=-1,w=Array(c.size);return c.forEach(function(b,_){w[++m]=[_,b]}),w}x.exports=k},32924:(x,k,c)=>{var m=c(67997),w=500;function b(_){var A=m(_,function(j){return O.size===w&&O.clear(),j}),O=A.cache;return A}x.exports=b},24545:(x,k,c)=>{var m=c(65234),w=m(Object,"create");x.exports=w},82825:(x,k,c)=>{var m=c(33540),w=m(Object.keys,Object);x.exports=w},8690:(x,k,c)=>{x=c.nmd(x);var m=c(20302),w=k&&!k.nodeType&&k,b=w&&!0&&x&&!x.nodeType&&x,_=b&&b.exports===w,A=_&&m.process,O=function(){try{var j=b&&b.require&&b.require("util").types;return j||A&&A.binding&&A.binding("util")}catch($){}}();x.exports=O},25151:x=>{var k=Object.prototype,c=k.toString;function m(w){return c.call(w)}x.exports=m},33540:x=>{function k(c,m){return function(w){return c(m(w))}}x.exports=k},84100:(x,k,c)=>{var m=c(20302),w=typeof self=="object"&&self&&self.Object===Object&&self,b=m||w||Function("return this")();x.exports=b},83937:x=>{var k="__lodash_hash_undefined__";function c(m){return this.__data__.set(m,k),this}x.exports=c},15009:x=>{function k(c){return this.__data__.has(c)}x.exports=k},77969:x=>{function k(c){var m=-1,w=Array(c.size);return c.forEach(function(b){w[++m]=b}),w}x.exports=k},93210:(x,k,c)=>{var m=c(81998);function w(){this.__data__=new m,this.size=0}x.exports=w},48603:x=>{function k(c){var m=this.__data__,w=m.delete(c);return this.size=m.size,w}x.exports=k},38947:x=>{function k(c){return this.__data__.get(c)}x.exports=k},70885:x=>{function k(c){return this.__data__.has(c)}x.exports=k},98938:(x,k,c)=>{var m=c(81998),w=c(72887),b=c(95678),_=200;function A(O,j){var $=this.__data__;if($ instanceof m){var K=$.__data__;if(!w||K.length<_-1)return K.push([O,j]),this.size=++$.size,this;$=this.__data__=new b(K)}return $.set(O,j),this.size=$.size,this}x.exports=A},44041:(x,k,c)=>{var m=c(32924),w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b=/\\(\\)?/g,_=m(function(A){var O=[];return A.charCodeAt(0)===46&&O.push(""),A.replace(w,function(j,$,K,ie){O.push(K?ie.replace(b,"$1"):$||j)}),O});x.exports=_},86040:(x,k,c)=>{var m=c(52624),w=1/0;function b(_){if(typeof _=="string"||m(_))return _;var A=_+"";return A=="0"&&1/_==-w?"-0":A}x.exports=b},55784:x=>{var k=Function.prototype,c=k.toString;function m(w){if(w!=null){try{return c.call(w)}catch(b){}try{return w+""}catch(b){}}return""}x.exports=m},58260:x=>{function k(c,m){return c===m||c!==c&&m!==m}x.exports=k},13546:(x,k,c)=>{var m=c(40548);function w(b,_,A){var O=b==null?void 0:m(b,_);return O===void 0?A:O}x.exports=w},79312:(x,k,c)=>{var m=c(33016),w=c(50440),b=Object.prototype,_=b.hasOwnProperty,A=b.propertyIsEnumerable,O=m(function(){return arguments}())?m:function(j){return w(j)&&_.call(j,"callee")&&!A.call(j,"callee")};x.exports=O},55589:x=>{var k=Array.isArray;x.exports=k},30568:(x,k,c)=>{var m=c(45563),w=c(66052);function b(_){return _!=null&&w(_.length)&&!m(_)}x.exports=b},89256:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Boolean]";function _(A){return A===!0||A===!1||w(A)&&m(A)==b}x.exports=_},85778:(x,k,c)=>{x=c.nmd(x);var m=c(84100),w=c(37999),b=k&&!k.nodeType&&k,_=b&&!0&&x&&!x.nodeType&&x,A=_&&_.exports===b,O=A?m.Buffer:void 0,j=O?O.isBuffer:void 0,$=j||w;x.exports=$},85466:(x,k,c)=>{var m=c(34662);function w(b,_){return m(b,_)}x.exports=w},45563:(x,k,c)=>{var m=c(69823),w=c(93702),b="[object AsyncFunction]",_="[object Function]",A="[object GeneratorFunction]",O="[object Proxy]";function j($){if(!w($))return!1;var K=m($);return K==_||K==A||K==b||K==O}x.exports=j},66052:x=>{var k=9007199254740991;function c(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=k}x.exports=c},7534:x=>{function k(c){return c===null}x.exports=k},3224:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Number]";function _(A){return typeof A=="number"||w(A)&&m(A)==b}x.exports=_},93702:x=>{function k(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}x.exports=k},50440:x=>{function k(c){return c!=null&&typeof c=="object"}x.exports=k},76705:(x,k,c)=>{var m=c(69823),w=c(55589),b=c(50440),_="[object String]";function A(O){return typeof O=="string"||!w(O)&&b(O)&&m(O)==_}x.exports=A},52624:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Symbol]";function _(A){return typeof A=="symbol"||w(A)&&m(A)==b}x.exports=_},50922:(x,k,c)=>{var m=c(42448),w=c(31525),b=c(8690),_=b&&b.isTypedArray,A=_?w(_):m;x.exports=A},62096:(x,k,c)=>{var m=c(75825),w=c(41351),b=c(30568);function _(A){return b(A)?m(A):w(A)}x.exports=_},67997:(x,k,c)=>{var m=c(95678),w="Expected a function";function b(_,A){if(typeof _!="function"||A!=null&&typeof A!="function")throw new TypeError(w);var O=function(){var j=arguments,$=A?A.apply(this,j):j[0],K=O.cache;if(K.has($))return K.get($);var ie=_.apply(this,j);return O.cache=K.set($,ie)||K,ie};return O.cache=new(b.Cache||m),O}b.Cache=m,x.exports=b},30606:x=>{var k="Expected a function";function c(m){if(typeof m!="function")throw new TypeError(k);return function(){var w=arguments;switch(w.length){case 0:return!m.call(this);case 1:return!m.call(this,w[0]);case 2:return!m.call(this,w[0],w[1]);case 3:return!m.call(this,w[0],w[1],w[2])}return!m.apply(this,w)}}x.exports=c},84506:x=>{function k(){return[]}x.exports=k},37999:x=>{function k(){return!1}x.exports=k},99835:(x,k,c)=>{var m=c(86245);function w(b){return b==null?"":m(b)}x.exports=w},38220:(x,k,c)=>{const m=c(30606);function w(_){return typeof _=="string"?A=>A.element===_:_.constructor&&_.extend?A=>A instanceof _:_}class b{constructor(A){this.elements=A||[]}toValue(){return this.elements.map(A=>A.toValue())}map(A,O){return this.elements.map(A,O)}flatMap(A,O){return this.map(A,O).reduce((j,$)=>j.concat($),[])}compactMap(A,O){const j=[];return this.forEach($=>{const K=A.bind(O)($);K&&j.push(K)}),j}filter(A,O){return A=w(A),new b(this.elements.filter(A,O))}reject(A,O){return A=w(A),new b(this.elements.filter(m(A),O))}find(A,O){return A=w(A),this.elements.find(A,O)}forEach(A,O){this.elements.forEach(A,O)}reduce(A,O){return this.elements.reduce(A,O)}includes(A){return this.elements.some(O=>O.equals(A))}shift(){return this.elements.shift()}unshift(A){this.elements.unshift(this.refract(A))}push(A){return this.elements.push(this.refract(A)),this}add(A){this.push(A)}get(A){return this.elements[A]}getValue(A){const O=this.elements[A];if(O)return O.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}}typeof Symbol!="undefined"&&(b.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),x.exports=b},91608:x=>{class k{constructor(m,w){this.key=m,this.value=w}clone(){const m=new k;return this.key&&(m.key=this.key.clone()),this.value&&(m.value=this.value.clone()),m}}x.exports=k},85672:(x,k,c)=>{const m=c(7534),w=c(76705),b=c(3224),_=c(89256),A=c(93702),O=c(15050),j=c(32872);class ${constructor(ie){this.elementMap={},this.elementDetection=[],this.Element=j.Element,this.KeyValuePair=j.KeyValuePair,(!ie||!ie.noDefault)&&this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(ie){return ie.namespace&&ie.namespace({base:this}),ie.load&&ie.load({base:this}),this}useDefault(){return this.register("null",j.NullElement).register("string",j.StringElement).register("number",j.NumberElement).register("boolean",j.BooleanElement).register("array",j.ArrayElement).register("object",j.ObjectElement).register("member",j.MemberElement).register("ref",j.RefElement).register("link",j.LinkElement),this.detect(m,j.NullElement,!1).detect(w,j.StringElement,!1).detect(b,j.NumberElement,!1).detect(_,j.BooleanElement,!1).detect(Array.isArray,j.ArrayElement,!1).detect(A,j.ObjectElement,!1),this}register(ie,ee){return this._elements=void 0,this.elementMap[ie]=ee,this}unregister(ie){return this._elements=void 0,delete this.elementMap[ie],this}detect(ie,ee,ae){return(ae===void 0?!0:ae)?this.elementDetection.unshift([ie,ee]):this.elementDetection.push([ie,ee]),this}toElement(ie){if(ie instanceof this.Element)return ie;let ee;for(let ae=0;ae<this.elementDetection.length;ae+=1){const q=this.elementDetection[ae][0],V=this.elementDetection[ae][1];if(q(ie)){ee=new V(ie);break}}return ee}getElementClass(ie){const ee=this.elementMap[ie];return ee===void 0?this.Element:ee}fromRefract(ie){return this.serialiser.deserialise(ie)}toRefract(ie){return this.serialiser.serialise(ie)}get elements(){return this._elements===void 0&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(ie=>{const ee=ie[0].toUpperCase()+ie.substr(1);this._elements[ee]=this.elementMap[ie]})),this._elements}get serialiser(){return new O(this)}}O.prototype.Namespace=$,x.exports=$},18424:(x,k,c)=>{const m=c(30606),w=c(38220);class b extends w{map(A,O){return this.elements.map(j=>A.bind(O)(j.value,j.key,j))}filter(A,O){return new b(this.elements.filter(j=>A.bind(O)(j.value,j.key,j)))}reject(A,O){return this.filter(m(A.bind(O)))}forEach(A,O){return this.elements.forEach((j,$)=>{A.bind(O)(j.value,j.key,j,$)})}keys(){return this.map((A,O)=>O.toValue())}values(){return this.map(A=>A.toValue())}}x.exports=b},32872:(x,k,c)=>{const m=c(37567),w=c(22114),b=c(99368),_=c(35549),A=c(82660),O=c(75494),j=c(91839),$=c(79622),K=c(13100),ie=c(10437),ee=c(38220),ae=c(18424),q=c(91608);function V(J){return J instanceof m?J:typeof J=="string"?new b(J):typeof J=="number"?new _(J):typeof J=="boolean"?new A(J):J===null?new w:Array.isArray(J)?new O(J.map(V)):typeof J=="object"?new $(J):J}m.prototype.ObjectElement=$,m.prototype.RefElement=ie,m.prototype.MemberElement=j,m.prototype.refract=V,ee.prototype.refract=V,x.exports={Element:m,NullElement:w,StringElement:b,NumberElement:_,BooleanElement:A,ArrayElement:O,MemberElement:j,ObjectElement:$,LinkElement:K,RefElement:ie,refract:V,ArraySlice:ee,ObjectSlice:ae,KeyValuePair:q}},13100:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b||[],_,A),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(b){this.attributes.set("relation",b)}get href(){return this.attributes.get("href")}set href(b){this.attributes.set("href",b)}}},10437:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b||[],_,A),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(b){this.attributes.set("path",b)}}},33030:(x,k,c)=>{var m;const w=c(85672),b=c(32872);k.lS=w,m=function(A){return new w(A)},c(91608),m=b.ArraySlice,m=b.ObjectSlice,k.W_=b.Element,k.RP=b.StringElement,k.VL=b.NumberElement,k.hh=b.BooleanElement,k.zr=b.NullElement,k.ON=b.ArrayElement,k.Sb=b.ObjectElement,k.c6=b.MemberElement,k.tK=b.RefElement,k.EA=b.LinkElement,k.Qc=b.refract,c(15050),c(15967)},75494:(x,k,c)=>{const m=c(30606),w=c(37567),b=c(38220);class _ extends w{constructor(O,j,$){super(O||[],j,$),this.element="array"}primitive(){return"array"}get(O){return this.content[O]}getValue(O){const j=this.get(O);if(j)return j.toValue()}getIndex(O){return this.content[O]}set(O,j){return this.content[O]=this.refract(j),this}remove(O){const j=this.content.splice(O,1);return j.length?j[0]:null}map(O,j){return this.content.map(O,j)}flatMap(O,j){return this.map(O,j).reduce(($,K)=>$.concat(K),[])}compactMap(O,j){const $=[];return this.forEach(K=>{const ie=O.bind(j)(K);ie&&$.push(ie)}),$}filter(O,j){return new b(this.content.filter(O,j))}reject(O,j){return this.filter(m(O),j)}reduce(O,j){let $,K;j!==void 0?($=0,K=this.refract(j)):($=1,K=this.primitive()==="object"?this.first.value:this.first);for(let ie=$;ie<this.length;ie+=1){const ee=this.content[ie];this.primitive()==="object"?K=this.refract(O(K,ee.value,ee.key,ee,this)):K=this.refract(O(K,ee,ie,this))}return K}forEach(O,j){this.content.forEach(($,K)=>{O.bind(j)($,this.refract(K))})}shift(){return this.content.shift()}unshift(O){this.content.unshift(this.refract(O))}push(O){return this.content.push(this.refract(O)),this}add(O){this.push(O)}findElements(O,j){const $=j||{},K=!!$.recursive,ie=$.results===void 0?[]:$.results;return this.forEach((ee,ae,q)=>{K&&ee.findElements!==void 0&&ee.findElements(O,{results:ie,recursive:K}),O(ee,ae,q)&&ie.push(ee)}),ie}find(O){return new b(this.findElements(O,{recursive:!0}))}findByElement(O){return this.find(j=>j.element===O)}findByClass(O){return this.find(j=>j.classes.includes(O))}getById(O){return this.find(j=>j.id.toValue()===O).first}includes(O){return this.content.some(j=>j.equals(O))}contains(O){return this.includes(O)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(O){return new this.constructor(this.content.concat(O.content))}"fantasy-land/concat"(O){return this.concat(O)}"fantasy-land/map"(O){return new this.constructor(this.map(O))}"fantasy-land/chain"(O){return this.map(j=>O(j),this).reduce((j,$)=>j.concat($),this.empty())}"fantasy-land/filter"(O){return new this.constructor(this.content.filter(O))}"fantasy-land/reduce"(O,j){return this.content.reduce(O,j)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}_.empty=function(){return new this},_["fantasy-land/empty"]=_.empty,typeof Symbol!="undefined"&&(_.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),x.exports=_},82660:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="boolean"}primitive(){return"boolean"}}},37567:(x,k,c)=>{const m=c(85466),w=c(91608),b=c(38220);class _{constructor(O,j,$){j&&(this.meta=j),$&&(this.attributes=$),this.content=O}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(O=>{O.parent=this,O.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const O=new this.constructor;return O.element=this.element,this.meta.length&&(O._meta=this.meta.clone()),this.attributes.length&&(O._attributes=this.attributes.clone()),this.content?this.content.clone?O.content=this.content.clone():Array.isArray(this.content)?O.content=this.content.map(j=>j.clone()):O.content=this.content:O.content=this.content,O}toValue(){return this.content instanceof _?this.content.toValue():this.content instanceof w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(O=>O.toValue(),this):this.content}toRef(O){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const j=new this.RefElement(this.id.toValue());return O&&(j.path=O),j}findRecursive(...O){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const j=O.pop();let $=new b;const K=(ee,ae)=>(ee.push(ae),ee),ie=(ee,ae)=>{ae.element===j&&ee.push(ae);const q=ae.findRecursive(j);return q&&q.reduce(K,ee),ae.content instanceof w&&(ae.content.key&&ie(ee,ae.content.key),ae.content.value&&ie(ee,ae.content.value)),ee};return this.content&&(this.content.element&&ie($,this.content),Array.isArray(this.content)&&this.content.reduce(ie,$)),O.isEmpty||($=$.filter(ee=>{let ae=ee.parents.map(q=>q.element);for(const q in O){const V=O[q],J=ae.indexOf(V);if(J!==-1)ae=ae.splice(0,J);else return!1}return!0})),$}set(O){return this.content=O,this}equals(O){return m(this.toValue(),O)}getMetaProperty(O,j){if(!this.meta.hasKey(O)){if(this.isFrozen){const $=this.refract(j);return $.freeze(),$}this.meta.set(O,j)}return this.meta.get(O)}setMetaProperty(O,j){this.meta.set(O,j)}get element(){return this._storedElement||"element"}set element(O){this._storedElement=O}get content(){return this._content}set content(O){if(O instanceof _)this._content=O;else if(O instanceof b)this.content=O.elements;else if(typeof O=="string"||typeof O=="number"||typeof O=="boolean"||O==="null"||O==null)this._content=O;else if(O instanceof w)this._content=O;else if(Array.isArray(O))this._content=O.map(this.refract);else if(typeof O=="object")this._content=Object.keys(O).map(j=>new this.MemberElement(j,O[j]));else throw new Error("Cannot set content to given value")}get meta(){if(!this._meta){if(this.isFrozen){const O=new this.ObjectElement;return O.freeze(),O}this._meta=new this.ObjectElement}return this._meta}set meta(O){O instanceof this.ObjectElement?this._meta=O:this.meta.set(O||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const O=new this.ObjectElement;return O.freeze(),O}this._attributes=new this.ObjectElement}return this._attributes}set attributes(O){O instanceof this.ObjectElement?this._attributes=O:this.attributes.set(O||{})}get id(){return this.getMetaProperty("id","")}set id(O){this.setMetaProperty("id",O)}get classes(){return this.getMetaProperty("classes",[])}set classes(O){this.setMetaProperty("classes",O)}get title(){return this.getMetaProperty("title","")}set title(O){this.setMetaProperty("title",O)}get description(){return this.getMetaProperty("description","")}set description(O){this.setMetaProperty("description",O)}get links(){return this.getMetaProperty("links",[])}set links(O){this.setMetaProperty("links",O)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:O}=this;const j=new b;for(;O;)j.push(O),O=O.parent;return j}get children(){if(Array.isArray(this.content))return new b(this.content);if(this.content instanceof w){const O=new b([this.content.key]);return this.content.value&&O.push(this.content.value),O}return this.content instanceof _?new b([this.content]):new b}get recursiveChildren(){const O=new b;return this.children.forEach(j=>{O.push(j),j.recursiveChildren.forEach($=>{O.push($)})}),O}}x.exports=_},91839:(x,k,c)=>{const m=c(91608),w=c(37567);x.exports=class extends w{constructor(_,A,O,j){super(new m,O,j),this.element="member",this.key=_,this.value=A}get key(){return this.content.key}set key(_){this.content.key=this.refract(_)}get value(){return this.content.value}set value(_){this.content.value=this.refract(_)}}},22114:(x,k,c)=>{const m=c(37567);class w extends m{constructor(_,A,O){super(_||null,A,O),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}x.exports=w},35549:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="number"}primitive(){return"number"}}},79622:(x,k,c)=>{const m=c(30606),w=c(93702),b=c(75494),_=c(91839),A=c(18424);class O extends b{constructor($,K,ie){super($||[],K,ie),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(($,K)=>($[K.key.toValue()]=K.value?K.value.toValue():void 0,$),{})}get($){const K=this.getMember($);if(K)return K.value}getMember($){if($!==void 0)return this.content.find(K=>K.key.toValue()===$)}remove($){let K=null;return this.content=this.content.filter(ie=>ie.key.toValue()===$?(K=ie,!1):!0),K}getKey($){const K=this.getMember($);if(K)return K.key}set($,K){if(w($))return Object.keys($).forEach(ae=>{this.set(ae,$[ae])}),this;const ie=$,ee=this.getMember(ie);return ee?ee.value=K:this.content.push(new _(ie,K)),this}keys(){return this.content.map($=>$.key.toValue())}values(){return this.content.map($=>$.value.toValue())}hasKey($){return this.content.some(K=>K.key.equals($))}items(){return this.content.map($=>[$.key.toValue(),$.value.toValue()])}map($,K){return this.content.map(ie=>$.bind(K)(ie.value,ie.key,ie))}compactMap($,K){const ie=[];return this.forEach((ee,ae,q)=>{const V=$.bind(K)(ee,ae,q);V&&ie.push(V)}),ie}filter($,K){return new A(this.content).filter($,K)}reject($,K){return this.filter(m($),K)}forEach($,K){return this.content.forEach(ie=>$.bind(K)(ie.value,ie.key,ie))}}x.exports=O},99368:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},15967:(x,k,c)=>{const m=c(15050);x.exports=class extends m{serialise(b){if(!(b instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${b}\` is not an Element instance`);let _;b._attributes&&b.attributes.get("variable")&&(_=b.attributes.get("variable"));const A={element:b.element};b._meta&&b._meta.length>0&&(A.meta=this.serialiseObject(b.meta));const O=b.element==="enum"||b.attributes.keys().indexOf("enumerations")!==-1;if(O){const j=this.enumSerialiseAttributes(b);j&&(A.attributes=j)}else if(b._attributes&&b._attributes.length>0){let{attributes:j}=b;j.get("metadata")&&(j=j.clone(),j.set("meta",j.get("metadata")),j.remove("metadata")),b.element==="member"&&_&&(j=j.clone(),j.remove("variable")),j.length>0&&(A.attributes=this.serialiseObject(j))}if(O)A.content=this.enumSerialiseContent(b,A);else if(this[`${b.element}SerialiseContent`])A.content=this[`${b.element}SerialiseContent`](b,A);else if(b.content!==void 0){let j;_&&b.content.key?(j=b.content.clone(),j.key.attributes.set("variable",_),j=this.serialiseContent(j)):j=this.serialiseContent(b.content),this.shouldSerialiseContent(b,j)&&(A.content=j)}else this.shouldSerialiseContent(b,b.content)&&b instanceof this.namespace.elements.Array&&(A.content=[]);return A}shouldSerialiseContent(b,_){return b.element==="parseResult"||b.element==="httpRequest"||b.element==="httpResponse"||b.element==="category"||b.element==="link"?!0:!(_===void 0||Array.isArray(_)&&_.length===0)}refSerialiseContent(b,_){return delete _.attributes,{href:b.toValue(),path:b.path.toValue()}}sourceMapSerialiseContent(b){return b.toValue()}dataStructureSerialiseContent(b){return[this.serialiseContent(b.content)]}enumSerialiseAttributes(b){const _=b.attributes.clone(),A=_.remove("enumerations")||new this.namespace.elements.Array([]),O=_.get("default");let j=_.get("samples")||new this.namespace.elements.Array([]);if(O&&O.content&&(O.content.attributes&&O.content.attributes.remove("typeAttributes"),_.set("default",new this.namespace.elements.Array([O.content]))),j.forEach($=>{$.content&&$.content.element&&$.content.attributes.remove("typeAttributes")}),b.content&&A.length!==0&&j.unshift(b.content),j=j.map($=>$ instanceof this.namespace.elements.Array?[$]:new this.namespace.elements.Array([$.content])),j.length&&_.set("samples",j),_.length>0)return this.serialiseObject(_)}enumSerialiseContent(b){if(b._attributes){const _=b.attributes.get("enumerations");if(_&&_.length>0)return _.content.map(A=>{const O=A.clone();return O.attributes.remove("typeAttributes"),this.serialise(O)})}if(b.content){const _=b.content.clone();return _.attributes.remove("typeAttributes"),[this.serialise(_)]}return[]}deserialise(b){if(typeof b=="string")return new this.namespace.elements.String(b);if(typeof b=="number")return new this.namespace.elements.Number(b);if(typeof b=="boolean")return new this.namespace.elements.Boolean(b);if(b===null)return new this.namespace.elements.Null;if(Array.isArray(b))return new this.namespace.elements.Array(b.map(this.deserialise,this));const _=this.namespace.getElementClass(b.element),A=new _;A.element!==b.element&&(A.element=b.element),b.meta&&this.deserialiseObject(b.meta,A.meta),b.attributes&&this.deserialiseObject(b.attributes,A.attributes);const O=this.deserialiseContent(b.content);if((O!==void 0||A.content===null)&&(A.content=O),A.element==="enum"){A.content&&A.attributes.set("enumerations",A.content);let j=A.attributes.get("samples");if(A.attributes.remove("samples"),j){const K=j;j=new this.namespace.elements.Array,K.forEach(ee=>{ee.forEach(ae=>{const q=new _(ae);q.element=A.element,j.push(q)})});const ie=j.shift();ie?A.content=ie.content:A.content=void 0,A.attributes.set("samples",j)}else A.content=void 0;let $=A.attributes.get("default");if($&&$.length>0){$=$.get(0);const K=new _($);K.element=A.element,A.attributes.set("default",K)}}else if(A.element==="dataStructure"&&Array.isArray(A.content))[A.content]=A.content;else if(A.element==="category"){const j=A.attributes.get("meta");j&&(A.attributes.set("metadata",j),A.attributes.remove("meta"))}else A.element==="member"&&A.key&&A.key._attributes&&A.key._attributes.getValue("variable")&&(A.attributes.set("variable",A.key.attributes.get("variable")),A.key.attributes.remove("variable"));return A}serialiseContent(b){if(b instanceof this.namespace.elements.Element)return this.serialise(b);if(b instanceof this.namespace.KeyValuePair){const _={key:this.serialise(b.key)};return b.value&&(_.value=this.serialise(b.value)),_}return b&&b.map?b.map(this.serialise,this):b}deserialiseContent(b){if(b){if(b.element)return this.deserialise(b);if(b.key){const _=new this.namespace.KeyValuePair(this.deserialise(b.key));return b.value&&(_.value=this.deserialise(b.value)),_}if(b.map)return b.map(this.deserialise,this)}return b}shouldRefract(b){return b._attributes&&b.attributes.keys().length||b._meta&&b.meta.keys().length?!0:b.element==="enum"?!1:b.element!==b.primitive()||b.element==="member"}convertKeyToRefract(b,_){return this.shouldRefract(_)?this.serialise(_):_.element==="enum"?this.serialiseEnum(_):_.element==="array"?_.map(A=>this.shouldRefract(A)||b==="default"?this.serialise(A):A.element==="array"||A.element==="object"||A.element==="enum"?A.children.map(O=>this.serialise(O)):A.toValue()):_.element==="object"?(_.content||[]).map(this.serialise,this):_.toValue()}serialiseEnum(b){return b.children.map(_=>this.serialise(_))}serialiseObject(b){const _={};return b.forEach((A,O)=>{if(A){const j=O.toValue();_[j]=this.convertKeyToRefract(j,A)}}),_}deserialiseObject(b,_){Object.keys(b).forEach(A=>{_.set(A,this.deserialise(b[A]))})}}},15050:x=>{class k{constructor(m){this.namespace=m||new this.Namespace}serialise(m){if(!(m instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${m}\` is not an Element instance`);const w={element:m.element};m._meta&&m._meta.length>0&&(w.meta=this.serialiseObject(m.meta)),m._attributes&&m._attributes.length>0&&(w.attributes=this.serialiseObject(m.attributes));const b=this.serialiseContent(m.content);return b!==void 0&&(w.content=b),w}deserialise(m){if(!m.element)throw new Error("Given value is not an object containing an element name");const w=this.namespace.getElementClass(m.element),b=new w;b.element!==m.element&&(b.element=m.element),m.meta&&this.deserialiseObject(m.meta,b.meta),m.attributes&&this.deserialiseObject(m.attributes,b.attributes);const _=this.deserialiseContent(m.content);return(_!==void 0||b.content===null)&&(b.content=_),b}serialiseContent(m){if(m instanceof this.namespace.elements.Element)return this.serialise(m);if(m instanceof this.namespace.KeyValuePair){const w={key:this.serialise(m.key)};return m.value&&(w.value=this.serialise(m.value)),w}return m&&m.map?m.length===0?void 0:m.map(this.serialise,this):m}deserialiseContent(m){if(m){if(m.element)return this.deserialise(m);if(m.key){const w=new this.namespace.KeyValuePair(this.deserialise(m.key));return m.value&&(w.value=this.deserialise(m.value)),w}if(m.map)return m.map(this.deserialise,this)}return m}serialiseObject(m){const w={};if(m.forEach((b,_)=>{b&&(w[_.toValue()]=this.serialise(b))}),Object.keys(w).length!==0)return w}deserialiseObject(m,w){Object.keys(m).forEach(b=>{w.set(b,this.deserialise(m[b]))})}}x.exports=k},14927:(x,k,c)=>{var m=typeof Map=="function"&&Map.prototype,w=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=m&&w&&typeof w.get=="function"?w.get:null,_=m&&Map.prototype.forEach,A=typeof Set=="function"&&Set.prototype,O=Object.getOwnPropertyDescriptor&&A?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=A&&O&&typeof O.get=="function"?O.get:null,$=A&&Set.prototype.forEach,K=typeof WeakMap=="function"&&WeakMap.prototype,ie=K?WeakMap.prototype.has:null,ee=typeof WeakSet=="function"&&WeakSet.prototype,ae=ee?WeakSet.prototype.has:null,q=typeof WeakRef=="function"&&WeakRef.prototype,V=q?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,L=Object.prototype.toString,E=Function.prototype.toString,N=String.prototype.match,U=String.prototype.slice,se=String.prototype.replace,ne=String.prototype.toUpperCase,Y=String.prototype.toLowerCase,X=RegExp.prototype.test,Q=Array.prototype.concat,H=Array.prototype.join,de=Array.prototype.slice,Ae=Math.floor,Z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xe=Object.getOwnPropertySymbols,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="object",He=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ne||"symbol")?Symbol.toStringTag:null,Re=Object.prototype.propertyIsEnumerable,ze=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(pe){return pe.__proto__}:null);function Be(pe,Pe){if(pe===1/0||pe===-1/0||pe!==pe||pe&&pe>-1e3&&pe<1e3||X.call(/e/,Pe))return Pe;var Je=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof pe=="number"){var xt=pe<0?-Ae(-pe):Ae(pe);if(xt!==pe){var _t=String(xt),Ot=U.call(Pe,_t.length+1);return se.call(_t,Je,"$&_")+"."+se.call(se.call(Ot,/([0-9]{3})/g,"$&_"),/_$/,"")}}return se.call(Pe,Je,"$&_")}var Ye=c(65710),gt=Ye.custom,ut=kr(gt)?gt:null;x.exports=function pe(Pe,Je,xt,_t){var Ot=Je||{};if(ht(Ot,"quoteStyle")&&Ot.quoteStyle!=="single"&&Ot.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ht(Ot,"maxStringLength")&&(typeof Ot.maxStringLength=="number"?Ot.maxStringLength<0&&Ot.maxStringLength!==1/0:Ot.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Sr=ht(Ot,"customInspect")?Ot.customInspect:!0;if(typeof Sr!="boolean"&&Sr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ht(Ot,"indent")&&Ot.indent!==null&&Ot.indent!==" "&&!(parseInt(Ot.indent,10)===Ot.indent&&Ot.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ht(Ot,"numericSeparator")&&typeof Ot.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var sn=Ot.numericSeparator;if(typeof Pe=="undefined")return"undefined";if(Pe===null)return"null";if(typeof Pe=="boolean")return Pe?"true":"false";if(typeof Pe=="string")return vi(Pe,Ot);if(typeof Pe=="number"){if(Pe===0)return 1/0/Pe>0?"0":"-0";var Xt=String(Pe);return sn?Be(Pe,Xt):Xt}if(typeof Pe=="bigint"){var Fr=String(Pe)+"n";return sn?Be(Pe,Fr):Fr}var rs=typeof Ot.depth=="undefined"?5:Ot.depth;if(typeof xt=="undefined"&&(xt=0),xt>=rs&&rs>0&&typeof Pe=="object")return Ke(Pe)?"[Array]":"[Object]";var on=At(Ot,xt);if(typeof _t=="undefined")_t=[];else if(er(_t,Pe)>=0)return"[Circular]";function an(An,Ir,os){if(Ir&&(_t=de.call(_t),_t.push(Ir)),os){var ri={depth:Ot.depth};return ht(Ot,"quoteStyle")&&(ri.quoteStyle=Ot.quoteStyle),pe(An,ri,xt+1,_t)}return pe(An,Ot,xt+1,_t)}if(typeof Pe=="function"&&!qe(Pe)){var ns=nr(Pe),ln=Tt(Pe,an);return"[Function"+(ns?": "+ns:" (anonymous)")+"]"+(ln.length>0?" { "+H.call(ln,", ")+" }":"")}if(kr(Pe)){var Ii=Ne?se.call(String(Pe),/^(Symbol\(.*\))_[^)]*$/,"$1"):ue.call(Pe);return typeof Pe=="object"&&!Ne?mn(Ii):Ii}if(ji(Pe)){for(var Ri="<"+Y.call(String(Pe.nodeName)),un=Pe.attributes||[],ss=0;ss<un.length;ss++)Ri+=" "+un[ss].name+"="+yt(lt(un[ss].value),"double",Ot);return Ri+=">",Pe.childNodes&&Pe.childNodes.length&&(Ri+="..."),Ri+="</"+Y.call(String(Pe.nodeName))+">",Ri}if(Ke(Pe)){if(Pe.length===0)return"[]";var Fi=Tt(Pe,an);return on&&!Ft(Fi)?"["+mt(Fi,on)+"]":"[ "+H.call(Fi,", ")+" ]"}if(bt(Pe)){var Ts=Tt(Pe,an);return!("cause"in Error.prototype)&&"cause"in Pe&&!Re.call(Pe,"cause")?"{ ["+String(Pe)+"] "+H.call(Q.call("[cause]: "+an(Pe.cause),Ts),", ")+" }":Ts.length===0?"["+String(Pe)+"]":"{ ["+String(Pe)+"] "+H.call(Ts,", ")+" }"}if(typeof Pe=="object"&&Sr){if(ut&&typeof Pe[ut]=="function"&&Ye)return Ye(Pe,{depth:rs-xt});if(Sr!=="symbol"&&typeof Pe.inspect=="function")return Pe.inspect()}if(kn(Pe)){var Wo=[];return _&&_.call(Pe,function(An,Ir){Wo.push(an(Ir,Pe,!0)+" => "+an(An,Pe))}),fr("Map",b.call(Pe),Wo,on)}if(Hn(Pe)){var In=[];return $&&$.call(Pe,function(An){In.push(an(An,Pe))}),fr("Set",j.call(Pe),In,on)}if(ki(Pe))return vn("WeakMap");if(ei(Pe))return vn("WeakSet");if(Wn(Pe))return vn("WeakRef");if(Rt(Pe))return mn(an(Number(Pe)));if(jr(Pe))return mn(an(Z.call(Pe)));if(zt(Pe))return mn(J.call(Pe));if(Lt(Pe))return mn(an(String(Pe)));if(!Fe(Pe)&&!qe(Pe)){var Rn=Tt(Pe,an),Fn=ze?ze(Pe)===Object.prototype:Pe instanceof Object||Pe.constructor===Object,En=Pe instanceof Object?"":"null prototype",ti=!Fn&&He&&Object(Pe)===Pe&&He in Pe?U.call($t(Pe),8,-1):En?"Object":"",ka=Fn||typeof Pe.constructor!="function"?"":Pe.constructor.name?Pe.constructor.name+" ":"",gi=ka+(ti||En?"["+H.call(Q.call([],ti||[],En||[]),": ")+"] ":"");return Rn.length===0?gi+"{}":on?gi+"{"+mt(Rn,on)+"}":gi+"{ "+H.call(Rn,", ")+" }"}return String(Pe)};function yt(pe,Pe,Je){var xt=(Je.quoteStyle||Pe)==="double"?'"':"'";return xt+pe+xt}function lt(pe){return se.call(String(pe),/"/g,"&quot;")}function Ke(pe){return $t(pe)==="[object Array]"&&(!He||!(typeof pe=="object"&&He in pe))}function Fe(pe){return $t(pe)==="[object Date]"&&(!He||!(typeof pe=="object"&&He in pe))}function qe(pe){return $t(pe)==="[object RegExp]"&&(!He||!(typeof pe=="object"&&He in pe))}function bt(pe){return $t(pe)==="[object Error]"&&(!He||!(typeof pe=="object"&&He in pe))}function Lt(pe){return $t(pe)==="[object String]"&&(!He||!(typeof pe=="object"&&He in pe))}function Rt(pe){return $t(pe)==="[object Number]"&&(!He||!(typeof pe=="object"&&He in pe))}function zt(pe){return $t(pe)==="[object Boolean]"&&(!He||!(typeof pe=="object"&&He in pe))}function kr(pe){if(Ne)return pe&&typeof pe=="object"&&pe instanceof Symbol;if(typeof pe=="symbol")return!0;if(!pe||typeof pe!="object"||!ue)return!1;try{return ue.call(pe),!0}catch(Pe){}return!1}function jr(pe){if(!pe||typeof pe!="object"||!Z)return!1;try{return Z.call(pe),!0}catch(Pe){}return!1}var qr=Object.prototype.hasOwnProperty||function(pe){return pe in this};function ht(pe,Pe){return qr.call(pe,Pe)}function $t(pe){return L.call(pe)}function nr(pe){if(pe.name)return pe.name;var Pe=N.call(E.call(pe),/^function\s*([\w$]+)/);return Pe?Pe[1]:null}function er(pe,Pe){if(pe.indexOf)return pe.indexOf(Pe);for(var Je=0,xt=pe.length;Je<xt;Je++)if(pe[Je]===Pe)return Je;return-1}function kn(pe){if(!b||!pe||typeof pe!="object")return!1;try{b.call(pe);try{j.call(pe)}catch(Pe){return!0}return pe instanceof Map}catch(Pe){}return!1}function ki(pe){if(!ie||!pe||typeof pe!="object")return!1;try{ie.call(pe,ie);try{ae.call(pe,ae)}catch(Pe){return!0}return pe instanceof WeakMap}catch(Pe){}return!1}function Wn(pe){if(!V||!pe||typeof pe!="object")return!1;try{return V.call(pe),!0}catch(Pe){}return!1}function Hn(pe){if(!j||!pe||typeof pe!="object")return!1;try{j.call(pe);try{b.call(pe)}catch(Pe){return!0}return pe instanceof Set}catch(Pe){}return!1}function ei(pe){if(!ae||!pe||typeof pe!="object")return!1;try{ae.call(pe,ae);try{ie.call(pe,ie)}catch(Pe){return!0}return pe instanceof WeakSet}catch(Pe){}return!1}function ji(pe){return!pe||typeof pe!="object"?!1:typeof HTMLElement!="undefined"&&pe instanceof HTMLElement?!0:typeof pe.nodeName=="string"&&typeof pe.getAttribute=="function"}function vi(pe,Pe){if(pe.length>Pe.maxStringLength){var Je=pe.length-Pe.maxStringLength,xt="... "+Je+" more character"+(Je>1?"s":"");return vi(U.call(pe,0,Pe.maxStringLength),Pe)+xt}var _t=se.call(se.call(pe,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jn);return yt(_t,"single",Pe)}function jn(pe){var Pe=pe.charCodeAt(0),Je={8:"b",9:"t",10:"n",12:"f",13:"r"}[Pe];return Je?"\\"+Je:"\\x"+(Pe<16?"0":"")+ne.call(Pe.toString(16))}function mn(pe){return"Object("+pe+")"}function vn(pe){return pe+" { ? }"}function fr(pe,Pe,Je,xt){var _t=xt?mt(Je,xt):H.call(Je,", ");return pe+" ("+Pe+") {"+_t+"}"}function Ft(pe){for(var Pe=0;Pe<pe.length;Pe++)if(er(pe[Pe],`
507
+ `;function sO(e){const{scopes:t,id:r}=e;let n=[];try{n=JSON.parse((0,kt.YQ)(`auth.${r}.scopes`))}catch(s){}return!t||!t.length?R.createElement(R.Fragment,null):R.createElement(st.NI,null,R.createElement(st.lX,null," Scopes: "),R.createElement(k5,{field:`auth.${r}.scopes`,initialValue:n,items:t,showControls:!0,trimItemsLength:!0}))}const R5=({token:e,loading:t,error:r})=>t?R.createElement(st.GE,null,"Please, finish your authorization flow or cancel authorization."):r?R.createElement(m5,null,R.createElement(st.Xq,null,r)):e!=null&&e.access_token?null:R.createElement(st.GE,null," No Access Token. Please, Authorize. ");var F5=Object.defineProperty,M5=Object.defineProperties,L5=Object.getOwnPropertyDescriptors,oO=Object.getOwnPropertySymbols,D5=Object.prototype.hasOwnProperty,N5=Object.prototype.propertyIsEnumerable,aO=(e,t,r)=>t in e?F5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nv=(e,t)=>{for(var r in t||(t={}))D5.call(t,r)&&aO(e,r,t[r]);if(oO)for(var r of oO(t))N5.call(t,r)&&aO(e,r,t[r]);return e},Wy=(e,t)=>M5(e,L5(t)),B5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function $5(e){if(!e)return"Field is required"}const iv=({usePkce:e,form:t,id:r,formApi:n,flow:s,tokenUrl:a,authCorsProxyUrl:p,tokenEndpointAuthMethod:d,server:h,scopes:g,authorizationUrl:y,defaultValues:C,clientId:M})=>{var I,B,z,W;const{oAuth2RedirectURI:G,routingBasePath:te}=(0,Fo.useRecoilValue)(Hu.lk),[le,ye]=(0,R.useState)(null),[he,Ee]=(0,R.useState)(!1),[me,ve]=(0,R.useState)(!1),[ce,Se]=(0,R.useState)(void 0),[Ce,Me]=(0,R.useState)(void 0),[Qe,wt]=(0,R.useState)(void 0),ft=((B=(I=t.values)==null?void 0:I.auth)==null?void 0:B[r])||{},Ar=((W=(z=t.errors)==null?void 0:z.auth)==null?void 0:W[r])||{},Qr=ce!==void 0&&Ce!==Qe?{label:"sync",onClick:()=>{ce&&Me(Qe)}}:void 0;(0,R.useEffect)(()=>{if(e){const rr=(0,_l.CY)(43);vS(rr).then(Bt=>{Se(rr),Me(Bt),wt(Bt)})}},[e]);const Rr=rr=>{if(!rr||(n.validate(),!(0,_l.Qr)(Ar)))return;Ee(!0),ye(null);const Bt=p?p+(0,Wt.jg)(rr):rr,Un=p&&a?p+(0,Wt.jg)(a):a,ro=n.getValue(`auth.${r}.scopes`),_i={authorizationUrl:Bt.startsWith("http")?Bt:h+Bt,clientId:ft.client_id,scopes:ro,redirectUri:G,routingBasePath:te,successCallback:Sn=>{n.setValue(`auth.${r}.token`,Sn),Ee(!1),ye(null)},errorCallback:Sn=>{Ee(!1),ye((Sn==null?void 0:Sn.message)||"Failed to retrieve the access token")}};if(s==="implicit"&&Cs.authorizeImplicit(_i),!(0,Wt.xl)(d)){console.log(`Unsupported token endpoint auth method: ${d}`);return}s==="authorizationCode"&&Cs.authorizeAuthorizationCode(nv(Wy(nv({},_i),{tokenUrl:Un!=null&&Un.startsWith("http")?Un:h+Un,clientSecret:ft.client_secret,extraHeaders:(0,Wt.Or)({authMethod:d,clientId:ft.client_id,clientSecret:ft.client_secret})}),e&&{codeVerifier:ce,codeChallenge:Ce}))},Zr=()=>{Ht(),ye(null)},Pr=()=>{Ee(!1),ye(null),Cs.clearRedirectData(s)},Ht=()=>{n.setValue(`auth.${r}.token`,"")},yr=()=>{ve(rr=>!rr)},ar=rr=>B5(void 0,[rr],function*({target:{value:Bt}}){const Un=yield vS(Bt);Se(Bt),wt(Un)});if(!y)return R.createElement(st.Xq,null,"No flow info");let Ze=(0,kt.YQ)(`auth.${r}.token`)||JSON.stringify(C==null?void 0:C.token);Ze=Ze?JSON.parse(Ze):"";const dt=(0,kt.Al)(r,"client_id"),Ut={field:`auth.${r}.client_id`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${r}.client_id`)||M||(C==null?void 0:C.client_id),initValue:(0,kt.YQ)(`auth.${r}.client_id`)||M||(C==null?void 0:C.client_id),placeholder:"Your OAuth2 app Client ID",validate:$5,validateOnBlur:!0,validateOnChange:!0};return R.createElement("div",null,R.createElement(st.n5,null,R.createElement(st.NI,null,R.createElement(st.lX,null," Client ID: "),dt?R.createElement(qf,Wy(nv({},Ut),{options:dt})):R.createElement(ui,Wy(nv({},Ut),{"data-cy":"client-id-input",panel:"try-it"}))),s==="authorizationCode"&&R.createElement(R.Fragment,null,(!(e!=null&&e.hideClientSecretInput)||!e)&&R.createElement(st.NI,null,R.createElement(st.lX,null,"Client Secret:"),R.createElement(ui,{type:"password",fullWidth:!0,field:`auth.${r}.client_secret`,initialValue:(0,kt.YQ)(`auth.${r}.client_secret`)||(C==null?void 0:C.client_secret),validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),e&&!e.disableManualConfiguration&&R.createElement(g5,null,R.createElement(iO,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:me,onChange:yr,"data-cy":"pkce-options-toggle"}),me&&R.createElement(y5,null,R.createElement(st.NI,null,R.createElement(st.lX,null,"Code Verifier"),R.createElement(Zf,{fullWidth:!0,value:ce,onChange:ar,panel:"try-it","data-cy":"code-verifier-input"})),R.createElement(st.NI,null,R.createElement(st.lX,null,"Code Challenge"),R.createElement(Zf,{fullWidth:!0,value:Ce,onChange:({target:{value:rr}})=>{Me(rr)},inputActionButton:Qr,panel:"try-it","data-cy":"code-challenge-input"}))))),R.createElement(ui,{fullWidth:!0,field:`auth.${r}.token`,type:"hidden",initialValue:Ze,panel:"try-it"}),R.createElement(sO,{id:r,scopes:g}),ft.token&&ft.token.access_token?R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token: "),R.createElement(Zf,{disabled:!0,type:"password",fullWidth:!0,value:ft.token.access_token,panel:"try-it"})):null),R.createElement(v5,null,ft.token&&ft.token.access_token?R.createElement(Vr.Button,{fullWidth:!0,onClick:Zr},"Log out"):he?R.createElement(R.Fragment,null,R.createElement(Vr.Button,{fullWidth:!0,onClick:Pr},"Cancel"),R.createElement(tO,null)):R.createElement(Vr.Button,{fullWidth:!0,color:"secondary",disabled:!(0,_l.Qr)(Ar),onClick:()=>{Rr(y)}},"Authorize")),he||le||!ft.token||!ft.token.access_token&&R.createElement(R5,{loading:he,error:le,token:ft.token}))};var U5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function W5(e){var t,r;const{scheme:n,defaultValues:s}=e,[a,p]=(0,R.useState)({}),[d,h]=(0,R.useState)(),[g,y]=(0,R.useState)(!1);(0,R.useEffect)(()=>{C(n.openIdConnectUrl)},[n.openIdConnectUrl]);const C=M=>U5(this,null,function*(){y(!0),h("");try{const I=yield d5(M);p(I)}catch(I){h(I.message)}y(!1)});return g?R.createElement(H5,null):d?R.createElement(lO,{message:d}):R.createElement("div",null,R.createElement("div",null,(t=a==null?void 0:a.response_types_supported)!=null&&t.includes("token")?R.createElement(R.Fragment,null,R.createElement(Qi.S6,null,"OAuth2 Implicit Flow"),R.createElement(iv,{key:e.id,authorizationUrl:a.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:a.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:s})):(r=a==null?void 0:a.response_types_supported)!=null&&r.includes("code")?R.createElement(R.Fragment,null,R.createElement(Qi.S6,null,"OAuth2 Authorization Flow"),R.createElement(iv,{key:e.id,authorizationUrl:a.authorization_endpoint,tokenUrl:a.token_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:a.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,tokenEndpointAuthMethod:a==null?void 0:a.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:s})):R.createElement("div",null,"Unsupported flow")))}function H5(){return R.createElement("div",null,R.createElement("div",null,R.createElement("div",null,"Fetching OpenID Connect metadata..."),R.createElement(tO,null)))}function lO({message:e}){return R.createElement("div",null,R.createElement("div",null,R.createElement(st.Xq,null,e)))}var z5=Object.defineProperty,G5=Object.defineProperties,K5=Object.getOwnPropertyDescriptors,uO=Object.getOwnPropertySymbols,J5=Object.prototype.hasOwnProperty,Y5=Object.prototype.propertyIsEnumerable,cO=(e,t,r)=>t in e?z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fO=(e,t)=>{for(var r in t||(t={}))J5.call(t,r)&&cO(e,r,t[r]);if(uO)for(var r of uO(t))Y5.call(t,r)&&cO(e,r,t[r]);return e},pO=(e,t)=>G5(e,K5(t)),X5=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function Q5(e){if(!e)return"Token is required"}const Z5=({form:e,id:t,formApi:r,server:n,flow:s,authCorsProxyUrl:a,defaultValues:p,clientId:d})=>{var h,g,y,C;const[M,I]=(0,R.useState)(""),[B,z]=(0,R.useState)(!1),[W,G]=(0,R.useState)(!0),te=((g=(h=e==null?void 0:e.values)==null?void 0:h.auth)==null?void 0:g[t])||{},le=((C=(y=e.errors)==null?void 0:y.auth)==null?void 0:C[t])||{},ye=()=>{r.setValue(`auth.${t}.token`,""),(0,kt.WW)(`auth.${t}.token`,"")},he=()=>{G(Ce=>!Ce)},Ee=()=>X5(void 0,null,function*(){if(B)return;const Ce=a&&s.tokenUrl?a+(0,Wt.jg)(s.tokenUrl):s.tokenUrl;if(le.client_id||le.client_secret){console.log("Provide client_id and client_secret");return}const Me=te.client_id,Qe=te.client_secret;if(!Me||!Qe){console.log("Provide client_id and client_secret");return}z(!0);const wt=s["x-tokenEndpointAuthMethod"];if(!(0,Wt.xl)(wt)){console.log(`Unsupported token endpoint auth method: ${wt}`);return}yield Cs.authorizeClientCredentials({tokenUrl:Ce.startsWith("http")?Ce:n+Ce,clientId:Me,clientSecret:Qe,scopes:te.scopes,extraHeaders:(0,Wt.Or)({authMethod:wt,clientId:Me,clientSecret:Qe}),successCallback:ft=>{r.setValue(`auth.${t}.token`,ft),z(!1)},errorCallback:ft=>{ye(),I(ft.message),z(!1)}})}),me=Object.keys(s.scopes);let ve=(0,kt.YQ)(`auth.${t}.token`)||JSON.stringify(p==null?void 0:p.token);ve=ve?JSON.parse(ve):"";const ce=(0,kt.Al)(t,"client_id"),Se={field:`auth.${t}.client_id`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${t}.client_id`)||d||(p==null?void 0:p.client_id),initValue:(0,kt.YQ)(`auth.${t}.client_id`)||d||(p==null?void 0:p.client_id),placeholder:"Your OAuth2 app Client ID"};return R.createElement(R.Fragment,null,R.createElement(st.n5,null,R.createElement(st.NI,null,R.createElement(st.lX,null,"Client ID:"),ce?R.createElement(qf,pO(fO({},Se),{options:ce})):R.createElement(ui,pO(fO({},Se),{type:"password",panel:"try-it"}))),R.createElement(st.NI,null,R.createElement(st.lX,null,"Client Secret:"),R.createElement(ui,{type:"password",fullWidth:!0,field:`auth.${t}.client_secret`,initialValue:(0,kt.YQ)(`auth.${t}.client_secret`)||(p==null?void 0:p.client_secret),panel:"try-it"})),R.createElement(ui,{fullWidth:!0,field:`auth.${t}.token`,type:"hidden",initialValue:ve,validate:Q5}),R.createElement(sO,{id:t,scopes:me})),R.createElement(Vr.Button,{color:"primary",onClick:Ee,blinking:B},B?"Loading...":"Request Token"),R.createElement(st.ph,null," Access Token "),M?R.createElement(st.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",R.createElement("pre",null,M)," "):te.token&&te.token.access_token?R.createElement(st.TR,null,R.createElement(st.WA,{length:te.token.access_token.length,masked:W},te.token.access_token),R.createElement(st.lf,{onClick:he},W?"Show":"Hide"," "),R.createElement(st.h,{onClick:ye}," Clear ")):R.createElement(st.Xq,{style:{marginBottom:"1em"}},"No token"))};var q5=Object.defineProperty,e9=Object.defineProperties,t9=Object.getOwnPropertyDescriptors,dO=Object.getOwnPropertySymbols,r9=Object.prototype.hasOwnProperty,n9=Object.prototype.propertyIsEnumerable,hO=(e,t,r)=>t in e?q5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qu=(e,t)=>{for(var r in t||(t={}))r9.call(t,r)&&hO(e,r,t[r]);if(dO)for(var r of dO(t))n9.call(t,r)&&hO(e,r,t[r]);return e},ec=(e,t)=>e9(e,t9(t));const i9=({securityDefaults:e,operation:t,activeServer:r,authCorsProxyUrl:n,form:s,formApi:a})=>{var p,d;const[h,g]=(0,R.useState)(0),{parser:y}=(0,Fo.useRecoilValue)(Hu.cS);(0,R.useEffect)(()=>{const G=t.security.map(ye=>ye.schemes.map(he=>he.id).join(" and ")),te=(0,kt.YQ)("securityRequirementName"),le=G.findIndex(ye=>ye===te);g(le<0?0:le)},[t]);const C=G=>{g(G.idx),(0,kt.WW)("securityRequirementName",G.value)},M=t.security,B=M.map(G=>G.schemes.map(te=>te.id).join(" and ")).filter(Boolean).map((G,te)=>({value:G,idx:te}));if(B.length===0)return R.createElement(lO,{message:"Cannot find security schema in the definition"});const z=M[h],W=(0,kt.A8)(z.schemes[0].id);return R.createElement(R.Fragment,null,R.createElement(st.n5,null,B.length>1&&R.createElement(st.NI,null,R.createElement(st.lX,null," Security scheme: "),R.createElement(Qi.VD,{variant:"dark",fullWidth:!0,options:B,value:B[h].value,onChange:C}))||null,R.createElement(Vr.TryItSecurityApps,{apiId:(d=(p=y==null?void 0:y.definition.info)==null?void 0:p["x-metadata"])==null?void 0:d.apiId,value:a.getValue(`auth.${W}`),onChange:G=>{a.setValue(`auth.${W}`,G)}}),M[h].schemes.map(G=>{var te,le,ye,he,Ee,me,ve;const ce=(0,kt.A8)(G.id);if(G.type==="apiKey"){const Se=(0,kt.Al)(ce,""),Ce={field:`auth.${ce}`,fullWidth:!0,initialValue:(0,Wt.NG)(G)||(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),initValue:(0,Wt.NG)(G)||(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(st.NI,{key:ce},R.createElement(st.lX,null," ",G.name,": "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ui,ec(qu({},Ce),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(G.type==="http"){if(G.scheme==="basic"){const Se=(0,kt.Al)(ce,"username"),Ce={field:`auth.${ce}.username`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${ce}.username`)||((te=e==null?void 0:e[ce])==null?void 0:te.username),initValue:(0,kt.YQ)(`auth.${ce}.username`)||((le=e==null?void 0:e[ce])==null?void 0:le.username),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," ",(0,Qf.l)("tryItAuthBasicUsername"),": "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ui,ec(qu({},Ce),{panel:"try-it"}))),R.createElement(st.NI,null,R.createElement(st.lX,null," ",(0,Qf.l)("tryItAuthBasicPassword"),": "),R.createElement(ui,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${ce}.password`,initialValue:(0,kt.YQ)(`auth.${ce}.password`)||((ye=e==null?void 0:e[ce])==null?void 0:ye.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(G.scheme==="bearer"){const Se=(0,kt.Al)(ce,""),Ce={field:`auth.${ce}`,fullWidth:!0,initialValue:(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),initValue:(0,kt.YQ)(`auth.${ce}`)||(e==null?void 0:e[ce]),validate:Wt.np,validateOnBlur:!0,validateOnChange:!0};return R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," Bearer Token: "),Se?R.createElement(qf,ec(qu({},Ce),{options:Se})):R.createElement(ui,ec(qu({},Ce),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(G.type==="oauth2"&&G.flows&&G.flows.clientCredentials)return R.createElement(Z5,{key:ce,flow:G.flows.clientCredentials,server:r,authCorsProxyUrl:n,id:ce,form:s,formApi:a,clientId:G.flows.clientCredentials["x-defaultClientId"]||G["x-defaultClientId"],defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"&&G.flows&&G.flows.implicit)return R.createElement(iv,{key:ce,authorizationUrl:G.flows.implicit.authorizationUrl,authCorsProxyUrl:n,scopes:Object.keys(((Ee=(he=G==null?void 0:G.flows)==null?void 0:he.implicit)==null?void 0:Ee.scopes)||{}),server:r,id:ce,form:s,formApi:a,clientId:G.flows.implicit["x-defaultClientId"]||G["x-defaultClientId"],flow:"implicit",defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"&&G.flows&&G.flows.authorizationCode)return R.createElement(iv,{key:ce,authorizationUrl:G.flows.authorizationCode.authorizationUrl,tokenUrl:G.flows.authorizationCode.tokenUrl,authCorsProxyUrl:n,scopes:Object.keys(((me=G.flows.authorizationCode)==null?void 0:me.scopes)||{}),server:r,id:ce,form:s,formApi:a,clientId:G.flows.authorizationCode["x-defaultClientId"]||G["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:G.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:G.flows.authorizationCode["x-usePkce"],defaultValues:e==null?void 0:e[ce]});if(G.type==="oauth2"){let Se=(0,kt.YQ)(`auth.${ce}.token`)||JSON.stringify((ve=e==null?void 0:e[ce])==null?void 0:ve.token);return Se=Se?JSON.parse(Se):{},R.createElement(R.Fragment,{key:ce},R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token Type: "),R.createElement(ui,{fullWidth:!0,field:`auth.${ce}.token.token_type`,initialValue:Se.token_type||"Bearer",panel:"try-it"})),R.createElement(st.NI,null,R.createElement(st.lX,null," Access Token: "),R.createElement(ui,{type:"password",fullWidth:!0,field:`auth.${ce}.token.access_token`,validate:Wt.np,initialValue:Se.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(G.type==="openIdConnect")return R.createElement(W5,{key:ce,server:r,authCorsProxyUrl:n,id:ce,form:s,formApi:a,scheme:G,clientId:G["x-defaultClientId"],defaultValues:e==null?void 0:e[ce]})}})),R.createElement("small",null,R.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var s9=c(75726),o9=Object.defineProperty,mO=Object.getOwnPropertySymbols,a9=Object.prototype.hasOwnProperty,l9=Object.prototype.propertyIsEnumerable,vO=(e,t,r)=>t in e?o9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u9=(e,t)=>{for(var r in t||(t={}))a9.call(t,r)&&vO(e,r,t[r]);if(mO)for(var r of mO(t))l9.call(t,r)&&vO(e,r,t[r]);return e};function c9({operation:e,properties:t,securityDefaults:r,form:n,resolvedRawSpec:s,server:a,formApi:p,setFormApi:d,handleChange:h,handleServerChange:g}){const y=n.errors||{},C=y.path||y.cookie||y.header||y.query,{hooks:M,authCorsProxyUrl:I}=(0,Fo.useRecoilValue)(Hu.lk),B=s&&kt.IB.get(s,e.pointer);let z=n.values&&n.values.auth&&Object.keys(n.values.auth)[0];(!z||!n.values.auth[z])&&(z=void 0),z&&(n.values.auth[z].token!==void 0||n.values.auth[z].client_id!==void 0||n.values.auth[z].client_secret!==void 0)&&(!n.values.auth[z].token||!n.values.auth[z].token.access_token)&&(z=void 0),z&&n.values.auth[z].username!=null&&(!n.values.auth[z].username||!n.values.auth[z].password)&&(z=void 0);const W=e.parameters||[];return!s&&R.createElement(R.Fragment,null,"Loading...")||R.createElement(ID,{onChange:h,getApi:d,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},R.createElement(d3,{operation:e,onChange:g}),R.createElement(Pm.UQ,{initialActiveIdx:e.security.length&&z?1:0},e.security.length&&p&&R.createElement(Sy,{header:(0,Qf.l)("tryItAuth"),"data-cy":"security-trigger",error:!z&&!!y.auth,success:!!z,renderChildrenHidden:!0},Vr.OpenApiTryItSecurityPanel||M!=null&&M.ReplaceTryItSecurityPanel?R.createElement(f9,{field:"auth",validate:Wt.np},G=>R.createElement(s9.Q,{Hook:Vr.OpenApiTryItSecurityPanel||(M==null?void 0:M.ReplaceTryItSecurityPanel),props:{server:a,operation:e,onChange:G,OAuth2:Cs}})):R.createElement(i9,{formApi:p,form:n,operation:e,activeServer:a.url,authCorsProxyUrl:I,securityDefaults:r}))||null,e.requestBody&&p&&R.createElement(Sy,{header:(0,Qf.l)("tryItBody"),"data-cy":"body-trigger",error:!!y.body,renderChildrenHidden:!0},R.createElement(e5,{validate:p9,formApi:p,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:B==null?void 0:B.requestBody,properties:t}))||null,W.length&&R.createElement(Sy,{header:(0,Qf.l)("tryItParameters"),"data-cy":"parameters-trigger",error:C,renderChildrenHidden:!0},R.createElement(f5,{operation:e,values:n.values,errors:n.errors||{}}))||null))}function f9(e){const{fieldApi:t,render:r,userProps:n}=Yf(u9({},e)),{setValue:s}=t,{children:a}=n;return r(R.createElement(R.Fragment,null,a(s)))}function p9(){}const d9=(0,R.memo)(c9);function h9({shaking:e,className:t,children:r,rootElement:n}){const[s]=(0,Uy.Bs)(n),a=(0,Fo.useRecoilValue)(Hu.lk);return R.createElement(Qi.q2,{scrollYOffset:a.scrollYOffset,shaking:e,className:t,"data-cy":"console",fullWidth:s==null?void 0:s.width},r)}const m9=(0,R.memo)(h9);var v9=Object.defineProperty,g9=Object.defineProperties,y9=Object.getOwnPropertyDescriptors,sv=Object.getOwnPropertySymbols,gO=Object.prototype.hasOwnProperty,yO=Object.prototype.propertyIsEnumerable,bO=(e,t,r)=>t in e?v9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nn=(e,t)=>{for(var r in t||(t={}))gO.call(t,r)&&bO(e,r,t[r]);if(sv)for(var r of sv(t))yO.call(t,r)&&bO(e,r,t[r]);return e},qn=(e,t)=>g9(e,y9(t)),xO=(e,t)=>{var r={};for(var n in e)gO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sv)for(var n of sv(e))t.indexOf(n)<0&&yO.call(e,n)&&(r[n]=e[n]);return r},SO=(e,t,r)=>new Promise((n,s)=>{var a=h=>{try{d(r.next(h))}catch(g){s(g)}},p=h=>{try{d(r.throw(h))}catch(g){s(g)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,p);d((r=r.apply(e,t)).next())});function wO(e){return e.startsWith("//")?"https:"+e:e}function b9({operation:e,onResponse:t,className:r,rootElement:n,properties:s,securityDefaults:a,onClose:p}){let d=(0,R.useRef)();const[h,g]=(0,Fo.useRecoilState)((0,Oy.N)(e.pointer)),[y,C]=(0,R.useState)(h.activeServer||e.activeServer),[M,I]=(0,R.useState)(0),[B,z]=(0,R.useState)(!1),[W,G]=(0,R.useState)(!1),[te,le]=(0,R.useState)({values:{path:(0,Wt.ZS)(e.parameters,"path"),cookie:(0,Wt.ZS)(e.parameters,"cookie"),header:(0,Wt.ZS)(e.parameters,"header"),query:(0,Wt.ZS)(e.parameters,"query")}}),[ye,he]=(0,R.useState)(),[Ee,me]=(0,R.useState)(),[ve,ce]=(0,R.useState)(),[Se,Ce]=(0,R.useState)(),Me=(0,Uy.D9)(e),{parser:Qe,options:wt}=(0,Fo.useRecoilValue)(Hu.cS),ft=(0,R.useCallback)((Ht,yr=Ht.getState())=>{var ar=yr,{values:Ze}=ar,dt=xO(ar,["values"]);d.current=Ht,setTimeout(()=>{le(qn(nn({},dt),{values:qn(nn({},Ze),{query:(0,Wt.FU)(Ze.query||{})})}))},0)},[]),Ar=(0,R.useCallback)(Ht=>{var yr=Ht,{values:ar}=yr,Ze=xO(yr,["values"]);const dt=qn(nn({},Ze),{values:qn(nn({},ar),{query:(0,Wt.FU)(ar.query||{})})});g(Ut=>qn(nn({},Ut),{requestValues:JSON.parse(JSON.stringify(ar))})),le(dt),(0,Wt.Hc)(dt)},[g]),Qr=(0,R.useCallback)(Ht=>{I(Ht)},[]),Rr=(0,R.useCallback)(Ht=>{C(Ht),g(yr=>qn(nn({},yr),{activeServer:Ht}))},[g]),Zr=(0,R.useCallback)(()=>SO(this,null,function*(){var Ht,yr,ar,Ze,dt,Ut,rr,Bt,Un,ro,_i,Sn,Va,jl,pi,Bo,ov;const{values:Ps,invalid:tc}=((Ht=d==null?void 0:d.current)==null?void 0:Ht.getState())||te||{};if((yr=d.current)==null||yr.submitForm(),tc){G(!0),setTimeout(()=>G(!1),1e3),(Ze=(ar=wt.events)==null?void 0:ar.tryItSent)==null||Ze.call(ar,{eventType:jx.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description});return}const{servers:no,requestBody:$o}=e,Hy=$o&&$o.content&&((dt=(0,Zs.getActiveMediaType)($o.content))==null?void 0:dt.name)||"";let io=Ps.body;if(/json/.test(Hy))try{io=JSON.parse(io)}catch(Jt){console.error(Jt)}z(!0);const wn=ye,rc=(e.httpVerb||"").toLowerCase();if(!no)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 fp=no.find(Jt=>y.url.endsWith(Jt.url.endsWith("/")?Jt.url.substring(0,Jt.url.length-1):Jt.url)),zy=Date.now();let Pi,Uo=Ps.auth;if(Ps.auth){const Jt=Object.keys(Ps.auth)[0],Ti=(0,lL.dw)(Jt);Pi=qn(nn({},wn),{components:qn(nn({},wn==null?void 0:wn.components),{securitySchemes:qn(nn({},(Ut=wn==null?void 0:wn.components)==null?void 0:Ut.securitySchemes),{[Ti]:qn(nn({},(Bt=(rr=wn==null?void 0:wn.components)==null?void 0:rr.securitySchemes)==null?void 0:Bt[Ti]),{type:((_i=(ro=(Un=wn==null?void 0:wn.components)==null?void 0:Un.securitySchemes)==null?void 0:ro[Ti])==null?void 0:_i.type)==="openIdConnect"?"oauth2":((Va=(Sn=wn==null?void 0:wn.components)==null?void 0:Sn.securitySchemes)==null?void 0:Va[Ti]).type})})})}),Uo=qn(nn({},Uo),{[Ti]:Uo[Jt]})}else Pi=nn({},wn);Pi.servers=no;const Il=wt.corsProxyUrl;Il&&no.length&&(Pi.servers=no.map(Jt=>qn(nn({},Jt),{url:Il+wO(Jt.url)})),Pi.paths=qn(nn({},Pi.paths),{[e.path]:qn(nn({},Pi.paths[e.path]),{[rc]:qn(nn({},Pi.paths[e.path][rc]),{servers:void 0}),servers:void 0})}));const pp=($o==null?void 0:$o.content)&&((jl=(0,Zs.getActiveMediaType)($o.content))==null?void 0:jl.name)||null;if(pp&&io&&Tm(pp)){const Jt=Object.values(io);io=Jt.length>1?Jt:Jt[0]}const dp={server:Il?Il+wO(fp.url):fp.url,serverVariables:(0,Wt.mj)(fp),spec:Pi,pathName:e.path,method:e.httpVerb,parameters:nn(nn(nn(nn({},Ps.path),Ps.query),Ps.header),Ps.cookie),securities:{authorized:Uo},requestBody:io,requestContentType:pp,responseContentType:((pi=Ps.header)==null?void 0:pi.Accept)||null,requestInterceptor:(0,Wt.Tz)(wt,e,Uo==null?void 0:Uo.Authorization)};try{const Jt=yield Y2.execute(dp),Ti=Jt==null?void 0:Jt.data;Ti instanceof Blob&&(Tm(Ti.type)&&(Jt.fileInfo={rawData:Ti,fileName:(0,Wt.AM)(Jt.headers)}),Jt.data=yield Ti.text()),t==null||t({request:dp,response:Jt}),Ce(Jt),ce(void 0)}catch(Jt){Jt&&Jt.response&&Jt.response.data instanceof Blob&&(Jt.response.data=yield Jt.response.data.text(),t==null||t({request:dp,response:Jt.response})),Ce(void 0),ce(Jt)}finally{z(!1),I(1),me(Date.now()-zy),(ov=(Bo=wt.events)==null?void 0:Bo.tryItSent)==null||ov.call(Bo,{eventType:jx.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description})}}),[y.url,te,t,e,wt,ye]);(0,Vr.useMount)(()=>SO(this,null,function*(){var Ht;const yr=yield aL(e,Qe.definition);he(yr),(Ht=d.current)==null||Ht.setValues({})})),(0,R.useEffect)(()=>{Me&&Me!==e&&(Ce(void 0),ce(void 0),I(0))},[e,Me]);const Pr=!!(Se||ve);return R.createElement(m9,{shaking:W,className:r,rootElement:n},R.createElement(Pm.Hc,null,R.createElement(SL,{active:M,hasResponse:Pr,onChange:Qr}),p&&R.createElement(Qi.PZ,{onClick:p}," \u2715 ")),R.createElement(Qi.RE,{hidden:M!==0,"data-cy":"console-request-body"},R.createElement(d9,{operation:e,properties:s,securityDefaults:a,form:te,resolvedRawSpec:ye,server:y,formApi:d.current,setFormApi:ft,handleChange:Ar,handleServerChange:Rr})),R.createElement(Qi.RE,{hidden:M!==1,"data-cy":"console-response-body"},R.createElement(bL,{response:Se,error:ve,time:Ee})),R.createElement(AL,{hasResponse:Pr,params:te.values,operation:e,loading:B,execute:Zr}))}const x9=(0,R.memo)(b9)},94466:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"DataView");x.exports=b},85208:(x,k,c)=>{var m=c(34440),w=c(84108),b=c(61085),_=c(77706),A=c(8636);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},81998:(x,k,c)=>{var m=c(90266),w=c(42875),b=c(45828),_=c(24115),A=c(67690);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},72887:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Map");x.exports=b},95678:(x,k,c)=>{var m=c(39016),w=c(62363),b=c(64348),_=c(53062),A=c(30262);function O(j){var $=-1,K=j==null?0:j.length;for(this.clear();++$<K;){var ie=j[$];this.set(ie[0],ie[1])}}O.prototype.clear=m,O.prototype.delete=w,O.prototype.get=b,O.prototype.has=_,O.prototype.set=A,x.exports=O},95747:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Promise");x.exports=b},56616:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"Set");x.exports=b},84546:(x,k,c)=>{var m=c(95678),w=c(83937),b=c(15009);function _(A){var O=-1,j=A==null?0:A.length;for(this.__data__=new m;++O<j;)this.add(A[O])}_.prototype.add=_.prototype.push=w,_.prototype.has=b,x.exports=_},19549:(x,k,c)=>{var m=c(81998),w=c(93210),b=c(48603),_=c(38947),A=c(70885),O=c(98938);function j($){var K=this.__data__=new m($);this.size=K.size}j.prototype.clear=w,j.prototype.delete=b,j.prototype.get=_,j.prototype.has=A,j.prototype.set=O,x.exports=j},70861:(x,k,c)=>{var m=c(84100),w=m.Symbol;x.exports=w},3526:(x,k,c)=>{var m=c(84100),w=m.Uint8Array;x.exports=w},98001:(x,k,c)=>{var m=c(65234),w=c(84100),b=m(w,"WeakMap");x.exports=b},82493:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length,_=0,A=[];++w<b;){var O=c[w];m(O,w,c)&&(A[_++]=O)}return A}x.exports=k},75825:(x,k,c)=>{var m=c(18509),w=c(79312),b=c(55589),_=c(85778),A=c(5023),O=c(50922),j=Object.prototype,$=j.hasOwnProperty;function K(ie,ee){var ae=b(ie),q=!ae&&w(ie),V=!ae&&!q&&_(ie),J=!ae&&!q&&!V&&O(ie),L=ae||q||V||J,E=L?m(ie.length,String):[],N=E.length;for(var U in ie)(ee||$.call(ie,U))&&!(L&&(U=="length"||V&&(U=="offset"||U=="parent")||J&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||A(U,N)))&&E.push(U);return E}x.exports=K},29233:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length,_=Array(b);++w<b;)_[w]=m(c[w],w,c);return _}x.exports=k},10111:x=>{function k(c,m){for(var w=-1,b=m.length,_=c.length;++w<b;)c[_+w]=m[w];return c}x.exports=k},1831:x=>{function k(c,m){for(var w=-1,b=c==null?0:c.length;++w<b;)if(m(c[w],w,c))return!0;return!1}x.exports=k},18498:(x,k,c)=>{var m=c(58260);function w(b,_){for(var A=b.length;A--;)if(m(b[A][0],_))return A;return-1}x.exports=w},40548:(x,k,c)=>{var m=c(24007),w=c(86040);function b(_,A){A=m(A,_);for(var O=0,j=A.length;_!=null&&O<j;)_=_[w(A[O++])];return O&&O==j?_:void 0}x.exports=b},4468:(x,k,c)=>{var m=c(10111),w=c(55589);function b(_,A,O){var j=A(_);return w(_)?j:m(j,O(_))}x.exports=b},69823:(x,k,c)=>{var m=c(70861),w=c(91339),b=c(25151),_="[object Null]",A="[object Undefined]",O=m?m.toStringTag:void 0;function j($){return $==null?$===void 0?A:_:O&&O in Object($)?w($):b($)}x.exports=j},33016:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Arguments]";function _(A){return w(A)&&m(A)==b}x.exports=_},34662:(x,k,c)=>{var m=c(88968),w=c(50440);function b(_,A,O,j,$){return _===A?!0:_==null||A==null||!w(_)&&!w(A)?_!==_&&A!==A:m(_,A,O,j,b,$)}x.exports=b},88968:(x,k,c)=>{var m=c(19549),w=c(14952),b=c(21080),_=c(86524),A=c(87493),O=c(55589),j=c(85778),$=c(50922),K=1,ie="[object Arguments]",ee="[object Array]",ae="[object Object]",q=Object.prototype,V=q.hasOwnProperty;function J(L,E,N,U,se,ne){var Y=O(L),X=O(E),Q=Y?ee:A(L),H=X?ee:A(E);Q=Q==ie?ae:Q,H=H==ie?ae:H;var de=Q==ae,Ae=H==ae,Z=Q==H;if(Z&&j(L)){if(!j(E))return!1;Y=!0,de=!1}if(Z&&!de)return ne||(ne=new m),Y||$(L)?w(L,E,N,U,se,ne):b(L,E,Q,N,U,se,ne);if(!(N&K)){var xe=de&&V.call(L,"__wrapped__"),ue=Ae&&V.call(E,"__wrapped__");if(xe||ue){var Ne=xe?L.value():L,He=ue?E.value():E;return ne||(ne=new m),se(Ne,He,N,U,ne)}}return Z?(ne||(ne=new m),_(L,E,N,U,se,ne)):!1}x.exports=J},99817:(x,k,c)=>{var m=c(45563),w=c(28597),b=c(93702),_=c(55784),A=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,j=Function.prototype,$=Object.prototype,K=j.toString,ie=$.hasOwnProperty,ee=RegExp("^"+K.call(ie).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ae(q){if(!b(q)||w(q))return!1;var V=m(q)?ee:O;return V.test(_(q))}x.exports=ae},42448:(x,k,c)=>{var m=c(69823),w=c(66052),b=c(50440),_="[object Arguments]",A="[object Array]",O="[object Boolean]",j="[object Date]",$="[object Error]",K="[object Function]",ie="[object Map]",ee="[object Number]",ae="[object Object]",q="[object RegExp]",V="[object Set]",J="[object String]",L="[object WeakMap]",E="[object ArrayBuffer]",N="[object DataView]",U="[object Float32Array]",se="[object Float64Array]",ne="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",Q="[object Uint8Array]",H="[object Uint8ClampedArray]",de="[object Uint16Array]",Ae="[object Uint32Array]",Z={};Z[U]=Z[se]=Z[ne]=Z[Y]=Z[X]=Z[Q]=Z[H]=Z[de]=Z[Ae]=!0,Z[_]=Z[A]=Z[E]=Z[O]=Z[N]=Z[j]=Z[$]=Z[K]=Z[ie]=Z[ee]=Z[ae]=Z[q]=Z[V]=Z[J]=Z[L]=!1;function xe(ue){return b(ue)&&w(ue.length)&&!!Z[m(ue)]}x.exports=xe},41351:(x,k,c)=>{var m=c(32840),w=c(82825),b=Object.prototype,_=b.hasOwnProperty;function A(O){if(!m(O))return w(O);var j=[];for(var $ in Object(O))_.call(O,$)&&$!="constructor"&&j.push($);return j}x.exports=A},18509:x=>{function k(c,m){for(var w=-1,b=Array(c);++w<c;)b[w]=m(w);return b}x.exports=k},86245:(x,k,c)=>{var m=c(70861),w=c(29233),b=c(55589),_=c(52624),A=1/0,O=m?m.prototype:void 0,j=O?O.toString:void 0;function $(K){if(typeof K=="string")return K;if(b(K))return w(K,$)+"";if(_(K))return j?j.call(K):"";var ie=K+"";return ie=="0"&&1/K==-A?"-0":ie}x.exports=$},31525:x=>{function k(c){return function(m){return c(m)}}x.exports=k},77026:x=>{function k(c,m){return c.has(m)}x.exports=k},24007:(x,k,c)=>{var m=c(55589),w=c(5130),b=c(44041),_=c(99835);function A(O,j){return m(O)?O:w(O,j)?[O]:b(_(O))}x.exports=A},1622:(x,k,c)=>{var m=c(84100),w=m["__core-js_shared__"];x.exports=w},14952:(x,k,c)=>{var m=c(84546),w=c(1831),b=c(77026),_=1,A=2;function O(j,$,K,ie,ee,ae){var q=K&_,V=j.length,J=$.length;if(V!=J&&!(q&&J>V))return!1;var L=ae.get(j),E=ae.get($);if(L&&E)return L==$&&E==j;var N=-1,U=!0,se=K&A?new m:void 0;for(ae.set(j,$),ae.set($,j);++N<V;){var ne=j[N],Y=$[N];if(ie)var X=q?ie(Y,ne,N,$,j,ae):ie(ne,Y,N,j,$,ae);if(X!==void 0){if(X)continue;U=!1;break}if(se){if(!w($,function(Q,H){if(!b(se,H)&&(ne===Q||ee(ne,Q,K,ie,ae)))return se.push(H)})){U=!1;break}}else if(!(ne===Y||ee(ne,Y,K,ie,ae))){U=!1;break}}return ae.delete(j),ae.delete($),U}x.exports=O},21080:(x,k,c)=>{var m=c(70861),w=c(3526),b=c(58260),_=c(14952),A=c(81140),O=c(77969),j=1,$=2,K="[object Boolean]",ie="[object Date]",ee="[object Error]",ae="[object Map]",q="[object Number]",V="[object RegExp]",J="[object Set]",L="[object String]",E="[object Symbol]",N="[object ArrayBuffer]",U="[object DataView]",se=m?m.prototype:void 0,ne=se?se.valueOf:void 0;function Y(X,Q,H,de,Ae,Z,xe){switch(H){case U:if(X.byteLength!=Q.byteLength||X.byteOffset!=Q.byteOffset)return!1;X=X.buffer,Q=Q.buffer;case N:return!(X.byteLength!=Q.byteLength||!Z(new w(X),new w(Q)));case K:case ie:case q:return b(+X,+Q);case ee:return X.name==Q.name&&X.message==Q.message;case V:case L:return X==Q+"";case ae:var ue=A;case J:var Ne=de&j;if(ue||(ue=O),X.size!=Q.size&&!Ne)return!1;var He=xe.get(X);if(He)return He==Q;de|=$,xe.set(X,Q);var Re=_(ue(X),ue(Q),de,Ae,Z,xe);return xe.delete(X),Re;case E:if(ne)return ne.call(X)==ne.call(Q)}return!1}x.exports=Y},86524:(x,k,c)=>{var m=c(54357),w=1,b=Object.prototype,_=b.hasOwnProperty;function A(O,j,$,K,ie,ee){var ae=$&w,q=m(O),V=q.length,J=m(j),L=J.length;if(V!=L&&!ae)return!1;for(var E=V;E--;){var N=q[E];if(!(ae?N in j:_.call(j,N)))return!1}var U=ee.get(O),se=ee.get(j);if(U&&se)return U==j&&se==O;var ne=!0;ee.set(O,j),ee.set(j,O);for(var Y=ae;++E<V;){N=q[E];var X=O[N],Q=j[N];if(K)var H=ae?K(Q,X,N,j,O,ee):K(X,Q,N,O,j,ee);if(!(H===void 0?X===Q||ie(X,Q,$,K,ee):H)){ne=!1;break}Y||(Y=N=="constructor")}if(ne&&!Y){var de=O.constructor,Ae=j.constructor;de!=Ae&&"constructor"in O&&"constructor"in j&&!(typeof de=="function"&&de instanceof de&&typeof Ae=="function"&&Ae instanceof Ae)&&(ne=!1)}return ee.delete(O),ee.delete(j),ne}x.exports=A},20302:(x,k,c)=>{var m=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;x.exports=m},54357:(x,k,c)=>{var m=c(4468),w=c(44450),b=c(62096);function _(A){return m(A,b,w)}x.exports=_},77570:(x,k,c)=>{var m=c(58949);function w(b,_){var A=b.__data__;return m(_)?A[typeof _=="string"?"string":"hash"]:A.map}x.exports=w},65234:(x,k,c)=>{var m=c(99817),w=c(67736);function b(_,A){var O=w(_,A);return m(O)?O:void 0}x.exports=b},91339:(x,k,c)=>{var m=c(70861),w=Object.prototype,b=w.hasOwnProperty,_=w.toString,A=m?m.toStringTag:void 0;function O(j){var $=b.call(j,A),K=j[A];try{j[A]=void 0;var ie=!0}catch(ae){}var ee=_.call(j);return ie&&($?j[A]=K:delete j[A]),ee}x.exports=O},44450:(x,k,c)=>{var m=c(82493),w=c(84506),b=Object.prototype,_=b.propertyIsEnumerable,A=Object.getOwnPropertySymbols,O=A?function(j){return j==null?[]:(j=Object(j),m(A(j),function($){return _.call(j,$)}))}:w;x.exports=O},87493:(x,k,c)=>{var m=c(94466),w=c(72887),b=c(95747),_=c(56616),A=c(98001),O=c(69823),j=c(55784),$="[object Map]",K="[object Object]",ie="[object Promise]",ee="[object Set]",ae="[object WeakMap]",q="[object DataView]",V=j(m),J=j(w),L=j(b),E=j(_),N=j(A),U=O;(m&&U(new m(new ArrayBuffer(1)))!=q||w&&U(new w)!=$||b&&U(b.resolve())!=ie||_&&U(new _)!=ee||A&&U(new A)!=ae)&&(U=function(se){var ne=O(se),Y=ne==K?se.constructor:void 0,X=Y?j(Y):"";if(X)switch(X){case V:return q;case J:return $;case L:return ie;case E:return ee;case N:return ae}return ne}),x.exports=U},67736:x=>{function k(c,m){return c==null?void 0:c[m]}x.exports=k},34440:(x,k,c)=>{var m=c(24545);function w(){this.__data__=m?m(null):{},this.size=0}x.exports=w},84108:x=>{function k(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}x.exports=k},61085:(x,k,c)=>{var m=c(24545),w="__lodash_hash_undefined__",b=Object.prototype,_=b.hasOwnProperty;function A(O){var j=this.__data__;if(m){var $=j[O];return $===w?void 0:$}return _.call(j,O)?j[O]:void 0}x.exports=A},77706:(x,k,c)=>{var m=c(24545),w=Object.prototype,b=w.hasOwnProperty;function _(A){var O=this.__data__;return m?O[A]!==void 0:b.call(O,A)}x.exports=_},8636:(x,k,c)=>{var m=c(24545),w="__lodash_hash_undefined__";function b(_,A){var O=this.__data__;return this.size+=this.has(_)?0:1,O[_]=m&&A===void 0?w:A,this}x.exports=b},5023:x=>{var k=9007199254740991,c=/^(?:0|[1-9]\d*)$/;function m(w,b){var _=typeof w;return b=b==null?k:b,!!b&&(_=="number"||_!="symbol"&&c.test(w))&&w>-1&&w%1==0&&w<b}x.exports=m},5130:(x,k,c)=>{var m=c(55589),w=c(52624),b=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_=/^\w*$/;function A(O,j){if(m(O))return!1;var $=typeof O;return $=="number"||$=="symbol"||$=="boolean"||O==null||w(O)?!0:_.test(O)||!b.test(O)||j!=null&&O in Object(j)}x.exports=A},58949:x=>{function k(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}x.exports=k},28597:(x,k,c)=>{var m=c(1622),w=function(){var _=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}();function b(_){return!!w&&w in _}x.exports=b},32840:x=>{var k=Object.prototype;function c(m){var w=m&&m.constructor,b=typeof w=="function"&&w.prototype||k;return m===b}x.exports=c},90266:x=>{function k(){this.__data__=[],this.size=0}x.exports=k},42875:(x,k,c)=>{var m=c(18498),w=Array.prototype,b=w.splice;function _(A){var O=this.__data__,j=m(O,A);if(j<0)return!1;var $=O.length-1;return j==$?O.pop():b.call(O,j,1),--this.size,!0}x.exports=_},45828:(x,k,c)=>{var m=c(18498);function w(b){var _=this.__data__,A=m(_,b);return A<0?void 0:_[A][1]}x.exports=w},24115:(x,k,c)=>{var m=c(18498);function w(b){return m(this.__data__,b)>-1}x.exports=w},67690:(x,k,c)=>{var m=c(18498);function w(b,_){var A=this.__data__,O=m(A,b);return O<0?(++this.size,A.push([b,_])):A[O][1]=_,this}x.exports=w},39016:(x,k,c)=>{var m=c(85208),w=c(81998),b=c(72887);function _(){this.size=0,this.__data__={hash:new m,map:new(b||w),string:new m}}x.exports=_},62363:(x,k,c)=>{var m=c(77570);function w(b){var _=m(this,b).delete(b);return this.size-=_?1:0,_}x.exports=w},64348:(x,k,c)=>{var m=c(77570);function w(b){return m(this,b).get(b)}x.exports=w},53062:(x,k,c)=>{var m=c(77570);function w(b){return m(this,b).has(b)}x.exports=w},30262:(x,k,c)=>{var m=c(77570);function w(b,_){var A=m(this,b),O=A.size;return A.set(b,_),this.size+=A.size==O?0:1,this}x.exports=w},81140:x=>{function k(c){var m=-1,w=Array(c.size);return c.forEach(function(b,_){w[++m]=[_,b]}),w}x.exports=k},32924:(x,k,c)=>{var m=c(67997),w=500;function b(_){var A=m(_,function(j){return O.size===w&&O.clear(),j}),O=A.cache;return A}x.exports=b},24545:(x,k,c)=>{var m=c(65234),w=m(Object,"create");x.exports=w},82825:(x,k,c)=>{var m=c(33540),w=m(Object.keys,Object);x.exports=w},8690:(x,k,c)=>{x=c.nmd(x);var m=c(20302),w=k&&!k.nodeType&&k,b=w&&!0&&x&&!x.nodeType&&x,_=b&&b.exports===w,A=_&&m.process,O=function(){try{var j=b&&b.require&&b.require("util").types;return j||A&&A.binding&&A.binding("util")}catch($){}}();x.exports=O},25151:x=>{var k=Object.prototype,c=k.toString;function m(w){return c.call(w)}x.exports=m},33540:x=>{function k(c,m){return function(w){return c(m(w))}}x.exports=k},84100:(x,k,c)=>{var m=c(20302),w=typeof self=="object"&&self&&self.Object===Object&&self,b=m||w||Function("return this")();x.exports=b},83937:x=>{var k="__lodash_hash_undefined__";function c(m){return this.__data__.set(m,k),this}x.exports=c},15009:x=>{function k(c){return this.__data__.has(c)}x.exports=k},77969:x=>{function k(c){var m=-1,w=Array(c.size);return c.forEach(function(b){w[++m]=b}),w}x.exports=k},93210:(x,k,c)=>{var m=c(81998);function w(){this.__data__=new m,this.size=0}x.exports=w},48603:x=>{function k(c){var m=this.__data__,w=m.delete(c);return this.size=m.size,w}x.exports=k},38947:x=>{function k(c){return this.__data__.get(c)}x.exports=k},70885:x=>{function k(c){return this.__data__.has(c)}x.exports=k},98938:(x,k,c)=>{var m=c(81998),w=c(72887),b=c(95678),_=200;function A(O,j){var $=this.__data__;if($ instanceof m){var K=$.__data__;if(!w||K.length<_-1)return K.push([O,j]),this.size=++$.size,this;$=this.__data__=new b(K)}return $.set(O,j),this.size=$.size,this}x.exports=A},44041:(x,k,c)=>{var m=c(32924),w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,b=/\\(\\)?/g,_=m(function(A){var O=[];return A.charCodeAt(0)===46&&O.push(""),A.replace(w,function(j,$,K,ie){O.push(K?ie.replace(b,"$1"):$||j)}),O});x.exports=_},86040:(x,k,c)=>{var m=c(52624),w=1/0;function b(_){if(typeof _=="string"||m(_))return _;var A=_+"";return A=="0"&&1/_==-w?"-0":A}x.exports=b},55784:x=>{var k=Function.prototype,c=k.toString;function m(w){if(w!=null){try{return c.call(w)}catch(b){}try{return w+""}catch(b){}}return""}x.exports=m},58260:x=>{function k(c,m){return c===m||c!==c&&m!==m}x.exports=k},13546:(x,k,c)=>{var m=c(40548);function w(b,_,A){var O=b==null?void 0:m(b,_);return O===void 0?A:O}x.exports=w},79312:(x,k,c)=>{var m=c(33016),w=c(50440),b=Object.prototype,_=b.hasOwnProperty,A=b.propertyIsEnumerable,O=m(function(){return arguments}())?m:function(j){return w(j)&&_.call(j,"callee")&&!A.call(j,"callee")};x.exports=O},55589:x=>{var k=Array.isArray;x.exports=k},30568:(x,k,c)=>{var m=c(45563),w=c(66052);function b(_){return _!=null&&w(_.length)&&!m(_)}x.exports=b},89256:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Boolean]";function _(A){return A===!0||A===!1||w(A)&&m(A)==b}x.exports=_},85778:(x,k,c)=>{x=c.nmd(x);var m=c(84100),w=c(37999),b=k&&!k.nodeType&&k,_=b&&!0&&x&&!x.nodeType&&x,A=_&&_.exports===b,O=A?m.Buffer:void 0,j=O?O.isBuffer:void 0,$=j||w;x.exports=$},85466:(x,k,c)=>{var m=c(34662);function w(b,_){return m(b,_)}x.exports=w},45563:(x,k,c)=>{var m=c(69823),w=c(93702),b="[object AsyncFunction]",_="[object Function]",A="[object GeneratorFunction]",O="[object Proxy]";function j($){if(!w($))return!1;var K=m($);return K==_||K==A||K==b||K==O}x.exports=j},66052:x=>{var k=9007199254740991;function c(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=k}x.exports=c},7534:x=>{function k(c){return c===null}x.exports=k},3224:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Number]";function _(A){return typeof A=="number"||w(A)&&m(A)==b}x.exports=_},93702:x=>{function k(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}x.exports=k},50440:x=>{function k(c){return c!=null&&typeof c=="object"}x.exports=k},76705:(x,k,c)=>{var m=c(69823),w=c(55589),b=c(50440),_="[object String]";function A(O){return typeof O=="string"||!w(O)&&b(O)&&m(O)==_}x.exports=A},52624:(x,k,c)=>{var m=c(69823),w=c(50440),b="[object Symbol]";function _(A){return typeof A=="symbol"||w(A)&&m(A)==b}x.exports=_},50922:(x,k,c)=>{var m=c(42448),w=c(31525),b=c(8690),_=b&&b.isTypedArray,A=_?w(_):m;x.exports=A},62096:(x,k,c)=>{var m=c(75825),w=c(41351),b=c(30568);function _(A){return b(A)?m(A):w(A)}x.exports=_},67997:(x,k,c)=>{var m=c(95678),w="Expected a function";function b(_,A){if(typeof _!="function"||A!=null&&typeof A!="function")throw new TypeError(w);var O=function(){var j=arguments,$=A?A.apply(this,j):j[0],K=O.cache;if(K.has($))return K.get($);var ie=_.apply(this,j);return O.cache=K.set($,ie)||K,ie};return O.cache=new(b.Cache||m),O}b.Cache=m,x.exports=b},30606:x=>{var k="Expected a function";function c(m){if(typeof m!="function")throw new TypeError(k);return function(){var w=arguments;switch(w.length){case 0:return!m.call(this);case 1:return!m.call(this,w[0]);case 2:return!m.call(this,w[0],w[1]);case 3:return!m.call(this,w[0],w[1],w[2])}return!m.apply(this,w)}}x.exports=c},84506:x=>{function k(){return[]}x.exports=k},37999:x=>{function k(){return!1}x.exports=k},99835:(x,k,c)=>{var m=c(86245);function w(b){return b==null?"":m(b)}x.exports=w},38220:(x,k,c)=>{const m=c(30606);function w(_){return typeof _=="string"?A=>A.element===_:_.constructor&&_.extend?A=>A instanceof _:_}class b{constructor(A){this.elements=A||[]}toValue(){return this.elements.map(A=>A.toValue())}map(A,O){return this.elements.map(A,O)}flatMap(A,O){return this.map(A,O).reduce((j,$)=>j.concat($),[])}compactMap(A,O){const j=[];return this.forEach($=>{const K=A.bind(O)($);K&&j.push(K)}),j}filter(A,O){return A=w(A),new b(this.elements.filter(A,O))}reject(A,O){return A=w(A),new b(this.elements.filter(m(A),O))}find(A,O){return A=w(A),this.elements.find(A,O)}forEach(A,O){this.elements.forEach(A,O)}reduce(A,O){return this.elements.reduce(A,O)}includes(A){return this.elements.some(O=>O.equals(A))}shift(){return this.elements.shift()}unshift(A){this.elements.unshift(this.refract(A))}push(A){return this.elements.push(this.refract(A)),this}add(A){this.push(A)}get(A){return this.elements[A]}getValue(A){const O=this.elements[A];if(O)return O.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}}typeof Symbol!="undefined"&&(b.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),x.exports=b},91608:x=>{class k{constructor(m,w){this.key=m,this.value=w}clone(){const m=new k;return this.key&&(m.key=this.key.clone()),this.value&&(m.value=this.value.clone()),m}}x.exports=k},85672:(x,k,c)=>{const m=c(7534),w=c(76705),b=c(3224),_=c(89256),A=c(93702),O=c(15050),j=c(32872);class ${constructor(ie){this.elementMap={},this.elementDetection=[],this.Element=j.Element,this.KeyValuePair=j.KeyValuePair,(!ie||!ie.noDefault)&&this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(ie){return ie.namespace&&ie.namespace({base:this}),ie.load&&ie.load({base:this}),this}useDefault(){return this.register("null",j.NullElement).register("string",j.StringElement).register("number",j.NumberElement).register("boolean",j.BooleanElement).register("array",j.ArrayElement).register("object",j.ObjectElement).register("member",j.MemberElement).register("ref",j.RefElement).register("link",j.LinkElement),this.detect(m,j.NullElement,!1).detect(w,j.StringElement,!1).detect(b,j.NumberElement,!1).detect(_,j.BooleanElement,!1).detect(Array.isArray,j.ArrayElement,!1).detect(A,j.ObjectElement,!1),this}register(ie,ee){return this._elements=void 0,this.elementMap[ie]=ee,this}unregister(ie){return this._elements=void 0,delete this.elementMap[ie],this}detect(ie,ee,ae){return(ae===void 0?!0:ae)?this.elementDetection.unshift([ie,ee]):this.elementDetection.push([ie,ee]),this}toElement(ie){if(ie instanceof this.Element)return ie;let ee;for(let ae=0;ae<this.elementDetection.length;ae+=1){const q=this.elementDetection[ae][0],V=this.elementDetection[ae][1];if(q(ie)){ee=new V(ie);break}}return ee}getElementClass(ie){const ee=this.elementMap[ie];return ee===void 0?this.Element:ee}fromRefract(ie){return this.serialiser.deserialise(ie)}toRefract(ie){return this.serialiser.serialise(ie)}get elements(){return this._elements===void 0&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(ie=>{const ee=ie[0].toUpperCase()+ie.substr(1);this._elements[ee]=this.elementMap[ie]})),this._elements}get serialiser(){return new O(this)}}O.prototype.Namespace=$,x.exports=$},18424:(x,k,c)=>{const m=c(30606),w=c(38220);class b extends w{map(A,O){return this.elements.map(j=>A.bind(O)(j.value,j.key,j))}filter(A,O){return new b(this.elements.filter(j=>A.bind(O)(j.value,j.key,j)))}reject(A,O){return this.filter(m(A.bind(O)))}forEach(A,O){return this.elements.forEach((j,$)=>{A.bind(O)(j.value,j.key,j,$)})}keys(){return this.map((A,O)=>O.toValue())}values(){return this.map(A=>A.toValue())}}x.exports=b},32872:(x,k,c)=>{const m=c(37567),w=c(22114),b=c(99368),_=c(35549),A=c(82660),O=c(75494),j=c(91839),$=c(79622),K=c(13100),ie=c(10437),ee=c(38220),ae=c(18424),q=c(91608);function V(J){return J instanceof m?J:typeof J=="string"?new b(J):typeof J=="number"?new _(J):typeof J=="boolean"?new A(J):J===null?new w:Array.isArray(J)?new O(J.map(V)):typeof J=="object"?new $(J):J}m.prototype.ObjectElement=$,m.prototype.RefElement=ie,m.prototype.MemberElement=j,m.prototype.refract=V,ee.prototype.refract=V,x.exports={Element:m,NullElement:w,StringElement:b,NumberElement:_,BooleanElement:A,ArrayElement:O,MemberElement:j,ObjectElement:$,LinkElement:K,RefElement:ie,refract:V,ArraySlice:ee,ObjectSlice:ae,KeyValuePair:q}},13100:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b||[],_,A),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(b){this.attributes.set("relation",b)}get href(){return this.attributes.get("href")}set href(b){this.attributes.set("href",b)}}},10437:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b||[],_,A),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(b){this.attributes.set("path",b)}}},33030:(x,k,c)=>{var m;const w=c(85672),b=c(32872);k.lS=w,m=function(A){return new w(A)},c(91608),m=b.ArraySlice,m=b.ObjectSlice,k.W_=b.Element,k.RP=b.StringElement,k.VL=b.NumberElement,k.hh=b.BooleanElement,k.zr=b.NullElement,k.ON=b.ArrayElement,k.Sb=b.ObjectElement,k.c6=b.MemberElement,k.tK=b.RefElement,k.EA=b.LinkElement,k.Qc=b.refract,c(15050),c(15967)},75494:(x,k,c)=>{const m=c(30606),w=c(37567),b=c(38220);class _ extends w{constructor(O,j,$){super(O||[],j,$),this.element="array"}primitive(){return"array"}get(O){return this.content[O]}getValue(O){const j=this.get(O);if(j)return j.toValue()}getIndex(O){return this.content[O]}set(O,j){return this.content[O]=this.refract(j),this}remove(O){const j=this.content.splice(O,1);return j.length?j[0]:null}map(O,j){return this.content.map(O,j)}flatMap(O,j){return this.map(O,j).reduce(($,K)=>$.concat(K),[])}compactMap(O,j){const $=[];return this.forEach(K=>{const ie=O.bind(j)(K);ie&&$.push(ie)}),$}filter(O,j){return new b(this.content.filter(O,j))}reject(O,j){return this.filter(m(O),j)}reduce(O,j){let $,K;j!==void 0?($=0,K=this.refract(j)):($=1,K=this.primitive()==="object"?this.first.value:this.first);for(let ie=$;ie<this.length;ie+=1){const ee=this.content[ie];this.primitive()==="object"?K=this.refract(O(K,ee.value,ee.key,ee,this)):K=this.refract(O(K,ee,ie,this))}return K}forEach(O,j){this.content.forEach(($,K)=>{O.bind(j)($,this.refract(K))})}shift(){return this.content.shift()}unshift(O){this.content.unshift(this.refract(O))}push(O){return this.content.push(this.refract(O)),this}add(O){this.push(O)}findElements(O,j){const $=j||{},K=!!$.recursive,ie=$.results===void 0?[]:$.results;return this.forEach((ee,ae,q)=>{K&&ee.findElements!==void 0&&ee.findElements(O,{results:ie,recursive:K}),O(ee,ae,q)&&ie.push(ee)}),ie}find(O){return new b(this.findElements(O,{recursive:!0}))}findByElement(O){return this.find(j=>j.element===O)}findByClass(O){return this.find(j=>j.classes.includes(O))}getById(O){return this.find(j=>j.id.toValue()===O).first}includes(O){return this.content.some(j=>j.equals(O))}contains(O){return this.includes(O)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(O){return new this.constructor(this.content.concat(O.content))}"fantasy-land/concat"(O){return this.concat(O)}"fantasy-land/map"(O){return new this.constructor(this.map(O))}"fantasy-land/chain"(O){return this.map(j=>O(j),this).reduce((j,$)=>j.concat($),this.empty())}"fantasy-land/filter"(O){return new this.constructor(this.content.filter(O))}"fantasy-land/reduce"(O,j){return this.content.reduce(O,j)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}_.empty=function(){return new this},_["fantasy-land/empty"]=_.empty,typeof Symbol!="undefined"&&(_.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),x.exports=_},82660:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="boolean"}primitive(){return"boolean"}}},37567:(x,k,c)=>{const m=c(85466),w=c(91608),b=c(38220);class _{constructor(O,j,$){j&&(this.meta=j),$&&(this.attributes=$),this.content=O}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(O=>{O.parent=this,O.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const O=new this.constructor;return O.element=this.element,this.meta.length&&(O._meta=this.meta.clone()),this.attributes.length&&(O._attributes=this.attributes.clone()),this.content?this.content.clone?O.content=this.content.clone():Array.isArray(this.content)?O.content=this.content.map(j=>j.clone()):O.content=this.content:O.content=this.content,O}toValue(){return this.content instanceof _?this.content.toValue():this.content instanceof w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(O=>O.toValue(),this):this.content}toRef(O){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const j=new this.RefElement(this.id.toValue());return O&&(j.path=O),j}findRecursive(...O){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const j=O.pop();let $=new b;const K=(ee,ae)=>(ee.push(ae),ee),ie=(ee,ae)=>{ae.element===j&&ee.push(ae);const q=ae.findRecursive(j);return q&&q.reduce(K,ee),ae.content instanceof w&&(ae.content.key&&ie(ee,ae.content.key),ae.content.value&&ie(ee,ae.content.value)),ee};return this.content&&(this.content.element&&ie($,this.content),Array.isArray(this.content)&&this.content.reduce(ie,$)),O.isEmpty||($=$.filter(ee=>{let ae=ee.parents.map(q=>q.element);for(const q in O){const V=O[q],J=ae.indexOf(V);if(J!==-1)ae=ae.splice(0,J);else return!1}return!0})),$}set(O){return this.content=O,this}equals(O){return m(this.toValue(),O)}getMetaProperty(O,j){if(!this.meta.hasKey(O)){if(this.isFrozen){const $=this.refract(j);return $.freeze(),$}this.meta.set(O,j)}return this.meta.get(O)}setMetaProperty(O,j){this.meta.set(O,j)}get element(){return this._storedElement||"element"}set element(O){this._storedElement=O}get content(){return this._content}set content(O){if(O instanceof _)this._content=O;else if(O instanceof b)this.content=O.elements;else if(typeof O=="string"||typeof O=="number"||typeof O=="boolean"||O==="null"||O==null)this._content=O;else if(O instanceof w)this._content=O;else if(Array.isArray(O))this._content=O.map(this.refract);else if(typeof O=="object")this._content=Object.keys(O).map(j=>new this.MemberElement(j,O[j]));else throw new Error("Cannot set content to given value")}get meta(){if(!this._meta){if(this.isFrozen){const O=new this.ObjectElement;return O.freeze(),O}this._meta=new this.ObjectElement}return this._meta}set meta(O){O instanceof this.ObjectElement?this._meta=O:this.meta.set(O||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const O=new this.ObjectElement;return O.freeze(),O}this._attributes=new this.ObjectElement}return this._attributes}set attributes(O){O instanceof this.ObjectElement?this._attributes=O:this.attributes.set(O||{})}get id(){return this.getMetaProperty("id","")}set id(O){this.setMetaProperty("id",O)}get classes(){return this.getMetaProperty("classes",[])}set classes(O){this.setMetaProperty("classes",O)}get title(){return this.getMetaProperty("title","")}set title(O){this.setMetaProperty("title",O)}get description(){return this.getMetaProperty("description","")}set description(O){this.setMetaProperty("description",O)}get links(){return this.getMetaProperty("links",[])}set links(O){this.setMetaProperty("links",O)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:O}=this;const j=new b;for(;O;)j.push(O),O=O.parent;return j}get children(){if(Array.isArray(this.content))return new b(this.content);if(this.content instanceof w){const O=new b([this.content.key]);return this.content.value&&O.push(this.content.value),O}return this.content instanceof _?new b([this.content]):new b}get recursiveChildren(){const O=new b;return this.children.forEach(j=>{O.push(j),j.recursiveChildren.forEach($=>{O.push($)})}),O}}x.exports=_},91839:(x,k,c)=>{const m=c(91608),w=c(37567);x.exports=class extends w{constructor(_,A,O,j){super(new m,O,j),this.element="member",this.key=_,this.value=A}get key(){return this.content.key}set key(_){this.content.key=this.refract(_)}get value(){return this.content.value}set value(_){this.content.value=this.refract(_)}}},22114:(x,k,c)=>{const m=c(37567);class w extends m{constructor(_,A,O){super(_||null,A,O),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}x.exports=w},35549:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="number"}primitive(){return"number"}}},79622:(x,k,c)=>{const m=c(30606),w=c(93702),b=c(75494),_=c(91839),A=c(18424);class O extends b{constructor($,K,ie){super($||[],K,ie),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(($,K)=>($[K.key.toValue()]=K.value?K.value.toValue():void 0,$),{})}get($){const K=this.getMember($);if(K)return K.value}getMember($){if($!==void 0)return this.content.find(K=>K.key.toValue()===$)}remove($){let K=null;return this.content=this.content.filter(ie=>ie.key.toValue()===$?(K=ie,!1):!0),K}getKey($){const K=this.getMember($);if(K)return K.key}set($,K){if(w($))return Object.keys($).forEach(ae=>{this.set(ae,$[ae])}),this;const ie=$,ee=this.getMember(ie);return ee?ee.value=K:this.content.push(new _(ie,K)),this}keys(){return this.content.map($=>$.key.toValue())}values(){return this.content.map($=>$.value.toValue())}hasKey($){return this.content.some(K=>K.key.equals($))}items(){return this.content.map($=>[$.key.toValue(),$.value.toValue()])}map($,K){return this.content.map(ie=>$.bind(K)(ie.value,ie.key,ie))}compactMap($,K){const ie=[];return this.forEach((ee,ae,q)=>{const V=$.bind(K)(ee,ae,q);V&&ie.push(V)}),ie}filter($,K){return new A(this.content).filter($,K)}reject($,K){return this.filter(m($),K)}forEach($,K){return this.content.forEach(ie=>$.bind(K)(ie.value,ie.key,ie))}}x.exports=O},99368:(x,k,c)=>{const m=c(37567);x.exports=class extends m{constructor(b,_,A){super(b,_,A),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},15967:(x,k,c)=>{const m=c(15050);x.exports=class extends m{serialise(b){if(!(b instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${b}\` is not an Element instance`);let _;b._attributes&&b.attributes.get("variable")&&(_=b.attributes.get("variable"));const A={element:b.element};b._meta&&b._meta.length>0&&(A.meta=this.serialiseObject(b.meta));const O=b.element==="enum"||b.attributes.keys().indexOf("enumerations")!==-1;if(O){const j=this.enumSerialiseAttributes(b);j&&(A.attributes=j)}else if(b._attributes&&b._attributes.length>0){let{attributes:j}=b;j.get("metadata")&&(j=j.clone(),j.set("meta",j.get("metadata")),j.remove("metadata")),b.element==="member"&&_&&(j=j.clone(),j.remove("variable")),j.length>0&&(A.attributes=this.serialiseObject(j))}if(O)A.content=this.enumSerialiseContent(b,A);else if(this[`${b.element}SerialiseContent`])A.content=this[`${b.element}SerialiseContent`](b,A);else if(b.content!==void 0){let j;_&&b.content.key?(j=b.content.clone(),j.key.attributes.set("variable",_),j=this.serialiseContent(j)):j=this.serialiseContent(b.content),this.shouldSerialiseContent(b,j)&&(A.content=j)}else this.shouldSerialiseContent(b,b.content)&&b instanceof this.namespace.elements.Array&&(A.content=[]);return A}shouldSerialiseContent(b,_){return b.element==="parseResult"||b.element==="httpRequest"||b.element==="httpResponse"||b.element==="category"||b.element==="link"?!0:!(_===void 0||Array.isArray(_)&&_.length===0)}refSerialiseContent(b,_){return delete _.attributes,{href:b.toValue(),path:b.path.toValue()}}sourceMapSerialiseContent(b){return b.toValue()}dataStructureSerialiseContent(b){return[this.serialiseContent(b.content)]}enumSerialiseAttributes(b){const _=b.attributes.clone(),A=_.remove("enumerations")||new this.namespace.elements.Array([]),O=_.get("default");let j=_.get("samples")||new this.namespace.elements.Array([]);if(O&&O.content&&(O.content.attributes&&O.content.attributes.remove("typeAttributes"),_.set("default",new this.namespace.elements.Array([O.content]))),j.forEach($=>{$.content&&$.content.element&&$.content.attributes.remove("typeAttributes")}),b.content&&A.length!==0&&j.unshift(b.content),j=j.map($=>$ instanceof this.namespace.elements.Array?[$]:new this.namespace.elements.Array([$.content])),j.length&&_.set("samples",j),_.length>0)return this.serialiseObject(_)}enumSerialiseContent(b){if(b._attributes){const _=b.attributes.get("enumerations");if(_&&_.length>0)return _.content.map(A=>{const O=A.clone();return O.attributes.remove("typeAttributes"),this.serialise(O)})}if(b.content){const _=b.content.clone();return _.attributes.remove("typeAttributes"),[this.serialise(_)]}return[]}deserialise(b){if(typeof b=="string")return new this.namespace.elements.String(b);if(typeof b=="number")return new this.namespace.elements.Number(b);if(typeof b=="boolean")return new this.namespace.elements.Boolean(b);if(b===null)return new this.namespace.elements.Null;if(Array.isArray(b))return new this.namespace.elements.Array(b.map(this.deserialise,this));const _=this.namespace.getElementClass(b.element),A=new _;A.element!==b.element&&(A.element=b.element),b.meta&&this.deserialiseObject(b.meta,A.meta),b.attributes&&this.deserialiseObject(b.attributes,A.attributes);const O=this.deserialiseContent(b.content);if((O!==void 0||A.content===null)&&(A.content=O),A.element==="enum"){A.content&&A.attributes.set("enumerations",A.content);let j=A.attributes.get("samples");if(A.attributes.remove("samples"),j){const K=j;j=new this.namespace.elements.Array,K.forEach(ee=>{ee.forEach(ae=>{const q=new _(ae);q.element=A.element,j.push(q)})});const ie=j.shift();ie?A.content=ie.content:A.content=void 0,A.attributes.set("samples",j)}else A.content=void 0;let $=A.attributes.get("default");if($&&$.length>0){$=$.get(0);const K=new _($);K.element=A.element,A.attributes.set("default",K)}}else if(A.element==="dataStructure"&&Array.isArray(A.content))[A.content]=A.content;else if(A.element==="category"){const j=A.attributes.get("meta");j&&(A.attributes.set("metadata",j),A.attributes.remove("meta"))}else A.element==="member"&&A.key&&A.key._attributes&&A.key._attributes.getValue("variable")&&(A.attributes.set("variable",A.key.attributes.get("variable")),A.key.attributes.remove("variable"));return A}serialiseContent(b){if(b instanceof this.namespace.elements.Element)return this.serialise(b);if(b instanceof this.namespace.KeyValuePair){const _={key:this.serialise(b.key)};return b.value&&(_.value=this.serialise(b.value)),_}return b&&b.map?b.map(this.serialise,this):b}deserialiseContent(b){if(b){if(b.element)return this.deserialise(b);if(b.key){const _=new this.namespace.KeyValuePair(this.deserialise(b.key));return b.value&&(_.value=this.deserialise(b.value)),_}if(b.map)return b.map(this.deserialise,this)}return b}shouldRefract(b){return b._attributes&&b.attributes.keys().length||b._meta&&b.meta.keys().length?!0:b.element==="enum"?!1:b.element!==b.primitive()||b.element==="member"}convertKeyToRefract(b,_){return this.shouldRefract(_)?this.serialise(_):_.element==="enum"?this.serialiseEnum(_):_.element==="array"?_.map(A=>this.shouldRefract(A)||b==="default"?this.serialise(A):A.element==="array"||A.element==="object"||A.element==="enum"?A.children.map(O=>this.serialise(O)):A.toValue()):_.element==="object"?(_.content||[]).map(this.serialise,this):_.toValue()}serialiseEnum(b){return b.children.map(_=>this.serialise(_))}serialiseObject(b){const _={};return b.forEach((A,O)=>{if(A){const j=O.toValue();_[j]=this.convertKeyToRefract(j,A)}}),_}deserialiseObject(b,_){Object.keys(b).forEach(A=>{_.set(A,this.deserialise(b[A]))})}}},15050:x=>{class k{constructor(m){this.namespace=m||new this.Namespace}serialise(m){if(!(m instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${m}\` is not an Element instance`);const w={element:m.element};m._meta&&m._meta.length>0&&(w.meta=this.serialiseObject(m.meta)),m._attributes&&m._attributes.length>0&&(w.attributes=this.serialiseObject(m.attributes));const b=this.serialiseContent(m.content);return b!==void 0&&(w.content=b),w}deserialise(m){if(!m.element)throw new Error("Given value is not an object containing an element name");const w=this.namespace.getElementClass(m.element),b=new w;b.element!==m.element&&(b.element=m.element),m.meta&&this.deserialiseObject(m.meta,b.meta),m.attributes&&this.deserialiseObject(m.attributes,b.attributes);const _=this.deserialiseContent(m.content);return(_!==void 0||b.content===null)&&(b.content=_),b}serialiseContent(m){if(m instanceof this.namespace.elements.Element)return this.serialise(m);if(m instanceof this.namespace.KeyValuePair){const w={key:this.serialise(m.key)};return m.value&&(w.value=this.serialise(m.value)),w}return m&&m.map?m.length===0?void 0:m.map(this.serialise,this):m}deserialiseContent(m){if(m){if(m.element)return this.deserialise(m);if(m.key){const w=new this.namespace.KeyValuePair(this.deserialise(m.key));return m.value&&(w.value=this.deserialise(m.value)),w}if(m.map)return m.map(this.deserialise,this)}return m}serialiseObject(m){const w={};if(m.forEach((b,_)=>{b&&(w[_.toValue()]=this.serialise(b))}),Object.keys(w).length!==0)return w}deserialiseObject(m,w){Object.keys(m).forEach(b=>{w.set(b,this.deserialise(m[b]))})}}x.exports=k},14927:(x,k,c)=>{var m=typeof Map=="function"&&Map.prototype,w=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=m&&w&&typeof w.get=="function"?w.get:null,_=m&&Map.prototype.forEach,A=typeof Set=="function"&&Set.prototype,O=Object.getOwnPropertyDescriptor&&A?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=A&&O&&typeof O.get=="function"?O.get:null,$=A&&Set.prototype.forEach,K=typeof WeakMap=="function"&&WeakMap.prototype,ie=K?WeakMap.prototype.has:null,ee=typeof WeakSet=="function"&&WeakSet.prototype,ae=ee?WeakSet.prototype.has:null,q=typeof WeakRef=="function"&&WeakRef.prototype,V=q?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,L=Object.prototype.toString,E=Function.prototype.toString,N=String.prototype.match,U=String.prototype.slice,se=String.prototype.replace,ne=String.prototype.toUpperCase,Y=String.prototype.toLowerCase,X=RegExp.prototype.test,Q=Array.prototype.concat,H=Array.prototype.join,de=Array.prototype.slice,Ae=Math.floor,Z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xe=Object.getOwnPropertySymbols,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="object",He=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ne||"symbol")?Symbol.toStringTag:null,Re=Object.prototype.propertyIsEnumerable,ze=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(pe){return pe.__proto__}:null);function Be(pe,Pe){if(pe===1/0||pe===-1/0||pe!==pe||pe&&pe>-1e3&&pe<1e3||X.call(/e/,Pe))return Pe;var Je=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof pe=="number"){var xt=pe<0?-Ae(-pe):Ae(pe);if(xt!==pe){var _t=String(xt),Ot=U.call(Pe,_t.length+1);return se.call(_t,Je,"$&_")+"."+se.call(se.call(Ot,/([0-9]{3})/g,"$&_"),/_$/,"")}}return se.call(Pe,Je,"$&_")}var Ye=c(65710),gt=Ye.custom,ut=kr(gt)?gt:null;x.exports=function pe(Pe,Je,xt,_t){var Ot=Je||{};if(ht(Ot,"quoteStyle")&&Ot.quoteStyle!=="single"&&Ot.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ht(Ot,"maxStringLength")&&(typeof Ot.maxStringLength=="number"?Ot.maxStringLength<0&&Ot.maxStringLength!==1/0:Ot.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Sr=ht(Ot,"customInspect")?Ot.customInspect:!0;if(typeof Sr!="boolean"&&Sr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ht(Ot,"indent")&&Ot.indent!==null&&Ot.indent!==" "&&!(parseInt(Ot.indent,10)===Ot.indent&&Ot.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ht(Ot,"numericSeparator")&&typeof Ot.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var sn=Ot.numericSeparator;if(typeof Pe=="undefined")return"undefined";if(Pe===null)return"null";if(typeof Pe=="boolean")return Pe?"true":"false";if(typeof Pe=="string")return mi(Pe,Ot);if(typeof Pe=="number"){if(Pe===0)return 1/0/Pe>0?"0":"-0";var Xt=String(Pe);return sn?Be(Pe,Xt):Xt}if(typeof Pe=="bigint"){var Fr=String(Pe)+"n";return sn?Be(Pe,Fr):Fr}var rs=typeof Ot.depth=="undefined"?5:Ot.depth;if(typeof xt=="undefined"&&(xt=0),xt>=rs&&rs>0&&typeof Pe=="object")return Ke(Pe)?"[Array]":"[Object]";var on=At(Ot,xt);if(typeof _t=="undefined")_t=[];else if(er(_t,Pe)>=0)return"[Circular]";function an(An,Ir,os){if(Ir&&(_t=de.call(_t),_t.push(Ir)),os){var ri={depth:Ot.depth};return ht(Ot,"quoteStyle")&&(ri.quoteStyle=Ot.quoteStyle),pe(An,ri,xt+1,_t)}return pe(An,Ot,xt+1,_t)}if(typeof Pe=="function"&&!qe(Pe)){var ns=nr(Pe),ln=Tt(Pe,an);return"[Function"+(ns?": "+ns:" (anonymous)")+"]"+(ln.length>0?" { "+H.call(ln,", ")+" }":"")}if(kr(Pe)){var ji=Ne?se.call(String(Pe),/^(Symbol\(.*\))_[^)]*$/,"$1"):ue.call(Pe);return typeof Pe=="object"&&!Ne?mn(ji):ji}if(ki(Pe)){for(var Ii="<"+Y.call(String(Pe.nodeName)),un=Pe.attributes||[],ss=0;ss<un.length;ss++)Ii+=" "+un[ss].name+"="+yt(lt(un[ss].value),"double",Ot);return Ii+=">",Pe.childNodes&&Pe.childNodes.length&&(Ii+="..."),Ii+="</"+Y.call(String(Pe.nodeName))+">",Ii}if(Ke(Pe)){if(Pe.length===0)return"[]";var Ri=Tt(Pe,an);return on&&!Ft(Ri)?"["+mt(Ri,on)+"]":"[ "+H.call(Ri,", ")+" ]"}if(bt(Pe)){var Ts=Tt(Pe,an);return!("cause"in Error.prototype)&&"cause"in Pe&&!Re.call(Pe,"cause")?"{ ["+String(Pe)+"] "+H.call(Q.call("[cause]: "+an(Pe.cause),Ts),", ")+" }":Ts.length===0?"["+String(Pe)+"]":"{ ["+String(Pe)+"] "+H.call(Ts,", ")+" }"}if(typeof Pe=="object"&&Sr){if(ut&&typeof Pe[ut]=="function"&&Ye)return Ye(Pe,{depth:rs-xt});if(Sr!=="symbol"&&typeof Pe.inspect=="function")return Pe.inspect()}if(kn(Pe)){var Wo=[];return _&&_.call(Pe,function(An,Ir){Wo.push(an(Ir,Pe,!0)+" => "+an(An,Pe))}),fr("Map",b.call(Pe),Wo,on)}if(Hn(Pe)){var In=[];return $&&$.call(Pe,function(An){In.push(an(An,Pe))}),fr("Set",j.call(Pe),In,on)}if(Vi(Pe))return vn("WeakMap");if(ei(Pe))return vn("WeakSet");if(Wn(Pe))return vn("WeakRef");if(Rt(Pe))return mn(an(Number(Pe)));if(jr(Pe))return mn(an(Z.call(Pe)));if(zt(Pe))return mn(J.call(Pe));if(Lt(Pe))return mn(an(String(Pe)));if(!Fe(Pe)&&!qe(Pe)){var Rn=Tt(Pe,an),Fn=ze?ze(Pe)===Object.prototype:Pe instanceof Object||Pe.constructor===Object,En=Pe instanceof Object?"":"null prototype",ti=!Fn&&He&&Object(Pe)===Pe&&He in Pe?U.call($t(Pe),8,-1):En?"Object":"",ka=Fn||typeof Pe.constructor!="function"?"":Pe.constructor.name?Pe.constructor.name+" ":"",vi=ka+(ti||En?"["+H.call(Q.call([],ti||[],En||[]),": ")+"] ":"");return Rn.length===0?vi+"{}":on?vi+"{"+mt(Rn,on)+"}":vi+"{ "+H.call(Rn,", ")+" }"}return String(Pe)};function yt(pe,Pe,Je){var xt=(Je.quoteStyle||Pe)==="double"?'"':"'";return xt+pe+xt}function lt(pe){return se.call(String(pe),/"/g,"&quot;")}function Ke(pe){return $t(pe)==="[object Array]"&&(!He||!(typeof pe=="object"&&He in pe))}function Fe(pe){return $t(pe)==="[object Date]"&&(!He||!(typeof pe=="object"&&He in pe))}function qe(pe){return $t(pe)==="[object RegExp]"&&(!He||!(typeof pe=="object"&&He in pe))}function bt(pe){return $t(pe)==="[object Error]"&&(!He||!(typeof pe=="object"&&He in pe))}function Lt(pe){return $t(pe)==="[object String]"&&(!He||!(typeof pe=="object"&&He in pe))}function Rt(pe){return $t(pe)==="[object Number]"&&(!He||!(typeof pe=="object"&&He in pe))}function zt(pe){return $t(pe)==="[object Boolean]"&&(!He||!(typeof pe=="object"&&He in pe))}function kr(pe){if(Ne)return pe&&typeof pe=="object"&&pe instanceof Symbol;if(typeof pe=="symbol")return!0;if(!pe||typeof pe!="object"||!ue)return!1;try{return ue.call(pe),!0}catch(Pe){}return!1}function jr(pe){if(!pe||typeof pe!="object"||!Z)return!1;try{return Z.call(pe),!0}catch(Pe){}return!1}var qr=Object.prototype.hasOwnProperty||function(pe){return pe in this};function ht(pe,Pe){return qr.call(pe,Pe)}function $t(pe){return L.call(pe)}function nr(pe){if(pe.name)return pe.name;var Pe=N.call(E.call(pe),/^function\s*([\w$]+)/);return Pe?Pe[1]:null}function er(pe,Pe){if(pe.indexOf)return pe.indexOf(Pe);for(var Je=0,xt=pe.length;Je<xt;Je++)if(pe[Je]===Pe)return Je;return-1}function kn(pe){if(!b||!pe||typeof pe!="object")return!1;try{b.call(pe);try{j.call(pe)}catch(Pe){return!0}return pe instanceof Map}catch(Pe){}return!1}function Vi(pe){if(!ie||!pe||typeof pe!="object")return!1;try{ie.call(pe,ie);try{ae.call(pe,ae)}catch(Pe){return!0}return pe instanceof WeakMap}catch(Pe){}return!1}function Wn(pe){if(!V||!pe||typeof pe!="object")return!1;try{return V.call(pe),!0}catch(Pe){}return!1}function Hn(pe){if(!j||!pe||typeof pe!="object")return!1;try{j.call(pe);try{b.call(pe)}catch(Pe){return!0}return pe instanceof Set}catch(Pe){}return!1}function ei(pe){if(!ae||!pe||typeof pe!="object")return!1;try{ae.call(pe,ae);try{ie.call(pe,ie)}catch(Pe){return!0}return pe instanceof WeakSet}catch(Pe){}return!1}function ki(pe){return!pe||typeof pe!="object"?!1:typeof HTMLElement!="undefined"&&pe instanceof HTMLElement?!0:typeof pe.nodeName=="string"&&typeof pe.getAttribute=="function"}function mi(pe,Pe){if(pe.length>Pe.maxStringLength){var Je=pe.length-Pe.maxStringLength,xt="... "+Je+" more character"+(Je>1?"s":"");return mi(U.call(pe,0,Pe.maxStringLength),Pe)+xt}var _t=se.call(se.call(pe,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jn);return yt(_t,"single",Pe)}function jn(pe){var Pe=pe.charCodeAt(0),Je={8:"b",9:"t",10:"n",12:"f",13:"r"}[Pe];return Je?"\\"+Je:"\\x"+(Pe<16?"0":"")+ne.call(Pe.toString(16))}function mn(pe){return"Object("+pe+")"}function vn(pe){return pe+" { ? }"}function fr(pe,Pe,Je,xt){var _t=xt?mt(Je,xt):H.call(Je,", ");return pe+" ("+Pe+") {"+_t+"}"}function Ft(pe){for(var Pe=0;Pe<pe.length;Pe++)if(er(pe[Pe],`
507
508
  `)>=0)return!1;return!0}function At(pe,Pe){var Je;if(pe.indent===" ")Je=" ";else if(typeof pe.indent=="number"&&pe.indent>0)Je=H.call(Array(pe.indent+1)," ");else return null;return{base:Je,prev:H.call(Array(Pe+1),Je)}}function mt(pe,Pe){if(pe.length===0)return"";var Je=`
508
509
  `+Pe.prev+Pe.base;return Je+H.call(pe,","+Je)+`
509
510
  `+Pe.prev}function Tt(pe,Pe){var Je=Ke(pe),xt=[];if(Je){xt.length=pe.length;for(var _t=0;_t<pe.length;_t++)xt[_t]=ht(pe,_t)?Pe(pe[_t],pe):""}var Ot=typeof xe=="function"?xe(pe):[],Sr;if(Ne){Sr={};for(var sn=0;sn<Ot.length;sn++)Sr["$"+Ot[sn]]=Ot[sn]}for(var Xt in pe)ht(pe,Xt)&&(Je&&String(Number(Xt))===Xt&&Xt<pe.length||Ne&&Sr["$"+Xt]instanceof Symbol||(X.call(/[^\w$]/,Xt)?xt.push(Pe(Xt,pe)+": "+Pe(pe[Xt],pe)):xt.push(Xt+": "+Pe(pe[Xt],pe))));if(typeof xe=="function")for(var Fr=0;Fr<Ot.length;Fr++)Re.call(pe,Ot[Fr])&&xt.push("["+Pe(Ot[Fr])+"]: "+Pe(pe[Ot[Fr]],pe));return xt}},73656:x=>{var k=x.exports={},c,m;function w(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?c=setTimeout:c=w}catch(V){c=w}try{typeof clearTimeout=="function"?m=clearTimeout:m=b}catch(V){m=b}})();function _(V){if(c===setTimeout)return setTimeout(V,0);if((c===w||!c)&&setTimeout)return c=setTimeout,setTimeout(V,0);try{return c(V,0)}catch(J){try{return c.call(null,V,0)}catch(L){return c.call(this,V,0)}}}function A(V){if(m===clearTimeout)return clearTimeout(V);if((m===b||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(V);try{return m(V)}catch(J){try{return m.call(null,V)}catch(L){return m.call(this,V)}}}var O=[],j=!1,$,K=-1;function ie(){!j||!$||(j=!1,$.length?O=$.concat(O):K=-1,O.length&&ee())}function ee(){if(!j){var V=_(ie);j=!0;for(var J=O.length;J;){for($=O,O=[];++K<J;)$&&$[K].run();K=-1,J=O.length}$=null,j=!1,A(V)}}k.nextTick=function(V){var J=new Array(arguments.length-1);if(arguments.length>1)for(var L=1;L<arguments.length;L++)J[L-1]=arguments[L];O.push(new ae(V,J)),O.length===1&&!j&&_(ee)};function ae(V,J){this.fun=V,this.array=J}ae.prototype.run=function(){this.fun.apply(null,this.array)},k.title="browser",k.browser=!0,k.env={},k.argv=[],k.version="",k.versions={};function q(){}k.on=q,k.addListener=q,k.once=q,k.off=q,k.removeListener=q,k.removeAllListeners=q,k.emit=q,k.prependListener=q,k.prependOnceListener=q,k.listeners=function(V){return[]},k.binding=function(V){throw new Error("process.binding is not supported")},k.cwd=function(){return"/"},k.chdir=function(V){throw new Error("process.chdir is not supported")},k.umask=function(){return 0}},1813:x=>{"use strict";var k=String.prototype.replace,c=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"};x.exports={default:m.RFC3986,formatters:{RFC1738:function(w){return k.call(w,c,"+")},RFC3986:function(w){return String(w)}},RFC1738:m.RFC1738,RFC3986:m.RFC3986}},71434:(x,k,c)=>{"use strict";var m=c(94915),w=c(54076),b=c(1813);x.exports={formats:b,parse:w,stringify:m}},54076:(x,k,c)=>{"use strict";var m=c(58417),w=Object.prototype.hasOwnProperty,b=Array.isArray,_={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},A=function(q){return q.replace(/&#(\d+);/g,function(V,J){return String.fromCharCode(parseInt(J,10))})},O=function(q,V){return q&&typeof q=="string"&&V.comma&&q.indexOf(",")>-1?q.split(","):q},j="utf8=%26%2310003%3B",$="utf8=%E2%9C%93",K=function(V,J){var L={},E=J.ignoreQueryPrefix?V.replace(/^\?/,""):V,N=J.parameterLimit===1/0?void 0:J.parameterLimit,U=E.split(J.delimiter,N),se=-1,ne,Y=J.charset;if(J.charsetSentinel)for(ne=0;ne<U.length;++ne)U[ne].indexOf("utf8=")===0&&(U[ne]===$?Y="utf-8":U[ne]===j&&(Y="iso-8859-1"),se=ne,ne=U.length);for(ne=0;ne<U.length;++ne)if(ne!==se){var X=U[ne],Q=X.indexOf("]="),H=Q===-1?X.indexOf("="):Q+1,de,Ae;H===-1?(de=J.decoder(X,_.decoder,Y,"key"),Ae=J.strictNullHandling?null:""):(de=J.decoder(X.slice(0,H),_.decoder,Y,"key"),Ae=m.maybeMap(O(X.slice(H+1),J),function(Z){return J.decoder(Z,_.decoder,Y,"value")})),Ae&&J.interpretNumericEntities&&Y==="iso-8859-1"&&(Ae=A(Ae)),X.indexOf("[]=")>-1&&(Ae=b(Ae)?[Ae]:Ae),w.call(L,de)?L[de]=m.combine(L[de],Ae):L[de]=Ae}return L},ie=function(q,V,J,L){for(var E=L?V:O(V,J),N=q.length-1;N>=0;--N){var U,se=q[N];if(se==="[]"&&J.parseArrays)U=[].concat(E);else{U=J.plainObjects?Object.create(null):{};var ne=se.charAt(0)==="["&&se.charAt(se.length-1)==="]"?se.slice(1,-1):se,Y=parseInt(ne,10);!J.parseArrays&&ne===""?U={0:E}:!isNaN(Y)&&se!==ne&&String(Y)===ne&&Y>=0&&J.parseArrays&&Y<=J.arrayLimit?(U=[],U[Y]=E):ne!=="__proto__"&&(U[ne]=E)}E=U}return E},ee=function(V,J,L,E){if(V){var N=L.allowDots?V.replace(/\.([^.[]+)/g,"[$1]"):V,U=/(\[[^[\]]*])/,se=/(\[[^[\]]*])/g,ne=L.depth>0&&U.exec(N),Y=ne?N.slice(0,ne.index):N,X=[];if(Y){if(!L.plainObjects&&w.call(Object.prototype,Y)&&!L.allowPrototypes)return;X.push(Y)}for(var Q=0;L.depth>0&&(ne=se.exec(N))!==null&&Q<L.depth;){if(Q+=1,!L.plainObjects&&w.call(Object.prototype,ne[1].slice(1,-1))&&!L.allowPrototypes)return;X.push(ne[1])}return ne&&X.push("["+N.slice(ne.index)+"]"),ie(X,J,L,E)}},ae=function(V){if(!V)return _;if(V.decoder!==null&&V.decoder!==void 0&&typeof V.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof V.charset!="undefined"&&V.charset!=="utf-8"&&V.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var J=typeof V.charset=="undefined"?_.charset:V.charset;return{allowDots:typeof V.allowDots=="undefined"?_.allowDots:!!V.allowDots,allowPrototypes:typeof V.allowPrototypes=="boolean"?V.allowPrototypes:_.allowPrototypes,allowSparse:typeof V.allowSparse=="boolean"?V.allowSparse:_.allowSparse,arrayLimit:typeof V.arrayLimit=="number"?V.arrayLimit:_.arrayLimit,charset:J,charsetSentinel:typeof V.charsetSentinel=="boolean"?V.charsetSentinel:_.charsetSentinel,comma:typeof V.comma=="boolean"?V.comma:_.comma,decoder:typeof V.decoder=="function"?V.decoder:_.decoder,delimiter:typeof V.delimiter=="string"||m.isRegExp(V.delimiter)?V.delimiter:_.delimiter,depth:typeof V.depth=="number"||V.depth===!1?+V.depth:_.depth,ignoreQueryPrefix:V.ignoreQueryPrefix===!0,interpretNumericEntities:typeof V.interpretNumericEntities=="boolean"?V.interpretNumericEntities:_.interpretNumericEntities,parameterLimit:typeof V.parameterLimit=="number"?V.parameterLimit:_.parameterLimit,parseArrays:V.parseArrays!==!1,plainObjects:typeof V.plainObjects=="boolean"?V.plainObjects:_.plainObjects,strictNullHandling:typeof V.strictNullHandling=="boolean"?V.strictNullHandling:_.strictNullHandling}};x.exports=function(q,V){var J=ae(V);if(q===""||q===null||typeof q=="undefined")return J.plainObjects?Object.create(null):{};for(var L=typeof q=="string"?K(q,J):q,E=J.plainObjects?Object.create(null):{},N=Object.keys(L),U=0;U<N.length;++U){var se=N[U],ne=ee(se,L[se],J,typeof q=="string");E=m.merge(E,ne,J)}return J.allowSparse===!0?E:m.compact(E)}},94915:(x,k,c)=>{"use strict";var m=c(44852),w=c(58417),b=c(1813),_=Object.prototype.hasOwnProperty,A={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,N){return E+"["+N+"]"},repeat:function(E){return E}},O=Array.isArray,j=Array.prototype.push,$=function(L,E){j.apply(L,O(E)?E:[E])},K=Date.prototype.toISOString,ie=b.default,ee={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:w.encode,encodeValuesOnly:!1,format:ie,formatter:b.formatters[ie],indices:!1,serializeDate:function(E){return K.call(E)},skipNulls:!1,strictNullHandling:!1},ae=function(E){return typeof E=="string"||typeof E=="number"||typeof E=="boolean"||typeof E=="symbol"||typeof E=="bigint"},q={},V=function L(E,N,U,se,ne,Y,X,Q,H,de,Ae,Z,xe,ue,Ne,He){for(var Re=E,ze=He,Be=0,Ye=!1;(ze=ze.get(q))!==void 0&&!Ye;){var gt=ze.get(E);if(Be+=1,typeof gt!="undefined"){if(gt===Be)throw new RangeError("Cyclic object value");Ye=!0}typeof ze.get(q)=="undefined"&&(Be=0)}if(typeof Q=="function"?Re=Q(N,Re):Re instanceof Date?Re=Ae(Re):U==="comma"&&O(Re)&&(Re=w.maybeMap(Re,function(kr){return kr instanceof Date?Ae(kr):kr})),Re===null){if(ne)return X&&!ue?X(N,ee.encoder,Ne,"key",Z):N;Re=""}if(ae(Re)||w.isBuffer(Re)){if(X){var ut=ue?N:X(N,ee.encoder,Ne,"key",Z);return[xe(ut)+"="+xe(X(Re,ee.encoder,Ne,"value",Z))]}return[xe(N)+"="+xe(String(Re))]}var yt=[];if(typeof Re=="undefined")return yt;var lt;if(U==="comma"&&O(Re))ue&&X&&(Re=w.maybeMap(Re,X)),lt=[{value:Re.length>0?Re.join(",")||null:void 0}];else if(O(Q))lt=Q;else{var Ke=Object.keys(Re);lt=H?Ke.sort(H):Ke}for(var Fe=se&&O(Re)&&Re.length===1?N+"[]":N,qe=0;qe<lt.length;++qe){var bt=lt[qe],Lt=typeof bt=="object"&&typeof bt.value!="undefined"?bt.value:Re[bt];if(!(Y&&Lt===null)){var Rt=O(Re)?typeof U=="function"?U(Fe,bt):Fe:Fe+(de?"."+bt:"["+bt+"]");He.set(E,Be);var zt=m();zt.set(q,He),$(yt,L(Lt,Rt,U,se,ne,Y,U==="comma"&&ue&&O(Re)?null:X,Q,H,de,Ae,Z,xe,ue,Ne,zt))}}return yt},J=function(E){if(!E)return ee;if(E.encoder!==null&&typeof E.encoder!="undefined"&&typeof E.encoder!="function")throw new TypeError("Encoder has to be a function.");var N=E.charset||ee.charset;if(typeof E.charset!="undefined"&&E.charset!=="utf-8"&&E.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var U=b.default;if(typeof E.format!="undefined"){if(!_.call(b.formatters,E.format))throw new TypeError("Unknown format option provided.");U=E.format}var se=b.formatters[U],ne=ee.filter;return(typeof E.filter=="function"||O(E.filter))&&(ne=E.filter),{addQueryPrefix:typeof E.addQueryPrefix=="boolean"?E.addQueryPrefix:ee.addQueryPrefix,allowDots:typeof E.allowDots=="undefined"?ee.allowDots:!!E.allowDots,charset:N,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:ee.charsetSentinel,delimiter:typeof E.delimiter=="undefined"?ee.delimiter:E.delimiter,encode:typeof E.encode=="boolean"?E.encode:ee.encode,encoder:typeof E.encoder=="function"?E.encoder:ee.encoder,encodeValuesOnly:typeof E.encodeValuesOnly=="boolean"?E.encodeValuesOnly:ee.encodeValuesOnly,filter:ne,format:U,formatter:se,serializeDate:typeof E.serializeDate=="function"?E.serializeDate:ee.serializeDate,skipNulls:typeof E.skipNulls=="boolean"?E.skipNulls:ee.skipNulls,sort:typeof E.sort=="function"?E.sort:null,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:ee.strictNullHandling}};x.exports=function(L,E){var N=L,U=J(E),se,ne;typeof U.filter=="function"?(ne=U.filter,N=ne("",N)):O(U.filter)&&(ne=U.filter,se=ne);var Y=[];if(typeof N!="object"||N===null)return"";var X;E&&E.arrayFormat in A?X=E.arrayFormat:E&&"indices"in E?X=E.indices?"indices":"repeat":X="indices";var Q=A[X];if(E&&"commaRoundTrip"in E&&typeof E.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var H=Q==="comma"&&E&&E.commaRoundTrip;se||(se=Object.keys(N)),U.sort&&se.sort(U.sort);for(var de=m(),Ae=0;Ae<se.length;++Ae){var Z=se[Ae];U.skipNulls&&N[Z]===null||$(Y,V(N[Z],Z,Q,H,U.strictNullHandling,U.skipNulls,U.encode?U.encoder:null,U.filter,U.sort,U.allowDots,U.serializeDate,U.format,U.formatter,U.encodeValuesOnly,U.charset,de))}var xe=Y.join(U.delimiter),ue=U.addQueryPrefix===!0?"?":"";return U.charsetSentinel&&(U.charset==="iso-8859-1"?ue+="utf8=%26%2310003%3B&":ue+="utf8=%E2%9C%93&"),xe.length>0?ue+xe:""}},58417:(x,k,c)=>{"use strict";var m=c(1813),w=Object.prototype.hasOwnProperty,b=Array.isArray,_=function(){for(var L=[],E=0;E<256;++E)L.push("%"+((E<16?"0":"")+E.toString(16)).toUpperCase());return L}(),A=function(E){for(;E.length>1;){var N=E.pop(),U=N.obj[N.prop];if(b(U)){for(var se=[],ne=0;ne<U.length;++ne)typeof U[ne]!="undefined"&&se.push(U[ne]);N.obj[N.prop]=se}}},O=function(E,N){for(var U=N&&N.plainObjects?Object.create(null):{},se=0;se<E.length;++se)typeof E[se]!="undefined"&&(U[se]=E[se]);return U},j=function L(E,N,U){if(!N)return E;if(typeof N!="object"){if(b(E))E.push(N);else if(E&&typeof E=="object")(U&&(U.plainObjects||U.allowPrototypes)||!w.call(Object.prototype,N))&&(E[N]=!0);else return[E,N];return E}if(!E||typeof E!="object")return[E].concat(N);var se=E;return b(E)&&!b(N)&&(se=O(E,U)),b(E)&&b(N)?(N.forEach(function(ne,Y){if(w.call(E,Y)){var X=E[Y];X&&typeof X=="object"&&ne&&typeof ne=="object"?E[Y]=L(X,ne,U):E.push(ne)}else E[Y]=ne}),E):Object.keys(N).reduce(function(ne,Y){var X=N[Y];return w.call(ne,Y)?ne[Y]=L(ne[Y],X,U):ne[Y]=X,ne},se)},$=function(E,N){return Object.keys(N).reduce(function(U,se){return U[se]=N[se],U},E)},K=function(L,E,N){var U=L.replace(/\+/g," ");if(N==="iso-8859-1")return U.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(U)}catch(se){return U}},ie=function(E,N,U,se,ne){if(E.length===0)return E;var Y=E;if(typeof E=="symbol"?Y=Symbol.prototype.toString.call(E):typeof E!="string"&&(Y=String(E)),U==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(de){return"%26%23"+parseInt(de.slice(2),16)+"%3B"});for(var X="",Q=0;Q<Y.length;++Q){var H=Y.charCodeAt(Q);if(H===45||H===46||H===95||H===126||H>=48&&H<=57||H>=65&&H<=90||H>=97&&H<=122||ne===m.RFC1738&&(H===40||H===41)){X+=Y.charAt(Q);continue}if(H<128){X=X+_[H];continue}if(H<2048){X=X+(_[192|H>>6]+_[128|H&63]);continue}if(H<55296||H>=57344){X=X+(_[224|H>>12]+_[128|H>>6&63]+_[128|H&63]);continue}Q+=1,H=65536+((H&1023)<<10|Y.charCodeAt(Q)&1023),X+=_[240|H>>18]+_[128|H>>12&63]+_[128|H>>6&63]+_[128|H&63]}return X},ee=function(E){for(var N=[{obj:{o:E},prop:"o"}],U=[],se=0;se<N.length;++se)for(var ne=N[se],Y=ne.obj[ne.prop],X=Object.keys(Y),Q=0;Q<X.length;++Q){var H=X[Q],de=Y[H];typeof de=="object"&&de!==null&&U.indexOf(de)===-1&&(N.push({obj:Y,prop:H}),U.push(de))}return A(N),E},ae=function(E){return Object.prototype.toString.call(E)==="[object RegExp]"},q=function(E){return!E||typeof E!="object"?!1:!!(E.constructor&&E.constructor.isBuffer&&E.constructor.isBuffer(E))},V=function(E,N){return[].concat(E,N)},J=function(E,N){if(b(E)){for(var U=[],se=0;se<E.length;se+=1)U.push(N(E[se]));return U}return N(E)};x.exports={arrayToObject:O,assign:$,combine:V,compact:ee,decode:K,encode:ie,isBuffer:q,isRegExp:ae,maybeMap:J,merge:j}},99913:(x,k,c)=>{"use strict";var m;function w(){return w=Object.assign||function(ae){for(var q=1;q<arguments.length;q++){var V=arguments[q];for(var J in V)Object.prototype.hasOwnProperty.call(V,J)&&(ae[J]=V[J])}return ae},w.apply(this,arguments)}function b(ae){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(V){return typeof V}:b=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},b(ae)}var _=function(){var ae=function(V,J){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,E){L.__proto__=E}||function(L,E){for(var N in E)E.hasOwnProperty(N)&&(L[N]=E[N])},ae(V,J)};return function(q,V){ae(q,V);function J(){this.constructor=q}q.prototype=V===null?Object.create(V):(J.prototype=V.prototype,new J)}}();m={value:!0},m=k.fk=void 0;var A=c(29901),O=typeof navigator=="undefined"||c.g.PREVENT_CODEMIRROR_RENDER===!0,j;O||(j=c(46944));var $=function(){function ae(){}return ae.equals=function(q,V){var J=this,L=Object.keys,E=b(q),N=b(V);return q&&V&&E==="object"&&E===N?L(q).length===L(V).length&&L(q).every(function(U){return J.equals(q[U],V[U])}):q===V},ae}(),K=function(){function ae(q,V){this.editor=q,this.props=V}return ae.prototype.delegateCursor=function(q,V,J){var L=this.editor.getDoc();J&&this.editor.focus(),V?L.setCursor(q):L.setCursor(q,null,{scroll:!1})},ae.prototype.delegateScroll=function(q){this.editor.scrollTo(q.x,q.y)},ae.prototype.delegateSelection=function(q,V){var J=this.editor.getDoc();J.setSelections(q),V&&this.editor.focus()},ae.prototype.apply=function(q){q&&q.selection&&q.selection.ranges&&this.delegateSelection(q.selection.ranges,q.selection.focus||!1),q&&q.cursor&&this.delegateCursor(q.cursor,q.autoScroll||!1,this.editor.getOption("autofocus")||!1),q&&q.scroll&&this.delegateScroll(q.scroll)},ae.prototype.applyNext=function(q,V,J){q&&q.selection&&q.selection.ranges&&V&&V.selection&&V.selection.ranges&&!$.equals(q.selection.ranges,V.selection.ranges)&&this.delegateSelection(V.selection.ranges,V.selection.focus||!1),q&&q.cursor&&V&&V.cursor&&!$.equals(q.cursor,V.cursor)&&this.delegateCursor(J.cursor||V.cursor,V.autoScroll||!1,V.autoCursor||!1),q&&q.scroll&&V&&V.scroll&&!$.equals(q.scroll,V.scroll)&&this.delegateScroll(V.scroll)},ae.prototype.applyUserDefined=function(q,V){V&&V.cursor&&this.delegateCursor(V.cursor,q.autoScroll||!1,this.editor.getOption("autofocus")||!1)},ae.prototype.wire=function(q){var V=this;Object.keys(q||{}).filter(function(J){return/^on/.test(J)}).forEach(function(J){switch(J){case"onBlur":V.editor.on("blur",function(L,E){V.props.onBlur(V.editor,E)});break;case"onContextMenu":{V.editor.on("contextmenu",function(L,E){V.props.onContextMenu(V.editor,E)});break}case"onCopy":{V.editor.on("copy",function(L,E){V.props.onCopy(V.editor,E)});break}case"onCursor":V.editor.on("cursorActivity",function(L){V.props.onCursor(V.editor,V.editor.getDoc().getCursor())});break;case"onCursorActivity":V.editor.on("cursorActivity",function(L){V.props.onCursorActivity(V.editor)});break;case"onCut":{V.editor.on("cut",function(L,E){V.props.onCut(V.editor,E)});break}case"onDblClick":{V.editor.on("dblclick",function(L,E){V.props.onDblClick(V.editor,E)});break}case"onDragEnter":V.editor.on("dragenter",function(L,E){V.props.onDragEnter(V.editor,E)});break;case"onDragLeave":{V.editor.on("dragleave",function(L,E){V.props.onDragLeave(V.editor,E)});break}case"onDragOver":V.editor.on("dragover",function(L,E){V.props.onDragOver(V.editor,E)});break;case"onDragStart":{V.editor.on("dragstart",function(L,E){V.props.onDragStart(V.editor,E)});break}case"onDrop":V.editor.on("drop",function(L,E){V.props.onDrop(V.editor,E)});break;case"onFocus":V.editor.on("focus",function(L,E){V.props.onFocus(V.editor,E)});break;case"onGutterClick":V.editor.on("gutterClick",function(L,E,N,U){V.props.onGutterClick(V.editor,E,N,U)});break;case"onInputRead":V.editor.on("inputRead",function(L,E){V.props.onInputRead(V.editor,E)});break;case"onKeyDown":V.editor.on("keydown",function(L,E){V.props.onKeyDown(V.editor,E)});break;case"onKeyHandled":V.editor.on("keyHandled",function(L,E,N){V.props.onKeyHandled(V.editor,E,N)});break;case"onKeyPress":V.editor.on("keypress",function(L,E){V.props.onKeyPress(V.editor,E)});break;case"onKeyUp":V.editor.on("keyup",function(L,E){V.props.onKeyUp(V.editor,E)});break;case"onMouseDown":{V.editor.on("mousedown",function(L,E){V.props.onMouseDown(V.editor,E)});break}case"onPaste":{V.editor.on("paste",function(L,E){V.props.onPaste(V.editor,E)});break}case"onRenderLine":{V.editor.on("renderLine",function(L,E,N){V.props.onRenderLine(V.editor,E,N)});break}case"onScroll":V.editor.on("scroll",function(L){V.props.onScroll(V.editor,V.editor.getScrollInfo())});break;case"onSelection":V.editor.on("beforeSelectionChange",function(L,E){V.props.onSelection(V.editor,E)});break;case"onTouchStart":{V.editor.on("touchstart",function(L,E){V.props.onTouchStart(V.editor,E)});break}case"onUpdate":V.editor.on("update",function(L){V.props.onUpdate(V.editor)});break;case"onViewportChange":V.editor.on("viewportChange",function(L,E,N){V.props.onViewportChange(V.editor,E,N)});break}})},ae}(),ie=function(ae){_(q,ae);function q(V){var J=ae.call(this,V)||this;return O||(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 q.prototype.hydrate=function(V){var J=this,L=V&&V.options?V.options:{},E=w({},j.defaults,this.editor.options,L),N=Object.keys(E).some(function(U){return J.editor.getOption(U)!==E[U]});N&&Object.keys(E).forEach(function(U){L.hasOwnProperty(U)&&J.editor.getOption(U)!==E[U]&&(J.editor.setOption(U,E[U]),J.mirror.setOption(U,E[U]))}),this.hydrated||(this.deferred?this.resolveChange(V.value):this.initChange(V.value||"")),this.hydrated=!0},q.prototype.initChange=function(V){this.emulating=!0;var J=this.editor.getDoc(),L=J.lastLine(),E=J.getLine(J.lastLine()).length;J.replaceRange(V||"",{line:0,ch:0},{line:L,ch:E}),this.mirror.setValue(V),J.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},q.prototype.resolveChange=function(V){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),V&&V!==J.getValue()){var L=J.getCursor();J.setValue(V),J.setCursor(L)}this.emulating=!1,this.deferred=null},q.prototype.mirrorChange=function(V){var J=this.editor.getDoc();return V.origin==="undo"?(J.setHistory(this.mirror.getHistory()),this.mirror.undo()):V.origin==="redo"?(J.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(V.text,V.from,V.to,V.origin),this.mirror.getValue()},q.prototype.componentDidMount=function(){var V=this;O||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&j.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=j(this.ref,this.props.options),this.shared=new K(this.editor,this.props),this.mirror=j(function(){},this.props.options),this.editor.on("electricInput",function(){V.mirror.setHistory(V.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){V.mirror.setCursor(V.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(J,L){if(!V.emulating){L.cancel(),V.deferred=L;var E=V.mirrorChange(V.deferred);V.props.onBeforeChange&&V.props.onBeforeChange(V.editor,V.deferred,E)}}),this.editor.on("change",function(J,L){V.mounted&&V.props.onChange&&V.props.onChange(V.editor,L,V.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))},q.prototype.componentDidUpdate=function(V){if(!O){var J={cursor:null};this.props.value!==V.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(V,this.props,J),this.appliedNext=!0),this.shared.applyUserDefined(V,J),this.appliedUserDefined=!0}},q.prototype.componentWillUnmount=function(){O||this.props.editorWillUnmount&&this.props.editorWillUnmount(j)},q.prototype.shouldComponentUpdate=function(V,J){return!O},q.prototype.render=function(){var V=this;if(O)return null;var J=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return A.createElement("div",{className:J,ref:function(E){return V.ref=E}})},q}(A.Component);k.fk=ie;var ee=function(ae){_(q,ae);function q(V){var J=ae.call(this,V)||this;return O||(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 q.prototype.hydrate=function(V){var J=this,L=V&&V.options?V.options:{},E=w({},j.defaults,this.editor.options,L),N=Object.keys(E).some(function(Y){return J.editor.getOption(Y)!==E[Y]});if(N&&Object.keys(E).forEach(function(Y){L.hasOwnProperty(Y)&&J.editor.getOption(Y)!==E[Y]&&J.editor.setOption(Y,E[Y])}),!this.hydrated){var U=this.editor.getDoc(),se=U.lastLine(),ne=U.getLine(U.lastLine()).length;U.replaceRange(V.value||"",{line:0,ch:0},{line:se,ch:ne})}this.hydrated=!0},q.prototype.componentDidMount=function(){var V=this;O||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&j.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=j(this.ref,this.props.options),this.shared=new K(this.editor,this.props),this.editor.on("beforeChange",function(J,L){V.props.onBeforeChange&&V.props.onBeforeChange(V.editor,L,V.editor.getValue(),V.onBeforeChangeCb)}),this.editor.on("change",function(J,L){!V.mounted||!V.props.onChange||(V.props.onBeforeChange?V.continueChange&&V.props.onChange(V.editor,L,V.editor.getValue()):V.props.onChange(V.editor,L,V.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))},q.prototype.componentDidUpdate=function(V){if(this.detached&&this.props.detach===!1&&(this.detached=!1,V.editorDidAttach&&V.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,V.editorDidDetach&&V.editorDidDetach(this.editor)),!(O||this.detached)){var J={cursor:null};this.props.value!==V.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!V.autoCursor&&V.autoCursor!==void 0&&(J.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(V),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(V,J),this.appliedUserDefined=!0)}},q.prototype.componentWillUnmount=function(){O||this.props.editorWillUnmount&&this.props.editorWillUnmount(j)},q.prototype.shouldComponentUpdate=function(V,J){var L=!0;return O&&(L=!1),this.detached&&V.detach&&(L=!1),L},q.prototype.render=function(){var V=this;if(O)return null;var J=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return A.createElement("div",{className:J,ref:function(E){return V.ref=E}})},q}(A.Component);m=ee},44852:(x,k,c)=>{"use strict";var m=c(71013),w=c(2864),b=c(14927),_=m("%TypeError%"),A=m("%WeakMap%",!0),O=m("%Map%",!0),j=w("WeakMap.prototype.get",!0),$=w("WeakMap.prototype.set",!0),K=w("WeakMap.prototype.has",!0),ie=w("Map.prototype.get",!0),ee=w("Map.prototype.set",!0),ae=w("Map.prototype.has",!0),q=function(E,N){for(var U=E,se;(se=U.next)!==null;U=se)if(se.key===N)return U.next=se.next,se.next=E.next,E.next=se,se},V=function(E,N){var U=q(E,N);return U&&U.value},J=function(E,N,U){var se=q(E,N);se?se.value=U:E.next={key:N,next:E.next,value:U}},L=function(E,N){return!!q(E,N)};x.exports=function(){var N,U,se,ne={assert:function(Y){if(!ne.has(Y))throw new _("Side channel does not contain "+b(Y))},get:function(Y){if(A&&Y&&(typeof Y=="object"||typeof Y=="function")){if(N)return j(N,Y)}else if(O){if(U)return ie(U,Y)}else if(se)return V(se,Y)},has:function(Y){if(A&&Y&&(typeof Y=="object"||typeof Y=="function")){if(N)return K(N,Y)}else if(O){if(U)return ae(U,Y)}else if(se)return L(se,Y);return!1},set:function(Y,X){A&&Y&&(typeof Y=="object"||typeof Y=="function")?(N||(N=new A),$(N,Y,X)):O?(U||(U=new O),ee(U,Y,X)):(se||(se={key:{},next:null}),J(se,Y,X))}};return ne}},56182:x=>{(function(){"use strict";var k,c,m,w,b,_="properties",A="deepProperties",O="propertyDescriptors",j="staticProperties",$="staticDeepProperties",K="staticPropertyDescriptors",ie="configuration",ee="deepConfiguration",ae="deepProps",q="deepStatics",V="deepConf",J="initializers",L="methods",E="composers",N="compose";function U(Re){return Object.getOwnPropertyNames(Re).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(Re):[])}function se(Re,ze){return Array.prototype.slice.call(arguments,2).reduce(Re,ze)}var ne=se.bind(0,function(ze,Be){if(Be)for(var Ye=U(Be),gt=0;gt<Ye.length;gt+=1)Object.defineProperty(ze,Ye[gt],Object.getOwnPropertyDescriptor(Be,Ye[gt]));return ze});function Y(Re){return typeof Re=="function"}function X(Re){return Re&&typeof Re=="object"||Y(Re)}function Q(Re){return Re&&typeof Re=="object"&&Re.__proto__==Object.prototype}var H=se.bind(0,function Re(ze,Be){if(Be===k)return ze;if(Array.isArray(Be))return(Array.isArray(ze)?ze:[]).concat(Be);if(!Q(Be))return Be;for(var Ye,gt,ut=U(Be),yt=0;yt<ut.length;)Ye=ut[yt++],(gt=Object.getOwnPropertyDescriptor(Be,Ye)).hasOwnProperty("value")?gt.value!==k&&(ze[Ye]=Re(Q(ze[Ye])||Array.isArray(Be[Ye])?ze[Ye]:{},Be[Ye])):Object.defineProperty(ze,Ye,gt);return ze});function de(){return(c=Array.prototype.concat.apply([],arguments).filter(function(Re,ze,Be){return Y(Re)&&Be.indexOf(Re)===ze})).length?c:k}function Ae(Re){return c=function(){return function Be(Ye){var gt,ut,yt=Be[N]||{},lt={__proto__:yt[L]},Ke=yt[J],Fe=Array.prototype.slice.apply(arguments),qe=yt[A];if(qe&&H(lt,qe),(qe=yt[_])&&ne(lt,qe),(qe=yt[O])&&Object.defineProperties(lt,qe),!Ke||!Ke.length)return lt;for(Ye===k&&(Ye={}),yt=0;yt<Ke.length;)Y(gt=Ke[yt++])&&(lt=(ut=gt.call(lt,Ye,{instance:lt,stamp:Be,args:Fe}))===k?lt:ut);return lt}}(),(m=Re[$])&&H(c,m),(m=Re[j])&&ne(c,m),(m=Re[K])&&Object.defineProperties(c,m),m=Y(c[N])?c[N]:xe,ne(c[N]=function(){return m.apply(this,arguments)},Re),c}function Z(Re,ze){function Be(gt,ut){X(ze[gt])&&(X(Re[gt])||(Re[gt]={}),(ut||ne)(Re[gt],ze[gt]))}function Ye(gt){(c=de(Re[gt],ze[gt]))&&(Re[gt]=c)}return ze&&X(ze=ze[N]||ze)&&(Be(L),Be(_),Be(A,H),Be(O),Be(j),Be($,H),Be(K),Be(ie),Be(ee,H),Ye(J),Ye(E)),Re}function xe(){return Ae(Array.prototype.concat.apply([this],arguments).reduce(Z,{}))}function ue(Re){return Y(Re)&&Y(Re[N])}var Ne={};function He(Re,ze){return function(){return(w={})[Re]=ze.apply(k,Array.prototype.concat.apply([{}],arguments)),((c=this)&&c[N]||m).call(c,w)}}Ne[L]=He(L,ne),Ne[_]=Ne.props=He(_,ne),Ne[J]=Ne.init=He(J,de),Ne[E]=He(E,de),Ne[A]=Ne[ae]=He(A,H),Ne[j]=Ne.statics=He(j,ne),Ne[$]=Ne[q]=He($,H),Ne[ie]=Ne.conf=He(ie,ne),Ne[ee]=Ne[V]=He(ee,H),Ne[O]=He(O,ne),Ne[K]=He(K,ne),m=Ne[N]=ne(function(){for(var ze,Be,Ye=0,gt=[],ut=arguments,yt=this;Ye<ut.length;)X(ze=ut[Ye++])&&gt.push(ue(ze)?ze:((w={})[L]=(Be=ze)[L]||k,m=Be.props,w[_]=X((c=Be[_])||m)?ne({},m,c):k,w[J]=de(Be.init,Be[J]),w[E]=de(Be[E]),m=Be[ae],w[A]=X((c=Be[A])||m)?H({},m,c):k,w[O]=Be[O],m=Be.statics,w[j]=X((c=Be[j])||m)?ne({},m,c):k,m=Be[q],w[$]=X((c=Be[$])||m)?H({},m,c):k,c=Be[K],w[K]=X((m=Be.name&&{name:{value:Be.name}})||c)?ne({},c,m):k,m=Be.conf,w[ie]=X((c=Be[ie])||m)?ne({},m,c):k,m=Be[V],w[ee]=X((c=Be[ee])||m)?H({},m,c):k,w));if(ze=xe.apply(yt||b,gt),yt&&gt.unshift(yt),Array.isArray(ut=ze[N][E]))for(Ye=0;Ye<ut.length;)ze=ue(yt=ut[Ye++]({stamp:ze,composables:gt}))?yt:ze;return ze},Ne),Ne.create=function(){return this.apply(k,arguments)},(w={})[j]=Ne,b=xe(w),m[N]=m.bind(),m.version="4.3.2",typeof k!="object"?x.exports=m:self.stampit=m})()},47463:(x,k,c)=>{var m=c(17292),w=c(58988);w=w.__esModule?w.default:w,typeof w=="string"&&(w=[[x.id,w,""]]);var b={};b.insert="head",b.singleton=!1;var _=m(w,b);x.exports=w.locals||{}},68286:(x,k,c)=>{var m=c(17292),w=c(31738);w=w.__esModule?w.default:w,typeof w=="string"&&(w=[[x.id,w,""]]);var b={};b.insert="head",b.singleton=!1;var _=m(w,b);x.exports=w.locals||{}},19372:(x,k,c)=>{var m=c(17292),w=c(43395);w=w.__esModule?w.default:w,typeof w=="string"&&(w=[[x.id,w,""]]);var b={};b.insert="head",b.singleton=!1;var _=m(w,b);x.exports=w.locals||{}},47629:(x,k,c)=>{var m=c(17292),w=c(98036);w=w.__esModule?w.default:w,typeof w=="string"&&(w=[[x.id,w,""]]);var b={};b.insert="head",b.singleton=!1;var _=m(w,b);x.exports=w.locals||{}},87767:x=>{"use strict";function k(V){return Object.prototype.toString.call(V)}function c(V){return k(V)==="[object Date]"}function m(V){return k(V)==="[object RegExp]"}function w(V){return k(V)==="[object Error]"}function b(V){return k(V)==="[object Boolean]"}function _(V){return k(V)==="[object Number]"}function A(V){return k(V)==="[object String]"}var O=Array.isArray||function(J){return Object.prototype.toString.call(J)==="[object Array]"};function j(V,J){if(V.forEach)return V.forEach(J);for(var L=0;L<V.length;L++)J(V[L],L,V)}var $=Object.keys||function(J){var L=[];for(var E in J)L.push(E);return L},K=Object.prototype.hasOwnProperty||function(V,J){return J in V};function ie(V){if(typeof V=="object"&&V!==null){var J;if(O(V))J=[];else if(c(V))J=new Date(V.getTime?V.getTime():V);else if(m(V))J=new RegExp(V);else if(w(V))J={message:V.message};else if(b(V)||_(V)||A(V))J=Object(V);else if(Object.create&&Object.getPrototypeOf)J=Object.create(Object.getPrototypeOf(V));else if(V.constructor===Object)J={};else{var L=V.constructor&&V.constructor.prototype||V.__proto__||{},E=function(){};E.prototype=L,J=new E}return j($(V),function(N){J[N]=V[N]}),J}return V}function ee(V,J,L){var E=[],N=[],U=!0;return function se(ne){var Y=L?ie(ne):ne,X={},Q=!0,H={node:Y,node_:ne,path:[].concat(E),parent:N[N.length-1],parents:N,key:E[E.length-1],isRoot:E.length===0,level:E.length,circular:null,update:function(Z,xe){H.isRoot||(H.parent.node[H.key]=Z),H.node=Z,xe&&(Q=!1)},delete:function(Z){delete H.parent.node[H.key],Z&&(Q=!1)},remove:function(Z){O(H.parent.node)?H.parent.node.splice(H.key,1):delete H.parent.node[H.key],Z&&(Q=!1)},keys:null,before:function(Z){X.before=Z},after:function(Z){X.after=Z},pre:function(Z){X.pre=Z},post:function(Z){X.post=Z},stop:function(){U=!1},block:function(){Q=!1}};if(!U)return H;function de(){if(typeof H.node=="object"&&H.node!==null){(!H.keys||H.node_!==H.node)&&(H.keys=$(H.node)),H.isLeaf=H.keys.length===0;for(var Z=0;Z<N.length;Z++)if(N[Z].node_===ne){H.circular=N[Z];break}}else H.isLeaf=!0,H.keys=null;H.notLeaf=!H.isLeaf,H.notRoot=!H.isRoot}de();var Ae=J.call(H,H.node);return Ae!==void 0&&H.update&&H.update(Ae),X.before&&X.before.call(H,H.node),Q&&(typeof H.node=="object"&&H.node!==null&&!H.circular&&(N.push(H),de(),j(H.keys,function(Z,xe){E.push(Z),X.pre&&X.pre.call(H,H.node[Z],Z);var ue=se(H.node[Z]);L&&K.call(H.node,Z)&&(H.node[Z]=ue.node),ue.isLast=xe===H.keys.length-1,ue.isFirst=xe===0,X.post&&X.post.call(H,ue),E.pop()}),N.pop()),X.after&&X.after.call(H,H.node)),H}(V).node}function ae(V){this.value=V}ae.prototype.get=function(V){for(var J=this.value,L=0;L<V.length;L++){var E=V[L];if(!J||!K.call(J,E))return;J=J[E]}return J},ae.prototype.has=function(V){for(var J=this.value,L=0;L<V.length;L++){var E=V[L];if(!J||!K.call(J,E))return!1;J=J[E]}return!0},ae.prototype.set=function(V,J){for(var L=this.value,E=0;E<V.length-1;E++){var N=V[E];K.call(L,N)||(L[N]={}),L=L[N]}return L[V[E]]=J,J},ae.prototype.map=function(V){return ee(this.value,V,!0)},ae.prototype.forEach=function(V){return this.value=ee(this.value,V,!1),this.value},ae.prototype.reduce=function(V,J){var L=arguments.length===1,E=L?this.value:J;return this.forEach(function(N){(!this.isRoot||!L)&&(E=V.call(this,E,N))}),E},ae.prototype.paths=function(){var V=[];return this.forEach(function(){V.push(this.path)}),V},ae.prototype.nodes=function(){var V=[];return this.forEach(function(){V.push(this.node)}),V},ae.prototype.clone=function(){var V=[],J=[];return function L(E){for(var N=0;N<V.length;N++)if(V[N]===E)return J[N];if(typeof E=="object"&&E!==null){var U=ie(E);return V.push(E),J.push(U),j($(E),function(se){U[se]=L(E[se])}),V.pop(),J.pop(),U}return E}(this.value)};function q(V){return new ae(V)}j($(ae.prototype),function(V){q[V]=function(J){var L=[].slice.call(arguments,1),E=new ae(J);return E[V].apply(E,L)}}),x.exports=q},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,k,c)=>{x.exports=c(24018)},10017:(x,k,c)=>{x.exports=c(27411)},34961:(x,k,c)=>{x.exports=c(79155)},86751:(x,k,c)=>{x.exports=c(13375)},12953:(x,k,c)=>{x.exports=c(95442)},77844:(x,k,c)=>{x.exports=c(55334)},86351:(x,k,c)=>{x.exports=c(48261)},70762:(x,k,c)=>{x.exports=c(92864)},10954:(x,k,c)=>{x.exports=c(27923)},55839:(x,k,c)=>{x.exports=c(89225)},23422:(x,k,c)=>{x.exports=c(95281)},47319:(x,k,c)=>{x.exports=c(55468)}}]);