@scalar/api-reference 1.22.34 → 1.22.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/browser/standalone.js +13 -13
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/{index-Cwi4rslr.cjs → index-CZKZ0PqH.cjs} +3 -3
- package/dist/{index-DX6IQnUb.cjs → index-DUTN4kbO.cjs} +3 -3
- package/dist/{index-DkseJoyI.js → index-DsNRk9Wg.js} +256 -257
- package/dist/{index-COhABapk.js → index-iSN8Sfb6.js} +866 -863
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
|
@@ -59,7 +59,7 @@ ${o}${p}`}else return`${f}${a}${h.join(" ")}${a}${p}`}function nl({indent:r,opti
|
|
|
59
59
|
`;this.styleTag.textContent=s;let a=this.root.head||this.root;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var hn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},pi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vS=typeof navigator<"u"&&/Mac/.test(navigator.platform),bS=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var et=0;et<10;et++)hn[48+et]=hn[96+et]=String(et);for(var et=1;et<=24;et++)hn[et+111]="F"+et;for(var et=65;et<=90;et++)hn[et]=String.fromCharCode(et+32),pi[et]=String.fromCharCode(et);for(var Vc in hn)pi.hasOwnProperty(Vc)||(pi[Vc]=hn[Vc]);function wS(r){var e=vS&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||bS&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?pi:hn)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function ll(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}function jd(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}function kS(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function La(r,e){if(!e.anchorNode)return!1;try{return jd(r,e.anchorNode)}catch{return!1}}function mi(r){return r.nodeType==3?Jn(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function ti(r,e,t,n){return t?$p(r,e,t,n,-1)||$p(r,e,t,n,1):!1}function gi(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}function $p(r,e,t,n,o){for(;;){if(r==t&&e==n)return!0;if(e==(o<0?0:Dr(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=gi(r)+(o<0?0:1),r=s}else if(r.nodeType==1){if(r=r.childNodes[e+(o<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=o<0?Dr(r):0}else return!1}}function Dr(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function sh(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function SS(r){return{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function R0(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function xS(r,e,t,n,o,s,a,l){let c=r.ownerDocument,d=c.defaultView||window;for(let u=r,h=!1;u&&!h;)if(u.nodeType==1){let f,p=u==c.body,m=1,g=1;if(p)f=SS(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:m,scaleY:g}=R0(u,b)),f={left:b.left,right:b.left+u.clientWidth*m,top:b.top,bottom:b.top+u.clientHeight*g}}let y=0,v=0;if(o=="nearest")e.top<f.top?(v=-(f.top-e.top+a),t>0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+v+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,t<0&&e.top-v<f.top&&(v=-(f.top+v-e.top+a)));else{let b=e.bottom-e.top,w=f.bottom-f.top;v=(o=="center"&&b<=w?e.top+b/2-w/2:o=="start"||o=="center"&&t<0?e.top-a:e.bottom-w+a)-f.top}if(n=="nearest"?e.left<f.left?(y=-(f.left-e.left+s),t>0&&e.right>f.right+y&&(y=e.right-f.right+y+s)):e.right>f.right&&(y=e.right-f.right+s,t<0&&e.left<f.left+y&&(y=-(f.left+y-e.left+s))):y=(n=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:n=="start"==l?e.left-s:e.right-(f.right-f.left)+s)-f.left,y||v)if(p)d.scrollBy(y,v);else{let b=0,w=0;if(v){let S=u.scrollTop;u.scrollTop+=v/g,w=(u.scrollTop-S)*g}if(y){let S=u.scrollLeft;u.scrollLeft+=y/m,b=(u.scrollLeft-S)*m}e={left:e.left-b,top:e.top-w,right:e.right-b,bottom:e.bottom-w},b&&Math.abs(b-y)<1&&(n="nearest"),w&&Math.abs(w-v)<1&&(o="nearest")}if(p)break;u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function CS(r){let e=r.ownerDocument;for(let t=r.parentNode;t&&t!=e.body;)if(t.nodeType==1){if(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class ES{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Dr(t):0),n,Math.min(e.focusOffset,n?Dr(n):0))}set(e,t,n,o){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=o}}let mo=null;function L0(r){if(r.setActive)return r.setActive();if(mo)return r.focus(mo);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(mo==null?{get preventScroll(){return mo={preventScroll:!0},!0}}:void 0),!mo){mo=!1;for(let t=0;t<e.length;){let n=e[t++],o=e[t++],s=e[t++];n.scrollTop!=o&&(n.scrollTop=o),n.scrollLeft!=s&&(n.scrollLeft=s)}}}let _p;function Jn(r,e,t=e){let n=_p||(_p=document.createRange());return n.setEnd(r,t),n.setStart(r,e),n}function Do(r,e,t){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0},o=new KeyboardEvent("keydown",n);o.synthetic=!0,r.dispatchEvent(o);let s=new KeyboardEvent("keyup",n);return s.synthetic=!0,r.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function $S(r){for(;r;){if(r&&(r.nodeType==9||r.nodeType==11&&r.host))return r;r=r.assignedSlot||r.parentNode}return null}function j0(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}function _S(r,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,Dr(t));;)if(n){if(t.nodeType!=1)return!1;let o=t.childNodes[n-1];o.contentEditable=="false"?n--:(t=o,n=Dr(t))}else{if(t==r)return!0;n=gi(t),t=t.parentNode}}function F0(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}class it{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new it(e.parentNode,gi(e),t)}static after(e,t){return new it(e.parentNode,gi(e)+1,t)}}const ih=[];class Te{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let n=this.dom,o=null,s;for(let a of this.children){if(a.flags&7){if(!a.dom&&(s=o?o.nextSibling:n.firstChild)){let l=Te.get(s);(!l||!l.parent&&l.canReuseDOM(a))&&a.reuseDOM(s)}a.sync(e,t),a.flags&=-8}if(s=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&s!=a.dom&&(t.written=!0),a.dom.parentNode==n)for(;s&&s!=a.dom;)s=Np(s);else n.insertBefore(a.dom,s);o=a.dom}for(s=o?o.nextSibling:n.firstChild,s&&t&&t.node==n&&(t.written=!0);s;)s=Np(s)}else if(this.flags&1)for(let n of this.children)n.flags&7&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let o=Dr(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;o==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?o=-1:o=1),e=s}o<0?n=e:n=e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Te.get(n);)n=n.nextSibling;if(!n)return this.length;for(let o=0,s=0;;o++){let a=this.children[o];if(a.dom==n)return s;s+=a.length+a.breakAfter}}domBoundsAround(e,t,n=0){let o=-1,s=-1,a=-1,l=-1;for(let c=0,d=n,u=n;c<this.children.length;c++){let h=this.children[c],f=d+h.length;if(d<e&&f>t)return h.domBoundsAround(e,t,d);if(f>=e&&o==-1&&(o=c,s=d),d>t&&h.dom.parentNode==this.dom){a=c,l=u;break}u=f,d=f+h.breakAfter}return{from:s,to:l<0?n+this.length:l,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=ih){this.markDirty();for(let o=e;o<t;o++){let s=this.children[o];s.parent==this&&n.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...n);for(let o=0;o<n.length;o++)n[o].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new q0(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,o,s,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Te.prototype.breakAfter=0;function Np(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class q0{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function z0(r,e,t,n,o,s,a,l,c){let{children:d}=r,u=d.length?d[e]:null,h=s.length?s[s.length-1]:null,f=h?h.breakAfter:a;if(!(e==n&&u&&!a&&!f&&s.length<2&&u.merge(t,o,s.length?h:null,t==0,l,c))){if(n<d.length){let p=d[n];p&&(o<p.length||p.breakAfter&&(h!=null&&h.breakAfter))?(e==n&&(p=p.split(o),o=0),!f&&h&&p.merge(0,o,h,!0,0,c)?s[s.length-1]=p:((o||p.children.length&&!p.children[0].length)&&p.merge(0,o,null,!1,0,c),s.push(p))):p!=null&&p.breakAfter&&(h?h.breakAfter=1:a=1),n++}for(u&&(u.breakAfter=a,t>0&&(!a&&s.length&&u.merge(t,u.length,s[0],!1,l,0)?u.breakAfter=s.shift().breakAfter:(t<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(t,u.length,null,!1,l,0),e++));e<n&&s.length;)if(d[n-1].become(s[s.length-1]))n--,s.pop(),c=s.length?0:l;else if(d[e].become(s[0]))e++,s.shift(),l=s.length?0:c;else break;!s.length&&e&&n<d.length&&!d[e-1].breakAfter&&d[n].merge(0,0,d[e-1],!1,l,c)&&e--,(e<n||s.length)&&r.replaceChildren(e,n,s)}}function H0(r,e,t,n,o,s){let a=r.childCursor(),{i:l,off:c}=a.findPos(t,1),{i:d,off:u}=a.findPos(e,-1),h=e-t;for(let f of n)h+=f.length;r.length+=h,z0(r,d,u,l,c,n,0,o,s)}let xt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Fd=typeof document<"u"?document:{documentElement:{style:{}}};const qd=/Edge\/(\d+)/.exec(xt.userAgent),K0=/MSIE \d/.test(xt.userAgent),zd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xt.userAgent),Hl=!!(K0||zd||qd),Ap=!Hl&&/gecko\/(\d+)/i.test(xt.userAgent),Rc=!Hl&&/Chrome\/(\d+)/.exec(xt.userAgent),Op="webkitFontSmoothing"in Fd.documentElement.style,U0=!Hl&&/Apple Computer/.test(xt.vendor),Tp=U0&&(/Mobile\/\w+/.test(xt.userAgent)||xt.maxTouchPoints>2);var G={mac:Tp||/Mac/.test(xt.platform),windows:/Win/.test(xt.platform),linux:/Linux|X11/.test(xt.platform),ie:Hl,ie_version:K0?Fd.documentMode||6:zd?+zd[1]:qd?+qd[1]:0,gecko:Ap,gecko_version:Ap?+(/Firefox\/(\d+)/.exec(xt.userAgent)||[0,0])[1]:0,chrome:!!Rc,chrome_version:Rc?+Rc[1]:0,ios:Tp,android:/Android\b/.test(xt.userAgent),webkit:Op,safari:U0,webkit_version:Op?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Fd.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const NS=256;class Vr extends Te{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Vr)||this.length-(t-e)+n.length>NS||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Vr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new it(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return AS(this.dom,e,t)}}class Rr extends Te{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let o of t)o.setParent(this)}setAttrs(e){if(j0(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,o,s,a){return n&&(!(n instanceof Rr&&n.mark.eq(this.mark))||e&&s<=0||t<this.length&&a<=0)?!1:(H0(this,e,t,n?n.children.slice():[],s-1,a-1),this.markDirty(),!0)}split(e){let t=[],n=0,o=-1,s=0;for(let l of this.children){let c=n+l.length;c>e&&t.push(n<e?l.split(e-n):l),o<0&&n>=e&&(o=s),n=c,s++}let a=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new Rr(this.mark,t,a)}domAtPos(e){return W0(this,e)}coordsAt(e,t){return J0(this,e,t)}}function AS(r,e,t){let n=r.nodeValue.length;e>n&&(e=n);let o=e,s=e,a=0;e==0&&t<0||e==n&&t>=0?G.chrome||G.gecko||(e?(o--,a=1):s<n&&(s++,a=-1)):t<0?o--:s<n&&s++;let l=Jn(r,o,s).getClientRects();if(!l.length)return null;let c=l[(a?a<0:t>=0)?0:l.length-1];return G.safari&&!a&&c.width==0&&(c=Array.prototype.find.call(l,d=>d.width)||c),a?sh(c,a<0):c||null}class Rn extends Te{static create(e,t,n){return new Rn(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Rn.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,o,s,a){return n&&(!(n instanceof Rn)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Rn&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return we.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,o=this.posAtStart;return n?n.slice(o,o+this.length):we.empty}domAtPos(e){return(this.length?e==0:this.side>0)?it.before(this.dom):it.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let o=this.dom.getClientRects(),s=null;if(!o.length)return null;let a=this.side?this.side<0:e>0;for(let l=a?o.length-1:0;s=o[l],!(e>0?l==0:l==o.length-1||s.top<s.bottom);l+=a?-1:1);return sh(s,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ko extends Te{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Ko&&e.side==this.side}split(){return new Ko(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?it.before(this.dom):it.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return we.empty}get isHidden(){return!0}}Vr.prototype.children=Rn.prototype.children=Ko.prototype.children=ih;function W0(r,e){let t=r.dom,{children:n}=r,o=0;for(let s=0;o<n.length;o++){let a=n[o],l=s+a.length;if(!(l==s&&a.getSide()<=0)){if(e>s&&e<l&&a.dom.parentNode==t)return a.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=o;s>0;s--){let a=n[s-1];if(a.dom.parentNode==t)return a.domAtPos(a.length)}for(let s=o;s<n.length;s++){let a=n[s];if(a.dom.parentNode==t)return a.domAtPos(0)}return new it(t,0)}function G0(r,e,t){let n,{children:o}=r;t>0&&e instanceof Rr&&o.length&&(n=o[o.length-1])instanceof Rr&&n.mark.eq(e.mark)?G0(n,e.children[0],t-1):(o.push(e),e.setParent(r)),r.length+=e.length}function J0(r,e,t){let n=null,o=-1,s=null,a=-1;function l(d,u){for(let h=0,f=0;h<d.children.length&&f<=u;h++){let p=d.children[h],m=f+p.length;m>=u&&(p.children.length?l(p,u-f):(!s||s.isHidden&&t>0)&&(m>u||f==m&&p.getSide()>0)?(s=p,a=u-f):(f<u||f==m&&p.getSide()<0&&!p.isHidden)&&(n=p,o=u-f)),f=m}}l(r,e);let c=(t<0?n:s)||n||s;return c?c.coordsAt(Math.max(0,c==n?o:a),t):OS(r)}function OS(r){let e=r.dom.lastChild;if(!e)return r.dom.getBoundingClientRect();let t=mi(e);return t[t.length-1]||null}function Hd(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}const Bp=Object.create(null);function ah(r,e,t){if(r==e)return!0;r||(r=Bp),e||(e=Bp);let n=Object.keys(r),o=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=o.length-(t&&o.indexOf(t)>-1?1:0))return!1;for(let s of n)if(s!=t&&(o.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}function Kd(r,e,t){let n=!1;if(e)for(let o in e)t&&o in t||(n=!0,o=="style"?r.style.cssText="":r.removeAttribute(o));if(t)for(let o in t)e&&e[o]==t[o]||(n=!0,o=="style"?r.style.cssText=t[o]:r.setAttribute(o,t[o]));return n}function TS(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let n=r.attributes[t];e[n.name]=n.value}return e}class Ue extends Te{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,o,s,a){if(n){if(!(n instanceof Ue))return!1;this.dom||n.transferDOM(this)}return o&&this.setDeco(n?n.attrs:null),H0(this,e,t,n?n.children.slice():[],s,a),!0}split(e){let t=new Ue;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:o}=this.childPos(e);o&&(t.append(this.children[n].split(o),0),this.children[n].merge(o,this.children[n].length,null,!1,0,0),n++);for(let s=n;s<this.children.length;s++)t.append(this.children[s],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){ah(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){G0(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Hd(t,this.attrs||{})),n&&(this.attrs=Hd({class:n},this.attrs||{}))}domAtPos(e){return W0(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(j0(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Kd(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let o=this.dom.lastChild;for(;o&&Te.get(o)instanceof Rr;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((n=Te.get(o))===null||n===void 0?void 0:n.isEditable)==!1&&(!G.ios||!this.children.some(s=>s instanceof Vr))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Vr)||/[^ -~]/.test(n.text))return null;let o=mi(n.dom);if(o.length!=1)return null;e+=o[0].width,t=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=J0(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:o}=this.parent.view.viewState,s=n.bottom-n.top;if(Math.abs(s-o.lineHeight)<2&&o.textHeight<s){let a=(s-o.textHeight)/2;return{top:n.top+a,bottom:n.bottom-a,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,o=0;n<e.children.length;n++){let s=e.children[n],a=o+s.length;if(a>=t){if(s instanceof Ue)return s;if(a>t)break}o=a+s.breakAfter}return null}}class ln extends Te{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,o,s,a){return n&&(!(n instanceof ln)||!this.widget.compare(n.widget)||e>0&&s<=0||t<this.length&&a<=0)?!1:(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?it.before(this.dom):it.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new ln(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return ih}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):we.empty}domBoundsAround(){return null}become(e){return e instanceof ln&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t==n?!1:e<0?t<0:n>0}}class ns{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Xt=function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r}(Xt||(Xt={}));class Be extends Gn{constructor(e,t,n,o){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=o}get heightRelevant(){return!1}static mark(e){return new Ti(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new fn(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,o;if(e.isBlockGap)n=-5e8,o=4e8;else{let{start:s,end:a}=Y0(e,t);n=(s?t?-3e8:-1:5e8)-1,o=(a?t?2e8:1:-6e8)+1}return new fn(e,n,o,t,e.widget||null,!0)}static line(e){return new Bi(e)}static set(e,t=!1){return be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Be.none=be.empty;class Ti extends Be{constructor(e){let{start:t,end:n}=Y0(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Ti&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&ah(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Ti.prototype.point=!1;class Bi extends Be{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bi&&this.spec.class==e.spec.class&&ah(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Bi.prototype.mapMode=exports.MapMode.TrackBefore;Bi.prototype.point=!0;class fn extends Be{constructor(e,t,n,o,s,a){super(t,n,s,e),this.block=o,this.isReplace=a,this.mapMode=o?t<=0?exports.MapMode.TrackBefore:exports.MapMode.TrackAfter:exports.MapMode.TrackDel}get type(){return this.startSide!=this.endSide?Xt.WidgetRange:this.startSide<=0?Xt.WidgetBefore:Xt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof fn&&BS(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}fn.prototype.point=!0;function Y0(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function BS(r,e){return r==e||!!(r&&e&&r.compare(e))}function Ud(r,e,t,n=0){let o=t.length-1;o>=0&&t[o]+n>=r?t[o]=Math.max(t[o],e):t.push(r,e)}class ri{constructor(e,t,n,o){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ln&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ue),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(aa(new Ko(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ln)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(aa(new Vr(this.text.slice(this.textOff,this.textOff+o)),t),n),this.atCursorPos=!0,this.textOff+=o,e-=o,n=0}}span(e,t,n,o){this.buildText(t-e,n,o),this.pos=t,this.openStart<0&&(this.openStart=o)}point(e,t,n,o,s,a){if(this.disallowBlockEffectsFor[a]&&n instanceof fn){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(n instanceof fn)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ln(n.widget||new Pp("div"),l,n));else{let c=Rn.create(n.widget||new Pp("span"),l,l?0:n.startSide),d=this.atCursorPos&&!c.isEditable&&s<=o.length&&(e<t||n.startSide>0),u=!c.isEditable&&(e<t||s>o.length||n.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!d&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),d&&(h.append(aa(new Ko(1),o),s),s=o.length+Math.max(0,s-o.length)),h.append(aa(c,o),s),this.atCursorPos=u,this.pendingBuffer=u?e<t||s>o.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,n,o,s){let a=new ri(e,t,n,s);return a.openEnd=be.spans(o,t,n,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function aa(r,e){for(let t of e)r=new Rr(t,[r],r.length);return r}class Pp extends ns{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}exports.Direction=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(exports.Direction||(exports.Direction={}));const Yn=exports.Direction.LTR,lh=exports.Direction.RTL;function X0(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}const PS=X0("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),IS=X0("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Wd=Object.create(null),ar=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);Wd[e]=t,Wd[t]=-e}function Q0(r){return r<=247?PS[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?IS[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}const MS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class sn{get dir(){return this.level%2?lh:Yn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,o){let s=-1;for(let a=0;a<e.length;a++){let l=e[a];if(l.from<=t&&l.to>=t){if(l.level==n)return a;(s<0||(o!=0?o<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function Z0(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],o=e[t];if(n.from!=o.from||n.to!=o.to||n.direction!=o.direction||!Z0(n.inner,o.inner))return!1}return!0}const xe=[];function DS(r,e,t,n,o){for(let s=0;s<=n.length;s++){let a=s?n[s-1].to:e,l=s<n.length?n[s].from:t,c=s?256:o;for(let d=a,u=c,h=c;d<l;d++){let f=Q0(r.charCodeAt(d));f==512?f=u:f==8&&h==4&&(f=16),xe[d]=f==4?2:f,f&7&&(h=f),u=f}for(let d=a,u=c,h=c;d<l;d++){let f=xe[d];if(f==128)d<l-1&&u==xe[d+1]&&u&24?f=xe[d]=u:xe[d]=256;else if(f==64){let p=d+1;for(;p<l&&xe[p]==64;)p++;let m=d&&u==8||p<t&&xe[p]==8?h==1?1:8:256;for(let g=d;g<p;g++)xe[g]=m;d=p-1}else f==8&&h==1&&(xe[d]=1);u=f,f&7&&(h=f)}}}function VS(r,e,t,n,o){let s=o==1?2:1;for(let a=0,l=0,c=0;a<=n.length;a++){let d=a?n[a-1].to:e,u=a<n.length?n[a].from:t;for(let h=d,f,p,m;h<u;h++)if(p=Wd[f=r.charCodeAt(h)])if(p<0){for(let g=l-3;g>=0;g-=3)if(ar[g+1]==-p){let y=ar[g+2],v=y&2?o:y&4?y&1?s:o:0;v&&(xe[h]=xe[ar[g]]=v),l=g;break}}else{if(ar.length==189)break;ar[l++]=h,ar[l++]=f,ar[l++]=c}else if((m=xe[h])==2||m==1){let g=m==o;c=g?0:1;for(let y=l-3;y>=0;y-=3){let v=ar[y+2];if(v&2)break;if(g)ar[y+2]|=2;else{if(v&4)break;ar[y+2]|=4}}}}}function RS(r,e,t,n){for(let o=0,s=n;o<=t.length;o++){let a=o?t[o-1].to:r,l=o<t.length?t[o].from:e;for(let c=a;c<l;){let d=xe[c];if(d==256){let u=c+1;for(;;)if(u==l){if(o==t.length)break;u=t[o++].to,l=o<t.length?t[o].from:e}else if(xe[u]==256)u++;else break;let h=s==1,f=(u<e?xe[u]:n)==1,p=h==f?h?1:2:n;for(let m=u,g=o,y=g?t[g-1].to:r;m>c;)m==y&&(m=t[--g].from,y=g?t[g-1].to:r),xe[--m]=p;c=u}else s=d,c++}}}function Gd(r,e,t,n,o,s,a){let l=n%2?2:1;if(n%2==o%2)for(let c=e,d=0;c<t;){let u=!0,h=!1;if(d==s.length||c<s[d].from){let g=xe[c];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,m=c;e:for(;;)if(d<s.length&&m==s[d].from){if(h)break e;let g=s[d];if(!u)for(let y=g.to,v=d+1;;){if(y==t)break e;if(v<s.length&&s[v].from==y)y=s[v++].to;else{if(xe[y]==l)break e;break}}if(d++,f)f.push(g);else{g.from>c&&a.push(new sn(c,g.from,p));let y=g.direction==Yn!=!(p%2);Jd(r,y?n+1:n,o,g.inner,g.from,g.to,a),c=g.to}m=g.to}else{if(m==t||(u?xe[m]!=l:xe[m]==l))break;m++}f?Gd(r,c,m,n+1,o,f,a):c<m&&a.push(new sn(c,m,p)),c=m}else for(let c=t,d=s.length;c>e;){let u=!0,h=!1;if(!d||c>s[d-1].to){let g=xe[c-1];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,p=u?n:n+1,m=c;e:for(;;)if(d&&m==s[d-1].to){if(h)break e;let g=s[--d];if(!u)for(let y=g.from,v=d;;){if(y==e)break e;if(v&&s[v-1].to==y)y=s[--v].from;else{if(xe[y-1]==l)break e;break}}if(f)f.push(g);else{g.to<c&&a.push(new sn(g.to,c,p));let y=g.direction==Yn!=!(p%2);Jd(r,y?n+1:n,o,g.inner,g.from,g.to,a),c=g.from}m=g.from}else{if(m==e||(u?xe[m-1]!=l:xe[m-1]==l))break;m--}f?Gd(r,m,c,n+1,o,f,a):m<c&&a.push(new sn(m,c,p)),c=m}}function Jd(r,e,t,n,o,s,a){let l=e%2?2:1;DS(r,o,s,n,l),VS(r,o,s,n,l),RS(o,s,n,l),Gd(r,o,s,e,t,n,a)}function LS(r,e,t){if(!r)return[new sn(0,0,e==lh?1:0)];if(e==Yn&&!t.length&&!MS.test(r))return ey(r.length);if(t.length)for(;r.length>xe.length;)xe[xe.length]=256;let n=[],o=e==Yn?0:1;return Jd(r,o,o,t,0,r.length,n),n}function ey(r){return[new sn(0,r,0)]}let ty="";function jS(r,e,t,n,o){var s;let a=n.head-r.from,l=sn.find(e,a,(s=n.bidiLevel)!==null&&s!==void 0?s:-1,n.assoc),c=e[l],d=c.side(o,t);if(a==d){let f=l+=o?1:-1;if(f<0||f>=e.length)return null;c=e[l=f],a=c.side(!o,t),d=c.side(o,t)}let u=mr(r.text,a,c.forward(o,t));(u<c.from||u>c.to)&&(u=d),ty=r.text.slice(Math.min(a,u),Math.max(a,u));let h=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return h&&u==d&&h.level+(o?0:1)<c.level?Y.cursor(h.side(!o,t)+r.from,h.forward(o,t)?1:-1,h.level):Y.cursor(u+r.from,c.forward(o,t)?-1:1,c.level)}function FS(r,e,t){for(let n=e;n<t;n++){let o=Q0(r.charCodeAt(n));if(o==1)return Yn;if(o==2||o==4)return lh}return Yn}const ry=Z.define(),ny=Z.define(),oy=Z.define(),sy=Z.define(),Yd=Z.define(),iy=Z.define(),ay=Z.define(),ly=Z.define({combine:r=>r.some(e=>e)}),qS=Z.define({combine:r=>r.some(e=>e)});class Vo{constructor(e,t="nearest",n="nearest",o=5,s=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=o,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Vo(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Vo(Y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const la=We.define({map:(r,e)=>r.map(e)});function Br(r,e,t){let n=r.facet(sy);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Kl=Z.define({combine:r=>r.length?r[0]:!0});let zS=0;const zs=Z.define();class Vt{constructor(e,t,n,o,s){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=o,this.extension=s(this)}static define(e,t){const{eventHandlers:n,eventObservers:o,provide:s,decorations:a}=t||{};return new Vt(zS++,e,n,o,l=>{let c=[zs.of(l)];return a&&c.push(yi.of(d=>{let u=d.plugin(l);return u?a(u):Be.none})),s&&c.push(s(l)),c})}static fromClass(e,t){return Vt.define(n=>new e(n),t)}}class Lc{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Br(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Br(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Br(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const cy=Z.define(),ch=Z.define(),yi=Z.define(),dy=Z.define(),dh=Z.define(),uy=Z.define();function Ip(r,e){let t=r.state.facet(uy);if(!t.length)return t;let n=t.map(s=>s instanceof Function?s(r):s),o=[];return be.spans(n,e.from,e.to,{point(){},span(s,a,l,c){let d=s-e.from,u=a-e.from,h=o;for(let f=l.length-1;f>=0;f--,c--){let p=l[f].spec.bidiIsolate,m;if(p==null&&(p=FS(e.text,d,u)),c>0&&h.length&&(m=h[h.length-1]).to==d&&m.direction==p)m.to=u,h=m.inner;else{let g={from:d,to:u,direction:p,inner:[]};h.push(g),h=g.inner}}}}),o}const hy=Z.define();function fy(r){let e=0,t=0,n=0,o=0;for(let s of r.state.facet(hy)){let a=s(r);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(n=Math.max(n,a.top)),a.bottom!=null&&(o=Math.max(o,a.bottom)))}return{left:e,right:t,top:n,bottom:o}}const Hs=Z.define();class It{constructor(e,t,n,o){this.fromA=e,this.toA=t,this.fromB=n,this.toB=o}join(e){return new It(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let o=e[t-1];if(!(o.fromA>n.toA)){if(o.toA<n.fromA)break;n=n.join(o),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let o=0,s=0,a=0,l=0;;o++){let c=o==e.length?null:e[o],d=a-l,u=c?c.fromB:1e9;for(;s<t.length&&t[s]<u;){let h=t[s],f=t[s+1],p=Math.max(l,h),m=Math.min(u,f);if(p<=m&&new It(p+d,m+d,p,m).addToSet(n),f>u)break;s+=2}if(!c)return n;new It(c.fromA,c.toA,c.fromB,c.toB).addToSet(n),a=c.toA,l=c.toB}}}class cl{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ye.empty(this.startState.doc.length);for(let s of n)this.changes=this.changes.compose(s.changes);let o=[];this.changes.iterChangedRanges((s,a,l,c)=>o.push(new It(s,a,l,c))),this.changedRanges=o}static create(e,t,n){return new cl(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Mp extends Te{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ue],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new It(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:u})=>u<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let o=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?o=this.domChanged.newSel.head:!YS(e.changes,this.hasComposition)&&!e.selectionSet&&(o=e.state.selection.main.head));let s=o>-1?KS(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:d,to:u}=this.hasComposition;n=new It(d,u,e.changes.mapPos(d,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(G.ie||G.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.updateDeco(),c=GS(a,l,e.changes);return n=It.extendWithRanges(n,c),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=G.chrome||G.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||o.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof ln&&a.widget instanceof Dp&&s.push(a.dom);o.updateGaps(s)}updateChildren(e,t,n){let o=n?n.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let a=o.length-1;;a--){let l=a>=0?o[a]:null;if(!l)break;let{fromA:c,toA:d,fromB:u,toB:h}=l,f,p,m,g;if(n&&n.range.fromB<h&&n.range.toB>u){let S=ri.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),x=ri.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);p=S.breakAtStart,m=S.openStart,g=x.openEnd;let k=this.compositionView(n);x.breakAtStart?k.breakAfter=1:x.content.length&&k.merge(k.length,k.length,x.content[0],!1,x.openStart,0)&&(k.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&k.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(k).concat(x.content)}else({content:f,breakAtStart:p,openStart:m,openEnd:g}=ri.build(this.view.state.doc,u,h,this.decorations,this.dynamicDecorationMap));let{i:y,off:v}=s.findPos(d,1),{i:b,off:w}=s.findPos(c,-1);z0(this,b,w,y,v,f,p,m,g)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new Vr(e.text.nodeValue);t.flags|=8;for(let{deco:o}of e.marks)t=new Rr(o,[t],t.length);let n=new Ue;return n.append(t,0),n}fixCompositionDOM(e){let t=(s,a)=>{a.flags|=8|(a.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(a);let l=Te.get(s);l&&l!=a&&(l.dom=null),a.setDOM(s)},n=this.childPos(e.range.fromB,1),o=this.children[n.i];t(e.line,o);for(let s=e.marks.length-1;s>=-1;s--)n=o.childPos(n.off,1),o=o.children[n.i],t(s>=0?e.marks[s].node:e.text,o)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,o=n==this.dom,s=!o&&La(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(o||t||s))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(l.anchor)),d=l.empty?c:this.moveToLine(this.domAtPos(l.head));if(G.gecko&&l.empty&&!this.hasComposition&&HS(c)){let h=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(h,c.node.childNodes[c.offset]||null)),c=d=new it(h,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!ti(c.node,c.offset,u.anchorNode,u.anchorOffset)||!ti(d.node,d.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,l))&&(this.view.observer.ignore(()=>{G.android&&G.chrome&&this.dom.contains(u.focusNode)&&JS(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=ll(this.view.root);if(h)if(l.empty){if(G.gecko){let f=US(c.node,c.offset);if(f&&f!=3){let p=my(c.node,c.offset,f==1?1:-1);p&&(c=new it(p.node,p.offset))}}h.collapse(c.node,c.offset),l.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(c.node,c.offset);try{h.extend(d.node,d.offset)}catch{}}else{let f=document.createRange();l.anchor>l.head&&([c,d]=[d,c]),f.setEnd(d.node,d.offset),f.setStart(c.node,c.offset),h.removeAllRanges(),h.addRange(f)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new it(u.anchorNode,u.anchorOffset),this.impreciseHead=d.precise?null:new it(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&ti(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=ll(e.root),{anchorNode:o,anchorOffset:s}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=Ue.find(this,t.head);if(!a)return;let l=a.posAtStart;if(t.head==l||t.head==l+a.length)return;let c=this.coordsAt(t.head,-1),d=this.coordsAt(t.head,1);if(!c||!d||c.bottom>d.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&n.collapse(o,s)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let o=e.offset;!n&&o<t.childNodes.length;o++){let s=Te.get(t.childNodes[o]);s instanceof Ue&&(n=s.domAtPos(0))}for(let o=e.offset-1;!n&&o>=0;o--){let s=Te.get(t.childNodes[o]);s instanceof Ue&&(n=s.domAtPos(s.length))}return n?new it(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Te.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let o=this.children[t];if(n<o.length||o instanceof Ue)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,o=0;for(let s=this.length,a=this.children.length-1;a>=0;a--){let l=this.children[a],c=s-l.breakAfter,d=c-l.length;if(c<e)break;d<=e&&(d<e||l.covers(-1))&&(c>e||l.covers(1))&&(!n||l instanceof Ue&&!(n instanceof Ue&&t>=0))&&(n=l,o=d),s=d}return n?n.coordsAt(e-o,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),o=this.children[t];if(!(o instanceof Ue))return null;for(;o.children.length;){let{i:l,off:c}=o.childPos(n,1);for(;;l++){if(l==o.children.length)return null;if((o=o.children[l]).length)break}n=c}if(!(o instanceof Vr))return null;let s=mr(o.text,n);if(s==n)return null;let a=Jn(o.dom,n,s).getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l==a.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:o}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==exports.Direction.LTR;for(let d=0,u=0;u<this.children.length;u++){let h=this.children[u],f=d+h.length;if(f>o)break;if(d>=n){let p=h.dom.getBoundingClientRect();if(t.push(p.height),a){let m=h.dom.lastChild,g=m?mi(m):[];if(g.length){let y=g[g.length-1],v=c?y.right-p.left:p.right-y.left;v>l&&(l=v,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=f)}}}d=f+h.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ue){let a=s.measureTextSize();if(a)return a}let e=document.createElement("div"),t,n,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=mi(e.firstChild)[0];t=e.getBoundingClientRect().height,n=s?s.width/27:7,o=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:o}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new q0(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,o=0;;o++){let s=o==t.viewports.length?null:t.viewports[o],a=s?s.from-1:this.length;if(a>n){let l=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Be.replace({widget:new Dp(l),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!s)break;n=s.to+1}return Be.set(e)}updateDeco(){let e=this.view.state.facet(yi).map((o,s)=>(this.dynamicDecorationMap[s]=typeof o=="function")?o(this.view):o),t=!1,n=this.view.state.facet(dy).map((o,s)=>{let a=typeof o=="function";return a&&(t=!0),a?o(this.view):o});n.length&&(this.dynamicDecorationMap[e.length]=t,e.push(be.join(n)));for(let o=e.length;o<e.length+3;o++)this.dynamicDecorationMap[o]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),o;if(!n)return;!t.empty&&(o=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,o.left),top:Math.min(n.top,o.top),right:Math.max(n.right,o.right),bottom:Math.max(n.bottom,o.bottom)});let s=fy(this.view),a={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;xS(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==exports.Direction.LTR)}}function HS(r){return r.node.nodeType==1&&r.node.firstChild&&(r.offset==0||r.node.childNodes[r.offset-1].contentEditable=="false")&&(r.offset==r.node.childNodes.length||r.node.childNodes[r.offset].contentEditable=="false")}class Dp extends ns{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function py(r,e){let t=r.observer.selectionRange,n=t.focusNode&&my(t.focusNode,t.focusOffset,0);if(!n)return null;let o=e-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function KS(r,e,t){let n=py(r,t);if(!n)return null;let{node:o,from:s,to:a}=n,l=o.nodeValue;if(/[\n\r]/.test(l)||r.state.doc.sliceString(n.from,n.to)!=l)return null;let c=e.invertedDesc,d=new It(c.mapPos(s),c.mapPos(a),s,a),u=[];for(let h=o.parentNode;;h=h.parentNode){let f=Te.get(h);if(f instanceof Rr)u.push({node:h,deco:f.mark});else{if(f instanceof Ue||h.nodeName=="DIV"&&h.parentNode==r.contentDOM)return{range:d,text:o,marks:u,line:h};if(h!=r.contentDOM)u.push({node:h,deco:new Ti({inclusive:!0,attributes:TS(h),tagName:h.tagName.toLowerCase()})});else return null}}}function my(r,e,t){if(t<=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o>0)n=n.childNodes[o-1],o=Dr(n);else break}if(t>=0)for(let n=r,o=e;;){if(n.nodeType==3)return{node:n,offset:o};if(n.nodeType==1&&o<n.childNodes.length&&t>=0)n=n.childNodes[o],o=0;else break}return null}function US(r,e){return r.nodeType!=1?0:(e&&r.childNodes[e-1].contentEditable=="false"?1:0)|(e<r.childNodes.length&&r.childNodes[e].contentEditable=="false"?2:0)}let WS=class{constructor(){this.changes=[]}compareRange(e,t){Ud(e,t,this.changes)}comparePoint(e,t){Ud(e,t,this.changes)}};function GS(r,e,t){let n=new WS;return be.compare(r,e,t,n),n.changes}function JS(r,e){for(let t=r;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function YS(r,e){let t=!1;return e&&r.iterChangedRanges((n,o)=>{n<e.to&&o>e.from&&(t=!0)}),t}function XS(r,e,t=1){let n=r.charCategorizer(e),o=r.doc.lineAt(e),s=e-o.from;if(o.length==0)return Y.cursor(e);s==0?t=1:s==o.length&&(t=-1);let a=s,l=s;t<0?a=mr(o.text,s,!1):l=mr(o.text,s);let c=n(o.text.slice(a,l));for(;a>0;){let d=mr(o.text,a,!1);if(n(o.text.slice(d,a))!=c)break;a=d}for(;l<o.length;){let d=mr(o.text,l);if(n(o.text.slice(l,d))!=c)break;l=d}return Y.range(a+o.from,l+o.from)}function QS(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}function ZS(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function jc(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}function Vp(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}function Rp(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function Xd(r,e,t){let n,o,s,a,l=!1,c,d,u,h;for(let m=r.firstChild;m;m=m.nextSibling){let g=mi(m);for(let y=0;y<g.length;y++){let v=g[y];o&&jc(o,v)&&(v=Vp(Rp(v,o.bottom),o.top));let b=QS(e,v),w=ZS(t,v);if(b==0&&w==0)return m.nodeType==3?Lp(m,e,t):Xd(m,e,t);if(!n||a>w||a==w&&s>b){n=m,o=v,s=b,a=w;let S=w?t<v.top?-1:1:b?e<v.left?-1:1:0;l=!S||(S>0?y<g.length-1:y>0)}b==0?t>v.bottom&&(!u||u.bottom<v.bottom)?(c=m,u=v):t<v.top&&(!h||h.top>v.top)&&(d=m,h=v):u&&jc(u,v)?u=Rp(u,v.bottom):h&&jc(h,v)&&(h=Vp(h,v.top))}}if(u&&u.bottom>=t?(n=c,o=u):h&&h.top<=t&&(n=d,o=h),!n)return{node:r,offset:0};let f=Math.max(o.left,Math.min(o.right,e));if(n.nodeType==3)return Lp(n,f,t);if(l&&n.contentEditable!="false")return Xd(n,f,t);let p=Array.prototype.indexOf.call(r.childNodes,n)+(e>=(o.left+o.right)/2?1:0);return{node:r,offset:p}}function Lp(r,e,t){let n=r.nodeValue.length,o=-1,s=1e9,a=0;for(let l=0;l<n;l++){let c=Jn(r,l,l+1).getClientRects();for(let d=0;d<c.length;d++){let u=c[d];if(u.top==u.bottom)continue;a||(a=e-u.left);let h=(u.top>t?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&h<s){let f=e>=(u.left+u.right)/2,p=f;if((G.chrome||G.gecko)&&Jn(r,l).getBoundingClientRect().left==u.right&&(p=!f),h<=0)return{node:r,offset:l+(p?1:0)};o=l+(p?1:0),s=h}}}return{node:r,offset:o>-1?o:a>0?r.nodeValue.length:0}}function gy(r,e,t,n=-1){var o,s;let a=r.contentDOM.getBoundingClientRect(),l=a.top+r.viewState.paddingTop,c,{docHeight:d}=r.viewState,{x:u,y:h}=e,f=h-l;if(f<0)return 0;if(f>d)return r.state.doc.length;for(let S=r.viewState.heightOracle.textHeight/2,x=!1;c=r.elementAtHeight(f),c.type!=Xt.Text;)for(;f=n>0?c.bottom+S:c.top-S,!(f>=0&&f<=d);){if(x)return t?null:0;x=!0,n=-n}h=l+f;let p=c.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:jp(r,a,c,u,h);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:jp(r,a,c,u,h);let m=r.dom.ownerDocument,g=r.root.elementFromPoint?r.root:m,y=g.elementFromPoint(u,h);y&&!r.contentDOM.contains(y)&&(y=null),y||(u=Math.max(a.left+1,Math.min(a.right-1,u)),y=g.elementFromPoint(u,h),y&&!r.contentDOM.contains(y)&&(y=null));let v,b=-1;if(y&&((o=r.docView.nearest(y))===null||o===void 0?void 0:o.isEditable)!=!1){if(m.caretPositionFromPoint){let S=m.caretPositionFromPoint(u,h);S&&({offsetNode:v,offset:b}=S)}else if(m.caretRangeFromPoint){let S=m.caretRangeFromPoint(u,h);S&&({startContainer:v,startOffset:b}=S,(!r.contentDOM.contains(v)||G.safari&&ex(v,b,u)||G.chrome&&tx(v,b,u))&&(v=void 0))}}if(!v||!r.docView.dom.contains(v)){let S=Ue.find(r.docView,p);if(!S)return f>c.top+c.height/2?c.to:c.from;({node:v,offset:b}=Xd(S.dom,u,h))}let w=r.docView.nearest(v);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let S=w.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?w.posAtStart:w.posAtEnd}else return w.localPosFromDOM(v,b)+w.posAtStart}function jp(r,e,t,n,o){let s=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let l=r.viewState.heightOracle.textHeight,c=Math.floor((o-t.top-(r.defaultLineHeight-l)*.5)/l);s+=c*r.viewState.heightOracle.lineLength}let a=r.state.sliceDoc(t.from,t.to);return t.from+gS(a,s,r.state.tabSize)}function ex(r,e,t){let n;if(r.nodeType!=3||e!=(n=r.nodeValue.length))return!1;for(let o=r.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return Jn(r,n-1,n).getBoundingClientRect().left>t}function tx(r,e,t){if(e!=0)return!1;for(let o=r;;){let s=o.parentNode;if(!s||s.nodeType!=1||s.firstChild!=o)return!1;if(s.classList.contains("cm-line"))break;o=s}let n=r.nodeType==1?r.getBoundingClientRect():Jn(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function rx(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==Xt.Text))return n}return t}function nx(r,e,t,n){let o=rx(r,e.head),s=!n||o.type!=Xt.Text||!(r.lineWrapping||o.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(s){let a=r.dom.getBoundingClientRect(),l=r.textDirectionAt(o.from),c=r.posAtCoords({x:t==(l==exports.Direction.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Y.cursor(c,t?-1:1)}return Y.cursor(t?o.to:o.from,t?-1:1)}function Fp(r,e,t,n){let o=r.state.doc.lineAt(e.head),s=r.bidiSpans(o),a=r.textDirectionAt(o.from);for(let l=e,c=null;;){let d=jS(o,s,a,l,t),u=ty;if(!d){if(o.number==(t?r.state.doc.lines:1))return l;u=`
|
|
60
60
|
`,o=r.state.doc.line(o.number+(t?1:-1)),s=r.bidiSpans(o),d=r.visualLineSide(o,!t)}if(c){if(!c(u))return l}else{if(!n)return d;c=n(u)}l=d}}function ox(r,e,t){let n=r.state.charCategorizer(e),o=n(t);return s=>{let a=n(s);return o==exports.CharCategory.Space&&(o=a),o==a}}function sx(r,e,t,n){let o=e.head,s=t?1:-1;if(o==(t?r.state.doc.length:0))return Y.cursor(o,e.assoc);let a=e.goalColumn,l,c=r.contentDOM.getBoundingClientRect(),d=r.coordsAtPos(o,e.assoc||-1),u=r.documentTop;if(d)a==null&&(a=d.left-c.left),l=s<0?d.top:d.bottom;else{let p=r.viewState.lineBlockAt(o);a==null&&(a=Math.min(c.right-c.left,r.defaultCharacterWidth*(o-p.from))),l=(s<0?p.top:p.bottom)+u}let h=c.left+a,f=n??r.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=l+(f+p)*s,g=gy(r,{x:h,y:m},!1,s);if(m<c.top||m>c.bottom||(s<0?g<o:g>o)){let y=r.docView.coordsForChar(g),v=!y||m<y.top?-1:1;return Y.cursor(g,v,void 0,a)}}}function ja(r,e,t){for(;;){let n=0;for(let o of r)o.between(e-1,e+1,(s,a,l)=>{if(e>s&&e<a){let c=n||t||(e-s<a-e?-1:1);e=c<0?s:a,n=c}});if(!n)return e}}function Fc(r,e,t){let n=ja(r.state.facet(dh).map(o=>o(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:Y.cursor(n,n<t.from?1:-1)}class ix{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,G.safari&&e.contentDOM.addEventListener("input",()=>null),G.gecko&&Sx(e.contentDOM.ownerDocument)}handleEvent(e){!px(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let o of n.observers)o(this.view,t);for(let o of n.handlers){if(t.defaultPrevented)break;if(o(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ax(e),n=this.handlers,o=this.view.contentDOM;for(let s in t)if(s!="scroll"){let a=!t[s].handlers.length,l=n[s];l&&a!=!l.handlers.length&&(o.removeEventListener(s,this.handleEvent),l=null),l||o.addEventListener(s,this.handleEvent,{passive:a})}for(let s in n)s!="scroll"&&!t[s]&&o.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&vy.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),G.android&&G.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return G.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=yy.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||lx.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Do(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:G.safari&&!G.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function qp(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(o){Br(t.state,o)}}}function ax(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let o=n.spec;if(o&&o.domEventHandlers)for(let s in o.domEventHandlers){let a=o.domEventHandlers[s];a&&t(s).handlers.push(qp(n.value,a))}if(o&&o.domEventObservers)for(let s in o.domEventObservers){let a=o.domEventObservers[s];a&&t(s).observers.push(qp(n.value,a))}}for(let n in Qt)t(n).handlers.push(Qt[n]);for(let n in Zt)t(n).observers.push(Zt[n]);return e}const yy=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],lx="dthko",vy=[16,17,18,20,91,92,224,225],ca=6;function da(r){return Math.max(0,r)*.7+8}function cx(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}class dx{constructor(e,t,n,o){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=CS(e.contentDOM),this.atoms=e.state.facet(dh).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ve.allowMultipleSelections)&&ux(e,t),this.dragging=fx(e,t)&&Sy(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&cx(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,o=0,s=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=fy(this.view);e.clientX-a.left<=s.left+ca?n=-da(s.left-e.clientX):e.clientX+a.right>=s.right-ca&&(n=da(e.clientX-s.right)),e.clientY-a.top<=s.top+ca?o=-da(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-ca&&(o=da(e.clientY-s.bottom)),this.setScrollSpeed(n,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let o=e.ranges[n],s=null;if(o.empty){let a=ja(this.atoms,o.from,0);a!=o.from&&(s=Y.cursor(a,-1))}else{let a=ja(this.atoms,o.from,-1),l=ja(this.atoms,o.to,1);(a!=o.from||l!=o.to)&&(s=Y.range(o.from==o.anchor?a:l,o.from==o.head?a:l))}s&&(t||(t=e.ranges.slice()),t[n]=s)}return t?Y.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function ux(r,e){let t=r.state.facet(ry);return t.length?t[0](e):G.mac?e.metaKey:e.ctrlKey}function hx(r,e){let t=r.state.facet(ny);return t.length?t[0](e):G.mac?!e.altKey:!e.ctrlKey}function fx(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let n=ll(r.root);if(!n||n.rangeCount==0)return!0;let o=n.getRangeAt(0).getClientRects();for(let s=0;s<o.length;s++){let a=o[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function px(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Te.get(t))&&n.ignoreEvent(e))return!1;return!0}const Qt=Object.create(null),Zt=Object.create(null),by=G.ie&&G.ie_version<15||G.ios&&G.webkit_version<604;function mx(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),wy(r,t.value)},50)}function wy(r,e){let{state:t}=r,n,o=1,s=t.toText(e),a=s.lines==t.selection.ranges.length;if(Qd!=null&&t.selection.ranges.every(c=>c.empty)&&Qd==s.toString()){let c=-1;n=t.changeByRange(d=>{let u=t.doc.lineAt(d.from);if(u.from==c)return{range:d};c=u.from;let h=t.toText((a?s.line(o++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:h},range:Y.cursor(d.from+h.length)}})}else a?n=t.changeByRange(c=>{let d=s.line(o++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Y.cursor(c.from+d.length)}}):n=t.replaceSelection(s);r.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Zt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};Qt.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&(r.inputState.lastEscPress=Date.now()),!1);Zt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};Zt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};Qt.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(oy))if(t=n(r,e),t)break;if(!t&&e.button==0&&(t=vx(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new dx(r,e,t,n)),n&&r.observer.ignore(()=>L0(r.contentDOM));let o=r.inputState.mouseSelection;if(o)return o.start(e),o.dragging===!1}return!1};function zp(r,e,t,n){if(n==1)return Y.cursor(e,t);if(n==2)return XS(r.state,e,t);{let o=Ue.find(r.docView,e),s=r.state.doc.lineAt(o?o.posAtEnd:e),a=o?o.posAtStart:s.from,l=o?o.posAtEnd:s.to;return l<r.state.doc.length&&l==s.to&&l++,Y.range(a,l)}}let ky=(r,e)=>r>=e.top&&r<=e.bottom,Hp=(r,e,t)=>ky(e,t)&&r>=t.left&&r<=t.right;function gx(r,e,t,n){let o=Ue.find(r.docView,e);if(!o)return 1;let s=e-o.posAtStart;if(s==0)return 1;if(s==o.length)return-1;let a=o.coordsAt(s,-1);if(a&&Hp(t,n,a))return-1;let l=o.coordsAt(s,1);return l&&Hp(t,n,l)?1:a&&ky(n,a)?-1:1}function Kp(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:gx(r,t,e.clientX,e.clientY)}}const yx=G.ie&&G.ie_version<=11;let Up=null,Wp=0,Gp=0;function Sy(r){if(!yx)return r.detail;let e=Up,t=Gp;return Up=r,Gp=Date.now(),Wp=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(Wp+1)%3:1}function vx(r,e){let t=Kp(r,e),n=Sy(e),o=r.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),o=o.map(s.changes))},get(s,a,l){let c=Kp(r,s),d,u=zp(r,c.pos,c.bias,n);if(t.pos!=c.pos&&!a){let h=zp(r,t.pos,t.bias,n),f=Math.min(h.from,u.from),p=Math.max(h.to,u.to);u=f<u.from?Y.range(f,p):Y.range(p,f)}return a?o.replaceRange(o.main.extend(u.from,u.to)):l&&n==1&&o.ranges.length>1&&(d=bx(o,c.pos))?d:l?o.addRange(u):Y.create([u])}}}function bx(r,e){for(let t=0;t<r.ranges.length;t++){let{from:n,to:o}=r.ranges[t];if(n<=e&&o>=e)return Y.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}Qt.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let o=r.docView.nearest(e.target);if(o&&o.isWidget){let s=o.posAtStart,a=s+o.length;(s>=t.to||a<=t.from)&&(t=Y.range(s,a))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",r.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1};Qt.dragend=r=>(r.inputState.draggedContent=null,!1);function Jp(r,e,t,n){if(!t)return;let o=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,a=n&&s&&hx(r,e)?{from:s.from,to:s.to}:null,l={from:o,insert:t},c=r.state.changes(a?[a,l]:l);r.focus(),r.dispatch({changes:c,selection:{anchor:c.mapPos(o,-1),head:c.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),r.inputState.draggedContent=null}Qt.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),o=0,s=()=>{++o==t.length&&Jp(r,e,n.filter(a=>a!=null).join(r.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(n[a]=l.result),s()},l.readAsText(t[a])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return Jp(r,e,n,!0),!0}return!1};Qt.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=by?null:e.clipboardData;return t?(wy(r,t.getData("text/plain")||t.getData("text/uri-text")),!0):(mx(r),!1)};function wx(r,e){let t=r.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),r.focus()},50)}function kx(r){let e=[],t=[],n=!1;for(let o of r.selection.ranges)o.empty||(e.push(r.sliceDoc(o.from,o.to)),t.push(o));if(!e.length){let o=-1;for(let{from:s}of r.selection.ranges){let a=r.doc.lineAt(s);a.number>o&&(e.push(a.text),t.push({from:a.from,to:Math.min(r.doc.length,a.to+1)})),o=a.number}n=!0}return{text:e.join(r.lineBreak),ranges:t,linewise:n}}let Qd=null;Qt.copy=Qt.cut=(r,e)=>{let{text:t,ranges:n,linewise:o}=kx(r.state);if(!t&&!o)return!1;Qd=o?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=by?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(wx(r,t),!1)};const xy=oo.define();function Cy(r,e){let t=[];for(let n of r.facet(ay)){let o=n(r,e);o&&t.push(o)}return t?r.update({effects:t,annotations:xy.of(!0)}):null}function Ey(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=Cy(r.state,e);t?r.dispatch(t):r.update([])}},10)}Zt.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),Ey(r)};Zt.blur=r=>{r.observer.clearSelectionRange(),Ey(r)};Zt.compositionstart=Zt.compositionupdate=r=>{r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0)};Zt.compositionend=r=>{r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,G.chrome&&G.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50)};Zt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};Qt.beforeinput=(r,e)=>{var t;let n;if(G.chrome&&G.android&&(n=yy.find(o=>o.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let o=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return!1};const Yp=new Set;function Sx(r){Yp.has(r)||(Yp.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}const Xp=["pre-wrap","normal","pre-line","break-spaces"];class xx{constructor(e){this.lineWrapping=e,this.doc=we.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Xp.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let o=e[n];o<0?n++:this.heightSamples[Math.floor(o*10)]||(t=!0,this.heightSamples[Math.floor(o*10)]=!0)}return t}refresh(e,t,n,o,s,a){let l=Xp.indexOf(e)>-1,c=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=n,this.textHeight=o,this.lineLength=s,c){this.heightSamples={};for(let d=0;d<a.length;d++){let u=a[d];u<0?d++:this.heightSamples[Math.floor(u*10)]=!0}}return c}}class Cx{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class fr{constructor(e,t,n,o,s){this.from=e,this.length=t,this.top=n,this.height=o,this._content=s}get type(){return typeof this._content=="number"?Xt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof fn?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new fr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ae=function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r}(Ae||(Ae={}));const Fa=.001;class ft{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Fa&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return ft.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,o){let s=this,a=n.doc;for(let l=o.length-1;l>=0;l--){let{fromA:c,toA:d,fromB:u,toB:h}=o[l],f=s.lineAt(c,Ae.ByPosNoHeight,n.setDoc(t),0,0),p=f.to>=d?f:s.lineAt(d,Ae.ByPosNoHeight,n,0,0);for(h+=p.to-d,d=p.to;l>0&&f.from<=o[l-1].toA;)c=o[l-1].fromA,u=o[l-1].fromB,l--,c<f.from&&(f=s.lineAt(c,Ae.ByPosNoHeight,n,0,0));u+=f.from-c,c=f.from;let m=uh.build(n.setDoc(a),e,u,h);s=s.replace(c,d,m)}return s.updateHeight(n,0)}static empty(){return new kt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,o=0,s=0;for(;;)if(t==n)if(o>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),n+=1+l.break,o-=l.size}else if(s>o*2){let l=e[n];l.break?e.splice(n,1,l.left,null,l.right):e.splice(n,1,l.left,l.right),n+=2+l.break,s-=l.size}else break;else if(o<s){let l=e[t++];l&&(o+=l.size)}else{let l=e[--n];l&&(s+=l.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,n++),new Ex(ft.of(e.slice(0,t)),a,ft.of(e.slice(n)))}}ft.prototype.size=1;class $y extends ft{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,o){return new fr(o,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,o,s){return this.blockAt(0,n,o,s)}forEachLine(e,t,n,o,s,a){e<=s+this.length&&t>=s&&a(this.blockAt(0,n,o,s))}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class kt extends $y{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,o){return new fr(o,this.length,n,this.height,this.breaks)}replace(e,t,n){let o=n[0];return n.length==1&&(o instanceof kt||o instanceof Ze&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof Ze?o=new kt(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):ft.of(n)}updateHeight(e,t=0,n=!1,o){return o&&o.from<=t&&o.more?this.setHeight(e,o.heights[o.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ze extends ft{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,s=o-n+1,a,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);a=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else a=this.height/s;return{firstLine:n,lastLine:o,perLine:a,perChar:l}}blockAt(e,t,n,o){let{firstLine:s,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(t,o);if(t.lineWrapping){let d=o+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),u=t.doc.lineAt(d),h=l+u.length*c,f=Math.max(n,e-h/2);return new fr(u.from,u.length,f,h,0)}else{let d=Math.max(0,Math.min(a-s,Math.floor((e-n)/l))),{from:u,length:h}=t.doc.line(s+d);return new fr(u,h,n+l*d,l,0)}}lineAt(e,t,n,o,s){if(t==Ae.ByHeight)return this.blockAt(e,n,o,s);if(t==Ae.ByPosNoHeight){let{from:p,to:m}=n.doc.lineAt(e);return new fr(p,m-p,0,0,0)}let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(n,s),d=n.doc.lineAt(e),u=l+d.length*c,h=d.number-a,f=o+l*h+c*(d.from-s-h);return new fr(d.from,d.length,Math.max(o,Math.min(f,o+this.height-u)),u,0)}forEachLine(e,t,n,o,s,a){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:c,perChar:d}=this.heightMetrics(n,s);for(let u=e,h=o;u<=t;){let f=n.doc.lineAt(u);if(u==e){let m=f.number-l;h+=c*m+d*(e-s-m)}let p=c+d*f.length;a(new fr(f.from,f.length,h,p,0)),h+=p,u=f.to+1}}replace(e,t,n){let o=this.length-t;if(o>0){let s=n[n.length-1];s instanceof Ze?n[n.length-1]=new Ze(s.length+o):n.push(null,new Ze(o-1))}if(e>0){let s=n[0];s instanceof Ze?n[0]=new Ze(e+s.length):n.unshift(new Ze(e-1),null)}return ft.of(n)}decomposeLeft(e,t){t.push(new Ze(e-1),null)}decomposeRight(e,t){t.push(null,new Ze(this.length-e-1))}updateHeight(e,t=0,n=!1,o){let s=t+this.length;if(o&&o.from<=t+this.length&&o.more){let a=[],l=Math.max(t,o.from),c=-1;for(o.from>t&&a.push(new Ze(o.from-t-1).updateHeight(e,t));l<=s&&o.more;){let u=e.doc.lineAt(l).length;a.length&&a.push(null);let h=o.heights[o.index++];c==-1?c=h:Math.abs(h-c)>=Fa&&(c=-2);let f=new kt(u,h);f.outdated=!1,a.push(f),l+=u+1}l<=s&&a.push(null,new Ze(s-l).updateHeight(e,l));let d=ft.of(a);return(c<0||Math.abs(d.height-this.height)>=Fa||Math.abs(c-this.heightMetrics(e,t).perLine)>=Fa)&&(e.heightChanged=!0),d}else(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Ex extends ft{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,o){let s=n+this.left.height;return e<s?this.left.blockAt(e,t,n,o):this.right.blockAt(e,t,s,o+this.left.length+this.break)}lineAt(e,t,n,o,s){let a=o+this.left.height,l=s+this.left.length+this.break,c=t==Ae.ByHeight?e<a:e<l,d=c?this.left.lineAt(e,t,n,o,s):this.right.lineAt(e,t,n,a,l);if(this.break||(c?d.to<l:d.from>l))return d;let u=t==Ae.ByPosNoHeight?Ae.ByPosNoHeight:Ae.ByPos;return c?d.join(this.right.lineAt(l,u,n,a,l)):this.left.lineAt(l,u,n,o,s).join(d)}forEachLine(e,t,n,o,s,a){let l=o+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,n,o,s,a),t>=c&&this.right.forEachLine(e,t,n,l,c,a);else{let d=this.lineAt(c,Ae.ByPos,n,o,s);e<d.from&&this.left.forEachLine(e,d.from-1,n,o,s,a),d.to>=e&&d.from<=t&&a(d),t>d.to&&this.right.forEachLine(d.to+1,t,n,l,c,a)}}replace(e,t,n){let o=this.left.length+this.break;if(t<o)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-o,t-o,n));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let l of n)s.push(l);if(e>0&&Qp(s,a-1),t<this.length){let l=s.length;this.decomposeRight(t,s),Qp(s,l)}return ft.of(s)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,o=n+this.break;if(e>=o)return this.right.decomposeRight(e-o,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<o&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ft.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,o){let{left:s,right:a}=this,l=t+s.length+this.break,c=null;return o&&o.from<=t+s.length&&o.more?c=s=s.updateHeight(e,t,n,o):s.updateHeight(e,t,n),o&&o.from<=l+a.length&&o.more?c=a=a.updateHeight(e,l,n,o):a.updateHeight(e,l,n),c?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Qp(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof Ze&&(n=r[e+1])instanceof Ze&&r.splice(e-1,3,new Ze(t.length+1+n.length))}const $x=5;class uh{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof kt?o.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new kt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let o=n.widget?n.widget.estimatedHeight:0,s=n.widget?n.widget.lineBreaks:0;o<0&&(o=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new $y(a,o,n)):(a||s||o>=$x)&&this.addLineDeco(o,s,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new kt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ze(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof kt)return e;let t=new kt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof kt)&&!this.isCovered?this.nodes.push(new kt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let o of this.nodes)o instanceof kt&&o.updateHeight(this.oracle,n),n+=o?o.length:1;return this.nodes}static build(e,t,n,o){let s=new uh(n,e);return be.spans(t,n,o,s,0),s.finish(n)}}function _x(r,e,t){let n=new Nx;return be.compare(r,e,t,n,0),n.changes}class Nx{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,o){(e<t||n&&n.heightRelevant||o&&o.heightRelevant)&&Ud(e,t,this.changes,5)}}function Ax(r,e){let t=r.getBoundingClientRect(),n=r.ownerDocument,o=n.defaultView||window,s=Math.max(0,t.left),a=Math.min(o.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(o.innerHeight,t.bottom);for(let d=r.parentNode;d&&d!=n.body;)if(d.nodeType==1){let u=d,h=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),a=Math.min(a,f.right),l=Math.max(l,f.top),c=d==r.parentNode?f.bottom:Math.min(c,f.bottom)}d=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:s-t.left,right:Math.max(s,a)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function Ox(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class qc{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let o=e[n],s=t[n];if(o.from!=s.from||o.to!=s.to||o.size!=s.size)return!1}return!0}draw(e,t){return Be.replace({widget:new Tx(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Tx extends ns{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Zp{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=em,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=exports.Direction.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(ch).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new xx(t),this.stateDeco=e.facet(yi).filter(n=>typeof n!="function"),this.heightMap=ft.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle.setDoc(e.doc),[new It(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Be.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let o=n?t.head:t.anchor;if(!e.some(({from:s,to:a})=>o>=s&&o<=a)){let{from:s,to:a}=this.lineBlockAt(o);e.push(new ua(s,a))}}this.viewports=e.sort((n,o)=>n.from-o.from),this.scaler=this.heightMap.height<=7e6?em:new Ix(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Ks(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(yi).filter(u=>typeof u!="function");let o=e.changedRanges,s=It.extendWithRanges(o,_x(n,this.stateDeco,e?e.changes:Ye.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=a&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let d=!e.changes.empty||e.flags&2||c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,this.updateForViewport(),d&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(qS)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),o=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?exports.Direction.RTL:exports.Direction.LTR;let a=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let d=0,u=0;if(l.width&&l.height){let{scaleX:S,scaleY:x}=R0(t,l);(this.scaleX!=S||this.scaleY!=x)&&(this.scaleX=S,this.scaleY=x,d|=8,a=c=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,f=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,d|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,d|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=F0(e.scrollDOM);let m=(this.printing?Ox:Ax)(t,this.paddingTop),g=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(c=!0)),!this.inView&&!this.scrollTarget)return 0;let b=l.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,d|=8),c){let S=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(S)&&(a=!0),a||o.lineWrapping&&Math.abs(b-this.contentDOMWidth)>o.charWidth){let{lineHeight:x,charWidth:k,textHeight:C}=e.docView.measureTextSize();a=x>0&&o.refresh(s,x,k,C,b/k,S),a&&(e.docView.minWidth=0,d|=8)}g>0&&y>0?u=Math.max(g,y):g<0&&y<0&&(u=Math.min(g,y)),o.heightChanged=!1;for(let x of this.viewports){let k=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?ft.empty().applyChanges(this.stateDeco,we.empty,this.heightOracle,[new It(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,a,new Cx(x.from,k))}o.heightChanged&&(d|=2)}let w=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(d&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new ua(o.lineAt(a-n*1e3,Ae.ByHeight,s,0,0).from,o.lineAt(l+(1-n)*1e3,Ae.ByHeight,s,0,0).to);if(t){let{head:d}=t.range;if(d<c.from||d>c.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=o.lineAt(d,Ae.ByPos,s,0,0),f;t.y=="center"?f=(h.top+h.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&d<c.from?f=h.top:f=h.bottom-u,c=new ua(o.lineAt(f-1e3/2,Ae.ByHeight,s,0,0).from,o.lineAt(f+u+1e3/2,Ae.ByHeight,s,0,0).to)}}return c}mapViewport(e,t){let n=t.mapPos(e.from,-1),o=t.mapPos(e.to,1);return new ua(this.heightMap.lineAt(n,Ae.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(o,Ae.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:o}=this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Ae.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:l}=this;return(e==0||o<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(n,250)))&&o>a-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let o of e)t.touchesRange(o.from,o.to)||n.push(new qc(t.mapPos(o.from),t.mapPos(o.to),o.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,o=n?1e4:2e3,s=o>>1,a=o<<1;if(this.defaultTextDirection!=exports.Direction.LTR&&!n)return[];let l=[],c=(d,u,h,f)=>{if(u-d<s)return;let p=this.state.selection.main,m=[p.from];p.empty||m.push(p.to);for(let y of m)if(y>d&&y<u){c(d,y-10,h,f),c(y+10,u,h,f);return}let g=Px(e,y=>y.from>=h.from&&y.to<=h.to&&Math.abs(y.from-d)<s&&Math.abs(y.to-u)<s&&!m.some(v=>y.from<v&&y.to>v));if(!g){if(u<h.to&&t&&n&&t.visibleRanges.some(y=>y.from<=u&&y.to>=u)){let y=t.moveToLineBoundary(Y.cursor(u),!1,!0).head;y>d&&(u=y)}g=new qc(d,u,this.gapSize(h,d,u,f))}l.push(g)};for(let d of this.viewportLines){if(d.length<a)continue;let u=Bx(d.from,d.to,this.stateDeco);if(u.total<a)continue;let h=this.scrollTarget?this.scrollTarget.range.head:null,f,p;if(n){let m=o/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,y;if(h!=null){let v=fa(u,h),b=((this.visibleBottom-this.visibleTop)/2+m)/d.height;g=v-b,y=v+b}else g=(this.visibleTop-d.top-m)/d.height,y=(this.visibleBottom-d.top+m)/d.height;f=ha(u,g),p=ha(u,y)}else{let m=u.total*this.heightOracle.charWidth,g=o*this.heightOracle.charWidth,y,v;if(h!=null){let b=fa(u,h),w=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/m;y=b-w,v=b+w}else y=(this.pixelViewport.left-g)/m,v=(this.pixelViewport.right+g)/m;f=ha(u,y),p=ha(u,v)}f>d.from&&c(d.from,f,d,u),p<d.to&&c(p,d.to,d,u)}return l}gapSize(e,t,n,o){let s=fa(o,n)-fa(o,t);return this.heightOracle.lineWrapping?e.height*s:o.total*this.heightOracle.charWidth*s}updateLineGaps(e){qc.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Be.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];be.spans(e,this.viewport.from,this.viewport.to,{span(o,s){t.push({from:o,to:s})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((o,s)=>o.from!=t[s].from||o.to!=t[s].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ks(this.heightMap.lineAt(e,Ae.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Ks(this.heightMap.lineAt(this.scaler.fromDOM(e),Ae.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ks(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ua{constructor(e,t){this.from=e,this.to=t}}function Bx(r,e,t){let n=[],o=r,s=0;return be.spans(t,r,e,{span(){},point(a,l){a>o&&(n.push({from:o,to:a}),s+=a-o),o=l}},20),o<e&&(n.push({from:o,to:e}),s+=e-o),{total:s,ranges:n}}function ha({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let o=0;;o++){let{from:s,to:a}=e[o],l=a-s;if(n<=l)return s+n;n-=l}}function fa(r,e){let t=0;for(let{from:n,to:o}of r.ranges){if(e<=o){t+=e-n;break}t+=o-n}return t/r.total}function Px(r,e){for(let t of r)if(e(t))return t}const em={toDOM(r){return r},fromDOM(r){return r},scale:1};class Ix{constructor(e,t,n){let o=0,s=0,a=0;this.viewports=n.map(({from:l,to:c})=>{let d=t.lineAt(l,Ae.ByPos,e,0,0).top,u=t.lineAt(c,Ae.ByPos,e,0,0).bottom;return o+=u-d,{from:l,to:c,top:d,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(t.height-o);for(let l of this.viewports)l.domTop=a+(l.top-s)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return o+(e-n)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);n=s.bottom,o=s.domBottom}}fromDOM(e){for(let t=0,n=0,o=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return n+(e-o)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);n=s.bottom,o=s.domBottom}}}function Ks(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new fr(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(o=>Ks(o,e)):r._content)}const pa=Z.define({combine:r=>r.join(" ")}),Zd=Z.define({combine:r=>r.indexOf(!0)>-1}),eu=un.newName(),_y=un.newName(),Ny=un.newName(),Ay={"&light":"."+_y,"&dark":"."+Ny};function tu(r,e,t){return new un(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,o=>{if(o=="&")return r;if(!t||!t[o])throw new RangeError(`Unsupported selector: ${o}`);return t[o]}):r+" "+n}})}const Mx=tu("."+eu,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ay),Us="";class Dx{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Us}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let o=e;;){this.findPointBefore(n,o);let s=this.text.length;this.readNode(o);let a=o.nextSibling;if(a==t)break;let l=Te.get(o),c=Te.get(a);(l&&c?l.breakAfter:(l?l.breakAfter:tm(o))||tm(a)&&(o.nodeName!="BR"||o.cmIgnore)&&this.text.length>s)&&this.lineBreak(),o=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(l=o.exec(t))&&(s=l.index,a=l[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=a-1);n=s+a}}readNode(e){if(e.cmIgnore)return;let t=Te.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let o=n.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Vx(e,n.node,n.offset)?t:0))}}function Vx(r,e,t){for(;;){if(!e||t<Dr(e))return!1;if(e==r)return!0;t=gi(e)+1,e=e.parentNode}}function tm(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}class rm{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Rx{constructor(e,t,n,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let l=s||a?[]:Fx(e),c=new Dx(l,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=qx(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!jd(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),d=a&&a.node==l.anchorNode&&a.offset==l.anchorOffset||!jd(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((G.ios||G.chrome)&&e.state.selection.main.empty&&c!=d&&(u.from>0||u.to<e.state.doc.length)){let h=Math.min(c,d),f=Math.max(c,d),p=u.from-h,m=u.to-f;(p==0||p==1||h==0)&&(m==0||m==-1||f==e.state.doc.length)&&(c=0,d=e.state.doc.length)}this.newSel=Y.single(d,c)}}}function Oy(r,e){let t,{newSel:n}=e,o=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:l}=e.bounds,c=o.from,d=null;(s===8||G.android&&e.text.length<l-a)&&(c=o.to,d="end");let u=jx(r.state.doc.sliceString(a,l,Us),e.text,c-a,d);u&&(G.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Us+Us&&u.toB--,t={from:a+u.from,to:a+u.toA,insert:we.of(e.text.slice(u.from,u.toB).split(Us))})}else n&&(!r.hasFocus&&r.state.facet(Kl)||n.main.eq(o))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!o.empty&&n&&n.main.empty?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,o.to)}:t&&t.from>=o.from&&t.to<=o.to&&(t.from!=o.from||t.to!=o.to)&&o.to-o.from-(t.to-t.from)<=4?t={from:o.from,to:o.to,insert:r.state.doc.slice(o.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,o.to))}:(G.mac||G.android)&&t&&t.from==t.to&&t.from==o.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}):G.chrome&&t&&t.from==t.to&&t.from==o.head&&t.insert.toString()==`
|
|
61
61
|
`&&r.lineWrapping&&(n&&(n=Y.single(n.main.anchor-1,n.main.head-1)),t={from:o.from,to:o.to,insert:we.of([" "])}),t){if(G.ios&&r.inputState.flushIOSKey()||G.android&&(t.from==o.from&&t.to==o.to&&t.insert.length==1&&t.insert.lines==2&&Do(r.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||s==8&&t.insert.length<t.to-t.from&&t.to>o.head)&&Do(r.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&Do(r.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let l,c=()=>l||(l=Lx(r,t,n));return r.state.facet(iy).some(d=>d(r,t.from,t.to,a,c))||r.dispatch(c()),!0}else if(n&&!n.main.eq(o)){let a=!1,l="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(a=!0),l=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:a,userEvent:l}),!0}else return!1}function Lx(r,e,t){let n,o=r.state,s=o.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let l=s.from<e.from?o.sliceDoc(s.from,e.from):"",c=s.to>e.to?o.sliceDoc(e.to,s.to):"";n=o.replaceSelection(r.state.toText(l+e.insert.sliceString(0,void 0,r.state.lineBreak)+c))}else{let l=o.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(o.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let d=r.state.sliceDoc(e.from,e.to),u,h=t&&py(r,t.main.head);if(h){let m=e.insert.length-(e.to-e.from);u={from:h.from,to:h.to-m}}else u=r.state.doc.lineAt(s.head);let f=s.to-e.to,p=s.to-s.from;n=o.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:c||m.map(l)};let g=m.to-f,y=g-d.length;if(m.to-m.from!=p||r.state.sliceDoc(y,g)!=d||m.to>=u.from&&m.from<=u.to)return{range:m};let v=o.changes({from:y,to:g,insert:e.insert}),b=m.to-s.to;return{changes:v,range:c?Y.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):m.map(v)}})}else n={changes:l,selection:c&&o.selection.replaceRange(c)}}let a="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,a+=".compose",r.inputState.compositionFirstChange&&(a+=".start",r.inputState.compositionFirstChange=!1)),o.update(n,{userEvent:a,scrollIntoView:!0})}function jx(r,e,t,n){let o=Math.min(r.length,e.length),s=0;for(;s<o&&r.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==o&&r.length==e.length)return null;let a=r.length,l=e.length;for(;a>0&&l>0&&r.charCodeAt(a-1)==e.charCodeAt(l-1);)a--,l--;if(n=="end"){let c=Math.max(0,s-Math.min(a,l));t-=a+c-s}if(a<s&&r.length<e.length){let c=t<=s&&t>=a?s-t:0;s-=c,l=s+(l-a),a=s}else if(l<s){let c=t<=s&&t>=l?s-t:0;s-=c,a=s+(a-l),l=s}return{from:s,toA:a,toB:l}}function Fx(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:o,focusOffset:s}=r.observer.selectionRange;return t&&(e.push(new rm(t,n)),(o!=t||s!=n)&&e.push(new rm(o,s))),e}function qx(r,e){if(r.length==0)return null;let t=r[0].pos,n=r.length==2?r[1].pos:t;return t>-1&&n>-1?Y.single(t+e,n+e):null}const zx={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zc=G.ie&&G.ie_version<=11;class Hx{constructor(e){this.view=e,this.active=!1,this.selectionRange=new ES,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(G.ie&&G.ie_version<=11||G.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),zc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,o=this.selectionRange;if(n.state.facet(Kl)?n.root.activeElement!=this.dom:!La(n.dom,o))return;let s=o.anchorNode&&n.docView.nearest(o.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(G.ie&&G.ie_version<=11||G.android&&G.chrome)&&!n.state.selection.main.empty&&o.focusNode&&ti(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=G.safari&&e.root.nodeType==11&&kS(this.dom.ownerDocument)==this.dom&&Kx(this.view)||ll(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=La(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&_S(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,zx),zc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),zc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let o=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Do(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,o=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(o=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:o}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),o=this.selectionChanged&&La(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Rx(this.view,e,t,n);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,o=Oy(this.view,t);return this.view.state==n&&this.view.update([]),o}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=nm(t,e.previousSibling||e.target.previousSibling,-1),o=nm(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:o?t.posBefore(o):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function nm(r,e,t){for(;e;){let n=Te.get(e);if(n&&n.parent==r)return n;let o=e.parentNode;e=o!=r.dom?o:t>0?e.nextSibling:e.previousSibling}return null}function Kx(r){let e=null;function t(c){c.preventDefault(),c.stopImmediatePropagation(),e=c.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",t,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let n=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset,l=r.docView.domAtPos(r.state.selection.main.anchor);return ti(l.node,l.offset,s,a)&&([n,o,s,a]=[s,a,n,o]),{anchorNode:n,anchorOffset:o,focusNode:s,focusOffset:a}}class ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(n=>n.forEach(o=>t(o,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||$S(e.parent)||document,this.viewState=new Zp(e.state||ve.create(e)),e.scrollTo&&e.scrollTo.is(la)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(zs).map(n=>new Lc(n));for(let n of this.plugins)n.update(this);this.observer=new Hx(this),this.inputState=new ix(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Mp(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof rt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,o,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,l=0,c=null;e.some(f=>f.annotation(xy))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=Cy(s,a),c||(l=1));let d=this.observer.delayedAndroidKey,u=null;if(d?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(ve.phrases)!=this.state.facet(ve.phrases))return this.setState(s);o=cl.create(this,s,e),o.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection;h=new Vo(p.empty?p:Y.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of f.effects)p.is(la)&&(h=p.value.clip(this.state))}this.viewState.update(o,h),this.bidiCache=dl.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),t=this.docView.update(o),this.state.facet(Hs)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(pa)!=o.state.facet(pa)&&(this.viewState.mustMeasureContent=!0),(t||n||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let f of this.state.facet(Yd))try{f(o)}catch(p){Br(this.state,p,"update listener")}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Oy(this,u)&&d.force&&Do(this.contentDOM,d.key,d.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new Zp(e),this.plugins=e.facet(zs).map(n=>new Lc(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new Mp(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(zs),n=e.state.facet(zs);if(t!=n){let o=[];for(let s of n){let a=t.indexOf(s);if(a<0)o.push(new Lc(s));else{let l=this.plugins[a];l.mustUpdate=e,o.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o<this.plugins.length;o++)this.plugins[o].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,o=n.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(F0(n))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(o);s=p.from,a=p.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let u=d.map(p=>{try{return p.read(this)}catch(m){return Br(this.state,m),om}}),h=cl.create(this,this.state,[]),f=!1;h.flags|=c,t?t.flags|=c:t=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let p=0;p<d.length;p++)if(u[p]!=om)try{let m=d[p];m.write&&m.write(u[p],this)}catch(m){Br(this.state,m)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let m=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a;if(m>1||m<-1){o=o+m,n.scrollTop=o/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Yd))l(t)}get themeClasses(){return eu+" "+(this.state.facet(Zd)?Ny:_y)+" "+this.state.facet(pa)}updateAttrs(){let e=sm(this,cy,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Kl)?"true":"false",class:"cm-content",style:`${G.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),sm(this,ch,t);let n=this.observer.ignore(()=>{let o=Kd(this.contentDOM,this.contentAttrs,t),s=Kd(this.dom,this.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let o of n.effects)if(o.is(ue.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Hs);let e=this.state.facet(ue.cspNonce);un.mount(this.root,this.styleModules.concat(Mx).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Fc(this,e,Fp(this,e,t,n))}moveByGroup(e,t){return Fc(this,e,Fp(this,e,t,n=>ox(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),o=this.textDirectionAt(e.from),s=n[t?n.length-1:0];return Y.cursor(s.side(t,o)+e.from,s.forward(!t,o)?1:-1)}moveToLineBoundary(e,t,n=!0){return nx(this,e,t,n)}moveVertically(e,t,n){return Fc(this,e,sx(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),gy(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let o=this.state.doc.lineAt(e),s=this.bidiSpans(o),a=s[sn.find(s,e-o.from,-1,t)];return sh(n,a.dir==exports.Direction.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(ly)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Ux)return ey(e.length);let t=this.textDirectionAt(e.from),n;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||Z0(s.isolates,n=Ip(this,e))))return s.order;n||(n=Ip(this,e));let o=LS(e.text,t,n);return this.bidiCache.push(new dl(e.from,e.to,t,n,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||G.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{L0(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return la.of(new Vo(typeof e=="number"?Y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return la.of(new Vo(Y.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Vt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Vt.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=un.newName(),o=[pa.of(n),Hs.of(tu(`.${n}`,e))];return t&&t.dark&&o.push(Zd.of(!0)),o}static baseTheme(e){return Fl.lowest(Hs.of(tu("."+eu,e,Ay)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),o=n&&Te.get(n)||Te.get(e);return((t=o==null?void 0:o.rootView)===null||t===void 0?void 0:t.view)||null}}ue.styleModule=Hs;ue.inputHandler=iy;ue.focusChangeEffect=ay;ue.perLineTextDirection=ly;ue.exceptionSink=sy;ue.updateListener=Yd;ue.editable=Kl;ue.mouseSelectionStyle=oy;ue.dragMovesSelection=ny;ue.clickAddsSelectionRange=ry;ue.decorations=yi;ue.outerDecorations=dy;ue.atomicRanges=dh;ue.bidiIsolatedRanges=uy;ue.scrollMargins=hy;ue.darkTheme=Zd;ue.cspNonce=Z.define({combine:r=>r.length?r[0]:""});ue.contentAttributes=ch;ue.editorAttributes=cy;ue.lineWrapping=ue.contentAttributes.of({class:"cm-lineWrapping"});ue.announce=We.define();const Ux=4096,om={};class dl{constructor(e,t,n,o,s,a){this.from=e,this.to=t,this.dir=n,this.isolates=o,this.fresh=s,this.order=a}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let n=[],o=e.length?e[e.length-1].dir:exports.Direction.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==o&&!t.touchesRange(a.from,a.to)&&n.push(new dl(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return n}}function sm(r,e,t){for(let n=r.state.facet(e),o=n.length-1;o>=0;o--){let s=n[o],a=typeof s=="function"?s(r):s;a&&Hd(a,t)}return t}const Wx=G.mac?"mac":G.windows?"win":G.linux?"linux":"key";function Gx(r,e){const t=r.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let o,s,a,l;for(let c=0;c<t.length-1;++c){const d=t[c];if(/^(cmd|meta|m)$/i.test(d))l=!0;else if(/^a(lt)?$/i.test(d))o=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))a=!0;else if(/^mod$/i.test(d))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+d)}return o&&(n="Alt-"+n),s&&(n="Ctrl-"+n),l&&(n="Meta-"+n),a&&(n="Shift-"+n),n}function ma(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}const Jx=Fl.default(ue.domEventHandlers({keydown(r,e){return Zx(Yx(e.state),r,e,"editor")}})),Ty=Z.define({enables:Jx}),im=new WeakMap;function Yx(r){let e=r.facet(Ty),t=im.get(e);return t||im.set(e,t=Qx(e.reduce((n,o)=>n.concat(o),[]))),t}let rn=null;const Xx=4e3;function Qx(r,e=Wx){let t=Object.create(null),n=Object.create(null),o=(a,l)=>{let c=n[a];if(c==null)n[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,l,c,d,u)=>{var h,f;let p=t[a]||(t[a]=Object.create(null)),m=l.split(/ (?!$)/).map(v=>Gx(v,e));for(let v=1;v<m.length;v++){let b=m.slice(0,v).join(" ");o(b,!0),p[b]||(p[b]={preventDefault:!0,stopPropagation:!1,run:[w=>{let S=rn={view:w,prefix:b,scope:a};return setTimeout(()=>{rn==S&&(rn=null)},Xx),!0}]})}let g=m.join(" ");o(g,!1);let y=p[g]||(p[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});c&&y.run.push(c),d&&(y.preventDefault=!0),u&&(y.stopPropagation=!0)};for(let a of r){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let d of l){let u=t[d]||(t[d]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in u)u[h].run.push(a.any)}let c=a[e]||a.key;if(c)for(let d of l)s(d,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(d,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return t}function Zx(r,e,t,n){let o=wS(e),s=Io(o,0),a=sl(s)==o.length&&o!=" ",l="",c=!1,d=!1,u=!1;rn&&rn.view==t&&rn.scope==n&&(l=rn.prefix+" ",vy.indexOf(e.keyCode)<0&&(d=!0,rn=null));let h=new Set,f=y=>{if(y){for(let v of y.run)if(!h.has(v)&&(h.add(v),v(t,e)))return y.stopPropagation&&(u=!0),!0;y.preventDefault&&(y.stopPropagation&&(u=!0),d=!0)}return!1},p=r[n],m,g;return p&&(f(p[l+ma(o,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(G.windows&&e.ctrlKey&&e.altKey)&&(m=hn[e.keyCode])&&m!=o?(f(p[l+ma(m,e,!0)])||e.shiftKey&&(g=pi[e.keyCode])!=o&&g!=m&&f(p[l+ma(g,e,!1)]))&&(c=!0):a&&e.shiftKey&&f(p[l+ma(o,e,!0)])&&(c=!0),!c&&f(p._any)&&(c=!0)),d&&(c=!0),c&&u&&e.stopPropagation(),c}const eC=!G.ios,am={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};eC&&(am[".cm-line"].caretColor="transparent !important",am[".cm-content"]={caretColor:"transparent !important"});function lm(r,e,t,n,o){e.lastIndex=0;for(let s=r.iterRange(t,n),a=t,l;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)o(a+l.index,l)}function tC(r,e){let t=r.visibleRanges;if(t.length==1&&t[0].from==r.viewport.from&&t[0].to==r.viewport.to)return t;let n=[];for(let{from:o,to:s}of t)o=Math.max(r.state.doc.lineAt(o).from,o-e),s=Math.min(r.state.doc.lineAt(s).to,s+e),n.length&&n[n.length-1].to>=o?n[n.length-1].to=s:n.push({from:o,to:s});return n}class By{constructor(e){const{regexp:t,decoration:n,decorate:o,boundary:s,maxLength:a=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,o)this.addMatch=(l,c,d,u)=>o(u,d,d+l[0].length,l,c);else if(typeof n=="function")this.addMatch=(l,c,d,u)=>{let h=n(l,c,d);h&&u(d,d+l[0].length,h)};else if(n)this.addMatch=(l,c,d,u)=>u(d,d+l[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let t=new Ho,n=t.add.bind(t);for(let{from:o,to:s}of tC(e,this.maxLength))lm(e.state.doc,this.regexp,o,s,(a,l)=>this.addMatch(l,e,a,n));return t.finish()}updateDeco(e,t){let n=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((s,a,l,c)=>{c>e.view.viewport.from&&l<e.view.viewport.to&&(n=Math.min(l,n),o=Math.max(c,o))}),e.viewportChanged||o-n>1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,t.map(e.changes),n,o):t}updateRange(e,t,n,o){for(let s of e.visibleRanges){let a=Math.max(s.from,n),l=Math.min(s.to,o);if(l>a){let c=e.state.doc.lineAt(a),d=c.to<l?e.state.doc.lineAt(l):c,u=Math.max(s.from,c.from),h=Math.min(s.to,d.to);if(this.boundary){for(;a>c.from;a--)if(this.boundary.test(c.text[a-1-c.from])){u=a;break}for(;l<d.to;l++)if(this.boundary.test(d.text[l-d.from])){h=l;break}}let f=[],p,m=(g,y,v)=>f.push(v.range(g,y));if(c==d)for(this.regexp.lastIndex=u-c.from;(p=this.regexp.exec(c.text))&&p.index<h-c.from;)this.addMatch(p,e,p.index+c.from,m);else lm(e.state.doc,this.regexp,u,h,(g,y)=>this.addMatch(y,e,g,m));t=t.update({filterFrom:u,filterTo:h,filter:(g,y)=>g<u||y>h,add:f})}}return t}}const ru=/x/.unicode!=null?"gu":"g",rC=new RegExp(`[\0-\b
|
|
62
|
-
--\u2028\u2029\uFEFF-]`,ru),nC={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Hc=null;function oC(){var r;if(Hc==null&&typeof document<"u"&&document.body){let e=document.body.style;Hc=((r=e.tabSize)!==null&&r!==void 0?r:e.MozTabSize)!=null}return Hc||!1}const qa=Z.define({combine(r){let e=zl(r,{render:null,specialChars:rC,addSpecialChars:null});return(e.replaceTabs=!oC())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ru)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ru)),e}});function sC(r={}){return[qa.of(r),iC()]}let cm=null;function iC(){return cm||(cm=Vt.fromClass(class{constructor(r){this.view=r,this.decorations=Be.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(r.state.facet(qa)),this.decorations=this.decorator.createDeco(r)}makeDecorator(r){return new By({regexp:r.specialChars,decoration:(e,t,n)=>{let{doc:o}=t.state,s=Io(e[0],0);if(s==9){let a=o.lineAt(n),l=t.state.tabSize,c=oh(a.text,l,n-a.from);return Be.replace({widget:new dC((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Be.replace({widget:new cC(r,s)}))},boundary:r.replaceTabs?void 0:/[^]/})}update(r){let e=r.state.facet(qa);r.startState.facet(qa)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(r.view)):this.decorations=this.decorator.updateDeco(r,this.decorations)}},{decorations:r=>r.decorations}))}const aC="•";function lC(r){return r>=32?aC:r==10?"":String.fromCharCode(9216+r)}class cC extends ns{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=lC(this.code),n=e.state.phrase("Control character")+" "+(nC[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,t);if(o)return o;let s=document.createElement("span");return s.textContent=t,s.title=n,s.setAttribute("aria-label",n),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class dC extends ns{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const Is="-10000px";class uC{constructor(e,t,n,o){this.facet=t,this.createTooltipView=n,this.removeTooltipView=o,this.input=e.state.facet(t),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=n(a,s))}update(e,t){var n;let o=e.state.facet(this.facet),s=o.filter(c=>c);if(o===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let a=[],l=t?[]:null;for(let c=0;c<s.length;c++){let d=s[c],u=-1;if(d){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==d.create&&(u=h)}if(u<0)a[c]=this.createTooltipView(d,c?a[c-1]:null),l&&(l[c]=!!d.above);else{let h=a[c]=this.tooltipViews[u];l&&(l[c]=t[u]),h.update&&h.update(e)}}}for(let c of this.tooltipViews)a.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(l.forEach((c,d)=>t[d]=c),t.length=l.length),this.input=o,this.tooltips=s,this.tooltipViews=a,!0}}function hC(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Kc=Z.define({combine:r=>{var e,t,n;return{position:G.ios?"absolute":((e=r.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(o=>o.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(o=>o.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||hC}}}),dm=new WeakMap,Py=Vt.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(Kc);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new uC(r,Iy,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(Kc);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",t.dom.insertBefore(o,n)}return t.dom.style.position=this.position,t.dom.style.top=Is,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(G.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Is&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(e=o.width/this.parent.offsetWidth,t=o.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(Kc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:n,scaleX:o,scaleY:s}=r,a=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],d=this.manager.tooltipViews[l],{dom:u}=d,h=r.pos[l],f=r.size[l];if(!h||h.bottom<=Math.max(t.top,n.top)||h.top>=Math.min(t.bottom,n.bottom)||h.right<Math.max(t.left,n.left)-.1||h.left>Math.min(t.right,n.right)+.1){u.style.top=Is;continue}let p=c.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=f.right-f.left,y=(e=dm.get(d))!==null&&e!==void 0?e:f.bottom-f.top,v=d.offset||pC,b=this.view.textDirection==exports.Direction.LTR,w=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.min(h.left-(p?14:0)+v.x,n.right-g):Math.max(n.left,h.left-g+(p?14:0)-v.x),S=this.above[l];!c.strictSide&&(S?h.top-(f.bottom-f.top)-v.y<n.top:h.bottom+(f.bottom-f.top)+v.y>n.bottom)&&S==n.bottom-h.bottom>h.top-n.top&&(S=this.above[l]=!S);let x=(S?h.top-n.top:n.bottom-h.bottom)-m;if(x<y&&d.resize!==!1){if(x<this.view.defaultLineHeight){u.style.top=Is;continue}dm.set(d,y),u.style.height=(y=x)/s+"px"}else u.style.height&&(u.style.height="");let k=S?h.top-y-m-v.y:h.bottom+m+v.y,C=w+g;if(d.overlap!==!0)for(let N of a)N.left<C&&N.right>w&&N.top<k+y&&N.bottom>k&&(k=S?N.top-y-2-m:N.bottom+m+2);if(this.position=="absolute"?(u.style.top=(k-r.parent.top)/s+"px",u.style.left=(w-r.parent.left)/o+"px"):(u.style.top=k/s+"px",u.style.left=w/o+"px"),p){let N=h.left+(b?v.x:-v.x)-(w+14-7);p.style.left=N/o+"px"}d.overlap!==!0&&a.push({left:w,top:k,right:C,bottom:k+y}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),d.positioned&&d.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Is}},{eventObservers:{scroll(){this.maybeMeasure()}}}),fC=ue.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),pC={x:0,y:0},Iy=Z.define({enables:[Py,fC]});function mC(r,e){let t=r.plugin(Py);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}class Xn extends Gn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Xn.prototype.elementClass="";Xn.prototype.toDOM=void 0;Xn.prototype.mapMode=exports.MapMode.TrackBefore;Xn.prototype.startSide=Xn.prototype.endSide=-1;Xn.prototype.point=!0;const Uc=Z.define(),za=Z.define(),nu=Z.define({combine:r=>r.some(e=>e)});function gC(r){let e=[yC];return r&&r.fixed===!1&&e.push(nu.of(!0)),e}const yC=Vt.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(za).map(e=>new hm(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(nu),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(nu)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(Uc),this.view.viewport.from),n=[],o=this.gutters.map(s=>new vC(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==Xt.Text&&a){ou(t,n,l.from);for(let c of o)c.line(this.view,l,n);a=!1}else if(l.widget)for(let c of o)c.widget(this.view,l)}else if(s.type==Xt.Text){ou(t,n,s.from);for(let a of o)a.line(this.view,s,n)}else if(s.widget)for(let a of o)a.widget(this.view,s);for(let s of o)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(za),t=r.state.facet(za),n=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(Uc),r.state.facet(Uc),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let o of this.gutters)o.update(r)&&(n=!0);else{n=!0;let o=[];for(let s of t){let a=e.indexOf(s);a<0?o.push(new hm(this.view,s)):(this.gutters[a].update(r),o.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),o.indexOf(s)<0&&s.destroy();for(let s of o)this.dom.appendChild(s.dom);this.gutters=o}return n}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:r=>ue.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==exports.Direction.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function um(r){return Array.isArray(r)?r:[r]}function ou(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}class vC{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:o}=this,s=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==o.elements.length){let l=new My(e,a,s,n);o.elements.push(l),o.dom.appendChild(l.dom)}else o.elements[this.i].update(e,a,s,n);this.height=t.bottom,this.i++}line(e,t,n){let o=[];ou(this.cursor,o,t.from),n.length&&(o=o.concat(n));let s=this.gutter.config.lineMarker(e,t,o);s&&o.unshift(s);let a=this.gutter;o.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,o)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class hm{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,o=>{let s=o.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=o.clientY;let l=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,l,o)&&o.preventDefault()});this.markers=um(t.markers(e)),t.initialSpacer&&(this.spacer=new My(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=um(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let n=e.view.viewport;return!be.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class My{constructor(e,t,n,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,o)}update(e,t,n,o){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),bC(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,t){let n="cm-gutterElement",o=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=s<t.length?t[s++]:null,d=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let h=a;h<this.markers.length;h++)if(this.markers[h].compare(c)){l=h,d=!0;break}}else l=this.markers.length;for(;a<l;){let u=this.markers[a++];if(u.toDOM){u.destroy(o);let h=o.nextSibling;o.remove(),o=h}}if(!c)break;c.toDOM&&(d?o=o.nextSibling:this.dom.insertBefore(c.toDOM(e),o)),d&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function bC(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}const wC=Z.define(),$o=Z.define({combine(r){return zl(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let o in t){let s=n[o],a=t[o];n[o]=s?(l,c,d)=>s(l,c,d)||a(l,c,d):a}return n}})}});class Wc extends Xn{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Gc(r,e){return r.state.facet($o).formatNumber(e,r.state)}const kC=za.compute([$o],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(wC)},lineMarker(e,t,n){return n.some(o=>o.toDOM)?null:new Wc(Gc(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet($o)!=e.state.facet($o),initialSpacer(e){return new Wc(Gc(e,fm(e.state.doc.lines)))},updateSpacer(e,t){let n=Gc(t.view,fm(t.view.state.doc.lines));return n==e.number?e:new Wc(n)},domEventHandlers:r.facet($o).domEventHandlers}));function SC(r={}){return[$o.of(r),gC(),kC]}function fm(r){let e=9;for(;e<r;)e=e*10+9;return e}const Dy=1024;let xC=0;class Pt{constructor(e,t){this.from=e,this.to=t}}class fe{constructor(e={}){this.id=xC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}fe.closedBy=new fe({deserialize:r=>r.split(" ")});fe.openedBy=new fe({deserialize:r=>r.split(" ")});fe.group=new fe({deserialize:r=>r.split(" ")});fe.isolate=new fe({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});fe.contextHash=new fe({perNode:!0});fe.lookAhead=new fe({perNode:!0});fe.mounted=new fe({perNode:!0});class vi{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[fe.mounted.id]}}const CC=Object.create(null);class pt{constructor(e,t,n,o=0){this.name=e,this.props=t,this.id=n,this.flags=o}static define(e){let t=e.props&&e.props.length?Object.create(null):CC,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new pt(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(o)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(fe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let o of n.split(" "))t[o]=e[n];return n=>{for(let o=n.prop(fe.group),s=-1;s<(o?o.length:0);s++){let a=t[s<0?n.name:o[s]];if(a)return a}}}}pt.none=new pt("",Object.create(null),0,8);class hh{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let o=null;for(let s of e){let a=s(n);a&&(o||(o=Object.assign({},n.props)),o[a[0].id]=a[1])}t.push(o?new pt(n.name,o,n.id,n.flags):n)}return new hh(t)}}const ga=new WeakMap,pm=new WeakMap;exports.IterMode=void 0;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(exports.IterMode||(exports.IterMode={}));class He{constructor(e,t,n,o,s){if(this.type=e,this.children=t,this.positions=n,this.length=o,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,l]of s)this.props[typeof a=="number"?a:a.id]=l}}toString(){let e=vi.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let o=n.toString();o&&(t&&(t+=","),t+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ul(this.topNode,e)}cursorAt(e,t=0,n=0){let o=ga.get(this)||this.topNode,s=new ul(o);return s.moveTo(e,t),ga.set(this,s._tree),s}get topNode(){return new at(this,0,0,null)}resolve(e,t=0){let n=bi(ga.get(this)||this.topNode,e,t,!1);return ga.set(this,n),n}resolveInner(e,t=0){let n=bi(pm.get(this)||this.topNode,e,t,!0);return pm.set(this,n),n}resolveStack(e,t=0){return _C(this,e,t)}iterate(e){let{enter:t,leave:n,from:o=0,to:s=this.length}=e,a=e.mode||0,l=(a&exports.IterMode.IncludeAnonymous)>0;for(let c=this.cursor(a|exports.IterMode.IncludeAnonymous);;){let d=!1;if(c.from<=s&&c.to>=o&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&n&&(l||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:mh(pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,o)=>new He(this.type,t,n,o,this.propValues),e.makeTree||((t,n,o)=>new He(pt.none,t,n,o)))}static build(e){return NC(e)}}He.empty=new He(pt.none,[],[],0);class fh{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new fh(this.buffer,this.index)}}class pn{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],o=this.set.types[t],s=o.name;if(/\W/.test(s)&&!o.isError&&(s=JSON.stringify(s)),e+=4,n==e)return s;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,t,n,o,s){let{buffer:a}=this,l=-1;for(let c=e;c!=t&&!(Vy(s,o,a[c+1],a[c+2])&&(l=c,n>0));c=a[c+3]);return l}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),a=0;for(let l=e,c=0;l<t;){s[c++]=o[l++],s[c++]=o[l++]-n;let d=s[c++]=o[l++]-n;s[c++]=o[l++]-e,a=Math.max(a,d)}return new pn(s,a,this.set)}}function Vy(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function bi(r,e,t,n){for(var o;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let a=!n&&r instanceof at&&r.index<0?null:r.parent;if(!a)return r;r=a}let s=n?0:exports.IterMode.IgnoreOverlays;if(n)for(let a=r,l=a.parent;l;a=l,l=a.parent)a instanceof at&&a.index<0&&((o=l.enter(e,t,s))===null||o===void 0?void 0:o.from)!=a.from&&(r=l);for(;;){let a=r.enter(e,t,s);if(!a)return r;r=a}}class Ry{cursor(e=0){return new ul(this,e)}getChild(e,t=null,n=null){let o=mm(this,e,t,n);return o.length?o[0]:null}getChildren(e,t=null,n=null){return mm(this,e,t,n)}resolve(e,t=0){return bi(this,e,t,!1)}resolveInner(e,t=0){return bi(this,e,t,!0)}matchContext(e){return su(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let o=t.lastChild;if(!o||o.to!=t.to)break;o.type.isError&&o.from==o.to?(n=t,t=o.prevSibling):t=o}return n}get node(){return this}get next(){return this.parent}}class at extends Ry{constructor(e,t,n,o){super(),this._tree=e,this.from=t,this.index=n,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,o,s=0){for(let a=this;;){for(let{children:l,positions:c}=a._tree,d=t>0?l.length:-1;e!=d;e+=t){let u=l[e],h=c[e]+a.from;if(Vy(o,n,h,h+u.length)){if(u instanceof pn){if(s&exports.IterMode.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,t,n-h,o);if(f>-1)return new gr(new EC(a,u,e,h),null,f)}else if(s&exports.IterMode.IncludeAnonymous||!u.type.isAnonymous||ph(u)){let f;if(!(s&exports.IterMode.IgnoreMounts)&&(f=vi.get(u))&&!f.overlay)return new at(f.tree,h,e,a);let p=new at(u,h,e,a);return s&exports.IterMode.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?u.children.length-1:0,t,n,o)}}}if(s&exports.IterMode.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let o;if(!(n&exports.IterMode.IgnoreOverlays)&&(o=vi.get(this._tree))&&o.overlay){let s=e-this.from;for(let{from:a,to:l}of o.overlay)if((t>0?a<=s:a<s)&&(t<0?l>=s:l>s))return new at(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function mm(r,e,t,n){let o=r.cursor(),s=[];if(!o.firstChild())return s;if(t!=null){for(let a=!1;!a;)if(a=o.type.is(t),!o.nextSibling())return s}for(;;){if(n!=null&&o.type.is(n))return s;if(o.type.is(e)&&s.push(o.node),!o.nextSibling())return n==null?s:[]}}function su(r,e,t=e.length-1){for(let n=r.parent;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class EC{constructor(e,t,n,o){this.parent=e,this.buffer=t,this.index=n,this.start=o}}class gr extends Ry{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new gr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&exports.IterMode.ExcludeBuffers)return null;let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new gr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new gr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,o=this.index+4,s=n.buffer[this.index+3];if(s>o){let a=n.buffer[this.index+1];e.push(n.slice(o,s,a)),t.push(0)}return new He(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ly(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let a=r[s];(a.from>t.from||a.to<t.to)&&(t=a,e=s)}let n=t instanceof at&&t.index<0?null:t.parent,o=r.slice();return n?o[e]=n:o.splice(e,1),new $C(o,t)}class $C{constructor(e,t){this.heads=e,this.node=t}get next(){return Ly(this.heads)}}function _C(r,e,t){let n=r.resolveInner(e,t),o=null;for(let s=n instanceof at?n:n.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(o||(o=[n])).push(a.resolve(e,t)),s=a}else{let a=vi.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let l=new at(a.tree,a.overlay[0].from+s.from,-1,s);(o||(o=[n])).push(bi(l,e,t,!1))}}return o?Ly(o):n}class ul{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof at)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:o}=this.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=n+o.buffer[e+1],this.to=n+o.buffer[e+2],!0}yield(e){return e?e instanceof at?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:o}=this.buffer,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&exports.IterMode.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&exports.IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&exports.IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let o=n<0?0:this.stack[n]+4;if(this.index!=o)return this.yieldBuf(t.findChild(o,this.index,-1,0,4))}else{let o=t.buffer[this.index+3];if(o<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(o)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:o}=this;if(o){if(e>0){if(this.index<o.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(o.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=o)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,a=e<0?-1:n._tree.children.length;s!=a;s+=e){let l=n._tree.children[s];if(this.mode&exports.IterMode.IncludeAnonymous||l instanceof pn||!l.type.isAnonymous||ph(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let o=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==o){if(o==this.index)return a;t=a,n=s+1;break e}o=this.stack[--s]}for(let o=n;o<this.stack.length;o++)t=new gr(this.buffer,t,this.stack[o]);return this.bufferNode=new gr(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let o=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(o=!0)}for(;o&&t&&t(this),o=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,o=!0}}}matchContext(e){if(!this.buffer)return su(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let o=e.length-1,s=this.stack.length-1;o>=0;s--){if(s<0)return su(this.node,e,o);let a=n[t.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[o]&&e[o]!=a.name)return!1;o--}}return!0}}function ph(r){return r.children.some(e=>e instanceof pn||!e.type.isAnonymous||ph(e))}function NC(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:o=Dy,reused:s=[],minRepeatType:a=n.types.length}=r,l=Array.isArray(t)?new fh(t,t.length):t,c=n.types,d=0,u=0;function h(x,k,C,N,P,M){let{id:j,start:I,end:X,size:W}=l,te=u;for(;W<0;)if(l.next(),W==-1){let q=s[j];C.push(q),N.push(I-x);return}else if(W==-3){d=j;return}else if(W==-4){u=j;return}else throw new RangeError(`Unrecognized record size: ${W}`);let me=c[j],ke,Se,se=I-x;if(X-I<=o&&(Se=y(l.pos-k,P))){let q=new Uint16Array(Se.size-Se.skip),T=l.pos-Se.size,V=q.length;for(;l.pos>T;)V=v(Se.start,q,V);ke=new pn(q,X-Se.start,n),se=Se.start-x}else{let q=l.pos-W;l.next();let T=[],V=[],D=j>=a?j:-1,E=0,A=X;for(;l.pos>q;)D>=0&&l.id==D&&l.size>=0?(l.end<=A-o&&(m(T,V,I,E,l.end,A,D,te),E=T.length,A=l.end),l.next()):M>2500?f(I,q,T,V):h(I,q,T,V,D,M+1);if(D>=0&&E>0&&E<T.length&&m(T,V,I,E,I,A,D,te),T.reverse(),V.reverse(),D>-1&&E>0){let B=p(me);ke=mh(me,T,V,0,T.length,0,X-I,B,B)}else ke=g(me,T,V,X-I,te-X)}C.push(ke),N.push(se)}function f(x,k,C,N){let P=[],M=0,j=-1;for(;l.pos>k;){let{id:I,start:X,end:W,size:te}=l;if(te>4)l.next();else{if(j>-1&&X<j)break;j<0&&(j=W-o),P.push(I,X,W),M++,l.next()}}if(M){let I=new Uint16Array(M*4),X=P[P.length-2];for(let W=P.length-3,te=0;W>=0;W-=3)I[te++]=P[W],I[te++]=P[W+1]-X,I[te++]=P[W+2]-X,I[te++]=te;C.push(new pn(I,P[2]-X,n)),N.push(X-x)}}function p(x){return(k,C,N)=>{let P=0,M=k.length-1,j,I;if(M>=0&&(j=k[M])instanceof He){if(!M&&j.type==x&&j.length==N)return j;(I=j.prop(fe.lookAhead))&&(P=C[M]+j.length+I)}return g(x,k,C,N,P)}}function m(x,k,C,N,P,M,j,I){let X=[],W=[];for(;x.length>N;)X.push(x.pop()),W.push(k.pop()+C-P);x.push(g(n.types[j],X,W,M-P,I-M)),k.push(P-C)}function g(x,k,C,N,P=0,M){if(d){let j=[fe.contextHash,d];M=M?[j].concat(M):[j]}if(P>25){let j=[fe.lookAhead,P];M=M?[j].concat(M):[j]}return new He(x,k,C,N,M)}function y(x,k){let C=l.fork(),N=0,P=0,M=0,j=C.end-o,I={size:0,start:0,skip:0};e:for(let X=C.pos-x;C.pos>X;){let W=C.size;if(C.id==k&&W>=0){I.size=N,I.start=P,I.skip=M,M+=4,N+=4,C.next();continue}let te=C.pos-W;if(W<0||te<X||C.start<j)break;let me=C.id>=a?4:0,ke=C.start;for(C.next();C.pos>te;){if(C.size<0)if(C.size==-3)me+=4;else break e;else C.id>=a&&(me+=4);C.next()}P=ke,N+=W,M+=me}return(k<0||N==x)&&(I.size=N,I.start=P,I.skip=M),I.size>4?I:void 0}function v(x,k,C){let{id:N,start:P,end:M,size:j}=l;if(l.next(),j>=0&&N<a){let I=C;if(j>4){let X=l.pos-(j-4);for(;l.pos>X;)C=v(x,k,C)}k[--C]=I,k[--C]=M-x,k[--C]=P-x,k[--C]=N}else j==-3?d=N:j==-4&&(u=N);return C}let b=[],w=[];for(;l.pos>0;)h(r.start||0,r.bufferStart||0,b,w,-1,0);let S=(e=r.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new He(c[r.topID],b.reverse(),w.reverse(),S)}const gm=new WeakMap;function Ha(r,e){if(!r.isAnonymous||e instanceof pn||e.type!=r)return 1;let t=gm.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof He)){t=1;break}t+=Ha(r,n)}gm.set(e,t)}return t}function mh(r,e,t,n,o,s,a,l,c){let d=0;for(let m=n;m<o;m++)d+=Ha(r,e[m]);let u=Math.ceil(d*1.5/8),h=[],f=[];function p(m,g,y,v,b){for(let w=y;w<v;){let S=w,x=g[w],k=Ha(r,m[w]);for(w++;w<v;w++){let C=Ha(r,m[w]);if(k+C>=u)break;k+=C}if(w==S+1){if(k>u){let C=m[S];p(C.children,C.positions,0,C.children.length,g[S]+b);continue}h.push(m[S])}else{let C=g[w-1]+m[w-1].length-x;h.push(mh(r,m,g,S,w,x,C,null,c))}f.push(x+b-s)}}return p(e,t,n,o,0),(l||c)(h,f,a)}class AC{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof gr?this.setBuffer(e.context.buffer,e.index,t):e instanceof at&&this.map.set(e.tree,t)}get(e){return e instanceof gr?this.getBuffer(e.context.buffer,e.index):e instanceof at?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Pr{constructor(e,t,n,o,s=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=o,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let o=[new Pr(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&o.push(s);return o}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],s=1,a=e.length?e[0]:null;for(let l=0,c=0,d=0;;l++){let u=l<t.length?t[l]:null,h=u?u.fromA:1e9;if(h-c>=n)for(;a&&a.from<h;){let f=a;if(c>=f.from||h<=f.to||d){let p=Math.max(f.from,c)-d,m=Math.min(f.to,h)-d;f=p>=m?null:new Pr(p,m,f.tree,f.offset+d,l>0,!!u)}if(f&&o.push(f),a.to>h)break;a=s<e.length?e[s++]:null}if(!u)break;c=u.toA,d=u.toA-u.toB}return o}}class jy{startParse(e,t,n){return typeof e=="string"&&(e=new OC(e)),n=n?n.length?n.map(o=>new Pt(o.from,o.to)):[new Pt(0,0)]:[new Pt(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let o=this.startParse(e,t,n);for(;;){let s=o.advance();if(s)return s}}}class OC{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function TC(r){return(e,t,n,o)=>new PC(e,r,t,n,o)}class ym{constructor(e,t,n,o,s){this.parser=e,this.parse=t,this.overlay=n,this.target=o,this.from=s}}function vm(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}class BC{constructor(e,t,n,o,s,a,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=o,this.start=s,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const iu=new fe({perNode:!0});class PC{constructor(e,t,n,o,s){this.nest=t,this.input=n,this.fragments=o,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new He(n.type,n.children,n.positions,n.length,n.propValues.concat([[iu,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[fe.mounted.id]=new vi(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new DC(this.fragments),t=null,n=null,o=new ul(new at(this.baseTree,this.ranges[0].from,0,null),exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts);e:for(let s,a;;){let l=!0,c;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)l=!1;else if(e.hasNode(o)){if(t){let d=t.mounts.find(u=>u.frag.from<=o.from&&u.frag.to>=o.to&&u.mount.overlay);if(d)for(let u of d.mount.overlay){let h=u.from+d.pos,f=u.to+d.pos;h>=o.from&&f<=o.to&&!t.ranges.some(p=>p.from<f&&p.to>h)&&t.ranges.push({from:h,to:f})}}l=!1}else if(n&&(a=IC(n.ranges,o.from,o.to)))l=a!=2;else if(!o.type.isAnonymous&&(s=this.nest(o,this.input))&&(o.from<o.to||!s.overlay)){o.tree||MC(o);let d=e.findMounts(o.from,s.parser);if(typeof s.overlay=="function")t=new BC(s.parser,s.overlay,d,this.inner.length,o.from,o.tree,t);else{let u=km(this.ranges,s.overlay||(o.from<o.to?[new Pt(o.from,o.to)]:[]));u.length&&vm(u),(u.length||!s.overlay)&&this.inner.push(new ym(s.parser,u.length?s.parser.startParse(this.input,Sm(d,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new Pt(h.from-o.from,h.to-o.from)):null,o.tree,u.length?u[0].from:o.from)),s.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):l=!1}}else t&&(c=t.predicate(o))&&(c===!0&&(c=new Pt(o.from,o.to)),c.from<c.to&&t.ranges.push(c));if(l&&o.firstChild())t&&t.depth++,n&&n.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(t&&!--t.depth){let d=km(this.ranges,t.ranges);d.length&&(vm(d),this.inner.splice(t.index,0,new ym(t.parser,t.parser.startParse(this.input,Sm(t.mounts,d),d),t.ranges.map(u=>new Pt(u.from-t.start,u.to-t.start)),t.target,d[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function IC(r,e,t){for(let n of r){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function bm(r,e,t,n,o,s){if(e<t){let a=r.buffer[e+1];n.push(r.slice(e,t,a)),o.push(a-s)}}function MC(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let o=r.tree,s=o.children.indexOf(n),a=o.children[s],l=a.buffer,c=[s];function d(u,h,f,p,m,g){let y=t[g],v=[],b=[];bm(a,u,y,v,b,p);let w=l[y+1],S=l[y+2];c.push(v.length);let x=g?d(y+4,l[y+3],a.set.types[l[y]],w,S-w,g-1):e.toTree();return v.push(x),b.push(w-p),bm(a,l[y+3],h,v,b,p),new He(f,v,b,m)}o.children[s]=d(0,l.length,pt.none,0,a.length,t.length-1);for(let u of c){let h=r.tree.children[u],f=r.tree.positions[u];r.yield(new at(h,f+r.from,u,r._tree))}}class wm{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,exports.IterMode.IgnoreOverlays|exports.IterMode.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof He)t=t.children[0];else break}return!1}}class DC{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(iu))!==null&&t!==void 0?t:n.to,this.inner=new wm(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(iu))!==null&&e!==void 0?e:t.to,this.inner=new wm(t.tree,-t.offset)}}findMounts(e,t){var n;let o=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(n=s.tree)===null||n===void 0?void 0:n.prop(fe.mounted);if(a&&a.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&o.push({frag:c,pos:s.from-c.offset,mount:a})}}}return o}}function km(r,e){let t=null,n=e;for(let o=1,s=0;o<r.length;o++){let a=r[o-1].to,l=r[o].from;for(;s<n.length;s++){let c=n[s];if(c.from>=l)break;c.to<=a||(t||(n=t=e.slice()),c.from<a?(t[s]=new Pt(c.from,a),c.to>l&&t.splice(s+1,0,new Pt(l,c.to))):c.to>l?t[s--]=new Pt(l,c.to):t.splice(s--,1))}}return n}function VC(r,e,t,n){let o=0,s=0,a=!1,l=!1,c=-1e9,d=[];for(;;){let u=o==r.length?1e9:a?r[o].to:r[o].from,h=s==e.length?1e9:l?e[s].to:e[s].from;if(a!=l){let f=Math.max(c,t),p=Math.min(u,h,n);f<p&&d.push(new Pt(f,p))}if(c=Math.min(u,h),c==1e9)break;u==c&&(a?(a=!1,o++):a=!0),h==c&&(l?(l=!1,s++):l=!0)}return d}function Sm(r,e){let t=[];for(let{pos:n,mount:o,frag:s}of r){let a=n+(o.overlay?o.overlay[0].from:0),l=a+o.tree.length,c=Math.max(s.from,a),d=Math.min(s.to,l);if(o.overlay){let u=o.overlay.map(f=>new Pt(f.from+n,f.to+n)),h=VC(e,u,c,d);for(let f=0,p=c;;f++){let m=f==h.length,g=m?d:h[f].from;if(g>p&&t.push(new Pr(p,g,o.tree,-a,s.from>=p||s.openStart,s.to<=g||s.openEnd)),m)break;p=h[f].to}}else t.push(new Pr(c,d,o.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return t}let RC=0,Qr=class Fy{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=RC++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Fy([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new hl;return t=>t.modified.indexOf(e)>-1?t:hl.get(t.base||t,t.modified.concat(e).sort((n,o)=>n.id-o.id))}},LC=0;class hl{constructor(){this.instances=[],this.id=LC++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(l=>l.base==e&&jC(t,l.modified));if(n)return n;let o=[],s=new Qr(o,e,t);for(let l of t)l.instances.push(s);let a=FC(t);for(let l of e.set)if(!l.modified.length)for(let c of a)o.push(hl.get(l,c));return s}}function jC(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function FC(r){let e=[[]];for(let t=0;t<r.length;t++)for(let n=0,o=e.length;n<o;n++)e.push(e[n].concat(r[t]));return e.sort((t,n)=>n.length-t.length)}function qy(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let o of t.split(" "))if(o){let s=[],a=2,l=o;for(let h=0;;){if(l=="..."&&h>0&&h+3==o.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+o);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==o.length)break;let p=o[h++];if(h==o.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+o);l=o.slice(h)}let c=s.length-1,d=s[c];if(!d)throw new RangeError("Invalid path: "+o);let u=new fl(n,a,c>0?s.slice(0,c):null);e[d]=u.sort(e[d])}}return zy.add(e)}const zy=new fe;class fl{constructor(e,t,n,o){this.tags=e,this.mode=t,this.context=n,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}fl.empty=new fl([],2,null);function Hy(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let a of s.tag)t[a.id]=s.class;let{scope:n,all:o=null}=e||{};return{style:s=>{let a=o;for(let l of s)for(let c of l.set){let d=t[c.id];if(d){a=a?a+" "+d:d;break}}return a},scope:n}}function qC(r,e){let t=null;for(let n of r){let o=n.style(e);o&&(t=t?t+" "+o:o)}return t}function zC(r,e,t,n=0,o=r.length){let s=new HC(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,o,"",s.highlighters),s.flush(o)}class HC{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,o,s){let{type:a,from:l,to:c}=e;if(l>=n||c<=t)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let d=o,u=KC(e)||fl.empty,h=qC(s,u.tags);if(h&&(d&&(d+=" "),d+=h,u.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(t,l),d),u.opaque)return;let f=e.tree&&e.tree.prop(fe.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+l,1),m=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,v=l;;y++){let b=y<f.overlay.length?f.overlay[y]:null,w=b?b.from+l:c,S=Math.max(t,v),x=Math.min(n,w);if(S<x&&g)for(;e.from<x&&(this.highlightRange(e,S,x,o,s),this.startSpan(Math.min(x,e.to),d),!(e.to>=w||!e.nextSibling())););if(!b||w>n)break;v=b.to+l,v>t&&(this.highlightRange(p.cursor(),Math.max(t,b.from+l),Math.min(n,v),"",m),this.startSpan(Math.min(n,v),d))}g&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,o,s),this.startSpan(Math.min(n,e.to),d)}while(e.nextSibling());e.parent()}}}function KC(r){let e=r.type.prop(zy);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const K=Qr.define,ya=K(),Zr=K(),xm=K(Zr),Cm=K(Zr),en=K(),va=K(en),Jc=K(en),dr=K(),Nn=K(dr),lr=K(),cr=K(),au=K(),Ms=K(au),ba=K(),F={comment:ya,lineComment:K(ya),blockComment:K(ya),docComment:K(ya),name:Zr,variableName:K(Zr),typeName:xm,tagName:K(xm),propertyName:Cm,attributeName:K(Cm),className:K(Zr),labelName:K(Zr),namespace:K(Zr),macroName:K(Zr),literal:en,string:va,docString:K(va),character:K(va),attributeValue:K(va),number:Jc,integer:K(Jc),float:K(Jc),bool:K(en),regexp:K(en),escape:K(en),color:K(en),url:K(en),keyword:lr,self:K(lr),null:K(lr),atom:K(lr),unit:K(lr),modifier:K(lr),operatorKeyword:K(lr),controlKeyword:K(lr),definitionKeyword:K(lr),moduleKeyword:K(lr),operator:cr,derefOperator:K(cr),arithmeticOperator:K(cr),logicOperator:K(cr),bitwiseOperator:K(cr),compareOperator:K(cr),updateOperator:K(cr),definitionOperator:K(cr),typeOperator:K(cr),controlOperator:K(cr),punctuation:au,separator:K(au),bracket:Ms,angleBracket:K(Ms),squareBracket:K(Ms),paren:K(Ms),brace:K(Ms),content:dr,heading:Nn,heading1:K(Nn),heading2:K(Nn),heading3:K(Nn),heading4:K(Nn),heading5:K(Nn),heading6:K(Nn),contentSeparator:K(dr),list:K(dr),quote:K(dr),emphasis:K(dr),strong:K(dr),link:K(dr),monospace:K(dr),strikethrough:K(dr),inserted:K(),deleted:K(),changed:K(),invalid:K(),meta:ba,documentMeta:K(ba),annotation:K(ba),processingInstruction:K(ba),definition:Qr.defineModifier(),constant:Qr.defineModifier(),function:Qr.defineModifier(),standard:Qr.defineModifier(),local:Qr.defineModifier(),special:Qr.defineModifier()};Hy([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var Yc;const _o=new fe;function Ky(r){return Z.define({combine:r?e=>e.concat(r):void 0})}const Uy=new fe;class Gt{constructor(e,t,n=[],o=""){this.data=e,this.name=o,ve.prototype.hasOwnProperty("tree")||Object.defineProperty(ve.prototype,"tree",{get(){return mn(this)}}),this.parser=t,this.extension=[Wo.of(this),ve.languageData.of((s,a,l)=>{let c=Em(s,a,l),d=c.type.prop(_o);if(!d)return[];let u=s.facet(d),h=c.type.prop(Uy);if(h){let f=c.resolve(a-c.from,l);for(let p of h)if(p.test(f,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Em(e,t,n).type.prop(_o)==this.data}findRegions(e){let t=e.facet(Wo);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(s,a)=>{if(s.prop(_o)==this.data){n.push({from:a,to:a+s.length});return}let l=s.prop(fe.mounted);if(l){if(l.tree.prop(_o)==this.data){if(l.overlay)for(let c of l.overlay)n.push({from:c.from+a,to:c.to+a});else n.push({from:a,to:a+s.length});return}else if(l.overlay){let c=n.length;if(o(l.tree,l.overlay[0].from+a),n.length>c)return}}for(let c=0;c<s.children.length;c++){let d=s.children[c];d instanceof He&&o(d,s.positions[c]+a)}};return o(mn(e),0),n}get allowsNesting(){return!0}}Gt.setState=We.define();function Em(r,e,t){let n=r.facet(Wo),o=mn(r).topNode;if(!n||n.allowsNesting)for(let s=o;s;s=s.enter(e,t,exports.IterMode.ExcludeBuffers))s.type.isTop&&(o=s);return o}class pl extends Gt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=Ky(e.languageData);return new pl(t,e.parser.configure({props:[_o.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new pl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function mn(r){let e=r.field(Gt.state,!1);return e?e.tree:He.empty}class UC{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Ds=null;class ml{constructor(e,t,n=[],o,s,a,l,c){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new ml(e,t,[],He.empty,0,n,[],null)}startParse(){return this.parser.startParse(new UC(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=He.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o)if(this.fragments=this.withoutTempSkipped(Pr.addTree(o,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=o,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Pr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Ds;Ds=this;try{return e()}finally{Ds=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=$m(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((d,u,h,f)=>c.push({fromA:d,toA:u,fromB:h,toB:f})),n=Pr.applyChanges(n,c),o=He.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let u=e.mapPos(d.from,1),h=e.mapPos(d.to,-1);u<h&&l.push({from:u,to:h})}}}return new ml(this.parser,t,n,o,s,a,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:o,to:s}=this.skipped[n];o<e.to&&s>e.from&&(this.fragments=$m(this.fragments,o,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends jy{createParse(t,n,o){let s=o[0].from,a=o[o.length-1].to;return{parsedPos:s,advance(){let c=Ds;if(c){for(let d of o)c.tempSkipped.push(d);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=a,new He(pt.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Ds}}function $m(r,e,t){return Pr.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Uo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Uo(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ml.create(e.facet(Wo).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Uo(n)}}Gt.state=qr.define({create:Uo.init,update(r,e){for(let t of e.effects)if(t.is(Gt.setState))return t.value;return e.startState.facet(Wo)!=e.state.facet(Wo)?Uo.init(e.state):r.apply(e)}});let Wy=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Wy=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Xc=typeof navigator<"u"&&(!((Yc=navigator.scheduling)===null||Yc===void 0)&&Yc.isInputPending)?()=>navigator.scheduling.isInputPending():null,WC=Vt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Gt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Gt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Wy(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,s=n.field(Gt.state);if(s.tree==s.context.tree&&s.context.isDone(o+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Xc?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<o&&n.doc.length>o+1e3,c=s.context.work(()=>Xc&&Xc()||Date.now()>a,o+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Gt.setState.of(new Uo(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Br(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Wo=Z.define({combine(r){return r.length?r[0]:null},enables:r=>[Gt.state,WC,ue.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class GC{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const JC=Z.define(),gh=Z.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function Gy(r){let e=r.facet(gh);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function Jy(r,e){let t="",n=r.tabSize,o=r.facet(gh)[0];if(o==" "){for(;e>=n;)t+=" ",e-=n;o=" "}for(let s=0;s<e;s++)t+=o;return t}function YC(r,e){r instanceof ve&&(r=new Yy(r));for(let n of r.state.facet(JC)){let o=n(r,e);if(o!==void 0)return o}let t=mn(r.state);return t.length>=e?XC(r,t,e):null}class Yy{constructor(e,t={}){this.state=e,this.options=t,this.unit=Gy(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:s}=this.options;return o!=null&&o>=n.from&&o<=n.to?s&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.countColumn(n,e-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return oh(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let a=s(o);if(a>-1)return a}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Xy=new fe;function XC(r,e,t){let n=e.resolveStack(t),o=n.node.enterUnfinishedNodesBefore(t);if(o!=n.node){let s=[];for(let a=o;a!=n.node;a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)n={node:s[a],next:n}}return Qy(n,r,t)}function Qy(r,e,t){for(let n=r;n;n=n.next){let o=ZC(n.node);if(o)return o(yh.create(e,t,n))}return 0}function QC(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function ZC(r){let e=r.type.prop(Xy);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(fe.closedBy))){let o=r.lastChild,s=o&&n.indexOf(o.name)>-1;return a=>Zy(a,!0,1,void 0,s&&!QC(a)?o.from:void 0)}return r.parent==null?e2:null}function e2(){return 0}class yh extends Yy{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new yh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(t2(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Qy(this.context.next,this.base,this.pos)}}function t2(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function r2(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let o=r.options.simulateBreak,s=r.state.doc.lineAt(t.from),a=o==null||o<=s.from?s.to:Math.min(s.to,o);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==n)return null;if(!c.type.isSkipped)return c.from<a?t:null;l=c.to}}function n2({closing:r,align:e=!0,units:t=1}){return n=>Zy(n,e,t,r)}function Zy(r,e,t,n,o){let s=r.textAfter,a=s.match(/^\s*/)[0].length,l=n&&s.slice(a,a+n.length)==n||o==r.pos+a,c=e?r2(r):null;return c?l?r.column(c.from):r.column(c.to):r.baseIndent+(l?0:r.unit*t)}const o2=r=>r.baseIndent;function s2({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const i2=200;function a2(){return ve.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,o=t.lineAt(n);if(n>o.from+i2)return r;let s=t.sliceString(o.from,n);if(!e.some(d=>d.test(s)))return r;let{state:a}=r,l=-1,c=[];for(let{head:d}of a.selection.ranges){let u=a.doc.lineAt(d);if(u.from==l)continue;l=u.from;let h=YC(a,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],p=Jy(a,h);f!=p&&c.push({from:u.from,to:u.from+f.length,insert:p})}return c.length?[r,{changes:c,sequential:!0}]:r})}const l2=new fe;function c2(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}class Pi{constructor(e,t){this.specs=e;let n;function o(l){let c=un.newName();return(n||(n=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,a=t.scope;this.scope=a instanceof Gt?l=>l.prop(_o)==a.data:a?l=>l==a:void 0,this.style=Hy(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=n?new un(n):null,this.themeType=t.themeType}static define(e,t){return new Pi(e,t||{})}}const lu=Z.define(),ev=Z.define({combine(r){return r.length?[r[0]]:null}});function Qc(r){let e=r.facet(lu);return e.length?e:r.facet(ev)}function tv(r,e){let t=[u2],n;return r instanceof Pi&&(r.module&&t.push(ue.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(ev.of(r)):n?t.push(lu.computeN([ue.darkTheme],o=>o.facet(ue.darkTheme)==(n=="dark")?[r]:[])):t.push(lu.of(r)),t}class d2{constructor(e){this.markCache=Object.create(null),this.tree=mn(e.state),this.decorations=this.buildDeco(e,Qc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=mn(e.state),n=Qc(e.state),o=n!=Qc(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!o&&t.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Be.none;let n=new Ho;for(let{from:o,to:s}of e.visibleRanges)zC(this.tree,t,(a,l,c)=>{n.add(a,l,this.markCache[c]||(this.markCache[c]=Be.mark({class:c})))},o,s);return n.finish()}}const u2=Fl.high(Vt.fromClass(d2,{decorations:r=>r.decorations})),h2=Pi.define([{tag:F.meta,color:"#404740"},{tag:F.link,textDecoration:"underline"},{tag:F.heading,textDecoration:"underline",fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strong,fontWeight:"bold"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.keyword,color:"#708"},{tag:[F.atom,F.bool,F.url,F.contentSeparator,F.labelName],color:"#219"},{tag:[F.literal,F.inserted],color:"#164"},{tag:[F.string,F.deleted],color:"#a11"},{tag:[F.regexp,F.escape,F.special(F.string)],color:"#e40"},{tag:F.definition(F.variableName),color:"#00f"},{tag:F.local(F.variableName),color:"#30a"},{tag:[F.typeName,F.namespace],color:"#085"},{tag:F.className,color:"#167"},{tag:[F.special(F.variableName),F.macroName],color:"#256"},{tag:F.definition(F.propertyName),color:"#00c"},{tag:F.comment,color:"#940"},{tag:F.invalid,color:"#f00"}]),f2=ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),rv=1e4,nv="()[]{}",ov=Z.define({combine(r){return zl(r,{afterCursor:!0,brackets:nv,maxScanDistance:rv,renderMatch:g2})}}),p2=Be.mark({class:"cm-matchingBracket"}),m2=Be.mark({class:"cm-nonmatchingBracket"});function g2(r){let e=[],t=r.matched?p2:m2;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const y2=qr.define({create(){return Be.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(ov);for(let o of e.state.selection.ranges){if(!o.empty)continue;let s=wa(e.state,o.head,-1,n)||o.head>0&&wa(e.state,o.head-1,1,n)||n.afterCursor&&(wa(e.state,o.head,1,n)||o.head<e.state.doc.length&&wa(e.state,o.head+1,-1,n));s&&(t=t.concat(n.renderMatch(s,e.state)))}return Be.set(t,!0)},provide:r=>ue.decorations.from(r)}),v2=[y2,f2];function b2(r={}){return[ov.of(r),v2]}const sv=new fe;function cu(r,e,t){let n=r.prop(e<0?fe.openedBy:fe.closedBy);if(n)return n;if(r.name.length==1){let o=t.indexOf(r.name);if(o>-1&&o%2==(e<0?1:0))return[t[o+e]]}return null}function du(r){let e=r.type.prop(sv);return e?e(r.node):r}function wa(r,e,t,n={}){let o=n.maxScanDistance||rv,s=n.brackets||nv,a=mn(r),l=a.resolveInner(e,t);for(let c=l;c;c=c.parent){let d=cu(c.type,t,s);if(d&&c.from<c.to){let u=du(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return w2(r,e,t,c,u,d,s)}}return k2(r,e,t,a,l.type,o,s)}function w2(r,e,t,n,o,s,a){let l=n.parent,c={from:o.from,to:o.to},d=0,u=l==null?void 0:l.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(d==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let h=du(u);return{start:c,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(cu(u.type,t,a))d++;else if(cu(u.type,-t,a)){if(d==0){let h=du(u);return{start:c,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}d--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function k2(r,e,t,n,o,s,a){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),c=a.indexOf(l);if(c<0||c%2==0!=t>0)return null;let d={from:t<0?e-1:e,to:t>0?e+1:e},u=r.doc.iterRange(e,t>0?r.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=s;){let p=u.value;t<0&&(f+=p.length);let m=e+f*t;for(let g=t>0?0:p.length-1,y=t>0?p.length:-1;g!=y;g+=t){let v=a.indexOf(p[g]);if(!(v<0||n.resolveInner(m+g,1).type!=o))if(v%2==0==t>0)h++;else{if(h==1)return{start:d,end:{from:m+g,to:m+g+1},matched:v>>1==c>>1};h--}}t>0&&(f+=p.length)}return u.done?{start:d,matched:!1}:null}const S2=Object.create(null),_m=[pt.none],Nm=[],Am=Object.create(null),x2=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])x2[r]=C2(S2,e);function Zc(r,e){Nm.indexOf(r)>-1||(Nm.push(r),console.warn(e))}function C2(r,e){let t=[];for(let l of e.split(" ")){let c=[];for(let d of l.split(".")){let u=r[d]||F[d];u?typeof u=="function"?c.length?c=c.map(u):Zc(d,`Modifier ${d} used at start of tag`):c.length?Zc(d,`Tag ${d} used as modifier`):c=Array.isArray(u)?u:[u]:Zc(d,`Unknown highlighting tag ${d}`)}for(let d of c)t.push(d)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+t.map(l=>l.id),s=Am[o];if(s)return s.id;let a=Am[o]=pt.define({id:_m.length,name:n,props:[qy({[n]:t})]});return _m.push(a),a.id}exports.Direction.RTL,exports.Direction.LTR;var E2=r=>{var{theme:e,settings:t={},styles:n=[]}=r,o={".cm-gutters":{}},s={};t.background&&(s.backgroundColor=t.background),t.backgroundImage&&(s.backgroundImage=t.backgroundImage),t.foreground&&(s.color=t.foreground),(t.background||t.foreground)&&(o["&"]=s),t.fontFamily&&(o["&.cm-editor .cm-scroller"]={fontFamily:t.fontFamily}),t.gutterBackground&&(o[".cm-gutters"].backgroundColor=t.gutterBackground),t.gutterForeground&&(o[".cm-gutters"].color=t.gutterForeground),t.gutterBorder&&(o[".cm-gutters"].borderRightColor=t.gutterBorder),t.caret&&(o[".cm-content"]={caretColor:t.caret},o[".cm-cursor, .cm-dropCursor"]={borderLeftColor:t.caret});var a={};t.gutterActiveForeground&&(a.color=t.gutterActiveForeground),t.lineHighlight&&(o[".cm-activeLine"]={backgroundColor:t.lineHighlight},a.backgroundColor=t.lineHighlight),o[".cm-activeLineGutter"]=a,t.selection&&(o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:t.selection+" !important"}),t.selectionMatch&&(o["& .cm-selectionMatch"]={backgroundColor:t.selectionMatch});var l=ue.theme(o,{dark:e==="dark"}),c=Pi.define(n),d=[l,tv(c)];return d};const $2=E2({theme:"light",settings:{background:"var(--scalar-background-2)",foreground:"var(--scalar-color-1)",caret:"var(--scalar-color-1)",selection:"rgba(151, 183, 205, 0.2)",selectionMatch:"#e3dcce",gutterBackground:"var(--scalar-background-2)",gutterForeground:"var(--scalar-color-3)",gutterBorder:"transparent",lineHighlight:"var(--scalar-background-3)",fontFamily:"var(--scalar-font-code)"},styles:[{tag:[F.standard(F.tagName),F.tagName],color:"var(--scalar-color-purple)"},{tag:[F.comment],color:"var(--scalar-color-3)"},{tag:[F.className],color:"var(--scalar-color-orange)"},{tag:[F.variableName,F.propertyName,F.attributeName],color:"var(--scalar-color-1)"},{tag:[F.operator],color:"var(--scalar-color-2)"},{tag:[F.keyword,F.typeName,F.typeOperator],color:"var(--scalar-color-green)"},{tag:[F.string],color:"var(--scalar-color-blue)"},{tag:[F.bracket,F.regexp,F.meta],color:"var(--scalar-color-3)"},{tag:[F.number],color:"var(--scalar-color-blue)"},{tag:[F.name,F.quote],color:"var(--scalar-color-3)"},{tag:[F.heading],color:"var(--scalar-color-3)",fontWeight:"bold"},{tag:[F.emphasis],color:"var(--scalar-color-3)",fontStyle:"italic"},{tag:[F.deleted],color:"var(--scalar-color-3)",backgroundColor:"transparent"},{tag:[F.atom,F.bool,F.special(F.variableName)],color:"var(--scalar-color-3)"},{tag:[F.url,F.escape,F.regexp,F.link],color:"var(--scalar-color-1)"},{tag:F.link,textDecoration:"underline"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.invalid,color:"var(--scalar-color-3)"}]}),Om=new By({regexp:/(\{[^}]+\})/g,decoration:()=>Be.mark({attributes:{class:"api-client-url-variable"}})}),_2=()=>Vt.fromClass(class{constructor(r){lp(this,"variables");this.variables=Om.createDeco(r)}update(r){this.variables=Om.updateDeco(r,this.variables)}},{decorations:r=>r.variables,provide:r=>ue.atomicRanges.of(e=>{var t;return((t=e.plugin(r))==null?void 0:t.variables)||Be.none})}),N2={class:"scalar-modal-layout modal-layout"},A2=i.defineComponent({__name:"FlowModal",props:{state:{},title:{},bodyClass:{},maxWidth:{},variant:{default:"normal"}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Dialog),{open:e.state.open,onClose:t[0]||(t[0]=n=>e.state.hide())},{default:i.withCtx(()=>[i.createElementVNode("div",N2,[i.createVNode(i.unref(Le.DialogPanel),{class:i.normalizeClass(["modal",{"modal-content-large":e.variant==="large","modal-content-normal":e.variant==="normal","modal-content-small":e.variant==="small","modal-content-search":e.variant==="search","modal-content-history":e.variant==="history"}]),style:i.normalizeStyle({maxWidth:e.maxWidth})},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createBlock(i.unref(Le.DialogTitle),{key:0,class:"modal-header"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.title),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(Le.DialogDescription),{class:i.normalizeClass(["modal-body custom-scroll",[e.bodyClass]])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["class","style"])])]),_:3},8,["open"]))}}),iv=U(A2,[["__scopeId","data-v-4aafbf68"]]),av=()=>i.reactive({open:!1,show(){this.open=!0},hide(){this.open=!1}});function Ka(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function lv(r){return typeof window>"u"?Buffer.from(r).toString("base64"):btoa(r)}const cv=r=>{const e=/(?:\{+)\s*(\w+)\s*(?:\}+)/g;return[...r.matchAll(e)].map(t=>t[1].trim())||[]};function O2(r){return!(!r||Array.isArray(r)&&!r.length||(r??[]).some(e=>!Object.keys(e).length))}function vh(r,e){var c,d;const t=[],n=[],o=[];if(!r.customSecurity&&(!r.preferredSecurityScheme||!O2(e)))return{headers:t,queryString:n,cookies:o};const a=(e==null?void 0:e.some(u=>r.preferredSecurityScheme&&Object.keys(u).includes(r.preferredSecurityScheme)))||r.customSecurity?r.preferredSecurityScheme:Object.keys((e==null?void 0:e[0])??{}).pop(),l=(c=r.securitySchemes)==null?void 0:c[a??""];if(l){if("type"in l&&l.type==="apiKey"){if("in"in l&&l.in==="header"){const u=(d=r.apiKey.token)!=null&&d.length?r.apiKey.token:"YOUR_TOKEN";t.push({name:"name"in l?l.name:"",value:u})}else if("in"in l&&l.in==="cookie"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";o.push({name:l.name,value:u})}else if("in"in l&&l.in==="query"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";n.push({name:l.name,value:u})}}else if("type"in l&&(l.type==="http"||l.type==="basic")){if("type"in l&&(l.type==="basic"||l.type==="http"&&l.scheme==="basic")){const{username:u,password:h}=r.http.basic,f=bh(u,h);t.push({name:"Authorization",value:`Basic ${f}`.trim()})}else if("type"in l&&l.type==="http"&&l.scheme==="bearer"){const u=r.http.bearer.token.length?r.http.bearer.token:"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}else if("type"in l&&l.type.toLowerCase()==="oauth2"){const u=r.oAuth2.accessToken||"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}return{headers:t,queryString:n,cookies:o}}function bh(r,e){return r!=null&&r.length||e!=null&&e.length?lv(`${r}:${e}`):""}function dv(r){return[r.apiKey.token,r.http.bearer.token,r.oAuth2.accessToken,bh(r.http.basic.username,r.http.basic.password),r.http.basic.password].filter(Boolean)}const T2=Xe.useEventBus(Symbol()),B2={},P2={class:"card-form"};function I2(r,e){return i.openBlock(),i.createElementBlock("form",P2,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const M2=U(B2,[["render",I2],["__scopeId","data-v-983db964"]]),D2=i.defineComponent({__name:"CardFormButton",setup(r,{expose:e}){const t=i.ref();return e({el:t}),(n,o)=>(i.openBlock(),i.createElementBlock("button",{ref_key:"el",ref:t,class:"card-form-button",type:"button"},[i.renderSlot(n.$slots,"default",{},void 0,!0)],512))}}),uv=U(D2,[["__scopeId","data-v-d19add49"]]),V2={},R2={class:"card-form-group"};function L2(r,e){return i.openBlock(),i.createElementBlock("div",R2,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Tm=U(V2,[["render",L2],["__scopeId","data-v-6604ef98"]]);function hv(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=hv(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function ed(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=hv(r))&&(n&&(n+=" "),n+=e);return n}const Bm=r=>typeof r=="boolean"?"".concat(r):r===0?"0":r,j2=r=>{const e=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l,c;return typeof(r==null||(l=r.hooks)===null||l===void 0?void 0:l["cx:done"])<"u"?r==null?void 0:r.hooks["cx:done"](ed(s)):typeof(r==null||(c=r.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?r==null?void 0:r.hooks.onComplete(ed(s)):ed(s)};return{compose:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return l=>{const c=Object.fromEntries(Object.entries(l||{}).filter(d=>{let[u]=d;return!["class","className"].includes(u)}));return e(s.map(d=>d(c)),l==null?void 0:l.class,l==null?void 0:l.className)}},cva:o=>s=>{var a;if((o==null?void 0:o.variants)==null)return e(o==null?void 0:o.base,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:c}=o,d=Object.keys(l).map(f=>{const p=s==null?void 0:s[f],m=c==null?void 0:c[f],g=Bm(p)||Bm(m);return l[f][g]}),u={...c,...s&&Object.entries(s).reduce((f,p)=>{let[m,g]=p;return typeof g>"u"?f:{...f,[m]:g}},{})},h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((f,p)=>{let{class:m,className:g,...y}=p;return Object.entries(y).every(v=>{let[b,w]=v;const S=u[b];return Array.isArray(w)?w.includes(S):S===w})?[...f,m,g]:f},[]);return e(o==null?void 0:o.base,d,h,s==null?void 0:s.class,s==null?void 0:s.className)},cx:e}},wh="-";function F2(r){const e=z2(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;function o(a){const l=a.split(wh);return l[0]===""&&l.length!==1&&l.shift(),fv(l,e)||q2(a)}function s(a,l){const c=t[a]||[];return l&&n[a]?[...c,...n[a]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function fv(r,e){var a;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),o=n?fv(r.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=r.join(wh);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId}const Pm=/^\[(.+)\]$/;function q2(r){if(Pm.test(r)){const e=Pm.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}function z2(r){const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return K2(Object.entries(r.classGroups),t).forEach(([s,a])=>{uu(a,n,s,e)}),n}function uu(r,e,t,n){r.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Im(e,o);s.classGroupId=t;return}if(typeof o=="function"){if(H2(o)){uu(o(n),e,t,n);return}e.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{uu(a,Im(e,s),t,n)})})}function Im(r,e){let t=r;return e.split(wh).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t}function H2(r){return r.isThemeGetter}function K2(r,e){return e?r.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[t,o]}):r}function U2(r){if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;function o(s,a){t.set(s,a),e++,e>r&&(e=0,n=t,t=new Map)}return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}}const pv="!";function W2(r){const e=r.separator,t=e.length===1,n=e[0],o=e.length;return function(a){const l=[];let c=0,d=0,u;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===n&&(t||a.slice(g,g+o)===e)){l.push(a.slice(d,g)),d=g+o;continue}if(y==="/"){u=g;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(d),f=h.startsWith(pv),p=f?h.substring(1):h,m=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}}function G2(r){if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e}function J2(r){return{cache:U2(r.cacheSize),splitModifiers:W2(r),...F2(r)}}const Y2=/\s+/;function X2(r,e){const{splitModifiers:t,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=new Set;return r.trim().split(Y2).map(a=>{const{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=t(a);let h=n(u?d.substring(0,u):d),f=!!u;if(!h){if(!u)return{isTailwindClass:!1,originalClassName:a};if(h=n(d),!h)return{isTailwindClass:!1,originalClassName:a};f=!1}const p=G2(l).join(":");return{isTailwindClass:!0,modifierId:c?p+pv:p,classGroupId:h,originalClassName:a,hasPostfixModifier:f}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:d}=a,u=l+c;return s.has(u)?!1:(s.add(u),o(c,d).forEach(h=>s.add(l+h)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function Q2(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=mv(e))&&(n&&(n+=" "),n+=t);return n}function mv(r){if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=mv(r[n]))&&(t&&(t+=" "),t+=e);return t}function Mm(r,...e){let t,n,o,s=a;function a(c){const d=e.reduce((u,h)=>h(u),r());return t=J2(d),n=t.cache.get,o=t.cache.set,s=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=X2(c,t);return o(c,u),u}return function(){return s(Q2.apply(null,arguments))}}function Ne(r){const e=t=>t[r]||[];return e.isThemeGetter=!0,e}const gv=/^\[(?:([a-z-]+):)?(.+)\]$/i,Z2=/^\d+\/\d+$/,eE=new Set(["px","full","screen"]),tE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $r(r){return Ln(r)||eE.has(r)||Z2.test(r)}function Hr(r){return os(r,"length",fE)}function Ln(r){return!!r&&!Number.isNaN(Number(r))}function ka(r){return os(r,"number",Ln)}function Vs(r){return!!r&&Number.isInteger(Number(r))}function iE(r){return r.endsWith("%")&&Ln(r.slice(0,-1))}function ce(r){return gv.test(r)}function Kr(r){return tE.test(r)}const aE=new Set(["length","size","percentage"]);function lE(r){return os(r,aE,yv)}function cE(r){return os(r,"position",yv)}const dE=new Set(["image","url"]);function uE(r){return os(r,dE,mE)}function hE(r){return os(r,"",pE)}function Rs(){return!0}function os(r,e,t){const n=gv.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1}function fE(r){return rE.test(r)&&!nE.test(r)}function yv(){return!1}function pE(r){return oE.test(r)}function mE(r){return sE.test(r)}function Dm(){const r=Ne("colors"),e=Ne("spacing"),t=Ne("blur"),n=Ne("brightness"),o=Ne("borderColor"),s=Ne("borderRadius"),a=Ne("borderSpacing"),l=Ne("borderWidth"),c=Ne("contrast"),d=Ne("grayscale"),u=Ne("hueRotate"),h=Ne("invert"),f=Ne("gap"),p=Ne("gradientColorStops"),m=Ne("gradientColorStopPositions"),g=Ne("inset"),y=Ne("margin"),v=Ne("opacity"),b=Ne("padding"),w=Ne("saturate"),S=Ne("scale"),x=Ne("sepia"),k=Ne("skew"),C=Ne("space"),N=Ne("translate"),P=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ce,e],I=()=>[ce,e],X=()=>["",$r,Hr],W=()=>["auto",Ln,ce],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Ln,ka],V=()=>[Ln,ce];return{cacheSize:500,separator:":",theme:{colors:[Rs],spacing:[$r,Hr],blur:["none","",Kr,ce],brightness:T(),borderColor:[r],borderRadius:["none","","full",Kr,ce],borderSpacing:I(),borderWidth:X(),contrast:T(),grayscale:se(),hueRotate:V(),invert:se(),gap:I(),gradientColorStops:[r],gradientColorStopPositions:[iE,Hr],inset:j(),margin:j(),opacity:T(),padding:I(),saturate:T(),scale:T(),sepia:se(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Kr]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),ce]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vs,ce]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Vs,ce]}],"grid-cols":[{"grid-cols":[Rs]}],"col-start-end":[{col:["auto",{span:["full",Vs,ce]},ce]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Rs]}],"row-start-end":[{row:["auto",{span:[Vs,ce]},ce]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,e]}],"min-w":[{"min-w":[ce,e,"min","max","fit"]}],"max-w":[{"max-w":[ce,e,"none","full","min","max","fit","prose",{screen:[Kr]},Kr]}],h:[{h:[ce,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Kr,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ka]}],"font-family":[{font:[Rs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",Ln,ka]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$r,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$r,Hr]}],"underline-offset":[{"underline-offset":["auto",$r,ce]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),cE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uE]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:me()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[$r,ce]}],"outline-w":[{outline:[$r,Hr]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[$r,Hr]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Kr,hE]}],"shadow-color":[{shadow:[Rs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ke()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Kr,ce]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Vs,ce]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[$r,Hr,ka]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function gE(r,{cacheSize:e,prefix:t,separator:n,extend:o={},override:s={}}){Ua(r,"cacheSize",e),Ua(r,"prefix",t),Ua(r,"separator",n);for(const a in s)yE(r[a],s[a]);for(const a in o)vE(r[a],o[a]);return r}function Ua(r,e,t){t!==void 0&&(r[e]=t)}function yE(r,e){if(e)for(const t in e)Ua(r,t,e[t])}function vE(r,e){if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}}function bE(r,...e){return typeof r=="function"?Mm(Dm,r,...e):Mm(()=>gE(Dm(),r),...e)}const gl=Math.min,Un=Math.max,yl=Math.round,Sa=Math.floor,gn=r=>({x:r,y:r}),wE={left:"right",right:"left",bottom:"top",top:"bottom"},kE={start:"end",end:"start"};function Vm(r,e,t){return Un(r,gl(e,t))}function Ul(r,e){return typeof r=="function"?r(e):r}function Qn(r){return r.split("-")[0]}function Wl(r){return r.split("-")[1]}function vv(r){return r==="x"?"y":"x"}function bv(r){return r==="y"?"height":"width"}function Gl(r){return["top","bottom"].includes(Qn(r))?"y":"x"}function wv(r){return vv(Gl(r))}function SE(r,e,t){t===void 0&&(t=!1);const n=Wl(r),o=wv(r),s=bv(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=vl(a)),[a,vl(a)]}function xE(r){const e=vl(r);return[hu(r),e,hu(e)]}function hu(r){return r.replace(/start|end/g,e=>kE[e])}function CE(r,e,t){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?o:n:e?n:o;case"left":case"right":return e?s:a;default:return[]}}function EE(r,e,t,n){const o=Wl(r);let s=CE(Qn(r),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(hu)))),s}function vl(r){return r.replace(/left|right|bottom|top/g,e=>wE[e])}function $E(r){return{top:0,right:0,bottom:0,left:0,...r}}function _E(r){return typeof r!="number"?$E(r):{top:r,right:r,bottom:r,left:r}}function bl(r){const{x:e,y:t,width:n,height:o}=r;return{width:n,height:o,top:t,left:e,right:e+n,bottom:t+o,x:e,y:t}}function Rm(r,e,t){let{reference:n,floating:o}=r;const s=Gl(e),a=wv(e),l=bv(a),c=Qn(e),d=s==="y",u=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Wl(e)){case"start":p[a]-=f*(t&&d?-1:1);break;case"end":p[a]+=f*(t&&d?-1:1);break}return p}const NE=async(r,e,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:r,floating:e,strategy:o}),{x:u,y:h}=Rm(d,n,c),f=n,p={},m=0;for(let g=0;g<l.length;g++){const{name:y,fn:v}=l[g],{x:b,y:w,data:S,reset:x}=await v({x:u,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:d,platform:a,elements:{reference:r,floating:e}});u=b??u,h=w??h,p={...p,[y]:{...p[y],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:o}):x.rects),{x:u,y:h}=Rm(d,f,c)),g=-1)}return{x:u,y:h,placement:f,strategy:o,middlewareData:p}};async function kv(r,e){var t;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:l,strategy:c}=r,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Ul(e,r),m=_E(p),y=l[f?h==="floating"?"reference":"floating":h],v=bl(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),b=h==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},x=bl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-x.top+m.top)/S.y,bottom:(x.bottom-v.bottom+m.bottom)/S.y,left:(v.left-x.left+m.left)/S.x,right:(x.right-v.right+m.right)/S.x}}const AE=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ul(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const v=Qn(o),b=Qn(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=f||(b||!g?[vl(l)]:xE(l));!f&&m!=="none"&&S.push(...EE(l,g,m,w));const x=[l,...S],k=await kv(e,y),C=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&C.push(k[v]),h){const I=SE(o,a,w);C.push(k[I[0]],k[I[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(I=>I<=0)){var P,M;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,X=x[I];if(X)return{data:{index:I,overflows:N},reset:{placement:X}};let W=(M=N.filter(te=>te.overflows[0]<=0).sort((te,me)=>te.overflows[1]-me.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(p){case"bestFit":{var j;const te=(j=N.map(me=>[me.placement,me.overflows.filter(ke=>ke>0).reduce((ke,Se)=>ke+Se,0)]).sort((me,ke)=>me[1]-ke[1])[0])==null?void 0:j[0];te&&(W=te);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function OE(r,e){const{placement:t,platform:n,elements:o}=r,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Qn(t),l=Wl(t),c=Gl(t)==="y",d=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,h=Ul(e,r);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),c?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const TE=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:o,y:s,placement:a,middlewareData:l}=e,c=await OE(e,r);return a===((t=l.offset)==null?void 0:t.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},BE=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...c}=Ul(r,e),d={x:t,y:n},u=await kv(e,c),h=Gl(Qn(o)),f=vv(h);let p=d[f],m=d[h];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[y],w=p-u[v];p=Vm(b,p,w)}if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=m+u[y],w=m-u[v];m=Vm(b,m,w)}const g=l.fn({...e,[f]:p,[h]:m});return{...g,data:{x:g.x-t,y:g.y-n}}}}};function Lr(r){return kh(r)?(r.nodeName||"").toLowerCase():"#document"}function Et(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function zr(r){var e;return(e=(kh(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function kh(r){return r instanceof Node||r instanceof Et(r).Node}function jr(r){return r instanceof Element||r instanceof Et(r).Element}function br(r){return r instanceof HTMLElement||r instanceof Et(r).HTMLElement}function Lm(r){return typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Et(r).ShadowRoot}function Ii(r){const{overflow:e,overflowX:t,overflowY:n,display:o}=Rt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(o)}function PE(r){return["table","td","th"].includes(Lr(r))}function Sh(r){const e=xh(),t=Rt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function IE(r){let e=Go(r);for(;br(e)&&!Jl(e);){if(Sh(e))return e;e=Go(e)}return null}function xh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jl(r){return["html","body","#document"].includes(Lr(r))}function Rt(r){return Et(r).getComputedStyle(r)}function Yl(r){return jr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Go(r){if(Lr(r)==="html")return r;const e=r.assignedSlot||r.parentNode||Lm(r)&&r.host||zr(r);return Lm(e)?e.host:e}function Sv(r){const e=Go(r);return Jl(e)?r.ownerDocument?r.ownerDocument.body:r.body:br(e)&&Ii(e)?e:Sv(e)}function wi(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const o=Sv(r),s=o===((n=r.ownerDocument)==null?void 0:n.body),a=Et(o);return s?e.concat(a,a.visualViewport||[],Ii(o)?o:[],a.frameElement&&t?wi(a.frameElement):[]):e.concat(o,wi(o,[],t))}function xv(r){const e=Rt(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=br(r),s=o?r.offsetWidth:t,a=o?r.offsetHeight:n,l=yl(t)!==s||yl(n)!==a;return l&&(t=s,n=a),{width:t,height:n,$:l}}function Ch(r){return jr(r)?r:r.contextElement}function Ro(r){const e=Ch(r);if(!br(e))return gn(1);const t=e.getBoundingClientRect(),{width:n,height:o,$:s}=xv(e);let a=(s?yl(t.width):t.width)/n,l=(s?yl(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ME=gn(0);function Cv(r){const e=Et(r);return!xh()||!e.visualViewport?ME:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function DE(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Et(r)?!1:e}function Zn(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const o=r.getBoundingClientRect(),s=Ch(r);let a=gn(1);e&&(n?jr(n)&&(a=Ro(n)):a=Ro(r));const l=DE(s,t,n)?Cv(s):gn(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,u=o.width/a.x,h=o.height/a.y;if(s){const f=Et(s),p=n&&jr(n)?Et(n):n;let m=f,g=m.frameElement;for(;g&&n&&p!==m;){const y=Ro(g),v=g.getBoundingClientRect(),b=Rt(g),w=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,h*=y.y,c+=w,d+=S,m=Et(g),g=m.frameElement}}return bl({width:u,height:h,x:c,y:d})}const VE=[":popover-open",":modal"];function Ev(r){return VE.some(e=>{try{return r.matches(e)}catch{return!1}})}function RE(r){let{elements:e,rect:t,offsetParent:n,strategy:o}=r;const s=o==="fixed",a=zr(n),l=e?Ev(e.floating):!1;if(n===a||l&&s)return t;let c={scrollLeft:0,scrollTop:0},d=gn(1);const u=gn(0),h=br(n);if((h||!h&&!s)&&((Lr(n)!=="body"||Ii(a))&&(c=Yl(n)),br(n))){const f=Zn(n);d=Ro(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+u.x,y:t.y*d.y-c.scrollTop*d.y+u.y}}function LE(r){return Array.from(r.getClientRects())}function $v(r){return Zn(zr(r)).left+Yl(r).scrollLeft}function jE(r){const e=zr(r),t=Yl(r),n=r.ownerDocument.body,o=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+$v(r);const l=-t.scrollTop;return Rt(n).direction==="rtl"&&(a+=Un(e.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:l}}function FE(r,e){const t=Et(r),n=zr(r),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const d=xh();(!d||d&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:l,y:c}}function qE(r,e){const t=Zn(r,!0,e==="fixed"),n=t.top+r.clientTop,o=t.left+r.clientLeft,s=br(r)?Ro(r):gn(1),a=r.clientWidth*s.x,l=r.clientHeight*s.y,c=o*s.x,d=n*s.y;return{width:a,height:l,x:c,y:d}}function jm(r,e,t){let n;if(e==="viewport")n=FE(r,t);else if(e==="document")n=jE(zr(r));else if(jr(e))n=qE(e,t);else{const o=Cv(r);n={...e,x:e.x-o.x,y:e.y-o.y}}return bl(n)}function _v(r,e){const t=Go(r);return t===e||!jr(t)||Jl(t)?!1:Rt(t).position==="fixed"||_v(t,e)}function zE(r,e){const t=e.get(r);if(t)return t;let n=wi(r,[],!1).filter(l=>jr(l)&&Lr(l)!=="body"),o=null;const s=Rt(r).position==="fixed";let a=s?Go(r):r;for(;jr(a)&&!Jl(a);){const l=Rt(a),c=Sh(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ii(a)&&!c&&_v(r,a))?n=n.filter(u=>u!==a):o=l,a=Go(a)}return e.set(r,n),n}function HE(r){let{element:e,boundary:t,rootBoundary:n,strategy:o}=r;const a=[...t==="clippingAncestors"?zE(e,this._c):[].concat(t),n],l=a[0],c=a.reduce((d,u)=>{const h=jm(e,u,o);return d.top=Un(h.top,d.top),d.right=gl(h.right,d.right),d.bottom=gl(h.bottom,d.bottom),d.left=Un(h.left,d.left),d},jm(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function KE(r){const{width:e,height:t}=xv(r);return{width:e,height:t}}function UE(r,e,t){const n=br(e),o=zr(e),s=t==="fixed",a=Zn(r,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=gn(0);if(n||!n&&!s)if((Lr(e)!=="body"||Ii(o))&&(l=Yl(e)),n){const h=Zn(e,!0,s,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else o&&(c.x=$v(o));const d=a.left+l.scrollLeft-c.x,u=a.top+l.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Fm(r,e){return!br(r)||Rt(r).position==="fixed"?null:e?e(r):r.offsetParent}function Nv(r,e){const t=Et(r);if(!br(r)||Ev(r))return t;let n=Fm(r,e);for(;n&&PE(n)&&Rt(n).position==="static";)n=Fm(n,e);return n&&(Lr(n)==="html"||Lr(n)==="body"&&Rt(n).position==="static"&&!Sh(n))?t:n||IE(r)||t}const WE=async function(r){const e=this.getOffsetParent||Nv,t=this.getDimensions;return{reference:UE(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,...await t(r.floating)}}};function GE(r){return Rt(r).direction==="rtl"}const JE={convertOffsetParentRelativeRectToViewportRelativeRect:RE,getDocumentElement:zr,getClippingRect:HE,getOffsetParent:Nv,getElementRects:WE,getClientRects:LE,getDimensions:KE,getScale:Ro,isElement:jr,isRTL:GE};function YE(r,e){let t=null,n;const o=zr(r);function s(){var l;clearTimeout(n),(l=t)==null||l.disconnect(),t=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:d,top:u,width:h,height:f}=r.getBoundingClientRect();if(l||e(),!h||!f)return;const p=Sa(u),m=Sa(o.clientWidth-(d+h)),g=Sa(o.clientHeight-(u+f)),y=Sa(d),b={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Un(0,gl(1,c))||1};let w=!0;function S(x){const k=x[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{t=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{t=new IntersectionObserver(S,b)}t.observe(r)}return a(!0),s}function XE(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Ch(r),u=o||s?[...d?wi(d):[],...wi(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",t,{passive:!0}),s&&v.addEventListener("resize",t)});const h=d&&l?YE(d,t):null;let f=-1,p=null;a&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===d&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),t()}),d&&!c&&p.observe(d),p.observe(e));let m,g=c?Zn(r):null;c&&y();function y(){const v=Zn(r);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&t(),g=v,m=requestAnimationFrame(y)}return t(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),h==null||h(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const QE=BE,ZE=AE,e$=(r,e,t)=>{const n=new Map,o={platform:JE,...t},s={...o.platform,_c:n};return NE(r,e,{...o,platform:s})};function t$(r){return r!=null&&typeof r=="object"&&"$el"in r}function qm(r){if(t$(r)){const e=r.$el;return kh(e)&&Lr(e)==="#comment"?null:e}return r}function Av(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function zm(r,e){const t=Av(r);return Math.round(e*t)/t}function r$(r,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,o=i.computed(()=>{var C;return(C=i.unref(t.open))!=null?C:!0}),s=i.computed(()=>i.unref(t.middleware)),a=i.computed(()=>{var C;return(C=i.unref(t.placement))!=null?C:"bottom"}),l=i.computed(()=>{var C;return(C=i.unref(t.strategy))!=null?C:"absolute"}),c=i.computed(()=>{var C;return(C=i.unref(t.transform))!=null?C:!0}),d=i.computed(()=>qm(r.value)),u=i.computed(()=>qm(e.value)),h=i.ref(0),f=i.ref(0),p=i.ref(l.value),m=i.ref(a.value),g=i.shallowRef({}),y=i.ref(!1),v=i.computed(()=>{const C={position:p.value,left:"0",top:"0"};if(!u.value)return C;const N=zm(u.value,h.value),P=zm(u.value,f.value);return c.value?{...C,transform:"translate("+N+"px, "+P+"px)",...Av(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:P+"px"}});let b;function w(){d.value==null||u.value==null||e$(d.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(C=>{h.value=C.x,f.value=C.y,p.value=C.strategy,m.value=C.placement,g.value=C.middlewareData,y.value=!0})}function S(){typeof b=="function"&&(b(),b=void 0)}function x(){if(S(),n===void 0){w();return}if(d.value!=null&&u.value!=null){b=n(d.value,u.value,w);return}}function k(){o.value||(y.value=!1)}return i.watch([s,a,l],w,{flush:"sync"}),i.watch([d,u],x,{flush:"sync"}),i.watch(o,k,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(S),{x:i.shallowReadonly(h),y:i.shallowReadonly(f),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(m),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(y),floatingStyles:v,update:w}}const fu="scalar-component",n$=bE({extend:{classGroups:{"font-size":["text-xxs"],[fu]:[fu]}}}),{cva:Eh,cx:so,compose:S4}=j2({hooks:{onComplete:r=>`${n$(r,fu)}`}}),o$=i.createStaticVNode('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-47faceda></path>',5),s$={key:0,class:"circular-loader"},i$=i.defineComponent({__name:"ScalarLoading",props:{loadingState:{},size:{default:"24px"}},setup(r){return i.useCssVars(e=>({d6cae758:e.size})),(e,t)=>e.loadingState?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(so)("loader-wrapper"))},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["svg-loader",{"icon-is-valid":e.loadingState.isValid,"icon-is-invalid":e.loadingState.isInvalid}]),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[o$,e.loadingState.isLoading?(i.openBlock(),i.createElementBlock("g",s$,[i.createElementVNode("circle",{class:i.normalizeClass(["loader-path",{"loader-path-off":e.loadingState.isValid||e.loadingState.isInvalid}]),cx:"50",cy:"50",fill:"none",r:"20","stroke-width":"2"},null,2)])):i.createCommentVNode("",!0)],2))],2)):i.createCommentVNode("",!0)}}),a$=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},Ov=a$(i$,[["__scopeId","data-v-47faceda"]]),Tv={solid:["scalar-button-solid","bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"],outlined:["scalar-button-outlined","active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-border"],ghost:["scalar-button-ghost","bg-transparent text-fore-3 active:text-fore-2 hocus:text-fore-2"],danger:["scalar-button-danger","bg-error text-white active:brightness-90 hocus:brightness-90"]},l$=Eh({base:"scalar-button row cursor-pointer items-center justify-center rounded font-medium",variants:{disabled:{true:"bg-background-2 text-color-3 cursor-not-allowed shadow-none"},fullWidth:{true:"w-full"},size:{md:"h-10 px-6 text-sm"},variant:Tv},compoundVariants:[{disabled:!0,variant:"ghost",class:"bg-transparent text-ghost"}]}),c$=["ariaDisabled"],d$={key:0,class:"mr-2 h-4 w-4"},u$={key:1,class:"ml-2"},pu=i.defineComponent({inheritAttrs:!1,__name:"ScalarButton",props:{disabled:{type:Boolean},fullWidth:{type:Boolean,default:!1},loading:{},size:{default:"md"},variant:{default:"solid"}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(e.value.rest,{ariaDisabled:t.disabled||void 0,class:i.unref(so)(i.unref(l$)({fullWidth:t.fullWidth,disabled:t.disabled,size:t.size,variant:t.variant}),{"pl-9 pr-3":t.loading},`${e.value.className}`),type:"button"}),[t.$slots.icon?(i.openBlock(),i.createElementBlock("div",d$,[i.renderSlot(t.$slots,"icon")])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default"),t.loading?(i.openBlock(),i.createElementBlock("div",u$,[i.createVNode(i.unref(Ov),{loadingState:t.loading,size:"20px"},null,8,["loadingState"])])):i.createCommentVNode("",!0)],16,c$))}});(function(r){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:t,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=n.variable[1].inside,a=0;a<o.length;a++)s[o[a]]=r.languages.bash[o[a]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(){if(typeof Prism>"u"||typeof document>"u")return;var r="line-numbers",e=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(a,l){if(!(a.tagName!=="PRE"||!a.classList.contains(r))){var c=a.querySelector(".line-numbers-rows");if(c){var d=parseInt(a.getAttribute("data-start"),10)||1,u=d+(c.children.length-1);l<d&&(l=d),l>u&&(l=u);var h=l-d;return c.children[h]}}},resize:function(a){n([a])},assumeViewportIndependence:!0};function n(a){if(a=a.filter(function(c){var d=o(c),u=d["white-space"];return u==="pre-wrap"||u==="pre-line"}),a.length!=0){var l=a.map(function(c){var d=c.querySelector("code"),u=c.querySelector(".line-numbers-rows");if(!(!d||!u)){var h=c.querySelector(".line-numbers-sizer"),f=d.textContent.split(e);h||(h=document.createElement("span"),h.className="line-numbers-sizer",d.appendChild(h)),h.innerHTML="0",h.style.display="block";var p=h.getBoundingClientRect().height;return h.innerHTML="",{element:c,lines:f,lineHeights:[],oneLinerHeight:p,sizer:h}}}).filter(Boolean);l.forEach(function(c){var d=c.sizer,u=c.lines,h=c.lineHeights,f=c.oneLinerHeight;h[u.length-1]=void 0,u.forEach(function(p,m){if(p&&p.length>1){var g=d.appendChild(document.createElement("span"));g.style.display="block",g.textContent=p}else h[m]=f})}),l.forEach(function(c){for(var d=c.sizer,u=c.lineHeights,h=0,f=0;f<u.length;f++)u[f]===void 0&&(u[f]=d.children[h++].getBoundingClientRect().height)}),l.forEach(function(c){var d=c.sizer,u=c.element.querySelector(".line-numbers-rows");d.style.display="none",d.innerHTML="",c.lineHeights.forEach(function(h,f){u.children[f].style.height=h+"px"})})}}function o(a){return a?window.getComputedStyle?getComputedStyle(a):a.currentStyle||null:null}var s=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+r))))}),Prism.hooks.add("complete",function(a){if(a.code){var l=a.element,c=l.parentNode;if(!(!c||!/pre/i.test(c.nodeName))&&!l.querySelector(".line-numbers-rows")&&Prism.util.isActive(l,r)){l.classList.remove(r),c.classList.add(r);var d=a.code.match(e),u=d?d.length+1:1,h,f=new Array(u+1).join("<span></span>");h=document.createElement("span"),h.setAttribute("aria-hidden","true"),h.className="line-numbers-rows",h.innerHTML=f,c.hasAttribute("data-start")&&(c.style.counterReset="linenumber "+(parseInt(c.getAttribute("data-start"),10)-1)),a.element.appendChild(h),n([c]),Prism.hooks.run("line-numbers",a)}}}),Prism.hooks.add("line-numbers",function(a){a.plugins=a.plugins||{},a.plugins.lineNumbers=!0})})();function h$(r){const e=new Set;return JSON.stringify(r,(t,n)=>{if(typeof n=="object"&&n!==null){if(e.has(n))return"[Circular]";e.add(n)}return n},2)}function xa(r){if(typeof r=="string")return r;if(typeof r=="object")try{return JSON.stringify(r,null,2)}catch{return h$(r)}return r}const f$=["innerHTML"],Nr=i.defineComponent({__name:"ScalarCodeBlock",props:{content:{},lang:{default:"js"},lineNumbers:{type:Boolean,default:!1},hideCredentials:{}},setup(r){const e=r,t=zu(xa(e.content)),n=`components-scalar-code-block${t}`,{plugins:o,highlightElement:s}=Ts;e.hideCredentials&&Ts.hooks.add("wrap",function(h){if(!e.hideCredentials)return;let f=!1;typeof e.hideCredentials=="string"?h.content.includes(e.hideCredentials)&&(f=!0):Array.isArray(e.hideCredentials)&&(f=e.hideCredentials.some(p=>h.content.includes(p))),f&&(h.content=h.content.replace(/<span class="credentials">.*?<\/span>/g,p=>p.replace(/<span class="credentials">|<\/span>/g,"")),h.content=h.content.replace(new RegExp(typeof e.hideCredentials=="string"?e.hideCredentials:e.hideCredentials.join("|"),"g"),p=>`<span class="credentials">${p}</span>`))});const a=i.ref(null),l=i.ref(ts[n]??""),c=i.computed(()=>e.lang==="node"?"js":e.lang),d=e.lang;i.watch([()=>e.lang,()=>e.content,a],()=>{a.value&&e.content&&(!l.value||e.lang!==d)&&(l.value="",i.nextTick(()=>s(a.value)))},{immediate:!0});const u=/\n(?!$)/g;return i.onServerPrefetch(async()=>{let h="";e.lineNumbers&&Ts.hooks.add("after-tokenize",p=>{const m=p.code.match(u),g=m?m.length+1:1;h=`<span aria-hidden="true" class="line-numbers-rows">${new Array(g+1).join("<span></span>")}</span>`});const f=Ts.highlight(xa(e.content),Ts.languages[c.value],c.value);if(l.value=f+h,t!==0){const p=i.useSSRContext();p.payload.data[n]=f+h}}),i.onMounted(async()=>{await Promise.resolve().then(()=>require("./prism-autoloader-Dlh8Vzlw--ejn04HW.cjs")),o.autoloader.languages_path="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/"}),(h,f)=>(i.openBlock(),i.createElementBlock("pre",{class:i.normalizeClass([`scalar-component scalar-codeblock-pre language-${c.value}`,{"line-numbers":h.lineNumbers}])},[l.value?(i.openBlock(),i.createElementBlock("code",{key:0,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`),innerHTML:i.unref(xa)(l.value)},null,10,f$)):(i.openBlock(),i.createElementBlock("code",{key:1,ref_key:"el",ref:a,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`)},i.toDisplayString(i.unref(xa)(h.content)),3))],2))}}),Hm=Object.assign({"./Add.svg":()=>Promise.resolve().then(()=>require("./Add-ngyZgYXx-CWPoroGU.cjs")),"./ArrowLeft.svg":()=>Promise.resolve().then(()=>require("./ArrowLeft-aY17W2aS-B48Wrva9.cjs")),"./ArrowRight.svg":()=>Promise.resolve().then(()=>require("./ArrowRight-DEMtdoE7-BVEqp3bA.cjs")),"./Background.svg":()=>Promise.resolve().then(()=>require("./Background-DcRhSHgf-7l5O3oYH.cjs")),"./Brackets.svg":()=>Promise.resolve().then(()=>require("./Brackets-4I8OKomf-C2VxZ6iW.cjs")),"./Branch.svg":()=>Promise.resolve().then(()=>require("./Branch-CXwj8YuG-xolS1YAY.cjs")),"./CallToAction.svg":()=>Promise.resolve().then(()=>require("./CallToAction-EyQKkvbg-Eo_9FsiI.cjs")),"./Checkmark.svg":()=>Promise.resolve().then(()=>require("./Checkmark-De7nq6cG-tp1nTP9w.cjs")),"./ChevronDown.svg":()=>Promise.resolve().then(()=>require("./ChevronDown-Co7EAKAv-BMVIms1W.cjs")),"./ChevronLeft.svg":()=>Promise.resolve().then(()=>require("./ChevronLeft-DYt0idAu-DgJ680do.cjs")),"./ChevronRight.svg":()=>Promise.resolve().then(()=>require("./ChevronRight-ylxToVWl-BVcmudpo.cjs")),"./ChevronUp.svg":()=>Promise.resolve().then(()=>require("./ChevronUp-xAnukIfj-BRXM2fAN.cjs")),"./Clipboard.svg":()=>Promise.resolve().then(()=>require("./Clipboard-CU_KxGEv-jXeM-Shn.cjs")),"./Close.svg":()=>Promise.resolve().then(()=>require("./Close-CW3z42qZ-CAmO5dZ5.cjs")),"./CodeFolder.svg":()=>Promise.resolve().then(()=>require("./CodeFolder-Cv_igzJE-Dl4HVTRL.cjs")),"./Cookie.svg":()=>Promise.resolve().then(()=>require("./Cookie-CEHvXpqB-BCUOR3DZ.cjs")),"./DarkMode.svg":()=>Promise.resolve().then(()=>require("./DarkMode-CBsV8Q_I-KODSbuOz.cjs")),"./Delete.svg":()=>Promise.resolve().then(()=>require("./Delete-BCZmxrDD-C-UeHTm2.cjs")),"./Discord.svg":()=>Promise.resolve().then(()=>require("./Discord-BHYOFBB2-BzF4Z2zQ.cjs")),"./DocsPage.svg":()=>Promise.resolve().then(()=>require("./DocsPage-rh2xwxKN-EMPYZ-u6.cjs")),"./Duplicate.svg":()=>Promise.resolve().then(()=>require("./Duplicate-BPlzNpcf-Uk5uZ5gd.cjs")),"./Edit.svg":()=>Promise.resolve().then(()=>require("./Edit-Br04RNYb-bn7B8ziL.cjs")),"./Ellipses.svg":()=>Promise.resolve().then(()=>require("./Ellipses-Bo_X36Hx-1Rf8jX_Q.cjs")),"./Error.svg":()=>Promise.resolve().then(()=>require("./Error-B_RGtWJI-kZYauS2f.cjs")),"./ExternalLink.svg":()=>Promise.resolve().then(()=>require("./ExternalLink-DK8L-EH7-BZtIWcdg.cjs")),"./FilterList.svg":()=>Promise.resolve().then(()=>require("./FilterList-CsAcE9em-CSRdO8He.cjs")),"./Folder.svg":()=>Promise.resolve().then(()=>require("./Folder-Cdcj4evh-JrdpqKfO.cjs")),"./GitHub.svg":()=>Promise.resolve().then(()=>require("./GitHub-NdE6Zs9k-CDcqenD_.cjs")),"./Hide.svg":()=>Promise.resolve().then(()=>require("./Hide-Q3GPkIKH-Ba4DV2wS.cjs")),"./History.svg":()=>Promise.resolve().then(()=>require("./History-D9nmhNIn-C8K3DZOi.cjs")),"./JsonObject.svg":()=>Promise.resolve().then(()=>require("./JsonObject-hGdHUQ4M-DEiEsxEM.cjs")),"./Key.svg":()=>Promise.resolve().then(()=>require("./Key-CWXJqX28-D85Imfdm.cjs")),"./Leave.svg":()=>Promise.resolve().then(()=>require("./Leave-K1J3uwoG-COzffJei.cjs")),"./LightDarkModeToggle.svg":()=>Promise.resolve().then(()=>require("./LightDarkModeToggle-BkvMimDa-D2TvUWMc.cjs")),"./LightMode.svg":()=>Promise.resolve().then(()=>require("./LightMode-Btz6vyT_-BTswDMO7.cjs")),"./Link.svg":()=>Promise.resolve().then(()=>require("./Link-Bzuc__Nc-C0VSCFw-.cjs")),"./Lock.svg":()=>Promise.resolve().then(()=>require("./Lock-xhiH1mKz-sEHw9FoO.cjs")),"./Logo.svg":()=>Promise.resolve().then(()=>require("./Logo-mtzeKD8M-BPvZdgPX.cjs")),"./LogoAPI.svg":()=>Promise.resolve().then(()=>require("./LogoAPI-CaU5E6FK-H9aWX-Pj.cjs")),"./LogoClient.svg":()=>Promise.resolve().then(()=>require("./LogoClient-DdC-t_7P-CN0J-Vs6.cjs")),"./LogoMarket.svg":()=>Promise.resolve().then(()=>require("./LogoMarket-DwlApcab-C3B4miZm.cjs")),"./LogoSwagger.svg":()=>Promise.resolve().then(()=>require("./LogoSwagger-CH60H5qW-56_9U30I.cjs")),"./Magic.svg":()=>Promise.resolve().then(()=>require("./Magic-Dsi9_bEc-Bz81CcSu.cjs")),"./Menu.svg":()=>Promise.resolve().then(()=>require("./Menu-CFK5cOsm-B_mqCQj6.cjs")),"./Page.svg":()=>Promise.resolve().then(()=>require("./Page-B7rVuhpl-DfOGMkFM.cjs")),"./PaperAirplane.svg":()=>Promise.resolve().then(()=>require("./PaperAirplane-BC-4mGEB-CUmTyNIM.cjs")),"./Payment.svg":()=>Promise.resolve().then(()=>require("./Payment-hzcXP1Xb-DA7pQdWt.cjs")),"./Play.svg":()=>Promise.resolve().then(()=>require("./Play-BrVagRQA-DwHMdiTR.cjs")),"./Refresh.svg":()=>Promise.resolve().then(()=>require("./Refresh-Be6vHEEi-CbpDdpiC.cjs")),"./Response.svg":()=>Promise.resolve().then(()=>require("./Response-Dq9pM-ZU-C6e6VGNi.cjs")),"./Search.svg":()=>Promise.resolve().then(()=>require("./Search-DqtlswRG-Cn8bmF-2.cjs")),"./Show.svg":()=>Promise.resolve().then(()=>require("./Show-D86hKz5y-DCaWj13Q.cjs")),"./SideBarClosed.svg":()=>Promise.resolve().then(()=>require("./SideBarClosed-CYUNS2XM-BrkKCJbJ.cjs")),"./SideBarOpen.svg":()=>Promise.resolve().then(()=>require("./SideBarOpen-BOxW49_U-1NTFL81x.cjs")),"./Sort.svg":()=>Promise.resolve().then(()=>require("./Sort-oTjBhJFQ-ClKvQJ9G.cjs")),"./Terminal.svg":()=>Promise.resolve().then(()=>require("./Terminal-CKp--su5-B0pjt_Yz.cjs")),"./ThumbsDown.svg":()=>Promise.resolve().then(()=>require("./ThumbsDown-BMgnsASL-C-sKah3X.cjs")),"./ThumbsUp.svg":()=>Promise.resolve().then(()=>require("./ThumbsUp-C1j6zY2j-CBEvfE8L.cjs")),"./Trash.svg":()=>Promise.resolve().then(()=>require("./Trash-BpA3zWPD-C-UeHTm2.cjs")),"./Unlock.svg":()=>Promise.resolve().then(()=>require("./Unlock-CY8UqJoE-C46tGVrb.cjs")),"./Upload.svg":()=>Promise.resolve().then(()=>require("./Upload-REIdL7RI-C6EgO_Ra.cjs")),"./User.svg":()=>Promise.resolve().then(()=>require("./User-Df5svMQ3-BzQcMZ_8.cjs")),"./programming-framework-angular.svg":()=>Promise.resolve().then(()=>require("./programming-framework-angular-DD4Vjgbk-BVT4AoJo.cjs")),"./programming-framework-astro.svg":()=>Promise.resolve().then(()=>require("./programming-framework-astro-CLfrRt19-CWwhfV7_.cjs")),"./programming-framework-laravel.svg":()=>Promise.resolve().then(()=>require("./programming-framework-laravel-kAy2wVLy-C3EZCsGC.cjs")),"./programming-framework-nextdotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-nextdotjs-BKdd_DY_-DdOe6YSk.cjs")),"./programming-framework-react.svg":()=>Promise.resolve().then(()=>require("./programming-framework-react-PDgmtZuN-4I-M6WEO.cjs")),"./programming-framework-vuedotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-vuedotjs-Cv46W2aB-CSjgwP_a.cjs")),"./programming-language-c.svg":()=>Promise.resolve().then(()=>require("./programming-language-c-hPGu2Zvg-DS__u0q2.cjs")),"./programming-language-clojure.svg":()=>Promise.resolve().then(()=>require("./programming-language-clojure-Cvmzky8x-DNGq1StI.cjs")),"./programming-language-csharp.svg":()=>Promise.resolve().then(()=>require("./programming-language-csharp-lqX1oWgb-CxB0WO6j.cjs")),"./programming-language-css3.svg":()=>Promise.resolve().then(()=>require("./programming-language-css3-Dpp4Cr6b-BpPnE1ET.cjs")),"./programming-language-go.svg":()=>Promise.resolve().then(()=>require("./programming-language-go-DoJxWwT6-Cglob461.cjs")),"./programming-language-html5.svg":()=>Promise.resolve().then(()=>require("./programming-language-html5-DlqJK4EL-DFJ6lim3.cjs")),"./programming-language-http.svg":()=>Promise.resolve().then(()=>require("./programming-language-http-wMYwFS1I-CibNNxob.cjs")),"./programming-language-java.svg":()=>Promise.resolve().then(()=>require("./programming-language-java-BCxG2T_w-CK_n5AN7.cjs")),"./programming-language-javascript.svg":()=>Promise.resolve().then(()=>require("./programming-language-javascript-VxLvi1QG-CaGGjM9H.cjs")),"./programming-language-json.svg":()=>Promise.resolve().then(()=>require("./programming-language-json-vEX_g7Zi-DzQJGa14.cjs")),"./programming-language-kotlin.svg":()=>Promise.resolve().then(()=>require("./programming-language-kotlin-DKV8vP9h-DlGiFCvD.cjs")),"./programming-language-node.svg":()=>Promise.resolve().then(()=>require("./programming-language-node-Xsgx38lm-4rntKdSG.cjs")),"./programming-language-objc.svg":()=>Promise.resolve().then(()=>require("./programming-language-objc-BQXSOBsX-ChHn3rog.cjs")),"./programming-language-ocaml.svg":()=>Promise.resolve().then(()=>require("./programming-language-ocaml-BEz7gGv7-pjGiVCW2.cjs")),"./programming-language-php.svg":()=>Promise.resolve().then(()=>require("./programming-language-php-GY38f8r4-ahFMWcim.cjs")),"./programming-language-powershell.svg":()=>Promise.resolve().then(()=>require("./programming-language-powershell-C9DkSp36-RwdG5MCL.cjs")),"./programming-language-python.svg":()=>Promise.resolve().then(()=>require("./programming-language-python-Ct-_kNjo-ujN06OXX.cjs")),"./programming-language-r.svg":()=>Promise.resolve().then(()=>require("./programming-language-r-BGoKwua9-DynRqt7q.cjs")),"./programming-language-ruby.svg":()=>Promise.resolve().then(()=>require("./programming-language-ruby-DhdM4d7g-DFwAUdk6.cjs")),"./programming-language-scala.svg":()=>Promise.resolve().then(()=>require("./programming-language-scala-BVg0dToJ-Dhg_XTFe.cjs")),"./programming-language-shell.svg":()=>Promise.resolve().then(()=>require("./programming-language-shell-BsTa1xI7-CEpfIQQF.cjs")),"./programming-language-swift.svg":()=>Promise.resolve().then(()=>require("./programming-language-swift-Dn72xPjg-DtICVxss.cjs")),"./programming-language-typescript.svg":()=>Promise.resolve().then(()=>require("./programming-language-typescript-CdF-HuRi-jq2P_J1a.cjs")),"./programming-script-code.svg":()=>Promise.resolve().then(()=>require("./programming-script-code-DQN1veb2-DWnN18iL.cjs")),"./programming-tool-git.svg":()=>Promise.resolve().then(()=>require("./programming-tool-git-DDnQ1zGD-Bi0r1H3m.cjs")),"./programming-tool-tailwindcss.svg":()=>Promise.resolve().then(()=>require("./programming-tool-tailwindcss-xjXi0E6g-CpFF5bAj.cjs"))}),Km=r=>{const e=`./${r}.svg`;return Hm[e]?i.defineAsyncComponent(Hm[e]):(console.warn(`Could not find icon: ${r}`),null)},p$=["src"],Me=i.defineComponent({__name:"ScalarIcon",props:{icon:{},size:{}},setup(r){const e=r,t=Eh({variants:{size:{xs:"h-3 w-3 stroke-[1.4]",sm:"h-3.5 w-3.5 stroke-[1.2]",md:"h-4 w-4 stroke-[1.1]",lg:"h-5 w-5",xl:"h-6 w-6 stroke-[0.96]","2xl":"h-8 w-8 stroke-[0.92]","3xl":"h-10 w-10 stroke-[0.9]",full:"h-full w-full"}},defaultVariants:{size:"full"}}),n=Km(e.icon);return(o,s)=>i.unref(n)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Km)(o.icon)),{key:0,class:i.normalizeClass(i.unref(so)("scalar-icon",i.unref(t)({size:o.size})))},null,8,["class"])):(i.openBlock(),i.createElementBlock("img",{key:1,src:o.icon},null,8,p$))}}),m$=["ariaDisabled"],g$={class:"sr-only"},Mi=i.defineComponent({__name:"ScalarIconButton",props:{label:{},icon:{},disabled:{type:Boolean},variant:{default:"ghost"},size:{default:"md"}},setup(r){const e=Eh({base:"scalar-icon-button grid aspect-square cursor-pointer rounded",variants:{size:{xs:"h-3.5 w-3.5 p-0.5",sm:"h-5 w-5 p-1",md:"h-10 w-10 p-3",full:"h-full w-full"},disabled:{true:"cursor-not-allowed shadow-none"},variant:Tv}});return(t,n)=>(i.openBlock(),i.createElementBlock("button",{ariaDisabled:t.disabled||void 0,class:i.normalizeClass(i.unref(so)(i.unref(e)({size:t.size,variant:t.variant,disabled:t.disabled}))),type:"button"},[i.createVNode(i.unref(Me),{icon:t.icon},null,8,["icon"]),i.createElementVNode("span",g$,i.toDisplayString(t.label),1)],10,m$))}}),y$={class:"sr-only"},v$=["value"],b$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchInput",props:{loading:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e;function n(s){t("update:modelValue",s.target.value)}const o=i.computed(()=>{const{class:s,...a}=i.useAttrs();return{className:s||"",rest:a}});return(s,a)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value.rest,{class:i.unref(so)("flex rounded border bg-back-1 text-sm font-medium focus-within:border-fore-1",o.value.className)}),[i.createElementVNode("span",y$,[i.renderSlot(s.$slots,"label",{},()=>[i.createTextVNode("Enter search")])]),i.createElementVNode("input",{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 rounded bg-transparent p-3 outline-none",placeholder:"Search...",spellcheck:"false",type:"text",value:s.modelValue,onInput:n},null,40,v$),s.loading&&s.loading.isLoading?(i.openBlock(),i.createBlock(i.unref(Ov),{key:0,class:"mr-3 self-center",loadingState:s.loading,size:"20px"},null,8,["loadingState"])):s.modelValue?(i.openBlock(),i.createBlock(i.unref(Mi),{key:1,class:"self-center",icon:"Close",label:"Clear Search",size:"md",onClick:a[0]||(a[0]=l=>t("update:modelValue",""))})):i.createCommentVNode("",!0)],16))}}),w$={class:"flex flex-col items-center gap-2 px-3 py-4"},k$=i.createElementVNode("div",{class:"rotate-90 text-lg font-bold"},":(",-1),S$={class:"text-sm font-medium text-fore-2"},x$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultList",props:{noResults:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("ul",i.mergeProps(e.value.rest,{class:i.unref(so)("flex flex-col",e.value.className)}),[t.noResults?i.renderSlot(t.$slots,"noResults",{key:0},()=>[i.createElementVNode("div",w$,[k$,i.createElementVNode("div",S$,[i.createTextVNode(" No results found "),t.$slots.query?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode('for "'),i.renderSlot(t.$slots,"query"),i.createTextVNode('"')],64)):i.createCommentVNode("",!0)])])]):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")],16))}}),C$={class:"contents"},E$={class:"text-fore-3 group-hover:text-fore-1"},$$={class:"flex min-w-0 flex-1 flex-col gap-0.75"},_$={class:"flex items-center gap-1"},N$={class:"flex-1 truncate text-sm font-medium"},A$={key:0,class:"text-xs text-fore-2"},O$={class:"truncate text-xs text-fore-2"},T$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultItem",props:{icon:{},active:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("li",C$,[i.createElementVNode("a",i.mergeProps(e.value.rest,{class:i.unref(so)("group flex cursor-pointer gap-3 rounded px-3 py-1.5 no-underline hover:bg-back-2",{"bg-back-2":t.active},e.value.className)}),[i.createElementVNode("div",E$,[i.renderSlot(t.$slots,"icon",{},()=>[t.icon?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,icon:t.icon,size:"sm"},null,8,["icon"])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",$$,[i.createElementVNode("div",_$,[i.createElementVNode("div",N$,[i.renderSlot(t.$slots,"default")]),t.$slots.addon?(i.openBlock(),i.createElementBlock("div",A$,[i.renderSlot(t.$slots,"addon")])):i.createCommentVNode("",!0)]),i.createElementVNode("div",O$,[i.renderSlot(t.$slots,"description")])])],16)]))}}),B$={class:"card-form-input"},P$=["for"],I$=["id","type"],M$=i.defineComponent({inheritAttrs:!1,__name:"CardFormTextInput",props:{id:{},type:{}},setup(r){const e=r,t=i.ref(!0),n=i.computed(()=>e.type==="password"?t.value?"password":"text":e.type??"text");return(o,s)=>(i.openBlock(),i.createElementBlock("div",B$,[i.createElementVNode("label",{for:o.id},[i.renderSlot(o.$slots,"default",{},void 0,!0)],8,P$),i.createElementVNode("input",i.mergeProps(o.$attrs,{id:o.id,autocomplete:"off","data-1p-ignore":"",spellcheck:"false",type:n.value}),null,16,I$),o.type==="password"?(i.openBlock(),i.createBlock(i.unref(Mi),{key:0,class:"password-mask",icon:t.value?"Show":"Hide",label:t.value?"Show Password":"Hide Password",onClick:s[0]||(s[0]=a=>t.value=!t.value)},null,8,["icon","label"])):i.createCommentVNode("",!0)]))}}),go=U(M$,[["__scopeId","data-v-623edb4f"]]),D$=r=>(i.pushScopeId("data-v-5ac9a107"),r=r(),i.popScopeId(),r),V$={class:"scopes-label"},R$=D$(()=>i.createElementVNode("em",null,"/",-1)),L$=["checked"],j$={class:"dropdown-item-title"},F$={class:"dropdown-item-description"},q$=i.defineComponent({__name:"SecuritySchemeScopes",props:{scopes:{},selected:{}},emits:["update:selected"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=i.ref(),{floatingStyles:a}=r$(o,s,{placement:"bottom-end",whileElementsMounted:XE,middleware:[TE(5),ZE(),QE()]}),l=i.computed({get:()=>t.selected,set:c=>n("update:selected",c)});return(c,d)=>(i.openBlock(),i.createBlock(i.unref(Le.Listbox),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=u=>l.value=u),multiple:""},{default:i.withCtx(({open:u})=>[i.createElementVNode("div",{ref_key:"trigger",ref:o,class:i.normalizeClass(["wrapper",{"wrapper-open":u}])},[i.createVNode(i.unref(Le.ListboxButton),{as:uv},{default:i.withCtx(()=>[i.createElementVNode("div",V$,[i.createTextVNode(" Scopes "+i.toDisplayString(l.value.length),1),R$,i.createTextVNode(i.toDisplayString(Object.entries(c.scopes).length)+" ",1),i.createVNode(i.unref(Me),{icon:u?"ChevronUp":"ChevronDown",size:"sm"},null,8,["icon"])])]),_:2},1024)],2),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.unref(Qg),null,{default:i.withCtx(({styles:h})=>[i.createElementVNode("div",{ref_key:"dropdown",ref:s,class:i.normalizeClass(["floating",h]),style:i.normalizeStyle(i.unref(a))},[i.createVNode(i.unref(Le.ListboxOptions),{as:"dl",class:"dropdown"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(c.scopes),([f,p])=>(i.openBlock(),i.createBlock(i.unref(Le.ListboxOption),{key:f,as:"div",class:"dropdown-item",value:f},{default:i.withCtx(({selected:m})=>[i.createElementVNode("input",{checked:m,class:"dropdown-item-check",tabindex:"-1",type:"checkbox"},null,8,L$),i.createElementVNode("dt",j$,i.toDisplayString(f),1),i.createElementVNode("dd",F$,i.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})],6)]),_:1})]))]),_:1},8,["modelValue"]))}}),z$=U(q$,[["__scopeId","data-v-5ac9a107"]]),H$=i.defineComponent({__name:"SecurityScheme",props:{value:{}},setup(r){const{authentication:e,setAuthentication:t}=rs(),n=h=>{t({apiKey:{...e.apiKey,token:h.target.value}})},o=h=>{t({http:{...e.http,basic:{...e.http.basic,username:h.target.value}}})},s=h=>{t({http:{...e.http,basic:{...e.http.basic,password:h.target.value}}})},a=h=>{t({http:{...e.http,bearer:{...e.http.bearer,token:h.target.value}}})},l=h=>{t({oAuth2:{...e.oAuth2,clientId:h.target.value}})},c=h=>{const f=e.oAuth2.scopes.join(" "),p=(Math.random()+1).toString(36).substring(7),m=new URL(h.authorizationUrl);return t({oAuth2:{...e.oAuth2,state:p}}),m.searchParams.set("response_type","token"),m.searchParams.set("client_id",e.oAuth2.clientId),m.searchParams.set("redirect_uri",window.location.href),m.searchParams.set("scope",f),m.searchParams.set("state",p),m.toString()},d=i.computed({get:()=>e.oAuth2.scopes,set:h=>t({oAuth2:{...e.oAuth2,scopes:h}})}),u=h=>{const p=window.open(h,"openAuth2Window","left=100,top=100,width=800,height=600");if(p){const m=setInterval(function(){var g;try{const v=new URLSearchParams(p.location.href).get("access_token");if(p.closed||v){clearInterval(m);const b=(g=p.location.href.match(/state=([^&]*)/))==null?void 0:g[1];v&&e.oAuth2.state===b&&t({oAuth2:{...e.oAuth2,accessToken:v}}),p.close()}}catch{}},200)}};return(h,f)=>{var p;return h.value&&((p=h.value)!=null&&p.type)?(i.openBlock(),i.createBlock(M2,{key:0},{default:i.withCtx(()=>[h.value.type==="apiKey"?(i.openBlock(),i.createBlock(go,{key:0,id:`security-scheme-${h.value.name}`,placeholder:"Token",type:"password",value:i.unref(e).apiKey.token,onInput:n},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h.value.in.charAt(0).toUpperCase()+h.value.in.slice(1))+" API ",1)]),_:1},8,["id","value"])):h.value.type==="http"||h.value.type==="basic"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[h.value.type==="basic"||h.value.scheme==="basic"?(i.openBlock(),i.createBlock(Tm,{key:0},{default:i.withCtx(()=>[i.createVNode(go,{id:"http.basic.username",placeholder:"Username",value:i.unref(e).http.basic.username,onInput:o},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode(go,{id:"http.basic.password",placeholder:"Password",type:"password",value:i.unref(e).http.basic.password,onInput:s},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1})):h.value.type==="http"&&h.value.scheme==="bearer"?(i.openBlock(),i.createBlock(go,{key:1,id:"http.bearer.token",placeholder:"Token",type:"password",value:i.unref(e).http.bearer.token,onInput:a},{default:i.withCtx(()=>[i.createTextVNode(" Bearer Token ")]),_:1},8,["value"])):i.createCommentVNode("",!0)],64)):h.value.type.toLowerCase()==="oauth2"&&h.value.flows&&h.value.flows.implicit?(i.openBlock(),i.createBlock(Tm,{key:2},{default:i.withCtx(()=>[i.unref(e).oAuth2.accessToken?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(go,{id:"oAuth2.accessToken",placeholder:"xxxxx",type:"password",value:i.unref(e).oAuth2.accessToken},{default:i.withCtx(()=>[i.createTextVNode(" Access Token ")]),_:1},8,["value"]),i.createVNode(uv,{onClick:f[0]||(f[0]=()=>i.unref(t)({oAuth2:{...i.unref(e).oAuth2,accessToken:"",state:""}}))},{default:i.withCtx(()=>[i.createTextVNode(" Reset ")]),_:1})],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createVNode(go,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(e).oAuth2.clientId,onInput:l},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),h.value!==void 0?(i.openBlock(),i.createBlock(z$,{key:0,selected:d.value,"onUpdate:selected":f[1]||(f[1]=m=>d.value=m),scopes:h.value.flows.implicit.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",onClick:f[2]||(f[2]=()=>{var m;return u(c((m=h.value)==null?void 0:m.flows.implicit))})}," Authorize ")],64))]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}}),Bv=U(H$,[["__scopeId","data-v-146c2c6e"]]),K$=r=>(i.pushScopeId("data-v-073bf07f"),r=r(),i.popScopeId(),r),U$={key:1,class:"security-scheme-selector"},W$=["value"],G$=K$(()=>i.createElementVNode("option",{value:""},"None",-1)),J$=["value"],Y$=i.defineComponent({__name:"SecuritySchemeSelector",props:{value:{}},emits:["input"],setup(r,{emit:e}){const t=r,n=e,{authentication:o,setAuthentication:s}=rs(),a=y=>{l(y.target.value)};i.onMounted(()=>{o.preferredSecurityScheme||l(Object.keys(t.value??{})[0]??null)});const l=y=>{s({preferredSecurityScheme:y}),n("input",y)};i.onServerPrefetch(()=>l(Object.keys(t.value??{})[0]??null));const c=y=>!(y!=null&&y.type),d=y=>y.type.toLowerCase()==="apikey",u=y=>y.type==="http"&&y.scheme.toLowerCase()==="basic"||y.type.toLowerCase()==="basic",h=y=>y.type==="http"&&y.scheme.toLowerCase()==="bearer",f=y=>y.type.toLowerCase()==="oauth2",p=(y,v)=>`${m(y)} (${v})`,m=y=>c(y)?"No Authentication":d(y)?"API Key":u(y)?"Basic Authentication":h(y)?"Bearer Authentication":f(y)?"OAuth 2.0":`${y.type} (not yet supported)`,g=i.computed(()=>Object.keys(t.value??{}));return(y,v)=>{var b,w;return g.value.length===1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(p((b=y.value)==null?void 0:b[g.value[0]],g.value[0])),1)],64)):g.value.length>1?(i.openBlock(),i.createElementBlock("div",U$,[i.createElementVNode("span",null,i.toDisplayString(i.unref(o).preferredSecurityScheme?p((w=y.value)==null?void 0:w[i.unref(o).preferredSecurityScheme],i.unref(o).preferredSecurityScheme):"None"),1),i.createVNode(i.unref(Me),{icon:"ChevronDown"}),i.createElementVNode("select",{value:i.unref(o).preferredSecurityScheme,onClick:v[0]||(v[0]=i.withModifiers(()=>{},["prevent"])),onInput:a},[G$,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,S=>{var x;return i.openBlock(),i.createElementBlock("option",{key:S,value:S??null},i.toDisplayString(p((x=y.value)==null?void 0:x[S],S)),9,J$)}),128))],40,W$)])):i.createCommentVNode("",!0)}}}),Pv=U(Y$,[["__scopeId","data-v-073bf07f"]]);var $h={};/*!
|
|
62
|
+
--\u2028\u2029\uFEFF-]`,ru),nC={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Hc=null;function oC(){var r;if(Hc==null&&typeof document<"u"&&document.body){let e=document.body.style;Hc=((r=e.tabSize)!==null&&r!==void 0?r:e.MozTabSize)!=null}return Hc||!1}const qa=Z.define({combine(r){let e=zl(r,{render:null,specialChars:rC,addSpecialChars:null});return(e.replaceTabs=!oC())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ru)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ru)),e}});function sC(r={}){return[qa.of(r),iC()]}let cm=null;function iC(){return cm||(cm=Vt.fromClass(class{constructor(r){this.view=r,this.decorations=Be.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(r.state.facet(qa)),this.decorations=this.decorator.createDeco(r)}makeDecorator(r){return new By({regexp:r.specialChars,decoration:(e,t,n)=>{let{doc:o}=t.state,s=Io(e[0],0);if(s==9){let a=o.lineAt(n),l=t.state.tabSize,c=oh(a.text,l,n-a.from);return Be.replace({widget:new dC((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Be.replace({widget:new cC(r,s)}))},boundary:r.replaceTabs?void 0:/[^]/})}update(r){let e=r.state.facet(qa);r.startState.facet(qa)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(r.view)):this.decorations=this.decorator.updateDeco(r,this.decorations)}},{decorations:r=>r.decorations}))}const aC="•";function lC(r){return r>=32?aC:r==10?"":String.fromCharCode(9216+r)}class cC extends ns{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=lC(this.code),n=e.state.phrase("Control character")+" "+(nC[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,t);if(o)return o;let s=document.createElement("span");return s.textContent=t,s.title=n,s.setAttribute("aria-label",n),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class dC extends ns{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const Is="-10000px";class uC{constructor(e,t,n,o){this.facet=t,this.createTooltipView=n,this.removeTooltipView=o,this.input=e.state.facet(t),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=n(a,s))}update(e,t){var n;let o=e.state.facet(this.facet),s=o.filter(c=>c);if(o===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let a=[],l=t?[]:null;for(let c=0;c<s.length;c++){let d=s[c],u=-1;if(d){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==d.create&&(u=h)}if(u<0)a[c]=this.createTooltipView(d,c?a[c-1]:null),l&&(l[c]=!!d.above);else{let h=a[c]=this.tooltipViews[u];l&&(l[c]=t[u]),h.update&&h.update(e)}}}for(let c of this.tooltipViews)a.indexOf(c)<0&&(this.removeTooltipView(c),(n=c.destroy)===null||n===void 0||n.call(c));return t&&(l.forEach((c,d)=>t[d]=c),t.length=l.length),this.input=o,this.tooltips=s,this.tooltipViews=a,!0}}function hC(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Kc=Z.define({combine:r=>{var e,t,n;return{position:G.ios?"absolute":((e=r.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(o=>o.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(o=>o.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||hC}}}),dm=new WeakMap,Py=Vt.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(Kc);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new uC(r,Iy,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(Kc);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",t.dom.insertBefore(o,n)}return t.dom.style.position=this.position,t.dom.style.top=Is,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(G.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==Is&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(e=o.width/this.parent.offsetWidth,t=o.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(Kc).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:n,scaleX:o,scaleY:s}=r,a=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],d=this.manager.tooltipViews[l],{dom:u}=d,h=r.pos[l],f=r.size[l];if(!h||h.bottom<=Math.max(t.top,n.top)||h.top>=Math.min(t.bottom,n.bottom)||h.right<Math.max(t.left,n.left)-.1||h.left>Math.min(t.right,n.right)+.1){u.style.top=Is;continue}let p=c.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=f.right-f.left,y=(e=dm.get(d))!==null&&e!==void 0?e:f.bottom-f.top,v=d.offset||pC,b=this.view.textDirection==exports.Direction.LTR,w=f.width>n.right-n.left?b?n.left:n.right-f.width:b?Math.min(h.left-(p?14:0)+v.x,n.right-g):Math.max(n.left,h.left-g+(p?14:0)-v.x),S=this.above[l];!c.strictSide&&(S?h.top-(f.bottom-f.top)-v.y<n.top:h.bottom+(f.bottom-f.top)+v.y>n.bottom)&&S==n.bottom-h.bottom>h.top-n.top&&(S=this.above[l]=!S);let x=(S?h.top-n.top:n.bottom-h.bottom)-m;if(x<y&&d.resize!==!1){if(x<this.view.defaultLineHeight){u.style.top=Is;continue}dm.set(d,y),u.style.height=(y=x)/s+"px"}else u.style.height&&(u.style.height="");let k=S?h.top-y-m-v.y:h.bottom+m+v.y,C=w+g;if(d.overlap!==!0)for(let N of a)N.left<C&&N.right>w&&N.top<k+y&&N.bottom>k&&(k=S?N.top-y-2-m:N.bottom+m+2);if(this.position=="absolute"?(u.style.top=(k-r.parent.top)/s+"px",u.style.left=(w-r.parent.left)/o+"px"):(u.style.top=k/s+"px",u.style.left=w/o+"px"),p){let N=h.left+(b?v.x:-v.x)-(w+14-7);p.style.left=N/o+"px"}d.overlap!==!0&&a.push({left:w,top:k,right:C,bottom:k+y}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),d.positioned&&d.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Is}},{eventObservers:{scroll(){this.maybeMeasure()}}}),fC=ue.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),pC={x:0,y:0},Iy=Z.define({enables:[Py,fC]});function mC(r,e){let t=r.plugin(Py);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}class Xn extends Gn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Xn.prototype.elementClass="";Xn.prototype.toDOM=void 0;Xn.prototype.mapMode=exports.MapMode.TrackBefore;Xn.prototype.startSide=Xn.prototype.endSide=-1;Xn.prototype.point=!0;const Uc=Z.define(),za=Z.define(),nu=Z.define({combine:r=>r.some(e=>e)});function gC(r){let e=[yC];return r&&r.fixed===!1&&e.push(nu.of(!0)),e}const yC=Vt.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(za).map(e=>new hm(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(nu),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(nu)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(Uc),this.view.viewport.from),n=[],o=this.gutters.map(s=>new vC(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==Xt.Text&&a){ou(t,n,l.from);for(let c of o)c.line(this.view,l,n);a=!1}else if(l.widget)for(let c of o)c.widget(this.view,l)}else if(s.type==Xt.Text){ou(t,n,s.from);for(let a of o)a.line(this.view,s,n)}else if(s.widget)for(let a of o)a.widget(this.view,s);for(let s of o)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(za),t=r.state.facet(za),n=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(Uc),r.state.facet(Uc),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let o of this.gutters)o.update(r)&&(n=!0);else{n=!0;let o=[];for(let s of t){let a=e.indexOf(s);a<0?o.push(new hm(this.view,s)):(this.gutters[a].update(r),o.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),o.indexOf(s)<0&&s.destroy();for(let s of o)this.dom.appendChild(s.dom);this.gutters=o}return n}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:r=>ue.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==exports.Direction.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function um(r){return Array.isArray(r)?r:[r]}function ou(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}class vC{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:o}=this,s=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==o.elements.length){let l=new My(e,a,s,n);o.elements.push(l),o.dom.appendChild(l.dom)}else o.elements[this.i].update(e,a,s,n);this.height=t.bottom,this.i++}line(e,t,n){let o=[];ou(this.cursor,o,t.from),n.length&&(o=o.concat(n));let s=this.gutter.config.lineMarker(e,t,o);s&&o.unshift(s);let a=this.gutter;o.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,o)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class hm{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,o=>{let s=o.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=o.clientY;let l=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,l,o)&&o.preventDefault()});this.markers=um(t.markers(e)),t.initialSpacer&&(this.spacer=new My(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=um(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let n=e.view.viewport;return!be.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class My{constructor(e,t,n,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,o)}update(e,t,n,o){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),bC(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,t){let n="cm-gutterElement",o=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=s<t.length?t[s++]:null,d=!1;if(c){let u=c.elementClass;u&&(n+=" "+u);for(let h=a;h<this.markers.length;h++)if(this.markers[h].compare(c)){l=h,d=!0;break}}else l=this.markers.length;for(;a<l;){let u=this.markers[a++];if(u.toDOM){u.destroy(o);let h=o.nextSibling;o.remove(),o=h}}if(!c)break;c.toDOM&&(d?o=o.nextSibling:this.dom.insertBefore(c.toDOM(e),o)),d&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function bC(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}const wC=Z.define(),$o=Z.define({combine(r){return zl(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let o in t){let s=n[o],a=t[o];n[o]=s?(l,c,d)=>s(l,c,d)||a(l,c,d):a}return n}})}});class Wc extends Xn{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Gc(r,e){return r.state.facet($o).formatNumber(e,r.state)}const kC=za.compute([$o],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(wC)},lineMarker(e,t,n){return n.some(o=>o.toDOM)?null:new Wc(Gc(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet($o)!=e.state.facet($o),initialSpacer(e){return new Wc(Gc(e,fm(e.state.doc.lines)))},updateSpacer(e,t){let n=Gc(t.view,fm(t.view.state.doc.lines));return n==e.number?e:new Wc(n)},domEventHandlers:r.facet($o).domEventHandlers}));function SC(r={}){return[$o.of(r),gC(),kC]}function fm(r){let e=9;for(;e<r;)e=e*10+9;return e}const Dy=1024;let xC=0;class Pt{constructor(e,t){this.from=e,this.to=t}}class fe{constructor(e={}){this.id=xC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}fe.closedBy=new fe({deserialize:r=>r.split(" ")});fe.openedBy=new fe({deserialize:r=>r.split(" ")});fe.group=new fe({deserialize:r=>r.split(" ")});fe.isolate=new fe({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});fe.contextHash=new fe({perNode:!0});fe.lookAhead=new fe({perNode:!0});fe.mounted=new fe({perNode:!0});class vi{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[fe.mounted.id]}}const CC=Object.create(null);class pt{constructor(e,t,n,o=0){this.name=e,this.props=t,this.id=n,this.flags=o}static define(e){let t=e.props&&e.props.length?Object.create(null):CC,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new pt(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(o)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(fe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let o of n.split(" "))t[o]=e[n];return n=>{for(let o=n.prop(fe.group),s=-1;s<(o?o.length:0);s++){let a=t[s<0?n.name:o[s]];if(a)return a}}}}pt.none=new pt("",Object.create(null),0,8);class hh{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let o=null;for(let s of e){let a=s(n);a&&(o||(o=Object.assign({},n.props)),o[a[0].id]=a[1])}t.push(o?new pt(n.name,o,n.id,n.flags):n)}return new hh(t)}}const ga=new WeakMap,pm=new WeakMap;exports.IterMode=void 0;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(exports.IterMode||(exports.IterMode={}));class He{constructor(e,t,n,o,s){if(this.type=e,this.children=t,this.positions=n,this.length=o,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,l]of s)this.props[typeof a=="number"?a:a.id]=l}}toString(){let e=vi.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let o=n.toString();o&&(t&&(t+=","),t+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ul(this.topNode,e)}cursorAt(e,t=0,n=0){let o=ga.get(this)||this.topNode,s=new ul(o);return s.moveTo(e,t),ga.set(this,s._tree),s}get topNode(){return new at(this,0,0,null)}resolve(e,t=0){let n=bi(ga.get(this)||this.topNode,e,t,!1);return ga.set(this,n),n}resolveInner(e,t=0){let n=bi(pm.get(this)||this.topNode,e,t,!0);return pm.set(this,n),n}resolveStack(e,t=0){return _C(this,e,t)}iterate(e){let{enter:t,leave:n,from:o=0,to:s=this.length}=e,a=e.mode||0,l=(a&exports.IterMode.IncludeAnonymous)>0;for(let c=this.cursor(a|exports.IterMode.IncludeAnonymous);;){let d=!1;if(c.from<=s&&c.to>=o&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&n&&(l||!c.type.isAnonymous)&&n(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:mh(pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,o)=>new He(this.type,t,n,o,this.propValues),e.makeTree||((t,n,o)=>new He(pt.none,t,n,o)))}static build(e){return NC(e)}}He.empty=new He(pt.none,[],[],0);class fh{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new fh(this.buffer,this.index)}}class pn{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],o=this.set.types[t],s=o.name;if(/\W/.test(s)&&!o.isError&&(s=JSON.stringify(s)),e+=4,n==e)return s;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,t,n,o,s){let{buffer:a}=this,l=-1;for(let c=e;c!=t&&!(Vy(s,o,a[c+1],a[c+2])&&(l=c,n>0));c=a[c+3]);return l}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),a=0;for(let l=e,c=0;l<t;){s[c++]=o[l++],s[c++]=o[l++]-n;let d=s[c++]=o[l++]-n;s[c++]=o[l++]-e,a=Math.max(a,d)}return new pn(s,a,this.set)}}function Vy(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function bi(r,e,t,n){for(var o;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let a=!n&&r instanceof at&&r.index<0?null:r.parent;if(!a)return r;r=a}let s=n?0:exports.IterMode.IgnoreOverlays;if(n)for(let a=r,l=a.parent;l;a=l,l=a.parent)a instanceof at&&a.index<0&&((o=l.enter(e,t,s))===null||o===void 0?void 0:o.from)!=a.from&&(r=l);for(;;){let a=r.enter(e,t,s);if(!a)return r;r=a}}class Ry{cursor(e=0){return new ul(this,e)}getChild(e,t=null,n=null){let o=mm(this,e,t,n);return o.length?o[0]:null}getChildren(e,t=null,n=null){return mm(this,e,t,n)}resolve(e,t=0){return bi(this,e,t,!1)}resolveInner(e,t=0){return bi(this,e,t,!0)}matchContext(e){return su(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let o=t.lastChild;if(!o||o.to!=t.to)break;o.type.isError&&o.from==o.to?(n=t,t=o.prevSibling):t=o}return n}get node(){return this}get next(){return this.parent}}class at extends Ry{constructor(e,t,n,o){super(),this._tree=e,this.from=t,this.index=n,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,o,s=0){for(let a=this;;){for(let{children:l,positions:c}=a._tree,d=t>0?l.length:-1;e!=d;e+=t){let u=l[e],h=c[e]+a.from;if(Vy(o,n,h,h+u.length)){if(u instanceof pn){if(s&exports.IterMode.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,t,n-h,o);if(f>-1)return new gr(new EC(a,u,e,h),null,f)}else if(s&exports.IterMode.IncludeAnonymous||!u.type.isAnonymous||ph(u)){let f;if(!(s&exports.IterMode.IgnoreMounts)&&(f=vi.get(u))&&!f.overlay)return new at(f.tree,h,e,a);let p=new at(u,h,e,a);return s&exports.IterMode.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?u.children.length-1:0,t,n,o)}}}if(s&exports.IterMode.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let o;if(!(n&exports.IterMode.IgnoreOverlays)&&(o=vi.get(this._tree))&&o.overlay){let s=e-this.from;for(let{from:a,to:l}of o.overlay)if((t>0?a<=s:a<s)&&(t<0?l>=s:l>s))return new at(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function mm(r,e,t,n){let o=r.cursor(),s=[];if(!o.firstChild())return s;if(t!=null){for(let a=!1;!a;)if(a=o.type.is(t),!o.nextSibling())return s}for(;;){if(n!=null&&o.type.is(n))return s;if(o.type.is(e)&&s.push(o.node),!o.nextSibling())return n==null?s:[]}}function su(r,e,t=e.length-1){for(let n=r.parent;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class EC{constructor(e,t,n,o){this.parent=e,this.buffer=t,this.index=n,this.start=o}}class gr extends Ry{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new gr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&exports.IterMode.ExcludeBuffers)return null;let{buffer:o}=this.context,s=o.findChild(this.index+4,o.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new gr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new gr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,o=this.index+4,s=n.buffer[this.index+3];if(s>o){let a=n.buffer[this.index+1];e.push(n.slice(o,s,a)),t.push(0)}return new He(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ly(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let a=r[s];(a.from>t.from||a.to<t.to)&&(t=a,e=s)}let n=t instanceof at&&t.index<0?null:t.parent,o=r.slice();return n?o[e]=n:o.splice(e,1),new $C(o,t)}class $C{constructor(e,t){this.heads=e,this.node=t}get next(){return Ly(this.heads)}}function _C(r,e,t){let n=r.resolveInner(e,t),o=null;for(let s=n instanceof at?n:n.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(o||(o=[n])).push(a.resolve(e,t)),s=a}else{let a=vi.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let l=new at(a.tree,a.overlay[0].from+s.from,-1,s);(o||(o=[n])).push(bi(l,e,t,!1))}}return o?Ly(o):n}class ul{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof at)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:o}=this.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=n+o.buffer[e+1],this.to=n+o.buffer[e+2],!0}yield(e){return e?e instanceof at?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:o}=this.buffer,s=o.findChild(this.index+4,o.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&exports.IterMode.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&exports.IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&exports.IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let o=n<0?0:this.stack[n]+4;if(this.index!=o)return this.yieldBuf(t.findChild(o,this.index,-1,0,4))}else{let o=t.buffer[this.index+3];if(o<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(o)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:o}=this;if(o){if(e>0){if(this.index<o.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(o.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=o)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,a=e<0?-1:n._tree.children.length;s!=a;s+=e){let l=n._tree.children[s];if(this.mode&exports.IterMode.IncludeAnonymous||l instanceof pn||!l.type.isAnonymous||ph(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let o=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==o){if(o==this.index)return a;t=a,n=s+1;break e}o=this.stack[--s]}for(let o=n;o<this.stack.length;o++)t=new gr(this.buffer,t,this.stack[o]);return this.bufferNode=new gr(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let o=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(o=!0)}for(;o&&t&&t(this),o=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,o=!0}}}matchContext(e){if(!this.buffer)return su(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let o=e.length-1,s=this.stack.length-1;o>=0;s--){if(s<0)return su(this.node,e,o);let a=n[t.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[o]&&e[o]!=a.name)return!1;o--}}return!0}}function ph(r){return r.children.some(e=>e instanceof pn||!e.type.isAnonymous||ph(e))}function NC(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:o=Dy,reused:s=[],minRepeatType:a=n.types.length}=r,l=Array.isArray(t)?new fh(t,t.length):t,c=n.types,d=0,u=0;function h(x,k,C,N,P,M){let{id:j,start:I,end:X,size:W}=l,te=u;for(;W<0;)if(l.next(),W==-1){let q=s[j];C.push(q),N.push(I-x);return}else if(W==-3){d=j;return}else if(W==-4){u=j;return}else throw new RangeError(`Unrecognized record size: ${W}`);let me=c[j],ke,Se,se=I-x;if(X-I<=o&&(Se=y(l.pos-k,P))){let q=new Uint16Array(Se.size-Se.skip),T=l.pos-Se.size,V=q.length;for(;l.pos>T;)V=v(Se.start,q,V);ke=new pn(q,X-Se.start,n),se=Se.start-x}else{let q=l.pos-W;l.next();let T=[],V=[],D=j>=a?j:-1,E=0,A=X;for(;l.pos>q;)D>=0&&l.id==D&&l.size>=0?(l.end<=A-o&&(m(T,V,I,E,l.end,A,D,te),E=T.length,A=l.end),l.next()):M>2500?f(I,q,T,V):h(I,q,T,V,D,M+1);if(D>=0&&E>0&&E<T.length&&m(T,V,I,E,I,A,D,te),T.reverse(),V.reverse(),D>-1&&E>0){let B=p(me);ke=mh(me,T,V,0,T.length,0,X-I,B,B)}else ke=g(me,T,V,X-I,te-X)}C.push(ke),N.push(se)}function f(x,k,C,N){let P=[],M=0,j=-1;for(;l.pos>k;){let{id:I,start:X,end:W,size:te}=l;if(te>4)l.next();else{if(j>-1&&X<j)break;j<0&&(j=W-o),P.push(I,X,W),M++,l.next()}}if(M){let I=new Uint16Array(M*4),X=P[P.length-2];for(let W=P.length-3,te=0;W>=0;W-=3)I[te++]=P[W],I[te++]=P[W+1]-X,I[te++]=P[W+2]-X,I[te++]=te;C.push(new pn(I,P[2]-X,n)),N.push(X-x)}}function p(x){return(k,C,N)=>{let P=0,M=k.length-1,j,I;if(M>=0&&(j=k[M])instanceof He){if(!M&&j.type==x&&j.length==N)return j;(I=j.prop(fe.lookAhead))&&(P=C[M]+j.length+I)}return g(x,k,C,N,P)}}function m(x,k,C,N,P,M,j,I){let X=[],W=[];for(;x.length>N;)X.push(x.pop()),W.push(k.pop()+C-P);x.push(g(n.types[j],X,W,M-P,I-M)),k.push(P-C)}function g(x,k,C,N,P=0,M){if(d){let j=[fe.contextHash,d];M=M?[j].concat(M):[j]}if(P>25){let j=[fe.lookAhead,P];M=M?[j].concat(M):[j]}return new He(x,k,C,N,M)}function y(x,k){let C=l.fork(),N=0,P=0,M=0,j=C.end-o,I={size:0,start:0,skip:0};e:for(let X=C.pos-x;C.pos>X;){let W=C.size;if(C.id==k&&W>=0){I.size=N,I.start=P,I.skip=M,M+=4,N+=4,C.next();continue}let te=C.pos-W;if(W<0||te<X||C.start<j)break;let me=C.id>=a?4:0,ke=C.start;for(C.next();C.pos>te;){if(C.size<0)if(C.size==-3)me+=4;else break e;else C.id>=a&&(me+=4);C.next()}P=ke,N+=W,M+=me}return(k<0||N==x)&&(I.size=N,I.start=P,I.skip=M),I.size>4?I:void 0}function v(x,k,C){let{id:N,start:P,end:M,size:j}=l;if(l.next(),j>=0&&N<a){let I=C;if(j>4){let X=l.pos-(j-4);for(;l.pos>X;)C=v(x,k,C)}k[--C]=I,k[--C]=M-x,k[--C]=P-x,k[--C]=N}else j==-3?d=N:j==-4&&(u=N);return C}let b=[],w=[];for(;l.pos>0;)h(r.start||0,r.bufferStart||0,b,w,-1,0);let S=(e=r.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new He(c[r.topID],b.reverse(),w.reverse(),S)}const gm=new WeakMap;function Ha(r,e){if(!r.isAnonymous||e instanceof pn||e.type!=r)return 1;let t=gm.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof He)){t=1;break}t+=Ha(r,n)}gm.set(e,t)}return t}function mh(r,e,t,n,o,s,a,l,c){let d=0;for(let m=n;m<o;m++)d+=Ha(r,e[m]);let u=Math.ceil(d*1.5/8),h=[],f=[];function p(m,g,y,v,b){for(let w=y;w<v;){let S=w,x=g[w],k=Ha(r,m[w]);for(w++;w<v;w++){let C=Ha(r,m[w]);if(k+C>=u)break;k+=C}if(w==S+1){if(k>u){let C=m[S];p(C.children,C.positions,0,C.children.length,g[S]+b);continue}h.push(m[S])}else{let C=g[w-1]+m[w-1].length-x;h.push(mh(r,m,g,S,w,x,C,null,c))}f.push(x+b-s)}}return p(e,t,n,o,0),(l||c)(h,f,a)}class AC{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof gr?this.setBuffer(e.context.buffer,e.index,t):e instanceof at&&this.map.set(e.tree,t)}get(e){return e instanceof gr?this.getBuffer(e.context.buffer,e.index):e instanceof at?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Pr{constructor(e,t,n,o,s=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=o,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let o=[new Pr(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&o.push(s);return o}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],s=1,a=e.length?e[0]:null;for(let l=0,c=0,d=0;;l++){let u=l<t.length?t[l]:null,h=u?u.fromA:1e9;if(h-c>=n)for(;a&&a.from<h;){let f=a;if(c>=f.from||h<=f.to||d){let p=Math.max(f.from,c)-d,m=Math.min(f.to,h)-d;f=p>=m?null:new Pr(p,m,f.tree,f.offset+d,l>0,!!u)}if(f&&o.push(f),a.to>h)break;a=s<e.length?e[s++]:null}if(!u)break;c=u.toA,d=u.toA-u.toB}return o}}class jy{startParse(e,t,n){return typeof e=="string"&&(e=new OC(e)),n=n?n.length?n.map(o=>new Pt(o.from,o.to)):[new Pt(0,0)]:[new Pt(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let o=this.startParse(e,t,n);for(;;){let s=o.advance();if(s)return s}}}class OC{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function TC(r){return(e,t,n,o)=>new PC(e,r,t,n,o)}class ym{constructor(e,t,n,o,s){this.parser=e,this.parse=t,this.overlay=n,this.target=o,this.from=s}}function vm(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}class BC{constructor(e,t,n,o,s,a,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=o,this.start=s,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const iu=new fe({perNode:!0});class PC{constructor(e,t,n,o,s){this.nest=t,this.input=n,this.fragments=o,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new He(n.type,n.children,n.positions,n.length,n.propValues.concat([[iu,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[fe.mounted.id]=new vi(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new DC(this.fragments),t=null,n=null,o=new ul(new at(this.baseTree,this.ranges[0].from,0,null),exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts);e:for(let s,a;;){let l=!0,c;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)l=!1;else if(e.hasNode(o)){if(t){let d=t.mounts.find(u=>u.frag.from<=o.from&&u.frag.to>=o.to&&u.mount.overlay);if(d)for(let u of d.mount.overlay){let h=u.from+d.pos,f=u.to+d.pos;h>=o.from&&f<=o.to&&!t.ranges.some(p=>p.from<f&&p.to>h)&&t.ranges.push({from:h,to:f})}}l=!1}else if(n&&(a=IC(n.ranges,o.from,o.to)))l=a!=2;else if(!o.type.isAnonymous&&(s=this.nest(o,this.input))&&(o.from<o.to||!s.overlay)){o.tree||MC(o);let d=e.findMounts(o.from,s.parser);if(typeof s.overlay=="function")t=new BC(s.parser,s.overlay,d,this.inner.length,o.from,o.tree,t);else{let u=km(this.ranges,s.overlay||(o.from<o.to?[new Pt(o.from,o.to)]:[]));u.length&&vm(u),(u.length||!s.overlay)&&this.inner.push(new ym(s.parser,u.length?s.parser.startParse(this.input,Sm(d,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new Pt(h.from-o.from,h.to-o.from)):null,o.tree,u.length?u[0].from:o.from)),s.overlay?u.length&&(n={ranges:u,depth:0,prev:n}):l=!1}}else t&&(c=t.predicate(o))&&(c===!0&&(c=new Pt(o.from,o.to)),c.from<c.to&&t.ranges.push(c));if(l&&o.firstChild())t&&t.depth++,n&&n.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(t&&!--t.depth){let d=km(this.ranges,t.ranges);d.length&&(vm(d),this.inner.splice(t.index,0,new ym(t.parser,t.parser.startParse(this.input,Sm(t.mounts,d),d),t.ranges.map(u=>new Pt(u.from-t.start,u.to-t.start)),t.target,d[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function IC(r,e,t){for(let n of r){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function bm(r,e,t,n,o,s){if(e<t){let a=r.buffer[e+1];n.push(r.slice(e,t,a)),o.push(a-s)}}function MC(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let o=r.tree,s=o.children.indexOf(n),a=o.children[s],l=a.buffer,c=[s];function d(u,h,f,p,m,g){let y=t[g],v=[],b=[];bm(a,u,y,v,b,p);let w=l[y+1],S=l[y+2];c.push(v.length);let x=g?d(y+4,l[y+3],a.set.types[l[y]],w,S-w,g-1):e.toTree();return v.push(x),b.push(w-p),bm(a,l[y+3],h,v,b,p),new He(f,v,b,m)}o.children[s]=d(0,l.length,pt.none,0,a.length,t.length-1);for(let u of c){let h=r.tree.children[u],f=r.tree.positions[u];r.yield(new at(h,f+r.from,u,r._tree))}}class wm{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(exports.IterMode.IncludeAnonymous|exports.IterMode.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,exports.IterMode.IgnoreOverlays|exports.IterMode.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof He)t=t.children[0];else break}return!1}}class DC{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(iu))!==null&&t!==void 0?t:n.to,this.inner=new wm(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(iu))!==null&&e!==void 0?e:t.to,this.inner=new wm(t.tree,-t.offset)}}findMounts(e,t){var n;let o=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(n=s.tree)===null||n===void 0?void 0:n.prop(fe.mounted);if(a&&a.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&o.push({frag:c,pos:s.from-c.offset,mount:a})}}}return o}}function km(r,e){let t=null,n=e;for(let o=1,s=0;o<r.length;o++){let a=r[o-1].to,l=r[o].from;for(;s<n.length;s++){let c=n[s];if(c.from>=l)break;c.to<=a||(t||(n=t=e.slice()),c.from<a?(t[s]=new Pt(c.from,a),c.to>l&&t.splice(s+1,0,new Pt(l,c.to))):c.to>l?t[s--]=new Pt(l,c.to):t.splice(s--,1))}}return n}function VC(r,e,t,n){let o=0,s=0,a=!1,l=!1,c=-1e9,d=[];for(;;){let u=o==r.length?1e9:a?r[o].to:r[o].from,h=s==e.length?1e9:l?e[s].to:e[s].from;if(a!=l){let f=Math.max(c,t),p=Math.min(u,h,n);f<p&&d.push(new Pt(f,p))}if(c=Math.min(u,h),c==1e9)break;u==c&&(a?(a=!1,o++):a=!0),h==c&&(l?(l=!1,s++):l=!0)}return d}function Sm(r,e){let t=[];for(let{pos:n,mount:o,frag:s}of r){let a=n+(o.overlay?o.overlay[0].from:0),l=a+o.tree.length,c=Math.max(s.from,a),d=Math.min(s.to,l);if(o.overlay){let u=o.overlay.map(f=>new Pt(f.from+n,f.to+n)),h=VC(e,u,c,d);for(let f=0,p=c;;f++){let m=f==h.length,g=m?d:h[f].from;if(g>p&&t.push(new Pr(p,g,o.tree,-a,s.from>=p||s.openStart,s.to<=g||s.openEnd)),m)break;p=h[f].to}}else t.push(new Pr(c,d,o.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return t}let RC=0,Qr=class Fy{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=RC++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new Fy([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new hl;return t=>t.modified.indexOf(e)>-1?t:hl.get(t.base||t,t.modified.concat(e).sort((n,o)=>n.id-o.id))}},LC=0;class hl{constructor(){this.instances=[],this.id=LC++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(l=>l.base==e&&jC(t,l.modified));if(n)return n;let o=[],s=new Qr(o,e,t);for(let l of t)l.instances.push(s);let a=FC(t);for(let l of e.set)if(!l.modified.length)for(let c of a)o.push(hl.get(l,c));return s}}function jC(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function FC(r){let e=[[]];for(let t=0;t<r.length;t++)for(let n=0,o=e.length;n<o;n++)e.push(e[n].concat(r[t]));return e.sort((t,n)=>n.length-t.length)}function qy(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let o of t.split(" "))if(o){let s=[],a=2,l=o;for(let h=0;;){if(l=="..."&&h>0&&h+3==o.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+o);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==o.length)break;let p=o[h++];if(h==o.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+o);l=o.slice(h)}let c=s.length-1,d=s[c];if(!d)throw new RangeError("Invalid path: "+o);let u=new fl(n,a,c>0?s.slice(0,c):null);e[d]=u.sort(e[d])}}return zy.add(e)}const zy=new fe;class fl{constructor(e,t,n,o){this.tags=e,this.mode=t,this.context=n,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}fl.empty=new fl([],2,null);function Hy(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let a of s.tag)t[a.id]=s.class;let{scope:n,all:o=null}=e||{};return{style:s=>{let a=o;for(let l of s)for(let c of l.set){let d=t[c.id];if(d){a=a?a+" "+d:d;break}}return a},scope:n}}function qC(r,e){let t=null;for(let n of r){let o=n.style(e);o&&(t=t?t+" "+o:o)}return t}function zC(r,e,t,n=0,o=r.length){let s=new HC(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,o,"",s.highlighters),s.flush(o)}class HC{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,o,s){let{type:a,from:l,to:c}=e;if(l>=n||c<=t)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let d=o,u=KC(e)||fl.empty,h=qC(s,u.tags);if(h&&(d&&(d+=" "),d+=h,u.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(t,l),d),u.opaque)return;let f=e.tree&&e.tree.prop(fe.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+l,1),m=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,v=l;;y++){let b=y<f.overlay.length?f.overlay[y]:null,w=b?b.from+l:c,S=Math.max(t,v),x=Math.min(n,w);if(S<x&&g)for(;e.from<x&&(this.highlightRange(e,S,x,o,s),this.startSpan(Math.min(x,e.to),d),!(e.to>=w||!e.nextSibling())););if(!b||w>n)break;v=b.to+l,v>t&&(this.highlightRange(p.cursor(),Math.max(t,b.from+l),Math.min(n,v),"",m),this.startSpan(Math.min(n,v),d))}g&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,o,s),this.startSpan(Math.min(n,e.to),d)}while(e.nextSibling());e.parent()}}}function KC(r){let e=r.type.prop(zy);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const K=Qr.define,ya=K(),Zr=K(),xm=K(Zr),Cm=K(Zr),en=K(),va=K(en),Jc=K(en),dr=K(),Nn=K(dr),lr=K(),cr=K(),au=K(),Ms=K(au),ba=K(),F={comment:ya,lineComment:K(ya),blockComment:K(ya),docComment:K(ya),name:Zr,variableName:K(Zr),typeName:xm,tagName:K(xm),propertyName:Cm,attributeName:K(Cm),className:K(Zr),labelName:K(Zr),namespace:K(Zr),macroName:K(Zr),literal:en,string:va,docString:K(va),character:K(va),attributeValue:K(va),number:Jc,integer:K(Jc),float:K(Jc),bool:K(en),regexp:K(en),escape:K(en),color:K(en),url:K(en),keyword:lr,self:K(lr),null:K(lr),atom:K(lr),unit:K(lr),modifier:K(lr),operatorKeyword:K(lr),controlKeyword:K(lr),definitionKeyword:K(lr),moduleKeyword:K(lr),operator:cr,derefOperator:K(cr),arithmeticOperator:K(cr),logicOperator:K(cr),bitwiseOperator:K(cr),compareOperator:K(cr),updateOperator:K(cr),definitionOperator:K(cr),typeOperator:K(cr),controlOperator:K(cr),punctuation:au,separator:K(au),bracket:Ms,angleBracket:K(Ms),squareBracket:K(Ms),paren:K(Ms),brace:K(Ms),content:dr,heading:Nn,heading1:K(Nn),heading2:K(Nn),heading3:K(Nn),heading4:K(Nn),heading5:K(Nn),heading6:K(Nn),contentSeparator:K(dr),list:K(dr),quote:K(dr),emphasis:K(dr),strong:K(dr),link:K(dr),monospace:K(dr),strikethrough:K(dr),inserted:K(),deleted:K(),changed:K(),invalid:K(),meta:ba,documentMeta:K(ba),annotation:K(ba),processingInstruction:K(ba),definition:Qr.defineModifier(),constant:Qr.defineModifier(),function:Qr.defineModifier(),standard:Qr.defineModifier(),local:Qr.defineModifier(),special:Qr.defineModifier()};Hy([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var Yc;const _o=new fe;function Ky(r){return Z.define({combine:r?e=>e.concat(r):void 0})}const Uy=new fe;class Gt{constructor(e,t,n=[],o=""){this.data=e,this.name=o,ve.prototype.hasOwnProperty("tree")||Object.defineProperty(ve.prototype,"tree",{get(){return mn(this)}}),this.parser=t,this.extension=[Wo.of(this),ve.languageData.of((s,a,l)=>{let c=Em(s,a,l),d=c.type.prop(_o);if(!d)return[];let u=s.facet(d),h=c.type.prop(Uy);if(h){let f=c.resolve(a-c.from,l);for(let p of h)if(p.test(f,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return Em(e,t,n).type.prop(_o)==this.data}findRegions(e){let t=e.facet(Wo);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(s,a)=>{if(s.prop(_o)==this.data){n.push({from:a,to:a+s.length});return}let l=s.prop(fe.mounted);if(l){if(l.tree.prop(_o)==this.data){if(l.overlay)for(let c of l.overlay)n.push({from:c.from+a,to:c.to+a});else n.push({from:a,to:a+s.length});return}else if(l.overlay){let c=n.length;if(o(l.tree,l.overlay[0].from+a),n.length>c)return}}for(let c=0;c<s.children.length;c++){let d=s.children[c];d instanceof He&&o(d,s.positions[c]+a)}};return o(mn(e),0),n}get allowsNesting(){return!0}}Gt.setState=We.define();function Em(r,e,t){let n=r.facet(Wo),o=mn(r).topNode;if(!n||n.allowsNesting)for(let s=o;s;s=s.enter(e,t,exports.IterMode.ExcludeBuffers))s.type.isTop&&(o=s);return o}class pl extends Gt{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=Ky(e.languageData);return new pl(t,e.parser.configure({props:[_o.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new pl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function mn(r){let e=r.field(Gt.state,!1);return e?e.tree:He.empty}class UC{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Ds=null;class ml{constructor(e,t,n=[],o,s,a,l,c){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new ml(e,t,[],He.empty,0,n,[],null)}startParse(){return this.parser.startParse(new UC(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=He.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o)if(this.fragments=this.withoutTempSkipped(Pr.addTree(o,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=o,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Pr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Ds;Ds=this;try{return e()}finally{Ds=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=$m(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((d,u,h,f)=>c.push({fromA:d,toA:u,fromB:h,toB:f})),n=Pr.applyChanges(n,c),o=He.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){l=[];for(let d of this.skipped){let u=e.mapPos(d.from,1),h=e.mapPos(d.to,-1);u<h&&l.push({from:u,to:h})}}}return new ml(this.parser,t,n,o,s,a,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:o,to:s}=this.skipped[n];o<e.to&&s>e.from&&(this.fragments=$m(this.fragments,o,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends jy{createParse(t,n,o){let s=o[0].from,a=o[o.length-1].to;return{parsedPos:s,advance(){let c=Ds;if(c){for(let d of o)c.tempSkipped.push(d);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=a,new He(pt.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Ds}}function $m(r,e,t){return Pr.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Uo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Uo(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ml.create(e.facet(Wo).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Uo(n)}}Gt.state=qr.define({create:Uo.init,update(r,e){for(let t of e.effects)if(t.is(Gt.setState))return t.value;return e.startState.facet(Wo)!=e.state.facet(Wo)?Uo.init(e.state):r.apply(e)}});let Wy=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Wy=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Xc=typeof navigator<"u"&&(!((Yc=navigator.scheduling)===null||Yc===void 0)&&Yc.isInputPending)?()=>navigator.scheduling.isInputPending():null,WC=Vt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Gt.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Gt.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Wy(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,s=n.field(Gt.state);if(s.tree==s.context.tree&&s.context.isDone(o+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Xc?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<o&&n.doc.length>o+1e3,c=s.context.work(()=>Xc&&Xc()||Date.now()>a,o+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Gt.setState.of(new Uo(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Br(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Wo=Z.define({combine(r){return r.length?r[0]:null},enables:r=>[Gt.state,WC,ue.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class GC{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const JC=Z.define(),gh=Z.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function Gy(r){let e=r.facet(gh);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function Jy(r,e){let t="",n=r.tabSize,o=r.facet(gh)[0];if(o==" "){for(;e>=n;)t+=" ",e-=n;o=" "}for(let s=0;s<e;s++)t+=o;return t}function YC(r,e){r instanceof ve&&(r=new Yy(r));for(let n of r.state.facet(JC)){let o=n(r,e);if(o!==void 0)return o}let t=mn(r.state);return t.length>=e?XC(r,t,e):null}class Yy{constructor(e,t={}){this.state=e,this.options=t,this.unit=Gy(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:s}=this.options;return o!=null&&o>=n.from&&o<=n.to?s&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.countColumn(n,e-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return oh(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let a=s(o);if(a>-1)return a}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Xy=new fe;function XC(r,e,t){let n=e.resolveStack(t),o=n.node.enterUnfinishedNodesBefore(t);if(o!=n.node){let s=[];for(let a=o;a!=n.node;a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)n={node:s[a],next:n}}return Qy(n,r,t)}function Qy(r,e,t){for(let n=r;n;n=n.next){let o=ZC(n.node);if(o)return o(yh.create(e,t,n))}return 0}function QC(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function ZC(r){let e=r.type.prop(Xy);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(fe.closedBy))){let o=r.lastChild,s=o&&n.indexOf(o.name)>-1;return a=>Zy(a,!0,1,void 0,s&&!QC(a)?o.from:void 0)}return r.parent==null?e2:null}function e2(){return 0}class yh extends Yy{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new yh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(t2(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Qy(this.context.next,this.base,this.pos)}}function t2(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function r2(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let o=r.options.simulateBreak,s=r.state.doc.lineAt(t.from),a=o==null||o<=s.from?s.to:Math.min(s.to,o);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==n)return null;if(!c.type.isSkipped)return c.from<a?t:null;l=c.to}}function n2({closing:r,align:e=!0,units:t=1}){return n=>Zy(n,e,t,r)}function Zy(r,e,t,n,o){let s=r.textAfter,a=s.match(/^\s*/)[0].length,l=n&&s.slice(a,a+n.length)==n||o==r.pos+a,c=e?r2(r):null;return c?l?r.column(c.from):r.column(c.to):r.baseIndent+(l?0:r.unit*t)}const o2=r=>r.baseIndent;function s2({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const i2=200;function a2(){return ve.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,o=t.lineAt(n);if(n>o.from+i2)return r;let s=t.sliceString(o.from,n);if(!e.some(d=>d.test(s)))return r;let{state:a}=r,l=-1,c=[];for(let{head:d}of a.selection.ranges){let u=a.doc.lineAt(d);if(u.from==l)continue;l=u.from;let h=YC(a,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],p=Jy(a,h);f!=p&&c.push({from:u.from,to:u.from+f.length,insert:p})}return c.length?[r,{changes:c,sequential:!0}]:r})}const l2=new fe;function c2(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}class Pi{constructor(e,t){this.specs=e;let n;function o(l){let c=un.newName();return(n||(n=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,a=t.scope;this.scope=a instanceof Gt?l=>l.prop(_o)==a.data:a?l=>l==a:void 0,this.style=Hy(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=n?new un(n):null,this.themeType=t.themeType}static define(e,t){return new Pi(e,t||{})}}const lu=Z.define(),ev=Z.define({combine(r){return r.length?[r[0]]:null}});function Qc(r){let e=r.facet(lu);return e.length?e:r.facet(ev)}function tv(r,e){let t=[u2],n;return r instanceof Pi&&(r.module&&t.push(ue.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(ev.of(r)):n?t.push(lu.computeN([ue.darkTheme],o=>o.facet(ue.darkTheme)==(n=="dark")?[r]:[])):t.push(lu.of(r)),t}class d2{constructor(e){this.markCache=Object.create(null),this.tree=mn(e.state),this.decorations=this.buildDeco(e,Qc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=mn(e.state),n=Qc(e.state),o=n!=Qc(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!o&&t.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Be.none;let n=new Ho;for(let{from:o,to:s}of e.visibleRanges)zC(this.tree,t,(a,l,c)=>{n.add(a,l,this.markCache[c]||(this.markCache[c]=Be.mark({class:c})))},o,s);return n.finish()}}const u2=Fl.high(Vt.fromClass(d2,{decorations:r=>r.decorations})),h2=Pi.define([{tag:F.meta,color:"#404740"},{tag:F.link,textDecoration:"underline"},{tag:F.heading,textDecoration:"underline",fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strong,fontWeight:"bold"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.keyword,color:"#708"},{tag:[F.atom,F.bool,F.url,F.contentSeparator,F.labelName],color:"#219"},{tag:[F.literal,F.inserted],color:"#164"},{tag:[F.string,F.deleted],color:"#a11"},{tag:[F.regexp,F.escape,F.special(F.string)],color:"#e40"},{tag:F.definition(F.variableName),color:"#00f"},{tag:F.local(F.variableName),color:"#30a"},{tag:[F.typeName,F.namespace],color:"#085"},{tag:F.className,color:"#167"},{tag:[F.special(F.variableName),F.macroName],color:"#256"},{tag:F.definition(F.propertyName),color:"#00c"},{tag:F.comment,color:"#940"},{tag:F.invalid,color:"#f00"}]),f2=ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),rv=1e4,nv="()[]{}",ov=Z.define({combine(r){return zl(r,{afterCursor:!0,brackets:nv,maxScanDistance:rv,renderMatch:g2})}}),p2=Be.mark({class:"cm-matchingBracket"}),m2=Be.mark({class:"cm-nonmatchingBracket"});function g2(r){let e=[],t=r.matched?p2:m2;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const y2=qr.define({create(){return Be.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(ov);for(let o of e.state.selection.ranges){if(!o.empty)continue;let s=wa(e.state,o.head,-1,n)||o.head>0&&wa(e.state,o.head-1,1,n)||n.afterCursor&&(wa(e.state,o.head,1,n)||o.head<e.state.doc.length&&wa(e.state,o.head+1,-1,n));s&&(t=t.concat(n.renderMatch(s,e.state)))}return Be.set(t,!0)},provide:r=>ue.decorations.from(r)}),v2=[y2,f2];function b2(r={}){return[ov.of(r),v2]}const sv=new fe;function cu(r,e,t){let n=r.prop(e<0?fe.openedBy:fe.closedBy);if(n)return n;if(r.name.length==1){let o=t.indexOf(r.name);if(o>-1&&o%2==(e<0?1:0))return[t[o+e]]}return null}function du(r){let e=r.type.prop(sv);return e?e(r.node):r}function wa(r,e,t,n={}){let o=n.maxScanDistance||rv,s=n.brackets||nv,a=mn(r),l=a.resolveInner(e,t);for(let c=l;c;c=c.parent){let d=cu(c.type,t,s);if(d&&c.from<c.to){let u=du(c);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return w2(r,e,t,c,u,d,s)}}return k2(r,e,t,a,l.type,o,s)}function w2(r,e,t,n,o,s,a){let l=n.parent,c={from:o.from,to:o.to},d=0,u=l==null?void 0:l.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(d==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let h=du(u);return{start:c,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(cu(u.type,t,a))d++;else if(cu(u.type,-t,a)){if(d==0){let h=du(u);return{start:c,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}d--}}while(t<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function k2(r,e,t,n,o,s,a){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),c=a.indexOf(l);if(c<0||c%2==0!=t>0)return null;let d={from:t<0?e-1:e,to:t>0?e+1:e},u=r.doc.iterRange(e,t>0?r.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=s;){let p=u.value;t<0&&(f+=p.length);let m=e+f*t;for(let g=t>0?0:p.length-1,y=t>0?p.length:-1;g!=y;g+=t){let v=a.indexOf(p[g]);if(!(v<0||n.resolveInner(m+g,1).type!=o))if(v%2==0==t>0)h++;else{if(h==1)return{start:d,end:{from:m+g,to:m+g+1},matched:v>>1==c>>1};h--}}t>0&&(f+=p.length)}return u.done?{start:d,matched:!1}:null}const S2=Object.create(null),_m=[pt.none],Nm=[],Am=Object.create(null),x2=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])x2[r]=C2(S2,e);function Zc(r,e){Nm.indexOf(r)>-1||(Nm.push(r),console.warn(e))}function C2(r,e){let t=[];for(let l of e.split(" ")){let c=[];for(let d of l.split(".")){let u=r[d]||F[d];u?typeof u=="function"?c.length?c=c.map(u):Zc(d,`Modifier ${d} used at start of tag`):c.length?Zc(d,`Tag ${d} used as modifier`):c=Array.isArray(u)?u:[u]:Zc(d,`Unknown highlighting tag ${d}`)}for(let d of c)t.push(d)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+t.map(l=>l.id),s=Am[o];if(s)return s.id;let a=Am[o]=pt.define({id:_m.length,name:n,props:[qy({[n]:t})]});return _m.push(a),a.id}exports.Direction.RTL,exports.Direction.LTR;var E2=r=>{var{theme:e,settings:t={},styles:n=[]}=r,o={".cm-gutters":{}},s={};t.background&&(s.backgroundColor=t.background),t.backgroundImage&&(s.backgroundImage=t.backgroundImage),t.foreground&&(s.color=t.foreground),(t.background||t.foreground)&&(o["&"]=s),t.fontFamily&&(o["&.cm-editor .cm-scroller"]={fontFamily:t.fontFamily}),t.gutterBackground&&(o[".cm-gutters"].backgroundColor=t.gutterBackground),t.gutterForeground&&(o[".cm-gutters"].color=t.gutterForeground),t.gutterBorder&&(o[".cm-gutters"].borderRightColor=t.gutterBorder),t.caret&&(o[".cm-content"]={caretColor:t.caret},o[".cm-cursor, .cm-dropCursor"]={borderLeftColor:t.caret});var a={};t.gutterActiveForeground&&(a.color=t.gutterActiveForeground),t.lineHighlight&&(o[".cm-activeLine"]={backgroundColor:t.lineHighlight},a.backgroundColor=t.lineHighlight),o[".cm-activeLineGutter"]=a,t.selection&&(o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:t.selection+" !important"}),t.selectionMatch&&(o["& .cm-selectionMatch"]={backgroundColor:t.selectionMatch});var l=ue.theme(o,{dark:e==="dark"}),c=Pi.define(n),d=[l,tv(c)];return d};const $2=E2({theme:"light",settings:{background:"var(--scalar-background-2)",foreground:"var(--scalar-color-1)",caret:"var(--scalar-color-1)",selection:"rgba(151, 183, 205, 0.2)",selectionMatch:"#e3dcce",gutterBackground:"var(--scalar-background-2)",gutterForeground:"var(--scalar-color-3)",gutterBorder:"transparent",lineHighlight:"var(--scalar-background-3)",fontFamily:"var(--scalar-font-code)"},styles:[{tag:[F.standard(F.tagName),F.tagName],color:"var(--scalar-color-purple)"},{tag:[F.comment],color:"var(--scalar-color-3)"},{tag:[F.className],color:"var(--scalar-color-orange)"},{tag:[F.variableName,F.propertyName,F.attributeName],color:"var(--scalar-color-1)"},{tag:[F.operator],color:"var(--scalar-color-2)"},{tag:[F.keyword,F.typeName,F.typeOperator],color:"var(--scalar-color-green)"},{tag:[F.string],color:"var(--scalar-color-blue)"},{tag:[F.bracket,F.regexp,F.meta],color:"var(--scalar-color-3)"},{tag:[F.number],color:"var(--scalar-color-blue)"},{tag:[F.name,F.quote],color:"var(--scalar-color-3)"},{tag:[F.heading],color:"var(--scalar-color-3)",fontWeight:"bold"},{tag:[F.emphasis],color:"var(--scalar-color-3)",fontStyle:"italic"},{tag:[F.deleted],color:"var(--scalar-color-3)",backgroundColor:"transparent"},{tag:[F.atom,F.bool,F.special(F.variableName)],color:"var(--scalar-color-3)"},{tag:[F.url,F.escape,F.regexp,F.link],color:"var(--scalar-color-1)"},{tag:F.link,textDecoration:"underline"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.invalid,color:"var(--scalar-color-3)"}]}),Om=new By({regexp:/(\{[^}]+\})/g,decoration:()=>Be.mark({attributes:{class:"api-client-url-variable"}})}),_2=()=>Vt.fromClass(class{constructor(r){lp(this,"variables");this.variables=Om.createDeco(r)}update(r){this.variables=Om.updateDeco(r,this.variables)}},{decorations:r=>r.variables,provide:r=>ue.atomicRanges.of(e=>{var t;return((t=e.plugin(r))==null?void 0:t.variables)||Be.none})}),N2={class:"scalar-modal-layout modal-layout"},A2=i.defineComponent({__name:"FlowModal",props:{state:{},title:{},bodyClass:{},maxWidth:{},variant:{default:"normal"}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Dialog),{open:e.state.open,onClose:t[0]||(t[0]=n=>e.state.hide())},{default:i.withCtx(()=>[i.createElementVNode("div",N2,[i.createVNode(i.unref(Le.DialogPanel),{class:i.normalizeClass(["modal",{"modal-content-large":e.variant==="large","modal-content-normal":e.variant==="normal","modal-content-small":e.variant==="small","modal-content-search":e.variant==="search","modal-content-history":e.variant==="history"}]),style:i.normalizeStyle({maxWidth:e.maxWidth})},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createBlock(i.unref(Le.DialogTitle),{key:0,class:"modal-header"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.title),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(Le.DialogDescription),{class:i.normalizeClass(["modal-body custom-scroll",[e.bodyClass]])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["class","style"])])]),_:3},8,["open"]))}}),iv=U(A2,[["__scopeId","data-v-4aafbf68"]]),av=()=>i.reactive({open:!1,show(){this.open=!0},hide(){this.open=!1}});function Ka(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function lv(r){return typeof window>"u"?Buffer.from(r).toString("base64"):btoa(r)}const cv=r=>{const e=/(?:\{+)\s*(\w+)\s*(?:\}+)/g;return[...r.matchAll(e)].map(t=>t[1].trim())||[]};function O2(r){return!(!r||Array.isArray(r)&&!r.length||(r??[]).some(e=>!Object.keys(e).length))}function vh(r,e){var c,d;const t=[],n=[],o=[];if(!r.customSecurity&&(!r.preferredSecurityScheme||!O2(e)))return{headers:t,queryString:n,cookies:o};const a=(e==null?void 0:e.some(u=>r.preferredSecurityScheme&&Object.keys(u).includes(r.preferredSecurityScheme)))||r.customSecurity?r.preferredSecurityScheme:Object.keys((e==null?void 0:e[0])??{}).pop(),l=(c=r.securitySchemes)==null?void 0:c[a??""];if(l){if("type"in l&&l.type==="apiKey"){if("in"in l&&l.in==="header"){const u=(d=r.apiKey.token)!=null&&d.length?r.apiKey.token:"YOUR_TOKEN";t.push({name:"name"in l?l.name:"",value:u})}else if("in"in l&&l.in==="cookie"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";o.push({name:l.name,value:u})}else if("in"in l&&l.in==="query"){const u=r.apiKey.token.length?r.apiKey.token:"YOUR_TOKEN";n.push({name:l.name,value:u})}}else if("type"in l&&(l.type==="http"||l.type==="basic")){if("type"in l&&(l.type==="basic"||l.type==="http"&&l.scheme==="basic")){const{username:u,password:h}=r.http.basic,f=bh(u,h);t.push({name:"Authorization",value:`Basic ${f}`.trim()})}else if("type"in l&&l.type==="http"&&l.scheme==="bearer"){const u=r.http.bearer.token.length?r.http.bearer.token:"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}else if("type"in l&&l.type.toLowerCase()==="oauth2"){const u=r.oAuth2.accessToken||"YOUR_SECRET_TOKEN";t.push({name:"Authorization",value:`Bearer ${u}`})}}return{headers:t,queryString:n,cookies:o}}function bh(r,e){return r!=null&&r.length||e!=null&&e.length?lv(`${r}:${e}`):""}function dv(r){return[r.apiKey.token,r.http.bearer.token,r.oAuth2.accessToken,bh(r.http.basic.username,r.http.basic.password),r.http.basic.password].filter(Boolean)}const T2=Xe.useEventBus(Symbol()),B2={},P2={class:"card-form"};function I2(r,e){return i.openBlock(),i.createElementBlock("form",P2,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const M2=U(B2,[["render",I2],["__scopeId","data-v-983db964"]]),D2=i.defineComponent({__name:"CardFormButton",setup(r,{expose:e}){const t=i.ref();return e({el:t}),(n,o)=>(i.openBlock(),i.createElementBlock("button",{ref_key:"el",ref:t,class:"card-form-button",type:"button"},[i.renderSlot(n.$slots,"default",{},void 0,!0)],512))}}),uv=U(D2,[["__scopeId","data-v-d19add49"]]),V2={},R2={class:"card-form-group"};function L2(r,e){return i.openBlock(),i.createElementBlock("div",R2,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Tm=U(V2,[["render",L2],["__scopeId","data-v-6604ef98"]]);function hv(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=hv(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function ed(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=hv(r))&&(n&&(n+=" "),n+=e);return n}const Bm=r=>typeof r=="boolean"?"".concat(r):r===0?"0":r,j2=r=>{const e=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l,c;return typeof(r==null||(l=r.hooks)===null||l===void 0?void 0:l["cx:done"])<"u"?r==null?void 0:r.hooks["cx:done"](ed(s)):typeof(r==null||(c=r.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?r==null?void 0:r.hooks.onComplete(ed(s)):ed(s)};return{compose:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return l=>{const c=Object.fromEntries(Object.entries(l||{}).filter(d=>{let[u]=d;return!["class","className"].includes(u)}));return e(s.map(d=>d(c)),l==null?void 0:l.class,l==null?void 0:l.className)}},cva:o=>s=>{var a;if((o==null?void 0:o.variants)==null)return e(o==null?void 0:o.base,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:c}=o,d=Object.keys(l).map(f=>{const p=s==null?void 0:s[f],m=c==null?void 0:c[f],g=Bm(p)||Bm(m);return l[f][g]}),u={...c,...s&&Object.entries(s).reduce((f,p)=>{let[m,g]=p;return typeof g>"u"?f:{...f,[m]:g}},{})},h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((f,p)=>{let{class:m,className:g,...y}=p;return Object.entries(y).every(v=>{let[b,w]=v;const S=u[b];return Array.isArray(w)?w.includes(S):S===w})?[...f,m,g]:f},[]);return e(o==null?void 0:o.base,d,h,s==null?void 0:s.class,s==null?void 0:s.className)},cx:e}},wh="-";function F2(r){const e=z2(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;function o(a){const l=a.split(wh);return l[0]===""&&l.length!==1&&l.shift(),fv(l,e)||q2(a)}function s(a,l){const c=t[a]||[];return l&&n[a]?[...c,...n[a]]:c}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function fv(r,e){var a;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),o=n?fv(r.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const s=r.join(wh);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId}const Pm=/^\[(.+)\]$/;function q2(r){if(Pm.test(r)){const e=Pm.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}function z2(r){const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return K2(Object.entries(r.classGroups),t).forEach(([s,a])=>{uu(a,n,s,e)}),n}function uu(r,e,t,n){r.forEach(o=>{if(typeof o=="string"){const s=o===""?e:Im(e,o);s.classGroupId=t;return}if(typeof o=="function"){if(H2(o)){uu(o(n),e,t,n);return}e.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,a])=>{uu(a,Im(e,s),t,n)})})}function Im(r,e){let t=r;return e.split(wh).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t}function H2(r){return r.isThemeGetter}function K2(r,e){return e?r.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[t,o]}):r}function U2(r){if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;function o(s,a){t.set(s,a),e++,e>r&&(e=0,n=t,t=new Map)}return{get(s){let a=t.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){t.has(s)?t.set(s,a):o(s,a)}}}const pv="!";function W2(r){const e=r.separator,t=e.length===1,n=e[0],o=e.length;return function(a){const l=[];let c=0,d=0,u;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===n&&(t||a.slice(g,g+o)===e)){l.push(a.slice(d,g)),d=g+o;continue}if(y==="/"){u=g;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(d),f=h.startsWith(pv),p=f?h.substring(1):h,m=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}}function G2(r){if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e}function J2(r){return{cache:U2(r.cacheSize),splitModifiers:W2(r),...F2(r)}}const Y2=/\s+/;function X2(r,e){const{splitModifiers:t,getClassGroupId:n,getConflictingClassGroupIds:o}=e,s=new Set;return r.trim().split(Y2).map(a=>{const{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=t(a);let h=n(u?d.substring(0,u):d),f=!!u;if(!h){if(!u)return{isTailwindClass:!1,originalClassName:a};if(h=n(d),!h)return{isTailwindClass:!1,originalClassName:a};f=!1}const p=G2(l).join(":");return{isTailwindClass:!0,modifierId:c?p+pv:p,classGroupId:h,originalClassName:a,hasPostfixModifier:f}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:d}=a,u=l+c;return s.has(u)?!1:(s.add(u),o(c,d).forEach(h=>s.add(l+h)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function Q2(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=mv(e))&&(n&&(n+=" "),n+=t);return n}function mv(r){if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=mv(r[n]))&&(t&&(t+=" "),t+=e);return t}function Mm(r,...e){let t,n,o,s=a;function a(c){const d=e.reduce((u,h)=>h(u),r());return t=J2(d),n=t.cache.get,o=t.cache.set,s=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=X2(c,t);return o(c,u),u}return function(){return s(Q2.apply(null,arguments))}}function Ne(r){const e=t=>t[r]||[];return e.isThemeGetter=!0,e}const gv=/^\[(?:([a-z-]+):)?(.+)\]$/i,Z2=/^\d+\/\d+$/,eE=new Set(["px","full","screen"]),tE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $r(r){return Ln(r)||eE.has(r)||Z2.test(r)}function Hr(r){return os(r,"length",fE)}function Ln(r){return!!r&&!Number.isNaN(Number(r))}function ka(r){return os(r,"number",Ln)}function Vs(r){return!!r&&Number.isInteger(Number(r))}function iE(r){return r.endsWith("%")&&Ln(r.slice(0,-1))}function ce(r){return gv.test(r)}function Kr(r){return tE.test(r)}const aE=new Set(["length","size","percentage"]);function lE(r){return os(r,aE,yv)}function cE(r){return os(r,"position",yv)}const dE=new Set(["image","url"]);function uE(r){return os(r,dE,mE)}function hE(r){return os(r,"",pE)}function Rs(){return!0}function os(r,e,t){const n=gv.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1}function fE(r){return rE.test(r)&&!nE.test(r)}function yv(){return!1}function pE(r){return oE.test(r)}function mE(r){return sE.test(r)}function Dm(){const r=Ne("colors"),e=Ne("spacing"),t=Ne("blur"),n=Ne("brightness"),o=Ne("borderColor"),s=Ne("borderRadius"),a=Ne("borderSpacing"),l=Ne("borderWidth"),c=Ne("contrast"),d=Ne("grayscale"),u=Ne("hueRotate"),h=Ne("invert"),f=Ne("gap"),p=Ne("gradientColorStops"),m=Ne("gradientColorStopPositions"),g=Ne("inset"),y=Ne("margin"),v=Ne("opacity"),b=Ne("padding"),w=Ne("saturate"),S=Ne("scale"),x=Ne("sepia"),k=Ne("skew"),C=Ne("space"),N=Ne("translate"),P=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ce,e],I=()=>[ce,e],X=()=>["",$r,Hr],W=()=>["auto",Ln,ce],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",ce],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Ln,ka],V=()=>[Ln,ce];return{cacheSize:500,separator:":",theme:{colors:[Rs],spacing:[$r,Hr],blur:["none","",Kr,ce],brightness:T(),borderColor:[r],borderRadius:["none","","full",Kr,ce],borderSpacing:I(),borderWidth:X(),contrast:T(),grayscale:se(),hueRotate:V(),invert:se(),gap:I(),gradientColorStops:[r],gradientColorStopPositions:[iE,Hr],inset:j(),margin:j(),opacity:T(),padding:I(),saturate:T(),scale:T(),sepia:se(),skew:V(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Kr]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),ce]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vs,ce]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Vs,ce]}],"grid-cols":[{"grid-cols":[Rs]}],"col-start-end":[{col:["auto",{span:["full",Vs,ce]},ce]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Rs]}],"row-start-end":[{row:["auto",{span:[Vs,ce]},ce]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Se()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Se(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Se(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,e]}],"min-w":[{"min-w":[ce,e,"min","max","fit"]}],"max-w":[{"max-w":[ce,e,"none","full","min","max","fit","prose",{screen:[Kr]},Kr]}],h:[{h:[ce,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Kr,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ka]}],"font-family":[{font:[Rs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ce]}],"line-clamp":[{"line-clamp":["none",Ln,ka]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$r,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$r,Hr]}],"underline-offset":[{"underline-offset":["auto",$r,ce]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),cE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uE]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:me()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[$r,ce]}],"outline-w":[{outline:[$r,Hr]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[$r,Hr]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Kr,hE]}],"shadow-color":[{shadow:[Rs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ke()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Kr,ce]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Vs,ce]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[$r,Hr,ka]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function gE(r,{cacheSize:e,prefix:t,separator:n,extend:o={},override:s={}}){Ua(r,"cacheSize",e),Ua(r,"prefix",t),Ua(r,"separator",n);for(const a in s)yE(r[a],s[a]);for(const a in o)vE(r[a],o[a]);return r}function Ua(r,e,t){t!==void 0&&(r[e]=t)}function yE(r,e){if(e)for(const t in e)Ua(r,t,e[t])}function vE(r,e){if(e)for(const t in e){const n=e[t];n!==void 0&&(r[t]=(r[t]||[]).concat(n))}}function bE(r,...e){return typeof r=="function"?Mm(Dm,r,...e):Mm(()=>gE(Dm(),r),...e)}const gl=Math.min,Un=Math.max,yl=Math.round,Sa=Math.floor,gn=r=>({x:r,y:r}),wE={left:"right",right:"left",bottom:"top",top:"bottom"},kE={start:"end",end:"start"};function Vm(r,e,t){return Un(r,gl(e,t))}function Ul(r,e){return typeof r=="function"?r(e):r}function Qn(r){return r.split("-")[0]}function Wl(r){return r.split("-")[1]}function vv(r){return r==="x"?"y":"x"}function bv(r){return r==="y"?"height":"width"}function Gl(r){return["top","bottom"].includes(Qn(r))?"y":"x"}function wv(r){return vv(Gl(r))}function SE(r,e,t){t===void 0&&(t=!1);const n=Wl(r),o=wv(r),s=bv(o);let a=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=vl(a)),[a,vl(a)]}function xE(r){const e=vl(r);return[hu(r),e,hu(e)]}function hu(r){return r.replace(/start|end/g,e=>kE[e])}function CE(r,e,t){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?o:n:e?n:o;case"left":case"right":return e?s:a;default:return[]}}function EE(r,e,t,n){const o=Wl(r);let s=CE(Qn(r),t==="start",n);return o&&(s=s.map(a=>a+"-"+o),e&&(s=s.concat(s.map(hu)))),s}function vl(r){return r.replace(/left|right|bottom|top/g,e=>wE[e])}function $E(r){return{top:0,right:0,bottom:0,left:0,...r}}function _E(r){return typeof r!="number"?$E(r):{top:r,right:r,bottom:r,left:r}}function bl(r){const{x:e,y:t,width:n,height:o}=r;return{width:n,height:o,top:t,left:e,right:e+n,bottom:t+o,x:e,y:t}}function Rm(r,e,t){let{reference:n,floating:o}=r;const s=Gl(e),a=wv(e),l=bv(a),c=Qn(e),d=s==="y",u=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-o.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Wl(e)){case"start":p[a]-=f*(t&&d?-1:1);break;case"end":p[a]+=f*(t&&d?-1:1);break}return p}const NE=async(r,e,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:r,floating:e,strategy:o}),{x:u,y:h}=Rm(d,n,c),f=n,p={},m=0;for(let g=0;g<l.length;g++){const{name:y,fn:v}=l[g],{x:b,y:w,data:S,reset:x}=await v({x:u,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:d,platform:a,elements:{reference:r,floating:e}});u=b??u,h=w??h,p={...p,[y]:{...p[y],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:o}):x.rects),{x:u,y:h}=Rm(d,f,c)),g=-1)}return{x:u,y:h,placement:f,strategy:o,middlewareData:p}};async function kv(r,e){var t;e===void 0&&(e={});const{x:n,y:o,platform:s,rects:a,elements:l,strategy:c}=r,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Ul(e,r),m=_E(p),y=l[f?h==="floating"?"reference":"floating":h],v=bl(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),b=h==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},x=bl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-x.top+m.top)/S.y,bottom:(x.bottom-v.bottom+m.bottom)/S.y,left:(v.left-x.left+m.left)/S.x,right:(x.right-v.right+m.right)/S.x}}const AE=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ul(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const v=Qn(o),b=Qn(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=f||(b||!g?[vl(l)]:xE(l));!f&&m!=="none"&&S.push(...EE(l,g,m,w));const x=[l,...S],k=await kv(e,y),C=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&C.push(k[v]),h){const I=SE(o,a,w);C.push(k[I[0]],k[I[1]])}if(N=[...N,{placement:o,overflows:C}],!C.every(I=>I<=0)){var P,M;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,X=x[I];if(X)return{data:{index:I,overflows:N},reset:{placement:X}};let W=(M=N.filter(te=>te.overflows[0]<=0).sort((te,me)=>te.overflows[1]-me.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(p){case"bestFit":{var j;const te=(j=N.map(me=>[me.placement,me.overflows.filter(ke=>ke>0).reduce((ke,Se)=>ke+Se,0)]).sort((me,ke)=>me[1]-ke[1])[0])==null?void 0:j[0];te&&(W=te);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function OE(r,e){const{placement:t,platform:n,elements:o}=r,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Qn(t),l=Wl(t),c=Gl(t)==="y",d=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,h=Ul(e,r);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),c?{x:p*u,y:f*d}:{x:f*d,y:p*u}}const TE=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:o,y:s,placement:a,middlewareData:l}=e,c=await OE(e,r);return a===((t=l.offset)==null?void 0:t.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},BE=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...c}=Ul(r,e),d={x:t,y:n},u=await kv(e,c),h=Gl(Qn(o)),f=vv(h);let p=d[f],m=d[h];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[y],w=p-u[v];p=Vm(b,p,w)}if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=m+u[y],w=m-u[v];m=Vm(b,m,w)}const g=l.fn({...e,[f]:p,[h]:m});return{...g,data:{x:g.x-t,y:g.y-n}}}}};function Lr(r){return kh(r)?(r.nodeName||"").toLowerCase():"#document"}function Et(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function zr(r){var e;return(e=(kh(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function kh(r){return r instanceof Node||r instanceof Et(r).Node}function jr(r){return r instanceof Element||r instanceof Et(r).Element}function br(r){return r instanceof HTMLElement||r instanceof Et(r).HTMLElement}function Lm(r){return typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Et(r).ShadowRoot}function Ii(r){const{overflow:e,overflowX:t,overflowY:n,display:o}=Rt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(o)}function PE(r){return["table","td","th"].includes(Lr(r))}function Sh(r){const e=xh(),t=Rt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function IE(r){let e=Go(r);for(;br(e)&&!Jl(e);){if(Sh(e))return e;e=Go(e)}return null}function xh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jl(r){return["html","body","#document"].includes(Lr(r))}function Rt(r){return Et(r).getComputedStyle(r)}function Yl(r){return jr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Go(r){if(Lr(r)==="html")return r;const e=r.assignedSlot||r.parentNode||Lm(r)&&r.host||zr(r);return Lm(e)?e.host:e}function Sv(r){const e=Go(r);return Jl(e)?r.ownerDocument?r.ownerDocument.body:r.body:br(e)&&Ii(e)?e:Sv(e)}function wi(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const o=Sv(r),s=o===((n=r.ownerDocument)==null?void 0:n.body),a=Et(o);return s?e.concat(a,a.visualViewport||[],Ii(o)?o:[],a.frameElement&&t?wi(a.frameElement):[]):e.concat(o,wi(o,[],t))}function xv(r){const e=Rt(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=br(r),s=o?r.offsetWidth:t,a=o?r.offsetHeight:n,l=yl(t)!==s||yl(n)!==a;return l&&(t=s,n=a),{width:t,height:n,$:l}}function Ch(r){return jr(r)?r:r.contextElement}function Ro(r){const e=Ch(r);if(!br(e))return gn(1);const t=e.getBoundingClientRect(),{width:n,height:o,$:s}=xv(e);let a=(s?yl(t.width):t.width)/n,l=(s?yl(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ME=gn(0);function Cv(r){const e=Et(r);return!xh()||!e.visualViewport?ME:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function DE(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Et(r)?!1:e}function Zn(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const o=r.getBoundingClientRect(),s=Ch(r);let a=gn(1);e&&(n?jr(n)&&(a=Ro(n)):a=Ro(r));const l=DE(s,t,n)?Cv(s):gn(0);let c=(o.left+l.x)/a.x,d=(o.top+l.y)/a.y,u=o.width/a.x,h=o.height/a.y;if(s){const f=Et(s),p=n&&jr(n)?Et(n):n;let m=f,g=m.frameElement;for(;g&&n&&p!==m;){const y=Ro(g),v=g.getBoundingClientRect(),b=Rt(g),w=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,h*=y.y,c+=w,d+=S,m=Et(g),g=m.frameElement}}return bl({width:u,height:h,x:c,y:d})}const VE=[":popover-open",":modal"];function Ev(r){return VE.some(e=>{try{return r.matches(e)}catch{return!1}})}function RE(r){let{elements:e,rect:t,offsetParent:n,strategy:o}=r;const s=o==="fixed",a=zr(n),l=e?Ev(e.floating):!1;if(n===a||l&&s)return t;let c={scrollLeft:0,scrollTop:0},d=gn(1);const u=gn(0),h=br(n);if((h||!h&&!s)&&((Lr(n)!=="body"||Ii(a))&&(c=Yl(n)),br(n))){const f=Zn(n);d=Ro(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+u.x,y:t.y*d.y-c.scrollTop*d.y+u.y}}function LE(r){return Array.from(r.getClientRects())}function $v(r){return Zn(zr(r)).left+Yl(r).scrollLeft}function jE(r){const e=zr(r),t=Yl(r),n=r.ownerDocument.body,o=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+$v(r);const l=-t.scrollTop;return Rt(n).direction==="rtl"&&(a+=Un(e.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:l}}function FE(r,e){const t=Et(r),n=zr(r),o=t.visualViewport;let s=n.clientWidth,a=n.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;const d=xh();(!d||d&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:l,y:c}}function qE(r,e){const t=Zn(r,!0,e==="fixed"),n=t.top+r.clientTop,o=t.left+r.clientLeft,s=br(r)?Ro(r):gn(1),a=r.clientWidth*s.x,l=r.clientHeight*s.y,c=o*s.x,d=n*s.y;return{width:a,height:l,x:c,y:d}}function jm(r,e,t){let n;if(e==="viewport")n=FE(r,t);else if(e==="document")n=jE(zr(r));else if(jr(e))n=qE(e,t);else{const o=Cv(r);n={...e,x:e.x-o.x,y:e.y-o.y}}return bl(n)}function _v(r,e){const t=Go(r);return t===e||!jr(t)||Jl(t)?!1:Rt(t).position==="fixed"||_v(t,e)}function zE(r,e){const t=e.get(r);if(t)return t;let n=wi(r,[],!1).filter(l=>jr(l)&&Lr(l)!=="body"),o=null;const s=Rt(r).position==="fixed";let a=s?Go(r):r;for(;jr(a)&&!Jl(a);){const l=Rt(a),c=Sh(a);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ii(a)&&!c&&_v(r,a))?n=n.filter(u=>u!==a):o=l,a=Go(a)}return e.set(r,n),n}function HE(r){let{element:e,boundary:t,rootBoundary:n,strategy:o}=r;const a=[...t==="clippingAncestors"?zE(e,this._c):[].concat(t),n],l=a[0],c=a.reduce((d,u)=>{const h=jm(e,u,o);return d.top=Un(h.top,d.top),d.right=gl(h.right,d.right),d.bottom=gl(h.bottom,d.bottom),d.left=Un(h.left,d.left),d},jm(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function KE(r){const{width:e,height:t}=xv(r);return{width:e,height:t}}function UE(r,e,t){const n=br(e),o=zr(e),s=t==="fixed",a=Zn(r,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=gn(0);if(n||!n&&!s)if((Lr(e)!=="body"||Ii(o))&&(l=Yl(e)),n){const h=Zn(e,!0,s,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else o&&(c.x=$v(o));const d=a.left+l.scrollLeft-c.x,u=a.top+l.scrollTop-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Fm(r,e){return!br(r)||Rt(r).position==="fixed"?null:e?e(r):r.offsetParent}function Nv(r,e){const t=Et(r);if(!br(r)||Ev(r))return t;let n=Fm(r,e);for(;n&&PE(n)&&Rt(n).position==="static";)n=Fm(n,e);return n&&(Lr(n)==="html"||Lr(n)==="body"&&Rt(n).position==="static"&&!Sh(n))?t:n||IE(r)||t}const WE=async function(r){const e=this.getOffsetParent||Nv,t=this.getDimensions;return{reference:UE(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,...await t(r.floating)}}};function GE(r){return Rt(r).direction==="rtl"}const JE={convertOffsetParentRelativeRectToViewportRelativeRect:RE,getDocumentElement:zr,getClippingRect:HE,getOffsetParent:Nv,getElementRects:WE,getClientRects:LE,getDimensions:KE,getScale:Ro,isElement:jr,isRTL:GE};function YE(r,e){let t=null,n;const o=zr(r);function s(){var l;clearTimeout(n),(l=t)==null||l.disconnect(),t=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:d,top:u,width:h,height:f}=r.getBoundingClientRect();if(l||e(),!h||!f)return;const p=Sa(u),m=Sa(o.clientWidth-(d+h)),g=Sa(o.clientHeight-(u+f)),y=Sa(d),b={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Un(0,gl(1,c))||1};let w=!0;function S(x){const k=x[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{t=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{t=new IntersectionObserver(S,b)}t.observe(r)}return a(!0),s}function XE(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Ch(r),u=o||s?[...d?wi(d):[],...wi(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",t,{passive:!0}),s&&v.addEventListener("resize",t)});const h=d&&l?YE(d,t):null;let f=-1,p=null;a&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===d&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),t()}),d&&!c&&p.observe(d),p.observe(e));let m,g=c?Zn(r):null;c&&y();function y(){const v=Zn(r);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&t(),g=v,m=requestAnimationFrame(y)}return t(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",t),s&&b.removeEventListener("resize",t)}),h==null||h(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const QE=BE,ZE=AE,e$=(r,e,t)=>{const n=new Map,o={platform:JE,...t},s={...o.platform,_c:n};return NE(r,e,{...o,platform:s})};function t$(r){return r!=null&&typeof r=="object"&&"$el"in r}function qm(r){if(t$(r)){const e=r.$el;return kh(e)&&Lr(e)==="#comment"?null:e}return r}function Av(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function zm(r,e){const t=Av(r);return Math.round(e*t)/t}function r$(r,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,o=i.computed(()=>{var C;return(C=i.unref(t.open))!=null?C:!0}),s=i.computed(()=>i.unref(t.middleware)),a=i.computed(()=>{var C;return(C=i.unref(t.placement))!=null?C:"bottom"}),l=i.computed(()=>{var C;return(C=i.unref(t.strategy))!=null?C:"absolute"}),c=i.computed(()=>{var C;return(C=i.unref(t.transform))!=null?C:!0}),d=i.computed(()=>qm(r.value)),u=i.computed(()=>qm(e.value)),h=i.ref(0),f=i.ref(0),p=i.ref(l.value),m=i.ref(a.value),g=i.shallowRef({}),y=i.ref(!1),v=i.computed(()=>{const C={position:p.value,left:"0",top:"0"};if(!u.value)return C;const N=zm(u.value,h.value),P=zm(u.value,f.value);return c.value?{...C,transform:"translate("+N+"px, "+P+"px)",...Av(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:P+"px"}});let b;function w(){d.value==null||u.value==null||e$(d.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(C=>{h.value=C.x,f.value=C.y,p.value=C.strategy,m.value=C.placement,g.value=C.middlewareData,y.value=!0})}function S(){typeof b=="function"&&(b(),b=void 0)}function x(){if(S(),n===void 0){w();return}if(d.value!=null&&u.value!=null){b=n(d.value,u.value,w);return}}function k(){o.value||(y.value=!1)}return i.watch([s,a,l],w,{flush:"sync"}),i.watch([d,u],x,{flush:"sync"}),i.watch(o,k,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(S),{x:i.shallowReadonly(h),y:i.shallowReadonly(f),strategy:i.shallowReadonly(p),placement:i.shallowReadonly(m),middlewareData:i.shallowReadonly(g),isPositioned:i.shallowReadonly(y),floatingStyles:v,update:w}}const fu="scalar-component",n$=bE({extend:{classGroups:{"font-size":["text-xxs"],[fu]:[fu]}}}),{cva:Eh,cx:so,compose:S4}=j2({hooks:{onComplete:r=>`${n$(r,fu)}`}}),o$=i.createStaticVNode('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-47faceda></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-47faceda></path>',5),s$={key:0,class:"circular-loader"},i$=i.defineComponent({__name:"ScalarLoading",props:{loadingState:{},size:{default:"24px"}},setup(r){return i.useCssVars(e=>({d6cae758:e.size})),(e,t)=>e.loadingState?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(so)("loader-wrapper"))},[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["svg-loader",{"icon-is-valid":e.loadingState.isValid,"icon-is-invalid":e.loadingState.isInvalid}]),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[o$,e.loadingState.isLoading?(i.openBlock(),i.createElementBlock("g",s$,[i.createElementVNode("circle",{class:i.normalizeClass(["loader-path",{"loader-path-off":e.loadingState.isValid||e.loadingState.isInvalid}]),cx:"50",cy:"50",fill:"none",r:"20","stroke-width":"2"},null,2)])):i.createCommentVNode("",!0)],2))],2)):i.createCommentVNode("",!0)}}),a$=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},Ov=a$(i$,[["__scopeId","data-v-47faceda"]]),Tv={solid:["scalar-button-solid","bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"],outlined:["scalar-button-outlined","active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-border"],ghost:["scalar-button-ghost","bg-transparent text-fore-3 active:text-fore-2 hocus:text-fore-2"],danger:["scalar-button-danger","bg-error text-white active:brightness-90 hocus:brightness-90"]},l$=Eh({base:"scalar-button row cursor-pointer items-center justify-center rounded font-medium",variants:{disabled:{true:"bg-background-2 text-color-3 cursor-not-allowed shadow-none"},fullWidth:{true:"w-full"},size:{sm:"px-2 py-1 text-xs",md:"h-10 px-6 text-sm"},variant:Tv},compoundVariants:[{disabled:!0,variant:"ghost",class:"bg-transparent text-ghost"}]}),c$=["ariaDisabled"],d$={key:0,class:"mr-2 h-4 w-4"},u$={key:1,class:"ml-2"},pu=i.defineComponent({inheritAttrs:!1,__name:"ScalarButton",props:{disabled:{type:Boolean},fullWidth:{type:Boolean,default:!1},loading:{},size:{default:"md"},variant:{default:"solid"}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{class:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(e.value.rest,{ariaDisabled:t.disabled||void 0,class:i.unref(so)(i.unref(l$)({fullWidth:t.fullWidth,disabled:t.disabled,size:t.size,variant:t.variant}),{"pl-9 pr-3":t.loading},`${e.value.class}`),type:"button"}),[t.$slots.icon?(i.openBlock(),i.createElementBlock("div",d$,[i.renderSlot(t.$slots,"icon")])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default"),t.loading?(i.openBlock(),i.createElementBlock("div",u$,[i.createVNode(i.unref(Ov),{loadingState:t.loading,size:"20px"},null,8,["loadingState"])])):i.createCommentVNode("",!0)],16,c$))}});(function(r){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:t,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};r.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=r.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=n.variable[1].inside,a=0;a<o.length;a++)s[o[a]]=r.languages.bash[o[a]];r.languages.sh=r.languages.bash,r.languages.shell=r.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(){if(typeof Prism>"u"||typeof document>"u")return;var r="line-numbers",e=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(a,l){if(!(a.tagName!=="PRE"||!a.classList.contains(r))){var c=a.querySelector(".line-numbers-rows");if(c){var d=parseInt(a.getAttribute("data-start"),10)||1,u=d+(c.children.length-1);l<d&&(l=d),l>u&&(l=u);var h=l-d;return c.children[h]}}},resize:function(a){n([a])},assumeViewportIndependence:!0};function n(a){if(a=a.filter(function(c){var d=o(c),u=d["white-space"];return u==="pre-wrap"||u==="pre-line"}),a.length!=0){var l=a.map(function(c){var d=c.querySelector("code"),u=c.querySelector(".line-numbers-rows");if(!(!d||!u)){var h=c.querySelector(".line-numbers-sizer"),f=d.textContent.split(e);h||(h=document.createElement("span"),h.className="line-numbers-sizer",d.appendChild(h)),h.innerHTML="0",h.style.display="block";var p=h.getBoundingClientRect().height;return h.innerHTML="",{element:c,lines:f,lineHeights:[],oneLinerHeight:p,sizer:h}}}).filter(Boolean);l.forEach(function(c){var d=c.sizer,u=c.lines,h=c.lineHeights,f=c.oneLinerHeight;h[u.length-1]=void 0,u.forEach(function(p,m){if(p&&p.length>1){var g=d.appendChild(document.createElement("span"));g.style.display="block",g.textContent=p}else h[m]=f})}),l.forEach(function(c){for(var d=c.sizer,u=c.lineHeights,h=0,f=0;f<u.length;f++)u[f]===void 0&&(u[f]=d.children[h++].getBoundingClientRect().height)}),l.forEach(function(c){var d=c.sizer,u=c.element.querySelector(".line-numbers-rows");d.style.display="none",d.innerHTML="",c.lineHeights.forEach(function(h,f){u.children[f].style.height=h+"px"})})}}function o(a){return a?window.getComputedStyle?getComputedStyle(a):a.currentStyle||null:null}var s=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&s===window.innerWidth||(s=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+r))))}),Prism.hooks.add("complete",function(a){if(a.code){var l=a.element,c=l.parentNode;if(!(!c||!/pre/i.test(c.nodeName))&&!l.querySelector(".line-numbers-rows")&&Prism.util.isActive(l,r)){l.classList.remove(r),c.classList.add(r);var d=a.code.match(e),u=d?d.length+1:1,h,f=new Array(u+1).join("<span></span>");h=document.createElement("span"),h.setAttribute("aria-hidden","true"),h.className="line-numbers-rows",h.innerHTML=f,c.hasAttribute("data-start")&&(c.style.counterReset="linenumber "+(parseInt(c.getAttribute("data-start"),10)-1)),a.element.appendChild(h),n([c]),Prism.hooks.run("line-numbers",a)}}}),Prism.hooks.add("line-numbers",function(a){a.plugins=a.plugins||{},a.plugins.lineNumbers=!0})})();function h$(r){const e=new Set;return JSON.stringify(r,(t,n)=>{if(typeof n=="object"&&n!==null){if(e.has(n))return"[Circular]";e.add(n)}return n},2)}function xa(r){if(typeof r=="string")return r;if(typeof r=="object")try{return JSON.stringify(r,null,2)}catch{return h$(r)}return r}const f$=["innerHTML"],Nr=i.defineComponent({__name:"ScalarCodeBlock",props:{content:{},lang:{default:"js"},lineNumbers:{type:Boolean,default:!1},hideCredentials:{}},setup(r){const e=r,t=zu(xa(e.content)),n=`components-scalar-code-block${t}`,{plugins:o,highlightElement:s}=Ts;e.hideCredentials&&Ts.hooks.add("wrap",function(h){if(!e.hideCredentials)return;let f=!1;typeof e.hideCredentials=="string"?h.content.includes(e.hideCredentials)&&(f=!0):Array.isArray(e.hideCredentials)&&(f=e.hideCredentials.some(p=>h.content.includes(p))),f&&(h.content=h.content.replace(/<span class="credentials">.*?<\/span>/g,p=>p.replace(/<span class="credentials">|<\/span>/g,"")),h.content=h.content.replace(new RegExp(typeof e.hideCredentials=="string"?e.hideCredentials:e.hideCredentials.join("|"),"g"),p=>`<span class="credentials">${p}</span>`))});const a=i.ref(null),l=i.ref(ts[n]??""),c=i.computed(()=>e.lang==="node"?"js":e.lang),d=e.lang;i.watch([()=>e.lang,()=>e.content,a],()=>{a.value&&e.content&&(!l.value||e.lang!==d)&&(l.value="",i.nextTick(()=>s(a.value)))},{immediate:!0});const u=/\n(?!$)/g;return i.onServerPrefetch(async()=>{let h="";e.lineNumbers&&Ts.hooks.add("after-tokenize",p=>{const m=p.code.match(u),g=m?m.length+1:1;h=`<span aria-hidden="true" class="line-numbers-rows">${new Array(g+1).join("<span></span>")}</span>`});const f=Ts.highlight(xa(e.content),Ts.languages[c.value],c.value);if(l.value=f+h,t!==0){const p=i.useSSRContext();p.payload.data[n]=f+h}}),i.onMounted(async()=>{await Promise.resolve().then(()=>require("./prism-autoloader-Dlh8Vzlw--ejn04HW.cjs")),o.autoloader.languages_path="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/"}),(h,f)=>(i.openBlock(),i.createElementBlock("pre",{class:i.normalizeClass([`scalar-component scalar-codeblock-pre language-${c.value}`,{"line-numbers":h.lineNumbers}])},[l.value?(i.openBlock(),i.createElementBlock("code",{key:0,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`),innerHTML:i.unref(xa)(l.value)},null,10,f$)):(i.openBlock(),i.createElementBlock("code",{key:1,ref_key:"el",ref:a,class:i.normalizeClass(`scalar-codeblock-code language-${c.value}`)},i.toDisplayString(i.unref(xa)(h.content)),3))],2))}}),Hm=Object.assign({"./Add.svg":()=>Promise.resolve().then(()=>require("./Add-ngyZgYXx-CWPoroGU.cjs")),"./ArrowLeft.svg":()=>Promise.resolve().then(()=>require("./ArrowLeft-aY17W2aS-B48Wrva9.cjs")),"./ArrowRight.svg":()=>Promise.resolve().then(()=>require("./ArrowRight-DEMtdoE7-BVEqp3bA.cjs")),"./Background.svg":()=>Promise.resolve().then(()=>require("./Background-DcRhSHgf-7l5O3oYH.cjs")),"./Brackets.svg":()=>Promise.resolve().then(()=>require("./Brackets-4I8OKomf-C2VxZ6iW.cjs")),"./Branch.svg":()=>Promise.resolve().then(()=>require("./Branch-CXwj8YuG-xolS1YAY.cjs")),"./CallToAction.svg":()=>Promise.resolve().then(()=>require("./CallToAction-EyQKkvbg-Eo_9FsiI.cjs")),"./Checkmark.svg":()=>Promise.resolve().then(()=>require("./Checkmark-De7nq6cG-tp1nTP9w.cjs")),"./ChevronDown.svg":()=>Promise.resolve().then(()=>require("./ChevronDown-Co7EAKAv-BMVIms1W.cjs")),"./ChevronLeft.svg":()=>Promise.resolve().then(()=>require("./ChevronLeft-DYt0idAu-DgJ680do.cjs")),"./ChevronRight.svg":()=>Promise.resolve().then(()=>require("./ChevronRight-ylxToVWl-BVcmudpo.cjs")),"./ChevronUp.svg":()=>Promise.resolve().then(()=>require("./ChevronUp-xAnukIfj-BRXM2fAN.cjs")),"./Clipboard.svg":()=>Promise.resolve().then(()=>require("./Clipboard-CU_KxGEv-jXeM-Shn.cjs")),"./Close.svg":()=>Promise.resolve().then(()=>require("./Close-CW3z42qZ-CAmO5dZ5.cjs")),"./CodeFolder.svg":()=>Promise.resolve().then(()=>require("./CodeFolder-Cv_igzJE-Dl4HVTRL.cjs")),"./Cookie.svg":()=>Promise.resolve().then(()=>require("./Cookie-CEHvXpqB-BCUOR3DZ.cjs")),"./DarkMode.svg":()=>Promise.resolve().then(()=>require("./DarkMode-CBsV8Q_I-KODSbuOz.cjs")),"./Delete.svg":()=>Promise.resolve().then(()=>require("./Delete-BCZmxrDD-C-UeHTm2.cjs")),"./Discord.svg":()=>Promise.resolve().then(()=>require("./Discord-BHYOFBB2-BzF4Z2zQ.cjs")),"./DocsPage.svg":()=>Promise.resolve().then(()=>require("./DocsPage-rh2xwxKN-EMPYZ-u6.cjs")),"./Duplicate.svg":()=>Promise.resolve().then(()=>require("./Duplicate-BPlzNpcf-Uk5uZ5gd.cjs")),"./Edit.svg":()=>Promise.resolve().then(()=>require("./Edit-Br04RNYb-bn7B8ziL.cjs")),"./Ellipses.svg":()=>Promise.resolve().then(()=>require("./Ellipses-Bo_X36Hx-1Rf8jX_Q.cjs")),"./Error.svg":()=>Promise.resolve().then(()=>require("./Error-B_RGtWJI-kZYauS2f.cjs")),"./ExternalLink.svg":()=>Promise.resolve().then(()=>require("./ExternalLink-DK8L-EH7-BZtIWcdg.cjs")),"./FilterList.svg":()=>Promise.resolve().then(()=>require("./FilterList-CsAcE9em-CSRdO8He.cjs")),"./Folder.svg":()=>Promise.resolve().then(()=>require("./Folder-Cdcj4evh-JrdpqKfO.cjs")),"./GitHub.svg":()=>Promise.resolve().then(()=>require("./GitHub-NdE6Zs9k-CDcqenD_.cjs")),"./Hide.svg":()=>Promise.resolve().then(()=>require("./Hide-Q3GPkIKH-Ba4DV2wS.cjs")),"./History.svg":()=>Promise.resolve().then(()=>require("./History-D9nmhNIn-C8K3DZOi.cjs")),"./JsonObject.svg":()=>Promise.resolve().then(()=>require("./JsonObject-hGdHUQ4M-DEiEsxEM.cjs")),"./Key.svg":()=>Promise.resolve().then(()=>require("./Key-CWXJqX28-D85Imfdm.cjs")),"./Leave.svg":()=>Promise.resolve().then(()=>require("./Leave-K1J3uwoG-COzffJei.cjs")),"./LightDarkModeToggle.svg":()=>Promise.resolve().then(()=>require("./LightDarkModeToggle-BkvMimDa-D2TvUWMc.cjs")),"./LightMode.svg":()=>Promise.resolve().then(()=>require("./LightMode-Btz6vyT_-BTswDMO7.cjs")),"./Link.svg":()=>Promise.resolve().then(()=>require("./Link-Bzuc__Nc-C0VSCFw-.cjs")),"./Lock.svg":()=>Promise.resolve().then(()=>require("./Lock-xhiH1mKz-sEHw9FoO.cjs")),"./Logo.svg":()=>Promise.resolve().then(()=>require("./Logo-mtzeKD8M-BPvZdgPX.cjs")),"./LogoAPI.svg":()=>Promise.resolve().then(()=>require("./LogoAPI-CaU5E6FK-H9aWX-Pj.cjs")),"./LogoClient.svg":()=>Promise.resolve().then(()=>require("./LogoClient-DdC-t_7P-CN0J-Vs6.cjs")),"./LogoMarket.svg":()=>Promise.resolve().then(()=>require("./LogoMarket-DwlApcab-C3B4miZm.cjs")),"./LogoSwagger.svg":()=>Promise.resolve().then(()=>require("./LogoSwagger-CH60H5qW-56_9U30I.cjs")),"./Magic.svg":()=>Promise.resolve().then(()=>require("./Magic-Dsi9_bEc-Bz81CcSu.cjs")),"./Menu.svg":()=>Promise.resolve().then(()=>require("./Menu-CFK5cOsm-B_mqCQj6.cjs")),"./Page.svg":()=>Promise.resolve().then(()=>require("./Page-B7rVuhpl-DfOGMkFM.cjs")),"./PaperAirplane.svg":()=>Promise.resolve().then(()=>require("./PaperAirplane-BC-4mGEB-CUmTyNIM.cjs")),"./Payment.svg":()=>Promise.resolve().then(()=>require("./Payment-hzcXP1Xb-DA7pQdWt.cjs")),"./Play.svg":()=>Promise.resolve().then(()=>require("./Play-BrVagRQA-DwHMdiTR.cjs")),"./Refresh.svg":()=>Promise.resolve().then(()=>require("./Refresh-Be6vHEEi-CbpDdpiC.cjs")),"./Response.svg":()=>Promise.resolve().then(()=>require("./Response-Dq9pM-ZU-C6e6VGNi.cjs")),"./Search.svg":()=>Promise.resolve().then(()=>require("./Search-DqtlswRG-Cn8bmF-2.cjs")),"./Show.svg":()=>Promise.resolve().then(()=>require("./Show-D86hKz5y-DCaWj13Q.cjs")),"./SideBarClosed.svg":()=>Promise.resolve().then(()=>require("./SideBarClosed-CYUNS2XM-BrkKCJbJ.cjs")),"./SideBarOpen.svg":()=>Promise.resolve().then(()=>require("./SideBarOpen-BOxW49_U-1NTFL81x.cjs")),"./Sort.svg":()=>Promise.resolve().then(()=>require("./Sort-oTjBhJFQ-ClKvQJ9G.cjs")),"./Terminal.svg":()=>Promise.resolve().then(()=>require("./Terminal-CKp--su5-B0pjt_Yz.cjs")),"./ThumbsDown.svg":()=>Promise.resolve().then(()=>require("./ThumbsDown-BMgnsASL-C-sKah3X.cjs")),"./ThumbsUp.svg":()=>Promise.resolve().then(()=>require("./ThumbsUp-C1j6zY2j-CBEvfE8L.cjs")),"./Trash.svg":()=>Promise.resolve().then(()=>require("./Trash-BpA3zWPD-C-UeHTm2.cjs")),"./Unlock.svg":()=>Promise.resolve().then(()=>require("./Unlock-CY8UqJoE-C46tGVrb.cjs")),"./Upload.svg":()=>Promise.resolve().then(()=>require("./Upload-REIdL7RI-C6EgO_Ra.cjs")),"./User.svg":()=>Promise.resolve().then(()=>require("./User-Df5svMQ3-BzQcMZ_8.cjs")),"./programming-framework-angular.svg":()=>Promise.resolve().then(()=>require("./programming-framework-angular-DD4Vjgbk-BVT4AoJo.cjs")),"./programming-framework-astro.svg":()=>Promise.resolve().then(()=>require("./programming-framework-astro-CLfrRt19-CWwhfV7_.cjs")),"./programming-framework-laravel.svg":()=>Promise.resolve().then(()=>require("./programming-framework-laravel-kAy2wVLy-C3EZCsGC.cjs")),"./programming-framework-nextdotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-nextdotjs-BKdd_DY_-DdOe6YSk.cjs")),"./programming-framework-react.svg":()=>Promise.resolve().then(()=>require("./programming-framework-react-PDgmtZuN-4I-M6WEO.cjs")),"./programming-framework-vuedotjs.svg":()=>Promise.resolve().then(()=>require("./programming-framework-vuedotjs-Cv46W2aB-CSjgwP_a.cjs")),"./programming-language-c.svg":()=>Promise.resolve().then(()=>require("./programming-language-c-hPGu2Zvg-DS__u0q2.cjs")),"./programming-language-clojure.svg":()=>Promise.resolve().then(()=>require("./programming-language-clojure-Cvmzky8x-DNGq1StI.cjs")),"./programming-language-csharp.svg":()=>Promise.resolve().then(()=>require("./programming-language-csharp-lqX1oWgb-CxB0WO6j.cjs")),"./programming-language-css3.svg":()=>Promise.resolve().then(()=>require("./programming-language-css3-Dpp4Cr6b-BpPnE1ET.cjs")),"./programming-language-go.svg":()=>Promise.resolve().then(()=>require("./programming-language-go-DoJxWwT6-Cglob461.cjs")),"./programming-language-html5.svg":()=>Promise.resolve().then(()=>require("./programming-language-html5-DlqJK4EL-DFJ6lim3.cjs")),"./programming-language-http.svg":()=>Promise.resolve().then(()=>require("./programming-language-http-wMYwFS1I-CibNNxob.cjs")),"./programming-language-java.svg":()=>Promise.resolve().then(()=>require("./programming-language-java-BCxG2T_w-CK_n5AN7.cjs")),"./programming-language-javascript.svg":()=>Promise.resolve().then(()=>require("./programming-language-javascript-VxLvi1QG-CaGGjM9H.cjs")),"./programming-language-json.svg":()=>Promise.resolve().then(()=>require("./programming-language-json-vEX_g7Zi-DzQJGa14.cjs")),"./programming-language-kotlin.svg":()=>Promise.resolve().then(()=>require("./programming-language-kotlin-DKV8vP9h-DlGiFCvD.cjs")),"./programming-language-node.svg":()=>Promise.resolve().then(()=>require("./programming-language-node-Xsgx38lm-4rntKdSG.cjs")),"./programming-language-objc.svg":()=>Promise.resolve().then(()=>require("./programming-language-objc-BQXSOBsX-ChHn3rog.cjs")),"./programming-language-ocaml.svg":()=>Promise.resolve().then(()=>require("./programming-language-ocaml-BEz7gGv7-pjGiVCW2.cjs")),"./programming-language-php.svg":()=>Promise.resolve().then(()=>require("./programming-language-php-GY38f8r4-ahFMWcim.cjs")),"./programming-language-powershell.svg":()=>Promise.resolve().then(()=>require("./programming-language-powershell-C9DkSp36-RwdG5MCL.cjs")),"./programming-language-python.svg":()=>Promise.resolve().then(()=>require("./programming-language-python-Ct-_kNjo-ujN06OXX.cjs")),"./programming-language-r.svg":()=>Promise.resolve().then(()=>require("./programming-language-r-BGoKwua9-DynRqt7q.cjs")),"./programming-language-ruby.svg":()=>Promise.resolve().then(()=>require("./programming-language-ruby-DhdM4d7g-DFwAUdk6.cjs")),"./programming-language-scala.svg":()=>Promise.resolve().then(()=>require("./programming-language-scala-BVg0dToJ-Dhg_XTFe.cjs")),"./programming-language-shell.svg":()=>Promise.resolve().then(()=>require("./programming-language-shell-BsTa1xI7-CEpfIQQF.cjs")),"./programming-language-swift.svg":()=>Promise.resolve().then(()=>require("./programming-language-swift-Dn72xPjg-DtICVxss.cjs")),"./programming-language-typescript.svg":()=>Promise.resolve().then(()=>require("./programming-language-typescript-CdF-HuRi-jq2P_J1a.cjs")),"./programming-script-code.svg":()=>Promise.resolve().then(()=>require("./programming-script-code-DQN1veb2-DWnN18iL.cjs")),"./programming-tool-git.svg":()=>Promise.resolve().then(()=>require("./programming-tool-git-DDnQ1zGD-Bi0r1H3m.cjs")),"./programming-tool-tailwindcss.svg":()=>Promise.resolve().then(()=>require("./programming-tool-tailwindcss-xjXi0E6g-CpFF5bAj.cjs"))}),Km=r=>{const e=`./${r}.svg`;return Hm[e]?i.defineAsyncComponent(Hm[e]):(console.warn(`Could not find icon: ${r}`),null)},p$=["src"],Me=i.defineComponent({__name:"ScalarIcon",props:{icon:{},size:{}},setup(r){const e=r,t=Eh({variants:{size:{xs:"size-3 stroke-[1.4]",sm:"size-3.5 stroke-[1.2]",md:"size-4 stroke-[1.1]",lg:"size-5",xl:"size-6 stroke-[0.96]","2xl":"size-8 stroke-[0.92]","3xl":"size-10 stroke-[0.9]",full:"size-full"}},defaultVariants:{size:"full"}}),n=Km(e.icon);return(o,s)=>i.unref(n)?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Km)(o.icon)),{key:0,class:i.normalizeClass(i.unref(so)("scalar-icon",i.unref(t)({size:o.size})))},null,8,["class"])):(i.openBlock(),i.createElementBlock("img",{key:1,src:o.icon},null,8,p$))}}),m$=["ariaDisabled"],g$={class:"sr-only"},Mi=i.defineComponent({__name:"ScalarIconButton",props:{label:{},icon:{},disabled:{type:Boolean},variant:{default:"ghost"},size:{default:"md"}},setup(r){const e=Eh({base:"scalar-icon-button grid aspect-square cursor-pointer rounded",variants:{size:{xs:"size-3.5 p-0.5",sm:"size-6 p-1",md:"size-10 p-3",full:"h-full w-full"},disabled:{true:"cursor-not-allowed shadow-none"},variant:Tv}}),t=i.computed(()=>{const{class:n,...o}=i.useAttrs();return{class:n||"",rest:o}});return(n,o)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(t.value.rest,{ariaDisabled:n.disabled||void 0,class:i.unref(so)(i.unref(e)({size:n.size,variant:n.variant,disabled:n.disabled}),t.value.class),type:"button"}),[i.createVNode(i.unref(Me),{icon:n.icon},null,8,["icon"]),i.createElementVNode("span",g$,i.toDisplayString(n.label),1)],16,m$))}}),y$={class:"sr-only"},v$=["value"],b$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchInput",props:{loading:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e;function n(s){t("update:modelValue",s.target.value)}const o=i.computed(()=>{const{class:s,...a}=i.useAttrs();return{className:s||"",rest:a}});return(s,a)=>(i.openBlock(),i.createElementBlock("label",i.mergeProps(o.value.rest,{class:i.unref(so)("flex rounded border bg-back-1 text-sm font-medium focus-within:border-fore-1",o.value.className)}),[i.createElementVNode("span",y$,[i.renderSlot(s.$slots,"label",{},()=>[i.createTextVNode("Enter search")])]),i.createElementVNode("input",{autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 rounded bg-transparent p-3 outline-none",placeholder:"Search...",spellcheck:"false",type:"text",value:s.modelValue,onInput:n},null,40,v$),s.loading&&s.loading.isLoading?(i.openBlock(),i.createBlock(i.unref(Ov),{key:0,class:"mr-3 self-center",loadingState:s.loading,size:"20px"},null,8,["loadingState"])):s.modelValue?(i.openBlock(),i.createBlock(i.unref(Mi),{key:1,class:"self-center",icon:"Close",label:"Clear Search",size:"md",onClick:a[0]||(a[0]=l=>t("update:modelValue",""))})):i.createCommentVNode("",!0)],16))}}),w$={class:"flex flex-col items-center gap-2 px-3 py-4"},k$=i.createElementVNode("div",{class:"rotate-90 text-lg font-bold"},":(",-1),S$={class:"text-sm font-medium text-fore-2"},x$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultList",props:{noResults:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("ul",i.mergeProps(e.value.rest,{class:i.unref(so)("flex flex-col",e.value.className)}),[t.noResults?i.renderSlot(t.$slots,"noResults",{key:0},()=>[i.createElementVNode("div",w$,[k$,i.createElementVNode("div",S$,[i.createTextVNode(" No results found "),t.$slots.query?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode('for "'),i.renderSlot(t.$slots,"query"),i.createTextVNode('"')],64)):i.createCommentVNode("",!0)])])]):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")],16))}}),C$={class:"contents"},E$={class:"text-fore-3 group-hover:text-fore-1"},$$={class:"flex min-w-0 flex-1 flex-col gap-0.75"},_$={class:"flex items-center gap-1"},N$={class:"flex-1 truncate text-sm font-medium"},A$={key:0,class:"text-xs text-fore-2"},O$={class:"truncate text-xs text-fore-2"},T$=i.defineComponent({inheritAttrs:!1,__name:"ScalarSearchResultItem",props:{icon:{},active:{type:Boolean}},setup(r){const e=i.computed(()=>{const{class:t,...n}=i.useAttrs();return{className:t||"",rest:n}});return(t,n)=>(i.openBlock(),i.createElementBlock("li",C$,[i.createElementVNode("a",i.mergeProps(e.value.rest,{class:i.unref(so)("group flex cursor-pointer gap-3 rounded px-3 py-1.5 no-underline hover:bg-back-2",{"bg-back-2":t.active},e.value.className)}),[i.createElementVNode("div",E$,[i.renderSlot(t.$slots,"icon",{},()=>[t.icon?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,icon:t.icon,size:"sm"},null,8,["icon"])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",$$,[i.createElementVNode("div",_$,[i.createElementVNode("div",N$,[i.renderSlot(t.$slots,"default")]),t.$slots.addon?(i.openBlock(),i.createElementBlock("div",A$,[i.renderSlot(t.$slots,"addon")])):i.createCommentVNode("",!0)]),i.createElementVNode("div",O$,[i.renderSlot(t.$slots,"description")])])],16)]))}}),B$={class:"card-form-input"},P$=["for"],I$=["id","type"],M$=i.defineComponent({inheritAttrs:!1,__name:"CardFormTextInput",props:{id:{},type:{}},setup(r){const e=r,t=i.ref(!0),n=i.computed(()=>e.type==="password"?t.value?"password":"text":e.type??"text");return(o,s)=>(i.openBlock(),i.createElementBlock("div",B$,[i.createElementVNode("label",{for:o.id},[i.renderSlot(o.$slots,"default",{},void 0,!0)],8,P$),i.createElementVNode("input",i.mergeProps(o.$attrs,{id:o.id,autocomplete:"off","data-1p-ignore":"",spellcheck:"false",type:n.value}),null,16,I$),o.type==="password"?(i.openBlock(),i.createBlock(i.unref(Mi),{key:0,class:"password-mask",icon:t.value?"Show":"Hide",label:t.value?"Show Password":"Hide Password",onClick:s[0]||(s[0]=a=>t.value=!t.value)},null,8,["icon","label"])):i.createCommentVNode("",!0)]))}}),go=U(M$,[["__scopeId","data-v-623edb4f"]]),D$=r=>(i.pushScopeId("data-v-5ac9a107"),r=r(),i.popScopeId(),r),V$={class:"scopes-label"},R$=D$(()=>i.createElementVNode("em",null,"/",-1)),L$=["checked"],j$={class:"dropdown-item-title"},F$={class:"dropdown-item-description"},q$=i.defineComponent({__name:"SecuritySchemeScopes",props:{scopes:{},selected:{}},emits:["update:selected"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=i.ref(),{floatingStyles:a}=r$(o,s,{placement:"bottom-end",whileElementsMounted:XE,middleware:[TE(5),ZE(),QE()]}),l=i.computed({get:()=>t.selected,set:c=>n("update:selected",c)});return(c,d)=>(i.openBlock(),i.createBlock(i.unref(Le.Listbox),{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=u=>l.value=u),multiple:""},{default:i.withCtx(({open:u})=>[i.createElementVNode("div",{ref_key:"trigger",ref:o,class:i.normalizeClass(["wrapper",{"wrapper-open":u}])},[i.createVNode(i.unref(Le.ListboxButton),{as:uv},{default:i.withCtx(()=>[i.createElementVNode("div",V$,[i.createTextVNode(" Scopes "+i.toDisplayString(l.value.length),1),R$,i.createTextVNode(i.toDisplayString(Object.entries(c.scopes).length)+" ",1),i.createVNode(i.unref(Me),{icon:u?"ChevronUp":"ChevronDown",size:"sm"},null,8,["icon"])])]),_:2},1024)],2),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.unref(Qg),null,{default:i.withCtx(({styles:h})=>[i.createElementVNode("div",{ref_key:"dropdown",ref:s,class:i.normalizeClass(["floating",h]),style:i.normalizeStyle(i.unref(a))},[i.createVNode(i.unref(Le.ListboxOptions),{as:"dl",class:"dropdown"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(c.scopes),([f,p])=>(i.openBlock(),i.createBlock(i.unref(Le.ListboxOption),{key:f,as:"div",class:"dropdown-item",value:f},{default:i.withCtx(({selected:m})=>[i.createElementVNode("input",{checked:m,class:"dropdown-item-check",tabindex:"-1",type:"checkbox"},null,8,L$),i.createElementVNode("dt",j$,i.toDisplayString(f),1),i.createElementVNode("dd",F$,i.toDisplayString(p),1)]),_:2},1032,["value"]))),128))]),_:1})],6)]),_:1})]))]),_:1},8,["modelValue"]))}}),z$=U(q$,[["__scopeId","data-v-5ac9a107"]]),H$=i.defineComponent({__name:"SecurityScheme",props:{value:{}},setup(r){const{authentication:e,setAuthentication:t}=rs(),n=h=>{t({apiKey:{...e.apiKey,token:h.target.value}})},o=h=>{t({http:{...e.http,basic:{...e.http.basic,username:h.target.value}}})},s=h=>{t({http:{...e.http,basic:{...e.http.basic,password:h.target.value}}})},a=h=>{t({http:{...e.http,bearer:{...e.http.bearer,token:h.target.value}}})},l=h=>{t({oAuth2:{...e.oAuth2,clientId:h.target.value}})},c=h=>{const f=e.oAuth2.scopes.join(" "),p=(Math.random()+1).toString(36).substring(7),m=new URL(h.authorizationUrl);return t({oAuth2:{...e.oAuth2,state:p}}),m.searchParams.set("response_type","token"),m.searchParams.set("client_id",e.oAuth2.clientId),m.searchParams.set("redirect_uri",window.location.href),m.searchParams.set("scope",f),m.searchParams.set("state",p),m.toString()},d=i.computed({get:()=>e.oAuth2.scopes,set:h=>t({oAuth2:{...e.oAuth2,scopes:h}})}),u=h=>{const p=window.open(h,"openAuth2Window","left=100,top=100,width=800,height=600");if(p){const m=setInterval(function(){var g;try{const v=new URLSearchParams(p.location.href).get("access_token");if(p.closed||v){clearInterval(m);const b=(g=p.location.href.match(/state=([^&]*)/))==null?void 0:g[1];v&&e.oAuth2.state===b&&t({oAuth2:{...e.oAuth2,accessToken:v}}),p.close()}}catch{}},200)}};return(h,f)=>{var p;return h.value&&((p=h.value)!=null&&p.type)?(i.openBlock(),i.createBlock(M2,{key:0},{default:i.withCtx(()=>[h.value.type==="apiKey"?(i.openBlock(),i.createBlock(go,{key:0,id:`security-scheme-${h.value.name}`,placeholder:"Token",type:"password",value:i.unref(e).apiKey.token,onInput:n},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h.value.in.charAt(0).toUpperCase()+h.value.in.slice(1))+" API ",1)]),_:1},8,["id","value"])):h.value.type==="http"||h.value.type==="basic"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[h.value.type==="basic"||h.value.scheme==="basic"?(i.openBlock(),i.createBlock(Tm,{key:0},{default:i.withCtx(()=>[i.createVNode(go,{id:"http.basic.username",placeholder:"Username",value:i.unref(e).http.basic.username,onInput:o},{default:i.withCtx(()=>[i.createTextVNode(" Username ")]),_:1},8,["value"]),i.createVNode(go,{id:"http.basic.password",placeholder:"Password",type:"password",value:i.unref(e).http.basic.password,onInput:s},{default:i.withCtx(()=>[i.createTextVNode(" Password ")]),_:1},8,["value"])]),_:1})):h.value.type==="http"&&h.value.scheme==="bearer"?(i.openBlock(),i.createBlock(go,{key:1,id:"http.bearer.token",placeholder:"Token",type:"password",value:i.unref(e).http.bearer.token,onInput:a},{default:i.withCtx(()=>[i.createTextVNode(" Bearer Token ")]),_:1},8,["value"])):i.createCommentVNode("",!0)],64)):h.value.type.toLowerCase()==="oauth2"&&h.value.flows&&h.value.flows.implicit?(i.openBlock(),i.createBlock(Tm,{key:2},{default:i.withCtx(()=>[i.unref(e).oAuth2.accessToken?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(go,{id:"oAuth2.accessToken",placeholder:"xxxxx",type:"password",value:i.unref(e).oAuth2.accessToken},{default:i.withCtx(()=>[i.createTextVNode(" Access Token ")]),_:1},8,["value"]),i.createVNode(uv,{onClick:f[0]||(f[0]=()=>i.unref(t)({oAuth2:{...i.unref(e).oAuth2,accessToken:"",state:""}}))},{default:i.withCtx(()=>[i.createTextVNode(" Reset ")]),_:1})],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createVNode(go,{id:"oAuth2.clientId",placeholder:"12345",type:"text",value:i.unref(e).oAuth2.clientId,onInput:l},{default:i.withCtx(()=>[i.createTextVNode(" Client ID ")]),_:1},8,["value"]),h.value!==void 0?(i.openBlock(),i.createBlock(z$,{key:0,selected:d.value,"onUpdate:selected":f[1]||(f[1]=m=>d.value=m),scopes:h.value.flows.implicit.scopes},null,8,["selected","scopes"])):i.createCommentVNode("",!0),i.createElementVNode("button",{class:"cardform-auth-button",onClick:f[2]||(f[2]=()=>{var m;return u(c((m=h.value)==null?void 0:m.flows.implicit))})}," Authorize ")],64))]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}}),Bv=U(H$,[["__scopeId","data-v-146c2c6e"]]),K$=r=>(i.pushScopeId("data-v-073bf07f"),r=r(),i.popScopeId(),r),U$={key:1,class:"security-scheme-selector"},W$=["value"],G$=K$(()=>i.createElementVNode("option",{value:""},"None",-1)),J$=["value"],Y$=i.defineComponent({__name:"SecuritySchemeSelector",props:{value:{}},emits:["input"],setup(r,{emit:e}){const t=r,n=e,{authentication:o,setAuthentication:s}=rs(),a=y=>{l(y.target.value)};i.onMounted(()=>{o.preferredSecurityScheme||l(Object.keys(t.value??{})[0]??null)});const l=y=>{s({preferredSecurityScheme:y}),n("input",y)};i.onServerPrefetch(()=>l(Object.keys(t.value??{})[0]??null));const c=y=>!(y!=null&&y.type),d=y=>y.type.toLowerCase()==="apikey",u=y=>y.type==="http"&&y.scheme.toLowerCase()==="basic"||y.type.toLowerCase()==="basic",h=y=>y.type==="http"&&y.scheme.toLowerCase()==="bearer",f=y=>y.type.toLowerCase()==="oauth2",p=(y,v)=>`${m(y)} (${v})`,m=y=>c(y)?"No Authentication":d(y)?"API Key":u(y)?"Basic Authentication":h(y)?"Bearer Authentication":f(y)?"OAuth 2.0":`${y.type} (not yet supported)`,g=i.computed(()=>Object.keys(t.value??{}));return(y,v)=>{var b,w;return g.value.length===1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(p((b=y.value)==null?void 0:b[g.value[0]],g.value[0])),1)],64)):g.value.length>1?(i.openBlock(),i.createElementBlock("div",U$,[i.createElementVNode("span",null,i.toDisplayString(i.unref(o).preferredSecurityScheme?p((w=y.value)==null?void 0:w[i.unref(o).preferredSecurityScheme],i.unref(o).preferredSecurityScheme):"None"),1),i.createVNode(i.unref(Me),{icon:"ChevronDown"}),i.createElementVNode("select",{value:i.unref(o).preferredSecurityScheme,onClick:v[0]||(v[0]=i.withModifiers(()=>{},["prevent"])),onInput:a},[G$,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,S=>{var x;return i.openBlock(),i.createElementBlock("option",{key:S,value:S??null},i.toDisplayString(p((x=y.value)==null?void 0:x[S],S)),9,J$)}),128))],40,W$)])):i.createCommentVNode("",!0)}}}),Pv=U(Y$,[["__scopeId","data-v-073bf07f"]]);var $h={};/*!
|
|
63
63
|
* content-type
|
|
64
64
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
65
65
|
* MIT Licensed
|
|
@@ -216,11 +216,11 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
216
216
|
|
|
217
217
|
`):f.map(h)}function Ys(r,e){return typeof e=="string"?[{start:{line:1,column:1,offset:0},error:e,path:""}]:SD(r,null,e,{format:"js",indent:2,colorize:!1}).map(t=>(t.error=t.error.trim(),t))}function xD(r){try{return x1(r),{valid:!0}}catch(e){return{valid:!1,errors:Ys(r,e.message)}}}class Vf{constructor(){Yr(this,"version"),Yr(this,"ajvValidators",{}),Yr(this,"externalRefs",{}),Yr(this,"errors"),Yr(this,"specificationVersion"),Yr(this,"specificationType"),Yr(this,"specification")}resolveReferences(e){return x1(e.find(t=>t.isEntrypoint===!0).specification)}async validate(e){var t;const n=e.find(s=>s.isEntrypoint),o=n==null?void 0:n.specification;this.specification=o,(t=this.specification)!=null&&t.info&&!this.specification.info.version&&(this.specification.info.version="0.0.1");try{if(o==null)return{valid:!1,errors:Ys(n,Au.EMPTY_OR_INVALID)};Object.keys(this.externalRefs).length>0&&(o[cI]=this.externalRefs);const{version:s,specificationType:a,specificationVersion:l}=S1(o);if(this.version=s,this.specificationVersion=l,this.specificationType=a,!s)return{valid:!1,errors:Ys(n,Au.OPENAPI_VERSION_NOT_SUPPORTED)};const c=await this.getAjvValidator(s);return c(o)?xD(n.specification):c.errors&&c.errors.length>0?{valid:!1,errors:Ys(n,c.errors)}:{valid:!1}}catch(s){return{valid:!1,errors:Ys(n,s.message??s)}}}async getAjvValidator(e){if(this.ajvValidators[e])return this.ajvValidators[e];const t=await b_(Object.assign({"../../../schemas/v2.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BQQoKgNw-CyFt8nZw.cjs")),"../../../schemas/v3.0/schema.json":()=>Promise.resolve().then(()=>require("./schema-BjykgtPd-C_N_PTsi.cjs")),"../../../schemas/v3.1/schema.json":()=>Promise.resolve().then(()=>require("./schema-ZROhtp0X-DL6m5HXA.cjs"))}),`../../../schemas/v${e}/schema.json`),n=lI[t.$schema],o=new n({strict:!1});return fT(o),e==="3.1"&&o.addFormat("media-range",!0),this.ajvValidators[e]=o.compile(t)}}Yr(Vf,"supportedVersions",Eb);function CD(){return{load:ED}}function ED(r){const e=w1(r);return{get:()=>e,details:()=>Oc(e),filter:t=>Ki(e,t),upgrade:()=>M1(e),validate:()=>Rf(e),resolve:()=>Ac(e),toJson:()=>Ui(e),toYaml:()=>Wi(e)}}function M1(r){const e=$M(r);return{get:()=>e,details:()=>Oc(e),filter:t=>Ki(e,t),validate:()=>Rf(e),resolve:()=>Ac(e),toJson:()=>Ui(e),toYaml:()=>Wi(e)}}async function Rf(r){return{...await _M(r),filter:e=>Ki(r,e),get:()=>r,details:()=>Oc(r),resolve:()=>Ac(r),toJson:()=>Ui(r),toYaml:()=>Wi(r)}}async function Ac(r){return{...await kM(r),filter:e=>Ki(r,e),toJson:()=>Ui(r),toYaml:()=>Wi(r)}}function Ki(r,e){const t=dI(r,e);return{get:()=>t,details:()=>Oc(t),filter:()=>Ki(t,e),upgrade:()=>M1(t),validate:()=>Rf(t),resolve:()=>Ac(t),toJson:()=>Ui(t),toYaml:()=>Wi(t)}}function Oc(r){return S1(r)}function Ui(r){return SM(r)}function Wi(r){return xM(r)}const D1=r=>new Promise(async(e,t)=>{var n;try{const{schema:o,errors:s}=await CD().load(r).resolve();if(s!=null&&s.length&&console.warn(`Please open an issue on https://github.com/scalar/scalar
|
|
218
218
|
`,`Scalar OpenAPI Parser Warning:
|
|
219
|
-
`,s),o===void 0){t(((n=s==null?void 0:s[0])==null?void 0:n.error)??"Failed to parse the OpenAPI file.");return}e($D(structuredClone(o)))}catch(o){t(o)}}),$D=r=>{r.tags||(r.tags=[]),r.paths||(r.paths={});const e={};return Object.keys(r.webhooks??{}).forEach(n=>{var o;Object.keys(((o=r.webhooks)==null?void 0:o[n])??{}).forEach(s=>{var l,c,d;const a=((l=r.webhooks)==null?void 0:l[n])[s];e[n]===void 0&&(e[n]={}),e[n][s]={httpVerb:s,path:n,operationId:(a==null?void 0:a.operationId)||n,name:(a==null?void 0:a.summary)||n||"",description:(a==null?void 0:a.description)||"",pathParameters:(d=(c=r.paths)==null?void 0:c[n])==null?void 0:d.parameters,information:{...a}}})}),Object.keys(r.paths).forEach(n=>{Object.keys(r.paths[n]).filter(s=>eh.includes(s.toUpperCase())).forEach(s=>{var c,d,u,h,f,p;const a=r.paths[n][s],l={httpVerb:s,path:n,operationId:a.operationId||n,name:a.summary||n||"",description:a.description||"",information:{...a},pathParameters:(d=(c=r.paths)==null?void 0:c[n])==null?void 0:d.parameters};if(!a.tags||a.tags.length===0){(u=r.tags)!=null&&u.find(g=>g.name==="default")||(h=r.tags)==null||h.push({name:"default",description:"",operations:[]});const m=(f=r.tags)==null?void 0:f.findIndex(g=>g.name==="default");m>=0&&((p=r.tags[m])==null||p.operations.push(l))}else a.tags.forEach(m=>{var v,b,w;const g=(v=r.tags)==null?void 0:v.findIndex(S=>S.name===m);g===-1&&((b=r.tags)==null||b.push({name:m,description:""}));const y=g!==-1?g:r.tags.length-1;typeof((w=r.tags[y])==null?void 0:w.operations)>"u"&&(r.tags[y].operations=[]),r.tags[y].operations.push(l)})})}),r.tags.forEach((n,o)=>{var a;const s=n["x-displayName"];s&&((a=r.tags)!=null&&a[o])&&(r.tags[o].name=s)}),{...r,webhooks:e}},Tc=Symbol(),Lf=Symbol(),_i=async r=>{var e;(e=document.getElementById(r))==null||e.scrollIntoView()},kr=r=>new Promise(e=>setTimeout(e,r)),_D=Symbol("downloadSpec"),jf=Xe.useEventBus(_D);function V1(r,e){const t=c0(r),n=t?new Blob([r],{type:"application/json"}):new Blob([r],{type:"application/x-yaml"}),o=URL.createObjectURL(n),s=t?".json":".yaml",a="spec"+s,l=e?e+s:a,c=document.createElement("a");c.href=o,c.download=l,c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{window.URL.revokeObjectURL(o),c.remove()},100)}function R1(r,e=1){const t=new RegExp(`^(?=#{${e}} )`,"m");return r.split(t).map(n=>n.trim()).filter(Boolean)}var ND=Object.defineProperty,AD=(r,e,t)=>e in r?ND(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ct=(r,e,t)=>(AD(r,typeof e!="symbol"?e+"":e,t),t);function OD(r){if(!r||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}OD("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:20px;width:20px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;transition:opacity .4s,box-shadow .2s;z-index:100}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:focus [data-close-button]{opacity:1}[data-sonner-toast]:focus-within [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{display:none;transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}");let Vu=1;class TD{constructor(){ct(this,"subscribers"),ct(this,"toasts"),ct(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)})),ct(this,"publish",e=>{this.subscribers.forEach(t=>t(e))}),ct(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]}),ct(this,"create",e=>{var t;const{message:n,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Vu++,a=this.toasts.findIndex(c=>c.id===s),l=e.dismissible===void 0?!0:e.dismissible;return a!==-1?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...e,id:s,title:n}),{...c,...e,id:s,dismissible:l,title:n}):c):this.addToast({title:n,...o,dismissible:l,id:s}),s}),ct(this,"dismiss",e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e)),ct(this,"message",(e,t)=>this.create({...t,message:e})),ct(this,"error",(e,t)=>this.create({...t,type:"error",message:e})),ct(this,"success",(e,t)=>this.create({...t,type:"success",message:e})),ct(this,"info",(e,t)=>this.create({...t,type:"info",message:e})),ct(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e})),ct(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e})),ct(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading}));const o=e instanceof Promise?e:e();let s=n!==void 0;return o.then(a=>{if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?t.success(a):t.success;this.create({id:n,type:"success",message:l})}}).catch(a=>{if(t.error!==void 0){s=!1;const l=typeof t.error=="function"?t.error(a):t.error;this.create({id:n,type:"error",message:l})}}).finally(()=>{var a;s&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n}),ct(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Vu++;return this.publish({...t,id:n,title:e}),n}),this.subscribers=[],this.toasts=[]}}const Kt=new TD,BD=(r,e)=>{const t=(e==null?void 0:e.id)||Vu++;return Kt.publish({title:r,...e,id:t}),t},PD=BD,Ba=Object.assign(PD,{success:Kt.success,info:Kt.info,warning:Kt.warning,error:Kt.error,custom:Kt.custom,message:Kt.message,promise:Kt.promise,dismiss:Kt.dismiss,loading:Kt.loading}),ID=["data-visible"],MD={className:"sonner-spinner"},DD=i.defineComponent({__name:"Loader",props:{visible:Boolean},setup(r){const e=Array(12).fill(0);return(t,n)=>(i.openBlock(),i.createElementBlock("div",{className:"sonner-loading-wrapper","data-visible":r.visible},[i.createElementVNode("div",MD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e),o=>(i.openBlock(),i.createElementBlock("div",{key:`spinner-bar-${o}`,className:"sonner-loading-bar"}))),128))])],8,ID))}}),Gi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},VD={},RD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},LD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),jD=[LD];function FD(r,e){return i.openBlock(),i.createElementBlock("svg",RD,jD)}const qD=Gi(VD,[["render",FD]]),zD={},HD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},KD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1),UD=[KD];function WD(r,e){return i.openBlock(),i.createElementBlock("svg",HD,UD)}const GD=Gi(zD,[["render",WD]]),JD={},YD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},XD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1),QD=[XD];function ZD(r,e){return i.openBlock(),i.createElementBlock("svg",YD,QD)}const e5=Gi(JD,[["render",ZD]]),t5={},r5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n5=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),o5=[n5];function s5(r,e){return i.openBlock(),i.createElementBlock("svg",r5,o5)}const i5=Gi(t5,[["render",s5]]),a5={},l5={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},c5=i.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),d5=i.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),u5=[c5,d5];function h5(r,e){return i.openBlock(),i.createElementBlock("svg",l5,u5)}const f5=Gi(a5,[["render",h5]]),p5=["aria-live","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-type","data-invert","data-swipe-out","data-expanded"],m5=["data-disabled"],g5={key:1,"data-icon":""},y5={"data-content":""},v5={"data-title":""},b5=4e3,w5=14,k5=20,S5=200,x5=i.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},duration:{},descriptionClass:{}},emits:["update:heights","removeToast"],setup(r,{emit:e}){const t=B=>!!B.promise,n=e,o=r,s=i.ref(!1),a=i.ref(!1),l=i.ref(!1),c=i.ref(!1),d=i.ref(null),u=i.ref(0),h=i.ref(0),f=i.ref(null),p=i.ref(null),m=i.computed(()=>o.index===0),g=i.computed(()=>o.index+1<=o.visibleToasts),y=i.computed(()=>o.toast.type),v=i.computed(()=>o.toast.dismissible),b=o.toast.className||"",w=o.toast.descriptionClassName||"",S=o.toast.style||{},x=i.computed(()=>o.heights.findIndex(B=>B.toastId===o.toast.id)||0),k=i.computed(()=>o.toast.duration||o.duration||b5),C=i.ref(0),N=i.ref(0),P=i.ref(k.value),M=i.ref(0),j=i.ref(null),I=i.computed(()=>o.position.split("-")),X=i.computed(()=>I.value[0]),W=i.computed(()=>I.value[1]),te=i.computed(()=>o.heights.reduce((B,z,H)=>H>=x.value?B:B+z.height,0)),me=i.computed(()=>o.toast.invert||o.invert),ke=i.computed(()=>d.value==="loading"),Se=i.computed(()=>d.value??(o.toast.type||null)),se=i.computed(()=>!t(o.toast)&&typeof o.toast.title=="object"),q=i.computed(()=>{if(!t(o.toast))return null;switch(d.value){case"loading":return o.toast.loading;case"success":return typeof o.toast.success=="function"?f.value:o.toast.success;case"error":return typeof o.toast.error=="function"?f.value:o.toast.error;default:return null}});i.onMounted(()=>s.value=!0),i.watchEffect(()=>{N.value=x.value*w5+te.value});function T(){var B,z;(!ke.value||v.value)&&(V(),(z=(B=o.toast).onDismiss)==null||z.call(B,o.toast))}function V(){a.value=!0,u.value=N.value;const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B),setTimeout(()=>{n("removeToast",o.toast)},S5)}const D=B=>{ke||(u.value=N.value,B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(l.value=!0,j.value={x:B.clientX,y:B.clientY}))},E=B=>{var z,H,ie,oe;if(c.value)return;j.value=null;const ye=Number(((z=p.value)==null?void 0:z.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(ye)>=k5){u.value=N.value,(ie=(H=o.toast).onDismiss)==null||ie.call(H,o.toast),V(),c.value=!0;return}(oe=p.value)==null||oe.style.setProperty("--swipe-amount","0px"),l.value=!0},A=B=>{var z;if(!j.value)return;const H=B.clientY-j.value.y,ie=B.clientX-j.value.x,oe=(I.value[0]==="top"?Math.min:Math.max)(0,H),ye=B.pointerType==="touch"?10:2;Math.abs(oe)>ye?(z=p.value)==null||z.style.setProperty("--swipe-amount",`${H}px`):Math.abs(ie)>ye&&(j.value=null)};return i.watchEffect(B=>{if(o.toast.promise&&d.value==="loading"||o.toast.duration===1/0)return;let z;const H=()=>{if(M.value<C.value){const oe=new Date().getTime()-C.value;P.value=P.value-oe}M.value=new Date().getTime()},ie=()=>{C.value=new Date().getTime(),z=setTimeout(()=>{var oe,ye;(ye=(oe=o.toast).onAutoClose)==null||ye.call(oe,o.toast),V()},P.value)};o.expanded||o.interacting?H():ie(),B(()=>{clearTimeout(z)})}),i.onMounted(()=>{if(p.value){const B=p.value.getBoundingClientRect().height;h.value=B;const z=[{toastId:o.toast.id,height:B},...o.heights];n("update:heights",z)}}),i.onUnmounted(()=>{if(p.value){const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B)}}),i.watchEffect(()=>{o.toast.delete&&V()}),(B,z)=>(i.openBlock(),i.createElementBlock("li",{"aria-live":B.toast.important?"assertive":"polite","aria-atomic":"",role:"status",tabindex:"0",ref_key:"toastRef",ref:p,"data-sonner-toast":"",class:i.normalizeClass(i.unref(b)),"data-styled":!se.value,"data-mounted":s.value,"data-promise":!!B.toast.promise,"data-removed":a.value,"data-visible":g.value,"data-y-position":X.value,"data-x-position":W.value,"data-index":o.index,"data-front":m.value,"data-swiping":l.value,"data-type":d.value!=="loading"&&d.value?d.value:y.value,"data-invert":me.value,"data-swipe-out":c.value,"data-expanded":!!(o.expanded||o.expandByDefault&&s.value),style:i.normalizeStyle({"--index":o.index,"--toasts-before":o.index,"--z-index":B.toasts.length-o.index,"--offset":`${a.value?u.value:N.value}px`,"--initial-height":o.expandByDefault?"auto":`${h.value}px`,...i.unref(S)}),onPointerdown:D,onPointerup:E,onPointermove:A},[o.closeButton&&!se.value?(i.openBlock(),i.createElementBlock("button",{key:0,"aria-label":"Close toast","data-close-button":"","data-disabled":ke.value,onClick:T},[i.createVNode(f5)],8,m5)):i.createCommentVNode("",!0),y.value||B.toast.icon||B.toast.promise?(i.openBlock(),i.createElementBlock("div",g5,[typeof B.toast.promise=="function"||y.value==="loading"?(i.openBlock(),i.createBlock(DD,{key:0,visible:d.value==="loading"||y.value==="loading"},null,8,["visible"])):i.createCommentVNode("",!0),Se.value==="success"?(i.openBlock(),i.createBlock(qD,{key:1})):Se.value==="info"?(i.openBlock(),i.createBlock(GD,{key:2})):Se.value==="warning"?(i.openBlock(),i.createBlock(e5,{key:3})):Se.value==="error"?(i.openBlock(),i.createBlock(i5,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",y5,[i.createElementVNode("div",v5,[typeof B.toast.title=="string"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(B.toast.title),1)],64)):B.toast.title===void 0||B.toast.title===null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(q.value),1)],64)):se.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(B.toast.title),{key:2,onCloseToast:z[0]||(z[0]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},null,32)):i.createCommentVNode("",!0)]),B.toast.description?(i.openBlock(),i.createElementBlock("div",{key:0,"data-description":"",class:i.normalizeClass(B.descriptionClass+i.unref(w))},i.toDisplayString(B.toast.description),3)):i.createCommentVNode("",!0)]),B.toast.cancel?(i.openBlock(),i.createElementBlock("button",{key:2,"data-button":"","data-cancel":"",onClick:z[1]||(z[1]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},i.toDisplayString(B.toast.cancel.label),1)):i.createCommentVNode("",!0),B.toast.action?(i.openBlock(),i.createElementBlock("button",{key:3,"data-button":"",onClick:z[2]||(z[2]=()=>{var H;V(),(H=B.toast.action)==null||H.onClick()})},i.toDisplayString(B.toast.action.label),1)):i.createCommentVNode("",!0)],46,p5))}}),C5=["aria-label"],E5=["dir","data-theme","data-rich-colors","data-y-position","data-x-position"],$5=3,Rg="32px",_5=4e3,N5=356,Lg=14,A5=typeof window<"u"&&typeof document<"u",O5=i.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{default:_5},gap:{default:Lg},visibleToasts:{default:$5},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},className:{default:""},style:{default:()=>({})},offset:{default:Rg},dir:{default:"auto"}},setup(r){const e=r,t=i.useAttrs(),n=i.ref([]),o=i.ref([]),s=i.ref(!1),a=i.ref(!1),l=i.ref(e.theme!=="system"?e.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),c=i.computed(()=>e.position.split("-")),d=i.ref(null),u=e.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function h(p){n.value=n.value.filter(({id:m})=>m!==p.id)}function f(){if(typeof window>"u")return"ltr";const p=document.documentElement.getAttribute("dir");return p==="auto"||!p?window.getComputedStyle(document.documentElement).direction:p}return i.onMounted(()=>{const p=Kt.subscribe(m=>{if(m.dismiss){n.value=n.value.map(g=>g.id===m.id?{...g,delete:!0}:g);return}i.nextTick(()=>{const g=n.value.findIndex(y=>y.id===m.id);g!==-1?n.value.splice(g,1,m):n.value=[m,...n.value]})});i.onUnmounted(()=>{p()})}),i.watch(()=>e.theme,p=>{if(p!=="system"){l.value=p;return}p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?l.value="dark":l.value="light"),!(typeof window>"u")&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:m})=>{m?l.value="dark":l.value="light"})}),i.watchEffect(()=>{n.value.length<=1&&(s.value=!1)}),i.watchEffect(p=>{function m(g){var y,v;e.hotkey.every(b=>g[b]||g.code===b)&&(s.value=!0,(y=d.value)==null||y.focus()),g.code==="Escape"&&(document.activeElement===d.value||(v=d.value)!=null&&v.contains(document.activeElement))&&(s.value=!1)}A5&&(document.addEventListener("keydown",m),p(()=>{document.removeEventListener("keydown",m)}))}),(p,m)=>{var g;return i.openBlock(),i.createElementBlock("section",{"aria-label":`Notifications ${i.unref(u)}`,tabIndex:-1},[i.createElementVNode("ol",{ref_key:"listRef",ref:d,"data-sonner-toaster":"",dir:p.dir==="auto"?f():p.dir,tabIndex:-1,"data-theme":p.theme,"data-rich-colors":p.richColors,"data-y-position":c.value[0],"data-x-position":c.value[1],style:i.normalizeStyle({"--front-toast-height":`${(g=o.value[0])==null?void 0:g.height}px`,"--offset":typeof p.offset=="number"?`${p.offset}px`:p.offset||Rg,"--width":`${N5}px`,"--gap":`${Lg}px`,...i.unref(t).style}),onMouseenter:m[1]||(m[1]=y=>s.value=!0),onMousemove:m[2]||(m[2]=y=>s.value=!0),onMouseleave:m[3]||(m[3]=()=>{a.value||(s.value=!1)}),onPointerdown:m[4]||(m[4]=y=>a.value=!1),onPointerup:m[5]||(m[5]=y=>a.value=!1)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(y,v)=>{var b,w,S,x;return i.openBlock(),i.createBlock(x5,{key:y.id,index:v,toast:y,duration:((b=p.toastOptions)==null?void 0:b.duration)??p.duration,className:(w=p.toastOptions)==null?void 0:w.className,descriptionClassName:(S=p.toastOptions)==null?void 0:S.descriptionClassName,invert:p.invert,visibleToasts:p.visibleToasts,closeButton:p.closeButton,interacting:a.value,position:p.position,style:i.normalizeStyle((x=p.toastOptions)==null?void 0:x.style),toasts:n.value,expandByDefault:p.expand,gap:p.gap,expanded:s.value,heights:o.value,"onUpdate:heights":m[0]||(m[0]=k=>o.value=k),onRemoveToast:h},null,8,["index","toast","duration","className","descriptionClassName","invert","visibleToasts","closeButton","interacting","position","style","toasts","expandByDefault","gap","expanded","heights"])}),128))],44,E5)],8,C5)}}}),L1={toast:()=>null};function T5(r){L1.toast=r}function j1(){return{initializeToasts:T5,toast:(r,e="info",t={timeout:3e3})=>{L1.toast(r,e,t)}}}const B5=i.defineComponent({__name:"ScalarToasts",setup(r){const e=i.ref(!1);i.onMounted(()=>e.value=!0);const t={success:Ba.success,error:Ba.error,warn:Ba.warning,info:Ba},{initializeToasts:n}=j1();return n((o,s="info",a={})=>{(t[s]||t.info)(o,{duration:a.timeout||3e3})}),(o,s)=>e.value?(i.openBlock(),i.createBlock(i.unref(O5),{key:0,toastOptions:{className:"toaster"}})):i.createCommentVNode("",!0)}}),ws=()=>{const{toast:r}=j1();return{copyToClipboard:t=>{navigator.clipboard.writeText(t).then(()=>{r("Copied to the clipboard","info")})}}},Jr=i.ref(!1);function P5(r){var o;const e=()=>{var a,l;const s=typeof window<"u"?(a=window.localStorage)==null?void 0:a.getItem("isDark"):null;return typeof s=="string"?!!JSON.parse(s):!!(typeof window<"u"&&((l=window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)"))!=null&&l.matches))},t=()=>{var s;Jr.value=!Jr.value,typeof window<"u"&&((s=window==null?void 0:window.localStorage)==null||s.setItem("isDark",JSON.stringify(Jr.value)))};function n(s){var a;Jr.value=s,typeof window<"u"&&((a=window==null?void 0:window.localStorage)==null||a.setItem("isDark",JSON.stringify(Jr.value)))}return Jr.value=(typeof window>"u"?null:JSON.parse(((o=window.localStorage)==null?void 0:o.getItem("isDark"))||"null"))??r??e(),i.watch(Jr,s=>{typeof document>"u"||(document.body.classList.toggle("dark-mode",s),document.body.classList.toggle("light-mode",!s))},{immediate:!0}),{isDark:Jr,toggleDarkMode:t,setDarkMode:n}}const I5=["unirest"],Ru=i.ref([...I5]),M5=Gg.availableTargets().map(r=>(r.key==="node"&&(r.default="undici",r.clients.unshift({description:"An HTTP/1.1 client, written from scratch for Node.js.",key:"undici",link:"https://github.com/nodejs/undici",title:"undici"})),r.clients=r.clients.filter(e=>!Ru.value.includes(e.key)),r)).filter(r=>r.clients.length);function Ji(){return{availableTargets:i.computed(()=>M5),excludedClients:i.readonly(Ru),setExcludedClients:e=>Ru.value=e}}const Ff=i.ref(ts.hash??""),Tl=i.ref(),D5=i.ref(!1),V5=r=>r.slug?`description/${r.slug}`:"",F1=r=>{var t;if(!Tl.value)return"";const e=new RegExp("^"+((t=Tl.value)==null?void 0:t.basePath)+"/?");return decodeURIComponent(r.replace(e,""))},R5=(r,e)=>{if(!r)return"webhooks";const t=Ai.slug(r),n=encodeURIComponent(t);return`webhook/${e}/${n}`},L5=r=>{if(!r)return"models";const e=Ai.slug(r);return`model/${encodeURIComponent(e)}`},j5=(r,e)=>`${q1(e)}/${r.httpVerb}${r.path}`,q1=({name:r})=>{const e=Ai.slug(r);return`tag/${encodeURIComponent(e)}`},F5=(r=Ff.value)=>{var n;const e=(n=r.match(/(tag\/[^/]+)/))==null?void 0:n[0],t=r.startsWith("model")?"models":"";return e??t},q5=()=>{Ff.value=Tl.value?F1(window.location.pathname):decodeURIComponent(window.location.hash.replace(/^#/,""))},lt=()=>({hash:Ff,getWebhookId:R5,getModelId:L5,getHeadingId:V5,getOperationId:j5,getPathRoutingId:F1,getSectionId:F5,getTagId:q1,isIntersectionEnabled:D5,pathRouting:Tl,updateHash:q5});function qf(r){return{parameterMap:i.computed(()=>{var o;const t=((o=r.operation.information)==null?void 0:o.parameters)??[],n={path:[],query:[],header:[],body:[],formData:[]};return r.operation.pathParameters&&r.operation.pathParameters.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),t&&t.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),n})}}const jg=()=>({info:{title:"",description:"",termsOfService:"",version:"",license:{name:"",url:""},contact:{email:""}},externalDocs:{description:"",url:""},components:{schemas:{},securitySchemes:{}},servers:[],tags:[]}),z5=async({url:r,content:e},t)=>{if(r)return Lv(r)?await pp(r,t):await pp(r);const n=typeof e=="function"?e():e;if(typeof n=="string")return n;if(typeof n=="object")return JSON.stringify(n)};function z1({specConfig:r,proxy:e}){const t=i.ref(""),n=i.reactive(jg()),o=i.ref(null);function s(a){return a?D1(a).then(l=>{o.value=null,Object.assign(n,{servers:[],...l})}).catch(l=>{o.value=l.toString()}):Object.assign(n,jg())}return i.watch(()=>i.toValue(r),async a=>{var l;if(a){const c=(l=await z5(a,i.toValue(e)))==null?void 0:l.trim();typeof c=="string"&&(t.value=c)}},{immediate:!0,deep:!0}),i.watch(t,()=>{s(t.value)}),{rawSpec:t,parsedSpec:n,specErrors:o}}function zf(r){return{responses:i.computed(()=>{if(!r.information)return[];const{responses:t}=r.information,n=[];return t&&Object.keys(t).forEach(o=>{n.push({name:o,description:t[o].description})}),n})}}const{getHeadingId:Fg,getModelId:qg,getOperationId:zg,getSectionId:H5,getTagId:H1,getWebhookId:vd,hash:Lu}=lt(),Je=i.ref(void 0);function K5(r){return Je.value=r}const K1=i.ref(!1),Bl=i.reactive(ts["useSidebarContent-collapsedSidebarItems"]??{});function U5(r){Bl[r]=!Bl[r]}function bd(r,e){Bl[r]=e}const Pl=i.ref([]),W5=async r=>{const e=await ki(r),t=Xl(e);return e.filter(n=>n.depth===t||n.depth===t+1)},U1=i.computed(()=>{var h,f,p,m,g,y,v,b,w,S;const{state:r}=Ml(),e={},{openApi:{globalSecurity:t}}=Qu(),n=[];let o=null;Pl.value.forEach(x=>{var k;x.depth===Xl(Pl.value)?(o={id:Fg(x),title:x.value.toUpperCase(),show:!r.showApiClient,children:[]},n.push(o)):o&&((k=o.children)==null||k.push({id:Fg(x),title:x.value,show:!r.showApiClient}))});const s=(f=(h=Je.value)==null?void 0:h.tags)==null?void 0:f[0],l=s&&(x=>(x==null?void 0:x.length)!==1||x[0].name!=="default"||x[0].description!=="")((p=Je.value)==null?void 0:p.tags)?(g=(m=Je.value)==null?void 0:m.tags)==null?void 0:g.filter(x=>{var k;return((k=x.operations)==null?void 0:k.length)>0}).map(x=>{var k;return{id:H1(x),title:x.name.toUpperCase(),show:!0,children:(k=x.operations)==null?void 0:k.map(C=>{var M;const N=zg(C,x),P=C.name??C.path;return e[N]=P,{id:N,title:P,httpVerb:C.httpVerb,deprecated:((M=C.information)==null?void 0:M.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&kl(C,t)}}})}}):(y=s==null?void 0:s.operations)==null?void 0:y.map(x=>{var N;const k=zg(x,s),C=x.name??x.path;return e[k]=C,{id:k,title:C,httpVerb:x.httpVerb,deprecated:((N=x.information)==null?void 0:N.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&kl(x,t)}}}),c=Ah(Je.value)&&!K1.value?[{id:qg(),title:"MODELS",show:!r.showApiClient,children:Object.keys(Jt(Je.value)??{}).map(x=>{var C;const k=qg(x);return e[k]=x,{id:k,title:((C=Jt(Je.value))==null?void 0:C[x]).title??x,show:!r.showApiClient}})}]:[],d=(v=Je.value)!=null&&v["x-tagGroups"]?(w=(b=Je.value)==null?void 0:b["x-tagGroups"])==null?void 0:w.map(x=>{const k=[];return x.tags.map(N=>{if(N.toUpperCase()==="MODELS"&&c.length>0)k.push(c[0]);else{const P=l==null?void 0:l.find(M=>M.title===N.toUpperCase());P&&k.push(P)}}),{id:x.name,title:x.name.toUpperCase(),children:k,show:!0,isGroup:!0}}):void 0,u=Rv(Je.value)?[{id:vd(),title:"WEBHOOKS",show:!r.showApiClient,children:Object.keys(((S=Je.value)==null?void 0:S.webhooks)??{}).map(x=>{var C,N;const k=vd(x);return e[k]=x,Object.keys(((N=(C=Je.value)==null?void 0:C.webhooks)==null?void 0:N[x])??{}).map(P=>{var M,j,I;return{id:vd(x,P),title:(I=(j=(M=Je.value)==null?void 0:M.webhooks)==null?void 0:j[x][P])==null?void 0:I.name,httpVerb:P,show:!r.showApiClient}})}).flat()}]:[];return{entries:[...n,...d??l??[],...d?[]:u,...d?[]:c],titles:e}}),G5=i.ref(!1),J5=i.computed(()=>{var r,e;return((e=(r=U1.value)==null?void 0:r.titles)==null?void 0:e[Lu.value])??""});function rr(r){return r!=null&&r.parsedSpec&&(Je.value=r.parsedSpec,i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t.length},()=>{var e,t;if(Lu.value){const n=H5(Lu.value);n&&bd(n,!0)}else{const n=(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t[0];n&&bd(H1(n),!0)}}),i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.info)==null?void 0:t.description},async()=>{var t,n;const e=(n=(t=Je.value)==null?void 0:t.info)==null?void 0:n.description;return e?Pl.value=await W5(e):Pl.value=[]})),{breadcrumb:J5,items:U1,isSidebarOpen:G5,collapsedSidebarItems:Bl,toggleCollapsedSidebarItem:U5,setCollapsedSidebarItem:bd,hideModels:K1,setParsedSpec:K5}}const Y5=i.defineComponent({__name:"SidebarHttpBadge",props:{active:{type:Boolean},method:{}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(no),{class:i.normalizeClass(["sidebar-heading-type",{"sidebar-heading-type-active":e.active}]),method:e.method,property:"--method-color",short:""},null,8,["class","method"]))}}),W1=U(Y5,[["__scopeId","data-v-6563458b"]]),X5=["id"],Q5={key:0,class:"sidebar-heading-chevron"},Z5=["href"],eV={class:"sidebar-heading-link-title"},tV={key:1,class:"sidebar-heading-link-method"},rV={key:1,class:"action-menu"},nV=i.defineComponent({__name:"SidebarElement",props:{id:{},item:{},isActive:{type:Boolean},hasChildren:{type:Boolean},open:{type:Boolean}},emits:["toggleOpen"],setup(r,{emit:e}){const t=r,n=e,{hash:o,isIntersectionEnabled:s,pathRouting:a}=lt(),l=async()=>{var u,h;t.hasChildren&&n("toggleOpen"),(h=(u=t.item)==null?void 0:u.select)==null||h.call(u),t.open&&(s.value=!1,await kr(100),s.value=!0)},c=()=>{if(a.value)return a.value.basePath+"/"+t.item.id;{const u=new URL(window.location.href);return u.hash=t.item.id,`${u.pathname}${u.search}${u.hash}`}},d=async u=>{var h,f;if(a.value){u.preventDefault(),t.hasChildren&&n("toggleOpen"),(f=(h=t.item)==null?void 0:h.select)==null||f.call(h),n("toggleOpen"),s.value=!1,o.value=t.item.id;const p=new URL(window.location.href);p.pathname=a.value.basePath+"/"+t.item.id,window.history.pushState({},"",p),_i(t.item.id),await kr(100),s.value=!0}};return(u,h)=>{var f,p;return i.openBlock(),i.createElementBlock("li",{id:u.id,class:"sidebar-group-item"},[i.createElementVNode("div",{class:i.normalizeClass(["sidebar-heading",{"sidebar-group-item__folder":u.hasChildren,active_page:u.isActive,deprecated:u.item.deprecated??!1}]),onClick:l},[u.hasChildren?(i.openBlock(),i.createElementBlock("p",Q5,[i.createVNode(i.unref(Mi),{class:"toggle-nested-icon",icon:u.open?"ChevronDown":"ChevronRight",label:"Toggle group",size:"sm",onClick:i.withModifiers(l,["stop"])},null,8,["icon"]),i.createTextVNode(" ")])):i.createCommentVNode("",!0),i.createElementVNode("a",{class:"sidebar-heading-link",href:c(),onClick:d},[(p=(f=u.item)==null?void 0:f.icon)!=null&&p.src?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:"sidebar-icon",icon:u.item.icon.src},null,8,["icon"])):i.createCommentVNode("",!0),i.createElementVNode("p",eV,i.toDisplayString(u.item.title),1),u.item.httpVerb&&!u.hasChildren?(i.openBlock(),i.createElementBlock("p",tV,[i.createTextVNode(" "),i.createVNode(W1,{active:u.isActive,method:u.item.httpVerb},null,8,["active","method"])])):i.createCommentVNode("",!0)],8,Z5)],2),u.open?i.renderSlot(u.$slots,"default",{key:0},void 0,!0):i.createCommentVNode("",!0),u.$slots["action-menu"]?(i.openBlock(),i.createElementBlock("div",rV,[i.renderSlot(u.$slots,"action-menu",{},void 0,!0)])):i.createCommentVNode("",!0)],8,X5)}}}),Pa=U(nV,[["__scopeId","data-v-17b23ea1"]]),oV=i.defineComponent({__name:"SidebarGroup",props:{level:{}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("ul",{class:"sidebar-group sidebar-indent-nested",style:i.normalizeStyle({"--scalar-sidebar-level":e.level})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),wd=U(oV,[["__scopeId","data-v-39c84840"]]),sV={class:"sidebar"},iV={class:"sidebar-group-title"},aV=-160,lV=i.defineComponent({__name:"Sidebar",props:{parsedSpec:{}},setup(r){const e=r,{hash:t,isIntersectionEnabled:n}=lt(),{items:o,toggleCollapsedSidebarItem:s,collapsedSidebarItems:a}=rr({parsedSpec:e.parsedSpec}),l=i.ref(null),c=i.ref(!0);i.watch(t,u=>{!n.value||c.value||typeof window>"u"||d(u)});const d=u=>{var p,m,g,y;const h=document.getElementById(`sidebar-${u}`);if(!h||!l.value)return;let f=aV;h.getAttribute("data-sidebar-type")==="heading"?f+=h.offsetTop+((p=h.getElementsByClassName("sidebar-heading"))==null?void 0:p[0]).offsetHeight:f+=h.offsetTop+(((m=h.parentElement)==null?void 0:m.offsetTop)??0)+(((y=(g=h.parentElement)==null?void 0:g.parentElement)==null?void 0:y.offsetTop)??0),l.value.scrollTo({top:f,behavior:"smooth"})};return i.onMounted(()=>{setTimeout(()=>d(t.value),500),c.value=!1}),(u,h)=>(i.openBlock(),i.createElementBlock("div",sV,[i.renderSlot(u.$slots,"sidebar-start",{},void 0,!0),i.createElementVNode("div",{ref_key:"scrollerEl",ref:l,class:"sidebar-pages custom-scroll custom-scroll-self-contain-overflow"},[i.createVNode(wd,{level:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o).entries,f=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:f.id},[f.isGroup?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("li",iV,i.toDisplayString(f.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,p=>(i.openBlock(),i.createBlock(Pa,{key:p.id,id:`sidebar-${p.id}`,"data-sidebar-type":"heading",hasChildren:p.children&&p.children.length>0,isActive:i.unref(t)===p.id,item:{id:p.id,title:p.title,select:p.select,httpVerb:p.httpVerb,deprecated:p.deprecated??!1},open:i.unref(a)[p.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(p.id),await i.unref(kr)(100),c.value=!1}},{default:i.withCtx(()=>{var m;return[p.children&&((m=p.children)==null?void 0:m.length)>0?(i.openBlock(),i.createBlock(wd,{key:0,level:2},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.children,g=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g.id},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${g.id}`,isActive:i.unref(t)===g.id,item:{id:g.id,title:g.title,select:g.select,httpVerb:g.httpVerb,deprecated:g.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"]))),128))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${f.id}`,"data-sidebar-type":"heading",hasChildren:f.children&&f.children.length>0,isActive:i.unref(t)===f.id,item:{id:f.id,title:f.title,select:f.select,httpVerb:f.httpVerb,deprecated:f.deprecated??!1},open:i.unref(a)[f.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(f.id),await i.unref(kr)(100),c.value=!1}},{default:i.withCtx(()=>{var p;return[f.children&&((p=f.children)==null?void 0:p.length)>0?(i.openBlock(),i.createBlock(wd,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,m=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m.id},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${m.id}`,isActive:i.unref(t)===m.id,item:{id:m.id,title:m.title,select:m.select,httpVerb:m.httpVerb,deprecated:m.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"])):i.createCommentVNode("",!0)],64))],64))),128))]),_:1})],512),i.renderSlot(u.$slots,"sidebar-end",{},void 0,!0)]))}}),Hf=U(lV,[["__scopeId","data-v-404804be"]]),cV={key:0,class:"api-client-drawer"},dV={class:"api-client-container"},uV={class:"scalar-api-client-height"},hV={class:"scalar-api-client-states"},fV={class:"t-doc__sidebar"},pV=i.defineComponent({__name:"ApiClientModal",props:{parsedSpec:{},overloadShow:{type:Boolean},proxyUrl:{},theme:{}},emits:["toggleDarkMode"],setup(r){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cwi4rslr.cjs")).then(a=>a.ApiClient)),{hideApiClient:t,state:n}=Ml(),o=Xe.useMediaQuery("(max-width: 1000px)"),s=i.ref(!1);return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(n).showApiClient||a.overloadShow?(i.openBlock(),i.createElementBlock("div",cV,[i.createElementVNode("div",dV,[i.renderSlot(a.$slots,"header",{},void 0,!0),i.createElementVNode("div",uV,[i.createVNode(i.unref(e),{proxyUrl:a.proxyUrl,showSideBar:s.value,theme:a.theme??"none",withDefaultFonts:!1,onEscapeKeyPress:i.unref(t),onToggleSidebar:l[2]||(l[2]=c=>s.value=!s.value)},{"address-bar-controls":i.withCtx(()=>[i.createElementVNode("div",hV,[i.createElementVNode("button",{class:"scalar-api-client-states-button scalar-api-client-states-button__endpoints",type:"button",onClick:l[0]||(l[0]=c=>s.value=!s.value)},[i.createVNode(i.unref(Me),{icon:s.value?"SideBarClosed":"SideBarOpen",size:"sm"},null,8,["icon"])]),i.createElementVNode("button",{class:"scalar-api-client-states-button",type:"button",onClick:l[1]||(l[1]=(...c)=>i.unref(t)&&i.unref(t)(...c))},[i.createVNode(i.unref(Me),{icon:"Close",size:"sm"})])])]),sidebar:i.withCtx(()=>[i.createElementVNode("div",fV,[i.withDirectives(i.createVNode(i.unref(Hf),{parsedSpec:a.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(a.$slots,"sidebar-start",{},void 0,!0)]),_:3},8,["parsedSpec"]),[[i.vShow,!i.unref(o)]])])]),_:3},8,["proxyUrl","showSideBar","theme","onEscapeKeyPress"])])])])):i.createCommentVNode("",!0),i.unref(n).showApiClient?(i.openBlock(),i.createElementBlock("div",{key:1,class:"api-client-drawer-exit",onClick:l[3]||(l[3]=(...c)=>i.unref(t)&&i.unref(t)(...c))})):i.createCommentVNode("",!0)],64))}}),G1=U(pV,[["__scopeId","data-v-56bf0bfc"]]),J1=()=>({targetKey:"shell",clientKey:"curl"}),Qo=i.reactive(J1());function mV(){jv(Qo,J1())}function Y1(r){var t;const{availableTargets:e}=Ji();return((t=e.value.find(n=>n.key===r.targetKey))==null?void 0:t.title)??r.targetKey}function X1(r){var t,n;const{availableTargets:e}=Ji();return((n=(t=e.value.find(o=>o.key===r.targetKey))==null?void 0:t.clients.find(o=>o.key===r.clientKey))==null?void 0:n.title)??r.clientKey}const gV=r=>{Object.assign(Qo,{...Qo,...r})},yV=i.computed(()=>Y1(Qo)),vV=i.computed(()=>X1(Qo)),Bc=()=>({httpClient:i.readonly(Qo),resetState:mV,setHttpClient:gV,httpTargetTitle:yV,httpClientTitle:vV,getClientTitle:X1,getTargetTitle:Y1}),bV={},wV={class:"scalar-card"};function kV(r,e){return i.openBlock(),i.createElementBlock("div",wV,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const bn=U(bV,[["render",kV],["__scopeId","data-v-dcabb131"]]),SV=i.defineComponent({__name:"CardContent",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["scalar-card-content",{"scalar-card--muted":e.muted,"scalar-card--contrast":e.contrast,"scalar-card--frameless":e.frameless,"scalar-card--transparent":e.transparent,"scalar-card--borderless":e.borderless}])},[i.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),er=U(SV,[["__scopeId","data-v-5312c2e0"]]),xV={class:"scalar-card-header-slots"},CV={class:"scalar-card-header-slot scalar-card-header-title"},EV={class:"scalar-card-header-slot scalar-card-header-actions"},$V=i.defineComponent({__name:"CardHeader",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(er,i.mergeProps(e,{class:"scalar-card-header"}),{default:i.withCtx(()=>[i.createElementVNode("div",xV,[i.createElementVNode("div",CV,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",EV,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])])]),_:3},16))}}),wn=U($V,[["__scopeId","data-v-bbd0c20a"]]),_V=i.defineComponent({__name:"CardFooter",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(er,i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16))}}),Yi=U(_V,[["__scopeId","data-v-918ab8d6"]]),NV=i.defineComponent({__name:"CardTabHeader",emits:["change"],setup(r,{emit:e}){const t=e,n=o=>{t("change",o)};return(o,s)=>(i.openBlock(),i.createBlock(wn,{class:"scalar-card-header-tabs"},{actions:i.withCtx(()=>[i.renderSlot(o.$slots,"actions",{},void 0,!0)]),default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabGroup),{onChange:n},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabList),{class:"tab-list custom-scroll"},{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]),_:3}))}}),Q1=U(NV,[["__scopeId","data-v-6a91b57c"]]),AV=i.defineComponent({__name:"CardTab",setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Tab),{as:"template"},{default:i.withCtx(({selected:n})=>[i.createElementVNode("button",{class:i.normalizeClass({tab:!0,"tab-selected":n}),type:"button"},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],2)]),_:3}))}}),Z1=U(AV,[["__scopeId","data-v-f373ecc2"]]),OV={class:"selector"},TV=i.defineComponent({__name:"Authentication",props:{parsedSpec:{}},setup(r){const e=r,{authentication:t,setAuthentication:n}=rs(),o=i.computed(()=>{var a,l,c;if(!t.preferredSecurityScheme)return!1;const s=(c=(l=(a=e.parsedSpec)==null?void 0:a.components)==null?void 0:l.securitySchemes)==null?void 0:c[t.preferredSecurityScheme];return!!s&&"type"in s&&!!s.type});return i.watch(()=>{var s,a;return(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes},()=>{var s,a;n({securitySchemes:(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes})},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const s=i.useSSRContext();await kr(1),s.payload.data["useGlobalStore-authentication"]=t}),(s,a)=>i.unref(Vv)(s.parsedSpec)?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",class:"authentication-header",transparent:""},{actions:i.withCtx(()=>{var l,c;return[i.createElementVNode("div",OV,[i.createVNode(i.unref(Pv),{value:(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes},null,8,["value"])])]}),default:i.withCtx(()=>[i.createTextVNode(" Authentication ")]),_:1}),o.value?(i.openBlock(),i.createBlock(i.unref(er),{key:0,class:"authentication-content",transparent:""},{default:i.withCtx(()=>{var l,c,d;return[i.unref(t).preferredSecurityScheme?(i.openBlock(),i.createBlock(i.unref(Bv),{key:0,value:(d=(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes)==null?void 0:d[i.unref(t).preferredSecurityScheme]},null,8,["value"])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}),BV=U(TV,[["__scopeId","data-v-3e7b39cf"]]),PV=["innerHTML"],IV=i.defineComponent({__name:"MarkdownRenderer",props:{value:{},withImages:{type:Boolean,default:!1}},setup(r){const e=r,t=i.ref(""),n=e.withImages?[]:["img","picture"];return i.watch(()=>e.value,async()=>{var s;const o=await Wg.unified().use(Ug).use(Lw).use(jw,{allowDangerousHtml:!0}).use(Vw).use(Ic,{...Ic.defaultSchema,tagNames:(s=Ic.defaultSchema.tagNames)==null?void 0:s.filter(a=>!n.includes(a))}).use(Dw).use(Iw,{target:"_blank"}).use(Mw).use(Rw).process(e.value);t.value=String(o.value)},{immediate:!0}),i.onServerPrefetch(async()=>await kr(1)),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:"markdown",innerHTML:t.value},null,8,PV))}}),$t=U(IV,[["__scopeId","data-v-172b542f"]]),MV=["title","innerHTML"],DV=i.defineComponent({__name:"ServerItem",props:{value:{},variables:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.computed(()=>{var a;const s=(((a=e.value)==null?void 0:a.url)??"").replace(/(<([^>]+)>)/gi,"");return Nh(s,l=>{var d;const c=(d=e.variables)==null?void 0:d.find(u=>u.name===l);return`<span class="base-url-variable">${((c==null?void 0:c.value)??"")!==""?c==null?void 0:c.value:`{${l}}`}</span>`})});return(o,s)=>o.value?(i.openBlock(),i.createElementBlock("a",{key:0,class:"base-url",title:o.value.description,onClick:s[0]||(s[0]=a=>i.unref(t)(o.value.url)),innerHTML:n.value},null,8,MV)):i.createCommentVNode("",!0)}}),VV=U(DV,[["__scopeId","data-v-8df90bd1"]]),RV={key:0},LV=["for"],jV=["id","value","onInput"],FV=["value"],qV={class:"input-value"},zV=["id","value","onInput"],HV=i.defineComponent({__name:"ServerVariables",props:{value:{}},setup(r){const{server:e,setServer:t}=ss(),n=(s,a)=>{const l=a.target.value,c=[...e.variables],d=c.findIndex(u=>u.name===s);c[d].value=l,t({variables:c})},o=s=>{const a=e.variables.findIndex(l=>l.name===s);return e.variables[a].value??""};return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("div",RV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,l=>(i.openBlock(),i.createElementBlock("div",{key:l.name,class:"input"},[i.createElementVNode("label",{for:`variable-${l.name}`},[i.createElementVNode("code",null,i.toDisplayString(l.name),1)],8,LV),l.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("select",{id:`variable-${l.name}`,value:o(l.name),onInput:c=>n(l.name,c)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.enum,c=>(i.openBlock(),i.createElementBlock("option",{key:c,value:c},i.toDisplayString(c),9,FV))),128))],40,jV),i.createElementVNode("div",qV,i.toDisplayString(l.default),1)],64)):(i.openBlock(),i.createElementBlock("input",{key:1,id:`variable-${l.name}`,autocomplete:"off",placeholder:"value",spellcheck:"false",type:"text",value:o(l.name),onInput:c=>n(l.name,c)},null,40,zV))]))),128))])):i.createCommentVNode("",!0)}}),KV=U(HV,[["__scopeId","data-v-a812e319"]]),UV={class:"scalar-card-serverlist-container"},WV={class:"server-item"},GV={class:"server-selector"},JV=["value"],YV=["value"],XV={class:"description"},QV=i.defineComponent({__name:"BaseUrl",setup(r){const{server:e,setServer:t}=ss(),n=i.ref(0);return i.watch([n,()=>e.servers],()=>{var l,c,d;if(!e.servers.length)return;const o=((l=e.servers[n.value])==null?void 0:l.variables)??{},s=o?Object.keys(o).map(u=>{var h;return{name:u,value:((h=o[u].default)==null?void 0:h.toString())??""}}):[];cv((c=e.servers[n.value])==null?void 0:c.url).filter(u=>!o[u]).forEach(u=>{s.push({name:u,value:""})}),t({selectedServer:n.value,description:(d=e.servers[n.value])==null?void 0:d.description,variables:s})},{deep:!0}),(o,s)=>i.unref(e).servers.length>0?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",muted:""},{default:i.withCtx(()=>[i.createTextVNode(" Base URL ")]),_:1}),i.createVNode(i.unref(er),{class:"scalar-card-serverlist"},{default:i.withCtx(()=>[i.createElementVNode("div",UV,[i.createElementVNode("div",WV,[i.createElementVNode("div",GV,[i.unref(e).servers.length>1?(i.openBlock(),i.createElementBlock("select",{key:0,value:n.value,onInput:s[0]||(s[0]=a=>n.value=parseInt(a.target.value,10))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e).servers,(a,l)=>(i.openBlock(),i.createElementBlock("option",{key:l,value:l},i.toDisplayString(a.url),9,YV))),128))],40,JV)):i.createCommentVNode("",!0),i.createVNode(VV,{value:i.unref(e).servers[n.value],variables:i.unref(e).variables},null,8,["value","variables"]),i.unref(e).servers.length>1?(i.openBlock(),i.createBlock(i.unref(Me),{key:1,icon:"ChevronDown"})):i.createCommentVNode("",!0)])]),i.createVNode(KV,{value:i.unref(e).variables},null,8,["value"])])]),_:1}),i.unref(e).description?(i.openBlock(),i.createBlock(i.unref(er),{key:0,muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",XV,[i.createVNode(i.unref($t),{value:i.unref(e).description},null,8,["value"])])]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}),ZV=U(QV,[["__scopeId","data-v-db459e3b"]]),ew=r=>(i.pushScopeId("data-v-cae9ee2d"),r=r(),i.popScopeId(),r),eR=["onClick"],tR=["value"],rR=["label"],nR=["value"],oR={class:"code-languages-background code-languages-icon__more"},sR={key:1,class:"code-languages-icon",height:"50",viewBox:"0 0 50 50",width:"50",xmlns:"http://www.w3.org/2000/svg"},iR=ew(()=>i.createElementVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[i.createElementVNode("path",{d:"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0"})],-1)),aR=[iR],lR=ew(()=>i.createElementVNode("span",null,"More",-1)),cR=i.defineComponent({__name:"ClientSelector",setup(r){const{httpClient:e,setHttpClient:t,getClientTitle:n,getTargetTitle:o}=Bc(),{availableTargets:s}=Ji(),a=i.ref(),l=[{targetKey:"shell",clientKey:"curl"},{targetKey:"ruby",clientKey:"native"},{targetKey:"node",clientKey:"undici"},{targetKey:"php",clientKey:"guzzle"},{targetKey:"python",clientKey:"python3"},{targetKey:"c",clientKey:"libcurl"}],c=h=>`programming-language-${h}`,d=h=>h.targetKey===e.targetKey&&h.clientKey===e.clientKey,u=h=>l.some(f=>f.targetKey===h.targetKey&&f.clientKey===h.clientKey);return(h,f)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"containerRef",ref:a,class:"client-libraries-content"},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(l,p=>i.createElementVNode("div",{key:p.clientKey,class:i.normalizeClass(["code-languages rendered-code-sdks",{"code-languages__active":d(p)}]),onClick:()=>i.unref(t)(p)},[i.createElementVNode("div",{class:i.normalizeClass(["code-languages-background",`code-languages-icon__${p.targetKey}`])},[i.createVNode(i.unref(Me),{class:"code-languages-icon",icon:c(p.targetKey)},null,8,["icon"])],2),i.createElementVNode("span",null,i.toDisplayString(i.unref(o)(p)),1)],10,eR)),64)),i.createElementVNode("div",{class:i.normalizeClass(["code-languages code-languages__select",{"code-languages__active":i.unref(e)&&!u(i.unref(e))}])},[i.createElementVNode("select",{class:"language-select",value:JSON.stringify(i.unref(e)),onInput:f[0]||(f[0]=p=>i.unref(t)(JSON.parse(p.target.value)))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),p=>(i.openBlock(),i.createElementBlock("optgroup",{key:p.key,label:p.title},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.clients,m=>(i.openBlock(),i.createElementBlock("option",{key:m.key,value:JSON.stringify({targetKey:p.key,clientKey:m.key})},i.toDisplayString(i.unref(n)({targetKey:p.key,clientKey:m.key})),9,nR))),128))],8,rR))),128))],40,tR),i.createElementVNode("div",oR,[i.unref(e)&&!u(i.unref(e))?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`code-languages-icon__${i.unref(e).targetKey}`)},[i.createVNode(i.unref(Me),{class:"code-languages-icon",icon:c(i.unref(e).targetKey)},null,8,["icon"])],2)):(i.openBlock(),i.createElementBlock("svg",sR,aR))]),lR],2)],512))}}),dR=U(cR,[["__scopeId","data-v-cae9ee2d"]]),uR=i.defineComponent({__name:"ClientLibraries",setup(r){const{httpTargetTitle:e,httpClientTitle:t}=Bc();return(n,o)=>(i.openBlock(),i.createBlock(i.unref(bn),null,{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",transparent:""},{default:i.withCtx(()=>[i.createTextVNode(" Client Libraries ")]),_:1}),i.createVNode(i.unref(er),{frameless:"",transparent:""},{default:i.withCtx(()=>[i.createVNode(dR)]),_:1}),i.createVNode(i.unref(Yi),{class:"selected-client card-footer",muted:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t))+" "+i.toDisplayString(i.unref(e)),1)]),_:1})]),_:1}))}}),hR=U(uR,[["__scopeId","data-v-2a099868"]]),fR={},pR={class:"badge"};function mR(r,e){return i.openBlock(),i.createElementBlock("div",pR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Ni=U(fR,[["render",mR],["__scopeId","data-v-190574ac"]]),Kf=i.defineComponent({__name:"IntersectionObserver",props:{id:{},is:{}},emits:["intersecting"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=l=>{const c=l.offsetHeight;return`${c/2}px 0px ${c/2}px 0px`},a=l=>l.offsetHeight<window.innerHeight?.8:.5;return i.onMounted(()=>{if(o.value){const l={rootMargin:s(o.value),threshold:a(o.value)};Xe.useIntersectionObserver(o,([{isIntersecting:c}])=>{c&&t.id&&n("intersecting")},l)}}),(l,c)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.is??"div"),{id:l.id,ref_key:"intersectionObserverRef",ref:o},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["id"]))}}),gR=i.defineComponent({__name:"Section",props:{id:{},label:{}},setup(r){const e=r,{getSectionId:t,hash:n,isIntersectionEnabled:o,pathRouting:s}=lt(),{setCollapsedSidebarItem:a}=rr();function l(){var u;if(!e.label||!o.value)return;const c=new URL(window.location.href),d=e.id??"";s.value?c.pathname=s.value.basePath+"/"+d:c.hash=d,n.value=d,window.history.replaceState({},"",c),(u=e.id)!=null&&u.startsWith("model")&&a(t(e.id),!0)}return(c,d)=>(i.openBlock(),i.createBlock(Kf,{is:"section",id:c.id,class:"section",onIntersecting:l},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["id"]))}}),ks=U(gR,[["__scopeId","data-v-0494f9f3"]]),yR={class:"section-accordion-button-content"},vR={key:0,class:"section-accordion-button-actions"},bR={key:0,class:"section-accordion-description"},wR={class:"section-accordion-content-card"},kR=i.defineComponent({__name:"SectionAccordion",props:{id:{},transparent:{type:Boolean}},setup(r){const e=i.ref(),t=Xe.useElementHover(e);return(n,o)=>(i.openBlock(),i.createBlock(Kf,{id:n.id,class:"section-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.Disclosure),{as:"section",class:i.normalizeClass(["section-accordion",{"section-accordion-transparent":n.transparent}])},{default:i.withCtx(({open:s})=>[i.createVNode(i.unref(Le.DisclosureButton),{ref_key:"button",ref:e,class:"section-accordion-button"},{default:i.withCtx(()=>[i.createElementVNode("div",yR,[i.renderSlot(n.$slots,"title",{},void 0,!0)]),n.$slots.actions?(i.openBlock(),i.createElementBlock("div",vR,[i.renderSlot(n.$slots,"actions",{active:i.unref(t)||s},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:s?"ChevronDown":"ChevronRight"},null,8,["icon"])]),_:2},1536),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[n.$slots.description?(i.openBlock(),i.createElementBlock("div",bR,[i.renderSlot(n.$slots,"description",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",wR,[i.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3})]),_:3},8,["class"])]),_:3},8,["id"]))}}),tw=U(kR,[["__scopeId","data-v-07cabcb0"]]),SR={},xR={class:"section-column"};function CR(r,e){return i.openBlock(),i.createElementBlock("div",xR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Zo=U(SR,[["render",CR],["__scopeId","data-v-d64e7382"]]),ER={},$R={class:"section-columns"};function _R(r,e){return i.openBlock(),i.createElementBlock("div",$R,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Uf=U(ER,[["render",_R],["__scopeId","data-v-8b9602bf"]]),NR={},AR={class:"section-container"};function OR(r,e){return i.openBlock(),i.createElementBlock("div",AR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Xi=U(NR,[["render",OR],["__scopeId","data-v-34b26958"]]),TR={class:"section-accordion-wrapper"},BR={class:"section-accordion-title"},PR=i.defineComponent({__name:"SectionContainerAccordion",setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",TR,[i.createVNode(i.unref(Le.Disclosure),{as:"div",class:"section-accordion",defaultOpen:""},{default:i.withCtx(({open:n})=>[i.createVNode(i.unref(Le.DisclosureButton),{class:"section-accordion-button"},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:n?"ChevronDown":"ChevronRight"},null,8,["icon"]),i.createElementVNode("div",BR,[i.renderSlot(e.$slots,"title",{},void 0,!0)])]),_:2},1024),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]))}}),rw=U(PR,[["__scopeId","data-v-2049975e"]]),IR=i.defineComponent({__name:"LoadingSkeleton",props:{lines:{default:1}},setup(r){return(e,t)=>(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...Array(e.lines).keys()],n=>(i.openBlock(),i.createElementBlock("div",{key:n,class:i.normalizeClass(["loading",{"single-line":e.lines===1}])},null,2))),128))}}),nw=U(IR,[["__scopeId","data-v-c90b2c46"]]),MR={class:"section-content"},DR=i.defineComponent({__name:"SectionContent",props:{loading:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",MR,[e.loading?(i.openBlock(),i.createBlock(nw,{key:1,lines:8})):i.renderSlot(e.$slots,"default",{key:0},void 0,!0)]))}}),Ss=U(DR,[["__scopeId","data-v-9735459e"]]),VR=i.defineComponent({__name:"SectionHeader",props:{loading:{type:Boolean,default:!1},tight:{type:Boolean,default:!1},level:{default:1}},setup(r){return(e,t)=>e.loading?(i.openBlock(),i.createBlock(nw,{key:0})):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(`h${e.level}`),{key:1,class:i.normalizeClass(["section-header",{tight:e.tight}])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),kn=U(VR,[["__scopeId","data-v-3bd1b9f0"]]),RR={key:0,class:"introduction-description"},LR=i.defineComponent({__name:"Description",props:{value:{}},setup(r){const e=r,n=`components-Content-Introduction-Description-sections${zu(e.value)}`,o=Xe.computedAsync(async()=>{if(!e.value)return[];const u=await ki(e.value),h=Xl(u);return await Promise.all(R1(e.value,h).map(async f=>({heading:(await ki(f))[0],content:f})))},ts[n]??[]),{getHeadingId:s,hash:a,isIntersectionEnabled:l,pathRouting:c}=lt();function d(u=""){if(!l.value)return;const h=new URL(window.location.href);c.value?h.pathname=c.value.basePath+"/"+u:h.hash=u,a.value=u,window.history.replaceState({},"",h)}return i.onServerPrefetch(async()=>{const u=i.useSSRContext();await kr(1),u.payload.data[n]=o.value}),(u,h)=>u.value?(i.openBlock(),i.createElementBlock("div",RR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),(f,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:p},[f.heading?(i.openBlock(),i.createBlock(Kf,{key:0,id:i.unref(s)(f.heading),class:"introduction-description-heading",onIntersecting:()=>d(i.unref(s)(f.heading))},{default:i.withCtx(()=>[i.createVNode(i.unref($t),{value:f.content,withImages:""},null,8,["value"])]),_:2},1032,["id","onIntersecting"])):(i.openBlock(),i.createBlock(i.unref($t),{key:1,value:f.content,withImages:""},null,8,["value"]))],64))),128))])):i.createCommentVNode("",!0)}}),jR=U(LR,[["__scopeId","data-v-5e475391"]]),FR={class:"download"},qR={class:"download-cta"},zR=i.defineComponent({__name:"DownloadSpec",props:{specTitle:{}},setup(r){const e=r,t=i.inject(Lf),n=()=>{jf.emit({id:"",specTitle:e.specTitle})};return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",FR,[i.createElementVNode("div",qR,[(a=i.unref(t))!=null&&a()?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,class:"download-button",type:"button",onClick:n}," Download OpenAPI Spec "))])])}}}),HR=U(zR,[["__scopeId","data-v-810904a4"]]),KR={class:"badges"},UR={class:"sticky-cards"},WR=i.defineComponent({__name:"Introduction",props:{info:{},parsedSpec:{}},setup(r){const e=r,t=new Ai,n=i.computed(()=>e.parsedSpec.openapi??e.parsedSpec.swagger??""),o=i.computed(()=>t.slug(e.info.title??""));return(s,a)=>(i.openBlock(),i.createBlock(i.unref(Xi),null,{default:i.withCtx(()=>[i.createVNode(i.unref(ks),{class:"introduction-section"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{loading:!s.info.description&&!s.info.title},{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createElementVNode("div",KR,[s.info.version?(i.openBlock(),i.createBlock(i.unref(Ni),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.version),1)]),_:1})):i.createCommentVNode("",!0),n.value?(i.openBlock(),i.createBlock(i.unref(Ni),{key:1},{default:i.withCtx(()=>[i.createTextVNode(" OAS "+i.toDisplayString(n.value),1)]),_:1})):i.createCommentVNode("",!0)]),i.createVNode(i.unref(kn),{level:1,loading:!s.info.title,tight:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.title),1)]),_:1},8,["loading"]),i.createVNode(HR,{specTitle:o.value},null,8,["specTitle"]),i.createVNode(jR,{value:s.info.description},null,8,["value"])]),_:1}),s.$slots.aside?(i.openBlock(),i.createBlock(i.unref(Zo),{key:0},{default:i.withCtx(()=>[i.createElementVNode("div",UR,[i.renderSlot(s.$slots,"aside",{},void 0,!0)])]),_:3})):i.createCommentVNode("",!0)]),_:3})]),_:3},8,["loading"]),i.renderSlot(s.$slots,"after",{},void 0,!0)]),_:3})]),_:3}))}}),GR=U(WR,[["__scopeId","data-v-30c2e131"]]),JR=Symbol(),ju=Xe.useEventBus(JR),Il=i.defineComponent({__name:"Lazy",props:{id:{},isLazy:{type:Boolean,default:!0},lazyTimeout:{default:0}},setup(r){const e=r,t=(o=()=>{})=>{typeof window>"u"||("requestIdleCallback"in window?setTimeout(()=>window.requestIdleCallback(o),e.lazyTimeout):setTimeout(()=>i.nextTick(o),e.lazyTimeout??300))},n=i.ref(!e.isLazy);return e.isLazy?t(()=>{n.value=!0,e.id&&i.nextTick(()=>ju.emit({id:e.id}))}):e.id&&i.nextTick(()=>ju.emit({id:e.id})),(o,s)=>n.value?i.renderSlot(o.$slots,"default",{key:0}):i.createCommentVNode("",!0)}}),YR={key:0,class:"screenreader-only"},XR=i.defineComponent({__name:"ScreenReader",props:{if:{type:Boolean,default:!0}},setup(r){return(e,t)=>e.$props.if?(i.openBlock(),i.createElementBlock("span",YR,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):i.renderSlot(e.$slots,"default",{key:1},void 0,!0)}}),ow=U(XR,[["__scopeId","data-v-681ebf2c"]]),QR=r=>(i.pushScopeId("data-v-d9801d4e"),r=r(),i.popScopeId(),r),ZR={class:"label"},e3={class:"anchor"},t3=QR(()=>i.createElementVNode("span",null,"",-1)),r3=i.defineComponent({__name:"Anchor",props:{id:{}},setup(r){const{copyToClipboard:e}=ws(),t=n=>{const o=new URL(window.location.href);return o.hash=n,o.toString()};return(n,o)=>(i.openBlock(),i.createElementBlock("span",ZR,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createElementVNode("span",e3,[t3,i.createElementVNode("button",{class:"anchor-copy",type:"button",onClick:o[0]||(o[0]=i.withModifiers(s=>i.unref(e)(t(n.id)),["stop"]))},[i.createTextVNode(" # "),i.createVNode(ow,null,{default:i.withCtx(()=>[i.createTextVNode('Copy link to "'),i.renderSlot(n.$slots,"default",{},void 0,!0),i.createTextVNode('"')]),_:3})])])]))}}),Sn=U(r3,[["__scopeId","data-v-d9801d4e"]]),n3=["value"],o3=["label"],s3=["value"],i3=["value"],Wf=i.defineComponent({__name:"TextSelect",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["text-select",e.options.length===1?"text-select--single-option":""])},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default")]),i.createElementVNode("select",{value:e.modelValue,onInput:t[0]||(t[0]=n=>e.$emit("update:modelValue",n.target.value))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.value},[n.options?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:n.label},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.label),9,s3))),128))],8,o3)):(i.openBlock(),i.createElementBlock("option",{key:n.value,value:n.value},i.toDisplayString(n.label),9,i3))],64))),128))],40,n3)],2))}}),a3={class:"request-header"},l3=i.defineComponent({__name:"CustomRequestExamples",props:{operation:{},examples:{}},setup(r){const e=r,t=i.ref(0),n=i.computed(()=>({C:"c","C#":"csharp",Go:"go",HTML:"html",Java:"java",JavaScript:"javascript",Kotlin:"kotlin","Objective-C":"objc",PowerShell:"powershell",Python:"python",Ruby:"ruby",Shell:"shell",Swift:"swift",TypeScript:"javascript",cURL:"shell"})[e.examples[t.value].lang]??e.examples[t.value].lang),o=i.computed(()=>e.examples[t.value]);i.watch(e.examples,()=>{e.examples[t.value]==="undefined"&&(t.value=0)});const{copyToClipboard:s}=ws();return(a,l)=>(i.openBlock(),i.createBlock(i.unref(bn),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Wf,{class:"request-client-picker",modelValue:t.value,options:a.examples.map((c,d)=>({value:d.toString(),label:c.label})),"onUpdate:modelValue":l[0]||(l[0]=c=>(t.value=parseInt(c),10))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.value.label),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:l[1]||(l[1]=c=>i.unref(s)(o.value.source.trim()))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",a3,[i.createVNode(i.unref(no),{class:"request-method",method:a.operation.httpVerb},null,8,["method"]),i.renderSlot(a.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(er),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Nr),{content:o.value.source.trim(),lang:n.value,lineNumbers:""},null,8,["content","lang"])]),_:1}),a.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"scalar-card-footer",contrast:""},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"footer",{},void 0,!0)]),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),c3=U(l3,[["__scopeId","data-v-18ba624d"]]),d3={class:"schema-type"},u3=["title"],h3=i.defineComponent({__name:"SchemaHeading",props:{value:{},name:{}},setup(r){return(e,t)=>{var n,o,s,a,l,c;return i.openBlock(),i.createElementBlock("span",d3,[i.createElementVNode("span",{class:"schema-type-icon",title:typeof e.value.type=="string"?e.value.type:Array.isArray(e.value.type)?e.value.type.join(" | "):"unkown type"},[e.value.type==="object"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" {} ")],64)):i.createCommentVNode("",!0),e.value.type==="array"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" [] ")],64)):i.createCommentVNode("",!0),e.value.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" enum ")],64)):i.createCommentVNode("",!0)],8,u3),(o=(n=e.value)==null?void 0:n.xml)!=null&&o.name&&((a=(s=e.value)==null?void 0:s.xml)==null?void 0:a.name)!=="##default"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" <"+i.toDisplayString((c=(l=e.value)==null?void 0:l.xml)==null?void 0:c.name)+" /> ",1)],64)):e.name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(e.name),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(e.value.type),1)],64))])}}}),sw=U(h3,[["__scopeId","data-v-6c5c3c96"]]),f3={key:0,class:"property-detail-prefix"},p3={key:1,class:"property-detail-value"},m3={key:2,class:"property-detail-value"},g3=i.defineComponent({__name:"SchemaPropertyDetail",props:{truncate:{type:Boolean},code:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["property-detail",{"property-detail-truncate":e.truncate}])},[e.$slots.prefix?(i.openBlock(),i.createElementBlock("div",f3,[i.renderSlot(e.$slots,"prefix",{},void 0,!0),i.createTextVNode(" ")])):i.createCommentVNode("",!0),e.code?(i.openBlock(),i.createElementBlock("code",p3,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("span",m3,[i.renderSlot(e.$slots,"default",{},void 0,!0)]))],2))}}),qt=U(g3,[["__scopeId","data-v-16d94ef5"]]),y3={class:"property-heading"},v3={key:0,class:"property-name"},b3={key:1,class:"property-additional"},w3={key:2,class:"property-deprecated"},k3={key:3,class:"property-required"},S3={key:4,class:"property-details"},x3={key:5,class:"property-write-only"},C3={key:6,class:"property-read-only"},E3=i.defineComponent({__name:"SchemaPropertyHeading",props:{value:{},enum:{type:Boolean},required:{type:Boolean,default:!1},additional:{type:Boolean}},setup(r){const e=["oneOf","anyOf","allOf","not"];return(t,n)=>{var o,s,a,l;return i.openBlock(),i.createElementBlock("div",y3,[t.$slots.name?(i.openBlock(),i.createElementBlock("div",v3,[i.renderSlot(t.$slots,"name",{},void 0,!0)])):i.createCommentVNode("",!0),t.additional?(i.openBlock(),i.createElementBlock("div",b3," additional properties ")):i.createCommentVNode("",!0),(o=t.value)!=null&&o.deprecated?(i.openBlock(),i.createElementBlock("div",w3,[i.createVNode(i.unref(Ni),null,{default:i.withCtx(()=>[i.createTextVNode("deprecated")]),_:1})])):i.createCommentVNode("",!0),t.required?(i.openBlock(),i.createElementBlock("div",k3," required ")):i.createCommentVNode("",!0),(s=t.value)!=null&&s.type?(i.openBlock(),i.createElementBlock("div",S3,[t.additional?(i.openBlock(),i.createBlock(qt,{key:0},{prefix:i.withCtx(()=>[i.createTextVNode("key:")]),default:i.withCtx(()=>[i.createTextVNode(" string ")]),_:1})):i.createCommentVNode("",!0),i.createVNode(qt,null,i.createSlots({default:i.withCtx(()=>{var c,d,u;return[(d=(c=t.value)==null?void 0:c.items)!=null&&d.type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value.type)+" "+i.toDisplayString(t.value.items.type)+"[] ",1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(Array.isArray(t.value.type)?t.value.type.join(" | "):t.value.type)+" "+i.toDisplayString((u=t.value)!=null&&u.nullable?" | nullable":""),1)],64)),t.value.minItems||t.value.maxItems?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(t.value.minItems)+"…"+i.toDisplayString(t.value.maxItems),1)],64)):i.createCommentVNode("",!0)]}),_:2},[t.additional?{name:"prefix",fn:i.withCtx(()=>[i.createTextVNode("value:")]),key:"0"}:void 0]),1024),t.value.minLength?(i.openBlock(),i.createBlock(qt,{key:1},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.maxLength?(i.openBlock(),i.createBlock(qt,{key:2},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maxLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.uniqueItems?(i.openBlock(),i.createBlock(qt,{key:3},{default:i.withCtx(()=>[i.createTextVNode(" unique! ")]),_:1})):i.createCommentVNode("",!0),t.value.format?(i.openBlock(),i.createBlock(qt,{key:4},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.format),1)]),_:1})):i.createCommentVNode("",!0),t.value.minimum?(i.openBlock(),i.createBlock(qt,{key:5},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minimum),1)]),_:1})):i.createCommentVNode("",!0),t.value.maximum?(i.openBlock(),i.createBlock(qt,{key:6},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maximum),1)]),_:1})):i.createCommentVNode("",!0),t.value.pattern?(i.openBlock(),i.createBlock(qt,{key:7,code:"",truncate:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.pattern),1)]),_:1})):i.createCommentVNode("",!0),t.$props.enum?(i.openBlock(),i.createBlock(qt,{key:8},{default:i.withCtx(()=>[i.createTextVNode("enum")]),_:1})):i.createCommentVNode("",!0),t.value.default?(i.openBlock(),i.createBlock(qt,{key:9,truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("default:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.default),1)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(a=t.value)!=null&&a.writeOnly?(i.openBlock(),i.createElementBlock("div",x3," write-only ")):(l=t.value)!=null&&l.readOnly?(i.openBlock(),i.createElementBlock("div",C3," read-only ")):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.filter(c=>{var d,u,h;return((d=t.value)==null?void 0:d[c])||((h=(u=t.value)==null?void 0:u.items)==null?void 0:h[c])}),c=>(i.openBlock(),i.createBlock(i.unref(Ni),{key:c},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c),1)]),_:2},1024))),128))])}}}),$3=U(E3,[["__scopeId","data-v-0b4351f0"]]),_3=r=>(i.pushScopeId("data-v-ca3c524d"),r=r(),i.popScopeId(),r),N3={key:0,class:"property-description"},A3={key:1,class:"property-description"},O3={key:2,class:"property-example custom-scroll"},T3=_3(()=>i.createElementVNode("span",{class:"property-example-label"},"Example",-1)),B3={class:"property-example-value"},P3={key:3,class:"property-enum"},I3={class:"property-enum-values"},M3={key:4,class:"children"},D3={key:0,class:"children"},V3={key:0,class:"property-rule"},R3={key:1,class:"property-rule"},L3=i.defineComponent({__name:"SchemaProperty",props:{value:{},level:{default:0},name:{},required:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},description:{},additional:{type:Boolean}},setup(r){const e={integer:{_default:"Integer numbers.",int32:"Signed 32-bit integers (commonly used integer type).",int64:"Signed 64-bit integers (long type)."},string:{date:"full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21","date-time":"the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",password:"a hint to UIs to mask the input",byte:"base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",binary:"binary data, used to describe files"}},t=function(a,l){return l!=null&&l.properties||l!=null&&l.additionalProperties?null:a||(l==null?void 0:l.description)||null},n=function(a){return!a||!e[a.type]?null:e[a.type][a.format||"_default"]},o=function(a){var l;return(a==null?void 0:a.enum)||((l=a==null?void 0:a.items)==null?void 0:l.enum)||null},s=["oneOf","anyOf","allOf","not"];return(a,l)=>{var c,d,u,h,f,p,m,g,y;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["property",[`property--level-${a.level}`,{"property--compact":a.compact,"property--deprecated":(c=a.value)==null?void 0:c.deprecated}]])},[i.createVNode($3,{additional:a.additional,enum:!!o(a.value),required:a.required,value:a.value},i.createSlots({_:2},[a.name?{name:"name",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.name),1)]),key:"0"}:void 0]),1032,["additional","enum","required","value"]),t(a.description,a.value)?(i.openBlock(),i.createElementBlock("div",N3,[i.createVNode(i.unref($t),{value:t(a.description,a.value)},null,8,["value"])])):n(a.value)?(i.openBlock(),i.createElementBlock("div",A3,[i.createVNode(i.unref($t),{value:n(a.value)||""},null,8,["value"])])):i.createCommentVNode("",!0),(d=a.value)!=null&&d.example||(h=(u=a.value)==null?void 0:u.items)!=null&&h.example?(i.openBlock(),i.createElementBlock("div",O3,[T3,i.createElementVNode("code",B3,i.toDisplayString(a.value.example||((f=a.value)==null?void 0:f.items.example)),1)])):i.createCommentVNode("",!0),o(a.value)?(i.openBlock(),i.createElementBlock("div",P3,[i.createElementVNode("ul",I3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),v=>(i.openBlock(),i.createElementBlock("li",{key:v,class:"property-enum-value"},i.toDisplayString(v),1))),128))])])):i.createCommentVNode("",!0),((p=a.value)==null?void 0:p.type)==="object"&&((m=a.value)!=null&&m.properties||(g=a.value)!=null&&g.additionalProperties)?(i.openBlock(),i.createElementBlock("div",M3,[i.createVNode(Hn,{compact:a.compact,level:a.level+1,value:a.value},null,8,["compact","level","value"])])):i.createCommentVNode("",!0),(y=a.value)!=null&&y.items?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[["object"].includes(a.value.items.type)?(i.openBlock(),i.createElementBlock("div",D3,[i.createVNode(Hn,{compact:a.compact,level:a.level+1,value:a.value.items},null,8,["compact","level","value"])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,v=>{var b,w,S;return i.openBlock(),i.createElementBlock(i.Fragment,{key:v},[(b=a.value)!=null&&b[v]?(i.openBlock(),i.createElementBlock("div",V3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value[v],(x,k)=>(i.openBlock(),i.createBlock(Hn,{key:k,compact:a.compact,level:a.level+1,value:x},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0),(S=(w=a.value)==null?void 0:w.items)!=null&&S[v]&&a.level<3?(i.openBlock(),i.createElementBlock("div",R3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.items[v],(x,k)=>(i.openBlock(),i.createBlock(Hn,{key:k,compact:a.compact,level:a.level+1,value:x},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0)],64)}),64))],2)}}}),zn=U(L3,[["__scopeId","data-v-ca3c524d"]]),j3=r=>(i.pushScopeId("data-v-7f5d0941"),r=r(),i.popScopeId(),r),F3={key:0,class:"schema-card-description"},q3=j3(()=>i.createElementVNode("polygon",{"fill-rule":"nonzero",points:"14 8 8 8 8 14 6 14 6 8 0 8 0 6 6 6 6 0 8 0 8 6 14 6"},null,-1)),z3=[q3],H3=i.defineComponent({__name:"Schema",props:{value:{},level:{default:0},name:{},compact:{type:Boolean},noncollapsible:{type:Boolean}},setup(r){const e=r,t=i.computed(()=>!(e.noncollapsible||e.level===0)),n=o=>e.noncollapsible&&o.stopPropagation();return(o,s)=>typeof o.value=="object"&&Object.keys(o.value).length?(i.openBlock(),i.createBlock(i.unref(Le.Disclosure),{key:0,defaultOpen:o.noncollapsible},{default:i.withCtx(({open:a})=>{var l;return[i.createElementVNode("div",{class:i.normalizeClass(["schema-card",[`schema-card--level-${o.level}`,{"schema-card--compact":o.compact,"schema-card--open":a}]])},[(l=o.value)!=null&&l.description?(i.openBlock(),i.createElementBlock("div",F3,[i.createVNode(i.unref($t),{value:o.value.description},null,8,["value"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["schema-properties",{"schema-properties-open":a}])},[i.withDirectives(i.createVNode(i.unref(Le.DisclosureButton),{as:o.noncollapsible?"div":"button",class:i.normalizeClass(["schema-card-title",{"schema-card-title--compact":o.compact}]),style:i.normalizeStyle({top:`calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${o.level}))`}),onClickCapture:n},{default:i.withCtx(()=>{var c,d,u;return[o.compact?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),fill:"currentColor",height:"14",viewBox:"0 0 14 14",width:"14",xmlns:"http://www.w3.org/2000/svg"},z3,2)):i.createCommentVNode("",!0),a?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Hide "+i.toDisplayString(((c=o.value)==null?void 0:c.title)??"Child Attributes"),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" Show "+i.toDisplayString(((d=o.value)==null?void 0:d.title)??"Child Attributes"),1)],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[t.value?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),icon:"ChevronRight",size:"md"},null,8,["class"])):i.createCommentVNode("",!0),i.createVNode(sw,{name:((u=o.value)==null?void 0:u.title)??o.name,value:o.value},null,8,["name","value"])],64))]}),_:2},1032,["as","class","style"]),[[i.vShow,!(o.noncollapsible&&o.compact)]]),i.createVNode(i.unref(Le.DisclosurePanel),{static:o.noncollapsible},{default:i.withCtx(()=>{var c;return[o.value.properties||o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o.value.properties?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(Object.keys((c=o.value)==null?void 0:c.properties),d=>{var u;return i.openBlock(),i.createBlock(zn,{key:d,compact:o.compact,level:o.level,name:d,required:o.value.required&&o.value.required.length&&o.value.required.includes(d),value:(u=o.value.properties)==null?void 0:u[d]},null,8,["compact","level","name","required","value"])}),128)):i.createCommentVNode("",!0),o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o.value.additionalProperties===!0||Object.keys(o.value.additionalProperties).length===0||!o.value.additionalProperties.type?(i.openBlock(),i.createBlock(zn,{key:0,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:{type:"any",...o.value.additionalProperties}},null,8,["compact","level","value"])):(i.openBlock(),i.createBlock(zn,{key:1,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:o.value.additionalProperties},null,8,["compact","level","value"]))],64)):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(zn,{key:1,compact:o.compact,level:o.level,name:o.value.name,value:o.value},null,8,["compact","level","name","value"]))]}),_:1},8,["static"])],2)],2)]}),_:1},8,["defaultOpen"])):i.createCommentVNode("",!0)}}),Hn=U(H3,[["__scopeId","data-v-7f5d0941"]]),K3={class:"parameter-item"},U3={class:"parameter-item-container"},W3=i.defineComponent({__name:"ParameterItem",props:{parameter:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("li",K3,[i.createElementVNode("div",U3,[i.createVNode(i.unref(zn),{compact:"",description:e.parameter.description,level:0,name:e.parameter.name,noncollapsible:e.showChildren,required:e.parameter.required,value:e.parameter.schema},null,8,["description","name","noncollapsible","required","value"])])]))}}),G3=U(W3,[["__scopeId","data-v-f70ee55c"]]),J3={key:0,class:"parameters"},Y3={class:"parameters-title"},X3={class:"parameter-list"},Q3=i.defineComponent({__name:"Parameters",props:{parameters:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>{var n;return(n=e.parameters)!=null&&n.length?(i.openBlock(),i.createElementBlock("div",J3,[i.createElementVNode("div",Y3,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("ul",X3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.parameters,o=>(i.openBlock(),i.createBlock(G3,{key:o.name,parameter:o,showChildren:e.showChildren},null,8,["parameter","showChildren"]))),128))])])):i.createCommentVNode("",!0)}}}),Ut=U(Q3,[["__scopeId","data-v-45fca787"]]),Z3={key:0},eL={class:"request-body-title"},tL=["value"],rL={key:0,class:"request-body-description"},nL={key:0,class:"request-body-schema"},oL=i.defineComponent({__name:"RequestBody",props:{requestBody:{}},setup(r){var o;const e=r,t=i.computed(()=>{var s;return(s=e.requestBody)!=null&&s.content?Object.keys(e.requestBody.content):[]}),n=i.ref("application/json");return(o=e.requestBody)!=null&&o.content&&t.value.length>0&&(n.value=t.value[0]),(s,a)=>{var l,c,d,u;return e!=null&&e.requestBody?(i.openBlock(),i.createElementBlock("div",Z3,[i.createElementVNode("div",eL,[i.renderSlot(s.$slots,"title",{},void 0,!0),i.createElementVNode("div",{class:i.normalizeClass(["request-body-title-select",{"request-body-title-no-select":t.value.length<=1}])},[i.createElementVNode("span",null,i.toDisplayString(n.value),1),e!=null&&e.requestBody&&t.value.length>1?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=h=>n.value=h)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((l=e.requestBody)==null?void 0:l.content,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:f},i.toDisplayString(f),9,tL))),128))],512)),[[i.vModelSelect,n.value]]):i.createCommentVNode("",!0)],2),e!=null&&e.requestBody.description?(i.openBlock(),i.createElementBlock("div",rL,[i.createVNode(i.unref($t),{value:e.requestBody.description},null,8,["value"])])):i.createCommentVNode("",!0)]),(c=e==null?void 0:e.requestBody.content)!=null&&c[n.value]?(i.openBlock(),i.createElementBlock("div",nL,[i.createVNode(i.unref(Hn),{compact:"",noncollapsible:"",value:(u=(d=e==null?void 0:e.requestBody.content)==null?void 0:d[n.value])==null?void 0:u.schema},null,8,["value"])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),Gf=U(oL,[["__scopeId","data-v-e095eb63"]]),sL={class:"endpoint-details"},iL={class:"endpoint-description"},aL=i.defineComponent({__name:"EndpointDetails",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=qf(e),{responses:n}=zf(e.operation);return(o,s)=>{var a,l;return i.openBlock(),i.createElementBlock("div",sL,[i.createElementVNode("div",iL,[i.createVNode(i.unref($t),{value:o.operation.description,withImages:""},null,8,["value"])]),i.createVNode(Ut,{parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).body,showChildren:""},{title:i.withCtx(()=>[i.createTextVNode("Body Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).formData},{title:i.withCtx(()=>[i.createTextVNode("Form Data")]),_:1},8,["parameters"]),(a=o.operation.information)!=null&&a.requestBody?(i.openBlock(),i.createBlock(Gf,{key:0,requestBody:(l=o.operation.information)==null?void 0:l.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"])):i.createCommentVNode("",!0),i.createVNode(Ut,{parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),lL={key:0},cL=i.defineComponent({__name:"EndpointPath",props:{path:{},deprecated:{type:Boolean}},setup(r){const e=r,t=o=>o.startsWith("{")&&o.endsWith("}"),n=i.computed(()=>e.path.split(/({[^}]+})/));return(o,s)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["endpoint-path",{deprecated:o.deprecated}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:l},[t(a)?(i.openBlock(),i.createElementBlock("em",lL,i.toDisplayString(a),1)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(a),1)],64))],64))),128))],2))}}),Fu=U(cL,[["__scopeId","data-v-a4eadd9b"]]);function Qi(r){return r.reduce((e,t)=>(e[t.name]=t.value,e),{})}function dL(r){return/\s|-/.test(r)}function Sr(r,e=0){let t=[],n=" ".repeat(e),o=" ".repeat(e+2);for(const[s,a]of Object.entries(r)){let l=dL(s)?`'${s}'`:s;if(Array.isArray(a)){const c=a.map(d=>typeof d=="string"?`'${d}'`:d&&typeof d=="object"?Sr(d,e+2):d).join(`, ${o}`);t.push(`${o}${l}: [${c}]`)}else if(a&&typeof a=="object")t.push(`${o}${l}: ${Sr(a,e+2)}`);else if(typeof a=="string"){let c=`${a}`;if(a.startsWith("JSON.stringify")){const d=a.split(`
|
|
219
|
+
`,s),o===void 0){t(((n=s==null?void 0:s[0])==null?void 0:n.error)??"Failed to parse the OpenAPI file.");return}e($D(structuredClone(o)))}catch(o){t(o)}}),$D=r=>{r.tags||(r.tags=[]),r.paths||(r.paths={});const e={};return Object.keys(r.webhooks??{}).forEach(n=>{var o;Object.keys(((o=r.webhooks)==null?void 0:o[n])??{}).forEach(s=>{var l,c,d;const a=((l=r.webhooks)==null?void 0:l[n])[s];e[n]===void 0&&(e[n]={}),e[n][s]={httpVerb:s,path:n,operationId:(a==null?void 0:a.operationId)||n,name:(a==null?void 0:a.summary)||n||"",description:(a==null?void 0:a.description)||"",pathParameters:(d=(c=r.paths)==null?void 0:c[n])==null?void 0:d.parameters,information:{...a}}})}),Object.keys(r.paths).forEach(n=>{Object.keys(r.paths[n]).filter(s=>eh.includes(s.toUpperCase())).forEach(s=>{var c,d,u,h,f,p;const a=r.paths[n][s],l={httpVerb:s,path:n,operationId:a.operationId||n,name:a.summary||n||"",description:a.description||"",information:{...a},pathParameters:(d=(c=r.paths)==null?void 0:c[n])==null?void 0:d.parameters};if(!a.tags||a.tags.length===0){(u=r.tags)!=null&&u.find(g=>g.name==="default")||(h=r.tags)==null||h.push({name:"default",description:"",operations:[]});const m=(f=r.tags)==null?void 0:f.findIndex(g=>g.name==="default");m>=0&&((p=r.tags[m])==null||p.operations.push(l))}else a.tags.forEach(m=>{var v,b,w;const g=(v=r.tags)==null?void 0:v.findIndex(S=>S.name===m);g===-1&&((b=r.tags)==null||b.push({name:m,description:""}));const y=g!==-1?g:r.tags.length-1;typeof((w=r.tags[y])==null?void 0:w.operations)>"u"&&(r.tags[y].operations=[]),r.tags[y].operations.push(l)})})}),r.tags.forEach((n,o)=>{var a;const s=n["x-displayName"];s&&((a=r.tags)!=null&&a[o])&&(r.tags[o].name=s)}),{...r,webhooks:e}},Tc=Symbol(),Lf=Symbol(),_i=async r=>{var e;(e=document.getElementById(r))==null||e.scrollIntoView()},kr=r=>new Promise(e=>setTimeout(e,r)),_D=Symbol("downloadSpec"),jf=Xe.useEventBus(_D);function V1(r,e){const t=c0(r),n=t?new Blob([r],{type:"application/json"}):new Blob([r],{type:"application/x-yaml"}),o=URL.createObjectURL(n),s=t?".json":".yaml",a="spec"+s,l=e?e+s:a,c=document.createElement("a");c.href=o,c.download=l,c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{window.URL.revokeObjectURL(o),c.remove()},100)}function R1(r,e=1){const t=new RegExp(`^(?=#{${e}} )`,"m");return r.split(t).map(n=>n.trim()).filter(Boolean)}var ND=Object.defineProperty,AD=(r,e,t)=>e in r?ND(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ct=(r,e,t)=>(AD(r,typeof e!="symbol"?e+"":e,t),t);function OD(r){if(!r||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}OD("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:20px;width:20px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;transition:opacity .4s,box-shadow .2s;z-index:100}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:focus [data-close-button]{opacity:1}[data-sonner-toast]:focus-within [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:'';position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{display:none;transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}");let Vu=1;class TD{constructor(){ct(this,"subscribers"),ct(this,"toasts"),ct(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)})),ct(this,"publish",e=>{this.subscribers.forEach(t=>t(e))}),ct(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]}),ct(this,"create",e=>{var t;const{message:n,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Vu++,a=this.toasts.findIndex(c=>c.id===s),l=e.dismissible===void 0?!0:e.dismissible;return a!==-1?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...e,id:s,title:n}),{...c,...e,id:s,dismissible:l,title:n}):c):this.addToast({title:n,...o,dismissible:l,id:s}),s}),ct(this,"dismiss",e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e)),ct(this,"message",(e,t)=>this.create({...t,message:e})),ct(this,"error",(e,t)=>this.create({...t,type:"error",message:e})),ct(this,"success",(e,t)=>this.create({...t,type:"success",message:e})),ct(this,"info",(e,t)=>this.create({...t,type:"info",message:e})),ct(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e})),ct(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e})),ct(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading}));const o=e instanceof Promise?e:e();let s=n!==void 0;return o.then(a=>{if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?t.success(a):t.success;this.create({id:n,type:"success",message:l})}}).catch(a=>{if(t.error!==void 0){s=!1;const l=typeof t.error=="function"?t.error(a):t.error;this.create({id:n,type:"error",message:l})}}).finally(()=>{var a;s&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),n}),ct(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Vu++;return this.publish({...t,id:n,title:e}),n}),this.subscribers=[],this.toasts=[]}}const Kt=new TD,BD=(r,e)=>{const t=(e==null?void 0:e.id)||Vu++;return Kt.publish({title:r,...e,id:t}),t},PD=BD,Ba=Object.assign(PD,{success:Kt.success,info:Kt.info,warning:Kt.warning,error:Kt.error,custom:Kt.custom,message:Kt.message,promise:Kt.promise,dismiss:Kt.dismiss,loading:Kt.loading}),ID=["data-visible"],MD={className:"sonner-spinner"},DD=i.defineComponent({__name:"Loader",props:{visible:Boolean},setup(r){const e=Array(12).fill(0);return(t,n)=>(i.openBlock(),i.createElementBlock("div",{className:"sonner-loading-wrapper","data-visible":r.visible},[i.createElementVNode("div",MD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e),o=>(i.openBlock(),i.createElementBlock("div",{key:`spinner-bar-${o}`,className:"sonner-loading-bar"}))),128))])],8,ID))}}),Gi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,o]of e)t[n]=o;return t},VD={},RD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},LD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),jD=[LD];function FD(r,e){return i.openBlock(),i.createElementBlock("svg",RD,jD)}const qD=Gi(VD,[["render",FD]]),zD={},HD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},KD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1),UD=[KD];function WD(r,e){return i.openBlock(),i.createElementBlock("svg",HD,UD)}const GD=Gi(zD,[["render",WD]]),JD={},YD={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},XD=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1),QD=[XD];function ZD(r,e){return i.openBlock(),i.createElementBlock("svg",YD,QD)}const e5=Gi(JD,[["render",ZD]]),t5={},r5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n5=i.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),o5=[n5];function s5(r,e){return i.openBlock(),i.createElementBlock("svg",r5,o5)}const i5=Gi(t5,[["render",s5]]),a5={},l5={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},c5=i.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),d5=i.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),u5=[c5,d5];function h5(r,e){return i.openBlock(),i.createElementBlock("svg",l5,u5)}const f5=Gi(a5,[["render",h5]]),p5=["aria-live","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-type","data-invert","data-swipe-out","data-expanded"],m5=["data-disabled"],g5={key:1,"data-icon":""},y5={"data-content":""},v5={"data-title":""},b5=4e3,w5=14,k5=20,S5=200,x5=i.defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},duration:{},descriptionClass:{}},emits:["update:heights","removeToast"],setup(r,{emit:e}){const t=B=>!!B.promise,n=e,o=r,s=i.ref(!1),a=i.ref(!1),l=i.ref(!1),c=i.ref(!1),d=i.ref(null),u=i.ref(0),h=i.ref(0),f=i.ref(null),p=i.ref(null),m=i.computed(()=>o.index===0),g=i.computed(()=>o.index+1<=o.visibleToasts),y=i.computed(()=>o.toast.type),v=i.computed(()=>o.toast.dismissible),b=o.toast.className||"",w=o.toast.descriptionClassName||"",S=o.toast.style||{},x=i.computed(()=>o.heights.findIndex(B=>B.toastId===o.toast.id)||0),k=i.computed(()=>o.toast.duration||o.duration||b5),C=i.ref(0),N=i.ref(0),P=i.ref(k.value),M=i.ref(0),j=i.ref(null),I=i.computed(()=>o.position.split("-")),X=i.computed(()=>I.value[0]),W=i.computed(()=>I.value[1]),te=i.computed(()=>o.heights.reduce((B,z,H)=>H>=x.value?B:B+z.height,0)),me=i.computed(()=>o.toast.invert||o.invert),ke=i.computed(()=>d.value==="loading"),Se=i.computed(()=>d.value??(o.toast.type||null)),se=i.computed(()=>!t(o.toast)&&typeof o.toast.title=="object"),q=i.computed(()=>{if(!t(o.toast))return null;switch(d.value){case"loading":return o.toast.loading;case"success":return typeof o.toast.success=="function"?f.value:o.toast.success;case"error":return typeof o.toast.error=="function"?f.value:o.toast.error;default:return null}});i.onMounted(()=>s.value=!0),i.watchEffect(()=>{N.value=x.value*w5+te.value});function T(){var B,z;(!ke.value||v.value)&&(V(),(z=(B=o.toast).onDismiss)==null||z.call(B,o.toast))}function V(){a.value=!0,u.value=N.value;const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B),setTimeout(()=>{n("removeToast",o.toast)},S5)}const D=B=>{ke||(u.value=N.value,B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(l.value=!0,j.value={x:B.clientX,y:B.clientY}))},E=B=>{var z,H,ie,oe;if(c.value)return;j.value=null;const ye=Number(((z=p.value)==null?void 0:z.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(ye)>=k5){u.value=N.value,(ie=(H=o.toast).onDismiss)==null||ie.call(H,o.toast),V(),c.value=!0;return}(oe=p.value)==null||oe.style.setProperty("--swipe-amount","0px"),l.value=!0},A=B=>{var z;if(!j.value)return;const H=B.clientY-j.value.y,ie=B.clientX-j.value.x,oe=(I.value[0]==="top"?Math.min:Math.max)(0,H),ye=B.pointerType==="touch"?10:2;Math.abs(oe)>ye?(z=p.value)==null||z.style.setProperty("--swipe-amount",`${H}px`):Math.abs(ie)>ye&&(j.value=null)};return i.watchEffect(B=>{if(o.toast.promise&&d.value==="loading"||o.toast.duration===1/0)return;let z;const H=()=>{if(M.value<C.value){const oe=new Date().getTime()-C.value;P.value=P.value-oe}M.value=new Date().getTime()},ie=()=>{C.value=new Date().getTime(),z=setTimeout(()=>{var oe,ye;(ye=(oe=o.toast).onAutoClose)==null||ye.call(oe,o.toast),V()},P.value)};o.expanded||o.interacting?H():ie(),B(()=>{clearTimeout(z)})}),i.onMounted(()=>{if(p.value){const B=p.value.getBoundingClientRect().height;h.value=B;const z=[{toastId:o.toast.id,height:B},...o.heights];n("update:heights",z)}}),i.onUnmounted(()=>{if(p.value){const B=o.heights.filter(z=>z.toastId!==o.toast.id);n("update:heights",B)}}),i.watchEffect(()=>{o.toast.delete&&V()}),(B,z)=>(i.openBlock(),i.createElementBlock("li",{"aria-live":B.toast.important?"assertive":"polite","aria-atomic":"",role:"status",tabindex:"0",ref_key:"toastRef",ref:p,"data-sonner-toast":"",class:i.normalizeClass(i.unref(b)),"data-styled":!se.value,"data-mounted":s.value,"data-promise":!!B.toast.promise,"data-removed":a.value,"data-visible":g.value,"data-y-position":X.value,"data-x-position":W.value,"data-index":o.index,"data-front":m.value,"data-swiping":l.value,"data-type":d.value!=="loading"&&d.value?d.value:y.value,"data-invert":me.value,"data-swipe-out":c.value,"data-expanded":!!(o.expanded||o.expandByDefault&&s.value),style:i.normalizeStyle({"--index":o.index,"--toasts-before":o.index,"--z-index":B.toasts.length-o.index,"--offset":`${a.value?u.value:N.value}px`,"--initial-height":o.expandByDefault?"auto":`${h.value}px`,...i.unref(S)}),onPointerdown:D,onPointerup:E,onPointermove:A},[o.closeButton&&!se.value?(i.openBlock(),i.createElementBlock("button",{key:0,"aria-label":"Close toast","data-close-button":"","data-disabled":ke.value,onClick:T},[i.createVNode(f5)],8,m5)):i.createCommentVNode("",!0),y.value||B.toast.icon||B.toast.promise?(i.openBlock(),i.createElementBlock("div",g5,[typeof B.toast.promise=="function"||y.value==="loading"?(i.openBlock(),i.createBlock(DD,{key:0,visible:d.value==="loading"||y.value==="loading"},null,8,["visible"])):i.createCommentVNode("",!0),Se.value==="success"?(i.openBlock(),i.createBlock(qD,{key:1})):Se.value==="info"?(i.openBlock(),i.createBlock(GD,{key:2})):Se.value==="warning"?(i.openBlock(),i.createBlock(e5,{key:3})):Se.value==="error"?(i.openBlock(),i.createBlock(i5,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",y5,[i.createElementVNode("div",v5,[typeof B.toast.title=="string"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(B.toast.title),1)],64)):B.toast.title===void 0||B.toast.title===null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(q.value),1)],64)):se.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(B.toast.title),{key:2,onCloseToast:z[0]||(z[0]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},null,32)):i.createCommentVNode("",!0)]),B.toast.description?(i.openBlock(),i.createElementBlock("div",{key:0,"data-description":"",class:i.normalizeClass(B.descriptionClass+i.unref(w))},i.toDisplayString(B.toast.description),3)):i.createCommentVNode("",!0)]),B.toast.cancel?(i.openBlock(),i.createElementBlock("button",{key:2,"data-button":"","data-cancel":"",onClick:z[1]||(z[1]=()=>{var H;V(),(H=B.toast.cancel)!=null&&H.onClick&&B.toast.cancel.onClick()})},i.toDisplayString(B.toast.cancel.label),1)):i.createCommentVNode("",!0),B.toast.action?(i.openBlock(),i.createElementBlock("button",{key:3,"data-button":"",onClick:z[2]||(z[2]=()=>{var H;V(),(H=B.toast.action)==null||H.onClick()})},i.toDisplayString(B.toast.action.label),1)):i.createCommentVNode("",!0)],46,p5))}}),C5=["aria-label"],E5=["dir","data-theme","data-rich-colors","data-y-position","data-x-position"],$5=3,Rg="32px",_5=4e3,N5=356,Lg=14,A5=typeof window<"u"&&typeof document<"u",O5=i.defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{default:_5},gap:{default:Lg},visibleToasts:{default:$5},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},className:{default:""},style:{default:()=>({})},offset:{default:Rg},dir:{default:"auto"}},setup(r){const e=r,t=i.useAttrs(),n=i.ref([]),o=i.ref([]),s=i.ref(!1),a=i.ref(!1),l=i.ref(e.theme!=="system"?e.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),c=i.computed(()=>e.position.split("-")),d=i.ref(null),u=e.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function h(p){n.value=n.value.filter(({id:m})=>m!==p.id)}function f(){if(typeof window>"u")return"ltr";const p=document.documentElement.getAttribute("dir");return p==="auto"||!p?window.getComputedStyle(document.documentElement).direction:p}return i.onMounted(()=>{const p=Kt.subscribe(m=>{if(m.dismiss){n.value=n.value.map(g=>g.id===m.id?{...g,delete:!0}:g);return}i.nextTick(()=>{const g=n.value.findIndex(y=>y.id===m.id);g!==-1?n.value.splice(g,1,m):n.value=[m,...n.value]})});i.onUnmounted(()=>{p()})}),i.watch(()=>e.theme,p=>{if(p!=="system"){l.value=p;return}p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?l.value="dark":l.value="light"),!(typeof window>"u")&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:m})=>{m?l.value="dark":l.value="light"})}),i.watchEffect(()=>{n.value.length<=1&&(s.value=!1)}),i.watchEffect(p=>{function m(g){var y,v;e.hotkey.every(b=>g[b]||g.code===b)&&(s.value=!0,(y=d.value)==null||y.focus()),g.code==="Escape"&&(document.activeElement===d.value||(v=d.value)!=null&&v.contains(document.activeElement))&&(s.value=!1)}A5&&(document.addEventListener("keydown",m),p(()=>{document.removeEventListener("keydown",m)}))}),(p,m)=>{var g;return i.openBlock(),i.createElementBlock("section",{"aria-label":`Notifications ${i.unref(u)}`,tabIndex:-1},[i.createElementVNode("ol",{ref_key:"listRef",ref:d,"data-sonner-toaster":"",dir:p.dir==="auto"?f():p.dir,tabIndex:-1,"data-theme":p.theme,"data-rich-colors":p.richColors,"data-y-position":c.value[0],"data-x-position":c.value[1],style:i.normalizeStyle({"--front-toast-height":`${(g=o.value[0])==null?void 0:g.height}px`,"--offset":typeof p.offset=="number"?`${p.offset}px`:p.offset||Rg,"--width":`${N5}px`,"--gap":`${Lg}px`,...i.unref(t).style}),onMouseenter:m[1]||(m[1]=y=>s.value=!0),onMousemove:m[2]||(m[2]=y=>s.value=!0),onMouseleave:m[3]||(m[3]=()=>{a.value||(s.value=!1)}),onPointerdown:m[4]||(m[4]=y=>a.value=!1),onPointerup:m[5]||(m[5]=y=>a.value=!1)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(y,v)=>{var b,w,S,x;return i.openBlock(),i.createBlock(x5,{key:y.id,index:v,toast:y,duration:((b=p.toastOptions)==null?void 0:b.duration)??p.duration,className:(w=p.toastOptions)==null?void 0:w.className,descriptionClassName:(S=p.toastOptions)==null?void 0:S.descriptionClassName,invert:p.invert,visibleToasts:p.visibleToasts,closeButton:p.closeButton,interacting:a.value,position:p.position,style:i.normalizeStyle((x=p.toastOptions)==null?void 0:x.style),toasts:n.value,expandByDefault:p.expand,gap:p.gap,expanded:s.value,heights:o.value,"onUpdate:heights":m[0]||(m[0]=k=>o.value=k),onRemoveToast:h},null,8,["index","toast","duration","className","descriptionClassName","invert","visibleToasts","closeButton","interacting","position","style","toasts","expandByDefault","gap","expanded","heights"])}),128))],44,E5)],8,C5)}}}),L1={toast:()=>null};function T5(r){L1.toast=r}function j1(){return{initializeToasts:T5,toast:(r,e="info",t={timeout:3e3})=>{L1.toast(r,e,t)}}}const B5=i.defineComponent({__name:"ScalarToasts",setup(r){const e=i.ref(!1);i.onMounted(()=>e.value=!0);const t={success:Ba.success,error:Ba.error,warn:Ba.warning,info:Ba},{initializeToasts:n}=j1();return n((o,s="info",a={})=>{(t[s]||t.info)(o,{duration:a.timeout||3e3})}),(o,s)=>e.value?(i.openBlock(),i.createBlock(i.unref(O5),{key:0,toastOptions:{className:"toaster"}})):i.createCommentVNode("",!0)}}),ws=()=>{const{toast:r}=j1();return{copyToClipboard:t=>{navigator.clipboard.writeText(t).then(()=>{r("Copied to the clipboard","info")})}}},Jr=i.ref(!1);function P5(r){var o;const e=()=>{var a,l;const s=typeof window<"u"?(a=window.localStorage)==null?void 0:a.getItem("isDark"):null;return typeof s=="string"?!!JSON.parse(s):!!(typeof window<"u"&&((l=window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)"))!=null&&l.matches))},t=()=>{var s;Jr.value=!Jr.value,typeof window<"u"&&((s=window==null?void 0:window.localStorage)==null||s.setItem("isDark",JSON.stringify(Jr.value)))};function n(s){var a;Jr.value=s,typeof window<"u"&&((a=window==null?void 0:window.localStorage)==null||a.setItem("isDark",JSON.stringify(Jr.value)))}return Jr.value=(typeof window>"u"?null:JSON.parse(((o=window.localStorage)==null?void 0:o.getItem("isDark"))||"null"))??r??e(),i.watch(Jr,s=>{typeof document>"u"||(document.body.classList.toggle("dark-mode",s),document.body.classList.toggle("light-mode",!s))},{immediate:!0}),{isDark:Jr,toggleDarkMode:t,setDarkMode:n}}const I5=["unirest"],Ru=i.ref([...I5]),M5=Gg.availableTargets().map(r=>(r.key==="node"&&(r.default="undici",r.clients.unshift({description:"An HTTP/1.1 client, written from scratch for Node.js.",key:"undici",link:"https://github.com/nodejs/undici",title:"undici"})),r.clients=r.clients.filter(e=>!Ru.value.includes(e.key)),r)).filter(r=>r.clients.length);function Ji(){return{availableTargets:i.computed(()=>M5),excludedClients:i.readonly(Ru),setExcludedClients:e=>Ru.value=e}}const Ff=i.ref(ts.hash??""),Tl=i.ref(),D5=i.ref(!1),V5=r=>r.slug?`description/${r.slug}`:"",F1=r=>{var t;if(!Tl.value)return"";const e=new RegExp("^"+((t=Tl.value)==null?void 0:t.basePath)+"/?");return decodeURIComponent(r.replace(e,""))},R5=(r,e)=>{if(!r)return"webhooks";const t=Ai.slug(r),n=encodeURIComponent(t);return`webhook/${e}/${n}`},L5=r=>{if(!r)return"models";const e=Ai.slug(r);return`model/${encodeURIComponent(e)}`},j5=(r,e)=>`${q1(e)}/${r.httpVerb}${r.path}`,q1=({name:r})=>{const e=Ai.slug(r);return`tag/${encodeURIComponent(e)}`},F5=(r=Ff.value)=>{var n;const e=(n=r.match(/(tag\/[^/]+)/))==null?void 0:n[0],t=r.startsWith("model")?"models":"";return e??t},q5=()=>{Ff.value=Tl.value?F1(window.location.pathname):decodeURIComponent(window.location.hash.replace(/^#/,""))},lt=()=>({hash:Ff,getWebhookId:R5,getModelId:L5,getHeadingId:V5,getOperationId:j5,getPathRoutingId:F1,getSectionId:F5,getTagId:q1,isIntersectionEnabled:D5,pathRouting:Tl,updateHash:q5});function qf(r){return{parameterMap:i.computed(()=>{var o;const t=((o=r.operation.information)==null?void 0:o.parameters)??[],n={path:[],query:[],header:[],body:[],formData:[]};return r.operation.pathParameters&&r.operation.pathParameters.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),t&&t.forEach(s=>{s.in==="path"?n.path.push(s):s.in==="query"?n.query.push(s):s.in==="header"?n.header.push(s):s.in==="body"?n.body.push(s):s.in==="formData"&&n.formData.push(s)}),n})}}const jg=()=>({info:{title:"",description:"",termsOfService:"",version:"",license:{name:"",url:""},contact:{email:""}},externalDocs:{description:"",url:""},components:{schemas:{},securitySchemes:{}},servers:[],tags:[]}),z5=async({url:r,content:e},t)=>{if(r)return Lv(r)?await pp(r,t):await pp(r);const n=typeof e=="function"?e():e;if(typeof n=="string")return n;if(typeof n=="object")return JSON.stringify(n)};function z1({specConfig:r,proxy:e}){const t=i.ref(""),n=i.reactive(jg()),o=i.ref(null);function s(a){return a?D1(a).then(l=>{o.value=null,Object.assign(n,{servers:[],...l})}).catch(l=>{o.value=l.toString()}):Object.assign(n,jg())}return i.watch(()=>i.toValue(r),async a=>{var l;if(a){const c=(l=await z5(a,i.toValue(e)))==null?void 0:l.trim();typeof c=="string"&&(t.value=c)}},{immediate:!0,deep:!0}),i.watch(t,()=>{s(t.value)}),{rawSpec:t,parsedSpec:n,specErrors:o}}function zf(r){return{responses:i.computed(()=>{if(!r.information)return[];const{responses:t}=r.information,n=[];return t&&Object.keys(t).forEach(o=>{n.push({name:o,description:t[o].description})}),n})}}const{getHeadingId:Fg,getModelId:qg,getOperationId:zg,getSectionId:H5,getTagId:H1,getWebhookId:vd,hash:Lu}=lt(),Je=i.ref(void 0);function K5(r){return Je.value=r}const K1=i.ref(!1),Bl=i.reactive(ts["useSidebarContent-collapsedSidebarItems"]??{});function U5(r){Bl[r]=!Bl[r]}function bd(r,e){Bl[r]=e}const Pl=i.ref([]),W5=async r=>{const e=await ki(r),t=Xl(e);return e.filter(n=>n.depth===t||n.depth===t+1)},U1=i.computed(()=>{var h,f,p,m,g,y,v,b,w,S;const{state:r}=Ml(),e={},{openApi:{globalSecurity:t}}=Qu(),n=[];let o=null;Pl.value.forEach(x=>{var k;x.depth===Xl(Pl.value)?(o={id:Fg(x),title:x.value.toUpperCase(),show:!r.showApiClient,children:[]},n.push(o)):o&&((k=o.children)==null||k.push({id:Fg(x),title:x.value,show:!r.showApiClient}))});const s=(f=(h=Je.value)==null?void 0:h.tags)==null?void 0:f[0],l=s&&(x=>(x==null?void 0:x.length)!==1||x[0].name!=="default"||x[0].description!=="")((p=Je.value)==null?void 0:p.tags)?(g=(m=Je.value)==null?void 0:m.tags)==null?void 0:g.filter(x=>{var k;return((k=x.operations)==null?void 0:k.length)>0}).map(x=>{var k;return{id:H1(x),title:x.name.toUpperCase(),show:!0,children:(k=x.operations)==null?void 0:k.map(C=>{var M;const N=zg(C,x),P=C.name??C.path;return e[N]=P,{id:N,title:P,httpVerb:C.httpVerb,deprecated:((M=C.information)==null?void 0:M.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&kl(C,t)}}})}}):(y=s==null?void 0:s.operations)==null?void 0:y.map(x=>{var N;const k=zg(x,s),C=x.name??x.path;return e[k]=C,{id:k,title:C,httpVerb:x.httpVerb,deprecated:((N=x.information)==null?void 0:N.deprecated)??!1,show:!0,select:()=>{r.showApiClient&&kl(x,t)}}}),c=Ah(Je.value)&&!K1.value?[{id:qg(),title:"MODELS",show:!r.showApiClient,children:Object.keys(Jt(Je.value)??{}).map(x=>{var C;const k=qg(x);return e[k]=x,{id:k,title:((C=Jt(Je.value))==null?void 0:C[x]).title??x,show:!r.showApiClient}})}]:[],d=(v=Je.value)!=null&&v["x-tagGroups"]?(w=(b=Je.value)==null?void 0:b["x-tagGroups"])==null?void 0:w.map(x=>{const k=[];return x.tags.map(N=>{if(N.toUpperCase()==="MODELS"&&c.length>0)k.push(c[0]);else{const P=l==null?void 0:l.find(M=>M.title===N.toUpperCase());P&&k.push(P)}}),{id:x.name,title:x.name.toUpperCase(),children:k,show:!0,isGroup:!0}}):void 0,u=Rv(Je.value)?[{id:vd(),title:"WEBHOOKS",show:!r.showApiClient,children:Object.keys(((S=Je.value)==null?void 0:S.webhooks)??{}).map(x=>{var C,N;const k=vd(x);return e[k]=x,Object.keys(((N=(C=Je.value)==null?void 0:C.webhooks)==null?void 0:N[x])??{}).map(P=>{var M,j,I;return{id:vd(x,P),title:(I=(j=(M=Je.value)==null?void 0:M.webhooks)==null?void 0:j[x][P])==null?void 0:I.name,httpVerb:P,show:!r.showApiClient}})}).flat()}]:[];return{entries:[...n,...d??l??[],...d?[]:u,...d?[]:c],titles:e}}),G5=i.ref(!1),J5=i.computed(()=>{var r,e;return((e=(r=U1.value)==null?void 0:r.titles)==null?void 0:e[Lu.value])??""});function rr(r){return r!=null&&r.parsedSpec&&(Je.value=r.parsedSpec,i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t.length},()=>{var e,t;if(Lu.value){const n=H5(Lu.value);n&&bd(n,!0)}else{const n=(t=(e=Je.value)==null?void 0:e.tags)==null?void 0:t[0];n&&bd(H1(n),!0)}}),i.watch(()=>{var e,t;return(t=(e=Je.value)==null?void 0:e.info)==null?void 0:t.description},async()=>{var t,n;const e=(n=(t=Je.value)==null?void 0:t.info)==null?void 0:n.description;return e?Pl.value=await W5(e):Pl.value=[]})),{breadcrumb:J5,items:U1,isSidebarOpen:G5,collapsedSidebarItems:Bl,toggleCollapsedSidebarItem:U5,setCollapsedSidebarItem:bd,hideModels:K1,setParsedSpec:K5}}const Y5=i.defineComponent({__name:"SidebarHttpBadge",props:{active:{type:Boolean},method:{}},setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(no),{class:i.normalizeClass(["sidebar-heading-type",{"sidebar-heading-type-active":e.active}]),method:e.method,property:"--method-color",short:""},null,8,["class","method"]))}}),W1=U(Y5,[["__scopeId","data-v-6563458b"]]),X5=["id"],Q5={key:0,class:"sidebar-heading-chevron"},Z5=["href"],eV={class:"sidebar-heading-link-title"},tV={key:1,class:"sidebar-heading-link-method"},rV={key:1,class:"action-menu"},nV=i.defineComponent({__name:"SidebarElement",props:{id:{},item:{},isActive:{type:Boolean},hasChildren:{type:Boolean},open:{type:Boolean}},emits:["toggleOpen"],setup(r,{emit:e}){const t=r,n=e,{hash:o,isIntersectionEnabled:s,pathRouting:a}=lt(),l=async()=>{var u,h;t.hasChildren&&n("toggleOpen"),(h=(u=t.item)==null?void 0:u.select)==null||h.call(u),t.open&&(s.value=!1,await kr(100),s.value=!0)},c=()=>{if(a.value)return a.value.basePath+"/"+t.item.id;{const u=new URL(window.location.href);return u.hash=t.item.id,`${u.pathname}${u.search}${u.hash}`}},d=async u=>{var h,f;if(a.value){u.preventDefault(),t.hasChildren&&n("toggleOpen"),(f=(h=t.item)==null?void 0:h.select)==null||f.call(h),n("toggleOpen"),s.value=!1,o.value=t.item.id;const p=new URL(window.location.href);p.pathname=a.value.basePath+"/"+t.item.id,window.history.pushState({},"",p),_i(t.item.id),await kr(100),s.value=!0}};return(u,h)=>{var f,p;return i.openBlock(),i.createElementBlock("li",{id:u.id,class:"sidebar-group-item"},[i.createElementVNode("div",{class:i.normalizeClass(["sidebar-heading",{"sidebar-group-item__folder":u.hasChildren,active_page:u.isActive,deprecated:u.item.deprecated??!1}]),onClick:l},[u.hasChildren?(i.openBlock(),i.createElementBlock("p",Q5,[i.createVNode(i.unref(Mi),{class:"toggle-nested-icon",icon:u.open?"ChevronDown":"ChevronRight",label:"Toggle group",size:"sm",onClick:i.withModifiers(l,["stop"])},null,8,["icon"]),i.createTextVNode(" ")])):i.createCommentVNode("",!0),i.createElementVNode("a",{class:"sidebar-heading-link",href:c(),onClick:d},[(p=(f=u.item)==null?void 0:f.icon)!=null&&p.src?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:"sidebar-icon",icon:u.item.icon.src},null,8,["icon"])):i.createCommentVNode("",!0),i.createElementVNode("p",eV,i.toDisplayString(u.item.title),1),u.item.httpVerb&&!u.hasChildren?(i.openBlock(),i.createElementBlock("p",tV,[i.createTextVNode(" "),i.createVNode(W1,{active:u.isActive,method:u.item.httpVerb},null,8,["active","method"])])):i.createCommentVNode("",!0)],8,Z5)],2),u.open?i.renderSlot(u.$slots,"default",{key:0},void 0,!0):i.createCommentVNode("",!0),u.$slots["action-menu"]?(i.openBlock(),i.createElementBlock("div",rV,[i.renderSlot(u.$slots,"action-menu",{},void 0,!0)])):i.createCommentVNode("",!0)],8,X5)}}}),Pa=U(nV,[["__scopeId","data-v-17b23ea1"]]),oV=i.defineComponent({__name:"SidebarGroup",props:{level:{}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("ul",{class:"sidebar-group sidebar-indent-nested",style:i.normalizeStyle({"--scalar-sidebar-level":e.level})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),wd=U(oV,[["__scopeId","data-v-39c84840"]]),sV={class:"sidebar"},iV={class:"sidebar-group-title"},aV=-160,lV=i.defineComponent({__name:"Sidebar",props:{parsedSpec:{}},setup(r){const e=r,{hash:t,isIntersectionEnabled:n}=lt(),{items:o,toggleCollapsedSidebarItem:s,collapsedSidebarItems:a}=rr({parsedSpec:e.parsedSpec}),l=i.ref(null),c=i.ref(!0);i.watch(t,u=>{!n.value||c.value||typeof window>"u"||d(u)});const d=u=>{var p,m,g,y;const h=document.getElementById(`sidebar-${u}`);if(!h||!l.value)return;let f=aV;h.getAttribute("data-sidebar-type")==="heading"?f+=h.offsetTop+((p=h.getElementsByClassName("sidebar-heading"))==null?void 0:p[0]).offsetHeight:f+=h.offsetTop+(((m=h.parentElement)==null?void 0:m.offsetTop)??0)+(((y=(g=h.parentElement)==null?void 0:g.parentElement)==null?void 0:y.offsetTop)??0),l.value.scrollTo({top:f,behavior:"smooth"})};return i.onMounted(()=>{setTimeout(()=>d(t.value),500),c.value=!1}),(u,h)=>(i.openBlock(),i.createElementBlock("div",sV,[i.renderSlot(u.$slots,"sidebar-start",{},void 0,!0),i.createElementVNode("div",{ref_key:"scrollerEl",ref:l,class:"sidebar-pages custom-scroll custom-scroll-self-contain-overflow"},[i.createVNode(wd,{level:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o).entries,f=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:f.id},[f.isGroup?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("li",iV,i.toDisplayString(f.title),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,p=>(i.openBlock(),i.createBlock(Pa,{key:p.id,id:`sidebar-${p.id}`,"data-sidebar-type":"heading",hasChildren:p.children&&p.children.length>0,isActive:i.unref(t)===p.id,item:{id:p.id,title:p.title,select:p.select,httpVerb:p.httpVerb,deprecated:p.deprecated??!1},open:i.unref(a)[p.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(p.id),await i.unref(kr)(100),c.value=!1}},{default:i.withCtx(()=>{var m;return[p.children&&((m=p.children)==null?void 0:m.length)>0?(i.openBlock(),i.createBlock(wd,{key:0,level:2},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.children,g=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g.id},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${g.id}`,isActive:i.unref(t)===g.id,item:{id:g.id,title:g.title,select:g.select,httpVerb:g.httpVerb,deprecated:g.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"]))),128))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${f.id}`,"data-sidebar-type":"heading",hasChildren:f.children&&f.children.length>0,isActive:i.unref(t)===f.id,item:{id:f.id,title:f.title,select:f.select,httpVerb:f.httpVerb,deprecated:f.deprecated??!1},open:i.unref(a)[f.id]??!1,onToggleOpen:async()=>{c.value=!0,i.unref(s)(f.id),await i.unref(kr)(100),c.value=!1}},{default:i.withCtx(()=>{var p;return[f.children&&((p=f.children)==null?void 0:p.length)>0?(i.openBlock(),i.createBlock(wd,{key:0,level:1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.children,m=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m.id},[f.show?(i.openBlock(),i.createBlock(Pa,{key:0,id:`sidebar-${m.id}`,isActive:i.unref(t)===m.id,item:{id:m.id,title:m.title,select:m.select,httpVerb:m.httpVerb,deprecated:m.deprecated??!1}},null,8,["id","isActive","item"])):i.createCommentVNode("",!0)],64))),128))]),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","hasChildren","isActive","item","open","onToggleOpen"])):i.createCommentVNode("",!0)],64))],64))),128))]),_:1})],512),i.renderSlot(u.$slots,"sidebar-end",{},void 0,!0)]))}}),Hf=U(lV,[["__scopeId","data-v-404804be"]]),cV={key:0,class:"api-client-drawer"},dV={class:"api-client-container"},uV={class:"scalar-api-client-height"},hV={class:"scalar-api-client-states"},fV={class:"t-doc__sidebar"},pV=i.defineComponent({__name:"ApiClientModal",props:{parsedSpec:{},overloadShow:{type:Boolean},proxyUrl:{},theme:{}},emits:["toggleDarkMode"],setup(r){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CZKZ0PqH.cjs")).then(a=>a.ApiClient)),{hideApiClient:t,state:n}=Ml(),o=Xe.useMediaQuery("(max-width: 1000px)"),s=i.ref(!1);return(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(n).showApiClient||a.overloadShow?(i.openBlock(),i.createElementBlock("div",cV,[i.createElementVNode("div",dV,[i.renderSlot(a.$slots,"header",{},void 0,!0),i.createElementVNode("div",uV,[i.createVNode(i.unref(e),{proxyUrl:a.proxyUrl,showSideBar:s.value,theme:a.theme??"none",withDefaultFonts:!1,onEscapeKeyPress:i.unref(t),onToggleSidebar:l[2]||(l[2]=c=>s.value=!s.value)},{"address-bar-controls":i.withCtx(()=>[i.createElementVNode("div",hV,[i.createElementVNode("button",{class:"scalar-api-client-states-button scalar-api-client-states-button__endpoints",type:"button",onClick:l[0]||(l[0]=c=>s.value=!s.value)},[i.createVNode(i.unref(Me),{icon:s.value?"SideBarClosed":"SideBarOpen",size:"sm"},null,8,["icon"])]),i.createElementVNode("button",{class:"scalar-api-client-states-button",type:"button",onClick:l[1]||(l[1]=(...c)=>i.unref(t)&&i.unref(t)(...c))},[i.createVNode(i.unref(Me),{icon:"Close",size:"sm"})])])]),sidebar:i.withCtx(()=>[i.createElementVNode("div",fV,[i.withDirectives(i.createVNode(i.unref(Hf),{parsedSpec:a.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(a.$slots,"sidebar-start",{},void 0,!0)]),_:3},8,["parsedSpec"]),[[i.vShow,!i.unref(o)]])])]),_:3},8,["proxyUrl","showSideBar","theme","onEscapeKeyPress"])])])])):i.createCommentVNode("",!0),i.unref(n).showApiClient?(i.openBlock(),i.createElementBlock("div",{key:1,class:"api-client-drawer-exit",onClick:l[3]||(l[3]=(...c)=>i.unref(t)&&i.unref(t)(...c))})):i.createCommentVNode("",!0)],64))}}),G1=U(pV,[["__scopeId","data-v-56bf0bfc"]]),J1=()=>({targetKey:"shell",clientKey:"curl"}),Qo=i.reactive(J1());function mV(){jv(Qo,J1())}function Y1(r){var t;const{availableTargets:e}=Ji();return((t=e.value.find(n=>n.key===r.targetKey))==null?void 0:t.title)??r.targetKey}function X1(r){var t,n;const{availableTargets:e}=Ji();return((n=(t=e.value.find(o=>o.key===r.targetKey))==null?void 0:t.clients.find(o=>o.key===r.clientKey))==null?void 0:n.title)??r.clientKey}const gV=r=>{Object.assign(Qo,{...Qo,...r})},yV=i.computed(()=>Y1(Qo)),vV=i.computed(()=>X1(Qo)),Bc=()=>({httpClient:i.readonly(Qo),resetState:mV,setHttpClient:gV,httpTargetTitle:yV,httpClientTitle:vV,getClientTitle:X1,getTargetTitle:Y1}),bV={},wV={class:"scalar-card"};function kV(r,e){return i.openBlock(),i.createElementBlock("div",wV,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const bn=U(bV,[["render",kV],["__scopeId","data-v-dcabb131"]]),SV=i.defineComponent({__name:"CardContent",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["scalar-card-content",{"scalar-card--muted":e.muted,"scalar-card--contrast":e.contrast,"scalar-card--frameless":e.frameless,"scalar-card--transparent":e.transparent,"scalar-card--borderless":e.borderless}])},[i.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),er=U(SV,[["__scopeId","data-v-5312c2e0"]]),xV={class:"scalar-card-header-slots"},CV={class:"scalar-card-header-slot scalar-card-header-title"},EV={class:"scalar-card-header-slot scalar-card-header-actions"},$V=i.defineComponent({__name:"CardHeader",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(er,i.mergeProps(e,{class:"scalar-card-header"}),{default:i.withCtx(()=>[i.createElementVNode("div",xV,[i.createElementVNode("div",CV,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",EV,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])])]),_:3},16))}}),wn=U($V,[["__scopeId","data-v-bbd0c20a"]]),_V=i.defineComponent({__name:"CardFooter",props:{muted:{type:Boolean},contrast:{type:Boolean},frameless:{type:Boolean},transparent:{type:Boolean},borderless:{type:Boolean}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createBlock(er,i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16))}}),Yi=U(_V,[["__scopeId","data-v-918ab8d6"]]),NV=i.defineComponent({__name:"CardTabHeader",emits:["change"],setup(r,{emit:e}){const t=e,n=o=>{t("change",o)};return(o,s)=>(i.openBlock(),i.createBlock(wn,{class:"scalar-card-header-tabs"},{actions:i.withCtx(()=>[i.renderSlot(o.$slots,"actions",{},void 0,!0)]),default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabGroup),{onChange:n},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.TabList),{class:"tab-list custom-scroll"},{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]),_:3}))}}),Q1=U(NV,[["__scopeId","data-v-6a91b57c"]]),AV=i.defineComponent({__name:"CardTab",setup(r){return(e,t)=>(i.openBlock(),i.createBlock(i.unref(Le.Tab),{as:"template"},{default:i.withCtx(({selected:n})=>[i.createElementVNode("button",{class:i.normalizeClass({tab:!0,"tab-selected":n}),type:"button"},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],2)]),_:3}))}}),Z1=U(AV,[["__scopeId","data-v-f373ecc2"]]),OV={class:"selector"},TV=i.defineComponent({__name:"Authentication",props:{parsedSpec:{}},setup(r){const e=r,{authentication:t,setAuthentication:n}=rs(),o=i.computed(()=>{var a,l,c;if(!t.preferredSecurityScheme)return!1;const s=(c=(l=(a=e.parsedSpec)==null?void 0:a.components)==null?void 0:l.securitySchemes)==null?void 0:c[t.preferredSecurityScheme];return!!s&&"type"in s&&!!s.type});return i.watch(()=>{var s,a;return(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes},()=>{var s,a;n({securitySchemes:(a=(s=e.parsedSpec)==null?void 0:s.components)==null?void 0:a.securitySchemes})},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const s=i.useSSRContext();await kr(1),s.payload.data["useGlobalStore-authentication"]=t}),(s,a)=>i.unref(Vv)(s.parsedSpec)?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",class:"authentication-header",transparent:""},{actions:i.withCtx(()=>{var l,c;return[i.createElementVNode("div",OV,[i.createVNode(i.unref(Pv),{value:(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes},null,8,["value"])])]}),default:i.withCtx(()=>[i.createTextVNode(" Authentication ")]),_:1}),o.value?(i.openBlock(),i.createBlock(i.unref(er),{key:0,class:"authentication-content",transparent:""},{default:i.withCtx(()=>{var l,c,d;return[i.unref(t).preferredSecurityScheme?(i.openBlock(),i.createBlock(i.unref(Bv),{key:0,value:(d=(c=(l=s.parsedSpec)==null?void 0:l.components)==null?void 0:c.securitySchemes)==null?void 0:d[i.unref(t).preferredSecurityScheme]},null,8,["value"])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}),BV=U(TV,[["__scopeId","data-v-3e7b39cf"]]),PV=["innerHTML"],IV=i.defineComponent({__name:"MarkdownRenderer",props:{value:{},withImages:{type:Boolean,default:!1}},setup(r){const e=r,t=i.ref(""),n=e.withImages?[]:["img","picture"];return i.watch(()=>e.value,async()=>{var s;const o=await Wg.unified().use(Ug).use(Lw).use(jw,{allowDangerousHtml:!0}).use(Vw).use(Ic,{...Ic.defaultSchema,tagNames:(s=Ic.defaultSchema.tagNames)==null?void 0:s.filter(a=>!n.includes(a))}).use(Dw).use(Iw,{target:"_blank"}).use(Mw).use(Rw).process(e.value);t.value=String(o.value)},{immediate:!0}),i.onServerPrefetch(async()=>await kr(1)),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:"markdown",innerHTML:t.value},null,8,PV))}}),$t=U(IV,[["__scopeId","data-v-172b542f"]]),MV=["title","innerHTML"],DV=i.defineComponent({__name:"ServerItem",props:{value:{},variables:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.computed(()=>{var a;const s=(((a=e.value)==null?void 0:a.url)??"").replace(/(<([^>]+)>)/gi,"");return Nh(s,l=>{var d;const c=(d=e.variables)==null?void 0:d.find(u=>u.name===l);return`<span class="base-url-variable">${((c==null?void 0:c.value)??"")!==""?c==null?void 0:c.value:`{${l}}`}</span>`})});return(o,s)=>o.value?(i.openBlock(),i.createElementBlock("a",{key:0,class:"base-url",title:o.value.description,onClick:s[0]||(s[0]=a=>i.unref(t)(o.value.url)),innerHTML:n.value},null,8,MV)):i.createCommentVNode("",!0)}}),VV=U(DV,[["__scopeId","data-v-8df90bd1"]]),RV={key:0},LV=["for"],jV=["id","value","onInput"],FV=["value"],qV={class:"input-value"},zV=["id","value","onInput"],HV=i.defineComponent({__name:"ServerVariables",props:{value:{}},setup(r){const{server:e,setServer:t}=ss(),n=(s,a)=>{const l=a.target.value,c=[...e.variables],d=c.findIndex(u=>u.name===s);c[d].value=l,t({variables:c})},o=s=>{const a=e.variables.findIndex(l=>l.name===s);return e.variables[a].value??""};return(s,a)=>s.value?(i.openBlock(),i.createElementBlock("div",RV,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,l=>(i.openBlock(),i.createElementBlock("div",{key:l.name,class:"input"},[i.createElementVNode("label",{for:`variable-${l.name}`},[i.createElementVNode("code",null,i.toDisplayString(l.name),1)],8,LV),l.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("select",{id:`variable-${l.name}`,value:o(l.name),onInput:c=>n(l.name,c)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.enum,c=>(i.openBlock(),i.createElementBlock("option",{key:c,value:c},i.toDisplayString(c),9,FV))),128))],40,jV),i.createElementVNode("div",qV,i.toDisplayString(l.default),1)],64)):(i.openBlock(),i.createElementBlock("input",{key:1,id:`variable-${l.name}`,autocomplete:"off",placeholder:"value",spellcheck:"false",type:"text",value:o(l.name),onInput:c=>n(l.name,c)},null,40,zV))]))),128))])):i.createCommentVNode("",!0)}}),KV=U(HV,[["__scopeId","data-v-a812e319"]]),UV={class:"scalar-card-serverlist-container"},WV={class:"server-item"},GV={class:"server-selector"},JV=["value"],YV=["value"],XV={class:"description"},QV=i.defineComponent({__name:"BaseUrl",setup(r){const{server:e,setServer:t}=ss(),n=i.ref(0);return i.watch([n,()=>e.servers],()=>{var l,c,d;if(!e.servers.length)return;const o=((l=e.servers[n.value])==null?void 0:l.variables)??{},s=o?Object.keys(o).map(u=>{var h;return{name:u,value:((h=o[u].default)==null?void 0:h.toString())??""}}):[];cv((c=e.servers[n.value])==null?void 0:c.url).filter(u=>!o[u]).forEach(u=>{s.push({name:u,value:""})}),t({selectedServer:n.value,description:(d=e.servers[n.value])==null?void 0:d.description,variables:s})},{deep:!0}),(o,s)=>i.unref(e).servers.length>0?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",muted:""},{default:i.withCtx(()=>[i.createTextVNode(" Base URL ")]),_:1}),i.createVNode(i.unref(er),{class:"scalar-card-serverlist"},{default:i.withCtx(()=>[i.createElementVNode("div",UV,[i.createElementVNode("div",WV,[i.createElementVNode("div",GV,[i.unref(e).servers.length>1?(i.openBlock(),i.createElementBlock("select",{key:0,value:n.value,onInput:s[0]||(s[0]=a=>n.value=parseInt(a.target.value,10))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(e).servers,(a,l)=>(i.openBlock(),i.createElementBlock("option",{key:l,value:l},i.toDisplayString(a.url),9,YV))),128))],40,JV)):i.createCommentVNode("",!0),i.createVNode(VV,{value:i.unref(e).servers[n.value],variables:i.unref(e).variables},null,8,["value","variables"]),i.unref(e).servers.length>1?(i.openBlock(),i.createBlock(i.unref(Me),{key:1,icon:"ChevronDown"})):i.createCommentVNode("",!0)])]),i.createVNode(KV,{value:i.unref(e).variables},null,8,["value"])])]),_:1}),i.unref(e).description?(i.openBlock(),i.createBlock(i.unref(er),{key:0,muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",XV,[i.createVNode(i.unref($t),{value:i.unref(e).description},null,8,["value"])])]),_:1})):i.createCommentVNode("",!0)]),_:1})):i.createCommentVNode("",!0)}}),ZV=U(QV,[["__scopeId","data-v-db459e3b"]]),ew=r=>(i.pushScopeId("data-v-cae9ee2d"),r=r(),i.popScopeId(),r),eR=["onClick"],tR=["value"],rR=["label"],nR=["value"],oR={class:"code-languages-background code-languages-icon__more"},sR={key:1,class:"code-languages-icon",height:"50",viewBox:"0 0 50 50",width:"50",xmlns:"http://www.w3.org/2000/svg"},iR=ew(()=>i.createElementVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[i.createElementVNode("path",{d:"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0"})],-1)),aR=[iR],lR=ew(()=>i.createElementVNode("span",null,"More",-1)),cR=i.defineComponent({__name:"ClientSelector",setup(r){const{httpClient:e,setHttpClient:t,getClientTitle:n,getTargetTitle:o}=Bc(),{availableTargets:s}=Ji(),a=i.ref(),l=[{targetKey:"shell",clientKey:"curl"},{targetKey:"ruby",clientKey:"native"},{targetKey:"node",clientKey:"undici"},{targetKey:"php",clientKey:"guzzle"},{targetKey:"python",clientKey:"python3"},{targetKey:"c",clientKey:"libcurl"}],c=h=>`programming-language-${h}`,d=h=>h.targetKey===e.targetKey&&h.clientKey===e.clientKey,u=h=>l.some(f=>f.targetKey===h.targetKey&&f.clientKey===h.clientKey);return(h,f)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"containerRef",ref:a,class:"client-libraries-content"},[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(l,p=>i.createElementVNode("div",{key:p.clientKey,class:i.normalizeClass(["code-languages rendered-code-sdks",{"code-languages__active":d(p)}]),onClick:()=>i.unref(t)(p)},[i.createElementVNode("div",{class:i.normalizeClass(["code-languages-background",`code-languages-icon__${p.targetKey}`])},[i.createVNode(i.unref(Me),{class:"code-languages-icon",icon:c(p.targetKey)},null,8,["icon"])],2),i.createElementVNode("span",null,i.toDisplayString(i.unref(o)(p)),1)],10,eR)),64)),i.createElementVNode("div",{class:i.normalizeClass(["code-languages code-languages__select",{"code-languages__active":i.unref(e)&&!u(i.unref(e))}])},[i.createElementVNode("select",{class:"language-select",value:JSON.stringify(i.unref(e)),onInput:f[0]||(f[0]=p=>i.unref(t)(JSON.parse(p.target.value)))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(s),p=>(i.openBlock(),i.createElementBlock("optgroup",{key:p.key,label:p.title},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.clients,m=>(i.openBlock(),i.createElementBlock("option",{key:m.key,value:JSON.stringify({targetKey:p.key,clientKey:m.key})},i.toDisplayString(i.unref(n)({targetKey:p.key,clientKey:m.key})),9,nR))),128))],8,rR))),128))],40,tR),i.createElementVNode("div",oR,[i.unref(e)&&!u(i.unref(e))?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`code-languages-icon__${i.unref(e).targetKey}`)},[i.createVNode(i.unref(Me),{class:"code-languages-icon",icon:c(i.unref(e).targetKey)},null,8,["icon"])],2)):(i.openBlock(),i.createElementBlock("svg",sR,aR))]),lR],2)],512))}}),dR=U(cR,[["__scopeId","data-v-cae9ee2d"]]),uR=i.defineComponent({__name:"ClientLibraries",setup(r){const{httpTargetTitle:e,httpClientTitle:t}=Bc();return(n,o)=>(i.openBlock(),i.createBlock(i.unref(bn),null,{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{borderless:"",transparent:""},{default:i.withCtx(()=>[i.createTextVNode(" Client Libraries ")]),_:1}),i.createVNode(i.unref(er),{frameless:"",transparent:""},{default:i.withCtx(()=>[i.createVNode(dR)]),_:1}),i.createVNode(i.unref(Yi),{class:"selected-client card-footer",muted:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t))+" "+i.toDisplayString(i.unref(e)),1)]),_:1})]),_:1}))}}),hR=U(uR,[["__scopeId","data-v-2a099868"]]),fR={},pR={class:"badge"};function mR(r,e){return i.openBlock(),i.createElementBlock("div",pR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Ni=U(fR,[["render",mR],["__scopeId","data-v-190574ac"]]),Kf=i.defineComponent({__name:"IntersectionObserver",props:{id:{},is:{}},emits:["intersecting"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(),s=l=>{const c=l.offsetHeight;return`${c/2}px 0px ${c/2}px 0px`},a=l=>l.offsetHeight<window.innerHeight?.8:.5;return i.onMounted(()=>{if(o.value){const l={rootMargin:s(o.value),threshold:a(o.value)};Xe.useIntersectionObserver(o,([{isIntersecting:c}])=>{c&&t.id&&n("intersecting")},l)}}),(l,c)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.is??"div"),{id:l.id,ref_key:"intersectionObserverRef",ref:o},{default:i.withCtx(()=>[i.renderSlot(l.$slots,"default")]),_:3},8,["id"]))}}),gR=i.defineComponent({__name:"Section",props:{id:{},label:{}},setup(r){const e=r,{getSectionId:t,hash:n,isIntersectionEnabled:o,pathRouting:s}=lt(),{setCollapsedSidebarItem:a}=rr();function l(){var u;if(!e.label||!o.value)return;const c=new URL(window.location.href),d=e.id??"";s.value?c.pathname=s.value.basePath+"/"+d:c.hash=d,n.value=d,window.history.replaceState({},"",c),(u=e.id)!=null&&u.startsWith("model")&&a(t(e.id),!0)}return(c,d)=>(i.openBlock(),i.createBlock(Kf,{is:"section",id:c.id,class:"section",onIntersecting:l},{default:i.withCtx(()=>[i.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["id"]))}}),ks=U(gR,[["__scopeId","data-v-0494f9f3"]]),yR={class:"section-accordion-button-content"},vR={key:0,class:"section-accordion-button-actions"},bR={key:0,class:"section-accordion-description"},wR={class:"section-accordion-content-card"},kR=i.defineComponent({__name:"SectionAccordion",props:{id:{},transparent:{type:Boolean}},setup(r){const e=i.ref(),t=Xe.useElementHover(e);return(n,o)=>(i.openBlock(),i.createBlock(Kf,{id:n.id,class:"section-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(Le.Disclosure),{as:"section",class:i.normalizeClass(["section-accordion",{"section-accordion-transparent":n.transparent}])},{default:i.withCtx(({open:s})=>[i.createVNode(i.unref(Le.DisclosureButton),{ref_key:"button",ref:e,class:"section-accordion-button"},{default:i.withCtx(()=>[i.createElementVNode("div",yR,[i.renderSlot(n.$slots,"title",{},void 0,!0)]),n.$slots.actions?(i.openBlock(),i.createElementBlock("div",vR,[i.renderSlot(n.$slots,"actions",{active:i.unref(t)||s},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:s?"ChevronDown":"ChevronRight"},null,8,["icon"])]),_:2},1536),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[n.$slots.description?(i.openBlock(),i.createElementBlock("div",bR,[i.renderSlot(n.$slots,"description",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",wR,[i.renderSlot(n.$slots,"default",{},void 0,!0)])]),_:3})]),_:3},8,["class"])]),_:3},8,["id"]))}}),tw=U(kR,[["__scopeId","data-v-07cabcb0"]]),SR={},xR={class:"section-column"};function CR(r,e){return i.openBlock(),i.createElementBlock("div",xR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Zo=U(SR,[["render",CR],["__scopeId","data-v-d64e7382"]]),ER={},$R={class:"section-columns"};function _R(r,e){return i.openBlock(),i.createElementBlock("div",$R,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Uf=U(ER,[["render",_R],["__scopeId","data-v-8b9602bf"]]),NR={},AR={class:"section-container"};function OR(r,e){return i.openBlock(),i.createElementBlock("div",AR,[i.renderSlot(r.$slots,"default",{},void 0,!0)])}const Xi=U(NR,[["render",OR],["__scopeId","data-v-34b26958"]]),TR={class:"section-accordion-wrapper"},BR={class:"section-accordion-title"},PR=i.defineComponent({__name:"SectionContainerAccordion",setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",TR,[i.createVNode(i.unref(Le.Disclosure),{as:"div",class:"section-accordion",defaultOpen:""},{default:i.withCtx(({open:n})=>[i.createVNode(i.unref(Le.DisclosureButton),{class:"section-accordion-button"},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{class:"section-accordion-chevron",icon:n?"ChevronDown":"ChevronRight"},null,8,["icon"]),i.createElementVNode("div",BR,[i.renderSlot(e.$slots,"title",{},void 0,!0)])]),_:2},1024),i.createVNode(i.unref(Le.DisclosurePanel),{class:"section-accordion-content"},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})]))}}),rw=U(PR,[["__scopeId","data-v-2049975e"]]),IR=i.defineComponent({__name:"LoadingSkeleton",props:{lines:{default:1}},setup(r){return(e,t)=>(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...Array(e.lines).keys()],n=>(i.openBlock(),i.createElementBlock("div",{key:n,class:i.normalizeClass(["loading",{"single-line":e.lines===1}])},null,2))),128))}}),nw=U(IR,[["__scopeId","data-v-c90b2c46"]]),MR={class:"section-content"},DR=i.defineComponent({__name:"SectionContent",props:{loading:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",MR,[e.loading?(i.openBlock(),i.createBlock(nw,{key:1,lines:8})):i.renderSlot(e.$slots,"default",{key:0},void 0,!0)]))}}),Ss=U(DR,[["__scopeId","data-v-9735459e"]]),VR=i.defineComponent({__name:"SectionHeader",props:{loading:{type:Boolean,default:!1},tight:{type:Boolean,default:!1},level:{default:1}},setup(r){return(e,t)=>e.loading?(i.openBlock(),i.createBlock(nw,{key:0})):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(`h${e.level}`),{key:1,class:i.normalizeClass(["section-header",{tight:e.tight}])},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),kn=U(VR,[["__scopeId","data-v-3bd1b9f0"]]),RR={key:0,class:"introduction-description"},LR=i.defineComponent({__name:"Description",props:{value:{}},setup(r){const e=r,n=`components-Content-Introduction-Description-sections${zu(e.value)}`,o=Xe.computedAsync(async()=>{if(!e.value)return[];const u=await ki(e.value),h=Xl(u);return await Promise.all(R1(e.value,h).map(async f=>({heading:(await ki(f))[0],content:f})))},ts[n]??[]),{getHeadingId:s,hash:a,isIntersectionEnabled:l,pathRouting:c}=lt();function d(u=""){if(!l.value)return;const h=new URL(window.location.href);c.value?h.pathname=c.value.basePath+"/"+u:h.hash=u,a.value=u,window.history.replaceState({},"",h)}return i.onServerPrefetch(async()=>{const u=i.useSSRContext();await kr(1),u.payload.data[n]=o.value}),(u,h)=>u.value?(i.openBlock(),i.createElementBlock("div",RR,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),(f,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:p},[f.heading?(i.openBlock(),i.createBlock(Kf,{key:0,id:i.unref(s)(f.heading),class:"introduction-description-heading",onIntersecting:()=>d(i.unref(s)(f.heading))},{default:i.withCtx(()=>[i.createVNode(i.unref($t),{value:f.content,withImages:""},null,8,["value"])]),_:2},1032,["id","onIntersecting"])):(i.openBlock(),i.createBlock(i.unref($t),{key:1,value:f.content,withImages:""},null,8,["value"]))],64))),128))])):i.createCommentVNode("",!0)}}),jR=U(LR,[["__scopeId","data-v-5e475391"]]),FR={class:"download"},qR={class:"download-cta"},zR=i.defineComponent({__name:"DownloadSpec",props:{specTitle:{}},setup(r){const e=r,t=i.inject(Lf),n=()=>{jf.emit({id:"",specTitle:e.specTitle})};return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",FR,[i.createElementVNode("div",qR,[(a=i.unref(t))!=null&&a()?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,class:"download-button",type:"button",onClick:n}," Download OpenAPI Spec "))])])}}}),HR=U(zR,[["__scopeId","data-v-810904a4"]]),KR={class:"badges"},UR={class:"sticky-cards"},WR=i.defineComponent({__name:"Introduction",props:{info:{},parsedSpec:{}},setup(r){const e=r,t=new Ai,n=i.computed(()=>e.parsedSpec.openapi??e.parsedSpec.swagger??""),o=i.computed(()=>t.slug(e.info.title??""));return(s,a)=>(i.openBlock(),i.createBlock(i.unref(Xi),null,{default:i.withCtx(()=>[i.createVNode(i.unref(ks),{class:"introduction-section"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),{loading:!s.info.description&&!s.info.title},{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createElementVNode("div",KR,[s.info.version?(i.openBlock(),i.createBlock(i.unref(Ni),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.version),1)]),_:1})):i.createCommentVNode("",!0),n.value?(i.openBlock(),i.createBlock(i.unref(Ni),{key:1},{default:i.withCtx(()=>[i.createTextVNode(" OAS "+i.toDisplayString(n.value),1)]),_:1})):i.createCommentVNode("",!0)]),i.createVNode(i.unref(kn),{level:1,loading:!s.info.title,tight:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.info.title),1)]),_:1},8,["loading"]),i.createVNode(HR,{specTitle:o.value},null,8,["specTitle"]),i.createVNode(jR,{value:s.info.description},null,8,["value"])]),_:1}),s.$slots.aside?(i.openBlock(),i.createBlock(i.unref(Zo),{key:0},{default:i.withCtx(()=>[i.createElementVNode("div",UR,[i.renderSlot(s.$slots,"aside",{},void 0,!0)])]),_:3})):i.createCommentVNode("",!0)]),_:3})]),_:3},8,["loading"]),i.renderSlot(s.$slots,"after",{},void 0,!0)]),_:3})]),_:3}))}}),GR=U(WR,[["__scopeId","data-v-30c2e131"]]),JR=Symbol(),ju=Xe.useEventBus(JR),Il=i.defineComponent({__name:"Lazy",props:{id:{},isLazy:{type:Boolean,default:!0},lazyTimeout:{default:0}},setup(r){const e=r,t=(o=()=>{})=>{typeof window>"u"||("requestIdleCallback"in window?setTimeout(()=>window.requestIdleCallback(o),e.lazyTimeout):setTimeout(()=>i.nextTick(o),e.lazyTimeout??300))},n=i.ref(!e.isLazy);return e.isLazy?t(()=>{n.value=!0,e.id&&i.nextTick(()=>ju.emit({id:e.id}))}):e.id&&i.nextTick(()=>ju.emit({id:e.id})),(o,s)=>n.value?i.renderSlot(o.$slots,"default",{key:0}):i.createCommentVNode("",!0)}}),YR={key:0,class:"screenreader-only"},XR=i.defineComponent({__name:"ScreenReader",props:{if:{type:Boolean,default:!0}},setup(r){return(e,t)=>e.$props.if?(i.openBlock(),i.createElementBlock("span",YR,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):i.renderSlot(e.$slots,"default",{key:1},void 0,!0)}}),ow=U(XR,[["__scopeId","data-v-681ebf2c"]]),QR=r=>(i.pushScopeId("data-v-d9801d4e"),r=r(),i.popScopeId(),r),ZR={class:"label"},e3={class:"anchor"},t3=QR(()=>i.createElementVNode("span",null,"",-1)),r3=i.defineComponent({__name:"Anchor",props:{id:{}},setup(r){const{copyToClipboard:e}=ws(),t=n=>{const o=new URL(window.location.href);return o.hash=n,o.toString()};return(n,o)=>(i.openBlock(),i.createElementBlock("span",ZR,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createElementVNode("span",e3,[t3,i.createElementVNode("button",{class:"anchor-copy",type:"button",onClick:o[0]||(o[0]=i.withModifiers(s=>i.unref(e)(t(n.id)),["stop"]))},[i.createTextVNode(" # "),i.createVNode(ow,null,{default:i.withCtx(()=>[i.createTextVNode('Copy link to "'),i.renderSlot(n.$slots,"default",{},void 0,!0),i.createTextVNode('"')]),_:3})])])]))}}),Sn=U(r3,[["__scopeId","data-v-d9801d4e"]]),n3=["value"],o3=["label"],s3=["value"],i3=["value"],Wf=i.defineComponent({__name:"TextSelect",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["text-select",e.options.length===1?"text-select--single-option":""])},[i.createElementVNode("span",null,[i.renderSlot(e.$slots,"default")]),i.createElementVNode("select",{value:e.modelValue,onInput:t[0]||(t[0]=n=>e.$emit("update:modelValue",n.target.value))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.value},[n.options?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:n.label},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.label),9,s3))),128))],8,o3)):(i.openBlock(),i.createElementBlock("option",{key:n.value,value:n.value},i.toDisplayString(n.label),9,i3))],64))),128))],40,n3)],2))}}),a3={class:"request-header"},l3=i.defineComponent({__name:"CustomRequestExamples",props:{operation:{},examples:{}},setup(r){const e=r,t=i.ref(0),n=i.computed(()=>({C:"c","C#":"csharp",Go:"go",HTML:"html",Java:"java",JavaScript:"javascript",Kotlin:"kotlin","Objective-C":"objc",PowerShell:"powershell",Python:"python",Ruby:"ruby",Shell:"shell",Swift:"swift",TypeScript:"javascript",cURL:"shell"})[e.examples[t.value].lang]??e.examples[t.value].lang),o=i.computed(()=>e.examples[t.value]);i.watch(e.examples,()=>{e.examples[t.value]==="undefined"&&(t.value=0)});const{copyToClipboard:s}=ws();return(a,l)=>(i.openBlock(),i.createBlock(i.unref(bn),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Wf,{class:"request-client-picker",modelValue:t.value,options:a.examples.map((c,d)=>({value:d.toString(),label:c.label})),"onUpdate:modelValue":l[0]||(l[0]=c=>(t.value=parseInt(c),10))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.value.label),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:l[1]||(l[1]=c=>i.unref(s)(o.value.source.trim()))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",a3,[i.createVNode(i.unref(no),{class:"request-method",method:a.operation.httpVerb},null,8,["method"]),i.renderSlot(a.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(er),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createVNode(i.unref(Nr),{content:o.value.source.trim(),lang:n.value,lineNumbers:""},null,8,["content","lang"])]),_:1}),a.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"scalar-card-footer",contrast:""},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"footer",{},void 0,!0)]),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),c3=U(l3,[["__scopeId","data-v-18ba624d"]]),d3={class:"schema-type"},u3=["title"],h3=i.defineComponent({__name:"SchemaHeading",props:{value:{},name:{}},setup(r){return(e,t)=>{var n,o,s,a,l,c;return i.openBlock(),i.createElementBlock("span",d3,[i.createElementVNode("span",{class:"schema-type-icon",title:typeof e.value.type=="string"?e.value.type:Array.isArray(e.value.type)?e.value.type.join(" | "):"unkown type"},[e.value.type==="object"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" {} ")],64)):i.createCommentVNode("",!0),e.value.type==="array"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" [] ")],64)):i.createCommentVNode("",!0),e.value.enum?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" enum ")],64)):i.createCommentVNode("",!0)],8,u3),(o=(n=e.value)==null?void 0:n.xml)!=null&&o.name&&((a=(s=e.value)==null?void 0:s.xml)==null?void 0:a.name)!=="##default"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(" <"+i.toDisplayString((c=(l=e.value)==null?void 0:l.xml)==null?void 0:c.name)+" /> ",1)],64)):e.name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(e.name),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(e.value.type),1)],64))])}}}),sw=U(h3,[["__scopeId","data-v-6c5c3c96"]]),f3={key:0,class:"property-detail-prefix"},p3={key:1,class:"property-detail-value"},m3={key:2,class:"property-detail-value"},g3=i.defineComponent({__name:"SchemaPropertyDetail",props:{truncate:{type:Boolean},code:{type:Boolean}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["property-detail",{"property-detail-truncate":e.truncate}])},[e.$slots.prefix?(i.openBlock(),i.createElementBlock("div",f3,[i.renderSlot(e.$slots,"prefix",{},void 0,!0),i.createTextVNode(" ")])):i.createCommentVNode("",!0),e.code?(i.openBlock(),i.createElementBlock("code",p3,[i.renderSlot(e.$slots,"default",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("span",m3,[i.renderSlot(e.$slots,"default",{},void 0,!0)]))],2))}}),qt=U(g3,[["__scopeId","data-v-16d94ef5"]]),y3={class:"property-heading"},v3={key:0,class:"property-name"},b3={key:1,class:"property-additional"},w3={key:2,class:"property-deprecated"},k3={key:3,class:"property-required"},S3={key:4,class:"property-details"},x3={key:5,class:"property-write-only"},C3={key:6,class:"property-read-only"},E3=i.defineComponent({__name:"SchemaPropertyHeading",props:{value:{},enum:{type:Boolean},required:{type:Boolean,default:!1},additional:{type:Boolean}},setup(r){const e=["oneOf","anyOf","allOf","not"];return(t,n)=>{var o,s,a,l;return i.openBlock(),i.createElementBlock("div",y3,[t.$slots.name?(i.openBlock(),i.createElementBlock("div",v3,[i.renderSlot(t.$slots,"name",{},void 0,!0)])):i.createCommentVNode("",!0),t.additional?(i.openBlock(),i.createElementBlock("div",b3," additional properties ")):i.createCommentVNode("",!0),(o=t.value)!=null&&o.deprecated?(i.openBlock(),i.createElementBlock("div",w3,[i.createVNode(i.unref(Ni),null,{default:i.withCtx(()=>[i.createTextVNode("deprecated")]),_:1})])):i.createCommentVNode("",!0),t.required?(i.openBlock(),i.createElementBlock("div",k3," required ")):i.createCommentVNode("",!0),(s=t.value)!=null&&s.type?(i.openBlock(),i.createElementBlock("div",S3,[t.additional?(i.openBlock(),i.createBlock(qt,{key:0},{prefix:i.withCtx(()=>[i.createTextVNode("key:")]),default:i.withCtx(()=>[i.createTextVNode(" string ")]),_:1})):i.createCommentVNode("",!0),i.createVNode(qt,null,i.createSlots({default:i.withCtx(()=>{var c,d,u;return[(d=(c=t.value)==null?void 0:c.items)!=null&&d.type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(t.value.type)+" "+i.toDisplayString(t.value.items.type)+"[] ",1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(Array.isArray(t.value.type)?t.value.type.join(" | "):t.value.type)+" "+i.toDisplayString((u=t.value)!=null&&u.nullable?" | nullable":""),1)],64)),t.value.minItems||t.value.maxItems?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(i.toDisplayString(t.value.minItems)+"…"+i.toDisplayString(t.value.maxItems),1)],64)):i.createCommentVNode("",!0)]}),_:2},[t.additional?{name:"prefix",fn:i.withCtx(()=>[i.createTextVNode("value:")]),key:"0"}:void 0]),1024),t.value.minLength?(i.openBlock(),i.createBlock(qt,{key:1},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.maxLength?(i.openBlock(),i.createBlock(qt,{key:2},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maxLength),1)]),_:1})):i.createCommentVNode("",!0),t.value.uniqueItems?(i.openBlock(),i.createBlock(qt,{key:3},{default:i.withCtx(()=>[i.createTextVNode(" unique! ")]),_:1})):i.createCommentVNode("",!0),t.value.format?(i.openBlock(),i.createBlock(qt,{key:4},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.format),1)]),_:1})):i.createCommentVNode("",!0),t.value.minimum?(i.openBlock(),i.createBlock(qt,{key:5},{prefix:i.withCtx(()=>[i.createTextVNode("min:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.minimum),1)]),_:1})):i.createCommentVNode("",!0),t.value.maximum?(i.openBlock(),i.createBlock(qt,{key:6},{prefix:i.withCtx(()=>[i.createTextVNode("max:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.maximum),1)]),_:1})):i.createCommentVNode("",!0),t.value.pattern?(i.openBlock(),i.createBlock(qt,{key:7,code:"",truncate:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.value.pattern),1)]),_:1})):i.createCommentVNode("",!0),t.$props.enum?(i.openBlock(),i.createBlock(qt,{key:8},{default:i.withCtx(()=>[i.createTextVNode("enum")]),_:1})):i.createCommentVNode("",!0),t.value.default?(i.openBlock(),i.createBlock(qt,{key:9,truncate:""},{prefix:i.withCtx(()=>[i.createTextVNode("default:")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(t.value.default),1)]),_:1})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),(a=t.value)!=null&&a.writeOnly?(i.openBlock(),i.createElementBlock("div",x3," write-only ")):(l=t.value)!=null&&l.readOnly?(i.openBlock(),i.createElementBlock("div",C3," read-only ")):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.filter(c=>{var d,u,h;return((d=t.value)==null?void 0:d[c])||((h=(u=t.value)==null?void 0:u.items)==null?void 0:h[c])}),c=>(i.openBlock(),i.createBlock(i.unref(Ni),{key:c},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c),1)]),_:2},1024))),128))])}}}),$3=U(E3,[["__scopeId","data-v-0b4351f0"]]),_3=r=>(i.pushScopeId("data-v-ca3c524d"),r=r(),i.popScopeId(),r),N3={key:0,class:"property-description"},A3={key:1,class:"property-description"},O3={key:2,class:"property-example custom-scroll"},T3=_3(()=>i.createElementVNode("span",{class:"property-example-label"},"Example",-1)),B3={class:"property-example-value"},P3={key:3,class:"property-enum"},I3={class:"property-enum-values"},M3={key:4,class:"children"},D3={key:0,class:"children"},V3={key:0,class:"property-rule"},R3={key:1,class:"property-rule"},L3=i.defineComponent({__name:"SchemaProperty",props:{value:{},level:{default:0},name:{},required:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},description:{},additional:{type:Boolean}},setup(r){const e={integer:{_default:"Integer numbers.",int32:"Signed 32-bit integers (commonly used integer type).",int64:"Signed 64-bit integers (long type)."},string:{date:"full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21","date-time":"the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z",password:"a hint to UIs to mask the input",byte:"base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",binary:"binary data, used to describe files"}},t=function(a,l){return l!=null&&l.properties||l!=null&&l.additionalProperties?null:a||(l==null?void 0:l.description)||null},n=function(a){return!a||!e[a.type]?null:e[a.type][a.format||"_default"]},o=function(a){var l;return(a==null?void 0:a.enum)||((l=a==null?void 0:a.items)==null?void 0:l.enum)||null},s=["oneOf","anyOf","allOf","not"];return(a,l)=>{var c,d,u,h,f,p,m,g,y;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["property",[`property--level-${a.level}`,{"property--compact":a.compact,"property--deprecated":(c=a.value)==null?void 0:c.deprecated}]])},[i.createVNode($3,{additional:a.additional,enum:!!o(a.value),required:a.required,value:a.value},i.createSlots({_:2},[a.name?{name:"name",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.name),1)]),key:"0"}:void 0]),1032,["additional","enum","required","value"]),t(a.description,a.value)?(i.openBlock(),i.createElementBlock("div",N3,[i.createVNode(i.unref($t),{value:t(a.description,a.value)},null,8,["value"])])):n(a.value)?(i.openBlock(),i.createElementBlock("div",A3,[i.createVNode(i.unref($t),{value:n(a.value)||""},null,8,["value"])])):i.createCommentVNode("",!0),(d=a.value)!=null&&d.example||(h=(u=a.value)==null?void 0:u.items)!=null&&h.example?(i.openBlock(),i.createElementBlock("div",O3,[T3,i.createElementVNode("code",B3,i.toDisplayString(a.value.example||((f=a.value)==null?void 0:f.items.example)),1)])):i.createCommentVNode("",!0),o(a.value)?(i.openBlock(),i.createElementBlock("div",P3,[i.createElementVNode("ul",I3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o(a.value),v=>(i.openBlock(),i.createElementBlock("li",{key:v,class:"property-enum-value"},i.toDisplayString(v),1))),128))])])):i.createCommentVNode("",!0),((p=a.value)==null?void 0:p.type)==="object"&&((m=a.value)!=null&&m.properties||(g=a.value)!=null&&g.additionalProperties)?(i.openBlock(),i.createElementBlock("div",M3,[i.createVNode(Hn,{compact:a.compact,level:a.level+1,value:a.value},null,8,["compact","level","value"])])):i.createCommentVNode("",!0),(y=a.value)!=null&&y.items?(i.openBlock(),i.createElementBlock(i.Fragment,{key:5},[["object"].includes(a.value.items.type)?(i.openBlock(),i.createElementBlock("div",D3,[i.createVNode(Hn,{compact:a.compact,level:a.level+1,value:a.value.items},null,8,["compact","level","value"])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,v=>{var b,w,S;return i.openBlock(),i.createElementBlock(i.Fragment,{key:v},[(b=a.value)!=null&&b[v]?(i.openBlock(),i.createElementBlock("div",V3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value[v],(x,k)=>(i.openBlock(),i.createBlock(Hn,{key:k,compact:a.compact,level:a.level+1,value:x},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0),(S=(w=a.value)==null?void 0:w.items)!=null&&S[v]&&a.level<3?(i.openBlock(),i.createElementBlock("div",R3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.items[v],(x,k)=>(i.openBlock(),i.createBlock(Hn,{key:k,compact:a.compact,level:a.level+1,value:x},null,8,["compact","level","value"]))),128))])):i.createCommentVNode("",!0)],64)}),64))],2)}}}),zn=U(L3,[["__scopeId","data-v-ca3c524d"]]),j3=r=>(i.pushScopeId("data-v-7f5d0941"),r=r(),i.popScopeId(),r),F3={key:0,class:"schema-card-description"},q3=j3(()=>i.createElementVNode("polygon",{"fill-rule":"nonzero",points:"14 8 8 8 8 14 6 14 6 8 0 8 0 6 6 6 6 0 8 0 8 6 14 6"},null,-1)),z3=[q3],H3=i.defineComponent({__name:"Schema",props:{value:{},level:{default:0},name:{},compact:{type:Boolean},noncollapsible:{type:Boolean}},setup(r){const e=r,t=i.computed(()=>!(e.noncollapsible||e.level===0)),n=o=>e.noncollapsible&&o.stopPropagation();return(o,s)=>typeof o.value=="object"&&Object.keys(o.value).length?(i.openBlock(),i.createBlock(i.unref(Le.Disclosure),{key:0,defaultOpen:o.noncollapsible},{default:i.withCtx(({open:a})=>{var l;return[i.createElementVNode("div",{class:i.normalizeClass(["schema-card",[`schema-card--level-${o.level}`,{"schema-card--compact":o.compact,"schema-card--open":a}]])},[(l=o.value)!=null&&l.description?(i.openBlock(),i.createElementBlock("div",F3,[i.createVNode(i.unref($t),{value:o.value.description},null,8,["value"])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["schema-properties",{"schema-properties-open":a}])},[i.withDirectives(i.createVNode(i.unref(Le.DisclosureButton),{as:o.noncollapsible?"div":"button",class:i.normalizeClass(["schema-card-title",{"schema-card-title--compact":o.compact}]),style:i.normalizeStyle({top:`calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${o.level}))`}),onClickCapture:n},{default:i.withCtx(()=>{var c,d,u;return[o.compact?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.value?(i.openBlock(),i.createElementBlock("svg",{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),fill:"currentColor",height:"14",viewBox:"0 0 14 14",width:"14",xmlns:"http://www.w3.org/2000/svg"},z3,2)):i.createCommentVNode("",!0),a?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Hide "+i.toDisplayString(((c=o.value)==null?void 0:c.title)??"Child Attributes"),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[i.createTextVNode(" Show "+i.toDisplayString(((d=o.value)==null?void 0:d.title)??"Child Attributes"),1)],64))],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[t.value?(i.openBlock(),i.createBlock(i.unref(Me),{key:0,class:i.normalizeClass(["schema-card-title-icon",{"schema-card-title-icon--open":a}]),icon:"ChevronRight",size:"md"},null,8,["class"])):i.createCommentVNode("",!0),i.createVNode(sw,{name:((u=o.value)==null?void 0:u.title)??o.name,value:o.value},null,8,["name","value"])],64))]}),_:2},1032,["as","class","style"]),[[i.vShow,!(o.noncollapsible&&o.compact)]]),i.createVNode(i.unref(Le.DisclosurePanel),{static:o.noncollapsible},{default:i.withCtx(()=>{var c;return[o.value.properties||o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[o.value.properties?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(Object.keys((c=o.value)==null?void 0:c.properties),d=>{var u;return i.openBlock(),i.createBlock(zn,{key:d,compact:o.compact,level:o.level,name:d,required:o.value.required&&o.value.required.length&&o.value.required.includes(d),value:(u=o.value.properties)==null?void 0:u[d]},null,8,["compact","level","name","required","value"])}),128)):i.createCommentVNode("",!0),o.value.additionalProperties?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[o.value.additionalProperties===!0||Object.keys(o.value.additionalProperties).length===0||!o.value.additionalProperties.type?(i.openBlock(),i.createBlock(zn,{key:0,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:{type:"any",...o.value.additionalProperties}},null,8,["compact","level","value"])):(i.openBlock(),i.createBlock(zn,{key:1,additional:"",compact:o.compact,level:o.level,noncollapsible:"",value:o.value.additionalProperties},null,8,["compact","level","value"]))],64)):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(zn,{key:1,compact:o.compact,level:o.level,name:o.value.name,value:o.value},null,8,["compact","level","name","value"]))]}),_:1},8,["static"])],2)],2)]}),_:1},8,["defaultOpen"])):i.createCommentVNode("",!0)}}),Hn=U(H3,[["__scopeId","data-v-7f5d0941"]]),K3={class:"parameter-item"},U3={class:"parameter-item-container"},W3=i.defineComponent({__name:"ParameterItem",props:{parameter:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("li",K3,[i.createElementVNode("div",U3,[i.createVNode(i.unref(zn),{compact:"",description:e.parameter.description,level:0,name:e.parameter.name,noncollapsible:e.showChildren,required:e.parameter.required,value:e.parameter.schema},null,8,["description","name","noncollapsible","required","value"])])]))}}),G3=U(W3,[["__scopeId","data-v-f70ee55c"]]),J3={key:0,class:"parameters"},Y3={class:"parameters-title"},X3={class:"parameter-list"},Q3=i.defineComponent({__name:"Parameters",props:{parameters:{},showChildren:{type:Boolean,default:!1}},setup(r){return(e,t)=>{var n;return(n=e.parameters)!=null&&n.length?(i.openBlock(),i.createElementBlock("div",J3,[i.createElementVNode("div",Y3,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("ul",X3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.parameters,o=>(i.openBlock(),i.createBlock(G3,{key:o.name,parameter:o,showChildren:e.showChildren},null,8,["parameter","showChildren"]))),128))])])):i.createCommentVNode("",!0)}}}),Ut=U(Q3,[["__scopeId","data-v-45fca787"]]),Z3={key:0},eL={class:"request-body-title"},tL=["value"],rL={key:0,class:"request-body-description"},nL={key:0,class:"request-body-schema"},oL=i.defineComponent({__name:"RequestBody",props:{requestBody:{}},setup(r){var o;const e=r,t=i.computed(()=>{var s;return(s=e.requestBody)!=null&&s.content?Object.keys(e.requestBody.content):[]}),n=i.ref("application/json");return(o=e.requestBody)!=null&&o.content&&t.value.length>0&&(n.value=t.value[0]),(s,a)=>{var l,c,d,u;return e!=null&&e.requestBody?(i.openBlock(),i.createElementBlock("div",Z3,[i.createElementVNode("div",eL,[i.renderSlot(s.$slots,"title",{},void 0,!0),i.createElementVNode("div",{class:i.normalizeClass(["request-body-title-select",{"request-body-title-no-select":t.value.length<=1}])},[i.createElementVNode("span",null,i.toDisplayString(n.value),1),e!=null&&e.requestBody&&t.value.length>1?i.withDirectives((i.openBlock(),i.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=h=>n.value=h)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((l=e.requestBody)==null?void 0:l.content,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:f},i.toDisplayString(f),9,tL))),128))],512)),[[i.vModelSelect,n.value]]):i.createCommentVNode("",!0)],2),e!=null&&e.requestBody.description?(i.openBlock(),i.createElementBlock("div",rL,[i.createVNode(i.unref($t),{value:e.requestBody.description},null,8,["value"])])):i.createCommentVNode("",!0)]),(c=e==null?void 0:e.requestBody.content)!=null&&c[n.value]?(i.openBlock(),i.createElementBlock("div",nL,[i.createVNode(i.unref(Hn),{compact:"",noncollapsible:"",value:(u=(d=e==null?void 0:e.requestBody.content)==null?void 0:d[n.value])==null?void 0:u.schema},null,8,["value"])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)}}}),Gf=U(oL,[["__scopeId","data-v-e095eb63"]]),sL={class:"endpoint-details"},iL={class:"endpoint-description"},aL=i.defineComponent({__name:"EndpointDetails",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=qf(e),{responses:n}=zf(e.operation);return(o,s)=>{var a,l;return i.openBlock(),i.createElementBlock("div",sL,[i.createElementVNode("div",iL,[i.createVNode(i.unref($t),{value:o.operation.description,withImages:""},null,8,["value"])]),i.createVNode(Ut,{parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).body,showChildren:""},{title:i.withCtx(()=>[i.createTextVNode("Body Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{parameters:i.unref(t).formData},{title:i.withCtx(()=>[i.createTextVNode("Form Data")]),_:1},8,["parameters"]),(a=o.operation.information)!=null&&a.requestBody?(i.openBlock(),i.createBlock(Gf,{key:0,requestBody:(l=o.operation.information)==null?void 0:l.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"])):i.createCommentVNode("",!0),i.createVNode(Ut,{parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),lL={key:0},cL=i.defineComponent({__name:"EndpointPath",props:{path:{},deprecated:{type:Boolean}},setup(r){const e=r,t=o=>o.startsWith("{")&&o.endsWith("}"),n=i.computed(()=>e.path.split(/({[^}]+})/));return(o,s)=>(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(["endpoint-path",{deprecated:o.deprecated}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(a,l)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:l},[t(a)?(i.openBlock(),i.createElementBlock("em",lL,i.toDisplayString(a),1)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(a),1)],64))],64))),128))],2))}}),Fu=U(cL,[["__scopeId","data-v-a4eadd9b"]]);function Qi(r){return r.reduce((e,t)=>(e[t.name]=t.value,e),{})}function dL(r){return/\s|-/.test(r)}function Sr(r,e=0){let t=[],n=" ".repeat(e),o=" ".repeat(e+2);for(const[s,a]of Object.entries(r)){let l=dL(s)?`'${s}'`:s;if(Array.isArray(a)){const c=a.map(d=>typeof d=="string"?`'${d}'`:d&&typeof d=="object"?Sr(d,e+2):d).join(`, ${o}`);t.push(`${o}${l}: [${c}]`)}else if(a&&typeof a=="object")t.push(`${o}${l}: ${Sr(a,e+2)}`);else if(typeof a=="string"){let c=`${a}`;if(a.startsWith("JSON.stringify")){const d=a.split(`
|
|
220
220
|
`);d.length>1&&(c=d.map((u,h)=>h===0?u:`${o}${u}`).join(`
|
|
221
221
|
`))}else c=`'${a}'`;t.push(`${o}${l}: ${c}`)}else t.push(`${o}${l}: ${a}`)}return`{
|
|
222
222
|
${t.join(`,
|
|
223
223
|
`)}
|
|
224
224
|
${n}}`}function uL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${Sr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"node",client:"undici",code:`import { request } from 'undici'
|
|
225
225
|
|
|
226
|
-
const { statusCode, body } = await request('${n.url}${a}'${l})`}}function hL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${Sr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"node",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function fL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${Sr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"js",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function pL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"js",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function mL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"node",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function Hg(){const r=[uL,hL,fL,pL,mL];return{get(e,t,n){const o=this.findPlugin(e,t);if(o)return o(n)},print(e,t,n){var o;return(o=this.get(e,t,n))==null?void 0:o.code},targets(){return r.map(e=>e().target).filter((e,t,n)=>n.indexOf(e)===t)},clients(){return r.map(e=>e().client)},plugins(){return r.map(e=>{const t=e();return{target:t.target,client:t.client}})},findPlugin(e,t){return r.find(n=>{const o=n();return o.target===e&&o.client===t})},hasPlugin(e,t){return!!this.findPlugin(e,t)}}}const gL=i.defineComponent({__name:"ExamplePicker",props:{examples:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(Object.keys(t.examples)[0]);function s(l){l&&(o.value=l)}i.watch(()=>t.examples,()=>{s(Object.keys(t.examples)[0])},{immediate:!0}),i.watch(o,()=>{o.value&&n("update:modelValue",o.value)},{immediate:!0});function a(l){if(!l)return"Select an example";const c=t.examples[l];return(c==null?void 0:c.summary)??l}return(l,c)=>(i.openBlock(),i.createBlock(Wf,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),class:"example-selector",options:Object.keys(l.examples).map(d=>({label:a(d),value:d}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a(o.value)),1)]),_:1},8,["modelValue","options"]))}}),iw=U(gL,[["__scopeId","data-v-652a7e14"]]),yL={class:"request-header"},vL={class:"code-snippet"},bL={key:0,class:"request-card-footer-addon"},wL=i.defineComponent({__name:"ExampleRequest",props:{operation:{}},setup(r){const e=r,n=`components-Content-Operation-Example-Request${zu(e.operation.path+e.operation.httpVerb+e.operation.operationId)}`,o=i.ref(ts[n]??""),s=i.ref(),{copyToClipboard:a}=ws(),{httpClient:l,setHttpClient:c,httpTargetTitle:d,httpClientTitle:u}=Bc(),{availableTargets:h}=Ji(),{server:f}=ss(),{authentication:p}=rs(),m=i.computed(()=>{var v,b,w,S,x,k,C;return((S=(w=(b=(v=e.operation.information)==null?void 0:v.requestBody)==null?void 0:b.content)==null?void 0:w["application/json"])==null?void 0:S.examples)&&Object.keys((C=(k=(x=e.operation.information)==null?void 0:x.requestBody)==null?void 0:k.content)==null?void 0:C["application/json"].examples).length>1}),g=i.inject(Tc),y=async()=>{var b;const v=d0({url:wl(f)},Cd(e.operation,{replaceVariables:!0},s.value),vh(p,((b=e.operation.information)==null?void 0:b.security)??(g==null?void 0:g())));try{return Hg().hasPlugin(l.targetKey.replace("javascript","js"),l.clientKey)?Hg().print(l.targetKey.replace("javascript","js"),l.clientKey,v)??"":await new Gg.HTTPSnippet(v).convert(l.targetKey,l.clientKey)}catch(w){return console.error("[ExampleRequest]",w),""}};return i.watch([()=>l,()=>f,()=>p,()=>s],async()=>{o.value=await y()},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const v=i.useSSRContext();await kr(1),v.payload.data[n]=o.value}),i.computed(()=>_h({serverState:f,authenticationState:p,operation:e.operation,globalSecurity:g==null?void 0:g()})),(v,b)=>(i.openBlock(),i.createBlock(i.unref(bn),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Wf,{class:"request-client-picker",modelValue:JSON.stringify(i.unref(l)),options:i.unref(h).map(w=>({value:w.key,label:w.title,options:w.clients.map(S=>({value:JSON.stringify({targetKey:w.key,clientKey:S.key}),label:S.title}))})),"onUpdate:modelValue":b[0]||(b[0]=w=>i.unref(c)(JSON.parse(w)))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d))+" "+i.toDisplayString(i.unref(u)),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:b[1]||(b[1]=w=>i.unref(a)(o.value))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",yL,[i.createVNode(i.unref(no),{as:"span",class:"request-method",method:v.operation.httpVerb},null,8,["method"]),i.renderSlot(v.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(er),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createElementVNode("div",vL,[i.createVNode(i.unref(Nr),{content:o.value,hideCredentials:i.unref(dv)(i.unref(p)),lang:i.unref(l).targetKey,lineNumbers:""},null,8,["content","hideCredentials","lang"])])]),_:1}),m.value||v.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"request-card-footer",contrast:""},{default:i.withCtx(()=>{var w,S,x,k;return[m.value?(i.openBlock(),i.createElementBlock("div",bL,[i.createVNode(iw,{class:"request-example-selector",examples:((k=(x=(S=(w=v.operation.information)==null?void 0:w.requestBody)==null?void 0:S.content)==null?void 0:x["application/json"])==null?void 0:k.examples)??[],"onUpdate:modelValue":b[2]||(b[2]=C=>s.value=C)},null,8,["examples"])])):i.createCommentVNode("",!0),i.renderSlot(v.$slots,"footer",{},void 0,!0)]}),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),aw=U(wL,[["__scopeId","data-v-317d5c87"]]),kL={key:0},SL={key:1},xL={key:0,class:"rule"},CL={class:"rule-title"},EL={class:"rule-items"},$L={key:2,class:"empty-state"},_L=i.defineComponent({__name:"ExampleResponse",props:{response:{}},setup(r){const e=["oneOf","anyOf","not"],t=n=>n.reduce((o,s)=>({...o,...s}),{});return(n,o)=>{var s,a,l,c,d,u,h;return(s=n.response)!=null&&s.example?(i.openBlock(),i.createElementBlock("div",kL,[i.createVNode(i.unref(Nr),{content:i.unref(ol)((a=n.response)==null?void 0:a.example),lang:"json"},null,8,["content"])])):(l=n.response)!=null&&l.schema?(i.openBlock(),i.createElementBlock("div",SL,[(c=n.response)!=null&&c.schema.type?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:i.unref(ol)(i.unref(Ke)((d=n.response)==null?void 0:d.schema,{emptyString:"…",mode:"read"})),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(e,f=>{var p,m,g,y,v,b;return i.openBlock(),i.createElementBlock(i.Fragment,{key:f},[(p=n.response)!=null&&p.schema[f]&&(((m=n.response)==null?void 0:m.schema[f].length)>1||f==="not")?(i.openBlock(),i.createElementBlock("div",xL,[i.createElementVNode("div",CL,i.toDisplayString(f),1),i.createElementVNode("ol",EL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((g=n.response)==null?void 0:g.schema[f],(w,S)=>(i.openBlock(),i.createElementBlock("li",{key:S,class:"rule-item"},[i.createVNode(i.unref(Nr),{content:i.unref(Ke)(w,{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])]))),128))])])):(y=n.response)!=null&&y.schema[f]&&((v=n.response)==null?void 0:v.schema[f].length)===1?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:i.unref(Ke)((b=n.response)==null?void 0:b.schema[f][0],{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)],64)}),64)),(u=n.response)!=null&&u.schema.allOf?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:t((h=n.response)==null?void 0:h.schema.allOf.map(f=>i.unref(Ke)(f,{emptyString:"…",mode:"read"}))),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",$L," No Body "))}}}),Kg=U(_L,[["__scopeId","data-v-800e8c7d"]]),NL=r=>(i.pushScopeId("data-v-469e6333"),r=r(),i.popScopeId(),r),AL={key:1,class:"scalar-card-checkbox"},OL=NL(()=>i.createElementVNode("span",{class:"scalar-card-checkbox-checkmark"},null,-1)),TL={class:"scalar-card-container custom-scroll"},BL={key:1,class:"response-description"},PL=i.defineComponent({__name:"PathResponses",props:{operation:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.ref(),o=i.computed(()=>{var f,p;return Object.keys(((p=(f=e==null?void 0:e.operation)==null?void 0:f.information)==null?void 0:p.responses)??{}).sort(m=>m==="default"?-1:0)}),s=i.computed(()=>!!c.value.examples),a=i.ref(0),l=i.computed(()=>{var p,m;const f=o.value[a.value];return(m=(p=e.operation.information)==null?void 0:p.responses)==null?void 0:m[f]}),c=i.computed(()=>{var p;const f=u0((p=l.value)==null?void 0:p.content);return(f==null?void 0:f["application/json"])??l.value}),d=i.computed(()=>({...c.value,example:s.value&&n.value?c.value.examples[n.value].value??c.value.examples[n.value]:c.value.example})),u=f=>{a.value=f},h=i.ref(!1);return(f,p)=>o.value.length?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>{var m;return[i.createVNode(i.unref(Q1),{muted:"",x:"as",onChange:u},{actions:i.withCtx(()=>{var g,y;return[(g=c.value)!=null&&g.example?(i.openBlock(),i.createElementBlock("button",{key:0,class:"code-copy",type:"button",onClick:p[0]||(p[0]=()=>{var v;return i.unref(t)((v=c.value)==null?void 0:v.example)})},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px",x:"asd"})])):i.createCommentVNode("",!0),(y=c.value)!=null&&y.schema?(i.openBlock(),i.createElementBlock("label",AL,[i.createTextVNode(" Show Schema "),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=v=>h.value=v),class:"scalar-card-checkbox-input",type:"checkbox"},null,512),[[i.vModelCheckbox,h.value]]),OL])):i.createCommentVNode("",!0)]}),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,g=>(i.openBlock(),i.createBlock(i.unref(Z1),{key:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g),1)]),_:2},1024))),128))]),_:1}),i.createElementVNode("div",TL,[i.createVNode(i.unref(er),{muted:""},{default:i.withCtx(()=>{var g;return[(g=c.value)!=null&&g.schema?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[h.value&&d.value?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:d.value,lang:"json"},null,8,["content"])):(i.openBlock(),i.createBlock(Kg,{key:1,response:d.value},null,8,["response"]))],64)):(i.openBlock(),i.createBlock(Kg,{key:1,response:d.value},null,8,["response"]))]}),_:1})]),(m=l.value)!=null&&m.description||s.value?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"response-card-footer",muted:""},{default:i.withCtx(()=>{var g,y;return[s.value?(i.openBlock(),i.createBlock(iw,{key:0,class:"response-example-selector",examples:(g=c.value)==null?void 0:g.examples,"onUpdate:modelValue":p[2]||(p[2]=v=>n.value=v)},null,8,["examples"])):(y=l.value)!=null&&y.description?(i.openBlock(),i.createElementBlock("div",BL,[i.createVNode(i.unref($t),{class:"markdown",value:l.value.description},null,8,["value"])])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)}}),lw=U(PL,[["__scopeId","data-v-469e6333"]]),IL=r=>(i.pushScopeId("data-v-f44e2b65"),r=r(),i.popScopeId(),r),ML=IL(()=>i.createElementVNode("span",null,"Test Request",-1)),DL=i.defineComponent({__name:"TryRequestButton",props:{operation:{}},setup(r){const e=i.inject(Tc);return(t,n)=>(i.openBlock(),i.createBlock(i.unref(no),{as:"button",class:"show-api-client-button",method:t.operation.httpVerb,type:"button",onClick:n[0]||(n[0]=i.withModifiers(o=>{var s;return i.unref(kl)(t.operation,(s=i.unref(e))==null?void 0:s())},["stop"]))},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{icon:"PaperAirplane"}),ML]),_:1},8,["method"]))}}),qu=U(DL,[["__scopeId","data-v-f44e2b65"]]),VL={class:"examples"},RL=i.defineComponent({__name:"Operation",props:{id:{},operation:{}},setup(r){const e=r,t=i.computed(()=>{var o;const n=["x-custom-examples","x-codeSamples","x-code-samples"];for(const s of n)if((o=e.operation.information)!=null&&o[s])return e.operation.information[s];return null});return(n,o)=>(i.openBlock(),i.createBlock(i.unref(ks),{id:n.id,label:n.operation.name},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>{var s,a;return[(s=n.operation.information)!=null&&s.deprecated?(i.openBlock(),i.createBlock(i.unref(Ni),{key:0},{default:i.withCtx(()=>[i.createTextVNode(" Deprecated ")]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass((a=n.operation.information)!=null&&a.deprecated?"deprecated":"")},[i.createVNode(i.unref(kn),{level:3},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:n.id??""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.operation.name),1)]),_:1},8,["id"])]),_:1})],2),i.createVNode(aL,{operation:n.operation},null,8,["operation"])]}),_:1}),i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createElementVNode("div",VL,[t.value?(i.openBlock(),i.createBlock(c3,{key:0,examples:t.value,operation:n.operation},{header:i.withCtx(()=>{var s;return[i.createVNode(Fu,{class:"example-path",deprecated:(s=n.operation.information)==null?void 0:s.deprecated,path:n.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(qu,{operation:n.operation},null,8,["operation"])]),_:1},8,["examples","operation"])):(i.openBlock(),i.createBlock(aw,{key:1,operation:n.operation},{header:i.withCtx(()=>{var s;return[i.createVNode(Fu,{class:"example-path",deprecated:(s=n.operation.information)==null?void 0:s.deprecated,path:n.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(qu,{operation:n.operation},null,8,["operation"])]),_:1},8,["operation"])),i.createVNode(i.unref(lw),{operation:n.operation,style:{"margin-top":"12px"}},null,8,["operation"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),cw=U(RL,[["__scopeId","data-v-9cd31f5d"]]),LL={class:"endpoint-details-card"},jL=i.defineComponent({__name:"EndpointDetailsCard",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=qf(e),{responses:n}=zf(e.operation);return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",LL,[i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Gf,{class:"endpoint-details-card-item",requestBody:(a=o.operation.information)==null?void 0:a.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),FL=U(jL,[["__scopeId","data-v-f94bee14"]]),qL={class:"endpoint-header"},zL={class:"endpoint-details"},HL={class:"endpoint-label"},KL={class:"endpoint-label-path"},UL={class:"endpoint-label-name"},WL={class:"endpoint-content"},GL=i.defineComponent({__name:"OperationAccordion",props:{id:{},operation:{}},setup(r){const{copyToClipboard:e}=ws();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(tw),{id:t.id,class:"reference-endpoint",transparent:""},i.createSlots({title:i.withCtx(()=>[i.createElementVNode("h3",qL,[i.createElementVNode("div",zL,[i.createVNode(i.unref(no),{class:"endpoint-type",method:t.operation.httpVerb,short:""},null,8,["method"]),i.createVNode(i.unref(Sn),{id:t.id??"",class:"endpoint-anchor"},{default:i.withCtx(()=>{var o;return[i.createElementVNode("div",HL,[i.createElementVNode("div",KL,[i.createVNode(Fu,{deprecated:(o=t.operation.information)==null?void 0:o.deprecated,path:t.operation.path},null,8,["deprecated","path"])]),i.createElementVNode("div",UL,i.toDisplayString(t.operation.name),1)])]}),_:1},8,["id"])])])]),actions:i.withCtx(({active:o})=>[o?(i.openBlock(),i.createBlock(qu,{key:0,operation:t.operation},null,8,["operation"])):(i.openBlock(),i.createBlock(i.unref(Me),{key:1,class:"endpoint-try-hint",icon:"PaperAirplane"})),i.createVNode(i.unref(Mi),{class:"endpoint-copy",icon:"Clipboard",label:"Copy endpoint URL",size:"sm",variant:"ghost",onClick:n[0]||(n[0]=i.withModifiers(s=>i.unref(e)(t.operation.path),["stop"]))})]),default:i.withCtx(()=>[i.createElementVNode("div",WL,[i.createVNode(FL,{operation:t.operation},null,8,["operation"]),i.createVNode(i.unref(lw),{operation:t.operation},null,8,["operation"]),i.createVNode(aw,{operation:t.operation},null,8,["operation"])])]),_:2},[t.operation.description?{name:"description",fn:i.withCtx(()=>[i.createVNode(i.unref($t),{value:t.operation.description,withImages:""},null,8,["value"])]),key:"0"}:void 0]),1032,["id"]))}}),JL=U(GL,[["__scopeId","data-v-3ee61fb6"]]),YL=i.defineComponent({__name:"ShowMoreButton",props:{id:{}},setup(r){const{setCollapsedSidebarItem:e}=rr();return(t,n)=>(i.openBlock(),i.createElementBlock("button",{class:"show-more",type:"button",onClick:n[0]||(n[0]=o=>i.unref(e)(t.id,!0))},[i.createTextVNode(" Show More "),i.createVNode(i.unref(Me),{class:"show-more-icon",icon:"ChevronDown"})]))}}),dw=U(YL,[["__scopeId","data-v-60a9fbab"]]),XL={class:"endpoints"},QL=["onClick"],ZL=i.defineComponent({__name:"Endpoints",props:{id:{},tag:{}},emits:["observeAndNavigate"],setup(r,{emit:e}){const t=r,n=e,{getOperationId:o,getTagId:s}=lt(),{setCollapsedSidebarItem:a}=rr(),l=d=>{n("observeAndNavigate",d)};async function c(d){l(o(d,t.tag)),a(s(t.tag),!0)}return(d,u)=>(i.openBlock(),i.createBlock(i.unref(ks),{id:d.id,label:d.tag.name.toUpperCase()},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(s)(d.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref($t),{value:d.tag.description,withImages:""},null,8,["value"])]),_:1}),i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>{var h;return[((h=d.tag.operations)==null?void 0:h.length)>0?(i.openBlock(),i.createBlock(i.unref(bn),{key:0,class:"scalar-card-sticky"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{default:i.withCtx(()=>[i.createTextVNode("Endpoints")]),_:1}),i.createVNode(i.unref(er),{class:"custom-scroll",muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",XL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.tag.operations,f=>(i.openBlock(),i.createElementBlock("a",{key:i.unref(o)(f,d.tag),class:"endpoint",onClick:p=>c(f)},[i.createVNode(i.unref(no),{method:f.httpVerb},null,8,["method"]),i.createElementVNode("span",null,i.toDisplayString(f.path),1)],8,QL))),128))])]),_:1})]),_:1})):i.createCommentVNode("",!0)]}),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),ej=U(ZL,[["__scopeId","data-v-82b13b6d"]]),tj=(r,e)=>{Xe.useMutationObserver(r,e,{childList:!0,subtree:!0})},rj=i.defineComponent({__name:"Tag",props:{id:{},tag:{},spec:{}},setup(r){const e=r,t=i.ref(null),{collapsedSidebarItems:n}=rr(),{getTagId:o}=lt(),s=d=>{var u;return((u=e.spec.tags)==null?void 0:u.length)!==1||(d==null?void 0:d.name)!=="default"||(d==null?void 0:d.description)!==""},a=d=>{window.location.href=`#${d}`},l=d=>{tj(t,(u,h)=>{u.forEach(f=>{Array.from(f.addedNodes).some(m=>m instanceof HTMLElement&&m.id===d)&&(a(d),h.disconnect())})})},c=d=>{document.getElementById(d)?a(d):l(d)};return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Xi),{ref_key:"sectionContainerRef",ref:t,class:"tag-section-container"},{default:i.withCtx(()=>{var h;return[s(d.tag)?(i.openBlock(),i.createBlock(ej,{key:0,id:d.id,tag:d.tag,onObserveAndNavigate:c},null,8,["id","tag"])):i.createCommentVNode("",!0),!i.unref(n)[i.unref(o)(d.tag)]&&((h=d.tag.operations)==null?void 0:h.length)>1?(i.openBlock(),i.createBlock(dw,{key:1,id:d.id??""},null,8,["id"])):i.renderSlot(d.$slots,"default",{key:2},void 0,!0)]}),_:3},512))}}),uw=U(rj,[["__scopeId","data-v-7fef7ce7"]]),nj=i.defineComponent({__name:"TagAccordion",props:{tag:{},spec:{}},setup(r){const{getTagId:e}=lt();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(rw),{class:"tag-section"},{title:i.withCtx(()=>[i.createVNode(i.unref(kn),{class:"tag-name",level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(e)(t.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref($t),{class:"tag-description",value:t.tag.description,withImages:""},null,8,["value"])]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}}),oj=U(nj,[["__scopeId","data-v-f11e3b56"]]),sj=i.defineComponent({__name:"Loading",props:{layout:{default:"default"},parsedSpec:{}},setup(r){const e=r,t=i.ref(!1),n=i.ref([]),o=i.ref([]),{getModelId:s,getSectionId:a,getTagId:l,hash:c,isIntersectionEnabled:d}=lt(),u=i.ref(e.layout!=="accordion"&&c.value);i.watch(()=>{var f;return(f=e.parsedSpec.tags)==null?void 0:f.length},f=>{var m,g;if(!c.value||typeof f!="number"||!e.parsedSpec.tags)return;const p=a();if(p.startsWith("tag")){let y=0;const v=((m=e.parsedSpec.tags)==null?void 0:m.findIndex(S=>l(S)===p))??0,b=c.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);if((b==null?void 0:b.length)===4){const S=b[2],x="/"+b[3];y=(g=e.parsedSpec.tags[v])==null?void 0:g.operations.findIndex(({httpVerb:k,path:C})=>S===k&&x===C)}const w=e.parsedSpec.tags[v];if(!w)return;w.name!=="default"&&(t.value=p!==c.value&&p.startsWith("tag")),n.value.push({...w,lazyOperations:w.operations.slice(y,y+2)})}else if(c.value.startsWith("model")){const y=Object.keys(Jt(e.parsedSpec)??{}),[,v]=c.value.toLowerCase().split("/"),b=c.value==="models"?0:y.findIndex(w=>w.toLowerCase()===v);if(b===-1)return;o.value=y.slice(b,b+3)}else _i(c.value),setTimeout(()=>d.value=!0,1e3)},{immediate:!0});const h=ju.on(({id:f})=>{const p=c.value;!p||f!==p||(h(),setTimeout(()=>{typeof window<"u"&&_i(p),u.value=!1,setTimeout(()=>d.value=!0,1e3)},300))});return i.onMounted(()=>{c.value||setTimeout(()=>d.value=!0,1e3)}),(f,p)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["references-loading",{"references-loading-hidden-tag":t.value,"references-loading-top-spacer":n.value.length}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,m=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m.id},[m.operations&&m.operations.length>0?(i.openBlock(),i.createBlock(i.unref(uw),{key:0,spec:f.parsedSpec,tag:m},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.lazyOperations,g=>(i.openBlock(),i.createBlock(i.unref(cw),{key:`${g.httpVerb}-${g.operationId}`,operation:g,tag:m},null,8,["operation","tag"]))),128))]),_:2},1032,["spec","tag"])):i.createCommentVNode("",!0)],64))),128)),o.value.length?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,m=>(i.openBlock(),i.createBlock(i.unref(ks),{key:m,label:m},{default:i.withCtx(()=>{var g;return[(g=i.unref(Jt)(f.parsedSpec))!=null&&g[m]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>{var y;return[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(s)(m)},{default:i.withCtx(()=>{var v;return[i.createTextVNode(i.toDisplayString(((v=i.unref(Jt)(f.parsedSpec))==null?void 0:v[m]).title??m),1)]}),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(Hn),{name:m,noncollapsible:"",value:(y=i.unref(Jt)(f.parsedSpec))==null?void 0:y[m]},null,8,["name","value"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["label"]))),128))]),_:1})):i.createCommentVNode("",!0)],2)),[[i.vShow,u.value]])}}),ij=r=>(i.pushScopeId("data-v-f19478dd"),r=r(),i.popScopeId(),r),aj=ij(()=>i.createElementVNode("div",{id:"models"},null,-1)),lj=i.defineComponent({__name:"Models",props:{schemas:{}},setup(r){const e=r,{collapsedSidebarItems:t}=rr(),{getModelId:n}=lt(),o=i.computed(()=>Object.keys(e.schemas??{}).length<=3||t[n()]),s=i.computed(()=>{const a=Object.keys(e.schemas??{});return o.value?a:a.slice(0,3)});return(a,l)=>a.schemas?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(Il),{id:"models",isLazy:!1},{default:i.withCtx(()=>[aj]),_:1}),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(c,d)=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(n)(c),key:c,isLazy:""},{default:i.withCtx(()=>[i.createVNode(i.unref(ks),{id:i.unref(n)(c),label:c},{default:i.withCtx(()=>[a.schemas[c]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(c)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.schemas[c].title??c),1)]),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(Hn),{name:c,noncollapsible:"",value:a.schemas[c]},null,8,["name","value"]),!o.value&&d===s.value.length-1?(i.openBlock(),i.createBlock(dw,{key:0,id:i.unref(n)(),class:"something-special"},null,8,["id"])):i.createCommentVNode("",!0)]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["id","label"])]),_:2},1032,["id"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),cj=U(lj,[["__scopeId","data-v-f19478dd"]]),dj={key:0,class:"properties"},uj={key:1},hj=i.defineComponent({__name:"ModelsAccordion",props:{schemas:{}},setup(r){const e=r,t=i.computed(()=>e.schemas?Object.entries(e.schemas).map(([o,s])=>({name:o,schema:s})):[]),{getModelId:n}=lt();return(o,s)=>e.schemas?(i.openBlock(),i.createBlock(i.unref(rw),{key:0,class:"reference-models"},{title:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createTextVNode("Models")]),_:1})]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,({name:a,schema:l})=>(i.openBlock(),i.createBlock(i.unref(tw),{id:i.unref(n)(a),key:a,label:a},{title:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(a),class:"reference-models-anchor"},{default:i.withCtx(()=>[i.createVNode(i.unref(sw),{class:"reference-models-label",name:a,value:l},null,8,["name","value"])]),_:2},1032,["id"])]),default:i.withCtx(()=>[l!=null&&l.properties?(i.openBlock(),i.createElementBlock("div",dj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(l.properties),([c,d])=>(i.openBlock(),i.createBlock(i.unref(zn),{key:c,name:c,required:l.required&&!!l.required.length&&l.required.includes(c),value:d},null,8,["name","required","value"]))),128))])):(i.openBlock(),i.createElementBlock("div",uj,[i.createVNode(i.unref(zn),{value:l},null,8,["value"])]))]),_:2},1032,["id","label"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),fj=U(hj,[["__scopeId","data-v-2399f144"]]),pj=i.defineComponent({__name:"Webhook",props:{webhook:{}},setup(r){const e=r,{responses:t}=zf(e.webhook);return(n,o)=>{var s;return n.webhook?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Gf,{requestBody:(s=n.webhook.information)==null?void 0:s.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Payload")]),_:1},8,["requestBody"]),i.createVNode(Ut,{parameters:i.unref(t)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])],64)):i.createCommentVNode("",!0)}}}),mj=i.defineComponent({__name:"Webhooks",props:{webhooks:{}},setup(r){const e=r,t=i.computed(()=>Object.keys(e.webhooks??{})),{getWebhookId:n}=lt();return(o,s)=>t.value.length?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,a=>{var l;return i.openBlock(),i.createElementBlock(i.Fragment,{key:a},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys((l=o.webhooks)==null?void 0:l[a]),c=>(i.openBlock(),i.createBlock(i.unref(ks),{id:i.unref(n)(a,c),key:c,label:a},{default:i.withCtx(()=>{var d;return[(d=o.webhooks)!=null&&d[a]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>{var u,h;return[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(a,c)},{default:i.withCtx(()=>{var f;return[i.createTextVNode(i.toDisplayString((f=o.webhooks[a][c])==null?void 0:f.name),1)]}),_:2},1032,["id"])]),_:2},1024),(u=o.webhooks[a][c])!=null&&u.description?(i.openBlock(),i.createBlock(i.unref($t),{key:0,value:(h=o.webhooks[a][c])==null?void 0:h.description,withImages:""},null,8,["value"])):i.createCommentVNode("",!0),i.createVNode(pj,{webhook:o.webhooks[a][c]},null,8,["webhook"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","label"]))),128))],64)}),128))]),_:1})):i.createCommentVNode("",!0)}}),gj=i.createStaticVNode('<div class="section-flare" data-v-6c44c4e3><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div></div>',1),yj={class:"narrow-references-container"},vj=i.defineComponent({__name:"Content",props:{parsedSpec:{},layout:{},baseServerURL:{}},setup(r){const e=r,{getOperationId:t,getTagId:n,hash:o}=lt(),{setServer:s}=ss(),{hideModels:a,collapsedSidebarItems:l}=rr(),c=p=>{if(p.url.match(/^(?!(https?|file):\/\/).+/)){let m=e.baseServerURL??window.location.origin;m=m.replace(/\/$/,"");const g=p.url.startsWith("/")?p.url:`/${p.url}`;p.url=`${m}${g}`.replace(/\/$/,"")}return p};i.watch(()=>e.parsedSpec,p=>{var g,y;let m=[{url:typeof window<"u"?window.location.origin:"/"}];p.servers&&p.servers.length>0?m=p.servers:e.parsedSpec.host&&(m=[{url:`${((g=e.parsedSpec.schemes)==null?void 0:g[0])??"http"}://${e.parsedSpec.host}${((y=e.parsedSpec)==null?void 0:y.basePath)??""}`}]),(e.baseServerURL||typeof window<"u")&&(m=m.map(c)),s({servers:m})},{deep:!0,immediate:!0});const d=i.computed(()=>e.layout==="accordion"?oj:uw),u=i.computed(()=>e.layout==="accordion"?JL:cw),h=i.computed(()=>e.layout==="accordion"?"after":"aside"),f=e.layout!=="accordion"&&!o.value.startsWith("model");return(p,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[gj,i.createElementVNode("div",yj,[i.renderSlot(p.$slots,"start",{},void 0,!0),i.createVNode(i.unref(sj),{layout:p.layout,parsedSpec:p.parsedSpec},null,8,["layout","parsedSpec"]),p.parsedSpec.info.title||p.parsedSpec.info.description?(i.openBlock(),i.createBlock(i.unref(GR),{key:0,info:p.parsedSpec.info,parsedSpec:p.parsedSpec},{[h.value]:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["introduction-cards",{"introduction-cards-row":p.layout==="accordion"}])},[i.createVNode(i.unref(ZV)),i.createVNode(i.unref(hR)),i.createVNode(i.unref(BV),{parsedSpec:p.parsedSpec},null,8,["parsedSpec"])],2)]),_:2},1032,["info","parsedSpec"])):i.renderSlot(p.$slots,"empty-state",{key:1},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.parsedSpec.tags,g=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(n)(g),key:i.unref(n)(g),isLazy:i.unref(f)&&!i.unref(l)[i.unref(n)(g)]},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value),{id:i.unref(n)(g),spec:p.parsedSpec,tag:g},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.operations,(y,v)=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(t)(y,g),key:`${y.httpVerb}-${y.operationId}`,isLazy:v>0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.value),{id:i.unref(t)(y,g),operation:y,tag:g},null,8,["id","operation","tag"]))]),_:2},1032,["id","isLazy"]))),128))]),_:2},1032,["id","spec","tag"]))]),_:2},1032,["id","isLazy"]))),128)),p.parsedSpec.webhooks?(i.openBlock(),i.createBlock(i.unref(mj),{key:2,webhooks:p.parsedSpec.webhooks},null,8,["webhooks"])):i.createCommentVNode("",!0),i.unref(Ah)(p.parsedSpec)&&!i.unref(a)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[p.layout==="accordion"?(i.openBlock(),i.createBlock(i.unref(fj),{key:0,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"])):(i.openBlock(),i.createBlock(i.unref(cj),{key:1,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"]))],64)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"end",{},void 0,!0)])],64))}}),hw=U(vj,[["__scopeId","data-v-6c44c4e3"]]),bj=r=>(i.pushScopeId("data-v-391b4e37"),r=r(),i.popScopeId(),r),wj={class:"start custom-scroll"},kj={class:"start-copy"},Sj=i.createStaticVNode('<div class="start-logo" data-v-391b4e37><svg height="36" viewBox="0 0 36 36" width="36" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z" fill="currentColor" fill-rule="evenodd" data-v-391b4e37></path></svg></div><h1 class="start-h1" data-v-391b4e37>Swagger Editor</h1><p class="start-p" data-v-391b4e37> Welcome to the Scalar API References + Swagger Editor, a Free & Open-Source tool that takes your Swagger/OAS file and generates Beautiful API references. </p>',3),xj={class:"start-cta"},Cj={class:"start-row"},Ej=i.createStaticVNode('<div class="start-section start-section-integrations" data-v-391b4e37><div class="start-h2" data-v-391b4e37>INTEGRATIONS</div><a class="start-item" href="https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme" target="_blank" data-v-391b4e37><svg fill="currentColor" height="16" viewBox="0 0 19 16" width="19" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z" fill="currentColor" fill-rule="nonzero" data-v-391b4e37></path></svg><span data-v-391b4e37>Fastify</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#from-a-cdn" target="_blank" data-v-391b4e37><svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g data-v-391b4e37><path d="M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path></g></svg><span data-v-391b4e37>CDN</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-vuejs" target="_blank" data-v-391b4e37><svg height="170" viewBox="0 0 196.3 170" width="196.3" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="currentColor" fill-rule="nonzero" data-v-391b4e37><polygon points="39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171" data-v-391b4e37></polygon><polygon points="75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14" data-v-391b4e37></polygon></g></svg><span data-v-391b4e37>Vue</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-react" target="_blank" data-v-391b4e37><svg height="23.3" viewBox="0 0 22 23.3" width="22" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="none" fill-rule="evenodd" data-v-391b4e37><circle cx="11" cy="11.6" fill="currentColor" fill-rule="nonzero" r="2" data-v-391b4e37></circle><g stroke="currentColor" data-v-391b4e37><ellipse cx="11" cy="11.6" rx="11" ry="4.2" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(60 11 11.6)" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(120 11 11.6)" data-v-391b4e37></ellipse></g></g></svg><span data-v-391b4e37>React</span></a></div>',1),$j={class:"start-section start-section-colors"},_j=bj(()=>i.createElementVNode("p",{class:"start-h2"},"THEMING",-1)),Nj=["onClick"],Aj=i.createStaticVNode('<p class="start-h1" data-v-391b4e37>Features</p><ul class="start-ul" data-v-391b4e37><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Customize</p> Bring your typography & color palettes, or use our themes! </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Testing</p> A deeply integrated Rest API Client (Also Free & Open-Source) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Search</p> Fully integrated Search (Using fuse.js) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Hosting</p> Free subdomain hosting on https://apidocumentation.com </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>OpenAPI & Swagger</p> Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0 </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Code Samples</p> Code samples to show off your API in most popular languages </li></ul>',2),Oj=i.defineComponent({__name:"GettingStarted",props:{theme:{}},emits:["changeTheme","loadSwaggerFile","linkSwaggerFile","updateContent"],setup(r,{emit:e}){const t=e,n=["default","alternate","moon","purple","solarized","bluePlanet","saturn","kepler","mars","deepSpace"];async function o(){const s=await fetch("https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml");t("updateContent",await s.text())}return(s,a)=>(i.openBlock(),i.createElementBlock("div",wj,[i.createElementVNode("div",kj,[Sj,i.createElementVNode("div",xj,[i.createVNode(i.unref(pu),{fullWidth:"",onClick:o},{default:i.withCtx(()=>[i.createTextVNode(" Show Example ")]),_:1}),i.createVNode(i.unref(pu),{fullWidth:"",variant:"outlined",onClick:a[0]||(a[0]=l=>s.$emit("loadSwaggerFile"))},{default:i.withCtx(()=>[i.createTextVNode(" Upload File ")]),_:1})])]),i.createElementVNode("div",Cj,[Ej,i.createElementVNode("div",$j,[_j,(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,l=>i.createElementVNode("div",{key:l,class:i.normalizeClass(["start-item",{"start-item-active":l===s.theme}]),onClick:c=>s.$emit("changeTheme",{id:l,label:i.unref(dp)[l]})},i.toDisplayString(i.unref(dp)[l]),11,Nj)),64))])]),Aj]))}}),fw=U(Oj,[["__scopeId","data-v-391b4e37"]]),Tj={class:"references-header"},Bj={key:0,class:"references-navigation t-doc__sidebar"},Pj={class:"references-navigation-list"},Ij={class:"references-editor"},Mj={class:"references-editor-textarea"},Dj={class:"references-rendered"},Vj={key:0,class:"references-footer"},Rj=i.defineComponent({inheritAttrs:!1,__name:"ApiReferenceLayout",props:{configuration:{},parsedSpec:{},rawSpec:{}},emits:["changeTheme","updateContent","loadSwaggerFile","linkSwaggerFile","toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(min-width: 1150px)"),n=i.ref("100dvh"),o=i.ref(null);Xe.useResizeObserver(o,k=>{n.value=k[0].contentRect.height+"px"});const{breadcrumb:s,collapsedSidebarItems:a,isSidebarOpen:l,setCollapsedSidebarItem:c,hideModels:d,setParsedSpec:u}=rr(),{getPathRoutingId:h,getSectionId:f,getTagId:p,hash:m,isIntersectionEnabled:g,pathRouting:y,updateHash:v}=lt();y.value=e.configuration.pathRouting,i.onBeforeMount(()=>v());const b=async k=>{var C;g.value=!1,v(),k?_i(k):(C=o.value)==null||C.scrollTo(0,0),await kr(100),g.value=!0};i.onMounted(()=>{jf.on(({specTitle:k})=>{V1(e.rawSpec,k)}),window.onhashchange=()=>b(decodeURIComponent(window.location.hash.replace(/^#/,""))),window.onpopstate=()=>y.value&&b(h(window.location.pathname))});const w=i.computed(()=>t.value||!e.configuration.isEditable),S=Xe.useDebounceFn(k=>{if((k.target.scrollTop??0)<50){const N=e.configuration.pathRouting?e.configuration.pathRouting.basePath:window.location.pathname;window.history.replaceState({},"",N+window.location.search),m.value=""}}),x=i.computed(()=>({breadcrumb:s.value,spec:e.parsedSpec}));return i.watch(()=>e.parsedSpec,u,{deep:!0}),i.onServerPrefetch(()=>{var C,N;const k=i.useSSRContext();if(k&&((C=k.payload).data||(C.data=Ed()),e.configuration.pathRouting)){const P=h(k.url);m.value=P,k.payload.data.hash=P;for(const M in a)Object.hasOwn(a,M)&&delete a[M];if(P)c(f(P),!0);else{const M=(N=e.parsedSpec.tags)==null?void 0:N[0];M&&c(p(M),!0)}k.payload.data["useSidebarContent-collapsedSidebarItems"]=a}}),Le.provideUseId(()=>{var P;const k=i.getCurrentInstance(),C="scalar-instance-id";if(!k)return C;let N=k.uid;return typeof window>"u"?(k.attrs||(k.attrs={}),k.attrs[C]=N):(P=k.vnode.el)!=null&&P.getAttribute&&(N=k.vnode.el.getAttribute(C)),`${C}-${N}`}),i.provide(Tc,()=>e.parsedSpec.security),i.provide(Lf,()=>e.configuration.hideDownloadButton),d.value=e.configuration.hideModels??!1,e.configuration,(k,C)=>{var N,P;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(i.unref(Yg),{id:(N=k.configuration)==null?void 0:N.theme,withDefaultFonts:(P=k.configuration)==null?void 0:P.withDefaultFonts},null,8,["id","withDefaultFonts"]),i.createVNode(i.unref(Qg),null,{default:i.withCtx(({styles:M})=>[i.createVNode(i.unref(ak),null,{default:i.withCtx(({styles:j})=>{var I,X;return[i.createElementVNode("div",{ref_key:"documentEl",ref:o,class:i.normalizeClass(["scalar-api-reference references-layout",[{"references-editable":k.configuration.isEditable,"references-sidebar":k.configuration.showSidebar,"references-sidebar-mobile-open":i.unref(l),"references-classic":k.configuration.layout==="classic"},M,j,k.$attrs.class]]),style:i.normalizeStyle({"--full-height":n.value}),onScrollPassive:C[4]||(C[4]=(...W)=>i.unref(S)&&i.unref(S)(...W))},[i.createElementVNode("div",Tj,[i.renderSlot(k.$slots,"header",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),k.configuration.showSidebar?(i.openBlock(),i.createElementBlock("aside",Bj,[i.createElementVNode("div",Pj,[i.createVNode(i.unref(Hf),{parsedSpec:k.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec"])])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",Ij,[i.createElementVNode("div",Mj,[i.renderSlot(k.$slots,"editor",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])],512),[[i.vShow,k.configuration.isEditable]]),w.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",Dj,[i.createVNode(i.unref(hw),{baseServerURL:k.configuration.baseServerURL,layout:k.configuration.layout==="classic"?"accordion":"default",parsedSpec:k.parsedSpec},i.createSlots({start:i.withCtx(()=>[i.renderSlot(k.$slots,"content-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),end:i.withCtx(()=>[i.renderSlot(k.$slots,"content-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:2},[(I=k.configuration)!=null&&I.isEditable?{name:"empty-state",fn:i.withCtx(()=>{var W;return[i.createVNode(fw,{theme:((W=k.configuration)==null?void 0:W.theme)||"default",onChangeTheme:C[0]||(C[0]=te=>k.$emit("changeTheme",te)),onLinkSwaggerFile:C[1]||(C[1]=te=>k.$emit("linkSwaggerFile")),onLoadSwaggerFile:C[2]||(C[2]=te=>k.$emit("loadSwaggerFile")),onUpdateContent:C[3]||(C[3]=te=>k.$emit("updateContent",te))},null,8,["theme"])]}),key:"0"}:void 0]),1032,["baseServerURL","layout","parsedSpec"])]),k.$slots.footer?(i.openBlock(),i.createElementBlock("div",Vj,[i.renderSlot(k.$slots,"footer",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),i.createVNode(G1,{parsedSpec:k.parsedSpec,proxyUrl:(X=k.configuration)==null?void 0:X.proxy},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec","proxyUrl"])],38)]}),_:2},1024)]),_:3}),i.createVNode(i.unref(B5))],64)}}}),Jf=U(Rj,[["__scopeId","data-v-ce46649f"]]),Lj={},jj={class:"references-classic-header-container"},Fj={class:"references-classic-header"};function qj(r,e){return i.openBlock(),i.createElementBlock("div",jj,[i.createElementVNode("div",Fj,[i.renderSlot(r.$slots,"default",{},void 0,!0),i.renderSlot(r.$slots,"dark-mode-toggle",{},void 0,!0)])])}const zj=U(Lj,[["render",qj],["__scopeId","data-v-a860f78f"]]),Hj=r=>(i.pushScopeId("data-v-559a0a79"),r=r(),i.popScopeId(),r),Kj={class:"darklight-reference"},Uj={key:0},Wj={key:1},Gj=Hj(()=>i.createElementVNode("a",{class:"darklight-reference-promo",href:"https://www.scalar.com",target:"_blank"}," Powered by scalar.com ",-1)),Jj=i.defineComponent({__name:"DarkModeToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",Kj,[i.createElementVNode("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:"LightDarkModeToggle"}),e.isDarkMode?(i.openBlock(),i.createElementBlock("span",Uj,"Light Mode")):(i.openBlock(),i.createElementBlock("span",Wj,"Dark Mode"))]),Gj]))}}),pw=U(Jj,[["__scopeId","data-v-559a0a79"]]),Yj=i.defineComponent({__name:"DarkModeIconToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:e.isDarkMode?"DarkMode":"LightMode"},null,8,["icon"]),i.createVNode(ow,null,{default:i.withCtx(()=>[i.createTextVNode(" Switch to "+i.toDisplayString(e.isDarkMode?"Light":"Dark")+" Mode ",1)]),_:1})]))}}),mw=U(Yj,[["__scopeId","data-v-8f61ca56"]]);function Xj(r,e){let t=r;const n=e.required&&e.required.includes(r);return t+=n?" REQUIRED ":" optional ",e.properties[r]&&(t+=e.properties[r].type,e.properties[r].description&&(t+=" "+e.properties[r].description)),t}function Qj(r){var n;const e=["Body"],t=(n=r==null?void 0:r.schema)==null?void 0:n.properties;return t&&Object.keys(t).forEach(o=>{if(!r.schema)return;e.push(Xj(o,r.schema));const s=t[o];s.type==="object"&&!!s.properties&&s.properties&&Object.keys(s.properties).forEach(l=>{var c,d;e.push(`${l} ${(d=(c=s.properties)==null?void 0:c[l])==null?void 0:d.type}`)})}),e}function Zj(r){var e,t,n;try{const o=(n=(t=(e=r==null?void 0:r.information)==null?void 0:e.requestBody)==null?void 0:t.content)==null?void 0:n["application/json"];if(!o)throw new Error("Body not found");return Qj(o)}catch{return!1}}const e4=r=>(i.pushScopeId("data-v-8395f85c"),r=r(),i.popScopeId(),r),t4=e4(()=>i.createElementVNode("div",{class:"ref-search-meta"},[i.createElementVNode("span",null,"↑↓ Navigate"),i.createElementVNode("span",null,"⏎ Select")],-1)),r4=i.defineComponent({__name:"SearchModal",props:{parsedSpec:{},modalState:{}},setup(r){const e=r,t=i.toRef(e,"parsedSpec"),n={heading:"DocsPage",model:"JsonObject",req:"Terminal",tag:"CodeFolder",webhook:"Terminal"},o=Xe.useMagicKeys(),s=i.ref([]),a=i.ref([]),l=i.ref(0),c=i.ref(""),d=i.ref(null),u=new Fw(s.value,{keys:["title","description","body"]}),h=()=>{l.value=0,a.value=u.search(c.value)},f=i.computed(()=>S.value[l.value]),{getHeadingId:p,getWebhookId:m,getModelId:g,getOperationId:y,getTagId:v}=lt();i.watch(()=>e.modalState.open,N=>{N&&(c.value="",l.value=0,a.value=[])});const{setCollapsedSidebarItem:b,hideModels:w}=rr();i.watch(t.value,async()=>{var W,te,me,ke,Se;if(s.value=[],!((te=(W=e.parsedSpec)==null?void 0:W.tags)!=null&&te.length)&&!((me=e.parsedSpec)!=null&&me.webhooks)){u.setCollection([]);return}const N=[],P=await ki(((ke=e.parsedSpec.info)==null?void 0:ke.description)??"");P.length&&(P.forEach(se=>{N.push({type:"heading",title:`Info > ${se.value}`,description:"",href:`#${p(se)}`,tag:se.slug,body:""})}),s.value=s.value.concat(N)),(Se=e.parsedSpec.tags)==null||Se.forEach(se=>{const q={title:se.name,href:`#${v(se)}`,description:se.description,type:"tag",tag:se.name,body:""};s.value.push(q),se.operations&&se.operations.forEach(T=>{const{parameterMap:V}=qf({operation:T}),D=Zj(T)||V.value;let E=null;typeof D!="boolean"&&(E=D);const A={type:"req",title:T.name??T.path,href:`#${y(T,se)}`,operationId:T.operationId,description:T.description??"",httpVerb:T.httpVerb,path:T.path,tag:se.name,operation:T};E&&(A.body=E),s.value.push(A)})});const M=e.parsedSpec.webhooks,j=[];M&&Object.keys(M).forEach(se=>{Object.keys(M[se]).forEach(T=>{var V;j.push({type:"webhook",title:`Webhook: ${(V=M[se][T])==null?void 0:V.name}`,href:`#${m(se,T)}`,description:se,httpVerb:T,tag:se,body:""})}),s.value=s.value.concat(j)});const I=w.value?{}:Jt(e.parsedSpec),X=[];I&&(Object.keys(I).forEach(se=>{X.push({type:"model",title:"Model",href:`#${g(se)}`,description:I[se].title??se,tag:se,body:""})}),s.value=s.value.concat(X)),u.setCollection(s.value)},{immediate:!0}),Xe.whenever(o.enter,()=>{e.modalState.open&&window&&(k(f.value),window.location.hash=f.value.item.href,e.modalState.hide())}),Xe.whenever(o.ArrowDown,()=>{var N;e.modalState.open&&window&&(l.value<S.value.length-1?l.value++:l.value=0,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))}),Xe.whenever(o.ArrowUp,()=>{var N;e.modalState.open&&window&&(l.value>0?l.value--:l.value=S.value.length-1,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))});const S=i.computed(()=>c.value.length===0?s.value.map(N=>({item:N})):a.value),x=/#(tag\/[^/]*)/,k=N=>{let P="models";const M=N.item.href.match(x);M!=null&&M.length&&M.length>1&&(P=M[1]),b(P,!0),e.modalState.hide()};function C(N){const P=new URL(window.location.href);return P.hash=N,P.toString()}return(N,P)=>(i.openBlock(),i.createBlock(i.unref(iv),{state:N.modalState,variant:"search"},{default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"searchModalRef",ref:d,class:"ref-search-container"},[i.createVNode(i.unref(b$),{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=M=>c.value=M),onInput:h},null,8,["modelValue"])],512),i.createVNode(i.unref(x$),{class:"ref-search-results custom-scroll",noResults:!S.value.length},{query:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,(M,j)=>(i.openBlock(),i.createBlock(i.unref(T$),{id:M.item.href,key:M.refIndex,active:l.value===j,href:C(M.item.href),icon:n[M.item.type],onClick:I=>k(M),onFocus:I=>l.value=j},i.createSlots({default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.title)+" ",1)]),_:2},[(M.item.httpVerb||M.item.path)&&M.item.path!==M.item.title?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.path),1)]),key:"0"}:M.item.description?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.description),1)]),key:"1"}:void 0,M.item.type==="req"?{name:"addon",fn:i.withCtx(()=>[i.createVNode(W1,{method:M.item.httpVerb??"get"},null,8,["method"])]),key:"2"}:void 0]),1032,["id","active","href","icon","onClick","onFocus"]))),128))]),_:1},8,["noResults"]),t4]),_:1},8,["state"]))}}),gw=U(r4,[["__scopeId","data-v-8395f85c"]]),n4=r=>(i.pushScopeId("data-v-edb0a931"),r=r(),i.popScopeId(),r),o4={class:"sidebar-search-input"},s4=n4(()=>i.createElementVNode("span",{class:"sidebar-search-placeholder"},"Search",-1)),i4={class:"sidebar-search-shortcut"},a4={class:"sidebar-search-key"},l4=i.defineComponent({__name:"SearchButton",props:{spec:{},searchHotKey:{default:"k"}},setup(r){const e=r,t=av(),n=Xe.useMagicKeys({passive:!1,onEventFired(o){!Ka()&&o.ctrlKey&&o.key===e.searchHotKey&&(o.preventDefault(),o.stopPropagation())}});return Xe.whenever(n[`${Ka()?"meta":"control"}_${e.searchHotKey}`],()=>t.open?t.hide():t.show()),(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("button",{class:i.normalizeClass(["sidebar-search",o.$attrs.class]),type:"button",onClick:s[0]||(s[0]=(...a)=>i.unref(t).show&&i.unref(t).show(...a))},[i.createVNode(i.unref(Me),{class:"search-icon",icon:"Search",size:"sm"}),i.createElementVNode("div",o4,[s4,i.createElementVNode("span",i4,[i.createElementVNode("span",a4,i.toDisplayString(i.unref(Ka)()?"⌘":"⌃")+i.toDisplayString(o.searchHotKey),1)])])],2),i.createVNode(gw,{modalState:i.unref(t),parsedSpec:o.spec},null,8,["modalState","parsedSpec"])],64))}}),Yf=U(l4,[["__scopeId","data-v-edb0a931"]]),c4=i.defineComponent({__name:"ClassicLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=i.computed(()=>({...e.configuration,showSidebar:!1}));return(n,o)=>(i.openBlock(),i.createBlock(Jf,{configuration:t.value,parsedSpec:n.parsedSpec,rawSpec:n.rawSpec},{"content-start":i.withCtx(({spec:s})=>[i.createVNode(zj,null,{"dark-mode-toggle":i.withCtx(()=>[i.createVNode(i.unref(mw),{isDarkMode:n.isDark,onToggleDarkMode:o[0]||(o[0]=a=>n.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),default:i.withCtx(()=>[i.createVNode(Yf,{class:"t-doc__sidebar",searchHotKey:t.value.searchHotKey,spec:s},null,8,["searchHotKey","spec"])]),_:2},1024)]),"content-end":i.withCtx(()=>[i.renderSlot(n.$slots,"footer")]),_:3},8,["configuration","parsedSpec","rawSpec"]))}}),d4={class:"references-mobile-header t-doc__header"},u4={class:"references-mobile-breadcrumbs"},h4={class:"references-mobile-header-actions"},f4=i.defineComponent({__name:"MobileHeader",props:{open:{type:Boolean}},emits:["update:open"],setup(r){const{breadcrumb:e}=rr();return(t,n)=>(i.openBlock(),i.createElementBlock("div",d4,[i.createVNode(i.unref(Mi),{icon:t.open?"Close":"Menu",label:t.open?"Close Menu":"Open Menu",size:"md",onClick:n[0]||(n[0]=o=>t.$emit("update:open",!t.open))},null,8,["icon","label"]),i.createElementVNode("span",u4,i.toDisplayString(i.unref(e)),1),i.createElementVNode("div",h4,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])]))}}),p4=U(f4,[["__scopeId","data-v-0242e3de"]]),m4={class:"scalar-api-references-standalone-search"},g4=i.defineComponent({__name:"ModernLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(max-width: 1000px)"),{isSidebarOpen:n}=rr();i.watch(t,(s,a)=>{s&&!a&&(n.value=!1)});const{hash:o}=lt();return i.watch(o,(s,a)=>{s&&s!==a&&(n.value=!1)}),(s,a)=>(i.openBlock(),i.createBlock(Jf,{class:i.normalizeClass({"scalar-api-references-standalone-mobile":s.configuration.showSidebar}),configuration:s.configuration,parsedSpec:s.parsedSpec,rawSpec:s.rawSpec},{header:i.withCtx(()=>[e.configuration.showSidebar?(i.openBlock(),i.createBlock(p4,{key:0,open:i.unref(n),"onUpdate:open":a[0]||(a[0]=l=>i.isRef(n)?n.value=l:null)},null,8,["open"])):i.createCommentVNode("",!0)]),"sidebar-start":i.withCtx(({spec:l})=>{var c;return[i.createElementVNode("div",m4,[i.createVNode(Yf,{searchHotKey:(c=e.configuration)==null?void 0:c.searchHotKey,spec:l},null,8,["searchHotKey","spec"])])]}),"sidebar-end":i.withCtx(()=>[i.createVNode(i.unref(pw),{isDarkMode:s.isDark,onToggleDarkMode:a[1]||(a[1]=l=>s.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),"content-end":i.withCtx(()=>[i.renderSlot(s.$slots,"footer",{},void 0,!0)]),_:3},8,["class","configuration","parsedSpec","rawSpec"]))}}),yw=U(g4,[["__scopeId","data-v-333fecad"]]),y4={modern:yw,classic:c4},v4=i.defineComponent({__name:"ApiReference",props:{configuration:{}},emits:["updateContent"],setup(r){var h,f;const e=r,{toggleDarkMode:t,isDark:n}=P5((h=e.configuration)==null?void 0:h.darkMode),o=i.computed(()=>{var p,m;if((p=e.configuration)!=null&&p.customCss)return ck((m=e.configuration)==null?void 0:m.customCss)});i.watch(o,()=>console.log(o.value));const s=i.computed(()=>{var p;return{spec:{content:void 0,url:void 0,...(p=e.configuration)==null?void 0:p.spec},proxy:void 0,theme:"default",showSidebar:!0,isEditable:!1,...e.configuration,customCss:o.value}});(f=s.value)!=null&&f.metaData&&(cp.createHead(),cp.useSeoMeta(s.value.metaData));function a(p,m){i.watch(()=>{var g;return(g=s.value)==null?void 0:g[p]},g=>{typeof g<"u"&&m(g)},{immediate:!0})}const{setAuthentication:l}=rs();a("authentication",l);const{setExcludedClients:c}=Ji();a("hiddenClients",c);const{parsedSpec:d,rawSpec:u}=z1({proxy:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.proxy)||""}),specConfig:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.spec)||{}})});return(p,m)=>{var g,y;return i.openBlock(),i.createElementBlock(i.Fragment,null,[(g=s.value)!=null&&g.customCss?(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.value.customCss),1)]),_:1})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(y4)[((y=s.value)==null?void 0:y.layout)||"modern"]),{configuration:s.value,isDark:i.unref(n),parsedSpec:i.unref(d),rawSpec:i.unref(u),onToggleDarkMode:m[0]||(m[0]=()=>i.unref(t)()),onUpdateContent:m[1]||(m[1]=v=>p.$emit("updateContent",v))},{footer:i.withCtx(()=>[i.renderSlot(p.$slots,"footer")]),_:3},40,["configuration","isDark","parsedSpec","rawSpec"]))],64)}}});exports.Annotation=oo;exports.ApiClientModal=G1;exports.ApiReferenceLayout=Jf;exports.Card=bn;exports.CardContent=er;exports.CardFooter=Yi;exports.CardHeader=wn;exports.CardTab=Z1;exports.CardTabHeader=Q1;exports.Content=hw;exports.DarkModeIconToggle=mw;exports.DarkModeToggle=pw;exports.Decoration=Be;exports.DefaultBufferLength=Dy;exports.EditorSelection=Y;exports.EditorView=ue;exports.Facet=Z;exports.FlowModal=iv;exports.GLOBAL_SECURITY_SYMBOL=Tc;exports.GettingStarted=fw;exports.HIDE_DOWNLOAD_BUTTON_SYMBOL=Lf;exports.LRLanguage=pl;exports.LanguageSupport=GC;exports.Me=pu;exports.ModernLayout=yw;exports.NodeProp=fe;exports.NodeSet=hh;exports.NodeType=pt;exports.NodeWeakMap=AC;exports.Ot=Nr;exports.Parser=jy;exports.Prec=Fl;exports.RangeSet=be;exports.RangeValue=Gn;exports.SearchButton=Yf;exports.SearchModal=gw;exports.SecurityScheme=Bv;exports.SecuritySchemeSelector=Pv;exports.Sidebar=Hf;exports.StateEffect=We;exports.StateField=qr;exports.Text=we;exports.Transaction=rt;exports.Tree=He;exports.V=Me;exports.ViewPlugin=Vt;exports.WidgetType=ns;exports._export_sfc=U;exports._sfc_main=Yg;exports._sfc_main$1=no;exports._sfc_main$2=v4;exports.bracketMatching=b2;exports.bracketMatchingHandle=sv;exports.clickGeneratedParameter=T2;exports.codePointAt=Io;exports.codePointSize=sl;exports.combineConfig=zl;exports.contentType=$h;exports.continuedIndent=s2;exports.countColumn=oh;exports.createEmptyAuthenticationState=h0;exports.createEmptyOpenApiState=p0;exports.createEmptyServerState=Fv;exports.createPlaceholderRequest=m0;exports.customTheme=$2;exports.deepMerge=Dv;exports.defaultHighlightStyle=h2;exports.defineLanguageFacet=Ky;exports.delimitedIndent=n2;exports.downloadSpecBus=jf;exports.downloadSpecFile=V1;exports.encodeStringAsBase64=lv;exports.findVariables=cv;exports.flatIndent=o2;exports.foldInside=c2;exports.foldNodeProp=l2;exports.fromCodePoint=nS;exports.getApiClientRequest=_h;exports.getBase64Token=bh;exports.getHeadingsFromMarkdown=ki;exports.getIndentUnit=Gy;exports.getLowestHeadingLevel=Xl;exports.getModels=Jt;exports.getRequestFromAuthentication=vh;exports.getSecretCredentialsFromAuthentication=dv;exports.getTooltip=mC;exports.getUrlFromServerState=wl;exports.getVariableNames=a_;exports.hasModels=Ah;exports.hasSecuritySchemes=Vv;exports.hasWebhooks=Rv;exports.highlightSpecialChars=sC;exports.indentNodeProp=Xy;exports.indentOnInput=a2;exports.indentString=Jy;exports.indentUnit=gh;exports.isJsonString=c0;exports.isMacOS=Ka;exports.isRequestMethod=$d;exports.isValidUrl=Lv;exports.keymap=Ty;exports.lineNumbers=SC;exports.logException=Br;exports.mapFromObject=l_;exports.mergeAllObjects=c_;exports.objectMerge=jv;exports.openClientFor=kl;exports.parse=D1;exports.parseMixed=TC;exports.replaceVariables=Nh;exports.requestMethodAbbreviations=b0;exports.requestMethodColors=v0;exports.scrollToId=_i;exports.showTooltip=Iy;exports.sleep=kr;exports.splitMarkdownInSections=R1;exports.styleTags=qy;exports.sublanguageProp=Uy;exports.syntaxHighlighting=tv;exports.syntaxTree=mn;exports.tags=F;exports.useApiClientStore=Ml;exports.useAuthenticationStore=rs;exports.useHttpClientStore=Bc;exports.useModal=av;exports.useOpenApiStore=Qu;exports.useReactiveSpec=z1;exports.useRequestStore=y0;exports.useServerStore=ss;exports.validRequestMethods=eh;exports.variables=_2;
|
|
226
|
+
const { statusCode, body } = await request('${n.url}${a}'${l})`}}function hL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${Sr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"node",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function fL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0),a=s.size?`?${s.toString()}`:"";(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(c=>{o.headers[c.name]=c.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(c=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${c.name}=${c.value}`:`${c.name}=${c.value}`})),Object.keys(o).forEach(c=>{o[c]===void 0&&delete o[c]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=`JSON.stringify(${Sr(JSON.parse(o.body))})`));const l=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"js",client:"fetch",code:`fetch('${n.url}${a}'${l})`}}function pL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"js",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function mL(r){var e,t;const n={method:"GET",...r};n.method=n.method.toUpperCase();const o={method:n.method==="GET"?void 0:n.method},s=new URLSearchParams(n.queryString?Qi(n.queryString):void 0);s.size&&(o.query={},s.forEach((l,c)=>{o.query[c]=l})),(e=n.headers)!=null&&e.length&&(o.headers={},n.headers.forEach(l=>{o.headers[l.name]=l.value})),(t=n.cookies)!=null&&t.length&&(o.headers=o.headers||{},n.cookies.forEach(l=>{o.headers["Set-Cookie"]=o.headers["Set-Cookie"]?`${o.headers["Set-Cookie"]}; ${l.name}=${l.value}`:`${l.name}=${l.value}`})),Object.keys(o).forEach(l=>{o[l]===void 0&&delete o[l]}),n.postData&&(o.body=n.postData.text,n.postData.mimeType==="application/json"&&(o.body=JSON.parse(o.body)));const a=Object.keys(o).length?`, ${Sr(o)}`:"";return{target:"node",client:"ofetch",code:`ofetch('${n.url}'${a})`}}function Hg(){const r=[uL,hL,fL,pL,mL];return{get(e,t,n){const o=this.findPlugin(e,t);if(o)return o(n)},print(e,t,n){var o;return(o=this.get(e,t,n))==null?void 0:o.code},targets(){return r.map(e=>e().target).filter((e,t,n)=>n.indexOf(e)===t)},clients(){return r.map(e=>e().client)},plugins(){return r.map(e=>{const t=e();return{target:t.target,client:t.client}})},findPlugin(e,t){return r.find(n=>{const o=n();return o.target===e&&o.client===t})},hasPlugin(e,t){return!!this.findPlugin(e,t)}}}const gL=i.defineComponent({__name:"ExamplePicker",props:{examples:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,o=i.ref(Object.keys(t.examples)[0]);function s(l){l&&(o.value=l)}i.watch(()=>t.examples,()=>{s(Object.keys(t.examples)[0])},{immediate:!0}),i.watch(o,()=>{o.value&&n("update:modelValue",o.value)},{immediate:!0});function a(l){if(!l)return"Select an example";const c=t.examples[l];return(c==null?void 0:c.summary)??l}return(l,c)=>(i.openBlock(),i.createBlock(Wf,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),class:"example-selector",options:Object.keys(l.examples).map(d=>({label:a(d),value:d}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a(o.value)),1)]),_:1},8,["modelValue","options"]))}}),iw=U(gL,[["__scopeId","data-v-652a7e14"]]),yL={class:"request-header"},vL={class:"code-snippet"},bL={key:0,class:"request-card-footer-addon"},wL=i.defineComponent({__name:"ExampleRequest",props:{operation:{}},setup(r){const e=r,n=`components-Content-Operation-Example-Request${zu(e.operation.path+e.operation.httpVerb+e.operation.operationId)}`,o=i.ref(ts[n]??""),s=i.ref(),{copyToClipboard:a}=ws(),{httpClient:l,setHttpClient:c,httpTargetTitle:d,httpClientTitle:u}=Bc(),{availableTargets:h}=Ji(),{server:f}=ss(),{authentication:p}=rs(),m=i.computed(()=>{var v,b,w,S,x,k,C;return((S=(w=(b=(v=e.operation.information)==null?void 0:v.requestBody)==null?void 0:b.content)==null?void 0:w["application/json"])==null?void 0:S.examples)&&Object.keys((C=(k=(x=e.operation.information)==null?void 0:x.requestBody)==null?void 0:k.content)==null?void 0:C["application/json"].examples).length>1}),g=i.inject(Tc),y=async()=>{var b;const v=d0({url:wl(f)},Cd(e.operation,{replaceVariables:!0},s.value),vh(p,((b=e.operation.information)==null?void 0:b.security)??(g==null?void 0:g())));try{return Hg().hasPlugin(l.targetKey.replace("javascript","js"),l.clientKey)?Hg().print(l.targetKey.replace("javascript","js"),l.clientKey,v)??"":await new Gg.HTTPSnippet(v).convert(l.targetKey,l.clientKey)}catch(w){return console.error("[ExampleRequest]",w),""}};return i.watch([()=>l,()=>f,()=>p,()=>s],async()=>{o.value=await y()},{deep:!0,immediate:!0}),i.onServerPrefetch(async()=>{const v=i.useSSRContext();await kr(1),v.payload.data[n]=o.value}),i.computed(()=>_h({serverState:f,authenticationState:p,operation:e.operation,globalSecurity:g==null?void 0:g()})),(v,b)=>(i.openBlock(),i.createBlock(i.unref(bn),{class:"dark-mode"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{actions:i.withCtx(()=>[i.createVNode(Wf,{class:"request-client-picker",modelValue:JSON.stringify(i.unref(l)),options:i.unref(h).map(w=>({value:w.key,label:w.title,options:w.clients.map(S=>({value:JSON.stringify({targetKey:w.key,clientKey:S.key}),label:S.title}))})),"onUpdate:modelValue":b[0]||(b[0]=w=>i.unref(c)(JSON.parse(w)))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d))+" "+i.toDisplayString(i.unref(u)),1)]),_:1},8,["modelValue","options"]),i.createElementVNode("button",{class:"copy-button",type:"button",onClick:b[1]||(b[1]=w=>i.unref(a)(o.value))},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px"})])]),default:i.withCtx(()=>[i.createElementVNode("div",yL,[i.createVNode(i.unref(no),{as:"span",class:"request-method",method:v.operation.httpVerb},null,8,["method"]),i.renderSlot(v.$slots,"header",{},void 0,!0)])]),_:3}),i.createVNode(i.unref(er),{borderless:"",class:"request-editor-section custom-scroll",frameless:""},{default:i.withCtx(()=>[i.createElementVNode("div",vL,[i.createVNode(i.unref(Nr),{content:o.value,hideCredentials:i.unref(dv)(i.unref(p)),lang:i.unref(l).targetKey,lineNumbers:""},null,8,["content","hideCredentials","lang"])])]),_:1}),m.value||v.$slots.footer?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"request-card-footer",contrast:""},{default:i.withCtx(()=>{var w,S,x,k;return[m.value?(i.openBlock(),i.createElementBlock("div",bL,[i.createVNode(iw,{class:"request-example-selector",examples:((k=(x=(S=(w=v.operation.information)==null?void 0:w.requestBody)==null?void 0:S.content)==null?void 0:x["application/json"])==null?void 0:k.examples)??[],"onUpdate:modelValue":b[2]||(b[2]=C=>s.value=C)},null,8,["examples"])])):i.createCommentVNode("",!0),i.renderSlot(v.$slots,"footer",{},void 0,!0)]}),_:3})):i.createCommentVNode("",!0)]),_:3}))}}),aw=U(wL,[["__scopeId","data-v-317d5c87"]]),kL={key:0},SL={key:1},xL={key:0,class:"rule"},CL={class:"rule-title"},EL={class:"rule-items"},$L={key:2,class:"empty-state"},_L=i.defineComponent({__name:"ExampleResponse",props:{response:{}},setup(r){const e=["oneOf","anyOf","not"],t=n=>n.reduce((o,s)=>({...o,...s}),{});return(n,o)=>{var s,a,l,c,d,u,h;return(s=n.response)!=null&&s.example?(i.openBlock(),i.createElementBlock("div",kL,[i.createVNode(i.unref(Nr),{content:i.unref(ol)((a=n.response)==null?void 0:a.example),lang:"json"},null,8,["content"])])):(l=n.response)!=null&&l.schema?(i.openBlock(),i.createElementBlock("div",SL,[(c=n.response)!=null&&c.schema.type?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:i.unref(ol)(i.unref(Ke)((d=n.response)==null?void 0:d.schema,{emptyString:"…",mode:"read"})),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0),(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(e,f=>{var p,m,g,y,v,b;return i.openBlock(),i.createElementBlock(i.Fragment,{key:f},[(p=n.response)!=null&&p.schema[f]&&(((m=n.response)==null?void 0:m.schema[f].length)>1||f==="not")?(i.openBlock(),i.createElementBlock("div",xL,[i.createElementVNode("div",CL,i.toDisplayString(f),1),i.createElementVNode("ol",EL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((g=n.response)==null?void 0:g.schema[f],(w,S)=>(i.openBlock(),i.createElementBlock("li",{key:S,class:"rule-item"},[i.createVNode(i.unref(Nr),{content:i.unref(Ke)(w,{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])]))),128))])])):(y=n.response)!=null&&y.schema[f]&&((v=n.response)==null?void 0:v.schema[f].length)===1?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:i.unref(Ke)((b=n.response)==null?void 0:b.schema[f][0],{emptyString:"…",mode:"read"}),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)],64)}),64)),(u=n.response)!=null&&u.schema.allOf?(i.openBlock(),i.createBlock(i.unref(Nr),{key:1,content:t((h=n.response)==null?void 0:h.schema.allOf.map(f=>i.unref(Ke)(f,{emptyString:"…",mode:"read"}))),lang:"json"},null,8,["content"])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",$L," No Body "))}}}),Kg=U(_L,[["__scopeId","data-v-800e8c7d"]]),NL=r=>(i.pushScopeId("data-v-469e6333"),r=r(),i.popScopeId(),r),AL={key:1,class:"scalar-card-checkbox"},OL=NL(()=>i.createElementVNode("span",{class:"scalar-card-checkbox-checkmark"},null,-1)),TL={class:"scalar-card-container custom-scroll"},BL={key:1,class:"response-description"},PL=i.defineComponent({__name:"PathResponses",props:{operation:{}},setup(r){const e=r,{copyToClipboard:t}=ws(),n=i.ref(),o=i.computed(()=>{var f,p;return Object.keys(((p=(f=e==null?void 0:e.operation)==null?void 0:f.information)==null?void 0:p.responses)??{}).sort(m=>m==="default"?-1:0)}),s=i.computed(()=>!!c.value.examples),a=i.ref(0),l=i.computed(()=>{var p,m;const f=o.value[a.value];return(m=(p=e.operation.information)==null?void 0:p.responses)==null?void 0:m[f]}),c=i.computed(()=>{var p;const f=u0((p=l.value)==null?void 0:p.content);return(f==null?void 0:f["application/json"])??l.value}),d=i.computed(()=>({...c.value,example:s.value&&n.value?c.value.examples[n.value].value??c.value.examples[n.value]:c.value.example})),u=f=>{a.value=f},h=i.ref(!1);return(f,p)=>o.value.length?(i.openBlock(),i.createBlock(i.unref(bn),{key:0},{default:i.withCtx(()=>{var m;return[i.createVNode(i.unref(Q1),{muted:"",x:"as",onChange:u},{actions:i.withCtx(()=>{var g,y;return[(g=c.value)!=null&&g.example?(i.openBlock(),i.createElementBlock("button",{key:0,class:"code-copy",type:"button",onClick:p[0]||(p[0]=()=>{var v;return i.unref(t)((v=c.value)==null?void 0:v.example)})},[i.createVNode(i.unref(Me),{icon:"Clipboard",width:"10px",x:"asd"})])):i.createCommentVNode("",!0),(y=c.value)!=null&&y.schema?(i.openBlock(),i.createElementBlock("label",AL,[i.createTextVNode(" Show Schema "),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":p[1]||(p[1]=v=>h.value=v),class:"scalar-card-checkbox-input",type:"checkbox"},null,512),[[i.vModelCheckbox,h.value]]),OL])):i.createCommentVNode("",!0)]}),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,g=>(i.openBlock(),i.createBlock(i.unref(Z1),{key:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g),1)]),_:2},1024))),128))]),_:1}),i.createElementVNode("div",TL,[i.createVNode(i.unref(er),{muted:""},{default:i.withCtx(()=>{var g;return[(g=c.value)!=null&&g.schema?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[h.value&&d.value?(i.openBlock(),i.createBlock(i.unref(Nr),{key:0,content:d.value,lang:"json"},null,8,["content"])):(i.openBlock(),i.createBlock(Kg,{key:1,response:d.value},null,8,["response"]))],64)):(i.openBlock(),i.createBlock(Kg,{key:1,response:d.value},null,8,["response"]))]}),_:1})]),(m=l.value)!=null&&m.description||s.value?(i.openBlock(),i.createBlock(i.unref(Yi),{key:0,class:"response-card-footer",muted:""},{default:i.withCtx(()=>{var g,y;return[s.value?(i.openBlock(),i.createBlock(iw,{key:0,class:"response-example-selector",examples:(g=c.value)==null?void 0:g.examples,"onUpdate:modelValue":p[2]||(p[2]=v=>n.value=v)},null,8,["examples"])):(y=l.value)!=null&&y.description?(i.openBlock(),i.createElementBlock("div",BL,[i.createVNode(i.unref($t),{class:"markdown",value:l.value.description},null,8,["value"])])):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0)}}),lw=U(PL,[["__scopeId","data-v-469e6333"]]),IL=r=>(i.pushScopeId("data-v-f44e2b65"),r=r(),i.popScopeId(),r),ML=IL(()=>i.createElementVNode("span",null,"Test Request",-1)),DL=i.defineComponent({__name:"TryRequestButton",props:{operation:{}},setup(r){const e=i.inject(Tc);return(t,n)=>(i.openBlock(),i.createBlock(i.unref(no),{as:"button",class:"show-api-client-button",method:t.operation.httpVerb,type:"button",onClick:n[0]||(n[0]=i.withModifiers(o=>{var s;return i.unref(kl)(t.operation,(s=i.unref(e))==null?void 0:s())},["stop"]))},{default:i.withCtx(()=>[i.createVNode(i.unref(Me),{icon:"PaperAirplane"}),ML]),_:1},8,["method"]))}}),qu=U(DL,[["__scopeId","data-v-f44e2b65"]]),VL={class:"examples"},RL=i.defineComponent({__name:"Operation",props:{id:{},operation:{}},setup(r){const e=r,t=i.computed(()=>{var o;const n=["x-custom-examples","x-codeSamples","x-code-samples"];for(const s of n)if((o=e.operation.information)!=null&&o[s])return e.operation.information[s];return null});return(n,o)=>(i.openBlock(),i.createBlock(i.unref(ks),{id:n.id,label:n.operation.name},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>{var s,a;return[(s=n.operation.information)!=null&&s.deprecated?(i.openBlock(),i.createBlock(i.unref(Ni),{key:0},{default:i.withCtx(()=>[i.createTextVNode(" Deprecated ")]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass((a=n.operation.information)!=null&&a.deprecated?"deprecated":"")},[i.createVNode(i.unref(kn),{level:3},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:n.id??""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.operation.name),1)]),_:1},8,["id"])]),_:1})],2),i.createVNode(aL,{operation:n.operation},null,8,["operation"])]}),_:1}),i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createElementVNode("div",VL,[t.value?(i.openBlock(),i.createBlock(c3,{key:0,examples:t.value,operation:n.operation},{header:i.withCtx(()=>{var s;return[i.createVNode(Fu,{class:"example-path",deprecated:(s=n.operation.information)==null?void 0:s.deprecated,path:n.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(qu,{operation:n.operation},null,8,["operation"])]),_:1},8,["examples","operation"])):(i.openBlock(),i.createBlock(aw,{key:1,operation:n.operation},{header:i.withCtx(()=>{var s;return[i.createVNode(Fu,{class:"example-path",deprecated:(s=n.operation.information)==null?void 0:s.deprecated,path:n.operation.path},null,8,["deprecated","path"])]}),footer:i.withCtx(()=>[i.createVNode(qu,{operation:n.operation},null,8,["operation"])]),_:1},8,["operation"])),i.createVNode(i.unref(lw),{operation:n.operation,style:{"margin-top":"12px"}},null,8,["operation"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),cw=U(RL,[["__scopeId","data-v-9cd31f5d"]]),LL={class:"endpoint-details-card"},jL=i.defineComponent({__name:"EndpointDetailsCard",props:{operation:{}},setup(r){const e=r,{parameterMap:t}=qf(e),{responses:n}=zf(e.operation);return(o,s)=>{var a;return i.openBlock(),i.createElementBlock("div",LL,[i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).path},{title:i.withCtx(()=>[i.createTextVNode("Path Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).query},{title:i.withCtx(()=>[i.createTextVNode("Query Parameters")]),_:1},8,["parameters"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(t).header},{title:i.withCtx(()=>[i.createTextVNode("Headers")]),_:1},8,["parameters"]),i.createVNode(Gf,{class:"endpoint-details-card-item",requestBody:(a=o.operation.information)==null?void 0:a.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Body")]),_:1},8,["requestBody"]),i.createVNode(Ut,{class:"endpoint-details-card-item",parameters:i.unref(n)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])])}}}),FL=U(jL,[["__scopeId","data-v-f94bee14"]]),qL={class:"endpoint-header"},zL={class:"endpoint-details"},HL={class:"endpoint-label"},KL={class:"endpoint-label-path"},UL={class:"endpoint-label-name"},WL={class:"endpoint-content"},GL=i.defineComponent({__name:"OperationAccordion",props:{id:{},operation:{}},setup(r){const{copyToClipboard:e}=ws();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(tw),{id:t.id,class:"reference-endpoint",transparent:""},i.createSlots({title:i.withCtx(()=>[i.createElementVNode("h3",qL,[i.createElementVNode("div",zL,[i.createVNode(i.unref(no),{class:"endpoint-type",method:t.operation.httpVerb,short:""},null,8,["method"]),i.createVNode(i.unref(Sn),{id:t.id??"",class:"endpoint-anchor"},{default:i.withCtx(()=>{var o;return[i.createElementVNode("div",HL,[i.createElementVNode("div",KL,[i.createVNode(Fu,{deprecated:(o=t.operation.information)==null?void 0:o.deprecated,path:t.operation.path},null,8,["deprecated","path"])]),i.createElementVNode("div",UL,i.toDisplayString(t.operation.name),1)])]}),_:1},8,["id"])])])]),actions:i.withCtx(({active:o})=>[o?(i.openBlock(),i.createBlock(qu,{key:0,operation:t.operation},null,8,["operation"])):(i.openBlock(),i.createBlock(i.unref(Me),{key:1,class:"endpoint-try-hint",icon:"PaperAirplane"})),i.createVNode(i.unref(Mi),{class:"endpoint-copy",icon:"Clipboard",label:"Copy endpoint URL",size:"sm",variant:"ghost",onClick:n[0]||(n[0]=i.withModifiers(s=>i.unref(e)(t.operation.path),["stop"]))})]),default:i.withCtx(()=>[i.createElementVNode("div",WL,[i.createVNode(FL,{operation:t.operation},null,8,["operation"]),i.createVNode(i.unref(lw),{operation:t.operation},null,8,["operation"]),i.createVNode(aw,{operation:t.operation},null,8,["operation"])])]),_:2},[t.operation.description?{name:"description",fn:i.withCtx(()=>[i.createVNode(i.unref($t),{value:t.operation.description,withImages:""},null,8,["value"])]),key:"0"}:void 0]),1032,["id"]))}}),JL=U(GL,[["__scopeId","data-v-3ee61fb6"]]),YL=i.defineComponent({__name:"ShowMoreButton",props:{id:{}},setup(r){const{setCollapsedSidebarItem:e}=rr();return(t,n)=>(i.openBlock(),i.createElementBlock("button",{class:"show-more",type:"button",onClick:n[0]||(n[0]=o=>i.unref(e)(t.id,!0))},[i.createTextVNode(" Show More "),i.createVNode(i.unref(Me),{class:"show-more-icon",icon:"ChevronDown"})]))}}),dw=U(YL,[["__scopeId","data-v-60a9fbab"]]),XL={class:"endpoints"},QL=["onClick"],ZL=i.defineComponent({__name:"Endpoints",props:{id:{},tag:{}},emits:["observeAndNavigate"],setup(r,{emit:e}){const t=r,n=e,{getOperationId:o,getTagId:s}=lt(),{setCollapsedSidebarItem:a}=rr(),l=d=>{n("observeAndNavigate",d)};async function c(d){l(o(d,t.tag)),a(s(t.tag),!0)}return(d,u)=>(i.openBlock(),i.createBlock(i.unref(ks),{id:d.id,label:d.tag.name.toUpperCase()},{default:i.withCtx(()=>[i.createVNode(i.unref(Ss),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Uf),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(s)(d.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref($t),{value:d.tag.description,withImages:""},null,8,["value"])]),_:1}),i.createVNode(i.unref(Zo),null,{default:i.withCtx(()=>{var h;return[((h=d.tag.operations)==null?void 0:h.length)>0?(i.openBlock(),i.createBlock(i.unref(bn),{key:0,class:"scalar-card-sticky"},{default:i.withCtx(()=>[i.createVNode(i.unref(wn),{muted:""},{default:i.withCtx(()=>[i.createTextVNode("Endpoints")]),_:1}),i.createVNode(i.unref(er),{class:"custom-scroll",muted:""},{default:i.withCtx(()=>[i.createElementVNode("div",XL,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.tag.operations,f=>(i.openBlock(),i.createElementBlock("a",{key:i.unref(o)(f,d.tag),class:"endpoint",onClick:p=>c(f)},[i.createVNode(i.unref(no),{method:f.httpVerb},null,8,["method"]),i.createElementVNode("span",null,i.toDisplayString(f.path),1)],8,QL))),128))])]),_:1})]),_:1})):i.createCommentVNode("",!0)]}),_:1})]),_:1})]),_:1})]),_:1},8,["id","label"]))}}),ej=U(ZL,[["__scopeId","data-v-82b13b6d"]]),tj=(r,e)=>{Xe.useMutationObserver(r,e,{childList:!0,subtree:!0})},rj=i.defineComponent({__name:"Tag",props:{id:{},tag:{},spec:{}},setup(r){const e=r,t=i.ref(null),{collapsedSidebarItems:n}=rr(),{getTagId:o}=lt(),s=d=>{var u;return((u=e.spec.tags)==null?void 0:u.length)!==1||(d==null?void 0:d.name)!=="default"||(d==null?void 0:d.description)!==""},a=d=>{window.location.href=`#${d}`},l=d=>{tj(t,(u,h)=>{u.forEach(f=>{Array.from(f.addedNodes).some(m=>m instanceof HTMLElement&&m.id===d)&&(a(d),h.disconnect())})})},c=d=>{document.getElementById(d)?a(d):l(d)};return(d,u)=>(i.openBlock(),i.createBlock(i.unref(Xi),{ref_key:"sectionContainerRef",ref:t,class:"tag-section-container"},{default:i.withCtx(()=>{var h;return[s(d.tag)?(i.openBlock(),i.createBlock(ej,{key:0,id:d.id,tag:d.tag,onObserveAndNavigate:c},null,8,["id","tag"])):i.createCommentVNode("",!0),!i.unref(n)[i.unref(o)(d.tag)]&&((h=d.tag.operations)==null?void 0:h.length)>1?(i.openBlock(),i.createBlock(dw,{key:1,id:d.id??""},null,8,["id"])):i.renderSlot(d.$slots,"default",{key:2},void 0,!0)]}),_:3},512))}}),uw=U(rj,[["__scopeId","data-v-7fef7ce7"]]),nj=i.defineComponent({__name:"TagAccordion",props:{tag:{},spec:{}},setup(r){const{getTagId:e}=lt();return(t,n)=>(i.openBlock(),i.createBlock(i.unref(rw),{class:"tag-section"},{title:i.withCtx(()=>[i.createVNode(i.unref(kn),{class:"tag-name",level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(e)(t.tag)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.tag.name),1)]),_:1},8,["id"])]),_:1}),i.createVNode(i.unref($t),{class:"tag-description",value:t.tag.description,withImages:""},null,8,["value"])]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}}),oj=U(nj,[["__scopeId","data-v-f11e3b56"]]),sj=i.defineComponent({__name:"Loading",props:{layout:{default:"default"},parsedSpec:{}},setup(r){const e=r,t=i.ref(!1),n=i.ref([]),o=i.ref([]),{getModelId:s,getSectionId:a,getTagId:l,hash:c,isIntersectionEnabled:d}=lt(),u=i.ref(e.layout!=="accordion"&&c.value);i.watch(()=>{var f;return(f=e.parsedSpec.tags)==null?void 0:f.length},f=>{var m,g;if(!c.value||typeof f!="number"||!e.parsedSpec.tags)return;const p=a();if(p.startsWith("tag")){let y=0;const v=((m=e.parsedSpec.tags)==null?void 0:m.findIndex(S=>l(S)===p))??0,b=c.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);if((b==null?void 0:b.length)===4){const S=b[2],x="/"+b[3];y=(g=e.parsedSpec.tags[v])==null?void 0:g.operations.findIndex(({httpVerb:k,path:C})=>S===k&&x===C)}const w=e.parsedSpec.tags[v];if(!w)return;w.name!=="default"&&(t.value=p!==c.value&&p.startsWith("tag")),n.value.push({...w,lazyOperations:w.operations.slice(y,y+2)})}else if(c.value.startsWith("model")){const y=Object.keys(Jt(e.parsedSpec)??{}),[,v]=c.value.toLowerCase().split("/"),b=c.value==="models"?0:y.findIndex(w=>w.toLowerCase()===v);if(b===-1)return;o.value=y.slice(b,b+3)}else _i(c.value),setTimeout(()=>d.value=!0,1e3)},{immediate:!0});const h=ju.on(({id:f})=>{const p=c.value;!p||f!==p||(h(),setTimeout(()=>{typeof window<"u"&&_i(p),u.value=!1,setTimeout(()=>d.value=!0,1e3)},300))});return i.onMounted(()=>{c.value||setTimeout(()=>d.value=!0,1e3)}),(f,p)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["references-loading",{"references-loading-hidden-tag":t.value,"references-loading-top-spacer":n.value.length}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,m=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m.id},[m.operations&&m.operations.length>0?(i.openBlock(),i.createBlock(i.unref(uw),{key:0,spec:f.parsedSpec,tag:m},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.lazyOperations,g=>(i.openBlock(),i.createBlock(i.unref(cw),{key:`${g.httpVerb}-${g.operationId}`,operation:g,tag:m},null,8,["operation","tag"]))),128))]),_:2},1032,["spec","tag"])):i.createCommentVNode("",!0)],64))),128)),o.value.length?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,m=>(i.openBlock(),i.createBlock(i.unref(ks),{key:m,label:m},{default:i.withCtx(()=>{var g;return[(g=i.unref(Jt)(f.parsedSpec))!=null&&g[m]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>{var y;return[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(s)(m)},{default:i.withCtx(()=>{var v;return[i.createTextVNode(i.toDisplayString(((v=i.unref(Jt)(f.parsedSpec))==null?void 0:v[m]).title??m),1)]}),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(Hn),{name:m,noncollapsible:"",value:(y=i.unref(Jt)(f.parsedSpec))==null?void 0:y[m]},null,8,["name","value"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["label"]))),128))]),_:1})):i.createCommentVNode("",!0)],2)),[[i.vShow,u.value]])}}),ij=r=>(i.pushScopeId("data-v-f19478dd"),r=r(),i.popScopeId(),r),aj=ij(()=>i.createElementVNode("div",{id:"models"},null,-1)),lj=i.defineComponent({__name:"Models",props:{schemas:{}},setup(r){const e=r,{collapsedSidebarItems:t}=rr(),{getModelId:n}=lt(),o=i.computed(()=>Object.keys(e.schemas??{}).length<=3||t[n()]),s=i.computed(()=>{const a=Object.keys(e.schemas??{});return o.value?a:a.slice(0,3)});return(a,l)=>a.schemas?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(Il),{id:"models",isLazy:!1},{default:i.withCtx(()=>[aj]),_:1}),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(c,d)=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(n)(c),key:c,isLazy:""},{default:i.withCtx(()=>[i.createVNode(i.unref(ks),{id:i.unref(n)(c),label:c},{default:i.withCtx(()=>[a.schemas[c]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(c)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.schemas[c].title??c),1)]),_:2},1032,["id"])]),_:2},1024),i.createVNode(i.unref(Hn),{name:c,noncollapsible:"",value:a.schemas[c]},null,8,["name","value"]),!o.value&&d===s.value.length-1?(i.openBlock(),i.createBlock(dw,{key:0,id:i.unref(n)(),class:"something-special"},null,8,["id"])):i.createCommentVNode("",!0)]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["id","label"])]),_:2},1032,["id"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),cj=U(lj,[["__scopeId","data-v-f19478dd"]]),dj={key:0,class:"properties"},uj={key:1},hj=i.defineComponent({__name:"ModelsAccordion",props:{schemas:{}},setup(r){const e=r,t=i.computed(()=>e.schemas?Object.entries(e.schemas).map(([o,s])=>({name:o,schema:s})):[]),{getModelId:n}=lt();return(o,s)=>e.schemas?(i.openBlock(),i.createBlock(i.unref(rw),{key:0,class:"reference-models"},{title:i.withCtx(()=>[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createTextVNode("Models")]),_:1})]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,({name:a,schema:l})=>(i.openBlock(),i.createBlock(i.unref(tw),{id:i.unref(n)(a),key:a,label:a},{title:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(a),class:"reference-models-anchor"},{default:i.withCtx(()=>[i.createVNode(i.unref(sw),{class:"reference-models-label",name:a,value:l},null,8,["name","value"])]),_:2},1032,["id"])]),default:i.withCtx(()=>[l!=null&&l.properties?(i.openBlock(),i.createElementBlock("div",dj,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.entries(l.properties),([c,d])=>(i.openBlock(),i.createBlock(i.unref(zn),{key:c,name:c,required:l.required&&!!l.required.length&&l.required.includes(c),value:d},null,8,["name","required","value"]))),128))])):(i.openBlock(),i.createElementBlock("div",uj,[i.createVNode(i.unref(zn),{value:l},null,8,["value"])]))]),_:2},1032,["id","label"]))),128))]),_:1})):i.createCommentVNode("",!0)}}),fj=U(hj,[["__scopeId","data-v-2399f144"]]),pj=i.defineComponent({__name:"Webhook",props:{webhook:{}},setup(r){const e=r,{responses:t}=zf(e.webhook);return(n,o)=>{var s;return n.webhook?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Gf,{requestBody:(s=n.webhook.information)==null?void 0:s.requestBody},{title:i.withCtx(()=>[i.createTextVNode("Payload")]),_:1},8,["requestBody"]),i.createVNode(Ut,{parameters:i.unref(t)},{title:i.withCtx(()=>[i.createTextVNode("Responses")]),_:1},8,["parameters"])],64)):i.createCommentVNode("",!0)}}}),mj=i.defineComponent({__name:"Webhooks",props:{webhooks:{}},setup(r){const e=r,t=i.computed(()=>Object.keys(e.webhooks??{})),{getWebhookId:n}=lt();return(o,s)=>t.value.length?(i.openBlock(),i.createBlock(i.unref(Xi),{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.value,a=>{var l;return i.openBlock(),i.createElementBlock(i.Fragment,{key:a},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys((l=o.webhooks)==null?void 0:l[a]),c=>(i.openBlock(),i.createBlock(i.unref(ks),{id:i.unref(n)(a,c),key:c,label:a},{default:i.withCtx(()=>{var d;return[(d=o.webhooks)!=null&&d[a]?(i.openBlock(),i.createBlock(i.unref(Ss),{key:0},{default:i.withCtx(()=>{var u,h;return[i.createVNode(i.unref(kn),{level:2},{default:i.withCtx(()=>[i.createVNode(i.unref(Sn),{id:i.unref(n)(a,c)},{default:i.withCtx(()=>{var f;return[i.createTextVNode(i.toDisplayString((f=o.webhooks[a][c])==null?void 0:f.name),1)]}),_:2},1032,["id"])]),_:2},1024),(u=o.webhooks[a][c])!=null&&u.description?(i.openBlock(),i.createBlock(i.unref($t),{key:0,value:(h=o.webhooks[a][c])==null?void 0:h.description,withImages:""},null,8,["value"])):i.createCommentVNode("",!0),i.createVNode(pj,{webhook:o.webhooks[a][c]},null,8,["webhook"])]}),_:2},1024)):i.createCommentVNode("",!0)]}),_:2},1032,["id","label"]))),128))],64)}),128))]),_:1})):i.createCommentVNode("",!0)}}),gj=i.createStaticVNode('<div class="section-flare" data-v-6c44c4e3><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div><div class="section-flare-item" data-v-6c44c4e3></div></div>',1),yj={class:"narrow-references-container"},vj=i.defineComponent({__name:"Content",props:{parsedSpec:{},layout:{},baseServerURL:{}},setup(r){const e=r,{getOperationId:t,getTagId:n,hash:o}=lt(),{setServer:s}=ss(),{hideModels:a,collapsedSidebarItems:l}=rr(),c=p=>{if(p.url.match(/^(?!(https?|file):\/\/).+/)){let m=e.baseServerURL??window.location.origin;m=m.replace(/\/$/,"");const g=p.url.startsWith("/")?p.url:`/${p.url}`;p.url=`${m}${g}`.replace(/\/$/,"")}return p};i.watch(()=>e.parsedSpec,p=>{var g,y;let m=[{url:typeof window<"u"?window.location.origin:"/"}];p.servers&&p.servers.length>0?m=p.servers:e.parsedSpec.host&&(m=[{url:`${((g=e.parsedSpec.schemes)==null?void 0:g[0])??"http"}://${e.parsedSpec.host}${((y=e.parsedSpec)==null?void 0:y.basePath)??""}`}]),(e.baseServerURL||typeof window<"u")&&(m=m.map(c)),s({servers:m})},{deep:!0,immediate:!0});const d=i.computed(()=>e.layout==="accordion"?oj:uw),u=i.computed(()=>e.layout==="accordion"?JL:cw),h=i.computed(()=>e.layout==="accordion"?"after":"aside"),f=e.layout!=="accordion"&&!o.value.startsWith("model");return(p,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[gj,i.createElementVNode("div",yj,[i.renderSlot(p.$slots,"start",{},void 0,!0),i.createVNode(i.unref(sj),{layout:p.layout,parsedSpec:p.parsedSpec},null,8,["layout","parsedSpec"]),p.parsedSpec.info.title||p.parsedSpec.info.description?(i.openBlock(),i.createBlock(i.unref(GR),{key:0,info:p.parsedSpec.info,parsedSpec:p.parsedSpec},{[h.value]:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["introduction-cards",{"introduction-cards-row":p.layout==="accordion"}])},[i.createVNode(i.unref(ZV)),i.createVNode(i.unref(hR)),i.createVNode(i.unref(BV),{parsedSpec:p.parsedSpec},null,8,["parsedSpec"])],2)]),_:2},1032,["info","parsedSpec"])):i.renderSlot(p.$slots,"empty-state",{key:1},void 0,!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.parsedSpec.tags,g=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(n)(g),key:i.unref(n)(g),isLazy:i.unref(f)&&!i.unref(l)[i.unref(n)(g)]},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(d.value),{id:i.unref(n)(g),spec:p.parsedSpec,tag:g},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.operations,(y,v)=>(i.openBlock(),i.createBlock(i.unref(Il),{id:i.unref(t)(y,g),key:`${y.httpVerb}-${y.operationId}`,isLazy:v>0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.value),{id:i.unref(t)(y,g),operation:y,tag:g},null,8,["id","operation","tag"]))]),_:2},1032,["id","isLazy"]))),128))]),_:2},1032,["id","spec","tag"]))]),_:2},1032,["id","isLazy"]))),128)),p.parsedSpec.webhooks?(i.openBlock(),i.createBlock(i.unref(mj),{key:2,webhooks:p.parsedSpec.webhooks},null,8,["webhooks"])):i.createCommentVNode("",!0),i.unref(Ah)(p.parsedSpec)&&!i.unref(a)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[p.layout==="accordion"?(i.openBlock(),i.createBlock(i.unref(fj),{key:0,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"])):(i.openBlock(),i.createBlock(i.unref(cj),{key:1,schemas:i.unref(Jt)(p.parsedSpec)},null,8,["schemas"]))],64)):i.createCommentVNode("",!0),i.renderSlot(p.$slots,"end",{},void 0,!0)])],64))}}),hw=U(vj,[["__scopeId","data-v-6c44c4e3"]]),bj=r=>(i.pushScopeId("data-v-391b4e37"),r=r(),i.popScopeId(),r),wj={class:"start custom-scroll"},kj={class:"start-copy"},Sj=i.createStaticVNode('<div class="start-logo" data-v-391b4e37><svg height="36" viewBox="0 0 36 36" width="36" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z" fill="currentColor" fill-rule="evenodd" data-v-391b4e37></path></svg></div><h1 class="start-h1" data-v-391b4e37>Swagger Editor</h1><p class="start-p" data-v-391b4e37> Welcome to the Scalar API References + Swagger Editor, a Free & Open-Source tool that takes your Swagger/OAS file and generates Beautiful API references. </p>',3),xj={class:"start-cta"},Cj={class:"start-row"},Ej=i.createStaticVNode('<div class="start-section start-section-integrations" data-v-391b4e37><div class="start-h2" data-v-391b4e37>INTEGRATIONS</div><a class="start-item" href="https://github.com/scalar/scalar/tree/main/packages/fastify-api-reference#readme" target="_blank" data-v-391b4e37><svg fill="currentColor" height="16" viewBox="0 0 19 16" width="19" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><path d="m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z" fill="currentColor" fill-rule="nonzero" data-v-391b4e37></path></svg><span data-v-391b4e37>Fastify</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#from-a-cdn" target="_blank" data-v-391b4e37><svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g data-v-391b4e37><path d="M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path><path d="M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z" fill="currentColor" data-v-391b4e37></path></g></svg><span data-v-391b4e37>CDN</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-vuejs" target="_blank" data-v-391b4e37><svg height="170" viewBox="0 0 196.3 170" width="196.3" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="currentColor" fill-rule="nonzero" data-v-391b4e37><polygon points="39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171" data-v-391b4e37></polygon><polygon points="75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14" data-v-391b4e37></polygon></g></svg><span data-v-391b4e37>Vue</span></a><a class="start-item" href="https://github.com/scalar/scalar/tree/main#with-react" target="_blank" data-v-391b4e37><svg height="23.3" viewBox="0 0 22 23.3" width="22" xmlns="http://www.w3.org/2000/svg" data-v-391b4e37><g fill="none" fill-rule="evenodd" data-v-391b4e37><circle cx="11" cy="11.6" fill="currentColor" fill-rule="nonzero" r="2" data-v-391b4e37></circle><g stroke="currentColor" data-v-391b4e37><ellipse cx="11" cy="11.6" rx="11" ry="4.2" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(60 11 11.6)" data-v-391b4e37></ellipse><ellipse cx="11" cy="11.6" rx="11" ry="4.2" transform="rotate(120 11 11.6)" data-v-391b4e37></ellipse></g></g></svg><span data-v-391b4e37>React</span></a></div>',1),$j={class:"start-section start-section-colors"},_j=bj(()=>i.createElementVNode("p",{class:"start-h2"},"THEMING",-1)),Nj=["onClick"],Aj=i.createStaticVNode('<p class="start-h1" data-v-391b4e37>Features</p><ul class="start-ul" data-v-391b4e37><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Customize</p> Bring your typography & color palettes, or use our themes! </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Testing</p> A deeply integrated Rest API Client (Also Free & Open-Source) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Search</p> Fully integrated Search (Using fuse.js) </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Hosting</p> Free subdomain hosting on https://apidocumentation.com </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>OpenAPI & Swagger</p> Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0 </li><li data-v-391b4e37><p class="start-h3" data-v-391b4e37>Code Samples</p> Code samples to show off your API in most popular languages </li></ul>',2),Oj=i.defineComponent({__name:"GettingStarted",props:{theme:{}},emits:["changeTheme","loadSwaggerFile","linkSwaggerFile","updateContent"],setup(r,{emit:e}){const t=e,n=["default","alternate","moon","purple","solarized","bluePlanet","saturn","kepler","mars","deepSpace"];async function o(){const s=await fetch("https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml");t("updateContent",await s.text())}return(s,a)=>(i.openBlock(),i.createElementBlock("div",wj,[i.createElementVNode("div",kj,[Sj,i.createElementVNode("div",xj,[i.createVNode(i.unref(pu),{fullWidth:"",onClick:o},{default:i.withCtx(()=>[i.createTextVNode(" Show Example ")]),_:1}),i.createVNode(i.unref(pu),{fullWidth:"",variant:"outlined",onClick:a[0]||(a[0]=l=>s.$emit("loadSwaggerFile"))},{default:i.withCtx(()=>[i.createTextVNode(" Upload File ")]),_:1})])]),i.createElementVNode("div",Cj,[Ej,i.createElementVNode("div",$j,[_j,(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,l=>i.createElementVNode("div",{key:l,class:i.normalizeClass(["start-item",{"start-item-active":l===s.theme}]),onClick:c=>s.$emit("changeTheme",{id:l,label:i.unref(dp)[l]})},i.toDisplayString(i.unref(dp)[l]),11,Nj)),64))])]),Aj]))}}),fw=U(Oj,[["__scopeId","data-v-391b4e37"]]),Tj={class:"references-header"},Bj={key:0,class:"references-navigation t-doc__sidebar"},Pj={class:"references-navigation-list"},Ij={class:"references-editor"},Mj={class:"references-editor-textarea"},Dj={class:"references-rendered"},Vj={key:0,class:"references-footer"},Rj=i.defineComponent({inheritAttrs:!1,__name:"ApiReferenceLayout",props:{configuration:{},parsedSpec:{},rawSpec:{}},emits:["changeTheme","updateContent","loadSwaggerFile","linkSwaggerFile","toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(min-width: 1150px)"),n=i.ref("100dvh"),o=i.ref(null);Xe.useResizeObserver(o,k=>{n.value=k[0].contentRect.height+"px"});const{breadcrumb:s,collapsedSidebarItems:a,isSidebarOpen:l,setCollapsedSidebarItem:c,hideModels:d,setParsedSpec:u}=rr(),{getPathRoutingId:h,getSectionId:f,getTagId:p,hash:m,isIntersectionEnabled:g,pathRouting:y,updateHash:v}=lt();y.value=e.configuration.pathRouting,i.onBeforeMount(()=>v());const b=async k=>{var C;g.value=!1,v(),k?_i(k):(C=o.value)==null||C.scrollTo(0,0),await kr(100),g.value=!0};i.onMounted(()=>{jf.on(({specTitle:k})=>{V1(e.rawSpec,k)}),window.onhashchange=()=>b(decodeURIComponent(window.location.hash.replace(/^#/,""))),window.onpopstate=()=>y.value&&b(h(window.location.pathname))});const w=i.computed(()=>t.value||!e.configuration.isEditable),S=Xe.useDebounceFn(k=>{if((k.target.scrollTop??0)<50){const N=e.configuration.pathRouting?e.configuration.pathRouting.basePath:window.location.pathname;window.history.replaceState({},"",N+window.location.search),m.value=""}}),x=i.computed(()=>({breadcrumb:s.value,spec:e.parsedSpec}));return i.watch(()=>e.parsedSpec,u,{deep:!0}),i.onServerPrefetch(()=>{var C,N;const k=i.useSSRContext();if(k&&((C=k.payload).data||(C.data=Ed()),e.configuration.pathRouting)){const P=h(k.url);m.value=P,k.payload.data.hash=P;for(const M in a)Object.hasOwn(a,M)&&delete a[M];if(P)c(f(P),!0);else{const M=(N=e.parsedSpec.tags)==null?void 0:N[0];M&&c(p(M),!0)}k.payload.data["useSidebarContent-collapsedSidebarItems"]=a}}),Le.provideUseId(()=>{var P;const k=i.getCurrentInstance(),C="scalar-instance-id";if(!k)return C;let N=k.uid;return typeof window>"u"?(k.attrs||(k.attrs={}),k.attrs[C]=N):(P=k.vnode.el)!=null&&P.getAttribute&&(N=k.vnode.el.getAttribute(C)),`${C}-${N}`}),i.provide(Tc,()=>e.parsedSpec.security),i.provide(Lf,()=>e.configuration.hideDownloadButton),d.value=e.configuration.hideModels??!1,e.configuration,(k,C)=>{var N,P;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(i.unref(Yg),{id:(N=k.configuration)==null?void 0:N.theme,withDefaultFonts:(P=k.configuration)==null?void 0:P.withDefaultFonts},null,8,["id","withDefaultFonts"]),i.createVNode(i.unref(Qg),null,{default:i.withCtx(({styles:M})=>[i.createVNode(i.unref(ak),null,{default:i.withCtx(({styles:j})=>{var I,X;return[i.createElementVNode("div",{ref_key:"documentEl",ref:o,class:i.normalizeClass(["scalar-api-reference references-layout",[{"references-editable":k.configuration.isEditable,"references-sidebar":k.configuration.showSidebar,"references-sidebar-mobile-open":i.unref(l),"references-classic":k.configuration.layout==="classic"},M,j,k.$attrs.class]]),style:i.normalizeStyle({"--full-height":n.value}),onScrollPassive:C[4]||(C[4]=(...W)=>i.unref(S)&&i.unref(S)(...W))},[i.createElementVNode("div",Tj,[i.renderSlot(k.$slots,"header",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),k.configuration.showSidebar?(i.openBlock(),i.createElementBlock("aside",Bj,[i.createElementVNode("div",Pj,[i.createVNode(i.unref(Hf),{parsedSpec:k.parsedSpec},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec"])])])):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",Ij,[i.createElementVNode("div",Mj,[i.renderSlot(k.$slots,"editor",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])],512),[[i.vShow,k.configuration.isEditable]]),w.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",Dj,[i.createVNode(i.unref(hw),{baseServerURL:k.configuration.baseServerURL,layout:k.configuration.layout==="classic"?"accordion":"default",parsedSpec:k.parsedSpec},i.createSlots({start:i.withCtx(()=>[i.renderSlot(k.$slots,"content-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),end:i.withCtx(()=>[i.renderSlot(k.$slots,"content-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:2},[(I=k.configuration)!=null&&I.isEditable?{name:"empty-state",fn:i.withCtx(()=>{var W;return[i.createVNode(fw,{theme:((W=k.configuration)==null?void 0:W.theme)||"default",onChangeTheme:C[0]||(C[0]=te=>k.$emit("changeTheme",te)),onLinkSwaggerFile:C[1]||(C[1]=te=>k.$emit("linkSwaggerFile")),onLoadSwaggerFile:C[2]||(C[2]=te=>k.$emit("loadSwaggerFile")),onUpdateContent:C[3]||(C[3]=te=>k.$emit("updateContent",te))},null,8,["theme"])]}),key:"0"}:void 0]),1032,["baseServerURL","layout","parsedSpec"])]),k.$slots.footer?(i.openBlock(),i.createElementBlock("div",Vj,[i.renderSlot(k.$slots,"footer",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),i.createVNode(G1,{parsedSpec:k.parsedSpec,proxyUrl:(X=k.configuration)==null?void 0:X.proxy},{"sidebar-start":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-start",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),"sidebar-end":i.withCtx(()=>[i.renderSlot(k.$slots,"sidebar-end",i.normalizeProps(i.guardReactiveProps(x.value)),void 0,!0)]),_:3},8,["parsedSpec","proxyUrl"])],38)]}),_:2},1024)]),_:3}),i.createVNode(i.unref(B5))],64)}}}),Jf=U(Rj,[["__scopeId","data-v-ce46649f"]]),Lj={},jj={class:"references-classic-header-container"},Fj={class:"references-classic-header"};function qj(r,e){return i.openBlock(),i.createElementBlock("div",jj,[i.createElementVNode("div",Fj,[i.renderSlot(r.$slots,"default",{},void 0,!0),i.renderSlot(r.$slots,"dark-mode-toggle",{},void 0,!0)])])}const zj=U(Lj,[["render",qj],["__scopeId","data-v-a860f78f"]]),Hj=r=>(i.pushScopeId("data-v-559a0a79"),r=r(),i.popScopeId(),r),Kj={class:"darklight-reference"},Uj={key:0},Wj={key:1},Gj=Hj(()=>i.createElementVNode("a",{class:"darklight-reference-promo",href:"https://www.scalar.com",target:"_blank"}," Powered by scalar.com ",-1)),Jj=i.defineComponent({__name:"DarkModeToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("div",Kj,[i.createElementVNode("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:"LightDarkModeToggle"}),e.isDarkMode?(i.openBlock(),i.createElementBlock("span",Uj,"Light Mode")):(i.openBlock(),i.createElementBlock("span",Wj,"Dark Mode"))]),Gj]))}}),pw=U(Jj,[["__scopeId","data-v-559a0a79"]]),Yj=i.defineComponent({__name:"DarkModeIconToggle",props:{isDarkMode:{type:Boolean}},emits:["toggleDarkMode"],setup(r){return(e,t)=>(i.openBlock(),i.createElementBlock("button",{class:"darklight",type:"button",onClick:t[0]||(t[0]=n=>e.$emit("toggleDarkMode"))},[i.createVNode(i.unref(Me),{icon:e.isDarkMode?"DarkMode":"LightMode"},null,8,["icon"]),i.createVNode(ow,null,{default:i.withCtx(()=>[i.createTextVNode(" Switch to "+i.toDisplayString(e.isDarkMode?"Light":"Dark")+" Mode ",1)]),_:1})]))}}),mw=U(Yj,[["__scopeId","data-v-8f61ca56"]]);function Xj(r,e){let t=r;const n=e.required&&e.required.includes(r);return t+=n?" REQUIRED ":" optional ",e.properties[r]&&(t+=e.properties[r].type,e.properties[r].description&&(t+=" "+e.properties[r].description)),t}function Qj(r){var n;const e=["Body"],t=(n=r==null?void 0:r.schema)==null?void 0:n.properties;return t&&Object.keys(t).forEach(o=>{if(!r.schema)return;e.push(Xj(o,r.schema));const s=t[o];s.type==="object"&&!!s.properties&&s.properties&&Object.keys(s.properties).forEach(l=>{var c,d;e.push(`${l} ${(d=(c=s.properties)==null?void 0:c[l])==null?void 0:d.type}`)})}),e}function Zj(r){var e,t,n;try{const o=(n=(t=(e=r==null?void 0:r.information)==null?void 0:e.requestBody)==null?void 0:t.content)==null?void 0:n["application/json"];if(!o)throw new Error("Body not found");return Qj(o)}catch{return!1}}const e4=r=>(i.pushScopeId("data-v-8395f85c"),r=r(),i.popScopeId(),r),t4=e4(()=>i.createElementVNode("div",{class:"ref-search-meta"},[i.createElementVNode("span",null,"↑↓ Navigate"),i.createElementVNode("span",null,"⏎ Select")],-1)),r4=i.defineComponent({__name:"SearchModal",props:{parsedSpec:{},modalState:{}},setup(r){const e=r,t=i.toRef(e,"parsedSpec"),n={heading:"DocsPage",model:"JsonObject",req:"Terminal",tag:"CodeFolder",webhook:"Terminal"},o=Xe.useMagicKeys(),s=i.ref([]),a=i.ref([]),l=i.ref(0),c=i.ref(""),d=i.ref(null),u=new Fw(s.value,{keys:["title","description","body"]}),h=()=>{l.value=0,a.value=u.search(c.value)},f=i.computed(()=>S.value[l.value]),{getHeadingId:p,getWebhookId:m,getModelId:g,getOperationId:y,getTagId:v}=lt();i.watch(()=>e.modalState.open,N=>{N&&(c.value="",l.value=0,a.value=[])});const{setCollapsedSidebarItem:b,hideModels:w}=rr();i.watch(t.value,async()=>{var W,te,me,ke,Se;if(s.value=[],!((te=(W=e.parsedSpec)==null?void 0:W.tags)!=null&&te.length)&&!((me=e.parsedSpec)!=null&&me.webhooks)){u.setCollection([]);return}const N=[],P=await ki(((ke=e.parsedSpec.info)==null?void 0:ke.description)??"");P.length&&(P.forEach(se=>{N.push({type:"heading",title:`Info > ${se.value}`,description:"",href:`#${p(se)}`,tag:se.slug,body:""})}),s.value=s.value.concat(N)),(Se=e.parsedSpec.tags)==null||Se.forEach(se=>{const q={title:se.name,href:`#${v(se)}`,description:se.description,type:"tag",tag:se.name,body:""};s.value.push(q),se.operations&&se.operations.forEach(T=>{const{parameterMap:V}=qf({operation:T}),D=Zj(T)||V.value;let E=null;typeof D!="boolean"&&(E=D);const A={type:"req",title:T.name??T.path,href:`#${y(T,se)}`,operationId:T.operationId,description:T.description??"",httpVerb:T.httpVerb,path:T.path,tag:se.name,operation:T};E&&(A.body=E),s.value.push(A)})});const M=e.parsedSpec.webhooks,j=[];M&&Object.keys(M).forEach(se=>{Object.keys(M[se]).forEach(T=>{var V;j.push({type:"webhook",title:`Webhook: ${(V=M[se][T])==null?void 0:V.name}`,href:`#${m(se,T)}`,description:se,httpVerb:T,tag:se,body:""})}),s.value=s.value.concat(j)});const I=w.value?{}:Jt(e.parsedSpec),X=[];I&&(Object.keys(I).forEach(se=>{X.push({type:"model",title:"Model",href:`#${g(se)}`,description:I[se].title??se,tag:se,body:""})}),s.value=s.value.concat(X)),u.setCollection(s.value)},{immediate:!0}),Xe.whenever(o.enter,()=>{e.modalState.open&&window&&(k(f.value),window.location.hash=f.value.item.href,e.modalState.hide())}),Xe.whenever(o.ArrowDown,()=>{var N;e.modalState.open&&window&&(l.value<S.value.length-1?l.value++:l.value=0,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))}),Xe.whenever(o.ArrowUp,()=>{var N;e.modalState.open&&window&&(l.value>0?l.value--:l.value=S.value.length-1,(N=document.getElementById(f.value.item.href))==null||N.scrollIntoView({behavior:"smooth",block:"center"}))});const S=i.computed(()=>c.value.length===0?s.value.map(N=>({item:N})):a.value),x=/#(tag\/[^/]*)/,k=N=>{let P="models";const M=N.item.href.match(x);M!=null&&M.length&&M.length>1&&(P=M[1]),b(P,!0),e.modalState.hide()};function C(N){const P=new URL(window.location.href);return P.hash=N,P.toString()}return(N,P)=>(i.openBlock(),i.createBlock(i.unref(iv),{state:N.modalState,variant:"search"},{default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"searchModalRef",ref:d,class:"ref-search-container"},[i.createVNode(i.unref(b$),{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=M=>c.value=M),onInput:h},null,8,["modelValue"])],512),i.createVNode(i.unref(x$),{class:"ref-search-results custom-scroll",noResults:!S.value.length},{query:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,(M,j)=>(i.openBlock(),i.createBlock(i.unref(T$),{id:M.item.href,key:M.refIndex,active:l.value===j,href:C(M.item.href),icon:n[M.item.type],onClick:I=>k(M),onFocus:I=>l.value=j},i.createSlots({default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.title)+" ",1)]),_:2},[(M.item.httpVerb||M.item.path)&&M.item.path!==M.item.title?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.path),1)]),key:"0"}:M.item.description?{name:"description",fn:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.item.description),1)]),key:"1"}:void 0,M.item.type==="req"?{name:"addon",fn:i.withCtx(()=>[i.createVNode(W1,{method:M.item.httpVerb??"get"},null,8,["method"])]),key:"2"}:void 0]),1032,["id","active","href","icon","onClick","onFocus"]))),128))]),_:1},8,["noResults"]),t4]),_:1},8,["state"]))}}),gw=U(r4,[["__scopeId","data-v-8395f85c"]]),n4=r=>(i.pushScopeId("data-v-edb0a931"),r=r(),i.popScopeId(),r),o4={class:"sidebar-search-input"},s4=n4(()=>i.createElementVNode("span",{class:"sidebar-search-placeholder"},"Search",-1)),i4={class:"sidebar-search-shortcut"},a4={class:"sidebar-search-key"},l4=i.defineComponent({__name:"SearchButton",props:{spec:{},searchHotKey:{default:"k"}},setup(r){const e=r,t=av(),n=Xe.useMagicKeys({passive:!1,onEventFired(o){!Ka()&&o.ctrlKey&&o.key===e.searchHotKey&&(o.preventDefault(),o.stopPropagation())}});return Xe.whenever(n[`${Ka()?"meta":"control"}_${e.searchHotKey}`],()=>t.open?t.hide():t.show()),(o,s)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("button",{class:i.normalizeClass(["sidebar-search",o.$attrs.class]),type:"button",onClick:s[0]||(s[0]=(...a)=>i.unref(t).show&&i.unref(t).show(...a))},[i.createVNode(i.unref(Me),{class:"search-icon",icon:"Search",size:"sm"}),i.createElementVNode("div",o4,[s4,i.createElementVNode("span",i4,[i.createElementVNode("span",a4,i.toDisplayString(i.unref(Ka)()?"⌘":"⌃")+i.toDisplayString(o.searchHotKey),1)])])],2),i.createVNode(gw,{modalState:i.unref(t),parsedSpec:o.spec},null,8,["modalState","parsedSpec"])],64))}}),Yf=U(l4,[["__scopeId","data-v-edb0a931"]]),c4=i.defineComponent({__name:"ClassicLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=i.computed(()=>({...e.configuration,showSidebar:!1}));return(n,o)=>(i.openBlock(),i.createBlock(Jf,{configuration:t.value,parsedSpec:n.parsedSpec,rawSpec:n.rawSpec},{"content-start":i.withCtx(({spec:s})=>[i.createVNode(zj,null,{"dark-mode-toggle":i.withCtx(()=>[i.createVNode(i.unref(mw),{isDarkMode:n.isDark,onToggleDarkMode:o[0]||(o[0]=a=>n.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),default:i.withCtx(()=>[i.createVNode(Yf,{class:"t-doc__sidebar",searchHotKey:t.value.searchHotKey,spec:s},null,8,["searchHotKey","spec"])]),_:2},1024)]),"content-end":i.withCtx(()=>[i.renderSlot(n.$slots,"footer")]),_:3},8,["configuration","parsedSpec","rawSpec"]))}}),d4={class:"references-mobile-header t-doc__header"},u4={class:"references-mobile-breadcrumbs"},h4={class:"references-mobile-header-actions"},f4=i.defineComponent({__name:"MobileHeader",props:{open:{type:Boolean}},emits:["update:open"],setup(r){const{breadcrumb:e}=rr();return(t,n)=>(i.openBlock(),i.createElementBlock("div",d4,[i.createVNode(i.unref(Mi),{icon:t.open?"Close":"Menu",label:t.open?"Close Menu":"Open Menu",size:"md",onClick:n[0]||(n[0]=o=>t.$emit("update:open",!t.open))},null,8,["icon","label"]),i.createElementVNode("span",u4,i.toDisplayString(i.unref(e)),1),i.createElementVNode("div",h4,[i.renderSlot(t.$slots,"actions",{},void 0,!0)])]))}}),p4=U(f4,[["__scopeId","data-v-0242e3de"]]),m4={class:"scalar-api-references-standalone-search"},g4=i.defineComponent({__name:"ModernLayout",props:{configuration:{},parsedSpec:{},rawSpec:{},isDark:{type:Boolean}},emits:["toggleDarkMode"],setup(r){const e=r,t=Xe.useMediaQuery("(max-width: 1000px)"),{isSidebarOpen:n}=rr();i.watch(t,(s,a)=>{s&&!a&&(n.value=!1)});const{hash:o}=lt();return i.watch(o,(s,a)=>{s&&s!==a&&(n.value=!1)}),(s,a)=>(i.openBlock(),i.createBlock(Jf,{class:i.normalizeClass({"scalar-api-references-standalone-mobile":s.configuration.showSidebar}),configuration:s.configuration,parsedSpec:s.parsedSpec,rawSpec:s.rawSpec},{header:i.withCtx(()=>[e.configuration.showSidebar?(i.openBlock(),i.createBlock(p4,{key:0,open:i.unref(n),"onUpdate:open":a[0]||(a[0]=l=>i.isRef(n)?n.value=l:null)},null,8,["open"])):i.createCommentVNode("",!0)]),"sidebar-start":i.withCtx(({spec:l})=>{var c;return[i.createElementVNode("div",m4,[i.createVNode(Yf,{searchHotKey:(c=e.configuration)==null?void 0:c.searchHotKey,spec:l},null,8,["searchHotKey","spec"])])]}),"sidebar-end":i.withCtx(()=>[i.createVNode(i.unref(pw),{isDarkMode:s.isDark,onToggleDarkMode:a[1]||(a[1]=l=>s.$emit("toggleDarkMode"))},null,8,["isDarkMode"])]),"content-end":i.withCtx(()=>[i.renderSlot(s.$slots,"footer",{},void 0,!0)]),_:3},8,["class","configuration","parsedSpec","rawSpec"]))}}),yw=U(g4,[["__scopeId","data-v-333fecad"]]),y4={modern:yw,classic:c4},v4=i.defineComponent({__name:"ApiReference",props:{configuration:{}},emits:["updateContent"],setup(r){var h,f;const e=r,{toggleDarkMode:t,isDark:n}=P5((h=e.configuration)==null?void 0:h.darkMode),o=i.computed(()=>{var p,m;if((p=e.configuration)!=null&&p.customCss)return ck((m=e.configuration)==null?void 0:m.customCss)});i.watch(o,()=>console.log(o.value));const s=i.computed(()=>{var p;return{spec:{content:void 0,url:void 0,...(p=e.configuration)==null?void 0:p.spec},proxy:void 0,theme:"default",showSidebar:!0,isEditable:!1,...e.configuration,customCss:o.value}});(f=s.value)!=null&&f.metaData&&(cp.createHead(),cp.useSeoMeta(s.value.metaData));function a(p,m){i.watch(()=>{var g;return(g=s.value)==null?void 0:g[p]},g=>{typeof g<"u"&&m(g)},{immediate:!0})}const{setAuthentication:l}=rs();a("authentication",l);const{setExcludedClients:c}=Ji();a("hiddenClients",c);const{parsedSpec:d,rawSpec:u}=z1({proxy:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.proxy)||""}),specConfig:i.toRef(()=>{var p;return((p=e.configuration)==null?void 0:p.spec)||{}})});return(p,m)=>{var g,y;return i.openBlock(),i.createElementBlock(i.Fragment,null,[(g=s.value)!=null&&g.customCss?(i.openBlock(),i.createBlock(i.resolveDynamicComponent("style"),{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(s.value.customCss),1)]),_:1})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(y4)[((y=s.value)==null?void 0:y.layout)||"modern"]),{configuration:s.value,isDark:i.unref(n),parsedSpec:i.unref(d),rawSpec:i.unref(u),onToggleDarkMode:m[0]||(m[0]=()=>i.unref(t)()),onUpdateContent:m[1]||(m[1]=v=>p.$emit("updateContent",v))},{footer:i.withCtx(()=>[i.renderSlot(p.$slots,"footer")]),_:3},40,["configuration","isDark","parsedSpec","rawSpec"]))],64)}}});exports.Annotation=oo;exports.ApiClientModal=G1;exports.ApiReferenceLayout=Jf;exports.Card=bn;exports.CardContent=er;exports.CardFooter=Yi;exports.CardHeader=wn;exports.CardTab=Z1;exports.CardTabHeader=Q1;exports.Content=hw;exports.DarkModeIconToggle=mw;exports.DarkModeToggle=pw;exports.Decoration=Be;exports.DefaultBufferLength=Dy;exports.EditorSelection=Y;exports.EditorView=ue;exports.Facet=Z;exports.FlowModal=iv;exports.GLOBAL_SECURITY_SYMBOL=Tc;exports.GettingStarted=fw;exports.HIDE_DOWNLOAD_BUTTON_SYMBOL=Lf;exports.LRLanguage=pl;exports.LanguageSupport=GC;exports.Me=pu;exports.ModernLayout=yw;exports.NodeProp=fe;exports.NodeSet=hh;exports.NodeType=pt;exports.NodeWeakMap=AC;exports.Parser=jy;exports.Prec=Fl;exports.Pt=Nr;exports.RangeSet=be;exports.RangeValue=Gn;exports.SearchButton=Yf;exports.SearchModal=gw;exports.SecurityScheme=Bv;exports.SecuritySchemeSelector=Pv;exports.Sidebar=Hf;exports.StateEffect=We;exports.StateField=qr;exports.Text=we;exports.Transaction=rt;exports.Tree=He;exports.V=Me;exports.ViewPlugin=Vt;exports.WidgetType=ns;exports._export_sfc=U;exports._sfc_main=Yg;exports._sfc_main$1=no;exports._sfc_main$2=v4;exports.bracketMatching=b2;exports.bracketMatchingHandle=sv;exports.clickGeneratedParameter=T2;exports.codePointAt=Io;exports.codePointSize=sl;exports.combineConfig=zl;exports.contentType=$h;exports.continuedIndent=s2;exports.countColumn=oh;exports.createEmptyAuthenticationState=h0;exports.createEmptyOpenApiState=p0;exports.createEmptyServerState=Fv;exports.createPlaceholderRequest=m0;exports.customTheme=$2;exports.deepMerge=Dv;exports.defaultHighlightStyle=h2;exports.defineLanguageFacet=Ky;exports.delimitedIndent=n2;exports.downloadSpecBus=jf;exports.downloadSpecFile=V1;exports.encodeStringAsBase64=lv;exports.findVariables=cv;exports.flatIndent=o2;exports.foldInside=c2;exports.foldNodeProp=l2;exports.fromCodePoint=nS;exports.getApiClientRequest=_h;exports.getBase64Token=bh;exports.getHeadingsFromMarkdown=ki;exports.getIndentUnit=Gy;exports.getLowestHeadingLevel=Xl;exports.getModels=Jt;exports.getRequestFromAuthentication=vh;exports.getSecretCredentialsFromAuthentication=dv;exports.getTooltip=mC;exports.getUrlFromServerState=wl;exports.getVariableNames=a_;exports.hasModels=Ah;exports.hasSecuritySchemes=Vv;exports.hasWebhooks=Rv;exports.highlightSpecialChars=sC;exports.indentNodeProp=Xy;exports.indentOnInput=a2;exports.indentString=Jy;exports.indentUnit=gh;exports.isJsonString=c0;exports.isMacOS=Ka;exports.isRequestMethod=$d;exports.isValidUrl=Lv;exports.keymap=Ty;exports.lineNumbers=SC;exports.logException=Br;exports.mapFromObject=l_;exports.mergeAllObjects=c_;exports.objectMerge=jv;exports.openClientFor=kl;exports.parse=D1;exports.parseMixed=TC;exports.replaceVariables=Nh;exports.requestMethodAbbreviations=b0;exports.requestMethodColors=v0;exports.scrollToId=_i;exports.showTooltip=Iy;exports.sleep=kr;exports.splitMarkdownInSections=R1;exports.styleTags=qy;exports.sublanguageProp=Uy;exports.syntaxHighlighting=tv;exports.syntaxTree=mn;exports.tags=F;exports.useApiClientStore=Ml;exports.useAuthenticationStore=rs;exports.useHttpClientStore=Bc;exports.useModal=av;exports.useOpenApiStore=Qu;exports.useReactiveSpec=z1;exports.useRequestStore=y0;exports.useServerStore=ss;exports.validRequestMethods=eh;exports.variables=_2;
|