=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}Dp.tokenize=u((function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n=p)return!1;if(h=s,(l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?s=l.pos:c="",h=s;s=p||41!==e.src.charCodeAt(s))&&(m=!0),s++}if(m){if(void 0===e.env.references)return!1;if(s
=0?i=e.src.slice(h,s++):s=o+1):s=o+1,i||(i=e.src.slice(a,o)),!(u=e.env.references[Rp(i)]))return e.pos=f,!1;c=u.href,d=u.title}return t||(e.pos=a,e.posMax=o,e.push("link_open","a",1).attrs=n=[["href",c]],d&&n.push(["title",d]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=s,e.posMax=p,!0}),"link"),jp=dd.normalizeReference,Vp=dd.isSpace,Up=u((function(e,t){var n,r,i,o,a,s,l,u,c,d,f,p,h,m="",g=e.pos,v=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(s=e.pos+2,(a=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=a+1)=v)return!1;for(h=l,(c=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(m=e.md.normalizeLink(c.str),e.md.validateLink(m)?l=c.pos:m=""),h=l;l=v||41!==e.src.charCodeAt(l))return e.pos=g,!1;l++}else{if(void 0===e.env.references)return!1;if(l=0?o=e.src.slice(h,l++):l=a+1):l=a+1,o||(o=e.src.slice(s,a)),!(u=e.env.references[jp(o)]))return e.pos=g,!1;m=u.href,d=u.title}return t||(i=e.src.slice(s,a),e.md.inline.parse(i,e.md,e.env,p=[]),(f=e.push("image","img",0)).attrs=n=[["src",m],["alt",""]],f.children=p,f.content=i,d&&n.push(["title",d])),e.pos=l,e.posMax=v,!0}),"image"),Bp=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,$p=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,qp=u((function(e,t){var n,r,i,o,a,s,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(a=e.pos,s=e.posMax;;){if(++l>=s)return!1;if(60===(o=e.src.charCodeAt(l)))return!1;if(62===o)break}return n=e.src.slice(a+1,l),$p.test(n)?(r=e.md.normalizeLink(n),!!e.md.validateLink(r)&&(t||((i=e.push("link_open","a",1)).attrs=[["href",r]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(n),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=n.length+2,!0)):!!Bp.test(n)&&(r=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(r)&&(t||((i=e.push("link_open","a",1)).attrs=[["href",r]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(n),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=n.length+2,!0))}),"autolink"),Hp=tp.HTML_TAG_RE;function Gp(e){var t=32|e;return t>=97&&t<=122}u(Gp,"isLetter");var Wp=u((function(e,t){var n,r,i,o=e.pos;return!(!e.md.options.html||(i=e.posMax,60!==e.src.charCodeAt(o)||o+2>=i||33!==(n=e.src.charCodeAt(o+1))&&63!==n&&47!==n&&!Gp(n)||!(r=e.src.slice(o).match(Hp))||(t||(e.push("html_inline","",0).content=e.src.slice(o,o+r[0].length)),e.pos+=r[0].length,0)))}),"html_inline"),zp=fd,Kp=dd.has,Qp=dd.isValidEntityCode,Yp=dd.fromCodePoint,Jp=/^((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Xp=/^&([a-z][a-z0-9]{1,31});/i,Zp=u((function(e,t){var n,r,i=e.pos,o=e.posMax;if(38!==e.src.charCodeAt(i))return!1;if(i+1a;r-=o.jump+1)if((o=t[r]).marker===i.marker&&o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(l=!0)),!l)){u=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+u,i.open=!1,o.end=n,o.jump=u,o.close=!1,s=-1;break}-1!==s&&(c[i.marker][(i.open?3:0)+(i.length||0)%3]=s)}}u(eh,"processDelimiters");var th=u((function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(eh(0,e.delimiters),t=0;t0&&r++,"text"===i[t].type&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},sh.prototype.scanDelims=function(e,t){var n,r,i,o,a,s,l,u,c,d=e,f=!0,p=!0,h=this.posMax,m=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;d=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},fh.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i<|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),"re");function mh(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function gh(e){return Object.prototype.toString.call(e)}function vh(e){return"[object String]"===gh(e)}function yh(e){return"[object Object]"===gh(e)}function bh(e){return"[object RegExp]"===gh(e)}function Eh(e){return"[object Function]"===gh(e)}function Th(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}u(mh,"assign"),u(gh,"_class"),u(vh,"isString"),u(yh,"isObject"),u(bh,"isRegExp"),u(Eh,"isFunction"),u(Th,"escapeRE");var wh={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Ch(e){return Object.keys(e||{}).reduce((function(e,t){return e||wh.hasOwnProperty(t)}),!1)}u(Ch,"isOptionsObj");var xh={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Sh="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Nh(e){e.__index__=-1,e.__text_cache__=""}function kh(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function _h(){return function(e,t){t.normalize(e)}}function Oh(e){var t=e.re=hh(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(t.src_xn),t.src_tlds=n.join("|"),u(r,"untpl"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var i=[];function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},u(o,"schemaError"),Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,yh(n))return bh(n.validate)?r.validate=kh(n.validate):Eh(n.validate)?r.validate=n.validate:o(t,n),void(Eh(n.normalize)?r.normalize=n.normalize:n.normalize?o(t,n):r.normalize=function(e,t){t.normalize(e)});vh(n)?i.push(t):o(t,n)}})),i.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var a=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(Th).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Nh(e)}function Ih(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Lh(e,t){var n=new Ih(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Ah(e,t){if(!(this instanceof Ah))return new Ah(e,t);t||Ch(e)&&(t=e,e={}),this.__opts__=mh({},wh,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=mh({},xh,e),this.__compiled__={},this.__tlds__=Sh,this.__tlds_replaced__=!1,this.re={},Oh(this)}u(Nh,"resetScanCache"),u(kh,"createValidator"),u(_h,"createNormalizer"),u(Oh,"compile"),u(Ih,"Match"),u(Lh,"createMatch"),u(Ah,"LinkifyIt$1"),Ah.prototype.add=u((function(e,t){return this.__schemas__[e]=t,Oh(this),this}),"add"),Ah.prototype.set=u((function(e){return this.__opts__=mh(this.__opts__,e),this}),"set"),Ah.prototype.test=u((function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0}),"test"),Ah.prototype.pretest=u((function(e){return this.re.pretest.test(e)}),"pretest"),Ah.prototype.testSchemaAt=u((function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0}),"testSchemaAt"),Ah.prototype.match=u((function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(Lh(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(Lh(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null}),"match"),Ah.prototype.tlds=u((function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),Oh(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Oh(this),this)}),"tlds"),Ah.prototype.normalize=u((function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)}),"normalize"),Ah.prototype.onCompile=u((function(){}),"onCompile");var Dh=Ah;const Mh=2147483647,Rh=/^xn--/,Fh=/[^\0-\x7E]/,Ph=/[\x2E\u3002\uFF0E\uFF61]/g,jh={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Vh=Math.floor,Uh=String.fromCharCode;function Bh(e){throw new RangeError(jh[e])}function $h(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function qh(e,t){const n=e.split("@");let r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+$h((e=e.replace(Ph,".")).split("."),t).join(".")}function Hh(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),"ucs2encode"),Wh=u((function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36}),"basicToDigit"),zh=u((function(e,t){return e+22+75*(e<26)-((0!=t)<<5)}),"digitToBasic"),Kh=u((function(e,t,n){let r=0;for(e=n?Vh(e/700):e>>1,e+=Vh(e/t);e>455;r+=36)e=Vh(e/35);return Vh(r+36*e/(e+38))}),"adapt"),Qh=u((function(e){const t=[],n=e.length;let r=0,i=128,o=72,a=e.lastIndexOf("-");a<0&&(a=0);for(let n=0;n=128&&Bh("not-basic"),t.push(e.charCodeAt(n));for(let s=a>0?a+1:0;s=n&&Bh("invalid-input");const a=Wh(e.charCodeAt(s++));(a>=36||a>Vh((Mh-r)/t))&&Bh("overflow"),r+=a*t;const l=i<=o?1:i>=o+26?26:i-o;if(aVh(Mh/u)&&Bh("overflow"),t*=u}const l=t.length+1;o=Kh(r-a,l,0==a),Vh(r/l)>Mh-i&&Bh("overflow"),i+=Vh(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)}),"decode"),Yh=u((function(e){const t=[];let n=(e=Hh(e)).length,r=128,i=0,o=72;for(const n of e)n<128&&t.push(Uh(n));let a=t.length,s=a;for(a&&t.push("-");s=r&&tVh((Mh-i)/l)&&Bh("overflow"),i+=(n-r)*l,r=n;for(const n of e)if(nMh&&Bh("overflow"),n==r){let e=i;for(let n=36;;n+=36){const r=n<=o?1:n>=o+26?26:n-o;if(e=0))try{t.hostname=um.toASCII(t.hostname)}catch(e){}return lm.encode(lm.format(t))}function gm(e){var t=lm.parse(e,!0);if(t.hostname&&(!t.protocol||hm.indexOf(t.protocol)>=0))try{t.hostname=um.toUnicode(t.hostname)}catch(e){}return lm.decode(lm.format(t),lm.decode.defaultChars+"%")}function vm(e,t){if(!(this instanceof vm))return new vm(e,t);t||tm.isString(e)||(t=e||{},e="default"),this.inline=new am,this.block=new om,this.core=new im,this.renderer=new rm,this.linkify=new sm,this.validateLink=pm,this.normalizeLink=mm,this.normalizeLinkText=gm,this.utils=tm,this.helpers=tm.assign({},nm),this.options={},this.configure(e),t&&this.set(t)}u(mm,"normalizeLink"),u(gm,"normalizeLinkText"),u(vm,"MarkdownIt"),vm.prototype.set=function(e){return tm.assign(this.options,e),this},vm.prototype.configure=function(e){var t,n=this;if(tm.isString(e)&&!(e=cm[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},vm.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},vm.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},vm.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},vm.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},vm.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},vm.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},vm.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const ym=new vm({breaks:!0,linkify:!0}),bm=(0,t.forwardRef)((e,t)=>{let{children:n,onlyShowFirstChild:r,type:i,...o}=e;return te("div",{...o,ref:t,className:jr("graphiql-markdown-"+i,r?" graphiql-markdown-preview":"",o.className),dangerouslySetInnerHTML:{__html:ym.render(n)}})});e.ay=bm,bm.displayName="MarkdownContent";const Em=(0,t.forwardRef)((e,t)=>te("div",{...e,ref:t,className:jr("graphiql-spinner",e.className)}));function Tm(e){var t,n,r=Qr(e),i=r.defaultView||window;return r?{width:null!=(t=r.documentElement.clientWidth)?t:i.innerWidth,height:null!=(n=r.documentElement.clientHeight)?n:i.innerHeight}:{width:0,height:0}}function wm(){return(wm=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}e.az=Em,Em.displayName="Spinner",u(Tm,"getDocumentDimensions"),u(wm,"_extends$1"),u(Cm,"_objectWithoutPropertiesLoose$1");var xm,Sm,Nm,km,_m,Om,Im,Lm,Am,Dm,Mm=["children","label","ariaLabel","id","DEBUG_STYLE"],Rm=["label","ariaLabel","isVisible","id"],Fm=["ariaLabel","aria-label","as","id","isVisible","label","position","style","triggerRect"],Pm=["type"];(Lm=Im||(Im={})).Idle="IDLE",Lm.Focused="FOCUSED",Lm.Visible="VISIBLE",Lm.LeavingVisible="LEAVING_VISIBLE",Lm.Dismissed="DISMISSED",(Dm=Am||(Am={})).Blur="BLUR",Dm.Focus="FOCUS",Dm.GlobalMouseMove="GLOBAL_MOUSE_MOVE",Dm.MouseDown="MOUSE_DOWN",Dm.MouseEnter="MOUSE_ENTER",Dm.MouseLeave="MOUSE_LEAVE",Dm.MouseMove="MOUSE_MOVE",Dm.Rest="REST",Dm.SelectWithKeyboard="SELECT_WITH_KEYBOARD",Dm.TimeComplete="TIME_COMPLETE";var jm,Vm,Um={initial:Im.Idle,states:(Om={},Om[Im.Idle]={enter:Qm,on:(xm={},xm[Am.MouseEnter]=Im.Focused,xm[Am.Focus]=Im.Visible,xm)},Om[Im.Focused]={enter:Gm,leave:Wm,on:(Sm={},Sm[Am.MouseMove]=Im.Focused,Sm[Am.MouseLeave]=Im.Idle,Sm[Am.MouseDown]=Im.Dismissed,Sm[Am.Blur]=Im.Idle,Sm[Am.Rest]=Im.Visible,Sm)},Om[Im.Visible]={on:(Nm={},Nm[Am.Focus]=Im.Focused,Nm[Am.MouseEnter]=Im.Focused,Nm[Am.MouseLeave]=Im.LeavingVisible,Nm[Am.Blur]=Im.LeavingVisible,Nm[Am.MouseDown]=Im.Dismissed,Nm[Am.SelectWithKeyboard]=Im.Dismissed,Nm[Am.GlobalMouseMove]=Im.LeavingVisible,Nm)},Om[Im.LeavingVisible]={enter:zm,leave:u((function(){Km(),Qm()}),"leave"),on:(km={},km[Am.MouseEnter]=Im.Visible,km[Am.Focus]=Im.Visible,km[Am.TimeComplete]=Im.Idle,km)},Om[Im.Dismissed]={leave:u((function(){Qm()}),"leave"),on:(_m={},_m[Am.MouseLeave]=Im.Idle,_m[Am.Blur]=Im.Idle,_m)},Om)},Bm={value:Um.initial,context:{id:null}},$m=[];function qm(e){return $m.push(e),function(){$m.splice($m.indexOf(e),1)}}function Hm(){$m.forEach((function(e){return e(Bm)}))}function Gm(){window.clearTimeout(jm),jm=window.setTimeout((function(){rg({type:Am.Rest})}),100)}function Wm(){window.clearTimeout(jm)}function zm(){window.clearTimeout(Vm),Vm=window.setTimeout((function(){return rg({type:Am.TimeComplete})}),500)}function Km(){window.clearTimeout(Vm)}function Qm(){Bm.context.id=null}function Ym(e){var n=void 0===e?{}:e,r=n.id,i=n.onPointerEnter,o=n.onPointerMove,a=n.onPointerLeave,s=n.onPointerDown,l=n.onMouseEnter,c=n.onMouseMove,d=n.onMouseLeave,f=n.onMouseDown,p=n.onFocus,h=n.onBlur,m=n.onKeyDown,g=n.disabled,v=n.ref,y=n.DEBUG_STYLE,b=String(Ls(r)),E=(0,t.useState)(!!y||og(b,!0)),T=E[0],w=E[1],C=(0,t.useRef)(null),x=ii(v,C),S=js(C,{observe:T});function N(e,t){return"undefined"!=typeof window&&"PointerEvent"in window?e:oi(e,t)}function k(e){return u((function(t){"mouse"===t.pointerType&&e(t)}),"onPointerEvent")}function _(){rg({type:Am.MouseEnter,id:b})}function O(){rg({type:Am.MouseMove,id:b})}function I(){rg({type:Am.MouseLeave})}function L(){Bm.context.id===b&&rg({type:Am.MouseDown})}function A(){window.__REACH_DISABLE_TOOLTIPS||rg({type:Am.Focus,id:b})}function D(){Bm.context.id===b&&rg({type:Am.Blur})}function M(e){"Enter"!==e.key&&" "!==e.key||rg({type:Am.SelectWithKeyboard})}return(0,t.useEffect)((function(){return qm((function(){w(og(b))}))}),[b]),(0,t.useEffect)((function(){var e=Qr(C.current);function t(e){"Escape"!==e.key&&"Esc"!==e.key||Bm.value!==Im.Visible||rg({type:Am.SelectWithKeyboard})}return u(t,"listener"),e.addEventListener("keydown",t),function(){return e.removeEventListener("keydown",t)}}),[]),ng({disabled:g,isVisible:T,ref:C}),u(N,"wrapMouseEvent"),u(k,"wrapPointerEventHandler"),u(_,"handleMouseEnter"),u(O,"handleMouseMove"),u(I,"handleMouseLeave"),u(L,"handleMouseDown"),u(A,"handleFocus"),u(D,"handleBlur"),u(M,"handleKeyDown"),[{"aria-describedby":T?Rl("tooltip",b):void 0,"data-state":T?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:x,onPointerEnter:oi(i,k(_)),onPointerMove:oi(o,k(O)),onPointerLeave:oi(a,k(I)),onPointerDown:oi(s,k(L)),onMouseEnter:N(l,_),onMouseMove:N(c,O),onMouseLeave:N(d,I),onMouseDown:N(f,L),onFocus:oi(p,A),onBlur:oi(h,D),onKeyDown:oi(m,M)},{id:b,triggerRect:S,isVisible:T},T]}u(qm,"subscribe"),u(Hm,"notify"),u(Gm,"startRestTimer"),u(Wm,"clearRestTimer"),u(zm,"startLeavingVisibleTimer"),u(Km,"clearLeavingVisibleTimer"),u(Qm,"clearContextId"),u(Ym,"useTooltip");var Jm=(0,t.forwardRef)((function(e,n){var r=e.children,i=e.label,o=e.ariaLabel,a=e.id,s=e.DEBUG_STYLE,l=Cm(e,Mm),u=t.Children.only(r),c=Ym({id:a,onPointerEnter:u.props.onPointerEnter,onPointerMove:u.props.onPointerMove,onPointerLeave:u.props.onPointerLeave,onPointerDown:u.props.onPointerDown,onMouseEnter:u.props.onMouseEnter,onMouseMove:u.props.onMouseMove,onMouseLeave:u.props.onMouseLeave,onMouseDown:u.props.onMouseDown,onFocus:u.props.onFocus,onBlur:u.props.onBlur,onKeyDown:u.props.onKeyDown,disabled:u.props.disabled,ref:u.ref,DEBUG_STYLE:s}),d=c[0],f=c[1];return(0,t.createElement)(t.Fragment,null,(0,t.cloneElement)(u,d),(0,t.createElement)(Xm,wm({ref:n,label:i,"aria-label":o},f,l)))}));e.aC=Jm;var Xm=(0,t.forwardRef)(u((function(e,n){var r=e.label,i=e.ariaLabel,o=e.isVisible,a=e.id,s=Cm(e,Rm);return o?(0,t.createElement)(Kr,null,(0,t.createElement)(Zm,wm({ref:n,label:r,"aria-label":i,isVisible:o},s,{id:Rl("tooltip",String(a))}))):null}),"TooltipPopup")),Zm=(0,t.forwardRef)(u((function(e,n){var r=e.ariaLabel,i=e["aria-label"],o=e.as,a=void 0===o?"div":o,s=e.id,l=e.isVisible,u=e.label,c=e.position,d=void 0===c?tg:c,f=e.style,p=e.triggerRect,h=Cm(e,Fm),m=null!=(i||r),g=(0,t.useRef)(null),v=ii(n,g),y=js(g,{observe:l});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a,wm({role:m?void 0:"tooltip"},h,{ref:v,"data-reach-tooltip":"",id:m?void 0:s,style:wm({},f,eg(d,p,y))}),u),m&&(0,t.createElement)(ws,{role:"tooltip",id:s},i||r))}),"TooltipContent"));function eg(e,t,n){return n?e(t,n):{visibility:"hidden"}}u(eg,"getStyles");var tg=u((function(e,t,n){void 0===n&&(n=8);var r=Tm(),i=r.width,o=r.height;if(!e||!t)return{};var a={top:e.top-t.height<0,right:i{let{isActive:n,...r}=e;return te("div",{...r,ref:t,role:"tab","aria-selected":n,className:jr("graphiql-tab",n?"graphiql-tab-active":"",r.className),children:r.children})});ag.displayName="Tab";const sg=(0,t.forwardRef)((e,t)=>te(Vr,{...e,ref:t,type:"button",className:jr("graphiql-tab-button",e.className),children:e.children}));sg.displayName="Tab.Button";const lg=(0,t.forwardRef)((e,t)=>te(Jm,{label:"Close Tab",children:te(Vr,{"aria-label":"Close Tab",...e,ref:t,type:"button",className:jr("graphiql-tab-close",e.className),children:te(ur,{})})}));lg.displayName="Tab.Close";const ug=xs(ag,{Button:sg,Close:lg});e.aA=ug;const cg=(0,t.forwardRef)((e,t)=>te("div",{...e,ref:t,role:"tablist",className:jr("graphiql-tabs",e.className),children:e.children}));e.aB=cg,cg.displayName="Tabs";var dg=Object.defineProperty,fg=u((e,t)=>dg(e,"name",{value:t,configurable:!0}),"__name$C");const pg=V("HistoryContext");function hg(e){var n;const r=le(),i=(0,t.useRef)(new F(r||new D(null),e.maxHistoryLength||gg)),[o,a]=(0,t.useState)((null==(n=i.current)?void 0:n.queries)||[]),s=(0,t.useCallback)(e=>{let{query:t,variables:n,headers:r,operationName:o}=e;var s;null==(s=i.current)||s.updateHistory(t,n,r,o),a(i.current.queries)},[]),l=(0,t.useCallback)(e=>{let{query:t,variables:n,headers:r,operationName:o,label:s,favorite:l}=e;i.current.editLabel(t,n,r,o,s,l),a(i.current.queries)},[]),u=(0,t.useCallback)(e=>{let{query:t,variables:n,headers:r,operationName:o,label:s,favorite:l}=e;i.current.toggleFavorite(t,n,r,o,s,l),a(i.current.queries)},[]),c=(0,t.useMemo)(()=>({addToHistory:s,editLabel:l,items:o,toggleFavorite:u}),[s,l,o,u]);return te(pg.Provider,{value:c,children:e.children})}e.z=pg,u(hg,"HistoryContextProvider"),fg(hg,"HistoryContextProvider");const mg=U(pg);e.C=mg;const gg=20;var vg=Object.defineProperty,yg=u((e,t)=>vg(e,"name",{value:t,configurable:!0}),"__name$B");function bg(){const{items:e}=mg({nonNull:!0}),n=e.slice().reverse();return ne("section",{"aria-label":"History",className:"graphiql-history",children:[te("div",{className:"graphiql-history-header",children:"History"}),te("ul",{className:"graphiql-history-items",children:n.map((e,r)=>ne(t.Fragment,{children:[te(Eg,{item:e}),e.favorite&&n[r+1]&&!n[r+1].favorite?te("div",{className:"graphiql-history-item-spacer"}):null]},`${r}:${e.label||e.query}`))})]})}function Eg(e){const{editLabel:n,toggleFavorite:r}=mg({nonNull:!0,caller:Eg}),{headerEditor:i,queryEditor:o,variableEditor:a}=iE({nonNull:!0,caller:Eg}),s=(0,t.useRef)(null),l=(0,t.useRef)(null),[u,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{u&&s.current&&s.current.focus()},[u]);const d=e.item.label||e.item.operationName||Tg(e.item.query);return te("li",{className:"graphiql-history-item"+(u?" editable":""),children:ne(re,u?{children:[te("input",{type:"text",defaultValue:e.item.label,ref:s,onKeyDown:t=>{27===t.keyCode?c(!1):13===t.keyCode&&(c(!1),n({...e.item,label:t.currentTarget.value}))},placeholder:"Type a label"}),te(Vr,{type:"button",ref:l,onClick:()=>{var t;c(!1),n({...e.item,label:null==(t=s.current)?void 0:t.value})},children:"Save"}),te(Vr,{type:"button",ref:l,onClick:()=>{c(!1)},children:te(ur,{})})]}:{children:[te(Vr,{type:"button",className:"graphiql-history-item-label",onClick:()=>{var t,n,r;null==o||o.setValue(null!=(t=e.item.query)?t:""),null==a||a.setValue(null!=(n=e.item.variables)?n:""),null==i||i.setValue(null!=(r=e.item.headers)?r:"")},children:d}),te(Jm,{label:"Edit label",children:te(Vr,{type:"button",className:"graphiql-history-item-action",onClick:e=>{e.stopPropagation(),c(!0)},"aria-label":"Edit label",children:te(xr,{"aria-hidden":"true"})})}),te(Jm,{label:e.item.favorite?"Remove favorite":"Add favorite",children:te(Vr,{type:"button",className:"graphiql-history-item-action",onClick:t=>{t.stopPropagation(),r(e.item)},"aria-label":e.item.favorite?"Remove favorite":"Add favorite",children:e.item.favorite?te(Lr,{"aria-hidden":"true"}):te(Ar,{"aria-hidden":"true"})})})]})})}function Tg(e){return null==e?void 0:e.split("\n").map(e=>e.replace(/#(.*)/,"")).join(" ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\s]{2,}/g," ")}u(bg,"History"),yg(bg,"History"),u(Eg,"HistoryItem"),yg(Eg,"HistoryItem"),u(Tg,"formatQuery"),yg(Tg,"formatQuery");var wg=Object.defineProperty,Cg=u((e,t)=>wg(e,"name",{value:t,configurable:!0}),"__name$A");const xg=V("ExecutionContext");function Sg(e){if(!e.fetcher)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:n,headerEditor:r,queryEditor:o,responseEditor:a,variableEditor:s,updateActiveTabValues:l}=iE({nonNull:!0,caller:Sg}),u=mg(),c=pb({getDefaultFieldNames:e.getDefaultFieldNames,caller:Sg}),[d,h]=(0,t.useState)(!1),[m,g]=(0,t.useState)(null),v=(0,t.useRef)(0),y=(0,t.useCallback)(()=>{null==m||m.unsubscribe(),h(!1),g(null)},[m]),{fetcher:b}=e,w=(0,t.useCallback)(async()=>{var t,d,w;if(!o||!a)return;if(m)return void y();const C=Cg(e=>{a.setValue(e),l({response:e})},"setResponse");v.current+=1;const x=v.current;let S=c()||o.getValue();const N=null==s?void 0:s.getValue();let k;try{k=kg({json:N,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(e){return void C(e instanceof Error?e.message:""+e)}const _=null==r?void 0:r.getValue();let O;try{O=kg({json:_,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(e){return void C(e instanceof Error?e.message:""+e)}if(n){const e=o.documentAST?on(o.documentAST,n):[];e.length>0&&(S+="\n"+e.map(e=>(0,i.print)(e)).join("\n"))}C(""),h(!0);const I=null!=(d=null!=(t=e.operationName)?t:o.operationName)?d:void 0;null==u||u.addToHistory({query:S,variables:N,headers:_,operationName:I});try{let e={data:{}};const t=Cg(t=>{if(x!==v.current)return;let n=!!Array.isArray(t)&&t;if(!n&&"object"==typeof t&&null!==t&&"hasNext"in t&&(n=[t]),n){const t={data:e.data},r=[...(null==e?void 0:e.errors)||[],...n.map(e=>e.errors).flat().filter(Boolean)];r.length&&(t.errors=r);for(const r of n){const{path:n,data:i,errors:o,...a}=r;if(n){if(!i)throw new Error("Expected part to contain a data property, but got "+r);Nn(t.data,n,i,{merge:!0})}else i&&(t.data=r.data);e={...t,...a}}h(!1),C(T(e))}else{const e=T(t);h(!1),C(e)}},"handleResponse"),n=b({query:S,variables:k,operationName:I},{headers:null!=O?O:void 0,documentAST:null!=(w=o.documentAST)?w:void 0}),r=await Promise.resolve(n);if(f(r))g(r.subscribe({next(e){t(e)},error(e){h(!1),e&&C(E(e)),g(null)},complete(){h(!1),g(null)}}));else if(p(r)){g({unsubscribe:()=>{var e,t;return null==(t=(e=r[Symbol.asyncIterator]()).return)?void 0:t.call(e)}});try{for await(const e of r)t(e);h(!1),g(null)}catch(e){h(!1),C(E(e)),g(null)}}else t(r)}catch(e){h(!1),C(E(e)),g(null)}},[c,n,b,r,u,e.operationName,o,a,y,m,l,s]),C=(0,t.useMemo)(()=>{var t;return{isFetching:d,operationName:null!=(t=e.operationName)?t:null,run:w,stop:y}},[d,e.operationName,w,y]);return te(xg.Provider,{value:C,children:e.children})}e.k=xg,u(Sg,"ExecutionContextProvider"),Cg(Sg,"ExecutionContextProvider");const Ng=U(xg);function kg(e){let{json:t,errorMessageParse:n,errorMessageType:r}=e,i=void 0;try{i=t&&""!==t.trim()?JSON.parse(t):void 0}catch(e){throw new Error(`${n}: ${e instanceof Error?e.message:e}.`)}const o="object"==typeof i&&null!==i&&!Array.isArray(i);if(void 0!==i&&!o)throw new Error(r);return i}e.m=Ng,u(kg,"tryParseJsonObject"),Cg(kg,"tryParseJsonObject");var _g=Object.defineProperty,Og=u((e,t)=>_g(e,"name",{value:t,configurable:!0}),"__name$z");const Ig="graphiql",Lg="sublime";let Ag=!1;"object"==typeof window&&(Ag=0===window.navigator.platform.toLowerCase().indexOf("mac"));const Dg={[Ag?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function Mg(e,t){const r=await Promise.resolve().then(n.t.bind(null,0,7)).then((function(e){return e.c})).then(e=>"function"==typeof e?e:e.default);return await Promise.all(!1===(null==t?void 0:t.useCommonAddons)?e:[Promise.resolve().then(n.t.bind(null,13,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,14,7)).then((function(e){return e.m})),Promise.resolve().then(n.t.bind(null,47,7)).then((function(e){return e.c})),Promise.resolve().then(n.t.bind(null,15,7)).then((function(e){return e.b})),Promise.resolve().then(n.t.bind(null,16,7)).then((function(e){return e.f})),Promise.resolve().then(n.t.bind(null,48,7)).then((function(e){return e.l})),Promise.resolve().then(n.t.bind(null,6,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,17,7)).then((function(e){return e.j})),Promise.resolve().then(n.t.bind(null,7,7)).then((function(e){return e.d})),Promise.resolve().then(n.t.bind(null,18,7)).then((function(e){return e.s})),...e]),r}u(Mg,"importCodeMirror"),Og(Mg,"importCodeMirror");var Rg=u((function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;rUg(e,"name",{value:t,configurable:!0}),"__name$y");const $g=Bg(e=>e?(0,i.print)(e):"","printDefault");function qg(e){let{field:t}=e;if(!("defaultValue"in t)||void 0===t.defaultValue)return null;const n=(0,i.astFromValue)(t.defaultValue,t.type);return n?ne(re,{children:[" = ",te("span",{className:"graphiql-doc-explorer-default-value",children:$g(n)})]}):null}u(qg,"DefaultValue"),Bg(qg,"DefaultValue");var Hg=Object.defineProperty,Gg=u((e,t)=>Hg(e,"name",{value:t,configurable:!0}),"__name$x");const Wg=V("SchemaContext");function zg(e){if(!e.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:n,headerEditor:r}=iE({nonNull:!0,caller:zg}),[o,a]=(0,t.useState)(),[s,l]=(0,t.useState)(!1),[d,f]=(0,t.useState)(null),p=(0,t.useRef)(0);(0,t.useEffect)(()=>{a((0,i.isSchema)(e.schema)||null===e.schema||void 0===e.schema?e.schema:void 0),p.current++},[e.schema]);const h=(0,t.useRef)(n);(0,t.useEffect)(()=>{r&&(h.current=r.getValue())});const{introspectionQuery:g,introspectionQueryName:v,introspectionQuerySansSubscriptions:y}=Qg({inputValueDeprecation:e.inputValueDeprecation,introspectionQueryName:e.introspectionQueryName,schemaDescription:e.schemaDescription}),{fetcher:b,onSchemaChange:w}=e,C=(0,t.useCallback)(()=>{if((0,i.isSchema)(e.schema)||null===e.schema)return;const t=++p.current;a(void 0);const n=e.schema;async function r(){if(n)return n;const e=Yg(h.current);if(!e.isValidJSON)return void f("Introspection failed as headers are invalid.");const t=e.headers?{headers:e.headers}:{},r=m(b({query:g,operationName:v},t));if(!c(r))return void f("Fetcher did not return a Promise for introspection.");l(!0),f(null);let i=await r;if("object"!=typeof i||null===i||!("data"in i)){const e=m(b({query:y,operationName:v},t));if(!c(e))throw new Error("Fetcher did not return a Promise for introspection.");i=await e}if(l(!1),(null==i?void 0:i.data)&&"__schema"in i.data)return i.data;const o="string"==typeof i?i:T(i);f(o)}u(r,"fetchIntrospectionData"),Gg(r,"fetchIntrospectionData"),r().then(e=>{if(t===p.current&&e)try{const t=(0,i.buildClientSchema)(e);a(t),null==w||w(t)}catch(e){f(E(e))}}).catch(e=>{t===p.current&&(f(E(e)),l(!1))})},[b,v,g,y,w,e.schema]);(0,t.useEffect)(()=>{C()},[C]),(0,t.useEffect)(()=>{function e(e){82===e.keyCode&&e.shiftKey&&e.ctrlKey&&C()}return u(e,"triggerIntrospection"),Gg(e,"triggerIntrospection"),window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)});const x=(0,t.useMemo)(()=>!o||e.dangerouslyAssumeSchemaIsValid?[]:(0,i.validateSchema)(o),[o,e.dangerouslyAssumeSchemaIsValid]),S=(0,t.useMemo)(()=>({fetchError:d,introspect:C,isFetching:s,schema:o,validationErrors:x}),[d,C,s,o,x]);return te(Wg.Provider,{value:S,children:e.children})}e.M=Wg,u(zg,"SchemaContextProvider"),Gg(zg,"SchemaContextProvider");const Kg=U(Wg);function Qg(e){let{inputValueDeprecation:n,introspectionQueryName:r,schemaDescription:o}=e;return(0,t.useMemo)(()=>{const e=r||"IntrospectionQuery";let t=(0,i.getIntrospectionQuery)({inputValueDeprecation:n,schemaDescription:o});r&&(t=t.replace("query IntrospectionQuery","query "+e));const a=t.replace("subscriptionType { name }","");return{introspectionQueryName:e,introspectionQuery:t,introspectionQuerySansSubscriptions:a}},[n,r,o])}function Yg(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch(e){n=!1}return{headers:t,isValidJSON:n}}e.O=Kg,u(Qg,"useIntrospectionQuery"),Gg(Qg,"useIntrospectionQuery"),u(Yg,"parseHeaderString"),Gg(Yg,"parseHeaderString");var Jg=Object.defineProperty,Xg=u((e,t)=>Jg(e,"name",{value:t,configurable:!0}),"__name$w");const Zg={name:"Docs"},ev=V("ExplorerContext");function tv(e){const{isFetching:n}=Kg({nonNull:!0,caller:tv}),[r,i]=(0,t.useState)([Zg]),o=(0,t.useCallback)(e=>{i(t=>t[t.length-1].def===e.def?t:[...t,e])},[]),a=(0,t.useCallback)(()=>{i(e=>e.length>1?e.slice(0,-1):e)},[]),s=(0,t.useCallback)(()=>{i(e=>1===e.length?e:[Zg])},[]);(0,t.useEffect)(()=>{n&&s()},[n,s]);const l=(0,t.useMemo)(()=>({explorerNavStack:r,push:o,pop:a,reset:s}),[r,o,a,s]);return te(ev.Provider,{value:l,children:e.children})}e.q=ev,u(tv,"ExplorerContextProvider"),Xg(tv,"ExplorerContextProvider");const nv=U(ev);e.x=nv;var rv=Object.defineProperty,iv=u((e,t)=>rv(e,"name",{value:t,configurable:!0}),"__name$v");function ov(e,t){return(0,i.isNonNullType)(e)?ne(re,{children:[ov(e.ofType,t),"!"]}):(0,i.isListType)(e)?ne(re,{children:["[",ov(e.ofType,t),"]"]}):t(e)}u(ov,"renderType"),iv(ov,"renderType");var av=Object.defineProperty,sv=u((e,t)=>av(e,"name",{value:t,configurable:!0}),"__name$u");function lv(e){const{push:t}=nv({nonNull:!0,caller:lv});return e.type?ov(e.type,e=>te("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),t({name:e.name,def:e})},href:"#",children:e.name})):null}u(lv,"TypeLink"),sv(lv,"TypeLink");var uv=Object.defineProperty,cv=u((e,t)=>uv(e,"name",{value:t,configurable:!0}),"__name$t");function dv(e){let{arg:t,showDefaultValue:n,inline:r}=e;const i=ne("span",{children:[te("span",{className:"graphiql-doc-explorer-argument-name",children:t.name}),": ",te(lv,{type:t.type}),!1!==n&&te(qg,{field:t})]});return r?i:ne("div",{className:"graphiql-doc-explorer-argument",children:[i,t.description?te(bm,{type:"description",children:t.description}):null,t.deprecationReason?ne("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[te("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),te(bm,{type:"deprecation",children:t.deprecationReason})]}):null]})}u(dv,"Argument"),cv(dv,"Argument");var fv=Object.defineProperty,pv=u((e,t)=>fv(e,"name",{value:t,configurable:!0}),"__name$s");function hv(e){return e.children?ne("div",{className:"graphiql-doc-explorer-deprecation",children:[te("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),te(bm,{type:"deprecation",onlyShowFirstChild:!0,children:e.children})]}):null}u(hv,"DeprecationReason"),pv(hv,"DeprecationReason");var mv=Object.defineProperty,gv=u((e,t)=>mv(e,"name",{value:t,configurable:!0}),"__name$r");function vv(e){let{directive:t}=e;return ne("span",{className:"graphiql-doc-explorer-directive",children:["@",t.name.value]})}u(vv,"Directive"),gv(vv,"Directive");var yv=Object.defineProperty,bv=u((e,t)=>yv(e,"name",{value:t,configurable:!0}),"__name$q");function Ev(e){const t=Tv[e.title];return ne("div",{children:[ne("div",{className:"graphiql-doc-explorer-section-title",children:[te(t,{}),e.title]}),te("div",{className:"graphiql-doc-explorer-section-content",children:e.children})]})}u(Ev,"ExplorerSection"),bv(Ev,"ExplorerSection");const Tv={Arguments:or,"Deprecated Arguments":dr,"Deprecated Enum Values":fr,"Deprecated Fields":pr,Directives:hr,"Enum Values":vr,Fields:yr,Implements:Er,Implementations:Mr,"Possible Types":Mr,"Root Types":Or,Type:Mr};var wv=Object.defineProperty,Cv=u((e,t)=>wv(e,"name",{value:t,configurable:!0}),"__name$p");function xv(e){return ne(re,{children:[e.field.description?te(bm,{type:"description",children:e.field.description}):null,te(hv,{children:e.field.deprecationReason}),te(Ev,{title:"Type",children:te(lv,{type:e.field.type})}),te(Sv,{field:e.field}),te(Nv,{field:e.field})]})}function Sv(e){let{field:n}=e;const[r,i]=(0,t.useState)(!1);if(!("args"in n))return null;const o=[],a=[];for(const e of n.args)e.deprecationReason?a.push(e):o.push(e);return ne(re,{children:[o.length>0?te(Ev,{title:"Arguments",children:o.map(e=>te(dv,{arg:e},e.name))}):null,a.length>0?r||0===o.length?te(Ev,{title:"Deprecated Arguments",children:a.map(e=>te(dv,{arg:e},e.name))}):te(Ur,{type:"button",onClick:()=>{i(!0)},children:"Show Deprecated Arguments"}):null]})}function Nv(e){let{field:t}=e;var n;const r=(null==(n=t.astNode)?void 0:n.directives)||[];return r&&0!==r.length?te(Ev,{title:"Directives",children:r.map(e=>te("div",{children:te(vv,{directive:e})},e.name.value))}):null}u(xv,"FieldDocumentation"),Cv(xv,"FieldDocumentation"),u(Sv,"Arguments"),Cv(Sv,"Arguments"),u(Nv,"Directives"),Cv(Nv,"Directives");var kv=Object.defineProperty,_v=u((e,t)=>kv(e,"name",{value:t,configurable:!0}),"__name$o");function Ov(e){var t,n,r,i;const o=e.schema.getQueryType(),a=null==(n=(t=e.schema).getMutationType)?void 0:n.call(t),s=null==(i=(r=e.schema).getSubscriptionType)?void 0:i.call(r);return ne(re,{children:[te(bm,{type:"description",children:e.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),ne(Ev,{title:"Root Types",children:[o?ne("div",{children:[te("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",te(lv,{type:o})]}):null,a&&ne("div",{children:[te("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",te(lv,{type:a})]}),s&&ne("div",{children:[te("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",te(lv,{type:s})]})]})]})}function Iv(e,n){var r=(0,t.useRef)(!1);(0,t.useEffect)((function(){r.current?e():r.current=!0}),n)}function Lv(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function Av(){return(Av=Object.assign||function(e){for(var t=1;tl&&e.push({highlight:!1,start:l,end:u}),o.index===s.lastIndex&&s.lastIndex++}return e}),[])}function Fv(e){var t=e.chunksToHighlight,n=e.totalLength,r=[];if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r;function o(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})}}function Pv(e){return e}function jv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}u(Ov,"SchemaDocumentation"),_v(Ov,"SchemaDocumentation"),u(Iv,"useUpdateEffect"),u(Lv,"_objectWithoutPropertiesLoose"),u(Av,"_extends"),u(Dv,"findAll"),u(Mv,"combineChunks"),u(Rv,"defaultFindChunks"),u(Fv,"fillInChunks"),u(Pv,"defaultSanitize"),u(jv,"escapeRegExpFn");var Vv,Uv,Bv,$v,qv,Hv={combineChunks:Mv,fillInChunks:Fv,findAll:Dv,findChunks:Rv},Gv=["onSelect","openOnFocus","children","as","aria-label","aria-labelledby"],Wv=["as","selectOnClick","autocomplete","onClick","onChange","onKeyDown","onBlur","onFocus","value"],zv=["as","children","portal","onKeyDown","onBlur","position"],Kv=["persistSelection","as"],Qv=["as","children","index","value","onClick"],Yv="IDLE",Jv="SUGGESTING",Xv="NAVIGATING",Zv="INTERACTING",ey="NAVIGATE",ty={initial:Yv,states:(qv={},qv[Yv]={on:(Vv={},Vv.BLUR=Yv,Vv.CLEAR=Yv,Vv.CHANGE=Jv,Vv.INITIAL_CHANGE=Yv,Vv.FOCUS=Jv,Vv[ey]=Xv,Vv.OPEN_WITH_BUTTON=Jv,Vv.OPEN_WITH_INPUT_CLICK=Jv,Vv)},qv[Jv]={on:(Uv={},Uv.CHANGE=Jv,Uv.FOCUS=Jv,Uv[ey]=Xv,Uv.CLEAR=Yv,Uv.ESCAPE=Yv,Uv.BLUR=Yv,Uv.SELECT_WITH_CLICK=Yv,Uv.INTERACT=Zv,Uv.CLOSE_WITH_BUTTON=Yv,Uv)},qv[Xv]={on:(Bv={},Bv.CHANGE=Jv,Bv.FOCUS=Jv,Bv.CLEAR=Yv,Bv.BLUR=Yv,Bv.ESCAPE=Yv,Bv[ey]=Xv,Bv.SELECT_WITH_CLICK=Yv,Bv.SELECT_WITH_KEYBOARD=Yv,Bv.CLOSE_WITH_BUTTON=Yv,Bv.INTERACT=Zv,Bv)},qv[Zv]={on:($v={},$v.CLEAR=Yv,$v.CHANGE=Jv,$v.FOCUS=Jv,$v.BLUR=Yv,$v.ESCAPE=Yv,$v[ey]=Xv,$v.CLOSE_WITH_BUTTON=Yv,$v.SELECT_WITH_CLICK=Yv,$v)},qv)},ny=u((function(e,t){var n=Av({},e,{lastEventType:t.type});switch(t.type){case"CHANGE":case"INITIAL_CHANGE":return Av({},n,{navigationValue:null,value:t.value});case ey:case"OPEN_WITH_BUTTON":case"OPEN_WITH_INPUT_CLICK":return Av({},n,{navigationValue:iy(n,t)});case"CLEAR":return Av({},n,{value:"",navigationValue:null});case"BLUR":case"ESCAPE":return Av({},n,{navigationValue:null});case"SELECT_WITH_CLICK":return Av({},n,{value:t.isControlled?e.value:t.value,navigationValue:null});case"SELECT_WITH_KEYBOARD":return Av({},n,{value:t.isControlled?e.value:e.navigationValue,navigationValue:null});case"CLOSE_WITH_BUTTON":return Av({},n,{navigationValue:null});case"INTERACT":return n;case"FOCUS":return Av({},n,{navigationValue:iy(n,t)});default:return n}}),"reducer");function ry(e){return[Jv,Xv,Zv].includes(e)}function iy(e,t){return t.value?t.value:t.persistSelection?e.value:null}u(ry,"popoverIsExpanded"),u(iy,"findNavigationValue");var oy=El(),ay=Dl(0,{}),sy=Dl(0,{}),ly=(0,t.forwardRef)((function(e,n){var r,i=e.onSelect,o=e.openOnFocus,a=void 0!==o&&o,s=e.children,l=e.as,u=void 0===l?"div":l,c=e["aria-label"],d=e["aria-labelledby"],f=Lv(e,Gv),p=wl(),h=p[0],m=p[1],g=(0,t.useRef)(),v=(0,t.useRef)(),y=(0,t.useRef)(),b=(0,t.useRef)(!1),E=(0,t.useRef)(!1),T=vy(ty,ny,{value:"",navigationValue:null}),w=T[0],C=T[1],x=T[2];hy(C.lastEventType,g);var S=Ls(f.id),N=S?Rl("listbox",S):"listbox",k=(0,t.useRef)(!1),_=ry(w),O={ariaLabel:c,ariaLabelledby:d,autocompletePropRef:b,buttonRef:y,comboboxId:S,data:C,inputRef:g,isExpanded:_,listboxId:N,onSelect:i||Zr,openOnFocus:a,persistSelectionRef:E,popoverRef:v,state:w,transition:x,isControlledRef:k};return(0,t.createElement)(xl,{context:oy,items:h,set:m},(0,t.createElement)(ay.Provider,{value:O},(0,t.createElement)(u,Av({},f,{"data-reach-combobox":"","data-state":by(w),"data-expanded":_||void 0,ref:n}),Jr(s)?s({id:S,isExpanded:_,navigationValue:null!=(r=C.navigationValue)?r:null,state:w}):s)))})),uy=(0,t.forwardRef)((function(e,n){var r=e.as,i=void 0===r?"input":r,o=e.selectOnClick,a=void 0!==o&&o,s=e.autocomplete,l=void 0===s||s,c=e.onClick,d=e.onChange,f=e.onKeyDown,p=e.onBlur,h=e.onFocus,m=e.value,g=Lv(e,Wv),v=(0,t.useRef)(m).current,y=(0,t.useRef)(!1);Iv((function(){y.current=!0}),[m]);var b=(0,t.useContext)(ay),E=b.data,T=E.navigationValue,w=E.value,C=E.lastEventType,x=b.inputRef,S=b.state,N=b.transition,k=b.listboxId,_=b.autocompletePropRef,O=b.openOnFocus,I=b.isExpanded,L=b.ariaLabel,A=b.ariaLabelledby,D=b.persistSelectionRef,M=b.isControlledRef,R=ii(x,n),F=(0,t.useRef)(!1),P=my(),j=gy(),V=void 0!==m;(0,t.useEffect)((function(){M.current=V}),[V]),qr((function(){_.current=l}),[l,_]);var U=(0,t.useCallback)((function(e){""===e.trim()?N("CLEAR",{isControlled:V}):e!==v||y.current?N("CHANGE",{value:e}):N("INITIAL_CHANGE",{value:e})}),[v,N,V]);function B(e){var t=e.target.value;V||U(t)}function $(){a&&(F.current=!0),O&&"SELECT_WITH_CLICK"!==C&&N("FOCUS",{persistSelection:D.current})}function q(){var e;F.current&&(F.current=!1,null==(e=x.current)||e.select()),O&&S===Yv&&N("OPEN_WITH_INPUT_CLICK")}(0,t.useEffect)((function(){!V||m===w||""===m.trim()&&""===(w||"").trim()||U(m)}),[m,U,V,w]),u(B,"handleChange"),u($,"handleFocus"),u(q,"handleClick");var H=!l||S!==Xv&&S!==Zv?m||w:T||m||w;return(0,t.createElement)(i,Av({"aria-activedescendant":T?String(yy(T)):void 0,"aria-autocomplete":"both","aria-controls":k,"aria-expanded":I,"aria-haspopup":"listbox","aria-label":L,"aria-labelledby":L?void 0:A,role:"combobox"},g,{"data-reach-combobox-input":"","data-state":by(S),ref:R,onBlur:oi(p,j),onChange:oi(d,B),onClick:oi(c,q),onFocus:oi(h,$),onKeyDown:oi(f,P),value:H||""}))})),cy=(0,t.forwardRef)((function(e,n){var r=e.as,i=void 0===r?"div":r,o=e.children,a=e.portal,s=void 0===a||a,l=e.onKeyDown,u=e.onBlur,c=e.position,d=void 0===c?hl:c,f=Lv(e,zv),p=(0,t.useContext)(ay),h=p.popoverRef,m=p.inputRef,g=p.isExpanded,v=p.state,y=ii(h,n),b=my(),E=gy(),T={"data-reach-combobox-popover":"","data-state":by(v),onKeyDown:oi(l,b),onBlur:oi(u,E),hidden:!g,tabIndex:-1,children:o};return s?(0,t.createElement)(ul,Av({as:i},f,{ref:y,"data-expanded":g||void 0,position:d,targetRef:m,unstable_skipInitialPortalRender:!0},T)):(0,t.createElement)(i,Av({ref:y},f,T))})),dy=(0,t.forwardRef)((function(e,n){var r=e.persistSelection,i=void 0!==r&&r,o=e.as,a=void 0===o?"ul":o,s=Lv(e,Kv),l=(0,t.useContext)(ay),u=l.persistSelectionRef,c=l.listboxId;return i&&(u.current=!0),(0,t.createElement)(a,Av({role:"listbox"},s,{ref:n,"data-reach-combobox-list":"",id:c}))})),fy=(0,t.forwardRef)((function(e,n){var r=e.as,i=void 0===r?"li":r,o=e.children,a=e.index,s=e.value,l=e.onClick,c=Lv(e,Qv),d=(0,t.useContext)(ay),f=d.onSelect,p=d.data.navigationValue,h=d.transition,m=d.isControlledRef,g=Fl((0,t.useRef)(null),null),v=g[0],y=g[1],b=Tl((0,t.useMemo)((function(){return{element:v,value:s}}),[s,v]),oy,a),E=ii(n,y),T=p===s,w=u((function(){f&&f(s),h("SELECT_WITH_CLICK",{value:s,isControlled:m.current})}),"handleClick");return(0,t.createElement)(sy.Provider,{value:{value:s,index:b}},(0,t.createElement)(i,Av({"aria-selected":T,role:"option"},c,{"data-reach-combobox-option":"",ref:E,id:String(yy(s)),"data-highlighted":T?"":void 0,tabIndex:-1,onClick:oi(l,w)}),o?Jr(o)?o({value:s,index:b}):o:(0,t.createElement)(py,null)))}));function py(){var e=(0,t.useContext)(sy).value,n=(0,t.useContext)(ay).data.value,r=(0,t.useMemo)((function(){return Hv.findAll({searchWords:Ey(n||"").split(/\s+/),textToHighlight:e})}),[n,e]);return(0,t.createElement)(t.Fragment,null,r.length?r.map((function(n,r){var i=e.slice(n.start,n.end);return(0,t.createElement)("span",{key:r,"data-reach-combobox-option-text":"","data-user-value":!!n.highlight||void 0,"data-suggested-value":!n.highlight||void 0},i)})):e)}function hy(e,t){qr((function(){var n;e!==ey&&"ESCAPE"!==e&&"SELECT_WITH_CLICK"!==e&&"OPEN_WITH_BUTTON"!==e||null==(n=t.current)||n.focus()}),[t,e])}function my(){var e=(0,t.useContext)(ay),n=e.data.navigationValue,r=e.onSelect,i=e.state,o=e.transition,a=e.autocompletePropRef,s=e.persistSelectionRef,l=e.isControlledRef,c=Cl(oy);return u((function(e){var t=c.findIndex((function(e){return e.value===n}));function d(){return t===c.length-1?a.current?null:p():c[(t+1)%c.length]}function f(){return 0===t?a.current?null:h():-1===t?h():c[(t-1+c.length)%c.length]}function p(){return c[0]}function h(){return c[c.length-1]}switch(u(d,"getNextOption"),u(f,"getPreviousOption"),u(p,"getFirstOption"),u(h,"getLastOption"),e.key){case"ArrowDown":if(e.preventDefault(),!c||!c.length)return;if(i===Yv)o(ey,{persistSelection:s.current});else{var m=d();o(ey,{value:m?m.value:null})}break;case"ArrowUp":if(e.preventDefault(),!c||0===c.length)return;if(i===Yv)o(ey);else{var g=f();o(ey,{value:g?g.value:null})}break;case"Home":case"PageUp":if(e.preventDefault(),!c||0===c.length)return;i===Yv?o(ey):o(ey,{value:p().value});break;case"End":case"PageDown":if(e.preventDefault(),!c||0===c.length)return;i===Yv?o(ey):o(ey,{value:h().value});break;case"Escape":i!==Yv&&o("ESCAPE");break;case"Enter":i===Xv&&null!==n&&(e.preventDefault(),r&&r(n),o("SELECT_WITH_KEYBOARD",{isControlled:l.current}))}}),"handleKeyDown")}function gy(){var e=(0,t.useContext)(ay),n=e.state,r=e.transition,i=e.popoverRef,o=e.inputRef,a=e.buttonRef;return u((function(e){var t=i.current,s=o.current,l=a.current,u=e.relatedTarget;u!==s&&u!==l&&t&&(t.contains(u)?n!==Zv&&r("INTERACT"):r("BLUR"))}),"handleBlur")}function vy(e,n,r){var i=(0,t.useState)(e.initial),o=i[0],a=i[1],s=(0,t.useReducer)(n,r),l=s[0],c=s[1];return[o,l,u((function(t,n){void 0===n&&(n={});var r=e.states[o],i=r&&r.on[t];if(i)return c(Av({type:t,state:o,nextState:o},n)),void a(i)}),"transition")]}function yy(e){var t=0;if(0===e.length)return t;for(var n=0;nTy(e,"name",{value:t,configurable:!0}),"__name$n");function Cy(e,t){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o{n=null,t(...i)},e)}}u(Cy,"debounce"),wy(Cy,"debounce");var xy=Object.defineProperty,Sy=u((e,t)=>xy(e,"name",{value:t,configurable:!0}),"__name$m");function Ny(){const{explorerNavStack:e,push:n}=nv({nonNull:!0,caller:Ny}),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=ky(),[s,l]=(0,t.useState)(""),[c,d]=(0,t.useState)(a(s)),f=(0,t.useMemo)(()=>Cy(200,e=>{d(a(e))}),[a]);(0,t.useEffect)(()=>{f(s)},[f,s]),(0,t.useEffect)(()=>{function e(e){e.metaKey&&75===e.keyCode&&r.current&&r.current.focus()}return u(e,"handleKeyDown"),Sy(e,"handleKeyDown"),window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);const p=e[e.length-1];return 1===e.length||(0,i.isObjectType)(p.def)||(0,i.isInterfaceType)(p.def)||(0,i.isInputObjectType)(p.def)?ne(ly,{"aria-label":`Search ${p.name}...`,onSelect:e=>{const t=e;n("field"in t?{name:t.field.name,def:t.field}:{name:t.type.name,def:t.type})},children:[ne("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{r.current&&r.current.focus()},children:[te(wr,{}),te(uy,{autocomplete:!1,onChange:e=>{l(e.target.value)},onKeyDown:e=>{if(!e.isDefaultPrevented()){const e=o.current;if(!e)return;window.requestAnimationFrame(()=>{const t=e.querySelector("[aria-selected=true]");if(!(t instanceof HTMLElement))return;const n=t.offsetTop-e.scrollTop,r=e.scrollTop+e.clientHeight-(t.offsetTop+t.clientHeight);r<0&&(e.scrollTop-=r),n<0&&(e.scrollTop+=n)})}e.stopPropagation()},placeholder:"⌘ K",ref:r,value:s})]}),te(cy,{portal:!1,ref:o,children:ne(dy,{children:[c.within.map((e,t)=>te(fy,{index:t,value:e,children:te(Iy,{field:e.field,argument:e.argument})},"within-"+t)),c.within.length>0&&c.types.length+c.fields.length>0?te("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,c.types.map((e,t)=>te(fy,{index:c.within.length+t,value:e,children:te(Oy,{type:e.type})},"type-"+t)),c.fields.map((e,t)=>ne(fy,{index:c.within.length+c.types.length+t,value:e,children:[te(Oy,{type:e.type}),".",te(Iy,{field:e.field,argument:e.argument})]},"field-"+t)),c.within.length+c.types.length+c.fields.length===0?te("div",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):null]})})]}):null}function ky(e){const{explorerNavStack:n}=nv({nonNull:!0,caller:e||ky}),{schema:r}=Kg({nonNull:!0,caller:e||ky}),o=n[n.length-1];return(0,t.useCallback)(e=>{const t={within:[],types:[],fields:[]};if(!r)return t;const n=o.def,a=r.getTypeMap();let s=Object.keys(a);n&&(s=s.filter(e=>e!==n.name),s.unshift(n.name));for(const r of s){if(t.within.length+t.types.length+t.fields.length>=100)break;const o=a[r];if(n!==o&&_y(r,e)&&t.types.push({type:o}),!(0,i.isObjectType)(o)&&!(0,i.isInterfaceType)(o)&&!(0,i.isInputObjectType)(o))continue;const s=o.getFields();for(const r in s){const i=s[r];let a;if(!_y(r,e)){if(!("args"in i))continue;if(a=i.args.filter(t=>_y(t.name,e)),0===a.length)continue}t[n===o?"within":"fields"].push(...a?a.map(e=>({type:o,field:i,argument:e})):[{type:o,field:i}])}}return t},[o.def,r])}function _y(e,t){try{const n=t.replace(/[^_0-9A-Za-z]/g,e=>"\\"+e);return-1!==e.search(new RegExp(n,"i"))}catch(n){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}}function Oy(e){return te("span",{className:"graphiql-doc-explorer-search-type",children:e.type.name})}function Iy(e){return ne(re,{children:[te("span",{className:"graphiql-doc-explorer-search-field",children:e.field.name}),e.argument?ne(re,{children:["(",te("span",{className:"graphiql-doc-explorer-search-argument",children:e.argument.name}),":"," ",ov(e.argument.type,e=>te(Oy,{type:e})),")"]}):null]})}u(Ny,"Search"),Sy(Ny,"Search"),u(ky,"useSearchResults"),Sy(ky,"useSearchResults"),u(_y,"isMatch"),Sy(_y,"isMatch"),u(Oy,"Type"),Sy(Oy,"Type"),u(Iy,"Field$1"),Sy(Iy,"Field");var Ly=Object.defineProperty,Ay=u((e,t)=>Ly(e,"name",{value:t,configurable:!0}),"__name$l");function Dy(e){const{push:t}=nv({nonNull:!0});return te("a",{className:"graphiql-doc-explorer-field-name",onClick:n=>{n.preventDefault(),t({name:e.field.name,def:e.field})},href:"#",children:e.field.name})}u(Dy,"FieldLink"),Ay(Dy,"FieldLink");var My=Object.defineProperty,Ry=u((e,t)=>My(e,"name",{value:t,configurable:!0}),"__name$k");function Fy(e){return(0,i.isNamedType)(e.type)?ne(re,{children:[e.type.description?te(bm,{type:"description",children:e.type.description}):null,te(Py,{type:e.type}),te(jy,{type:e.type}),te(Uy,{type:e.type}),te($y,{type:e.type})]}):null}function Py(e){let{type:t}=e;return(0,i.isObjectType)(t)&&t.getInterfaces().length>0?te(Ev,{title:"Implements",children:t.getInterfaces().map(e=>te("div",{children:te(lv,{type:e})},e.name))}):null}function jy(e){let{type:n}=e;const[r,o]=(0,t.useState)(!1);if(!(0,i.isObjectType)(n)&&!(0,i.isInterfaceType)(n)&&!(0,i.isInputObjectType)(n))return null;const a=n.getFields(),s=[],l=[];for(const e of Object.keys(a).map(e=>a[e]))e.deprecationReason?l.push(e):s.push(e);return ne(re,{children:[s.length>0?te(Ev,{title:"Fields",children:s.map(e=>te(Vy,{field:e},e.name))}):null,l.length>0?r||0===s.length?te(Ev,{title:"Deprecated Fields",children:l.map(e=>te(Vy,{field:e},e.name))}):te(Ur,{type:"button",onClick:()=>{o(!0)},children:"Show Deprecated Fields"}):null]})}function Vy(e){let{field:t}=e;const n="args"in t?t.args.filter(e=>!e.deprecationReason):[];return ne("div",{className:"graphiql-doc-explorer-item",children:[ne("div",{children:[te(Dy,{field:t}),n.length>0?ne(re,{children:["(",te("span",{children:n.map(e=>1===n.length?te(dv,{arg:e,inline:!0},e.name):te("div",{className:"graphiql-doc-explorer-argument-multiple",children:te(dv,{arg:e,inline:!0})},e.name))}),")"]}):null,": ",te(lv,{type:t.type}),te(qg,{field:t})]}),t.description?te(bm,{type:"description",onlyShowFirstChild:!0,children:t.description}):null,te(hv,{children:t.deprecationReason})]})}function Uy(e){let{type:n}=e;const[r,o]=(0,t.useState)(!1);if(!(0,i.isEnumType)(n))return null;const a=[],s=[];for(const e of n.getValues())e.deprecationReason?s.push(e):a.push(e);return ne(re,{children:[a.length>0?te(Ev,{title:"Enum Values",children:a.map(e=>te(By,{value:e},e.name))}):null,s.length>0?r||0===a.length?te(Ev,{title:"Deprecated Enum Values",children:s.map(e=>te(By,{value:e},e.name))}):te(Ur,{type:"button",onClick:()=>{o(!0)},children:"Show Deprecated Values"}):null]})}function By(e){let{value:t}=e;return ne("div",{className:"graphiql-doc-explorer-item",children:[te("div",{className:"graphiql-doc-explorer-enum-value",children:t.name}),t.description?te(bm,{type:"description",children:t.description}):null,t.deprecationReason?te(bm,{type:"deprecation",children:t.deprecationReason}):null]})}function $y(e){let{type:t}=e;const{schema:n}=Kg({nonNull:!0});return n&&(0,i.isAbstractType)(t)?te(Ev,{title:(0,i.isInterfaceType)(t)?"Implementations":"Possible Types",children:n.getPossibleTypes(t).map(e=>te("div",{children:te(lv,{type:e})},e.name))}):null}u(Fy,"TypeDocumentation"),Ry(Fy,"TypeDocumentation"),u(Py,"ImplementsInterfaces"),Ry(Py,"ImplementsInterfaces"),u(jy,"Fields"),Ry(jy,"Fields"),u(Vy,"Field"),Ry(Vy,"Field"),u(Uy,"EnumValues"),Ry(Uy,"EnumValues"),u(By,"EnumValue"),Ry(By,"EnumValue"),u($y,"PossibleTypes"),Ry($y,"PossibleTypes");var qy=Object.defineProperty,Hy=u((e,t)=>qy(e,"name",{value:t,configurable:!0}),"__name$j");function Gy(){const{fetchError:e,isFetching:t,schema:n,validationErrors:r}=Kg({nonNull:!0,caller:Gy}),{explorerNavStack:o,pop:a}=nv({nonNull:!0,caller:Gy}),s=o[o.length-1];let l,u=null;return e?u=te("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):r.length>0?u=ne("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",r[0].message]}):t?u=te(Em,{}):n?1===o.length?u=te(Ov,{schema:n}):(0,i.isType)(s.def)?u=te(Fy,{type:s.def}):s.def&&(u=te(xv,{field:s.def})):u=te("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"}),o.length>1&&(l=o[o.length-2].name),ne("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[ne("div",{className:"graphiql-doc-explorer-header",children:[ne("div",{className:"graphiql-doc-explorer-header-content",children:[l&&ne("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:a,"aria-label":"Go back to "+l,children:[te(sr,{}),l]}),te("div",{className:"graphiql-doc-explorer-title",children:s.name})]}),te("div",{className:"graphiql-doc-explorer-search",children:te(Ny,{},s.name)})]}),te("div",{className:"graphiql-doc-explorer-content",children:u})]})}u(Gy,"DocExplorer"),Hy(Gy,"DocExplorer");var Wy=Object.defineProperty,zy=u((e,t)=>Wy(e,"name",{value:t,configurable:!0}),"__name$i");const Ky={title:"Documentation Explorer",icon:zy(u((function(){const e=Xy();return(null==e?void 0:e.visiblePlugin)===Ky?te(mr,{}):te(gr,{})}),"Icon"),"Icon"),content:Gy};e.G=Ky;const Qy={title:"History",icon:br,content:bg};e.J=Qy;const Yy=V("PluginContext");function Jy(e){const n=le(),r=nv(),i=mg(),o=(0,t.useMemo)(()=>{const t=[],n={};r&&(t.push(Ky),n[Ky.title]=!0),i&&(t.push(Qy),n[Qy.title]=!0);for(const r of e.plugins||[]){if("string"!=typeof r.title||!r.title)throw new Error("All GraphiQL plugins must have a unique title");if(n[r.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${r.title}'`);t.push(r),n[r.title]=!0}return t},[r,i,e.plugins]),[a,s]=(0,t.useState)(()=>{const t=null==n?void 0:n.get(Zy),r=o.find(e=>e.title===t);return r||(t&&(null==n||n.set(Zy,"")),e.visiblePlugin&&o.find(t=>("string"==typeof e.visiblePlugin?t.title:t)===e.visiblePlugin)||null)}),{onTogglePluginVisibility:l}=e,u=(0,t.useCallback)(e=>{const t=e&&o.find(t=>("string"==typeof e?t.title:t)===e)||null;s(e=>t===e?e:(null==l||l(t),t))},[l,o]);(0,t.useEffect)(()=>{e.visiblePlugin&&u(e.visiblePlugin)},[o,e.visiblePlugin,u]);const c=(0,t.useMemo)(()=>({plugins:o,setVisiblePlugin:u,visiblePlugin:a}),[o,u,a]);return te(Yy.Provider,{value:c,children:e.children})}e.P=Yy,u(Jy,"PluginContextProvider"),zy(Jy,"PluginContextProvider");const Xy=U(Yy);e.K=Xy;const Zy="visiblePlugin";var eb=Object.defineProperty,tb=u((e,t)=>eb(e,"name",{value:t,configurable:!0}),"__name$h");function nb(e,t,n,r,o,a){function s(e){if(!(n&&r&&o&&e.currentTarget instanceof HTMLElement))return;const t=e.currentTarget.innerText,i=n.getType(t);i&&(o.setVisiblePlugin(Ky),r.push({name:i.name,def:i}),null==a||a(i))}Mg([],{useCommonAddons:!1}).then(e=>{let n,r,o,a,l,u,c,d,f;e.on(t,"select",(e,t)=>{if(!n){const e=t.parentNode;n=document.createElement("div"),n.className="CodeMirror-hint-information",e.appendChild(n);const i=document.createElement("header");i.className="CodeMirror-hint-information-header",n.appendChild(i),r=document.createElement("span"),r.className="CodeMirror-hint-information-field-name",i.appendChild(r),o=document.createElement("span"),o.className="CodeMirror-hint-information-type-name-pill",i.appendChild(o),a=document.createElement("span"),o.appendChild(a),l=document.createElement("a"),l.className="CodeMirror-hint-information-type-name",l.href="javascript:void 0",l.addEventListener("click",s),o.appendChild(l),u=document.createElement("span"),o.appendChild(u),c=document.createElement("div"),c.className="CodeMirror-hint-information-description",n.appendChild(c),d=document.createElement("div"),d.className="CodeMirror-hint-information-deprecation",n.appendChild(d);const p=document.createElement("span");p.className="CodeMirror-hint-information-deprecation-label",p.innerText="Deprecated",d.appendChild(p),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",d.appendChild(f);const h=parseInt(window.getComputedStyle(n).paddingBottom.replace(/px$/,""),10)||0,m=tb(()=>{n&&(n.style.paddingTop=e.scrollTop+h+"px")},"handleScroll");let g;e.addEventListener("scroll",m),e.addEventListener("DOMNodeRemoved",g=tb(t=>{t.target===e&&(e.removeEventListener("scroll",m),e.removeEventListener("DOMNodeRemoved",g),n&&n.removeEventListener("click",s),n=null,r=null,o=null,a=null,l=null,u=null,c=null,d=null,f=null,g=null)},"onRemoveFn"))}if(r&&(r.innerText=e.text),o&&a&&l&&u)if(e.type){o.style.display="inline";const t=tb(e=>{(0,i.isNonNullType)(e)?(u.innerText="!"+u.innerText,t(e.ofType)):(0,i.isListType)(e)?(a.innerText+="[",u.innerText="]"+u.innerText,t(e.ofType)):l.innerText=e.name},"renderType");a.innerText="",u.innerText="",t(e.type)}else a.innerText="",l.innerText="",u.innerText="",o.style.display="none";c&&(e.description?(c.style.display="block",c.innerHTML=ym.render(e.description)):(c.style.display="none",c.innerHTML="")),d&&f&&(e.deprecationReason?(d.style.display="block",f.innerHTML=ym.render(e.deprecationReason)):(d.style.display="none",f.innerHTML=""))})}),u(s,"onClickHintInformation"),tb(s,"onClickHintInformation")}u(nb,"onHasCompletion"),tb(nb,"onHasCompletion");var rb=Object.defineProperty,ib=u((e,t)=>rb(e,"name",{value:t,configurable:!0}),"__name$g");function ob(e,n){(0,t.useEffect)(()=>{e&&"string"==typeof n&&n!==e.getValue()&&e.setValue(n)},[e,n])}function ab(e,n,r){(0,t.useEffect)(()=>{e&&e.setOption(n,r)},[e,n,r])}function sb(e,n,r,i,o){const{updateActiveTabValues:a}=iE({nonNull:!0,caller:o}),s=le();(0,t.useEffect)(()=>{if(!e)return;const t=Cy(500,e=>{s&&null!==r&&s.set(r,e)}),o=Cy(100,e=>{a({[i]:e})}),l=ib((e,r)=>{if(!r)return;const i=e.getValue();t(i),o(i),null==n||n(i)},"handleChange");return e.on("change",l),()=>e.off("change",l)},[n,e,s,r,i,a])}function lb(e,n,r){const{schema:i}=Kg({nonNull:!0,caller:r}),o=nv(),a=Xy();(0,t.useEffect)(()=>{if(!e)return;const t=ib((e,t)=>{nb(0,t,i,o,a,e=>{null==n||n({kind:"Type",type:e,schema:i||void 0})})},"handleCompletion");return e.on("hasCompletion",t),()=>e.off("hasCompletion",t)},[n,e,o,a,i])}function ub(e,n,r){(0,t.useEffect)(()=>{if(e){for(const t of n)e.removeKeyMap(t);if(r){const t={};for(const e of n)t[e]=()=>r();e.addKeyMap(t)}}},[e,n,r])}function cb(){let{caller:e,onCopyQuery:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{queryEditor:r}=iE({nonNull:!0,caller:e||cb});return(0,t.useCallback)(()=>{if(!r)return;const e=r.getValue();Vg(e),null==n||n(e)},[r,n])}function db(){let{caller:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{queryEditor:n}=iE({nonNull:!0,caller:e||db}),{schema:r}=Kg({nonNull:!0,caller:db});return(0,t.useCallback)(()=>{const e=null==n?void 0:n.documentAST,t=null==n?void 0:n.getValue();e&&t&&n.setValue((0,i.print)(I(e,r)))},[n,r])}function fb(){let{caller:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{queryEditor:n,headerEditor:r,variableEditor:o}=iE({nonNull:!0,caller:e||fb});return(0,t.useCallback)(()=>{if(o){const e=o.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&o.setValue(t)}catch{}}if(r){const e=r.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&r.setValue(t)}catch{}}if(n){const e=n.getValue(),t=(0,i.print)((0,i.parse)(e));t!==e&&n.setValue(t)}},[n,o,r])}function pb(){let{getDefaultFieldNames:e,caller:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{schema:r}=Kg({nonNull:!0,caller:n||pb}),{queryEditor:i}=iE({nonNull:!0,caller:n||pb});return(0,t.useCallback)(()=>{if(!i)return;const t=i.getValue(),{insertions:n,result:o}=w(r,t,e);return n&&n.length>0&&i.operation(()=>{const e=i.getCursor(),t=i.indexFromPos(e);i.setValue(o||"");let r=0;const a=n.map(e=>{let{index:t,string:n}=e;return i.markText(i.posFromIndex(t+r),i.posFromIndex(t+(r+=n.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"})});setTimeout(()=>a.forEach(e=>e.clear()),7e3);let s=t;n.forEach(e=>{let{index:n,string:r}=e;nhb(e,"name",{value:t,configurable:!0}),"__name$f");function gb(){let{editorTheme:e=Ig,keyMap:r=Lg,onEdit:i,readOnly:o=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;const{initialHeaders:s,headerEditor:l,setHeaderEditor:u,shouldPersistHeaders:c}=iE({nonNull:!0,caller:a||gb}),d=Ng(),f=db({caller:a||gb}),p=fb({caller:a||gb}),h=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=!0;return Mg([Promise.resolve().then(n.t.bind(null,49,7)).then((function(e){return e.j}))]).then(n=>{if(!t)return;const r=h.current;if(!r)return;const i=n(r,{value:s,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!o&&"nocursor",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:Dg});i.addKeyMap({"Cmd-Space"(){i.showHint({completeSingle:!1,container:r})},"Ctrl-Space"(){i.showHint({completeSingle:!1,container:r})},"Alt-Space"(){i.showHint({completeSingle:!1,container:r})},"Shift-Space"(){i.showHint({completeSingle:!1,container:r})}}),i.on("keyup",(e,t)=>{const n=t.keyCode;(n>=65&&n<=90||!t.shiftKey&&n>=48&&n<=57||t.shiftKey&&189===n||t.shiftKey&&222===n)&&e.execCommand("autocomplete")}),u(i)}),()=>{t=!1}},[e,s,o,u]),ab(l,"keyMap",r),sb(l,i,c?vb:null,"headers",gb),ub(l,["Cmd-Enter","Ctrl-Enter"],null==d?void 0:d.run),ub(l,["Shift-Ctrl-P"],p),ub(l,["Shift-Ctrl-M"],f),h}u(gb,"useHeaderEditor"),mb(gb,"useHeaderEditor");const vb="headers";var yb=Object.defineProperty,bb=u((e,t)=>yb(e,"name",{value:t,configurable:!0}),"__name$e");const Eb=Array.from({length:11},(e,t)=>String.fromCharCode(8192+t)).concat(["\u2028","\u2029"," "," "]),Tb=new RegExp("["+Eb.join("")+"]","g");function wb(e){return e.replace(Tb," ")}u(wb,"normalizeWhitespace"),bb(wb,"normalizeWhitespace");var Cb=Object.defineProperty,xb=u((e,t)=>Cb(e,"name",{value:t,configurable:!0}),"__name$d");function Sb(){let{editorTheme:e=Ig,keyMap:r=Lg,onClickReference:i,onCopyQuery:o,onEdit:a,readOnly:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;const{schema:c}=Kg({nonNull:!0,caller:l||Sb}),{externalFragments:d,initialQuery:f,queryEditor:p,setOperationName:h,setQueryEditor:m,validationRules:g,variableEditor:v,updateActiveTabValues:y}=iE({nonNull:!0,caller:l||Sb}),b=Ng(),E=le(),T=nv(),w=Xy(),C=cb({caller:l||Sb,onCopyQuery:o}),x=db({caller:l||Sb}),S=fb({caller:l||Sb}),N=(0,t.useRef)(null),k=(0,t.useRef)(),_=(0,t.useRef)(()=>{});(0,t.useEffect)(()=>{_.current=e=>{T&&w&&(w.setVisiblePlugin(Ky),e&&"Type"===e.kind?T.push({name:e.type.name,def:e.type}):"Field"===e.kind||"Argument"===e.kind&&e.field?T.push({name:e.field.name,def:e.field}):"EnumValue"===e.kind&&e.type&&T.push({name:e.type.name,def:e.type}),null==i||i(e))}},[T,i,w]),(0,t.useEffect)(()=>{let t=!0;return Mg([Promise.resolve().then(n.t.bind(null,50,7)).then((function(e){return e.c})),Promise.resolve().then(n.t.bind(null,19,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,51,7)),Promise.resolve().then(n.t.bind(null,52,7)),Promise.resolve().then(n.t.bind(null,53,7)),Promise.resolve().then(n.t.bind(null,54,7)),Promise.resolve().then(n.t.bind(null,55,7))]).then(n=>{if(!t)return;k.current=n;const r=N.current;if(!r)return;const i=n(r,{value:f,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!s&&"nocursor",lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:r,externalFragments:void 0},info:{schema:void 0,renderDescription:e=>ym.render(e),onClick:e=>{_.current(e)}},jump:{schema:void 0,onClick:e=>{_.current(e)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...Dg,"Cmd-S"(){},"Ctrl-S"(){}}});i.addKeyMap({"Cmd-Space"(){i.showHint({completeSingle:!0,container:r})},"Ctrl-Space"(){i.showHint({completeSingle:!0,container:r})},"Alt-Space"(){i.showHint({completeSingle:!0,container:r})},"Shift-Space"(){i.showHint({completeSingle:!0,container:r})},"Shift-Alt-Space"(){i.showHint({completeSingle:!0,container:r})}}),i.on("keyup",(e,t)=>{Ob.test(t.key)&&e.execCommand("autocomplete")}),i.on("beforeChange",(e,t)=>{var n;if("paste"===t.origin){const e=t.text.map(wb);null==(n=t.update)||n.call(t,t.from,t.to,e)}}),i.documentAST=null,i.operationName=null,i.operations=null,i.variableToType=null,m(i)}),()=>{t=!1}},[e,f,s,m]),ab(p,"keyMap",r),(0,t.useEffect)(()=>{if(!p)return;function e(e){var t,n,r,i,o;const a=ln(c,e.getValue()),s=L(null!=(t=e.operations)?t:void 0,null!=(n=e.operationName)?n:void 0,null==a?void 0:a.operations);return e.documentAST=null!=(r=null==a?void 0:a.documentAST)?r:null,e.operationName=null!=s?s:null,e.operations=null!=(i=null==a?void 0:a.operations)?i:null,v&&(v.state.lint.linterOptions.variableToType=null==a?void 0:a.variableToType,v.options.lint.variableToType=null==a?void 0:a.variableToType,v.options.hintOptions.variableToType=null==a?void 0:a.variableToType,null==(o=k.current)||o.signal(v,"change",v)),a?{...a,operationName:s}:null}u(e,"getAndUpdateOperationFacts"),xb(e,"getAndUpdateOperationFacts");const t=Cy(100,t=>{var n;const r=t.getValue();null==E||E.set(Ib,r);const i=t.operationName,o=e(t);void 0!==(null==o?void 0:o.operationName)&&(null==E||E.set(Lb,o.operationName)),null==a||a(r,null==o?void 0:o.documentAST),(null==o?void 0:o.operationName)&&i!==o.operationName&&h(o.operationName),y({query:r,operationName:null!=(n=null==o?void 0:o.operationName)?n:null})});return e(p),p.on("change",t),()=>p.off("change",t)},[a,p,c,h,E,v,y]),Nb(p,null!=c?c:null,k),kb(p,null!=g?g:null,k),_b(p,d,k),lb(p,i||null,Sb);const O=null==b?void 0:b.run,I=(0,t.useCallback)(()=>{var e;if(!(O&&p&&p.operations&&p.hasFocus()))return void(null==O||O());const t=p.indexFromPos(p.getCursor());let n;for(const r of p.operations)r.loc&&r.loc.start<=t&&r.loc.end>=t&&(n=null==(e=r.name)?void 0:e.value);n&&n!==p.operationName&&h(n),O()},[p,O,h]);return ub(p,["Cmd-Enter","Ctrl-Enter"],I),ub(p,["Shift-Ctrl-C"],C),ub(p,["Shift-Ctrl-P","Shift-Ctrl-F"],S),ub(p,["Shift-Ctrl-M"],x),N}function Nb(e,n,r){(0,t.useEffect)(()=>{if(!e)return;const t=e.options.lint.schema!==n;e.state.lint.linterOptions.schema=n,e.options.lint.schema=n,e.options.hintOptions.schema=n,e.options.info.schema=n,e.options.jump.schema=n,t&&r.current&&r.current.signal(e,"change",e)},[e,n,r])}function kb(e,n,r){(0,t.useEffect)(()=>{if(!e)return;const t=e.options.lint.validationRules!==n;e.state.lint.linterOptions.validationRules=n,e.options.lint.validationRules=n,t&&r.current&&r.current.signal(e,"change",e)},[e,n,r])}function _b(e,n,r){const i=(0,t.useMemo)(()=>[...n.values()],[n]);(0,t.useEffect)(()=>{if(!e)return;const t=e.options.lint.externalFragments!==i;e.state.lint.linterOptions.externalFragments=i,e.options.lint.externalFragments=i,e.options.hintOptions.externalFragments=i,t&&r.current&&r.current.signal(e,"change",e)},[e,i,r])}u(Sb,"useQueryEditor"),xb(Sb,"useQueryEditor"),u(Nb,"useSynchronizeSchema"),xb(Nb,"useSynchronizeSchema"),u(kb,"useSynchronizeValidationRules"),xb(kb,"useSynchronizeValidationRules"),u(_b,"useSynchronizeExternalFragments"),xb(_b,"useSynchronizeExternalFragments");const Ob=/^[a-zA-Z0-9_@(]$/,Ib="query",Lb="operationName";var Ab=Object.defineProperty,Db=u((e,t)=>Ab(e,"name",{value:t,configurable:!0}),"__name$c");function Mb(e){let{defaultQuery:t,headers:n,query:r,variables:i,storage:o}=e;const a=null==o?void 0:o.get(Qb);try{if(!a)throw new Error("Storage for tabs is empty");const e=JSON.parse(a);if(Rb(e)){const t=Wb({query:r,variables:i,headers:n});let o=-1;for(let n=0;n=0)e.activeTabIndex=o;else{const o=r?zb(r):null;e.tabs.push({id:Gb(),hash:t,title:o||Kb,query:r,variables:i,headers:n,operationName:o,response:null}),e.activeTabIndex=e.tabs.length-1}return e}throw new Error("Storage for tabs is invalid")}catch(e){return{activeTabIndex:0,tabs:[qb({query:null!=r?r:t,variables:i,headers:n})]}}}function Rb(e){return e&&"object"==typeof e&&!Array.isArray(e)&&Pb(e,"activeTabIndex")&&"tabs"in e&&Array.isArray(e.tabs)&&e.tabs.every(Fb)}function Fb(e){return e&&"object"==typeof e&&!Array.isArray(e)&&jb(e,"id")&&jb(e,"title")&&Vb(e,"query")&&Vb(e,"variables")&&Vb(e,"headers")&&Vb(e,"operationName")&&Vb(e,"response")}function Pb(e,t){return t in e&&"number"==typeof e[t]}function jb(e,t){return t in e&&"string"==typeof e[t]}function Vb(e,t){return t in e&&("string"==typeof e[t]||null===e[t])}function Ub(e){let{queryEditor:n,variableEditor:r,headerEditor:i,responseEditor:o}=e;return(0,t.useCallback)(e=>{var t,a,s,l,u;const c=null!=(t=null==n?void 0:n.getValue())?t:null,d=null!=(a=null==r?void 0:r.getValue())?a:null,f=null!=(s=null==i?void 0:i.getValue())?s:null,p=null!=(l=null==n?void 0:n.operationName)?l:null;return Hb(e,{query:c,variables:d,headers:f,response:null!=(u=null==o?void 0:o.getValue())?u:null,operationName:p})},[n,r,i,o])}function Bb(e){let{storage:n,shouldPersistHeaders:r}=e;const i=(0,t.useMemo)(()=>Cy(500,e=>{null==n||n.set(Qb,e)}),[n]);return(0,t.useCallback)(e=>{i(JSON.stringify(e,(e,t)=>"hash"===e||"response"===e||!r&&"headers"===e?null:t))},[r,i])}function $b(e){let{queryEditor:n,variableEditor:r,headerEditor:i,responseEditor:o}=e;return(0,t.useCallback)(e=>{let{query:t,variables:a,headers:s,response:l}=e;null==n||n.setValue(null!=t?t:""),null==r||r.setValue(null!=a?a:""),null==i||i.setValue(null!=s?s:""),null==o||o.setValue(null!=l?l:"")},[i,n,o,r])}function qb(){let{query:e=null,variables:t=null,headers:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:Gb(),hash:Wb({query:e,variables:t,headers:n}),title:Kb,query:e,variables:t,headers:n,operationName:null,response:null}}function Hb(e,t){return{...e,tabs:e.tabs.map((n,r)=>{if(r!==e.activeTabIndex)return n;const i={...n,...t};return{...i,hash:Wb(i),title:i.operationName||(i.query?zb(i.query):void 0)||Kb}})}}function Gb(){const e=Db(()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),"s4");return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function Wb(e){var t,n,r;return[null!=(t=e.query)?t:"",null!=(n=e.variables)?n:"",null!=(r=e.headers)?r:""].join("|")}function zb(e){var t;const n=/^(?!.*#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/.exec(e);return null!=(t=null==n?void 0:n[2])?t:null}u(Mb,"getDefaultTabState"),Db(Mb,"getDefaultTabState"),u(Rb,"isTabsState"),Db(Rb,"isTabsState"),u(Fb,"isTabState"),Db(Fb,"isTabState"),u(Pb,"hasNumberKey"),Db(Pb,"hasNumberKey"),u(jb,"hasStringKey"),Db(jb,"hasStringKey"),u(Vb,"hasStringOrNullKey"),Db(Vb,"hasStringOrNullKey"),u(Ub,"useSynchronizeActiveTabValues"),Db(Ub,"useSynchronizeActiveTabValues"),u(Bb,"useStoreTabs"),Db(Bb,"useStoreTabs"),u($b,"useSetEditorValues"),Db($b,"useSetEditorValues"),u(qb,"createTab"),Db(qb,"createTab"),u(Hb,"setPropertiesInActiveTab"),Db(Hb,"setPropertiesInActiveTab"),u(Gb,"guid"),Db(Gb,"guid"),u(Wb,"hashFromTabContents"),Db(Wb,"hashFromTabContents"),u(zb,"fuzzyExtractOperationName"),Db(zb,"fuzzyExtractOperationName");const Kb="",Qb="tabState";var Yb=Object.defineProperty,Jb=u((e,t)=>Yb(e,"name",{value:t,configurable:!0}),"__name$b");function Xb(){let{editorTheme:e=Ig,keyMap:r=Lg,onClickReference:i,onEdit:o,readOnly:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;const{initialVariables:l,variableEditor:u,setVariableEditor:c}=iE({nonNull:!0,caller:s||Xb}),d=Ng(),f=db({caller:s||Xb}),p=fb({caller:s||Xb}),h=(0,t.useRef)(null),m=(0,t.useRef)();return(0,t.useEffect)(()=>{let t=!0;return Mg([Promise.resolve().then(n.t.bind(null,56,7)),Promise.resolve().then(n.t.bind(null,57,7)),Promise.resolve().then(n.t.bind(null,58,7))]).then(n=>{if(!t)return;m.current=n;const r=h.current;if(!r)return;const i=n(r,{value:l,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!a&&"nocursor",foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:r,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:Dg});i.addKeyMap({"Cmd-Space"(){i.showHint({completeSingle:!1,container:r})},"Ctrl-Space"(){i.showHint({completeSingle:!1,container:r})},"Alt-Space"(){i.showHint({completeSingle:!1,container:r})},"Shift-Space"(){i.showHint({completeSingle:!1,container:r})}}),i.on("keyup",(e,t)=>{const n=t.keyCode;(n>=65&&n<=90||!t.shiftKey&&n>=48&&n<=57||t.shiftKey&&189===n||t.shiftKey&&222===n)&&e.execCommand("autocomplete")}),c(i)}),()=>{t=!1}},[e,l,a,c]),ab(u,"keyMap",r),sb(u,o,Zb,"variables",Xb),lb(u,i||null,Xb),ub(u,["Cmd-Enter","Ctrl-Enter"],null==d?void 0:d.run),ub(u,["Shift-Ctrl-P"],p),ub(u,["Shift-Ctrl-M"],f),h}u(Xb,"useVariableEditor"),Jb(Xb,"useVariableEditor");const Zb="variables";var eE=Object.defineProperty,tE=u((e,t)=>eE(e,"name",{value:t,configurable:!0}),"__name$a");const nE=V("EditorContext");function rE(e){const n=le(),[r,o]=(0,t.useState)(null),[a,s]=(0,t.useState)(null),[l,u]=(0,t.useState)(null),[c,d]=(0,t.useState)(null);ob(r,e.headers),ob(a,e.query),ob(l,e.response),ob(c,e.variables);const f=Bb({storage:n,shouldPersistHeaders:e.shouldPersistHeaders}),[p]=(0,t.useState)(()=>{var t,r,i,o,a,s,l,u;const c=null!=(r=null!=(t=e.query)?t:null==n?void 0:n.get(Ib))?r:null,d=null!=(o=null!=(i=e.variables)?i:null==n?void 0:n.get(Zb))?o:null,p=null!=(s=null!=(a=e.headers)?a:null==n?void 0:n.get(vb))?s:null,h=null!=(l=e.response)?l:"",m=Mb({query:c,variables:d,headers:p,defaultQuery:e.defaultQuery||oE,storage:n});return f(m),{query:null!=(u=null!=c?c:0===m.activeTabIndex?m.tabs[0].query:null)?u:"",variables:null!=d?d:"",headers:null!=p?p:"",response:h,tabState:m}}),[h,m]=(0,t.useState)(p.tabState),g=Ub({queryEditor:a,variableEditor:c,headerEditor:r,responseEditor:l}),v=$b({queryEditor:a,variableEditor:c,headerEditor:r,responseEditor:l}),{onTabChange:y}=e,b=(0,t.useCallback)(()=>{m(e=>{const t=g(e),n={tabs:[...t.tabs,qb()],activeTabIndex:t.tabs.length};return f(n),v(n.tabs[n.activeTabIndex]),null==y||y(n),n})},[y,v,f,g]),E=(0,t.useCallback)(e=>{m(t=>{const n={...g(t),activeTabIndex:e};return f(n),v(n.tabs[n.activeTabIndex]),null==y||y(n),n})},[y,v,f,g]),T=(0,t.useCallback)(e=>{m(t=>{const n={tabs:t.tabs.filter((t,n)=>e!==n),activeTabIndex:Math.max(t.activeTabIndex-1,0)};return f(n),v(n.tabs[n.activeTabIndex]),null==y||y(n),n})},[y,v,f]),w=(0,t.useCallback)(e=>{m(t=>{const n=Hb(t,e);return f(n),null==y||y(n),n})},[y,f]),{onEditOperationName:C}=e,x=(0,t.useCallback)(e=>{a&&(a.operationName=e,w({operationName:e}),null==C||C(e))},[C,a,w]),S=(0,t.useMemo)(()=>{const t=new Map;if(Array.isArray(e.externalFragments))for(const n of e.externalFragments)t.set(n.name.value,n);else if("string"==typeof e.externalFragments)(0,i.visit)((0,i.parse)(e.externalFragments,{}),{FragmentDefinition(e){t.set(e.name.value,e)}});else if(e.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return t},[e.externalFragments]),N=(0,t.useMemo)(()=>e.validationRules||[],[e.validationRules]),k=(0,t.useMemo)(()=>({...h,addTab:b,changeTab:E,closeTab:T,updateActiveTabValues:w,headerEditor:r,queryEditor:a,responseEditor:l,variableEditor:c,setHeaderEditor:o,setQueryEditor:s,setResponseEditor:u,setVariableEditor:d,setOperationName:x,initialQuery:p.query,initialVariables:p.variables,initialHeaders:p.headers,initialResponse:p.response,externalFragments:S,validationRules:N,shouldPersistHeaders:e.shouldPersistHeaders||!1}),[h,b,E,T,w,r,a,l,c,x,p,S,N,e.shouldPersistHeaders]);return te(nE.Provider,{value:k,children:e.children})}e.E=nE,u(rE,"EditorContextProvider"),tE(rE,"EditorContextProvider");const iE=U(nE);e.d=iE;const oE='# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: "value") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift-Ctrl-P (or press the prettify button)\n#\n# Merge fragments: Shift-Ctrl-M (or press the merge button)\n#\n# Run Query: Ctrl-Enter (or press the play button)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n\n';var aE=Object.defineProperty,sE=u((e,t)=>aE(e,"name",{value:t,configurable:!0}),"__name$9");function lE(e){let{isHidden:n,...r}=e;const{headerEditor:i}=iE({nonNull:!0,caller:lE}),o=gb(r,lE);return(0,t.useEffect)(()=>{i&&!n&&i.refresh()},[i,n]),te("div",{className:"graphiql-editor"+(n?" hidden":""),ref:o})}u(lE,"HeaderEditor"),sE(lE,"HeaderEditor");var uE=Object.defineProperty,cE=u((e,t)=>uE(e,"name",{value:t,configurable:!0}),"__name$8");function dE(e){var n;const[r,i]=(0,t.useState)({width:null,height:null}),[o,a]=(0,t.useState)(null),s=(0,t.useRef)(null),l=null==(n=fE(e.token))?void 0:n.href;(0,t.useEffect)(()=>{if(s.current)return l?void fetch(l,{method:"HEAD"}).then(e=>{a(e.headers.get("Content-Type"))}).catch(()=>{a(null)}):(i({width:null,height:null}),void a(null))},[l]);const u=null!==r.width&&null!==r.height?ne("div",{children:[r.width,"x",r.height,null!==o?" "+o:null]}):null;return ne("div",{children:[te("img",{onLoad:()=>{var e,t,n,r;i({width:null!=(t=null==(e=s.current)?void 0:e.naturalWidth)?t:null,height:null!=(r=null==(n=s.current)?void 0:n.naturalHeight)?r:null})},ref:s,src:l}),u]})}function fE(e){if("string"!==e.type)return;const t=e.string.slice(1).slice(0,-1).trim();try{const e=window.location;return new URL(t,e.protocol+"//"+e.host)}catch(e){return}}function pE(e){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname)}u(dE,"ImagePreview"),cE(dE,"ImagePreview"),dE.shouldRender=cE(u((function(e){const t=fE(e);return!!t&&pE(t)}),"shouldRender"),"shouldRender"),u(fE,"tokenToURL"),cE(fE,"tokenToURL"),u(pE,"isImageURL"),cE(pE,"isImageURL");var hE=Object.defineProperty,mE=u((e,t)=>hE(e,"name",{value:t,configurable:!0}),"__name$7");function gE(e){const t=Sb(e,gE);return te("div",{className:"graphiql-editor",ref:t})}u(gE,"QueryEditor"),mE(gE,"QueryEditor");var vE=Object.defineProperty,yE=u((e,t)=>vE(e,"name",{value:t,configurable:!0}),"__name$6");function bE(){let{responseTooltip:e,editorTheme:r=Ig,keyMap:i=Lg}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;const{fetchError:s,validationErrors:l}=Kg({nonNull:!0,caller:a||bE}),{initialResponse:u,responseEditor:c,setResponseEditor:d}=iE({nonNull:!0,caller:a||bE}),f=(0,t.useRef)(null),p=(0,t.useRef)(e);return(0,t.useEffect)(()=>{p.current=e},[e]),(0,t.useEffect)(()=>{let e=!0;return Mg([Promise.resolve().then(n.t.bind(null,16,7)).then((function(e){return e.f})),Promise.resolve().then(n.t.bind(null,15,7)).then((function(e){return e.b})),Promise.resolve().then(n.t.bind(null,7,7)).then((function(e){return e.d})),Promise.resolve().then(n.t.bind(null,19,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,6,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,17,7)).then((function(e){return e.j})),Promise.resolve().then(n.t.bind(null,18,7)).then((function(e){return e.s})),Promise.resolve().then(n.t.bind(null,59,7)),Promise.resolve().then(n.t.bind(null,22,7))],{useCommonAddons:!1}).then(t=>{if(!e)return;const n=document.createElement("div");t.registerHelper("info","graphql-results",(e,t,r,i)=>{const a=[],s=p.current;return s&&a.push(te(s,{pos:i,token:e})),dE.shouldRender(e)&&a.push(te(dE,{token:e},"image-preview")),a.length?(o.default.render(a,n),n):(o.default.unmountComponentAtNode(n),null)});const i=f.current;if(!i)return;const a=t(i,{value:u,lineWrapping:!0,readOnly:!0,theme:r,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:Dg});d(a)}),()=>{e=!1}},[r,u,d]),ab(c,"keyMap",i),(0,t.useEffect)(()=>{s&&(null==c||c.setValue(s)),l.length>0&&(null==c||c.setValue(E(l)))},[c,s,l]),f}u(bE,"useResponseEditor"),yE(bE,"useResponseEditor");var EE=Object.defineProperty,TE=u((e,t)=>EE(e,"name",{value:t,configurable:!0}),"__name$5");function wE(e){const t=bE(e,wE);return te("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:t})}u(wE,"ResponseEditor"),TE(wE,"ResponseEditor");var CE=Object.defineProperty,xE=u((e,t)=>CE(e,"name",{value:t,configurable:!0}),"__name$4");function SE(e){let{isHidden:n,...r}=e;const{variableEditor:i}=iE({nonNull:!0,caller:SE}),o=Xb(r,SE);return(0,t.useEffect)(()=>{i&&!n&&i.refresh()},[i,n]),te("div",{className:"graphiql-editor"+(n?" hidden":""),ref:o})}u(SE,"VariableEditor"),xE(SE,"VariableEditor");var NE=Object.defineProperty,kE=u((e,t)=>NE(e,"name",{value:t,configurable:!0}),"__name$3");function _E(e){let{children:t,dangerouslyAssumeSchemaIsValid:n,defaultQuery:r,externalFragments:i,fetcher:o,getDefaultFieldNames:a,headers:s,inputValueDeprecation:l,introspectionQueryName:u,maxHistoryLength:c,onEditOperationName:d,onSchemaChange:f,onTabChange:p,onTogglePluginVisibility:h,operationName:m,plugins:g,query:v,response:y,schema:b,schemaDescription:E,shouldPersistHeaders:T,storage:w,validationRules:C,variables:x,visiblePlugin:S}=e;return te(se,{storage:w,children:te(hg,{maxHistoryLength:c,children:te(rE,{defaultQuery:r,externalFragments:i,headers:s,onEditOperationName:d,onTabChange:p,query:v,response:y,shouldPersistHeaders:T,validationRules:C,variables:x,children:te(zg,{dangerouslyAssumeSchemaIsValid:n,fetcher:o,inputValueDeprecation:l,introspectionQueryName:u,onSchemaChange:f,schema:b,schemaDescription:E,children:te(Sg,{getDefaultFieldNames:a,fetcher:o,operationName:m,children:te(tv,{children:te(Jy,{onTogglePluginVisibility:h,plugins:g,visiblePlugin:S,children:t})})})})})})})}u(_E,"GraphiQLProvider"),kE(_E,"GraphiQLProvider");var OE=Object.defineProperty,IE=u((e,t)=>OE(e,"name",{value:t,configurable:!0}),"__name$2");function LE(){const e=le(),[n,r]=(0,t.useState)(()=>{if(!e)return null;const t=e.get(AE);switch(t){case"light":return"light";case"dark":return"dark";default:return"string"==typeof t&&e.set(AE,""),null}});(0,t.useLayoutEffect)(()=>{"undefined"!=typeof window&&(document.body.classList.remove("graphiql-light"),document.body.classList.remove("graphiql-dark"),n&&document.body.classList.add("graphiql-"+n))},[n]);const i=(0,t.useCallback)(t=>{null==e||e.set(AE,t||""),r(t)},[e]);return(0,t.useMemo)(()=>({theme:n,setTheme:i}),[n,i])}u(LE,"useTheme"),IE(LE,"useTheme");const AE="theme";var DE=Object.defineProperty,ME=u((e,t)=>DE(e,"name",{value:t,configurable:!0}),"__name$1");function RE(e){let{defaultSizeRelation:n=FE,direction:r,initiallyHidden:i,onHiddenElementChange:o,sizeThresholdFirst:a=100,sizeThresholdSecond:s=100,storageKey:l}=e;const c=le(),d=(0,t.useMemo)(()=>Cy(500,e=>{c&&l&&c.set(l,e)}),[c,l]),[f,p]=(0,t.useState)(()=>{const e=c&&l?c.get(l):null;return e===PE||"first"===i?"first":e===jE||"second"===i?"second":null}),h=(0,t.useCallback)(e=>{e!==f&&(p(e),null==o||o(e))},[f,o]),m=(0,t.useRef)(null),g=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(""+n);(0,t.useLayoutEffect)(()=>{const e=c&&l&&c.get(l)||y.current,t="horizontal"===r?"row":"column";m.current&&(m.current.style.display="flex",m.current.style.flexDirection=t,m.current.style.flex=e===PE||e===jE?y.current:e),v.current&&(v.current.style.display="flex",v.current.style.flexDirection=t,v.current.style.flex="1"),g.current&&(g.current.style.display="flex",g.current.style.flexDirection=t)},[r,c,l]);const b=(0,t.useCallback)(e=>{const t="first"===e?m.current:v.current;if(t&&(t.style.left="-1000px",t.style.position="absolute",t.style.opacity="0",t.style.height="500px",t.style.width="500px",m.current)){const e=parseFloat(m.current.style.flex);(!Number.isFinite(e)||e<1)&&(m.current.style.flex="1"),m.current.style.flex}},[]),E=(0,t.useCallback)(e=>{const t="first"===e?m.current:v.current;if(t&&(t.style.width="",t.style.height="",t.style.opacity="",t.style.position="",t.style.left="",m.current&&c&&l)){const e=null==c?void 0:c.get(l);e!==PE&&e!==jE&&(m.current.style.flex=e||y.current)}},[c,l]);return(0,t.useLayoutEffect)(()=>{"first"===f?b("first"):E("first"),"second"===f?b("second"):E("second")},[f,b,E]),(0,t.useEffect)(()=>{if(!g.current||!m.current||!v.current)return;const e=g.current,t=m.current,n=t.parentElement,i="horizontal"===r?"clientX":"clientY",o="horizontal"===r?"left":"top",l="horizontal"===r?"right":"bottom",c="horizontal"===r?"clientWidth":"clientHeight";function f(r){r.preventDefault();const f=r[i]-e.getBoundingClientRect()[o];function p(r){if(0===r.buttons)return m();const u=r[i]-n.getBoundingClientRect()[o]-f,p=n.getBoundingClientRect()[l]-r[i]+f-e[c];if(u{e.removeEventListener("mousedown",f),e.removeEventListener("dblclick",p)}},[r,h,a,s,d]),(0,t.useMemo)(()=>({dragBarRef:g,hiddenElement:f,firstRef:m,setHiddenElement:p,secondRef:v}),[f,p])}u(RE,"useDragResize"),ME(RE,"useDragResize");const FE=1,PE="hide-first",jE="hide-second",VE=(0,t.forwardRef)((e,n)=>{let{label:r,...i}=e;const[o,a]=(0,t.useState)(null);return te(Jm,{label:r,children:te(Vr,{...i,ref:n,type:"button",className:jr("graphiql-toolbar-button",o?"error":"",i.className),onClick:e=>{var t;try{null==(t=i.onClick)||t.call(i,e),a(null)}catch(e){a(e instanceof Error?e:new Error("Toolbar button click failed: "+e))}},"aria-label":o?o.message:r,"aria-invalid":o?"true":i["aria-invalid"]})})});e.aD=VE,VE.displayName="ToolbarButton";var UE=Object.defineProperty,BE=u((e,t)=>UE(e,"name",{value:t,configurable:!0}),"__name");function $E(){const{queryEditor:e,setOperationName:t}=iE({nonNull:!0,caller:$E}),{isFetching:n,operationName:r,run:i,stop:o}=Ng({nonNull:!0,caller:$E}),a=(null==e?void 0:e.operations)||[],s=a.length>1&&"string"!=typeof r,l=(n?"Stop":"Execute")+" query (Ctrl-Enter)",u={type:"button",className:"graphiql-execute-button",children:te(n?Dr:Sr,{}),"aria-label":l};return s?ne(ld,{children:[te(Jm,{label:l,children:te(ld.Button,{...u})}),te(ld.List,{children:a.map((n,r)=>{const o=n.name?n.name.value:``;return te(ld.Item,{onSelect:()=>{var r;const o=null==(r=n.name)?void 0:r.value;e&&o&&o!==e.operationName&&t(o),i()},children:o},`${o}-${r}`)})})]}):te(Jm,{label:l,children:te("button",{...u,onClick:()=>{n?o():i()}})})}u($E,"ExecuteButton"),BE($E,"ExecuteButton");const qE=(0,t.forwardRef)((e,t)=>{let{button:n,children:r,label:i,...o}=e;const a=`${i}${o.value?": "+o.value:""}`;return ne(cd.Input,{...o,ref:t,className:jr("graphiql-toolbar-listbox",o.className),"aria-label":a,children:[te(Jm,{label:a,children:te(cd.Button,{children:n})}),te(cd.Popover,{children:r})]})});qE.displayName="ToolbarListbox";const HE=xs(qE,{Option:cd.Option});e.aF=HE;const GE=(0,t.forwardRef)((e,t)=>{let{button:n,children:r,label:i,...o}=e;return ne(ld,{...o,ref:t,children:[te(Jm,{label:i,children:te(ld.Button,{className:jr("graphiql-un-styled graphiql-toolbar-menu",o.className),"aria-label":i,children:n})}),te(ld.List,{children:r})]})});GE.displayName="ToolbarMenu";const WE=xs(GE,{Item:ld.Item});e.aG=WE},o=[t,n(3),n(1),n(4)],void 0===(a="function"==typeof(i=s)?i.apply(t,o):i)||(e.exports=a)}).call(this,n(11))},function(e,t){e.exports=window.React},function(e,t){e.exports=window.ReactDOM},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(1),n(2)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.R=e.P=e.L=e.I=e.C=void 0,e.a=Ue,e.i=void 0,e.l=Be,e.o=Je,e.p=He,e.t=qe;var r,i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,b,E,T,w,C,x,S,N,k,_,O,I,L,A,D,M=Object.defineProperty,R=(e,t)=>M(e,"name",{value:t,configurable:!0});(function(e){function t(e){return"string"==typeof e}R(t,"is"),e.is=t})(r||(r={})),function(e){function t(e){return"string"==typeof e}R(t,"is"),e.is=t}(i||(i={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,R(t,"is"),e.is=t}(o||(o={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,R(t,"is"),e.is=t}(a||(a={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}}function n(e){var t=e;return je.objectLiteral(t)&&je.uinteger(t.line)&&je.uinteger(t.character)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(s||(s={})),function(e){function t(e,t,n,r){if(je.uinteger(e)&&je.uinteger(t)&&je.uinteger(n)&&je.uinteger(r))return{start:s.create(e,t),end:s.create(n,r)};if(s.is(e)&&s.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))}function n(e){var t=e;return je.objectLiteral(t)&&s.is(t.start)&&s.is(t.end)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(l||(l={})),function(e){function t(e,t){return{uri:e,range:t}}function n(e){var t=e;return je.objectLiteral(t)&&l.is(t.range)&&(je.string(t.uri)||je.undefined(t.uri))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(u||(u={})),function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}function n(e){var t=e;return je.objectLiteral(t)&&l.is(t.targetRange)&&je.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||je.undefined(t.originSelectionRange))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(c||(c={})),function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}function n(e){var t=e;return je.objectLiteral(t)&&je.numberRange(t.red,0,1)&&je.numberRange(t.green,0,1)&&je.numberRange(t.blue,0,1)&&je.numberRange(t.alpha,0,1)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(d||(d={})),function(e){function t(e,t){return{range:e,color:t}}function n(e){var t=e;return je.objectLiteral(t)&&l.is(t.range)&&d.is(t.color)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(f||(f={})),function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}function n(e){var t=e;return je.objectLiteral(t)&&je.string(t.label)&&(je.undefined(t.textEdit)||w.is(t))&&(je.undefined(t.additionalTextEdits)||je.typedArray(t.additionalTextEdits,w.is))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(p||(p={})),(D=h||(h={})).Comment="comment",D.Imports="imports",D.Region="region",function(e){function t(e,t,n,r,i,o){var a={startLine:e,endLine:t};return je.defined(n)&&(a.startCharacter=n),je.defined(r)&&(a.endCharacter=r),je.defined(i)&&(a.kind=i),je.defined(o)&&(a.collapsedText=o),a}function n(e){var t=e;return je.objectLiteral(t)&&je.uinteger(t.startLine)&&je.uinteger(t.startLine)&&(je.undefined(t.startCharacter)||je.uinteger(t.startCharacter))&&(je.undefined(t.endCharacter)||je.uinteger(t.endCharacter))&&(je.undefined(t.kind)||je.string(t.kind))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(m||(m={})),function(e){function t(e,t){return{location:e,message:t}}function n(e){var t=e;return je.defined(t)&&u.is(t.location)&&je.string(t.message)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(g||(g={})),(A=v||(v={})).Error=1,A.Warning=2,A.Information=3,A.Hint=4,(L=y||(y={})).Unnecessary=1,L.Deprecated=2,function(e){function t(e){var t=e;return je.objectLiteral(t)&&je.string(t.href)}R(t,"is"),e.is=t}(b||(b={})),function(e){function t(e,t,n,r,i,o){var a={range:e,message:t};return je.defined(n)&&(a.severity=n),je.defined(r)&&(a.code=r),je.defined(i)&&(a.source=i),je.defined(o)&&(a.relatedInformation=o),a}function n(e){var t,n=e;return je.defined(n)&&l.is(n.range)&&je.string(n.message)&&(je.number(n.severity)||je.undefined(n.severity))&&(je.integer(n.code)||je.string(n.code)||je.undefined(n.code))&&(je.undefined(n.codeDescription)||je.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(je.string(n.source)||je.undefined(n.source))&&(je.undefined(n.relatedInformation)||je.typedArray(n.relatedInformation,g.is))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(E||(E={})),function(e){function t(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i}function n(e){var t=e;return je.defined(t)&&je.string(t.title)&&je.string(t.command)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(T||(T={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function r(e){return{range:e,newText:""}}function i(e){var t=e;return je.objectLiteral(t)&&je.string(t.newText)&&l.is(t.range)}R(t,"replace"),e.replace=t,R(n,"insert"),e.insert=n,R(r,"del"),e.del=r,R(i,"is"),e.is=i}(w||(w={})),function(e){function t(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r}function n(e){var t=e;return je.objectLiteral(t)&&je.string(t.label)&&(je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(je.string(t.description)||void 0===t.description)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(C||(C={})),function(e){function t(e){var t=e;return je.string(t)}R(t,"is"),e.is=t}(x||(x={})),function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}function r(e,t){return{range:e,newText:"",annotationId:t}}function i(e){var t=e;return w.is(t)&&(C.is(t.annotationId)||x.is(t.annotationId))}R(t,"replace"),e.replace=t,R(n,"insert"),e.insert=n,R(r,"del"),e.del=r,R(i,"is"),e.is=i}(S||(S={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){var t=e;return je.defined(t)&&j.is(t.textDocument)&&Array.isArray(t.edits)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(N||(N={})),function(e){function t(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r}function n(e){var t=e;return t&&"create"===t.kind&&je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(k||(k={})),function(e){function t(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i}function n(e){var t=e;return t&&"rename"===t.kind&&je.string(t.oldUri)&&je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(_||(_={})),function(e){function t(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r}function n(e){var t=e;return t&&"delete"===t.kind&&je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||x.is(t.annotationId))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(O||(O={})),function(e){function t(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return je.string(e.kind)?k.is(e)||_.is(e)||O.is(e):N.is(e)})))}R(t,"is"),e.is=t}(I||(I={}));var F,P,j,V,U,B,$,q,H,G,W,z,K,Q,Y,J,X,Z,ee,te,ne,re,ie,oe,ae,se,le,ue,ce,de,fe,pe,he,me,ge,ve,ye,be,Ee,Te,we,Ce,xe,Se,Ne,ke,_e,Oe,Ie,Le,Ae,De,Me,Re,Fe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return R(e,"TextEditChangeImpl"),e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=w.insert(e,t):x.is(n)?(i=n,r=S.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=S.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=w.replace(e,t):x.is(n)?(i=n,r=S.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=S.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=w.del(e):x.is(t)?(r=t,n=S.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=S.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Pe=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return R(e,"ChangeAnnotations"),e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(x.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(N.is(e)){var n=new Fe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Fe(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}R(e,"WorkspaceChange"),Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(j.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new Fe(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new Fe(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(C.is(t)||x.is(t)?r=t:n=t,void 0===r?i=k.create(e,n):(o=x.is(r)?r:this._changeAnnotations.manage(r),i=k.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(C.is(n)||x.is(n)?i=n:r=n,void 0===i?o=_.create(e,t,r):(a=x.is(i)?i:this._changeAnnotations.manage(i),o=_.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(C.is(t)||x.is(t)?r=t:n=t,void 0===r?i=O.create(e,n):(o=x.is(r)?r:this._changeAnnotations.manage(r),i=O.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}})(),function(e){function t(e){return{uri:e}}function n(e){var t=e;return je.defined(t)&&je.string(t.uri)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(F||(F={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return je.defined(t)&&je.string(t.uri)&&je.integer(t.version)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(P||(P={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return je.defined(t)&&je.string(t.uri)&&(null===t.version||je.integer(t.version))}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(j||(j={})),function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}function n(e){var t=e;return je.defined(t)&&je.string(t.uri)&&je.string(t.languageId)&&je.integer(t.version)&&je.string(t.text)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(V||(V={})),function(e){function t(t){var n=t;return n===e.PlainText||n===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",R(t,"is"),e.is=t}(U||(U={})),function(e){function t(e){var t=e;return je.objectLiteral(e)&&U.is(t.kind)&&je.string(t.value)}R(t,"is"),e.is=t}(B||(B={})),e.C=$,(Re=$||(e.C=$={})).Text=1,Re.Method=2,Re.Function=3,Re.Constructor=4,Re.Field=5,Re.Variable=6,Re.Class=7,Re.Interface=8,Re.Module=9,Re.Property=10,Re.Unit=11,Re.Value=12,Re.Enum=13,Re.Keyword=14,Re.Snippet=15,Re.Color=16,Re.File=17,Re.Reference=18,Re.Folder=19,Re.EnumMember=20,Re.Constant=21,Re.Struct=22,Re.Event=23,Re.Operator=24,Re.TypeParameter=25,e.I=q,(Me=q||(e.I=q={})).PlainText=1,Me.Snippet=2,(H||(H={})).Deprecated=1,function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}function n(e){var t=e;return t&&je.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}R(t,"create"),e.create=t,R(n,"is"),e.is=n}(G||(G={})),(De=W||(W={})).asIs=1,De.adjustIndentation=2,function(e){function t(e){var t=e;return t&&(je.string(t.detail)||void 0===t.detail)&&(je.string(t.description)||void 0===t.description)}R(t,"is"),e.is=t}(z||(z={})),function(e){function t(e){return{label:e}}R(t,"create"),e.create=t}(K||(K={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}R(t,"create"),e.create=t}(Q||(Q={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){var t=e;return je.string(t)||je.objectLiteral(t)&&je.string(t.language)&&je.string(t.value)}R(t,"fromPlainText"),e.fromPlainText=t,R(n,"is"),e.is=n}(Y||(Y={})),function(e){function t(e){var t=e;return!!t&&je.objectLiteral(t)&&(B.is(t.contents)||Y.is(t.contents)||je.typedArray(t.contents,Y.is))&&(void 0===e.range||l.is(e.range))}R(t,"is"),e.is=t}(J||(J={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}R(t,"create"),e.create=t}(X||(X={})),function(e){function t(e,t){for(var n=[],r=2;r=0;a--){var s=r[a],l=e.offsetAt(s.range.start),u=e.offsetAt(s.range.end);if(!(u<=o))throw new Error("Overlapping edit");n=n.substring(0,l)+s.newText+n.substring(u,n.length),o=l}return n}function i(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);i(r,t),i(o,t);for(var a=0,s=0,l=0;a0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return s.create(0,e);for(;ne?r=i:n=i+1}var o=n-1;return s.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}function qe(e,t){return{style:t,match:t=>t.kind===e}}function He(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}(function(e){var t=Object.prototype.toString;function n(e){return void 0!==e}function r(e){return void 0===e}function i(e){return!0===e||!1===e}function o(e){return"[object String]"===t.call(e)}function a(e){return"[object Number]"===t.call(e)}function s(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r}function l(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647}function u(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647}function c(e){return"[object Function]"===t.call(e)}function d(e){return null!==e&&"object"==typeof e}function f(e,t){return Array.isArray(e)&&e.every(t)}R(n,"defined"),e.defined=n,R(r,"undefined$1"),e.undefined=r,R(i,"boolean"),e.boolean=i,R(o,"string"),e.string=o,R(a,"number"),e.number=a,R(s,"numberRange"),e.numberRange=s,R(l,"integer"),e.integer=l,R(u,"uinteger"),e.uinteger=u,R(c,"func"),e.func=c,R(d,"objectLiteral"),e.objectLiteral=d,R(f,"typedArray"),e.typedArray=f})(je||(je={})),R(Ue,"opt"),R(Be,"list"),R($e,"butNot"),R(qe,"t"),R(He,"p");const Ge=R(e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,"isIgnored");e.i=Ge;const We={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/};e.L=We;const ze={Document:[Be("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return t.Kind.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Ke("query"),Ue(Qe("def")),Ue("VariableDefinitions"),Be("Directive"),"SelectionSet"],Mutation:[Ke("mutation"),Ue(Qe("def")),Ue("VariableDefinitions"),Be("Directive"),"SelectionSet"],Subscription:[Ke("subscription"),Ue(Qe("def")),Ue("VariableDefinitions"),Be("Directive"),"SelectionSet"],VariableDefinitions:[He("("),Be("VariableDefinition"),He(")")],VariableDefinition:["Variable",He(":"),"Type",Ue("DefaultValue")],Variable:[He("$","variable"),Qe("variable")],DefaultValue:[He("="),"Value"],SelectionSet:[He("{"),Be("Selection"),He("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[Qe("property"),He(":"),Qe("qualifier"),Ue("Arguments"),Be("Directive"),Ue("SelectionSet")],Field:[Qe("property"),Ue("Arguments"),Be("Directive"),Ue("SelectionSet")],Arguments:[He("("),Be("Argument"),He(")")],Argument:[Qe("attribute"),He(":"),"Value"],FragmentSpread:[He("..."),Qe("def"),Be("Directive")],InlineFragment:[He("..."),Ue("TypeCondition"),Be("Directive"),"SelectionSet"],FragmentDefinition:[Ke("fragment"),Ue($e(Qe("def"),[Ke("on")])),"TypeCondition",Be("Directive"),"SelectionSet"],TypeCondition:[Ke("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[qe("Number","number")],StringValue:[{style:"string",match:e=>"String"===e.kind,update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[qe("Name","builtin")],NullValue:[qe("Name","keyword")],EnumValue:[Qe("string-2")],ListValue:[He("["),Be("Value"),He("]")],ObjectValue:[He("{"),Be("ObjectField"),He("}")],ObjectField:[Qe("attribute"),He(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[He("["),"Type",He("]"),Ue(He("!"))],NonNullType:["NamedType",Ue(He("!"))],NamedType:[Ye("atom")],Directive:[He("@","meta"),Qe("meta"),Ue("Arguments")],DirectiveDef:[Ke("directive"),He("@","meta"),Qe("meta"),Ue("ArgumentsDef"),Ke("on"),Be("DirectiveLocation",He("|"))],InterfaceDef:[Ke("interface"),Qe("atom"),Ue("Implements"),Be("Directive"),He("{"),Be("FieldDef"),He("}")],Implements:[Ke("implements"),Be("NamedType",He("&"))],DirectiveLocation:[Qe("string-2")],SchemaDef:[Ke("schema"),Be("Directive"),He("{"),Be("OperationTypeDef"),He("}")],OperationTypeDef:[Qe("keyword"),He(":"),Qe("atom")],ScalarDef:[Ke("scalar"),Qe("atom"),Be("Directive")],ObjectTypeDef:[Ke("type"),Qe("atom"),Ue("Implements"),Be("Directive"),He("{"),Be("FieldDef"),He("}")],FieldDef:[Qe("property"),Ue("ArgumentsDef"),He(":"),"Type",Be("Directive")],ArgumentsDef:[He("("),Be("InputValueDef"),He(")")],InputValueDef:[Qe("attribute"),He(":"),"Type",Ue("DefaultValue"),Be("Directive")],UnionDef:[Ke("union"),Qe("atom"),Be("Directive"),He("="),Be("UnionMember",He("|"))],UnionMember:["NamedType"],EnumDef:[Ke("enum"),Qe("atom"),Be("Directive"),He("{"),Be("EnumValueDef"),He("}")],EnumValueDef:[Qe("string-2"),Be("Directive")],InputDef:[Ke("input"),Qe("atom"),Be("Directive"),He("{"),Be("InputValueDef"),He("}")],ExtendDef:[Ke("extend"),"ObjectTypeDef"]};function Ke(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function Qe(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Ye(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){var n;(null===(n=e.prevState)||void 0===n?void 0:n.prevState)&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}function Je(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{eatWhitespace:e=>e.eatWhile(Ge),lexRules:We,parseRules:ze,editorConfig:{}};return{startState(){const n={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeperator:!1,prevState:null};return tt(e.parseRules,n,t.Kind.DOCUMENT),n},token:(t,n)=>Xe(t,n,e)}}function Xe(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:i,parseRules:o,eatWhitespace:a,editorConfig:s}=n;if(t.rule&&0===t.rule.length?nt(t):t.needsAdvance&&(t.needsAdvance=!1,rt(t,!0)),e.sol()){const n=(null==s?void 0:s.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(a(e))return"ws";const l=at(i,e);if(!l)return e.match(/\S+/)||e.match(/\s/),tt(et,t,"Invalid"),"invalidchar";if("Comment"===l.kind)return tt(et,t,"Comment"),"comment";const u=Ze({},t);if("Punctuation"===l.kind)if(/^[{([]/.test(l.value))void 0!==t.indentLevel&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(l.value)){const e=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&e.length>0&&e[e.length-1]n(e,"name",{value:t,configurable:!0});function i(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}r(i,"_mergeNamespaces");var o={exports:{}};e.a=o,function(e){var t,n,i=e.Pos;function o(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function a(e,t){for(var n=o(e),r=n,i=0;ic);d++){var f=e.getLine(u++);r=null==r?f:r+"\n"+f}o*=2,t.lastIndex=n.ch;var p=t.exec(r);if(p){var h=r.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:i(g,v),to:i(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function d(e,t,n){t=a(t,"g");for(var r=n.line,o=n.ch,s=e.firstLine();r>=s;r--,o=-1){var l=e.getLine(r),u=c(l,t,o<0?0:l.length-o);if(u)return{from:i(r,u.index),to:i(r,u.index+u[0].length),match:u}}}function f(e,t,n){if(!s(t))return d(e,t,n);t=a(t,"gm");for(var r,o=1,l=e.getLine(n.line).length-n.ch,u=n.line,f=e.firstLine();u>=f;){for(var p=0;p=f;p++){var h=e.getLine(u--);r=null==r?h:h+"\n"+r}o*=2;var m=c(r,t,l);if(m){var g=r.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=u+g.length,b=g[g.length-1].length;return{from:i(y,b),to:i(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function p(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function h(e,r,o,a){if(!r.length)return null;var s=a?t:n,l=s(r).split(/\r|\n\r?/);e:for(var u=o.line,c=o.ch,d=e.lastLine()+1-l.length;u<=d;u++,c=0){var f=e.getLine(u).slice(c),h=s(f);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=p(f,h,m,s)+c,{from:i(u,p(f,h,m,s)+c),to:i(u,p(f,h,m+l[0].length,s)+c)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v=d;u--,c=-1){var f=e.getLine(u);c>-1&&(f=f.slice(0,c));var h=s(f);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:i(u,p(f,h,m,s)),to:i(u,p(f,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=u-l.length+1;v(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var r=this.matches(t,n);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var o=i(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new g(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new g(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(t.a.exports);var a=i({__proto__:null,default:o.exports},[o.exports]);e.s=a})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.d=e.a=void 0;var n=Object.defineProperty,r=(e,t)=>n(e,"name",{value:t,configurable:!0});function i(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}r(i,"_mergeNamespaces");var o={exports:{}};e.a=o,function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}r(t,"dialogDiv"),r(n,"closeNotification"),e.defineExtension("openDialog",(function(i,o,a){a||(a={}),n(this,null);var s=t(this,i,a.bottom),l=!1,u=this;function c(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),u.focus(),a.onClose&&a.onClose(s)}}r(c,"close");var d,f=s.getElementsByTagName("input")[0];return f?(f.focus(),a.value&&(f.value=a.value,!1!==a.selectValueOnOpen&&f.select()),a.onInput&&e.on(f,"input",(function(e){a.onInput(e,f.value,c)})),a.onKeyUp&&e.on(f,"keyup",(function(e){a.onKeyUp(e,f.value,c)})),e.on(f,"keydown",(function(t){a&&a.onKeyDown&&a.onKeyDown(t,f.value,c)||((27==t.keyCode||!1!==a.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),c()),13==t.keyCode&&o(f.value,t))})),!1!==a.closeOnBlur&&e.on(s,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(d=s.getElementsByTagName("button")[0])&&(e.on(d,"click",(function(){c(),u.focus()})),!1!==a.closeOnBlur&&e.on(d,"blur",c),d.focus()),c})),e.defineExtension("openConfirm",(function(i,o,a){n(this,null);var s=t(this,i,a&&a.bottom),l=s.getElementsByTagName("button"),u=!1,c=this,d=1;function f(){u||(u=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),c.focus())}r(f,"close"),l[0].focus();for(var p=0;pt(e,"name",{value:n,configurable:!0});function r(e){return i(e,[])}function i(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return o(e,t);default:return String(e)}}function o(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(a(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:i(t,n)}else if(Array.isArray(e))return l(e,n);return s(e,n)}function a(e){return"function"==typeof e.toJSON}function s(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+u(e)+"]":"{ "+n.map(e=>{let[n,r]=e;return n+": "+i(r,t)}).join(", ")+" }"}function l(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,o=[];for(let r=0;r