@graphql-yoga/graphiql
Version:
This the GraphiQL used by GraphQL Yoga. This package is currently not published to npm and only contains the React component `GraphQLYoga`.
503 lines • 1.36 MB
JavaScript
(function(Fd,Yh){typeof exports=="object"&&typeof module<"u"?Yh(exports):typeof define=="function"&&define.amd?define(["exports"],Yh):(Fd=typeof globalThis<"u"?globalThis:Fd||self,Yh(Fd.YogaGraphiQL={}))})(this,function(Fd){"use strict";function Yh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Z_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Du(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function J_(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var eE={exports:{}},Wh={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var eN;function tV(){if(eN)return Wh;eN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return Wh.Fragment=t,Wh.jsx=n,Wh.jsxs=n,Wh}var tN;function nV(){return tN||(tN=1,eE.exports=tV()),eE.exports}var Y=nV(),tE={exports:{}},Kt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var nN;function rV(){if(nN)return Kt;nN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.iterator;function E(Z){return Z===null||typeof Z!="object"?null:(Z=b&&Z[b]||Z["@@iterator"],typeof Z=="function"?Z:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function k(Z,ge,ae){this.props=Z,this.context=ge,this.refs=w,this.updater=ae||y}k.prototype.isReactComponent={},k.prototype.setState=function(Z,ge){if(typeof Z!="object"&&typeof Z!="function"&&Z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Z,ge,"setState")},k.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};function N(){}N.prototype=k.prototype;function D(Z,ge,ae){this.props=Z,this.context=ge,this.refs=w,this.updater=ae||y}var A=D.prototype=new N;A.constructor=D,x(A,k.prototype),A.isPureReactComponent=!0;var C=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},j=Object.prototype.hasOwnProperty;function P(Z,ge,ae,pe,ce,he){return ae=he.ref,{$$typeof:e,type:Z,key:ge,ref:ae!==void 0?ae:null,props:he}}function F(Z,ge){return P(Z.type,ge,void 0,void 0,void 0,Z.props)}function V(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===e}function $(Z){var ge={"=":"=0",":":"=2"};return"$"+Z.replace(/[=:]/g,function(ae){return ge[ae]})}var X=/\/+/g;function J(Z,ge){return typeof Z=="object"&&Z!==null&&Z.key!=null?$(""+Z.key):ge.toString(36)}function ee(){}function Q(Z){switch(Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason;default:switch(typeof Z.status=="string"?Z.then(ee,ee):(Z.status="pending",Z.then(function(ge){Z.status==="pending"&&(Z.status="fulfilled",Z.value=ge)},function(ge){Z.status==="pending"&&(Z.status="rejected",Z.reason=ge)})),Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason}}throw Z}function B(Z,ge,ae,pe,ce){var he=typeof Z;(he==="undefined"||he==="boolean")&&(Z=null);var Se=!1;if(Z===null)Se=!0;else switch(he){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(Z.$$typeof){case e:case t:Se=!0;break;case m:return Se=Z._init,B(Se(Z._payload),ge,ae,pe,ce)}}if(Se)return ce=ce(Z),Se=pe===""?"."+J(Z,0):pe,C(ce)?(ae="",Se!=null&&(ae=Se.replace(X,"$&/")+"/"),B(ce,ge,ae,"",function(Ze){return Ze})):ce!=null&&(V(ce)&&(ce=F(ce,ae+(ce.key==null||Z&&Z.key===ce.key?"":(""+ce.key).replace(X,"$&/")+"/")+Se)),ge.push(ce)),1;Se=0;var Ie=pe===""?".":pe+":";if(C(Z))for(var Ge=0;Ge<Z.length;Ge++)pe=Z[Ge],he=Ie+J(pe,Ge),Se+=B(pe,ge,ae,he,ce);else if(Ge=E(Z),typeof Ge=="function")for(Z=Ge.call(Z),Ge=0;!(pe=Z.next()).done;)pe=pe.value,he=Ie+J(pe,Ge++),Se+=B(pe,ge,ae,he,ce);else if(he==="object"){if(typeof Z.then=="function")return B(Q(Z),ge,ae,pe,ce);throw ge=String(Z),Error("Objects are not valid as a React child (found: "+(ge==="[object Object]"?"object with keys {"+Object.keys(Z).join(", ")+"}":ge)+"). If you meant to render a collection of children, use an array instead.")}return Se}function ne(Z,ge,ae){if(Z==null)return Z;var pe=[],ce=0;return B(Z,pe,"","",function(he){return ge.call(ae,he,ce++)}),pe}function re(Z){if(Z._status===-1){var ge=Z._result;ge=ge(),ge.then(function(ae){(Z._status===0||Z._status===-1)&&(Z._status=1,Z._result=ae)},function(ae){(Z._status===0||Z._status===-1)&&(Z._status=2,Z._result=ae)}),Z._status===-1&&(Z._status=0,Z._result=ge)}if(Z._status===1)return Z._result.default;throw Z._result}var se=typeof reportError=="function"?reportError:function(Z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ge=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z=="object"&&Z!==null&&typeof Z.message=="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(ge))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Z);return}console.error(Z)};function fe(){}return Kt.Children={map:ne,forEach:function(Z,ge,ae){ne(Z,function(){ge.apply(this,arguments)},ae)},count:function(Z){var ge=0;return ne(Z,function(){ge++}),ge},toArray:function(Z){return ne(Z,function(ge){return ge})||[]},only:function(Z){if(!V(Z))throw Error("React.Children.only expected to receive a single React element child.");return Z}},Kt.Component=k,Kt.Fragment=n,Kt.Profiler=i,Kt.PureComponent=D,Kt.StrictMode=r,Kt.Suspense=p,Kt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Kt.__COMPILER_RUNTIME={__proto__:null,c:function(Z){return M.H.useMemoCache(Z)}},Kt.cache=function(Z){return function(){return Z.apply(null,arguments)}},Kt.cloneElement=function(Z,ge,ae){if(Z==null)throw Error("The argument must be a React element, but you passed "+Z+".");var pe=x({},Z.props),ce=Z.key,he=void 0;if(ge!=null)for(Se in ge.ref!==void 0&&(he=void 0),ge.key!==void 0&&(ce=""+ge.key),ge)!j.call(ge,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&ge.ref===void 0||(pe[Se]=ge[Se]);var Se=arguments.length-2;if(Se===1)pe.children=ae;else if(1<Se){for(var Ie=Array(Se),Ge=0;Ge<Se;Ge++)Ie[Ge]=arguments[Ge+2];pe.children=Ie}return P(Z.type,ce,void 0,void 0,he,pe)},Kt.createContext=function(Z){return Z={$$typeof:l,_currentValue:Z,_currentValue2:Z,_threadCount:0,Provider:null,Consumer:null},Z.Provider=Z,Z.Consumer={$$typeof:o,_context:Z},Z},Kt.createElement=function(Z,ge,ae){var pe,ce={},he=null;if(ge!=null)for(pe in ge.key!==void 0&&(he=""+ge.key),ge)j.call(ge,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ce[pe]=ge[pe]);var Se=arguments.length-2;if(Se===1)ce.children=ae;else if(1<Se){for(var Ie=Array(Se),Ge=0;Ge<Se;Ge++)Ie[Ge]=arguments[Ge+2];ce.children=Ie}if(Z&&Z.defaultProps)for(pe in Se=Z.defaultProps,Se)ce[pe]===void 0&&(ce[pe]=Se[pe]);return P(Z,he,void 0,void 0,null,ce)},Kt.createRef=function(){return{current:null}},Kt.forwardRef=function(Z){return{$$typeof:c,render:Z}},Kt.isValidElement=V,Kt.lazy=function(Z){return{$$typeof:m,_payload:{_status:-1,_result:Z},_init:re}},Kt.memo=function(Z,ge){return{$$typeof:d,type:Z,compare:ge===void 0?null:ge}},Kt.startTransition=function(Z){var ge=M.T,ae={};M.T=ae;try{var pe=Z(),ce=M.S;ce!==null&&ce(ae,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(fe,se)}catch(he){se(he)}finally{M.T=ge}},Kt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Kt.use=function(Z){return M.H.use(Z)},Kt.useActionState=function(Z,ge,ae){return M.H.useActionState(Z,ge,ae)},Kt.useCallback=function(Z,ge){return M.H.useCallback(Z,ge)},Kt.useContext=function(Z){return M.H.useContext(Z)},Kt.useDebugValue=function(){},Kt.useDeferredValue=function(Z,ge){return M.H.useDeferredValue(Z,ge)},Kt.useEffect=function(Z,ge,ae){var pe=M.H;if(typeof ae=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return pe.useEffect(Z,ge)},Kt.useId=function(){return M.H.useId()},Kt.useImperativeHandle=function(Z,ge,ae){return M.H.useImperativeHandle(Z,ge,ae)},Kt.useInsertionEffect=function(Z,ge){return M.H.useInsertionEffect(Z,ge)},Kt.useLayoutEffect=function(Z,ge){return M.H.useLayoutEffect(Z,ge)},Kt.useMemo=function(Z,ge){return M.H.useMemo(Z,ge)},Kt.useOptimistic=function(Z,ge){return M.H.useOptimistic(Z,ge)},Kt.useReducer=function(Z,ge,ae){return M.H.useReducer(Z,ge,ae)},Kt.useRef=function(Z){return M.H.useRef(Z)},Kt.useState=function(Z){return M.H.useState(Z)},Kt.useSyncExternalStore=function(Z,ge,ae){return M.H.useSyncExternalStore(Z,ge,ae)},Kt.useTransition=function(){return M.H.useTransition()},Kt.version="19.1.0",Kt}var rN;function Wv(){return rN||(rN=1,tE.exports=rV()),tE.exports}var L=Wv();const Ae=Du(L),Qv=Yh({__proto__:null,default:Ae},[L]);var nE={exports:{}},Qh={},rE={exports:{}},iE={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var iN;function iV(){return iN||(iN=1,function(e){function t(ne,re){var se=ne.length;ne.push(re);e:for(;0<se;){var fe=se-1>>>1,Z=ne[fe];if(0<i(Z,re))ne[fe]=re,ne[se]=Z,se=fe;else break e}}function n(ne){return ne.length===0?null:ne[0]}function r(ne){if(ne.length===0)return null;var re=ne[0],se=ne.pop();if(se!==re){ne[0]=se;e:for(var fe=0,Z=ne.length,ge=Z>>>1;fe<ge;){var ae=2*(fe+1)-1,pe=ne[ae],ce=ae+1,he=ne[ce];if(0>i(pe,se))ce<Z&&0>i(he,pe)?(ne[fe]=he,ne[ce]=se,fe=ce):(ne[fe]=pe,ne[ae]=se,fe=ae);else if(ce<Z&&0>i(he,se))ne[fe]=he,ne[ce]=se,fe=ce;else break e}}return re}function i(ne,re){var se=ne.sortIndex-re.sortIndex;return se!==0?se:ne.id-re.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var p=[],d=[],m=1,b=null,E=3,y=!1,x=!1,w=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function C(ne){for(var re=n(d);re!==null;){if(re.callback===null)r(d);else if(re.startTime<=ne)r(d),re.sortIndex=re.expirationTime,t(p,re);else break;re=n(d)}}function M(ne){if(w=!1,C(ne),!x)if(n(p)!==null)x=!0,j||(j=!0,J());else{var re=n(d);re!==null&&B(M,re.startTime-ne)}}var j=!1,P=-1,F=5,V=-1;function $(){return k?!0:!(e.unstable_now()-V<F)}function X(){if(k=!1,j){var ne=e.unstable_now();V=ne;var re=!0;try{e:{x=!1,w&&(w=!1,D(P),P=-1),y=!0;var se=E;try{t:{for(C(ne),b=n(p);b!==null&&!(b.expirationTime>ne&&$());){var fe=b.callback;if(typeof fe=="function"){b.callback=null,E=b.priorityLevel;var Z=fe(b.expirationTime<=ne);if(ne=e.unstable_now(),typeof Z=="function"){b.callback=Z,C(ne),re=!0;break t}b===n(p)&&r(p),C(ne)}else r(p);b=n(p)}if(b!==null)re=!0;else{var ge=n(d);ge!==null&&B(M,ge.startTime-ne),re=!1}}break e}finally{b=null,E=se,y=!1}re=void 0}}finally{re?J():j=!1}}}var J;if(typeof A=="function")J=function(){A(X)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,Q=ee.port2;ee.port1.onmessage=X,J=function(){Q.postMessage(null)}}else J=function(){N(X,0)};function B(ne,re){P=N(function(){ne(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ne){ne.callback=null},e.unstable_forceFrameRate=function(ne){0>ne||125<ne?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<ne?Math.floor(1e3/ne):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_next=function(ne){switch(E){case 1:case 2:case 3:var re=3;break;default:re=E}var se=E;E=re;try{return ne()}finally{E=se}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(ne,re){switch(ne){case 1:case 2:case 3:case 4:case 5:break;default:ne=3}var se=E;E=ne;try{return re()}finally{E=se}},e.unstable_scheduleCallback=function(ne,re,se){var fe=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?fe+se:fe):se=fe,ne){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=se+Z,ne={id:m++,callback:re,priorityLevel:ne,startTime:se,expirationTime:Z,sortIndex:-1},se>fe?(ne.sortIndex=se,t(d,ne),n(p)===null&&ne===n(d)&&(w?(D(P),P=-1):w=!0,B(M,se-fe))):(ne.sortIndex=Z,t(p,ne),x||y||(x=!0,j||(j=!0,J()))),ne},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(ne){var re=E;return function(){var se=E;E=re;try{return ne.apply(this,arguments)}finally{E=se}}}}(iE)),iE}var oN;function oV(){return oN||(oN=1,rE.exports=iV()),rE.exports}var oE={exports:{}},zi={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var aN;function aV(){if(aN)return zi;aN=1;var e=Wv();function t(p){var d="https://react.dev/errors/"+p;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+p+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(p,d,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:b==null?null:""+b,children:p,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(p,d){if(p==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return zi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,zi.createPortal=function(p,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(p,d,null,m)},zi.flushSync=function(p){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,p)return p()}finally{l.T=d,r.p=m,r.d.f()}},zi.preconnect=function(p,d){typeof p=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(p,d))},zi.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},zi.preinit=function(p,d){if(typeof p=="string"&&d&&typeof d.as=="string"){var m=d.as,b=c(m,d.crossOrigin),E=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(p,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:y}):m==="script"&&r.d.X(p,{crossOrigin:b,integrity:E,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},zi.preinitModule=function(p,d){if(typeof p=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);r.d.M(p,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(p)},zi.preload=function(p,d){if(typeof p=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,b=c(m,d.crossOrigin);r.d.L(p,m,{crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},zi.preloadModule=function(p,d){if(typeof p=="string")if(d){var m=c(d.as,d.crossOrigin);r.d.m(p,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(p)},zi.requestFormReset=function(p){r.d.r(p)},zi.unstable_batchedUpdates=function(p,d){return p(d)},zi.useFormState=function(p,d,m){return l.H.useFormState(p,d,m)},zi.useFormStatus=function(){return l.H.useHostTransitionStatus()},zi.version="19.1.0",zi}var sN;function lN(){if(sN)return oE.exports;sN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oE.exports=aV(),oE.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var uN;function sV(){if(uN)return Qh;uN=1;var e=oV(),t=Wv(),n=lN();function r(a){var u="https://react.dev/errors/"+a;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var u=a,h=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,(u.flags&4098)!==0&&(h=u.return),a=u.return;while(a)}return u.tag===3?h:null}function l(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function c(a){if(o(a)!==a)throw Error(r(188))}function p(a){var u=a.alternate;if(!u){if(u=o(a),u===null)throw Error(r(188));return u!==a?null:a}for(var h=a,S=u;;){var _=h.return;if(_===null)break;var R=_.alternate;if(R===null){if(S=_.return,S!==null){h=S;continue}break}if(_.child===R.child){for(R=_.child;R;){if(R===h)return c(_),a;if(R===S)return c(_),u;R=R.sibling}throw Error(r(188))}if(h.return!==S.return)h=_,S=R;else{for(var G=!1,te=_.child;te;){if(te===h){G=!0,h=_,S=R;break}if(te===S){G=!0,S=_,h=R;break}te=te.sibling}if(!G){for(te=R.child;te;){if(te===h){G=!0,h=R,S=_;break}if(te===S){G=!0,S=R,h=_;break}te=te.sibling}if(!G)throw Error(r(189))}}if(h.alternate!==S)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?a:u}function d(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a;for(a=a.child;a!==null;){if(u=d(a),u!==null)return u;a=a.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),D=Symbol.for("react.consumer"),A=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var ee=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ee?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case x:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case j:return"SuspenseList";case V:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case y:return"Portal";case A:return(a.displayName||"Context")+".Provider";case D:return(a._context.displayName||"Context")+".Consumer";case C:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case P:return u=a.displayName||null,u!==null?u:Q(a.type)||"Memo";case F:u=a._payload,a=a._init;try{return Q(a(u))}catch{}}return null}var B=Array.isArray,ne=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},fe=[],Z=-1;function ge(a){return{current:a}}function ae(a){0>Z||(a.current=fe[Z],fe[Z]=null,Z--)}function pe(a,u){Z++,fe[Z]=a.current,a.current=u}var ce=ge(null),he=ge(null),Se=ge(null),Ie=ge(null);function Ge(a,u){switch(pe(Se,u),pe(he,a),pe(ce,null),u.nodeType){case 9:case 11:a=(a=u.documentElement)&&(a=a.namespaceURI)?Oj(a):0;break;default:if(a=u.tagName,u=u.namespaceURI)u=Oj(u),a=Dj(u,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}ae(ce),pe(ce,a)}function Ze(){ae(ce),ae(he),ae(Se)}function It(a){a.memoizedState!==null&&pe(Ie,a);var u=ce.current,h=Dj(u,a.type);u!==h&&(pe(he,a),pe(ce,h))}function vt(a){he.current===a&&(ae(ce),ae(he)),Ie.current===a&&(ae(Ie),$v._currentValue=se)}var at=Object.prototype.hasOwnProperty,Oe=e.unstable_scheduleCallback,be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,Ee=e.unstable_requestPaint,oe=e.unstable_now,je=e.unstable_getCurrentPriorityLevel,et=e.unstable_ImmediatePriority,ct=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,xe=e.unstable_LowPriority,$e=e.unstable_IdlePriority,nt=e.log,ht=e.unstable_setDisableYieldValue,Ot=null,jt=null;function dt(a){if(typeof nt=="function"&&ht(a),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(Ot,a)}catch{}}var Et=Math.clz32?Math.clz32:Vt,pt=Math.log,Wt=Math.LN2;function Vt(a){return a>>>=0,a===0?32:31-(pt(a)/Wt|0)|0}var Jt=256,ot=4194304;function qn(a){var u=a&42;if(u!==0)return u;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function vn(a,u,h){var S=a.pendingLanes;if(S===0)return 0;var _=0,R=a.suspendedLanes,G=a.pingedLanes;a=a.warmLanes;var te=S&134217727;return te!==0?(S=te&~R,S!==0?_=qn(S):(G&=te,G!==0?_=qn(G):h||(h=te&~a,h!==0&&(_=qn(h))))):(te=S&~R,te!==0?_=qn(te):G!==0?_=qn(G):h||(h=S&~a,h!==0&&(_=qn(h)))),_===0?0:u!==0&&u!==_&&(u&R)===0&&(R=_&-_,h=u&-u,R>=h||R===32&&(h&4194048)!==0)?u:_}function mt(a,u){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&u)===0}function yn(a,u){switch(a){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function di(){var a=Jt;return Jt<<=1,(Jt&4194048)===0&&(Jt=256),a}function on(){var a=ot;return ot<<=1,(ot&62914560)===0&&(ot=4194304),a}function Mr(a){for(var u=[],h=0;31>h;h++)u.push(a);return u}function An(a,u){a.pendingLanes|=u,u!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Xi(a,u,h,S,_,R){var G=a.pendingLanes;a.pendingLanes=h,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=h,a.entangledLanes&=h,a.errorRecoveryDisabledLanes&=h,a.shellSuspendCounter=0;var te=a.entanglements,de=a.expirationTimes,_e=a.hiddenUpdates;for(h=G&~h;0<h;){var qe=31-Et(h),He=1<<qe;te[qe]=0,de[qe]=-1;var De=_e[qe];if(De!==null)for(_e[qe]=null,qe=0;qe<De.length;qe++){var Re=De[qe];Re!==null&&(Re.lane&=-536870913)}h&=~He}S!==0&&wt(a,S,0),R!==0&&_===0&&a.tag!==0&&(a.suspendedLanes|=R&~(G&~u))}function wt(a,u,h){a.pendingLanes|=u,a.suspendedLanes&=~u;var S=31-Et(u);a.entangledLanes|=u,a.entanglements[S]=a.entanglements[S]|1073741824|h&4194090}function Bt(a,u){var h=a.entangledLanes|=u;for(a=a.entanglements;h;){var S=31-Et(h),_=1<<S;_&u|a[S]&u&&(a[S]|=u),h&=~_}}function un(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function kn(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function tr(){var a=re.p;return a!==0?a:(a=window.event,a===void 0?32:Qj(a.type))}function Ft(a,u){var h=re.p;try{return re.p=a,u()}finally{re.p=h}}var cn=Math.random().toString(36).slice(2),Gt="__reactFiber$"+cn,bn="__reactProps$"+cn,Ii="__reactContainer$"+cn,Ko="__reactEvents$"+cn,Xo="__reactListeners$"+cn,Ao="__reactHandles$"+cn,Er="__reactResources$"+cn,Bn="__reactMarker$"+cn;function Lr(a){delete a[Gt],delete a[bn],delete a[Ko],delete a[Xo],delete a[Ao]}function Fi(a){var u=a[Gt];if(u)return u;for(var h=a.parentNode;h;){if(u=h[Ii]||h[Gt]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(a=Lj(a);a!==null;){if(h=a[Gt])return h;a=Lj(a)}return u}a=h,h=a.parentNode}return null}function $r(a){if(a=a[Gt]||a[Ii]){var u=a.tag;if(u===5||u===6||u===13||u===26||u===27||u===3)return a}return null}function Oo(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a.stateNode;throw Error(r(33))}function po(a){var u=a[Er];return u||(u=a[Er]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Rn(a){a[Bn]=!0}var Zi=new Set,Pi={};function ho(a,u){Do(a,u),Do(a+"Capture",u)}function Do(a,u){for(Pi[a]=u,a=0;a<u.length;a++)Zi.add(u[a])}var nr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ft={},mo={};function Yl(a){return at.call(mo,a)?!0:at.call(ft,a)?!1:nr.test(a)?mo[a]=!0:(ft[a]=!0,!1)}function zr(a,u,h){if(Yl(u))if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":a.removeAttribute(u);return;case"boolean":var S=u.toLowerCase().slice(0,5);if(S!=="data-"&&S!=="aria-"){a.removeAttribute(u);return}}a.setAttribute(u,""+h)}}function an(a,u,h){if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttribute(u,""+h)}}function Ir(a,u,h,S){if(S===null)a.removeAttribute(h);else{switch(typeof S){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(h);return}a.setAttributeNS(u,h,""+S)}}var Zo,Js;function ze(a){if(Zo===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Zo=u&&u[1]||"",Js=-1<h.stack.indexOf(`
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Zo+a+Js}var W=!1;function ue(a,u){if(!a||W)return"";W=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(u){var He=function(){throw Error()};if(Object.defineProperty(He.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(He,[])}catch(Re){var De=Re}Reflect.construct(a,[],He)}else{try{He.call()}catch(Re){De=Re}a.call(He.prototype)}}else{try{throw Error()}catch(Re){De=Re}(He=a())&&typeof He.catch=="function"&&He.catch(function(){})}}catch(Re){if(Re&&De&&typeof Re.stack=="string")return[Re.stack,De.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=S.DetermineComponentFrameRoot(),G=R[0],te=R[1];if(G&&te){var de=G.split(`
`),_e=te.split(`
`);for(_=S=0;S<de.length&&!de[S].includes("DetermineComponentFrameRoot");)S++;for(;_<_e.length&&!_e[_].includes("DetermineComponentFrameRoot");)_++;if(S===de.length||_===_e.length)for(S=de.length-1,_=_e.length-1;1<=S&&0<=_&&de[S]!==_e[_];)_--;for(;1<=S&&0<=_;S--,_--)if(de[S]!==_e[_]){if(S!==1||_!==1)do if(S--,_--,0>_||de[S]!==_e[_]){var qe=`
`+de[S].replace(" at new "," at ");return a.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",a.displayName)),qe}while(1<=S&&0<=_);break}}}finally{W=!1,Error.prepareStackTrace=h}return(h=a?a.displayName||a.name:"")?ze(h):""}function Fe(a){switch(a.tag){case 26:case 27:case 5:return ze(a.type);case 16:return ze("Lazy");case 13:return ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return ue(a.type,!1);case 11:return ue(a.type.render,!1);case 1:return ue(a.type,!0);case 31:return ze("Activity");default:return""}}function We(a){try{var u="";do u+=Fe(a),a=a.return;while(a);return u}catch(h){return`
Error generating stack: `+h.message+`
`+h.stack}}function St(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function en(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function st(a){var u=en(a)?"checked":"value",h=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),S=""+a[u];if(!a.hasOwnProperty(u)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var _=h.get,R=h.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return _.call(this)},set:function(G){S=""+G,R.call(this,G)}}),Object.defineProperty(a,u,{enumerable:h.enumerable}),{getValue:function(){return S},setValue:function(G){S=""+G},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function _r(a){a._valueTracker||(a._valueTracker=st(a))}function ji(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var h=u.getValue(),S="";return a&&(S=en(a)?a.checked?"true":"false":a.value),a=S,a!==h?(u.setValue(a),!0):!1}function vs(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var Aa=/[\n"\\]/g;function Ji(a){return a.replace(Aa,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Jf(a,u,h,S,_,R,G,te){a.name="",G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?a.type=G:a.removeAttribute("type"),u!=null?G==="number"?(u===0&&a.value===""||a.value!=u)&&(a.value=""+St(u)):a.value!==""+St(u)&&(a.value=""+St(u)):G!=="submit"&&G!=="reset"||a.removeAttribute("value"),u!=null?lc(a,G,St(u)):h!=null?lc(a,G,St(h)):S!=null&&a.removeAttribute("value"),_==null&&R!=null&&(a.defaultChecked=!!R),_!=null&&(a.checked=_&&typeof _!="function"&&typeof _!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?a.name=""+St(te):a.removeAttribute("name")}function Wl(a,u,h,S,_,R,G,te){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(a.type=R),u!=null||h!=null){if(!(R!=="submit"&&R!=="reset"||u!=null))return;h=h!=null?""+St(h):"",u=u!=null?""+St(u):h,te||u===a.value||(a.value=u),a.defaultValue=u}S=S??_,S=typeof S!="function"&&typeof S!="symbol"&&!!S,a.checked=te?a.checked:!!S,a.defaultChecked=!!S,G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"&&(a.name=G)}function lc(a,u,h){u==="number"&&vs(a.ownerDocument)===a||a.defaultValue===""+h||(a.defaultValue=""+h)}function el(a,u,h,S){if(a=a.options,u){u={};for(var _=0;_<h.length;_++)u["$"+h[_]]=!0;for(h=0;h<a.length;h++)_=u.hasOwnProperty("$"+a[h].value),a[h].selected!==_&&(a[h].selected=_),_&&S&&(a[h].defaultSelected=!0)}else{for(h=""+St(h),u=null,_=0;_<a.length;_++){if(a[_].value===h){a[_].selected=!0,S&&(a[_].defaultSelected=!0);return}u!==null||a[_].disabled||(u=a[_])}u!==null&&(u.selected=!0)}}function ed(a,u,h){if(u!=null&&(u=""+St(u),u!==a.value&&(a.value=u),h==null)){a.defaultValue!==u&&(a.defaultValue=u);return}a.defaultValue=h!=null?""+St(h):""}function Ag(a,u,h,S){if(u==null){if(S!=null){if(h!=null)throw Error(r(92));if(B(S)){if(1<S.length)throw Error(r(93));S=S[0]}h=S}h==null&&(h=""),u=h}h=St(u),a.defaultValue=h,S=a.textContent,S===h&&S!==""&&S!==null&&(a.value=S)}function tl(a,u){if(u){var h=a.firstChild;if(h&&h===a.lastChild&&h.nodeType===3){h.nodeValue=u;return}}a.textContent=u}var Og=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Mp(a,u,h){var S=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?S?a.setProperty(u,""):u==="float"?a.cssFloat="":a[u]="":S?a.setProperty(u,h):typeof h!="number"||h===0||Og.has(u)?u==="float"?a.cssFloat=h:a[u]=(""+h).trim():a[u]=h+"px"}function Dg(a,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(a=a.style,h!=null){for(var S in h)!h.hasOwnProperty(S)||u!=null&&u.hasOwnProperty(S)||(S.indexOf("--")===0?a.setProperty(S,""):S==="float"?a.cssFloat="":a[S]="");for(var _ in u)S=u[_],u.hasOwnProperty(_)&&h[_]!==S&&Mp(a,_,S)}else for(var R in u)u.hasOwnProperty(R)&&Mp(a,R,u[R])}function Lp(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var f1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ys=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function td(a){return ys.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}var Ip=null;function Ql(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Jo=null,Kl=null;function kg(a){var u=$r(a);if(u&&(a=u.stateNode)){var h=a[bn]||null;e:switch(a=u.stateNode,u.type){case"input":if(Jf(a,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=a;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Ji(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var S=h[u];if(S!==a&&S.form===a.form){var _=S[bn]||null;if(!_)throw Error(r(90));Jf(S,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(u=0;u<h.length;u++)S=h[u],S.form===a.form&&ji(S)}break e;case"textarea":ed(a,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&el(a,!!h.multiple,u,!1)}}}var Fp=!1;function Rg(a,u,h){if(Fp)return a(u,h);Fp=!0;try{var S=a(u);return S}finally{if(Fp=!1,(Jo!==null||Kl!==null)&&(M1(),Jo&&(u=Jo,a=Kl,Kl=Jo=null,kg(u),a)))for(u=0;u<a.length;u++)kg(a[u])}}function nl(a,u){var h=a.stateNode;if(h===null)return null;var S=h[bn]||null;if(S===null)return null;h=S[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(a=a.type,S=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!S;break e;default:a=!1}if(a)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pp=!1;if(ea)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Pp=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Pp=!1}var Oa=null,Zl=null,rl=null;function nd(){if(rl)return rl;var a,u=Zl,h=u.length,S,_="value"in Oa?Oa.value:Oa.textContent,R=_.length;for(a=0;a<h&&u[a]===_[a];a++);var G=h-a;for(S=1;S<=G&&u[h-S]===_[R-S];S++);return rl=_.slice(a,1<S?1-S:void 0)}function uc(a){var u=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function cc(){return!0}function fc(){return!1}function Vi(a){function u(h,S,_,R,G){this._reactName=h,this._targetInst=_,this.type=S,this.nativeEvent=R,this.target=G,this.currentTarget=null;for(var te in a)a.hasOwnProperty(te)&&(h=a[te],this[te]=h?h(R):R[te]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?cc:fc,this.isPropagationStopped=fc,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=cc)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=cc)},persist:function(){},isPersistent:cc}),u}var bs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ui=Vi(bs),dc=m({},bs,{view:0,detail:0}),d1=Vi(dc),pc,rd,go,Jl=m({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Up,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==go&&(go&&a.type==="mousemove"?(pc=a.screenX-go.screenX,rd=a.screenY-go.screenY):rd=pc=0,go=a),pc)},movementY:function(a){return"movementY"in a?a.movementY:rd}}),ta=Vi(Jl),id=m({},Jl,{dataTransfer:0}),jp=Vi(id),hc=m({},dc,{relatedTarget:0}),Vp=Vi(hc),p1=m({},bs,{animationName:0,elapsedTime:0,pseudoElement:0}),f_=Vi(p1),d_=m({},bs,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Mg=Vi(d_),Lg=m({},bs,{data:0}),Ig=Vi(Lg),h1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},g1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fg(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=g1[a])?!!u[a]:!1}function Up(){return Fg}var Pg=m({},dc,{key:function(a){if(a.key){var u=h1[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=uc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?m1[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Up,charCode:function(a){return a.type==="keypress"?uc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?uc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),od=Vi(Pg),mc=m({},Jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jg=Vi(mc),v1=m({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Up}),y1=Vi(v1),ad=m({},bs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fr=Vi(ad),b1=m({},Jl,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Vg=Vi(b1),gc=m({},bs,{newState:0,oldState:0}),E1=Vi(gc),Ug=[9,13,27,32],qp=ea&&"CompositionEvent"in window,il=null;ea&&"documentMode"in document&&(il=document.documentMode);var qg=ea&&"TextEvent"in window&&!il,Bg=ea&&(!qp||il&&8<il&&11>=il),$g=" ",Bp=!1;function $p(a,u){switch(a){case"keyup":return Ug.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zg(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var na=!1;function Da(a,u){switch(a){case"compositionend":return zg(u);case"keypress":return u.which!==32?null:(Bp=!0,$g);case"textInput":return a=u.data,a===$g&&Bp?null:a;default:return null}}function sd(a,u){if(na)return a==="compositionend"||!qp&&$p(a,u)?(a=nd(),rl=Zl=Oa=null,na=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Bg&&u.locale!=="ko"?null:u.data;default:return null}}var zp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hp(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!zp[a.type]:u==="textarea"}function ko(a,u,h,S){Jo?Kl?Kl.push(S):Kl=[S]:Jo=S,u=V1(u,"onChange"),0<u.length&&(h=new Ui("onChange","change",null,h,S),a.push({event:h,listeners:u}))}var Ro=null,ol=null;function S1(a){wj(a,0)}function vc(a){var u=Oo(a);if(ji(u))return a}function Hg(a,u){if(a==="change")return u}var Gp=!1;if(ea){var yc;if(ea){var Es="oninput"in document;if(!Es){var Mo=document.createElement("div");Mo.setAttribute("oninput","return;"),Es=typeof Mo.oninput=="function"}yc=Es}else yc=!1;Gp=yc&&(!document.documentMode||9<document.documentMode)}function Gg(){Ro&&(Ro.detachEvent("onpropertychange",Yp),ol=Ro=null)}function Yp(a){if(a.propertyName==="value"&&vc(ol)){var u=[];ko(u,ol,a,Ql(a)),Rg(S1,u)}}function T1(a,u,h){a==="focusin"?(Gg(),Ro=u,ol=h,Ro.attachEvent("onpropertychange",Yp)):a==="focusout"&&Gg()}function x1(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return vc(ol)}function w1(a,u){if(a==="click")return vc(u)}function Yg(a,u){if(a==="input"||a==="change")return vc(u)}function Wg(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var Xr=typeof Object.is=="function"?Object.is:Wg;function eu(a,u){if(Xr(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var h=Object.keys(a),S=Object.keys(u);if(h.length!==S.length)return!1;for(S=0;S<h.length;S++){var _=h[S];if(!at.call(u,_)||!Xr(a[_],u[_]))return!1}return!0}function Wp(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ld(a,u){var h=Wp(a);a=0;for(var S;h;){if(h.nodeType===3){if(S=a+h.textContent.length,a<=u&&S>=u)return{node:h,offset:u-a};a=S}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Wp(h)}}function bc(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?bc(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function Qp(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var u=vs(a.document);u instanceof a.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)a=u.contentWindow;else break;u=vs(a.document)}return u}function tu(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}var Lo=ea&&"documentMode"in document&&11>=document.documentMode,al=null,Ec=null,sl=null,ud=!1;function Kp(a,u,h){var S=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;ud||al==null||al!==vs(S)||(S=al,"selectionStart"in S&&tu(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),sl&&eu(sl,S)||(sl=S,S=V1(Ec,"onSelect"),0<S.length&&(u=new Ui("onSelect","select",null,u,h),a.push({event:u,listeners:S}),u.target=al)))}function ka(a,u){var h={};return h[a.toLowerCase()]=u.toLowerCase(),h["Webkit"+a]="webkit"+u,h["Moz"+a]="moz"+u,h}var nu={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},Xp={},Qg={};ea&&(Qg=document.createElement("div").style,"AnimationEvent"in window||(delete nu.animationend.animation,delete nu.animationiteration.animation,delete nu.animationstart.animation),"TransitionEvent"in window||delete nu.transitionend.transition);function vo(a){if(Xp[a])return Xp[a];if(!nu[a])return a;var u=nu[a],h;for(h in u)if(u.hasOwnProperty(h)&&h in Qg)return Xp[a]=u[h];return a}var ll=vo("animationend"),ul=vo("animationiteration"),cd=vo("animationstart"),Zp=vo("transitionrun"),Kg=vo("transitionstart"),Jp=vo("transitioncancel"),Ss=vo("transitionend"),Ts=new Map,Zr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Zr.push("scrollEnd");function Hr(a,u){Ts.set(a,u),ho(u,[a])}var Ra=new WeakMap;function Ti(a,u){if(typeof a=="object"&&a!==null){var h=Ra.get(a);return h!==void 0?h:(u={value:a,source:u,stack:We(u)},Ra.set(a,u),u)}return{value:a,source:u,stack:We(u)}}var yo=[],cl=0,fl=0;function Sc(){for(var a=cl,u=fl=cl=0;u<a;){var h=yo[u];yo[u++]=null;var S=yo[u];yo[u++]=null;var _=yo[u];yo[u++]=null;var R=yo[u];if(yo[u++]=null,S!==null&&_!==null){var G=S.pending;G===null?_.next=_:(_.next=G.next,G.next=_),S.pending=_}R!==0&&fd(h,_,R)}}function ru(a,u,h,S){yo[cl++]=a,yo[cl++]=u,yo[cl++]=h,yo[cl++]=S,fl|=S,a.lanes|=S,a=a.alternate,a!==null&&(a.lanes|=S)}function iu(a,u,h,S){return ru(a,u,h,S),Tc(a)}function ou(a,u){return ru(a,null,null,u),Tc(a)}function fd(a,u,h){a.lanes|=h;var S=a.alternate;S!==null&&(S.lanes|=h);for(var _=!1,R=a.return;R!==null;)R.childLanes|=h,S=R.alternate,S!==null&&(S.childLanes|=h),R.tag===22&&(a=R.stateNode,a===null||a._visibility&1||(_=!0)),a=R,R=R.return;return a.tag===3?(R=a.stateNode,_&&u!==null&&(_=31-Et(h),a=R.hiddenUpdates,S=a[_],S===null?a[_]=[u]:S.push(u),u.lane=h|536870912),R):null}function Tc(a){if(50<Iv)throw Iv=0,T_=null,Error(r(185));for(var u=a.return;u!==null;)a=u,u=a.return;return a.tag===3?a.stateNode:null}var xs={};function eh(a,u,h,S){this.tag=a,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(a,u,h,S){return new eh(a,u,h,S)}function au(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ra(a,u){var h=a.alternate;return h===null?(h=Gr(a.tag,u,a.key,a.mode),h.elementType=a.elementType,h.type=a.type,h.stateNode=a.stateNode,h.alternate=a,a.alternate=h):(h.pendingProps=u,h.type=a.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=a.flags&65011712,h.childLanes=a.childLanes,h.lanes=a.lanes,h.child=a.child,h.memoizedProps=a.memoizedProps,h.memoizedState=a.memoizedState,h.updateQueue=a.updateQueue,u=a.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=a.sibling,h.index=a.index,h.ref=a.ref,h.refCleanup=a.refCleanup,h}function xc(a,u){a.flags&=65011714;var h=a.alternate;return h===null?(a.childLanes=0,a.lanes=u,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=h.childLanes,a.lanes=h.lanes,a.child=h.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=h.memoizedProps,a.memoizedState=h.memoizedState,a.updateQueue=h.updateQueue,a.type=h.type,u=h.dependencies,a.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),a}function dd(a,u,h,S,_,R){var G=0;if(S=a,typeof a=="function")au(a)&&(G=1);else if(typeof a=="string")G=Qie(a,h,ce.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case V:return a=Gr(31,h,u,_),a.elementType=V,a.lanes=R,a;case x:return dl(h.children,_,R,u);case w:G=8,_|=24;break;case k:return a=Gr(12,h,u,_|2),a.elementType=k,a.lanes=R,a;case M:return a=Gr(13,h,u,_),a.elementType=M,a.lanes=R,a;case j:return a=Gr(19,h,u,_),a.elementType=j,a.lanes=R,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:case A:G=10;break e;case D:G=9;break e;case C:G=11;break e;case P:G=14;break e;case F:G=16,S=null;break e}G=29,h=Error(r(130,a===null?"null":typeof a,"")),S=null}return u=Gr(G,h,u,_),u.elementType=a,u.type=S,u.lanes=R,u}function dl(a,u,h,S){return a=Gr(7,a,S,u),a.lanes=h,a}function th(a,u,h){return a=Gr(6,a,null,u),a.lanes=h,a}function wc(a,u,h){return u=Gr(4,a.children!==null?a.children:[],a.key,u),u.lanes=h,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}var ws=[],Io=0,Cs=null,pd=0,xi=[],eo=0,Fo=null,ia=1,wi="";function Po(a,u){ws[Io++]=pd,ws[Io++]=Cs,Cs=a,pd=u}function pl(a,u,h){xi[eo++]=ia,xi[eo++]=wi,xi[eo++]=Fo,Fo=a;var S=ia;a=wi;var _=32-Et(S)-1;S&=~(1<<_),h+=1;var R=32-Et(u)+_;if(30<R){var G=_-_%5;R=(S&(1<<G)-1).toString(32),S>>=G,_-=G,ia=1<<32-Et(u)+_|h<<_|S,wi=R+a}else ia=1<<R|h<<_|S,wi=a}function su(a){a.return!==null&&(Po(a,1),pl(a,1,0))}function _s(a){for(;a===Cs;)Cs=ws[--Io],ws[Io]=null,pd=ws[--Io],ws[Io]=null;for(;a===Fo;)Fo=xi[--eo],xi[eo]=null,wi=xi[--eo],xi[eo]=null,ia=xi[--eo],xi[eo]=null}var pi=null,dr=null,En=!1,lu=null,hi=!1,Ma=Error(r(519));function hl(a){var u=Error(r(418,""));throw Yr(Ti(u,a)),Ma}function Xg(a){var u=a.stateNode,h=a.type,S=a.memoizedProps;switch(u[Gt]=a,u[bn]=S,h){case"dialog":dn("cancel",u),dn("close",u);break;case"iframe":case"object":case"embed":dn("load",u);break;case"video":case"audio":for(h=0;h<Pv.length;h++)dn(Pv[h],u);break;case"source":dn("error",u);break;case"img":case"image":case"link":dn("error",u),dn("load",u);break;case"details":dn("toggle",u);break;case"input":dn("invalid",u),Wl(u,S.value,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name,!0),_r(u);break;case"select":dn("invalid",u);break;case"textarea":dn("invalid",u),Ag(u,S.value,S.defaultValue,S.children),_r(u)}h=S.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||S.suppressHydrationWarning===!0||Aj(u.textContent,h)?(S.popover!=null&&(dn("beforetoggle",u),dn("toggle",u)),S.onScroll!=null&&dn("scroll",u),S.onScrollEnd!=null&&dn("scrollend",u),S.onClick!=null&&(u.onclick=U1),u=!0):u=!1,u||hl(a)}function Zg(a){for(pi=a.return;pi;)switch(pi.tag){case 5:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:pi=pi.return}}function Cc(a){if(a!==pi)return!1;if(!En)return Zg(a),En=!0,!1;var u=a.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=a.type,h=!(h!=="form"&&h!=="button")||j_(a.type,a.memoizedProps)),h=!h),h&&dr&&hl(a),Zg(a),u===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,u=0;a;){if(a.nodeType===8)if(h=a.data,h==="/$"){if(u===0){dr=Fs(a.nextSibling);break e}u--}else h!=="$"&&h!=="$!"&&h!=="$?"||u++;a=a.nextSibling}dr=null}}else u===27?(u=dr,of(a.type)?(a=B_,B_=null,dr=a):dr=u):dr=pi?Fs(a.stateNode.nextSibling):null;return!0}function _c(){dr=pi=null,En=!1}function Jg(){var a=lu;return a!==null&&(Vo===null?Vo=a:Vo.push.apply(Vo,a),lu=null),a}function Yr(a){lu===null?lu=[a]:lu.push(a)}var Sr=ge(null),pr=null,Pn=null;function bo(a,u,h){pe(Sr,u._currentValue),u._currentValue=h}function La(a){a._currentValue=Sr.current,ae(Sr)}function Nc(a,u,h){for(;a!==null;){var S=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,S!==null&&(S.childLanes|=u)):S!==null&&(S.childLanes&u)!==u&&(S.childLanes|=u),a===h)break;a=a.return}}function nh(a,u,h,S){var _=a.child;for(_!==null&&(_.return=a);_!==null;){var R=_.dependencies;if(R!==null){var G=_.child;R=R.firstContext;e:for(;R!==null;){var te=R;R=_;for(var de=0;de<u.length;de++)if(te.context===u[de]){R.lanes|=h,te=R.alternate,te!==null&&(te.lanes|=h),Nc(R.return,h,a),S||(G=null);break e}R=te.next}}else if(_.tag===18){if(G=_.return,G===null)throw Error(r(341));G.lanes|=h,R=G.alternate,R!==null&&(R.lanes|=h),Nc(G,h,a),G=null}else G=_.child;if(G!==null)G.return=_;else for(G=_;G!==null;){if(G===a){G=null;break}if(_=G.sibling,_!==null){_.return=G.return,G=_;break}G=G.return}_=G}}function Ac(a,u,h,S){a=null;for(var _=u,R=!1;_!==null;){if(!R){if((_.flags&524288)!==0)R=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var G=_.alternate;if(G===null)throw Error(r(387));if(G=G.memoizedProps,G!==null){var te=_.type;Xr(_.pendingProps.value,G.value)||(a!==null?a.push(te):a=[te])}}else if(_===Ie.current){if(G=_.alternate,G===null)throw Error(r(387));G.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(a!==null?a.push($v):a=[$v])}_=_.return}a!==null&&nh(u,a,h,S),u.flags|=262144}function hd(a){for(a=a.firstContext;a!==null;){if(!Xr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Ia(a){pr=a,Pn=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Jr(a){return ev(pr,a)}function uu(a,u){return pr===null&&Ia(a),ev(a,u)}function ev(a,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},Pn===null){if(a===null)throw Error(r(308));Pn=u,a.dependencies={lanes:0,firstContext:u},a.flags|=524288}else Pn=Pn.next=u;return h}var rh=typeof AbortController<"u"?AbortController:function(){var a=[],u=this.signal={aborted:!1,addEventListener:function(h,S){a.push(S)}};this.abort=function(){u.aborted=!0,a.forEach(function(h){return h()})}},ih=e.unstable_scheduleCallback,tv=e.unstable_NormalPriority,Nr={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oc(){return{controller:new rh,data:new Map,refCount:0}}function cu(a){a.refCount--,a.refCount===0&&ih(tv,function(){a.controller.abort()})}var Fa=null,oh=0,Ns=0,to=null;function nv(a,u){if(Fa===null){var h=Fa=[];oh=0,Ns=O_(),to={status:"pending",value:void 0,then:function(S){h.push(S)}}}return oh++,u.then(rv,rv),u}function rv(){if(--oh===0&&Fa!==null){to!==null&&(to.status="fulfilled");var a=Fa;Fa=null,Ns=0,to=null;for(var u=0;u<a.length;u++)(0,a[u])()}}function iv(a,u){var h=[],S={status:"pending",value:null,reason:null,then:function(_){h.push(_)}};return a.then(function(){S.status="fulfilled",S.value=u;for(var _=0;_<h.length;_++)(0,h[_])(u)},function(_){for(S.status="rejected",S.reason=_,_=0;_<h.length;_++)(0,h[_])(void 0)}),S}var no=ne.S;ne.S=function(a,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&nv(a,u),no!==null&&no(a,u)};var tn=ge(null);function ro(){var a=tn.current;return a!==null?a:or.pooledCache}function jo(a,u){u===null?pe(tn,tn.current):pe(tn,u.pool)}function Pa(){var a=ro();return a===null?null:{parent:Nr._currentValue,pool:a}}var fu=Error(r(460)),md=Error(r(474)),Dc=Error(r(542)),ah={then:function(){}};function gd(a){return a=a.status,a==="fulfilled"||a==="rejected"}function As(){}function sh(a,u,h){switch(h=a[h],h===void 0?a.push(u):h!==u&&(u.then(As,As),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,lh(a),a;default:if(typeof u.status=="string")u.then(As,As);else{if(a=or,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=u,a.status="pending",a.then(function(S){if(u.status==="pending"){var _=u;_.status="fulfilled",_.value=S}},function(S){if(u.status==="pending"){var _=u;_.status="rejected",_.reason=S}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,lh(a),a}throw ml=u,fu}}var ml=null;function ja(){if(ml===null)throw Error(r(459));var a=ml;return ml=null,a}function lh(a){if(a===fu||a===Dc)throw Error(r(483))}var Va=!1;function uh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function du(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function oa(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Ua(a,u,h){var S=a.updateQueue;if(S===null)return null;if(S=S.shared,(jn&2)!==0){var _=S.pending;return _===null?u.next=u:(u.next=_.next,_.next=u),S.pending=u,u=Tc(a),fd(a,null,h),u}return ru(a,S,u,h),Tc(a)}function kc(a,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var S=u.lanes;S&=a.pendingLanes,h|=S,u.lanes=h,Bt(a,h)}}function vd(a,u){var h=a.updateQueue,S=a.alternate;if(S!==null&&(S=S.updateQueue,h===S)){var _=null,R=null;if(h=h.firstBaseUpdate,h!==null){do{var G={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};R===null?_=R=G:R=R.next=G,h=h.next}while(h!==null);R===null?_=R=u:R=R.next=u}else _=R=u;h={baseState:S.baseState,firstBaseUpdate:_,lastBaseUpdate:R,shared:S.shared,callbacks:S.callbacks},a.updateQueue=h;return}a=h.lastBaseUpdate,a===null?h.firstBaseUpdate=u:a.next=u,h.lastBaseUpdate=u}var ch=!1;function Rc(){if(ch){var a=to;if(a!==null)throw a}}function Os(a,u,h,S){ch=!1;var _=a.updateQueue;Va=!1;var R=_.firstBaseUpdate,G=_.lastBaseUpdate,te=_.shared.pending;if(te!==null){_.shared.pending=null;var de=te,_e=de.next;de.next=null,G===null?R=_e:G.next=_e,G=de;var qe=a.alternate;qe!==null&&(qe=qe.updateQueue,te=qe.lastBaseUpdate,te!==G&&(te===null?qe.firstBaseUpdate=_e:te.next=_e,qe.lastBaseUpdate=de))}if(R!==null){var He=_.baseState;G=0,qe=_e=de=null,te=R;do{var De=te.lane&-536870913,Re=De!==te.lane;if(Re?(wn&De)===De:(S&De)===De){De!==0&&De===Ns&&(ch=!0),qe!==null&&(qe=qe.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var Ut=a,kt=te;De=u;var Yn=h;switch(kt.tag){case 1:if(Ut=kt.payload,typeof Ut=="function"){He=Ut.call(Yn,He,De);break e}He=Ut;break e;case 3:Ut.flags=Ut.flags&-65537|128;case 0:if(Ut=kt.payload,De=typeof Ut=="function"?Ut.call(Yn,He,De):Ut,De==null)break e;He=m({},He,De);break e;case 2:Va=!0}}De=te.callback,De!==null&&(a.flags|=64,Re&&(a.flags|=8192),Re=_.callbacks,Re===null?_.callbacks=[De]:Re.push(De))}else Re={lane:De,tag:te.tag,payload:te.payload,callback:te.callback,next:null},qe===null?(_e=qe=Re,de=He):qe=qe.next=Re,G|=De;if(te=te.next,te===null){if(te=_.shared.pending,te===null)break;Re=te,te=Re.next,Re.next=null,_.lastBaseUpdate=Re,_.shared.pending=null}}while(!0);qe===null&&(de=He),_.baseState=de,_.firstBaseUpdate=_e,_.lastBaseUpdate=qe,R===null&&(_.shared.lanes=0),ef|=G,a.lanes=G,a.memoizedState=He}}function fh(a,u){if(typeof a!="function")throw Error(r(191,a));a.call(u)}function ov(a,u){var h=a.callbacks;if(h!==null)for(a.callbacks=null,a=0;a<h.length;a++)fh(h[a],u)}var pu=ge(null),Mc=ge(0);function gl(a,u){a=Au,pe(Mc,a),pe(pu,u),Au=a|u.baseLanes}function Lc(){pe(Mc,Au),pe(pu,pu.current)}function hu(){Au=Mc.current,ae(pu),ae(Mc)}var qa=0,Ht=null,On=null,Ar=null,Ic=!1,hr=!1,aa=!1,Fc=0,mu=0,vl=null,gu=0;function Qn(){throw Error(r(321))}function yd(a,u){if(u===null)return!1;for(var h=0;h<u.length&&h<a.length;h++)if(!Xr(a[h],u[h]))return!1;return!0}function bd(a,u,h,S,_,R){return qa=R,Ht=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,ne.H=a===null||a.memoizedState===null?Th:O1,aa=!1,R=h(S,_),aa=!1,hr&&(R=yl(u,h,S,_)),dh(a),R}function dh(a){ne.H=Hc;var u=On!==null&&On.next!==null;if(qa=0,Ar=On=Ht=null,Ic=!1,mu=0,vl=null,u)throw Error(r(300));a===null||Pr||(a=a.dependencies,a!==null&&hd(a)&&(Pr=!0))}function yl(a,u,h,S){Ht=a;var _=0;do{if(hr&&(vl=null),mu=0,hr=!1,25<=_)throw Error(r(301));if(_+=1,Ar=On=null,a.updateQueue!=null){var R=a.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}ne.H=Sv,R=u(h,S)}while(hr);return R}function av(){var a=ne.H,u=a.useState()[0];return u=typeof u.then=="function"?yu(u):u,a=a.useState()[0],(On!==null?On.memoizedState:null)!==a&&(Ht.flags|=1024),u}function vu(){var a=Fc!==0;return Fc=0,a}function Ed(a,u,h){u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~h}function bl(a){if(Ic){for(a=a.memoizedState;a!==null;){var u=a.queue;u!==null&&(u.pending=null),a=a.next}Ic=!1}qa=0,Ar=On=Ht=null,hr=!1,mu=Fc=0,vl=null}function qi(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ar===null?Ht.memoizedState=Ar=a:Ar=Ar.next=a,Ar}function $n(){if(On===null){var a=Ht.alternate;a=a!==null?a.memoizedState:null}else a=On.next;var u=Ar===null?Ht.memoizedState:Ar.next;if(u!==null)Ar=u,On=a;else{if(a===null)throw Ht.alternate===null?Error(r(467)):Error(r(310));On=a,a={memoizedState:On.memoizedState,baseState:On.baseState,baseQueue:On.baseQueue,queue:On.queue,next:null},Ar===null?Ht.memoizedState=Ar=a:Ar=Ar.next=a}return Ar}function Sd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yu(a){var u=mu;return mu+=1,vl===null&&(vl=[]),a=sh(vl,a,u),u=Ht,(Ar===null?u.memoizedState:Ar.next)===null&&(u=u.alternate,ne.H=u===null||u.memoizedState===null?Th:O1),a}function Pc(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return yu(a);if(a.$$typeof===A)return Jr(a)}throw Error(r(438,String(a)))}function El(a){var u=null,h=Ht.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var S=Ht.alternate;S!==null&&(S=S.updateQueue,S!==null&&(S=S.memoCache,S!=null&&(u={data:S.data.map(function(_){return _.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=Sd(),Ht.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(a),S=0;S<a;S++)h[S]=$;return u.index++,h}function io(a,u){return typeof u=="function"?u(a):u}function Ds(a){var u=$n();return bu(u,On,a)}function bu(a,u,h){var S=a.queue;if(S===null)throw Error(r(311));S.lastRenderedReducer=h;var _=a.baseQueue,R=S.pending;if(R!==null){if(_!==null){var G=_.next;_.next=R.next,R.next=G}u.baseQueue=_=R,S.pending=null}if(R=a.baseState,_===null)a.memoizedState=R;else{u=_.next;var te=G=null,de=null,_e=u,qe=!1;do{var He=_e.lane&-536870913;if(He!==_e.lane?(wn&He)===He:(qa&He)===He){var De=_e.revertLane;if(De===0)de!==null&&(de=de.next={lane:0,revertLane:0,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null}),He===Ns&&(qe=!0);else if((qa&De)===De){_e=_e.next,De===Ns&&(qe=!0);continue}else He={lane:0,revertLane:_e.revertLane,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null},de===null?(te=de=He,G=R):de=de.next=He,Ht.lanes|=De,ef|=De;He=_e.action,aa&&h(R,He),R=_e.hasEagerState?_e.eagerState:h(R,He)}else De={lane:He,revertLane:_e.revertLane,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null},de===null?(te=de=De,G=R):de=de.next=De,Ht.lanes|=He,ef|=He;_e=_e.next}while(_e!==null&&_e!==u);if(de===null?G=R:de.next=te,!Xr(R,a.memoizedState)&&(Pr=!0,qe&&(h=to,h!==null)))throw h;a.memoizedState=R,a.baseState=G,a.baseQueue=de,S.lastRenderedState=R}return _===null&&(S.lanes=0),[a.memoizedState,S.dispatch]}function Td(a){var u=$n(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=a;var S=h.dispatch,_=h.pending,R=u.memoizedState;if(_!==null){h.pending=null;var G=_=_.next;do R=a(R,G.action),G=G.next;while(G!==_);Xr(R,u.memoizedState)||(Pr=!0),u.memoizedState=R,u.baseQueue===null&&(u.baseState=R),h.lastRenderedState=R}return[R,S]}function sv(a,u,h){var S=Ht,_=$n(),R=En;if(R){if(h===void 0)throw Error(r(407));h=h()}else h=u();var G=!Xr((On||_).memoizedState,h);G&&(_.memoizedState=h,Pr=!0),_=_.queue;var te=Sl.bind(null,S,_,a);if(Rs(2048,8,te,[a]),_.getSnapshot!==u||G||Ar!==null&&Ar.memoizedState.tag&1){if(S.flags|=2048,Eu(9,sa(),ks.bind(null,S,_,h,u),null),or===null)throw Error(r(349));R||(qa&124)!==0||lv(S,u,h)}return h}function lv(a,u,h){a.flags|=16384,a={getSnapshot:u,value:h},u=Ht.updateQueue,u===null?(u=Sd(),Ht.updateQueue=u,u.stores=[a]):(h=u.stores,h===null?u.stores=[a]:h.push(a))}function ks(a,u,h,S){u.value=h,u.getSnapshot=S,jc(u)&&uv(a)}function Sl(a,u,h){return h(function(){jc(u)&&uv(a)})}function jc(a){var u=a.getSnapshot;a=a.value;try{var h=u();return!Xr(a,h)}catch{return!0}}function uv(a){var u=ou(a,2);u!==null&&pa(u,a,2)}function xd(a){var u=qi();if(typeof a=="function"){var h=a;if(a=h(),aa){dt(!0);try{h()}finally{dt(!1)}}}return u.memoizedState=u.baseState=a,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:a},u}function cv(a,u,h,S){return a.baseState=h,bu(a,On,typeof S=="function"?S:io)}function C1(a,u,h,S,_){if(zc(a))throw Error(r(485));if(a=u.action,a!==null){var R={payload:_,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(G){R.listeners.push(G)}};ne.T!==null?h(!0):R.isTransition=!1,S(R),h=u.pending,h===null?(R.next=u.pending=R,_1(u,R)):(R.next=h.next,u.pending=h.next=R)}}function _1(a,u){var h=u.action,S=u.payload,_=a.state;if(u.isTransition){var R=ne.T,G={};ne.T=G;try{var te=h(_,S),de=ne.S;de!==null&&de(G,te),Ci(a,u,te)}catch(_e){ph(a,u,_e)}finally{ne.T=R}}else try{R=h(_,S),Ci(a,u,R)}catch(_e){ph(a,u,_e)}}function Ci(a,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(S){fv(a,u,S)},function(S){return ph(a,u,S)}):fv(a,u,h)}function fv(a,u,h){u.status="fulfilled",u.value=h,dv(u),a.state=h,u=a.pending,u!==null&&(h=u.next,h===u?a.pending=null:(h=h.next,u.next=h,_1(a,h)))}function ph(a,u,h){var S=a.pending;if(a.pending=null,S!==null){S=S.next;do u.status="rejected",u.reason=h,dv(u),u=u.next;while(u!==S)}a.action=null}function dv(a){a=a.listeners;for(var u=0;u<a.length;u++)(0,a[u])()}function pv(a,u){return u}function hh(a,u){if(En){var h=or.formState;if(h!==null){e:{var S=Ht;if(En){if(dr){t:{for(var _=dr,R=hi;_.nodeType!==8;){if(!R){_=null;break t}if(_=Fs(_.nextSibling),_===null){_=null;break t}}R=_.data,_=R==="F!"||R==="F"?_:null}if(_){dr=Fs(_.nextSibling),S=_.data==="F!";break e}}hl(S)}S=!1}S&&(u=h[0])}}return h=qi(),h.memoizedState=h.baseState=u,S={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pv,lastRenderedState:u},h.queue=S,h=bh.bind(null,Ht,S),S.dispatch=h,S=xd(!1),R=Eh.bind(null,Ht,!1,S.queue),S=qi(),_={state:u,dispatch:null,action:a,pending:null},S.queue=_,h=C1.bind(null,Ht,_,R,h),_.dispatch=h,S.memoizedState=a,[u,h,!1]}function mh(a){var u=$n();return hv(u,On,a)}function hv(a,u,h){if(u=bu(a,u,pv)[0],a=Ds(io)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var S=yu(u)}catch(G){throw G===fu?Dc:G}else S=u;u=$n();var _=u.queue,R=_.dispatch;return h!==u.memoizedState&&(Ht.flags|=2048,Eu(9,sa(),N1.bind(null,_,h),null)),[S,R,a]}function N1(a,u){a.action=u}function mv(a){var u=$n(),h=On;if(h!==null)return hv(u,h,a);$n(),u=u.memoizedState,h=$n();var S=h.queue.dispatch;return h.memoizedState=a,[u,S,!1]}function Eu(a,u,h,S){return a={tag:a,create:h,deps:S,inst:u,next:null},u=Ht.updateQueue,u===null&&(u=Sd(),Ht.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=a.next=a:(S=h.next,h.next=a,a.next=S,u.lastEffect=a),a}function sa(){return{destroy:void 0,resource:void 0}}function Vc(){return $n().memoizedState}function Su(a,u,h,S){var _=qi();S=S===void 0?null:S,Ht.flags|=a,_.memoizedState=Eu(1|u,sa(),h,S)}function Rs(a,u,h,S){var _=$n();S=S===void 0?null:S;var R=_.memoizedState.inst;On!==null&&S!==null&&yd(S,On.memoizedState.deps)?_.memoizedState=Eu(u,R,h,S):(Ht.flags|=a,_.memoizedState=Eu(1|u,R,h,S))}function Ba(a,u){Su(8390656,8,a,u)}function gv(a,u){Rs(2048,8,a,u)}function vv(a,u){return Rs(4,2,a,u)}function Tl(a,u){return Rs(4,4,a,u)}function gh(a,u){if(typeof u=="function"){a=a();var h=u(a);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function vh(a,u,h){h=h!=null?h.concat([a]):null,Rs(4,4,gh.bind(null,u,a),h)}function wd(){}function Uc(a,u){var h=$n();u=u===void 0?null:u;var S=h.memoizedState;return u!==null&&yd(u,S[1])?S[0]:(h.memoizedState=[a,u],a)}function xl(a,u){var h=$n();u=u===void 0?null:u;var S=h.memoizedState;if(u!==null&&yd(u,S[1]))return S[0];if(S=a(),aa){dt(!0);try{a()}finally{dt(!1)}}return h.memoizedState=[S,u],S}function qc(a,u,h){return h===void 0||(qa&1073741824)!==0?a.memoizedState=u:(a.memoizedState=h,a=tj(),Ht.lanes|=a,ef|=a,h)}function Cd(a,u,h,S){return Xr(h,u)?h:pu.current!==null?(a=qc(a,h,S),Xr(a,u)||(Pr=!0),a):(qa&42)===0?(Pr=!0,a.memoizedState=h):(a=tj(),Ht.lanes|=a,ef|=a,u)}function _d(a,u,h,S,_){var R=re.p;re.p=R!==0&&8>R?R:8;var G=ne.T,te={};ne.T=te,Eh(a,!1,u,h);try{var de=_(),_e=ne.S;if(_e!==null&&_e(te,de),de!==null&&typeof de=="object"&&typeof de.then=="function"){var qe=iv(de,S);xu(a,u,qe,da(a))}else xu(a,u,S,da(a))}catch(He){xu(a,u,{then:function(){},status:"rejected",reason:He},da())}finally{re.p=R,ne.T=G}}function A1(){}function Tu(a,u,h,S){if(a.tag!==5)throw Error(r(476));var _=yh(a).queue;_d(a,_,u,se,h===null?A1:function(){return yv(a),h(S)})}function yh(a){var u=a.memoizedState;if(u!==null)return u;u={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:se},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:io,lastRenderedState:h},next:null},a.memoizedState=u,a=a.alternate,a!==null&&(a.memoizedState=u),u}function yv(a){var u=yh(a).next.queue;xu(a,u,{},da())}function Nd(){return Jr($v)}function Bc(){return $n().memoizedState}function bv(){return $n().memoizedState}function p_(a){for(var u=a.return;u!==null;){switch(u.tag){case 24:case 3:var h=da();a=oa(h);var S=Ua(u,a,h);S!==null&&(pa(S,u,h),kc(S,u,h)),u={cache:Oc()},a.payload=u;return}u=u.return}}function $c(a,u,h){var S=da();h={lane:S,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},zc(a)?Sh(u,h):(h=iu(a,u,h,S),h!==null&&(pa(h,a,S),Ev(h,u,S)))}function bh(a,u,h){var S=da();xu(a,u,h,S)}function xu(a,u,h,S){var _={lane:S,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(zc(a))Sh(u,_);else{var R=a.alternate;if(a.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var G=u.lastRenderedState,te=R(G,h);if(_.hasEagerState=!0,_.eagerState=te,Xr(te,G))return ru(a,u,_,0),or===null&&Sc(),!1}catch{}finally{}if(h=iu(a,u,_,S),h!==null)return pa(h,a,S),Ev(h,u,S),!0}return!1}function Eh(a,u,h,S){if(S={lane:2,revertLane:O_(),action:S,hasEagerState:!1,eagerState:null,next:null},zc(a)){if(u)throw Error(r(479))}else u=iu(a,h,S,2),u!==null&&pa(u,a,2)}function zc(a){var u=a.alternate;return a===Ht||u!==null&&u===Ht}function Sh(a,u){hr=Ic=!0;var h=a.pending;h===null?u.next=u:(u.next=h.next,h.next=u),a.pending=u}function Ev(a,u,h){if((h&4194048)!==0){var S=u.lanes;S&=a.pendingLanes,h|=S,u.lanes=h,Bt(a,h)}}var Hc={readContext:Jr,use:Pc,useCallback:Qn,useContext:Qn,useEffect:Qn,useImperativeHandle:Qn,useLayoutEffect:Qn,useInsertionEffect:Qn,useMemo:Qn,useReducer:Qn,useRef:Qn,useState:Qn,useDebugValue:Qn,useDeferredValue:Qn,useTransition:Qn,useSyncExternalStore:Qn,useId:Qn,useHostTransitionStatus:Qn,useFormState:Qn,useActionState:Qn,useOptimistic:Qn,useMemoCache:Qn,useCacheRefresh:Qn},Th={readContext:Jr,use:Pc,useCallback:function(a,u){return qi().memoizedState=[a,u===void 0?null:u],a},useContext:Jr,useEffect:Ba,useImperativeHandle:function(a,u,h){h=h!=null?h.concat([a]):null,Su(4194308,4,gh.bind(null,u,a),h)},useLayoutEffect:function(a,u){return Su(4194308,4,a,u)},useInsertionEffect:function(a,u){Su(4,2,a,u)},useMemo:function(a,u){var h=qi();u=u===void 0?null:u;var S=a();if(aa){dt(!0);try{a()}finally{dt(!1)}}return h.memoizedState=[S,u],S},useReducer:function(a,u,h){var S=qi();if(h!==void 0){var _=h(u);if(aa){dt(!0);try{h(u)}finally{dt(!1)}}}else _=u;return S.memoizedState=S.baseState=_,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:_},S.queue=a,a=a.dispatch=$c.bind(null,Ht,a),[S.memoizedState,a]},useRef:function(a){var u=qi();return a={current:a},u.memoizedState=a},useState:function(a){a=xd(a);var u=a.queue,h=bh.bind(null,Ht,u);return u.dispatch=h,[a.memoizedState,h]},useDebugValue:wd,useDeferredValue:function(a,u){var h=qi();return qc(h,a,u)},useTransition:function(){var a=xd(!1);return a=_d.bind(null,Ht,a.queue,!0,!1),qi().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,u,h){var S=Ht,_=qi();if(En){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),or===null)throw Error(r(349));(wn&124)!==0||lv(S,u,h)}_.memoizedState=h;var R={value:h,getSnapshot:u};return _.queue=R,Ba(Sl.bind(null,S,R,a),[a]),S.flags|=2048,Eu(9,sa(),ks.bind(null,S,R,h,u),null),h},useId:function(){var a=qi(),u=or.identifierPrefix;if(En){var h=wi,S=ia;h=(S&~(1<<32-Et(S)-1)).toString(32)+h,u="«"+u+"R"+h,h=Fc++,0<h&&(u+="H"+h.toString(32)),u+="»"}else h=gu++,u="«"+u+"r"+h.toString(32)+"»";return a.memoizedState=u},useHostTransitionStatus:Nd,useFormState:hh,useActionState:hh,useOptimistic:function(a){var u=qi();u.memoizedState=u.baseState=a;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=Eh.bind(null,Ht,!0,h),h.dispatch=u,[a,u]},useMemoCache:El,useCacheRefresh:function(){return qi().memoizedState=p_.bind(null,Ht)}},O1={readContext:Jr,use:Pc,useCallback:Uc,useContext:Jr,useEffect:gv,useImperativeHandle:vh,useInsertionEffect:vv,useLayoutEffect:Tl,useMemo:xl,useReducer:Ds,useRef:Vc,useState:function(){return Ds(io)},useDebugValue:wd,useDeferredValue:function(a,u){var h=$n();return Cd(h,On.memoizedState,a,u)},useTransition:function(){var a=Ds(io)[0],u=$n().memoizedState;return[typeof a=="boolean"?a:yu(a),u]},useSyncExternalStore:sv,useId:Bc,useHostTransitionStatus:Nd,useFormState:mh,useActionState:mh,useOptimistic:function(a,u){var h=$n();return cv(h,On,a,u)},useMemoCache:El,useCacheRefresh:bv},Sv={readContext:Jr,use:Pc,useCallback:Uc,useContext:Jr,useEffect:gv,useImperativeHandle:vh,useInsertionEffect:vv,useLayoutEffect:Tl,useMemo:xl,useReducer:Td,useRef:Vc,useState:function(){return Td(io)},useDebugValue:wd,useDeferredValue:function(a,u){var h=$n();return On===null?qc(h,a,u):Cd(h,On.memoizedState,a,u)},useTransition:function(){var a=Td(io)[0],u=$n().memoizedState;return[typeof a=="boolean"?a:yu(a),u]},useSyncExternalStore:sv,useId:Bc,useHostTransitionStatus:Nd,useFormState:mv,useActionState:mv,useOptimistic:function(a,u){var h=$n();return On!==null?cv(h,On,a,u):(h.baseState=a,[a,h.queue.dispatch])},useMemoCache:El,useCacheRefresh:bv},$a=null,Ms=0;function Ad(a){var u=Ms;return Ms+=1,$a===null&&($a=[]),sh($a,a,u)}function wu(a,u){u=u.props.ref,a.ref=u!==void 0?u:null}function Od(a,u){throw u.$$typeof===b?Error(r(525)):(a=Object.prototype.toString.call(u),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a)))}function Tv(a){var u=a._init;return u(a._payload)}function xv(a){function u(Te,ve){if(a){var Ce=Te.deletions;Ce===null?(Te.deletions=[ve],Te.flags|=16):Ce.push(ve)}}function h(Te,ve){if(!a)return null;for(;ve!==null;)u(Te,ve),ve=ve.sibling;return null}function S(Te){for(var ve=new Map;Te!==null;)Te.key!==null?ve.set(Te.key,Te):ve.set(Te.index,Te),Te=Te.sibling;return ve}function _(Te,ve){return Te=ra(Te,ve),Te.index=0,Te.sibling=null,Te}function R(Te,ve,Ce){return Te.index=Ce,a?(Ce=Te.alternate,Ce!==null?(Ce=Ce.index,Ce<ve?(Te.flags|=67108866,ve):Ce):(Te.flags|=67108866,ve)):(Te.flags|=1048576,ve)}function G(Te){return a&&Te.alternate===null&&(Te.flags|=67108866),Te}function te(Te,ve,Ce,Be){return ve===null||ve.tag!==6?(ve=th(Ce,Te.mode,Be),ve.return=Te,ve):(ve=_(ve,Ce),ve.return=Te,ve)}function de(Te,ve,Ce,Be){var Tt=Ce.type;return Tt===x?qe(Te,ve,Ce.props.children,Be,Ce.key):ve!==null&&(ve.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===F&&Tv(Tt)===ve.type)?(ve=_(ve,Ce.props),wu(ve,Ce),ve.return=Te,ve):(ve=dd(Ce.type,Ce.key,Ce.props,null,Te.mode,Be),wu(ve,Ce),ve.return=Te,ve)}function _e(Te,ve,Ce,Be){return ve===null||ve.tag!==4||ve.stateNode.containerInfo!==Ce.containerInfo||ve.stateNode.implementation!==Ce.implementation?(ve=wc(Ce,Te.mode,Be),ve.return=Te,ve):(ve=_(ve,Ce.children||[]),ve.return=Te,ve)}function qe(Te,ve,Ce,Be,Tt){return ve===null||ve.tag!==7?(ve=dl(Ce,Te.mode,Be,Tt),ve.return=Te,ve):(ve=_(ve,Ce),ve.return=Te,ve)}function He(Te,ve,Ce){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ve=th(""+ve,Te.mode,Ce),ve.return=Te,ve;if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case E:return Ce=dd(ve.type,ve.key,ve.props,null,Te.mode,Ce),wu(Ce,ve),Ce.return=Te,Ce;case y:return ve=wc(ve,Te.mode,Ce),ve.return=Te,ve;case F:var Be=ve._init;return ve=Be(ve._payload),He(Te,ve,Ce)}if(B(ve)||J(ve))return ve=dl(ve,Te.mode,Ce,null),ve.return=Te,ve;if(typeof ve.then=="function")return He(Te,Ad(ve),Ce);if(ve.$$typeof===A)return He(Te,uu(Te,ve),Ce);Od(Te,ve)}return null}function De(Te,ve,Ce,Be){var Tt=ve!==null?ve.key:null;if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return Tt!==null?null:te(Te,ve,""+Ce,Be);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case E:return Ce.key===Tt?de(Te,ve,Ce,Be):null;case y:return Ce.key===Tt?_e(Te,ve,Ce,Be):null;case F:return Tt=Ce._init,Ce=Tt(Ce._payload),De(Te,ve,Ce,Be)}if(B(Ce)||J(Ce))return Tt!==null?null:qe(Te,ve,Ce,Be,null);if(typeof Ce.then=="function")return De(Te,ve,Ad(Ce),Be);if(Ce.$$typeof===A)return De(Te,ve,uu(Te,Ce),Be);Od(Te,Ce)}return null}function Re(Te,ve,Ce,Be,Tt){if(typeof Be=="string"&&Be!==""||typeof Be=="number"||typeof Be=="bigint")return Te=Te.get(Ce)||null,te(ve,Te,""+Be,Tt);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case E:return Te=Te.get(Be.key===null?Ce:Be.key)||null,de(ve,Te,Be,Tt);case y:return Te=Te.get(Be.key===null?Ce:Be.key)||null,_e(ve,Te,Be,Tt);case F:var sn=Be._init;return Be=sn(Be._payload),Re(Te,ve,Ce,Be,Tt)}if(B(Be)||J(Be))return Te=Te.get(Ce)||null,qe(ve,Te,Be,Tt,null);if(typeof Be.then=="function")return Re(Te,ve,Ce,Ad(Be),Tt);if(Be.$$typeof===A)return Re(Te,ve,Ce,uu(ve,Be),Tt);Od(ve,Be)}return null}function Ut(Te,ve,Ce,Be){for(var Tt=null,sn=null,Nt=ve,Mt=ve=0,Ni=null;Nt!==null&&Mt<Ce.length;Mt++){Nt.index>Mt?(Ni=Nt,Nt=null):Ni=Nt.sibling;var Dn=De(Te,Nt,Ce[Mt],Be);if(Dn===null){Nt===null&&(Nt=Ni);break}a&&Nt&&Dn.alternate===null&&u(Te,Nt),ve=R(Dn,ve,Mt),sn===null?Tt=Dn:sn.sibling=Dn,sn=Dn,Nt=Ni}if(Mt===Ce.length)return h(Te,Nt),En&&Po(Te,Mt),Tt;if(Nt===null){for(;Mt<Ce.length;Mt++)Nt=He(Te,Ce[Mt],Be),Nt!==null&&(ve=R(Nt,ve,Mt),sn===null?Tt=Nt:sn.sibling=Nt,sn=Nt);return En&&Po(Te,Mt),Tt}for(Nt=S(Nt);Mt<Ce.length;Mt++)Ni=Re(Nt,Te,Mt,Ce[Mt],Be),Ni!==null&&(a&&Ni.alternate!==null&&Nt.delete(Ni.key===null?Mt:Ni.key),ve=R(Ni,ve,Mt),sn===null?Tt=Ni:sn.sibling=Ni,sn=Ni);return a&&Nt.forEach(function(cf){return u(Te,cf)}),En&&Po(Te,Mt),Tt}function kt(Te,ve,Ce,Be){if(Ce==null)throw Error(r(151));for(var Tt=null,sn=null,Nt=ve,Mt=ve=0,Ni=null,Dn=Ce.next();Nt!==null&&!Dn.done;Mt++,Dn=Ce.next()){Nt.index>Mt?(Ni=Nt,Nt=null):Ni=Nt.sibling;var cf=De(Te,Nt,Dn.value,Be);if(cf===null){Nt===null&&(Nt=Ni);break}a&&Nt&&cf.alternate===null&&u(Te,Nt),ve=R(cf,ve,Mt),sn===null?Tt=cf:sn.sibling=cf,sn=cf,Nt=Ni}if(Dn.done)return h(Te,Nt),En&&Po(Te,Mt),Tt;if(Nt===null){for(;!Dn.done;Mt++,Dn=Ce.next())Dn=He(Te,Dn.value,Be),Dn!==null&&(ve=R(Dn,ve,Mt),sn===null?Tt=Dn:sn.sibling=Dn,sn=Dn);return En&&Po(Te,Mt),Tt}for(Nt=S(Nt);!Dn.done;Mt++,Dn=Ce.next())Dn=Re(Nt,Te,Mt,Dn.value,Be),Dn!==null&&(a&&Dn.alternate!==null&&Nt.delete(Dn.key===null?Mt:Dn.key),ve=R(Dn,ve,Mt),sn===null?Tt=Dn:sn.sibling=Dn,sn=Dn);return a&&Nt.forEach(function(soe){return u(Te,soe)}),En&&Po(Te,Mt),Tt}function Yn(Te,ve,Ce,Be){if(typeof Ce=="object"&&Ce!==null&&Ce.type===x&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case E:e:{for(var Tt=Ce.key;ve!==null;){if(ve.key===Tt){if(Tt=Ce.type,Tt===x){if(ve.tag===7){h(Te,ve.sibling),Be=_(ve,Ce.props.children),Be.return=Te,Te=Be;break e}}else if(ve.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===F&&Tv(Tt)===ve.type){h(Te,ve.sibling),Be=_(ve,Ce.props),wu(Be,Ce),Be.return=Te,Te=Be;break e}h(Te,ve);break}else u(Te,ve);ve=ve.sibling}Ce.type===x?(Be=dl(Ce.props.children,Te.mode,Be,Ce.key),Be.return=Te,Te=Be):(Be=dd(Ce.type,Ce.key,Ce.props,null,Te.mode,Be),wu(Be,Ce),Be.return=Te,Te=Be)}return G(Te);case y:e:{for(Tt=Ce.key;ve!==null;){if(ve.key===Tt)if(ve.tag===4&&ve.stateNode.containerInfo===Ce.containerInfo&&ve.stateNode.implementation===Ce.implementation){h(Te,ve.sibling),Be=_(ve,Ce.children||[]),Be.return=Te,Te=Be;break e}else{h(Te,ve);break}else u(Te,ve);ve=ve.sibling}Be=wc(Ce,Te.mode,Be),Be.return=Te,Te=Be}return G(Te);case F:return Tt=Ce._init,Ce=Tt(Ce._payload),Yn(Te,ve,Ce,Be)}if(B(Ce))return Ut(Te,ve,Ce,Be);if(J(Ce)){if(Tt=J(Ce),typeof Tt!="function")throw Error(r(150));return Ce=Tt.call(Ce),kt(Te,ve,Ce,Be)}if(typeof Ce.then=="function")return Yn(Te,ve,Ad(Ce),Be);if(Ce.$$typeof===A)return Yn(Te,ve,uu(Te,Ce),Be);Od(Te,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ve!==null&&ve.tag===6?(h(Te,ve.sibling),Be=_(ve,Ce),Be.return=Te,Te=Be):(h(Te,ve),Be=th(Ce,Te.mode,Be),Be.return=Te,Te=Be),G(Te)):h(Te,ve)}return function(Te,ve,Ce,Be){try{Ms=0;var Tt=Yn(Te,ve,Ce,Be);return $a=null,Tt}catch(Nt){if(Nt===fu||Nt===Dc)throw Nt;var sn=Gr(29,Nt,null,Te.mode);return sn.lanes=Be,sn.return=Te,sn}finally{}}}var Cu=xv(!0),xh=xv(!1),Eo=ge(null),la=null;function za(a){var u=a.alternate;pe(Or,Or.current&1),pe(Eo,a),la===null&&(u===null||pu.current!==null||u.memoizedState!==null)&&(la=a)}function Dd(a){if(a.tag===22){if(pe(Or,Or.current),pe(Eo,a),la===null){var u=a.alternate;u!==null&&u.memoizedState!==null&&(la=a)}}else Ha()}function Ha(){pe(Or,Or.current),pe(Eo,Eo.current)}function Ga(a){ae(Eo),la===a&&(la=null),ae(Or)}var Or=ge(0);function Ls(a){for(var u=a;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||q_(h)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function wh(a,u,h,S){u=a.memoizedState,h=h(S,u),h=h==null?u:m({},u,h),a.memoizedState=h,a.lanes===0&&(a.updateQueue.baseState=h)}var Gc={enqueueSetState:function(a,u,h){a=a._reactInternals;var S=da(),_=oa(S);_.payload=u,h!=null&&(_.callback=h),u=Ua(a,_,S),u!==null&&(pa(u,a,S),kc(u,a,S))},enqueueReplaceState:function(a,u,h){a=a._reactInternals;var S=da(),_=oa(S);_.tag=1,_.payload=u,h!=null&&(_.callback=h),u=Ua(a,_,S),u!==null&&(pa(u,a,S),kc(u,a,S))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var h=da(),S=oa(h);S.tag=2,u!=null&&(S.callback=u),u=Ua(a,S,h),u!==null&&(pa(u,a,h),kc(u,a,h))}};function wv(a,u,h,S,_,R,G){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(S,R,G):u.prototype&&u.prototype.isPureReactComponent?!eu(h,S)||!eu(_,R):!0}function Cv(a,u,h,S){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,S),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,S),u.state!==a&&Gc.enqueueReplaceState(u,u.state,null)}function wl(a,u){var h=u;if("ref"in u){h={};for(var S in u)S!=="ref"&&(h[S]=u[S])}if(a=a.defaultProps){h===u&&(h=m({},h));for(var _ in a)h[_]===void 0&&(h[_]=a[_])}return h}var Mn=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function _v(a){Mn(a)}function Ch(a){console.error(a)}function _u(a){Mn(a)}function oo(a,u){try{var h=a.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(S){setTimeout(function(){throw S})}}function Yc(a,u,h){try{var S=a.onCaughtError;S(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function Wc(a,u,h){return h=oa(h),h.tag=3,h.payload={element:null},h.callback=function(){oo(a,u)},h}function _h(a){return a=oa(a),a.tag=3,a}function Nh(a,u,h,S){var _=h.type.getDerivedStateFromError;if(typeof _=="function"){var R=S.value;a.payload=function(){return _(R)},a.callback=function(){Yc(u,h,S)}}var G=h.stateNode;G!==null&&typeof G.componentDidCatch=="function"&&(a.callback=function(){Yc(u,h,S),typeof _!="function"&&(tf===null?tf=new Set([this]):tf.add(this));var te=S.stack;this.componentDidCatch(S.value,{componentStack:te!==null?te:""})})}function Nv(a,u,h,S,_){if(h.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(u=h.alternate,u!==null&&Ac(u,h,_,!0),h=Eo.current,h!==null){switch(h.tag){case 13:return la===null?w_():h.alternate===null&&jr===0&&(jr=3),h.flags&=-257,h.flags|=65536,h.lanes=_,S===ah?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([S]):u.add(S),__(a,S,_)),!1;case 22:return h.flags|=65536,S===ah?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([S])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([S]):h.add(S)),__(a,S,_)),!1}throw Error(r(435,h.tag))}return __(a,S,_),w_(),!1}if(En)return u=Eo.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=_,S!==Ma&&(a=Error(r(422),{cause:S}),Yr(Ti(a,h)))):(S!==Ma&&(u=Error(r(423),{cause:S}),Yr(Ti(u,h))),a=a.current.alternate,a.flags|=65536,_&=-_,a.lanes|=_,S=Ti(S,h),_=Wc(a.stateNode,S,_),vd(a,_),jr!==4&&(jr=2)),!1;var R=Error(r(520),{cause:S});if(R=Ti(R,h),Lv===null?Lv=[R]:Lv.push(R),jr!==4&&(jr=2),u===null)return!0;S=Ti(S,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,a=_&-_,h.lanes|=a,a=Wc(h.stateNode,S,a),vd(h,a),!1;case 1:if(u=h.type,R=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(tf===null||!tf.has(R))))return h.flags|=65536,_&=-_,h.lanes|=_,_=_h(_),Nh(_,a,h,S),vd(h,_),!1}h=h.return}while(h!==null);return!1}var Ah=Error(r(461)),Pr=!1;function ei(a,u,h,S){u.child=a===null?xh(u,null,h,S):Cu(u,a.child,h,S)}function kd(a,u,h,S,_){h=h.render;var R=u.ref;if("ref"in S){var G={};for(var te in S)te!=="ref"&&(G[te]=S[te])}else G=S;return Ia(u),S=bd(a,u,h,G,R,_),te=vu(),a!==null&&!Pr?(Ed(a,u,_),I(a,u,_)):(En&&te&&su(u),u.flags|=1,ei(a,u,S,_),u.child)}function Oh(a,u,h,S,_){if(a===null){var R=h.type;return typeof R=="function"&&!au(R)&&R.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=R,Cn(a,u,R,S,_)):(a=dd(h.type,null,S,u,u.mode,_),a.ref=u.ref,a.return=u,u.child=a)}if(R=a.child,!U(a,_)){var G=R.memoizedProps;if(h=h.compare,h=h!==null?h:eu,h(G,S)&&a.ref===u.ref)return I(a,u,_)}return u.flags|=1,a=ra(R,S),a.ref=u.ref,a.return=u,u.child=a}function Cn(a,u,h,S,_){if(a!==null){var R=a.memoizedProps;if(eu(R,S)&&a.ref===u.ref)if(Pr=!1,u.pendingProps=S=R,U(a,_))(a.flags&131072)!==0&&(Pr=!0);else return u.lanes=a.lanes,I(a,u,_)}return kh(a,u,h,S,_)}function Dh(a,u,h){var S=u.pendingProps,_=S.children,R=a!==null?a.memoizedState:null;if(S.mode==="hidden"){if((u.flags&128)!==0){if(S=R!==null?R.baseLanes|h:h,a!==null){for(_=u.child=a.child,R=0;_!==null;)R=R|_.lanes|_.childLanes,_=_.sibling;u.childLanes=R&~S}else u.childLanes=0,u.child=null;return Av(a,u,S,h)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},a!==null&&jo(u,R!==null?R.cachePool:null),R!==null?gl(u,R):Lc(),Dd(u);else return u.lanes=u.childLanes=536870912,Av(a,u,R!==null?R.baseLanes|h:h,h)}else R!==null?(jo(u,R.cachePool),gl(u,R),Ha(),u.memoizedState=null):(a!==null&&jo(u,null),Lc(),Ha());return ei(a,u,_,h),u.child}function Av(a,u,h,S){var _=ro();return _=_===null?null:{parent:Nr._currentValue,pool:_},u.memoizedState={baseLanes:h,cachePool:_},a!==null&&jo(u,null),Lc(),Dd(u),a!==null&&Ac(a,u,S,!0),null}function Ya(a,u){var h=u.ref;if(h===null)a!==null&&a.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(a===null||a.ref!==h)&&(u.flags|=4194816)}}function kh(a,u,h,S,_){return Ia(u),h=bd(a,u,h,S,void 0,_),S=vu(),a!==null&&!Pr?(Ed(a,u,_),I(a,u,_)):(En&&S&&su(u),u.flags|=1,ei(a,u,h,_),u.child)}function Qc(a,u,h,S,_,R){return Ia(u),u.updateQueue=null,h=yl(u,S,h,_),dh(a),S=vu(),a!==null&&!Pr?(Ed(a,u,R),I(a,u,R)):(En&&S&&su(u),u.flags|=1,ei(a,u,h,R),u.child)}function Ov(a,u,h,S,_){if(Ia(u),u.stateNode===null){var R=xs,G=h.contextType;typeof G=="object"&&G!==null&&(R=Jr(G)),R=new h(S,R),u.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Gc,u.stateNode=R,R._reactInternals=u,R=u.stateNode,R.props=S,R.state=u.memoizedState,R.refs={},uh(u),G=h.contextType,R.context=typeof G=="object"&&G!==null?Jr(G):xs,R.state=u.memoizedState,G=h.getDerivedStateFromProps,typeof G=="function"&&(wh(u,h,G,S),R.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(G=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),G!==R.state&&Gc.enqueueReplaceState(R,R.state,null),Os(u,S,R,_),Rc(),R.state=u.memoizedState),typeof R.componentDidMount=="function"&&(u.flags|=4194308),S=!0}else if(a===null){R=u.stateNode;var te=u.memoizedProps,de=wl(h,te);R.props=de;var _e=R.context,qe=h.contextType;G=xs,typeof qe=="object"&&qe!==null&&(G=Jr(qe));var He=h.getDerivedStateFromProps;qe=typeof He=="function"||typeof R.getSnapshotBeforeUpdate=="function",te=u.pendingProps!==te,qe||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(te||_e!==G)&&Cv(u,R,S,G),Va=!1;var De=u.memoizedState;R.state=De,Os(u,S,R,_),Rc(),_e=u.memoizedState,te||De!==_e||Va?(typeof He=="function"&&(wh(u,h,He,S),_e=u.memoizedState),(de=Va||wv(u,h,de,S,De,_e,G))?(qe||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(u.flags|=4194308)):(typeof R.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=S,u.memoizedState=_e),R.props=S,R.state=_e,R.context=G,S=de):(typeof R.componentDidMount=="function"&&(u.flags|=4194308),S=!1)}else{R=u.stateNode,du(a,u),G=u.memoizedProps,qe=wl(h,G),R.props=qe,He=u.pendingProps,De=R.context,_e=h.contextType,de=xs,typeof _e=="object"&&_e!==null&&(de=Jr(_e)),te=h.getDerivedStateFromProps,(_e=typeof te=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(G!==He||De!==de)&&Cv(u,R,S,de),Va=!1,De=u.memoizedState,R.state=De,Os(u,S,R,_),Rc();var Re=u.memoizedState;G!==He||De!==Re||Va||a!==null&&a.dependencies!==null&&hd(a.dependencies)?(typeof te=="function"&&(wh(u,h,te,S),Re=u.memoizedState),(qe=Va||wv(u,h,qe,S,De,Re,de)||a!==null&&a.dependencies!==null&&hd(a.dependencies))?(_e||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(S,Re,de),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(S,Re,de)),typeof R.componentDidUpdate=="function"&&(u.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof R.componentDidUpdate!="function"||G===a.memoizedProps&&De===a.memoizedState||(u.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||G===a.memoizedProps&&De===a.memoizedState||(u.flags|=1024),u.memoizedProps=S,u.memoizedState=Re),R.props=S,R.state=Re,R.context=de,S=qe):(typeof R.componentDidUpdate!="function"||G===a.memoizedProps&&De===a.memoizedState||(u.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||G===a.memoizedProps&&De===a.memoizedState||(u.flags|=1024),S=!1)}return R=S,Ya(a,u),S=(u.flags&128)!==0,R||S?(R=u.stateNode,h=S&&typeof h.getDerivedStateFromError!="function"?null:R.render(),u.flags|=1,a!==null&&S?(u.child=Cu(u,a.child,null,_),u.child=Cu(u,null,h,_)):ei(a,u,h,_),u.memoizedState=R.state,a=u.child):a=I(a,u,_),a}function mr(a,u,h,S){return _c(),u.flags|=256,ei(a,u,h,S),u.child}var Rh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mh(a){return{baseLanes:a,cachePool:Pa()}}function Dv(a,u,h){return a=a!==null?a.childLanes&~h:0,u&&(a|=Qa),a}function Rd(a,u,h){var S=u.pendingProps,_=!1,R=(u.flags&128)!==0,G;if((G=R)||(G=a!==null&&a.memoizedState===null?!1:(Or.current&2)!==0),G&&(_=!0,u.flags&=-129),G=(u.flags&32)!==0,u.flags&=-33,a===null){if(En){if(_?za(u):Ha(),En){var te=dr,de;if(de=te){e:{for(de=te,te=hi;de.nodeType!==8;){if(!te){te=null;break e}if(de=Fs(de.nextSibling),de===null){te=null;break e}}te=de}te!==null?(u.memoizedState={dehydrated:te,treeContext:Fo!==null?{id:ia,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},de=Gr(18,null,null,0),de.stateNode=te,de.return=u,u.child=de,pi=u,dr=null,de=!0):de=!1}de||hl(u)}if(te=u.memoizedState,te!==null&&(te=te.dehydrated,te!==null))return q_(te)?u.lanes=32:u.lanes=536870912,null;Ga(u)}return te=S.children,S=S.fallback,_?(Ha(),_=u.mode,te=f({mode:"hidden",children:te},_),S=dl(S,_,h,null),te.return=u,S.return=u,te.sibling=S,u.child=te,_=u.child,_.memoizedState=Mh(h),_.childLanes=Dv(a,G,h),u.memoizedState=Rh,S):(za(u),s(u,te))}if(de=a.memoizedState,de!==null&&(te=de.dehydrated,te!==null)){if(R)u.flags&256?(za(u),u.flags&=-257,u=v(a,u,h)):u.memoizedState!==null?(Ha(),u.child=a.child,u.flags|=128,u=null):(Ha(),_=S.fallback,te=u.mode,S=f({mode:"visible",children:S.children},te),_=dl(_,te,h,null),_.flags|=2,S.return=u,_.return=u,S.sibling=_,u.child=S,Cu(u,a.child,null,h),S=u.child,S.memoizedState=Mh(h),S.childLanes=Dv(a,G,h),u.memoizedState=Rh,u=_);else if(za(u),q_(te)){if(G=te.nextSibling&&te.nextSibling.dataset,G)var _e=G.dgst;G=_e,S=Error(r(419)),S.stack="",S.digest=G,Yr({value:S,source:null,stack:null}),u=v(a,u,h)}else if(Pr||Ac(a,u,h,!1),G=(h&a.childLanes)!==0,Pr||G){if(G=or,G!==null&&(S=h&-h,S=(S&42)!==0?1:un(S),S=(S&(G.suspendedLanes|h))!==0?0:S,S!==0&&S!==de.retryLane))throw de.retryLane=S,ou(a,S),pa(G,a,S),Ah;te.data==="$?"||w_(),u=v(a,u,h)}else te.data==="$?"?(u.flags|=192,u.child=a.child,u=null):(a=de.treeContext,dr=Fs(te.nextSibling),pi=u,En=!0,lu=null,hi=!1,a!==null&&(xi[eo++]=ia,xi[eo++]=wi,xi[eo++]=Fo,ia=a.id,wi=a.overflow,Fo=u),u=s(u,S.children),u.flags|=4096);return u}return _?(Ha(),_=S.fallback,te=u.mode,de=a.child,_e=de.sibling,S=ra(de,{mode:"hidden",children:S.children}),S.subtreeFlags=de.subtreeFlags&65011712,_e!==null?_=ra(_e,_):(_=dl(_,te,h,null),_.flags|=2),_.return=u,S.return=u,S.sibling=_,u.child=S,S=_,_=u.child,te=a.child.memoizedState,te===null?te=Mh(h):(de=te.cachePool,de!==null?(_e=Nr._currentValue,de=de.parent!==_e?{parent:_e,pool:_e}:de):de=Pa(),te={baseLanes:te.baseLanes|h,cachePool:de}),_.memoizedState=te,_.childLanes=Dv(a,G,h),u.memoizedState=Rh,S):(za(u),h=a.child,a=h.sibling,h=ra(h,{mode:"visible",children:S.children}),h.return=u,h.sibling=null,a!==null&&(G=u.deletions,G===null?(u.deletions=[a],u.flags|=16):G.push(a)),u.child=h,u.memoizedState=null,h)}function s(a,u){return u=f({mode:"visible",children:u},a.mode),u.return=a,a.child=u}function f(a,u){return a=Gr(22,a,null,u),a.lanes=0,a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},a}function v(a,u,h){return Cu(u,a.child,null,h),a=s(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function g(a,u,h){a.lanes|=u;var S=a.alternate;S!==null&&(S.lanes|=u),Nc(a.return,u,h)}function T(a,u,h,S,_){var R=a.memoizedState;R===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:S,tail:h,tailMode:_}:(R.isBackwards=u,R.rendering=null,R.renderingStartTime=0,R.last=S,R.tail=h,R.tailMode=_)}function O(a,u,h){var S=u.pendingProps,_=S.revealOrder,R=S.tail;if(ei(a,u,S.children,h),S=Or.current,(S&2)!==0)S=S&1|2,u.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&g(a,h,u);else if(a.tag===19)g(a,h,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}S&=1}switch(pe(Or,S),_){case"forwards":for(h=u.child,_=null;h!==null;)a=h.alternate,a!==null&&Ls(a)===null&&(_=h),h=h.sibling;h=_,h===null?(_=u.child,u.child=null):(_=h.sibling,h.sibling=null),T(u,!1,_,h,R);break;case"backwards":for(h=null,_=u.child,u.child=null;_!==null;){if(a=_.alternate,a!==null&&Ls(a)===null){u.child=_;break}a=_.sibling,_.sibling=h,h=_,_=a}T(u,!0,h,null,R);break;case"together":T(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function I(a,u,h){if(a!==null&&(u.dependencies=a.dependencies),ef|=u.lanes,(h&u.childLanes)===0)if(a!==null){if(Ac(a,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(a!==null&&u.child!==a.child)throw Error(r(153));if(u.child!==null){for(a=u.child,h=ra(a,a.pendingProps),u.child=h,h.return=u;a.sibling!==null;)a=a.sibling,h=h.sibling=ra(a,a.pendingProps),h.return=u;h.sibling=null}return u.child}function U(a,u){return(a.lanes&u)!==0?!0:(a=a.dependencies,!!(a!==null&&hd(a)))}function q(a,u,h){switch(u.tag){case 3:Ge(u,u.stateNode.containerInfo),bo(u,Nr,a.memoizedState.cache),_c();break;case 27:case 5:It(u);break;case 4:Ge(u,u.stateNode.containerInfo);break;case 10:bo(u,u.type,u.memoizedProps.value);break;case 13:var S=u.memoizedState;if(S!==null)return S.dehydrated!==null?(za(u),u.flags|=128,null):(h&u.child.childLanes)!==0?Rd(a,u,h):(za(u),a=I(a,u,h),a!==null?a.sibling:null);za(u);break;case 19:var _=(a.flags&128)!==0;if(S=(h&u.childLanes)!==0,S||(Ac(a,u,h,!1),S=(h&u.childLanes)!==0),_){if(S)return O(a,u,h);u.flags|=128}if(_=u.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),pe(Or,Or.current),S)break;return null;case 22:case 23:return u.lanes=0,Dh(a,u,h);case 24:bo(u,Nr,a.memoizedState.cache)}return I(a,u,h)}function H(a,u,h){if(a!==null)if(a.memoizedProps!==u.pendingProps)Pr=!0;else{if(!U(a,h)&&(u.flags&128)===0)return Pr=!1,q(a,u,h);Pr=(a.flags&131072)!==0}else Pr=!1,En&&(u.flags&1048576)!==0&&pl(u,pd,u.index);switch(u.lanes=0,u.tag){case 16:e:{a=u.pendingProps;var S=u.elementType,_=S._init;if(S=_(S._payload),u.type=S,typeof S=="function")au(S)?(a=wl(S,a),u.tag=1,u=Ov(null,u,S,a,h)):(u.tag=0,u=kh(null,u,S,a,h));else{if(S!=null){if(_=S.$$typeof,_===C){u.tag=11,u=kd(null,u,S,a,h);break e}else if(_===P){u.tag=14,u=Oh(null,u,S,a,h);break e}}throw u=Q(S)||S,Error(r(306,u,""))}}return u;case 0:return kh(a,u,u.type,u.pendingProps,h);case 1:return S=u.type,_=wl(S,u.pendingProps),Ov(a,u,S,_,h);case 3:e:{if(Ge(u,u.stateNode.containerInfo),a===null)throw Error(r(387));S=u.pendingProps;var R=u.memoizedState;_=R.element,du(a,u),Os(u,S,null,h);var G=u.memoizedState;if(S=G.cache,bo(u,Nr,S),S!==R.cache&&nh(u,[Nr],h,!0),Rc(),S=G.element,R.isDehydrated)if(R={element:S,isDehydrated:!1,cache:G.cache},u.updateQueue.baseState=R,u.memoizedState=R,u.flags&256){u=mr(a,u,S,h);break e}else if(S!==_){_=Ti(Error(r(424)),u),Yr(_),u=mr(a,u,S,h);break e}else{switch(a=u.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(dr=Fs(a.firstChild),pi=u,En=!0,lu=null,hi=!0,h=xh(u,null,S,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(_c(),S===_){u=I(a,u,h);break e}ei(a,u,S,h)}u=u.child}return u;case 26:return Ya(a,u),a===null?(h=jj(u.type,null,u.pendingProps,null))?u.memoizedState=h:En||(h=u.type,a=u.pendingProps,S=q1(Se.current).createElement(h),S[Gt]=u,S[bn]=a,$i(S,h,a),Rn(S),u.stateNode=S):u.memoizedState=jj(u.type,a.memoizedProps,u.pendingProps,a.memoizedState),null;case 27:return It(u),a===null&&En&&(S=u.stateNode=Ij(u.type,u.pendingProps,Se.current),pi=u,hi=!0,_=dr,of(u.type)?(B_=_,dr=Fs(S.firstChild)):dr=_),ei(a,u,u.pendingProps.children,h),Ya(a,u),a===null&&(u.flags|=4194304),u.child;case 5:return a===null&&En&&((_=S=dr)&&(S=Fie(S,u.type,u.pendingProps,hi),S!==null?(u.stateNode=S,pi=u,dr=Fs(S.firstChild),hi=!1,_=!0):_=!1),_||hl(u)),It(u),_=u.type,R=u.pendingProps,G=a!==null?a.memoizedProps:null,S=R.children,j_(_,R)?S=null:G!==null&&j_(_,G)&&(u.flags|=32),u.memoizedState!==null&&(_=bd(a,u,av,null,null,h),$v._currentValue=_),Ya(a,u),ei(a,u,S,h),u.child;case 6:return a===null&&En&&((a=h=dr)&&(h=Pie(h,u.pendingProps,hi),h!==null?(u.stateNode=h,pi=u,dr=null,a=!0):a=!1),a||hl(u)),null;case 13:return Rd(a,u,h);case 4:return Ge(u,u.stateNode.containerInfo),S=u.pendingProps,a===null?u.child=Cu(u,null,S,h):ei(a,u,S,h),u.child;case 11:return kd(a,u,u.type,u.pendingProps,h);case 7:return ei(a,u,u.pendingProps,h),u.child;case 8:return ei(a,u,u.pendingProps.children,h),u.child;case 12:return ei(a,u,u.pendingProps.children,h),u.child;case 10:return S=u.pendingProps,bo(u,u.type,S.value),ei(a,u,S.children,h),u.child;case 9:return _=u.type._context,S=u.pendingProps.children,Ia(u),_=Jr(_),S=S(_),u.flags|=1,ei(a,u,S,h),u.child;case 14:return Oh(a,u,u.type,u.pendingProps,h);case 15:return Cn(a,u,u.type,u.pendingProps,h);case 19:return O(a,u,h);case 31:return S=u.pendingProps,h=u.mode,S={mode:S.mode,children:S.children},a===null?(h=f(S,h),h.ref=u.ref,u.child=h,h.return=u,u=h):(h=ra(a.child,S),h.ref=u.ref,u.child=h,h.return=u,u=h),u;case 22:return Dh(a,u,h);case 24:return Ia(u),S=Jr(Nr),a===null?(_=ro(),_===null&&(_=or,R=Oc(),_.pooledCache=R,R.refCount++,R!==null&&(_.pooledCacheLanes|=h),_=R),u.memoizedState={parent:S,cache:_},uh(u),bo(u,Nr,_)):((a.lanes&h)!==0&&(du(a,u),Os(u,null,null,h),Rc()),_=a.memoizedState,R=u.memoizedState,_.parent!==S?(_={parent:S,cache:S},u.memoizedState=_,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=_),bo(u,Nr,S)):(S=R.cache,bo(u,Nr,S),S!==_.cache&&nh(u,[Nr],h,!0))),ei(a,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function ie(a){a.flags|=4}function le(a,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!$j(u)){if(u=Eo.current,u!==null&&((wn&4194048)===wn?la!==null:(wn&62914560)!==wn&&(wn&536870912)===0||u!==la))throw ml=ah,md;a.flags|=8192}}function ye(a,u){u!==null&&(a.flags|=4),a.flags&16384&&(u=a.tag!==22?on():536870912,a.lanes|=u,Ph|=u)}function me(a,u){if(!En)switch(a.tailMode){case"hidden":u=a.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a.tail=null:h.sibling=null;break;case"collapsed":h=a.tail;for(var S=null;h!==null;)h.alternate!==null&&(S=h),h=h.sibling;S===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:S.sibling=null}}function we(a){var u=a.alternate!==null&&a.alternate.child===a.child,h=0,S=0;if(u)for(var _=a.child;_!==null;)h|=_.lanes|_.childLanes,S|=_.subtreeFlags&65011712,S|=_.flags&65011712,_.return=a,_=_.sibling;else for(_=a.child;_!==null;)h|=_.lanes|_.childLanes,S|=_.subtreeFlags,S|=_.flags,_.return=a,_=_.sibling;return a.subtreeFlags|=S,a.childLanes=h,u}function Ve(a,u,h){var S=u.pendingProps;switch(_s(u),u.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(u),null;case 1:return we(u),null;case 3:return h=u.stateNode,S=null,a!==null&&(S=a.memoizedState.cache),u.memoizedState.cache!==S&&(u.flags|=2048),La(Nr),Ze(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(a===null||a.child===null)&&(Cc(u)?ie(u):a===null||a.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Jg())),we(u),null;case 26:return h=u.memoizedState,a===null?(ie(u),h!==null?(we(u),le(u,h)):(we(u),u.flags&=-16777217)):h?h!==a.memoizedState?(ie(u),we(u),le(u,h)):(we(u),u.flags&=-16777217):(a.memoizedProps!==S&&ie(u),we(u),u.flags&=-16777217),null;case 27:vt(u),h=Se.current;var _=u.type;if(a!==null&&u.stateNode!=null)a.memoizedProps!==S&&ie(u);else{if(!S){if(u.stateNode===null)throw Error(r(166));return we(u),null}a=ce.current,Cc(u)?Xg(u):(a=Ij(_,S,h),u.stateNode=a,ie(u))}return we(u),null;case 5:if(vt(u),h=u.type,a!==null&&u.stateNode!=null)a.memoizedProps!==S&&ie(u);else{if(!S){if(u.stateNode===null)throw Error(r(166));return we(u),null}if(a=ce.current,Cc(u))Xg(u);else{switch(_=q1(Se.current),a){case 1:a=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:a=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":a=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":a=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":a=_.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof S.is=="string"?_.createElement("select",{is:S.is}):_.createElement("select"),S.multiple?a.multiple=!0:S.size&&(a.size=S.size);break;default:a=typeof S.is=="string"?_.createElement(h,{is:S.is}):_.createElement(h)}}a[Gt]=u,a[bn]=S;e:for(_=u.child;_!==null;){if(_.tag===5||_.tag===6)a.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===u)break e;for(;_.sibling===null;){if(_.return===null||_.return===u)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}u.stateNode=a;e:switch($i(a,h,S),h){case"button":case"input":case"select":case"textarea":a=!!S.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ie(u)}}return we(u),u.flags&=-16777217,null;case 6:if(a&&u.stateNode!=null)a.memoizedProps!==S&&ie(u);else{if(typeof S!="string"&&u.stateNode===null)throw Error(r(166));if(a=Se.current,Cc(u)){if(a=u.stateNode,h=u.memoizedProps,S=null,_=pi,_!==null)switch(_.tag){case 27:case 5:S=_.memoizedProps}a[Gt]=u,a=!!(a.nodeValue===h||S!==null&&S.suppressHydrationWarning===!0||Aj(a.nodeValue,h)),a||hl(u)}else a=q1(a).createTextNode(S),a[Gt]=u,u.stateNode=a}return we(u),null;case 13:if(S=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(_=Cc(u),S!==null&&S.dehydrated!==null){if(a===null){if(!_)throw Error(r(318));if(_=u.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[Gt]=u}else _c(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;we(u),_=!1}else _=Jg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=_),_=!0;if(!_)return u.flags&256?(Ga(u),u):(Ga(u),null)}if(Ga(u),(u.flags&128)!==0)return u.lanes=h,u;if(h=S!==null,a=a!==null&&a.memoizedState!==null,h){S=u.child,_=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(_=S.alternate.memoizedState.cachePool.pool);var R=null;S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(R=S.memoizedState.cachePool.pool),R!==_&&(S.flags|=2048)}return h!==a&&h&&(u.child.flags|=8192),ye(u,u.updateQueue),we(u),null;case 4:return Ze(),a===null&&M_(u.stateNode.containerInfo),we(u),null;case 10:return La(u.type),we(u),null;case 19:if(ae(Or),_=u.memoizedState,_===null)return we(u),null;if(S=(u.flags&128)!==0,R=_.rendering,R===null)if(S)me(_,!1);else{if(jr!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if(R=Ls(a),R!==null){for(u.flags|=128,me(_,!1),a=R.updateQueue,u.updateQueue=a,ye(u,a),u.subtreeFlags=0,a=h,h=u.child;h!==null;)xc(h,a),h=h.sibling;return pe(Or,Or.current&1|2),u.child}a=a.sibling}_.tail!==null&&oe()>k1&&(u.flags|=128,S=!0,me(_,!1),u.lanes=4194304)}else{if(!S)if(a=Ls(R),a!==null){if(u.flags|=128,S=!0,a=a.updateQueue,u.updateQueue=a,ye(u,a),me(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!En)return we(u),null}else 2*oe()-_.renderingStartTime>k1&&h!==536870912&&(u.flags|=128,S=!0,me(_,!1),u.lanes=4194304);_.isBackwards?(R.sibling=u.child,u.child=R):(a=_.last,a!==null?a.sibling=R:u.child=R,_.last=R)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=oe(),u.sibling=null,a=Or.current,pe(Or,S?a&1|2:a&1),u):(we(u),null);case 22:case 23:return Ga(u),hu(),S=u.memoizedState!==null,a!==null?a.memoizedState!==null!==S&&(u.flags|=8192):S&&(u.flags|=8192),S?(h&536870912)!==0&&(u.flags&128)===0&&(we(u),u.subtreeFlags&6&&(u.flags|=8192)):we(u),h=u.updateQueue,h!==null&&ye(u,h.retryQueue),h=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),S=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(S=u.memoizedState.cachePool.pool),S!==h&&(u.flags|=2048),a!==null&&ae(tn),null;case 24:return h=null,a!==null&&(h=a.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),La(Nr),we(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function Ke(a,u){switch(_s(u),u.tag){case 1:return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return La(Nr),Ze(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 26:case 27:case 5:return vt(u),null;case 13:if(Ga(u),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(r(340));_c()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return ae(Or),null;case 4:return Ze(),null;case 10:return La(u.type),null;case 22:case 23:return Ga(u),hu(),a!==null&&ae(tn),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 24:return La(Nr),null;case 25:return null;default:return null}}function rt(a,u){switch(_s(u),u.tag){case 3:La(Nr),Ze();break;case 26:case 27:case 5:vt(u);break;case 4:Ze();break;case 13:Ga(u);break;case 19:ae(Or);break;case 10:La(u.type);break;case 22:case 23:Ga(u),hu(),a!==null&&ae(tn);break;case 24:La(Nr)}}function it(a,u){try{var h=u.updateQueue,S=h!==null?h.lastEffect:null;if(S!==null){var _=S.next;h=_;do{if((h.tag&a)===a){S=void 0;var R=h.create,G=h.inst;S=R(),G.destroy=S}h=h.next}while(h!==_)}}catch(te){Kn(u,u.return,te)}}function Je(a,u,h){try{var S=u.updateQueue,_=S!==null?S.lastEffect:null;if(_!==null){var R=_.next;S=R;do{if((S.tag&a)===a){var G=S.inst,te=G.destroy;if(te!==void 0){G.destroy=void 0,_=u;var de=h,_e=te;try{_e()}catch(qe){Kn(_,de,qe)}}}S=S.next}while(S!==R)}}catch(qe){Kn(u,u.return,qe)}}function ut(a){var u=a.updateQueue;if(u!==null){var h=a.stateNode;try{ov(u,h)}catch(S){Kn(a,a.return,S)}}}function Ct(a,u,h){h.props=wl(a.type,a.memoizedProps),h.state=a.memoizedState;try{h.componentWillUnmount()}catch(S){Kn(a,u,S)}}function yt(a,u){try{var h=a.ref;if(h!==null){switch(a.tag){case 26:case 27:case 5:var S=a.stateNode;break;case 30:S=a.stateNode;break;default:S=a.stateNode}typeof h=="function"?a.refCleanup=h(S):h.current=S}}catch(_){Kn(a,u,_)}}function Dt(a,u){var h=a.ref,S=a.refCleanup;if(h!==null)if(typeof S=="function")try{S()}catch(_){Kn(a,u,_)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(_){Kn(a,u,_)}else h.current=null}function Ln(a){var u=a.type,h=a.memoizedProps,S=a.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&S.focus();break e;case"img":h.src?S.src=h.src:h.srcSet&&(S.srcset=h.srcSet)}}catch(_){Kn(a,a.return,_)}}function Dr(a,u,h){try{var S=a.stateNode;kie(S,a.type,h,u),S[bn]=u}catch(_){Kn(a,a.return,_)}}function zn(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&of(a.type)||a.tag===4}function mi(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||zn(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&of(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function gi(a,u,h){var S=a.tag;if(S===5||S===6)a=a.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(a,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(a),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=U1));else if(S!==4&&(S===27&&of(a.type)&&(h=a.stateNode,u=null),a=a.child,a!==null))for(gi(a,u,h),a=a.sibling;a!==null;)gi(a,u,h),a=a.sibling}function rr(a,u,h){var S=a.tag;if(S===5||S===6)a=a.stateNode,u?h.insertBefore(a,u):h.appendChild(a);else if(S!==4&&(S===27&&of(a.type)&&(h=a.stateNode),a=a.child,a!==null))for(rr(a,u,h),a=a.sibling;a!==null;)rr(a,u,h),a=a.sibling}function _i(a){var u=a.stateNode,h=a.memoizedProps;try{for(var S=a.type,_=u.attributes;_.length;)u.removeAttributeNode(_[0]);$i(u,S,h),u[Gt]=a,u[bn]=h}catch(R){Kn(a,a.return,R)}}var Hn=!1,Qt=!1,gr=!1,ir=typeof WeakSet=="function"?WeakSet:Set,Tn=null;function Kc(a,u){if(a=a.containerInfo,F_=Y1,a=Qp(a),tu(a)){if("selectionStart"in a)var h={start:a.selectionStart,end:a.selectionEnd};else e:{h=(h=a.ownerDocument)&&h.defaultView||window;var S=h.getSelection&&h.getSelection();if(S&&S.rangeCount!==0){h=S.anchorNode;var _=S.anchorOffset,R=S.focusNode;S=S.focusOffset;try{h.nodeType,R.nodeType}catch{h=null;break e}var G=0,te=-1,de=-1,_e=0,qe=0,He=a,De=null;t:for(;;){for(var Re;He!==h||_!==0&&He.nodeType!==3||(te=G+_),He!==R||S!==0&&He.nodeType!==3||(de=G+S),He.nodeType===3&&(G+=He.nodeValue.length),(Re=He.firstChild)!==null;)De=He,He=Re;for(;;){if(He===a)break t;if(De===h&&++_e===_&&(te=G),De===R&&++qe===S&&(de=G),(Re=He.nextSibling)!==null)break;He=De,De=He.parentNode}He=Re}h=te===-1||de===-1?null:{start:te,end:de}}else h=null}h=h||{start:0,end:0}}else h=null;for(P_={focusedElem:a,selectionRange:h},Y1=!1,Tn=u;Tn!==null;)if(u=Tn,a=u.child,(u.subtreeFlags&1024)!==0&&a!==null)a.return=u,Tn=a;else for(;Tn!==null;){switch(u=Tn,R=u.alternate,a=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((a&1024)!==0&&R!==null){a=void 0,h=u,_=R.memoizedProps,R=R.memoizedState,S=h.stateNode;try{var Ut=wl(h.type,_,h.elementType===h.type);a=S.getSnapshotBeforeUpdate(Ut,R),S.__reactInternalSnapshotBeforeUpdate=a}catch(kt){Kn(h,h.return,kt)}}break;case 3:if((a&1024)!==0){if(a=u.stateNode.containerInfo,h=a.nodeType,h===9)U_(a);else if(h===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":U_(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=u.sibling,a!==null){a.return=u.return,Tn=a;break}Tn=u.return}}function Is(a,u,h){var S=h.flags;switch(h.tag){case 0:case 11:case 15:Xc(a,h),S&4&&it(5,h);break;case 1:if(Xc(a,h),S&4)if(a=h.stateNode,u===null)try{a.componentDidMount()}catch(G){Kn(h,h.return,G)}else{var _=wl(h.type,u.memoizedProps);u=u.memoizedState;try{a.componentDidUpdate(_,u,a.__reactInternalSnapshotBeforeUpdate)}catch(G){Kn(h,h.return,G)}}S&64&&ut(h),S&512&&yt(h,h.return);break;case 3:if(Xc(a,h),S&64&&(a=h.updateQueue,a!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{ov(a,u)}catch(G){Kn(h,h.return,G)}}break;case 27:u===null&&S&4&&_i(h);case 26:case 5:Xc(a,h),u===null&&S&4&&Ln(h),S&512&&yt(h,h.return);break;case 12:Xc(a,h);break;case 13:Xc(a,h),S&4&&Cl(a,h),S&64&&(a=h.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(h=Eie.bind(null,h),jie(a,h))));break;case 22:if(S=h.memoizedState!==null||Hn,!S){u=u!==null&&u.memoizedState!==null||Qt,_=Hn;var R=Qt;Hn=S,(Qt=u)&&!R?Zc(a,h,(h.subtreeFlags&8772)!==0):Xc(a,h),Hn=_,Qt=R}break;case 30:break;default:Xc(a,h)}}function ti(a){var u=a.alternate;u!==null&&(a.alternate=null,ti(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&Lr(u)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Sn=null,xn=!1;function ua(a,u,h){for(h=h.child;h!==null;)Wa(a,u,h),h=h.sibling}function Wa(a,u,h){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(Ot,h)}catch{}switch(h.tag){case 26:Qt||Dt(h,u),ua(a,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Qt||Dt(h,u);var S=Sn,_=xn;of(h.type)&&(Sn=h.stateNode,xn=!1),ua(a,u,h),Vv(h.stateNode),Sn=S,xn=_;break;case 5:Qt||Dt(h,u);case 6:if(S=Sn,_=xn,Sn=null,ua(a,u,h),Sn=S,xn=_,Sn!==null)if(xn)try{(Sn.nodeType===9?Sn.body:Sn.nodeName==="HTML"?Sn.ownerDocument.body:Sn).removeChild(h.stateNode)}catch(R){Kn(h,u,R)}else try{Sn.removeChild(h.stateNode)}catch(R){Kn(h,u,R)}break;case 18:Sn!==null&&(xn?(a=Sn,Mj(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,h.stateNode),Yv(a)):Mj(Sn,h.stateNode));break;case 4:S=Sn,_=xn,Sn=h.stateNode.containerInfo,xn=!0,ua(a,u,h),Sn=S,xn=_;break;case 0:case 11:case 14:case 15:Qt||Je(2,h,u),Qt||Je(4,h,u),ua(a,u,h);break;case 1:Qt||(Dt(h,u),S=h.stateNode,typeof S.componentWillUnmount=="function"&&Ct(h,u,S)),ua(a,u,h);break;case 21:ua(a,u,h);break;case 22:Qt=(S=Qt)||h.memoizedState!==null,ua(a,u,h),Qt=S;break;default:ua(a,u,h)}}function Cl(a,u){if(u.memoizedState===null&&(a=u.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Yv(a)}catch(h){Kn(u,u.return,h)}}function Nu(a){switch(a.tag){case 13:case 19:var u=a.stateNode;return u===null&&(u=a.stateNode=new ir),u;case 22:return a=a.stateNode,u=a._retryCache,u===null&&(u=a._retryCache=new ir),u;default:throw Error(r(435,a.tag))}}function ni(a,u){var h=Nu(a);u.forEach(function(S){var _=Sie.bind(null,a,S);h.has(S)||(h.add(S),S.then(_,_))})}function ri(a,u){var h=u.deletions;if(h!==null)for(var S=0;S<h.length;S++){var _=h[S],R=a,G=u,te=G;e:for(;te!==null;){switch(te.tag){case 27:if(of(te.type)){Sn=te.stateNode,xn=!1;break e}break;case 5:Sn=te.stateNode,xn=!1;break e;case 3:case 4:Sn=te.stateNode.containerInfo,xn=!0;break e}te=te.return}if(Sn===null)throw Error(r(160));Wa(R,G,_),Sn=null,xn=!1,R=_.alternate,R!==null&&(R.return=null),_.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Y4(u,a),u=u.sibling}var So=null;function Y4(a,u){var h=a.alternate,S=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ri(u,a),ca(a),S&4&&(Je(3,a,a.return),it(3,a),Je(5,a,a.return));break;case 1:ri(u,a),ca(a),S&512&&(Qt||h===null||Dt(h,h.return)),S&64&&Hn&&(a=a.updateQueue,a!==null&&(S=a.callbacks,S!==null&&(h=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=h===null?S:h.concat(S))));break;case 26:var _=So;if(ri(u,a),ca(a),S&512&&(Qt||h===null||Dt(h,h.return)),S&4){var R=h!==null?h.memoizedState:null;if(S=a.memoizedState,h===null)if(S===null)if(a.stateNode===null){e:{S=a.type,h=a.memoizedProps,_=_.ownerDocument||_;t:switch(S){case"title":R=_.getElementsByTagName("title")[0],(!R||R[Bn]||R[Gt]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=_.createElement(S),_.head.insertBefore(R,_.querySelector("head > title"))),$i(R,S,h),R[Gt]=a,Rn(R),S=R;break e;case"link":var G=qj("link","href",_).get(S+(h.href||""));if(G){for(var te=0;te<G.length;te++)if(R=G[te],R.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&R.getAttribute("rel")===(h.rel==null?null:h.rel)&&R.getAttribute("title")===(h.title==null?null:h.title)&&R.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){G.splice(te,1);break t}}R=_.createElement(S),$i(R,S,h),_.head.appendChild(R);break;case"meta":if(G=qj("meta","content",_).get(S+(h.content||""))){for(te=0;te<G.length;te++)if(R=G[te],R.getAttribute("content")===(h.content==null?null:""+h.content)&&R.getAttribute("name")===(h.name==null?null:h.name)&&R.getAttribute("property")===(h.property==null?null:h.property)&&R.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&R.getAttribute("charset")===(h.charSet==null?null:h.charSet)){G.splice(te,1);break t}}R=_.createElement(S),$i(R,S,h),_.head.appendChild(R);break;default:throw Error(r(468,S))}R[Gt]=a,Rn(R),S=R}a.stateNode=S}else Bj(_,a.type,a.stateNode);else a.stateNode=Uj(_,S,a.memoizedProps);else R!==S?(R===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):R.count--,S===null?Bj(_,a.type,a.stateNode):Uj(_,S,a.memoizedProps)):S===null&&a.stateNode!==null&&Dr(a,a.memoizedProps,h.memoizedProps)}break;case 27:ri(u,a),ca(a),S&512&&(Qt||h===null||Dt(h,h.return)),h!==null&&S&4&&Dr(a,a.memoizedProps,h.memoizedProps);break;case 5:if(ri(u,a),ca(a),S&512&&(Qt||h===null||Dt(h,h.return)),a.flags&32){_=a.stateNode;try{tl(_,"")}catch(Re){Kn(a,a.return,Re)}}S&4&&a.stateNode!=null&&(_=a.memoizedProps,Dr(a,_,h!==null?h.memoizedProps:_)),S&1024&&(gr=!0);break;case 6:if(ri(u,a),ca(a),S&4){if(a.stateNode===null)throw Error(r(162));S=a.memoizedProps,h=a.stateNode;try{h.nodeValue=S}catch(Re){Kn(a,a.return,Re)}}break;case 3:if(z1=null,_=So,So=B1(u.containerInfo),ri(u,a),So=_,ca(a),S&4&&h!==null&&h.memoizedState.isDehydrated)try{Yv(u.containerInfo)}catch(Re){Kn(a,a.return,Re)}gr&&(gr=!1,W4(a));break;case 4:S=So,So=B1(a.stateNode.containerInfo),ri(u,a),ca(a),So=S;break;case 12:ri(u,a),ca(a);break;case 13:ri(u,a),ca(a),a.child.flags&8192&&a.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(b_=oe()),S&4&&(S=a.updateQueue,S!==null&&(a.updateQueue=null,ni(a,S)));break;case 22:_=a.memoizedState!==null;var de=h!==null&&h.memoizedState!==null,_e=Hn,qe=Qt;if(Hn=_e||_,Qt=qe||de,ri(u,a),Qt=qe,Hn=_e,ca(a),S&8192)e:for(u=a.stateNode,u._visibility=_?u._visibility&-2:u._visibility|1,_&&(h===null||de||Hn||Qt||Md(a)),h=null,u=a;;){if(u.tag===5||u.tag===26){if(h===null){de=h=u;try{if(R=de.stateNode,_)G=R.style,typeof G.setProperty=="function"?G.setProperty("display","none","important"):G.display="none";else{te=de.stateNode;var He=de.memoizedProps.style,De=He!=null&&He.hasOwnProperty("display")?He.display:null;te.style.display=De==null||typeof De=="boolean"?"":(""+De).trim()}}catch(Re){Kn(de,de.return,Re)}}}else if(u.tag===6){if(h===null){de=u;try{de.stateNode.nodeValue=_?"":de.memoizedProps}catch(Re){Kn(de,de.return,Re)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===a)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break e;for(;u.sibling===null;){if(u.return===null||u.return===a)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}S&4&&(S=a.updateQueue,S!==null&&(h=S.retryQueue,h!==null&&(S.retryQueue=null,ni(a,h))));break;case 19:ri(u,a),ca(a),S&4&&(S=a.updateQueue,S!==null&&(a.updateQueue=null,ni(a,S)));break;case 30:break;case 21:break;default:ri(u,a),ca(a)}}function ca(a){var u=a.flags;if(u&2){try{for(var h,S=a.return;S!==null;){if(zn(S)){h=S;break}S=S.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var _=h.stateNode,R=mi(a);rr(a,R,_);break;case 5:var G=h.stateNode;h.flags&32&&(tl(G,""),h.flags&=-33);var te=mi(a);rr(a,te,G);break;case 3:case 4:var de=h.stateNode.containerInfo,_e=mi(a);gi(a,_e,de);break;default:throw Error(r(161))}}catch(qe){Kn(a,a.return,qe)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function W4(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var u=a;W4(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),a=a.sibling}}function Xc(a,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Is(a,u.alternate,u),u=u.sibling}function Md(a){for(a=a.child;a!==null;){var u=a;switch(u.tag){case 0:case 11:case 14:case 15:Je(4,u,u.return),Md(u);break;case 1:Dt(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Ct(u,u.return,h),Md(u);break;case 27:Vv(u.stateNode);case 26:case 5:Dt(u,u.return),Md(u);break;case 22:u.memoizedState===null&&Md(u);break;case 30:Md(u);break;default:Md(u)}a=a.sibling}}function Zc(a,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var S=u.alternate,_=a,R=u,G=R.flags;switch(R.tag){case 0:case 11:case 15:Zc(_,R,h),it(4,R);break;case 1:if(Zc(_,R,h),S=R,_=S.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(_e){Kn(S,S.return,_e)}if(S=R,_=S.updateQueue,_!==null){var te=S.stateNode;try{var de=_.shared.hiddenCallbacks;if(de!==null)for(_.shared.hiddenCallbacks=null,_=0;_<de.length;_++)fh(de[_],te)}catch(_e){Kn(S,S.return,_e)}}h&&G&64&&ut(R),yt(R,R.return);break;case 27:_i(R);case 26:case 5:Zc(_,R,h),h&&S===null&&G&4&&Ln(R),yt(R,R.return);break;case 12:Zc(_,R,h);break;case 13:Zc(_,R,h),h&&G&4&&Cl(_,R);break;case 22:R.memoizedState===null&&Zc(_,R,h),yt(R,R.return);break;case 30:break;default:Zc(_,R,h)}u=u.sibling}}function h_(a,u){var h=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),a=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(a=u.memoizedState.cachePool.pool),a!==h&&(a!=null&&a.refCount++,h!=null&&cu(h))}function m_(a,u){a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&cu(a))}function _l(a,u,h,S){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Q4(a,u,h,S),u=u.sibling}function Q4(a,u,h,S){var _=u.flags;switch(u.tag){case 0:case 11:case 15:_l(a,u,h,S),_&2048&&it(9,u);break;case 1:_l(a,u,h,S);break;case 3:_l(a,u,h,S),_&2048&&(a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&cu(a)));break;case 12:if(_&2048){_l(a,u,h,S),a=u.stateNode;try{var R=u.memoizedProps,G=R.id,te=R.onPostCommit;typeof te=="function"&&te(G,u.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(de){Kn(u,u.return,de)}}else _l(a,u,h,S);break;case 13:_l(a,u,h,S);break;case 23:break;case 22:R=u.stateNode,G=u.alternate,u.memoizedState!==null?R._visibility&2?_l(a,u,h,S):kv(a,u):R._visibility&2?_l(a,u,h,S):(R._visibility|=2,Lh(a,u,h,S,(u.subtreeFlags&10256)!==0)),_&2048&&h_(G,u);break;case 24:_l(a,u,h,S),_&2048&&m_(u.alternate,u);break;default:_l(a,u,h,S)}}function Lh(a,u,h,S,_){for(_=_&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var R=a,G=u,te=h,de=S,_e=G.flags;switch(G.tag){case 0:case 11:case 15:Lh(R,G,te,de,_),it(8,G);break;case 23:break;case 22:var qe=G.stateNode;G.memoizedState!==null?qe._visibility&2?Lh(R,G,te,de,_):kv(R,G):(qe._visibility|=2,Lh(R,G,te,de,_)),_&&_e&2048&&h_(G.alternate,G);break;case 24:Lh(R,G,te,de,_),_&&_e&2048&&m_(G.alternate,G);break;default:Lh(R,G,te,de,_)}u=u.sibling}}function kv(a,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=a,S=u,_=S.flags;switch(S.tag){case 22:kv(h,S),_&2048&&h_(S.alternate,S);break;case 24:kv(h,S),_&2048&&m_(S.alternate,S);break;default:kv(h,S)}u=u.sibling}}var Rv=8192;function Ih(a){if(a.subtreeFlags&Rv)for(a=a.child;a!==null;)K4(a),a=a.sibling}function K4(a){switch(a.tag){case 26:Ih(a),a.flags&Rv&&a.memoizedState!==null&&Xie(So,a.memoizedState,a.memoizedProps);break;case 5:Ih(a);break;case 3:case 4:var u=So;So=B1(a.stateNode.containerInfo),Ih(a),So=u;break;case 22:a.memoizedState===null&&(u=a.alternate,u!==null&&u.memoizedState!==null?(u=Rv,Rv=16777216,Ih(a),Rv=u):Ih(a));break;default:Ih(a)}}function X4(a){var u=a.alternate;if(u!==null&&(a=u.child,a!==null)){u.child=null;do u=a.sibling,a.sibling=null,a=u;while(a!==null)}}function Mv(a){var u=a.deletions;if((a.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var S=u[h];Tn=S,J4(S,a)}X4(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Z4(a),a=a.sibling}function Z4(a){switch(a.tag){case 0:case 11:case 15:Mv(a),a.flags&2048&&Je(9,a,a.return);break;case 3:Mv(a);break;case 12:Mv(a);break;case 22:var u=a.stateNode;a.memoizedState!==null&&u._visibility&2&&(a.return===null||a.return.tag!==13)?(u._visibility&=-3,D1(a)):Mv(a);break;default:Mv(a)}}function D1(a){var u=a.deletions;if((a.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var S=u[h];Tn=S,J4(S,a)}X4(a)}for(a=a.child;a!==null;){switch(u=a,u.tag){case 0:case 11:case 15:Je(8,u,u.return),D1(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,D1(u));break;default:D1(u)}a=a.sibling}}function J4(a,u){for(;Tn!==null;){var h=Tn;switch(h.tag){case 0:case 11:case 15:Je(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var S=h.memoizedState.cachePool.pool;S!=null&&S.refCount++}break;case 24:cu(h.memoizedState.cache)}if(S=h.child,S!==null)S.return=h,Tn=S;else e:for(h=a;Tn!==null;){S=Tn;var _=S.sibling,R=S.return;if(ti(S),S===h){Tn=null;break e}if(_!==null){_.return=R,Tn=_;break e}Tn=R}}}var pie={getCacheForType:function(a){var u=Jr(Nr),h=u.data.get(a);return h===void 0&&(h=a(),u.data.set(a,h)),h}},hie=typeof WeakMap=="function"?WeakMap:Map,jn=0,or=null,fn=null,wn=0,Vn=0,fa=null,Jc=!1,Fh=!1,g_=!1,Au=0,jr=0,ef=0,Ld=0,v_=0,Qa=0,Ph=0,Lv=null,Vo=null,y_=!1,b_=0,k1=1/0,R1=null,tf=null,Bi=0,nf=null,jh=null,Vh=0,E_=0,S_=null,ej=null,Iv=0,T_=null;function da(){if((jn&2)!==0&&wn!==0)return wn&-wn;if(ne.T!==null){var a=Ns;return a!==0?a:O_()}return tr()}function tj(){Qa===0&&(Qa=(wn&536870912)===0||En?di():536870912);var a=Eo.current;return a!==null&&(a.flags|=32),Qa}function pa(a,u,h){(a===or&&(Vn===2||Vn===9)||a.cancelPendingCommit!==null)&&(Uh(a,0),rf(a,wn,Qa,!1)),An(a,h),((jn&2)===0||a!==or)&&(a===or&&((jn&2)===0&&(Ld|=h),jr===4&&rf(a,wn,Qa,!1)),Nl(a))}function nj(a,u,h){if((jn&6)!==0)throw Error(r(327));var S=!h&&(u&124)===0&&(u&a.expiredLanes)===0||mt(a,u),_=S?vie(a,u):C_(a,u,!0),R=S;do{if(_===0){Fh&&!S&&rf(a,u,0,!1);break}else{if(h=a.current.alternate,R&&!mie(h)){_=C_(a,u,!1),R=!1;continue}if(_===2){if(R=u,a.errorRecoveryDisabledLanes&R)var G=0;else G=a.pendingLanes&-536870913,G=G!==0?G:G&536870912?536870912:0;if(G!==0){u=G;e:{var te=a;_=Lv;var de=te.current.memoizedState.isDehydrated;if(de&&(Uh(te,G).flags|=256),G=C_(te,G,!1),G!==2){if(g_&&!de){te.errorRecoveryDisabledLanes|=R,Ld|=R,_=4;break e}R=Vo,Vo=_,R!==null&&(Vo===null?Vo=R:Vo.push.apply(Vo,R))}_=G}if(R=!1,_!==2)continue}}if(_===1){Uh(a,0),rf(a,u,0,!0);break}e:{switch(S=a,R=_,R){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:rf(S,u,Qa,!Jc);break e;case 2:Vo=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(_=b_+300-oe(),10<_)){if(rf(S,u,Qa,!Jc),vn(S,0,!0)!==0)break e;S.timeoutHandle=kj(rj.bind(null,S,h,Vo,R1,y_,u,Qa,Ld,Ph,Jc,R,2,-0,0),_);break e}rj(S,h,Vo,R1,y_,u,Qa,Ld,Ph,Jc,R,0,-0,0)}}break}while(!0);Nl(a)}function rj(a,u,h,S,_,R,G,te,de,_e,qe,He,De,Re){if(a.timeoutHandle=-1,He=u.subtreeFlags,(He&8192||(He&16785408)===16785408)&&(Bv={stylesheets:null,count:0,unsuspend:Kie},K4(u),He=Zie(),He!==null)){a.cancelPendingCommit=He(cj.bind(null,a,u,R,h,S,_,G,te,de,qe,1,De,Re)),rf(a,R,G,!_e);return}cj(a,u,R,h,S,_,G,te,de)}function mie(a){for(var u=a;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var S=0;S<h.length;S++){var _=h[S],R=_.getSnapshot;_=_.value;try{if(!Xr(R(),_))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function rf(a,u,h,S){u&=~v_,u&=~Ld,a.suspendedLanes|=u,a.pingedLanes&=~u,S&&(a.warmLanes|=u),S=a.expirationTimes;for(var _=u;0<_;){var R=31-Et(_),G=1<<R;S[R]=-1,_&=~G}h!==0&&wt(a,h,u)}function M1(){return(jn&6)===0?(Fv(0),!1):!0}function x_(){if(fn!==null){if(Vn===0)var a=fn.return;else a=fn,Pn=pr=null,bl(a),$a=null,Ms=0,a=fn;for(;a!==null;)rt(a.alternate,a),a=a.return;fn=null}}function Uh(a,u){var h=a.timeoutHandle;h!==-1&&(a.timeoutHandle=-1,Mie(h)),h=a.cancelPendingCommit,h!==null&&(a.cancelPendingCommit=null,h()),x_(),or=a,fn=h=ra(a.current,null),wn=u,Vn=0,fa=null,Jc=!1,Fh=mt(a,u),g_=!1,Ph=Qa=v_=Ld=ef=jr=0,Vo=Lv=null,y_=!1,(u&8)!==0&&(u|=u&32);var S=a.entangledLanes;if(S!==0)for(a=a.entanglements,S&=u;0<S;){var _=31-Et(S),R=1<<_;u|=a[_],S&=~R}return Au=u,Sc(),h}function ij(a,u){Ht=null,ne.H=Hc,u===fu||u===Dc?(u=ja(),Vn=3):u===md?(u=ja(),Vn=4):Vn=u===Ah?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,fa=u,fn===null&&(jr=1,oo(a,Ti(u,a.current)))}function oj(){var a=ne.H;return ne.H=Hc,a===null?Hc:a}function aj(){var a=ne.A;return ne.A=pie,a}function w_(){jr=4,Jc||(wn&4194048)!==wn&&Eo.current!==null||(Fh=!0),(ef&134217727)===0&&(Ld&134217727)===0||or===null||rf(or,wn,Qa,!1)}function C_(a,u,h){var S=jn;jn|=2;var _=oj(),R=aj();(or!==a||wn!==u)&&(R1=null,Uh(a,u)),u=!1;var G=jr;e:do try{if(Vn!==0&&fn!==null){var te=fn,de=fa;switch(Vn){case 8:x_(),G=6;break e;case 3:case 2:case 9:case 6:Eo.current===null&&(u=!0);var _e=Vn;if(Vn=0,fa=null,qh(a,te,de,_e),h&&Fh){G=0;break e}break;default:_e=Vn,Vn=0,fa=null,qh(a,te,de,_e)}}gie(),G=jr;break}catch(qe){ij(a,qe)}while(!0);return u&&a.shellSuspendCounter++,Pn=pr=null,jn=S,ne.H=_,ne.A=R,fn===null&&(or=null,wn=0,Sc()),G}function gie(){for(;fn!==null;)sj(fn)}function vie(a,u){var h=jn;jn|=2;var S=oj(),_=aj();or!==a||wn!==u?(R1=null,k1=oe()+500,Uh(a,u)):Fh=mt(a,u);e:do try{if(Vn!==0&&fn!==null){u=fn;var R=fa;t:switch(Vn){case 1:Vn=0,fa=null,qh(a,u,R,1);break;case 2:case 9:if(gd(R)){Vn=0,fa=null,lj(u);break}u=function(){Vn!==2&&Vn!==9||or!==a||(Vn=7),Nl(a)},R.then(u,u);break e;case 3:Vn=7;break e;case 4:Vn=5;break e;case 7:gd(R)?(Vn=0,fa=null,lj(u)):(Vn=0,fa=null,qh(a,u,R,7));break;case 5:var G=null;switch(fn.tag){case 26:G=fn.memoizedState;case 5:case 27:var te=fn;if(!G||$j(G)){Vn=0,fa=null;var de=te.sibling;if(de!==null)fn=de;else{var _e=te.return;_e!==null?(fn=_e,L1(_e)):fn=null}break t}}Vn=0,fa=null,qh(a,u,R,5);break;case 6:Vn=0,fa=null,qh(a,u,R,6);break;case 8:x_(),jr=6;break e;default:throw Error(r(462))}}yie();break}catch(qe){ij(a,qe)}while(!0);return Pn=pr=null,ne.H=S,ne.A=_,jn=h,fn!==null?0:(or=null,wn=0,Sc(),jr)}function yie(){for(;fn!==null&&!Le();)sj(fn)}function sj(a){var u=H(a.alternate,a,Au);a.memoizedProps=a.pendingProps,u===null?L1(a):fn=u}function lj(a){var u=a,h=u.alternate;switch(u.tag){case 15:case 0:u=Qc(h,u,u.pendingProps,u.type,void 0,wn);break;case 11:u=Qc(h,u,u.pendingProps,u.type.render,u.ref,wn);break;case 5:bl(u);default:rt(h,u),u=fn=xc(u,Au),u=H(h,u,Au)}a.memoizedProps=a.pendingProps,u===null?L1(a):fn=u}function qh(a,u,h,S){Pn=pr=null,bl(u),$a=null,Ms=0;var _=u.return;try{if(Nv(a,_,u,h,wn)){jr=1,oo(a,Ti(h,a.current)),fn=null;return}}catch(R){if(_!==null)throw fn=_,R;jr=1,oo(a,Ti(h,a.current)),fn=null;return}u.flags&32768?(En||S===1?a=!0:Fh||(wn&536870912)!==0?a=!1:(Jc=a=!0,(S===2||S===9||S===3||S===6)&&(S=Eo.current,S!==null&&S.tag===13&&(S.flags|=16384))),uj(u,a)):L1(u)}function L1(a){var u=a;do{if((u.flags&32768)!==0){uj(u,Jc);return}a=u.return;var h=Ve(u.alternate,u,Au);if(h!==null){fn=h;return}if(u=u.sibling,u!==null){fn=u;return}fn=u=a}while(u!==null);jr===0&&(jr=5)}function uj(a,u){do{var h=Ke(a.alternate,a);if(h!==null){h.flags&=32767,fn=h;return}if(h=a.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(a=a.sibling,a!==null)){fn=a;return}fn=a=h}while(a!==null);jr=6,fn=null}function cj(a,u,h,S,_,R,G,te,de){a.cancelPendingCommit=null;do I1();while(Bi!==0);if((jn&6)!==0)throw Error(r(327));if(u!==null){if(u===a.current)throw Error(r(177));if(R=u.lanes|u.childLanes,R|=fl,Xi(a,h,R,G,te,de),a===or&&(fn=or=null,wn=0),jh=u,nf=a,Vh=h,E_=R,S_=_,ej=S,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Tie(Ye,function(){return mj(),null})):(a.callbackNode=null,a.callbackPriority=0),S=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||S){S=ne.T,ne.T=null,_=re.p,re.p=2,G=jn,jn|=4;try{Kc(a,u,h)}finally{jn=G,re.p=_,ne.T=S}}Bi=1,fj(),dj(),pj()}}function fj(){if(Bi===1){Bi=0;var a=nf,u=jh,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=ne.T,ne.T=null;var S=re.p;re.p=2;var _=jn;jn|=4;try{Y4(u,a);var R=P_,G=Qp(a.containerInfo),te=R.focusedElem,de=R.selectionRange;if(G!==te&&te&&te.ownerDocument&&bc(te.ownerDocument.documentElement,te)){if(de!==null&&tu(te)){var _e=de.start,qe=de.end;if(qe===void 0&&(qe=_e),"selectionStart"in te)te.selectionStart=_e,te.selectionEnd=Math.min(qe,te.value.length);else{var He=te.ownerDocument||document,De=He&&He.defaultView||window;if(De.getSelection){var Re=De.getSelection(),Ut=te.textContent.length,kt=Math.min(de.start,Ut),Yn=de.end===void 0?kt:Math.min(de.end,Ut);!Re.extend&&kt>Yn&&(G=Yn,Yn=kt,kt=G);var Te=ld(te,kt),ve=ld(te,Yn);if(Te&&ve&&(Re.rangeCount!==1||Re.anchorNode!==Te.node||Re.anchorOffset!==Te.offset||Re.focusNode!==ve.node||Re.focusOffset!==ve.offset)){var Ce=He.createRange();Ce.setStart(Te.node,Te.offset),Re.removeAllRanges(),kt>Yn?(Re.addRange(Ce),Re.extend(ve.node,ve.offset)):(Ce.setEnd(ve.node,ve.offset),Re.addRange(Ce))}}}}for(He=[],Re=te;Re=Re.parentNode;)Re.nodeType===1&&He.push({element:Re,left:Re.scrollLeft,top:Re.scrollTop});for(typeof te.focus=="function"&&te.focus(),te=0;te<He.length;te++){var Be=He[te];Be.element.scrollLeft=Be.left,Be.element.scrollTop=Be.top}}Y1=!!F_,P_=F_=null}finally{jn=_,re.p=S,ne.T=h}}a.current=u,Bi=2}}function dj(){if(Bi===2){Bi=0;var a=nf,u=jh,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=ne.T,ne.T=null;var S=re.p;re.p=2;var _=jn;jn|=4;try{Is(a,u.alternate,u)}finally{jn=_,re.p=S,ne.T=h}}Bi=3}}function pj(){if(Bi===4||Bi===3){Bi=0,Ee();var a=nf,u=jh,h=Vh,S=ej;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Bi=5:(Bi=0,jh=nf=null,hj(a,a.pendingLanes));var _=a.pendingLanes;if(_===0&&(tf=null),kn(h),u=u.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(Ot,u,void 0,(u.current.flags&128)===128)}catch{}if(S!==null){u=ne.T,_=re.p,re.p=2,ne.T=null;try{for(var R=a.onRecoverableError,G=0;G<S.length;G++){var te=S[G];R(te.value,{componentStack:te.stack})}}finally{ne.T=u,re.p=_}}(Vh&3)!==0&&I1(),Nl(a),_=a.pendingLanes,(h&4194090)!==0&&(_&42)!==0?a===T_?Iv++:(Iv=0,T_=a):Iv=0,Fv(0)}}function hj(a,u){(a.pooledCacheLanes&=u)===0&&(u=a.pooledCache,u!=null&&(a.pooledCache=null,cu(u)))}function I1(a){return fj(),dj(),pj(),mj()}function mj(){if(Bi!==5)return!1;var a=nf,u=E_;E_=0;var h=kn(Vh),S=ne.T,_=re.p;try{re.p=32>h?32:h,ne.T=null,h=S_,S_=null;var R=nf,G=Vh;if(Bi=0,jh=nf=null,Vh=0,(jn&6)!==0)throw Error(r(331));var te=jn;if(jn|=4,Z4(R.current),Q4(R,R.current,G,h),jn=te,Fv(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(Ot,R)}catch{}return!0}finally{re.p=_,ne.T=S,hj(a,u)}}function gj(a,u,h){u=Ti(h,u),u=Wc(a.stateNode,u,2),a=Ua(a,u,2),a!==null&&(An(a,2),Nl(a))}function Kn(a,u,h){if(a.tag===3)gj(a,a,h);else for(;u!==null;){if(u.tag===3){gj(u,a,h);break}else if(u.tag===1){var S=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(tf===null||!tf.has(S))){a=Ti(h,a),h=_h(2),S=Ua(u,h,2),S!==null&&(Nh(h,S,u,a),An(S,2),Nl(S));break}}u=u.return}}function __(a,u,h){var S=a.pingCache;if(S===null){S=a.pingCache=new hie;var _=new Set;S.set(u,_)}else _=S.get(u),_===void 0&&(_=new Set,S.set(u,_));_.has(h)||(g_=!0,_.add(h),a=bie.bind(null,a,u,h),u.then(a,a))}function bie(a,u,h){var S=a.pingCache;S!==null&&S.delete(u),a.pingedLanes|=a.suspendedLanes&h,a.warmLanes&=~h,or===a&&(wn&h)===h&&(jr===4||jr===3&&(wn&62914560)===wn&&300>oe()-b_?(jn&2)===0&&Uh(a,0):v_|=h,Ph===wn&&(Ph=0)),Nl(a)}function vj(a,u){u===0&&(u=on()),a=ou(a,u),a!==null&&(An(a,u),Nl(a))}function Eie(a){var u=a.memoizedState,h=0;u!==null&&(h=u.retryLane),vj(a,h)}function Sie(a,u){var h=0;switch(a.tag){case 13:var S=a.stateNode,_=a.memoizedState;_!==null&&(h=_.retryLane);break;case 19:S=a.stateNode;break;case 22:S=a.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(u),vj(a,h)}function Tie(a,u){return Oe(a,u)}var F1=null,Bh=null,N_=!1,P1=!1,A_=!1,Id=0;function Nl(a){a!==Bh&&a.next===null&&(Bh===null?F1=Bh=a:Bh=Bh.next=a),P1=!0,N_||(N_=!0,wie())}function Fv(a,u){if(!A_&&P1){A_=!0;do for(var h=!1,S=F1;S!==null;){if(a!==0){var _=S.pendingLanes;if(_===0)var R=0;else{var G=S.suspendedLanes,te=S.pingedLanes;R=(1<<31-Et(42|a)+1)-1,R&=_&~(G&~te),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(h=!0,Sj(S,R))}else R=wn,R=vn(S,S===or?R:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(R&3)===0||mt(S,R)||(h=!0,Sj(S,R));S=S.next}while(h);A_=!1}}function xie(){yj()}function yj(){P1=N_=!1;var a=0;Id!==0&&(Rie()&&(a=Id),Id=0);for(var u=oe(),h=null,S=F1;S!==null;){var _=S.next,R=bj(S,u);R===0?(S.next=null,h===null?F1=_:h.next=_,_===null&&(Bh=h)):(h=S,(a!==0||(R&3)!==0)&&(P1=!0)),S=_}Fv(a)}function bj(a,u){for(var h=a.suspendedLanes,S=a.pingedLanes,_=a.expirationTimes,R=a.pendingLanes&-62914561;0<R;){var G=31-Et(R),te=1<<G,de=_[G];de===-1?((te&h)===0||(te&S)!==0)&&(_[G]=yn(te,u)):de<=u&&(a.expiredLanes|=te),R&=~te}if(u=or,h=wn,h=vn(a,a===u?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),S=a.callbackNode,h===0||a===u&&(Vn===2||Vn===9)||a.cancelPendingCommit!==null)return S!==null&&S!==null&&be(S),a.callbackNode=null,a.callbackPriority=0;if((h&3)===0||mt(a,h)){if(u=h&-h,u===a.callbackPriority)return u;switch(S!==null&&be(S),kn(h)){case 2:case 8:h=ct;break;case 32:h=Ye;break;case 268435456:h=$e;break;default:h=Ye}return S=Ej.bind(null,a),h=Oe(h,S),a.callbackPriority=u,a.callbackNode=h,u}return S!==null&&S!==null&&be(S),a.callbackPriority=2,a.callbackNode=null,2}function Ej(a,u){if(Bi!==0&&Bi!==5)return a.callbackNode=null,a.callbackPriority=0,null;var h=a.callbackNode;if(I1()&&a.callbackNode!==h)return null;var S=wn;return S=vn(a,a===or?S:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),S===0?null:(nj(a,S,u),bj(a,oe()),a.callbackNode!=null&&a.callbackNode===h?Ej.bind(null,a):null)}function Sj(a,u){if(I1())return null;nj(a,u,!0)}function wie(){Lie(function(){(jn&6)!==0?Oe(et,xie):yj()})}function O_(){return Id===0&&(Id=di()),Id}function Tj(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:td(""+a)}function xj(a,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,a.id&&h.setAttribute("form",a.id),u.parentNode.insertBefore(h,u),a=new FormData(a),h.parentNode.removeChild(h),a}function Cie(a,u,h,S,_){if(u==="submit"&&h&&h.stateNode===_){var R=Tj((_[bn]||null).action),G=S.submitter;G&&(u=(u=G[bn]||null)?Tj(u.formAction):G.getAttribute("formAction"),u!==null&&(R=u,G=null));var te=new Ui("action","action",null,S,_);a.push({event:te,listeners:[{instance:null,listener:function(){if(S.defaultPrevented){if(Id!==0){var de=G?xj(_,G):new FormData(_);Tu(h,{pending:!0,data:de,method:_.method,action:R},null,de)}}else typeof R=="function"&&(te.preventDefault(),de=G?xj(_,G):new FormData(_),Tu(h,{pending:!0,data:de,method:_.method,action:R},R,de))},currentTarget:_}]})}}for(var D_=0;D_<Zr.length;D_++){var k_=Zr[D_],_ie=k_.toLowerCase(),Nie=k_[0].toUpperCase()+k_.slice(1);Hr(_ie,"on"+Nie)}Hr(ll,"onAnimationEnd"),Hr(ul,"onAnimationIteration"),Hr(cd,"onAnimationStart"),Hr("dblclick","onDoubleClick"),Hr("focusin","onFocus"),Hr("focusout","onBlur"),Hr(Zp,"onTransitionRun"),Hr(Kg,"onTransitionStart"),Hr(Jp,"onTransitionCancel"),Hr(Ss,"onTransitionEnd"),Do("onMouseEnter",["mouseout","mouseover"]),Do("onMouseLeave",["mouseout","mouseover"]),Do("onPointerEnter",["pointerout","pointerover"]),Do("onPointerLeave",["pointerout","pointerover"]),ho("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ho("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ho("onBeforeInput",["compositionend","keypress","textInput","paste"]),ho("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ho("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ho("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Aie=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pv));function wj(a,u){u=(u&4)!==0;for(var h=0;h<a.length;h++){var S=a[h],_=S.event;S=S.listeners;e:{var R=void 0;if(u)for(var G=S.length-1;0<=G;G--){var te=S[G],de=te.instance,_e=te.currentTarget;if(te=te.listener,de!==R&&_.isPropagationStopped())break e;R=te,_.currentTarget=_e;try{R(_)}catch(qe){Mn(qe)}_.currentTarget=null,R=de}else for(G=0;G<S.length;G++){if(te=S[G],de=te.instance,_e=te.currentTarget,te=te.listener,de!==R&&_.isPropagationStopped())break e;R=te,_.currentTarget=_e;try{R(_)}catch(qe){Mn(qe)}_.currentTarget=null,R=de}}}}function dn(a,u){var h=u[Ko];h===void 0&&(h=u[Ko]=new Set);var S=a+"__bubble";h.has(S)||(Cj(u,a,2,!1),h.add(S))}function R_(a,u,h){var S=0;u&&(S|=4),Cj(h,a,S,u)}var j1="_reactListening"+Math.random().toString(36).slice(2);function M_(a){if(!a[j1]){a[j1]=!0,Zi.forEach(function(h){h!=="selectionchange"&&(Aie.has(h)||R_(h,!1,a),R_(h,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[j1]||(u[j1]=!0,R_("selectionchange",!1,u))}}function Cj(a,u,h,S){switch(Qj(u)){case 2:var _=toe;break;case 8:_=noe;break;default:_=Y_}h=_.bind(null,u,h,a),_=void 0,!Pp||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(_=!0),S?_!==void 0?a.addEventListener(u,h,{capture:!0,passive:_}):a.addEventListener(u,h,!0):_!==void 0?a.addEventListener(u,h,{passive:_}):a.addEventListener(u,h,!1)}function L_(a,u,h,S,_){var R=S;if((u&1)===0&&(u&2)===0&&S!==null)e:for(;;){if(S===null)return;var G=S.tag;if(G===3||G===4){var te=S.stateNode.containerInfo;if(te===_)break;if(G===4)for(G=S.return;G!==null;){var de=G.tag;if((de===3||de===4)&&G.stateNode.containerInfo===_)return;G=G.return}for(;te!==null;){if(G=Fi(te),G===null)return;if(de=G.tag,de===5||de===6||de===26||de===27){S=R=G;continue e}te=te.parentNode}}S=S.return}Rg(function(){var _e=R,qe=Ql(h),He=[];e:{var De=Ts.get(a);if(De!==void 0){var Re=Ui,Ut=a;switch(a){case"keypress":if(uc(h)===0)break e;case"keydown":case"keyup":Re=od;break;case"focusin":Ut="focus",Re=Vp;break;case"focusout":Ut="blur",Re=Vp;break;case"beforeblur":case"afterblur":Re=Vp;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Re=ta;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Re=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Re=y1;break;case ll:case ul:case cd:Re=f_;break;case Ss:Re=Fr;break;case"scroll":case"scrollend":Re=d1;break;case"wheel":Re=Vg;break;case"copy":case"cut":case"paste":Re=Mg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Re=jg;break;case"toggle":case"beforetoggle":Re=E1}var kt=(u&4)!==0,Yn=!kt&&(a==="scroll"||a==="scrollend"),Te=kt?De!==null?De+"Capture":null:De;kt=[];for(var ve=_e,Ce;ve!==null;){var Be=ve;if(Ce=Be.stateNode,Be=Be.tag,Be!==5&&Be!==26&&Be!==27||Ce===null||Te===null||(Be=nl(ve,Te),Be!=null&&kt.push(jv(ve,Be,Ce))),Yn)break;ve=ve.return}0<kt.length&&(De=new Re(De,Ut,null,h,qe),He.push({event:De,listeners:kt}))}}if((u&7)===0){e:{if(De=a==="mouseover"||a==="pointerover",Re=a==="mouseout"||a==="pointerout",De&&h!==Ip&&(Ut=h.relatedTarget||h.fromElement)&&(Fi(Ut)||Ut[Ii]))break e;if((Re||De)&&(De=qe.window===qe?qe:(De=qe.ownerDocument)?De.defaultView||De.parentWindow:window,Re?(Ut=h.relatedTarget||h.toElement,Re=_e,Ut=Ut?Fi(Ut):null,Ut!==null&&(Yn=o(Ut),kt=Ut.tag,Ut!==Yn||kt!==5&&kt!==27&&kt!==6)&&(Ut=null)):(Re=null,Ut=_e),Re!==Ut)){if(kt=ta,Be="onMouseLeave",Te="onMouseEnter",ve="mouse",(a==="pointerout"||a==="pointerover")&&(kt=jg,Be="onPointerLeave",Te="onPointerEnter",ve="pointer"),Yn=Re==null?De:Oo(Re),Ce=Ut==null?De:Oo(Ut),De=new kt(Be,ve+"leave",Re,h,qe),De.target=Yn,De.relatedTarget=Ce,Be=null,Fi(qe)===_e&&(kt=new kt(Te,ve+"enter",Ut,h,qe),kt.target=Ce,kt.relatedTarget=Yn,Be=kt),Yn=Be,Re&&Ut)t:{for(kt=Re,Te=Ut,ve=0,Ce=kt;Ce;Ce=$h(Ce))ve++;for(Ce=0,Be=Te;Be;Be=$h(Be))Ce++;for(;0<ve-Ce;)kt=$h(kt),ve--;for(;0<Ce-ve;)Te=$h(Te),Ce--;for(;ve--;){if(kt===Te||Te!==null&&kt===Te.alternate)break t;kt=$h(kt),Te=$h(Te)}kt=null}else kt=null;Re!==null&&_j(He,De,Re,kt,!1),Ut!==null&&Yn!==null&&_j(He,Yn,Ut,kt,!0)}}e:{if(De=_e?Oo(_e):window,Re=De.nodeName&&De.nodeName.toLowerCase(),Re==="select"||Re==="input"&&De.type==="file")var Tt=Hg;else if(Hp(De))if(Gp)Tt=Yg;else{Tt=x1;var sn=T1}else Re=De.nodeName,!Re||Re.toLowerCase()!=="input"||De.type!=="checkbox"&&De.type!=="radio"?_e&&Lp(_e.elementType)&&(Tt=Hg):Tt=w1;if(Tt&&(Tt=Tt(a,_e))){ko(He,Tt,h,qe);break e}sn&&sn(a,De,_e),a==="focusout"&&_e&&De.type==="number"&&_e.memoizedProps.value!=null&&lc(De,"number",De.value)}switch(sn=_e?Oo(_e):window,a){case"focusin":(Hp(sn)||sn.contentEditable==="true")&&(al=sn,Ec=_e,sl=null);break;case"focusout":sl=Ec=al=null;break;case"mousedown":ud=!0;break;case"contextmenu":case"mouseup":case"dragend":ud=!1,Kp(He,h,qe);break;case"selectionchange":if(Lo)break;case"keydown":case"keyup":Kp(He,h,qe)}var Nt;if(qp)e:{switch(a){case"compositionstart":var Mt="onCompositionStart";break e;case"compositionend":Mt="onCompositionEnd";break e;case"compositionupdate":Mt="onCompositionUpdate";break e}Mt=void 0}else na?$p(a,h)&&(Mt="onCompositionEnd"):a==="keydown"&&h.keyCode===229&&(Mt="onCompositionStart");Mt&&(Bg&&h.locale!=="ko"&&(na||Mt!=="onCompositionStart"?Mt==="onCompositionEnd"&&na&&(Nt=nd()):(Oa=qe,Zl="value"in Oa?Oa.value:Oa.textContent,na=!0)),sn=V1(_e,Mt),0<sn.length&&(Mt=new Ig(Mt,a,null,h,qe),He.push({event:Mt,listeners:sn}),Nt?Mt.data=Nt:(Nt=zg(h),Nt!==null&&(Mt.data=Nt)))),(Nt=qg?Da(a,h):sd(a,h))&&(Mt=V1(_e,"onBeforeInput"),0<Mt.length&&(sn=new Ig("onBeforeInput","beforeinput",null,h,qe),He.push({event:sn,listeners:Mt}),sn.data=Nt)),Cie(He,a,_e,h,qe)}wj(He,u)})}function jv(a,u,h){return{instance:a,listener:u,currentTarget:h}}function V1(a,u){for(var h=u+"Capture",S=[];a!==null;){var _=a,R=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||R===null||(_=nl(a,h),_!=null&&S.unshift(jv(a,_,R)),_=nl(a,u),_!=null&&S.push(jv(a,_,R))),a.tag===3)return S;a=a.return}return[]}function $h(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function _j(a,u,h,S,_){for(var R=u._reactName,G=[];h!==null&&h!==S;){var te=h,de=te.alternate,_e=te.stateNode;if(te=te.tag,de!==null&&de===S)break;te!==5&&te!==26&&te!==27||_e===null||(de=_e,_?(_e=nl(h,R),_e!=null&&G.unshift(jv(h,_e,de))):_||(_e=nl(h,R),_e!=null&&G.push(jv(h,_e,de)))),h=h.return}G.length!==0&&a.push({event:u,listeners:G})}var Oie=/\r\n?/g,Die=/\u0000|\uFFFD/g;function Nj(a){return(typeof a=="string"?a:""+a).replace(Oie,`
`).replace(Die,"")}function Aj(a,u){return u=Nj(u),Nj(a)===u}function U1(){}function Gn(a,u,h,S,_,R){switch(h){case"children":typeof S=="string"?u==="body"||u==="textarea"&&S===""||tl(a,S):(typeof S=="number"||typeof S=="bigint")&&u!=="body"&&tl(a,""+S);break;case"className":an(a,"class",S);break;case"tabIndex":an(a,"tabindex",S);break;case"dir":case"role":case"viewBox":case"width":case"height":an(a,h,S);break;case"style":Dg(a,S,R);break;case"data":if(u!=="object"){an(a,"data",S);break}case"src":case"href":if(S===""&&(u!=="a"||h!=="href")){a.removeAttribute(h);break}if(S==null||typeof S=="function"||typeof S=="symbol"||typeof S=="boolean"){a.removeAttribute(h);break}S=td(""+S),a.setAttribute(h,S);break;case"action":case"formAction":if(typeof S=="function"){a.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof R=="function"&&(h==="formAction"?(u!=="input"&&Gn(a,u,"name",_.name,_,null),Gn(a,u,"formEncType",_.formEncType,_,null),Gn(a,u,"formMethod",_.formMethod,_,null),Gn(a,u,"formTarget",_.formTarget,_,null)):(Gn(a,u,"encType",_.encType,_,null),Gn(a,u,"method",_.method,_,null),Gn(a,u,"target",_.target,_,null)));if(S==null||typeof S=="symbol"||typeof S=="boolean"){a.removeAttribute(h);break}S=td(""+S),a.setAttribute(h,S);break;case"onClick":S!=null&&(a.onclick=U1);break;case"onScroll":S!=null&&dn("scroll",a);break;case"onScrollEnd":S!=null&&dn("scrollend",a);break;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(r(61));if(h=S.__html,h!=null){if(_.children!=null)throw Error(r(60));a.innerHTML=h}}break;case"multiple":a.multiple=S&&typeof S!="function"&&typeof S!="symbol";break;case"muted":a.muted=S&&typeof S!="function"&&typeof S!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(S==null||typeof S=="function"||typeof S=="boolean"||typeof S=="symbol"){a.removeAttribute("xlink:href");break}h=td(""+S),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":S!=null&&typeof S!="function"&&typeof S!="symbol"?a.setAttribute(h,""+S):a.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":S&&typeof S!="function"&&typeof S!="symbol"?a.setAttribute(h,""):a.removeAttribute(h);break;case"capture":case"download":S===!0?a.setAttribute(h,""):S!==!1&&S!=null&&typeof S!="function"&&typeof S!="symbol"?a.setAttribute(h,S):a.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":S!=null&&typeof S!="function"&&typeof S!="symbol"&&!isNaN(S)&&1<=S?a.setAttribute(h,S):a.removeAttribute(h);break;case"rowSpan":case"start":S==null||typeof S=="function"||typeof S=="symbol"||isNaN(S)?a.removeAttribute(h):a.setAttribute(h,S);break;case"popover":dn("beforetoggle",a),dn("toggle",a),zr(a,"popover",S);break;case"xlinkActuate":Ir(a,"http://www.w3.org/1999/xlink","xlink:actuate",S);break;case"xlinkArcrole":Ir(a,"http://www.w3.org/1999/xlink","xlink:arcrole",S);break;case"xlinkRole":Ir(a,"http://www.w3.org/1999/xlink","xlink:role",S);break;case"xlinkShow":Ir(a,"http://www.w3.org/1999/xlink","xlink:show",S);break;case"xlinkTitle":Ir(a,"http://www.w3.org/1999/xlink","xlink:title",S);break;case"xlinkType":Ir(a,"http://www.w3.org/1999/xlink","xlink:type",S);break;case"xmlBase":Ir(a,"http://www.w3.org/XML/1998/namespace","xml:base",S);break;case"xmlLang":Ir(a,"http://www.w3.org/XML/1998/namespace","xml:lang",S);break;case"xmlSpace":Ir(a,"http://www.w3.org/XML/1998/namespace","xml:space",S);break;case"is":zr(a,"is",S);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=f1.get(h)||h,zr(a,h,S))}}function I_(a,u,h,S,_,R){switch(h){case"style":Dg(a,S,R);break;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(r(61));if(h=S.__html,h!=null){if(_.children!=null)throw Error(r(60));a.innerHTML=h}}break;case"children":typeof S=="string"?tl(a,S):(typeof S=="number"||typeof S=="bigint")&&tl(a,""+S);break;case"onScroll":S!=null&&dn("scroll",a);break;case"onScrollEnd":S!=null&&dn("scrollend",a);break;case"onClick":S!=null&&(a.onclick=U1);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Pi.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(_=h.endsWith("Capture"),u=h.slice(2,_?h.length-7:void 0),R=a[bn]||null,R=R!=null?R[h]:null,typeof R=="function"&&a.removeEventListener(u,R,_),typeof S=="function")){typeof R!="function"&&R!==null&&(h in a?a[h]=null:a.hasAttribute(h)&&a.removeAttribute(h)),a.addEventListener(u,S,_);break e}h in a?a[h]=S:S===!0?a.setAttribute(h,""):zr(a,h,S)}}}function $i(a,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dn("error",a),dn("load",a);var S=!1,_=!1,R;for(R in h)if(h.hasOwnProperty(R)){var G=h[R];if(G!=null)switch(R){case"src":S=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Gn(a,u,R,G,h,null)}}_&&Gn(a,u,"srcSet",h.srcSet,h,null),S&&Gn(a,u,"src",h.src,h,null);return;case"input":dn("invalid",a);var te=R=G=_=null,de=null,_e=null;for(S in h)if(h.hasOwnProperty(S)){var qe=h[S];if(qe!=null)switch(S){case"name":_=qe;break;case"type":G=qe;break;case"checked":de=qe;break;case"defaultChecked":_e=qe;break;case"value":R=qe;break;case"defaultValue":te=qe;break;case"children":case"dangerouslySetInnerHTML":if(qe!=null)throw Error(r(137,u));break;default:Gn(a,u,S,qe,h,null)}}Wl(a,R,te,de,_e,G,_,!1),_r(a);return;case"select":dn("invalid",a),S=G=R=null;for(_ in h)if(h.hasOwnProperty(_)&&(te=h[_],te!=null))switch(_){case"value":R=te;break;case"defaultValue":G=te;break;case"multiple":S=te;default:Gn(a,u,_,te,h,null)}u=R,h=G,a.multiple=!!S,u!=null?el(a,!!S,u,!1):h!=null&&el(a,!!S,h,!0);return;case"textarea":dn("invalid",a),R=_=S=null;for(G in h)if(h.hasOwnProperty(G)&&(te=h[G],te!=null))switch(G){case"value":S=te;break;case"defaultValue":_=te;break;case"children":R=te;break;case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(91));break;default:Gn(a,u,G,te,h,null)}Ag(a,S,_,R),_r(a);return;case"option":for(de in h)if(h.hasOwnProperty(de)&&(S=h[de],S!=null))switch(de){case"selected":a.selected=S&&typeof S!="function"&&typeof S!="symbol";break;default:Gn(a,u,de,S,h,null)}return;case"dialog":dn("beforetoggle",a),dn("toggle",a),dn("cancel",a),dn("close",a);break;case"iframe":case"object":dn("load",a);break;case"video":case"audio":for(S=0;S<Pv.length;S++)dn(Pv[S],a);break;case"image":dn("error",a),dn("load",a);break;case"details":dn("toggle",a);break;case"embed":case"source":case"link":dn("error",a),dn("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_e in h)if(h.hasOwnProperty(_e)&&(S=h[_e],S!=null))switch(_e){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Gn(a,u,_e,S,h,null)}return;default:if(Lp(u)){for(qe in h)h.hasOwnProperty(qe)&&(S=h[qe],S!==void 0&&I_(a,u,qe,S,h,void 0));return}}for(te in h)h.hasOwnProperty(te)&&(S=h[te],S!=null&&Gn(a,u,te,S,h,null))}function kie(a,u,h,S){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,R=null,G=null,te=null,de=null,_e=null,qe=null;for(Re in h){var He=h[Re];if(h.hasOwnProperty(Re)&&He!=null)switch(Re){case"checked":break;case"value":break;case"defaultValue":de=He;default:S.hasOwnProperty(Re)||Gn(a,u,Re,null,S,He)}}for(var De in S){var Re=S[De];if(He=h[De],S.hasOwnProperty(De)&&(Re!=null||He!=null))switch(De){case"type":R=Re;break;case"name":_=Re;break;case"checked":_e=Re;break;case"defaultChecked":qe=Re;break;case"value":G=Re;break;case"defaultValue":te=Re;break;case"children":case"dangerouslySetInnerHTML":if(Re!=null)throw Error(r(137,u));break;default:Re!==He&&Gn(a,u,De,Re,S,He)}}Jf(a,G,te,de,_e,qe,R,_);return;case"select":Re=G=te=De=null;for(R in h)if(de=h[R],h.hasOwnProperty(R)&&de!=null)switch(R){case"value":break;case"multiple":Re=de;default:S.hasOwnProperty(R)||Gn(a,u,R,null,S,de)}for(_ in S)if(R=S[_],de=h[_],S.hasOwnProperty(_)&&(R!=null||de!=null))switch(_){case"value":De=R;break;case"defaultValue":te=R;break;case"multiple":G=R;default:R!==de&&Gn(a,u,_,R,S,de)}u=te,h=G,S=Re,De!=null?el(a,!!h,De,!1):!!S!=!!h&&(u!=null?el(a,!!h,u,!0):el(a,!!h,h?[]:"",!1));return;case"textarea":Re=De=null;for(te in h)if(_=h[te],h.hasOwnProperty(te)&&_!=null&&!S.hasOwnProperty(te))switch(te){case"value":break;case"children":break;default:Gn(a,u,te,null,S,_)}for(G in S)if(_=S[G],R=h[G],S.hasOwnProperty(G)&&(_!=null||R!=null))switch(G){case"value":De=_;break;case"defaultValue":Re=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==R&&Gn(a,u,G,_,S,R)}ed(a,De,Re);return;case"option":for(var Ut in h)if(De=h[Ut],h.hasOwnProperty(Ut)&&De!=null&&!S.hasOwnProperty(Ut))switch(Ut){case"selected":a.selected=!1;break;default:Gn(a,u,Ut,null,S,De)}for(de in S)if(De=S[de],Re=h[de],S.hasOwnProperty(de)&&De!==Re&&(De!=null||Re!=null))switch(de){case"selected":a.selected=De&&typeof De!="function"&&typeof De!="symbol";break;default:Gn(a,u,de,De,S,Re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var kt in h)De=h[kt],h.hasOwnProperty(kt)&&De!=null&&!S.hasOwnProperty(kt)&&Gn(a,u,kt,null,S,De);for(_e in S)if(De=S[_e],Re=h[_e],S.hasOwnProperty(_e)&&De!==Re&&(De!=null||Re!=null))switch(_e){case"children":case"dangerouslySetInnerHTML":if(De!=null)throw Error(r(137,u));break;default:Gn(a,u,_e,De,S,Re)}return;default:if(Lp(u)){for(var Yn in h)De=h[Yn],h.hasOwnProperty(Yn)&&De!==void 0&&!S.hasOwnProperty(Yn)&&I_(a,u,Yn,void 0,S,De);for(qe in S)De=S[qe],Re=h[qe],!S.hasOwnProperty(qe)||De===Re||De===void 0&&Re===void 0||I_(a,u,qe,De,S,Re);return}}for(var Te in h)De=h[Te],h.hasOwnProperty(Te)&&De!=null&&!S.hasOwnProperty(Te)&&Gn(a,u,Te,null,S,De);for(He in S)De=S[He],Re=h[He],!S.hasOwnProperty(He)||De===Re||De==null&&Re==null||Gn(a,u,He,De,S,Re)}var F_=null,P_=null;function q1(a){return a.nodeType===9?a:a.ownerDocument}function Oj(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dj(a,u){if(a===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&u==="foreignObject"?0:a}function j_(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var V_=null;function Rie(){var a=window.event;return a&&a.type==="popstate"?a===V_?!1:(V_=a,!0):(V_=null,!1)}var kj=typeof setTimeout=="function"?setTimeout:void 0,Mie=typeof clearTimeout=="function"?clearTimeout:void 0,Rj=typeof Promise=="function"?Promise:void 0,Lie=typeof queueMicrotask=="function"?queueMicrotask:typeof Rj<"u"?function(a){return Rj.resolve(null).then(a).catch(Iie)}:kj;function Iie(a){setTimeout(function(){throw a})}function of(a){return a==="head"}function Mj(a,u){var h=u,S=0,_=0;do{var R=h.nextSibling;if(a.removeChild(h),R&&R.nodeType===8)if(h=R.data,h==="/$"){if(0<S&&8>S){h=S;var G=a.ownerDocument;if(h&1&&Vv(G.documentElement),h&2&&Vv(G.body),h&4)for(h=G.head,Vv(h),G=h.firstChild;G;){var te=G.nextSibling,de=G.nodeName;G[Bn]||de==="SCRIPT"||de==="STYLE"||de==="LINK"&&G.rel.toLowerCase()==="stylesheet"||h.removeChild(G),G=te}}if(_===0){a.removeChild(R),Yv(u);return}_--}else h==="$"||h==="$?"||h==="$!"?_++:S=h.charCodeAt(0)-48;else S=0;h=R}while(h);Yv(u)}function U_(a){var u=a.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":U_(h),Lr(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}a.removeChild(h)}}function Fie(a,u,h,S){for(;a.nodeType===1;){var _=h;if(a.nodeName.toLowerCase()!==u.toLowerCase()){if(!S&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(S){if(!a[Bn])switch(u){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(R=a.getAttribute("rel"),R==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(R!==_.rel||a.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||a.getAttribute("title")!==(_.title==null?null:_.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(R=a.getAttribute("src"),(R!==(_.src==null?null:_.src)||a.getAttribute("type")!==(_.type==null?null:_.type)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&R&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(u==="input"&&a.type==="hidden"){var R=_.name==null?null:""+_.name;if(_.type==="hidden"&&a.getAttribute("name")===R)return a}else return a;if(a=Fs(a.nextSibling),a===null)break}return null}function Pie(a,u,h){if(u==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!h||(a=Fs(a.nextSibling),a===null))return null;return a}function q_(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState==="complete"}function jie(a,u){var h=a.ownerDocument;if(a.data!=="$?"||h.readyState==="complete")u();else{var S=function(){u(),h.removeEventListener("DOMContentLoaded",S)};h.addEventListener("DOMContentLoaded",S),a._reactRetry=S}}function Fs(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?"||u==="F!"||u==="F")break;if(u==="/$")return null}}return a}var B_=null;function Lj(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var h=a.data;if(h==="$"||h==="$!"||h==="$?"){if(u===0)return a;u--}else h==="/$"&&u++}a=a.previousSibling}return null}function Ij(a,u,h){switch(u=q1(h),a){case"html":if(a=u.documentElement,!a)throw Error(r(452));return a;case"head":if(a=u.head,!a)throw Error(r(453));return a;case"body":if(a=u.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Vv(a){for(var u=a.attributes;u.length;)a.removeAttributeNode(u[0]);Lr(a)}var Ka=new Map,Fj=new Set;function B1(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ou=re.d;re.d={f:Vie,r:Uie,D:qie,C:Bie,L:$ie,m:zie,X:Gie,S:Hie,M:Yie};function Vie(){var a=Ou.f(),u=M1();return a||u}function Uie(a){var u=$r(a);u!==null&&u.tag===5&&u.type==="form"?yv(u):Ou.r(a)}var zh=typeof document>"u"?null:document;function Pj(a,u,h){var S=zh;if(S&&typeof u=="string"&&u){var _=Ji(u);_='link[rel="'+a+'"][href="'+_+'"]',typeof h=="string"&&(_+='[crossorigin="'+h+'"]'),Fj.has(_)||(Fj.add(_),a={rel:a,crossOrigin:h,href:u},S.querySelector(_)===null&&(u=S.createElement("link"),$i(u,"link",a),Rn(u),S.head.appendChild(u)))}}function qie(a){Ou.D(a),Pj("dns-prefetch",a,null)}function Bie(a,u){Ou.C(a,u),Pj("preconnect",a,u)}function $ie(a,u,h){Ou.L(a,u,h);var S=zh;if(S&&a&&u){var _='link[rel="preload"][as="'+Ji(u)+'"]';u==="image"&&h&&h.imageSrcSet?(_+='[imagesrcset="'+Ji(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(_+='[imagesizes="'+Ji(h.imageSizes)+'"]')):_+='[href="'+Ji(a)+'"]';var R=_;switch(u){case"style":R=Hh(a);break;case"script":R=Gh(a)}Ka.has(R)||(a=m({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:a,as:u},h),Ka.set(R,a),S.querySelector(_)!==null||u==="style"&&S.querySelector(Uv(R))||u==="script"&&S.querySelector(qv(R))||(u=S.createElement("link"),$i(u,"link",a),Rn(u),S.head.appendChild(u)))}}function zie(a,u){Ou.m(a,u);var h=zh;if(h&&a){var S=u&&typeof u.as=="string"?u.as:"script",_='link[rel="modulepreload"][as="'+Ji(S)+'"][href="'+Ji(a)+'"]',R=_;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Gh(a)}if(!Ka.has(R)&&(a=m({rel:"modulepreload",href:a},u),Ka.set(R,a),h.querySelector(_)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(qv(R)))return}S=h.createElement("link"),$i(S,"link",a),Rn(S),h.head.appendChild(S)}}}function Hie(a,u,h){Ou.S(a,u,h);var S=zh;if(S&&a){var _=po(S).hoistableStyles,R=Hh(a);u=u||"default";var G=_.get(R);if(!G){var te={loading:0,preload:null};if(G=S.querySelector(Uv(R)))te.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":u},h),(h=Ka.get(R))&&$_(a,h);var de=G=S.createElement("link");Rn(de),$i(de,"link",a),de._p=new Promise(function(_e,qe){de.onload=_e,de.onerror=qe}),de.addEventListener("load",function(){te.loading|=1}),de.addEventListener("error",function(){te.loading|=2}),te.loading|=4,$1(G,u,S)}G={type:"stylesheet",instance:G,count:1,state:te},_.set(R,G)}}}function Gie(a,u){Ou.X(a,u);var h=zh;if(h&&a){var S=po(h).hoistableScripts,_=Gh(a),R=S.get(_);R||(R=h.querySelector(qv(_)),R||(a=m({src:a,async:!0},u),(u=Ka.get(_))&&z_(a,u),R=h.createElement("script"),Rn(R),$i(R,"link",a),h.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},S.set(_,R))}}function Yie(a,u){Ou.M(a,u);var h=zh;if(h&&a){var S=po(h).hoistableScripts,_=Gh(a),R=S.get(_);R||(R=h.querySelector(qv(_)),R||(a=m({src:a,async:!0,type:"module"},u),(u=Ka.get(_))&&z_(a,u),R=h.createElement("script"),Rn(R),$i(R,"link",a),h.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},S.set(_,R))}}function jj(a,u,h,S){var _=(_=Se.current)?B1(_):null;if(!_)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=Hh(h.href),h=po(_).hoistableStyles,S=h.get(u),S||(S={type:"style",instance:null,count:0,state:null},h.set(u,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){a=Hh(h.href);var R=po(_).hoistableStyles,G=R.get(a);if(G||(_=_.ownerDocument||_,G={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(a,G),(R=_.querySelector(Uv(a)))&&!R._p&&(G.instance=R,G.state.loading=5),Ka.has(a)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Ka.set(a,h),R||Wie(_,a,h,G.state))),u&&S===null)throw Error(r(528,""));return G}if(u&&S!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Gh(h),h=po(_).hoistableScripts,S=h.get(u),S||(S={type:"script",instance:null,count:0,state:null},h.set(u,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Hh(a){return'href="'+Ji(a)+'"'}function Uv(a){return'link[rel="stylesheet"]['+a+"]"}function Vj(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function Wie(a,u,h,S){a.querySelector('link[rel="preload"][as="style"]['+u+"]")?S.loading=1:(u=a.createElement("link"),S.preload=u,u.addEventListener("load",function(){return S.loading|=1}),u.addEventListener("error",function(){return S.loading|=2}),$i(u,"link",h),Rn(u),a.head.appendChild(u))}function Gh(a){return'[src="'+Ji(a)+'"]'}function qv(a){return"script[async]"+a}function Uj(a,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var S=a.querySelector('style[data-href~="'+Ji(h.href)+'"]');if(S)return u.instance=S,Rn(S),S;var _=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return S=(a.ownerDocument||a).createElement("style"),Rn(S),$i(S,"style",_),$1(S,h.precedence,a),u.instance=S;case"stylesheet":_=Hh(h.href);var R=a.querySelector(Uv(_));if(R)return u.state.loading|=4,u.instance=R,Rn(R),R;S=Vj(h),(_=Ka.get(_))&&$_(S,_),R=(a.ownerDocument||a).createElement("link"),Rn(R);var G=R;return G._p=new Promise(function(te,de){G.onload=te,G.onerror=de}),$i(R,"link",S),u.state.loading|=4,$1(R,h.precedence,a),u.instance=R;case"script":return R=Gh(h.src),(_=a.querySelector(qv(R)))?(u.instance=_,Rn(_),_):(S=h,(_=Ka.get(R))&&(S=m({},h),z_(S,_)),a=a.ownerDocument||a,_=a.createElement("script"),Rn(_),$i(_,"link",S),a.head.appendChild(_),u.instance=_);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(S=u.instance,u.state.loading|=4,$1(S,h.precedence,a));return u.instance}function $1(a,u,h){for(var S=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=S.length?S[S.length-1]:null,R=_,G=0;G<S.length;G++){var te=S[G];if(te.dataset.precedence===u)R=te;else if(R!==_)break}R?R.parentNode.insertBefore(a,R.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(a,u.firstChild))}function $_(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.title==null&&(a.title=u.title)}function z_(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.integrity==null&&(a.integrity=u.integrity)}var z1=null;function qj(a,u,h){if(z1===null){var S=new Map,_=z1=new Map;_.set(h,S)}else _=z1,S=_.get(h),S||(S=new Map,_.set(h,S));if(S.has(a))return S;for(S.set(a,null),h=h.getElementsByTagName(a),_=0;_<h.length;_++){var R=h[_];if(!(R[Bn]||R[Gt]||a==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var G=R.getAttribute(u)||"";G=a+G;var te=S.get(G);te?te.push(R):S.set(G,[R])}}return S}function Bj(a,u,h){a=a.ownerDocument||a,a.head.insertBefore(h,u==="title"?a.querySelector("head > title"):null)}function Qie(a,u,h){if(h===1||u.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return a=u.disabled,typeof u.precedence=="string"&&a==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function $j(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}var Bv=null;function Kie(){}function Xie(a,u,h){if(Bv===null)throw Error(r(475));var S=Bv;if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var _=Hh(h.href),R=a.querySelector(Uv(_));if(R){a=R._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(S.count++,S=H1.bind(S),a.then(S,S)),u.state.loading|=4,u.instance=R,Rn(R);return}R=a.ownerDocument||a,h=Vj(h),(_=Ka.get(_))&&$_(h,_),R=R.createElement("link"),Rn(R);var G=R;G._p=new Promise(function(te,de){G.onload=te,G.onerror=de}),$i(R,"link",h),u.instance=R}S.stylesheets===null&&(S.stylesheets=new Map),S.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(S.count++,u=H1.bind(S),a.addEventListener("load",u),a.addEventListener("error",u))}}function Zie(){if(Bv===null)throw Error(r(475));var a=Bv;return a.stylesheets&&a.count===0&&H_(a,a.stylesheets),0<a.count?function(u){var h=setTimeout(function(){if(a.stylesheets&&H_(a,a.stylesheets),a.unsuspend){var S=a.unsuspend;a.unsuspend=null,S()}},6e4);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h)}}:null}function H1(){if(this.count--,this.count===0){if(this.stylesheets)H_(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var G1=null;function H_(a,u){a.stylesheets=null,a.unsuspend!==null&&(a.count++,G1=new Map,u.forEach(Jie,a),G1=null,H1.call(a))}function Jie(a,u){if(!(u.state.loading&4)){var h=G1.get(a);if(h)var S=h.get(null);else{h=new Map,G1.set(a,h);for(var _=a.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<_.length;R++){var G=_[R];(G.nodeName==="LINK"||G.getAttribute("media")!=="not all")&&(h.set(G.dataset.precedence,G),S=G)}S&&h.set(null,S)}_=u.instance,G=_.getAttribute("data-precedence"),R=h.get(G)||S,R===S&&h.set(null,_),h.set(G,_),this.count++,S=H1.bind(this),_.addEventListener("load",S),_.addEventListener("error",S),R?R.parentNode.insertBefore(_,R.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(_,a.firstChild)),u.state.loading|=4}}var $v={$$typeof:A,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function eoe(a,u,h,S,_,R,G,te){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mr(0),this.hiddenUpdates=Mr(null),this.identifierPrefix=S,this.onUncaughtError=_,this.onCaughtError=R,this.onRecoverableError=G,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function zj(a,u,h,S,_,R,G,te,de,_e,qe,He){return a=new eoe(a,u,h,G,te,de,_e,He),u=1,R===!0&&(u|=24),R=Gr(3,null,null,u),a.current=R,R.stateNode=a,u=Oc(),u.refCount++,a.pooledCache=u,u.refCount++,R.memoizedState={element:S,isDehydrated:h,cache:u},uh(R),a}function Hj(a){return a?(a=xs,a):xs}function Gj(a,u,h,S,_,R){_=Hj(_),S.context===null?S.context=_:S.pendingContext=_,S=oa(u),S.payload={element:h},R=R===void 0?null:R,R!==null&&(S.callback=R),h=Ua(a,S,u),h!==null&&(pa(h,a,u),kc(h,a,u))}function Yj(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var h=a.retryLane;a.retryLane=h!==0&&h<u?h:u}}function G_(a,u){Yj(a,u),(a=a.alternate)&&Yj(a,u)}function Wj(a){if(a.tag===13){var u=ou(a,67108864);u!==null&&pa(u,a,67108864),G_(a,67108864)}}var Y1=!0;function toe(a,u,h,S){var _=ne.T;ne.T=null;var R=re.p;try{re.p=2,Y_(a,u,h,S)}finally{re.p=R,ne.T=_}}function noe(a,u,h,S){var _=ne.T;ne.T=null;var R=re.p;try{re.p=8,Y_(a,u,h,S)}finally{re.p=R,ne.T=_}}function Y_(a,u,h,S){if(Y1){var _=W_(S);if(_===null)L_(a,u,S,W1,h),Kj(a,S);else if(ioe(_,a,u,h,S))S.stopPropagation();else if(Kj(a,S),u&4&&-1<roe.indexOf(a)){for(;_!==null;){var R=$r(_);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var G=qn(R.pendingLanes);if(G!==0){var te=R;for(te.pendingLanes|=2,te.entangledLanes|=2;G;){var de=1<<31-Et(G);te.entanglements[1]|=de,G&=~de}Nl(R),(jn&6)===0&&(k1=oe()+500,Fv(0))}}break;case 13:te=ou(R,2),te!==null&&pa(te,R,2),M1(),G_(R,2)}if(R=W_(S),R===null&&L_(a,u,S,W1,h),R===_)break;_=R}_!==null&&S.stopPropagation()}else L_(a,u,S,null,h)}}function W_(a){return a=Ql(a),Q_(a)}var W1=null;function Q_(a){if(W1=null,a=Fi(a),a!==null){var u=o(a);if(u===null)a=null;else{var h=u.tag;if(h===13){if(a=l(u),a!==null)return a;a=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null)}}return W1=a,null}function Qj(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(je()){case et:return 2;case ct:return 8;case Ye:case xe:return 32;case $e:return 268435456;default:return 32}default:return 32}}var K_=!1,af=null,sf=null,lf=null,zv=new Map,Hv=new Map,uf=[],roe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Kj(a,u){switch(a){case"focusin":case"focusout":af=null;break;case"dragenter":case"dragleave":sf=null;break;case"mouseover":case"mouseout":lf=null;break;case"pointerover":case"pointerout":zv.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hv.delete(u.pointerId)}}function Gv(a,u,h,S,_,R){return a===null||a.nativeEvent!==R?(a={blockedOn:u,domEventName:h,eventSystemFlags:S,nativeEvent:R,targetContainers:[_]},u!==null&&(u=$r(u),u!==null&&Wj(u)),a):(a.eventSystemFlags|=S,u=a.targetContainers,_!==null&&u.indexOf(_)===-1&&u.push(_),a)}function ioe(a,u,h,S,_){switch(u){case"focusin":return af=Gv(af,a,u,h,S,_),!0;case"dragenter":return sf=Gv(sf,a,u,h,S,_),!0;case"mouseover":return lf=Gv(lf,a,u,h,S,_),!0;case"pointerover":var R=_.pointerId;return zv.set(R,Gv(zv.get(R)||null,a,u,h,S,_)),!0;case"gotpointercapture":return R=_.pointerId,Hv.set(R,Gv(Hv.get(R)||null,a,u,h,S,_)),!0}return!1}function Xj(a){var u=Fi(a.target);if(u!==null){var h=o(u);if(h!==null){if(u=h.tag,u===13){if(u=l(h),u!==null){a.blockedOn=u,Ft(a.priority,function(){if(h.tag===13){var S=da();S=un(S);var _=ou(h,S);_!==null&&pa(_,h,S),G_(h,S)}});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){a.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Q1(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var h=W_(a.nativeEvent);if(h===null){h=a.nativeEvent;var S=new h.constructor(h.type,h);Ip=S,h.target.dispatchEvent(S),Ip=null}else return u=$r(h),u!==null&&Wj(u),a.blockedOn=h,!1;u.shift()}return!0}function Zj(a,u,h){Q1(a)&&h.delete(u)}function ooe(){K_=!1,af!==null&&Q1(af)&&(af=null),sf!==null&&Q1(sf)&&(sf=null),lf!==null&&Q1(lf)&&(lf=null),zv.forEach(Zj),Hv.forEach(Zj)}function K1(a,u){a.blockedOn===u&&(a.blockedOn=null,K_||(K_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ooe)))}var X1=null;function Jj(a){X1!==a&&(X1=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){X1===a&&(X1=null);for(var u=0;u<a.length;u+=3){var h=a[u],S=a[u+1],_=a[u+2];if(typeof S!="function"){if(Q_(S||h)===null)continue;break}var R=$r(h);R!==null&&(a.splice(u,3),u-=3,Tu(R,{pending:!0,data:_,method:h.method,action:S},S,_))}}))}function Yv(a){function u(de){return K1(de,a)}af!==null&&K1(af,a),sf!==null&&K1(sf,a),lf!==null&&K1(lf,a),zv.forEach(u),Hv.forEach(u);for(var h=0;h<uf.length;h++){var S=uf[h];S.blockedOn===a&&(S.blockedOn=null)}for(;0<uf.length&&(h=uf[0],h.blockedOn===null);)Xj(h),h.blockedOn===null&&uf.shift();if(h=(a.ownerDocument||a).$$reactFormReplay,h!=null)for(S=0;S<h.length;S+=3){var _=h[S],R=h[S+1],G=_[bn]||null;if(typeof R=="function")G||Jj(h);else if(G){var te=null;if(R&&R.hasAttribute("formAction")){if(_=R,G=R[bn]||null)te=G.formAction;else if(Q_(_)!==null)continue}else te=G.action;typeof te=="function"?h[S+1]=te:(h.splice(S,3),S-=3),Jj(h)}}}function X_(a){this._internalRoot=a}Z1.prototype.render=X_.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,S=da();Gj(h,S,a,u,null,null)},Z1.prototype.unmount=X_.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;Gj(a.current,2,null,a,null,null),M1(),u[Ii]=null}};function Z1(a){this._internalRoot=a}Z1.prototype.unstable_scheduleHydration=function(a){if(a){var u=tr();a={blockedOn:null,target:a,priority:u};for(var h=0;h<uf.length&&u!==0&&u<uf[h].priority;h++);uf.splice(h,0,a),h===0&&Xj(a)}};var eV=t.version;if(eV!=="19.1.0")throw Error(r(527,eV,"19.1.0"));re.findDOMNode=function(a){var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=p(u),a=a!==null?d(a):null,a=a===null?null:a.stateNode,a};var aoe={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:ne,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var J1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!J1.isDisabled&&J1.supportsFiber)try{Ot=J1.inject(aoe),jt=J1}catch{}}return Qh.createRoot=function(a,u){if(!i(a))throw Error(r(299));var h=!1,S="",_=_v,R=Ch,G=_u,te=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(S=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(R=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(te=u.unstable_transitionCallbacks)),u=zj(a,1,!1,null,null,h,S,_,R,G,te,null),a[Ii]=u.current,M_(a),new X_(u)},Qh.hydrateRoot=function(a,u,h){if(!i(a))throw Error(r(299));var S=!1,_="",R=_v,G=Ch,te=_u,de=null,_e=null;return h!=null&&(h.unstable_strictMode===!0&&(S=!0),h.identifierPrefix!==void 0&&(_=h.identifierPrefix),h.onUncaughtError!==void 0&&(R=h.onUncaughtError),h.onCaughtError!==void 0&&(G=h.onCaughtError),h.onRecoverableError!==void 0&&(te=h.onRecoverableError),h.unstable_transitionCallbacks!==void 0&&(de=h.unstable_transitionCallbacks),h.formState!==void 0&&(_e=h.formState)),u=zj(a,1,!0,u,h??null,S,_,R,G,te,de,_e),u.context=Hj(null),h=u.current,S=da(),S=un(S),_=oa(S),_.callback=null,Ua(h,_,S),h=S,u.current.lanes=h,An(u,h),Nl(u),a[Ii]=u.current,M_(a),new Z1(u)},Qh.version="19.1.0",Qh}var cN;function lV(){if(cN)return nE.exports;cN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nE.exports=sV(),nE.exports}var uV=lV();function fN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fN(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function vi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fN(e))&&(r&&(r+=" "),r+=t);return r}const cV="16.11.0",Kv=Object.freeze({major:16,minor:11,patch:0,preReleaseTag:null});function Zt(e,t){if(!!!e)throw new Error(t)}function Uo(e){return typeof e?.then=="function"}function qo(e){return typeof e=="object"&&e!==null}function Vr(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const fV=/\r\n|[\n\r]/g;function Xv(e,t){let n=0,r=1;for(const i of e.body.matchAll(fV)){if(typeof i.index=="number"||Vr(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function dN(e){return aE(e.source,Xv(e.source,e.start))}function aE(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,l=t.line+o,c=t.line===1?n:0,p=t.column+c,d=`${e.name}:${l}:${p}
`,m=r.split(/\r\n|[\n\r]/g),b=m[i];if(b.length>120){const E=Math.floor(p/80),y=p%80,x=[];for(let w=0;w<b.length;w+=80)x.push(b.slice(w,w+80));return d+pN([[`${l} |`,x[0]],...x.slice(1,E+1).map(w=>["|",w]),["|","^".padStart(y)],["|",x[E+1]]])}return d+pN([[`${l-1} |`,m[i-1]],[`${l} |`,b],["|","^".padStart(p)],[`${l+1} |`,m[i+1]]])}function pN(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
`)}function dV(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class Me extends Error{constructor(t,...n){var r,i,o;const{nodes:l,source:c,positions:p,path:d,originalError:m,extensions:b}=dV(n);super(t),this.name="GraphQLError",this.path=d??void 0,this.originalError=m??void 0,this.nodes=hN(Array.isArray(l)?l:l?[l]:void 0);const E=hN((r=this.nodes)===null||r===void 0?void 0:r.map(x=>x.loc).filter(x=>x!=null));this.source=c??(E==null||(i=E[0])===null||i===void 0?void 0:i.source),this.positions=p??E?.map(x=>x.start),this.locations=p&&c?p.map(x=>Xv(c,x)):E?.map(x=>Xv(x.source,x.start));const y=qo(m?.extensions)?m?.extensions:void 0;this.extensions=(o=b??y)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),m!=null&&m.stack?Object.defineProperty(this,"stack",{value:m.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Me):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
`+dN(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
`+aE(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function hN(e){return e===void 0||e.length===0?void 0:e}function pV(e){return e.toString()}function hV(e){return e.toJSON()}function ii(e,t,n){return new Me(`Syntax Error: ${n}`,{source:e,positions:[t]})}let mN=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};class sE{constructor(t,n,r,i,o,l){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=o,this.value=l,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const gN={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},mV=new Set(Object.keys(gN));function lE(e){const t=e?.kind;return typeof t=="string"&&mV.has(t)}var oi;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(oi||(oi={}));var lt;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(lt||(lt={}));var K;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(K||(K={}));function uE(e){return e===9||e===32}function Kh(e){return e>=48&&e<=57}function vN(e){return e>=97&&e<=122||e>=65&&e<=90}function cE(e){return vN(e)||e===95}function yN(e){return vN(e)||Kh(e)||e===95}function gV(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let l=0;l<e.length;++l){var o;const c=e[l],p=vV(c);p!==c.length&&(r=(o=r)!==null&&o!==void 0?o:l,i=l,l!==0&&p<n&&(n=p))}return e.map((l,c)=>c===0?l:l.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function vV(e){let t=0;for(;t<e.length&&uE(e.charCodeAt(t));)++t;return t}function yV(e){if(e==="")return!0;let t=!0,n=!1,r=!0,i=!1;for(let o=0;o<e.length;++o)switch(e.codePointAt(o)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!(t||r&&i)}function bN(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(y=>y.length===0||uE(y.charCodeAt(0))),l=n.endsWith('\\"""'),c=e.endsWith('"')&&!l,p=e.endsWith("\\"),d=c||p,m=!(t!=null&&t.minimize)&&(!i||e.length>70||d||o||l);let b="";const E=i&&uE(e.charCodeAt(0));return(m&&!E||o)&&(b+=`
`),b+=n,(m||d)&&(b+=`
`),'"""'+b+'"""'}var Pe;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Pe||(Pe={}));class fE{constructor(t){const n=new sE(Pe.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==Pe.EOF)do if(t.next)t=t.next;else{const n=bV(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===Pe.COMMENT);return t}}function EN(e){return e===Pe.BANG||e===Pe.DOLLAR||e===Pe.AMP||e===Pe.PAREN_L||e===Pe.PAREN_R||e===Pe.SPREAD||e===Pe.COLON||e===Pe.EQUALS||e===Pe.AT||e===Pe.BRACKET_L||e===Pe.BRACKET_R||e===Pe.BRACE_L||e===Pe.PIPE||e===Pe.BRACE_R}function Pd(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Zv(e,t){return SN(e.charCodeAt(t))&&TN(e.charCodeAt(t+1))}function SN(e){return e>=55296&&e<=56319}function TN(e){return e>=56320&&e<=57343}function ff(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return Pe.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Wr(e,t,n,r,i){const o=e.line,l=1+n-e.lineStart;return new sE(t,n,r,o,l,i)}function bV(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return EV(e,i);case 33:return Wr(e,Pe.BANG,i,i+1);case 36:return Wr(e,Pe.DOLLAR,i,i+1);case 38:return Wr(e,Pe.AMP,i,i+1);case 40:return Wr(e,Pe.PAREN_L,i,i+1);case 41:return Wr(e,Pe.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Wr(e,Pe.SPREAD,i,i+3);break;case 58:return Wr(e,Pe.COLON,i,i+1);case 61:return Wr(e,Pe.EQUALS,i,i+1);case 64:return Wr(e,Pe.AT,i,i+1);case 91:return Wr(e,Pe.BRACKET_L,i,i+1);case 93:return Wr(e,Pe.BRACKET_R,i,i+1);case 123:return Wr(e,Pe.BRACE_L,i,i+1);case 124:return Wr(e,Pe.PIPE,i,i+1);case 125:return Wr(e,Pe.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?_V(e,i):TV(e,i)}if(Kh(o)||o===45)return SV(e,i,o);if(cE(o))return NV(e,i);throw ii(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Pd(o)||Zv(n,i)?`Unexpected character: ${ff(e,i)}.`:`Invalid character: ${ff(e,i)}.`)}return Wr(e,Pe.EOF,r,r)}function EV(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(o===10||o===13)break;if(Pd(o))++i;else if(Zv(n,i))i+=2;else break}return Wr(e,Pe.COMMENT,t,i,n.slice(t+1,i))}function SV(e,t,n){const r=e.source.body;let i=t,o=n,l=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Kh(o))throw ii(e.source,i,`Invalid number, unexpected digit after 0: ${ff(e,i)}.`)}else i=dE(e,i,o),o=r.charCodeAt(i);if(o===46&&(l=!0,o=r.charCodeAt(++i),i=dE(e,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(l=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=dE(e,i,o),o=r.charCodeAt(i)),o===46||cE(o))throw ii(e.source,i,`Invalid number, expected digit but got: ${ff(e,i)}.`);return Wr(e,l?Pe.FLOAT:Pe.INT,t,i,r.slice(t,i))}function dE(e,t,n){if(!Kh(n))throw ii(e.source,t,`Invalid number, expected digit but got: ${ff(e,t)}.`);const r=e.source.body;let i=t+1;for(;Kh(r.charCodeAt(i));)++i;return i}function TV(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,l="";for(;i<r;){const c=n.charCodeAt(i);if(c===34)return l+=n.slice(o,i),Wr(e,Pe.STRING,t,i+1,l);if(c===92){l+=n.slice(o,i);const p=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?xV(e,i):wV(e,i):CV(e,i);l+=p.value,i+=p.size,o=i;continue}if(c===10||c===13)break;if(Pd(c))++i;else if(Zv(n,i))i+=2;else throw ii(e.source,i,`Invalid character within String: ${ff(e,i)}.`)}throw ii(e.source,i,"Unterminated string.")}function xV(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const o=n.charCodeAt(t+i++);if(o===125){if(i<5||!Pd(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Xh(o),r<0)break}throw ii(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function wV(e,t){const n=e.source.body,r=xN(n,t+2);if(Pd(r))return{value:String.fromCodePoint(r),size:6};if(SN(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=xN(n,t+8);if(TN(i))return{value:String.fromCodePoint(r,i),size:12}}throw ii(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function xN(e,t){return Xh(e.charCodeAt(t))<<12|Xh(e.charCodeAt(t+1))<<8|Xh(e.charCodeAt(t+2))<<4|Xh(e.charCodeAt(t+3))}function Xh(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function CV(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ii(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function _V(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,l=o,c="";const p=[];for(;o<r;){const d=n.charCodeAt(o);if(d===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){c+=n.slice(l,o),p.push(c);const m=Wr(e,Pe.BLOCK_STRING,t,o+3,gV(p).join(`
`));return e.line+=p.length-1,e.lineStart=i,m}if(d===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){c+=n.slice(l,o),l=o+1,o+=4;continue}if(d===10||d===13){c+=n.slice(l,o),p.push(c),d===13&&n.charCodeAt(o+1)===10?o+=2:++o,c="",l=o,i=o;continue}if(Pd(d))++o;else if(Zv(n,o))o+=2;else throw ii(e.source,o,`Invalid character within String: ${ff(e,o)}.`)}throw ii(e.source,o,"Unterminated string.")}function NV(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(yN(o))++i;else break}return Wr(e,Pe.NAME,t,i,n.slice(t,i))}const AV=10,wN=2;function Ue(e){return Jv(e,[])}function Jv(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return OV(e,t);default:return String(e)}}function OV(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(DV(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Jv(r,n)}else if(Array.isArray(e))return RV(e,n);return kV(e,n)}function DV(e){return typeof e.toJSON=="function"}function kV(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>wN?"["+MV(e)+"]":"{ "+n.map(([i,o])=>i+": "+Jv(o,t)).join(", ")+" }"}function RV(e,t){if(e.length===0)return"[]";if(t.length>wN)return"[Array]";const n=Math.min(AV,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(Jv(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function MV(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const Xa=globalThis.process&&!0?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===o){const l=Ue(t);throw new Error(`Cannot use ${i} "${l}" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};class Zh{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Zt(!1,`Body must be a string. Received: ${Ue(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Zt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Zt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function CN(e){return Xa(e,Zh)}function Ai(e,t){const n=new ey(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}function _N(e,t){const n=new ey(e,t);n.expectToken(Pe.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(Pe.EOF),r}function LV(e,t){const n=new ey(e,t);n.expectToken(Pe.SOF);const r=n.parseConstValueLiteral();return n.expectToken(Pe.EOF),r}function IV(e,t){const n=new ey(e,t);n.expectToken(Pe.SOF);const r=n.parseTypeReference();return n.expectToken(Pe.EOF),r}class ey{constructor(t,n={}){const r=CN(t)?t:new Zh(t);this._lexer=new fE(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(Pe.NAME);return this.node(t,{kind:K.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:K.DOCUMENT,definitions:this.many(Pe.SOF,this.parseDefinition,Pe.EOF)})}parseDefinition(){if(this.peek(Pe.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Pe.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw ii(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(Pe.BRACE_L))return this.node(t,{kind:K.OPERATION_DEFINITION,operation:oi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(Pe.NAME)&&(r=this.parseName()),this.node(t,{kind:K.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(Pe.NAME);switch(t.value){case"query":return oi.QUERY;case"mutation":return oi.MUTATION;case"subscription":return oi.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Pe.PAREN_L,this.parseVariableDefinition,Pe.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:K.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Pe.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Pe.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(Pe.DOLLAR),this.node(t,{kind:K.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:K.SELECTION_SET,selections:this.many(Pe.BRACE_L,this.parseSelection,Pe.BRACE_R)})}parseSelection(){return this.peek(Pe.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(Pe.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:K.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Pe.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Pe.PAREN_L,n,Pe.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(Pe.COLON),this.node(n,{kind:K.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(Pe.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Pe.NAME)?this.node(t,{kind:K.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:K.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case Pe.BRACKET_L:return this.parseList(t);case Pe.BRACE_L:return this.parseObject(t);case Pe.INT:return this.advanceLexer(),this.node(n,{kind:K.INT,value:n.value});case Pe.FLOAT:return this.advanceLexer(),this.node(n,{kind:K.FLOAT,value:n.value});case Pe.STRING:case Pe.BLOCK_STRING:return this.parseStringLiteral();case Pe.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:K.BOOLEAN,value:!0});case"false":return this.node(n,{kind:K.BOOLEAN,value:!1});case"null":return this.node(n,{kind:K.NULL});default:return this.node(n,{kind:K.ENUM,value:n.value})}case Pe.DOLLAR:if(t)if(this.expectToken(Pe.DOLLAR),this._lexer.token.kind===Pe.NAME){const r=this._lexer.token.value;throw ii(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:K.STRING,value:t.value,block:t.kind===Pe.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:K.LIST,values:this.any(Pe.BRACKET_L,n,Pe.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:K.OBJECT,fields:this.any(Pe.BRACE_L,n,Pe.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(Pe.COLON),this.node(n,{kind:K.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(Pe.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(Pe.AT),this.node(n,{kind:K.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(Pe.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Pe.BRACKET_R),n=this.node(t,{kind:K.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Pe.BANG)?this.node(t,{kind:K.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:K.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Pe.STRING)||this.peek(Pe.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(Pe.BRACE_L,this.parseOperationTypeDefinition,Pe.BRACE_R);return this.node(t,{kind:K.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(Pe.COLON);const r=this.parseNamedType();return this.node(t,{kind:K.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:K.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),l=this.parseFieldsDefinition();return this.node(t,{kind:K.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:l})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Pe.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Pe.BRACE_L,this.parseFieldDefinition,Pe.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Pe.COLON);const o=this.parseTypeReference(),l=this.parseConstDirectives();return this.node(t,{kind:K.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:l})}parseArgumentDefs(){return this.optionalMany(Pe.PAREN_L,this.parseInputValueDef,Pe.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Pe.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(Pe.EQUALS)&&(o=this.parseConstValueLiteral());const l=this.parseConstDirectives();return this.node(t,{kind:K.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:l})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),l=this.parseFieldsDefinition();return this.node(t,{kind:K.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:l})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:K.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(Pe.EQUALS)?this.delimitedMany(Pe.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:K.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(Pe.BRACE_L,this.parseEnumValueDefinition,Pe.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:K.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ii(this._lexer.source,this._lexer.token.start,`${ty(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(Pe.BRACE_L,this.parseInputValueDef,Pe.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===Pe.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(Pe.BRACE_L,this.parseOperationTypeDefinition,Pe.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:K.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:K.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Pe.AT);const r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const l=this.parseDirectiveLocations();return this.node(t,{kind:K.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:l})}parseDirectiveLocations(){return this.delimitedMany(Pe.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(lt,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new mN(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw ii(this._lexer.source,n.start,`Expected ${NN(t)}, found ${ty(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===Pe.NAME&&n.value===t)this.advanceLexer();else throw ii(this._lexer.source,n.start,`Expected "${t}", found ${ty(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===Pe.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return ii(this._lexer.source,n.start,`Unexpected ${ty(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==Pe.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw ii(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function ty(e){const t=e.value;return NN(e.kind)+(t!=null?` "${t}"`:"")}function NN(e){return EN(e)?`"${e}"`:e}const FV=5;function Al(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const o=r.map(p=>`"${p}"`);switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}const l=o.slice(0,FV),c=l.pop();return i+l.join(", ")+", or "+c+"?"}function AN(e){return e}function Ol(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function ku(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function Dl(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function Jh(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),o=t.charCodeAt(r);if(ny(i)&&ny(o)){let l=0;do++n,l=l*10+i-pE,i=e.charCodeAt(n);while(ny(i)&&l>0);let c=0;do++r,c=c*10+o-pE,o=t.charCodeAt(r);while(ny(o)&&c>0);if(l<c)return-1;if(l>c)return 1}else{if(i<o)return-1;if(i>o)return 1;++n,++r}}return e.length-t.length}const pE=48,PV=57;function ny(e){return!isNaN(e)&&pE<=e&&e<=PV}function Ru(e,t){const n=Object.create(null),r=new jV(e),i=Math.floor(e.length*.4)+1;for(const o of t){const l=r.measure(o,i);l!==void 0&&(n[o]=l)}return Object.keys(n).sort((o,l)=>{const c=n[o]-n[l];return c!==0?c:Jh(o,l)})}class jV{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=ON(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=ON(r),o=this._inputArray;if(i.length<o.length){const m=i;i=o,o=m}const l=i.length,c=o.length;if(l-c>n)return;const p=this._rows;for(let m=0;m<=c;m++)p[0][m]=m;for(let m=1;m<=l;m++){const b=p[(m-1)%3],E=p[m%3];let y=E[0]=m;for(let x=1;x<=c;x++){const w=i[m-1]===o[x-1]?0:1;let k=Math.min(b[x]+1,E[x-1]+1,b[x-1]+w);if(m>1&&x>1&&i[m-1]===o[x-2]&&i[m-2]===o[x-1]){const N=p[(m-2)%3][x-2];k=Math.min(k,N+1)}k<y&&(y=k),E[x]=k}if(y>n)return}const d=p[l%3][c];return d<=n?d:void 0}}function ON(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function ha(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function VV(e){return`"${e.replace(UV,qV)}"`}const UV=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function qV(e){return BV[e.charCodeAt(0)]}const BV=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],df=Object.freeze({});function Tr(e,t,n=gN){const r=new Map;for(const N of Object.values(K))r.set(N,jd(t,N));let i,o=Array.isArray(e),l=[e],c=-1,p=[],d=e,m,b;const E=[],y=[];do{c++;const N=c===l.length,D=N&&p.length!==0;if(N){if(m=y.length===0?void 0:E[E.length-1],d=b,b=y.pop(),D)if(o){d=d.slice();let C=0;for(const[M,j]of p){const P=M-C;j===null?(d.splice(P,1),C++):d[P]=j}}else{d={...d};for(const[C,M]of p)d[C]=M}c=i.index,l=i.keys,p=i.edits,o=i.inArray,i=i.prev}else if(b){if(m=o?c:l[c],d=b[m],d==null)continue;E.push(m)}let A;if(!Array.isArray(d)){var x,w;lE(d)||Zt(!1,`Invalid AST Node: ${Ue(d)}.`);const C=N?(x=r.get(d.kind))===null||x===void 0?void 0:x.leave:(w=r.get(d.kind))===null||w===void 0?void 0:w.enter;if(A=C?.call(t,d,m,b,E,y),A===df)break;if(A===!1){if(!N){E.pop();continue}}else if(A!==void 0&&(p.push([m,A]),!N))if(lE(A))d=A;else{E.pop();continue}}if(A===void 0&&D&&p.push([m,d]),N)E.pop();else{var k;i={inArray:o,index:c,keys:l,edits:p,prev:i},o=Array.isArray(d),l=o?d:(k=n[d.kind])!==null&&k!==void 0?k:[],c=-1,p=[],b&&y.push(b),b=d}}while(i!==void 0);return p.length!==0?p[p.length-1][1]:e}function hE(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(K)){let i=!1;const o=new Array(e.length).fill(void 0),l=new Array(e.length).fill(void 0);for(let p=0;p<e.length;++p){const{enter:d,leave:m}=jd(e[p],r);i||(i=d!=null||m!=null),o[p]=d,l[p]=m}if(!i)continue;const c={enter(...p){const d=p[0];for(let b=0;b<e.length;b++)if(t[b]===null){var m;const E=(m=o[b])===null||m===void 0?void 0:m.apply(e[b],p);if(E===!1)t[b]=d;else if(E===df)t[b]=df;else if(E!==void 0)return E}},leave(...p){const d=p[0];for(let b=0;b<e.length;b++)if(t[b]===null){var m;const E=(m=l[b])===null||m===void 0?void 0:m.apply(e[b],p);if(E===df)t[b]=df;else if(E!==void 0&&E!==!1)return E}else t[b]===d&&(t[b]=null)}};n[r]=c}return n}function jd(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function $V(e,t,n){const{enter:r,leave:i}=jd(e,t);return n?i:r}function pn(e){return Tr(e,HV)}const zV=80,HV={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>xt(e.definitions,`
`)},OperationDefinition:{leave(e){const t=hn("(",xt(e.variableDefinitions,", "),")"),n=xt([e.operation,xt([e.name,t]),xt(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+hn(" = ",n)+hn(" ",xt(r," "))},SelectionSet:{leave:({selections:e})=>Za(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=hn("",e,": ")+t;let l=o+hn("(",xt(n,", "),")");return l.length>zV&&(l=o+hn(`(
`,ry(xt(n,`
`)),`
)`)),xt([l,xt(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+hn(" ",xt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>xt(["...",hn("on ",e),xt(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${hn("(",xt(n,", "),")")} on ${t} ${hn("",xt(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?bN(e):VV(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+xt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+xt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+hn("(",xt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>hn("",e,`
`)+xt(["schema",xt(t," "),Za(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>hn("",e,`
`)+xt(["scalar",t,xt(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>hn("",e,`
`)+xt(["type",t,hn("implements ",xt(n," & ")),xt(r," "),Za(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>hn("",e,`
`)+t+(DN(n)?hn(`(
`,ry(xt(n,`
`)),`
)`):hn("(",xt(n,", "),")"))+": "+r+hn(" ",xt(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>hn("",e,`
`)+xt([t+": "+n,hn("= ",r),xt(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>hn("",e,`
`)+xt(["interface",t,hn("implements ",xt(n," & ")),xt(r," "),Za(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>hn("",e,`
`)+xt(["union",t,xt(n," "),hn("= ",xt(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>hn("",e,`
`)+xt(["enum",t,xt(n," "),Za(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>hn("",e,`
`)+xt([t,xt(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>hn("",e,`
`)+xt(["input",t,xt(n," "),Za(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>hn("",e,`
`)+"directive @"+t+(DN(n)?hn(`(
`,ry(xt(n,`
`)),`
)`):hn("(",xt(n,", "),")"))+(r?" repeatable":"")+" on "+xt(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>xt(["extend schema",xt(e," "),Za(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>xt(["extend scalar",e,xt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>xt(["extend type",e,hn("implements ",xt(t," & ")),xt(n," "),Za(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>xt(["extend interface",e,hn("implements ",xt(t," & ")),xt(n," "),Za(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>xt(["extend union",e,xt(t," "),hn("= ",xt(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>xt(["extend enum",e,xt(t," "),Za(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>xt(["extend input",e,xt(t," "),Za(n)]," ")}};function xt(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Za(e){return hn(`{
`,ry(xt(e,`
`)),`
}`)}function hn(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function ry(e){return hn(" ",e.replace(/\n/g,`
`))}function DN(e){var t;return(t=e?.some(n=>n.includes(`
`)))!==null&&t!==void 0?t:!1}function iy(e,t){switch(e.kind){case K.NULL:return null;case K.INT:return parseInt(e.value,10);case K.FLOAT:return parseFloat(e.value);case K.STRING:case K.ENUM:case K.BOOLEAN:return e.value;case K.LIST:return e.values.map(n=>iy(n,t));case K.OBJECT:return ku(e.fields,n=>n.name.value,n=>iy(n.value,t));case K.VARIABLE:return t?.[e.name.value]}}function Bo(e){if(e!=null||Zt(!1,"Must provide name."),typeof e=="string"||Zt(!1,"Expected name to be a string."),e.length===0)throw new Me("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!yN(e.charCodeAt(t)))throw new Me(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!cE(e.charCodeAt(0)))throw new Me(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function kN(e){if(e==="true"||e==="false"||e==="null")throw new Me(`Enum values cannot be named: ${e}`);return Bo(e)}function Vd(e){return Oi(e)||At(e)||Rt(e)||ar(e)||Wn(e)||nn(e)||mn(e)||_t(e)}function GV(e){if(!Vd(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL type.`);return e}function Oi(e){return Xa(e,ma)}function YV(e){if(!Oi(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Scalar type.`);return e}function At(e){return Xa(e,si)}function RN(e){if(!At(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Object type.`);return e}function Rt(e){return Xa(e,ao)}function MN(e){if(!Rt(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Interface type.`);return e}function ar(e){return Xa(e,Iu)}function WV(e){if(!ar(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Union type.`);return e}function Wn(e){return Xa(e,Hi)}function QV(e){if(!Wn(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Enum type.`);return e}function nn(e){return Xa(e,so)}function KV(e){if(!nn(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Input Object type.`);return e}function mn(e){return Xa(e,lr)}function XV(e){if(!mn(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL List type.`);return e}function _t(e){return Xa(e,Pt)}function ZV(e){if(!_t(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL Non-Null type.`);return e}function Di(e){return Oi(e)||Wn(e)||nn(e)||em(e)&&Di(e.ofType)}function JV(e){if(!Di(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL input type.`);return e}function kl(e){return Oi(e)||At(e)||Rt(e)||ar(e)||Wn(e)||em(e)&&kl(e.ofType)}function e6(e){if(!kl(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL output type.`);return e}function ai(e){return Oi(e)||Wn(e)}function t6(e){if(!ai(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL leaf type.`);return e}function Qr(e){return At(e)||Rt(e)||ar(e)}function n6(e){if(!Qr(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL composite type.`);return e}function sr(e){return Rt(e)||ar(e)}function LN(e){if(!sr(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL abstract type.`);return e}class lr{constructor(t){Vd(t)||Zt(!1,`Expected ${Ue(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class Pt{constructor(t){tm(t)||Zt(!1,`Expected ${Ue(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function em(e){return mn(e)||_t(e)}function r6(e){if(!em(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL wrapping type.`);return e}function tm(e){return Vd(e)&&!_t(e)}function IN(e){if(!tm(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL nullable type.`);return e}function Mu(e){if(e)return _t(e)?e.ofType:e}function Rl(e){return Oi(e)||At(e)||Rt(e)||ar(e)||Wn(e)||nn(e)}function i6(e){if(!Rl(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL named type.`);return e}function gn(e){if(e){let t=e;for(;em(t);)t=t.ofType;return t}}function mE(e){return typeof e=="function"?e():e}function gE(e){return typeof e=="function"?e():e}class ma{constructor(t){var n,r,i,o;const l=(n=t.parseValue)!==null&&n!==void 0?n:AN;this.name=Bo(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:AN,this.parseValue=l,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,p)=>l(iy(c,p)),this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(o=t.extensionASTNodes)!==null&&o!==void 0?o:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||Zt(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Ue(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||Zt(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Zt(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class si{constructor(t){var n;this.name=Bo(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>PN(t),this._interfaces=()=>FN(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||Zt(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Ue(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:VN(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function FN(e){var t;const n=mE((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||Zt(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function PN(e){const t=gE(e.fields);return Ud(t)||Zt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Dl(t,(n,r)=>{var i;Ud(n)||Zt(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||Zt(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${Ue(n.resolve)}.`);const o=(i=n.args)!==null&&i!==void 0?i:{};return Ud(o)||Zt(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Bo(r),description:n.description,type:n.type,args:jN(o),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:ha(n.extensions),astNode:n.astNode}})}function jN(e){return Object.entries(e).map(([t,n])=>({name:Bo(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:ha(n.extensions),astNode:n.astNode}))}function Ud(e){return qo(e)&&!Array.isArray(e)}function VN(e){return Dl(e,t=>({description:t.description,type:t.type,args:UN(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function UN(e){return ku(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Lu(e){return _t(e.type)&&e.defaultValue===void 0}class ao{constructor(t){var n;this.name=Bo(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=PN.bind(void 0,t),this._interfaces=FN.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Zt(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ue(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:VN(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Iu{constructor(t){var n;this.name=Bo(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=o6.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Zt(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ue(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function o6(e){const t=mE(e.types);return Array.isArray(t)||Zt(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class Hi{constructor(t){var n;this.name=Bo(t.name),this.description=t.description,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:qN(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=qN(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=Ol(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));const n=this._valueLookup.get(t);if(n===void 0)throw new Me(`Enum "${this.name}" cannot represent value: ${Ue(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=Ue(t);throw new Me(`Enum "${this.name}" cannot represent non-string value: ${r}.`+oy(this,r))}const n=this.getValue(t);if(n==null)throw new Me(`Value "${t}" does not exist in "${this.name}" enum.`+oy(this,t));return n.value}parseLiteral(t,n){if(t.kind!==K.ENUM){const i=pn(t);throw new Me(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+oy(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=pn(t);throw new Me(`Value "${i}" does not exist in "${this.name}" enum.`+oy(this,i),{nodes:t})}return r.value}toConfig(){const t=ku(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function oy(e,t){const n=e.getValues().map(i=>i.name),r=Ru(t,n);return Al("the enum value",r)}function qN(e,t){return Ud(t)||Zt(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Ud(r)||Zt(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${Ue(r)}.`),{name:kN(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:ha(r.extensions),astNode:r.astNode}))}class so{constructor(t){var n,r;this.name=Bo(t.name),this.description=t.description,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=a6.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=Dl(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function a6(e){const t=gE(e.fields);return Ud(t)||Zt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Dl(t,(n,r)=>(!("resolve"in n)||Zt(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Bo(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:ha(n.extensions),astNode:n.astNode}))}function ay(e){return _t(e.type)&&e.defaultValue===void 0}function sy(e,t){return e===t?!0:_t(e)&&_t(t)||mn(e)&&mn(t)?sy(e.ofType,t.ofType):!1}function pf(e,t,n){return t===n?!0:_t(n)?_t(t)?pf(e,t.ofType,n.ofType):!1:_t(t)?pf(e,t.ofType,n):mn(n)?mn(t)?pf(e,t.ofType,n.ofType):!1:mn(t)?!1:sr(n)&&(Rt(t)||At(t))&&e.isSubType(n,t)}function nm(e,t,n){return t===n?!0:sr(t)?sr(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):sr(n)?e.isSubType(n,t):!1}const ly=2147483647,uy=-2147483648,rm=new ma({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=lm(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new Me(`Int cannot represent non-integer value: ${Ue(t)}`);if(n>ly||n<uy)throw new Me("Int cannot represent non 32-bit signed integer value: "+Ue(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new Me(`Int cannot represent non-integer value: ${Ue(e)}`);if(e>ly||e<uy)throw new Me(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==K.INT)throw new Me(`Int cannot represent non-integer value: ${pn(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>ly||t<uy)throw new Me(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),im=new ma({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=lm(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new Me(`Float cannot represent non numeric value: ${Ue(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new Me(`Float cannot represent non numeric value: ${Ue(e)}`);return e},parseLiteral(e){if(e.kind!==K.FLOAT&&e.kind!==K.INT)throw new Me(`Float cannot represent non numeric value: ${pn(e)}`,e);return parseFloat(e.value)}}),Xn=new ma({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=lm(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new Me(`String cannot represent value: ${Ue(e)}`)},parseValue(e){if(typeof e!="string")throw new Me(`String cannot represent a non string value: ${Ue(e)}`);return e},parseLiteral(e){if(e.kind!==K.STRING)throw new Me(`String cannot represent a non string value: ${pn(e)}`,{nodes:e});return e.value}}),Zn=new ma({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=lm(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new Me(`Boolean cannot represent a non boolean value: ${Ue(t)}`)},parseValue(e){if(typeof e!="boolean")throw new Me(`Boolean cannot represent a non boolean value: ${Ue(e)}`);return e},parseLiteral(e){if(e.kind!==K.BOOLEAN)throw new Me(`Boolean cannot represent a non boolean value: ${pn(e)}`,{nodes:e});return e.value}}),om=new ma({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=lm(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new Me(`ID cannot represent value: ${Ue(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new Me(`ID cannot represent value: ${Ue(e)}`)},parseLiteral(e){if(e.kind!==K.STRING&&e.kind!==K.INT)throw new Me("ID cannot represent a non-string and non-integer value: "+pn(e),{nodes:e});return e.value}}),am=Object.freeze([Xn,rm,im,Zn,om]);function sm(e){return am.some(({name:t})=>e.name===t)}function lm(e){if(qo(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!qo(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function cy(e){return Xa(e,To)}function s6(e){if(!cy(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL directive.`);return e}class To{constructor(t){var n,r;this.name=Bo(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=ha(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||Zt(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};qo(i)&&!Array.isArray(i)||Zt(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=jN(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:UN(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const fy=new To({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[lt.FIELD,lt.FRAGMENT_SPREAD,lt.INLINE_FRAGMENT],args:{if:{type:new Pt(Zn),description:"Included when true."}}}),dy=new To({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[lt.FIELD,lt.FRAGMENT_SPREAD,lt.INLINE_FRAGMENT],args:{if:{type:new Pt(Zn),description:"Skipped when true."}}}),vE="No longer supported",py=new To({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[lt.FIELD_DEFINITION,lt.ARGUMENT_DEFINITION,lt.INPUT_FIELD_DEFINITION,lt.ENUM_VALUE],args:{reason:{type:Xn,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:vE}}}),yE=new To({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[lt.SCALAR],args:{url:{type:new Pt(Xn),description:"The URL that specifies the behavior of this scalar."}}}),bE=new To({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[lt.INPUT_OBJECT],args:{}}),Fu=Object.freeze([fy,dy,py,yE,bE]);function hy(e){return Fu.some(({name:t})=>t===e.name)}function EE(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function Ml(e,t){if(_t(t)){const n=Ml(e,t.ofType);return n?.kind===K.NULL?null:n}if(e===null)return{kind:K.NULL};if(e===void 0)return null;if(mn(t)){const n=t.ofType;if(EE(e)){const r=[];for(const i of e){const o=Ml(i,n);o!=null&&r.push(o)}return{kind:K.LIST,values:r}}return Ml(e,n)}if(nn(t)){if(!qo(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=Ml(e[r.name],r.type);i&&n.push({kind:K.OBJECT_FIELD,name:{kind:K.NAME,value:r.name},value:i})}return{kind:K.OBJECT,fields:n}}if(ai(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:K.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return BN.test(r)?{kind:K.INT,value:r}:{kind:K.FLOAT,value:r}}if(typeof n=="string")return Wn(t)?{kind:K.ENUM,value:n}:t===om&&BN.test(n)?{kind:K.INT,value:n}:{kind:K.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${Ue(n)}.`)}Vr(!1,"Unexpected input type: "+Ue(t))}const BN=/^-?(?:0|[1-9][0-9]*)$/,my=new si({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Xn,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Pt(new lr(new Pt(ga))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Pt(ga),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:ga,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:ga,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Pt(new lr(new Pt(SE))),resolve:e=>e.getDirectives()}})}),SE=new si({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Pt(Xn),resolve:e=>e.name},description:{type:Xn,resolve:e=>e.description},isRepeatable:{type:new Pt(Zn),resolve:e=>e.isRepeatable},locations:{type:new Pt(new lr(new Pt(TE))),resolve:e=>e.locations},args:{type:new Pt(new lr(new Pt(um))),args:{includeDeprecated:{type:Zn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),TE=new Hi({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:lt.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:lt.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:lt.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:lt.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:lt.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:lt.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:lt.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:lt.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:lt.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:lt.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:lt.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:lt.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:lt.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:lt.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:lt.UNION,description:"Location adjacent to a union definition."},ENUM:{value:lt.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:lt.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:lt.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:lt.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),ga=new si({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Pt(CE),resolve(e){if(Oi(e))return Un.SCALAR;if(At(e))return Un.OBJECT;if(Rt(e))return Un.INTERFACE;if(ar(e))return Un.UNION;if(Wn(e))return Un.ENUM;if(nn(e))return Un.INPUT_OBJECT;if(mn(e))return Un.LIST;if(_t(e))return Un.NON_NULL;Vr(!1,`Unexpected type: "${Ue(e)}".`)}},name:{type:Xn,resolve:e=>"name"in e?e.name:void 0},description:{type:Xn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Xn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new lr(new Pt(xE)),args:{includeDeprecated:{type:Zn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(At(e)||Rt(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new lr(new Pt(ga)),resolve(e){if(At(e)||Rt(e))return e.getInterfaces()}},possibleTypes:{type:new lr(new Pt(ga)),resolve(e,t,n,{schema:r}){if(sr(e))return r.getPossibleTypes(e)}},enumValues:{type:new lr(new Pt(wE)),args:{includeDeprecated:{type:Zn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Wn(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new lr(new Pt(um)),args:{includeDeprecated:{type:Zn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(nn(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:ga,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Zn,resolve:e=>{if(nn(e))return e.isOneOf}}})}),xE=new si({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Pt(Xn),resolve:e=>e.name},description:{type:Xn,resolve:e=>e.description},args:{type:new Pt(new lr(new Pt(um))),args:{includeDeprecated:{type:Zn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new Pt(ga),resolve:e=>e.type},isDeprecated:{type:new Pt(Zn),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Xn,resolve:e=>e.deprecationReason}})}),um=new si({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Pt(Xn),resolve:e=>e.name},description:{type:Xn,resolve:e=>e.description},type:{type:new Pt(ga),resolve:e=>e.type},defaultValue:{type:Xn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=Ml(n,t);return r?pn(r):null}},isDeprecated:{type:new Pt(Zn),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Xn,resolve:e=>e.deprecationReason}})}),wE=new si({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Pt(Xn),resolve:e=>e.name},description:{type:Xn,resolve:e=>e.description},isDeprecated:{type:new Pt(Zn),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Xn,resolve:e=>e.deprecationReason}})});var Un;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(Un||(Un={}));const CE=new Hi({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Un.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Un.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Un.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Un.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Un.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Un.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Un.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Un.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),va={name:"__schema",type:new Pt(my),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ya={name:"__type",type:ga,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Pt(Xn),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ba={name:"__typename",type:new Pt(Xn),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},cm=Object.freeze([my,SE,TE,ga,xE,um,wE,CE]);function hf(e){return cm.some(({name:t})=>e.name===t)}function gy(e){return Xa(e,mf)}function _E(e){if(!gy(e))throw new Error(`Expected ${Ue(e)} to be a GraphQL schema.`);return e}class mf{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,qo(t)||Zt(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||Zt(!1,`"types" must be Array if provided but got: ${Ue(t.types)}.`),!t.directives||Array.isArray(t.directives)||Zt(!1,`"directives" must be Array if provided but got: ${Ue(t.directives)}.`),this.description=t.description,this.extensions=ha(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Fu;const i=new Set(t.types);if(t.types!=null)for(const o of t.types)i.delete(o),Ja(o,i);this._queryType!=null&&Ja(this._queryType,i),this._mutationType!=null&&Ja(this._mutationType,i),this._subscriptionType!=null&&Ja(this._subscriptionType,i);for(const o of this._directives)if(cy(o))for(const l of o.args)Ja(l.type,i);Ja(my,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const o of i){if(o==null)continue;const l=o.name;if(l||Zt(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[l]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${l}".`);if(this._typeMap[l]=o,Rt(o)){for(const c of o.getInterfaces())if(Rt(c)){let p=this._implementationsMap[c.name];p===void 0&&(p=this._implementationsMap[c.name]={objects:[],interfaces:[]}),p.interfaces.push(o)}}else if(At(o)){for(const c of o.getInterfaces())if(Rt(c)){let p=this._implementationsMap[c.name];p===void 0&&(p=this._implementationsMap[c.name]={objects:[],interfaces:[]}),p.objects.push(o)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case oi.QUERY:return this.getQueryType();case oi.MUTATION:return this.getMutationType();case oi.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return ar(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),ar(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const o of i.objects)r[o.name]=!0;for(const o of i.interfaces)r[o.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Ja(e,t){const n=gn(e);if(!t.has(n)){if(t.add(n),ar(n))for(const r of n.getTypes())Ja(r,t);else if(At(n)||Rt(n)){for(const r of n.getInterfaces())Ja(r,t);for(const r of Object.values(n.getFields())){Ja(r.type,t);for(const i of r.args)Ja(i.type,t)}}else if(nn(n))for(const r of Object.values(n.getFields()))Ja(r.type,t)}return t}function vy(e){if(_E(e),e.__validationErrors)return e.__validationErrors;const t=new l6(e);u6(t),c6(t),f6(t);const n=t.getErrors();return e.__validationErrors=n,n}function yy(e){const t=vy(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}class l6{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new Me(t,{nodes:r}))}getErrors(){return this._errors}}function u6(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!At(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${Ue(n)}.`,(r=NE(t,oi.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!At(i)){var o;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Ue(i)}.`,(o=NE(t,oi.MUTATION))!==null&&o!==void 0?o:i.astNode)}const l=t.getSubscriptionType();if(l&&!At(l)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Ue(l)}.`,(c=NE(t,oi.SUBSCRIPTION))!==null&&c!==void 0?c:l.astNode)}}function NE(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function c6(e){for(const n of e.schema.getDirectives()){if(!cy(n)){e.reportError(`Expected directive but got: ${Ue(n)}.`,n?.astNode);continue}gf(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const r of n.args)if(gf(e,r),Di(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${Ue(r.type)}.`,r.astNode),Lu(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[AE(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function gf(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function f6(e){const t=y6(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!Rl(r)){e.reportError(`Expected GraphQL named type but got: ${Ue(r)}.`,r.astNode);continue}hf(r)||gf(e,r),At(r)||Rt(r)?($N(e,r),zN(e,r)):ar(r)?h6(e,r):Wn(r)?m6(e,r):nn(r)&&(g6(e,r),t(r))}}function $N(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const l of n){if(gf(e,l),!kl(l.type)){var r;e.reportError(`The type of ${t.name}.${l.name} must be Output Type but got: ${Ue(l.type)}.`,(r=l.astNode)===null||r===void 0?void 0:r.type)}for(const c of l.args){const p=c.name;if(gf(e,c),!Di(c.type)){var i;e.reportError(`The type of ${t.name}.${l.name}(${p}:) must be Input Type but got: ${Ue(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if(Lu(c)&&c.deprecationReason!=null){var o;e.reportError(`Required argument ${t.name}.${l.name}(${p}:) cannot be deprecated.`,[AE(c.astNode),(o=c.astNode)===null||o===void 0?void 0:o.type])}}}}function zN(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!Rt(r)){e.reportError(`Type ${Ue(t)} must only implement Interface types, it cannot implement ${Ue(r)}.`,fm(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,fm(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,fm(t,r));continue}n[r.name]=!0,p6(e,t,r),d6(e,t,r)}}function d6(e,t,n){const r=t.getFields();for(const p of Object.values(n.getFields())){const d=p.name,m=r[d];if(!m){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[p.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!pf(e.schema,m.type,p.type)){var i,o;e.reportError(`Interface field ${n.name}.${d} expects type ${Ue(p.type)} but ${t.name}.${d} is type ${Ue(m.type)}.`,[(i=p.astNode)===null||i===void 0?void 0:i.type,(o=m.astNode)===null||o===void 0?void 0:o.type])}for(const b of p.args){const E=b.name,y=m.args.find(x=>x.name===E);if(!y){e.reportError(`Interface field argument ${n.name}.${d}(${E}:) expected but ${t.name}.${d} does not provide it.`,[b.astNode,m.astNode]);continue}if(!sy(b.type,y.type)){var l,c;e.reportError(`Interface field argument ${n.name}.${d}(${E}:) expects type ${Ue(b.type)} but ${t.name}.${d}(${E}:) is type ${Ue(y.type)}.`,[(l=b.astNode)===null||l===void 0?void 0:l.type,(c=y.astNode)===null||c===void 0?void 0:c.type])}}for(const b of m.args){const E=b.name;!p.args.find(x=>x.name===E)&&Lu(b)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${E} that is missing from the Interface field ${n.name}.${d}.`,[b.astNode,p.astNode])}}}function p6(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...fm(n,i),...fm(t,n)])}function h6(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,HN(t,i.name));continue}r[i.name]=!0,At(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Ue(i)}.`,HN(t,String(i)))}}function m6(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)gf(e,r)}function g6(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(gf(e,o),!Di(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Input Type but got: ${Ue(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}if(ay(o)&&o.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${o.name} cannot be deprecated.`,[AE(o.astNode),(i=o.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&v6(t,o,e)}}function v6(e,t,n){if(_t(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function y6(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(o){if(t[o.name])return;t[o.name]=!0,r[o.name]=n.length;const l=Object.values(o.getFields());for(const c of l)if(_t(c.type)&&nn(c.type.ofType)){const p=c.type.ofType,d=r[p.name];if(n.push(c),d===void 0)i(p);else{const m=n.slice(d),b=m.map(E=>E.name).join(".");e.reportError(`Cannot reference Input Object "${p.name}" within itself through a series of non-null fields: "${b}".`,m.map(E=>E.astNode))}n.pop()}r[o.name]=void 0}}function fm(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(o=>{var l;return(l=o.interfaces)!==null&&l!==void 0?l:[]}).filter(o=>o.name.value===t.name)}function HN(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(o=>{var l;return(l=o.types)!==null&&l!==void 0?l:[]}).filter(o=>o.name.value===t)}function AE(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===py.name)}function yi(e,t){switch(t.kind){case K.LIST_TYPE:{const n=yi(e,t.type);return n&&new lr(n)}case K.NON_NULL_TYPE:{const n=yi(e,t.type);return n&&new Pt(n)}case K.NAMED_TYPE:return e.getType(t.name.value)}}class Pu{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??b6,n&&(Di(n)&&this._inputTypeStack.push(n),Qr(n)&&this._parentTypeStack.push(n),kl(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case K.SELECTION_SET:{const i=gn(this.getType());this._parentTypeStack.push(Qr(i)?i:void 0);break}case K.FIELD:{const i=this.getParentType();let o,l;i&&(o=this._getFieldDef(n,i,t),o&&(l=o.type)),this._fieldDefStack.push(o),this._typeStack.push(kl(l)?l:void 0);break}case K.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case K.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(At(i)?i:void 0);break}case K.INLINE_FRAGMENT:case K.FRAGMENT_DEFINITION:{const i=t.typeCondition,o=i?yi(n,i):gn(this.getType());this._typeStack.push(kl(o)?o:void 0);break}case K.VARIABLE_DEFINITION:{const i=yi(n,t.type);this._inputTypeStack.push(Di(i)?i:void 0);break}case K.ARGUMENT:{var r;let i,o;const l=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();l&&(i=l.args.find(c=>c.name===t.name.value),i&&(o=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(Di(o)?o:void 0);break}case K.LIST:{const i=Mu(this.getInputType()),o=mn(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Di(o)?o:void 0);break}case K.OBJECT_FIELD:{const i=gn(this.getInputType());let o,l;nn(i)&&(l=i.getFields()[t.name.value],l&&(o=l.type)),this._defaultValueStack.push(l?l.defaultValue:void 0),this._inputTypeStack.push(Di(o)?o:void 0);break}case K.ENUM:{const i=gn(this.getInputType());let o;Wn(i)&&(o=i.getValue(t.value)),this._enumValue=o;break}}}leave(t){switch(t.kind){case K.SELECTION_SET:this._parentTypeStack.pop();break;case K.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case K.DIRECTIVE:this._directive=null;break;case K.OPERATION_DEFINITION:case K.INLINE_FRAGMENT:case K.FRAGMENT_DEFINITION:this._typeStack.pop();break;case K.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case K.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case K.LIST:case K.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case K.ENUM:this._enumValue=null;break}}}function b6(e,t,n){const r=n.name.value;if(r===va.name&&e.getQueryType()===t)return va;if(r===ya.name&&e.getQueryType()===t)return ya;if(r===ba.name&&Qr(t))return ba;if(At(t)||Rt(t))return t.getFields()[r]}function ju(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=jd(t,r.kind).enter;if(i){const o=i.apply(t,n);return o!==void 0&&(e.leave(r),lE(o)&&e.enter(o)),o}},leave(...n){const r=n[0],i=jd(t,r.kind).leave;let o;return i&&(o=i.apply(t,n)),e.leave(r),o}}}function E6(e){return OE(e)||by(e)||kE(e)}function OE(e){return e.kind===K.OPERATION_DEFINITION||e.kind===K.FRAGMENT_DEFINITION}function S6(e){return e.kind===K.FIELD||e.kind===K.FRAGMENT_SPREAD||e.kind===K.INLINE_FRAGMENT}function GN(e){return e.kind===K.VARIABLE||e.kind===K.INT||e.kind===K.FLOAT||e.kind===K.STRING||e.kind===K.BOOLEAN||e.kind===K.NULL||e.kind===K.ENUM||e.kind===K.LIST||e.kind===K.OBJECT}function DE(e){return GN(e)&&(e.kind===K.LIST?e.values.some(DE):e.kind===K.OBJECT?e.fields.some(t=>DE(t.value)):e.kind!==K.VARIABLE)}function T6(e){return e.kind===K.NAMED_TYPE||e.kind===K.LIST_TYPE||e.kind===K.NON_NULL_TYPE}function by(e){return e.kind===K.SCHEMA_DEFINITION||qd(e)||e.kind===K.DIRECTIVE_DEFINITION}function qd(e){return e.kind===K.SCALAR_TYPE_DEFINITION||e.kind===K.OBJECT_TYPE_DEFINITION||e.kind===K.INTERFACE_TYPE_DEFINITION||e.kind===K.UNION_TYPE_DEFINITION||e.kind===K.ENUM_TYPE_DEFINITION||e.kind===K.INPUT_OBJECT_TYPE_DEFINITION}function kE(e){return e.kind===K.SCHEMA_EXTENSION||Ey(e)}function Ey(e){return e.kind===K.SCALAR_TYPE_EXTENSION||e.kind===K.OBJECT_TYPE_EXTENSION||e.kind===K.INTERFACE_TYPE_EXTENSION||e.kind===K.UNION_TYPE_EXTENSION||e.kind===K.ENUM_TYPE_EXTENSION||e.kind===K.INPUT_OBJECT_TYPE_EXTENSION}function RE(e){return{Document(t){for(const n of t.definitions)if(!OE(n)){const r=n.kind===K.SCHEMA_DEFINITION||n.kind===K.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new Me(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function YN(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),o=t.name.value;let l=Al("to use an inline fragment on",x6(i,n,o));l===""&&(l=Al(w6(n,o))),e.reportError(new Me(`Cannot query field "${o}" on type "${n.name}".`+l,{nodes:t}))}}}}function x6(e,t,n){if(!sr(t))return[];const r=new Set,i=Object.create(null);for(const l of e.getPossibleTypes(t))if(l.getFields()[n]){r.add(l),i[l.name]=1;for(const c of l.getInterfaces()){var o;c.getFields()[n]&&(r.add(c),i[c.name]=((o=i[c.name])!==null&&o!==void 0?o:0)+1)}}return[...r].sort((l,c)=>{const p=i[c.name]-i[l.name];return p!==0?p:Rt(l)&&e.isSubType(l,c)?-1:Rt(c)&&e.isSubType(c,l)?1:Jh(l.name,c.name)}).map(l=>l.name)}function w6(e,t){if(At(e)||Rt(e)){const n=Object.keys(e.getFields());return Ru(t,n)}return[]}function WN(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=yi(e.getSchema(),n);if(r&&!Qr(r)){const i=pn(n);e.reportError(new Me(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=yi(e.getSchema(),t.typeCondition);if(n&&!Qr(n)){const r=pn(t.typeCondition);e.reportError(new Me(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function QN(e){return{...KN(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const o=t.name.value,l=r.args.map(p=>p.name),c=Ru(o,l);e.reportError(new Me(`Unknown argument "${o}" on field "${i.name}.${r.name}".`+Al(c),{nodes:t}))}}}}function KN(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Fu;for(const l of r)t[l.name]=l.args.map(c=>c.name);const i=e.getDocument().definitions;for(const l of i)if(l.kind===K.DIRECTIVE_DEFINITION){var o;const c=(o=l.arguments)!==null&&o!==void 0?o:[];t[l.name.value]=c.map(p=>p.name.value)}return{Directive(l){const c=l.name.value,p=t[c];if(l.arguments&&p)for(const d of l.arguments){const m=d.name.value;if(!p.includes(m)){const b=Ru(m,p);e.reportError(new Me(`Unknown argument "${m}" on directive "@${c}".`+Al(b),{nodes:d}))}}return!1}}}function ME(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Fu;for(const o of r)t[o.name]=o.locations;const i=e.getDocument().definitions;for(const o of i)o.kind===K.DIRECTIVE_DEFINITION&&(t[o.name.value]=o.locations.map(l=>l.value));return{Directive(o,l,c,p,d){const m=o.name.value,b=t[m];if(!b){e.reportError(new Me(`Unknown directive "@${m}".`,{nodes:o}));return}const E=C6(d);E&&!b.includes(E)&&e.reportError(new Me(`Directive "@${m}" may not be used on ${E}.`,{nodes:o}))}}}function C6(e){const t=e[e.length-1];switch("kind"in t||Vr(!1),t.kind){case K.OPERATION_DEFINITION:return _6(t.operation);case K.FIELD:return lt.FIELD;case K.FRAGMENT_SPREAD:return lt.FRAGMENT_SPREAD;case K.INLINE_FRAGMENT:return lt.INLINE_FRAGMENT;case K.FRAGMENT_DEFINITION:return lt.FRAGMENT_DEFINITION;case K.VARIABLE_DEFINITION:return lt.VARIABLE_DEFINITION;case K.SCHEMA_DEFINITION:case K.SCHEMA_EXTENSION:return lt.SCHEMA;case K.SCALAR_TYPE_DEFINITION:case K.SCALAR_TYPE_EXTENSION:return lt.SCALAR;case K.OBJECT_TYPE_DEFINITION:case K.OBJECT_TYPE_EXTENSION:return lt.OBJECT;case K.FIELD_DEFINITION:return lt.FIELD_DEFINITION;case K.INTERFACE_TYPE_DEFINITION:case K.INTERFACE_TYPE_EXTENSION:return lt.INTERFACE;case K.UNION_TYPE_DEFINITION:case K.UNION_TYPE_EXTENSION:return lt.UNION;case K.ENUM_TYPE_DEFINITION:case K.ENUM_TYPE_EXTENSION:return lt.ENUM;case K.ENUM_VALUE_DEFINITION:return lt.ENUM_VALUE;case K.INPUT_OBJECT_TYPE_DEFINITION:case K.INPUT_OBJECT_TYPE_EXTENSION:return lt.INPUT_OBJECT;case K.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||Vr(!1),n.kind===K.INPUT_OBJECT_TYPE_DEFINITION?lt.INPUT_FIELD_DEFINITION:lt.ARGUMENT_DEFINITION}default:Vr(!1,"Unexpected kind: "+Ue(t.kind))}}function _6(e){switch(e){case oi.QUERY:return lt.QUERY;case oi.MUTATION:return lt.MUTATION;case oi.SUBSCRIPTION:return lt.SUBSCRIPTION}}function XN(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new Me(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function LE(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const o of e.getDocument().definitions)qd(o)&&(r[o.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(o,l,c,p,d){const m=o.name.value;if(!n[m]&&!r[m]){var b;const E=(b=d[2])!==null&&b!==void 0?b:c,y=E!=null&&N6(E);if(y&&ZN.includes(m))return;const x=Ru(m,y?ZN.concat(i):i);e.reportError(new Me(`Unknown type "${m}".`+Al(x),{nodes:o}))}}}}const ZN=[...am,...cm].map(e=>e.name);function N6(e){return"kind"in e&&(by(e)||kE(e))}function JN(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===K.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new Me("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function eA(e){var t,n,r;const i=e.getSchema(),o=(t=(n=(r=i?.astNode)!==null&&r!==void 0?r:i?.getQueryType())!==null&&n!==void 0?n:i?.getMutationType())!==null&&t!==void 0?t:i?.getSubscriptionType();let l=0;return{SchemaDefinition(c){if(o){e.reportError(new Me("Cannot define a new schema within a schema extension.",{nodes:c}));return}l>0&&e.reportError(new Me("Must provide only one schema definition.",{nodes:c})),++l}}}const A6=3;function tA(e){function t(n,r=Object.create(null),i=0){if(n.kind===K.FRAGMENT_SPREAD){const o=n.name.value;if(r[o]===!0)return!1;const l=e.getFragment(o);if(!l)return!1;try{return r[o]=!0,t(l,r,i)}finally{r[o]=void 0}}if(n.kind===K.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=A6))return!0;if("selectionSet"in n&&n.selectionSet){for(const o of n.selectionSet.selections)if(t(o,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new Me("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function nA(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(o){return i(o),!1}};function i(o){if(t[o.name.value])return;const l=o.name.value;t[l]=!0;const c=e.getFragmentSpreads(o.selectionSet);if(c.length!==0){r[l]=n.length;for(const p of c){const d=p.name.value,m=r[d];if(n.push(p),m===void 0){const b=e.getFragment(d);b&&i(b)}else{const b=n.slice(m),E=b.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new Me(`Cannot spread fragment "${d}" within itself`+(E!==""?` via ${E}.`:"."),{nodes:b}))}n.pop()}r[l]=void 0}}}function rA(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const o=i.name.value;t[o]!==!0&&e.reportError(new Me(n.name?`Variable "$${o}" is not defined by operation "${n.name.value}".`:`Variable "$${o}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function IE(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const o of e.getRecursivelyReferencedFragments(i))r[o.name.value]=!0;for(const i of n){const o=i.name.value;r[o]!==!0&&e.reportError(new Me(`Fragment "${o}" is never used.`,{nodes:i}))}}}}}function iA(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:o}of i)r[o.name.value]=!0;for(const o of t){const l=o.variable.name.value;r[l]!==!0&&e.reportError(new Me(n.name?`Variable "$${l}" is never used in operation "${n.name.value}".`:`Variable "$${l}" is never used.`,{nodes:o}))}}},VariableDefinition(n){t.push(n)}}}function Sy(e){switch(e.kind){case K.OBJECT:return{...e,fields:O6(e.fields)};case K.LIST:return{...e,values:e.values.map(Sy)};case K.INT:case K.FLOAT:case K.STRING:case K.BOOLEAN:case K.NULL:case K.ENUM:case K.VARIABLE:return e}}function O6(e){return e.map(t=>({...t,value:Sy(t.value)})).sort((t,n)=>Jh(t.name.value,n.name.value))}function oA(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+oA(n)).join(" and "):e}function aA(e){const t=new cA,n=new I6,r=new Map;return{SelectionSet(i){const o=D6(e,r,t,n,e.getParentType(),i);for(const[[l,c],p,d]of o){const m=oA(c);e.reportError(new Me(`Fields "${l}" conflict because ${m}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:p.concat(d)}))}}}}function D6(e,t,n,r,i,o){const l=[],[c,p]=wy(e,t,i,o);if(R6(e,l,t,n,r,c),p.length!==0)for(let d=0;d<p.length;d++){Ty(e,l,t,n,r,!1,c,p[d]);for(let m=d+1;m<p.length;m++)xy(e,l,t,n,r,!1,p[d],p[m])}return l}function Ty(e,t,n,r,i,o,l,c){if(r.has(l,c,o))return;r.add(l,c,o);const p=e.getFragment(c);if(!p)return;const[d,m]=jE(e,n,p);if(l!==d){FE(e,t,n,r,i,o,l,d);for(const b of m)Ty(e,t,n,r,i,o,l,b)}}function xy(e,t,n,r,i,o,l,c){if(l===c||i.has(l,c,o))return;i.add(l,c,o);const p=e.getFragment(l),d=e.getFragment(c);if(!p||!d)return;const[m,b]=jE(e,n,p),[E,y]=jE(e,n,d);FE(e,t,n,r,i,o,m,E);for(const x of y)xy(e,t,n,r,i,o,l,x);for(const x of b)xy(e,t,n,r,i,o,x,c)}function k6(e,t,n,r,i,o,l,c,p){const d=[],[m,b]=wy(e,t,o,l),[E,y]=wy(e,t,c,p);FE(e,d,t,n,r,i,m,E);for(const x of y)Ty(e,d,t,n,r,i,m,x);for(const x of b)Ty(e,d,t,n,r,i,E,x);for(const x of b)for(const w of y)xy(e,d,t,n,r,i,x,w);return d}function R6(e,t,n,r,i,o){for(const[l,c]of Object.entries(o))if(c.length>1)for(let p=0;p<c.length;p++)for(let d=p+1;d<c.length;d++){const m=sA(e,n,r,i,!1,l,c[p],c[d]);m&&t.push(m)}}function FE(e,t,n,r,i,o,l,c){for(const[p,d]of Object.entries(l)){const m=c[p];if(m)for(const b of d)for(const E of m){const y=sA(e,n,r,i,o,p,b,E);y&&t.push(y)}}}function sA(e,t,n,r,i,o,l,c){const[p,d,m]=l,[b,E,y]=c,x=i||p!==b&&At(p)&&At(b);if(!x){const A=d.name.value,C=E.name.value;if(A!==C)return[[o,`"${A}" and "${C}" are different fields`],[d],[E]];if(!M6(d,E))return[[o,"they have differing arguments"],[d],[E]]}const w=m?.type,k=y?.type;if(w&&k&&PE(w,k))return[[o,`they return conflicting types "${Ue(w)}" and "${Ue(k)}"`],[d],[E]];const N=d.selectionSet,D=E.selectionSet;if(N&&D){const A=k6(e,t,n,r,x,gn(w),N,gn(k),D);return L6(A,o,d,E)}}function M6(e,t){const n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const i=new Map(r.map(({name:o,value:l})=>[o.value,l]));return n.every(o=>{const l=o.value,c=i.get(o.name.value);return c===void 0?!1:lA(l)===lA(c)})}function lA(e){return pn(Sy(e))}function PE(e,t){return mn(e)?mn(t)?PE(e.ofType,t.ofType):!0:mn(t)?!0:_t(e)?_t(t)?PE(e.ofType,t.ofType):!0:_t(t)?!0:ai(e)||ai(t)?e!==t:!1}function wy(e,t,n,r){const i=t.get(r);if(i)return i;const o=Object.create(null),l=Object.create(null);uA(e,n,r,o,l);const c=[o,Object.keys(l)];return t.set(r,c),c}function jE(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=yi(e.getSchema(),n.typeCondition);return wy(e,t,i,n.selectionSet)}function uA(e,t,n,r,i){for(const o of n.selections)switch(o.kind){case K.FIELD:{const l=o.name.value;let c;(At(t)||Rt(t))&&(c=t.getFields()[l]);const p=o.alias?o.alias.value:l;r[p]||(r[p]=[]),r[p].push([t,o,c]);break}case K.FRAGMENT_SPREAD:i[o.name.value]=!0;break;case K.INLINE_FRAGMENT:{const l=o.typeCondition,c=l?yi(e.getSchema(),l):t;uA(e,c,o.selectionSet,r,i);break}}}function L6(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class cA{constructor(){this._data=new Map}has(t,n,r){var i;const o=(i=this._data.get(t))===null||i===void 0?void 0:i.get(n);return o===void 0?!1:r?!0:r===o}add(t,n,r){const i=this._data.get(t);i===void 0?this._data.set(t,new Map([[n,r]])):i.set(n,r)}}class I6{constructor(){this._orderedPairSet=new cA}has(t,n,r){return t<n?this._orderedPairSet.has(t,n,r):this._orderedPairSet.has(n,t,r)}add(t,n,r){t<n?this._orderedPairSet.add(t,n,r):this._orderedPairSet.add(n,t,r)}}function fA(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(Qr(n)&&Qr(r)&&!nm(e.getSchema(),n,r)){const i=Ue(r),o=Ue(n);e.reportError(new Me(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${o}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=F6(e,n),i=e.getParentType();if(r&&i&&!nm(e.getSchema(),r,i)){const o=Ue(i),l=Ue(r);e.reportError(new Me(`Fragment "${n}" cannot be spread here as objects of type "${o}" can never be of type "${l}".`,{nodes:t}))}}}}function F6(e,t){const n=e.getFragment(t);if(n){const r=yi(e.getSchema(),n.typeCondition);if(Qr(r))return r}}function dA(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)qd(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const o=i.name.value,l=n[o],c=t?.getType(o);let p;if(l?p=P6[l.kind]:c&&(p=j6(c)),p){if(p!==i.kind){const d=V6(i.kind);e.reportError(new Me(`Cannot extend non-${d} type "${o}".`,{nodes:l?[l,i]:i}))}}else{const d=Object.keys({...n,...t?.getTypeMap()}),m=Ru(o,d);e.reportError(new Me(`Cannot extend type "${o}" because it is not defined.`+Al(m),{nodes:i.name}))}}}const P6={[K.SCALAR_TYPE_DEFINITION]:K.SCALAR_TYPE_EXTENSION,[K.OBJECT_TYPE_DEFINITION]:K.OBJECT_TYPE_EXTENSION,[K.INTERFACE_TYPE_DEFINITION]:K.INTERFACE_TYPE_EXTENSION,[K.UNION_TYPE_DEFINITION]:K.UNION_TYPE_EXTENSION,[K.ENUM_TYPE_DEFINITION]:K.ENUM_TYPE_EXTENSION,[K.INPUT_OBJECT_TYPE_DEFINITION]:K.INPUT_OBJECT_TYPE_EXTENSION};function j6(e){if(Oi(e))return K.SCALAR_TYPE_EXTENSION;if(At(e))return K.OBJECT_TYPE_EXTENSION;if(Rt(e))return K.INTERFACE_TYPE_EXTENSION;if(ar(e))return K.UNION_TYPE_EXTENSION;if(Wn(e))return K.ENUM_TYPE_EXTENSION;if(nn(e))return K.INPUT_OBJECT_TYPE_EXTENSION;Vr(!1,"Unexpected type: "+Ue(e))}function V6(e){switch(e){case K.SCALAR_TYPE_EXTENSION:return"scalar";case K.OBJECT_TYPE_EXTENSION:return"object";case K.INTERFACE_TYPE_EXTENSION:return"interface";case K.UNION_TYPE_EXTENSION:return"union";case K.ENUM_TYPE_EXTENSION:return"enum";case K.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Vr(!1,"Unexpected kind: "+Ue(e))}}function pA(e){return{...hA(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(o=>o.name.value));for(const o of r.args)if(!i.has(o.name)&&Lu(o)){const l=Ue(o.type);e.reportError(new Me(`Field "${r.name}" argument "${o.name}" of type "${l}" is required, but it was not provided.`,{nodes:t}))}}}}}function hA(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:Fu;for(const c of i)n[c.name]=Ol(c.args.filter(Lu),p=>p.name);const o=e.getDocument().definitions;for(const c of o)if(c.kind===K.DIRECTIVE_DEFINITION){var l;const p=(l=c.arguments)!==null&&l!==void 0?l:[];n[c.name.value]=Ol(p.filter(U6),d=>d.name.value)}return{Directive:{leave(c){const p=c.name.value,d=n[p];if(d){var m;const b=(m=c.arguments)!==null&&m!==void 0?m:[],E=new Set(b.map(y=>y.name.value));for(const[y,x]of Object.entries(d))if(!E.has(y)){const w=Vd(x.type)?Ue(x.type):pn(x.type);e.reportError(new Me(`Directive "@${p}" argument "${y}" of type "${w}" is required, but it was not provided.`,{nodes:c}))}}}}}}function U6(e){return e.type.kind===K.NON_NULL_TYPE&&e.defaultValue==null}function mA(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(ai(gn(n))){if(r){const i=t.name.value,o=Ue(n);e.reportError(new Me(`Field "${i}" must not have a selection since type "${o}" has no subfields.`,{nodes:r}))}}else if(r){if(r.selections.length===0){const i=t.name.value,o=Ue(n);e.reportError(new Me(`Field "${i}" of type "${o}" must have at least one field selected.`,{nodes:t}))}}else{const i=t.name.value,o=Ue(n);e.reportError(new Me(`Field "${i}" of type "${o}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}function gA(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Bd(e,t,n){return{prev:e,key:t,typename:n}}function bi(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function VE(e,t,n=q6){return dm(e,t,n,void 0)}function q6(e,t,n){let r="Invalid value "+Ue(t);throw e.length>0&&(r+=` at "value${gA(e)}"`),n.message=r+": "+n.message,n}function dm(e,t,n,r){if(_t(t)){if(e!=null)return dm(e,t.ofType,n,r);n(bi(r),e,new Me(`Expected non-nullable type "${Ue(t)}" not to be null.`));return}if(e==null)return null;if(mn(t)){const i=t.ofType;return EE(e)?Array.from(e,(o,l)=>{const c=Bd(r,l,void 0);return dm(o,i,n,c)}):[dm(e,i,n,r)]}if(nn(t)){if(!qo(e)||Array.isArray(e)){n(bi(r),e,new Me(`Expected type "${t.name}" to be an object.`));return}const i={},o=t.getFields();for(const l of Object.values(o)){const c=e[l.name];if(c===void 0){if(l.defaultValue!==void 0)i[l.name]=l.defaultValue;else if(_t(l.type)){const p=Ue(l.type);n(bi(r),e,new Me(`Field "${l.name}" of required type "${p}" was not provided.`))}continue}i[l.name]=dm(c,l.type,n,Bd(r,l.name,t.name))}for(const l of Object.keys(e))if(!o[l]){const c=Ru(l,Object.keys(t.getFields()));n(bi(r),e,new Me(`Field "${l}" is not defined by type "${t.name}".`+Al(c)))}if(t.isOneOf){const l=Object.keys(i);l.length!==1&&n(bi(r),e,new Me(`Exactly one key must be specified for OneOf type "${t.name}".`));const c=l[0],p=i[c];p===null&&n(bi(r).concat(c),p,new Me(`Field "${c}" must be non-null.`))}return i}if(ai(t)){let i;try{i=t.parseValue(e)}catch(o){o instanceof Me?n(bi(r),e,o):n(bi(r),e,new Me(`Expected type "${t.name}". `+o.message,{originalError:o}));return}return i===void 0&&n(bi(r),e,new Me(`Expected type "${t.name}".`)),i}Vr(!1,"Unexpected input type: "+Ue(t))}function Ea(e,t,n){if(e){if(e.kind===K.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&_t(t)?void 0:i}if(_t(t))return e.kind===K.NULL?void 0:Ea(e,t.ofType,n);if(e.kind===K.NULL)return null;if(mn(t)){const r=t.ofType;if(e.kind===K.LIST){const o=[];for(const l of e.values)if(vA(l,n)){if(_t(r))return;o.push(null)}else{const c=Ea(l,r,n);if(c===void 0)return;o.push(c)}return o}const i=Ea(e,r,n);return i===void 0?void 0:[i]}if(nn(t)){if(e.kind!==K.OBJECT)return;const r=Object.create(null),i=Ol(e.fields,o=>o.name.value);for(const o of Object.values(t.getFields())){const l=i[o.name];if(!l||vA(l.value,n)){if(o.defaultValue!==void 0)r[o.name]=o.defaultValue;else if(_t(o.type))return;continue}const c=Ea(l.value,o.type,n);if(c===void 0)return;r[o.name]=c}if(t.isOneOf){const o=Object.keys(r);if(o.length!==1||r[o[0]]===null)return}return r}if(ai(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}Vr(!1,"Unexpected input type: "+Ue(t))}}function vA(e,t){return e.kind===K.VARIABLE&&(t==null||t[e.name.value]===void 0)}function yA(e,t,n,r){const i=[],o=r?.maxErrors;try{const l=B6(e,t,n,c=>{if(o!=null&&i.length>=o)throw new Me("Too many errors processing variables, error limit reached. Execution aborted.");i.push(c)});if(i.length===0)return{coerced:l}}catch(l){i.push(l)}return{errors:i}}function B6(e,t,n,r){const i={};for(const o of t){const l=o.variable.name.value,c=yi(e,o.type);if(!Di(c)){const d=pn(o.type);r(new Me(`Variable "$${l}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!bA(n,l)){if(o.defaultValue)i[l]=Ea(o.defaultValue,c);else if(_t(c)){const d=Ue(c);r(new Me(`Variable "$${l}" of required type "${d}" was not provided.`,{nodes:o}))}continue}const p=n[l];if(p===null&&_t(c)){const d=Ue(c);r(new Me(`Variable "$${l}" of non-null type "${d}" must not be null.`,{nodes:o}));continue}i[l]=VE(p,c,(d,m,b)=>{let E=`Variable "$${l}" got invalid value `+Ue(m);d.length>0&&(E+=` at "${l}${gA(d)}"`),r(new Me(E+"; "+b.message,{nodes:o,originalError:b}))})}return i}function Cy(e,t,n){var r;const i={},o=(r=t.arguments)!==null&&r!==void 0?r:[],l=Ol(o,c=>c.name.value);for(const c of e.args){const p=c.name,d=c.type,m=l[p];if(!m){if(c.defaultValue!==void 0)i[p]=c.defaultValue;else if(_t(d))throw new Me(`Argument "${p}" of required type "${Ue(d)}" was not provided.`,{nodes:t});continue}const b=m.value;let E=b.kind===K.NULL;if(b.kind===K.VARIABLE){const x=b.name.value;if(n==null||!bA(n,x)){if(c.defaultValue!==void 0)i[p]=c.defaultValue;else if(_t(d))throw new Me(`Argument "${p}" of required type "${Ue(d)}" was provided the variable "$${x}" which was not provided a runtime value.`,{nodes:b});continue}E=n[x]==null}if(E&&_t(d))throw new Me(`Argument "${p}" of non-null type "${Ue(d)}" must not be null.`,{nodes:b});const y=Ea(b,d,n);if(y===void 0)throw new Me(`Argument "${p}" has invalid value ${pn(b)}.`,{nodes:b});i[p]=y}return i}function Ps(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(o=>o.name.value===e.name);if(i)return Cy(e,i,n)}function bA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function UE(e,t,n,r,i){const o=new Map;return _y(e,t,n,r,i,o,new Set),o}function $6(e,t,n,r,i){const o=new Map,l=new Set;for(const c of i)c.selectionSet&&_y(e,t,n,r,c.selectionSet,o,l);return o}function _y(e,t,n,r,i,o,l){for(const c of i.selections)switch(c.kind){case K.FIELD:{if(!qE(n,c))continue;const p=z6(c),d=o.get(p);d!==void 0?d.push(c):o.set(p,[c]);break}case K.INLINE_FRAGMENT:{if(!qE(n,c)||!EA(e,c,r))continue;_y(e,t,n,r,c.selectionSet,o,l);break}case K.FRAGMENT_SPREAD:{const p=c.name.value;if(l.has(p)||!qE(n,c))continue;l.add(p);const d=t[p];if(!d||!EA(e,d,r))continue;_y(e,t,n,r,d.selectionSet,o,l);break}}}function qE(e,t){const n=Ps(dy,t,e);if(n?.if===!0)return!1;const r=Ps(fy,t,e);return r?.if!==!1}function EA(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=yi(e,r);return i===n?!0:sr(i)?e.isSubType(i,n):!1}function z6(e){return e.alias?e.alias.value:e.name.value}function SA(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,o=Object.create(null),l=e.getDocument(),c=Object.create(null);for(const d of l.definitions)d.kind===K.FRAGMENT_DEFINITION&&(c[d.name.value]=d);const p=UE(n,c,o,r,t.selectionSet);if(p.size>1){const b=[...p.values()].slice(1).flat();e.reportError(new Me(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:b}))}for(const d of p.values())d[0].name.value.startsWith("__")&&e.reportError(new Me(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}function BE(e,t){const n=new Map;for(const r of e){const i=t(r),o=n.get(i);o===void 0?n.set(i,[r]):o.push(r)}return n}function TA(e){return{DirectiveDefinition(r){var i;const o=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,o)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;const o=r.name.value,l=(i=r.fields)!==null&&i!==void 0?i:[];for(const p of l){var c;const d=p.name.value,m=(c=p.arguments)!==null&&c!==void 0?c:[];n(`${o}.${d}`,m)}return!1}function n(r,i){const o=BE(i,l=>l.name.value);for(const[l,c]of o)c.length>1&&e.reportError(new Me(`Argument "${r}(${l}:)" can only be defined once.`,{nodes:c.map(p=>p.name)}));return!1}}function $E(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],o=BE(i,l=>l.name.value);for(const[l,c]of o)c.length>1&&e.reportError(new Me(`There can be only one argument named "${l}".`,{nodes:c.map(p=>p.name)}))}}function xA(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new Me(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Me(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function zE(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Fu;for(const c of r)t[c.name]=!c.isRepeatable;const i=e.getDocument().definitions;for(const c of i)c.kind===K.DIRECTIVE_DEFINITION&&(t[c.name.value]=!c.repeatable);const o=Object.create(null),l=Object.create(null);return{enter(c){if(!("directives"in c)||!c.directives)return;let p;if(c.kind===K.SCHEMA_DEFINITION||c.kind===K.SCHEMA_EXTENSION)p=o;else if(qd(c)||Ey(c)){const d=c.name.value;p=l[d],p===void 0&&(l[d]=p=Object.create(null))}else p=Object.create(null);for(const d of c.directives){const m=d.name.value;t[m]&&(p[m]?e.reportError(new Me(`The directive "@${m}" can only be used once at this location.`,{nodes:[p[m],d]})):p[m]=d)}}}}function wA(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(o){var l;const c=o.name.value;r[c]||(r[c]=Object.create(null));const p=(l=o.values)!==null&&l!==void 0?l:[],d=r[c];for(const m of p){const b=m.name.value,E=n[c];Wn(E)&&E.getValue(b)?e.reportError(new Me(`Enum value "${c}.${b}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:m.name})):d[b]?e.reportError(new Me(`Enum value "${c}.${b}" can only be defined once.`,{nodes:[d[b],m.name]})):d[b]=m.name}return!1}}function CA(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(o){var l;const c=o.name.value;r[c]||(r[c]=Object.create(null));const p=(l=o.fields)!==null&&l!==void 0?l:[],d=r[c];for(const m of p){const b=m.name.value;H6(n[c],b)?e.reportError(new Me(`Field "${c}.${b}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:m.name})):d[b]?e.reportError(new Me(`Field "${c}.${b}" can only be defined once.`,{nodes:[d[b],m.name]})):d[b]=m.name}return!1}}function H6(e,t){return At(e)||Rt(e)||nn(e)?e.getFields()[t]!=null:!1}function _A(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new Me(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function HE(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||Vr(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new Me(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function NA(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new Me(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function AA(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(o){var l;const c=(l=o.operationTypes)!==null&&l!==void 0?l:[];for(const p of c){const d=p.operation,m=n[d];r[d]?e.reportError(new Me(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:p})):m?e.reportError(new Me(`There can be only one ${d} type in schema.`,{nodes:[m,p]})):n[d]=p}return!1}}function OA(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const o=i.name.value;if(n!=null&&n.getType(o)){e.reportError(new Me(`Type "${o}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[o]?e.reportError(new Me(`There can be only one type named "${o}".`,{nodes:[t[o],i.name]})):t[o]=i.name,!1}}function DA(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=BE(r,o=>o.variable.name.value);for(const[o,l]of i)l.length>1&&e.reportError(new Me(`There can be only one variable named "$${o}".`,{nodes:l.map(c=>c.variable.name)}))}}}function kA(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){const r=Mu(e.getParentInputType());if(!mn(r))return vf(e,n),!1},ObjectValue(n){const r=gn(e.getInputType());if(!nn(r))return vf(e,n),!1;const i=Ol(n.fields,o=>o.name.value);for(const o of Object.values(r.getFields()))if(!i[o.name]&&ay(o)){const c=Ue(o.type);e.reportError(new Me(`Field "${r.name}.${o.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&G6(e,n,r,i,t)},ObjectField(n){const r=gn(e.getParentInputType());if(!e.getInputType()&&nn(r)){const o=Ru(n.name.value,Object.keys(r.getFields()));e.reportError(new Me(`Field "${n.name.value}" is not defined by type "${r.name}".`+Al(o),{nodes:n}))}},NullValue(n){const r=e.getInputType();_t(r)&&e.reportError(new Me(`Expected value of type "${Ue(r)}", found ${pn(n)}.`,{nodes:n}))},EnumValue:n=>vf(e,n),IntValue:n=>vf(e,n),FloatValue:n=>vf(e,n),StringValue:n=>vf(e,n),BooleanValue:n=>vf(e,n)}}function vf(e,t){const n=e.getInputType();if(!n)return;const r=gn(n);if(!ai(r)){const i=Ue(n);e.reportError(new Me(`Expected value of type "${i}", found ${pn(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const o=Ue(n);e.reportError(new Me(`Expected value of type "${o}", found ${pn(t)}.`,{nodes:t}))}}catch(i){const o=Ue(n);i instanceof Me?e.reportError(i):e.reportError(new Me(`Expected value of type "${o}", found ${pn(t)}; `+i.message,{nodes:t,originalError:i}))}}function G6(e,t,n,r,i){var o;const l=Object.keys(r);if(l.length!==1){e.reportError(new Me(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}const p=(o=r[l[0]])===null||o===void 0?void 0:o.value,d=!p||p.kind===K.NULL,m=p?.kind===K.VARIABLE;if(d){e.reportError(new Me(`Field "${n.name}.${l[0]}" must be non-null.`,{nodes:[t]}));return}if(m){const b=p.name.value;i[b].type.kind!==K.NON_NULL_TYPE&&e.reportError(new Me(`Variable "${b}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}function RA(e){return{VariableDefinition(t){const n=yi(e.getSchema(),t.type);if(n!==void 0&&!Di(n)){const r=t.variable.name.value,i=pn(t.type);e.reportError(new Me(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function MA(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:o,defaultValue:l,parentType:c}of r){const p=i.name.value,d=t[p];if(d&&o){const m=e.getSchema(),b=yi(m,d.type);if(b&&!Y6(m,b,d.defaultValue,o,l)){const E=Ue(b),y=Ue(o);e.reportError(new Me(`Variable "$${p}" of type "${E}" used in position expecting type "${y}".`,{nodes:[d,i]}))}nn(c)&&c.isOneOf&&tm(b)&&e.reportError(new Me(`Variable "$${p}" is of type "${b}" but must be non-nullable to be used for OneOf Input Object "${c}".`,{nodes:[d,i]}))}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Y6(e,t,n,r,i){if(_t(r)&&!_t(t)){if(!(n!=null&&n.kind!==K.NULL)&&!(i!==void 0))return!1;const c=r.ofType;return pf(e,t,c)}return pf(e,t,r)}const LA=Object.freeze([tA]),GE=Object.freeze([RE,NA,JN,SA,LE,WN,RA,mA,YN,_A,XN,IE,fA,nA,DA,rA,iA,ME,zE,QN,$E,kA,pA,MA,aA,HE,...LA]),W6=Object.freeze([eA,AA,OA,wA,CA,TA,xA,LE,ME,zE,dA,KN,$E,HE,hA]);class IA{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===K.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const o of i.selections)o.kind===K.FRAGMENT_SPREAD?n.push(o):o.selectionSet&&r.push(o.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let o;for(;o=i.pop();)for(const l of this.getFragmentSpreads(o)){const c=l.name.value;if(r[c]!==!0){r[c]=!0;const p=this.getFragment(c);p&&(n.push(p),i.push(p.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class Q6 extends IA{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class FA extends IA{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new Pu(this._schema);Tr(t,ju(i,{VariableDefinition:()=>!1,Variable(o){r.push({node:o,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function pm(e,t,n=GE,r,i=new Pu(e)){var o;const l=(o=r?.maxErrors)!==null&&o!==void 0?o:100;t||Zt(!1,"Must provide document."),yy(e);const c=Object.freeze({}),p=[],d=new FA(e,t,i,b=>{if(p.length>=l)throw p.push(new Me("Too many validation errors, error limit reached. Validation aborted.")),c;p.push(b)}),m=hE(n.map(b=>b(d)));try{Tr(t,ju(i,m))}catch(b){if(b!==c)throw b}return p}function PA(e,t,n=W6){const r=[],i=new Q6(e,t,l=>{r.push(l)}),o=n.map(l=>l(i));return Tr(e,hE(o)),r}function K6(e){const t=PA(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}function X6(e,t){const n=PA(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
`))}function Z6(e){let t;return function(r,i,o){t===void 0&&(t=new WeakMap);let l=t.get(r);l===void 0&&(l=new WeakMap,t.set(r,l));let c=l.get(i);c===void 0&&(c=new WeakMap,l.set(i,c));let p=c.get(o);return p===void 0&&(p=e(r,i,o),c.set(o,p)),p}}function jA(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function J6(e,t,n){let r=n;for(const i of e)r=Uo(r)?r.then(o=>t(o,i)):t(r,i);return r}function e8(e){return e instanceof Error?e:new t8(e)}class t8 extends Error{constructor(t){super("Unexpected error value: "+Ue(t)),this.name="NonErrorThrown",this.thrownValue=t}}function xr(e,t,n){var r;const i=e8(e);return n8(i)?i:new Me(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function n8(e){return Array.isArray(e.path)}const r8=Z6((e,t,n)=>$6(e.schema,e.fragments,e.variableValues,t,n));function Ny(e){arguments.length<2||Zt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;UA(t,n,r);const o=qA(e);if(!("schema"in o))return{errors:o};try{const{operation:l}=o,c=i8(o,l,i);return Uo(c)?c.then(p=>Ay(p,o.errors),p=>(o.errors.push(p),Ay(null,o.errors))):Ay(c,o.errors)}catch(l){return o.errors.push(l),Ay(null,o.errors)}}function VA(e){const t=Ny(e);if(Uo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Ay(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function UA(e,t,n){t||Zt(!1,"Must provide document."),yy(e),n==null||qo(n)||Zt(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function qA(e){var t,n,r;const{schema:i,document:o,rootValue:l,contextValue:c,variableValues:p,operationName:d,fieldResolver:m,typeResolver:b,subscribeFieldResolver:E,options:y}=e;let x;const w=Object.create(null);for(const D of o.definitions)switch(D.kind){case K.OPERATION_DEFINITION:if(d==null){if(x!==void 0)return[new Me("Must provide operation name if query contains multiple operations.")];x=D}else((t=D.name)===null||t===void 0?void 0:t.value)===d&&(x=D);break;case K.FRAGMENT_DEFINITION:w[D.name.value]=D;break}if(!x)return d!=null?[new Me(`Unknown operation named "${d}".`)]:[new Me("Must provide an operation.")];const k=(n=x.variableDefinitions)!==null&&n!==void 0?n:[],N=yA(i,k,p??{},{maxErrors:(r=y?.maxCoercionErrors)!==null&&r!==void 0?r:50});return N.errors?N.errors:{schema:i,fragments:w,rootValue:l,contextValue:c,operation:x,variableValues:N.coerced,fieldResolver:m??ky,typeResolver:b??GA,subscribeFieldResolver:E??ky,errors:[]}}function i8(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new Me(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=UE(e.schema,e.fragments,e.variableValues,r,t.selectionSet),o=void 0;switch(t.operation){case oi.QUERY:return Oy(e,r,n,o,i);case oi.MUTATION:return o8(e,r,n,o,i);case oi.SUBSCRIPTION:return Oy(e,r,n,o,i)}}function o8(e,t,n,r,i){return J6(i.entries(),(o,[l,c])=>{const p=Bd(r,l,t.name),d=BA(e,t,n,c,p);return d===void 0?o:Uo(d)?d.then(m=>(o[l]=m,o)):(o[l]=d,o)},Object.create(null))}function Oy(e,t,n,r,i){const o=Object.create(null);let l=!1;try{for(const[c,p]of i.entries()){const d=Bd(r,c,t.name),m=BA(e,t,n,p,d);m!==void 0&&(o[c]=m,Uo(m)&&(l=!0))}}catch(c){if(l)return jA(o).finally(()=>{throw c});throw c}return l?jA(o):o}function BA(e,t,n,r,i){var o;const l=YA(e.schema,t,r[0]);if(!l)return;const c=l.type,p=(o=l.resolve)!==null&&o!==void 0?o:e.fieldResolver,d=$A(e,l,r,t,i);try{const m=Cy(l,r[0],e.variableValues),b=e.contextValue,E=p(n,m,b,d);let y;return Uo(E)?y=E.then(x=>hm(e,c,r,d,i,x)):y=hm(e,c,r,d,i,E),Uo(y)?y.then(void 0,x=>{const w=xr(x,r,bi(i));return Dy(w,c,e)}):y}catch(m){const b=xr(m,r,bi(i));return Dy(b,c,e)}}function $A(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Dy(e,t,n){if(_t(t))throw e;return n.errors.push(e),null}function hm(e,t,n,r,i,o){if(o instanceof Error)throw o;if(_t(t)){const l=hm(e,t.ofType,n,r,i,o);if(l===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return l}if(o==null)return null;if(mn(t))return a8(e,t,n,r,i,o);if(ai(t))return s8(t,o);if(sr(t))return l8(e,t,n,r,i,o);if(At(t))return YE(e,t,n,r,i,o);Vr(!1,"Cannot complete value of unexpected output type: "+Ue(t))}function a8(e,t,n,r,i,o){if(!EE(o))throw new Me(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const l=t.ofType;let c=!1;const p=Array.from(o,(d,m)=>{const b=Bd(i,m,void 0);try{let E;return Uo(d)?E=d.then(y=>hm(e,l,n,r,b,y)):E=hm(e,l,n,r,b,d),Uo(E)?(c=!0,E.then(void 0,y=>{const x=xr(y,n,bi(b));return Dy(x,l,e)})):E}catch(E){const y=xr(E,n,bi(b));return Dy(y,l,e)}});return c?Promise.all(p):p}function s8(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${Ue(e)}.serialize(${Ue(t)})\` to return non-nullable value, returned: ${Ue(n)}`);return n}function l8(e,t,n,r,i,o){var l;const c=(l=t.resolveType)!==null&&l!==void 0?l:e.typeResolver,p=e.contextValue,d=c(o,p,r,t);return Uo(d)?d.then(m=>YE(e,zA(m,e,t,n,r,o),n,r,i,o)):YE(e,zA(d,e,t,n,r,o),n,r,i,o)}function zA(e,t,n,r,i,o){if(e==null)throw new Me(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(At(e))throw new Me("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new Me(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${Ue(o)}, received "${Ue(e)}".`);const l=t.schema.getType(e);if(l==null)throw new Me(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!At(l))throw new Me(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,l))throw new Me(`Runtime Object type "${l.name}" is not a possible type for "${n.name}".`,{nodes:r});return l}function YE(e,t,n,r,i,o){const l=r8(e,t,n);if(t.isTypeOf){const c=t.isTypeOf(o,e.contextValue,r);if(Uo(c))return c.then(p=>{if(!p)throw HA(t,o,n);return Oy(e,t,o,i,l)});if(!c)throw HA(t,o,n)}return Oy(e,t,o,i,l)}function HA(e,t,n){return new Me(`Expected value of type "${e.name}" but got: ${Ue(t)}.`,{nodes:n})}const GA=function(e,t,n,r){if(qo(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),o=[];for(let l=0;l<i.length;l++){const c=i[l];if(c.isTypeOf){const p=c.isTypeOf(e,t,n);if(Uo(p))o[l]=p;else if(p)return c.name}}if(o.length)return Promise.all(o).then(l=>{for(let c=0;c<l.length;c++)if(l[c])return i[c].name})},ky=function(e,t,n,r){if(qo(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function YA(e,t,n){const r=n.name.value;return r===va.name&&e.getQueryType()===t?va:r===ya.name&&e.getQueryType()===t?ya:r===ba.name?ba:t.getFields()[r]}function u8(e){return new Promise(t=>t(WA(e)))}function c8(e){const t=WA(e);if(Uo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function WA(e){arguments.length<2||Zt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:o,operationName:l,fieldResolver:c,typeResolver:p}=e,d=vy(t);if(d.length>0)return{errors:d};let m;try{m=Ai(n)}catch(E){return{errors:[E]}}const b=pm(t,m);return b.length>0?{errors:b}:Ny({schema:t,document:m,rootValue:r,contextValue:i,variableValues:o,operationName:l,fieldResolver:c,typeResolver:p})}function QA(e){return typeof e?.[Symbol.asyncIterator]=="function"}function f8(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(o){if(typeof n.return=="function")try{await n.return()}catch{}throw o}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function d8(e){arguments.length<2||Zt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await KA(e);return QA(t)?f8(t,r=>Ny({...e,rootValue:r})):t}function p8(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function KA(...e){const t=p8(e),{schema:n,document:r,variableValues:i}=t;UA(n,r,i);const o=qA(t);if(!("schema"in o))return{errors:o};try{const l=await h8(o);if(!QA(l))throw new Error(`Subscription field must return Async Iterable. Received: ${Ue(l)}.`);return l}catch(l){if(l instanceof Me)return{errors:[l]};throw l}}async function h8(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:o}=e,l=t.getSubscriptionType();if(l==null)throw new Me("Schema is not configured to execute subscription operation.",{nodes:r});const c=UE(t,n,i,l,r.selectionSet),[p,d]=[...c.entries()][0],m=YA(t,l,d[0]);if(!m){const x=d[0].name.value;throw new Me(`The subscription field "${x}" is not defined.`,{nodes:d})}const b=Bd(void 0,p,l.name),E=$A(e,m,d,l,b);try{var y;const x=Cy(m,d[0],i),w=e.contextValue,N=await((y=m.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(o,x,w,E);if(N instanceof Error)throw N;return N}catch(x){throw xr(x,d,bi(b))}}function XA(e){return{Field(t){const n=e.getFieldDef(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||Vr(!1),e.reportError(new Me(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new Me(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const o=e.getParentType(),l=e.getFieldDef();o!=null&&l!=null||Vr(!1),e.reportError(new Me(`Field "${o.name}.${l.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=gn(e.getParentInputType());if(nn(n)){const r=n.getFields()[t.name.value],i=r?.deprecationReason;i!=null&&e.reportError(new Me(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n?.deprecationReason;if(n&&r!=null){const i=gn(e.getInputType());i!=null||Vr(!1),e.reportError(new Me(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function m8(e){return{Field(t){const n=gn(e.getType());n&&hf(n)&&e.reportError(new Me(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function Ry(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function l(p){return t.inputValueDeprecation?p:""}const c=t.oneOf?"isOneOf":"";return`
query IntrospectionQuery {
__schema {
${o}
queryType { name kind }
mutationType { name kind }
subscriptionType { name kind }
types {
...FullType
}
directives {
name
${n}
${i}
locations
args${l("(includeDeprecated: true)")} {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
${n}
${r}
${c}
fields(includeDeprecated: true) {
name
${n}
args${l("(includeDeprecated: true)")} {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields${l("(includeDeprecated: true)")} {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
${n}
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
${n}
type { ...TypeRef }
defaultValue
${l("isDeprecated")}
${l("deprecationReason")}
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
}
`}function WE(e,t){let n=null;for(const i of e.definitions)if(i.kind===K.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}function g8(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new Me("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new Me("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new Me("Schema is not configured for subscriptions.",{nodes:t});return n}throw new Me("Can only have query, mutation and subscription operations.",{nodes:t})}function v8(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t},r=Ai(Ry(n)),i=VA({schema:e,document:r});return!i.errors&&i.data||Vr(!1),i.data}function QE(e,t){qo(e)&&qo(e.__schema)||Zt(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Ue(e)}.`);const n=e.__schema,r=ku(n.types,V=>V.name,V=>E(V));for(const V of[...am,...cm])r[V.name]&&(r[V.name]=V);const i=n.queryType?m(n.queryType):null,o=n.mutationType?m(n.mutationType):null,l=n.subscriptionType?m(n.subscriptionType):null,c=n.directives?n.directives.map(F):[];return new mf({description:n.description,query:i,mutation:o,subscription:l,types:Object.values(r),directives:c,assumeValid:t?.assumeValid});function p(V){if(V.kind===Un.LIST){const $=V.ofType;if(!$)throw new Error("Decorated type deeper than introspection query.");return new lr(p($))}if(V.kind===Un.NON_NULL){const $=V.ofType;if(!$)throw new Error("Decorated type deeper than introspection query.");const X=p($);return new Pt(IN(X))}return d(V)}function d(V){const $=V.name;if(!$)throw new Error(`Unknown type reference: ${Ue(V)}.`);const X=r[$];if(!X)throw new Error(`Invalid or incomplete schema, unknown type: ${$}. Ensure that a full introspection query is used in order to build a client schema.`);return X}function m(V){return RN(d(V))}function b(V){return MN(d(V))}function E(V){if(V!=null&&V.name!=null&&V.kind!=null)switch(V.kind){case Un.SCALAR:return y(V);case Un.OBJECT:return w(V);case Un.INTERFACE:return k(V);case Un.UNION:return N(V);case Un.ENUM:return D(V);case Un.INPUT_OBJECT:return A(V)}const $=Ue(V);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${$}.`)}function y(V){return new ma({name:V.name,description:V.description,specifiedByURL:V.specifiedByURL})}function x(V){if(V.interfaces===null&&V.kind===Un.INTERFACE)return[];if(!V.interfaces){const $=Ue(V);throw new Error(`Introspection result missing interfaces: ${$}.`)}return V.interfaces.map(b)}function w(V){return new si({name:V.name,description:V.description,interfaces:()=>x(V),fields:()=>C(V)})}function k(V){return new ao({name:V.name,description:V.description,interfaces:()=>x(V),fields:()=>C(V)})}function N(V){if(!V.possibleTypes){const $=Ue(V);throw new Error(`Introspection result missing possibleTypes: ${$}.`)}return new Iu({name:V.name,description:V.description,types:()=>V.possibleTypes.map(m)})}function D(V){if(!V.enumValues){const $=Ue(V);throw new Error(`Introspection result missing enumValues: ${$}.`)}return new Hi({name:V.name,description:V.description,values:ku(V.enumValues,$=>$.name,$=>({description:$.description,deprecationReason:$.deprecationReason}))})}function A(V){if(!V.inputFields){const $=Ue(V);throw new Error(`Introspection result missing inputFields: ${$}.`)}return new so({name:V.name,description:V.description,fields:()=>j(V.inputFields),isOneOf:V.isOneOf})}function C(V){if(!V.fields)throw new Error(`Introspection result missing fields: ${Ue(V)}.`);return ku(V.fields,$=>$.name,M)}function M(V){const $=p(V.type);if(!kl($)){const X=Ue($);throw new Error(`Introspection must provide output type for fields, but received: ${X}.`)}if(!V.args){const X=Ue(V);throw new Error(`Introspection result missing field args: ${X}.`)}return{description:V.description,deprecationReason:V.deprecationReason,type:$,args:j(V.args)}}function j(V){return ku(V,$=>$.name,P)}function P(V){const $=p(V.type);if(!Di($)){const J=Ue($);throw new Error(`Introspection must provide input type for arguments, but received: ${J}.`)}const X=V.defaultValue!=null?Ea(_N(V.defaultValue),$):void 0;return{description:V.description,type:$,defaultValue:X,deprecationReason:V.deprecationReason}}function F(V){if(!V.args){const $=Ue(V);throw new Error(`Introspection result missing directive args: ${$}.`)}if(!V.locations){const $=Ue(V);throw new Error(`Introspection result missing directive locations: ${$}.`)}return new To({name:V.name,description:V.description,isRepeatable:V.isRepeatable,locations:V.locations.slice(),args:j(V.args)})}}function y8(e,t,n){_E(e),t!=null&&t.kind===K.DOCUMENT||Zt(!1,"Must provide valid Document AST."),n?.assumeValid!==!0&&n?.assumeValidSDL!==!0&&X6(t,e);const r=e.toConfig(),i=ZA(r,t,n);return r===i?e:new mf(i)}function ZA(e,t,n){var r,i,o,l;const c=[],p=Object.create(null),d=[];let m;const b=[];for(const ae of t.definitions)if(ae.kind===K.SCHEMA_DEFINITION)m=ae;else if(ae.kind===K.SCHEMA_EXTENSION)b.push(ae);else if(qd(ae))c.push(ae);else if(Ey(ae)){const pe=ae.name.value,ce=p[pe];p[pe]=ce?ce.concat([ae]):[ae]}else ae.kind===K.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(p).length===0&&c.length===0&&d.length===0&&b.length===0&&m==null)return e;const E=Object.create(null);for(const ae of e.types)E[ae.name]=D(ae);for(const ae of c){var y;const pe=ae.name.value;E[pe]=(y=JA[pe])!==null&&y!==void 0?y:ge(ae)}const x={query:e.query&&k(e.query),mutation:e.mutation&&k(e.mutation),subscription:e.subscription&&k(e.subscription),...m&&X([m]),...X(b)};return{description:(r=m)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...x,types:Object.values(E),directives:[...e.directives.map(N),...d.map(Q)],extensions:Object.create(null),astNode:(o=m)!==null&&o!==void 0?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(b),assumeValid:(l=n?.assumeValid)!==null&&l!==void 0?l:!1};function w(ae){return mn(ae)?new lr(w(ae.ofType)):_t(ae)?new Pt(w(ae.ofType)):k(ae)}function k(ae){return E[ae.name]}function N(ae){const pe=ae.toConfig();return new To({...pe,args:Dl(pe.args,$)})}function D(ae){if(hf(ae)||sm(ae))return ae;if(Oi(ae))return M(ae);if(At(ae))return j(ae);if(Rt(ae))return P(ae);if(ar(ae))return F(ae);if(Wn(ae))return C(ae);if(nn(ae))return A(ae);Vr(!1,"Unexpected type: "+Ue(ae))}function A(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ce.name])!==null&&pe!==void 0?pe:[];return new so({...ce,fields:()=>({...Dl(ce.fields,Se=>({...Se,type:w(Se.type)})),...re(he)}),extensionASTNodes:ce.extensionASTNodes.concat(he)})}function C(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ae.name])!==null&&pe!==void 0?pe:[];return new Hi({...ce,values:{...ce.values,...se(he)},extensionASTNodes:ce.extensionASTNodes.concat(he)})}function M(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ce.name])!==null&&pe!==void 0?pe:[];let Se=ce.specifiedByURL;for(const Ge of he){var Ie;Se=(Ie=eO(Ge))!==null&&Ie!==void 0?Ie:Se}return new ma({...ce,specifiedByURL:Se,extensionASTNodes:ce.extensionASTNodes.concat(he)})}function j(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ce.name])!==null&&pe!==void 0?pe:[];return new si({...ce,interfaces:()=>[...ae.getInterfaces().map(k),...fe(he)],fields:()=>({...Dl(ce.fields,V),...B(he)}),extensionASTNodes:ce.extensionASTNodes.concat(he)})}function P(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ce.name])!==null&&pe!==void 0?pe:[];return new ao({...ce,interfaces:()=>[...ae.getInterfaces().map(k),...fe(he)],fields:()=>({...Dl(ce.fields,V),...B(he)}),extensionASTNodes:ce.extensionASTNodes.concat(he)})}function F(ae){var pe;const ce=ae.toConfig(),he=(pe=p[ce.name])!==null&&pe!==void 0?pe:[];return new Iu({...ce,types:()=>[...ae.getTypes().map(k),...Z(he)],extensionASTNodes:ce.extensionASTNodes.concat(he)})}function V(ae){return{...ae,type:w(ae.type),args:ae.args&&Dl(ae.args,$)}}function $(ae){return{...ae,type:w(ae.type)}}function X(ae){const pe={};for(const he of ae){var ce;const Se=(ce=he.operationTypes)!==null&&ce!==void 0?ce:[];for(const Ie of Se)pe[Ie.operation]=J(Ie.type)}return pe}function J(ae){var pe;const ce=ae.name.value,he=(pe=JA[ce])!==null&&pe!==void 0?pe:E[ce];if(he===void 0)throw new Error(`Unknown type: "${ce}".`);return he}function ee(ae){return ae.kind===K.LIST_TYPE?new lr(ee(ae.type)):ae.kind===K.NON_NULL_TYPE?new Pt(ee(ae.type)):J(ae)}function Q(ae){var pe;return new To({name:ae.name.value,description:(pe=ae.description)===null||pe===void 0?void 0:pe.value,locations:ae.locations.map(({value:ce})=>ce),isRepeatable:ae.repeatable,args:ne(ae.arguments),astNode:ae})}function B(ae){const pe=Object.create(null);for(const Se of ae){var ce;const Ie=(ce=Se.fields)!==null&&ce!==void 0?ce:[];for(const Ge of Ie){var he;pe[Ge.name.value]={type:ee(Ge.type),description:(he=Ge.description)===null||he===void 0?void 0:he.value,args:ne(Ge.arguments),deprecationReason:My(Ge),astNode:Ge}}}return pe}function ne(ae){const pe=ae??[],ce=Object.create(null);for(const Se of pe){var he;const Ie=ee(Se.type);ce[Se.name.value]={type:Ie,description:(he=Se.description)===null||he===void 0?void 0:he.value,defaultValue:Ea(Se.defaultValue,Ie),deprecationReason:My(Se),astNode:Se}}return ce}function re(ae){const pe=Object.create(null);for(const Se of ae){var ce;const Ie=(ce=Se.fields)!==null&&ce!==void 0?ce:[];for(const Ge of Ie){var he;const Ze=ee(Ge.type);pe[Ge.name.value]={type:Ze,description:(he=Ge.description)===null||he===void 0?void 0:he.value,defaultValue:Ea(Ge.defaultValue,Ze),deprecationReason:My(Ge),astNode:Ge}}}return pe}function se(ae){const pe=Object.create(null);for(const Se of ae){var ce;const Ie=(ce=Se.values)!==null&&ce!==void 0?ce:[];for(const Ge of Ie){var he;pe[Ge.name.value]={description:(he=Ge.description)===null||he===void 0?void 0:he.value,deprecationReason:My(Ge),astNode:Ge}}}return pe}function fe(ae){return ae.flatMap(pe=>{var ce,he;return(ce=(he=pe.interfaces)===null||he===void 0?void 0:he.map(J))!==null&&ce!==void 0?ce:[]})}function Z(ae){return ae.flatMap(pe=>{var ce,he;return(ce=(he=pe.types)===null||he===void 0?void 0:he.map(J))!==null&&ce!==void 0?ce:[]})}function ge(ae){var pe;const ce=ae.name.value,he=(pe=p[ce])!==null&&pe!==void 0?pe:[];switch(ae.kind){case K.OBJECT_TYPE_DEFINITION:{var Se;const at=[ae,...he];return new si({name:ce,description:(Se=ae.description)===null||Se===void 0?void 0:Se.value,interfaces:()=>fe(at),fields:()=>B(at),astNode:ae,extensionASTNodes:he})}case K.INTERFACE_TYPE_DEFINITION:{var Ie;const at=[ae,...he];return new ao({name:ce,description:(Ie=ae.description)===null||Ie===void 0?void 0:Ie.value,interfaces:()=>fe(at),fields:()=>B(at),astNode:ae,extensionASTNodes:he})}case K.ENUM_TYPE_DEFINITION:{var Ge;const at=[ae,...he];return new Hi({name:ce,description:(Ge=ae.description)===null||Ge===void 0?void 0:Ge.value,values:se(at),astNode:ae,extensionASTNodes:he})}case K.UNION_TYPE_DEFINITION:{var Ze;const at=[ae,...he];return new Iu({name:ce,description:(Ze=ae.description)===null||Ze===void 0?void 0:Ze.value,types:()=>Z(at),astNode:ae,extensionASTNodes:he})}case K.SCALAR_TYPE_DEFINITION:{var It;return new ma({name:ce,description:(It=ae.description)===null||It===void 0?void 0:It.value,specifiedByURL:eO(ae),astNode:ae,extensionASTNodes:he})}case K.INPUT_OBJECT_TYPE_DEFINITION:{var vt;const at=[ae,...he];return new so({name:ce,description:(vt=ae.description)===null||vt===void 0?void 0:vt.value,fields:()=>re(at),astNode:ae,extensionASTNodes:he,isOneOf:b8(ae)})}}}}const JA=Ol([...am,...cm],e=>e.name);function My(e){const t=Ps(py,e);return t?.reason}function eO(e){const t=Ps(yE,e);return t?.url}function b8(e){return!!Ps(bE,e)}function Ly(e,t){e!=null&&e.kind===K.DOCUMENT||Zt(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&K6(e);const r=ZA({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const o of r.types)switch(o.name){case"Query":r.query=o;break;case"Mutation":r.mutation=o;break;case"Subscription":r.subscription=o;break}const i=[...r.directives,...Fu.filter(o=>r.directives.every(l=>l.name!==o.name))];return new mf({...r,directives:i})}function KE(e,t){const n=Ai(e,{noLocation:t?.noLocation,allowLegacyFragmentVariables:t?.allowLegacyFragmentVariables});return Ly(n,{assumeValidSDL:t?.assumeValidSDL,assumeValid:t?.assumeValid})}function E8(e){const t=e.toConfig(),n=ku(XE(t.types),E=>E.name,b);return new mf({...t,types:Object.values(n),directives:XE(t.directives).map(l),query:o(t.query),mutation:o(t.mutation),subscription:o(t.subscription)});function r(E){return mn(E)?new lr(r(E.ofType)):_t(E)?new Pt(r(E.ofType)):i(E)}function i(E){return n[E.name]}function o(E){return E&&i(E)}function l(E){const y=E.toConfig();return new To({...y,locations:tO(y.locations,x=>x),args:c(y.args)})}function c(E){return Iy(E,y=>({...y,type:r(y.type)}))}function p(E){return Iy(E,y=>({...y,type:r(y.type),args:y.args&&c(y.args)}))}function d(E){return Iy(E,y=>({...y,type:r(y.type)}))}function m(E){return XE(E).map(i)}function b(E){if(Oi(E)||hf(E))return E;if(At(E)){const y=E.toConfig();return new si({...y,interfaces:()=>m(y.interfaces),fields:()=>p(y.fields)})}if(Rt(E)){const y=E.toConfig();return new ao({...y,interfaces:()=>m(y.interfaces),fields:()=>p(y.fields)})}if(ar(E)){const y=E.toConfig();return new Iu({...y,types:()=>m(y.types)})}if(Wn(E)){const y=E.toConfig();return new Hi({...y,values:Iy(y.values,x=>x)})}if(nn(E)){const y=E.toConfig();return new so({...y,fields:()=>d(y.fields)})}Vr(!1,"Unexpected type: "+Ue(E))}}function Iy(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(Jh))n[r]=t(e[r]);return n}function XE(e){return tO(e,t=>t.name)}function tO(e,t){return e.slice().sort((n,r)=>{const i=t(n),o=t(r);return Jh(i,o)})}function S8(e){return nO(e,t=>!hy(t),x8)}function T8(e){return nO(e,hy,hf)}function x8(e){return!sm(e)&&!hf(e)}function nO(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[w8(e),...r.map(o=>R8(o)),...i.map(o=>rO(o))].filter(Boolean).join(`
`)}function w8(e){if(e.description==null&&C8(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Sa(e)+`schema {
${t.join(`
`)}
}`}function C8(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function rO(e){if(Oi(e))return _8(e);if(At(e))return N8(e);if(Rt(e))return A8(e);if(ar(e))return O8(e);if(Wn(e))return D8(e);if(nn(e))return k8(e);Vr(!1,"Unexpected type: "+Ue(e))}function _8(e){return Sa(e)+`scalar ${e.name}`+M8(e)}function iO(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function N8(e){return Sa(e)+`type ${e.name}`+iO(e)+oO(e)}function A8(e){return Sa(e)+`interface ${e.name}`+iO(e)+oO(e)}function O8(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Sa(e)+"union "+e.name+n}function D8(e){const t=e.getValues().map((n,r)=>Sa(n," ",!r)+" "+n.name+eS(n.deprecationReason));return Sa(e)+`enum ${e.name}`+ZE(t)}function k8(e){const t=Object.values(e.getFields()).map((n,r)=>Sa(n," ",!r)+" "+JE(n));return Sa(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+ZE(t)}function oO(e){const t=Object.values(e.getFields()).map((n,r)=>Sa(n," ",!r)+" "+n.name+aO(n.args," ")+": "+String(n.type)+eS(n.deprecationReason));return ZE(t)}function ZE(e){return e.length!==0?` {
`+e.join(`
`)+`
}`:""}function aO(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(JE).join(", ")+")":`(
`+e.map((n,r)=>Sa(n," "+t,!r)+" "+t+JE(n)).join(`
`)+`
`+t+")"}function JE(e){const t=Ml(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${pn(t)}`),n+eS(e.deprecationReason)}function R8(e){return Sa(e)+"directive @"+e.name+aO(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function eS(e){return e==null?"":e!==vE?` @deprecated(reason: ${pn({kind:K.STRING,value:e})})`:" @deprecated"}function M8(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${pn({kind:K.STRING,value:e.specifiedByURL})})`}function Sa(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=pn({kind:K.STRING,value:r,block:yV(r)});return(t&&!n?`
`+t:t)+i.replace(/\n/g,`
`+t)+`
`}function L8(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:K.DOCUMENT,definitions:t}}function I8(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case K.OPERATION_DEFINITION:t.push(i);break;case K.FRAGMENT_DEFINITION:n[i.name.value]=lO(i.selectionSet);break}const r=Object.create(null);for(const i of t){const o=new Set;for(const c of lO(i.selectionSet))sO(o,n,c);const l=i.name?i.name.value:"";r[l]={kind:K.DOCUMENT,definitions:e.definitions.filter(c=>c===i||c.kind===K.FRAGMENT_DEFINITION&&o.has(c.name.value))}}return r}function sO(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)sO(e,t,i)}}function lO(e){const t=[];return Tr(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function uO(e){const t=CN(e)?e:new Zh(e),n=t.body,r=new fE(t);let i="",o=!1;for(;r.advance().kind!==Pe.EOF;){const l=r.token,c=l.kind,p=!EN(l.kind);o&&(p||l.kind===Pe.SPREAD)&&(i+=" ");const d=n.slice(l.start,l.end);c===Pe.BLOCK_STRING?i+=bN(l.value,{minimize:!0}):i+=d,o=p}return i}function F8(e){const t=cO(e);if(t)throw t;return e}function cO(e){if(typeof e=="string"||Zt(!1,"Expected name to be a string."),e.startsWith("__"))return new Me(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Bo(e)}catch(t){return t}}var kr;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(kr||(kr={}));var es;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(es||(es={}));function P8(e,t){return fO(e,t).filter(n=>n.type in kr)}function j8(e,t){return fO(e,t).filter(n=>n.type in es)}function fO(e,t){return[...U8(e,t),...V8(e,t)]}function V8(e,t){const n=[],r=Ll(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:kr.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,o]of r.persisted){const l=Ll(i.args,o.args);for(const c of l.added)Lu(c)&&n.push({type:kr.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${c.name} on directive ${i.name} was added.`});for(const c of l.removed)n.push({type:kr.DIRECTIVE_ARG_REMOVED,description:`${c.name} was removed from ${i.name}.`});i.isRepeatable&&!o.isRepeatable&&n.push({type:kr.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const c of i.locations)o.locations.includes(c)||n.push({type:kr.DIRECTIVE_LOCATION_REMOVED,description:`${c} was removed from ${i.name}.`})}return n}function U8(e,t){const n=[],r=Ll(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:kr.TYPE_REMOVED,description:sm(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,o]of r.persisted)Wn(i)&&Wn(o)?n.push(...$8(i,o)):ar(i)&&ar(o)?n.push(...B8(i,o)):nn(i)&&nn(o)?n.push(...q8(i,o)):At(i)&&At(o)?n.push(...pO(i,o),...dO(i,o)):Rt(i)&&Rt(o)?n.push(...pO(i,o),...dO(i,o)):i.constructor!==o.constructor&&n.push({type:kr.TYPE_CHANGED_KIND,description:`${i.name} changed from ${hO(i)} to ${hO(o)}.`});return n}function q8(e,t){const n=[],r=Ll(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)ay(i)?n.push({type:kr.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:es.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:kr.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted)gm(i.type,o.type)||n.push({type:kr.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`});return n}function B8(e,t){const n=[],r=Ll(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:es.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:kr.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function $8(e,t){const n=[],r=Ll(e.getValues(),t.getValues());for(const i of r.added)n.push({type:es.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:kr.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function dO(e,t){const n=[],r=Ll(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:es.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:kr.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function pO(e,t){const n=[],r=Ll(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:kr.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted)n.push(...z8(e,i,o)),mm(i.type,o.type)||n.push({type:kr.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`});return n}function z8(e,t,n){const r=[],i=Ll(t.args,n.args);for(const o of i.removed)r.push({type:kr.ARG_REMOVED,description:`${e.name}.${t.name} arg ${o.name} was removed.`});for(const[o,l]of i.persisted)if(!gm(o.type,l.type))r.push({type:kr.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${o.name} has changed type from ${String(o.type)} to ${String(l.type)}.`});else if(o.defaultValue!==void 0)if(l.defaultValue===void 0)r.push({type:es.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} defaultValue was removed.`});else{const p=mO(o.defaultValue,o.type),d=mO(l.defaultValue,l.type);p!==d&&r.push({type:es.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} has changed defaultValue from ${p} to ${d}.`})}for(const o of i.added)Lu(o)?r.push({type:kr.REQUIRED_ARG_ADDED,description:`A required arg ${o.name} on ${e.name}.${t.name} was added.`}):r.push({type:es.OPTIONAL_ARG_ADDED,description:`An optional arg ${o.name} on ${e.name}.${t.name} was added.`});return r}function mm(e,t){return mn(e)?mn(t)&&mm(e.ofType,t.ofType)||_t(t)&&mm(e,t.ofType):_t(e)?_t(t)&&mm(e.ofType,t.ofType):Rl(t)&&e.name===t.name||_t(t)&&mm(e,t.ofType)}function gm(e,t){return mn(e)?mn(t)&&gm(e.ofType,t.ofType):_t(e)?_t(t)&&gm(e.ofType,t.ofType)||!_t(t)&&gm(e.ofType,t):Rl(t)&&e.name===t.name}function hO(e){if(Oi(e))return"a Scalar type";if(At(e))return"an Object type";if(Rt(e))return"an Interface type";if(ar(e))return"a Union type";if(Wn(e))return"an Enum type";if(nn(e))return"an Input type";Vr(!1,"Unexpected type: "+Ue(e))}function mO(e,t){const n=Ml(e,t);return n!=null||Vr(!1),pn(Sy(n))}function Ll(e,t){const n=[],r=[],i=[],o=Ol(e,({name:c})=>c),l=Ol(t,({name:c})=>c);for(const c of e){const p=l[c.name];p===void 0?r.push(c):i.push([c,p])}for(const c of t)o[c.name]===void 0&&n.push(c);return{added:n,persisted:i,removed:r}}const H8=Object.freeze(Object.defineProperty({__proto__:null,BREAK:df,get BreakingChangeType(){return kr},DEFAULT_DEPRECATION_REASON:vE,get DangerousChangeType(){return es},get DirectiveLocation(){return lt},ExecutableDefinitionsRule:RE,FieldsOnCorrectTypeRule:YN,FragmentsOnCompositeTypesRule:WN,GRAPHQL_MAX_INT:ly,GRAPHQL_MIN_INT:uy,GraphQLBoolean:Zn,GraphQLDeprecatedDirective:py,GraphQLDirective:To,GraphQLEnumType:Hi,GraphQLError:Me,GraphQLFloat:im,GraphQLID:om,GraphQLIncludeDirective:fy,GraphQLInputObjectType:so,GraphQLInt:rm,GraphQLInterfaceType:ao,GraphQLList:lr,GraphQLNonNull:Pt,GraphQLObjectType:si,GraphQLOneOfDirective:bE,GraphQLScalarType:ma,GraphQLSchema:mf,GraphQLSkipDirective:dy,GraphQLSpecifiedByDirective:yE,GraphQLString:Xn,GraphQLUnionType:Iu,get Kind(){return K},KnownArgumentNamesRule:QN,KnownDirectivesRule:ME,KnownFragmentNamesRule:XN,KnownTypeNamesRule:LE,Lexer:fE,Location:mN,LoneAnonymousOperationRule:JN,LoneSchemaDefinitionRule:eA,MaxIntrospectionDepthRule:tA,NoDeprecatedCustomRule:XA,NoFragmentCyclesRule:nA,NoSchemaIntrospectionCustomRule:m8,NoUndefinedVariablesRule:rA,NoUnusedFragmentsRule:IE,NoUnusedVariablesRule:iA,get OperationTypeNode(){return oi},OverlappingFieldsCanBeMergedRule:aA,PossibleFragmentSpreadsRule:fA,PossibleTypeExtensionsRule:dA,ProvidedRequiredArgumentsRule:pA,ScalarLeafsRule:mA,SchemaMetaFieldDef:va,SingleFieldSubscriptionsRule:SA,Source:Zh,Token:sE,get TokenKind(){return Pe},TypeInfo:Pu,get TypeKind(){return Un},TypeMetaFieldDef:ya,TypeNameMetaFieldDef:ba,UniqueArgumentDefinitionNamesRule:TA,UniqueArgumentNamesRule:$E,UniqueDirectiveNamesRule:xA,UniqueDirectivesPerLocationRule:zE,UniqueEnumValueNamesRule:wA,UniqueFieldDefinitionNamesRule:CA,UniqueFragmentNamesRule:_A,UniqueInputFieldNamesRule:HE,UniqueOperationNamesRule:NA,UniqueOperationTypesRule:AA,UniqueTypeNamesRule:OA,UniqueVariableNamesRule:DA,ValidationContext:FA,ValuesOfCorrectTypeRule:kA,VariablesAreInputTypesRule:RA,VariablesInAllowedPositionRule:MA,__Directive:SE,__DirectiveLocation:TE,__EnumValue:wE,__Field:xE,__InputValue:um,__Schema:my,__Type:ga,__TypeKind:CE,assertAbstractType:LN,assertCompositeType:n6,assertDirective:s6,assertEnumType:QV,assertEnumValueName:kN,assertInputObjectType:KV,assertInputType:JV,assertInterfaceType:MN,assertLeafType:t6,assertListType:XV,assertName:Bo,assertNamedType:i6,assertNonNullType:ZV,assertNullableType:IN,assertObjectType:RN,assertOutputType:e6,assertScalarType:YV,assertSchema:_E,assertType:GV,assertUnionType:WV,assertValidName:F8,assertValidSchema:yy,assertWrappingType:r6,astFromValue:Ml,buildASTSchema:Ly,buildClientSchema:QE,buildSchema:KE,coerceInputValue:VE,concatAST:L8,createSourceEventStream:KA,defaultFieldResolver:ky,defaultTypeResolver:GA,doTypesOverlap:nm,execute:Ny,executeSync:VA,extendSchema:y8,findBreakingChanges:P8,findDangerousChanges:j8,formatError:hV,getArgumentValues:Cy,getDirectiveValues:Ps,getEnterLeaveForKind:jd,getIntrospectionQuery:Ry,getLocation:Xv,getNamedType:gn,getNullableType:Mu,getOperationAST:WE,getOperationRootType:g8,getVariableValues:yA,getVisitFn:$V,graphql:u8,graphqlSync:c8,introspectionFromSchema:v8,introspectionTypes:cm,isAbstractType:sr,isCompositeType:Qr,isConstValueNode:DE,isDefinitionNode:E6,isDirective:cy,isEnumType:Wn,isEqualType:sy,isExecutableDefinitionNode:OE,isInputObjectType:nn,isInputType:Di,isInterfaceType:Rt,isIntrospectionType:hf,isLeafType:ai,isListType:mn,isNamedType:Rl,isNonNullType:_t,isNullableType:tm,isObjectType:At,isOutputType:kl,isRequiredArgument:Lu,isRequiredInputField:ay,isScalarType:Oi,isSchema:gy,isSelectionNode:S6,isSpecifiedDirective:hy,isSpecifiedScalarType:sm,isType:Vd,isTypeDefinitionNode:qd,isTypeExtensionNode:Ey,isTypeNode:T6,isTypeSubTypeOf:pf,isTypeSystemDefinitionNode:by,isTypeSystemExtensionNode:kE,isUnionType:ar,isValidNameError:cO,isValueNode:GN,isWrappingType:em,lexicographicSortSchema:E8,locatedError:xr,parse:Ai,parseConstValue:LV,parseType:IV,parseValue:_N,print:pn,printError:pV,printIntrospectionSchema:T8,printLocation:dN,printSchema:S8,printSourceLocation:aE,printType:rO,recommendedRules:LA,resolveObjMapThunk:gE,resolveReadonlyArrayThunk:mE,responsePathAsArray:bi,separateOperations:I8,specifiedDirectives:Fu,specifiedRules:GE,specifiedScalarTypes:am,stripIgnoredCharacters:uO,subscribe:d8,syntaxError:ii,typeFromAST:yi,validate:pm,validateSchema:vy,valueFromAST:Ea,valueFromASTUntyped:iy,version:cV,versionInfo:Kv,visit:Tr,visitInParallel:hE,visitWithTypeInfo:ju},Symbol.toStringTag,{value:"Module"}));var gO=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function c(m){try{d(r.next(m))}catch(b){l(b)}}function p(m){try{d(r.throw(m))}catch(b){l(b)}}function d(m){m.done?o(m.value):i(m.value).then(c,p)}d((r=r.apply(e,t||[])).next())})};function vO(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function G8(e){return new Promise((t,n)=>{const r=e.subscribe({next(i){t(i),r.unsubscribe()},error:n,complete(){n(new Error("no value resolved"))}})})}function yO(e){return typeof e=="object"&&e!==null&&"subscribe"in e&&typeof e.subscribe=="function"}function bO(e){return typeof e=="object"&&e!==null&&(e[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in e)}function Y8(e){var t;return gO(this,void 0,void 0,function*(){const n=(t=("return"in e?e:e[Symbol.asyncIterator]()).return)===null||t===void 0?void 0:t.bind(e),i=yield("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e)();return n?.(),i.value})}function EO(e){return gO(this,void 0,void 0,function*(){const t=yield e;return bO(t)?Y8(t):yO(t)?G8(t):t})}async function W8(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get("content-type");if(!n||!~n.indexOf("multipart/"))return e;let r=n.indexOf("boundary="),i="-";if(~r){let o=r+9,l=n.indexOf(";",o);i=n.slice(o,l>-1?l:void 0).trim().replace(/"/g,"")}return async function*(o,l,c){let p,d,m,b=new TextDecoder("utf8"),E=o.getReader(),y=!0,x=l.length,w="",k=[];try{let N;e:for(;!(N=await E.read()).done;){let D=b.decode(N.value,{stream:!0});p=w.length,w+=D;let A=D.indexOf(l);for(~A?p+=A:p=w.indexOf(l),k=[];~p;){let C=w.slice(0,p),M=w.slice(p+x);if(d){let j=C.indexOf(`\r
\r
`)+4,P=C.lastIndexOf(`\r
`,j),F=!1,V=C.slice(j,P>-1?void 0:P),$=String(C.slice(0,j)).trim().split(`\r
`),X={},J=$.length;for(;m=$[--J];m=m.split(": "),X[m.shift().toLowerCase()]=m.join(": "));if(m=X["content-type"],m&&~m.indexOf("application/json"))try{V=JSON.parse(V),F=!0}catch{}if(m={headers:X,body:V,json:F},y?yield m:k.push(m),M.slice(0,2)==="--")break e}else l=`\r
`+l,d=x+=2;w=M,p=w.indexOf(l)}k.length&&(yield k)}}finally{k.length&&(yield k),await E.cancel()}}(e.body,`--${i}`)}var tS=function(e){return this instanceof tS?(this.v=e,this):new tS(e)};function nS(e){return JSON.stringify(e,null,2)}function Q8(e){return Object.assign(Object.assign({},e),{message:e.message,stack:e.stack})}function SO(e){return e instanceof Error?Q8(e):e}function vm(e){return Array.isArray(e)?nS({errors:e.map(t=>SO(t))}):nS({errors:[SO(e)]})}function rS(e){return nS(e)}function K8(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=Ai(t)}catch{return{insertions:r,result:t}}const o=n||X8,l=new Pu(e);return Tr(i,{leave(c){l.leave(c)},enter(c){if(l.enter(c),c.kind==="Field"&&!c.selectionSet){const p=l.getType(),d=TO(e9(p),o);if(d&&c.loc){const m=J8(t,c.loc.start);r.push({index:c.loc.end,string:" "+pn(d).replaceAll(`
`,`
`+m)})}}}}),{insertions:r,result:Z8(t,r)}}function X8(e){if(!("getFields"in e))return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];for(const r of Object.keys(t))ai(t[r].type)&&n.push(r);return n}function TO(e,t){const n=gn(e);if(!e||ai(e))return;const r=t(n);if(!(!Array.isArray(r)||r.length===0||!("getFields"in n)))return{kind:K.SELECTION_SET,selections:r.map(i=>{const o=n.getFields()[i],l=o?o.type:null;return{kind:K.FIELD,name:{kind:K.NAME,value:i},selectionSet:TO(l,t)}})}}function Z8(e,t){if(t.length===0)return e;let n="",r=0;for(const{index:i,string:o}of t)n+=e.slice(r,i)+o,r=i;return n+=e.slice(r),n}function J8(e,t){let n=t,r=t;for(;n;){const i=e.charCodeAt(n-1);if(i===10||i===13||i===8232||i===8233)break;n--,i!==9&&i!==11&&i!==12&&i!==32&&i!==160&&(r=n)}return e.slice(n,r)}function e9(e){if(e)return e}function t9(e,t){var n;const r=new Map,i=[];for(const o of e)if(o.kind==="Field"){const l=t(o),c=r.get(l);if(!((n=o.directives)===null||n===void 0)&&n.length){const p=Object.assign({},o);i.push(p)}else if(c?.selectionSet&&o.selectionSet)c.selectionSet.selections=[...c.selectionSet.selections,...o.selectionSet.selections];else if(!c){const p=Object.assign({},o);r.set(l,p),i.push(p)}}else i.push(o);return i}function xO(e,t,n){var r;const i=n?gn(n).name:null,o=[],l=[];for(let c of t){if(c.kind==="FragmentSpread"){const p=c.name.value;if(!c.directives||c.directives.length===0){if(l.includes(p))continue;l.push(p)}const d=e[c.name.value];if(d){const{typeCondition:m,directives:b,selectionSet:E}=d;c={kind:K.INLINE_FRAGMENT,typeCondition:m,directives:b,selectionSet:E}}}if(c.kind===K.INLINE_FRAGMENT&&(!c.directives||((r=c.directives)===null||r===void 0?void 0:r.length)===0)){const p=c.typeCondition?c.typeCondition.name.value:null;if(!p||p===i){o.push(...xO(e,c.selectionSet.selections,n));continue}}o.push(c)}return o}function n9(e,t){const n=t?new Pu(t):null,r=Object.create(null);for(const c of e.definitions)c.kind===K.FRAGMENT_DEFINITION&&(r[c.name.value]=c);const i={SelectionSet(c){const p=n?n.getParentType():null;let{selections:d}=c;return d=xO(r,d,p),Object.assign(Object.assign({},c),{selections:d})},FragmentDefinition(){return null}},o=Tr(e,n?ju(n,i):i);return Tr(o,{SelectionSet(c){let{selections:p}=c;return p=t9(p,d=>d.alias?d.alias.value:d.name.value),Object.assign(Object.assign({},c),{selections:p})},FragmentDefinition(){return null}})}function r9(e,t,n){if(!n||n.length<1)return;const r=n.map(i=>{var o;return(o=i.name)===null||o===void 0?void 0:o.value});if(t&&r.includes(t))return t;if(t&&e){const o=e.map(l=>{var c;return(c=l.name)===null||c===void 0?void 0:c.value}).indexOf(t);if(o!==-1&&o<r.length)return r[o]}return r[0]}function i9(e,t){return t instanceof DOMException&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e.length!==0}class iS{constructor(t){t?this.storage=t:t===null?this.storage=null:typeof window>"u"?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let n=0;for(const r in localStorage)r.indexOf(`${Fy}:`)===0&&(n+=1);return n},clear(){for(const n in localStorage)n.indexOf(`${Fy}:`)===0&&localStorage.removeItem(n)}}}get(t){if(!this.storage)return null;const n=`${Fy}:${t}`,r=this.storage.getItem(n);return r==="null"||r==="undefined"?(this.storage.removeItem(n),null):r||null}set(t,n){let r=!1,i=null;if(this.storage){const o=`${Fy}:${t}`;if(n)try{this.storage.setItem(o,n)}catch(l){i=l instanceof Error?l:new Error(`${l}`),r=i9(this.storage,l)}else this.storage.removeItem(o)}return{isQuotaError:r,error:i}}clear(){this.storage&&this.storage.clear()}}const Fy="graphiql";class wO{constructor(t,n,r=null){this.key=t,this.storage=n,this.maxSize=r,this.items=this.fetchAll()}get length(){return this.items.length}contains(t){return this.items.some(n=>n.query===t.query&&n.variables===t.variables&&n.headers===t.headers&&n.operationName===t.operationName)}edit(t,n){if(typeof n=="number"&&this.items[n]){const i=this.items[n];if(i.query===t.query&&i.variables===t.variables&&i.headers===t.headers&&i.operationName===t.operationName){this.items.splice(n,1,t),this.save();return}}const r=this.items.findIndex(i=>i.query===t.query&&i.variables===t.variables&&i.headers===t.headers&&i.operationName===t.operationName);r!==-1&&(this.items.splice(r,1,t),this.save())}delete(t){const n=this.items.findIndex(r=>r.query===t.query&&r.variables===t.variables&&r.headers===t.headers&&r.operationName===t.operationName);n!==-1&&(this.items.splice(n,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const t=this.storage.get(this.key);return t?JSON.parse(t)[this.key]:[]}push(t){const n=[...this.items,t];this.maxSize&&n.length>this.maxSize&&n.shift();for(let r=0;r<5;r++){const i=this.storage.set(this.key,JSON.stringify({[this.key]:n}));if(!i?.error)this.items=n;else if(i.isQuotaError&&this.maxSize)n.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const o9=1e5;class a9{constructor(t,n){this.storage=t,this.maxHistoryLength=n,this.updateHistory=({query:r,variables:i,headers:o,operationName:l})=>{if(!this.shouldSaveQuery(r,i,o,this.history.fetchRecent()))return;this.history.push({query:r,variables:i,headers:o,operationName:l});const c=this.history.items,p=this.favorite.items;this.queries=c.concat(p)},this.deleteHistory=({query:r,variables:i,headers:o,operationName:l,favorite:c},p=!1)=>{function d(m){const b=m.items.find(E=>E.query===r&&E.variables===i&&E.headers===o&&E.operationName===l);b&&m.delete(b)}(c||p)&&d(this.favorite),(!c||p)&&d(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new wO("queries",this.storage,this.maxHistoryLength),this.favorite=new wO("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(t,n,r,i){if(!t)return!1;try{Ai(t)}catch{return!1}return t.length>o9?!1:i?!(JSON.stringify(t)===JSON.stringify(i.query)&&(JSON.stringify(n)===JSON.stringify(i.variables)&&(JSON.stringify(r)===JSON.stringify(i.headers)||r&&!i.headers)||n&&!i.variables)):!0}toggleFavorite({query:t,variables:n,headers:r,operationName:i,label:o,favorite:l}){const c={query:t,variables:n,headers:r,operationName:i,label:o};l?(c.favorite=!1,this.favorite.delete(c),this.history.push(c)):(c.favorite=!0,this.favorite.push(c),this.history.delete(c)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:t,variables:n,headers:r,operationName:i,label:o,favorite:l},c){const p={query:t,variables:n,headers:r,operationName:i,label:o};l?this.favorite.edit(Object.assign(Object.assign({},p),{favorite:l}),c):this.history.edit(p,c),this.queries=[...this.history.items,...this.favorite.items]}}function yf(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=e[t[i]];return r}function ur(e,t){return s9(t,CO(e.string))}function s9(e,t){if(!t||t.trim()===""||t.trim()===":"||t.trim()==="{")return oS(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:l9(CO(r.label),t),entry:r}));return oS(oS(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.label.length-i.entry.label.length).map(r=>r.entry)}function oS(e,t){const n=e.filter(t);return n.length===0?e:n}function CO(e){return e.toLowerCase().replaceAll(/\W/g,"")}function l9(e,t){let n=u9(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function u9(e,t){let n,r;const i=[],o=e.length,l=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=l;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=l;r++){const c=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+c),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+c))}return i[o][l]}const c9=e=>` {
$1
}`,Py=(e,t,n)=>{if(!t)return n??e;const r=gn(t);return At(r)||nn(r)||mn(r)||sr(r)?e+c9():n??e},_O=(e,t,n)=>{if(mn(t)){const r=gn(t.ofType);return e+`[${Py("",r,"$1")}]`}return Py(e,t,n)},f9=e=>{const t=e.args.filter(n=>n.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((n,r)=>`${n.name}: $${r+1}`)}) ${Py("",e.type,`
`)}`};var NO;(function(e){function t(n){return typeof n=="string"}e.is=t})(NO||(NO={}));var aS;(function(e){function t(n){return typeof n=="string"}e.is=t})(aS||(aS={}));var AO;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(AO||(AO={}));var jy;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(jy||(jy={}));var ts;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=jy.MAX_VALUE),i===Number.MAX_VALUE&&(i=jy.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return Ne.objectLiteral(i)&&Ne.uinteger(i.line)&&Ne.uinteger(i.character)}e.is=n})(ts||(ts={}));var Ur;(function(e){function t(r,i,o,l){if(Ne.uinteger(r)&&Ne.uinteger(i)&&Ne.uinteger(o)&&Ne.uinteger(l))return{start:ts.create(r,i),end:ts.create(o,l)};if(ts.is(r)&&ts.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${l}]`)}e.create=t;function n(r){let i=r;return Ne.objectLiteral(i)&&ts.is(i.start)&&ts.is(i.end)}e.is=n})(Ur||(Ur={}));var Vy;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return Ne.objectLiteral(i)&&Ur.is(i.range)&&(Ne.string(i.uri)||Ne.undefined(i.uri))}e.is=n})(Vy||(Vy={}));var OO;(function(e){function t(r,i,o,l){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:l}}e.create=t;function n(r){let i=r;return Ne.objectLiteral(i)&&Ur.is(i.targetRange)&&Ne.string(i.targetUri)&&Ur.is(i.targetSelectionRange)&&(Ur.is(i.originSelectionRange)||Ne.undefined(i.originSelectionRange))}e.is=n})(OO||(OO={}));var sS;(function(e){function t(r,i,o,l){return{red:r,green:i,blue:o,alpha:l}}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&Ne.numberRange(i.red,0,1)&&Ne.numberRange(i.green,0,1)&&Ne.numberRange(i.blue,0,1)&&Ne.numberRange(i.alpha,0,1)}e.is=n})(sS||(sS={}));var DO;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&Ur.is(i.range)&&sS.is(i.color)}e.is=n})(DO||(DO={}));var kO;(function(e){function t(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&Ne.string(i.label)&&(Ne.undefined(i.textEdit)||zd.is(i))&&(Ne.undefined(i.additionalTextEdits)||Ne.typedArray(i.additionalTextEdits,zd.is))}e.is=n})(kO||(kO={}));var RO;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(RO||(RO={}));var MO;(function(e){function t(r,i,o,l,c,p){const d={startLine:r,endLine:i};return Ne.defined(o)&&(d.startCharacter=o),Ne.defined(l)&&(d.endCharacter=l),Ne.defined(c)&&(d.kind=c),Ne.defined(p)&&(d.collapsedText=p),d}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&Ne.uinteger(i.startLine)&&Ne.uinteger(i.startLine)&&(Ne.undefined(i.startCharacter)||Ne.uinteger(i.startCharacter))&&(Ne.undefined(i.endCharacter)||Ne.uinteger(i.endCharacter))&&(Ne.undefined(i.kind)||Ne.string(i.kind))}e.is=n})(MO||(MO={}));var lS;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Vy.is(i.location)&&Ne.string(i.message)}e.is=n})(lS||(lS={}));var LO;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(LO||(LO={}));var IO;(function(e){e.Unnecessary=1,e.Deprecated=2})(IO||(IO={}));var FO;(function(e){function t(n){const r=n;return Ne.objectLiteral(r)&&Ne.string(r.href)}e.is=t})(FO||(FO={}));var Uy;(function(e){function t(r,i,o,l,c,p){let d={range:r,message:i};return Ne.defined(o)&&(d.severity=o),Ne.defined(l)&&(d.code=l),Ne.defined(c)&&(d.source=c),Ne.defined(p)&&(d.relatedInformation=p),d}e.create=t;function n(r){var i;let o=r;return Ne.defined(o)&&Ur.is(o.range)&&Ne.string(o.message)&&(Ne.number(o.severity)||Ne.undefined(o.severity))&&(Ne.integer(o.code)||Ne.string(o.code)||Ne.undefined(o.code))&&(Ne.undefined(o.codeDescription)||Ne.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(Ne.string(o.source)||Ne.undefined(o.source))&&(Ne.undefined(o.relatedInformation)||Ne.typedArray(o.relatedInformation,lS.is))}e.is=n})(Uy||(Uy={}));var $d;(function(e){function t(r,i,...o){let l={title:r,command:i};return Ne.defined(o)&&o.length>0&&(l.arguments=o),l}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.string(i.title)&&Ne.string(i.command)}e.is=n})($d||($d={}));var zd;(function(e){function t(o,l){return{range:o,newText:l}}e.replace=t;function n(o,l){return{range:{start:o,end:o},newText:l}}e.insert=n;function r(o){return{range:o,newText:""}}e.del=r;function i(o){const l=o;return Ne.objectLiteral(l)&&Ne.string(l.newText)&&Ur.is(l.range)}e.is=i})(zd||(zd={}));var uS;(function(e){function t(r,i,o){const l={label:r};return i!==void 0&&(l.needsConfirmation=i),o!==void 0&&(l.description=o),l}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&Ne.string(i.label)&&(Ne.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Ne.string(i.description)||i.description===void 0)}e.is=n})(uS||(uS={}));var Hd;(function(e){function t(n){const r=n;return Ne.string(r)}e.is=t})(Hd||(Hd={}));var PO;(function(e){function t(o,l,c){return{range:o,newText:l,annotationId:c}}e.replace=t;function n(o,l,c){return{range:{start:o,end:o},newText:l,annotationId:c}}e.insert=n;function r(o,l){return{range:o,newText:"",annotationId:l}}e.del=r;function i(o){const l=o;return zd.is(l)&&(uS.is(l.annotationId)||Hd.is(l.annotationId))}e.is=i})(PO||(PO={}));var cS;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&mS.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(cS||(cS={}));var fS;(function(e){function t(r,i,o){let l={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(l.options=i),o!==void 0&&(l.annotationId=o),l}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&Ne.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Ne.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ne.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Hd.is(i.annotationId))}e.is=n})(fS||(fS={}));var dS;(function(e){function t(r,i,o,l){let c={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(c.options=o),l!==void 0&&(c.annotationId=l),c}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&Ne.string(i.oldUri)&&Ne.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Ne.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ne.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Hd.is(i.annotationId))}e.is=n})(dS||(dS={}));var pS;(function(e){function t(r,i,o){let l={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(l.options=i),o!==void 0&&(l.annotationId=o),l}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&Ne.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Ne.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Ne.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Hd.is(i.annotationId))}e.is=n})(pS||(pS={}));var hS;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>Ne.string(i.kind)?fS.is(i)||dS.is(i)||pS.is(i):cS.is(i)))}e.is=t})(hS||(hS={}));var jO;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.string(i.uri)}e.is=n})(jO||(jO={}));var VO;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.string(i.uri)&&Ne.integer(i.version)}e.is=n})(VO||(VO={}));var mS;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.string(i.uri)&&(i.version===null||Ne.integer(i.version))}e.is=n})(mS||(mS={}));var UO;(function(e){function t(r,i,o,l){return{uri:r,languageId:i,version:o,text:l}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.string(i.uri)&&Ne.string(i.languageId)&&Ne.integer(i.version)&&Ne.string(i.text)}e.is=n})(UO||(UO={}));var gS;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(gS||(gS={}));var ym;(function(e){function t(n){const r=n;return Ne.objectLiteral(n)&&gS.is(r.kind)&&Ne.string(r.value)}e.is=t})(ym||(ym={}));var qO;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(qO||(qO={}));var Gd;(function(e){e.PlainText=1,e.Snippet=2})(Gd||(Gd={}));var BO;(function(e){e.Deprecated=1})(BO||(BO={}));var $O;(function(e){function t(r,i,o){return{newText:r,insert:i,replace:o}}e.create=t;function n(r){const i=r;return i&&Ne.string(i.newText)&&Ur.is(i.insert)&&Ur.is(i.replace)}e.is=n})($O||($O={}));var bf;(function(e){e.asIs=1,e.adjustIndentation=2})(bf||(bf={}));var zO;(function(e){function t(n){const r=n;return r&&(Ne.string(r.detail)||r.detail===void 0)&&(Ne.string(r.description)||r.description===void 0)}e.is=t})(zO||(zO={}));var HO;(function(e){function t(n){return{label:n}}e.create=t})(HO||(HO={}));var GO;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(GO||(GO={}));var qy;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return Ne.string(i)||Ne.objectLiteral(i)&&Ne.string(i.language)&&Ne.string(i.value)}e.is=n})(qy||(qy={}));var YO;(function(e){function t(n){let r=n;return!!r&&Ne.objectLiteral(r)&&(ym.is(r.contents)||qy.is(r.contents)||Ne.typedArray(r.contents,qy.is))&&(n.range===void 0||Ur.is(n.range))}e.is=t})(YO||(YO={}));var WO;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(WO||(WO={}));var QO;(function(e){function t(n,r,...i){let o={label:n};return Ne.defined(r)&&(o.documentation=r),Ne.defined(i)?o.parameters=i:o.parameters=[],o}e.create=t})(QO||(QO={}));var KO;(function(e){e.Text=1,e.Read=2,e.Write=3})(KO||(KO={}));var XO;(function(e){function t(n,r){let i={range:n};return Ne.number(r)&&(i.kind=r),i}e.create=t})(XO||(XO={}));var ZO;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(ZO||(ZO={}));var JO;(function(e){e.Deprecated=1})(JO||(JO={}));var eD;(function(e){function t(n,r,i,o,l){let c={name:n,kind:r,location:{uri:o,range:i}};return l&&(c.containerName=l),c}e.create=t})(eD||(eD={}));var tD;(function(e){function t(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(tD||(tD={}));var nD;(function(e){function t(r,i,o,l,c,p){let d={name:r,detail:i,kind:o,range:l,selectionRange:c};return p!==void 0&&(d.children=p),d}e.create=t;function n(r){let i=r;return i&&Ne.string(i.name)&&Ne.number(i.kind)&&Ur.is(i.range)&&Ur.is(i.selectionRange)&&(i.detail===void 0||Ne.string(i.detail))&&(i.deprecated===void 0||Ne.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(nD||(nD={}));var rD;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(rD||(rD={}));var By;(function(e){e.Invoked=1,e.Automatic=2})(By||(By={}));var iD;(function(e){function t(r,i,o){let l={diagnostics:r};return i!=null&&(l.only=i),o!=null&&(l.triggerKind=o),l}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.typedArray(i.diagnostics,Uy.is)&&(i.only===void 0||Ne.typedArray(i.only,Ne.string))&&(i.triggerKind===void 0||i.triggerKind===By.Invoked||i.triggerKind===By.Automatic)}e.is=n})(iD||(iD={}));var oD;(function(e){function t(r,i,o){let l={title:r},c=!0;return typeof i=="string"?(c=!1,l.kind=i):$d.is(i)?l.command=i:l.edit=i,c&&o!==void 0&&(l.kind=o),l}e.create=t;function n(r){let i=r;return i&&Ne.string(i.title)&&(i.diagnostics===void 0||Ne.typedArray(i.diagnostics,Uy.is))&&(i.kind===void 0||Ne.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||$d.is(i.command))&&(i.isPreferred===void 0||Ne.boolean(i.isPreferred))&&(i.edit===void 0||hS.is(i.edit))}e.is=n})(oD||(oD={}));var aD;(function(e){function t(r,i){let o={range:r};return Ne.defined(i)&&(o.data=i),o}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ur.is(i.range)&&(Ne.undefined(i.command)||$d.is(i.command))}e.is=n})(aD||(aD={}));var sD;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ne.uinteger(i.tabSize)&&Ne.boolean(i.insertSpaces)}e.is=n})(sD||(sD={}));var lD;(function(e){function t(r,i,o){return{range:r,target:i,data:o}}e.create=t;function n(r){let i=r;return Ne.defined(i)&&Ur.is(i.range)&&(Ne.undefined(i.target)||Ne.string(i.target))}e.is=n})(lD||(lD={}));var uD;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return Ne.objectLiteral(i)&&Ur.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(uD||(uD={}));var cD;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(cD||(cD={}));var fD;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(fD||(fD={}));var dD;(function(e){function t(n){const r=n;return Ne.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(dD||(dD={}));var pD;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&Ur.is(i.range)&&Ne.string(i.text)}e.is=n})(pD||(pD={}));var hD;(function(e){function t(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}e.create=t;function n(r){const i=r;return i!=null&&Ur.is(i.range)&&Ne.boolean(i.caseSensitiveLookup)&&(Ne.string(i.variableName)||i.variableName===void 0)}e.is=n})(hD||(hD={}));var mD;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&Ur.is(i.range)&&(Ne.string(i.expression)||i.expression===void 0)}e.is=n})(mD||(mD={}));var gD;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return Ne.defined(i)&&Ur.is(r.stoppedLocation)}e.is=n})(gD||(gD={}));var vS;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(vS||(vS={}));var yS;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&(i.tooltip===void 0||Ne.string(i.tooltip)||ym.is(i.tooltip))&&(i.location===void 0||Vy.is(i.location))&&(i.command===void 0||$d.is(i.command))}e.is=n})(yS||(yS={}));var vD;(function(e){function t(r,i,o){const l={position:r,label:i};return o!==void 0&&(l.kind=o),l}e.create=t;function n(r){const i=r;return Ne.objectLiteral(i)&&ts.is(i.position)&&(Ne.string(i.label)||Ne.typedArray(i.label,yS.is))&&(i.kind===void 0||vS.is(i.kind))&&i.textEdits===void 0||Ne.typedArray(i.textEdits,zd.is)&&(i.tooltip===void 0||Ne.string(i.tooltip)||ym.is(i.tooltip))&&(i.paddingLeft===void 0||Ne.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Ne.boolean(i.paddingRight))}e.is=n})(vD||(vD={}));var yD;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(yD||(yD={}));var bD;(function(e){function t(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}e.create=t})(bD||(bD={}));var ED;(function(e){function t(n){return{items:n}}e.create=t})(ED||(ED={}));var SD;(function(e){e.Invoked=0,e.Automatic=1})(SD||(SD={}));var TD;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(TD||(TD={}));var xD;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(xD||(xD={}));var wD;(function(e){function t(n){const r=n;return Ne.objectLiteral(r)&&aS.is(r.uri)&&Ne.string(r.name)}e.is=t})(wD||(wD={}));var CD;(function(e){function t(o,l,c,p){return new d9(o,l,c,p)}e.create=t;function n(o){let l=o;return!!(Ne.defined(l)&&Ne.string(l.uri)&&(Ne.undefined(l.languageId)||Ne.string(l.languageId))&&Ne.uinteger(l.lineCount)&&Ne.func(l.getText)&&Ne.func(l.positionAt)&&Ne.func(l.offsetAt))}e.is=n;function r(o,l){let c=o.getText(),p=i(l,(m,b)=>{let E=m.range.start.line-b.range.start.line;return E===0?m.range.start.character-b.range.start.character:E}),d=c.length;for(let m=p.length-1;m>=0;m--){let b=p[m],E=o.offsetAt(b.range.start),y=o.offsetAt(b.range.end);if(y<=d)c=c.substring(0,E)+b.newText+c.substring(y,c.length);else throw new Error("Overlapping edit");d=E}return c}e.applyEdits=r;function i(o,l){if(o.length<=1)return o;const c=o.length/2|0,p=o.slice(0,c),d=o.slice(c);i(p,l),i(d,l);let m=0,b=0,E=0;for(;m<p.length&&b<d.length;)l(p[m],d[b])<=0?o[E++]=p[m++]:o[E++]=d[b++];for(;m<p.length;)o[E++]=p[m++];for(;b<d.length;)o[E++]=d[b++];return o}})(CD||(CD={}));class d9{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
`,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ts.create(0,t);for(;r<i;){let l=Math.floor((r+i)/2);n[l]>t?i=l:r=l+1}let o=r-1;return ts.create(o,t-n[o])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}}var Ne;(function(e){const t=Object.prototype.toString;function n(y){return typeof y<"u"}e.defined=n;function r(y){return typeof y>"u"}e.undefined=r;function i(y){return y===!0||y===!1}e.boolean=i;function o(y){return t.call(y)==="[object String]"}e.string=o;function l(y){return t.call(y)==="[object Number]"}e.number=l;function c(y,x,w){return t.call(y)==="[object Number]"&&x<=y&&y<=w}e.numberRange=c;function p(y){return t.call(y)==="[object Number]"&&-2147483648<=y&&y<=2147483647}e.integer=p;function d(y){return t.call(y)==="[object Number]"&&0<=y&&y<=2147483647}e.uinteger=d;function m(y){return t.call(y)==="[object Function]"}e.func=m;function b(y){return y!==null&&typeof y=="object"}e.objectLiteral=b;function E(y,x){return Array.isArray(y)&&y.every(x)}e.typedArray=E})(Ne||(Ne={}));class bS{constructor(t){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const n=this._sourceText.charAt(this._pos);return this._pos++,n},this.eat=n=>{if(this._testNextCharacter(n))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=n=>{let r=this._testNextCharacter(n),i=!1;for(r&&(i=r,this._start=this._pos);r;)this._pos++,r=this._testNextCharacter(n),i=!0;return i},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=n=>{this._pos=n},this.match=(n,r=!0,i=!1)=>{let o=null,l=null;return typeof n=="string"?(l=new RegExp(n,i?"i":"g").test(this._sourceText.slice(this._pos,this._pos+n.length)),o=n):n instanceof RegExp&&(l=this._sourceText.slice(this._pos).match(n),o=l?.[0]),l!=null&&(typeof n=="string"||l instanceof Array&&this._sourceText.startsWith(l[0],this._pos))?(r&&(this._start=this._pos,o&&o.length&&(this._pos+=o.length)),l):!1},this.backUp=n=>{this._pos-=n},this.column=()=>this._pos,this.indentation=()=>{const n=this._sourceText.match(/\s*/);let r=0;if(n&&n.length!==0){const i=n[0];let o=0;for(;i.length>o;)i.charCodeAt(o)===9?r+=2:r++,o++}return r},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=t}_testNextCharacter(t){const n=this._sourceText.charAt(this._pos);let r=!1;return typeof t=="string"?r=n===t:r=t instanceof RegExp?t.test(n):t(n),r}}function vr(e){return{ofRule:e}}function rn(e,t){return{ofRule:e,isList:!0,separator:t}}function p9(e,t){const n=e.match;return e.match=r=>{let i=!1;return n&&(i=n(r)),i&&t.every(o=>o.match&&!o.match(r))},e}function $o(e,t){return{style:t,match:n=>n.kind===e}}function gt(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}const _D=e=>e===" "||e===" "||e===","||e===`
`||e==="\r"||e==="\uFEFF"||e===" ",ND={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:/^#.*/},AD={Document:[rn("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return K.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:[ki("query"),vr(Jn("def")),vr("VariableDefinitions"),rn("Directive"),"SelectionSet"],Mutation:[ki("mutation"),vr(Jn("def")),vr("VariableDefinitions"),rn("Directive"),"SelectionSet"],Subscription:[ki("subscription"),vr(Jn("def")),vr("VariableDefinitions"),rn("Directive"),"SelectionSet"],VariableDefinitions:[gt("("),rn("VariableDefinition"),gt(")")],VariableDefinition:["Variable",gt(":"),"Type",vr("DefaultValue")],Variable:[gt("$","variable"),Jn("variable")],DefaultValue:[gt("="),"Value"],SelectionSet:[gt("{"),rn("Selection"),gt("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Jn("property"),gt(":"),Jn("qualifier"),vr("Arguments"),rn("Directive"),vr("SelectionSet")],Field:[Jn("property"),vr("Arguments"),rn("Directive"),vr("SelectionSet")],Arguments:[gt("("),rn("Argument"),gt(")")],Argument:[Jn("attribute"),gt(":"),"Value"],FragmentSpread:[gt("..."),Jn("def"),rn("Directive")],InlineFragment:[gt("..."),vr("TypeCondition"),rn("Directive"),"SelectionSet"],FragmentDefinition:[ki("fragment"),vr(p9(Jn("def"),[ki("on")])),"TypeCondition",rn("Directive"),"SelectionSet"],TypeCondition:[ki("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 e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[$o("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[$o("Name","builtin")],NullValue:[$o("Name","keyword")],EnumValue:[Jn("string-2")],ListValue:[gt("["),rn("Value"),gt("]")],ObjectValue:[gt("{"),rn("ObjectField"),gt("}")],ObjectField:[Jn("attribute"),gt(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[gt("["),"Type",gt("]"),vr(gt("!"))],NonNullType:["NamedType",vr(gt("!"))],NamedType:[h9("atom")],Directive:[gt("@","meta"),Jn("meta"),vr("Arguments")],DirectiveDef:[ki("directive"),gt("@","meta"),Jn("meta"),vr("ArgumentsDef"),ki("on"),rn("DirectiveLocation",gt("|"))],InterfaceDef:[ki("interface"),Jn("atom"),vr("Implements"),rn("Directive"),gt("{"),rn("FieldDef"),gt("}")],Implements:[ki("implements"),rn("NamedType",gt("&"))],DirectiveLocation:[Jn("string-2")],SchemaDef:[ki("schema"),rn("Directive"),gt("{"),rn("OperationTypeDef"),gt("}")],OperationTypeDef:[Jn("keyword"),gt(":"),Jn("atom")],ScalarDef:[ki("scalar"),Jn("atom"),rn("Directive")],ObjectTypeDef:[ki("type"),Jn("atom"),vr("Implements"),rn("Directive"),gt("{"),rn("FieldDef"),gt("}")],FieldDef:[Jn("property"),vr("ArgumentsDef"),gt(":"),"Type",rn("Directive")],ArgumentsDef:[gt("("),rn("InputValueDef"),gt(")")],InputValueDef:[Jn("attribute"),gt(":"),"Type",vr("DefaultValue"),rn("Directive")],UnionDef:[ki("union"),Jn("atom"),rn("Directive"),gt("="),rn("UnionMember",gt("|"))],UnionMember:["NamedType"],EnumDef:[ki("enum"),Jn("atom"),rn("Directive"),gt("{"),rn("EnumValueDef"),gt("}")],EnumValueDef:[Jn("string-2"),rn("Directive")],InputDef:[ki("input"),Jn("atom"),rn("Directive"),gt("{"),rn("InputValueDef"),gt("}")],ExtendDef:[ki("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return K.SCHEMA_EXTENSION;case"scalar":return K.SCALAR_TYPE_EXTENSION;case"type":return K.OBJECT_TYPE_EXTENSION;case"interface":return K.INTERFACE_TYPE_EXTENSION;case"union":return K.UNION_TYPE_EXTENSION;case"enum":return K.ENUM_TYPE_EXTENSION;case"input":return K.INPUT_OBJECT_TYPE_EXTENSION}},[K.SCHEMA_EXTENSION]:["SchemaDef"],[K.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[K.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[K.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[K.UNION_TYPE_EXTENSION]:["UnionDef"],[K.ENUM_TYPE_EXTENSION]:["EnumDef"],[K.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function ki(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function Jn(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function h9(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function bm(e={eatWhitespace:t=>t.eatWhile(_D),lexRules:ND,parseRules:AD,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Em(e.parseRules,t,K.DOCUMENT),t},token(t,n){return m9(t,n,e)}}}function m9(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:i,parseRules:o,eatWhitespace:l,editorConfig:c}=n;if(t.rule&&t.rule.length===0?SS(t):t.needsAdvance&&(t.needsAdvance=!1,TS(t,!0)),e.sol()){const m=c?.tabSize||2;t.indentLevel=Math.floor(e.indentation()/m)}if(l(e))return"ws";const p=v9(i,e);if(!p)return e.match(/\S+/)||e.match(/\s/),Em(ES,t,"Invalid"),"invalidchar";if(p.kind==="Comment")return Em(ES,t,"Comment"),"comment";const d=OD({},t);if(p.kind==="Punctuation"){if(/^[{([]/.test(p.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(p.value)){const m=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&m.length>0&&m.at(-1)<t.indentLevel&&(t.indentLevel=m.at(-1))}}for(;t.rule;){let m=typeof t.rule=="function"?t.step===0?t.rule(p,e):null:t.rule[t.step];if(t.needsSeparator&&(m=m?.separator),m){if(m.ofRule&&(m=m.ofRule),typeof m=="string"){Em(o,t,m);continue}if(!((r=m.match)===null||r===void 0)&&r.call(m,p))return m.update&&m.update(t,p),p.kind==="Punctuation"?TS(t,!0):t.needsAdvance=!0,m.style}g9(t)}return OD(t,d),Em(ES,t,"Invalid"),"invalidchar"}function OD(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const ES={Invalid:[],Comment:[]};function Em(e,t,n){if(!e[n])throw new TypeError("Unknown rule: "+n);t.prevState=Object.assign({},t),t.kind=n,t.name=null,t.type=null,t.rule=e[n],t.step=0,t.needsSeparator=!1}function SS(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}function TS(e,t){var n;if(DD(e)&&e.rule){const r=e.rule[e.step];if(r.separator){const{separator:i}=r;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&i.ofRule)return}if(t)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)SS(e),e.rule&&(DD(e)?!((n=e.rule)===null||n===void 0)&&n[e.step].separator&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function DD(e){const t=Array.isArray(e.rule)&&typeof e.rule[e.step]!="string"&&e.rule[e.step];return t&&t.isList}function g9(e){for(;e.rule&&!(Array.isArray(e.rule)&&e.rule[e.step].ofRule);)SS(e);e.rule&&TS(e,!1)}function v9(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=t.match(e[n[r]]);if(i&&i instanceof Array)return{kind:n[r],value:i[0]}}}function $y(e,t){const n=e.split(`
`),r=bm();let i=r.startState(),o="",l=new bS("");for(let c=0;c<n.length;c++){for(l=new bS(n[c]);!l.eol()&&(o=r.token(l,i),t(l,i,o,c)!=="BREAK"););t(l,i,o,c),i.kind||(i=r.startState())}return{start:l.getStartOfToken(),end:l.getCurrentPosition(),string:l.current(),state:i,style:o}}var Ef;(function(e){e.TYPE_SYSTEM="TYPE_SYSTEM",e.EXECUTABLE="EXECUTABLE",e.UNKNOWN="UNKNOWN"})(Ef||(Ef={}));const y9=[K.SCHEMA_DEFINITION,K.OPERATION_TYPE_DEFINITION,K.SCALAR_TYPE_DEFINITION,K.OBJECT_TYPE_DEFINITION,K.INTERFACE_TYPE_DEFINITION,K.UNION_TYPE_DEFINITION,K.ENUM_TYPE_DEFINITION,K.INPUT_OBJECT_TYPE_DEFINITION,K.DIRECTIVE_DEFINITION,K.SCHEMA_EXTENSION,K.SCALAR_TYPE_EXTENSION,K.OBJECT_TYPE_EXTENSION,K.INTERFACE_TYPE_EXTENSION,K.UNION_TYPE_EXTENSION,K.ENUM_TYPE_EXTENSION,K.INPUT_OBJECT_TYPE_EXTENSION],b9=e=>{let t=Ef.UNKNOWN;if(e)try{Tr(Ai(e),{enter(n){if(n.kind==="Document"){t=Ef.EXECUTABLE;return}return y9.includes(n.kind)?(t=Ef.TYPE_SYSTEM,df):!1}})}catch{return t}return t};function E9(e,t){return b9(e)}function S9(e,t,n=0){let r=null,i=null,o=null;const l=$y(e,(c,p,d,m)=>{if(!(m!==t.line||c.getCurrentPosition()+n<t.character+1))return r=d,i=Object.assign({},p),o=c.current(),"BREAK"});return{start:l.start,end:l.end,string:o||l.string,state:i||l.state,style:r||l.style}}function T9(e,t,n,r,i){const o=r||S9(e,t,1);if(!o)return null;const l=o.state.kind==="Invalid"?o.state.prevState:o.state;if(!l)return null;const c=w9(n,o.state),p=E9(e);return{token:o,state:l,typeInfo:c,mode:p}}function kD(e,t,n){return n===va.name&&e.getQueryType()===t?va:n===ya.name&&e.getQueryType()===t?ya:n===ba.name&&Qr(t)?ba:"getFields"in t?t.getFields()[n]:null}function RD(e,t){const n=[];let r=e;for(;r?.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}function x9(e){let t;return RD(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function w9(e,t){let n,r,i,o,l,c,p,d,m,b,E;return RD(t,y=>{var x;switch(y.kind){case tt.QUERY:case"ShortQuery":b=e.getQueryType();break;case tt.MUTATION:b=e.getMutationType();break;case tt.SUBSCRIPTION:b=e.getSubscriptionType();break;case tt.INLINE_FRAGMENT:case tt.FRAGMENT_DEFINITION:y.type&&(b=e.getType(y.type));break;case tt.FIELD:case tt.ALIASED_FIELD:{!b||!y.name?l=null:(l=m?kD(e,m,y.name):null,b=l?l.type:null);break}case tt.SELECTION_SET:m=gn(b);break;case tt.DIRECTIVE:i=y.name?e.getDirective(y.name):null;break;case tt.INTERFACE_DEF:y.name&&(p=null,E=new ao({name:y.name,interfaces:[],fields:{}}));break;case tt.OBJECT_TYPE_DEF:y.name&&(E=null,p=new si({name:y.name,interfaces:[],fields:{}}));break;case tt.ARGUMENTS:{if(y.prevState)switch(y.prevState.kind){case tt.FIELD:r=l&&l.args;break;case tt.DIRECTIVE:r=i&&i.args;break;case tt.ALIASED_FIELD:{const A=(x=y.prevState)===null||x===void 0?void 0:x.name;if(!A){r=null;break}const C=m?kD(e,m,A):null;if(!C){r=null;break}r=C.args;break}default:r=null;break}else r=null;break}case tt.ARGUMENT:if(r){for(let A=0;A<r.length;A++)if(r[A].name===y.name){n=r[A];break}}c=n?.type;break;case tt.VARIABLE_DEFINITION:case tt.VARIABLE:b=c;break;case tt.ENUM_VALUE:const w=gn(c);o=w instanceof Hi?w.getValues().find(A=>A.value===y.name):null;break;case tt.LIST_VALUE:const k=Mu(c);c=k instanceof lr?k.ofType:null;break;case tt.OBJECT_VALUE:const N=gn(c);d=N instanceof so?N.getFields():null;break;case tt.OBJECT_FIELD:const D=y.name&&d?d[y.name]:null;c=D?.type,l=D,b=l?l.type:null;break;case tt.NAMED_TYPE:y.name&&(b=e.getType(y.name));break}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:o,fieldDef:l,inputType:c,objectFieldDefs:d,parentType:m,type:b,interfaceDef:E,objectTypeDef:p}}const C9={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},tt=Object.assign(Object.assign({},K),C9);var ln;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ln||(ln={}));const xS={command:"editor.action.triggerSuggest",title:"Suggestions"},_9=e=>{const t=[];if(e)try{Tr(Ai(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t};function N9(e,t,n,r,i,o){var l;const c=Object.assign(Object.assign({},o),{schema:e}),p=T9(t,n,e,r);if(!p)return[];const{state:d,typeInfo:m,mode:b,token:E}=p,{kind:y,step:x,prevState:w}=d;if(y===tt.DOCUMENT)return b===Ef.TYPE_SYSTEM?A9(E):b===Ef.EXECUTABLE?O9(E):D9(E);if(y===tt.EXTEND_DEF)return k9(E);if(((l=w?.prevState)===null||l===void 0?void 0:l.kind)===tt.EXTENSION_DEFINITION&&d.name)return ur(E,[]);if(w?.kind===K.SCALAR_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(Oi).map(N=>({label:N.name,kind:ln.Function})));if(w?.kind===K.OBJECT_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(N=>At(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:ln.Function})));if(w?.kind===K.INTERFACE_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(Rt).map(N=>({label:N.name,kind:ln.Function})));if(w?.kind===K.UNION_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(ar).map(N=>({label:N.name,kind:ln.Function})));if(w?.kind===K.ENUM_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(N=>Wn(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:ln.Function})));if(w?.kind===K.INPUT_OBJECT_TYPE_EXTENSION)return ur(E,Object.values(e.getTypeMap()).filter(nn).map(N=>({label:N.name,kind:ln.Function})));if(y===tt.IMPLEMENTS||y===tt.NAMED_TYPE&&w?.kind===tt.IMPLEMENTS)return L9(E,d,e,t,m);if(y===tt.SELECTION_SET||y===tt.FIELD||y===tt.ALIASED_FIELD)return R9(E,m,c);if(y===tt.ARGUMENTS||y===tt.ARGUMENT&&x===0){const{argDefs:N}=m;if(N)return ur(E,N.map(D=>{var A;return{label:D.name,insertText:_O(D.name+": ",D.type),insertTextMode:bf.adjustIndentation,insertTextFormat:Gd.Snippet,command:xS,labelDetails:{detail:" "+String(D.type)},documentation:(A=D.description)!==null&&A!==void 0?A:void 0,kind:ln.Variable,type:D.type}}))}if((y===tt.OBJECT_VALUE||y===tt.OBJECT_FIELD&&x===0)&&m.objectFieldDefs){const N=yf(m.objectFieldDefs),D=y===tt.OBJECT_VALUE?ln.Value:ln.Field;return ur(E,N.map(A=>{var C;return{label:A.name,detail:String(A.type),documentation:(C=A?.description)!==null&&C!==void 0?C:void 0,kind:D,type:A.type,insertText:_O(A.name+": ",A.type),insertTextMode:bf.adjustIndentation,insertTextFormat:Gd.Snippet,command:xS}}))}if(y===tt.ENUM_VALUE||y===tt.LIST_VALUE&&x===1||y===tt.OBJECT_FIELD&&x===2||y===tt.ARGUMENT&&x===2)return M9(E,m,t,e);if(y===tt.VARIABLE&&x===1){const N=gn(m.inputType),D=LD(t,e,E);return ur(E,D.filter(A=>A.detail===N?.name))}if(y===tt.TYPE_CONDITION&&x===1||y===tt.NAMED_TYPE&&w!=null&&w.kind===tt.TYPE_CONDITION)return I9(E,m,e);if(y===tt.FRAGMENT_SPREAD&&x===1)return F9(E,m,e,t,Array.isArray(i)?i:_9(i));const k=ID(d);return k.kind===tt.FIELD_DEF?ur(E,Object.values(e.getTypeMap()).filter(N=>kl(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:ln.Function,insertText:N.name,insertTextMode:bf.adjustIndentation}))):k.kind===tt.INPUT_VALUE_DEF&&x===2?ur(E,Object.values(e.getTypeMap()).filter(N=>Di(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:ln.Function,insertText:N.name,insertTextMode:bf.adjustIndentation,insertTextFormat:Gd.Snippet}))):y===tt.VARIABLE_DEFINITION&&x===2||y===tt.LIST_TYPE&&x===1||y===tt.NAMED_TYPE&&w&&(w.kind===tt.VARIABLE_DEFINITION||w.kind===tt.LIST_TYPE||w.kind===tt.NON_NULL_TYPE)?V9(E,e):y===tt.DIRECTIVE?U9(E,d,e):y===tt.DIRECTIVE_DEF?q9(E,d,e):[]}const wS=[{label:"type",kind:ln.Function},{label:"interface",kind:ln.Function},{label:"union",kind:ln.Function},{label:"input",kind:ln.Function},{label:"scalar",kind:ln.Function},{label:"schema",kind:ln.Function}],MD=[{label:"query",kind:ln.Function},{label:"mutation",kind:ln.Function},{label:"subscription",kind:ln.Function},{label:"fragment",kind:ln.Function},{label:"{",kind:ln.Constructor}];function A9(e){return ur(e,[{label:"extend",kind:ln.Function},...wS])}function O9(e){return ur(e,MD)}function D9(e){return ur(e,[{label:"extend",kind:ln.Function},...MD,...wS])}function k9(e){return ur(e,wS)}function R9(e,t,n){var r;if(t.parentType){const{parentType:i}=t;let o=[];return"getFields"in i&&(o=yf(i.getFields())),Qr(i)&&o.push(ba),i===((r=n?.schema)===null||r===void 0?void 0:r.getQueryType())&&o.push(va,ya),ur(e,o.map((l,c)=>{var p;const d={sortText:String(c)+l.name,label:l.name,detail:String(l.type),documentation:(p=l.description)!==null&&p!==void 0?p:void 0,deprecated:!!l.deprecationReason,isDeprecated:!!l.deprecationReason,deprecationReason:l.deprecationReason,kind:ln.Field,labelDetails:{detail:" "+l.type.toString()},type:l.type};return n?.fillLeafsOnComplete&&(d.insertText=f9(l),d.insertText||(d.insertText=Py(l.name,l.type,l.name+(e.state.needsAdvance?"":`
`))),d.insertText&&(d.insertTextFormat=Gd.Snippet,d.insertTextMode=bf.adjustIndentation,d.command=xS)),d}))}return[]}function M9(e,t,n,r){const i=gn(t.inputType),o=LD(n,r,e).filter(l=>l.detail===i?.name);if(i instanceof Hi){const l=i.getValues();return ur(e,l.map(c=>{var p;return{label:c.name,detail:String(i),documentation:(p=c.description)!==null&&p!==void 0?p:void 0,deprecated:!!c.deprecationReason,isDeprecated:!!c.deprecationReason,deprecationReason:c.deprecationReason,kind:ln.EnumMember,type:i}}).concat(o))}return i===Zn?ur(e,o.concat([{label:"true",detail:String(Zn),documentation:"Not false.",kind:ln.Variable,type:Zn},{label:"false",detail:String(Zn),documentation:"Not true.",kind:ln.Variable,type:Zn}])):o}function L9(e,t,n,r,i){if(t.needsSeparator)return[];const o=n.getTypeMap(),l=yf(o).filter(Rt),c=l.map(({name:y})=>y),p=new Set;$y(r,(y,x)=>{var w,k,N,D,A;if(x.name&&(x.kind===tt.INTERFACE_DEF&&!c.includes(x.name)&&p.add(x.name),x.kind===tt.NAMED_TYPE&&((w=x.prevState)===null||w===void 0?void 0:w.kind)===tt.IMPLEMENTS)){if(i.interfaceDef){if((k=i.interfaceDef)===null||k===void 0?void 0:k.getInterfaces().find(({name:P})=>P===x.name))return;const M=n.getType(x.name),j=(N=i.interfaceDef)===null||N===void 0?void 0:N.toConfig();i.interfaceDef=new ao(Object.assign(Object.assign({},j),{interfaces:[...j.interfaces,M||new ao({name:x.name,fields:{}})]}))}else if(i.objectTypeDef){if((D=i.objectTypeDef)===null||D===void 0?void 0:D.getInterfaces().find(({name:P})=>P===x.name))return;const M=n.getType(x.name),j=(A=i.objectTypeDef)===null||A===void 0?void 0:A.toConfig();i.objectTypeDef=new si(Object.assign(Object.assign({},j),{interfaces:[...j.interfaces,M||new ao({name:x.name,fields:{}})]}))}}});const d=i.interfaceDef||i.objectTypeDef,b=(d?.getInterfaces()||[]).map(({name:y})=>y),E=l.concat([...p].map(y=>({name:y}))).filter(({name:y})=>y!==d?.name&&!b.includes(y));return ur(e,E.map(y=>{const x={label:y.name,kind:ln.Interface,type:y};return y?.description&&(x.documentation=y.description),x}))}function I9(e,t,n,r){let i;if(t.parentType)if(sr(t.parentType)){const o=LN(t.parentType),l=n.getPossibleTypes(o),c=Object.create(null);for(const p of l)for(const d of p.getInterfaces())c[d.name]=d;i=l.concat(yf(c))}else i=[t.parentType];else{const o=n.getTypeMap();i=yf(o).filter(l=>Qr(l)&&!l.name.startsWith("__"))}return ur(e,i.map(o=>{const l=gn(o);return{label:String(o),documentation:l?.description||"",kind:ln.Field}}))}function F9(e,t,n,r,i){if(!r)return[];const o=n.getTypeMap(),l=x9(e.state),c=j9(r);i&&i.length>0&&c.push(...i);const p=c.filter(d=>o[d.typeCondition.name.value]&&!(l&&l.kind===tt.FRAGMENT_DEFINITION&&l.name===d.name.value)&&Qr(t.parentType)&&Qr(o[d.typeCondition.name.value])&&nm(n,t.parentType,o[d.typeCondition.name.value]));return ur(e,p.map(d=>({label:d.name.value,detail:String(o[d.typeCondition.name.value]),documentation:`fragment ${d.name.value} on ${d.typeCondition.name.value}`,labelDetails:{detail:`fragment ${d.name.value} on ${d.typeCondition.name.value}`},kind:ln.Field,type:o[d.typeCondition.name.value]})))}const P9=(e,t)=>{var n,r,i,o,l,c,p,d,m,b;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((i=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||i===void 0?void 0:i.kind)===t)return e.prevState.prevState;if(((c=(l=(o=e.prevState)===null||o===void 0?void 0:o.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.kind)===t)return e.prevState.prevState.prevState;if(((b=(m=(d=(p=e.prevState)===null||p===void 0?void 0:p.prevState)===null||d===void 0?void 0:d.prevState)===null||m===void 0?void 0:m.prevState)===null||b===void 0?void 0:b.kind)===t)return e.prevState.prevState.prevState.prevState};function LD(e,t,n){let r=null,i;const o=Object.create({});return $y(e,(l,c)=>{var p;if(c?.kind===tt.VARIABLE&&c.name&&(r=c.name),c?.kind===tt.NAMED_TYPE&&r){const d=P9(c,tt.TYPE);d?.type&&(i=t.getType(d?.type))}if(r&&i&&!o[r]){const d=n.string==="$"||((p=n?.state)===null||p===void 0?void 0:p.kind)==="Variable"?r:"$"+r;o[r]={detail:i.toString(),insertText:d,label:"$"+r,rawInsert:d,type:i,kind:ln.Variable},r=null,i=null}}),yf(o)}function j9(e){const t=[];return $y(e,(n,r)=>{r.kind===tt.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:tt.FRAGMENT_DEFINITION,name:{kind:K.NAME,value:r.name},selectionSet:{kind:tt.SELECTION_SET,selections:[]},typeCondition:{kind:tt.NAMED_TYPE,name:{kind:K.NAME,value:r.type}}})}),t}function V9(e,t,n){const r=t.getTypeMap(),i=yf(r).filter(Di);return ur(e,i.map(o=>({label:o.name,documentation:o?.description||"",kind:ln.Variable})))}function U9(e,t,n,r){var i;if(!((i=t.prevState)===null||i===void 0)&&i.kind){const o=n.getDirectives().filter(l=>B9(t.prevState,l));return ur(e,o.map(l=>({label:l.name,documentation:l?.description||"",kind:ln.Function})))}return[]}function q9(e,t,n,r){const i=n.getDirectives().find(o=>o.name===t.name);return ur(e,i?.args.map(o=>({label:o.name,documentation:o.description||"",kind:ln.Field}))||[])}function B9(e,t){if(!e?.kind)return!1;const{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case tt.QUERY:return i.includes(lt.QUERY);case tt.MUTATION:return i.includes(lt.MUTATION);case tt.SUBSCRIPTION:return i.includes(lt.SUBSCRIPTION);case tt.FIELD:case tt.ALIASED_FIELD:return i.includes(lt.FIELD);case tt.FRAGMENT_DEFINITION:return i.includes(lt.FRAGMENT_DEFINITION);case tt.FRAGMENT_SPREAD:return i.includes(lt.FRAGMENT_SPREAD);case tt.INLINE_FRAGMENT:return i.includes(lt.INLINE_FRAGMENT);case tt.SCHEMA_DEF:return i.includes(lt.SCHEMA);case tt.SCALAR_DEF:return i.includes(lt.SCALAR);case tt.OBJECT_TYPE_DEF:return i.includes(lt.OBJECT);case tt.FIELD_DEF:return i.includes(lt.FIELD_DEFINITION);case tt.INTERFACE_DEF:return i.includes(lt.INTERFACE);case tt.UNION_DEF:return i.includes(lt.UNION);case tt.ENUM_DEF:return i.includes(lt.ENUM);case tt.ENUM_VALUE:return i.includes(lt.ENUM_VALUE);case tt.INPUT_DEF:return i.includes(lt.INPUT_OBJECT);case tt.INPUT_VALUE_DEF:switch(r?.kind){case tt.ARGUMENTS_DEF:return i.includes(lt.ARGUMENT_DEFINITION);case tt.INPUT_DEF:return i.includes(lt.INPUT_FIELD_DEFINITION)}}return!1}function ID(e){return e.prevState&&e.kind&&[tt.NAMED_TYPE,tt.LIST_TYPE,tt.TYPE,tt.NON_NULL_TYPE].includes(e.kind)?ID(e.prevState):e}var Sm={exports:{}},FD;function $9(){if(FD)return Sm.exports;FD=1;function e(t,n){if(t!=null)return t;var r=new Error(n!==void 0?n:"Got unexpected "+t);throw r.framesToPop=1,r}return Sm.exports=e,Sm.exports.default=e,Object.defineProperty(Sm.exports,"__esModule",{value:!0}),Sm.exports}var z9=$9();const PD=Du(z9),H9=(e,t)=>{if(!t)return[];const n=new Map,r=new Set;Tr(e,{FragmentDefinition(l){n.set(l.name.value,!0)},FragmentSpread(l){r.has(l.name.value)||r.add(l.name.value)}});const i=new Set;for(const l of r)!n.has(l)&&t.has(l)&&i.add(PD(t.get(l)));const o=[];for(const l of i)Tr(l,{FragmentSpread(c){!r.has(c.name.value)&&t.get(c.name.value)&&(i.add(PD(t.get(c.name.value))),r.add(c.name.value))}}),n.has(l.name.value)||o.push(l);return o};class jD{constructor(t,n){this.containsPosition=r=>this.start.line===r.line?this.start.character<=r.character:this.end.line===r.line?this.end.character>=r.character:this.start.line<=r.line&&this.end.line>=r.line,this.start=t,this.end=n}setStart(t,n){this.start=new Sf(t,n)}setEnd(t,n){this.end=new Sf(t,n)}}class Sf{constructor(t,n){this.lessThanOrEqualTo=r=>this.line<r.line||this.line===r.line&&this.character<=r.character,this.line=t,this.character=n}setLine(t){this.line=t}setCharacter(t){this.character=t}}function G9(e,t,n,r,i){const o=GE.filter(c=>!(c===IE||c===RE));return n&&Array.prototype.push.apply(o,n),pm(e,t,o).filter(c=>{if(c.message.includes("Unknown directive")&&c.nodes){const p=c.nodes[0];if(p&&p.kind===K.DIRECTIVE){const d=p.name.value;if(d==="arguments"||d==="argumentDefinitions")return!1}}return!0})}function Y9(e,t){const n=Object.create(null);for(const r of t.definitions)if(r.kind==="OperationDefinition"){const{variableDefinitions:i}=r;if(i)for(const{variable:o,type:l}of i){const c=yi(e,l);c?n[o.name.value]=c:l.kind===K.NAMED_TYPE&&l.name.value==="Float"&&(n[o.name.value]=im)}}return n}function W9(e,t){const n=t?Y9(t,e):void 0,r=[];return Tr(e,{OperationDefinition(i){r.push(i)}}),{variableToType:n,operations:r}}function Q9(e,t){if(t)try{const n=Ai(t);return Object.assign(Object.assign({},W9(n,e)),{documentAST:n})}catch{return}}const VD={Error:"Error",Warning:"Warning"},CS={[VD.Error]:1,[VD.Warning]:2},zy=(e,t)=>{if(!e)throw new Error(t)};function K9(e,t=null,n,r,i){var o,l;let c=null,p="";i&&(p=typeof i=="string"?i:i.reduce((m,b)=>m+pn(b)+`
`,""));const d=p?`${e}
${p}`:e;try{c=Ai(d)}catch(m){if(m instanceof Me){const b=Z9((l=(o=m.locations)===null||o===void 0?void 0:o[0])!==null&&l!==void 0?l:{line:0},d);return[{severity:CS.Error,message:m.message,source:"GraphQL: Syntax",range:b}]}throw m}return X9(c,t,n)}function X9(e,t=null,n,r){if(!t)return[];const i=G9(t,e,n).flatMap(l=>UD(l,CS.Error,"Validation")),o=pm(t,e,[XA]).flatMap(l=>UD(l,CS.Warning,"Deprecation"));return i.concat(o)}function UD(e,t,n){if(!e.nodes)return[];const r=[];for(const[i,o]of e.nodes.entries()){const l=o.kind!=="Variable"&&"name"in o&&o.name!==void 0?o.name:"variable"in o&&o.variable!==void 0?o.variable:o;if(l){zy(e.locations,"GraphQL validation error requires locations.");const c=e.locations[i],p=J9(l),d=c.column+(p.end-p.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new jD(new Sf(c.line-1,c.column-1),new Sf(c.line-1,d))})}}return r}function Z9(e,t){const n=bm(),r=n.startState(),i=t.split(`
`);zy(i.length>=e.line,"Query text must have more lines than where the error happened");let o=null;for(let d=0;d<e.line;d++)for(o=new bS(i[d]);!o.eol()&&n.token(o,r)!=="invalidchar";);zy(o,"Expected Parser stream to be available.");const l=e.line-1,c=o.getStartOfToken(),p=o.getCurrentPosition();return new jD(new Sf(l,c),new Sf(l,p))}function J9(e){const n=e.loc;return zy(n,"Expected ASTNode to have a location."),n}/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/var _S,qD;function e7(){return qD||(qD=1,_S=function(t){return typeof t=="object"?t===null:typeof t!="function"}),_S}/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var NS,BD;function t7(){return BD||(BD=1,NS=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}),NS}/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var AS,$D;function n7(){if($D)return AS;$D=1;var e=t7();function t(n){return e(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}return AS=function(r){var i,o;return!(t(r)===!1||(i=r.constructor,typeof i!="function")||(o=i.prototype,t(o)===!1)||o.hasOwnProperty("isPrototypeOf")===!1)},AS}/*!
* set-value <https://github.com/jonschlinkert/set-value>
*
* Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
* Released under the MIT License.
*/var OS,zD;function r7(){if(zD)return OS;zD=1;const{deleteProperty:e}=Reflect,t=e7(),n=n7(),r=y=>typeof y=="object"&&y!==null||typeof y=="function",i=y=>y==="__proto__"||y==="constructor"||y==="prototype",o=y=>{if(!t(y))throw new TypeError("Object keys must be strings or symbols");if(i(y))throw new Error(`Cannot set unsafe key: "${y}"`)},l=y=>Array.isArray(y)?y.flat().map(String).join(","):y,c=(y,x)=>{if(typeof y!="string"||!x)return y;let w=y+";";return x.arrays!==void 0&&(w+=`arrays=${x.arrays};`),x.separator!==void 0&&(w+=`separator=${x.separator};`),x.split!==void 0&&(w+=`split=${x.split};`),x.merge!==void 0&&(w+=`merge=${x.merge};`),x.preservePaths!==void 0&&(w+=`preservePaths=${x.preservePaths};`),w},p=(y,x,w)=>{const k=l(x?c(y,x):y);o(k);const N=E.cache.get(k)||w();return E.cache.set(k,N),N},d=(y,x={})=>{const w=x.separator||".",k=w==="/"?!1:x.preservePaths;if(typeof y=="string"&&k!==!1&&/\//.test(y))return[y];const N=[];let D="";const A=C=>{let M;C.trim()!==""&&Number.isInteger(M=Number(C))?N.push(M):N.push(C)};for(let C=0;C<y.length;C++){const M=y[C];if(M==="\\"){D+=y[++C];continue}if(M===w){A(D),D="";continue}D+=M}return D&&A(D),N},m=(y,x)=>x&&typeof x.split=="function"?x.split(y):typeof y=="symbol"?[y]:Array.isArray(y)?y:p(y,x,()=>d(y,x)),b=(y,x,w,k)=>{if(o(x),w===void 0)e(y,x);else if(k&&k.merge){const N=k.merge==="function"?k.merge:Object.assign;N&&n(y[x])&&n(w)?y[x]=N(y[x],w):y[x]=w}else y[x]=w;return y},E=(y,x,w,k)=>{if(!x||!r(y))return y;const N=m(x,k);let D=y;for(let A=0;A<N.length;A++){const C=N[A],M=N[A+1];if(o(C),M===void 0){b(D,C,w,k);break}if(typeof M=="number"&&!Array.isArray(D[C])){D=D[C]=[];continue}r(D[C])||(D[C]={}),D=D[C]}return y};return E.split=m,E.cache=new Map,E.clear=()=>{E.cache=new Map},OS=E,OS}var i7=r7();const o7=Du(i7);var DS,HD;function a7(){return HD||(HD=1,DS=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),DS}var kS,GD;function s7(){if(GD)return kS;GD=1;var e=a7(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(o){var l=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,l)}function i(o,l){var c,p,d,m,b,E,y=!1;l||(l={}),c=l.debug||!1;try{d=e(),m=document.createRange(),b=document.getSelection(),E=document.createElement("span"),E.textContent=o,E.ariaHidden="true",E.style.all="unset",E.style.position="fixed",E.style.top=0,E.style.clip="rect(0, 0, 0, 0)",E.style.whiteSpace="pre",E.style.webkitUserSelect="text",E.style.MozUserSelect="text",E.style.msUserSelect="text",E.style.userSelect="text",E.addEventListener("copy",function(w){if(w.stopPropagation(),l.format)if(w.preventDefault(),typeof w.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var k=t[l.format]||t.default;window.clipboardData.setData(k,o)}else w.clipboardData.clearData(),w.clipboardData.setData(l.format,o);l.onCopy&&(w.preventDefault(),l.onCopy(w.clipboardData))}),document.body.appendChild(E),m.selectNodeContents(E),b.addRange(m);var x=document.execCommand("copy");if(!x)throw new Error("copy command was unsuccessful");y=!0}catch(w){c&&console.error("unable to copy using execCommand: ",w),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(l.format||"text",o),l.onCopy&&l.onCopy(window.clipboardData),y=!0}catch(k){c&&console.error("unable to copy using clipboardData: ",k),c&&console.error("falling back to prompt"),p=r("message"in l?l.message:n),window.prompt(p,o)}}finally{b&&(typeof b.removeRange=="function"?b.removeRange(m):b.removeAllRanges()),E&&document.body.removeChild(E),d()}return y}return kS=i,kS}var l7=s7();const u7=Du(l7);function $t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function YD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hy(...e){return t=>{let n=!1;const r=e.map(i=>{const o=YD(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():YD(e[i],null)}}}}function li(...e){return L.useCallback(Hy(...e),e)}function c7(e,t){const n=L.createContext(t),r=o=>{const{children:l,...c}=o,p=L.useMemo(()=>c,Object.values(c));return Y.jsx(n.Provider,{value:p,children:l})};r.displayName=e+"Provider";function i(o){const l=L.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Tf(e,t=[]){let n=[];function r(o,l){const c=L.createContext(l),p=n.length;n=[...n,l];const d=b=>{const{scope:E,children:y,...x}=b,w=E?.[e]?.[p]||c,k=L.useMemo(()=>x,Object.values(x));return Y.jsx(w.Provider,{value:k,children:y})};d.displayName=o+"Provider";function m(b,E){const y=E?.[e]?.[p]||c,x=L.useContext(y);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${b}\` must be used within \`${o}\``)}return[d,m]}const i=()=>{const o=n.map(l=>L.createContext(l));return function(c){const p=c?.[e]||o;return L.useMemo(()=>({[`__scope${e}`]:{...c,[e]:p}}),[c,p])}};return i.scopeName=e,[r,f7(i,...t)]}function f7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((c,{useScope:p,scopeName:d})=>{const b=p(o)[`__scope${d}`];return{...c,...b}},{});return L.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Vu=globalThis?.document?L.useLayoutEffect:()=>{},d7=Qv[" useId ".trim().toString()]||(()=>{}),p7=0;function xf(e){const[t,n]=L.useState(d7());return Vu(()=>{n(r=>r??String(p7++))},[e]),t?`radix-${t}`:""}var h7=Qv[" useInsertionEffect ".trim().toString()]||Vu;function Gy({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=m7({defaultProp:t,onChange:n}),c=e!==void 0,p=c?e:i;{const m=L.useRef(e!==void 0);L.useEffect(()=>{const b=m.current;b!==c&&console.warn(`${r} is changing from ${b?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const d=L.useCallback(m=>{if(c){const b=g7(m)?m(e):m;b!==e&&l.current?.(b)}else o(m)},[c,e,o,l]);return[p,d]}function m7({defaultProp:e,onChange:t}){const[n,r]=L.useState(e),i=L.useRef(n),o=L.useRef(t);return h7(()=>{o.current=t},[t]),L.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function g7(e){return typeof e=="function"}var Yy=lN();const RS=Du(Yy);function Tm(e){const t=v7(e),n=L.forwardRef((r,i)=>{const{children:o,...l}=r,c=L.Children.toArray(o),p=c.find(b7);if(p){const d=p.props.children,m=c.map(b=>b===p?L.Children.count(d)>1?L.Children.only(null):L.isValidElement(d)?d.props.children:null:b);return Y.jsx(t,{...l,ref:i,children:L.isValidElement(d)?L.cloneElement(d,void 0,m):null})}return Y.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function v7(e){const t=L.forwardRef((n,r)=>{const{children:i,...o}=n;if(L.isValidElement(i)){const l=S7(i),c=E7(o,i.props);return i.type!==L.Fragment&&(c.ref=r?Hy(r,l):l),L.cloneElement(i,c)}return L.Children.count(i)>1?L.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WD=Symbol("radix.slottable");function y7(e){const t=({children:n})=>Y.jsx(Y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=WD,t}function b7(e){return L.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WD}function E7(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const p=o(...c);return i(...c),p}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function S7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rr=T7.reduce((e,t)=>{const n=Tm(`Primitive.${t}`),r=L.forwardRef((i,o)=>{const{asChild:l,...c}=i,p=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Y.jsx(p,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function QD(e,t){e&&Yy.flushSync(()=>e.dispatchEvent(t))}function Il(e){const t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...n)=>t.current?.(...n),[])}function x7(e,t=globalThis?.document){const n=Il(e);L.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var w7="DismissableLayer",MS="dismissableLayer.update",C7="dismissableLayer.pointerDownOutside",_7="dismissableLayer.focusOutside",KD,XD=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wy=L.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...p}=e,d=L.useContext(XD),[m,b]=L.useState(null),E=m?.ownerDocument??globalThis?.document,[,y]=L.useState({}),x=li(t,P=>b(P)),w=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),N=w.indexOf(k),D=m?w.indexOf(m):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,C=D>=N,M=O7(P=>{const F=P.target,V=[...d.branches].some($=>$.contains(F));!C||V||(i?.(P),l?.(P),P.defaultPrevented||c?.())},E),j=D7(P=>{const F=P.target;[...d.branches].some($=>$.contains(F))||(o?.(P),l?.(P),P.defaultPrevented||c?.())},E);return x7(P=>{D===d.layers.size-1&&(r?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},E),L.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(KD=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),ZD(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=KD)}},[m,E,n,d]),L.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),ZD())},[m,d]),L.useEffect(()=>{const P=()=>y({});return document.addEventListener(MS,P),()=>document.removeEventListener(MS,P)},[]),Y.jsx(Rr.div,{...p,ref:x,style:{pointerEvents:A?C?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,j.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,M.onPointerDownCapture)})});Wy.displayName=w7;var N7="DismissableLayerBranch",A7=L.forwardRef((e,t)=>{const n=L.useContext(XD),r=L.useRef(null),i=li(t,r);return L.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),Y.jsx(Rr.div,{...e,ref:i})});A7.displayName=N7;function O7(e,t=globalThis?.document){const n=Il(e),r=L.useRef(!1),i=L.useRef(()=>{});return L.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let p=function(){JD(C7,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=p,t.addEventListener("click",i.current,{once:!0})):p()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function D7(e,t=globalThis?.document){const n=Il(e),r=L.useRef(!1);return L.useEffect(()=>{const i=o=>{o.target&&!r.current&&JD(_7,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ZD(){const e=new CustomEvent(MS);document.dispatchEvent(e)}function JD(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?QD(i,o):i.dispatchEvent(o)}var LS="focusScope.autoFocusOnMount",IS="focusScope.autoFocusOnUnmount",ek={bubbles:!1,cancelable:!0},k7="FocusScope",FS=L.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[c,p]=L.useState(null),d=Il(i),m=Il(o),b=L.useRef(null),E=li(t,w=>p(w)),y=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(r){let w=function(A){if(y.paused||!c)return;const C=A.target;c.contains(C)?b.current=C:Uu(b.current,{select:!0})},k=function(A){if(y.paused||!c)return;const C=A.relatedTarget;C!==null&&(c.contains(C)||Uu(b.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&Uu(c)};document.addEventListener("focusin",w),document.addEventListener("focusout",k);const D=new MutationObserver(N);return c&&D.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k),D.disconnect()}}},[r,c,y.paused]),L.useEffect(()=>{if(c){rk.add(y);const w=document.activeElement;if(!c.contains(w)){const N=new CustomEvent(LS,ek);c.addEventListener(LS,d),c.dispatchEvent(N),N.defaultPrevented||(R7(P7(tk(c)),{select:!0}),document.activeElement===w&&Uu(c))}return()=>{c.removeEventListener(LS,d),setTimeout(()=>{const N=new CustomEvent(IS,ek);c.addEventListener(IS,m),c.dispatchEvent(N),N.defaultPrevented||Uu(w??document.body,{select:!0}),c.removeEventListener(IS,m),rk.remove(y)},0)}}},[c,d,m,y]);const x=L.useCallback(w=>{if(!n&&!r||y.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,N=document.activeElement;if(k&&N){const D=w.currentTarget,[A,C]=M7(D);A&&C?!w.shiftKey&&N===C?(w.preventDefault(),n&&Uu(A,{select:!0})):w.shiftKey&&N===A&&(w.preventDefault(),n&&Uu(C,{select:!0})):N===D&&w.preventDefault()}},[n,r,y.paused]);return Y.jsx(Rr.div,{tabIndex:-1,...l,ref:E,onKeyDown:x})});FS.displayName=k7;function R7(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Uu(r,{select:t}),document.activeElement!==n)return}function M7(e){const t=tk(e),n=nk(t,e),r=nk(t.reverse(),e);return[n,r]}function tk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function nk(e,t){for(const n of e)if(!L7(n,{upTo:t}))return n}function L7(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function I7(e){return e instanceof HTMLInputElement&&"select"in e}function Uu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&I7(e)&&t&&e.select()}}var rk=F7();function F7(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ik(e,t),e.unshift(t)},remove(t){e=ik(e,t),e[0]?.resume()}}}function ik(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function P7(e){return e.filter(t=>t.tagName!=="A")}var j7="Portal",Qy=L.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=L.useState(!1);Vu(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?RS.createPortal(Y.jsx(Rr.div,{...r,ref:t}),l):null});Qy.displayName=j7;function V7(e,t){return L.useReducer((n,r)=>t[n][r]??n,e)}var js=e=>{const{present:t,children:n}=e,r=U7(t),i=typeof n=="function"?n({present:r.isPresent}):L.Children.only(n),o=li(r.ref,q7(i));return typeof n=="function"||r.isPresent?L.cloneElement(i,{ref:o}):null};js.displayName="Presence";function U7(e){const[t,n]=L.useState(),r=L.useRef(null),i=L.useRef(e),o=L.useRef("none"),l=e?"mounted":"unmounted",[c,p]=V7(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return L.useEffect(()=>{const d=Ky(r.current);o.current=c==="mounted"?d:"none"},[c]),Vu(()=>{const d=r.current,m=i.current;if(m!==e){const E=o.current,y=Ky(d);e?p("MOUNT"):y==="none"||d?.display==="none"?p("UNMOUNT"):p(m&&E!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),Vu(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,b=y=>{const w=Ky(r.current).includes(y.animationName);if(y.target===t&&w&&(p("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},E=y=>{y.target===t&&(o.current=Ky(r.current))};return t.addEventListener("animationstart",E),t.addEventListener("animationcancel",b),t.addEventListener("animationend",b),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",E),t.removeEventListener("animationcancel",b),t.removeEventListener("animationend",b)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:L.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Ky(e){return e?.animationName||"none"}function q7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PS=0;function ok(){L.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ak()),document.body.insertAdjacentElement("beforeend",e[1]??ak()),PS++,()=>{PS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),PS--}},[])}function ak(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var jS=function(e,t){return jS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},jS(e,t)};function sk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jS(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Qe=function(){return Qe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Qe.apply(this,arguments)};function Gi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yr(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],l;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(c){l={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return o}function ns(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Xy="right-scroll-bar-position",Zy="width-before-scroll-bar",B7="with-scroll-bars-hidden",$7="--removed-body-scroll-bar-size";function VS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function z7(e,t){var n=L.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var H7=typeof window<"u"?L.useLayoutEffect:L.useEffect,lk=new WeakMap;function G7(e,t){var n=z7(null,function(r){return e.forEach(function(i){return VS(i,r)})});return H7(function(){var r=lk.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(c){o.has(c)||VS(c,null)}),o.forEach(function(c){i.has(c)||VS(c,l)})}lk.set(n,e)},[e]),n}function Y7(e){return e}function W7(e,t){t===void 0&&(t=Y7);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var p=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(p)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return i}function Q7(e){e===void 0&&(e={});var t=W7(null);return t.options=Qe({async:!0,ssr:!1},e),t}var uk=function(e){var t=e.sideCar,n=Gi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return L.createElement(r,Qe({},n))};uk.isSideCarExport=!0;function K7(e,t){return e.useMedium(t),uk}var ck=Q7(),US=function(){},Jy=L.forwardRef(function(e,t){var n=L.useRef(null),r=L.useState({onScrollCapture:US,onWheelCapture:US,onTouchMoveCapture:US}),i=r[0],o=r[1],l=e.forwardProps,c=e.children,p=e.className,d=e.removeScrollBar,m=e.enabled,b=e.shards,E=e.sideCar,y=e.noRelative,x=e.noIsolation,w=e.inert,k=e.allowPinchZoom,N=e.as,D=N===void 0?"div":N,A=e.gapMode,C=Gi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=E,j=G7([n,t]),P=Qe(Qe({},C),i);return L.createElement(L.Fragment,null,m&&L.createElement(M,{sideCar:ck,removeScrollBar:d,shards:b,noRelative:y,noIsolation:x,inert:w,setCallbacks:o,allowPinchZoom:!!k,lockRef:n,gapMode:A}),l?L.cloneElement(L.Children.only(c),Qe(Qe({},P),{ref:j})):L.createElement(D,Qe({},P,{className:p,ref:j}),c))});Jy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jy.classNames={fullWidth:Zy,zeroRight:Xy};var X7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Z7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=X7();return t&&e.setAttribute("nonce",t),e}function J7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Z7())&&(J7(t,n),eU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nU=function(){var e=tU();return function(t,n){L.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fk=function(){var e=nU(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},rU={left:0,top:0,right:0,gap:0},qS=function(e){return parseInt(e||"",10)||0},iU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[qS(n),qS(r),qS(i)]},oU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rU;var t=iU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aU=fk(),Yd="data-scroll-locked",sU=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
.`.concat(B7,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(c,"px ").concat(r,`;
}
body[`).concat(Yd,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(l,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(c,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Xy,` {
right: `).concat(c,"px ").concat(r,`;
}
.`).concat(Zy,` {
margin-right: `).concat(c,"px ").concat(r,`;
}
.`).concat(Xy," .").concat(Xy,` {
right: 0 `).concat(r,`;
}
.`).concat(Zy," .").concat(Zy,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Yd,`] {
`).concat($7,": ").concat(c,`px;
}
`)},dk=function(){var e=parseInt(document.body.getAttribute(Yd)||"0",10);return isFinite(e)?e:0},lU=function(){L.useEffect(function(){return document.body.setAttribute(Yd,(dk()+1).toString()),function(){var e=dk()-1;e<=0?document.body.removeAttribute(Yd):document.body.setAttribute(Yd,e.toString())}},[])},uU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;lU();var o=L.useMemo(function(){return oU(i)},[i]);return L.createElement(aU,{styles:sU(o,!t,i,n?"":"!important")})},BS=!1;if(typeof window<"u")try{var e0=Object.defineProperty({},"passive",{get:function(){return BS=!0,!0}});window.addEventListener("test",e0,e0),window.removeEventListener("test",e0,e0)}catch{BS=!1}var Wd=BS?{passive:!1}:!1,cU=function(e){return e.tagName==="TEXTAREA"},pk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cU(e)&&n[t]==="visible")},fU=function(e){return pk(e,"overflowY")},dU=function(e){return pk(e,"overflowX")},hk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=mk(e,r);if(i){var o=gk(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},mk=function(e,t){return e==="v"?fU(t):dU(t)},gk=function(e,t){return e==="v"?pU(t):hU(t)},mU=function(e,t){return e==="h"&&t==="rtl"?-1:1},gU=function(e,t,n,r,i){var o=mU(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,p=t.contains(c),d=!1,m=l>0,b=0,E=0;do{if(!c)break;var y=gk(e,c),x=y[0],w=y[1],k=y[2],N=w-k-o*x;(x||N)&&mk(e,c)&&(b+=N,E+=x);var D=c.parentNode;c=D&&D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?D.host:D}while(!p&&c!==document.body||p&&(t.contains(c)||t===c));return(m&&Math.abs(b)<1||!m&&Math.abs(E)<1)&&(d=!0),d},t0=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vk=function(e){return[e.deltaX,e.deltaY]},yk=function(e){return e&&"current"in e?e.current:e},vU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yU=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},bU=0,Qd=[];function EU(e){var t=L.useRef([]),n=L.useRef([0,0]),r=L.useRef(),i=L.useState(bU++)[0],o=L.useState(fk)[0],l=L.useRef(e);L.useEffect(function(){l.current=e},[e]),L.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=ns([e.lockRef.current],(e.shards||[]).map(yk),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=L.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!l.current.allowPinchZoom;var N=t0(w),D=n.current,A="deltaX"in w?w.deltaX:D[0]-N[0],C="deltaY"in w?w.deltaY:D[1]-N[1],M,j=w.target,P=Math.abs(A)>Math.abs(C)?"h":"v";if("touches"in w&&P==="h"&&j.type==="range")return!1;var F=hk(P,j);if(!F)return!0;if(F?M=P:(M=P==="v"?"h":"v",F=hk(P,j)),!F)return!1;if(!r.current&&"changedTouches"in w&&(A||C)&&(r.current=M),!M)return!0;var V=r.current||M;return gU(V,k,w,V==="h"?A:C)},[]),p=L.useCallback(function(w){var k=w;if(!(!Qd.length||Qd[Qd.length-1]!==o)){var N="deltaY"in k?vk(k):t0(k),D=t.current.filter(function(M){return M.name===k.type&&(M.target===k.target||k.target===M.shadowParent)&&vU(M.delta,N)})[0];if(D&&D.should){k.cancelable&&k.preventDefault();return}if(!D){var A=(l.current.shards||[]).map(yk).filter(Boolean).filter(function(M){return M.contains(k.target)}),C=A.length>0?c(k,A[0]):!l.current.noIsolation;C&&k.cancelable&&k.preventDefault()}}},[]),d=L.useCallback(function(w,k,N,D){var A={name:w,delta:k,target:N,should:D,shadowParent:SU(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(C){return C!==A})},1)},[]),m=L.useCallback(function(w){n.current=t0(w),r.current=void 0},[]),b=L.useCallback(function(w){d(w.type,vk(w),w.target,c(w,e.lockRef.current))},[]),E=L.useCallback(function(w){d(w.type,t0(w),w.target,c(w,e.lockRef.current))},[]);L.useEffect(function(){return Qd.push(o),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:E}),document.addEventListener("wheel",p,Wd),document.addEventListener("touchmove",p,Wd),document.addEventListener("touchstart",m,Wd),function(){Qd=Qd.filter(function(w){return w!==o}),document.removeEventListener("wheel",p,Wd),document.removeEventListener("touchmove",p,Wd),document.removeEventListener("touchstart",m,Wd)}},[]);var y=e.removeScrollBar,x=e.inert;return L.createElement(L.Fragment,null,x?L.createElement(o,{styles:yU(i)}):null,y?L.createElement(uU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function SU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const TU=K7(ck,EU);var $S=L.forwardRef(function(e,t){return L.createElement(Jy,Qe({},e,{ref:t,sideCar:TU}))});$S.classNames=Jy.classNames;var xU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kd=new WeakMap,n0=new WeakMap,r0={},zS=0,bk=function(e){return e&&(e.host||bk(e.parentNode))},wU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},CU=function(e,t,n,r){var i=wU(t,Array.isArray(e)?e:[e]);r0[n]||(r0[n]=new WeakMap);var o=r0[n],l=[],c=new Set,p=new Set(i),d=function(b){!b||c.has(b)||(c.add(b),d(b.parentNode))};i.forEach(d);var m=function(b){!b||p.has(b)||Array.prototype.forEach.call(b.children,function(E){if(c.has(E))m(E);else try{var y=E.getAttribute(r),x=y!==null&&y!=="false",w=(Kd.get(E)||0)+1,k=(o.get(E)||0)+1;Kd.set(E,w),o.set(E,k),l.push(E),w===1&&x&&n0.set(E,!0),k===1&&E.setAttribute(n,"true"),x||E.setAttribute(r,"true")}catch(N){console.error("aria-hidden: cannot operate on ",E,N)}})};return m(t),c.clear(),zS++,function(){l.forEach(function(b){var E=Kd.get(b)-1,y=o.get(b)-1;Kd.set(b,E),o.set(b,y),E||(n0.has(b)||b.removeAttribute(r),n0.delete(b)),y||b.removeAttribute(n)}),zS--,zS||(Kd=new WeakMap,Kd=new WeakMap,n0=new WeakMap,r0={})}},Ek=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=xU(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),CU(r,i,n,"aria-hidden")):function(){return null}},i0="Dialog",[Sk,uoe]=Tf(i0),[_U,rs]=Sk(i0),Tk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=L.useRef(null),p=L.useRef(null),[d,m]=Gy({prop:r,defaultProp:i??!1,onChange:o,caller:i0});return Y.jsx(_U,{scope:t,triggerRef:c,contentRef:p,contentId:xf(),titleId:xf(),descriptionId:xf(),open:d,onOpenChange:m,onOpenToggle:L.useCallback(()=>m(b=>!b),[m]),modal:l,children:n})};Tk.displayName=i0;var xk="DialogTrigger",wk=L.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=rs(xk,n),o=li(t,i.triggerRef);return Y.jsx(Rr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":YS(i.open),...r,ref:o,onClick:$t(e.onClick,i.onOpenToggle)})});wk.displayName=xk;var HS="DialogPortal",[NU,Ck]=Sk(HS,{forceMount:void 0}),_k=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=rs(HS,t);return Y.jsx(NU,{scope:t,forceMount:n,children:L.Children.map(r,l=>Y.jsx(js,{present:n||o.open,children:Y.jsx(Qy,{asChild:!0,container:i,children:l})}))})};_k.displayName=HS;var o0="DialogOverlay",Nk=L.forwardRef((e,t)=>{const n=Ck(o0,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=rs(o0,e.__scopeDialog);return o.modal?Y.jsx(js,{present:r||o.open,children:Y.jsx(OU,{...i,ref:t})}):null});Nk.displayName=o0;var AU=Tm("DialogOverlay.RemoveScroll"),OU=L.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=rs(o0,n);return Y.jsx($S,{as:AU,allowPinchZoom:!0,shards:[i.contentRef],children:Y.jsx(Rr.div,{"data-state":YS(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),wf="DialogContent",Ak=L.forwardRef((e,t)=>{const n=Ck(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=rs(wf,e.__scopeDialog);return Y.jsx(js,{present:r||o.open,children:o.modal?Y.jsx(DU,{...i,ref:t}):Y.jsx(kU,{...i,ref:t})})});Ak.displayName=wf;var DU=L.forwardRef((e,t)=>{const n=rs(wf,e.__scopeDialog),r=L.useRef(null),i=li(t,n.contentRef,r);return L.useEffect(()=>{const o=r.current;if(o)return Ek(o)},[]),Y.jsx(Ok,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:$t(e.onFocusOutside,o=>o.preventDefault())})}),kU=L.forwardRef((e,t)=>{const n=rs(wf,e.__scopeDialog),r=L.useRef(!1),i=L.useRef(!1);return Y.jsx(Ok,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Ok=L.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,c=rs(wf,n),p=L.useRef(null),d=li(t,p);return ok(),Y.jsxs(Y.Fragment,{children:[Y.jsx(FS,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:Y.jsx(Wy,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":YS(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),Y.jsxs(Y.Fragment,{children:[Y.jsx(RU,{titleId:c.titleId}),Y.jsx(LU,{contentRef:p,descriptionId:c.descriptionId})]})]})}),GS="DialogTitle",Dk=L.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=rs(GS,n);return Y.jsx(Rr.h2,{id:i.titleId,...r,ref:t})});Dk.displayName=GS;var kk="DialogDescription",Rk=L.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=rs(kk,n);return Y.jsx(Rr.p,{id:i.descriptionId,...r,ref:t})});Rk.displayName=kk;var Mk="DialogClose",Lk=L.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=rs(Mk,n);return Y.jsx(Rr.button,{type:"button",...r,ref:t,onClick:$t(e.onClick,()=>i.onOpenChange(!1))})});Lk.displayName=Mk;function YS(e){return e?"open":"closed"}var Ik="DialogTitleWarning",[coe,Fk]=c7(Ik,{contentName:wf,titleName:GS,docsSlug:"dialog"}),RU=({titleId:e})=>{const t=Fk(Ik),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return L.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MU="DialogDescriptionWarning",LU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fk(MU).contentName}}.`;return L.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},IU=Tk,FU=wk,PU=_k,jU=Nk,VU=Ak,UU=Dk,qU=Rk,BU=Lk,$U=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),zU="VisuallyHidden",Pk=L.forwardRef((e,t)=>Y.jsx(Rr.span,{...e,ref:t,style:{...$U,...e.style}}));Pk.displayName=zU;var jk=Pk;function Vk(e){const t=e+"CollectionProvider",[n,r]=Tf(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:k,children:N}=w,D=Ae.useRef(null),A=Ae.useRef(new Map).current;return Y.jsx(i,{scope:k,itemMap:A,collectionRef:D,children:N})};l.displayName=t;const c=e+"CollectionSlot",p=Tm(c),d=Ae.forwardRef((w,k)=>{const{scope:N,children:D}=w,A=o(c,N),C=li(k,A.collectionRef);return Y.jsx(p,{ref:C,children:D})});d.displayName=c;const m=e+"CollectionItemSlot",b="data-radix-collection-item",E=Tm(m),y=Ae.forwardRef((w,k)=>{const{scope:N,children:D,...A}=w,C=Ae.useRef(null),M=li(k,C),j=o(m,N);return Ae.useEffect(()=>(j.itemMap.set(C,{ref:C,...A}),()=>void j.itemMap.delete(C))),Y.jsx(E,{[b]:"",ref:M,children:D})});y.displayName=m;function x(w){const k=o(e+"CollectionConsumer",w);return Ae.useCallback(()=>{const D=k.collectionRef.current;if(!D)return[];const A=Array.from(D.querySelectorAll(`[${b}]`));return Array.from(k.itemMap.values()).sort((j,P)=>A.indexOf(j.ref.current)-A.indexOf(P.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:l,Slot:d,ItemSlot:y},x,r]}var HU=L.createContext(void 0);function Uk(e){const t=L.useContext(HU);return e||t||"ltr"}const GU=["top","right","bottom","left"],qu=Math.min,zo=Math.max,a0=Math.round,s0=Math.floor,Vs=e=>({x:e,y:e}),YU={left:"right",right:"left",bottom:"top",top:"bottom"},WU={start:"end",end:"start"};function WS(e,t,n){return zo(e,qu(t,n))}function Fl(e,t){return typeof e=="function"?e(t):e}function Pl(e){return e.split("-")[0]}function Xd(e){return e.split("-")[1]}function QS(e){return e==="x"?"y":"x"}function KS(e){return e==="y"?"height":"width"}const QU=new Set(["top","bottom"]);function Us(e){return QU.has(Pl(e))?"y":"x"}function XS(e){return QS(Us(e))}function KU(e,t,n){n===void 0&&(n=!1);const r=Xd(e),i=XS(e),o=KS(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=l0(l)),[l,l0(l)]}function XU(e){const t=l0(e);return[ZS(e),t,ZS(t)]}function ZS(e){return e.replace(/start|end/g,t=>WU[t])}const qk=["left","right"],Bk=["right","left"],ZU=["top","bottom"],JU=["bottom","top"];function eq(e,t,n){switch(e){case"top":case"bottom":return n?t?Bk:qk:t?qk:Bk;case"left":case"right":return t?ZU:JU;default:return[]}}function tq(e,t,n,r){const i=Xd(e);let o=eq(Pl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(ZS)))),o}function l0(e){return e.replace(/left|right|bottom|top/g,t=>YU[t])}function nq(e){return{top:0,right:0,bottom:0,left:0,...e}}function $k(e){return typeof e!="number"?nq(e):{top:e,right:e,bottom:e,left:e}}function u0(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function zk(e,t,n){let{reference:r,floating:i}=e;const o=Us(t),l=XS(t),c=KS(l),p=Pl(t),d=o==="y",m=r.x+r.width/2-i.width/2,b=r.y+r.height/2-i.height/2,E=r[c]/2-i[c]/2;let y;switch(p){case"top":y={x:m,y:r.y-i.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:b};break;case"left":y={x:r.x-i.width,y:b};break;default:y={x:r.x,y:r.y}}switch(Xd(t)){case"start":y[l]-=E*(n&&d?-1:1);break;case"end":y[l]+=E*(n&&d?-1:1);break}return y}const rq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),p=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:b}=zk(d,r,p),E=r,y={},x=0;for(let w=0;w<c.length;w++){const{name:k,fn:N}=c[w],{x:D,y:A,data:C,reset:M}=await N({x:m,y:b,initialPlacement:r,placement:E,strategy:i,middlewareData:y,rects:d,platform:l,elements:{reference:e,floating:t}});m=D??m,b=A??b,y={...y,[k]:{...y[k],...C}},M&&x<=50&&(x++,typeof M=="object"&&(M.placement&&(E=M.placement),M.rects&&(d=M.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:m,y:b}=zk(d,E,p)),w=-1)}return{x:m,y:b,placement:E,strategy:i,middlewareData:y}};async function xm(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:p}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:E=!1,padding:y=0}=Fl(t,e),x=$k(y),k=c[E?b==="floating"?"reference":"floating":b],N=u0(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(k)))==null||n?k:k.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:m,strategy:p})),D=b==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),C=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},M=u0(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:D,offsetParent:A,strategy:p}):D);return{top:(N.top-M.top+x.top)/C.y,bottom:(M.bottom-N.bottom+x.bottom)/C.y,left:(N.left-M.left+x.left)/C.x,right:(M.right-N.right+x.right)/C.x}}const iq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:p}=t,{element:d,padding:m=0}=Fl(e,t)||{};if(d==null)return{};const b=$k(m),E={x:n,y:r},y=XS(i),x=KS(y),w=await l.getDimensions(d),k=y==="y",N=k?"top":"left",D=k?"bottom":"right",A=k?"clientHeight":"clientWidth",C=o.reference[x]+o.reference[y]-E[y]-o.floating[x],M=E[y]-o.reference[y],j=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let P=j?j[A]:0;(!P||!await(l.isElement==null?void 0:l.isElement(j)))&&(P=c.floating[A]||o.floating[x]);const F=C/2-M/2,V=P/2-w[x]/2-1,$=qu(b[N],V),X=qu(b[D],V),J=$,ee=P-w[x]-X,Q=P/2-w[x]/2+F,B=WS(J,Q,ee),ne=!p.arrow&&Xd(i)!=null&&Q!==B&&o.reference[x]/2-(Q<J?$:X)-w[x]/2<0,re=ne?Q<J?Q-J:Q-ee:0;return{[y]:E[y]+re,data:{[y]:B,centerOffset:Q-B-re,...ne&&{alignmentOffset:re}},reset:ne}}}),oq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:p,elements:d}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:E,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...k}=Fl(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const N=Pl(i),D=Us(c),A=Pl(c)===c,C=await(p.isRTL==null?void 0:p.isRTL(d.floating)),M=E||(A||!w?[l0(c)]:XU(c)),j=x!=="none";!E&&j&&M.push(...tq(c,w,x,C));const P=[c,...M],F=await xm(t,k),V=[];let $=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&V.push(F[N]),b){const Q=KU(i,l,C);V.push(F[Q[0]],F[Q[1]])}if($=[...$,{placement:i,overflows:V}],!V.every(Q=>Q<=0)){var X,J;const Q=(((X=o.flip)==null?void 0:X.index)||0)+1,B=P[Q];if(B&&(!(b==="alignment"?D!==Us(B):!1)||$.every(se=>se.overflows[0]>0&&Us(se.placement)===D)))return{data:{index:Q,overflows:$},reset:{placement:B}};let ne=(J=$.filter(re=>re.overflows[0]<=0).sort((re,se)=>re.overflows[1]-se.overflows[1])[0])==null?void 0:J.placement;if(!ne)switch(y){case"bestFit":{var ee;const re=(ee=$.filter(se=>{if(j){const fe=Us(se.placement);return fe===D||fe==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(fe=>fe>0).reduce((fe,Z)=>fe+Z,0)]).sort((se,fe)=>se[1]-fe[1])[0])==null?void 0:ee[0];re&&(ne=re);break}case"initialPlacement":ne=c;break}if(i!==ne)return{reset:{placement:ne}}}return{}}}};function Hk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gk(e){return GU.some(t=>e[t]>=0)}const aq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Fl(e,t);switch(r){case"referenceHidden":{const o=await xm(t,{...i,elementContext:"reference"}),l=Hk(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Gk(l)}}}case"escaped":{const o=await xm(t,{...i,altBoundary:!0}),l=Hk(o,n.floating);return{data:{escapedOffsets:l,escaped:Gk(l)}}}default:return{}}}}},Yk=new Set(["left","top"]);async function sq(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Pl(n),c=Xd(n),p=Us(n)==="y",d=Yk.has(l)?-1:1,m=o&&p?-1:1,b=Fl(t,e);let{mainAxis:E,crossAxis:y,alignmentAxis:x}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),p?{x:y*m,y:E*d}:{x:E*d,y:y*m}}const lq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,p=await sq(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+p.x,y:o+p.y,data:{...p,placement:l}}}}},uq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:k=>{let{x:N,y:D}=k;return{x:N,y:D}}},...p}=Fl(e,t),d={x:n,y:r},m=await xm(t,p),b=Us(Pl(i)),E=QS(b);let y=d[E],x=d[b];if(o){const k=E==="y"?"top":"left",N=E==="y"?"bottom":"right",D=y+m[k],A=y-m[N];y=WS(D,y,A)}if(l){const k=b==="y"?"top":"left",N=b==="y"?"bottom":"right",D=x+m[k],A=x-m[N];x=WS(D,x,A)}const w=c.fn({...t,[E]:y,[b]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[E]:o,[b]:l}}}}}},cq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:p=!0,crossAxis:d=!0}=Fl(e,t),m={x:n,y:r},b=Us(i),E=QS(b);let y=m[E],x=m[b];const w=Fl(c,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const A=E==="y"?"height":"width",C=o.reference[E]-o.floating[A]+k.mainAxis,M=o.reference[E]+o.reference[A]-k.mainAxis;y<C?y=C:y>M&&(y=M)}if(d){var N,D;const A=E==="y"?"width":"height",C=Yk.has(Pl(i)),M=o.reference[b]-o.floating[A]+(C&&((N=l.offset)==null?void 0:N[b])||0)+(C?0:k.crossAxis),j=o.reference[b]+o.reference[A]+(C?0:((D=l.offset)==null?void 0:D[b])||0)-(C?k.crossAxis:0);x<M?x=M:x>j&&(x=j)}return{[E]:y,[b]:x}}}},fq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:c}=t,{apply:p=()=>{},...d}=Fl(e,t),m=await xm(t,d),b=Pl(i),E=Xd(i),y=Us(i)==="y",{width:x,height:w}=o.floating;let k,N;b==="top"||b==="bottom"?(k=b,N=E===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(N=b,k=E==="end"?"top":"bottom");const D=w-m.top-m.bottom,A=x-m.left-m.right,C=qu(w-m[k],D),M=qu(x-m[N],A),j=!t.middlewareData.shift;let P=C,F=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=A),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=D),j&&!E){const $=zo(m.left,0),X=zo(m.right,0),J=zo(m.top,0),ee=zo(m.bottom,0);y?F=x-2*($!==0||X!==0?$+X:zo(m.left,m.right)):P=w-2*(J!==0||ee!==0?J+ee:zo(m.top,m.bottom))}await p({...t,availableWidth:F,availableHeight:P});const V=await l.getDimensions(c.floating);return x!==V.width||w!==V.height?{reset:{rects:!0}}:{}}}};function c0(){return typeof window<"u"}function Zd(e){return Wk(e)?(e.nodeName||"").toLowerCase():"#document"}function Ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qs(e){var t;return(t=(Wk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wk(e){return c0()?e instanceof Node||e instanceof Ho(e).Node:!1}function is(e){return c0()?e instanceof Element||e instanceof Ho(e).Element:!1}function Bs(e){return c0()?e instanceof HTMLElement||e instanceof Ho(e).HTMLElement:!1}function Qk(e){return!c0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ho(e).ShadowRoot}const dq=new Set(["inline","contents"]);function wm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=os(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dq.has(i)}const pq=new Set(["table","td","th"]);function hq(e){return pq.has(Zd(e))}const mq=[":popover-open",":modal"];function f0(e){return mq.some(t=>{try{return e.matches(t)}catch{return!1}})}const gq=["transform","translate","scale","rotate","perspective"],vq=["transform","translate","scale","rotate","perspective","filter"],yq=["paint","layout","strict","content"];function JS(e){const t=eT(),n=is(e)?os(e):e;return gq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vq.some(r=>(n.willChange||"").includes(r))||yq.some(r=>(n.contain||"").includes(r))}function bq(e){let t=Bu(e);for(;Bs(t)&&!Jd(t);){if(JS(t))return t;if(f0(t))return null;t=Bu(t)}return null}function eT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Eq=new Set(["html","body","#document"]);function Jd(e){return Eq.has(Zd(e))}function os(e){return Ho(e).getComputedStyle(e)}function d0(e){return is(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bu(e){if(Zd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qk(e)&&e.host||qs(e);return Qk(t)?t.host:t}function Kk(e){const t=Bu(e);return Jd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&wm(t)?t:Kk(t)}function Cm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Kk(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Ho(i);if(o){const c=tT(l);return t.concat(l,l.visualViewport||[],wm(i)?i:[],c&&n?Cm(c):[])}return t.concat(i,Cm(i,[],n))}function tT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xk(e){const t=os(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bs(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=a0(n)!==o||a0(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function nT(e){return is(e)?e:e.contextElement}function ep(e){const t=nT(e);if(!Bs(t))return Vs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Xk(t);let l=(o?a0(n.width):n.width)/r,c=(o?a0(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Sq=Vs(0);function Zk(e){const t=Ho(e);return!eT()||!t.visualViewport?Sq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ho(e)?!1:t}function Cf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=nT(e);let l=Vs(1);t&&(r?is(r)&&(l=ep(r)):l=ep(e));const c=Tq(o,n,r)?Zk(o):Vs(0);let p=(i.left+c.x)/l.x,d=(i.top+c.y)/l.y,m=i.width/l.x,b=i.height/l.y;if(o){const E=Ho(o),y=r&&is(r)?Ho(r):r;let x=E,w=tT(x);for(;w&&r&&y!==x;){const k=ep(w),N=w.getBoundingClientRect(),D=os(w),A=N.left+(w.clientLeft+parseFloat(D.paddingLeft))*k.x,C=N.top+(w.clientTop+parseFloat(D.paddingTop))*k.y;p*=k.x,d*=k.y,m*=k.x,b*=k.y,p+=A,d+=C,x=Ho(w),w=tT(x)}}return u0({width:m,height:b,x:p,y:d})}function rT(e,t){const n=d0(e).scrollLeft;return t?t.left+n:Cf(qs(e)).left+n}function Jk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:rT(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function xq(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=qs(r),c=t?f0(t.floating):!1;if(r===l||c&&o)return n;let p={scrollLeft:0,scrollTop:0},d=Vs(1);const m=Vs(0),b=Bs(r);if((b||!b&&!o)&&((Zd(r)!=="body"||wm(l))&&(p=d0(r)),Bs(r))){const y=Cf(r);d=ep(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const E=l&&!b&&!o?Jk(l,p,!0):Vs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-p.scrollLeft*d.x+m.x+E.x,y:n.y*d.y-p.scrollTop*d.y+m.y+E.y}}function wq(e){return Array.from(e.getClientRects())}function Cq(e){const t=qs(e),n=d0(e),r=e.ownerDocument.body,i=zo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=zo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+rT(e);const c=-n.scrollTop;return os(r).direction==="rtl"&&(l+=zo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}function _q(e,t){const n=Ho(e),r=qs(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,p=0;if(i){o=i.width,l=i.height;const d=eT();(!d||d&&t==="fixed")&&(c=i.offsetLeft,p=i.offsetTop)}return{width:o,height:l,x:c,y:p}}const Nq=new Set(["absolute","fixed"]);function Aq(e,t){const n=Cf(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Bs(e)?ep(e):Vs(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,p=i*o.x,d=r*o.y;return{width:l,height:c,x:p,y:d}}function e2(e,t,n){let r;if(t==="viewport")r=_q(e,n);else if(t==="document")r=Cq(qs(e));else if(is(t))r=Aq(t,n);else{const i=Zk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return u0(r)}function t2(e,t){const n=Bu(e);return n===t||!is(n)||Jd(n)?!1:os(n).position==="fixed"||t2(n,t)}function Oq(e,t){const n=t.get(e);if(n)return n;let r=Cm(e,[],!1).filter(c=>is(c)&&Zd(c)!=="body"),i=null;const o=os(e).position==="fixed";let l=o?Bu(e):e;for(;is(l)&&!Jd(l);){const c=os(l),p=JS(l);!p&&c.position==="fixed"&&(i=null),(o?!p&&!i:!p&&c.position==="static"&&!!i&&Nq.has(i.position)||wm(l)&&!p&&t2(e,l))?r=r.filter(m=>m!==l):i=c,l=Bu(l)}return t.set(e,r),r}function Dq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?f0(t)?[]:Oq(t,this._c):[].concat(n),r],c=l[0],p=l.reduce((d,m)=>{const b=e2(t,m,i);return d.top=zo(b.top,d.top),d.right=qu(b.right,d.right),d.bottom=qu(b.bottom,d.bottom),d.left=zo(b.left,d.left),d},e2(t,c,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function kq(e){const{width:t,height:n}=Xk(e);return{width:t,height:n}}function Rq(e,t,n){const r=Bs(t),i=qs(t),o=n==="fixed",l=Cf(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const p=Vs(0);function d(){p.x=rT(i)}if(r||!r&&!o)if((Zd(t)!=="body"||wm(i))&&(c=d0(t)),r){const y=Cf(t,!0,o,t);p.x=y.x+t.clientLeft,p.y=y.y+t.clientTop}else i&&d();o&&!r&&i&&d();const m=i&&!r&&!o?Jk(i,c):Vs(0),b=l.left+c.scrollLeft-p.x-m.x,E=l.top+c.scrollTop-p.y-m.y;return{x:b,y:E,width:l.width,height:l.height}}function iT(e){return os(e).position==="static"}function n2(e,t){if(!Bs(e)||os(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qs(e)===n&&(n=n.ownerDocument.body),n}function r2(e,t){const n=Ho(e);if(f0(e))return n;if(!Bs(e)){let i=Bu(e);for(;i&&!Jd(i);){if(is(i)&&!iT(i))return i;i=Bu(i)}return n}let r=n2(e,t);for(;r&&hq(r)&&iT(r);)r=n2(r,t);return r&&Jd(r)&&iT(r)&&!JS(r)?n:r||bq(e)||n}const Mq=async function(e){const t=this.getOffsetParent||r2,n=this.getDimensions,r=await n(e.floating);return{reference:Rq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lq(e){return os(e).direction==="rtl"}const Iq={convertOffsetParentRelativeRectToViewportRelativeRect:xq,getDocumentElement:qs,getClippingRect:Dq,getOffsetParent:r2,getElementRects:Mq,getClientRects:wq,getDimensions:kq,getScale:ep,isElement:is,isRTL:Lq};function i2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fq(e,t){let n=null,r;const i=qs(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),o();const d=e.getBoundingClientRect(),{left:m,top:b,width:E,height:y}=d;if(c||t(),!E||!y)return;const x=s0(b),w=s0(i.clientWidth-(m+E)),k=s0(i.clientHeight-(b+y)),N=s0(m),A={rootMargin:-x+"px "+-w+"px "+-k+"px "+-N+"px",threshold:zo(0,qu(1,p))||1};let C=!0;function M(j){const P=j[0].intersectionRatio;if(P!==p){if(!C)return l();P?l(!1,P):r=setTimeout(()=>{l(!1,1e-7)},1e3)}P===1&&!i2(d,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(M,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(M,A)}n.observe(e)}return l(!0),o}function Pq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,d=nT(e),m=i||o?[...d?Cm(d):[],...Cm(t)]:[];m.forEach(N=>{i&&N.addEventListener("scroll",n,{passive:!0}),o&&N.addEventListener("resize",n)});const b=d&&c?Fq(d,n):null;let E=-1,y=null;l&&(y=new ResizeObserver(N=>{let[D]=N;D&&D.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),d&&!p&&y.observe(d),y.observe(t));let x,w=p?Cf(e):null;p&&k();function k(){const N=Cf(e);w&&!i2(w,N)&&n(),w=N,x=requestAnimationFrame(k)}return n(),()=>{var N;m.forEach(D=>{i&&D.removeEventListener("scroll",n),o&&D.removeEventListener("resize",n)}),b?.(),(N=y)==null||N.disconnect(),y=null,p&&cancelAnimationFrame(x)}}const jq=lq,Vq=uq,Uq=oq,qq=fq,Bq=aq,o2=iq,$q=cq,zq=(e,t,n)=>{const r=new Map,i={platform:Iq,...n},o={...i.platform,_c:r};return rq(e,t,{...i,platform:o})};var Hq=typeof document<"u",Gq=function(){},p0=Hq?L.useLayoutEffect:Gq;function h0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!h0(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!h0(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function a2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function s2(e,t){const n=a2(e);return Math.round(t*n)/n}function oT(e){const t=L.useRef(e);return p0(()=>{t.current=e}),t}function Yq(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:p,open:d}=e,[m,b]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[E,y]=L.useState(r);h0(E,r)||y(r);const[x,w]=L.useState(null),[k,N]=L.useState(null),D=L.useCallback(se=>{se!==j.current&&(j.current=se,w(se))},[]),A=L.useCallback(se=>{se!==P.current&&(P.current=se,N(se))},[]),C=o||x,M=l||k,j=L.useRef(null),P=L.useRef(null),F=L.useRef(m),V=p!=null,$=oT(p),X=oT(i),J=oT(d),ee=L.useCallback(()=>{if(!j.current||!P.current)return;const se={placement:t,strategy:n,middleware:E};X.current&&(se.platform=X.current),zq(j.current,P.current,se).then(fe=>{const Z={...fe,isPositioned:J.current!==!1};Q.current&&!h0(F.current,Z)&&(F.current=Z,Yy.flushSync(()=>{b(Z)}))})},[E,t,n,X,J]);p0(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,b(se=>({...se,isPositioned:!1})))},[d]);const Q=L.useRef(!1);p0(()=>(Q.current=!0,()=>{Q.current=!1}),[]),p0(()=>{if(C&&(j.current=C),M&&(P.current=M),C&&M){if($.current)return $.current(C,M,ee);ee()}},[C,M,ee,$,V]);const B=L.useMemo(()=>({reference:j,floating:P,setReference:D,setFloating:A}),[D,A]),ne=L.useMemo(()=>({reference:C,floating:M}),[C,M]),re=L.useMemo(()=>{const se={position:n,left:0,top:0};if(!ne.floating)return se;const fe=s2(ne.floating,m.x),Z=s2(ne.floating,m.y);return c?{...se,transform:"translate("+fe+"px, "+Z+"px)",...a2(ne.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:fe,top:Z}},[n,c,ne.floating,m.x,m.y]);return L.useMemo(()=>({...m,update:ee,refs:B,elements:ne,floatingStyles:re}),[m,ee,B,ne,re])}const Wq=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?o2({element:r.current,padding:i}).fn(n):{}:r?o2({element:r,padding:i}).fn(n):{}}}},Qq=(e,t)=>({...jq(e),options:[e,t]}),Kq=(e,t)=>({...Vq(e),options:[e,t]}),Xq=(e,t)=>({...$q(e),options:[e,t]}),Zq=(e,t)=>({...Uq(e),options:[e,t]}),Jq=(e,t)=>({...qq(e),options:[e,t]}),eB=(e,t)=>({...Bq(e),options:[e,t]}),tB=(e,t)=>({...Wq(e),options:[e,t]});var nB="Arrow",l2=L.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return Y.jsx(Rr.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Y.jsx("polygon",{points:"0,0 30,0 15,10"})})});l2.displayName=nB;var rB=l2;function iB(e){const[t,n]=L.useState(void 0);return Vu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,c;if("borderBoxSize"in o){const p=o.borderBoxSize,d=Array.isArray(p)?p[0]:p;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var aT="Popper",[u2,m0]=Tf(aT),[oB,c2]=u2(aT),f2=e=>{const{__scopePopper:t,children:n}=e,[r,i]=L.useState(null);return Y.jsx(oB,{scope:t,anchor:r,onAnchorChange:i,children:n})};f2.displayName=aT;var d2="PopperAnchor",p2=L.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=c2(d2,n),l=L.useRef(null),c=li(t,l);return L.useEffect(()=>{o.onAnchorChange(r?.current||l.current)}),r?null:Y.jsx(Rr.div,{...i,ref:c})});p2.displayName=d2;var sT="PopperContent",[aB,sB]=u2(sT),h2=L.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:p=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:b="partial",hideWhenDetached:E=!1,updatePositionStrategy:y="optimized",onPlaced:x,...w}=e,k=c2(sT,n),[N,D]=L.useState(null),A=li(t,Ie=>D(Ie)),[C,M]=L.useState(null),j=iB(C),P=j?.width??0,F=j?.height??0,V=r+(o!=="center"?"-"+o:""),$=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},X=Array.isArray(d)?d:[d],J=X.length>0,ee={padding:$,boundary:X.filter(uB),altBoundary:J},{refs:Q,floatingStyles:B,placement:ne,isPositioned:re,middlewareData:se}=Yq({strategy:"fixed",placement:V,whileElementsMounted:(...Ie)=>Pq(...Ie,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[Qq({mainAxis:i+F,alignmentAxis:l}),p&&Kq({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?Xq():void 0,...ee}),p&&Zq({...ee}),Jq({...ee,apply:({elements:Ie,rects:Ge,availableWidth:Ze,availableHeight:It})=>{const{width:vt,height:at}=Ge.reference,Oe=Ie.floating.style;Oe.setProperty("--radix-popper-available-width",`${Ze}px`),Oe.setProperty("--radix-popper-available-height",`${It}px`),Oe.setProperty("--radix-popper-anchor-width",`${vt}px`),Oe.setProperty("--radix-popper-anchor-height",`${at}px`)}}),C&&tB({element:C,padding:c}),cB({arrowWidth:P,arrowHeight:F}),E&&eB({strategy:"referenceHidden",...ee})]}),[fe,Z]=v2(ne),ge=Il(x);Vu(()=>{re&&ge?.()},[re,ge]);const ae=se.arrow?.x,pe=se.arrow?.y,ce=se.arrow?.centerOffset!==0,[he,Se]=L.useState();return Vu(()=>{N&&Se(window.getComputedStyle(N).zIndex)},[N]),Y.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:re?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(" "),...se.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Y.jsx(aB,{scope:n,placedSide:fe,onArrowChange:M,arrowX:ae,arrowY:pe,shouldHideArrow:ce,children:Y.jsx(Rr.div,{"data-side":fe,"data-align":Z,...w,ref:A,style:{...w.style,animation:re?void 0:"none"}})})})});h2.displayName=sT;var m2="PopperArrow",lB={top:"bottom",right:"left",bottom:"top",left:"right"},g2=L.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=sB(m2,r),l=lB[o.placedSide];return Y.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Y.jsx(rB,{...i,ref:n,style:{...i.style,display:"block"}})})});g2.displayName=m2;function uB(e){return e!==null}var cB=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,p=l?0:e.arrowHeight,[d,m]=v2(n),b={start:"0%",center:"50%",end:"100%"}[m],E=(i.arrow?.x??0)+c/2,y=(i.arrow?.y??0)+p/2;let x="",w="";return d==="bottom"?(x=l?b:`${E}px`,w=`${-p}px`):d==="top"?(x=l?b:`${E}px`,w=`${r.floating.height+p}px`):d==="right"?(x=`${-p}px`,w=l?b:`${y}px`):d==="left"&&(x=`${r.floating.width+p}px`,w=l?b:`${y}px`),{data:{x,y:w}}}});function v2(e){const[t,n="center"]=e.split("-");return[t,n]}var y2=f2,b2=p2,E2=h2,S2=g2,lT="rovingFocusGroup.onEntryFocus",fB={bubbles:!1,cancelable:!0},_m="RovingFocusGroup",[uT,T2,dB]=Vk(_m),[pB,x2]=Tf(_m,[dB]),[hB,mB]=pB(_m),w2=L.forwardRef((e,t)=>Y.jsx(uT.Provider,{scope:e.__scopeRovingFocusGroup,children:Y.jsx(uT.Slot,{scope:e.__scopeRovingFocusGroup,children:Y.jsx(gB,{...e,ref:t})})}));w2.displayName=_m;var gB=L.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:p,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...b}=e,E=L.useRef(null),y=li(t,E),x=Uk(o),[w,k]=Gy({prop:l,defaultProp:c??null,onChange:p,caller:_m}),[N,D]=L.useState(!1),A=Il(d),C=T2(n),M=L.useRef(!1),[j,P]=L.useState(0);return L.useEffect(()=>{const F=E.current;if(F)return F.addEventListener(lT,A),()=>F.removeEventListener(lT,A)},[A]),Y.jsx(hB,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:w,onItemFocus:L.useCallback(F=>k(F),[k]),onItemShiftTab:L.useCallback(()=>D(!0),[]),onFocusableItemAdd:L.useCallback(()=>P(F=>F+1),[]),onFocusableItemRemove:L.useCallback(()=>P(F=>F-1),[]),children:Y.jsx(Rr.div,{tabIndex:N||j===0?-1:0,"data-orientation":r,...b,ref:y,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{M.current=!0}),onFocus:$t(e.onFocus,F=>{const V=!M.current;if(F.target===F.currentTarget&&V&&!N){const $=new CustomEvent(lT,fB);if(F.currentTarget.dispatchEvent($),!$.defaultPrevented){const X=C().filter(ne=>ne.focusable),J=X.find(ne=>ne.active),ee=X.find(ne=>ne.id===w),B=[J,ee,...X].filter(Boolean).map(ne=>ne.ref.current);N2(B,m)}}M.current=!1}),onBlur:$t(e.onBlur,()=>D(!1))})})}),C2="RovingFocusGroupItem",_2=L.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...c}=e,p=xf(),d=o||p,m=mB(C2,n),b=m.currentTabStopId===d,E=T2(n),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:w}=m;return L.useEffect(()=>{if(r)return y(),()=>x()},[r,y,x]),Y.jsx(uT.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:Y.jsx(Rr.span,{tabIndex:b?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:$t(e.onMouseDown,k=>{r?m.onItemFocus(d):k.preventDefault()}),onFocus:$t(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:$t(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){m.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const N=bB(k,m.orientation,m.dir);if(N!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let A=E().filter(C=>C.focusable).map(C=>C.ref.current);if(N==="last")A.reverse();else if(N==="prev"||N==="next"){N==="prev"&&A.reverse();const C=A.indexOf(k.currentTarget);A=m.loop?EB(A,C+1):A.slice(C+1)}setTimeout(()=>N2(A))}}),children:typeof l=="function"?l({isCurrentTabStop:b,hasTabStop:w!=null}):l})})});_2.displayName=C2;var vB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bB(e,t,n){const r=yB(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vB[r]}function N2(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function EB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SB=w2,TB=_2,cT=["Enter"," "],xB=["ArrowDown","PageUp","Home"],A2=["ArrowUp","PageDown","End"],wB=[...xB,...A2],CB={ltr:[...cT,"ArrowRight"],rtl:[...cT,"ArrowLeft"]},_B={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Nm="Menu",[Am,NB,AB]=Vk(Nm),[_f,O2]=Tf(Nm,[AB,m0,x2]),g0=m0(),D2=x2(),[OB,Nf]=_f(Nm),[DB,Om]=_f(Nm),k2=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:l=!0}=e,c=g0(t),[p,d]=L.useState(null),m=L.useRef(!1),b=Il(o),E=Uk(i);return L.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),Y.jsx(y2,{...c,children:Y.jsx(OB,{scope:t,open:n,onOpenChange:b,content:p,onContentChange:d,children:Y.jsx(DB,{scope:t,onClose:L.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:m,dir:E,modal:l,children:r})})})};k2.displayName=Nm;var kB="MenuAnchor",fT=L.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=g0(n);return Y.jsx(b2,{...i,...r,ref:t})});fT.displayName=kB;var dT="MenuPortal",[RB,R2]=_f(dT,{forceMount:void 0}),M2=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Nf(dT,t);return Y.jsx(RB,{scope:t,forceMount:n,children:Y.jsx(js,{present:n||o.open,children:Y.jsx(Qy,{asChild:!0,container:i,children:r})})})};M2.displayName=dT;var Ta="MenuContent",[MB,pT]=_f(Ta),L2=L.forwardRef((e,t)=>{const n=R2(Ta,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Nf(Ta,e.__scopeMenu),l=Om(Ta,e.__scopeMenu);return Y.jsx(Am.Provider,{scope:e.__scopeMenu,children:Y.jsx(js,{present:r||o.open,children:Y.jsx(Am.Slot,{scope:e.__scopeMenu,children:l.modal?Y.jsx(LB,{...i,ref:t}):Y.jsx(IB,{...i,ref:t})})})})}),LB=L.forwardRef((e,t)=>{const n=Nf(Ta,e.__scopeMenu),r=L.useRef(null),i=li(t,r);return L.useEffect(()=>{const o=r.current;if(o)return Ek(o)},[]),Y.jsx(hT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$t(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IB=L.forwardRef((e,t)=>{const n=Nf(Ta,e.__scopeMenu);return Y.jsx(hT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),FB=Tm("MenuContent.ScrollLock"),hT=L.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:p,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:b,onInteractOutside:E,onDismiss:y,disableOutsideScroll:x,...w}=e,k=Nf(Ta,n),N=Om(Ta,n),D=g0(n),A=D2(n),C=NB(n),[M,j]=L.useState(null),P=L.useRef(null),F=li(t,P,k.onContentChange),V=L.useRef(0),$=L.useRef(""),X=L.useRef(0),J=L.useRef(null),ee=L.useRef("right"),Q=L.useRef(0),B=x?$S:L.Fragment,ne=x?{as:FB,allowPinchZoom:!0}:void 0,re=fe=>{const Z=$.current+fe,ge=C().filter(Ie=>!Ie.disabled),ae=document.activeElement,pe=ge.find(Ie=>Ie.ref.current===ae)?.textValue,ce=ge.map(Ie=>Ie.textValue),he=WB(ce,Z,pe),Se=ge.find(Ie=>Ie.textValue===he)?.ref.current;(function Ie(Ge){$.current=Ge,window.clearTimeout(V.current),Ge!==""&&(V.current=window.setTimeout(()=>Ie(""),1e3))})(Z),Se&&setTimeout(()=>Se.focus())};L.useEffect(()=>()=>window.clearTimeout(V.current),[]),ok();const se=L.useCallback(fe=>ee.current===J.current?.side&&KB(fe,J.current?.area),[]);return Y.jsx(MB,{scope:n,searchRef:$,onItemEnter:L.useCallback(fe=>{se(fe)&&fe.preventDefault()},[se]),onItemLeave:L.useCallback(fe=>{se(fe)||(P.current?.focus(),j(null))},[se]),onTriggerLeave:L.useCallback(fe=>{se(fe)&&fe.preventDefault()},[se]),pointerGraceTimerRef:X,onPointerGraceIntentChange:L.useCallback(fe=>{J.current=fe},[]),children:Y.jsx(B,{...ne,children:Y.jsx(FS,{asChild:!0,trapped:i,onMountAutoFocus:$t(o,fe=>{fe.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:Y.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:b,onInteractOutside:E,onDismiss:y,children:Y.jsx(SB,{asChild:!0,...A,dir:N.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:j,onEntryFocus:$t(p,fe=>{N.isUsingKeyboardRef.current||fe.preventDefault()}),preventScrollOnEntryFocus:!0,children:Y.jsx(E2,{role:"menu","aria-orientation":"vertical","data-state":X2(k.open),"data-radix-menu-content":"",dir:N.dir,...D,...w,ref:F,style:{outline:"none",...w.style},onKeyDown:$t(w.onKeyDown,fe=>{const ge=fe.target.closest("[data-radix-menu-content]")===fe.currentTarget,ae=fe.ctrlKey||fe.altKey||fe.metaKey,pe=fe.key.length===1;ge&&(fe.key==="Tab"&&fe.preventDefault(),!ae&&pe&&re(fe.key));const ce=P.current;if(fe.target!==ce||!wB.includes(fe.key))return;fe.preventDefault();const Se=C().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);A2.includes(fe.key)&&Se.reverse(),GB(Se)}),onBlur:$t(e.onBlur,fe=>{fe.currentTarget.contains(fe.target)||(window.clearTimeout(V.current),$.current="")}),onPointerMove:$t(e.onPointerMove,km(fe=>{const Z=fe.target,ge=Q.current!==fe.clientX;if(fe.currentTarget.contains(Z)&&ge){const ae=fe.clientX>Q.current?"right":"left";ee.current=ae,Q.current=fe.clientX}}))})})})})})})});L2.displayName=Ta;var PB="MenuGroup",mT=L.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return Y.jsx(Rr.div,{role:"group",...r,ref:t})});mT.displayName=PB;var jB="MenuLabel",I2=L.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return Y.jsx(Rr.div,{...r,ref:t})});I2.displayName=jB;var v0="MenuItem",F2="menu.itemSelect",y0=L.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=L.useRef(null),l=Om(v0,e.__scopeMenu),c=pT(v0,e.__scopeMenu),p=li(t,o),d=L.useRef(!1),m=()=>{const b=o.current;if(!n&&b){const E=new CustomEvent(F2,{bubbles:!0,cancelable:!0});b.addEventListener(F2,y=>r?.(y),{once:!0}),QD(b,E),E.defaultPrevented?d.current=!1:l.onClose()}};return Y.jsx(P2,{...i,ref:p,disabled:n,onClick:$t(e.onClick,m),onPointerDown:b=>{e.onPointerDown?.(b),d.current=!0},onPointerUp:$t(e.onPointerUp,b=>{d.current||b.currentTarget?.click()}),onKeyDown:$t(e.onKeyDown,b=>{const E=c.searchRef.current!=="";n||E&&b.key===" "||cT.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});y0.displayName=v0;var P2=L.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,l=pT(v0,n),c=D2(n),p=L.useRef(null),d=li(t,p),[m,b]=L.useState(!1),[E,y]=L.useState("");return L.useEffect(()=>{const x=p.current;x&&y((x.textContent??"").trim())},[o.children]),Y.jsx(Am.ItemSlot,{scope:n,disabled:r,textValue:i??E,children:Y.jsx(TB,{asChild:!0,...c,focusable:!r,children:Y.jsx(Rr.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:$t(e.onPointerMove,km(x=>{r?l.onItemLeave(x):(l.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$t(e.onPointerLeave,km(x=>l.onItemLeave(x))),onFocus:$t(e.onFocus,()=>b(!0)),onBlur:$t(e.onBlur,()=>b(!1))})})})}),VB="MenuCheckboxItem",j2=L.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return Y.jsx($2,{scope:e.__scopeMenu,checked:n,children:Y.jsx(y0,{role:"menuitemcheckbox","aria-checked":b0(n)?"mixed":n,...i,ref:t,"data-state":vT(n),onSelect:$t(i.onSelect,()=>r?.(b0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});j2.displayName=VB;var V2="MenuRadioGroup",[UB,qB]=_f(V2,{value:void 0,onValueChange:()=>{}}),U2=L.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Il(r);return Y.jsx(UB,{scope:e.__scopeMenu,value:n,onValueChange:o,children:Y.jsx(mT,{...i,ref:t})})});U2.displayName=V2;var q2="MenuRadioItem",B2=L.forwardRef((e,t)=>{const{value:n,...r}=e,i=qB(q2,e.__scopeMenu),o=n===i.value;return Y.jsx($2,{scope:e.__scopeMenu,checked:o,children:Y.jsx(y0,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":vT(o),onSelect:$t(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});B2.displayName=q2;var gT="MenuItemIndicator",[$2,BB]=_f(gT,{checked:!1}),z2=L.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=BB(gT,n);return Y.jsx(js,{present:r||b0(o.checked)||o.checked===!0,children:Y.jsx(Rr.span,{...i,ref:t,"data-state":vT(o.checked)})})});z2.displayName=gT;var $B="MenuSeparator",H2=L.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return Y.jsx(Rr.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});H2.displayName=$B;var zB="MenuArrow",G2=L.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=g0(n);return Y.jsx(S2,{...i,...r,ref:t})});G2.displayName=zB;var HB="MenuSub",[foe,Y2]=_f(HB),Dm="MenuSubTrigger",W2=L.forwardRef((e,t)=>{const n=Nf(Dm,e.__scopeMenu),r=Om(Dm,e.__scopeMenu),i=Y2(Dm,e.__scopeMenu),o=pT(Dm,e.__scopeMenu),l=L.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:p}=o,d={__scopeMenu:e.__scopeMenu},m=L.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return L.useEffect(()=>m,[m]),L.useEffect(()=>{const b=c.current;return()=>{window.clearTimeout(b),p(null)}},[c,p]),Y.jsx(fT,{asChild:!0,...d,children:Y.jsx(P2,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":X2(n.open),...e,ref:Hy(t,i.onTriggerChange),onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$t(e.onPointerMove,km(b=>{o.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:$t(e.onPointerLeave,km(b=>{m();const E=n.content?.getBoundingClientRect();if(E){const y=n.content?.dataset.side,x=y==="right",w=x?-5:5,k=E[x?"left":"right"],N=E[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:b.clientX+w,y:b.clientY},{x:k,y:E.top},{x:N,y:E.top},{x:N,y:E.bottom},{x:k,y:E.bottom}],side:y}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(b),b.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:$t(e.onKeyDown,b=>{const E=o.searchRef.current!=="";e.disabled||E&&b.key===" "||CB[r.dir].includes(b.key)&&(n.onOpenChange(!0),n.content?.focus(),b.preventDefault())})})})});W2.displayName=Dm;var Q2="MenuSubContent",K2=L.forwardRef((e,t)=>{const n=R2(Ta,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Nf(Ta,e.__scopeMenu),l=Om(Ta,e.__scopeMenu),c=Y2(Q2,e.__scopeMenu),p=L.useRef(null),d=li(t,p);return Y.jsx(Am.Provider,{scope:e.__scopeMenu,children:Y.jsx(js,{present:r||o.open,children:Y.jsx(Am.Slot,{scope:e.__scopeMenu,children:Y.jsx(hT,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.isUsingKeyboardRef.current&&p.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:$t(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:$t(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:$t(e.onKeyDown,m=>{const b=m.currentTarget.contains(m.target),E=_B[l.dir].includes(m.key);b&&E&&(o.onOpenChange(!1),c.trigger?.focus(),m.preventDefault())})})})})})});K2.displayName=Q2;function X2(e){return e?"open":"closed"}function b0(e){return e==="indeterminate"}function vT(e){return b0(e)?"indeterminate":e?"checked":"unchecked"}function GB(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function YB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function WB(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=YB(e,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==n));const p=l.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function QB(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],p=t[l],d=c.x,m=c.y,b=p.x,E=p.y;m>r!=E>r&&n<(b-d)*(r-m)/(E-m)+d&&(i=!i)}return i}function KB(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return QB(n,t)}function km(e){return t=>t.pointerType==="mouse"?e(t):void 0}var XB=k2,ZB=fT,JB=M2,e$=L2,t$=mT,n$=I2,r$=y0,i$=j2,o$=U2,a$=B2,s$=z2,l$=H2,u$=G2,c$=W2,f$=K2,E0="DropdownMenu",[d$,doe]=Tf(E0,[O2]),lo=O2(),[p$,Z2]=d$(E0),J2=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,p=lo(t),d=L.useRef(null),[m,b]=Gy({prop:i,defaultProp:o??!1,onChange:l,caller:E0});return Y.jsx(p$,{scope:t,triggerId:xf(),triggerRef:d,contentId:xf(),open:m,onOpenChange:b,onOpenToggle:L.useCallback(()=>b(E=>!E),[b]),modal:c,children:Y.jsx(XB,{...p,open:m,onOpenChange:b,dir:r,modal:c,children:n})})};J2.displayName=E0;var eR="DropdownMenuTrigger",tR=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Z2(eR,n),l=lo(n);return Y.jsx(ZB,{asChild:!0,...l,children:Y.jsx(Rr.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Hy(t,o.triggerRef),onPointerDown:$t(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:$t(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});tR.displayName=eR;var h$="DropdownMenuPortal",nR=e=>{const{__scopeDropdownMenu:t,...n}=e,r=lo(t);return Y.jsx(JB,{...r,...n})};nR.displayName=h$;var rR="DropdownMenuContent",iR=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Z2(rR,n),o=lo(n),l=L.useRef(!1);return Y.jsx(e$,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:$t(e.onCloseAutoFocus,c=>{l.current||i.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:$t(e.onInteractOutside,c=>{const p=c.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,m=p.button===2||d;(!i.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iR.displayName=rR;var m$="DropdownMenuGroup",g$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(t$,{...i,...r,ref:t})});g$.displayName=m$;var v$="DropdownMenuLabel",y$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(n$,{...i,...r,ref:t})});y$.displayName=v$;var b$="DropdownMenuItem",oR=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(r$,{...i,...r,ref:t})});oR.displayName=b$;var E$="DropdownMenuCheckboxItem",S$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(i$,{...i,...r,ref:t})});S$.displayName=E$;var T$="DropdownMenuRadioGroup",x$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(o$,{...i,...r,ref:t})});x$.displayName=T$;var w$="DropdownMenuRadioItem",C$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(a$,{...i,...r,ref:t})});C$.displayName=w$;var _$="DropdownMenuItemIndicator",N$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(s$,{...i,...r,ref:t})});N$.displayName=_$;var A$="DropdownMenuSeparator",O$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(l$,{...i,...r,ref:t})});O$.displayName=A$;var D$="DropdownMenuArrow",k$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(u$,{...i,...r,ref:t})});k$.displayName=D$;var R$="DropdownMenuSubTrigger",M$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(c$,{...i,...r,ref:t})});M$.displayName=R$;var L$="DropdownMenuSubContent",I$=L.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lo(n);return Y.jsx(f$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});I$.displayName=L$;var F$=J2,P$=tR,j$=nR,V$=iR,U$=oR,yT={};const q$={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""};var bT,aR;function sR(){return aR||(aR=1,bT=q$),bT}var ET,lR;function ST(){return lR||(lR=1,ET=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/),ET}var tp={},TT,uR;function B$(){if(uR)return TT;uR=1;var e={};function t(r){var i,o,l=e[r];if(l)return l;for(l=e[r]=[],i=0;i<128;i++)o=String.fromCharCode(i),/^[0-9a-z]$/i.test(o)?l.push(o):l.push("%"+("0"+i.toString(16).toUpperCase()).slice(-2));for(i=0;i<r.length;i++)l[r.charCodeAt(i)]=r[i];return l}function n(r,i,o){var l,c,p,d,m,b="";for(typeof i!="string"&&(o=i,i=n.defaultChars),typeof o>"u"&&(o=!0),m=t(i),l=0,c=r.length;l<c;l++){if(p=r.charCodeAt(l),o&&p===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(r.slice(l+1,l+3))){b+=r.slice(l,l+3),l+=2;continue}if(p<128){b+=m[p];continue}if(p>=55296&&p<=57343){if(p>=55296&&p<=56319&&l+1<c&&(d=r.charCodeAt(l+1),d>=56320&&d<=57343)){b+=encodeURIComponent(r[l]+r[l+1]),l++;continue}b+="%EF%BF%BD";continue}b+=encodeURIComponent(r[l])}return b}return n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",TT=n,TT}var xT,cR;function $$(){if(cR)return xT;cR=1;var e={};function t(r){var i,o,l=e[r];if(l)return l;for(l=e[r]=[],i=0;i<128;i++)o=String.fromCharCode(i),l.push(o);for(i=0;i<r.length;i++)o=r.charCodeAt(i),l[o]="%"+("0"+o.toString(16).toUpperCase()).slice(-2);return l}function n(r,i){var o;return typeof i!="string"&&(i=n.defaultChars),o=t(i),r.replace(/(%[a-f0-9]{2})+/gi,function(l){var c,p,d,m,b,E,y,x="";for(c=0,p=l.length;c<p;c+=3){if(d=parseInt(l.slice(c+1,c+3),16),d<128){x+=o[d];continue}if((d&224)===192&&c+3<p&&(m=parseInt(l.slice(c+4,c+6),16),(m&192)===128)){y=d<<6&1984|m&63,y<128?x+="��":x+=String.fromCharCode(y),c+=3;continue}if((d&240)===224&&c+6<p&&(m=parseInt(l.slice(c+4,c+6),16),b=parseInt(l.slice(c+7,c+9),16),(m&192)===128&&(b&192)===128)){y=d<<12&61440|m<<6&4032|b&63,y<2048||y>=55296&&y<=57343?x+="���":x+=String.fromCharCode(y),c+=6;continue}if((d&248)===240&&c+9<p&&(m=parseInt(l.slice(c+4,c+6),16),b=parseInt(l.slice(c+7,c+9),16),E=parseInt(l.slice(c+10,c+12),16),(m&192)===128&&(b&192)===128&&(E&192)===128)){y=d<<18&1835008|m<<12&258048|b<<6&4032|E&63,y<65536||y>1114111?x+="����":(y-=65536,x+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),c+=9;continue}x+="�"}return x})}return n.defaultChars=";/?:@&=+$,#",n.componentChars="",xT=n,xT}var wT,fR;function z$(){return fR||(fR=1,wT=function(t){var n="";return n+=t.protocol||"",n+=t.slashes?"//":"",n+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?n+="["+t.hostname+"]":n+=t.hostname||"",n+=t.port?":"+t.port:"",n+=t.pathname||"",n+=t.search||"",n+=t.hash||"",n}),wT}var CT,dR;function H$(){if(dR)return CT;dR=1;function e(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
`," "],o=["{","}","|","\\","^","`"].concat(i),l=["'"].concat(o),c=["%","/","?",";","#"].concat(l),p=["/","?","#"],d=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function x(w,k){if(w&&w instanceof e)return w;var N=new e;return N.parse(w,k),N}return e.prototype.parse=function(w,k){var N,D,A,C,M,j=w;if(j=j.trim(),!k&&w.split("#").length===1){var P=r.exec(j);if(P)return this.pathname=P[1],P[2]&&(this.search=P[2]),this}var F=t.exec(j);if(F&&(F=F[0],A=F.toLowerCase(),this.protocol=F,j=j.substr(F.length)),(k||F||j.match(/^\/\/[^@\/]+@[^@\/]+/))&&(M=j.substr(0,2)==="//",M&&!(F&&E[F])&&(j=j.substr(2),this.slashes=!0)),!E[F]&&(M||F&&!y[F])){var V=-1;for(N=0;N<p.length;N++)C=j.indexOf(p[N]),C!==-1&&(V===-1||C<V)&&(V=C);var $,X;for(V===-1?X=j.lastIndexOf("@"):X=j.lastIndexOf("@",V),X!==-1&&($=j.slice(0,X),j=j.slice(X+1),this.auth=$),V=-1,N=0;N<c.length;N++)C=j.indexOf(c[N]),C!==-1&&(V===-1||C<V)&&(V=C);V===-1&&(V=j.length),j[V-1]===":"&&V--;var J=j.slice(0,V);j=j.slice(V),this.parseHost(J),this.hostname=this.hostname||"";var ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ee){var Q=this.hostname.split(/\./);for(N=0,D=Q.length;N<D;N++){var B=Q[N];if(B&&!B.match(m)){for(var ne="",re=0,se=B.length;re<se;re++)B.charCodeAt(re)>127?ne+="x":ne+=B[re];if(!ne.match(m)){var fe=Q.slice(0,N),Z=Q.slice(N+1),ge=B.match(b);ge&&(fe.push(ge[1]),Z.unshift(ge[2])),Z.length&&(j=Z.join(".")+j),this.hostname=fe.join(".");break}}}}this.hostname.length>d&&(this.hostname=""),ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var ae=j.indexOf("#");ae!==-1&&(this.hash=j.substr(ae),j=j.slice(0,ae));var pe=j.indexOf("?");return pe!==-1&&(this.search=j.substr(pe),j=j.slice(0,pe)),j&&(this.pathname=j),y[A]&&this.hostname&&!this.pathname&&(this.pathname=""),this},e.prototype.parseHost=function(w){var k=n.exec(w);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),w=w.substr(0,w.length-k.length)),w&&(this.hostname=w)},CT=x,CT}var pR;function hR(){return pR||(pR=1,tp.encode=B$(),tp.decode=$$(),tp.format=z$(),tp.parse=H$()),tp}var Af={},_T,mR;function gR(){return mR||(mR=1,_T=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),_T}var NT,vR;function yR(){return vR||(vR=1,NT=/[\0-\x1F\x7F-\x9F]/),NT}var AT,bR;function G$(){return bR||(bR=1,AT=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),AT}var OT,ER;function SR(){return ER||(ER=1,OT=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),OT}var TR;function Y$(){return TR||(TR=1,Af.Any=gR(),Af.Cc=yR(),Af.Cf=G$(),Af.P=ST(),Af.Z=SR()),Af}var xR;function In(){return xR||(xR=1,function(e){function t(Q){return Object.prototype.toString.call(Q)}function n(Q){return t(Q)==="[object String]"}var r=Object.prototype.hasOwnProperty;function i(Q,B){return r.call(Q,B)}function o(Q){var B=Array.prototype.slice.call(arguments,1);return B.forEach(function(ne){if(ne){if(typeof ne!="object")throw new TypeError(ne+"must be object");Object.keys(ne).forEach(function(re){Q[re]=ne[re]})}}),Q}function l(Q,B,ne){return[].concat(Q.slice(0,B),ne,Q.slice(B+1))}function c(Q){return!(Q>=55296&&Q<=57343||Q>=64976&&Q<=65007||(Q&65535)===65535||(Q&65535)===65534||Q>=0&&Q<=8||Q===11||Q>=14&&Q<=31||Q>=127&&Q<=159||Q>1114111)}function p(Q){if(Q>65535){Q-=65536;var B=55296+(Q>>10),ne=56320+(Q&1023);return String.fromCharCode(B,ne)}return String.fromCharCode(Q)}var d=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,m=/&([a-z#][a-z0-9]{1,31});/gi,b=new RegExp(d.source+"|"+m.source,"gi"),E=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,y=sR();function x(Q,B){var ne=0;return i(y,B)?y[B]:B.charCodeAt(0)===35&&E.test(B)&&(ne=B[1].toLowerCase()==="x"?parseInt(B.slice(2),16):parseInt(B.slice(1),10),c(ne))?p(ne):Q}function w(Q){return Q.indexOf("\\")<0?Q:Q.replace(d,"$1")}function k(Q){return Q.indexOf("\\")<0&&Q.indexOf("&")<0?Q:Q.replace(b,function(B,ne,re){return ne||x(B,re)})}var N=/[&<>"]/,D=/[&<>"]/g,A={"&":"&","<":"<",">":">",'"':"""};function C(Q){return A[Q]}function M(Q){return N.test(Q)?Q.replace(D,C):Q}var j=/[.?*+^$[\]\\(){}|-]/g;function P(Q){return Q.replace(j,"\\$&")}function F(Q){switch(Q){case 9:case 32:return!0}return!1}function V(Q){if(Q>=8192&&Q<=8202)return!0;switch(Q){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var $=ST();function X(Q){return $.test(Q)}function J(Q){switch(Q){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ee(Q){return Q=Q.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(Q=Q.replace(/ẞ/g,"ß")),Q.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=hR(),e.lib.ucmicro=Y$(),e.assign=o,e.isString=n,e.has=i,e.unescapeMd=w,e.unescapeAll=k,e.isValidEntityCode=c,e.fromCodePoint=p,e.escapeHtml=M,e.arrayReplaceAt=l,e.isSpace=F,e.isWhiteSpace=V,e.isMdAsciiPunct=J,e.isPunctChar=X,e.escapeRE=P,e.normalizeReference=ee}(yT)),yT}var Rm={},DT,wR;function W$(){return wR||(wR=1,DT=function(t,n,r){var i,o,l,c,p=-1,d=t.posMax,m=t.pos;for(t.pos=n+1,i=1;t.pos<d;){if(l=t.src.charCodeAt(t.pos),l===93&&(i--,i===0)){o=!0;break}if(c=t.pos,t.md.inline.skipToken(t),l===91){if(c===t.pos-1)i++;else if(r)return t.pos=m,-1}}return o&&(p=t.pos),t.pos=m,p}),DT}var kT,CR;function Q$(){if(CR)return kT;CR=1;var e=In().unescapeAll;return kT=function(n,r,i){var o,l,c=0,p=r,d={ok:!1,pos:0,lines:0,str:""};if(n.charCodeAt(r)===60){for(r++;r<i;){if(o=n.charCodeAt(r),o===10||o===60)return d;if(o===62)return d.pos=r+1,d.str=e(n.slice(p+1,r)),d.ok=!0,d;if(o===92&&r+1<i){r+=2;continue}r++}return d}for(l=0;r<i&&(o=n.charCodeAt(r),!(o===32||o<32||o===127));){if(o===92&&r+1<i){if(n.charCodeAt(r+1)===32)break;r+=2;continue}if(o===40&&(l++,l>32))return d;if(o===41){if(l===0)break;l--}r++}return p===r||l!==0||(d.str=e(n.slice(p,r)),d.lines=c,d.pos=r,d.ok=!0),d},kT}var RT,_R;function K$(){if(_R)return RT;_R=1;var e=In().unescapeAll;return RT=function(n,r,i){var o,l,c=0,p=r,d={ok:!1,pos:0,lines:0,str:""};if(r>=i||(l=n.charCodeAt(r),l!==34&&l!==39&&l!==40))return d;for(r++,l===40&&(l=41);r<i;){if(o=n.charCodeAt(r),o===l)return d.pos=r+1,d.lines=c,d.str=e(n.slice(p+1,r)),d.ok=!0,d;if(o===40&&l===41)return d;o===10?c++:o===92&&r+1<i&&(r++,n.charCodeAt(r)===10&&c++),r++}return d},RT}var NR;function X$(){return NR||(NR=1,Rm.parseLinkLabel=W$(),Rm.parseLinkDestination=Q$(),Rm.parseLinkTitle=K$()),Rm}var MT,AR;function Z$(){if(AR)return MT;AR=1;var e=In().assign,t=In().unescapeAll,n=In().escapeHtml,r={};r.code_inline=function(o,l,c,p,d){var m=o[l];return"<code"+d.renderAttrs(m)+">"+n(o[l].content)+"</code>"},r.code_block=function(o,l,c,p,d){var m=o[l];return"<pre"+d.renderAttrs(m)+"><code>"+n(o[l].content)+`</code></pre>
`},r.fence=function(o,l,c,p,d){var m=o[l],b=m.info?t(m.info).trim():"",E="",y="",x,w,k,N,D;return b&&(k=b.split(/(\s+)/g),E=k[0],y=k.slice(2).join("")),c.highlight?x=c.highlight(m.content,E,y)||n(m.content):x=n(m.content),x.indexOf("<pre")===0?x+`
`:b?(w=m.attrIndex("class"),N=m.attrs?m.attrs.slice():[],w<0?N.push(["class",c.langPrefix+E]):(N[w]=N[w].slice(),N[w][1]+=" "+c.langPrefix+E),D={attrs:N},"<pre><code"+d.renderAttrs(D)+">"+x+`</code></pre>
`):"<pre><code"+d.renderAttrs(m)+">"+x+`</code></pre>
`},r.image=function(o,l,c,p,d){var m=o[l];return m.attrs[m.attrIndex("alt")][1]=d.renderInlineAsText(m.children,c,p),d.renderToken(o,l,c)},r.hardbreak=function(o,l,c){return c.xhtmlOut?`<br />
`:`<br>
`},r.softbreak=function(o,l,c){return c.breaks?c.xhtmlOut?`<br />
`:`<br>
`:`
`},r.text=function(o,l){return n(o[l].content)},r.html_block=function(o,l){return o[l].content},r.html_inline=function(o,l){return o[l].content};function i(){this.rules=e({},r)}return i.prototype.renderAttrs=function(l){var c,p,d;if(!l.attrs)return"";for(d="",c=0,p=l.attrs.length;c<p;c++)d+=" "+n(l.attrs[c][0])+'="'+n(l.attrs[c][1])+'"';return d},i.prototype.renderToken=function(l,c,p){var d,m="",b=!1,E=l[c];return E.hidden?"":(E.block&&E.nesting!==-1&&c&&l[c-1].hidden&&(m+=`
`),m+=(E.nesting===-1?"</":"<")+E.tag,m+=this.renderAttrs(E),E.nesting===0&&p.xhtmlOut&&(m+=" /"),E.block&&(b=!0,E.nesting===1&&c+1<l.length&&(d=l[c+1],(d.type==="inline"||d.hidden||d.nesting===-1&&d.tag===E.tag)&&(b=!1))),m+=b?`>
`:">",m)},i.prototype.renderInline=function(o,l,c){for(var p,d="",m=this.rules,b=0,E=o.length;b<E;b++)p=o[b].type,typeof m[p]<"u"?d+=m[p](o,b,l,c,this):d+=this.renderToken(o,b,l);return d},i.prototype.renderInlineAsText=function(o,l,c){for(var p="",d=0,m=o.length;d<m;d++)o[d].type==="text"?p+=o[d].content:o[d].type==="image"?p+=this.renderInlineAsText(o[d].children,l,c):o[d].type==="softbreak"&&(p+=`
`);return p},i.prototype.render=function(o,l,c){var p,d,m,b="",E=this.rules;for(p=0,d=o.length;p<d;p++)m=o[p].type,m==="inline"?b+=this.renderInline(o[p].children,l,c):typeof E[m]<"u"?b+=E[o[p].type](o,p,l,c,this):b+=this.renderToken(o,p,l,c);return b},MT=i,MT}var LT,OR;function IT(){if(OR)return LT;OR=1;function e(){this.__rules__=[],this.__cache__=null}return e.prototype.__find__=function(t){for(var n=0;n<this.__rules__.length;n++)if(this.__rules__[n].name===t)return n;return-1},e.prototype.__compile__=function(){var t=this,n=[""];t.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(i){n.indexOf(i)<0&&n.push(i)})}),t.__cache__={},n.forEach(function(r){t.__cache__[r]=[],t.__rules__.forEach(function(i){i.enabled&&(r&&i.alt.indexOf(r)<0||t.__cache__[r].push(i.fn))})})},e.prototype.at=function(t,n,r){var i=this.__find__(t),o=r||{};if(i===-1)throw new Error("Parser rule not found: "+t);this.__rules__[i].fn=n,this.__rules__[i].alt=o.alt||[],this.__cache__=null},e.prototype.before=function(t,n,r,i){var o=this.__find__(t),l=i||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:n,enabled:!0,fn:r,alt:l.alt||[]}),this.__cache__=null},e.prototype.after=function(t,n,r,i){var o=this.__find__(t),l=i||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:n,enabled:!0,fn:r,alt:l.alt||[]}),this.__cache__=null},e.prototype.push=function(t,n,r){var i=r||{};this.__rules__.push({name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},e.prototype.enable=function(t,n){Array.isArray(t)||(t=[t]);var r=[];return t.forEach(function(i){var o=this.__find__(i);if(o<0){if(n)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!0,r.push(i)},this),this.__cache__=null,r},e.prototype.enableOnly=function(t,n){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(t,n)},e.prototype.disable=function(t,n){Array.isArray(t)||(t=[t]);var r=[];return t.forEach(function(i){var o=this.__find__(i);if(o<0){if(n)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!1,r.push(i)},this),this.__cache__=null,r},e.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]},LT=e,LT}var FT,DR;function J$(){if(DR)return FT;DR=1;var e=/\r\n?|\n/g,t=/\0/g;return FT=function(r){var i;i=r.src.replace(e,`
`),i=i.replace(t,"�"),r.src=i},FT}var PT,kR;function ez(){return kR||(kR=1,PT=function(t){var n;t.inlineMode?(n=new t.Token("inline","",0),n.content=t.src,n.map=[0,1],n.children=[],t.tokens.push(n)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}),PT}var jT,RR;function tz(){return RR||(RR=1,jT=function(t){var n=t.tokens,r,i,o;for(i=0,o=n.length;i<o;i++)r=n[i],r.type==="inline"&&t.md.inline.parse(r.content,t.md,t.env,r.children)}),jT}var VT,MR;function nz(){if(MR)return VT;MR=1;var e=In().arrayReplaceAt;function t(r){return/^<a[>\s]/i.test(r)}function n(r){return/^<\/a\s*>/i.test(r)}return VT=function(i){var o,l,c,p,d,m,b,E,y,x,w,k,N,D,A,C,M=i.tokens,j;if(i.md.options.linkify){for(l=0,c=M.length;l<c;l++)if(!(M[l].type!=="inline"||!i.md.linkify.pretest(M[l].content)))for(p=M[l].children,N=0,o=p.length-1;o>=0;o--){if(m=p[o],m.type==="link_close"){for(o--;p[o].level!==m.level&&p[o].type!=="link_open";)o--;continue}if(m.type==="html_inline"&&(t(m.content)&&N>0&&N--,n(m.content)&&N++),!(N>0)&&m.type==="text"&&i.md.linkify.test(m.content)){for(y=m.content,j=i.md.linkify.match(y),b=[],k=m.level,w=0,E=0;E<j.length;E++)D=j[E].url,A=i.md.normalizeLink(D),i.md.validateLink(A)&&(C=j[E].text,j[E].schema?j[E].schema==="mailto:"&&!/^mailto:/i.test(C)?C=i.md.normalizeLinkText("mailto:"+C).replace(/^mailto:/,""):C=i.md.normalizeLinkText(C):C=i.md.normalizeLinkText("http://"+C).replace(/^http:\/\//,""),x=j[E].index,x>w&&(d=new i.Token("text","",0),d.content=y.slice(w,x),d.level=k,b.push(d)),d=new i.Token("link_open","a",1),d.attrs=[["href",A]],d.level=k++,d.markup="linkify",d.info="auto",b.push(d),d=new i.Token("text","",0),d.content=C,d.level=k,b.push(d),d=new i.Token("link_close","a",-1),d.level=--k,d.markup="linkify",d.info="auto",b.push(d),w=j[E].lastIndex);w<y.length&&(d=new i.Token("text","",0),d.content=y.slice(w),d.level=k,b.push(d)),M[l].children=p=e(p,o,b)}}}},VT}var UT,LR;function rz(){if(LR)return UT;LR=1;var e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,t=/\((c|tm|r|p)\)/i,n=/\((c|tm|r|p)\)/ig,r={c:"©",r:"®",p:"§",tm:"™"};function i(c,p){return r[p.toLowerCase()]}function o(c){var p,d,m=0;for(p=c.length-1;p>=0;p--)d=c[p],d.type==="text"&&!m&&(d.content=d.content.replace(n,i)),d.type==="link_open"&&d.info==="auto"&&m--,d.type==="link_close"&&d.info==="auto"&&m++}function l(c){var p,d,m=0;for(p=c.length-1;p>=0;p--)d=c[p],d.type==="text"&&!m&&e.test(d.content)&&(d.content=d.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),d.type==="link_open"&&d.info==="auto"&&m--,d.type==="link_close"&&d.info==="auto"&&m++}return UT=function(p){var d;if(p.md.options.typographer)for(d=p.tokens.length-1;d>=0;d--)p.tokens[d].type==="inline"&&(t.test(p.tokens[d].content)&&o(p.tokens[d].children),e.test(p.tokens[d].content)&&l(p.tokens[d].children))},UT}var qT,IR;function iz(){if(IR)return qT;IR=1;var e=In().isWhiteSpace,t=In().isPunctChar,n=In().isMdAsciiPunct,r=/['"]/,i=/['"]/g,o="’";function l(p,d,m){return p.substr(0,d)+m+p.substr(d+1)}function c(p,d){var m,b,E,y,x,w,k,N,D,A,C,M,j,P,F,V,$,X,J,ee,Q;for(J=[],m=0;m<p.length;m++){for(b=p[m],k=p[m].level,$=J.length-1;$>=0&&!(J[$].level<=k);$--);if(J.length=$+1,b.type==="text"){E=b.content,x=0,w=E.length;e:for(;x<w&&(i.lastIndex=x,y=i.exec(E),!!y);){if(F=V=!0,x=y.index+1,X=y[0]==="'",D=32,y.index-1>=0)D=E.charCodeAt(y.index-1);else for($=m-1;$>=0&&!(p[$].type==="softbreak"||p[$].type==="hardbreak");$--)if(p[$].content){D=p[$].content.charCodeAt(p[$].content.length-1);break}if(A=32,x<w)A=E.charCodeAt(x);else for($=m+1;$<p.length&&!(p[$].type==="softbreak"||p[$].type==="hardbreak");$++)if(p[$].content){A=p[$].content.charCodeAt(0);break}if(C=n(D)||t(String.fromCharCode(D)),M=n(A)||t(String.fromCharCode(A)),j=e(D),P=e(A),P?F=!1:M&&(j||C||(F=!1)),j?V=!1:C&&(P||M||(V=!1)),A===34&&y[0]==='"'&&D>=48&&D<=57&&(V=F=!1),F&&V&&(F=C,V=M),!F&&!V){X&&(b.content=l(b.content,y.index,o));continue}if(V){for($=J.length-1;$>=0&&(N=J[$],!(J[$].level<k));$--)if(N.single===X&&J[$].level===k){N=J[$],X?(ee=d.md.options.quotes[2],Q=d.md.options.quotes[3]):(ee=d.md.options.quotes[0],Q=d.md.options.quotes[1]),b.content=l(b.content,y.index,Q),p[N.token].content=l(p[N.token].content,N.pos,ee),x+=Q.length-1,N.token===m&&(x+=ee.length-1),E=b.content,w=E.length,J.length=$;continue e}}F?J.push({token:m,pos:y.index,single:X,level:k}):V&&X&&(b.content=l(b.content,y.index,o))}}}}return qT=function(d){var m;if(d.md.options.typographer)for(m=d.tokens.length-1;m>=0;m--)d.tokens[m].type!=="inline"||!r.test(d.tokens[m].content)||c(d.tokens[m].children,d)},qT}var BT,FR;function $T(){if(FR)return BT;FR=1;function e(t,n,r){this.type=t,this.tag=n,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}return e.prototype.attrIndex=function(n){var r,i,o;if(!this.attrs)return-1;for(r=this.attrs,i=0,o=r.length;i<o;i++)if(r[i][0]===n)return i;return-1},e.prototype.attrPush=function(n){this.attrs?this.attrs.push(n):this.attrs=[n]},e.prototype.attrSet=function(n,r){var i=this.attrIndex(n),o=[n,r];i<0?this.attrPush(o):this.attrs[i]=o},e.prototype.attrGet=function(n){var r=this.attrIndex(n),i=null;return r>=0&&(i=this.attrs[r][1]),i},e.prototype.attrJoin=function(n,r){var i=this.attrIndex(n);i<0?this.attrPush([n,r]):this.attrs[i][1]=this.attrs[i][1]+" "+r},BT=e,BT}var zT,PR;function oz(){if(PR)return zT;PR=1;var e=$T();function t(n,r,i){this.src=n,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=r}return t.prototype.Token=e,zT=t,zT}var HT,jR;function az(){if(jR)return HT;jR=1;var e=IT(),t=[["normalize",J$()],["block",ez()],["inline",tz()],["linkify",nz()],["replacements",rz()],["smartquotes",iz()]];function n(){this.ruler=new e;for(var r=0;r<t.length;r++)this.ruler.push(t[r][0],t[r][1])}return n.prototype.process=function(r){var i,o,l;for(l=this.ruler.getRules(""),i=0,o=l.length;i<o;i++)l[i](r)},n.prototype.State=oz(),HT=n,HT}var GT,VR;function sz(){if(VR)return GT;VR=1;var e=In().isSpace;function t(r,i){var o=r.bMarks[i]+r.tShift[i],l=r.eMarks[i];return r.src.substr(o,l-o)}function n(r){var i=[],o=0,l=r.length,c,p=!1,d=0,m="";for(c=r.charCodeAt(o);o<l;)c===124&&(p?(m+=r.substring(d,o-1),d=o):(i.push(m+r.substring(d,o)),m="",d=o+1)),p=c===92,o++,c=r.charCodeAt(o);return i.push(m+r.substring(d)),i}return GT=function(i,o,l,c){var p,d,m,b,E,y,x,w,k,N,D,A,C,M,j,P,F,V;if(o+2>l||(y=o+1,i.sCount[y]<i.blkIndent)||i.sCount[y]-i.blkIndent>=4||(m=i.bMarks[y]+i.tShift[y],m>=i.eMarks[y])||(F=i.src.charCodeAt(m++),F!==124&&F!==45&&F!==58)||m>=i.eMarks[y]||(V=i.src.charCodeAt(m++),V!==124&&V!==45&&V!==58&&!e(V))||F===45&&e(V))return!1;for(;m<i.eMarks[y];){if(p=i.src.charCodeAt(m),p!==124&&p!==45&&p!==58&&!e(p))return!1;m++}for(d=t(i,o+1),x=d.split("|"),N=[],b=0;b<x.length;b++){if(D=x[b].trim(),!D){if(b===0||b===x.length-1)continue;return!1}if(!/^:?-+:?$/.test(D))return!1;D.charCodeAt(D.length-1)===58?N.push(D.charCodeAt(0)===58?"center":"right"):D.charCodeAt(0)===58?N.push("left"):N.push("")}if(d=t(i,o).trim(),d.indexOf("|")===-1||i.sCount[o]-i.blkIndent>=4||(x=n(d),x.length&&x[0]===""&&x.shift(),x.length&&x[x.length-1]===""&&x.pop(),w=x.length,w===0||w!==N.length))return!1;if(c)return!0;for(M=i.parentType,i.parentType="table",P=i.md.block.ruler.getRules("blockquote"),k=i.push("table_open","table",1),k.map=A=[o,0],k=i.push("thead_open","thead",1),k.map=[o,o+1],k=i.push("tr_open","tr",1),k.map=[o,o+1],b=0;b<x.length;b++)k=i.push("th_open","th",1),N[b]&&(k.attrs=[["style","text-align:"+N[b]]]),k=i.push("inline","",0),k.content=x[b].trim(),k.children=[],k=i.push("th_close","th",-1);for(k=i.push("tr_close","tr",-1),k=i.push("thead_close","thead",-1),y=o+2;y<l&&!(i.sCount[y]<i.blkIndent);y++){for(j=!1,b=0,E=P.length;b<E;b++)if(P[b](i,y,l,!0)){j=!0;break}if(j||(d=t(i,y).trim(),!d)||i.sCount[y]-i.blkIndent>=4)break;for(x=n(d),x.length&&x[0]===""&&x.shift(),x.length&&x[x.length-1]===""&&x.pop(),y===o+2&&(k=i.push("tbody_open","tbody",1),k.map=C=[o+2,0]),k=i.push("tr_open","tr",1),k.map=[y,y+1],b=0;b<w;b++)k=i.push("td_open","td",1),N[b]&&(k.attrs=[["style","text-align:"+N[b]]]),k=i.push("inline","",0),k.content=x[b]?x[b].trim():"",k.children=[],k=i.push("td_close","td",-1);k=i.push("tr_close","tr",-1)}return C&&(k=i.push("tbody_close","tbody",-1),C[1]=y),k=i.push("table_close","table",-1),A[1]=y,i.parentType=M,i.line=y,!0},GT}var YT,UR;function lz(){return UR||(UR=1,YT=function(t,n,r){var i,o,l;if(t.sCount[n]-t.blkIndent<4)return!1;for(o=i=n+1;i<r;){if(t.isEmpty(i)){i++;continue}if(t.sCount[i]-t.blkIndent>=4){i++,o=i;continue}break}return t.line=o,l=t.push("code_block","code",0),l.content=t.getLines(n,o,4+t.blkIndent,!1)+`
`,l.map=[n,t.line],!0}),YT}var WT,qR;function uz(){return qR||(qR=1,WT=function(t,n,r,i){var o,l,c,p,d,m,b,E=!1,y=t.bMarks[n]+t.tShift[n],x=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||y+3>x||(o=t.src.charCodeAt(y),o!==126&&o!==96)||(d=y,y=t.skipChars(y,o),l=y-d,l<3)||(b=t.src.slice(d,y),c=t.src.slice(y,x),o===96&&c.indexOf(String.fromCharCode(o))>=0))return!1;if(i)return!0;for(p=n;p++,!(p>=r||(y=d=t.bMarks[p]+t.tShift[p],x=t.eMarks[p],y<x&&t.sCount[p]<t.blkIndent));)if(t.src.charCodeAt(y)===o&&!(t.sCount[p]-t.blkIndent>=4)&&(y=t.skipChars(y,o),!(y-d<l)&&(y=t.skipSpaces(y),!(y<x)))){E=!0;break}return l=t.sCount[n],t.line=p+(E?1:0),m=t.push("fence","code",0),m.info=c,m.content=t.getLines(n+1,p,l,!0),m.markup=b,m.map=[n,t.line],!0}),WT}var QT,BR;function cz(){if(BR)return QT;BR=1;var e=In().isSpace;return QT=function(n,r,i,o){var l,c,p,d,m,b,E,y,x,w,k,N,D,A,C,M,j,P,F,V,$=n.lineMax,X=n.bMarks[r]+n.tShift[r],J=n.eMarks[r];if(n.sCount[r]-n.blkIndent>=4||n.src.charCodeAt(X++)!==62)return!1;if(o)return!0;for(d=x=n.sCount[r]+1,n.src.charCodeAt(X)===32?(X++,d++,x++,l=!1,M=!0):n.src.charCodeAt(X)===9?(M=!0,(n.bsCount[r]+x)%4===3?(X++,d++,x++,l=!1):l=!0):M=!1,w=[n.bMarks[r]],n.bMarks[r]=X;X<J&&(c=n.src.charCodeAt(X),e(c));){c===9?x+=4-(x+n.bsCount[r]+(l?1:0))%4:x++;X++}for(k=[n.bsCount[r]],n.bsCount[r]=n.sCount[r]+1+(M?1:0),b=X>=J,A=[n.sCount[r]],n.sCount[r]=x-d,C=[n.tShift[r]],n.tShift[r]=X-n.bMarks[r],P=n.md.block.ruler.getRules("blockquote"),D=n.parentType,n.parentType="blockquote",y=r+1;y<i&&(V=n.sCount[y]<n.blkIndent,X=n.bMarks[y]+n.tShift[y],J=n.eMarks[y],!(X>=J));y++){if(n.src.charCodeAt(X++)===62&&!V){for(d=x=n.sCount[y]+1,n.src.charCodeAt(X)===32?(X++,d++,x++,l=!1,M=!0):n.src.charCodeAt(X)===9?(M=!0,(n.bsCount[y]+x)%4===3?(X++,d++,x++,l=!1):l=!0):M=!1,w.push(n.bMarks[y]),n.bMarks[y]=X;X<J&&(c=n.src.charCodeAt(X),e(c));){c===9?x+=4-(x+n.bsCount[y]+(l?1:0))%4:x++;X++}b=X>=J,k.push(n.bsCount[y]),n.bsCount[y]=n.sCount[y]+1+(M?1:0),A.push(n.sCount[y]),n.sCount[y]=x-d,C.push(n.tShift[y]),n.tShift[y]=X-n.bMarks[y];continue}if(b)break;for(j=!1,p=0,m=P.length;p<m;p++)if(P[p](n,y,i,!0)){j=!0;break}if(j){n.lineMax=y,n.blkIndent!==0&&(w.push(n.bMarks[y]),k.push(n.bsCount[y]),C.push(n.tShift[y]),A.push(n.sCount[y]),n.sCount[y]-=n.blkIndent);break}w.push(n.bMarks[y]),k.push(n.bsCount[y]),C.push(n.tShift[y]),A.push(n.sCount[y]),n.sCount[y]=-1}for(N=n.blkIndent,n.blkIndent=0,F=n.push("blockquote_open","blockquote",1),F.markup=">",F.map=E=[r,0],n.md.block.tokenize(n,r,y),F=n.push("blockquote_close","blockquote",-1),F.markup=">",n.lineMax=$,n.parentType=D,E[1]=n.line,p=0;p<C.length;p++)n.bMarks[p+r]=w[p],n.tShift[p+r]=C[p],n.sCount[p+r]=A[p],n.bsCount[p+r]=k[p];return n.blkIndent=N,!0},QT}var KT,$R;function fz(){if($R)return KT;$R=1;var e=In().isSpace;return KT=function(n,r,i,o){var l,c,p,d,m=n.bMarks[r]+n.tShift[r],b=n.eMarks[r];if(n.sCount[r]-n.blkIndent>=4||(l=n.src.charCodeAt(m++),l!==42&&l!==45&&l!==95))return!1;for(c=1;m<b;){if(p=n.src.charCodeAt(m++),p!==l&&!e(p))return!1;p===l&&c++}return c<3?!1:(o||(n.line=r+1,d=n.push("hr","hr",0),d.map=[r,n.line],d.markup=Array(c+1).join(String.fromCharCode(l))),!0)},KT}var XT,zR;function dz(){if(zR)return XT;zR=1;var e=In().isSpace;function t(i,o){var l,c,p,d;return c=i.bMarks[o]+i.tShift[o],p=i.eMarks[o],l=i.src.charCodeAt(c++),l!==42&&l!==45&&l!==43||c<p&&(d=i.src.charCodeAt(c),!e(d))?-1:c}function n(i,o){var l,c=i.bMarks[o]+i.tShift[o],p=c,d=i.eMarks[o];if(p+1>=d||(l=i.src.charCodeAt(p++),l<48||l>57))return-1;for(;;){if(p>=d)return-1;if(l=i.src.charCodeAt(p++),l>=48&&l<=57){if(p-c>=10)return-1;continue}if(l===41||l===46)break;return-1}return p<d&&(l=i.src.charCodeAt(p),!e(l))?-1:p}function r(i,o){var l,c,p=i.level+2;for(l=o+2,c=i.tokens.length-2;l<c;l++)i.tokens[l].level===p&&i.tokens[l].type==="paragraph_open"&&(i.tokens[l+2].hidden=!0,i.tokens[l].hidden=!0,l+=2)}return XT=function(o,l,c,p){var d,m,b,E,y,x,w,k,N,D,A,C,M,j,P,F,V,$,X,J,ee,Q,B,ne,re,se,fe,Z,ge=!1,ae=!0;if(o.sCount[l]-o.blkIndent>=4||o.listIndent>=0&&o.sCount[l]-o.listIndent>=4&&o.sCount[l]<o.blkIndent)return!1;if(p&&o.parentType==="paragraph"&&o.sCount[l]>=o.blkIndent&&(ge=!0),(B=n(o,l))>=0){if(w=!0,re=o.bMarks[l]+o.tShift[l],M=Number(o.src.slice(re,B-1)),ge&&M!==1)return!1}else if((B=t(o,l))>=0)w=!1;else return!1;if(ge&&o.skipSpaces(B)>=o.eMarks[l])return!1;if(C=o.src.charCodeAt(B-1),p)return!0;for(A=o.tokens.length,w?(Z=o.push("ordered_list_open","ol",1),M!==1&&(Z.attrs=[["start",M]])):Z=o.push("bullet_list_open","ul",1),Z.map=D=[l,0],Z.markup=String.fromCharCode(C),P=l,ne=!1,fe=o.md.block.ruler.getRules("list"),$=o.parentType,o.parentType="list";P<c;){for(Q=B,j=o.eMarks[P],x=F=o.sCount[P]+B-(o.bMarks[l]+o.tShift[l]);Q<j;){if(d=o.src.charCodeAt(Q),d===9)F+=4-(F+o.bsCount[P])%4;else if(d===32)F++;else break;Q++}if(m=Q,m>=j?y=1:y=F-x,y>4&&(y=1),E=x+y,Z=o.push("list_item_open","li",1),Z.markup=String.fromCharCode(C),Z.map=k=[l,0],w&&(Z.info=o.src.slice(re,B-1)),ee=o.tight,J=o.tShift[l],X=o.sCount[l],V=o.listIndent,o.listIndent=o.blkIndent,o.blkIndent=E,o.tight=!0,o.tShift[l]=m-o.bMarks[l],o.sCount[l]=F,m>=j&&o.isEmpty(l+1)?o.line=Math.min(o.line+2,c):o.md.block.tokenize(o,l,c,!0),(!o.tight||ne)&&(ae=!1),ne=o.line-l>1&&o.isEmpty(o.line-1),o.blkIndent=o.listIndent,o.listIndent=V,o.tShift[l]=J,o.sCount[l]=X,o.tight=ee,Z=o.push("list_item_close","li",-1),Z.markup=String.fromCharCode(C),P=l=o.line,k[1]=P,m=o.bMarks[l],P>=c||o.sCount[P]<o.blkIndent||o.sCount[l]-o.blkIndent>=4)break;for(se=!1,b=0,N=fe.length;b<N;b++)if(fe[b](o,P,c,!0)){se=!0;break}if(se)break;if(w){if(B=n(o,P),B<0)break;re=o.bMarks[P]+o.tShift[P]}else if(B=t(o,P),B<0)break;if(C!==o.src.charCodeAt(B-1))break}return w?Z=o.push("ordered_list_close","ol",-1):Z=o.push("bullet_list_close","ul",-1),Z.markup=String.fromCharCode(C),D[1]=P,o.line=P,o.parentType=$,ae&&r(o,A),!0},XT}var ZT,HR;function pz(){if(HR)return ZT;HR=1;var e=In().normalizeReference,t=In().isSpace;return ZT=function(r,i,o,l){var c,p,d,m,b,E,y,x,w,k,N,D,A,C,M,j,P=0,F=r.bMarks[i]+r.tShift[i],V=r.eMarks[i],$=i+1;if(r.sCount[i]-r.blkIndent>=4||r.src.charCodeAt(F)!==91)return!1;for(;++F<V;)if(r.src.charCodeAt(F)===93&&r.src.charCodeAt(F-1)!==92){if(F+1===V||r.src.charCodeAt(F+1)!==58)return!1;break}for(m=r.lineMax,M=r.md.block.ruler.getRules("reference"),k=r.parentType,r.parentType="reference";$<m&&!r.isEmpty($);$++)if(!(r.sCount[$]-r.blkIndent>3)&&!(r.sCount[$]<0)){for(C=!1,E=0,y=M.length;E<y;E++)if(M[E](r,$,m,!0)){C=!0;break}if(C)break}for(A=r.getLines(i,$,r.blkIndent,!1).trim(),V=A.length,F=1;F<V;F++){if(c=A.charCodeAt(F),c===91)return!1;if(c===93){w=F;break}else c===10?P++:c===92&&(F++,F<V&&A.charCodeAt(F)===10&&P++)}if(w<0||A.charCodeAt(w+1)!==58)return!1;for(F=w+2;F<V;F++)if(c=A.charCodeAt(F),c===10)P++;else if(!t(c))break;if(N=r.md.helpers.parseLinkDestination(A,F,V),!N.ok||(b=r.md.normalizeLink(N.str),!r.md.validateLink(b)))return!1;for(F=N.pos,P+=N.lines,p=F,d=P,D=F;F<V;F++)if(c=A.charCodeAt(F),c===10)P++;else if(!t(c))break;for(N=r.md.helpers.parseLinkTitle(A,F,V),F<V&&D!==F&&N.ok?(j=N.str,F=N.pos,P+=N.lines):(j="",F=p,P=d);F<V&&(c=A.charCodeAt(F),!!t(c));)F++;if(F<V&&A.charCodeAt(F)!==10&&j)for(j="",F=p,P=d;F<V&&(c=A.charCodeAt(F),!!t(c));)F++;return F<V&&A.charCodeAt(F)!==10||(x=e(A.slice(1,w)),!x)?!1:(l||(typeof r.env.references>"u"&&(r.env.references={}),typeof r.env.references[x]>"u"&&(r.env.references[x]={title:j,href:b}),r.parentType=k,r.line=i+P+1),!0)},ZT}var JT,GR;function hz(){return GR||(GR=1,JT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]),JT}var S0={},YR;function WR(){if(YR)return S0;YR=1;var e="[a-zA-Z_:][a-zA-Z0-9:._-]*",t="[^\"'=<>`\\x00-\\x20]+",n="'[^']*'",r='"[^"]*"',i="(?:"+t+"|"+n+"|"+r+")",o="(?:\\s+"+e+"(?:\\s*=\\s*"+i+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+o+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",d="<[?][\\s\\S]*?[?]>",m="<![A-Z]+\\s+[^>]*>",b="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",E=new RegExp("^(?:"+l+"|"+c+"|"+p+"|"+d+"|"+m+"|"+b+")"),y=new RegExp("^(?:"+l+"|"+c+")");return S0.HTML_TAG_RE=E,S0.HTML_OPEN_CLOSE_TAG_RE=y,S0}var ex,QR;function mz(){if(QR)return ex;QR=1;var e=hz(),t=WR().HTML_OPEN_CLOSE_TAG_RE,n=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+e.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(t.source+"\\s*$"),/^$/,!1]];return ex=function(i,o,l,c){var p,d,m,b,E=i.bMarks[o]+i.tShift[o],y=i.eMarks[o];if(i.sCount[o]-i.blkIndent>=4||!i.md.options.html||i.src.charCodeAt(E)!==60)return!1;for(b=i.src.slice(E,y),p=0;p<n.length&&!n[p][0].test(b);p++);if(p===n.length)return!1;if(c)return n[p][2];if(d=o+1,!n[p][1].test(b)){for(;d<l&&!(i.sCount[d]<i.blkIndent);d++)if(E=i.bMarks[d]+i.tShift[d],y=i.eMarks[d],b=i.src.slice(E,y),n[p][1].test(b)){b.length!==0&&d++;break}}return i.line=d,m=i.push("html_block","",0),m.map=[o,d],m.content=i.getLines(o,d,i.blkIndent,!0),!0},ex}var tx,KR;function gz(){if(KR)return tx;KR=1;var e=In().isSpace;return tx=function(n,r,i,o){var l,c,p,d,m=n.bMarks[r]+n.tShift[r],b=n.eMarks[r];if(n.sCount[r]-n.blkIndent>=4||(l=n.src.charCodeAt(m),l!==35||m>=b))return!1;for(c=1,l=n.src.charCodeAt(++m);l===35&&m<b&&c<=6;)c++,l=n.src.charCodeAt(++m);return c>6||m<b&&!e(l)?!1:(o||(b=n.skipSpacesBack(b,m),p=n.skipCharsBack(b,35,m),p>m&&e(n.src.charCodeAt(p-1))&&(b=p),n.line=r+1,d=n.push("heading_open","h"+String(c),1),d.markup="########".slice(0,c),d.map=[r,n.line],d=n.push("inline","",0),d.content=n.src.slice(m,b).trim(),d.map=[r,n.line],d.children=[],d=n.push("heading_close","h"+String(c),-1),d.markup="########".slice(0,c)),!0)},tx}var nx,XR;function vz(){return XR||(XR=1,nx=function(t,n,r){var i,o,l,c,p,d,m,b,E,y=n+1,x,w=t.md.block.ruler.getRules("paragraph");if(t.sCount[n]-t.blkIndent>=4)return!1;for(x=t.parentType,t.parentType="paragraph";y<r&&!t.isEmpty(y);y++)if(!(t.sCount[y]-t.blkIndent>3)){if(t.sCount[y]>=t.blkIndent&&(d=t.bMarks[y]+t.tShift[y],m=t.eMarks[y],d<m&&(E=t.src.charCodeAt(d),(E===45||E===61)&&(d=t.skipChars(d,E),d=t.skipSpaces(d),d>=m)))){b=E===61?1:2;break}if(!(t.sCount[y]<0)){for(o=!1,l=0,c=w.length;l<c;l++)if(w[l](t,y,r,!0)){o=!0;break}if(o)break}}return b?(i=t.getLines(n,y,t.blkIndent,!1).trim(),t.line=y+1,p=t.push("heading_open","h"+String(b),1),p.markup=String.fromCharCode(E),p.map=[n,t.line],p=t.push("inline","",0),p.content=i,p.map=[n,t.line-1],p.children=[],p=t.push("heading_close","h"+String(b),-1),p.markup=String.fromCharCode(E),t.parentType=x,!0):!1}),nx}var rx,ZR;function yz(){return ZR||(ZR=1,rx=function(t,n){var r,i,o,l,c,p,d=n+1,m=t.md.block.ruler.getRules("paragraph"),b=t.lineMax;for(p=t.parentType,t.parentType="paragraph";d<b&&!t.isEmpty(d);d++)if(!(t.sCount[d]-t.blkIndent>3)&&!(t.sCount[d]<0)){for(i=!1,o=0,l=m.length;o<l;o++)if(m[o](t,d,b,!0)){i=!0;break}if(i)break}return r=t.getLines(n,d,t.blkIndent,!1).trim(),t.line=d,c=t.push("paragraph_open","p",1),c.map=[n,t.line],c=t.push("inline","",0),c.content=r,c.map=[n,t.line],c.children=[],c=t.push("paragraph_close","p",-1),t.parentType=p,!0}),rx}var ix,JR;function bz(){if(JR)return ix;JR=1;var e=$T(),t=In().isSpace;function n(r,i,o,l){var c,p,d,m,b,E,y,x;for(this.src=r,this.md=i,this.env=o,this.tokens=l,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",p=this.src,x=!1,d=m=E=y=0,b=p.length;m<b;m++){if(c=p.charCodeAt(m),!x)if(t(c)){E++,c===9?y+=4-y%4:y++;continue}else x=!0;(c===10||m===b-1)&&(c!==10&&m++,this.bMarks.push(d),this.eMarks.push(m),this.tShift.push(E),this.sCount.push(y),this.bsCount.push(0),x=!1,E=0,y=0,d=m+1)}this.bMarks.push(p.length),this.eMarks.push(p.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}return n.prototype.push=function(r,i,o){var l=new e(r,i,o);return l.block=!0,o<0&&this.level--,l.level=this.level,o>0&&this.level++,this.tokens.push(l),l},n.prototype.isEmpty=function(i){return this.bMarks[i]+this.tShift[i]>=this.eMarks[i]},n.prototype.skipEmptyLines=function(i){for(var o=this.lineMax;i<o&&!(this.bMarks[i]+this.tShift[i]<this.eMarks[i]);i++);return i},n.prototype.skipSpaces=function(i){for(var o,l=this.src.length;i<l&&(o=this.src.charCodeAt(i),!!t(o));i++);return i},n.prototype.skipSpacesBack=function(i,o){if(i<=o)return i;for(;i>o;)if(!t(this.src.charCodeAt(--i)))return i+1;return i},n.prototype.skipChars=function(i,o){for(var l=this.src.length;i<l&&this.src.charCodeAt(i)===o;i++);return i},n.prototype.skipCharsBack=function(i,o,l){if(i<=l)return i;for(;i>l;)if(o!==this.src.charCodeAt(--i))return i+1;return i},n.prototype.getLines=function(i,o,l,c){var p,d,m,b,E,y,x,w=i;if(i>=o)return"";for(y=new Array(o-i),p=0;w<o;w++,p++){for(d=0,x=b=this.bMarks[w],w+1<o||c?E=this.eMarks[w]+1:E=this.eMarks[w];b<E&&d<l;){if(m=this.src.charCodeAt(b),t(m))m===9?d+=4-(d+this.bsCount[w])%4:d++;else if(b-x<this.tShift[w])d++;else break;b++}d>l?y[p]=new Array(d-l+1).join(" ")+this.src.slice(b,E):y[p]=this.src.slice(b,E)}return y.join("")},n.prototype.Token=e,ix=n,ix}var ox,eM;function Ez(){if(eM)return ox;eM=1;var e=IT(),t=[["table",sz(),["paragraph","reference"]],["code",lz()],["fence",uz(),["paragraph","reference","blockquote","list"]],["blockquote",cz(),["paragraph","reference","blockquote","list"]],["hr",fz(),["paragraph","reference","blockquote","list"]],["list",dz(),["paragraph","reference","blockquote"]],["reference",pz()],["html_block",mz(),["paragraph","reference","blockquote"]],["heading",gz(),["paragraph","reference","blockquote"]],["lheading",vz()],["paragraph",yz()]];function n(){this.ruler=new e;for(var r=0;r<t.length;r++)this.ruler.push(t[r][0],t[r][1],{alt:(t[r][2]||[]).slice()})}return n.prototype.tokenize=function(r,i,o){for(var l,c,p=this.ruler.getRules(""),d=p.length,m=i,b=!1,E=r.md.options.maxNesting;m<o&&(r.line=m=r.skipEmptyLines(m),!(m>=o||r.sCount[m]<r.blkIndent));){if(r.level>=E){r.line=o;break}for(c=0;c<d&&(l=p[c](r,m,o,!1),!l);c++);r.tight=!b,r.isEmpty(r.line-1)&&(b=!0),m=r.line,m<o&&r.isEmpty(m)&&(b=!0,m++,r.line=m)}},n.prototype.parse=function(r,i,o,l){var c;r&&(c=new this.State(r,i,o,l),this.tokenize(c,c.line,c.lineMax))},n.prototype.State=bz(),ox=n,ox}var ax,tM;function Sz(){if(tM)return ax;tM=1;function e(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}return ax=function(n,r){for(var i=n.pos;i<n.posMax&&!e(n.src.charCodeAt(i));)i++;return i===n.pos?!1:(r||(n.pending+=n.src.slice(n.pos,i)),n.pos=i,!0)},ax}var sx,nM;function Tz(){if(nM)return sx;nM=1;var e=In().isSpace;return sx=function(n,r){var i,o,l,c=n.pos;if(n.src.charCodeAt(c)!==10)return!1;if(i=n.pending.length-1,o=n.posMax,!r)if(i>=0&&n.pending.charCodeAt(i)===32)if(i>=1&&n.pending.charCodeAt(i-1)===32){for(l=i-1;l>=1&&n.pending.charCodeAt(l-1)===32;)l--;n.pending=n.pending.slice(0,l),n.push("hardbreak","br",0)}else n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0);else n.push("softbreak","br",0);for(c++;c<o&&e(n.src.charCodeAt(c));)c++;return n.pos=c,!0},sx}var lx,rM;function xz(){if(rM)return lx;rM=1;for(var e=In().isSpace,t=[],n=0;n<256;n++)t.push(0);return"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(r){t[r.charCodeAt(0)]=1}),lx=function(i,o){var l,c=i.pos,p=i.posMax;if(i.src.charCodeAt(c)!==92)return!1;if(c++,c<p){if(l=i.src.charCodeAt(c),l<256&&t[l]!==0)return o||(i.pending+=i.src[c]),i.pos+=2,!0;if(l===10){for(o||i.push("hardbreak","br",0),c++;c<p&&(l=i.src.charCodeAt(c),!!e(l));)c++;return i.pos=c,!0}}return o||(i.pending+="\\"),i.pos++,!0},lx}var ux,iM;function wz(){return iM||(iM=1,ux=function(t,n){var r,i,o,l,c,p,d,m,b=t.pos,E=t.src.charCodeAt(b);if(E!==96)return!1;for(r=b,b++,i=t.posMax;b<i&&t.src.charCodeAt(b)===96;)b++;if(o=t.src.slice(r,b),d=o.length,t.backticksScanned&&(t.backticks[d]||0)<=r)return n||(t.pending+=o),t.pos+=d,!0;for(c=p=b;(c=t.src.indexOf("`",p))!==-1;){for(p=c+1;p<i&&t.src.charCodeAt(p)===96;)p++;if(m=p-c,m===d)return n||(l=t.push("code_inline","code",0),l.markup=o,l.content=t.src.slice(b,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=p,!0;t.backticks[m]=c}return t.backticksScanned=!0,n||(t.pending+=o),t.pos+=d,!0}),ux}var T0={},oM;function aM(){if(oM)return T0;oM=1,T0.tokenize=function(n,r){var i,o,l,c,p,d=n.pos,m=n.src.charCodeAt(d);if(r||m!==126||(o=n.scanDelims(n.pos,!0),c=o.length,p=String.fromCharCode(m),c<2))return!1;for(c%2&&(l=n.push("text","",0),l.content=p,c--),i=0;i<c;i+=2)l=n.push("text","",0),l.content=p+p,n.delimiters.push({marker:m,length:0,token:n.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return n.pos+=o.length,!0};function e(t,n){var r,i,o,l,c,p=[],d=n.length;for(r=0;r<d;r++)o=n[r],o.marker===126&&o.end!==-1&&(l=n[o.end],c=t.tokens[o.token],c.type="s_open",c.tag="s",c.nesting=1,c.markup="~~",c.content="",c=t.tokens[l.token],c.type="s_close",c.tag="s",c.nesting=-1,c.markup="~~",c.content="",t.tokens[l.token-1].type==="text"&&t.tokens[l.token-1].content==="~"&&p.push(l.token-1));for(;p.length;){for(r=p.pop(),i=r+1;i<t.tokens.length&&t.tokens[i].type==="s_close";)i++;i--,r!==i&&(c=t.tokens[i],t.tokens[i]=t.tokens[r],t.tokens[r]=c)}}return T0.postProcess=function(n){var r,i=n.tokens_meta,o=n.tokens_meta.length;for(e(n,n.delimiters),r=0;r<o;r++)i[r]&&i[r].delimiters&&e(n,i[r].delimiters)},T0}var x0={},sM;function lM(){if(sM)return x0;sM=1,x0.tokenize=function(n,r){var i,o,l,c=n.pos,p=n.src.charCodeAt(c);if(r||p!==95&&p!==42)return!1;for(o=n.scanDelims(n.pos,p===42),i=0;i<o.length;i++)l=n.push("text","",0),l.content=String.fromCharCode(p),n.delimiters.push({marker:p,length:o.length,token:n.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return n.pos+=o.length,!0};function e(t,n){var r,i,o,l,c,p,d=n.length;for(r=d-1;r>=0;r--)i=n[r],!(i.marker!==95&&i.marker!==42)&&i.end!==-1&&(o=n[i.end],p=r>0&&n[r-1].end===i.end+1&&n[r-1].marker===i.marker&&n[r-1].token===i.token-1&&n[i.end+1].token===o.token+1,c=String.fromCharCode(i.marker),l=t.tokens[i.token],l.type=p?"strong_open":"em_open",l.tag=p?"strong":"em",l.nesting=1,l.markup=p?c+c:c,l.content="",l=t.tokens[o.token],l.type=p?"strong_close":"em_close",l.tag=p?"strong":"em",l.nesting=-1,l.markup=p?c+c:c,l.content="",p&&(t.tokens[n[r-1].token].content="",t.tokens[n[i.end+1].token].content="",r--))}return x0.postProcess=function(n){var r,i=n.tokens_meta,o=n.tokens_meta.length;for(e(n,n.delimiters),r=0;r<o;r++)i[r]&&i[r].delimiters&&e(n,i[r].delimiters)},x0}var cx,uM;function Cz(){if(uM)return cx;uM=1;var e=In().normalizeReference,t=In().isSpace;return cx=function(r,i){var o,l,c,p,d,m,b,E,y,x="",w="",k=r.pos,N=r.posMax,D=r.pos,A=!0;if(r.src.charCodeAt(r.pos)!==91||(d=r.pos+1,p=r.md.helpers.parseLinkLabel(r,r.pos,!0),p<0))return!1;if(m=p+1,m<N&&r.src.charCodeAt(m)===40){for(A=!1,m++;m<N&&(l=r.src.charCodeAt(m),!(!t(l)&&l!==10));m++);if(m>=N)return!1;if(D=m,b=r.md.helpers.parseLinkDestination(r.src,m,r.posMax),b.ok){for(x=r.md.normalizeLink(b.str),r.md.validateLink(x)?m=b.pos:x="",D=m;m<N&&(l=r.src.charCodeAt(m),!(!t(l)&&l!==10));m++);if(b=r.md.helpers.parseLinkTitle(r.src,m,r.posMax),m<N&&D!==m&&b.ok)for(w=b.str,m=b.pos;m<N&&(l=r.src.charCodeAt(m),!(!t(l)&&l!==10));m++);}(m>=N||r.src.charCodeAt(m)!==41)&&(A=!0),m++}if(A){if(typeof r.env.references>"u")return!1;if(m<N&&r.src.charCodeAt(m)===91?(D=m+1,m=r.md.helpers.parseLinkLabel(r,m),m>=0?c=r.src.slice(D,m++):m=p+1):m=p+1,c||(c=r.src.slice(d,p)),E=r.env.references[e(c)],!E)return r.pos=k,!1;x=E.href,w=E.title}return i||(r.pos=d,r.posMax=p,y=r.push("link_open","a",1),y.attrs=o=[["href",x]],w&&o.push(["title",w]),r.md.inline.tokenize(r),y=r.push("link_close","a",-1)),r.pos=m,r.posMax=N,!0},cx}var fx,cM;function _z(){if(cM)return fx;cM=1;var e=In().normalizeReference,t=In().isSpace;return fx=function(r,i){var o,l,c,p,d,m,b,E,y,x,w,k,N,D="",A=r.pos,C=r.posMax;if(r.src.charCodeAt(r.pos)!==33||r.src.charCodeAt(r.pos+1)!==91||(m=r.pos+2,d=r.md.helpers.parseLinkLabel(r,r.pos+1,!1),d<0))return!1;if(b=d+1,b<C&&r.src.charCodeAt(b)===40){for(b++;b<C&&(l=r.src.charCodeAt(b),!(!t(l)&&l!==10));b++);if(b>=C)return!1;for(N=b,y=r.md.helpers.parseLinkDestination(r.src,b,r.posMax),y.ok&&(D=r.md.normalizeLink(y.str),r.md.validateLink(D)?b=y.pos:D=""),N=b;b<C&&(l=r.src.charCodeAt(b),!(!t(l)&&l!==10));b++);if(y=r.md.helpers.parseLinkTitle(r.src,b,r.posMax),b<C&&N!==b&&y.ok)for(x=y.str,b=y.pos;b<C&&(l=r.src.charCodeAt(b),!(!t(l)&&l!==10));b++);else x="";if(b>=C||r.src.charCodeAt(b)!==41)return r.pos=A,!1;b++}else{if(typeof r.env.references>"u")return!1;if(b<C&&r.src.charCodeAt(b)===91?(N=b+1,b=r.md.helpers.parseLinkLabel(r,b),b>=0?p=r.src.slice(N,b++):b=d+1):b=d+1,p||(p=r.src.slice(m,d)),E=r.env.references[e(p)],!E)return r.pos=A,!1;D=E.href,x=E.title}return i||(c=r.src.slice(m,d),r.md.inline.parse(c,r.md,r.env,k=[]),w=r.push("image","img",0),w.attrs=o=[["src",D],["alt",""]],w.children=k,w.content=c,x&&o.push(["title",x])),r.pos=b,r.posMax=C,!0},fx}var dx,fM;function Nz(){if(fM)return dx;fM=1;var e=/^([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])?)*)$/,t=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;return dx=function(r,i){var o,l,c,p,d,m,b=r.pos;if(r.src.charCodeAt(b)!==60)return!1;for(d=r.pos,m=r.posMax;;){if(++b>=m||(p=r.src.charCodeAt(b),p===60))return!1;if(p===62)break}return o=r.src.slice(d+1,b),t.test(o)?(l=r.md.normalizeLink(o),r.md.validateLink(l)?(i||(c=r.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=r.push("text","",0),c.content=r.md.normalizeLinkText(o),c=r.push("link_close","a",-1),c.markup="autolink",c.info="auto"),r.pos+=o.length+2,!0):!1):e.test(o)?(l=r.md.normalizeLink("mailto:"+o),r.md.validateLink(l)?(i||(c=r.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=r.push("text","",0),c.content=r.md.normalizeLinkText(o),c=r.push("link_close","a",-1),c.markup="autolink",c.info="auto"),r.pos+=o.length+2,!0):!1):!1},dx}var px,dM;function Az(){if(dM)return px;dM=1;var e=WR().HTML_TAG_RE;function t(n){var r=n|32;return r>=97&&r<=122}return px=function(r,i){var o,l,c,p,d=r.pos;return!r.md.options.html||(c=r.posMax,r.src.charCodeAt(d)!==60||d+2>=c)||(o=r.src.charCodeAt(d+1),o!==33&&o!==63&&o!==47&&!t(o))||(l=r.src.slice(d).match(e),!l)?!1:(i||(p=r.push("html_inline","",0),p.content=r.src.slice(d,d+l[0].length)),r.pos+=l[0].length,!0)},px}var hx,pM;function Oz(){if(pM)return hx;pM=1;var e=sR(),t=In().has,n=In().isValidEntityCode,r=In().fromCodePoint,i=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,o=/^&([a-z][a-z0-9]{1,31});/i;return hx=function(c,p){var d,m,b,E=c.pos,y=c.posMax;if(c.src.charCodeAt(E)!==38)return!1;if(E+1<y){if(d=c.src.charCodeAt(E+1),d===35){if(b=c.src.slice(E).match(i),b)return p||(m=b[1][0].toLowerCase()==="x"?parseInt(b[1].slice(1),16):parseInt(b[1],10),c.pending+=n(m)?r(m):r(65533)),c.pos+=b[0].length,!0}else if(b=c.src.slice(E).match(o),b&&t(e,b[1]))return p||(c.pending+=e[b[1]]),c.pos+=b[0].length,!0}return p||(c.pending+="&"),c.pos++,!0},hx}var mx,hM;function Dz(){if(hM)return mx;hM=1;function e(t,n){var r,i,o,l,c,p,d,m,b={},E=n.length;if(E){var y=0,x=-2,w=[];for(r=0;r<E;r++)if(o=n[r],w.push(0),(n[y].marker!==o.marker||x!==o.token-1)&&(y=r),x=o.token,o.length=o.length||0,!!o.close){for(b.hasOwnProperty(o.marker)||(b[o.marker]=[-1,-1,-1,-1,-1,-1]),c=b[o.marker][(o.open?3:0)+o.length%3],i=y-w[y]-1,p=i;i>c;i-=w[i]+1)if(l=n[i],l.marker===o.marker&&l.open&&l.end<0&&(d=!1,(l.close||o.open)&&(l.length+o.length)%3===0&&(l.length%3!==0||o.length%3!==0)&&(d=!0),!d)){m=i>0&&!n[i-1].open?w[i-1]+1:0,w[r]=r-i+m,w[i]=m,o.open=!1,l.end=r,l.close=!1,p=-1,x=-2;break}p!==-1&&(b[o.marker][(o.open?3:0)+(o.length||0)%3]=p)}}}return mx=function(n){var r,i=n.tokens_meta,o=n.tokens_meta.length;for(e(n,n.delimiters),r=0;r<o;r++)i[r]&&i[r].delimiters&&e(n,i[r].delimiters)},mx}var gx,mM;function kz(){return mM||(mM=1,gx=function(t){var n,r,i=0,o=t.tokens,l=t.tokens.length;for(n=r=0;n<l;n++)o[n].nesting<0&&i--,o[n].level=i,o[n].nesting>0&&i++,o[n].type==="text"&&n+1<l&&o[n+1].type==="text"?o[n+1].content=o[n].content+o[n+1].content:(n!==r&&(o[r]=o[n]),r++);n!==r&&(o.length=r)}),gx}var vx,gM;function Rz(){if(gM)return vx;gM=1;var e=$T(),t=In().isWhiteSpace,n=In().isPunctChar,r=In().isMdAsciiPunct;function i(o,l,c,p){this.src=o,this.env=c,this.md=l,this.tokens=p,this.tokens_meta=Array(p.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}return i.prototype.pushPending=function(){var o=new e("text","",0);return o.content=this.pending,o.level=this.pendingLevel,this.tokens.push(o),this.pending="",o},i.prototype.push=function(o,l,c){this.pending&&this.pushPending();var p=new e(o,l,c),d=null;return c<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),p.level=this.level,c>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],d={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(p),this.tokens_meta.push(d),p},i.prototype.scanDelims=function(o,l){var c=o,p,d,m,b,E,y,x,w,k,N=!0,D=!0,A=this.posMax,C=this.src.charCodeAt(o);for(p=o>0?this.src.charCodeAt(o-1):32;c<A&&this.src.charCodeAt(c)===C;)c++;return m=c-o,d=c<A?this.src.charCodeAt(c):32,x=r(p)||n(String.fromCharCode(p)),k=r(d)||n(String.fromCharCode(d)),y=t(p),w=t(d),w?N=!1:k&&(y||x||(N=!1)),y?D=!1:x&&(w||k||(D=!1)),l?(b=N,E=D):(b=N&&(!D||x),E=D&&(!N||k)),{can_open:b,can_close:E,length:m}},i.prototype.Token=e,vx=i,vx}var yx,vM;function Mz(){if(vM)return yx;vM=1;var e=IT(),t=[["text",Sz()],["newline",Tz()],["escape",xz()],["backticks",wz()],["strikethrough",aM().tokenize],["emphasis",lM().tokenize],["link",Cz()],["image",_z()],["autolink",Nz()],["html_inline",Az()],["entity",Oz()]],n=[["balance_pairs",Dz()],["strikethrough",aM().postProcess],["emphasis",lM().postProcess],["text_collapse",kz()]];function r(){var i;for(this.ruler=new e,i=0;i<t.length;i++)this.ruler.push(t[i][0],t[i][1]);for(this.ruler2=new e,i=0;i<n.length;i++)this.ruler2.push(n[i][0],n[i][1])}return r.prototype.skipToken=function(i){var o,l,c=i.pos,p=this.ruler.getRules(""),d=p.length,m=i.md.options.maxNesting,b=i.cache;if(typeof b[c]<"u"){i.pos=b[c];return}if(i.level<m)for(l=0;l<d&&(i.level++,o=p[l](i,!0),i.level--,!o);l++);else i.pos=i.posMax;o||i.pos++,b[c]=i.pos},r.prototype.tokenize=function(i){for(var o,l,c=this.ruler.getRules(""),p=c.length,d=i.posMax,m=i.md.options.maxNesting;i.pos<d;){if(i.level<m)for(l=0;l<p&&(o=c[l](i,!1),!o);l++);if(o){if(i.pos>=d)break;continue}i.pending+=i.src[i.pos++]}i.pending&&i.pushPending()},r.prototype.parse=function(i,o,l,c){var p,d,m,b=new this.State(i,o,l,c);for(this.tokenize(b),d=this.ruler2.getRules(""),m=d.length,p=0;p<m;p++)d[p](b)},r.prototype.State=Rz(),yx=r,yx}var bx,yM;function Lz(){return yM||(yM=1,bx=function(e){var t={};t.src_Any=gR().source,t.src_Cc=yR().source,t.src_Z=SR().source,t.src_P=ST().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+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="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+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="(^|"+n+'|"|\\(|'+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}),bx}var Ex,bM;function Iz(){if(bM)return Ex;bM=1;function e(A){var C=Array.prototype.slice.call(arguments,1);return C.forEach(function(M){M&&Object.keys(M).forEach(function(j){A[j]=M[j]})}),A}function t(A){return Object.prototype.toString.call(A)}function n(A){return t(A)==="[object String]"}function r(A){return t(A)==="[object Object]"}function i(A){return t(A)==="[object RegExp]"}function o(A){return t(A)==="[object Function]"}function l(A){return A.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function p(A){return Object.keys(A||{}).reduce(function(C,M){return C||c.hasOwnProperty(M)},!1)}var d={"http:":{validate:function(A,C,M){var j=A.slice(C);return M.re.http||(M.re.http=new RegExp("^\\/\\/"+M.re.src_auth+M.re.src_host_port_strict+M.re.src_path,"i")),M.re.http.test(j)?j.match(M.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(A,C,M){var j=A.slice(C);return M.re.no_http||(M.re.no_http=new RegExp("^"+M.re.src_auth+"(?:localhost|(?:(?:"+M.re.src_domain+")\\.)+"+M.re.src_domain_root+")"+M.re.src_port+M.re.src_host_terminator+M.re.src_path,"i")),M.re.no_http.test(j)?C>=3&&A[C-3]===":"||C>=3&&A[C-3]==="/"?0:j.match(M.re.no_http)[0].length:0}},"mailto:":{validate:function(A,C,M){var j=A.slice(C);return M.re.mailto||(M.re.mailto=new RegExp("^"+M.re.src_email_name+"@"+M.re.src_host_strict,"i")),M.re.mailto.test(j)?j.match(M.re.mailto)[0].length:0}}},m="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]",b="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function E(A){A.__index__=-1,A.__text_cache__=""}function y(A){return function(C,M){var j=C.slice(M);return A.test(j)?j.match(A)[0].length:0}}function x(){return function(A,C){C.normalize(A)}}function w(A){var C=A.re=Lz()(A.__opts__),M=A.__tlds__.slice();A.onCompile(),A.__tlds_replaced__||M.push(m),M.push(C.src_xn),C.src_tlds=M.join("|");function j($){return $.replace("%TLDS%",C.src_tlds)}C.email_fuzzy=RegExp(j(C.tpl_email_fuzzy),"i"),C.link_fuzzy=RegExp(j(C.tpl_link_fuzzy),"i"),C.link_no_ip_fuzzy=RegExp(j(C.tpl_link_no_ip_fuzzy),"i"),C.host_fuzzy_test=RegExp(j(C.tpl_host_fuzzy_test),"i");var P=[];A.__compiled__={};function F($,X){throw new Error('(LinkifyIt) Invalid schema "'+$+'": '+X)}Object.keys(A.__schemas__).forEach(function($){var X=A.__schemas__[$];if(X!==null){var J={validate:null,link:null};if(A.__compiled__[$]=J,r(X)){i(X.validate)?J.validate=y(X.validate):o(X.validate)?J.validate=X.validate:F($,X),o(X.normalize)?J.normalize=X.normalize:X.normalize?F($,X):J.normalize=x();return}if(n(X)){P.push($);return}F($,X)}}),P.forEach(function($){A.__compiled__[A.__schemas__[$]]&&(A.__compiled__[$].validate=A.__compiled__[A.__schemas__[$]].validate,A.__compiled__[$].normalize=A.__compiled__[A.__schemas__[$]].normalize)}),A.__compiled__[""]={validate:null,normalize:x()};var V=Object.keys(A.__compiled__).filter(function($){return $.length>0&&A.__compiled__[$]}).map(l).join("|");A.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+C.src_ZPCc+"))("+V+")","i"),A.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+C.src_ZPCc+"))("+V+")","ig"),A.re.pretest=RegExp("("+A.re.schema_test.source+")|("+A.re.host_fuzzy_test.source+")|@","i"),E(A)}function k(A,C){var M=A.__index__,j=A.__last_index__,P=A.__text_cache__.slice(M,j);this.schema=A.__schema__.toLowerCase(),this.index=M+C,this.lastIndex=j+C,this.raw=P,this.text=P,this.url=P}function N(A,C){var M=new k(A,C);return A.__compiled__[M.schema].normalize(M,A),M}function D(A,C){if(!(this instanceof D))return new D(A,C);C||p(A)&&(C=A,A={}),this.__opts__=e({},c,C),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=e({},d,A),this.__compiled__={},this.__tlds__=b,this.__tlds_replaced__=!1,this.re={},w(this)}return D.prototype.add=function(C,M){return this.__schemas__[C]=M,w(this),this},D.prototype.set=function(C){return this.__opts__=e(this.__opts__,C),this},D.prototype.test=function(C){if(this.__text_cache__=C,this.__index__=-1,!C.length)return!1;var M,j,P,F,V,$,X,J,ee;if(this.re.schema_test.test(C)){for(X=this.re.schema_search,X.lastIndex=0;(M=X.exec(C))!==null;)if(F=this.testSchemaAt(C,M[2],X.lastIndex),F){this.__schema__=M[2],this.__index__=M.index+M[1].length,this.__last_index__=M.index+M[0].length+F;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(J=C.search(this.re.host_fuzzy_test),J>=0&&(this.__index__<0||J<this.__index__)&&(j=C.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(V=j.index+j[1].length,(this.__index__<0||V<this.__index__)&&(this.__schema__="",this.__index__=V,this.__last_index__=j.index+j[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(ee=C.indexOf("@"),ee>=0&&(P=C.match(this.re.email_fuzzy))!==null&&(V=P.index+P[1].length,$=P.index+P[0].length,(this.__index__<0||V<this.__index__||V===this.__index__&&$>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=V,this.__last_index__=$))),this.__index__>=0},D.prototype.pretest=function(C){return this.re.pretest.test(C)},D.prototype.testSchemaAt=function(C,M,j){return this.__compiled__[M.toLowerCase()]?this.__compiled__[M.toLowerCase()].validate(C,j,this):0},D.prototype.match=function(C){var M=0,j=[];this.__index__>=0&&this.__text_cache__===C&&(j.push(N(this,M)),M=this.__last_index__);for(var P=M?C.slice(M):C;this.test(P);)j.push(N(this,M)),P=P.slice(this.__last_index__),M+=this.__last_index__;return j.length?j:null},D.prototype.tlds=function(C,M){return C=Array.isArray(C)?C:[C],M?(this.__tlds__=this.__tlds__.concat(C).sort().filter(function(j,P,F){return j!==F[P-1]}).reverse(),w(this),this):(this.__tlds__=C.slice(),this.__tlds_replaced__=!0,w(this),this)},D.prototype.normalize=function(C){C.schema||(C.url="http://"+C.url),C.schema==="mailto:"&&!/^mailto:/i.test(C.url)&&(C.url="mailto:"+C.url)},D.prototype.onCompile=function(){},Ex=D,Ex}const np=2147483647,$s=36,Sx=1,Mm=26,Fz=38,Pz=700,EM=72,SM=128,TM="-",jz=/^xn--/,Vz=/[^\0-\x7F]/,Uz=/[\x2E\u3002\uFF0E\uFF61]/g,qz={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Tx=$s-Sx,zs=Math.floor,xx=String.fromCharCode;function $u(e){throw new RangeError(qz[e])}function Bz(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function xM(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Uz,".");const i=e.split("."),o=Bz(i,t).join(".");return r+o}function wx(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const o=e.charCodeAt(n++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const wM=e=>String.fromCodePoint(...e),$z=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:$s},CM=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},_M=function(e,t,n){let r=0;for(e=n?zs(e/Pz):e>>1,e+=zs(e/t);e>Tx*Mm>>1;r+=$s)e=zs(e/Tx);return zs(r+(Tx+1)*e/(e+Fz))},Cx=function(e){const t=[],n=e.length;let r=0,i=SM,o=EM,l=e.lastIndexOf(TM);l<0&&(l=0);for(let c=0;c<l;++c)e.charCodeAt(c)>=128&&$u("not-basic"),t.push(e.charCodeAt(c));for(let c=l>0?l+1:0;c<n;){const p=r;for(let m=1,b=$s;;b+=$s){c>=n&&$u("invalid-input");const E=$z(e.charCodeAt(c++));E>=$s&&$u("invalid-input"),E>zs((np-r)/m)&&$u("overflow"),r+=E*m;const y=b<=o?Sx:b>=o+Mm?Mm:b-o;if(E<y)break;const x=$s-y;m>zs(np/x)&&$u("overflow"),m*=x}const d=t.length+1;o=_M(r-p,d,p==0),zs(r/d)>np-i&&$u("overflow"),i+=zs(r/d),r%=d,t.splice(r++,0,i)}return String.fromCodePoint(...t)},_x=function(e){const t=[];e=wx(e);const n=e.length;let r=SM,i=0,o=EM;for(const p of e)p<128&&t.push(xx(p));const l=t.length;let c=l;for(l&&t.push(TM);c<n;){let p=np;for(const m of e)m>=r&&m<p&&(p=m);const d=c+1;p-r>zs((np-i)/d)&&$u("overflow"),i+=(p-r)*d,r=p;for(const m of e)if(m<r&&++i>np&&$u("overflow"),m===r){let b=i;for(let E=$s;;E+=$s){const y=E<=o?Sx:E>=o+Mm?Mm:E-o;if(b<y)break;const x=b-y,w=$s-y;t.push(xx(CM(y+x%w,0))),b=zs(x/w)}t.push(xx(CM(b,0))),o=_M(i,d,c===l),i=0,++c}++i,++r}return t.join("")},NM=function(e){return xM(e,function(t){return jz.test(t)?Cx(t.slice(4).toLowerCase()):t})},AM=function(e){return xM(e,function(t){return Vz.test(t)?"xn--"+_x(t):t})},zz=J_(Object.freeze(Object.defineProperty({__proto__:null,decode:Cx,default:{version:"2.3.1",ucs2:{decode:wx,encode:wM},decode:Cx,encode:_x,toASCII:AM,toUnicode:NM},encode:_x,toASCII:AM,toUnicode:NM,ucs2decode:wx,ucs2encode:wM},Symbol.toStringTag,{value:"Module"})));var Nx,OM;function Hz(){return OM||(OM=1,Nx={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}),Nx}var Ax,DM;function Gz(){return DM||(DM=1,Ax={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}),Ax}var Ox,kM;function Yz(){return kM||(kM=1,Ox={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}),Ox}var Dx,RM;function Wz(){if(RM)return Dx;RM=1;var e=In(),t=X$(),n=Z$(),r=az(),i=Ez(),o=Mz(),l=Iz(),c=hR(),p=zz,d={default:Hz(),zero:Gz(),commonmark:Yz()},m=/^(vbscript|javascript|file|data):/,b=/^data:image\/(gif|png|jpeg|webp);/;function E(N){var D=N.trim().toLowerCase();return m.test(D)?!!b.test(D):!0}var y=["http:","https:","mailto:"];function x(N){var D=c.parse(N,!0);if(D.hostname&&(!D.protocol||y.indexOf(D.protocol)>=0))try{D.hostname=p.toASCII(D.hostname)}catch{}return c.encode(c.format(D))}function w(N){var D=c.parse(N,!0);if(D.hostname&&(!D.protocol||y.indexOf(D.protocol)>=0))try{D.hostname=p.toUnicode(D.hostname)}catch{}return c.decode(c.format(D),c.decode.defaultChars+"%")}function k(N,D){if(!(this instanceof k))return new k(N,D);D||e.isString(N)||(D=N||{},N="default"),this.inline=new o,this.block=new i,this.core=new r,this.renderer=new n,this.linkify=new l,this.validateLink=E,this.normalizeLink=x,this.normalizeLinkText=w,this.utils=e,this.helpers=e.assign({},t),this.options={},this.configure(N),D&&this.set(D)}return k.prototype.set=function(N){return e.assign(this.options,N),this},k.prototype.configure=function(N){var D=this,A;if(e.isString(N)&&(A=N,N=d[A],!N))throw new Error('Wrong `markdown-it` preset "'+A+'", check name');if(!N)throw new Error("Wrong `markdown-it` preset, can't be empty");return N.options&&D.set(N.options),N.components&&Object.keys(N.components).forEach(function(C){N.components[C].rules&&D[C].ruler.enableOnly(N.components[C].rules),N.components[C].rules2&&D[C].ruler2.enableOnly(N.components[C].rules2)}),this},k.prototype.enable=function(N,D){var A=[];Array.isArray(N)||(N=[N]),["core","block","inline"].forEach(function(M){A=A.concat(this[M].ruler.enable(N,!0))},this),A=A.concat(this.inline.ruler2.enable(N,!0));var C=N.filter(function(M){return A.indexOf(M)<0});if(C.length&&!D)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+C);return this},k.prototype.disable=function(N,D){var A=[];Array.isArray(N)||(N=[N]),["core","block","inline"].forEach(function(M){A=A.concat(this[M].ruler.disable(N,!0))},this),A=A.concat(this.inline.ruler2.disable(N,!0));var C=N.filter(function(M){return A.indexOf(M)<0});if(C.length&&!D)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+C);return this},k.prototype.use=function(N){var D=[this].concat(Array.prototype.slice.call(arguments,1));return N.apply(N,D),this},k.prototype.parse=function(N,D){if(typeof N!="string")throw new Error("Input data should be a String");var A=new this.core.State(N,this,D);return this.core.process(A),A.tokens},k.prototype.render=function(N,D){return D=D||{},this.renderer.render(this.parse(N,D),this.options,D)},k.prototype.parseInline=function(N,D){var A=new this.core.State(N,this,D);return A.inlineMode=!0,this.core.process(A),A.tokens},k.prototype.renderInline=function(N,D){return D=D||{},this.renderer.render(this.parseInline(N,D),this.options,D)},Dx=k,Dx}var kx,MM;function Qz(){return MM||(MM=1,kx=Wz()),kx}var Kz=Qz();const Xz=Du(Kz);var Zz="production",LM=typeof process>"u"||process.env===void 0?Zz:"production",jl=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},Lm={measureLayout:jl(["layout","layoutId","drag"]),animation:jl(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:jl(["exit"]),drag:jl(["drag","dragControls"]),focus:jl(["whileFocus"]),hover:jl(["whileHover","onHoverStart","onHoverEnd"]),tap:jl(["whileTap","onTap","onTapStart","onTapCancel"]),pan:jl(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:jl(["whileInView","onViewportEnter","onViewportLeave"])};function Jz(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?Lm.projectionNodeConstructor=e[t]:Lm[t].Component=e[t])}var w0=function(){},IM=L.createContext({strict:!1}),FM=Object.keys(Lm),eH=FM.length;function tH(e,t,n){var r=[],i=L.useContext(IM);if(!t)return null;LM!=="production"&&n&&i.strict;for(var o=0;o<eH;o++){var l=FM[o],c=Lm[l],p=c.isEnabled,d=c.Component;p(e)&&d&&r.push(L.createElement(d,Qe({key:l},e,{visualElement:t})))}return r}var C0=L.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),_0=L.createContext({});function nH(){return L.useContext(_0).visualElement}var N0=L.createContext(null),rp=typeof document<"u",Rx=rp?L.useLayoutEffect:L.useEffect,Mx={current:null},PM=!1;function rH(){if(PM=!0,!!rp)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Mx.current=e.matches};e.addListener(t),t()}else Mx.current=!1}function iH(){!PM&&rH();var e=yr(L.useState(Mx.current),1),t=e[0];return t}function oH(){var e=iH(),t=L.useContext(C0).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function aH(e,t,n,r){var i=L.useContext(IM),o=nH(),l=L.useContext(N0),c=oH(),p=L.useRef(void 0);r||(r=i.renderer),!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceId:l?.id,blockInitialAnimation:l?.initial===!1,shouldReduceMotion:c}));var d=p.current;return Rx(function(){d?.syncRender()}),L.useEffect(function(){var m;(m=d?.animationState)===null||m===void 0||m.animateChanges()}),Rx(function(){return function(){return d?.notifyUnmount()}},[]),d}function ip(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sH(e,t,n){return L.useCallback(function(r){var i;r&&((i=e.mount)===null||i===void 0||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ip(n)&&(n.current=r))},[t])}function jM(e){return Array.isArray(e)}function as(e){return typeof e=="string"||jM(e)}function lH(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function uH(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function VM(e,t,n,r,i){var o;return r===void 0&&(r={}),i===void 0&&(i={}),typeof t=="function"&&(t=t(n??e.custom,r,i)),typeof t=="string"&&(t=(o=e.variants)===null||o===void 0?void 0:o[t]),typeof t=="function"&&(t=t(n??e.custom,r,i)),t}function A0(e,t,n){var r=e.getProps();return VM(r,t,n??r.custom,lH(e),uH(e))}function O0(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||as(e.initial)||as(e.animate)||as(e.whileHover)||as(e.whileDrag)||as(e.whileTap)||as(e.whileFocus)||as(e.exit)}function UM(e){return!!(O0(e)||e.variants)}function cH(e,t){if(O0(e)){var n=e.initial,r=e.animate;return{initial:n===!1||as(n)?n:void 0,animate:as(r)?r:void 0}}return e.inherit!==!1?t:{}}function fH(e){var t=cH(e,L.useContext(_0)),n=t.initial,r=t.animate;return L.useMemo(function(){return{initial:n,animate:r}},[qM(n),qM(r)])}function qM(e){return Array.isArray(e)?e.join(" "):e}function zu(e){var t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}var Im={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dH=1;function pH(){return zu(function(){if(Im.hasEverUpdated)return dH++})}var BM=L.createContext({}),$M=L.createContext({});function hH(e,t,n,r){var i,o=t.layoutId,l=t.layout,c=t.drag,p=t.dragConstraints,d=t.layoutScroll,m=L.useContext($M);!r||!n||n?.projection||(n.projection=new r(e,n.getLatestValues(),(i=n.parent)===null||i===void 0?void 0:i.projection),n.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||p&&ip(p),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof l=="string"?l:"both",initialPromotionConfig:m,layoutScroll:d}))}var mH=function(e){sk(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var n=this.props,r=n.visualElement,i=n.props;r&&r.setProps(i)},t.prototype.render=function(){return this.props.children},t}(Ae.Component);function gH(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,i=e.useRender,o=e.useVisualState,l=e.Component;t&&Jz(t);function c(p,d){var m=vH(p);p=Qe(Qe({},p),{layoutId:m});var b=L.useContext(C0),E=null,y=fH(p),x=b.isStatic?void 0:pH(),w=o(p,b.isStatic);return!b.isStatic&&rp&&(y.visualElement=aH(l,w,Qe(Qe({},b),p),n),hH(x,p,y.visualElement,r||Lm.projectionNodeConstructor),E=tH(p,y.visualElement,t)),L.createElement(mH,{visualElement:y.visualElement,props:Qe(Qe({},b),p)},E,L.createElement(_0.Provider,{value:y},i(l,p,x,sH(w,y.visualElement,d),w,b.isStatic,y.visualElement)))}return L.forwardRef(c)}function vH(e){var t,n=e.layoutId,r=(t=L.useContext(BM))===null||t===void 0?void 0:t.id;return r&&n!==void 0?r+"-"+n:n}function yH(e){function t(r,i){return i===void 0&&(i={}),gH(e(r,i))}if(typeof Proxy>"u")return t;var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var bH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Lx(e){return typeof e!="string"||e.includes("-")?!1:!!(bH.indexOf(e)>-1||/[A-Z]/.test(e))}var D0={};function EH(e){Object.assign(D0,e)}var Ix=["","X","Y","Z"],SH=["translate","scale","rotate","skew"],Fm=["transformPerspective","x","y","z"];SH.forEach(function(e){return Ix.forEach(function(t){return Fm.push(e+t)})});function TH(e,t){return Fm.indexOf(e)-Fm.indexOf(t)}var xH=new Set(Fm);function Pm(e){return xH.has(e)}var wH=new Set(["originX","originY","originZ"]);function zM(e){return wH.has(e)}function HM(e,t){var n=t.layout,r=t.layoutId;return Pm(e)||zM(e)||(n||r!==void 0)&&(!!D0[e]||e==="opacity")}var Hs=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},CH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function _H(e,t,n,r){var i=e.transform,o=e.transformKeys,l=t.enableHardwareAcceleration,c=l===void 0?!0:l,p=t.allowTransformNone,d=p===void 0?!0:p,m="";o.sort(TH);for(var b=!1,E=o.length,y=0;y<E;y++){var x=o[y];m+="".concat(CH[x]||x,"(").concat(i[x],") "),x==="z"&&(b=!0)}return!b&&c?m+="translateZ(0)":m=m.trim(),r?m=r(i,n?"":m):d&&n&&(m="none"),m}function NH(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,i=r===void 0?"50%":r,o=e.originZ,l=o===void 0?0:o;return"".concat(n," ").concat(i," ").concat(l)}function GM(e){return e.startsWith("--")}var AH=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const YM=(e,t)=>n=>Math.max(Math.min(n,t),e),jm=e=>e%1?Number(e.toFixed(5)):e,Vm=/(-)?([\d]*\.?[\d])+/g,Fx=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,OH=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Um(e){return typeof e=="string"}const Of={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qm=Object.assign(Object.assign({},Of),{transform:YM(0,1)}),k0=Object.assign(Object.assign({},Of),{default:1}),Bm=e=>({test:t=>Um(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Hu=Bm("deg"),Gs=Bm("%"),Lt=Bm("px"),DH=Bm("vh"),kH=Bm("vw"),WM=Object.assign(Object.assign({},Gs),{parse:e=>Gs.parse(e)/100,transform:e=>Gs.transform(e*100)}),Px=(e,t)=>n=>!!(Um(n)&&OH.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),QM=(e,t,n)=>r=>{if(!Um(r))return r;const[i,o,l,c]=r.match(Vm);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Df={test:Px("hsl","hue"),parse:QM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gs.transform(jm(t))+", "+Gs.transform(jm(n))+", "+jm(qm.transform(r))+")"},RH=YM(0,255),jx=Object.assign(Object.assign({},Of),{transform:e=>Math.round(RH(e))}),Gu={test:Px("rgb","red"),parse:QM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+jm(qm.transform(r))+")"};function MH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Vx={test:Px("#"),parse:MH,transform:Gu.transform},uo={test:e=>Gu.test(e)||Vx.test(e)||Df.test(e),parse:e=>Gu.test(e)?Gu.parse(e):Df.test(e)?Df.parse(e):Vx.parse(e),transform:e=>Um(e)?e:e.hasOwnProperty("red")?Gu.transform(e):Df.transform(e)},KM="${c}",XM="${n}";function LH(e){var t,n,r,i;return isNaN(e)&&Um(e)&&((n=(t=e.match(Vm))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(Fx))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function ZM(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(Fx);r&&(n=r.length,e=e.replace(Fx,KM),t.push(...r.map(uo.parse)));const i=e.match(Vm);return i&&(e=e.replace(Vm,XM),t.push(...i.map(Of.parse))),{values:t,numColors:n,tokenised:e}}function JM(e){return ZM(e).values}function eL(e){const{values:t,numColors:n,tokenised:r}=ZM(e),i=t.length;return o=>{let l=r;for(let c=0;c<i;c++)l=l.replace(c<n?KM:XM,c<n?uo.transform(o[c]):jm(o[c]));return l}}const IH=e=>typeof e=="number"?0:e;function FH(e){const t=JM(e);return eL(e)(t.map(IH))}const Vl={test:LH,parse:JM,createTransformer:eL,getAnimatableNone:FH},PH=new Set(["brightness","contrast","saturate","opacity"]);function jH(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vm)||[];if(!r)return e;const i=n.replace(r,"");let o=PH.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const VH=/([a-z-]*)\(.*?\)/g,Ux=Object.assign(Object.assign({},Vl),{getAnimatableNone:e=>{const t=e.match(VH);return t?t.map(jH).join(" "):e}});var tL=Qe(Qe({},Of),{transform:Math.round}),nL={borderWidth:Lt,borderTopWidth:Lt,borderRightWidth:Lt,borderBottomWidth:Lt,borderLeftWidth:Lt,borderRadius:Lt,radius:Lt,borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomRightRadius:Lt,borderBottomLeftRadius:Lt,width:Lt,maxWidth:Lt,height:Lt,maxHeight:Lt,size:Lt,top:Lt,right:Lt,bottom:Lt,left:Lt,padding:Lt,paddingTop:Lt,paddingRight:Lt,paddingBottom:Lt,paddingLeft:Lt,margin:Lt,marginTop:Lt,marginRight:Lt,marginBottom:Lt,marginLeft:Lt,rotate:Hu,rotateX:Hu,rotateY:Hu,rotateZ:Hu,scale:k0,scaleX:k0,scaleY:k0,scaleZ:k0,skew:Hu,skewX:Hu,skewY:Hu,distance:Lt,translateX:Lt,translateY:Lt,translateZ:Lt,x:Lt,y:Lt,z:Lt,perspective:Lt,transformPerspective:Lt,opacity:qm,originX:WM,originY:WM,originZ:Lt,zIndex:tL,fillOpacity:qm,strokeOpacity:qm,numOctaves:tL};function qx(e,t,n,r){var i,o=e.style,l=e.vars,c=e.transform,p=e.transformKeys,d=e.transformOrigin;p.length=0;var m=!1,b=!1,E=!0;for(var y in t){var x=t[y];if(GM(y)){l[y]=x;continue}var w=nL[y],k=AH(x,w);if(Pm(y)){if(m=!0,c[y]=k,p.push(y),!E)continue;x!==((i=w.default)!==null&&i!==void 0?i:0)&&(E=!1)}else zM(y)?(d[y]=k,b=!0):o[y]=k}m?o.transform=_H(e,n,E,r):r?o.transform=r({},""):!t.transform&&o.transform&&(o.transform="none"),b&&(o.transformOrigin=NH(d))}var Bx=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function rL(e,t,n){for(var r in t)!Hs(t[r])&&!HM(r,n)&&(e[r]=t[r])}function UH(e,t,n){var r=e.transformTemplate;return L.useMemo(function(){var i=Bx();qx(i,t,{enableHardwareAcceleration:!n},r);var o=i.vars,l=i.style;return Qe(Qe({},o),l)},[t])}function qH(e,t,n){var r=e.style||{},i={};return rL(i,r,e),Object.assign(i,UH(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function BH(e,t,n){var r={},i=qH(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),r.style=i,r}var $H=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function R0(e){return $H.has(e)}var iL=function(e){return!R0(e)};function zH(e){e&&(iL=function(t){return t.startsWith("on")?!R0(t):e(t)})}try{zH(require("@emotion/is-prop-valid").default)}catch{}function HH(e,t,n){var r={};for(var i in e)(iL(i)||n===!0&&R0(i)||!t&&!R0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function oL(e,t,n){return typeof e=="string"?e:Lt.transform(t+n*e)}function GH(e,t,n){var r=oL(t,e.x,e.width),i=oL(n,e.y,e.height);return"".concat(r," ").concat(i)}var YH={offset:"strokeDashoffset",array:"strokeDasharray"};function WH(e,t,n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),e.pathLength=1;var o=YH;e[o.offset]=Lt.transform(-r);var l=Lt.transform(t),c=Lt.transform(n);e[o.array]="".concat(l," ").concat(c)}function $x(e,t,n,r){var i=t.attrX,o=t.attrY,l=t.originX,c=t.originY,p=t.pathLength,d=t.pathSpacing,m=d===void 0?1:d,b=t.pathOffset,E=b===void 0?0:b,y=Gi(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);qx(e,y,n,r),e.attrs=e.style,e.style={};var x=e.attrs,w=e.style,k=e.dimensions;x.transform&&(k&&(w.transform=x.transform),delete x.transform),k&&(l!==void 0||c!==void 0||w.transform)&&(w.transformOrigin=GH(k,l!==void 0?l:.5,c!==void 0?c:.5)),i!==void 0&&(x.x=i),o!==void 0&&(x.y=o),p!==void 0&&WH(x,p,m,E)}var aL=function(){return Qe(Qe({},Bx()),{attrs:{}})};function QH(e,t){var n=L.useMemo(function(){var i=aL();return $x(i,t,{enableHardwareAcceleration:!1},e.transformTemplate),Qe(Qe({},i.attrs),{style:Qe({},i.style)})},[t]);if(e.style){var r={};rL(r,e.style,e),n.style=Qe(Qe({},r),n.style)}return n}function KH(e){e===void 0&&(e=!1);var t=function(n,r,i,o,l,c){var p=l.latestValues,d=Lx(n)?QH:BH,m=d(r,p,c),b=HH(r,typeof n=="string",e),E=Qe(Qe(Qe({},b),m),{ref:o});return i&&(E["data-projection-id"]=i),L.createElement(n,E)};return t}var XH=/([a-z])([A-Z])/g,ZH="$1-$2",sL=function(e){return e.replace(XH,ZH).toLowerCase()};function lL(e,t,n,r){var i=t.style,o=t.vars;Object.assign(e.style,i,r&&r.getProjectionStyles(n));for(var l in o)e.style.setProperty(l,o[l])}var uL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function cL(e,t,n,r){lL(e,t,void 0,r);for(var i in t.attrs)e.setAttribute(uL.has(i)?i:sL(i),t.attrs[i])}function zx(e){var t=e.style,n={};for(var r in t)(Hs(t[r])||HM(r,e))&&(n[r]=t[r]);return n}function fL(e){var t=zx(e);for(var n in e)if(Hs(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Hx(e){return typeof e=="object"&&typeof e.start=="function"}var $m=function(e){return Array.isArray(e)},JH=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},dL=function(e){return $m(e)?e[e.length-1]||0:e};function M0(e){var t=Hs(e)?e.get():e;return JH(t)?t.toValue():t}function pL(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,l=e.onMount,c={latestValues:eG(t,n,r,i),renderState:o()};return l&&(c.mount=function(p){return l(t,p,c)}),c}var hL=function(e){return function(t,n){var r=L.useContext(_0),i=L.useContext(N0);return n?pL(e,t,r,i):zu(function(){return pL(e,t,r,i)})}};function eG(e,t,n,r){var i={},o=n?.initial===!1,l=r(e);for(var c in l)i[c]=M0(l[c]);var p=e.initial,d=e.animate,m=O0(e),b=UM(e);t&&b&&!m&&e.inherit!==!1&&(p??(p=t.initial),d??(d=t.animate));var E=o||p===!1,y=E?d:p;if(y&&typeof y!="boolean"&&!Hx(y)){var x=Array.isArray(y)?y:[y];x.forEach(function(w){var k=VM(e,w);if(k){var N=k.transitionEnd;k.transition;var D=Gi(k,["transitionEnd","transition"]);for(var A in D){var C=D[A];if(Array.isArray(C)){var M=E?C.length-1:0;C=C[M]}C!==null&&(i[A]=C)}for(var A in N)i[A]=N[A]}})}return i}var tG={useVisualState:hL({scrapeMotionValuesFromProps:fL,createRenderState:aL,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}$x(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),cL(t,r)}})},nG={useVisualState:hL({scrapeMotionValuesFromProps:zx,createRenderState:Bx})};function rG(e,t,n,r,i){var o=t.forwardMotionProps,l=o===void 0?!1:o,c=Lx(e)?tG:nG;return Qe(Qe({},c),{preloadedFeatures:n,useRender:KH(l),createVisualElement:r,projectionNodeConstructor:i,Component:e})}var er;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(er||(er={}));function L0(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function Gx(e,t,n,r){L.useEffect(function(){var i=e.current;if(n&&i)return L0(i,t,n,r)},[e,t,n,r])}function iG(e){var t=e.whileFocus,n=e.visualElement,r=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(er.Focus,!0)},i=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(er.Focus,!1)};Gx(n,"focus",t?r:void 0),Gx(n,"blur",t?i:void 0)}function mL(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function gL(e){var t=!!e.touches;return t}function oG(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var aG={pageX:0,pageY:0};function sG(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||aG;return{x:r[t+"X"],y:r[t+"Y"]}}function lG(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Yx(e,t){return t===void 0&&(t="page"),{point:gL(e)?sG(e,t):lG(e,t)}}var vL=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,Yx(r))};return t?oG(n):n},uG=function(){return rp&&window.onpointerdown===null},cG=function(){return rp&&window.ontouchstart===null},fG=function(){return rp&&window.onmousedown===null},dG={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},pG={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function yL(e){return uG()?e:cG()?pG[e]:fG()?dG[e]:e}function op(e,t,n,r){return L0(e,yL(t),vL(n,t==="pointerdown"),r)}function I0(e,t,n,r){return Gx(e,yL(t),n&&vL(n,t==="pointerdown"),r)}function bL(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var EL=bL("dragHorizontal"),SL=bL("dragVertical");function TL(e){var t=!1;if(e==="y")t=SL();else if(e==="x")t=EL();else{var n=EL(),r=SL();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function xL(){var e=TL(!0);return e?(e(),!1):!0}function wL(e,t,n){return function(r,i){var o;!mL(r)||xL()||((o=e.animationState)===null||o===void 0||o.setActive(er.Hover,t),n?.(r,i))}}function hG(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;I0(i,"pointerenter",t||r?wL(i,!0,t):void 0,{passive:!t}),I0(i,"pointerleave",n||r?wL(i,!1,n):void 0,{passive:!n})}var CL=function(e,t){return t?e===t?!0:CL(e,t.parentElement):!1};function _L(e){return L.useEffect(function(){return function(){return e()}},[])}const F0=(e,t,n)=>Math.min(Math.max(n,e),t),Wx=.001,mG=.01,gG=10,vG=.05,yG=1;function bG({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,l=1-t;l=F0(vG,yG,l),e=F0(mG,gG,e/1e3),l<1?(i=d=>{const m=d*l,b=m*e,E=m-n,y=Qx(d,l),x=Math.exp(-b);return Wx-E/y*x},o=d=>{const b=d*l*e,E=b*n+n,y=Math.pow(l,2)*Math.pow(d,2)*e,x=Math.exp(-b),w=Qx(Math.pow(d,2),l);return(-i(d)+Wx>0?-1:1)*((E-y)*x)/w}):(i=d=>{const m=Math.exp(-d*e),b=(d-n)*e+1;return-Wx+m*b},o=d=>{const m=Math.exp(-d*e),b=(n-d)*(e*e);return m*b});const c=5/e,p=SG(i,o,c);if(e=e*1e3,isNaN(p))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(p,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const EG=12;function SG(e,t,n){let r=n;for(let i=1;i<EG;i++)r=r-e(r)/t(r);return r}function Qx(e,t){return e*Math.sqrt(1-t*t)}const TG=["duration","bounce"],xG=["stiffness","damping","mass"];function NL(e,t){return t.some(n=>e[n]!==void 0)}function wG(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!NL(e,xG)&&NL(e,TG)){const n=bG(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Kx(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=Gi(e,["from","to","restSpeed","restDelta"]);const l={done:!1,value:t};let{stiffness:c,damping:p,mass:d,velocity:m,duration:b,isResolvedFromDuration:E}=wG(o),y=AL,x=AL;function w(){const k=m?-(m/1e3):0,N=n-t,D=p/(2*Math.sqrt(c*d)),A=Math.sqrt(c/d)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),D<1){const C=Qx(A,D);y=M=>{const j=Math.exp(-D*A*M);return n-j*((k+D*A*N)/C*Math.sin(C*M)+N*Math.cos(C*M))},x=M=>{const j=Math.exp(-D*A*M);return D*A*j*(Math.sin(C*M)*(k+D*A*N)/C+N*Math.cos(C*M))-j*(Math.cos(C*M)*(k+D*A*N)-C*N*Math.sin(C*M))}}else if(D===1)y=C=>n-Math.exp(-A*C)*(N+(k+A*N)*C);else{const C=A*Math.sqrt(D*D-1);y=M=>{const j=Math.exp(-D*A*M),P=Math.min(C*M,300);return n-j*((k+D*A*N)*Math.sinh(P)+C*N*Math.cosh(P))/C}}}return w(),{next:k=>{const N=y(k);if(E)l.done=k>=b;else{const D=x(k)*1e3,A=Math.abs(D)<=r,C=Math.abs(n-N)<=i;l.done=A&&C}return l.value=l.done?n:N,l},flipTarget:()=>{m=-m,[t,n]=[n,t],w()}}}Kx.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const AL=e=>0,zm=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Xx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function OL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,p=2*n-c;i=Xx(p,c,e+1/3),o=Xx(p,c,e),l=Xx(p,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}const CG=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},_G=[Vx,Gu,Df],DL=e=>_G.find(t=>t.test(e)),kL=(e,t)=>{let n=DL(e),r=DL(t),i=n.parse(e),o=r.parse(t);n===Df&&(i=OL(i),n=Gu),r===Df&&(o=OL(o),r=Gu);const l=Object.assign({},i);return c=>{for(const p in l)p!=="alpha"&&(l[p]=CG(i[p],o[p],c));return l.alpha=wr(i.alpha,o.alpha,c),n.transform(l)}},Zx=e=>typeof e=="number",NG=(e,t)=>n=>t(e(n)),P0=(...e)=>e.reduce(NG);function RL(e,t){return Zx(e)?n=>wr(e,t,n):uo.test(e)?kL(e,t):IL(e,t)}const ML=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,l)=>RL(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}},AG=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=RL(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function LL(e){const t=Vl.parse(e),n=t.length;let r=0,i=0,o=0;for(let l=0;l<n;l++)r||typeof t[l]=="number"?r++:t[l].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const IL=(e,t)=>{const n=Vl.createTransformer(t),r=LL(e),i=LL(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?P0(ML(r.parsed,i.parsed),n):l=>`${l>0?t:e}`},OG=(e,t)=>n=>wr(e,t,n);function DG(e){if(typeof e=="number")return OG;if(typeof e=="string")return uo.test(e)?kL:IL;if(Array.isArray(e))return ML;if(typeof e=="object")return AG}function kG(e,t,n){const r=[],i=n||DG(e[0]),o=e.length-1;for(let l=0;l<o;l++){let c=i(e[l],e[l+1]);if(t){const p=Array.isArray(t)?t[l]:t;c=P0(p,c)}r.push(c)}return r}function RG([e,t],[n]){return r=>n(zm(e,t,r))}function MG(e,t){const n=e.length,r=n-1;return i=>{let o=0,l=!1;if(i<=e[0]?l=!0:i>=e[r]&&(o=r-1,l=!0),!l){let p=1;for(;p<n&&!(e[p]>i||p===r);p++);o=p-1}const c=zm(e[o],e[o+1],i);return t[o](c)}}function Jx(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;w0(o===t.length),w0(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const l=kG(t,r,i),c=o===2?RG(e,l):MG(e,l);return n?p=>c(F0(e[0],e[o-1],p)):c}const j0=e=>t=>1-e(1-t),ew=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,LG=e=>t=>Math.pow(t,e),FL=e=>t=>t*t*((e+1)*t-e),IG=e=>{const t=FL(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},PL=1.525,FG=4/11,PG=8/11,jG=9/10,tw=e=>e,nw=LG(2),VG=j0(nw),jL=ew(nw),VL=e=>1-Math.sin(Math.acos(e)),rw=j0(VL),UG=ew(rw),iw=FL(PL),qG=j0(iw),BG=ew(iw),$G=IG(PL),zG=4356/361,HG=35442/1805,GG=16061/1805,V0=e=>{if(e===1||e===0)return e;const t=e*e;return e<FG?7.5625*t:e<PG?9.075*t-9.9*e+3.4:e<jG?zG*t-HG*e+GG:10.8*e*e-20.52*e+10.72},YG=j0(V0),WG=e=>e<.5?.5*(1-V0(1-e*2)):.5*V0(e*2-1)+.5;function QG(e,t){return e.map(()=>t||jL).splice(0,e.length-1)}function KG(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function XG(e,t){return e.map(n=>n*t)}function U0({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},l=Array.isArray(t)?t:[e,t],c=XG(r&&r.length===l.length?r:KG(l),i);function p(){return Jx(c,l,{ease:Array.isArray(n)?n:QG(l,n)})}let d=p();return{next:m=>(o.value=d(m),o.done=m>=i,o),flipTarget:()=>{l.reverse(),d=p()}}}function ZG({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const l={done:!1,value:t};let c=n*e;const p=t+c,d=o===void 0?p:o(p);return d!==p&&(c=d-t),{next:m=>{const b=-c*Math.exp(-m/r);return l.done=!(b>i||b<-i),l.value=l.done?d:d+b,l},flipTarget:()=>{}}}const UL={keyframes:U0,spring:Kx,decay:ZG};function JG(e){if(Array.isArray(e.to))return U0;if(UL[e.type])return UL[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?U0:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Kx:U0}const qL=1/60*1e3,eY=typeof performance<"u"?()=>performance.now():()=>Date.now(),BL=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(eY()),qL);function tY(e){let t=[],n=[],r=0,i=!1,o=!1;const l=new WeakSet,c={schedule:(p,d=!1,m=!1)=>{const b=m&&i,E=b?t:n;return d&&l.add(p),E.indexOf(p)===-1&&(E.push(p),b&&i&&(r=t.length)),p},cancel:p=>{const d=n.indexOf(p);d!==-1&&n.splice(d,1),l.delete(p)},process:p=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let d=0;d<r;d++){const m=t[d];m(p),l.has(m)&&(c.schedule(m),e())}i=!1,o&&(o=!1,c.process(p))}};return c}const nY=40;let ow=!0,Hm=!1,aw=!1;const ap={delta:0,timestamp:0},Gm=["read","update","preRender","render","postRender"],q0=Gm.reduce((e,t)=>(e[t]=tY(()=>Hm=!0),e),{}),ss=Gm.reduce((e,t)=>{const n=q0[t];return e[t]=(r,i=!1,o=!1)=>(Hm||iY(),n.schedule(r,i,o)),e},{}),sp=Gm.reduce((e,t)=>(e[t]=q0[t].cancel,e),{}),sw=Gm.reduce((e,t)=>(e[t]=()=>q0[t].process(ap),e),{}),rY=e=>q0[e].process(ap),$L=e=>{Hm=!1,ap.delta=ow?qL:Math.max(Math.min(e-ap.timestamp,nY),1),ap.timestamp=e,aw=!0,Gm.forEach(rY),aw=!1,Hm&&(ow=!1,BL($L))},iY=()=>{Hm=!0,ow=!0,aw||BL($L)},B0=()=>ap;function zL(e,t,n=0){return e-t-n}function oY(e,t,n=0,r=!0){return r?zL(t+-e,t,n):t-(e-t)+n}function aY(e,t,n,r){return r?e>=t+n:e<=-n}const sY=e=>{const t=({delta:n})=>e(n);return{start:()=>ss.update(t,!0),stop:()=>sp.update(t)}};function HL(e){var t,n,{from:r,autoplay:i=!0,driver:o=sY,elapsed:l=0,repeat:c=0,repeatType:p="loop",repeatDelay:d=0,onPlay:m,onStop:b,onComplete:E,onRepeat:y,onUpdate:x}=e,w=Gi(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=w,N,D=0,A=w.duration,C,M=!1,j=!0,P;const F=JG(w);!((n=(t=F).needsInterpolation)===null||n===void 0)&&n.call(t,r,k)&&(P=Jx([0,100],[r,k],{clamp:!1}),r=0,k=100);const V=F(Object.assign(Object.assign({},w),{from:r,to:k}));function $(){D++,p==="reverse"?(j=D%2===0,l=oY(l,A,d,j)):(l=zL(l,A,d),p==="mirror"&&V.flipTarget()),M=!1,y&&y()}function X(){N.stop(),E&&E()}function J(Q){if(j||(Q=-Q),l+=Q,!M){const B=V.next(Math.max(0,l));C=B.value,P&&(C=P(C)),M=j?B.done:l<=0}x?.(C),M&&(D===0&&(A??(A=l)),D<c?aY(l,A,d,j)&&$():X())}function ee(){m?.(),N=o(J),N.start()}return i&&ee(),{stop:()=>{b?.(),N.stop()}}}function GL(e,t){return t?e*(1e3/t):0}function lY({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:l=500,bounceDamping:c=10,restDelta:p=1,modifyTarget:d,driver:m,onUpdate:b,onComplete:E,onStop:y}){let x;function w(A){return n!==void 0&&A<n||r!==void 0&&A>r}function k(A){return n===void 0?r:r===void 0||Math.abs(n-A)<Math.abs(r-A)?n:r}function N(A){x?.stop(),x=HL(Object.assign(Object.assign({},A),{driver:m,onUpdate:C=>{var M;b?.(C),(M=A.onUpdate)===null||M===void 0||M.call(A,C)},onComplete:E,onStop:y}))}function D(A){N(Object.assign({type:"spring",stiffness:l,damping:c,restDelta:p},A))}if(w(e))D({from:e,velocity:t,to:k(e)});else{let A=i*t+e;typeof d<"u"&&(A=d(A));const C=k(A),M=C===n?-1:1;let j,P;const F=V=>{j=P,P=V,t=GL(V-j,B0().delta),(M===1&&V>C||M===-1&&V<C)&&D({from:V,to:C,velocity:t})};N({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:p,modifyTarget:d,onUpdate:w(A)?F:void 0})}return{stop:()=>x?.stop()}}const lw=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),YL=e=>lw(e)&&e.hasOwnProperty("z"),$0=(e,t)=>Math.abs(e-t);function WL(e,t){if(Zx(e)&&Zx(t))return $0(e,t);if(lw(e)&&lw(t)){const n=$0(e.x,t.x),r=$0(e.y,t.y),i=YL(e)&&YL(t)?$0(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const QL=(e,t)=>1-3*t+3*e,KL=(e,t)=>3*t-6*e,XL=e=>3*e,z0=(e,t,n)=>((QL(t,n)*e+KL(t,n))*e+XL(t))*e,ZL=(e,t,n)=>3*QL(t,n)*e*e+2*KL(t,n)*e+XL(t),uY=1e-7,cY=10;function fY(e,t,n,r,i){let o,l,c=0;do l=t+(n-t)/2,o=z0(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>uY&&++c<cY);return l}const dY=8,pY=.001;function hY(e,t,n,r){for(let i=0;i<dY;++i){const o=ZL(t,n,r);if(o===0)return t;const l=z0(t,n,r)-e;t-=l/o}return t}const H0=11,G0=1/(H0-1);function mY(e,t,n,r){if(e===t&&n===r)return tw;const i=new Float32Array(H0);for(let l=0;l<H0;++l)i[l]=z0(l*G0,e,n);function o(l){let c=0,p=1;const d=H0-1;for(;p!==d&&i[p]<=l;++p)c+=G0;--p;const m=(l-i[p])/(i[p+1]-i[p]),b=c+m*G0,E=ZL(b,e,n);return E>=pY?hY(l,b,e,n):E===0?b:fY(l,c,c+G0,e,n)}return l=>l===0||l===1?l:z0(o(l),t,r)}function gY(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,l=t||n||r||i,c=L.useRef(!1),p=L.useRef(null),d={passive:!(n||t||r||x)};function m(){var w;(w=p.current)===null||w===void 0||w.call(p),p.current=null}function b(){var w;return m(),c.current=!1,(w=o.animationState)===null||w===void 0||w.setActive(er.Tap,!1),!xL()}function E(w,k){b()&&(CL(o.getInstance(),w.target)?t?.(w,k):r?.(w,k))}function y(w,k){b()&&r?.(w,k)}function x(w,k){var N;m(),!c.current&&(c.current=!0,p.current=P0(op(window,"pointerup",E,d),op(window,"pointercancel",y,d)),(N=o.animationState)===null||N===void 0||N.setActive(er.Tap,!0),n?.(w,k))}I0(o,"pointerdown",l?x:void 0,d),_L(m)}var JL=new Set;function vY(e,t,n){JL.has(t)||(console.warn(t),JL.add(t))}var uw=new WeakMap,cw=new WeakMap,yY=function(e){var t;(t=uw.get(e.target))===null||t===void 0||t(e)},bY=function(e){e.forEach(yY)};function EY(e){var t=e.root,n=Gi(e,["root"]),r=t||document;cw.has(r)||cw.set(r,{});var i=cw.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(bY,Qe({root:t},n))),i[o]}function SY(e,t,n){var r=EY(t);return uw.set(e,n),r.observe(e),function(){uw.delete(e),r.unobserve(e)}}function TY(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,l=o===void 0?{}:o,c=L.useRef({hasEnteredView:!1,isInView:!1}),p=!!(n||r||i);l.once&&c.current.hasEnteredView&&(p=!1);var d=typeof IntersectionObserver>"u"?CY:wY;d(p,c.current,t,l)}var xY={some:0,all:1};function wY(e,t,n,r){var i=r.root,o=r.margin,l=r.amount,c=l===void 0?"some":l,p=r.once;L.useEffect(function(){if(e){var d={root:i?.current,rootMargin:o,threshold:typeof c=="number"?c:xY[c]},m=function(b){var E,y=b.isIntersecting;if(t.isInView!==y&&(t.isInView=y,!(p&&!y&&t.hasEnteredView))){y&&(t.hasEnteredView=!0),(E=n.animationState)===null||E===void 0||E.setActive(er.InView,y);var x=n.getProps(),w=y?x.onViewportEnter:x.onViewportLeave;w?.(b)}};return SY(n.getInstance(),d,m)}},[e,i,o,c])}function CY(e,t,n,r){var i=r.fallback,o=i===void 0?!0:i;L.useEffect(function(){!e||!o||(LM!=="production"&&vY(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var l;t.hasEnteredView=!0;var c=n.getProps().onViewportEnter;c?.(null),(l=n.animationState)===null||l===void 0||l.setActive(er.InView,!0)}))},[e])}var Yu=function(e){return function(t){return e(t),null}},_Y={inView:Yu(TY),tap:Yu(gY),focus:Yu(iG),hover:Yu(hG)},NY=0,AY=function(){return NY++},OY=function(){return zu(AY)};function eI(){var e=L.useContext(N0);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=OY();L.useEffect(function(){return r(i)},[]);var o=function(){return n?.(i)};return!t&&n?[!1,o]:[!0]}function tI(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Y0=function(e){return e*1e3},DY={linear:tw,easeIn:nw,easeInOut:jL,easeOut:VG,circIn:VL,circInOut:UG,circOut:rw,backIn:iw,backInOut:BG,backOut:qG,anticipate:$G,bounceIn:YG,bounceInOut:WG,bounceOut:V0},nI=function(e){if(Array.isArray(e)){w0(e.length===4);var t=yr(e,4),n=t[0],r=t[1],i=t[2],o=t[3];return mY(n,r,i,o)}else if(typeof e=="string")return DY[e];return e},kY=function(e){return Array.isArray(e)&&typeof e[0]!="number"},rI=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Vl.test(t)&&!t.startsWith("url("))},kf=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},W0=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},fw=function(){return{type:"keyframes",ease:"linear",duration:.3}},RY=function(e){return{type:"keyframes",duration:.8,values:e}},iI={x:kf,y:kf,z:kf,rotate:kf,rotateX:kf,rotateY:kf,rotateZ:kf,scaleX:W0,scaleY:W0,scale:W0,opacity:fw,backgroundColor:fw,color:fw,default:W0},MY=function(e,t){var n;return $m(t)?n=RY:n=iI[e]||iI.default,Qe({to:t},n(t))},LY=Qe(Qe({},nL),{color:uo,backgroundColor:uo,outlineColor:uo,fill:uo,stroke:uo,borderColor:uo,borderTopColor:uo,borderRightColor:uo,borderBottomColor:uo,borderLeftColor:uo,filter:Ux,WebkitFilter:Ux}),dw=function(e){return LY[e]};function pw(e,t){var n,r=dw(e);return r!==Ux&&(r=Vl),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function IY(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Gi(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}function FY(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,o=e.loop,l=Gi(e,["ease","times","yoyo","flip","loop"]),c=Qe({},l);return n&&(c.offset=n),l.duration&&(c.duration=Y0(l.duration)),l.repeatDelay&&(c.repeatDelay=Y0(l.repeatDelay)),t&&(c.ease=kY(t)?t.map(nI):nI(t)),l.type==="tween"&&(c.type="keyframes"),(r||o||i)&&(r?c.repeatType="reverse":o?c.repeatType="loop":i&&(c.repeatType="mirror"),c.repeat=o||r||i||l.repeat),l.type!=="spring"&&(c.type="keyframes"),c}function PY(e,t){var n,r,i=hw(e,t)||{};return(r=(n=i.delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function jY(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=ns([],yr(e.to),!1),e.to[0]=e.from),e}function VY(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),jY(t),IY(e)||(e=Qe(Qe({},e),MY(n,t.to))),Qe(Qe({},t),FY(e))}function UY(e,t,n,r,i){var o,l=hw(r,e),c=(o=l.from)!==null&&o!==void 0?o:t.get(),p=rI(e,n);c==="none"&&p&&typeof n=="string"?c=pw(e,n):oI(c)&&typeof n=="string"?c=aI(n):!Array.isArray(n)&&oI(n)&&typeof c=="string"&&(n=aI(c));var d=rI(e,c);function m(){var E={from:c,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(y){return t.set(y)}};return l.type==="inertia"||l.type==="decay"?lY(Qe(Qe({},E),l)):HL(Qe(Qe({},VY(l,E,e)),{onUpdate:function(y){var x;E.onUpdate(y),(x=l.onUpdate)===null||x===void 0||x.call(l,y)},onComplete:function(){var y;E.onComplete(),(y=l.onComplete)===null||y===void 0||y.call(l)}}))}function b(){var E,y,x=dL(n);return t.set(x),i(),(E=l?.onUpdate)===null||E===void 0||E.call(l,x),(y=l?.onComplete)===null||y===void 0||y.call(l),{stop:function(){}}}return!d||!p||l.type===!1?b:m}function oI(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function aI(e){return typeof e=="number"?0:pw("",e)}function hw(e,t){return e[t]||e.default||e}function mw(e,t,n,r){return r===void 0&&(r={}),t.start(function(i){var o,l,c=UY(e,t,n,r,i),p=PY(r,e),d=function(){return l=c()};return p?o=window.setTimeout(d,Y0(p)):d(),function(){clearTimeout(o),l?.stop()}})}var qY=function(e){return/^\-?\d*\.?\d+$/.test(e)},BY=function(e){return/^0[^.\s]+$/.test(e)};function gw(e,t){e.indexOf(t)===-1&&e.push(t)}function vw(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function $Y(e,t,n){var r=yr(e),i=r.slice(0),o=t<0?i.length+t:t;if(o>=0&&o<i.length){var l=n<0?i.length+n:n,c=yr(i.splice(t,1),1),p=c[0];i.splice(l,0,p)}return i}var Ym=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return gw(this.subscriptions,t),function(){return vw(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var o=0;o<i;o++){var l=this.subscriptions[o];l&&l(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),zY=function(e){return!isNaN(parseFloat(e))},HY=function(){function e(t){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ym,this.velocityUpdateSubscribers=new Ym,this.renderSubscribers=new Ym,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var o=B0(),l=o.delta,c=o.timestamp;n.lastUpdated!==c&&(n.timeDelta=l,n.lastUpdated=c,ss.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return ss.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=zY(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?GL(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Rf(e){return new HY(e)}var sI=function(e){return function(t){return t.test(e)}},GY={test:function(e){return e==="auto"},parse:function(e){return e}},lI=[Of,Lt,Gs,Hu,kH,DH,GY],Wm=function(e){return lI.find(sI(e))},YY=ns(ns([],yr(lI),!1),[uo,Vl],!1),WY=function(e){return YY.find(sI(e))};function QY(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rf(n))}function KY(e,t){var n=A0(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=i===void 0?{}:i;r.transition;var l=Gi(r,["transitionEnd","transition"]);l=Qe(Qe({},l),o);for(var c in l){var p=dL(l[c]);QY(e,c,p)}}function XY(e,t,n){var r,i,o,l,c=Object.keys(t).filter(function(y){return!e.hasValue(y)}),p=c.length;if(p)for(var d=0;d<p;d++){var m=c[d],b=t[m],E=null;Array.isArray(b)&&(E=b[0]),E===null&&(E=(i=(r=n[m])!==null&&r!==void 0?r:e.readValue(m))!==null&&i!==void 0?i:t[m]),E!=null&&(typeof E=="string"&&(qY(E)||BY(E))?E=parseFloat(E):!WY(E)&&Vl.test(b)&&(E=pw(m,b)),e.addValue(m,Rf(E)),(o=(l=n)[m])!==null&&o!==void 0||(l[m]=E),e.setBaseTarget(m,E))}}function ZY(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function JY(e,t,n){var r,i,o={};for(var l in e)o[l]=(r=ZY(l,t))!==null&&r!==void 0?r:(i=n.getValue(l))===null||i===void 0?void 0:i.get();return o}function eW(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart(t);var r;if(Array.isArray(t)){var i=t.map(function(l){return yw(e,l,n)});r=Promise.all(i)}else if(typeof t=="string")r=yw(e,t,n);else{var o=typeof t=="function"?A0(e,t,n.custom):t;r=uI(e,o,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function yw(e,t,n){var r;n===void 0&&(n={});var i=A0(e,t,n.custom),o=(i||{}).transition,l=o===void 0?e.getDefaultTransition()||{}:o;n.transitionOverride&&(l=n.transitionOverride);var c=i?function(){return uI(e,i,n)}:function(){return Promise.resolve()},p=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(y){y===void 0&&(y=0);var x=l.delayChildren,w=x===void 0?0:x,k=l.staggerChildren,N=l.staggerDirection;return tW(e,t,w+y,k,N,n)}:function(){return Promise.resolve()},d=l.when;if(d){var m=yr(d==="beforeChildren"?[c,p]:[p,c],2),b=m[0],E=m[1];return b().then(E)}else return Promise.all([c(),p(n.delay)])}function uI(e,t,n){var r,i=n===void 0?{}:n,o=i.delay,l=o===void 0?0:o,c=i.transitionOverride,p=i.type,d=e.makeTargetAnimatable(t),m=d.transition,b=m===void 0?e.getDefaultTransition():m,E=d.transitionEnd,y=Gi(d,["transition","transitionEnd"]);c&&(b=c);var x=[],w=p&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[p]);for(var k in y){var N=e.getValue(k),D=y[k];if(!(!N||D===void 0||w&&rW(w,k))){var A=Qe({delay:l},b);e.shouldReduceMotion&&Pm(k)&&(A=Qe(Qe({},A),{type:!1,delay:0}));var C=mw(k,N,D,A);x.push(C)}}return Promise.all(x).then(function(){E&&KY(e,E)})}function tW(e,t,n,r,i,o){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var l=[],c=(e.variantChildren.size-1)*r,p=i===1?function(d){return d===void 0&&(d=0),d*r}:function(d){return d===void 0&&(d=0),c-d*r};return Array.from(e.variantChildren).sort(nW).forEach(function(d,m){l.push(yw(d,t,Qe(Qe({},o),{delay:n+p(m)})).then(function(){return d.notifyAnimationComplete(t)}))}),Promise.all(l)}function nW(e,t){return e.sortNodePosition(t)}function rW(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,i}var bw=[er.Animate,er.InView,er.Focus,er.Hover,er.Tap,er.Drag,er.Exit],iW=ns([],yr(bw),!1).reverse(),oW=bw.length;function aW(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,i=n.options;return eW(e,r,i)}))}}function sW(e){var t=aW(e),n=uW(),r={},i=!0,o=function(m,b){var E=A0(e,b);if(E){E.transition;var y=E.transitionEnd,x=Gi(E,["transition","transitionEnd"]);m=Qe(Qe(Qe({},m),x),y)}return m};function l(m){return r[m]!==void 0}function c(m){t=m(e)}function p(m,b){for(var E,y=e.getProps(),x=e.getVariantContext(!0)||{},w=[],k=new Set,N={},D=1/0,A=function(P){var F=iW[P],V=n[F],$=(E=y[F])!==null&&E!==void 0?E:x[F],X=as($),J=F===b?V.isActive:null;J===!1&&(D=P);var ee=$===x[F]&&$!==y[F]&&X;if(ee&&i&&e.manuallyAnimateOnMount&&(ee=!1),V.protectedKeys=Qe({},N),!V.isActive&&J===null||!$&&!V.prevProp||Hx($)||typeof $=="boolean")return"continue";var Q=lW(V.prevProp,$),B=Q||F===b&&V.isActive&&!ee&&X||P>D&&X,ne=Array.isArray($)?$:[$],re=ne.reduce(o,{});J===!1&&(re={});var se=V.prevResolvedValues,fe=se===void 0?{}:se,Z=Qe(Qe({},fe),re),ge=function(he){B=!0,k.delete(he),V.needsAnimating[he]=!0};for(var ae in Z){var pe=re[ae],ce=fe[ae];N.hasOwnProperty(ae)||(pe!==ce?$m(pe)&&$m(ce)?!tI(pe,ce)||Q?ge(ae):V.protectedKeys[ae]=!0:pe!==void 0?ge(ae):k.add(ae):pe!==void 0&&k.has(ae)?ge(ae):V.protectedKeys[ae]=!0)}V.prevProp=$,V.prevResolvedValues=re,V.isActive&&(N=Qe(Qe({},N),re)),i&&e.blockInitialAnimation&&(B=!1),B&&!ee&&w.push.apply(w,ns([],yr(ne.map(function(he){return{animation:he,options:Qe({type:F},m)}})),!1))},C=0;C<oW;C++)A(C);if(r=Qe({},N),k.size){var M={};k.forEach(function(P){var F=e.getBaseTarget(P);F!==void 0&&(M[P]=F)}),w.push({animation:M})}var j=!!w.length;return i&&y.initial===!1&&!e.manuallyAnimateOnMount&&(j=!1),i=!1,j?t(w):Promise.resolve()}function d(m,b,E){var y;if(n[m].isActive===b)return Promise.resolve();(y=e.variantChildren)===null||y===void 0||y.forEach(function(k){var N;return(N=k.animationState)===null||N===void 0?void 0:N.setActive(m,b)}),n[m].isActive=b;var x=p(E,m);for(var w in n)n[w].protectedKeys={};return x}return{isAnimated:l,animateChanges:p,setActive:d,setAnimateFunction:c,getState:function(){return n}}}function lW(e,t){return typeof t=="string"?t!==e:jM(t)?!tI(t,e):!1}function Mf(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uW(){var e;return e={},e[er.Animate]=Mf(!0),e[er.InView]=Mf(),e[er.Hover]=Mf(),e[er.Tap]=Mf(),e[er.Drag]=Mf(),e[er.Focus]=Mf(),e[er.Exit]=Mf(),e}var cW={animation:Yu(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=sW(t)),Hx(n)&&L.useEffect(function(){return n.subscribe(t)},[n])}),exit:Yu(function(e){var t=e.custom,n=e.visualElement,r=yr(eI(),2),i=r[0],o=r[1],l=L.useContext(N0);L.useEffect(function(){var c,p;n.isPresent=i;var d=(c=n.animationState)===null||c===void 0?void 0:c.setActive(er.Exit,!i,{custom:(p=l?.custom)!==null&&p!==void 0?p:t});!i&&d?.then(o)},[i])})},cI=function(){function e(t,n,r){var i=this,o=r===void 0?{}:r,l=o.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var E=Sw(i.lastMoveEventInfo,i.history),y=i.startEvent!==null,x=WL(E.offset,{x:0,y:0})>=3;if(!(!y&&!x)){var w=E.point,k=B0().timestamp;i.history.push(Qe(Qe({},w),{timestamp:k}));var N=i.handlers,D=N.onStart,A=N.onMove;y||(D&&D(i.lastMoveEvent,E),i.startEvent=i.lastMoveEvent),A&&A(i.lastMoveEvent,E)}}},this.handlePointerMove=function(E,y){if(i.lastMoveEvent=E,i.lastMoveEventInfo=Ew(y,i.transformPagePoint),mL(E)&&E.buttons===0){i.handlePointerUp(E,y);return}ss.update(i.updatePoint,!0)},this.handlePointerUp=function(E,y){i.end();var x=i.handlers,w=x.onEnd,k=x.onSessionEnd,N=Sw(Ew(y,i.transformPagePoint),i.history);i.startEvent&&w&&w(E,N),k&&k(E,N)},!(gL(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=l;var c=Yx(t),p=Ew(c,this.transformPagePoint),d=p.point,m=B0().timestamp;this.history=[Qe(Qe({},d),{timestamp:m})];var b=n.onSessionStart;b&&b(t,Sw(p,this.history)),this.removeListeners=P0(op(window,"pointermove",this.handlePointerMove),op(window,"pointerup",this.handlePointerUp),op(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),sp.update(this.updatePoint)},e}();function Ew(e,t){return t?{point:t(e.point)}:e}function fI(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sw(e,t){var n=e.point;return{point:n,delta:fI(n,dI(t)),offset:fI(n,fW(t)),velocity:dW(t,.1)}}function fW(e){return e[0]}function dI(e){return e[e.length-1]}function dW(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=dI(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Y0(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};var l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Ul(e){return e.max-e.min}function pI(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),WL(e,t)<n}function hI(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=wr(t.min,t.max,e.origin),e.scale=Ul(n)/Ul(t),(pI(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=wr(n.min,n.max,e.origin)-e.originPoint,(pI(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Qm(e,t,n,r){hI(e.x,t.x,n.x,r?.originX),hI(e.y,t.y,n.y,r?.originY)}function mI(e,t,n){e.min=n.min+t.min,e.max=e.min+Ul(t)}function pW(e,t,n){mI(e.x,t.x,n.x),mI(e.y,t.y,n.y)}function gI(e,t,n){e.min=t.min-n.min,e.max=e.min+Ul(t)}function Km(e,t,n){gI(e.x,t.x,n.x),gI(e.y,t.y,n.y)}function hW(e,t,n){var r=t.min,i=t.max;return r!==void 0&&e<r?e=n?wr(r,e,n.min):Math.max(e,r):i!==void 0&&e>i&&(e=n?wr(i,e,n.max):Math.min(e,i)),e}function vI(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function mW(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:vI(e.x,r,o),y:vI(e.y,n,i)}}function yI(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=yr([i,r],2),r=n[0],i=n[1]),{min:r,max:i}}function gW(e,t){return{x:yI(e.x,t.x),y:yI(e.y,t.y)}}function vW(e,t){var n=.5,r=Ul(e),i=Ul(t);return i>r?n=zm(t.min,t.max-r,e.min):r>i&&(n=zm(e.min,e.max-i,t.min)),F0(0,1,n)}function yW(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Tw=.35;function bW(e){return e===void 0&&(e=Tw),e===!1?e=0:e===!0&&(e=Tw),{x:bI(e,"left","right"),y:bI(e,"top","bottom")}}function bI(e,t,n){return{min:EI(e,t),max:EI(e,n)}}function EI(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var SI=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Xm=function(){return{x:SI(),y:SI()}},TI=function(){return{min:0,max:0}},Yi=function(){return{x:TI(),y:TI()}};function Ys(e){return[e("x"),e("y")]}function xI(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function EW(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function SW(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function xw(e){return e===void 0||e===1}function wI(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!xw(t)||!xw(n)||!xw(r)}function Wu(e){return wI(e)||CI(e.x)||CI(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function CI(e){return e&&e!=="0%"}function Q0(e,t,n){var r=e-n,i=t*r;return n+i}function _I(e,t,n,r,i){return i!==void 0&&(e=Q0(e,i,r)),Q0(e,n,r)+t}function ww(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=_I(e.min,t,n,r,i),e.max=_I(e.max,t,n,r,i)}function NI(e,t){var n=t.x,r=t.y;ww(e.x,n.translate,n.scale,n.originPoint),ww(e.y,r.translate,r.scale,r.originPoint)}function TW(e,t,n,r){var i,o;r===void 0&&(r=!1);var l=n.length;if(l){t.x=t.y=1;for(var c,p,d=0;d<l;d++)c=n[d],p=c.projectionDelta,((o=(i=c.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&c.options.layoutScroll&&c.scroll&&c!==c.root&&lp(e,{x:-c.scroll.x,y:-c.scroll.y}),p&&(t.x*=p.x.scale,t.y*=p.y.scale,NI(e,p)),r&&Wu(c.latestValues)&&lp(e,c.latestValues))}}function Qu(e,t){e.min=e.min+t,e.max=e.max+t}function AI(e,t,n){var r=yr(n,3),i=r[0],o=r[1],l=r[2],c=t[l]!==void 0?t[l]:.5,p=wr(e.min,e.max,c);ww(e,t[i],t[o],p,t.scale)}var xW=["x","scaleX","originX"],wW=["y","scaleY","originY"];function lp(e,t){AI(e.x,t,xW),AI(e.y,t,wW)}function OI(e,t){return xI(SW(e.getBoundingClientRect(),t))}function CW(e,t,n){var r=OI(e,n),i=t.scroll;return i&&(Qu(r.x,i.x),Qu(r.y,i.y)),r}var _W=new WeakMap,NW=function(){function e(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Yi(),this.visualElement=t}return e.prototype.start=function(t,n){var r=this,i=n===void 0?{}:n,o=i.snapToCursor,l=o===void 0?!1:o;if(this.visualElement.isPresent!==!1){var c=function(b){r.stopAnimation(),l&&r.snapToCursor(Yx(b,"page").point)},p=function(b,E){var y,x=r.getProps(),w=x.drag,k=x.dragPropagation,N=x.onDragStart;w&&!k&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=TL(w),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),Ys(function(D){var A,C,M=r.getAxisMotionValue(D).get()||0;if(Gs.test(M)){var j=(C=(A=r.visualElement.projection)===null||A===void 0?void 0:A.layout)===null||C===void 0?void 0:C.actual[D];if(j){var P=Ul(j);M=P*(parseFloat(M)/100)}}r.originPoint[D]=M}),N?.(b,E),(y=r.visualElement.animationState)===null||y===void 0||y.setActive(er.Drag,!0))},d=function(b,E){var y=r.getProps(),x=y.dragPropagation,w=y.dragDirectionLock,k=y.onDirectionLock,N=y.onDrag;if(!(!x&&!r.openGlobalLock)){var D=E.offset;if(w&&r.currentDirection===null){r.currentDirection=AW(D),r.currentDirection!==null&&k?.(r.currentDirection);return}r.updateAxis("x",E.point,D),r.updateAxis("y",E.point,D),r.visualElement.syncRender(),N?.(b,E)}},m=function(b,E){return r.stop(b,E)};this.panSession=new cI(t,{onSessionStart:c,onStart:p,onMove:d,onSessionEnd:m},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(t,n){var r=this.isDragging;if(this.cancel(),!!r){var i=n.velocity;this.startAnimation(i);var o=this.getProps().onDragEnd;o?.(t,n)}},e.prototype.cancel=function(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(er.Drag,!1)},e.prototype.updateAxis=function(t,n,r){var i=this.getProps().drag;if(!(!r||!K0(t,i,this.currentDirection))){var o=this.getAxisMotionValue(t),l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=hW(l,this.constraints[t],this.elastic[t])),o.set(l)}},e.prototype.resolveConstraints=function(){var t=this,n=this.getProps(),r=n.dragConstraints,i=n.dragElastic,o=(this.visualElement.projection||{}).layout,l=this.constraints;r&&ip(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=mW(o.actual,r):this.constraints=!1,this.elastic=bW(i),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ys(function(c){t.getAxisMotionValue(c)&&(t.constraints[c]=yW(o.actual[c],t.constraints[c]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),n=t.dragConstraints,r=t.onMeasureDragConstraints;if(!n||!ip(n))return!1;var i=n.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var l=CW(i,o.root,this.visualElement.getTransformPagePoint()),c=gW(o.layout.actual,l);if(r){var p=r(EW(c));this.hasMutatedConstraints=!!p,p&&(c=xI(p))}return c},e.prototype.startAnimation=function(t){var n=this,r=this.getProps(),i=r.drag,o=r.dragMomentum,l=r.dragElastic,c=r.dragTransition,p=r.dragSnapToOrigin,d=r.onDragTransitionEnd,m=this.constraints||{},b=Ys(function(E){var y;if(K0(E,i,n.currentDirection)){var x=(y=m?.[E])!==null&&y!==void 0?y:{};p&&(x={min:0,max:0});var w=l?200:1e6,k=l?40:1e7,N=Qe(Qe({type:"inertia",velocity:o?t[E]:0,bounceStiffness:w,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10},c),x);return n.startAxisValueAnimation(E,N)}});return Promise.all(b).then(d)},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);return mw(t,r,0,n)},e.prototype.stopAnimation=function(){var t=this;Ys(function(n){return t.getAxisMotionValue(n).stop()})},e.prototype.getAxisMotionValue=function(t){var n,r,i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)},e.prototype.snapToCursor=function(t){var n=this;Ys(function(r){var i=n.getProps().drag;if(K0(r,i,n.currentDirection)){var o=n.visualElement.projection,l=n.getAxisMotionValue(r);if(o&&o.layout){var c=o.layout.actual[r],p=c.min,d=c.max;l.set(t[r]-wr(p,d,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var t=this,n,r=this.getProps(),i=r.drag,o=r.dragConstraints,l=this.visualElement.projection;if(!(!ip(o)||!l||!this.constraints)){this.stopAnimation();var c={x:0,y:0};Ys(function(d){var m=t.getAxisMotionValue(d);if(m){var b=m.get();c[d]=vW({min:b,max:b},t.constraints[d])}});var p=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=p?p({},""):"none",(n=l.root)===null||n===void 0||n.updateScroll(),l.updateLayout(),this.resolveConstraints(),Ys(function(d){if(K0(d,i,null)){var m=t.getAxisMotionValue(d),b=t.constraints[d],E=b.min,y=b.max;m.set(wr(E,y,c[d]))}})}},e.prototype.addListeners=function(){var t=this,n;_W.set(this.visualElement,this);var r=this.visualElement.getInstance(),i=op(r,"pointerdown",function(d){var m=t.getProps(),b=m.drag,E=m.dragListener,y=E===void 0?!0:E;b&&y&&t.start(d)}),o=function(){var d=t.getProps().dragConstraints;ip(d)&&(t.constraints=t.resolveRefConstraints())},l=this.visualElement.projection,c=l.addEventListener("measure",o);l&&!l.layout&&((n=l.root)===null||n===void 0||n.updateScroll(),l.updateLayout()),o();var p=L0(window,"resize",function(){return t.scalePositionWithinConstraints()});return l.addEventListener("didUpdate",function(d){var m=d.delta,b=d.hasLayoutChanged;t.isDragging&&b&&(Ys(function(E){var y=t.getAxisMotionValue(E);y&&(t.originPoint[E]+=m[E].translate,y.set(y.get()+m[E].translate))}),t.visualElement.syncRender())}),function(){p(),i(),c()}},e.prototype.getProps=function(){var t=this.visualElement.getProps(),n=t.drag,r=n===void 0?!1:n,i=t.dragDirectionLock,o=i===void 0?!1:i,l=t.dragPropagation,c=l===void 0?!1:l,p=t.dragConstraints,d=p===void 0?!1:p,m=t.dragElastic,b=m===void 0?Tw:m,E=t.dragMomentum,y=E===void 0?!0:E;return Qe(Qe({},t),{drag:r,dragDirectionLock:o,dragPropagation:c,dragConstraints:d,dragElastic:b,dragMomentum:y})},e}();function K0(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function AW(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function OW(e){var t=e.dragControls,n=e.visualElement,r=zu(function(){return new NW(n)});L.useEffect(function(){return t&&t.subscribe(r)},[r,t]),L.useEffect(function(){return r.addListeners()},[r])}function DW(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,l=t||n||r||i,c=L.useRef(null),p=L.useContext(C0).transformPagePoint,d={onSessionStart:i,onStart:n,onMove:t,onEnd:function(b,E){c.current=null,r&&r(b,E)}};L.useEffect(function(){c.current!==null&&c.current.updateHandlers(d)});function m(b){c.current=new cI(b,d,{transformPagePoint:p})}I0(o,"pointerdown",l&&m),_L(function(){return c.current&&c.current.end()})}var kW={pan:Yu(DW),drag:Yu(OW)},X0=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function RW(){var e=X0.map(function(){return new Ym}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){X0.forEach(function(i){var o,l="on"+i,c=r[l];(o=t[i])===null||o===void 0||o.call(t),c&&(t[i]=n[l](c))})}};return e.forEach(function(r,i){n["on"+X0[i]]=function(o){return r.add(o)},n["notify"+X0[i]]=function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return r.notify.apply(r,ns([],yr(o),!1))}}),n}function MW(e,t,n){var r;for(var i in t){var o=t[i],l=n[i];if(Hs(o))e.addValue(i,o);else if(Hs(l))e.addValue(i,Rf(o));else if(l!==o)if(e.hasValue(i)){var c=e.getValue(i);!c.hasAnimated&&c.set(o)}else e.addValue(i,Rf((r=e.getStaticValue(i))!==null&&r!==void 0?r:o))}for(var i in n)t[i]===void 0&&e.removeValue(i);return t}var DI=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,l=e.measureViewportBox,c=e.render,p=e.readValueFromInstance,d=e.removeValueFromRenderState,m=e.sortNodePosition,b=e.scrapeMotionValuesFromProps;return function(E,y){var x=E.parent,w=E.props,k=E.presenceId,N=E.blockInitialAnimation,D=E.visualState,A=E.shouldReduceMotion;y===void 0&&(y={});var C=!1,M=D.latestValues,j=D.renderState,P,F=RW(),V=new Map,$=new Map,X={},J=Qe({},M),ee;function Q(){!P||!C||(B(),c(P,j,w.style,pe.projection))}function B(){r(pe,j,M,y,w)}function ne(){F.notifyUpdate(M)}function re(ce,he){var Se=he.onChange(function(Ge){M[ce]=Ge,w.onUpdate&&ss.update(ne,!1,!0)}),Ie=he.onRenderRequest(pe.scheduleRender);$.set(ce,function(){Se(),Ie()})}var se=b(w);for(var fe in se){var Z=se[fe];M[fe]!==void 0&&Hs(Z)&&Z.set(M[fe],!1)}var ge=O0(w),ae=UM(w),pe=Qe(Qe({treeType:n,current:null,depth:x?x.depth+1:0,parent:x,children:new Set,presenceId:k,shouldReduceMotion:A,variantChildren:ae?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!x?.isMounted(),blockInitialAnimation:N,isMounted:function(){return!!P},mount:function(ce){C=!0,P=pe.current=ce,pe.projection&&pe.projection.mount(ce),ae&&x&&!ge&&(ee=x?.addVariantChild(pe)),V.forEach(function(he,Se){return re(Se,he)}),x?.children.add(pe),pe.setProps(w)},unmount:function(){var ce;(ce=pe.projection)===null||ce===void 0||ce.unmount(),sp.update(ne),sp.render(Q),$.forEach(function(he){return he()}),ee?.(),x?.children.delete(pe),F.clearAllListeners(),P=void 0,C=!1},addVariantChild:function(ce){var he,Se=pe.getClosestVariantNode();if(Se)return(he=Se.variantChildren)===null||he===void 0||he.add(ce),function(){return Se.variantChildren.delete(ce)}},sortNodePosition:function(ce){return!m||n!==ce.treeType?0:m(pe.getInstance(),ce.getInstance())},getClosestVariantNode:function(){return ae?pe:x?.getClosestVariantNode()},getLayoutId:function(){return w.layoutId},getInstance:function(){return P},getStaticValue:function(ce){return M[ce]},setStaticValue:function(ce,he){return M[ce]=he},getLatestValues:function(){return M},setVisibility:function(ce){pe.isVisible!==ce&&(pe.isVisible=ce,pe.scheduleRender())},makeTargetAnimatable:function(ce,he){return he===void 0&&(he=!0),o(pe,ce,w,he)},measureViewportBox:function(){return l(P,w)},addValue:function(ce,he){pe.hasValue(ce)&&pe.removeValue(ce),V.set(ce,he),M[ce]=he.get(),re(ce,he)},removeValue:function(ce){var he;V.delete(ce),(he=$.get(ce))===null||he===void 0||he(),$.delete(ce),delete M[ce],d(ce,j)},hasValue:function(ce){return V.has(ce)},getValue:function(ce,he){var Se=V.get(ce);return Se===void 0&&he!==void 0&&(Se=Rf(he),pe.addValue(ce,Se)),Se},forEachValue:function(ce){return V.forEach(ce)},readValue:function(ce){var he;return(he=M[ce])!==null&&he!==void 0?he:p(P,ce,y)},setBaseTarget:function(ce,he){J[ce]=he},getBaseTarget:function(ce){if(i){var he=i(w,ce);if(he!==void 0&&!Hs(he))return he}return J[ce]}},F),{build:function(){return B(),j},scheduleRender:function(){ss.render(Q,!1,!0)},syncRender:Q,setProps:function(ce){(ce.transformTemplate||w.transformTemplate)&&pe.scheduleRender(),w=ce,F.updatePropListeners(ce),X=MW(pe,b(w),X)},getProps:function(){return w},getVariant:function(ce){var he;return(he=w.variants)===null||he===void 0?void 0:he[ce]},getDefaultTransition:function(){return w.transition},getTransformPagePoint:function(){return w.transformPagePoint},getVariantContext:function(ce){if(ce===void 0&&(ce=!1),ce)return x?.getVariantContext();if(!ge){var he=x?.getVariantContext()||{};return w.initial!==void 0&&(he.initial=w.initial),he}for(var Se={},Ie=0;Ie<LW;Ie++){var Ge=kI[Ie],Ze=w[Ge];(as(Ze)||Ze===!1)&&(Se[Ge]=Ze)}return Se}});return pe}},kI=ns(["initial"],yr(bw),!1),LW=kI.length;function Cw(e){return typeof e=="string"&&e.startsWith("var(--")}var RI=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function IW(e){var t=RI.exec(e);if(!t)return[,];var n=yr(t,3),r=n[1],i=n[2];return[r,i]}function _w(e,t,n){var r=yr(IW(e),2),i=r[0],o=r[1];if(i){var l=window.getComputedStyle(t).getPropertyValue(i);return l?l.trim():Cw(o)?_w(o,t):o}}function FW(e,t,n){var r,i=Gi(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};n&&(n=Qe({},n)),e.forEachValue(function(d){var m=d.get();if(Cw(m)){var b=_w(m,o);b&&d.set(b)}});for(var l in i){var c=i[l];if(Cw(c)){var p=_w(c,o);p&&(i[l]=p,n&&((r=n[l])!==null&&r!==void 0||(n[l]=c)))}}return{target:i,transitionEnd:n}}var PW=new Set(["width","height","top","left","right","bottom","x","y"]),MI=function(e){return PW.has(e)},jW=function(e){return Object.keys(e).some(MI)},LI=function(e,t){e.set(t,!1),e.set(t)},II=function(e){return e===Of||e===Lt},FI;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(FI||(FI={}));var PI=function(e,t){return parseFloat(e.split(", ")[t])},jI=function(e,t){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return PI(o[1],t);var l=i.match(/^matrix\((.+)\)$/);return l?PI(l[1],e):0}},VW=new Set(["x","y","z"]),UW=Fm.filter(function(e){return!VW.has(e)});function qW(e){var t=[];return UW.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var VI={width:function(e,t){var n=e.x,r=t.paddingLeft,i=r===void 0?"0":r,o=t.paddingRight,l=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(l)},height:function(e,t){var n=e.y,r=t.paddingTop,i=r===void 0?"0":r,o=t.paddingBottom,l=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(l)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:jI(4,13),y:jI(5,14)},BW=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),l=o.display,c={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(function(d){c[d]=VI[d](r,o)}),t.syncRender();var p=t.measureViewportBox();return n.forEach(function(d){var m=t.getValue(d);LI(m,c[d]),e[d]=VI[d](p,o)}),e},$W=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=Qe({},t),r=Qe({},r);var i=Object.keys(t).filter(MI),o=[],l=!1,c=[];if(i.forEach(function(m){var b=e.getValue(m);if(e.hasValue(m)){var E=n[m],y=Wm(E),x=t[m],w;if($m(x)){var k=x.length,N=x[0]===null?1:0;E=x[N],y=Wm(E);for(var D=N;D<k;D++)w?w0(Wm(x[D])===w):w=Wm(x[D])}else w=Wm(x);if(y!==w)if(II(y)&&II(w)){var A=b.get();typeof A=="string"&&b.set(parseFloat(A)),typeof x=="string"?t[m]=parseFloat(x):Array.isArray(x)&&w===Lt&&(t[m]=x.map(parseFloat))}else y?.transform&&w?.transform&&(E===0||x===0)?E===0?b.set(w.transform(E)):t[m]=y.transform(x):(l||(o=qW(e),l=!0),c.push(m),r[m]=r[m]!==void 0?r[m]:t[m],LI(b,x))}}),c.length){var p=c.indexOf("height")>=0?window.pageYOffset:null,d=BW(t,e,c);return o.length&&o.forEach(function(m){var b=yr(m,2),E=b[0],y=b[1];e.getValue(E).set(y)}),e.syncRender(),p!==null&&window.scrollTo({top:p}),{target:d,transitionEnd:r}}else return{target:t,transitionEnd:r}};function zW(e,t,n,r){return jW(t)?$W(e,t,n,r):{target:t,transitionEnd:r}}var HW=function(e,t,n,r){var i=FW(e,t,r);return t=i.target,r=i.transitionEnd,zW(e,t,n,r)};function GW(e){return window.getComputedStyle(e)}var UI={treeType:"dom",readValueFromInstance:function(e,t){if(Pm(t)){var n=dw(t);return n&&n.default||0}else{var r=GW(e);return(GM(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return OI(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var o=t.transition,l=t.transitionEnd,c=Gi(t,["transition","transitionEnd"]),p=JY(c,o||{},e);if(i&&(l&&(l=i(l)),c&&(c=i(c)),p&&(p=i(p))),r){XY(e,c,p);var d=HW(e,c,p,l);l=d.transitionEnd,c=d.target}return Qe({transition:o,transitionEnd:l},c)},scrapeMotionValuesFromProps:zx,build:function(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),qx(t,n,r,i.transformTemplate)},render:lL},YW=DI(UI),WW=DI(Qe(Qe({},UI),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return Pm(t)?((n=dw(t))===null||n===void 0?void 0:n.default)||0:(t=uL.has(t)?t:sL(t),e.getAttribute(t))},scrapeMotionValuesFromProps:fL,build:function(e,t,n,r,i){$x(t,n,r,i.transformTemplate)},render:cL})),QW=function(e,t){return Lx(e)?WW(t,{enableHardwareAcceleration:!1}):YW(t,{enableHardwareAcceleration:!0})};function qI(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Zm={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(Lt.test(e))e=parseFloat(e);else return e;var n=qI(e,t.target.x),r=qI(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},BI="_$css",KW={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),l=[];o&&(e=e.replace(RI,function(w){return l.push(w),BI}));var c=Vl.parse(e);if(c.length>5)return i;var p=Vl.createTransformer(e),d=typeof c[0]!="number"?1:0,m=r.x.scale*n.x,b=r.y.scale*n.y;c[0+d]/=m,c[1+d]/=b;var E=wr(m,b,.5);typeof c[2+d]=="number"&&(c[2+d]/=E),typeof c[3+d]=="number"&&(c[3+d]/=E);var y=p(c);if(o){var x=0;y=y.replace(BI,function(){var w=l[x];return x++,w})}return y}},XW=function(e){sk(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.visualElement,o=r.layoutGroup,l=r.switchLayoutGroup,c=r.layoutId,p=i.projection;EH(JW),p&&(o?.group&&o.group.add(p),l?.register&&c&&l.register(p),p.root.didUpdate(),p.addEventListener("animationComplete",function(){n.safeToRemove()}),p.setOptions(Qe(Qe({},p.options),{onExitComplete:function(){return n.safeToRemove()}}))),Im.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(n){var r=this,i=this.props,o=i.layoutDependency,l=i.visualElement,c=i.drag,p=i.isPresent,d=l.projection;return d&&(d.isPresent=p,c||n.layoutDependency!==o||o===void 0?d.willUpdate():this.safeToRemove(),n.isPresent!==p&&(p?d.promote():d.relegate()||ss.postRender(function(){var m;!((m=d.getStack())===null||m===void 0)&&m.members.length||r.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,l=r.projection;l&&(l.scheduleCheckAfterUnmount(),i?.group&&i.group.remove(l),o?.deregister&&o.deregister(l))},t.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n?.()},t.prototype.render=function(){return null},t}(Ae.Component);function ZW(e){var t=yr(eI(),2),n=t[0],r=t[1],i=L.useContext(BM);return Ae.createElement(XW,Qe({},e,{layoutGroup:i,switchLayoutGroup:L.useContext($M),isPresent:n,safeToRemove:r}))}var JW={borderRadius:Qe(Qe({},Zm),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Zm,borderTopRightRadius:Zm,borderBottomLeftRadius:Zm,borderBottomRightRadius:Zm,boxShadow:KW},eQ={measureLayout:ZW};function tQ(e,t,n){n===void 0&&(n={});var r=Hs(e)?e:Rf(e);return mw("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var $I=["TopLeft","TopRight","BottomLeft","BottomRight"],nQ=$I.length,zI=function(e){return typeof e=="string"?parseFloat(e):e},HI=function(e){return typeof e=="number"||Lt.test(e)};function rQ(e,t,n,r,i,o){var l,c,p,d;i?(e.opacity=wr(0,(l=n.opacity)!==null&&l!==void 0?l:1,iQ(r)),e.opacityExit=wr((c=t.opacity)!==null&&c!==void 0?c:1,0,oQ(r))):o&&(e.opacity=wr((p=t.opacity)!==null&&p!==void 0?p:1,(d=n.opacity)!==null&&d!==void 0?d:1,r));for(var m=0;m<nQ;m++){var b="border".concat($I[m],"Radius"),E=GI(t,b),y=GI(n,b);if(!(E===void 0&&y===void 0)){E||(E=0),y||(y=0);var x=E===0||y===0||HI(E)===HI(y);x?(e[b]=Math.max(wr(zI(E),zI(y),r),0),(Gs.test(y)||Gs.test(E))&&(e[b]+="%")):e[b]=y}}(t.rotate||n.rotate)&&(e.rotate=wr(t.rotate||0,n.rotate||0,r))}function GI(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}var iQ=YI(0,.5,rw),oQ=YI(.5,.95,tw);function YI(e,t,n){return function(r){return r<e?0:r>t?1:n(zm(e,t,r))}}function WI(e,t){e.min=t.min,e.max=t.max}function ls(e,t){WI(e.x,t.x),WI(e.y,t.y)}function QI(e,t,n,r,i){return e-=t,e=Q0(e,1/n,r),i!==void 0&&(e=Q0(e,1/i,r)),e}function aQ(e,t,n,r,i,o,l){if(t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5),o===void 0&&(o=e),l===void 0&&(l=e),Gs.test(t)){t=parseFloat(t);var c=wr(l.min,l.max,t/100);t=c-l.min}if(typeof t=="number"){var p=wr(o.min,o.max,r);e===o&&(p-=t),e.min=QI(e.min,t,n,p,i),e.max=QI(e.max,t,n,p,i)}}function KI(e,t,n,r,i){var o=yr(n,3),l=o[0],c=o[1],p=o[2];aQ(e,t[l],t[c],t[p],t.scale,r,i)}var sQ=["x","scaleX","originX"],lQ=["y","scaleY","originY"];function XI(e,t,n,r){KI(e.x,t,sQ,n?.x,r?.x),KI(e.y,t,lQ,n?.y,r?.y)}function ZI(e){return e.translate===0&&e.scale===1}function JI(e){return ZI(e.x)&&ZI(e.y)}function e3(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var uQ=function(){function e(){this.members=[]}return e.prototype.add=function(t){gw(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(vw(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},e.prototype.relegate=function(t){var n=this.members.findIndex(function(l){return t===l});if(n===0)return!1;for(var r,i=n;i>=0;i--){var o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1},e.prototype.promote=function(t,n){var r,i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);var o=t.options.crossfade;o===!1&&i.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var n,r,i,o,l;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(l=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||l===void 0||l.call(o)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),cQ="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function t3(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var l=n.rotate,c=n.rotateX,p=n.rotateY;l&&(o+="rotate(".concat(l,"deg) ")),c&&(o+="rotateX(".concat(c,"deg) ")),p&&(o+="rotateY(".concat(p,"deg) "))}var d=e.x.scale*t.x,m=e.y.scale*t.y;return o+="scale(".concat(d,", ").concat(m,")"),o===cQ?"none":o}var fQ=function(e,t){return e.depth-t.depth},dQ=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){gw(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){vw(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(fQ),this.isDirty=!1,this.children.forEach(t)},e}(),n3=1e3;function r3(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function l(c,p,d){var m=this;p===void 0&&(p={}),d===void 0&&(d=n?.()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){m.isUpdating&&(m.isUpdating=!1,m.clearAllSnapshots())},this.updateProjection=function(){m.nodes.forEach(yQ),m.nodes.forEach(bQ)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=c,this.latestValues=p,this.root=d?d.root||d:this,this.path=d?ns(ns([],yr(d.path),!1),[d],!1):[],this.parent=d,this.depth=d?d.depth+1:0,c&&this.root.registerPotentialNode(c,this);for(var b=0;b<this.path.length;b++)this.path[b].shouldResetTransform=!0;this.root===this&&(this.nodes=new dQ)}return l.prototype.addEventListener=function(c,p){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Ym),this.eventHandlers.get(c).add(p)},l.prototype.notifyListeners=function(c){for(var p=[],d=1;d<arguments.length;d++)p[d-1]=arguments[d];var m=this.eventHandlers.get(c);m?.notify.apply(m,ns([],yr(p),!1))},l.prototype.hasListeners=function(c){return this.eventHandlers.has(c)},l.prototype.registerPotentialNode=function(c,p){this.potentialNodes.set(c,p)},l.prototype.mount=function(c,p){var d=this,m;if(p===void 0&&(p=!1),!this.instance){this.isSVG=c instanceof SVGElement&&c.tagName!=="svg",this.instance=c;var b=this.options,E=b.layoutId,y=b.layout,x=b.visualElement;if(x&&!x.getInstance()&&x.mount(c),this.root.nodes.add(this),(m=this.parent)===null||m===void 0||m.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),p&&(y||E)&&(this.isLayoutDirty=!0),t){var w,k=function(){return d.root.updateBlockedByResize=!1};t(c,function(){d.root.updateBlockedByResize=!0,clearTimeout(w),w=window.setTimeout(k,250),Im.hasAnimatedSinceResize&&(Im.hasAnimatedSinceResize=!1,d.nodes.forEach(vQ))})}E&&this.root.registerSharedNode(E,this),this.options.animate!==!1&&x&&(E||y)&&this.addEventListener("didUpdate",function(N){var D,A,C,M,j,P=N.delta,F=N.hasLayoutChanged,V=N.hasRelativeTargetChanged,$=N.layout;if(d.isTreeAnimationBlocked()){d.target=void 0,d.relativeTarget=void 0;return}var X=(A=(D=d.options.transition)!==null&&D!==void 0?D:x.getDefaultTransition())!==null&&A!==void 0?A:wQ,J=x.getProps(),ee=J.onLayoutAnimationStart,Q=J.onLayoutAnimationComplete,B=!d.targetLayout||!e3(d.targetLayout,$)||V,ne=!F&&V;if(!((C=d.resumeFrom)===null||C===void 0)&&C.instance||ne||F&&(B||!d.currentAnimation)){d.resumeFrom&&(d.resumingFrom=d.resumeFrom,d.resumingFrom.resumingFrom=void 0),d.setAnimationOrigin(P,ne);var re=Qe(Qe({},hw(X,"layout")),{onPlay:ee,onComplete:Q});x.shouldReduceMotion&&(re.delay=0,re.type=!1),d.startAnimation(re)}else!F&&d.animationProgress===0&&d.finishAnimation(),d.isLead()&&((j=(M=d.options).onExitComplete)===null||j===void 0||j.call(M));d.targetLayout=$})}},l.prototype.unmount=function(){var c,p;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(c=this.getStack())===null||c===void 0||c.remove(this),(p=this.parent)===null||p===void 0||p.children.delete(this),this.instance=void 0,sp.preRender(this.updateProjection)},l.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},l.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},l.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},l.prototype.isTreeAnimationBlocked=function(){var c;return this.isAnimationBlocked||((c=this.parent)===null||c===void 0?void 0:c.isTreeAnimationBlocked())||!1},l.prototype.startUpdate=function(){var c;this.isUpdateBlocked()||(this.isUpdating=!0,(c=this.nodes)===null||c===void 0||c.forEach(EQ))},l.prototype.willUpdate=function(c){var p,d,m;if(c===void 0&&(c=!0),this.root.isUpdateBlocked()){(d=(p=this.options).onExitComplete)===null||d===void 0||d.call(p);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var b=0;b<this.path.length;b++){var E=this.path[b];E.shouldResetTransform=!0,E.updateScroll()}var y=this.options,x=y.layoutId,w=y.layout;if(!(x===void 0&&!w)){var k=(m=this.options.visualElement)===null||m===void 0?void 0:m.getProps().transformTemplate;this.prevTransformTemplateValue=k?.(this.latestValues,""),this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}}},l.prototype.didUpdate=function(){var c=this.isUpdateBlocked();if(c){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(i3);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(CQ),this.potentialNodes.clear()),this.nodes.forEach(gQ),this.nodes.forEach(pQ),this.nodes.forEach(hQ),this.clearAllSnapshots(),sw.update(),sw.preRender(),sw.render())},l.prototype.clearAllSnapshots=function(){this.nodes.forEach(mQ),this.sharedNodes.forEach(SQ)},l.prototype.scheduleUpdateProjection=function(){ss.preRender(this.updateProjection,!1,!0)},l.prototype.scheduleCheckAfterUnmount=function(){var c=this;ss.postRender(function(){c.isLayoutDirty?c.root.didUpdate():c.root.checkUpdateFailed()})},l.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var c=this.measure(),p=this.removeTransform(this.removeElementScroll(c));l3(p),this.snapshot={measured:c,layout:p,latestValues:{}}}},l.prototype.updateLayout=function(){var c;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var p=0;p<this.path.length;p++){var d=this.path[p];d.updateScroll()}var m=this.measure();l3(m);var b=this.layout;this.layout={measured:m,actual:this.removeElementScroll(m)},this.layoutCorrected=Yi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(c=this.options.visualElement)===null||c===void 0||c.notifyLayoutMeasure(this.layout.actual,b?.actual)}},l.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=r(this.instance))},l.prototype.resetTransform=function(){var c;if(o){var p=this.isLayoutDirty||this.shouldResetTransform,d=this.projectionDelta&&!JI(this.projectionDelta),m=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate,b=m?.(this.latestValues,""),E=b!==this.prevTransformTemplateValue;p&&(d||Wu(this.latestValues)||E)&&(o(this.instance,b),this.shouldResetTransform=!1,this.scheduleRender())}},l.prototype.measure=function(){var c=this.options.visualElement;if(!c)return Yi();var p=c.measureViewportBox(),d=this.root.scroll;return d&&(Qu(p.x,d.x),Qu(p.y,d.y)),p},l.prototype.removeElementScroll=function(c){var p=Yi();ls(p,c);for(var d=0;d<this.path.length;d++){var m=this.path[d],b=m.scroll,E=m.options,y=m.isScrollRoot;if(m!==this.root&&b&&E.layoutScroll){if(y){ls(p,c);var x=this.root.scroll;x&&(Qu(p.x,-x.x),Qu(p.y,-x.y))}Qu(p.x,b.x),Qu(p.y,b.y)}}return p},l.prototype.applyTransform=function(c,p){p===void 0&&(p=!1);var d=Yi();ls(d,c);for(var m=0;m<this.path.length;m++){var b=this.path[m];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&lp(d,{x:-b.scroll.x,y:-b.scroll.y}),Wu(b.latestValues)&&lp(d,b.latestValues)}return Wu(this.latestValues)&&lp(d,this.latestValues),d},l.prototype.removeTransform=function(c){var p,d=Yi();ls(d,c);for(var m=0;m<this.path.length;m++){var b=this.path[m];if(b.instance&&Wu(b.latestValues)){wI(b.latestValues)&&b.updateSnapshot();var E=Yi(),y=b.measure();ls(E,y),XI(d,b.latestValues,(p=b.snapshot)===null||p===void 0?void 0:p.layout,E)}}return Wu(this.latestValues)&&XI(d,this.latestValues),d},l.prototype.setTargetDelta=function(c){this.targetDelta=c,this.root.scheduleUpdateProjection()},l.prototype.setOptions=function(c){var p;this.options=Qe(Qe(Qe({},this.options),c),{crossfade:(p=c.crossfade)!==null&&p!==void 0?p:!0})},l.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},l.prototype.resolveTargetDelta=function(){var c,p=this.options,d=p.layout,m=p.layoutId;!this.layout||!(d||m)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Yi(),this.relativeTargetOrigin=Yi(),Km(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),ls(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Yi(),this.targetWithTransforms=Yi()),this.relativeTarget&&this.relativeTargetOrigin&&(!((c=this.relativeParent)===null||c===void 0)&&c.target)?pW(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):ls(this.target,this.layout.actual),NI(this.target,this.targetDelta)):ls(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Yi(),this.relativeTargetOrigin=Yi(),Km(this.relativeTargetOrigin,this.target,this.relativeParent.target),ls(this.relativeTarget,this.relativeTargetOrigin)))))},l.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Wu(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},l.prototype.calcProjection=function(){var c,p=this.options,d=p.layout,m=p.layoutId;if(this.isTreeAnimating=!!(!((c=this.parent)===null||c===void 0)&&c.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(d||m))){var b=this.getLead();ls(this.layoutCorrected,this.layout.actual),TW(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==b);var E=b.target;if(E){this.projectionDelta||(this.projectionDelta=Xm(),this.projectionDeltaWithTransform=Xm());var y=this.treeScale.x,x=this.treeScale.y,w=this.projectionTransform;Qm(this.projectionDelta,this.layoutCorrected,E,this.latestValues),this.projectionTransform=t3(this.projectionDelta,this.treeScale),(this.projectionTransform!==w||this.treeScale.x!==y||this.treeScale.y!==x)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E))}}},l.prototype.hide=function(){this.isVisible=!1},l.prototype.show=function(){this.isVisible=!0},l.prototype.scheduleRender=function(c){var p,d,m;c===void 0&&(c=!0),(d=(p=this.options).scheduleRender)===null||d===void 0||d.call(p),c&&((m=this.getStack())===null||m===void 0||m.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},l.prototype.setAnimationOrigin=function(c,p){var d=this,m;p===void 0&&(p=!1);var b=this.snapshot,E=b?.latestValues||{},y=Qe({},this.latestValues),x=Xm();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!p;var w=Yi(),k=b?.isShared,N=(((m=this.getStack())===null||m===void 0?void 0:m.members.length)||0)<=1,D=!!(k&&!N&&this.options.crossfade===!0&&!this.path.some(xQ));this.animationProgress=0,this.mixTargetDelta=function(A){var C,M=A/1e3;o3(x.x,c.x,M),o3(x.y,c.y,M),d.setTargetDelta(x),d.relativeTarget&&d.relativeTargetOrigin&&d.layout&&(!((C=d.relativeParent)===null||C===void 0)&&C.layout)&&(Km(w,d.layout.actual,d.relativeParent.layout.actual),TQ(d.relativeTarget,d.relativeTargetOrigin,w,M)),k&&(d.animationValues=y,rQ(y,E,d.latestValues,M,D,N)),d.root.scheduleUpdateProjection(),d.scheduleRender(),d.animationProgress=M},this.mixTargetDelta(0)},l.prototype.startAnimation=function(c){var p=this,d,m;this.notifyListeners("animationStart"),(d=this.currentAnimation)===null||d===void 0||d.stop(),this.resumingFrom&&((m=this.resumingFrom.currentAnimation)===null||m===void 0||m.stop()),this.pendingAnimation&&(sp.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ss.update(function(){Im.hasAnimatedSinceResize=!0,p.currentAnimation=tQ(0,n3,Qe(Qe({},c),{onUpdate:function(b){var E;p.mixTargetDelta(b),(E=c.onUpdate)===null||E===void 0||E.call(c,b)},onComplete:function(){var b;(b=c.onComplete)===null||b===void 0||b.call(c),p.completeAnimation()}})),p.resumingFrom&&(p.resumingFrom.currentAnimation=p.currentAnimation),p.pendingAnimation=void 0})},l.prototype.completeAnimation=function(){var c;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(c=this.getStack())===null||c===void 0||c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},l.prototype.finishAnimation=function(){var c;this.currentAnimation&&((c=this.mixTargetDelta)===null||c===void 0||c.call(this,n3),this.currentAnimation.stop()),this.completeAnimation()},l.prototype.applyTransformsToTarget=function(){var c=this.getLead(),p=c.targetWithTransforms,d=c.target,m=c.layout,b=c.latestValues;!p||!d||!m||(ls(p,d),lp(p,b),Qm(this.projectionDeltaWithTransform,this.layoutCorrected,p,b))},l.prototype.registerSharedNode=function(c,p){var d,m,b;this.sharedNodes.has(c)||this.sharedNodes.set(c,new uQ);var E=this.sharedNodes.get(c);E.add(p),p.promote({transition:(d=p.options.initialPromotionConfig)===null||d===void 0?void 0:d.transition,preserveFollowOpacity:(b=(m=p.options.initialPromotionConfig)===null||m===void 0?void 0:m.shouldPreserveFollowOpacity)===null||b===void 0?void 0:b.call(m,p)})},l.prototype.isLead=function(){var c=this.getStack();return c?c.lead===this:!0},l.prototype.getLead=function(){var c,p=this.options.layoutId;return p?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this},l.prototype.getPrevLead=function(){var c,p=this.options.layoutId;return p?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0},l.prototype.getStack=function(){var c=this.options.layoutId;if(c)return this.root.sharedNodes.get(c)},l.prototype.promote=function(c){var p=c===void 0?{}:c,d=p.needsReset,m=p.transition,b=p.preserveFollowOpacity,E=this.getStack();E&&E.promote(this,b),d&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})},l.prototype.relegate=function(){var c=this.getStack();return c?c.relegate(this):!1},l.prototype.resetRotation=function(){var c=this.options.visualElement;if(c){for(var p=!1,d={},m=0;m<Ix.length;m++){var b=Ix[m],E="rotate"+b;c.getStaticValue(E)&&(p=!0,d[E]=c.getStaticValue(E),c.setStaticValue(E,0))}if(p){c?.syncRender();for(var E in d)c.setStaticValue(E,d[E]);c.scheduleRender()}}},l.prototype.getProjectionStyles=function(c){var p,d,m,b,E,y;c===void 0&&(c={});var x={};if(!this.instance||this.isSVG)return x;if(this.isVisible)x.visibility="";else return{visibility:"hidden"};var w=(p=this.options.visualElement)===null||p===void 0?void 0:p.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,x.opacity="",x.pointerEvents=M0(c.pointerEvents)||"",x.transform=w?w(this.latestValues,""):"none",x;var k=this.getLead();if(!this.projectionDelta||!this.layout||!k.target){var N={};return this.options.layoutId&&(N.opacity=(d=this.latestValues.opacity)!==null&&d!==void 0?d:1,N.pointerEvents=M0(c.pointerEvents)||""),this.hasProjected&&!Wu(this.latestValues)&&(N.transform=w?w({},""):"none",this.hasProjected=!1),N}var D=k.animationValues||k.latestValues;this.applyTransformsToTarget(),x.transform=t3(this.projectionDeltaWithTransform,this.treeScale,D),w&&(x.transform=w(D,x.transform));var A=this.projectionDelta,C=A.x,M=A.y;x.transformOrigin="".concat(C.origin*100,"% ").concat(M.origin*100,"% 0"),k.animationValues?x.opacity=k===this?(b=(m=D.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&b!==void 0?b:1:this.preserveOpacity?this.latestValues.opacity:D.opacityExit:x.opacity=k===this?(E=D.opacity)!==null&&E!==void 0?E:"":(y=D.opacityExit)!==null&&y!==void 0?y:0;for(var j in D0)if(D[j]!==void 0){var P=D0[j],F=P.correct,V=P.applyTo,$=F(D[j],k);if(V)for(var X=V.length,J=0;J<X;J++)x[V[J]]=$;else x[j]=$}return this.options.layoutId&&(x.pointerEvents=k===this?M0(c.pointerEvents)||"":"none"),x},l.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},l.prototype.resetTree=function(){this.root.nodes.forEach(function(c){var p;return(p=c.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(i3),this.root.sharedNodes.clear()},l}()}function pQ(e){e.updateLayout()}function hQ(e){var t,n,r,i,o=(n=(t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)!==null&&n!==void 0?n:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var l=e.layout,c=l.actual,p=l.measured;e.options.animationType==="size"?Ys(function(D){var A=o.isShared?o.measured[D]:o.layout[D],C=Ul(A);A.min=c[D].min,A.max=A.min+C}):e.options.animationType==="position"&&Ys(function(D){var A=o.isShared?o.measured[D]:o.layout[D],C=Ul(c[D]);A.max=A.min+C});var d=Xm();Qm(d,c,o.layout);var m=Xm();o.isShared?Qm(m,e.applyTransform(p,!0),o.measured):Qm(m,c,o.layout);var b=!JI(d),E=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var y=e.relativeParent,x=y.snapshot,w=y.layout;if(x&&w){var k=Yi();Km(k,o.layout,x.layout);var N=Yi();Km(N,c,w.actual),e3(k,N)||(E=!0)}}e.notifyListeners("didUpdate",{layout:c,snapshot:o,delta:m,layoutDelta:d,hasLayoutChanged:b,hasRelativeTargetChanged:E})}else e.isLead()&&((i=(r=e.options).onExitComplete)===null||i===void 0||i.call(r));e.options.transition=void 0}function mQ(e){e.clearSnapshot()}function i3(e){e.clearMeasurements()}function gQ(e){var t=e.options.visualElement;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function vQ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function yQ(e){e.resolveTargetDelta()}function bQ(e){e.calcProjection()}function EQ(e){e.resetRotation()}function SQ(e){e.removeLeadSnapshot()}function o3(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function a3(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function TQ(e,t,n,r){a3(e.x,t.x,n.x,r),a3(e.y,t.y,n.y,r)}function xQ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var wQ={duration:.45,ease:[.4,0,.1,1]};function CQ(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(e.path[r].instance){n=e.path[r];break}var i=n&&n!==e.root?n.instance:document,o=i.querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function s3(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function l3(e){s3(e.x),s3(e.y)}var _Q=r3({attachResizeListener:function(e,t){return L0(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Nw={current:void 0},NQ=r3({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Nw.current){var e=new _Q(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Nw.current=e}return Nw.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),AQ=Qe(Qe(Qe(Qe({},cW),_Y),kW),eQ),u3=yH(function(e,t){return rG(e,t,AQ,QW,NQ)}),c3=L.createContext(null);function OQ(e,t,n,r){if(!r)return e;var i=e.findIndex(function(m){return m.value===t});if(i===-1)return e;var o=r>0?1:-1,l=e[i+o];if(!l)return e;var c=e[i],p=l.layout,d=wr(p.min,p.max,.5);return o===1&&c.layout.max+n>d||o===-1&&c.layout.min+n<d?$Y(e,i,i+o):e}function DQ(e,t){var n=e.children,r=e.as,i=r===void 0?"ul":r,o=e.axis,l=o===void 0?"y":o,c=e.onReorder,p=e.values,d=Gi(e,["children","as","axis","onReorder","values"]),m=zu(function(){return u3(i)}),b=[],E=L.useRef(!1),y={axis:l,registerItem:function(x,w){w&&b.findIndex(function(k){return x===k.value})===-1&&(b.push({value:x,layout:w[l]}),b.sort(MQ))},updateOrder:function(x,w,k){if(!E.current){var N=OQ(b,x,w,k);b!==N&&(E.current=!0,c(N.map(RQ).filter(function(D){return p.indexOf(D)!==-1})))}}};return L.useEffect(function(){E.current=!1}),L.createElement(m,Qe({},d,{ref:t}),L.createElement(c3.Provider,{value:y},n))}var kQ=L.forwardRef(DQ);function RQ(e){return e.value}function MQ(e,t){return e.layout.min-t.layout.min}function f3(e){var t=zu(function(){return Rf(e)}),n=L.useContext(C0).isStatic;if(n){var r=yr(L.useState(e),2),i=r[1];L.useEffect(function(){return t.onChange(i)},[])}return t}var LQ=function(e){return typeof e=="object"&&e.mix},IQ=function(e){return LQ(e)?e.mix:void 0};function FQ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,i=e[0+r],o=e[1+r],l=e[2+r],c=e[3+r],p=Jx(o,l,Qe({mixer:IQ(l[0])},c));return n?p(i):p}function PQ(e,t){Rx(function(){var n=e.map(function(r){return r.onChange(t)});return function(){return n.forEach(function(r){return r()})}})}function jQ(e,t){var n=f3(t()),r=function(){return n.set(t())};return r(),PQ(e,function(){return ss.update(r,!1,!0)}),n}function VQ(e,t,n,r){var i=typeof t=="function"?t:FQ(t,n,r);return Array.isArray(e)?d3(e,i):d3([e],function(o){var l=yr(o,1),c=l[0];return i(c)})}function d3(e,t){var n=zu(function(){return[]});return jQ(e,function(){n.length=0;for(var r=e.length,i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function p3(e,t){return t===void 0&&(t=0),Hs(e)?e:f3(t)}function UQ(e,t){var n=e.children,r=e.style,i=e.value,o=e.as,l=o===void 0?"li":o,c=e.onDrag,p=e.layout,d=p===void 0?!0:p,m=Gi(e,["children","style","value","as","onDrag","layout"]),b=zu(function(){return u3(l)}),E=L.useContext(c3),y={x:p3(r?.x),y:p3(r?.y)},x=VQ([y.x,y.y],function(C){var M=yr(C,2),j=M[0],P=M[1];return j||P?1:"unset"}),w=L.useRef(null),k=E,N=k.axis,D=k.registerItem,A=k.updateOrder;return L.useEffect(function(){D(i,w.current)},[E]),L.createElement(b,Qe({drag:N},m,{dragSnapToOrigin:!0,style:Qe(Qe({},r),{x:y.x,y:y.y,zIndex:x}),layout:d,onDrag:function(C,M){var j=M.velocity;j[N]&&A(i,y[N].get(),j[N]),c?.(C,M)},onLayoutMeasure:function(C){w.current=C},ref:t}),n)}var qQ=L.forwardRef(UQ),h3={Group:kQ,Item:qQ},[Z0,Rje]=Tf("Tooltip",[m0]),J0=m0(),m3="TooltipProvider",BQ=700,Aw="tooltip.open",[$Q,Ow]=Z0(m3),g3=e=>{const{__scopeTooltip:t,delayDuration:n=BQ,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,l=L.useRef(!0),c=L.useRef(!1),p=L.useRef(0);return L.useEffect(()=>{const d=p.current;return()=>window.clearTimeout(d)},[]),Y.jsx($Q,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:L.useCallback(()=>{window.clearTimeout(p.current),l.current=!1},[]),onClose:L.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:L.useCallback(d=>{c.current=d},[]),disableHoverableContent:i,children:o})};g3.displayName=m3;var Jm="Tooltip",[zQ,eg]=Z0(Jm),v3=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,p=Ow(Jm,e.__scopeTooltip),d=J0(t),[m,b]=L.useState(null),E=xf(),y=L.useRef(0),x=l??p.disableHoverableContent,w=c??p.delayDuration,k=L.useRef(!1),[N,D]=Gy({prop:r,defaultProp:i??!1,onChange:P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(Aw))):p.onClose(),o?.(P)},caller:Jm}),A=L.useMemo(()=>N?k.current?"delayed-open":"instant-open":"closed",[N]),C=L.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,D(!0)},[D]),M=L.useCallback(()=>{window.clearTimeout(y.current),y.current=0,D(!1)},[D]),j=L.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,D(!0),y.current=0},w)},[w,D]);return L.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),Y.jsx(y2,{...d,children:Y.jsx(zQ,{scope:t,contentId:E,open:N,stateAttribute:A,trigger:m,onTriggerChange:b,onTriggerEnter:L.useCallback(()=>{p.isOpenDelayedRef.current?j():C()},[p.isOpenDelayedRef,j,C]),onTriggerLeave:L.useCallback(()=>{x?M():(window.clearTimeout(y.current),y.current=0)},[M,x]),onOpen:C,onClose:M,disableHoverableContent:x,children:n})})};v3.displayName=Jm;var Dw="TooltipTrigger",y3=L.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=eg(Dw,n),o=Ow(Dw,n),l=J0(n),c=L.useRef(null),p=li(t,c,i.onTriggerChange),d=L.useRef(!1),m=L.useRef(!1),b=L.useCallback(()=>d.current=!1,[]);return L.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),Y.jsx(b2,{asChild:!0,...l,children:Y.jsx(Rr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:p,onPointerMove:$t(e.onPointerMove,E=>{E.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:$t(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:$t(e.onPointerDown,()=>{i.open&&i.onClose(),d.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:$t(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:$t(e.onBlur,i.onClose),onClick:$t(e.onClick,i.onClose)})})});y3.displayName=Dw;var kw="TooltipPortal",[HQ,GQ]=Z0(kw,{forceMount:void 0}),b3=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=eg(kw,t);return Y.jsx(HQ,{scope:t,forceMount:n,children:Y.jsx(js,{present:n||o.open,children:Y.jsx(Qy,{asChild:!0,container:i,children:r})})})};b3.displayName=kw;var up="TooltipContent",E3=L.forwardRef((e,t)=>{const n=GQ(up,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=eg(up,e.__scopeTooltip);return Y.jsx(js,{present:r||l.open,children:l.disableHoverableContent?Y.jsx(S3,{side:i,...o,ref:t}):Y.jsx(YQ,{side:i,...o,ref:t})})}),YQ=L.forwardRef((e,t)=>{const n=eg(up,e.__scopeTooltip),r=Ow(up,e.__scopeTooltip),i=L.useRef(null),o=li(t,i),[l,c]=L.useState(null),{trigger:p,onClose:d}=n,m=i.current,{onPointerInTransitChange:b}=r,E=L.useCallback(()=>{c(null),b(!1)},[b]),y=L.useCallback((x,w)=>{const k=x.currentTarget,N={x:x.clientX,y:x.clientY},D=ZQ(N,k.getBoundingClientRect()),A=JQ(N,D),C=eK(w.getBoundingClientRect()),M=nK([...A,...C]);c(M),b(!0)},[b]);return L.useEffect(()=>()=>E(),[E]),L.useEffect(()=>{if(p&&m){const x=k=>y(k,m),w=k=>y(k,p);return p.addEventListener("pointerleave",x),m.addEventListener("pointerleave",w),()=>{p.removeEventListener("pointerleave",x),m.removeEventListener("pointerleave",w)}}},[p,m,y,E]),L.useEffect(()=>{if(l){const x=w=>{const k=w.target,N={x:w.clientX,y:w.clientY},D=p?.contains(k)||m?.contains(k),A=!tK(N,l);D?E():A&&(E(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[p,m,l,d,E]),Y.jsx(S3,{...e,ref:o})}),[WQ,QQ]=Z0(Jm,{isInside:!1}),KQ=y7("TooltipContent"),S3=L.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,p=eg(up,n),d=J0(n),{onClose:m}=p;return L.useEffect(()=>(document.addEventListener(Aw,m),()=>document.removeEventListener(Aw,m)),[m]),L.useEffect(()=>{if(p.trigger){const b=E=>{E.target?.contains(p.trigger)&&m()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[p.trigger,m]),Y.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:b=>b.preventDefault(),onDismiss:m,children:Y.jsxs(E2,{"data-state":p.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[Y.jsx(KQ,{children:r}),Y.jsx(WQ,{scope:n,isInside:!0,children:Y.jsx(jk,{id:p.contentId,role:"tooltip",children:i||r})})]})})});E3.displayName=up;var T3="TooltipArrow",XQ=L.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=J0(n);return QQ(T3,n).isInside?null:Y.jsx(S2,{...i,...r,ref:t})});XQ.displayName=T3;function ZQ(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function JQ(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function eK(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function tK(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],p=t[l],d=c.x,m=c.y,b=p.x,E=p.y;m>r!=E>r&&n<(b-d)*(r-m)/(E-m)+d&&(i=!i)}return i}function nK(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),rK(t)}function rK(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var iK=g3,oK=v3,aK=y3,sK=b3,lK=E3;function cp(e,t,n){let r=n.initialDeps??[],i;function o(){var l,c,p,d;let m;n.key&&((l=n.debug)!=null&&l.call(n))&&(m=Date.now());const b=e();if(!(b.length!==r.length||b.some((x,w)=>r[w]!==x)))return i;r=b;let y;if(n.key&&((c=n.debug)!=null&&c.call(n))&&(y=Date.now()),i=t(...b),n.key&&((p=n.debug)!=null&&p.call(n))){const x=Math.round((Date.now()-m)*100)/100,w=Math.round((Date.now()-y)*100)/100,k=w/16,N=(D,A)=>{for(D=String(D);D.length<A;)D=" "+D;return D};console.info(`%c⏱ ${N(w,5)} /${N(x,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*k,120))}deg 100% 31%);`,n?.key)}return(d=n?.onChange)==null||d.call(n,i),i}return o.updateDeps=l=>{r=l},o}function x3(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const uK=(e,t)=>Math.abs(e-t)<1.01,cK=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},w3=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},fK=e=>e,dK=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},pK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=l=>{const{width:c,height:p}=l;t({width:Math.round(c),height:Math.round(p)})};if(i(w3(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(l=>{const c=()=>{const p=l[0];if(p?.borderBoxSize){const d=p.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(w3(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},C3={passive:!0},_3=typeof window>"u"?!0:"onscrollend"in window,hK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const o=e.options.useScrollendEvent&&_3?()=>{}:cK(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),l=m=>()=>{const{horizontal:b,isRtl:E}=e.options;i=b?n.scrollLeft*(E&&-1||1):n.scrollTop,o(),t(i,m)},c=l(!0),p=l(!1);p(),n.addEventListener("scroll",c,C3);const d=e.options.useScrollendEvent&&_3;return d&&n.addEventListener("scrollend",p,C3),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",p)}},mK=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},gK=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;const l=e+t;(o=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class vK{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const l=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=r())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=r())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:fK,rangeExtractor:dK,onChange:()=>{},measureElement:mK,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=cp(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,o=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(i.has(c.lane))continue;const p=o.get(c.lane);if(p==null||c.end>p.end?o.set(c.lane,c):c.end<p.end&&i.set(c.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=cp(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,i,o,l)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:l}),{key:!1}),this.getMeasurements=cp(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:l},c)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const p=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,p);for(let m=p;m<n;m++){const b=o(m),E=this.options.lanes===1?d[m-1]:this.getFurthestMeasurement(d,m),y=E?E.end+this.options.gap:r+i,x=c.get(b),w=typeof x=="number"?x:this.options.estimateSize(m),k=y+w,N=E?E.lane:m%this.options.lanes;d[m]={index:m,start:y,size:w,end:k,key:b,lane:N}}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=cp(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,o)=>this.range=n.length>0&&r>0?yK({measurements:n,outerSize:r,scrollOffset:i,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=cp(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,o,l)=>o===null||l===null?[]:n({startIndex:o,endIndex:l,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),o=this.measurementsCache[i];if(!o)return;const l=o.key,c=this.elementsCache.get(l);c!==n&&(c&&this.observer.unobserve(c),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const o=this.itemSizeCache.get(i.key)??i.size,l=r-o;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,l,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=cp(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let o=0,l=n.length;o<l;o++){const c=n[o],p=r[c];i.push(p)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return x3(r[N3(0,r.length-1,i=>x3(r[i]).start,n)])},this.getOffsetForAlignment=(n,r,i=0)=>{const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+o?"end":"start"),r==="center"?n+=(i-o)/2:r==="end"&&(n-=o);const c=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const o=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(i.end>=l+o-this.options.scrollPaddingEnd)r="end";else if(i.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const c=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,i.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const l=10,c=d=>{if(!this.targetWindow)return;const m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}const[b,E]=m;this._scrollToOffset(b,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const y=this.getScrollOffset(),x=this.getOffsetForIndex(n,E);if(!x){console.warn("Failed to get offset for index:",n);return}uK(x[0],y)||p(E)})},p=d=>{this.targetWindow&&(o++,o<l?this.targetWindow.requestAnimationFrame(()=>c(d)):console.warn(`Failed to scroll to index ${n} after ${l} attempts.`))};c(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&o.some(c=>c===null);){const c=r[l];o[c.lane]===null&&(o[c.lane]=c.end),l--}i=Math.max(...o.filter(c=>c!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const N3=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else if(o>r)t=i-1;else return i}return e>0?e-1:0};function yK({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,o=p=>e[p].start;if(e.length<=r)return{startIndex:0,endIndex:i};let l=N3(0,i,o,n),c=l;if(r===1)for(;c<i&&e[c].end<n+t;)c++;else if(r>1){const p=Array(r).fill(0);for(;c<i&&p.some(m=>m<n+t);){const m=e[c];p[m.lane]=m.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(m=>m>=n);){const m=e[l];d[m.lane]=m.start,l--}l=Math.max(0,l-l%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const A3=typeof document<"u"?L.useLayoutEffect:L.useEffect;function bK(e){const t=L.useReducer(()=>({}),{})[1],n={...e,onChange:(i,o)=>{var l;o?Yy.flushSync(t):t(),(l=e.onChange)==null||l.call(e,i,o)}},[r]=L.useState(()=>new vK(n));return r.setOptions(n),A3(()=>r._didMount(),[]),A3(()=>r._willUpdate()),r}function EK(e){return bK({observeElementRect:pK,observeElementOffset:hK,scrollToFn:gK,...e})}var SK=Object.defineProperty,TK=(e,t,n)=>t in e?SK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rw=(e,t,n)=>(TK(e,typeof t!="symbol"?t+"":t,n),n);let xK=class{constructor(){Rw(this,"current",this.detect()),Rw(this,"handoffState","pending"),Rw(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Lf=new xK,co=(e,t)=>{Lf.isServer?L.useEffect(e,t):L.useLayoutEffect(e,t)};function tg(e){let t=L.useRef(e);return co(()=>{t.current=e},[e]),t}function Mw(e,t){let[n,r]=L.useState(e),i=tg(e);return co(()=>r(i.current),[i,r,...t]),n}let Fn=function(e){let t=tg(e);return Ae.useCallback((...n)=>t.current(...n),[t])};function wK(e,t,n){let[r,i]=L.useState(n),o=e!==void 0,l=L.useRef(o),c=L.useRef(!1),p=L.useRef(!1);return o&&!l.current&&!c.current?(c.current=!0,l.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&l.current&&!p.current&&(p.current=!0,l.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,Fn(d=>(o||i(d),t?.(d)))]}function CK(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function eb(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return CK(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=eb();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Lw(){let[e]=L.useState(eb);return L.useEffect(()=>()=>e.dispose(),[e]),e}function _K(){let e=typeof document>"u";return"useSyncExternalStore"in Qv?(t=>t.useSyncExternalStore)(Qv)(()=>()=>{},()=>!1,()=>!e):!1}function NK(){let e=_K(),[t,n]=L.useState(Lf.isHandoffComplete);return t&&Lf.isHandoffComplete===!1&&n(!1),L.useEffect(()=>{t!==!0&&n(!0)},[t]),L.useEffect(()=>Lf.handoff(),[]),e?!1:t}var O3;let ng=(O3=Ae.useId)!=null?O3:function(){let e=NK(),[t,n]=Ae.useState(e?()=>Lf.nextId():null);return co(()=>{t===null&&n(Lf.nextId())},[t]),t!=null?""+t:void 0};function ql(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ql),r}function Iw(e){return Lf.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let D3=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var AK=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(AK||{}),OK=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(OK||{}),DK=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(DK||{}),k3=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(k3||{});function kK(e,t=0){var n;return e===((n=Iw(e))==null?void 0:n.body)?!1:ql(t,{0(){return e.matches(D3)},1(){let r=e;for(;r!==null;){if(r.matches(D3))return!0;r=r.parentElement}return!1}})}var RK=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(RK||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function MK(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let l=i.compareDocumentPosition(o);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function LK(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function IK(){return/Android/gi.test(window.navigator.userAgent)}function R3(){return LK()||IK()}function tb(e,t,n){let r=tg(t);L.useEffect(()=>{function i(o){r.current(o)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function FK(e,t,n){let r=tg(t);L.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function PK(e,t,n=!0){let r=L.useRef(!1);L.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(l,c){if(!r.current||l.defaultPrevented)return;let p=c(l);if(p===null||!p.getRootNode().contains(p)||!p.isConnected)return;let d=function m(b){return typeof b=="function"?m(b()):Array.isArray(b)||b instanceof Set?b:[b]}(e);for(let m of d){if(m===null)continue;let b=m instanceof HTMLElement?m:m.current;if(b!=null&&b.contains(p)||l.composed&&l.composedPath().includes(b))return}return!kK(p,k3.Loose)&&p.tabIndex!==-1&&l.preventDefault(),t(l,p)}let o=L.useRef(null);tb("pointerdown",l=>{var c,p;r.current&&(o.current=((p=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:p[0])||l.target)},!0),tb("mousedown",l=>{var c,p;r.current&&(o.current=((p=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:p[0])||l.target)},!0),tb("click",l=>{R3()||o.current&&(i(l,()=>o.current),o.current=null)},!0),tb("touchend",l=>i(l,()=>l.target instanceof HTMLElement?l.target:null),!0),FK("blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function jK(...e){return L.useMemo(()=>Iw(...e),[...e])}function M3(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function VK(e,t){let[n,r]=L.useState(()=>M3(e));return co(()=>{r(M3(e))},[e.type,e.as]),co(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let UK=Symbol();function rg(...e){let t=L.useRef(e);L.useEffect(()=>{t.current=e},[e]);let n=Fn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||r?.[UK])?void 0:n}function L3(e){return[e.screenX,e.screenY]}function qK(){let e=L.useRef([-1,-1]);return{wasMoved(t){let n=L3(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=L3(t)}}}function BK({container:e,accept:t,walk:n,enabled:r=!0}){let i=L.useRef(t),o=L.useRef(n);L.useEffect(()=>{i.current=t,o.current=n},[t,n]),co(()=>{if(!e||!r)return;let l=Iw(e);if(!l)return;let c=i.current,p=o.current,d=Object.assign(b=>c(b),{acceptNode:c}),m=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;m.nextNode();)p(m.currentNode)},[e,r,i,o])}function I3(e,t){let n=L.useRef([]),r=Fn(e);L.useEffect(()=>{let i=[...n.current];for(let[o,l]of t.entries())if(n.current[o]!==l){let c=r(t,i);return n.current=t,c}},[r,...t])}function F3(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Fw=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Fw||{}),$K=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))($K||{});function If({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:l,mergeRefs:c}){c=c??zK;let p=P3(t,e);if(o)return nb(p,n,r,l,c);let d=i??0;if(d&2){let{static:m=!1,...b}=p;if(m)return nb(b,n,r,l,c)}if(d&1){let{unmount:m=!0,...b}=p;return ql(m?0:1,{0(){return null},1(){return nb({...b,hidden:!0,style:{display:"none"}},n,r,l,c)}})}return nb(p,n,r,l,c)}function nb(e,t={},n,r,i){let{as:o=n,children:l,refName:c="ref",...p}=jw(e,["unmount","static"]),d=e.ref!==void 0?{[c]:e.ref}:{},m=typeof l=="function"?l(t):l;"className"in p&&p.className&&typeof p.className=="function"&&(p.className=p.className(t));let b={};if(t){let E=!1,y=[];for(let[x,w]of Object.entries(t))typeof w=="boolean"&&(E=!0),w===!0&&y.push(x);E&&(b["data-headlessui-state"]=y.join(" "))}if(o===L.Fragment&&Object.keys(Pw(p)).length>0){if(!L.isValidElement(m)||Array.isArray(m)&&m.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(p).map(w=>` - ${w}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(w=>` - ${w}`).join(`
`)].join(`
`));let E=m.props,y=typeof E?.className=="function"?(...w)=>F3(E?.className(...w),p.className):F3(E?.className,p.className),x=y?{className:y}:{};return L.cloneElement(m,Object.assign({},P3(m.props,Pw(jw(p,["ref"]))),b,d,{ref:i(m.ref,d.ref)},x))}return L.createElement(o,Object.assign({},jw(p,["ref"]),o!==L.Fragment&&d,o!==L.Fragment&&b),m)}function zK(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function P3(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let l=n[r];for(let c of l){if((i instanceof Event||i?.nativeEvent instanceof Event)&&i.defaultPrevented)return;c(i,...o)}}});return t}function Ff(e){var t;return Object.assign(L.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Pw(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function jw(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let HK="div";var j3=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(j3||{});function GK(e,t){var n;let{features:r=1,...i}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return If({ourProps:o,theirProps:i,slot:{},defaultTag:HK,name:"Hidden"})}let YK=Ff(GK),Vw=L.createContext(null);Vw.displayName="OpenClosedContext";var ig=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ig||{});function WK(){return L.useContext(Vw)}function QK({value:e,children:t}){return Ae.createElement(Vw.Provider,{value:e},t)}function KK(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Pf=[];KK(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Pf[0]!==t.target&&(Pf.unshift(t.target),Pf=Pf.filter(n=>n!=null&&n.isConnected),Pf.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function XK(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&ZK(n)?!1:r}function ZK(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function JK(e){throw new Error("Unexpected object: "+e)}var ui=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ui||{});function V3(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=i+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:JK(e)}}function U3(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))B3(n,q3(t,r),i);return n}function q3(e,t){return e?e+"["+t+"]":t}function B3(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())B3(e,q3(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):U3(n,t,e)}var Go=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Go||{}),eX=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(eX||{}),tX=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(tX||{}),nX=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(nX||{}),rX=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(rX||{});function Uw(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),i=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,c)=>l.dataRef.current.order-c.dataRef.current.order):MK(r,l=>l.dataRef.current.domRef.current),o=n?i.indexOf(n):null;return o===-1&&(o=null),{options:i,activeOptionIndex:o}}let iX={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,i,o,l;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((i=e.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let m=t.focus===ui.Specific?t.idx:V3(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var E,y;return(y=(E=e.activeOptionIndex)!=null?E:e.virtual.options.findIndex(x=>!e.virtual.disabled(x)))!=null?y:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),b=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===m&&e.activationTrigger===b?e:{...e,activeOptionIndex:m,activationTrigger:b}}let c=Uw(e);if(c.activeOptionIndex===null){let m=c.options.findIndex(b=>!b.dataRef.current.disabled);m!==-1&&(c.activeOptionIndex=m)}let p=t.focus===ui.Specific?t.idx:V3(t,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled}),d=(l=t.trigger)!=null?l:2;return e.activeOptionIndex===p&&e.activationTrigger===d?e:{...e,...c,activeOptionIndex:p,activationTrigger:d}},3:(e,t)=>{var n,r,i;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,l=Uw(e,p=>(p.push(o),p));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(o));let c={...e,...l,activationTrigger:2};return(i=e.dataRef.current)!=null&&i.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(i=>i.id!==t.id)};let r=Uw(e,i=>{let o=i.findIndex(l=>l.id===t.id);return o!==-1&&i.splice(o,1),i});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let i=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i!==-1?r=i:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},qw=L.createContext(null);qw.displayName="ComboboxActionsContext";function og(e){let t=L.useContext(qw);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,og),n}return t}let $3=L.createContext(null);function oX(e){var t;let n=jf("VirtualProvider"),[r,i]=L.useMemo(()=>{let p=n.optionsRef.current;if(!p)return[0,0];let d=window.getComputedStyle(p);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[n.optionsRef.current]),o=EK({scrollPaddingStart:r,scrollPaddingEnd:i,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var p;return(p=n.optionsRef.current)!=null?p:null},overscan:12}),[l,c]=L.useState(0);return co(()=>{c(p=>p+1)},[(t=n.virtual)==null?void 0:t.options]),Ae.createElement($3.Provider,{value:o},Ae.createElement("div",{style:{position:"relative",width:"100%",height:`${o.getTotalSize()}px`},ref:p=>{if(p){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&o.scrollToIndex(n.activeOptionIndex)}}},o.getVirtualItems().map(p=>{var d;return Ae.createElement(L.Fragment,{key:p.key},Ae.cloneElement((d=e.children)==null?void 0:d.call(e,{option:n.virtual.options[p.index],open:n.comboboxState===0}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":n.virtual.options.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Bw=L.createContext(null);Bw.displayName="ComboboxDataContext";function jf(e){let t=L.useContext(Bw);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,jf),n}return t}function aX(e,t){return ql(t.type,iX,e,t)}let sX=L.Fragment;function lX(e,t){let{value:n,defaultValue:r,onChange:i,form:o,name:l,by:c=null,disabled:p=!1,__demoMode:d=!1,nullable:m=!1,multiple:b=!1,immediate:E=!1,virtual:y=null,...x}=e,w=!1,k=null,[N=b?[]:void 0,D]=wK(n,i,r),[A,C]=L.useReducer(aX,{dataRef:L.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),M=L.useRef(!1),j=L.useRef({static:!1,hold:!1}),P=L.useRef(null),F=L.useRef(null),V=L.useRef(null),$=L.useRef(null),X=Fn(typeof c=="string"?(Ze,It)=>{let vt=c;return Ze?.[vt]===It?.[vt]}:c??((Ze,It)=>Ze===It)),J=Fn(Ze=>A.options.findIndex(It=>X(It.dataRef.current.value,Ze))),ee=L.useCallback(Ze=>ql(B.mode,{1:()=>N.some(It=>X(It,Ze)),0:()=>X(N,Ze)}),[N]),Q=Fn(Ze=>A.activeOptionIndex===J(Ze)),B=L.useMemo(()=>({...A,immediate:w,optionsPropsRef:j,labelRef:P,inputRef:F,buttonRef:V,optionsRef:$,value:N,defaultValue:r,disabled:p,mode:b?1:0,virtual:A.virtual,get activeOptionIndex(){if(M.current&&A.activeOptionIndex===null&&A.options.length>0){let Ze=A.options.findIndex(It=>!It.dataRef.current.disabled);if(Ze!==-1)return Ze}return A.activeOptionIndex},calculateIndex:J,compare:X,isSelected:ee,isActive:Q,nullable:m,__demoMode:d}),[N,r,p,b,m,d,A,k]);co(()=>{},[k,void 0]),co(()=>{A.dataRef.current=B},[B]),PK([B.buttonRef,B.inputRef,B.optionsRef],()=>he.closeCombobox(),B.comboboxState===0);let ne=L.useMemo(()=>{var Ze,It,vt;return{open:B.comboboxState===0,disabled:p,activeIndex:B.activeOptionIndex,activeOption:B.activeOptionIndex===null?null:B.virtual?B.virtual.options[(Ze=B.activeOptionIndex)!=null?Ze:0]:(vt=(It=B.options[B.activeOptionIndex])==null?void 0:It.dataRef.current.value)!=null?vt:null,value:N}},[B,p,N]),re=Fn(()=>{if(B.activeOptionIndex!==null){if(B.virtual)pe(B.virtual.options[B.activeOptionIndex]);else{let{dataRef:Ze}=B.options[B.activeOptionIndex];pe(Ze.current.value)}he.goToOption(ui.Specific,B.activeOptionIndex)}}),se=Fn(()=>{C({type:0}),M.current=!0}),fe=Fn(()=>{C({type:1}),M.current=!1}),Z=Fn((Ze,It,vt)=>(M.current=!1,Ze===ui.Specific?C({type:2,focus:ui.Specific,idx:It,trigger:vt}):C({type:2,focus:Ze,trigger:vt}))),ge=Fn((Ze,It)=>(C({type:3,payload:{id:Ze,dataRef:It}}),()=>{B.isActive(It.current.value)&&(M.current=!0),C({type:4,id:Ze})})),ae=Fn(Ze=>(C({type:5,id:Ze}),()=>C({type:5,id:null}))),pe=Fn(Ze=>ql(B.mode,{0(){return D?.(Ze)},1(){let It=B.value.slice(),vt=It.findIndex(at=>X(at,Ze));return vt===-1?It.push(Ze):It.splice(vt,1),D?.(It)}})),ce=Fn(Ze=>{C({type:6,trigger:Ze})}),he=L.useMemo(()=>({onChange:pe,registerOption:ge,registerLabel:ae,goToOption:Z,closeCombobox:fe,openCombobox:se,setActivationTrigger:ce,selectActiveOption:re}),[]),Se=t===null?{}:{ref:t},Ie=L.useRef(null),Ge=Lw();return L.useEffect(()=>{Ie.current&&r!==void 0&&Ge.addEventListener(Ie.current,"reset",()=>{D?.(r)})},[Ie,D]),Ae.createElement(qw.Provider,{value:he},Ae.createElement(Bw.Provider,{value:B},Ae.createElement(QK,{value:ql(B.comboboxState,{0:ig.Open,1:ig.Closed})},l!=null&&N!=null&&U3({[l]:N}).map(([Ze,It],vt)=>Ae.createElement(YK,{features:j3.Hidden,ref:vt===0?at=>{var Oe;Ie.current=(Oe=at?.closest("form"))!=null?Oe:null}:void 0,...Pw({key:Ze,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,disabled:p,name:Ze,value:It})})),If({ourProps:Se,theirProps:x,slot:ne,defaultTag:sX,name:"Combobox"}))))}let uX="input";function cX(e,t){var n,r,i,o,l;let c=ng(),{id:p=`headlessui-combobox-input-${c}`,onChange:d,displayValue:m,type:b="text",...E}=e,y=jf("Combobox.Input"),x=og("Combobox.Input"),w=rg(y.inputRef,t),k=jK(y.inputRef),N=L.useRef(!1),D=Lw(),A=Fn(()=>{x.onChange(null),y.optionsRef.current&&(y.optionsRef.current.scrollTop=0),x.goToOption(ui.Nothing)}),C=function(){var B;return typeof m=="function"&&y.value!==void 0?(B=m(y.value))!=null?B:"":typeof y.value=="string"?y.value:""}();I3(([B,ne],[re,se])=>{if(N.current)return;let fe=y.inputRef.current;fe&&((se===0&&ne===1||B!==re)&&(fe.value=B),requestAnimationFrame(()=>{if(N.current||!fe||k?.activeElement!==fe)return;let{selectionStart:Z,selectionEnd:ge}=fe;Math.abs((ge??0)-(Z??0))===0&&Z===0&&fe.setSelectionRange(fe.value.length,fe.value.length)}))},[C,y.comboboxState,k]),I3(([B],[ne])=>{if(B===0&&ne===1){if(N.current)return;let re=y.inputRef.current;if(!re)return;let se=re.value,{selectionStart:fe,selectionEnd:Z,selectionDirection:ge}=re;re.value="",re.value=se,ge!==null?re.setSelectionRange(fe,Z,ge):re.setSelectionRange(fe,Z)}},[y.comboboxState]);let M=L.useRef(!1),j=Fn(()=>{M.current=!0}),P=Fn(()=>{D.nextFrame(()=>{M.current=!1})}),F=Fn(B=>{switch(N.current=!0,B.key){case Go.Enter:if(N.current=!1,y.comboboxState!==0||M.current)return;if(B.preventDefault(),B.stopPropagation(),y.activeOptionIndex===null){x.closeCombobox();return}x.selectActiveOption(),y.mode===0&&x.closeCombobox();break;case Go.ArrowDown:return N.current=!1,B.preventDefault(),B.stopPropagation(),ql(y.comboboxState,{0:()=>x.goToOption(ui.Next),1:()=>x.openCombobox()});case Go.ArrowUp:return N.current=!1,B.preventDefault(),B.stopPropagation(),ql(y.comboboxState,{0:()=>x.goToOption(ui.Previous),1:()=>{x.openCombobox(),D.nextFrame(()=>{y.value||x.goToOption(ui.Last)})}});case Go.Home:if(B.shiftKey)break;return N.current=!1,B.preventDefault(),B.stopPropagation(),x.goToOption(ui.First);case Go.PageUp:return N.current=!1,B.preventDefault(),B.stopPropagation(),x.goToOption(ui.First);case Go.End:if(B.shiftKey)break;return N.current=!1,B.preventDefault(),B.stopPropagation(),x.goToOption(ui.Last);case Go.PageDown:return N.current=!1,B.preventDefault(),B.stopPropagation(),x.goToOption(ui.Last);case Go.Escape:return N.current=!1,y.comboboxState!==0?void 0:(B.preventDefault(),y.optionsRef.current&&!y.optionsPropsRef.current.static&&B.stopPropagation(),y.nullable&&y.mode===0&&y.value===null&&A(),x.closeCombobox());case Go.Tab:if(N.current=!1,y.comboboxState!==0)return;y.mode===0&&y.activationTrigger!==1&&x.selectActiveOption(),x.closeCombobox();break}}),V=Fn(B=>{d?.(B),y.nullable&&y.mode===0&&B.target.value===""&&A(),x.openCombobox()}),$=Fn(B=>{var ne,re,se;let fe=(ne=B.relatedTarget)!=null?ne:Pf.find(Z=>Z!==B.currentTarget);if(N.current=!1,!((re=y.optionsRef.current)!=null&&re.contains(fe))&&!((se=y.buttonRef.current)!=null&&se.contains(fe))&&y.comboboxState===0)return B.preventDefault(),y.mode===0&&(y.nullable&&y.value===null?A():y.activationTrigger!==1&&x.selectActiveOption()),x.closeCombobox()}),X=Fn(B=>{var ne,re,se;let fe=(ne=B.relatedTarget)!=null?ne:Pf.find(Z=>Z!==B.currentTarget);(re=y.buttonRef.current)!=null&&re.contains(fe)||(se=y.optionsRef.current)!=null&&se.contains(fe)||y.disabled||y.immediate&&y.comboboxState!==0&&(x.openCombobox(),D.nextFrame(()=>{x.setActivationTrigger(1)}))}),J=Mw(()=>{if(y.labelId)return[y.labelId].join(" ")},[y.labelId]),ee=L.useMemo(()=>({open:y.comboboxState===0,disabled:y.disabled}),[y]),Q={ref:w,id:p,role:"combobox",type:b,"aria-controls":(n=y.optionsRef.current)==null?void 0:n.id,"aria-expanded":y.comboboxState===0,"aria-activedescendant":y.activeOptionIndex===null?void 0:y.virtual?(r=y.options.find(B=>{var ne;return!((ne=y.virtual)!=null&&ne.disabled(B.dataRef.current.value))&&y.compare(B.dataRef.current.value,y.virtual.options[y.activeOptionIndex])}))==null?void 0:r.id:(i=y.options[y.activeOptionIndex])==null?void 0:i.id,"aria-labelledby":J,"aria-autocomplete":"list",defaultValue:(l=(o=e.defaultValue)!=null?o:y.defaultValue!==void 0?m?.(y.defaultValue):null)!=null?l:y.defaultValue,disabled:y.disabled,onCompositionStart:j,onCompositionEnd:P,onKeyDown:F,onChange:V,onFocus:X,onBlur:$};return If({ourProps:Q,theirProps:E,slot:ee,defaultTag:uX,name:"Combobox.Input"})}let fX="button";function dX(e,t){var n;let r=jf("Combobox.Button"),i=og("Combobox.Button"),o=rg(r.buttonRef,t),l=ng(),{id:c=`headlessui-combobox-button-${l}`,...p}=e,d=Lw(),m=Fn(w=>{switch(w.key){case Go.ArrowDown:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&i.openCombobox(),d.nextFrame(()=>{var k;return(k=r.inputRef.current)==null?void 0:k.focus({preventScroll:!0})});case Go.ArrowUp:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&(i.openCombobox(),d.nextFrame(()=>{r.value||i.goToOption(ui.Last)})),d.nextFrame(()=>{var k;return(k=r.inputRef.current)==null?void 0:k.focus({preventScroll:!0})});case Go.Escape:return r.comboboxState!==0?void 0:(w.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&w.stopPropagation(),i.closeCombobox(),d.nextFrame(()=>{var k;return(k=r.inputRef.current)==null?void 0:k.focus({preventScroll:!0})}));default:return}}),b=Fn(w=>{if(XK(w.currentTarget))return w.preventDefault();r.comboboxState===0?i.closeCombobox():(w.preventDefault(),i.openCombobox()),d.nextFrame(()=>{var k;return(k=r.inputRef.current)==null?void 0:k.focus({preventScroll:!0})})}),E=Mw(()=>{if(r.labelId)return[r.labelId,c].join(" ")},[r.labelId,c]),y=L.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),x={ref:o,id:c,type:VK(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":E,disabled:r.disabled,onClick:b,onKeyDown:m};return If({ourProps:x,theirProps:p,slot:y,defaultTag:fX,name:"Combobox.Button"})}let pX="label";function hX(e,t){let n=ng(),{id:r=`headlessui-combobox-label-${n}`,...i}=e,o=jf("Combobox.Label"),l=og("Combobox.Label"),c=rg(o.labelRef,t);co(()=>l.registerLabel(r),[r]);let p=Fn(()=>{var m;return(m=o.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}),d=L.useMemo(()=>({open:o.comboboxState===0,disabled:o.disabled}),[o]);return If({ourProps:{ref:c,id:r,onClick:p},theirProps:i,slot:d,defaultTag:pX,name:"Combobox.Label"})}let mX="ul",gX=Fw.RenderStrategy|Fw.Static;function vX(e,t){let n=ng(),{id:r=`headlessui-combobox-options-${n}`,hold:i=!1,...o}=e,l=jf("Combobox.Options"),c=rg(l.optionsRef,t),p=WK(),d=p!==null?(p&ig.Open)===ig.Open:l.comboboxState===0;co(()=>{var y;l.optionsPropsRef.current.static=(y=e.static)!=null?y:!1},[l.optionsPropsRef,e.static]),co(()=>{l.optionsPropsRef.current.hold=i},[l.optionsPropsRef,i]),BK({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(y){return y.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:y.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(y){y.setAttribute("role","none")}});let m=Mw(()=>{var y,x;return(x=l.labelId)!=null?x:(y=l.buttonRef.current)==null?void 0:y.id},[l.labelId,l.buttonRef.current]),b=L.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),E={"aria-labelledby":m,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:c};return l.virtual&&l.comboboxState===0&&Object.assign(o,{children:Ae.createElement(oX,null,o.children)}),If({ourProps:E,theirProps:o,slot:b,defaultTag:mX,features:gX,visible:d,name:"Combobox.Options"})}let yX="li";function bX(e,t){var n;let r=ng(),{id:i=`headlessui-combobox-option-${r}`,disabled:o=!1,value:l,order:c=null,...p}=e,d=jf("Combobox.Option"),m=og("Combobox.Option"),b=d.virtual?d.activeOptionIndex===d.calculateIndex(l):d.activeOptionIndex===null?!1:((n=d.options[d.activeOptionIndex])==null?void 0:n.id)===i,E=d.isSelected(l),y=L.useRef(null),x=tg({disabled:o,value:l,domRef:y,order:c}),w=L.useContext($3),k=rg(t,y,w?w.measureElement:null),N=Fn(()=>m.onChange(l));co(()=>m.registerOption(i,x),[x,i]);let D=L.useRef(!(d.virtual||d.__demoMode));co(()=>{if(!d.virtual||!d.__demoMode)return;let $=eb();return $.requestAnimationFrame(()=>{D.current=!0}),$.dispose},[d.virtual,d.__demoMode]),co(()=>{if(!D.current||d.comboboxState!==0||!b||d.activationTrigger===0)return;let $=eb();return $.requestAnimationFrame(()=>{var X,J;(J=(X=y.current)==null?void 0:X.scrollIntoView)==null||J.call(X,{block:"nearest"})}),$.dispose},[y,b,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let A=Fn($=>{var X;if(o||(X=d.virtual)!=null&&X.disabled(l))return $.preventDefault();N(),R3()||requestAnimationFrame(()=>{var J;return(J=d.inputRef.current)==null?void 0:J.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>m.closeCombobox())}),C=Fn(()=>{var $;if(o||($=d.virtual)!=null&&$.disabled(l))return m.goToOption(ui.Nothing);let X=d.calculateIndex(l);m.goToOption(ui.Specific,X)}),M=qK(),j=Fn($=>M.update($)),P=Fn($=>{var X;if(!M.wasMoved($)||o||(X=d.virtual)!=null&&X.disabled(l)||b)return;let J=d.calculateIndex(l);m.goToOption(ui.Specific,J,0)}),F=Fn($=>{var X;M.wasMoved($)&&(o||(X=d.virtual)!=null&&X.disabled(l)||b&&(d.optionsPropsRef.current.hold||m.goToOption(ui.Nothing)))}),V=L.useMemo(()=>({active:b,selected:E,disabled:o}),[b,E,o]);return If({ourProps:{id:i,ref:k,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":E,disabled:void 0,onClick:A,onFocus:C,onPointerEnter:j,onMouseEnter:j,onPointerMove:P,onMouseMove:P,onPointerLeave:F,onMouseLeave:F},theirProps:p,slot:V,defaultTag:yX,name:"Combobox.Option"})}let EX=Ff(lX),SX=Ff(dX),TX=Ff(cX),xX=Ff(hX),wX=Ff(vX),CX=Ff(bX),fp=Object.assign(EX,{Input:TX,Button:SX,Label:xX,Options:wX,Option:CX});var _X=Object.defineProperty,ke=(e,t)=>_X(e,"name",{value:t,configurable:!0});function Ku(e){const t=L.createContext(null);return t.displayName=e,t}ke(Ku,"createNullableContext");function Xu(e){function t(n){var r;const i=L.useContext(e);if(i===null&&n!=null&&n.nonNull)throw new Error(`Tried to use \`${((r=n.caller)==null?void 0:r.name)||t.caller.name}\` without the necessary context. Make sure to render the \`${e.displayName}Provider\` component higher up the tree.`);return i}return ke(t,"useGivenContext"),Object.defineProperty(t,"name",{value:`use${e.displayName}`}),t}ke(Xu,"createContextHook");const z3=Ku("StorageContext");function H3(e){const t=L.useRef(!0),[n,r]=L.useState(new iS(e.storage));return L.useEffect(()=>{t.current?t.current=!1:r(new iS(e.storage))},[e.storage]),Y.jsx(z3.Provider,{value:n,children:e.children})}ke(H3,"StorageContextProvider");const Zu=Xu(z3),NX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),L.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),AX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),OX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),DX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),kX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),RX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),L.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),MX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),LX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),IX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),FX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),PX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),jX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),L.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),VX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),UX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),L.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),qX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),L.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),L.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),BX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),L.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),$X=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),zX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),L.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),HX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),L.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),GX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),L.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),YX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),WX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),QX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),L.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),L.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),L.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),L.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),KX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),L.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),L.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),L.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),XX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),L.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),ZX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),JX=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),eZ=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),tZ=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),nZ=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":t,...n},e===void 0?L.createElement("title",{id:t},"trash icon"):e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),rZ=ke(({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),L.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),iZ=_n(NX),oZ=_n(AX),aZ=_n(OX),sZ=_n(DX),$w=_n(kX),lZ=_n(RX),uZ=_n(MX),cZ=_n(LX),fZ=_n(IX),dZ=_n(FX),pZ=_n(PX,"filled docs icon"),hZ=_n(jX),mZ=_n(VX),gZ=_n(UX),vZ=_n(qX),yZ=_n(BX),bZ=_n($X),EZ=_n(zX),SZ=_n(HX),TZ=_n(GX),xZ=_n(YX),wZ=_n(WX),CZ=_n(QX),_Z=_n(KX),NZ=_n(XX),AZ=_n(ZX),OZ=_n(JX,"filled star icon"),DZ=_n(eZ),kZ=_n(tZ),RZ=_n(nZ,"trash icon"),rb=_n(rZ);function _n(e,t=e.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return e.defaultProps={title:t},e}ke(_n,"generateIcon");const ci=L.forwardRef((e,t)=>Y.jsx("button",{...e,ref:t,className:vi("graphiql-un-styled",e.className)}));ci.displayName="UnStyledButton";const us=L.forwardRef((e,t)=>Y.jsx("button",{...e,ref:t,className:vi("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[e.state],e.className)}));us.displayName="Button";const zw=L.forwardRef((e,t)=>Y.jsx("div",{...e,ref:t,className:vi("graphiql-button-group",e.className)}));zw.displayName="ButtonGroup";const ag=ke((e,t)=>Object.entries(t).reduce((n,[r,i])=>(n[r]=i,n),e),"createComponentGroup"),G3=L.forwardRef((e,t)=>Y.jsx(BU,{asChild:!0,children:Y.jsxs(ci,{...e,ref:t,type:"button",className:vi("graphiql-dialog-close",e.className),children:[Y.jsx(jk,{children:"Close dialog"}),Y.jsx($w,{})]})}));G3.displayName="Dialog.Close";function Y3({children:e,...t}){return Y.jsx(IU,{...t,children:Y.jsxs(PU,{children:[Y.jsx(jU,{className:"graphiql-dialog-overlay"}),Y.jsx(VU,{className:"graphiql-dialog",children:e})]})})}ke(Y3,"DialogRoot");const dp=ag(Y3,{Close:G3,Title:UU,Trigger:FU,Description:qU}),W3=L.forwardRef((e,t)=>Y.jsx(P$,{asChild:!0,children:Y.jsx("button",{...e,ref:t,className:vi("graphiql-un-styled",e.className)})}));W3.displayName="DropdownMenuButton";function Q3({children:e,align:t="start",sideOffset:n=5,className:r,...i}){return Y.jsx(j$,{children:Y.jsx(V$,{align:t,sideOffset:n,className:vi("graphiql-dropdown-content",r),...i,children:e})})}ke(Q3,"Content");const MZ=ke(({className:e,children:t,...n})=>Y.jsx(U$,{className:vi("graphiql-dropdown-item",e),...n,children:t}),"Item"),Ju=ag(F$,{Button:W3,Item:MZ,Content:Q3}),ib=new Xz({breaks:!0,linkify:!0}),Ws=L.forwardRef(({children:e,onlyShowFirstChild:t,type:n,...r},i)=>Y.jsx("div",{...r,ref:i,className:vi(`graphiql-markdown-${n}`,t&&"graphiql-markdown-preview",r.className),dangerouslySetInnerHTML:{__html:ib.render(e)}}));Ws.displayName="MarkdownContent";const Hw=L.forwardRef((e,t)=>Y.jsx("div",{...e,ref:t,className:vi("graphiql-spinner",e.className)}));Hw.displayName="Spinner";function K3({children:e,align:t="start",side:n="bottom",sideOffset:r=5,label:i}){return Y.jsxs(oK,{children:[Y.jsx(aK,{asChild:!0,children:e}),Y.jsx(sK,{children:Y.jsx(lK,{className:"graphiql-tooltip",align:t,side:n,sideOffset:r,children:i})})]})}ke(K3,"TooltipRoot");const Wi=ag(K3,{Provider:iK}),X3=L.forwardRef(({isActive:e,value:t,children:n,className:r,...i},o)=>Y.jsx(h3.Item,{...i,ref:o,value:t,"aria-selected":e?"true":void 0,role:"tab",className:vi("graphiql-tab",e&&"graphiql-tab-active",r),children:n}));X3.displayName="Tab";const Z3=L.forwardRef((e,t)=>Y.jsx(ci,{...e,ref:t,type:"button",className:vi("graphiql-tab-button",e.className),children:e.children}));Z3.displayName="Tab.Button";const J3=L.forwardRef((e,t)=>Y.jsx(Wi,{label:"Close Tab",children:Y.jsx(ci,{"aria-label":"Close Tab",...e,ref:t,type:"button",className:vi("graphiql-tab-close",e.className),children:Y.jsx($w,{})})}));J3.displayName="Tab.Close";const Gw=ag(X3,{Button:Z3,Close:J3}),eF=L.forwardRef(({values:e,onReorder:t,children:n,className:r,...i},o)=>Y.jsx(h3.Group,{...i,ref:o,values:e,onReorder:t,axis:"x",role:"tablist",className:vi("graphiql-tabs",r),children:n}));eF.displayName="Tabs";const tF=Ku("HistoryContext");function nF(e){var t;const n=Zu(),r=L.useRef(new a9(n||new iS(null),e.maxHistoryLength||LZ)),[i,o]=L.useState(((t=r.current)==null?void 0:t.queries)||[]),l=L.useCallback(E=>{var y;(y=r.current)==null||y.updateHistory(E),o(r.current.queries)},[]),c=L.useCallback((E,y)=>{r.current.editLabel(E,y),o(r.current.queries)},[]),p=L.useCallback(E=>{r.current.toggleFavorite(E),o(r.current.queries)},[]),d=L.useCallback(E=>E,[]),m=L.useCallback((E,y=!1)=>{r.current.deleteHistory(E,y),o(r.current.queries)},[]),b=L.useMemo(()=>({addToHistory:l,editLabel:c,items:i,toggleFavorite:p,setActive:d,deleteFromHistory:m}),[l,c,i,p,d,m]);return Y.jsx(tF.Provider,{value:b,children:e.children})}ke(nF,"HistoryContextProvider");const ob=Xu(tF),LZ=20;function rF(){const{items:e,deleteFromHistory:t}=ob({nonNull:!0});let n=e.slice().map((c,p)=>({...c,index:p})).reverse();const r=n.filter(c=>c.favorite);r.length&&(n=n.filter(c=>!c.favorite));const[i,o]=L.useState(null);L.useEffect(()=>{i&&setTimeout(()=>{o(null)},2e3)},[i]);const l=L.useCallback(()=>{try{for(const c of n)t(c,!0);o("success")}catch{o("error")}},[t,n]);return Y.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[Y.jsxs("div",{className:"graphiql-history-header",children:["History",(i||n.length>0)&&Y.jsx(us,{type:"button",state:i||void 0,disabled:!n.length,onClick:l,children:{success:"Cleared",error:"Failed to Clear"}[i]||"Clear"})]}),!!r.length&&Y.jsx("ul",{className:"graphiql-history-items",children:r.map(c=>Y.jsx(sg,{item:c},c.index))}),!!r.length&&!!n.length&&Y.jsx("div",{className:"graphiql-history-item-spacer"}),!!n.length&&Y.jsx("ul",{className:"graphiql-history-items",children:n.map(c=>Y.jsx(sg,{item:c},c.index))})]})}ke(rF,"History");function sg(e){const{editLabel:t,toggleFavorite:n,deleteFromHistory:r,setActive:i}=ob({nonNull:!0,caller:sg}),{headerEditor:o,queryEditor:l,variableEditor:c}=Ei({nonNull:!0,caller:sg}),p=L.useRef(null),d=L.useRef(null),[m,b]=L.useState(!1);L.useEffect(()=>{var A;m&&((A=p.current)==null||A.focus())},[m]);const E=e.item.label||e.item.operationName||iF(e.item.query),y=L.useCallback(()=>{var A;b(!1);const{index:C,...M}=e.item;t({...M,label:(A=p.current)==null?void 0:A.value},C)},[t,e.item]),x=L.useCallback(()=>{b(!1)},[]),w=L.useCallback(A=>{A.stopPropagation(),b(!0)},[]),k=L.useCallback(()=>{const{query:A,variables:C,headers:M}=e.item;l?.setValue(A??""),c?.setValue(C??""),o?.setValue(M??""),i(e.item)},[o,e.item,l,i,c]),N=L.useCallback(A=>{A.stopPropagation(),r(e.item)},[e.item,r]),D=L.useCallback(A=>{A.stopPropagation(),n(e.item)},[e.item,n]);return Y.jsx("li",{className:vi("graphiql-history-item",m&&"editable"),children:m?Y.jsxs(Y.Fragment,{children:[Y.jsx("input",{type:"text",defaultValue:e.item.label,ref:p,onKeyDown:A=>{A.key==="Esc"?b(!1):A.key==="Enter"&&(b(!1),t({...e.item,label:A.currentTarget.value}))},placeholder:"Type a label"}),Y.jsx(ci,{type:"button",ref:d,onClick:y,children:"Save"}),Y.jsx(ci,{type:"button",ref:d,onClick:x,children:Y.jsx($w,{})})]}):Y.jsxs(Y.Fragment,{children:[Y.jsx(Wi,{label:"Set active",children:Y.jsx(ci,{type:"button",className:"graphiql-history-item-label",onClick:k,"aria-label":"Set active",children:E})}),Y.jsx(Wi,{label:"Edit label",children:Y.jsx(ci,{type:"button",className:"graphiql-history-item-action",onClick:w,"aria-label":"Edit label",children:Y.jsx(TZ,{"aria-hidden":"true"})})}),Y.jsx(Wi,{label:e.item.favorite?"Remove favorite":"Add favorite",children:Y.jsx(ci,{type:"button",className:"graphiql-history-item-action",onClick:D,"aria-label":e.item.favorite?"Remove favorite":"Add favorite",children:e.item.favorite?Y.jsx(OZ,{"aria-hidden":"true"}):Y.jsx(DZ,{"aria-hidden":"true"})})}),Y.jsx(Wi,{label:"Delete from history",children:Y.jsx(ci,{type:"button",className:"graphiql-history-item-action",onClick:N,"aria-label":"Delete from history",children:Y.jsx(RZ,{"aria-hidden":"true"})})})]})})}ke(sg,"HistoryItem");function iF(e){return e?.split(`
`).map(t=>t.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}ke(iF,"formatQuery");const oF=Ku("ExecutionContext");function ab({fetcher:e,getDefaultFieldNames:t,children:n,operationName:r}){if(!e)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:i,headerEditor:o,queryEditor:l,responseEditor:c,variableEditor:p,updateActiveTabValues:d}=Ei({nonNull:!0,caller:ab}),m=ob(),b=vb({getDefaultFieldNames:t,caller:ab}),[E,y]=L.useState(!1),[x,w]=L.useState(null),k=L.useRef(0),N=L.useCallback(()=>{x?.unsubscribe(),y(!1),w(null)},[x]),D=L.useCallback(async()=>{if(!l||!c)return;if(x){N();return}const M=ke(ee=>{c.setValue(ee),d({response:ee})},"setResponse");k.current+=1;const j=k.current;let P=b()||l.getValue();const F=p?.getValue();let V;try{V=Yw({json:F,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(ee){M(ee instanceof Error?ee.message:`${ee}`);return}const $=o?.getValue();let X;try{X=Yw({json:$,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(ee){M(ee instanceof Error?ee.message:`${ee}`);return}if(i){const ee=l.documentAST?H9(l.documentAST,i):[];ee.length>0&&(P+=`
`+ee.map(Q=>pn(Q)).join(`
`))}M(""),y(!0);const J=r??l.operationName??void 0;m?.addToHistory({query:P,variables:F,headers:$,operationName:J});try{let ee={data:{}};const Q=ke(re=>{if(j!==k.current)return;let se=Array.isArray(re)?re:!1;if(!se&&typeof re=="object"&&re!==null&&"hasNext"in re&&(se=[re]),se){const fe={data:ee.data},Z=[...ee?.errors||[],...se.flatMap(ge=>ge.errors).filter(Boolean)];Z.length&&(fe.errors=Z);for(const ge of se){const{path:ae,data:pe,errors:ce,...he}=ge;if(ae){if(!pe)throw new Error(`Expected part to contain a data property, but got ${ge}`);o7(fe.data,ae,pe,{merge:!0})}else pe&&(fe.data=pe);ee={...fe,...he}}y(!1),M(rS(ee))}else{const fe=rS(re);y(!1),M(fe)}},"handleResponse"),B=e({query:P,variables:V,operationName:J},{headers:X??void 0,documentAST:l.documentAST??void 0}),ne=await Promise.resolve(B);if(yO(ne))w(ne.subscribe({next(re){Q(re)},error(re){y(!1),re&&M(vm(re)),w(null)},complete(){y(!1),w(null)}}));else if(bO(ne)){w({unsubscribe:()=>{var re,se;return(se=(re=ne[Symbol.asyncIterator]()).return)==null?void 0:se.call(re)}});for await(const re of ne)Q(re);y(!1),w(null)}else Q(ne)}catch(ee){y(!1),M(vm(ee)),w(null)}},[b,i,e,o,m,r,l,c,N,x,d,p]),A=!!x,C=L.useMemo(()=>({isFetching:E,isSubscribed:A,operationName:r??null,run:D,stop:N}),[E,A,r,D,N]);return Y.jsx(oF.Provider,{value:C,children:n})}ke(ab,"ExecutionContextProvider");const pp=Xu(oF);function Yw({json:e,errorMessageParse:t,errorMessageType:n}){let r;try{r=e&&e.trim()!==""?JSON.parse(e):void 0}catch(o){throw new Error(`${t}: ${o instanceof Error?o.message:o}.`)}const i=typeof r=="object"&&r!==null&&!Array.isArray(r);if(r!==void 0&&!i)throw new Error(n);return r}ke(Yw,"tryParseJsonObject");const sb="graphiql",lb="sublime";let aF=!1;typeof window=="object"&&(aF=window.navigator.platform.toLowerCase().indexOf("mac")===0);const ub={[aF?"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 hp(e,t){const n=await Promise.resolve().then(()=>Zne).then(r=>r.c).then(r=>typeof r=="function"?r:r.default);return await Promise.all(t?.useCommonAddons===!1?e:[Promise.resolve().then(()=>tre).then(r=>r.s),Promise.resolve().then(()=>are).then(r=>r.m),Promise.resolve().then(()=>ure).then(r=>r.c),Promise.resolve().then(()=>HP).then(r=>r.b),Promise.resolve().then(()=>KP).then(r=>r.f),Promise.resolve().then(()=>vre).then(r=>r.l),Promise.resolve().then(()=>n4).then(r=>r.s),Promise.resolve().then(()=>s4).then(r=>r.j),Promise.resolve().then(()=>i4).then(r=>r.d),Promise.resolve().then(()=>c4).then(r=>r.s),...e]),n}ke(hp,"importCodeMirror");const IZ=ke(e=>e?pn(e):"","printDefault");function Ww({field:e}){if(!("defaultValue"in e)||e.defaultValue===void 0)return null;const t=Ml(e.defaultValue,e.type);return t?Y.jsxs(Y.Fragment,{children:[" = ",Y.jsx("span",{className:"graphiql-doc-explorer-default-value",children:IZ(t)})]}):null}ke(Ww,"DefaultValue");const sF=Ku("SchemaContext");function Qw(e){if(!e.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:t,headerEditor:n}=Ei({nonNull:!0,caller:Qw}),[r,i]=L.useState(),[o,l]=L.useState(!1),[c,p]=L.useState(null),d=L.useRef(0);L.useEffect(()=>{i(gy(e.schema)||e.schema===null||e.schema===void 0?e.schema:void 0),d.current++},[e.schema]);const m=L.useRef(t);L.useEffect(()=>{n&&(m.current=n.getValue())});const{introspectionQuery:b,introspectionQueryName:E,introspectionQuerySansSubscriptions:y}=lF({inputValueDeprecation:e.inputValueDeprecation,introspectionQueryName:e.introspectionQueryName,schemaDescription:e.schemaDescription}),{fetcher:x,onSchemaChange:w,dangerouslyAssumeSchemaIsValid:k,children:N}=e,D=L.useCallback(()=>{if(gy(e.schema)||e.schema===null)return;const M=++d.current,j=e.schema;async function P(){if(j)return j;const F=uF(m.current);if(!F.isValidJSON){p("Introspection failed as headers are invalid.");return}const V=F.headers?{headers:F.headers}:{},$=EO(x({query:b,operationName:E},V));if(!vO($)){p("Fetcher did not return a Promise for introspection.");return}l(!0),p(null);let X=await $;if(typeof X!="object"||X===null||!("data"in X)){const ee=EO(x({query:y,operationName:E},V));if(!vO(ee))throw new Error("Fetcher did not return a Promise for introspection.");X=await ee}if(l(!1),X!=null&&X.data&&"__schema"in X.data)return X.data;const J=typeof X=="string"?X:rS(X);p(J)}ke(P,"fetchIntrospectionData"),P().then(F=>{if(!(M!==d.current||!F))try{const V=QE(F);i(V),w?.(V)}catch(V){p(vm(V))}}).catch(F=>{M===d.current&&(p(vm(F)),l(!1))})},[x,E,b,y,w,e.schema]);L.useEffect(()=>{D()},[D]),L.useEffect(()=>{function M(j){j.ctrlKey&&j.key==="R"&&D()}return ke(M,"triggerIntrospection"),window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)});const A=L.useMemo(()=>!r||k?[]:vy(r),[r,k]),C=L.useMemo(()=>({fetchError:c,introspect:D,isFetching:o,schema:r,validationErrors:A}),[c,D,o,r,A]);return Y.jsx(sF.Provider,{value:C,children:N})}ke(Qw,"SchemaContextProvider");const cs=Xu(sF);function lF({inputValueDeprecation:e,introspectionQueryName:t,schemaDescription:n}){return L.useMemo(()=>{const r=t||"IntrospectionQuery";let i=Ry({inputValueDeprecation:e,schemaDescription:n});t&&(i=i.replace("query IntrospectionQuery",`query ${r}`));const o=i.replace("subscriptionType { name }","");return{introspectionQueryName:r,introspectionQuery:i,introspectionQuerySansSubscriptions:o}},[e,t,n])}ke(lF,"useIntrospectionQuery");function uF(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch{n=!1}return{headers:t,isValidJSON:n}}ke(uF,"parseHeaderString");const cb={name:"Docs"},cF=Ku("ExplorerContext");function Kw(e){const{schema:t,validationErrors:n}=cs({nonNull:!0,caller:Kw}),[r,i]=L.useState([cb]),o=L.useCallback(d=>{i(m=>m.at(-1).def===d.def?m:[...m,d])},[]),l=L.useCallback(()=>{i(d=>d.length>1?d.slice(0,-1):d)},[]),c=L.useCallback(()=>{i(d=>d.length===1?d:[cb])},[]);L.useEffect(()=>{t==null||n.length>0?c():i(d=>{if(d.length===1)return d;const m=[cb];let b=null;for(const E of d)if(E!==cb)if(E.def)if(Rl(E.def)){const y=t.getType(E.def.name);if(y)m.push({name:E.name,def:y}),b=y;else break}else{if(b===null)break;if(At(b)||nn(b)){const y=b.getFields()[E.name];if(y)m.push({name:E.name,def:y});else break}else{if(Oi(b)||Wn(b)||Rt(b)||ar(b))break;{const y=b;if(y.args.find(x=>x.name===E.name))m.push({name:E.name,def:y});else break}}}else b=null,m.push(E);return m})},[c,t,n]);const p=L.useMemo(()=>({explorerNavStack:r,push:o,pop:l,reset:c}),[r,o,l,c]);return Y.jsx(cF.Provider,{value:p,children:e.children})}ke(Kw,"ExplorerContextProvider");const ec=Xu(cF);function lg(e,t){return _t(e)?Y.jsxs(Y.Fragment,{children:[lg(e.ofType,t),"!"]}):mn(e)?Y.jsxs(Y.Fragment,{children:["[",lg(e.ofType,t),"]"]}):t(e)}ke(lg,"renderType");function fs(e){const{push:t}=ec({nonNull:!0,caller:fs});return e.type?lg(e.type,n=>Y.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:r=>{r.preventDefault(),t({name:n.name,def:n})},href:"#",children:n.name})):null}ke(fs,"TypeLink");function ug({arg:e,showDefaultValue:t,inline:n}){const r=Y.jsxs("span",{children:[Y.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:e.name}),": ",Y.jsx(fs,{type:e.type}),t!==!1&&Y.jsx(Ww,{field:e})]});return n?r:Y.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[r,e.description?Y.jsx(Ws,{type:"description",children:e.description}):null,e.deprecationReason?Y.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[Y.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),Y.jsx(Ws,{type:"deprecation",children:e.deprecationReason})]}):null]})}ke(ug,"Argument");function Xw(e){return e.children?Y.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[Y.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),Y.jsx(Ws,{type:"deprecation",onlyShowFirstChild:e.preview??!0,children:e.children})]}):null}ke(Xw,"DeprecationReason");function fF({directive:e}){return Y.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",e.name.value]})}ke(fF,"Directive");function Yo(e){const t=FZ[e.title];return Y.jsxs("div",{children:[Y.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[Y.jsx(t,{}),e.title]}),Y.jsx("div",{className:"graphiql-doc-explorer-section-content",children:e.children})]})}ke(Yo,"ExplorerSection");const FZ={Arguments:iZ,"Deprecated Arguments":uZ,"Deprecated Enum Values":cZ,"Deprecated Fields":fZ,Directives:dZ,"Enum Values":mZ,Fields:gZ,Implements:yZ,Implementations:rb,"Possible Types":rb,"Root Types":NZ,Type:rb,"All Schema Types":rb};function dF(e){return Y.jsxs(Y.Fragment,{children:[e.field.description?Y.jsx(Ws,{type:"description",children:e.field.description}):null,Y.jsx(Xw,{preview:!1,children:e.field.deprecationReason}),Y.jsx(Yo,{title:"Type",children:Y.jsx(fs,{type:e.field.type})}),Y.jsx(pF,{field:e.field}),Y.jsx(hF,{field:e.field})]})}ke(dF,"FieldDocumentation");function pF({field:e}){const[t,n]=L.useState(!1),r=L.useCallback(()=>{n(!0)},[]);if(!("args"in e))return null;const i=[],o=[];for(const l of e.args)l.deprecationReason?o.push(l):i.push(l);return Y.jsxs(Y.Fragment,{children:[i.length>0?Y.jsx(Yo,{title:"Arguments",children:i.map(l=>Y.jsx(ug,{arg:l},l.name))}):null,o.length>0?t||i.length===0?Y.jsx(Yo,{title:"Deprecated Arguments",children:o.map(l=>Y.jsx(ug,{arg:l},l.name))}):Y.jsx(us,{type:"button",onClick:r,children:"Show Deprecated Arguments"}):null]})}ke(pF,"Arguments");function hF({field:e}){var t;const n=((t=e.astNode)==null?void 0:t.directives)||[];return!n||n.length===0?null:Y.jsx(Yo,{title:"Directives",children:n.map(r=>Y.jsx("div",{children:Y.jsx(fF,{directive:r})},r.name.value))})}ke(hF,"Directives");function mF(e){var t,n,r,i;const o=e.schema.getQueryType(),l=(n=(t=e.schema).getMutationType)==null?void 0:n.call(t),c=(i=(r=e.schema).getSubscriptionType)==null?void 0:i.call(r),p=e.schema.getTypeMap(),d=[o?.name,l?.name,c?.name];return Y.jsxs(Y.Fragment,{children:[Y.jsx(Ws,{type:"description",children:e.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),Y.jsxs(Yo,{title:"Root Types",children:[o?Y.jsxs("div",{children:[Y.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",Y.jsx(fs,{type:o})]}):null,l&&Y.jsxs("div",{children:[Y.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",Y.jsx(fs,{type:l})]}),c&&Y.jsxs("div",{children:[Y.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",Y.jsx(fs,{type:c})]})]}),Y.jsx(Yo,{title:"All Schema Types",children:p&&Y.jsx("div",{children:Object.values(p).map(m=>d.includes(m.name)||m.name.startsWith("__")?null:Y.jsx("div",{children:Y.jsx(fs,{type:m})},m.name))})})]})}ke(mF,"SchemaDocumentation");function Vf(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=null,t(...r)},e)}}ke(Vf,"debounce");function Zw(){const{explorerNavStack:e,push:t}=ec({nonNull:!0,caller:Zw}),n=L.useRef(null),r=fb(),[i,o]=L.useState(""),[l,c]=L.useState(r(i)),p=L.useMemo(()=>Vf(200,y=>{c(r(y))}),[r]);L.useEffect(()=>{p(i)},[p,i]),L.useEffect(()=>{function y(x){var w;x.metaKey&&x.key==="k"&&((w=n.current)==null||w.focus())}return ke(y,"handleKeyDown"),window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const d=e.at(-1),m=L.useCallback(y=>{t("field"in y?{name:y.field.name,def:y.field}:{name:y.type.name,def:y.type})},[t]),b=L.useRef(!1),E=L.useCallback(y=>{b.current=y.type==="focus"},[]);return e.length===1||At(d.def)||Rt(d.def)||nn(d.def)?Y.jsxs(fp,{as:"div",className:"graphiql-doc-explorer-search",onChange:m,"data-state":b?void 0:"idle","aria-label":`Search ${d.name}...`,children:[Y.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var y;(y=n.current)==null||y.focus()},children:[Y.jsx(EZ,{}),Y.jsx(fp.Input,{autoComplete:"off",onFocus:E,onBlur:E,onChange:y=>o(y.target.value),placeholder:"⌘ K",ref:n,value:i,"data-cy":"doc-explorer-input"})]}),b.current&&Y.jsxs(fp.Options,{"data-cy":"doc-explorer-list",children:[l.within.length+l.types.length+l.fields.length===0?Y.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):l.within.map((y,x)=>Y.jsx(fp.Option,{value:y,"data-cy":"doc-explorer-option",children:Y.jsx(Jw,{field:y.field,argument:y.argument})},`within-${x}`)),l.within.length>0&&l.types.length+l.fields.length>0?Y.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,l.types.map((y,x)=>Y.jsx(fp.Option,{value:y,"data-cy":"doc-explorer-option",children:Y.jsx(pb,{type:y.type})},`type-${x}`)),l.fields.map((y,x)=>Y.jsxs(fp.Option,{value:y,"data-cy":"doc-explorer-option",children:[Y.jsx(pb,{type:y.type}),".",Y.jsx(Jw,{field:y.field,argument:y.argument})]},`field-${x}`))]})]}):null}ke(Zw,"Search");function fb(e){const{explorerNavStack:t}=ec({nonNull:!0,caller:e||fb}),{schema:n}=cs({nonNull:!0,caller:e||fb}),r=t.at(-1);return L.useCallback(i=>{const o={within:[],types:[],fields:[]};if(!n)return o;const l=r.def,c=n.getTypeMap();let p=Object.keys(c);l&&(p=p.filter(d=>d!==l.name),p.unshift(l.name));for(const d of p){if(o.within.length+o.types.length+o.fields.length>=100)break;const m=c[d];if(l!==m&&db(d,i)&&o.types.push({type:m}),!At(m)&&!Rt(m)&&!nn(m))continue;const b=m.getFields();for(const E in b){const y=b[E];let x;if(!db(E,i))if("args"in y){if(x=y.args.filter(w=>db(w.name,i)),x.length===0)continue}else continue;o[l===m?"within":"fields"].push(...x?x.map(w=>({type:m,field:y,argument:w})):[{type:m,field:y}])}}return o},[r.def,n])}ke(fb,"useSearchResults");function db(e,t){try{const n=t.replaceAll(/[^_0-9A-Za-z]/g,r=>"\\"+r);return e.search(new RegExp(n,"i"))!==-1}catch{return e.toLowerCase().includes(t.toLowerCase())}}ke(db,"isMatch");function pb(e){return Y.jsx("span",{className:"graphiql-doc-explorer-search-type",children:e.type.name})}ke(pb,"Type");function Jw({field:e,argument:t}){return Y.jsxs(Y.Fragment,{children:[Y.jsx("span",{className:"graphiql-doc-explorer-search-field",children:e.name}),t?Y.jsxs(Y.Fragment,{children:["(",Y.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:t.name}),":"," ",lg(t.type,n=>Y.jsx(pb,{type:n})),")"]}):null]})}ke(Jw,"Field$1");function gF(e){const{push:t}=ec({nonNull:!0});return Y.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:n=>{n.preventDefault(),t({name:e.field.name,def:e.field})},href:"#",children:e.field.name})}ke(gF,"FieldLink");function vF(e){return Rl(e.type)?Y.jsxs(Y.Fragment,{children:[e.type.description?Y.jsx(Ws,{type:"description",children:e.type.description}):null,Y.jsx(yF,{type:e.type}),Y.jsx(bF,{type:e.type}),Y.jsx(EF,{type:e.type}),Y.jsx(SF,{type:e.type})]}):null}ke(vF,"TypeDocumentation");function yF({type:e}){return At(e)&&e.getInterfaces().length>0?Y.jsx(Yo,{title:"Implements",children:e.getInterfaces().map(t=>Y.jsx("div",{children:Y.jsx(fs,{type:t})},t.name))}):null}ke(yF,"ImplementsInterfaces");function bF({type:e}){const[t,n]=L.useState(!1),r=L.useCallback(()=>{n(!0)},[]);if(!At(e)&&!Rt(e)&&!nn(e))return null;const i=e.getFields(),o=[],l=[];for(const c of Object.keys(i).map(p=>i[p]))c.deprecationReason?l.push(c):o.push(c);return Y.jsxs(Y.Fragment,{children:[o.length>0?Y.jsx(Yo,{title:"Fields",children:o.map(c=>Y.jsx(eC,{field:c},c.name))}):null,l.length>0?t||o.length===0?Y.jsx(Yo,{title:"Deprecated Fields",children:l.map(c=>Y.jsx(eC,{field:c},c.name))}):Y.jsx(us,{type:"button",onClick:r,children:"Show Deprecated Fields"}):null]})}ke(bF,"Fields");function eC({field:e}){const t="args"in e?e.args.filter(n=>!n.deprecationReason):[];return Y.jsxs("div",{className:"graphiql-doc-explorer-item",children:[Y.jsxs("div",{children:[Y.jsx(gF,{field:e}),t.length>0?Y.jsxs(Y.Fragment,{children:["(",Y.jsx("span",{children:t.map(n=>t.length===1?Y.jsx(ug,{arg:n,inline:!0},n.name):Y.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:Y.jsx(ug,{arg:n,inline:!0})},n.name))}),")"]}):null,": ",Y.jsx(fs,{type:e.type}),Y.jsx(Ww,{field:e})]}),e.description?Y.jsx(Ws,{type:"description",onlyShowFirstChild:!0,children:e.description}):null,Y.jsx(Xw,{children:e.deprecationReason})]})}ke(eC,"Field");function EF({type:e}){const[t,n]=L.useState(!1),r=L.useCallback(()=>{n(!0)},[]);if(!Wn(e))return null;const i=[],o=[];for(const l of e.getValues())l.deprecationReason?o.push(l):i.push(l);return Y.jsxs(Y.Fragment,{children:[i.length>0?Y.jsx(Yo,{title:"Enum Values",children:i.map(l=>Y.jsx(tC,{value:l},l.name))}):null,o.length>0?t||i.length===0?Y.jsx(Yo,{title:"Deprecated Enum Values",children:o.map(l=>Y.jsx(tC,{value:l},l.name))}):Y.jsx(us,{type:"button",onClick:r,children:"Show Deprecated Values"}):null]})}ke(EF,"EnumValues");function tC({value:e}){return Y.jsxs("div",{className:"graphiql-doc-explorer-item",children:[Y.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:e.name}),e.description?Y.jsx(Ws,{type:"description",children:e.description}):null,e.deprecationReason?Y.jsx(Ws,{type:"deprecation",children:e.deprecationReason}):null]})}ke(tC,"EnumValue");function SF({type:e}){const{schema:t}=cs({nonNull:!0});return!t||!sr(e)?null:Y.jsx(Yo,{title:Rt(e)?"Implementations":"Possible Types",children:t.getPossibleTypes(e).map(n=>Y.jsx("div",{children:Y.jsx(fs,{type:n})},n.name))})}ke(SF,"PossibleTypes");function hb(){const{fetchError:e,isFetching:t,schema:n,validationErrors:r}=cs({nonNull:!0,caller:hb}),{explorerNavStack:i,pop:o}=ec({nonNull:!0,caller:hb}),l=i.at(-1);let c=null;e?c=Y.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):r.length>0?c=Y.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",r[0].message]}):t?c=Y.jsx(Hw,{}):n?i.length===1?c=Y.jsx(mF,{schema:n}):Vd(l.def)?c=Y.jsx(vF,{type:l.def}):l.def&&(c=Y.jsx(dF,{field:l.def})):c=Y.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let p;return i.length>1&&(p=i.at(-2).name),Y.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[Y.jsxs("div",{className:"graphiql-doc-explorer-header",children:[Y.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[p&&Y.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:d=>{d.preventDefault(),o()},"aria-label":`Go back to ${p}`,children:[Y.jsx(aZ,{}),p]}),Y.jsx("div",{className:"graphiql-doc-explorer-title",children:l.name})]}),Y.jsx(Zw,{},l.name)]}),Y.jsx("div",{className:"graphiql-doc-explorer-content",children:c})]})}ke(hb,"DocExplorer");const cg={title:"Documentation Explorer",icon:ke(function(){const e=mb();return e?.visiblePlugin===cg?Y.jsx(pZ,{}):Y.jsx(hZ,{})},"Icon"),content:hb},TF={title:"History",icon:vZ,content:rF},xF=Ku("PluginContext");function wF(e){const t=Zu(),n=ec(),r=ob(),i=!!n,o=!!r,l=L.useMemo(()=>{const y=[],x={};i&&(y.push(cg),x[cg.title]=!0),o&&(y.push(TF),x[TF.title]=!0);for(const w of e.plugins||[]){if(typeof w.title!="string"||!w.title)throw new Error("All GraphiQL plugins must have a unique title");if(x[w.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${w.title}'`);y.push(w),x[w.title]=!0}return y},[i,o,e.plugins]),[c,p]=L.useState(()=>{const y=t?.get(CF);return l.find(w=>w.title===y)||(y&&t?.set(CF,""),e.visiblePlugin&&l.find(w=>(typeof e.visiblePlugin=="string"?w.title:w)===e.visiblePlugin)||null)}),{onTogglePluginVisibility:d,children:m}=e,b=L.useCallback(y=>{const x=y&&l.find(w=>(typeof y=="string"?w.title:w)===y)||null;p(w=>x===w?w:(d?.(x),x))},[d,l]);L.useEffect(()=>{e.visiblePlugin&&b(e.visiblePlugin)},[l,e.visiblePlugin,b]);const E=L.useMemo(()=>({plugins:l,setVisiblePlugin:b,visiblePlugin:c}),[l,b,c]);return Y.jsx(xF.Provider,{value:E,children:m})}ke(wF,"PluginContextProvider");const mb=Xu(xF),CF="visiblePlugin";function _F(e,t,n,r,i,o){hp([],{useCommonAddons:!1}).then(c=>{let p,d,m,b,E,y,x,w,k;c.on(t,"select",(N,D)=>{if(!p){const A=D.parentNode;p=document.createElement("div"),p.className="CodeMirror-hint-information",A.append(p);const C=document.createElement("header");C.className="CodeMirror-hint-information-header",p.append(C),d=document.createElement("span"),d.className="CodeMirror-hint-information-field-name",C.append(d),m=document.createElement("span"),m.className="CodeMirror-hint-information-type-name-pill",C.append(m),b=document.createElement("span"),m.append(b),E=document.createElement("a"),E.className="CodeMirror-hint-information-type-name",E.href="javascript:void 0",E.addEventListener("click",l),m.append(E),y=document.createElement("span"),m.append(y),x=document.createElement("div"),x.className="CodeMirror-hint-information-description",p.append(x),w=document.createElement("div"),w.className="CodeMirror-hint-information-deprecation",p.append(w);const M=document.createElement("span");M.className="CodeMirror-hint-information-deprecation-label",M.textContent="Deprecated",w.append(M),k=document.createElement("div"),k.className="CodeMirror-hint-information-deprecation-reason",w.append(k);const j=parseInt(window.getComputedStyle(p).paddingBottom.replace(/px$/,""),10)||0,P=parseInt(window.getComputedStyle(p).maxHeight.replace(/px$/,""),10)||0,F=ke(()=>{p&&(p.style.paddingTop=A.scrollTop+j+"px",p.style.maxHeight=A.scrollTop+P+"px")},"handleScroll");A.addEventListener("scroll",F);let V;A.addEventListener("DOMNodeRemoved",V=ke($=>{$.target===A&&(A.removeEventListener("scroll",F),A.removeEventListener("DOMNodeRemoved",V),p&&p.removeEventListener("click",l),p=null,d=null,m=null,b=null,E=null,y=null,x=null,w=null,k=null,V=null)},"onRemoveFn"))}if(d&&(d.textContent=N.text),m&&b&&E&&y)if(N.type){m.style.display="inline";const A=ke(C=>{_t(C)?(y.textContent="!"+y.textContent,A(C.ofType)):mn(C)?(b.textContent+="[",y.textContent="]"+y.textContent,A(C.ofType)):E.textContent=C.name},"renderType");b.textContent="",y.textContent="",A(N.type)}else b.textContent="",E.textContent="",y.textContent="",m.style.display="none";x&&(N.description?(x.style.display="block",x.innerHTML=ib.render(N.description)):(x.style.display="none",x.innerHTML="")),w&&k&&(N.deprecationReason?(w.style.display="block",k.innerHTML=ib.render(N.deprecationReason)):(w.style.display="none",k.innerHTML=""))})});function l(c){if(!n||!r||!i||!(c.currentTarget instanceof HTMLElement))return;const p=c.currentTarget.textContent||"",d=n.getType(p);d&&(i.setVisiblePlugin(cg),r.push({name:d.name,def:d}),o?.(d))}ke(l,"onClickHintInformation")}ke(_F,"onHasCompletion");function fg(e,t){L.useEffect(()=>{e&&typeof t=="string"&&t!==e.getValue()&&e.setValue(t)},[e,t])}ke(fg,"useSynchronizeValue");function dg(e,t,n){L.useEffect(()=>{e&&e.setOption(t,n)},[e,t,n])}ke(dg,"useSynchronizeOption");function nC(e,t,n,r,i){const{updateActiveTabValues:o}=Ei({nonNull:!0,caller:i}),l=Zu();L.useEffect(()=>{if(!e)return;const c=Vf(500,m=>{!l||n===null||l.set(n,m)}),p=Vf(100,m=>{o({[r]:m})}),d=ke((m,b)=>{if(!b)return;const E=m.getValue();c(E),p(E),t?.(E)},"handleChange");return e.on("change",d),()=>e.off("change",d)},[t,e,l,n,r,o])}ke(nC,"useChangeHandler");function rC(e,t,n){const{schema:r}=cs({nonNull:!0,caller:n}),i=ec(),o=mb();L.useEffect(()=>{if(!e)return;const l=ke((c,p)=>{_F(c,p,r,i,o,d=>{t?.({kind:"Type",type:d,schema:r||void 0})})},"handleCompletion");return e.on("hasCompletion",l),()=>e.off("hasCompletion",l)},[t,e,i,o,r])}ke(rC,"useCompletion");function ds(e,t,n){L.useEffect(()=>{if(e){for(const r of t)e.removeKeyMap(r);if(n){const r={};for(const i of t)r[i]=()=>n();e.addKeyMap(r)}}},[e,t,n])}ke(ds,"useKeyMap");function gb({caller:e,onCopyQuery:t}={}){const{queryEditor:n}=Ei({nonNull:!0,caller:e||gb});return L.useCallback(()=>{if(!n)return;const r=n.getValue();u7(r),t?.(r)},[n,t])}ke(gb,"useCopyQuery");function Uf({caller:e}={}){const{queryEditor:t}=Ei({nonNull:!0,caller:e||Uf}),{schema:n}=cs({nonNull:!0,caller:Uf});return L.useCallback(()=>{const r=t?.documentAST,i=t?.getValue();!r||!i||t.setValue(pn(n9(r,n)))},[t,n])}ke(Uf,"useMergeQuery");function mp({caller:e}={}){const{queryEditor:t,headerEditor:n,variableEditor:r}=Ei({nonNull:!0,caller:e||mp});return L.useCallback(()=>{if(r){const i=r.getValue();try{const o=JSON.stringify(JSON.parse(i),null,2);o!==i&&r.setValue(o)}catch{}}if(n){const i=n.getValue();try{const o=JSON.stringify(JSON.parse(i),null,2);o!==i&&n.setValue(o)}catch{}}if(t){const i=t.getValue(),o=pn(Ai(i));o!==i&&t.setValue(o)}},[t,r,n])}ke(mp,"usePrettifyEditors");function vb({getDefaultFieldNames:e,caller:t}={}){const{schema:n}=cs({nonNull:!0,caller:t||vb}),{queryEditor:r}=Ei({nonNull:!0,caller:t||vb});return L.useCallback(()=>{if(!r)return;const i=r.getValue(),{insertions:o,result:l}=K8(n,i,e);return o&&o.length>0&&r.operation(()=>{const c=r.getCursor(),p=r.indexFromPos(c);r.setValue(l||"");let d=0;const m=o.map(({index:E,string:y})=>r.markText(r.posFromIndex(E+d),r.posFromIndex(E+(d+=y.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const E of m)E.clear()},7e3);let b=p;for(const{index:E,string:y}of o)E<p&&(b+=y.length);r.setCursor(r.posFromIndex(b))}),l},[e,r,n])}ke(vb,"useAutoCompleteLeafs");const PZ=ke(e=>{const t=Ei({nonNull:!0})[`${e}Editor`];let n="";const r=t?.getValue()??!1;r&&r.length>0&&(n=r);const i=L.useCallback(o=>t?.setValue(o),[t]);return L.useMemo(()=>[n,i],[n,i])},"useEditorState"),jZ=ke(()=>PZ("query"),"useOperationsEditorState");function NF([e,t]){const n=L.useRef({pending:null,last:e}),[r,i]=L.useState(e);L.useEffect(()=>{n.current.last===e||(n.current.last=e,n.current.pending===null?i(e):n.current.pending===e?(n.current.pending=null,e!==r&&(n.current.pending=r,t(r))):(n.current.pending=null,i(e)))},[e,r,t]);const o=L.useCallback(l=>{i(l),n.current.pending===null&&n.current.last!==l&&(n.current.pending=l,t(l))},[t]);return L.useMemo(()=>[r,o],[r,o])}ke(NF,"useOptimisticState");function gp({editorTheme:e=sb,keyMap:t=lb,onEdit:n,readOnly:r=!1}={},i){const{initialHeaders:o,headerEditor:l,setHeaderEditor:c,shouldPersistHeaders:p}=Ei({nonNull:!0,caller:i||gp}),d=pp(),m=Uf({caller:i||gp}),b=mp({caller:i||gp}),E=L.useRef(null);return L.useEffect(()=>{let y=!0;return hp([Promise.resolve().then(()=>Dre).then(x=>x.j)]).then(x=>{if(!y)return;const w=E.current;if(!w)return;const k=x(w,{value:o,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:ub});k.addKeyMap({"Cmd-Space"(){k.showHint({completeSingle:!1,container:w})},"Ctrl-Space"(){k.showHint({completeSingle:!1,container:w})},"Alt-Space"(){k.showHint({completeSingle:!1,container:w})},"Shift-Space"(){k.showHint({completeSingle:!1,container:w})}}),k.on("keyup",(N,D)=>{const{code:A,key:C,shiftKey:M}=D,j=A.startsWith("Key"),P=!M&&A.startsWith("Digit");(j||P||C==="_"||C==='"')&&N.execCommand("autocomplete")}),c(k)}),()=>{y=!1}},[e,o,r,c]),dg(l,"keyMap",t),nC(l,n,p?yb:null,"headers",gp),ds(l,["Cmd-Enter","Ctrl-Enter"],d?.run),ds(l,["Shift-Ctrl-P"],b),ds(l,["Shift-Ctrl-M"],m),E}ke(gp,"useHeaderEditor");const yb="headers",VZ=Array.from({length:11},(e,t)=>String.fromCharCode(8192+t)).concat(["\u2028","\u2029"," "," "]),UZ=new RegExp("["+VZ.join("")+"]","g");function AF(e){return e.replace(UZ," ")}ke(AF,"normalizeWhitespace");function tc({editorTheme:e=sb,keyMap:t=lb,onClickReference:n,onCopyQuery:r,onEdit:i,readOnly:o=!1}={},l){const{schema:c}=cs({nonNull:!0,caller:l||tc}),{externalFragments:p,initialQuery:d,queryEditor:m,setOperationName:b,setQueryEditor:E,validationRules:y,variableEditor:x,updateActiveTabValues:w}=Ei({nonNull:!0,caller:l||tc}),k=pp(),N=Zu(),D=ec(),A=mb(),C=gb({caller:l||tc,onCopyQuery:r}),M=Uf({caller:l||tc}),j=mp({caller:l||tc}),P=L.useRef(null),F=L.useRef(),V=L.useRef(()=>{});L.useEffect(()=>{V.current=J=>{if(!(!D||!A)){switch(A.setVisiblePlugin(cg),J.kind){case"Type":{D.push({name:J.type.name,def:J.type});break}case"Field":{D.push({name:J.field.name,def:J.field});break}case"Argument":{J.field&&D.push({name:J.field.name,def:J.field});break}case"EnumValue":{J.type&&D.push({name:J.type.name,def:J.type});break}}n?.(J)}}},[D,n,A]),L.useEffect(()=>{let J=!0;return hp([Promise.resolve().then(()=>Mre).then(ee=>ee.c),Promise.resolve().then(()=>v4).then(ee=>ee.s),Promise.resolve().then(()=>Fre),Promise.resolve().then(()=>jre),Promise.resolve().then(()=>Hre),Promise.resolve().then(()=>Wre),Promise.resolve().then(()=>eie)]).then(ee=>{if(!J)return;F.current=ee;const Q=P.current;if(!Q)return;const B=ee(Q,{value:d,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:o?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:Q,externalFragments:void 0},info:{schema:void 0,renderDescription:re=>ib.render(re),onClick(re){V.current(re)}},jump:{schema:void 0,onClick(re){V.current(re)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...ub,"Cmd-S"(){},"Ctrl-S"(){}}});B.addKeyMap({"Cmd-Space"(){B.showHint({completeSingle:!0,container:Q})},"Ctrl-Space"(){B.showHint({completeSingle:!0,container:Q})},"Alt-Space"(){B.showHint({completeSingle:!0,container:Q})},"Shift-Space"(){B.showHint({completeSingle:!0,container:Q})},"Shift-Alt-Space"(){B.showHint({completeSingle:!0,container:Q})}}),B.on("keyup",(re,se)=>{qZ.test(se.key)&&re.execCommand("autocomplete")});let ne=!1;B.on("startCompletion",()=>{ne=!0}),B.on("endCompletion",()=>{ne=!1}),B.on("keydown",(re,se)=>{se.key==="Escape"&&ne&&se.stopPropagation()}),B.on("beforeChange",(re,se)=>{var fe;if(se.origin==="paste"){const Z=se.text.map(AF);(fe=se.update)==null||fe.call(se,se.from,se.to,Z)}}),B.documentAST=null,B.operationName=null,B.operations=null,B.variableToType=null,E(B)}),()=>{J=!1}},[e,d,o,E]),dg(m,"keyMap",t),L.useEffect(()=>{if(!m)return;function J(Q){var B;const ne=Q9(c,Q.getValue()),re=r9(Q.operations??void 0,Q.operationName??void 0,ne?.operations);return Q.documentAST=ne?.documentAST??null,Q.operationName=re??null,Q.operations=ne?.operations??null,x&&(x.state.lint.linterOptions.variableToType=ne?.variableToType,x.options.lint.variableToType=ne?.variableToType,x.options.hintOptions.variableToType=ne?.variableToType,(B=F.current)==null||B.signal(x,"change",x)),ne?{...ne,operationName:re}:null}ke(J,"getAndUpdateOperationFacts");const ee=Vf(100,Q=>{const B=Q.getValue();N?.set(RF,B);const ne=Q.operationName,re=J(Q);re?.operationName!==void 0&&N?.set(BZ,re.operationName),i?.(B,re?.documentAST),re!=null&&re.operationName&&ne!==re.operationName&&b(re.operationName),w({query:B,operationName:re?.operationName??null})});return J(m),m.on("change",ee),()=>m.off("change",ee)},[i,m,c,b,N,x,w]),OF(m,c??null,F),DF(m,y??null,F),kF(m,p,F),rC(m,n||null,tc);const $=k?.run,X=L.useCallback(()=>{var J;if(!$||!m||!m.operations||!m.hasFocus()){$?.();return}const ee=m.indexFromPos(m.getCursor());let Q;for(const B of m.operations)B.loc&&B.loc.start<=ee&&B.loc.end>=ee&&(Q=(J=B.name)==null?void 0:J.value);Q&&Q!==m.operationName&&b(Q),$()},[m,$,b]);return ds(m,["Cmd-Enter","Ctrl-Enter"],X),ds(m,["Shift-Ctrl-C"],C),ds(m,["Shift-Ctrl-P","Shift-Ctrl-F"],j),ds(m,["Shift-Ctrl-M"],M),P}ke(tc,"useQueryEditor");function OF(e,t,n){L.useEffect(()=>{if(!e)return;const r=e.options.lint.schema!==t;e.state.lint.linterOptions.schema=t,e.options.lint.schema=t,e.options.hintOptions.schema=t,e.options.info.schema=t,e.options.jump.schema=t,r&&n.current&&n.current.signal(e,"change",e)},[e,t,n])}ke(OF,"useSynchronizeSchema");function DF(e,t,n){L.useEffect(()=>{if(!e)return;const r=e.options.lint.validationRules!==t;e.state.lint.linterOptions.validationRules=t,e.options.lint.validationRules=t,r&&n.current&&n.current.signal(e,"change",e)},[e,t,n])}ke(DF,"useSynchronizeValidationRules");function kF(e,t,n){const r=L.useMemo(()=>[...t.values()],[t]);L.useEffect(()=>{if(!e)return;const i=e.options.lint.externalFragments!==r;e.state.lint.linterOptions.externalFragments=r,e.options.lint.externalFragments=r,e.options.hintOptions.externalFragments=r,i&&n.current&&n.current.signal(e,"change",e)},[e,r,n])}ke(kF,"useSynchronizeExternalFragments");const qZ=/^[a-zA-Z0-9_@(]$/,RF="query",BZ="operationName";function MF({defaultQuery:e,defaultHeaders:t,headers:n,defaultTabs:r,query:i,variables:o,storage:l,shouldPersistHeaders:c}){const p=l?.get(hg);try{if(!p)throw new Error("Storage for tabs is empty");const d=JSON.parse(p),m=c?n:void 0;if(LF(d)){const b=pg({query:i,variables:o,headers:m});let E=-1;for(let y=0;y<d.tabs.length;y++){const x=d.tabs[y];x.hash=pg({query:x.query,variables:x.variables,headers:x.headers}),x.hash===b&&(E=y)}if(E>=0)d.activeTabIndex=E;else{const y=i?bb(i):null;d.tabs.push({id:lC(),hash:b,title:y||uC,query:i,variables:o,headers:n,operationName:y,response:null}),d.activeTabIndex=d.tabs.length-1}return d}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(r||[{query:i??e,variables:o,headers:n??t}]).map(aC)}}}ke(MF,"getDefaultTabState");function LF(e){return e&&typeof e=="object"&&!Array.isArray(e)&&FF(e,"activeTabIndex")&&"tabs"in e&&Array.isArray(e.tabs)&&e.tabs.every(IF)}ke(LF,"isTabsState");function IF(e){return e&&typeof e=="object"&&!Array.isArray(e)&&iC(e,"id")&&iC(e,"title")&&vp(e,"query")&&vp(e,"variables")&&vp(e,"headers")&&vp(e,"operationName")&&vp(e,"response")}ke(IF,"isTabState");function FF(e,t){return t in e&&typeof e[t]=="number"}ke(FF,"hasNumberKey");function iC(e,t){return t in e&&typeof e[t]=="string"}ke(iC,"hasStringKey");function vp(e,t){return t in e&&(typeof e[t]=="string"||e[t]===null)}ke(vp,"hasStringOrNullKey");function PF({queryEditor:e,variableEditor:t,headerEditor:n,responseEditor:r}){return L.useCallback(i=>{const o=e?.getValue()??null,l=t?.getValue()??null,c=n?.getValue()??null,p=e?.operationName??null,d=r?.getValue()??null;return sC(i,{query:o,variables:l,headers:c,response:d,operationName:p})},[e,t,n,r])}ke(PF,"useSynchronizeActiveTabValues");function oC(e,t=!1){return JSON.stringify(e,(n,r)=>n==="hash"||n==="response"||!t&&n==="headers"?null:r)}ke(oC,"serializeTabState");function jF({storage:e,shouldPersistHeaders:t}){const n=L.useMemo(()=>Vf(500,r=>{e?.set(hg,r)}),[e]);return L.useCallback(r=>{n(oC(r,t))},[t,n])}ke(jF,"useStoreTabs");function VF({queryEditor:e,variableEditor:t,headerEditor:n,responseEditor:r}){return L.useCallback(({query:i,variables:o,headers:l,response:c})=>{e?.setValue(i??""),t?.setValue(o??""),n?.setValue(l??""),r?.setValue(c??"")},[n,e,r,t])}ke(VF,"useSetEditorValues");function aC({query:e=null,variables:t=null,headers:n=null}={}){return{id:lC(),hash:pg({query:e,variables:t,headers:n}),title:e&&bb(e)||uC,query:e,variables:t,headers:n,operationName:null,response:null}}ke(aC,"createTab");function sC(e,t){return{...e,tabs:e.tabs.map((n,r)=>{if(r!==e.activeTabIndex)return n;const i={...n,...t};return{...i,hash:pg(i),title:i.operationName||(i.query?bb(i.query):void 0)||uC}})}}ke(sC,"setPropertiesInActiveTab");function lC(){const e=ke(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}ke(lC,"guid");function pg(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}ke(pg,"hashFromTabContents");function bb(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return t?.[2]??null}ke(bb,"fuzzyExtractOperationName");function UF(e){const t=e?.get(hg);if(t){const n=JSON.parse(t);e?.set(hg,JSON.stringify(n,(r,i)=>r==="headers"?null:i))}}ke(UF,"clearHeadersFromTabs");const uC="<untitled>",hg="tabState";function qf({editorTheme:e=sb,keyMap:t=lb,onClickReference:n,onEdit:r,readOnly:i=!1}={},o){const{initialVariables:l,variableEditor:c,setVariableEditor:p}=Ei({nonNull:!0,caller:o||qf}),d=pp(),m=Uf({caller:o||qf}),b=mp({caller:o||qf}),E=L.useRef(null),y=L.useRef();return L.useEffect(()=>{let x=!0;return hp([Promise.resolve().then(()=>nie),Promise.resolve().then(()=>iie),Promise.resolve().then(()=>uie)]).then(w=>{if(!x)return;y.current=w;const k=E.current;if(!k)return;const N=w(k,{value:l,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:k,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:ub});N.addKeyMap({"Cmd-Space"(){N.showHint({completeSingle:!1,container:k})},"Ctrl-Space"(){N.showHint({completeSingle:!1,container:k})},"Alt-Space"(){N.showHint({completeSingle:!1,container:k})},"Shift-Space"(){N.showHint({completeSingle:!1,container:k})}}),N.on("keyup",(D,A)=>{const{code:C,key:M,shiftKey:j}=A,P=C.startsWith("Key"),F=!j&&C.startsWith("Digit");(P||F||M==="_"||M==='"')&&D.execCommand("autocomplete")}),p(N)}),()=>{x=!1}},[e,l,i,p]),dg(c,"keyMap",t),nC(c,r,qF,"variables",qf),rC(c,n||null,qf),ds(c,["Cmd-Enter","Ctrl-Enter"],d?.run),ds(c,["Shift-Ctrl-P"],b),ds(c,["Shift-Ctrl-M"],m),E}ke(qf,"useVariableEditor");const qF="variables",BF=Ku("EditorContext");function $F(e){const t=Zu(),[n,r]=L.useState(null),[i,o]=L.useState(null),[l,c]=L.useState(null),[p,d]=L.useState(null),[m,b]=L.useState(()=>{const re=t?.get(cC)!==null;return e.shouldPersistHeaders!==!1&&re?t?.get(cC)==="true":!!e.shouldPersistHeaders});fg(n,e.headers),fg(i,e.query),fg(l,e.response),fg(p,e.variables);const E=jF({storage:t,shouldPersistHeaders:m}),[y]=L.useState(()=>{const re=e.query??t?.get(RF)??null,se=e.variables??t?.get(qF)??null,fe=e.headers??t?.get(yb)??null,Z=e.response??"",ge=MF({query:re,variables:se,headers:fe,defaultTabs:e.defaultTabs,defaultQuery:e.defaultQuery||$Z,defaultHeaders:e.defaultHeaders,storage:t,shouldPersistHeaders:m});return E(ge),{query:re??(ge.activeTabIndex===0?ge.tabs[0].query:null)??"",variables:se??"",headers:fe??e.defaultHeaders??"",response:Z,tabState:ge}}),[x,w]=L.useState(y.tabState),k=L.useCallback(re=>{if(re){t?.set(yb,n?.getValue()??"");const se=oC(x,!0);t?.set(hg,se)}else t?.set(yb,""),UF(t);b(re),t?.set(cC,re.toString())},[t,x,n]),N=L.useRef();L.useEffect(()=>{const re=!!e.shouldPersistHeaders;N?.current!==re&&(k(re),N.current=re)},[e.shouldPersistHeaders,k]);const D=PF({queryEditor:i,variableEditor:p,headerEditor:n,responseEditor:l}),A=VF({queryEditor:i,variableEditor:p,headerEditor:n,responseEditor:l}),{onTabChange:C,defaultHeaders:M,children:j}=e,P=L.useCallback(()=>{w(re=>{const se=D(re),fe={tabs:[...se.tabs,aC({headers:M})],activeTabIndex:se.tabs.length};return E(fe),A(fe.tabs[fe.activeTabIndex]),C?.(fe),fe})},[M,C,A,E,D]),F=L.useCallback(re=>{w(se=>{const fe={...se,activeTabIndex:re};return E(fe),A(fe.tabs[fe.activeTabIndex]),C?.(fe),fe})},[C,A,E]),V=L.useCallback(re=>{w(se=>{const fe=se.tabs[se.activeTabIndex],Z={tabs:re,activeTabIndex:re.indexOf(fe)};return E(Z),A(Z.tabs[Z.activeTabIndex]),C?.(Z),Z})},[C,A,E]),$=L.useCallback(re=>{w(se=>{const fe={tabs:se.tabs.filter((Z,ge)=>re!==ge),activeTabIndex:Math.max(se.activeTabIndex-1,0)};return E(fe),A(fe.tabs[fe.activeTabIndex]),C?.(fe),fe})},[C,A,E]),X=L.useCallback(re=>{w(se=>{const fe=sC(se,re);return E(fe),C?.(fe),fe})},[C,E]),{onEditOperationName:J}=e,ee=L.useCallback(re=>{i&&(i.operationName=re,X({operationName:re}),J?.(re))},[J,i,X]),Q=L.useMemo(()=>{const re=new Map;if(Array.isArray(e.externalFragments))for(const se of e.externalFragments)re.set(se.name.value,se);else if(typeof e.externalFragments=="string")Tr(Ai(e.externalFragments,{}),{FragmentDefinition(se){re.set(se.name.value,se)}});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 re},[e.externalFragments]),B=L.useMemo(()=>e.validationRules||[],[e.validationRules]),ne=L.useMemo(()=>({...x,addTab:P,changeTab:F,moveTab:V,closeTab:$,updateActiveTabValues:X,headerEditor:n,queryEditor:i,responseEditor:l,variableEditor:p,setHeaderEditor:r,setQueryEditor:o,setResponseEditor:c,setVariableEditor:d,setOperationName:ee,initialQuery:y.query,initialVariables:y.variables,initialHeaders:y.headers,initialResponse:y.response,externalFragments:Q,validationRules:B,shouldPersistHeaders:m,setShouldPersistHeaders:k}),[x,P,F,V,$,X,n,i,l,p,ee,y,Q,B,m,k]);return Y.jsx(BF.Provider,{value:ne,children:j})}ke($F,"EditorContextProvider");const Ei=Xu(BF),cC="shouldPersistHeaders",$Z=`# Welcome to GraphiQL
#
# GraphiQL is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
# {
# field(arg: "value") {
# subField
# }
# }
#
# Keyboard shortcuts:
#
# Prettify query: Shift-Ctrl-P (or press the prettify button)
#
# Merge fragments: Shift-Ctrl-M (or press the merge button)
#
# Run Query: Ctrl-Enter (or press the play button)
#
# Auto Complete: Ctrl-Space (or just start typing)
#
`;function Eb({isHidden:e,...t}){const{headerEditor:n}=Ei({nonNull:!0,caller:Eb}),r=gp(t,Eb);return L.useEffect(()=>{e||n==null||n.refresh()},[n,e]),Y.jsx("div",{className:vi("graphiql-editor",e&&"hidden"),ref:r})}ke(Eb,"HeaderEditor");function Sb(e){var t;const[n,r]=L.useState({width:null,height:null}),[i,o]=L.useState(null),l=L.useRef(null),c=(t=fC(e.token))==null?void 0:t.href;L.useEffect(()=>{if(l.current){if(!c){r({width:null,height:null}),o(null);return}fetch(c,{method:"HEAD"}).then(d=>{o(d.headers.get("Content-Type"))}).catch(()=>{o(null)})}},[c]);const p=n.width!==null&&n.height!==null?Y.jsxs("div",{children:[n.width,"x",n.height,i===null?null:" "+i]}):null;return Y.jsxs("div",{children:[Y.jsx("img",{onLoad:()=>{var d,m;r({width:((d=l.current)==null?void 0:d.naturalWidth)??null,height:((m=l.current)==null?void 0:m.naturalHeight)??null})},ref:l,src:c}),p]})}ke(Sb,"ImagePreview"),Sb.shouldRender=ke(function(e){const t=fC(e);return t?zF(t):!1},"shouldRender");function fC(e){if(e.type!=="string")return;const t=e.string.slice(1).slice(0,-1).trim();try{const{location:n}=window;return new URL(t,n.protocol+"//"+n.host)}catch{return}}ke(fC,"tokenToURL");function zF(e){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname)}ke(zF,"isImageURL");function dC(e){const t=tc(e,dC);return Y.jsx("div",{className:"graphiql-editor",ref:t})}ke(dC,"QueryEditor");function Tb({responseTooltip:e,editorTheme:t=sb,keyMap:n=lb}={},r){const{fetchError:i,validationErrors:o}=cs({nonNull:!0,caller:r||Tb}),{initialResponse:l,responseEditor:c,setResponseEditor:p}=Ei({nonNull:!0,caller:r||Tb}),d=L.useRef(null),m=L.useRef(e);return L.useEffect(()=>{m.current=e},[e]),L.useEffect(()=>{let b=!0;return hp([Promise.resolve().then(()=>KP).then(E=>E.f),Promise.resolve().then(()=>HP).then(E=>E.b),Promise.resolve().then(()=>i4).then(E=>E.d),Promise.resolve().then(()=>v4).then(E=>E.s),Promise.resolve().then(()=>n4).then(E=>E.s),Promise.resolve().then(()=>s4).then(E=>E.j),Promise.resolve().then(()=>c4).then(E=>E.s),Promise.resolve().then(()=>die),Promise.resolve().then(()=>$re)],{useCommonAddons:!1}).then(E=>{if(!b)return;const y=document.createElement("div");E.registerHelper("info","graphql-results",(k,N,D,A)=>{const C=[],M=m.current;return M&&C.push(Y.jsx(M,{pos:A,token:k})),Sb.shouldRender(k)&&C.push(Y.jsx(Sb,{token:k},"image-preview")),C.length?(RS.render(C,y),y):(RS.unmountComponentAtNode(y),null)});const x=d.current;if(!x)return;const w=E(x,{value:l,lineWrapping:!0,readOnly:!0,theme:t,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:ub});p(w)}),()=>{b=!1}},[t,l,p]),dg(c,"keyMap",n),L.useEffect(()=>{i&&c?.setValue(i),o.length>0&&c?.setValue(vm(o))},[c,i,o]),d}ke(Tb,"useResponseEditor");function pC(e){const t=Tb(e,pC);return Y.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:t})}ke(pC,"ResponseEditor");function xb({isHidden:e,...t}){const{variableEditor:n}=Ei({nonNull:!0,caller:xb}),r=qf(t,xb);return L.useEffect(()=>{n&&!e&&n.refresh()},[n,e]),Y.jsx("div",{className:vi("graphiql-editor",e&&"hidden"),ref:r})}ke(xb,"VariableEditor");function hC({children:e,dangerouslyAssumeSchemaIsValid:t,defaultQuery:n,defaultHeaders:r,defaultTabs:i,externalFragments:o,fetcher:l,getDefaultFieldNames:c,headers:p,inputValueDeprecation:d,introspectionQueryName:m,maxHistoryLength:b,onEditOperationName:E,onSchemaChange:y,onTabChange:x,onTogglePluginVisibility:w,operationName:k,plugins:N,query:D,response:A,schema:C,schemaDescription:M,shouldPersistHeaders:j,storage:P,validationRules:F,variables:V,visiblePlugin:$}){return Y.jsx(H3,{storage:P,children:Y.jsx(nF,{maxHistoryLength:b,children:Y.jsx($F,{defaultQuery:n,defaultHeaders:r,defaultTabs:i,externalFragments:o,headers:p,onEditOperationName:E,onTabChange:x,query:D,response:A,shouldPersistHeaders:j,validationRules:F,variables:V,children:Y.jsx(Qw,{dangerouslyAssumeSchemaIsValid:t,fetcher:l,inputValueDeprecation:d,introspectionQueryName:m,onSchemaChange:y,schema:C,schemaDescription:M,children:Y.jsx(ab,{getDefaultFieldNames:c,fetcher:l,operationName:k,children:Y.jsx(Kw,{children:Y.jsx(wF,{onTogglePluginVisibility:w,plugins:N,visiblePlugin:$,children:e})})})})})})})}ke(hC,"GraphiQLProvider");function HF(){const e=Zu(),[t,n]=L.useState(()=>{if(!e)return null;const i=e.get(mC);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&e.set(mC,""),null}});L.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),t&&document.body.classList.add(`graphiql-${t}`))},[t]);const r=L.useCallback(i=>{e?.set(mC,i||""),n(i)},[e]);return L.useMemo(()=>({theme:t,setTheme:r}),[t,r])}ke(HF,"useTheme");const mC="theme";function wb({defaultSizeRelation:e=zZ,direction:t,initiallyHidden:n,onHiddenElementChange:r,sizeThresholdFirst:i=100,sizeThresholdSecond:o=100,storageKey:l}){const c=Zu(),p=L.useMemo(()=>Vf(500,D=>{l&&c?.set(l,D)}),[c,l]),[d,m]=L.useState(()=>{const D=l&&c?.get(l);return D===Cb||n==="first"?"first":D===_b||n==="second"?"second":null}),b=L.useCallback(D=>{D!==d&&(m(D),r?.(D))},[d,r]),E=L.useRef(null),y=L.useRef(null),x=L.useRef(null),w=L.useRef(`${e}`);L.useLayoutEffect(()=>{const D=l&&c?.get(l)||w.current;E.current&&(E.current.style.display="flex",E.current.style.flex=D===Cb||D===_b?w.current:D),x.current&&(x.current.style.display="flex",x.current.style.flex="1"),y.current&&(y.current.style.display="flex")},[t,c,l]);const k=L.useCallback(D=>{const A=D==="first"?E.current:x.current;if(A&&(A.style.left="-1000px",A.style.position="absolute",A.style.opacity="0",A.style.height="500px",A.style.width="500px",E.current)){const C=parseFloat(E.current.style.flex);(!Number.isFinite(C)||C<1)&&(E.current.style.flex="1")}},[]),N=L.useCallback(D=>{const A=D==="first"?E.current:x.current;if(A&&(A.style.width="",A.style.height="",A.style.opacity="",A.style.position="",A.style.left="",c&&l)){const C=c.get(l);E.current&&C!==Cb&&C!==_b&&(E.current.style.flex=C||w.current)}},[c,l]);return L.useLayoutEffect(()=>{d==="first"?k("first"):N("first"),d==="second"?k("second"):N("second")},[d,k,N]),L.useEffect(()=>{if(!y.current||!E.current||!x.current)return;const D=y.current,A=E.current,C=A.parentElement,M=t==="horizontal"?"clientX":"clientY",j=t==="horizontal"?"left":"top",P=t==="horizontal"?"right":"bottom",F=t==="horizontal"?"clientWidth":"clientHeight";function V(X){X.preventDefault();const J=X[M]-D.getBoundingClientRect()[j];function ee(B){if(B.buttons===0)return Q();const ne=B[M]-C.getBoundingClientRect()[j]-J,re=C.getBoundingClientRect()[P]-B[M]+J-D[F];if(ne<i)b("first"),p(Cb);else if(re<o)b("second"),p(_b);else{b(null);const se=`${ne/re}`;A.style.flex=se,p(se)}}ke(ee,"handleMouseMove");function Q(){document.removeEventListener("mousemove",ee),document.removeEventListener("mouseup",Q)}ke(Q,"handleMouseUp"),document.addEventListener("mousemove",ee),document.addEventListener("mouseup",Q)}ke(V,"handleMouseDown"),D.addEventListener("mousedown",V);function $(){E.current&&(E.current.style.flex=w.current),p(w.current),b(null)}return ke($,"reset"),D.addEventListener("dblclick",$),()=>{D.removeEventListener("mousedown",V),D.removeEventListener("dblclick",$)}},[t,b,i,o,p]),L.useMemo(()=>({dragBarRef:y,hiddenElement:d,firstRef:E,setHiddenElement:m,secondRef:x}),[d,m])}ke(wb,"useDragResize");const zZ=1,Cb="hide-first",_b="hide-second",Nb=L.forwardRef(({label:e,onClick:t,...n},r)=>{const[i,o]=L.useState(null),l=L.useCallback(c=>{try{t?.(c),o(null)}catch(p){o(p instanceof Error?p:new Error(`Toolbar button click failed: ${p}`))}},[t]);return Y.jsx(Wi,{label:e,children:Y.jsx(ci,{...n,ref:r,type:"button",className:vi("graphiql-toolbar-button",i&&"error",n.className),onClick:l,"aria-label":i?i.message:e,"aria-invalid":i?"true":n["aria-invalid"]})})});Nb.displayName="ToolbarButton";function Ab(){const{queryEditor:e,setOperationName:t}=Ei({nonNull:!0,caller:Ab}),{isFetching:n,isSubscribed:r,operationName:i,run:o,stop:l}=pp({nonNull:!0,caller:Ab}),c=e?.operations||[],p=c.length>1&&typeof i!="string",d=n||r,m=`${d?"Stop":"Execute"} query (Ctrl-Enter)`,b={type:"button",className:"graphiql-execute-button",children:d?Y.jsx(kZ,{}):Y.jsx(xZ,{}),"aria-label":m};return p&&!d?Y.jsxs(Ju,{children:[Y.jsx(Wi,{label:m,children:Y.jsx(Ju.Button,{...b})}),Y.jsx(Ju.Content,{children:c.map((E,y)=>{const x=E.name?E.name.value:`<Unnamed ${E.operation}>`;return Y.jsx(Ju.Item,{onSelect:()=>{var w;const k=(w=E.name)==null?void 0:w.value;e&&k&&k!==e.operationName&&t(k),o()},children:x},`${x}-${y}`)})})]}):Y.jsx(Wi,{label:m,children:Y.jsx("button",{...b,onClick:()=>{d?l():o()}})})}ke(Ab,"ExecuteButton"),ag(ke(({button:e,children:t,label:n,...r})=>Y.jsxs(Ju,{...r,children:[Y.jsx(Wi,{label:n,children:Y.jsx(Ju.Button,{className:vi("graphiql-un-styled graphiql-toolbar-menu",r.className),"aria-label":n,children:e})}),Y.jsx(Ju.Content,{children:t})]}),"ToolbarMenuRoot"),{Item:Ju.Item});var yp={},mg={};const HZ=J_(H8);var GF;function GZ(){if(GF)return mg;GF=1,Object.defineProperty(mg,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe},t=function(){function Oe(be,Le){var Ee=[],oe=!0,je=!1,et=void 0;try{for(var ct=be[Symbol.iterator](),Ye;!(oe=(Ye=ct.next()).done)&&(Ee.push(Ye.value),!(Le&&Ee.length===Le));oe=!0);}catch(xe){je=!0,et=xe}finally{try{!oe&&ct.return&&ct.return()}finally{if(je)throw et}}return Ee}return function(be,Le){if(Array.isArray(be))return be;if(Symbol.iterator in Object(be))return Oe(be,Le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=Object.assign||function(Oe){for(var be=1;be<arguments.length;be++){var Le=arguments[be];for(var Ee in Le)Object.prototype.hasOwnProperty.call(Le,Ee)&&(Oe[Ee]=Le[Ee])}return Oe},r=function(){function Oe(be,Le){for(var Ee=0;Ee<Le.length;Ee++){var oe=Le[Ee];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(be,oe.key,oe)}}return function(be,Le,Ee){return Le&&Oe(be.prototype,Le),Ee&&Oe(be,Ee),be}}();mg.defaultValue=$;var i=Wv(),o=c(i),l=HZ;function c(Oe){if(Oe&&Oe.__esModule)return Oe;var be={};if(Oe!=null)for(var Le in Oe)Object.prototype.hasOwnProperty.call(Oe,Le)&&(be[Le]=Oe[Le]);return be.default=Oe,be}function p(Oe,be,Le){return be in Oe?Object.defineProperty(Oe,be,{value:Le,enumerable:!0,configurable:!0,writable:!0}):Oe[be]=Le,Oe}function d(Oe){if(Array.isArray(Oe)){for(var be=0,Le=Array(Oe.length);be<Oe.length;be++)Le[be]=Oe[be];return Le}else return Array.from(Oe)}function m(Oe,be){if(!(Oe instanceof be))throw new TypeError("Cannot call a class as a function")}function b(Oe,be){if(!Oe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be&&(typeof be=="object"||typeof be=="function")?be:Oe}function E(Oe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof be);Oe.prototype=Object.create(be&&be.prototype,{constructor:{value:Oe,enumerable:!1,writable:!0,configurable:!0}}),be&&(Object.setPrototypeOf?Object.setPrototypeOf(Oe,be):Oe.__proto__=be)}function y(Oe){return Oe.charAt(0).toUpperCase()+Oe.slice(1)}var x={keyword:"#B11A04",def:"#D2054E",property:"#1F61A0",qualifier:"#1C92A9",attribute:"#8B2BB9",number:"#2882F9",string:"#D64292",builtin:"#D47509",string2:"#0B7FC7",variable:"#397D13",atom:"#CA9800"},w=o.createElement("svg",{width:"12",height:"9"},o.createElement("path",{fill:"#666",d:"M 0 2 L 9 2 L 4.5 7.5 z"})),k=o.createElement("svg",{width:"12",height:"9"},o.createElement("path",{fill:"#666",d:"M 0 0 L 0 9 L 5.5 4.5 z"})),N=o.createElement("svg",{style:{marginRight:"3px",marginLeft:"-3px"},width:"12",height:"12",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM16 16H2V2H16V16ZM14.99 6L13.58 4.58L6.99 11.17L4.41 8.6L2.99 10.01L6.99 14L14.99 6Z",fill:"#666"})),D=o.createElement("svg",{style:{marginRight:"3px",marginLeft:"-3px"},width:"12",height:"12",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M16 2V16H2V2H16ZM16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z",fill:"#CCC"}));function A(Oe){return Oe.checked?Oe.styleConfig.checkboxChecked:Oe.styleConfig.checkboxUnchecked}function C(Oe){var be=Oe.getFields();if(be.id){var Le=["id"];return be.email?Le.push("email"):be.name&&Le.push("name"),Le}if(be.edges)return["edges"];if(be.node)return["node"];if(be.nodes)return["nodes"];var Ee=[];return Object.keys(be).forEach(function(oe){(0,l.isLeafType)(be[oe].type)&&Ee.push(oe)}),Ee.length?Ee.slice(0,2):["__typename"]}function M(Oe){return(0,l.isNonNullType)(Oe.type)&&Oe.defaultValue===void 0}function j(Oe){for(var be=Oe;(0,l.isWrappingType)(be);)be=be.ofType;return be}function P(Oe){for(var be=Oe;(0,l.isWrappingType)(be);)be=be.ofType;return be}function F(Oe,be){if(typeof be!="string"&&be.kind==="VariableDefinition")return be.variable;if((0,l.isScalarType)(Oe))try{switch(Oe.name){case"String":return{kind:"StringValue",value:String(Oe.parseValue(be))};case"Float":return{kind:"FloatValue",value:String(Oe.parseValue(parseFloat(be)))};case"Int":return{kind:"IntValue",value:String(Oe.parseValue(parseInt(be,10)))};case"Boolean":try{var Le=JSON.parse(be);return typeof Le=="boolean"?{kind:"BooleanValue",value:Le}:{kind:"BooleanValue",value:!1}}catch{return{kind:"BooleanValue",value:!1}}default:return{kind:"StringValue",value:String(Oe.parseValue(be))}}}catch(oe){return console.error("error coercing arg value",oe,be),{kind:"StringValue",value:be}}else try{var Ee=Oe.parseValue(be);return Ee?{kind:"EnumValue",value:String(Ee)}:{kind:"EnumValue",value:Oe.getValues()[0].name}}catch{return{kind:"EnumValue",value:Oe.getValues()[0].name}}}var V=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe._getArgSelection=function(){return oe.props.selection.fields.find(function(xe){return xe.name.value===oe.props.arg.name})},oe._removeArg=function(){var xe=oe.props.selection,$e=oe._getArgSelection();oe._previousArgSelection=$e,oe.props.modifyFields(xe.fields.filter(function(nt){return nt!==$e}),!0)},oe._addArg=function(){var xe=oe.props,$e=xe.selection,nt=xe.arg,ht=xe.getDefaultScalarArgValue,Ot=xe.parentField,jt=xe.makeDefaultArg,dt=P(nt.type),Et=null;if(oe._previousArgSelection)Et=oe._previousArgSelection;else if((0,l.isInputObjectType)(dt)){var pt=dt.getFields();Et={kind:"ObjectField",name:{kind:"Name",value:nt.name},value:{kind:"ObjectValue",fields:fe(ht,jt,Ot,Object.keys(pt).map(function(Wt){return pt[Wt]}))}}}else(0,l.isLeafType)(dt)&&(Et={kind:"ObjectField",name:{kind:"Name",value:nt.name},value:ht(Ot,nt,dt)});if(!Et)console.error("Unable to add arg for argType",dt);else return oe.props.modifyFields([].concat(d($e.fields||[]),[Et]),!0)},oe._setArgValue=function(xe,$e){var nt=!1,ht=!1,Ot=!1;try{xe.kind==="VariableDefinition"?ht=!0:xe===null||typeof xe>"u"?nt=!0:typeof xe.kind=="string"&&(Ot=!0)}catch{}var jt=oe.props.selection,dt=oe._getArgSelection();if(!dt){console.error("missing arg selection when setting arg value");return}var Et=P(oe.props.arg.type),pt=(0,l.isLeafType)(Et)||ht||nt||Ot;if(!pt){console.warn("Unable to handle non leaf types in InputArgView.setArgValue",xe);return}var Wt=void 0,Vt=void 0;xe===null||typeof xe>"u"?Vt=null:!xe.target&&xe.kind&&xe.kind==="VariableDefinition"?(Wt=xe,Vt=Wt.variable):typeof xe.kind=="string"?Vt=xe:xe.target&&typeof xe.target.value=="string"&&(Wt=xe.target.value,Vt=F(Et,Wt));var Jt=oe.props.modifyFields((jt.fields||[]).map(function(ot){var qn=ot===dt,vn=qn?n({},ot,{value:Vt}):ot;return vn}),$e);return Jt},oe._modifyChildFields=function(xe){return oe.props.modifyFields(oe.props.selection.fields.map(function($e){return $e.name.value===oe.props.arg.name?n({},$e,{value:{kind:"ObjectValue",fields:xe}}):$e}),!0)},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this.props,oe=Ee.arg,je=Ee.parentField,et=this._getArgSelection();return o.createElement(ne,{argValue:et?et.value:null,arg:oe,parentField:je,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._modifyChildFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),be}(o.PureComponent);function $(Oe){if((0,l.isEnumType)(Oe))return{kind:"EnumValue",value:Oe.getValues()[0].name};switch(Oe.name){case"String":return{kind:"StringValue",value:""};case"Float":return{kind:"FloatValue",value:"1.5"};case"Int":return{kind:"IntValue",value:"10"};case"Boolean":return{kind:"BooleanValue",value:!1};default:return{kind:"StringValue",value:""}}}function X(Oe,be,Le){return $(Le)}var J=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe._getArgSelection=function(){var xe=oe.props.selection;return(xe.arguments||[]).find(function($e){return $e.name.value===oe.props.arg.name})},oe._removeArg=function(xe){var $e=oe.props.selection,nt=oe._getArgSelection();return oe._previousArgSelection=nt,oe.props.modifyArguments(($e.arguments||[]).filter(function(ht){return ht!==nt}),xe)},oe._addArg=function(xe){var $e=oe.props,nt=$e.selection,ht=$e.getDefaultScalarArgValue,Ot=$e.makeDefaultArg,jt=$e.parentField,dt=$e.arg,Et=P(dt.type),pt=null;if(oe._previousArgSelection)pt=oe._previousArgSelection;else if((0,l.isInputObjectType)(Et)){var Wt=Et.getFields();pt={kind:"Argument",name:{kind:"Name",value:dt.name},value:{kind:"ObjectValue",fields:fe(ht,Ot,jt,Object.keys(Wt).map(function(Vt){return Wt[Vt]}))}}}else(0,l.isLeafType)(Et)&&(pt={kind:"Argument",name:{kind:"Name",value:dt.name},value:ht(jt,dt,Et)});return pt?oe.props.modifyArguments([].concat(d(nt.arguments||[]),[pt]),xe):(console.error("Unable to add arg for argType",Et),null)},oe._setArgValue=function(xe,$e){var nt=!1,ht=!1,Ot=!1;try{xe.kind==="VariableDefinition"?ht=!0:xe===null||typeof xe>"u"?nt=!0:typeof xe.kind=="string"&&(Ot=!0)}catch{}var jt=oe.props.selection,dt=oe._getArgSelection();if(!dt&&!ht){console.error("missing arg selection when setting arg value");return}var Et=P(oe.props.arg.type),pt=(0,l.isLeafType)(Et)||ht||nt||Ot;if(!pt){console.warn("Unable to handle non leaf types in ArgView._setArgValue");return}var Wt=void 0,Vt=void 0;return xe===null||typeof xe>"u"?Vt=null:xe.target&&typeof xe.target.value=="string"?(Wt=xe.target.value,Vt=F(Et,Wt)):!xe.target&&xe.kind==="VariableDefinition"?(Wt=xe,Vt=Wt.variable):typeof xe.kind=="string"&&(Vt=xe),oe.props.modifyArguments((jt.arguments||[]).map(function(Jt){return Jt===dt?n({},Jt,{value:Vt}):Jt}),$e)},oe._setArgFields=function(xe,$e){var nt=oe.props.selection,ht=oe._getArgSelection();if(!ht){console.error("missing arg selection when setting arg value");return}return oe.props.modifyArguments((nt.arguments||[]).map(function(Ot){return Ot===ht?n({},Ot,{value:{kind:"ObjectValue",fields:xe}}):Ot}),$e)},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this.props,oe=Ee.arg,je=Ee.parentField,et=this._getArgSelection();return o.createElement(ne,{argValue:et?et.value:null,arg:oe,parentField:je,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._setArgFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),be}(o.PureComponent);function ee(Oe){return Oe.ctrlKey&&Oe.key==="Enter"}function Q(Oe){return Oe!=="FragmentDefinition"}var B=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe._handleChange=function(xe){oe.props.setArgValue(xe,!0)},Ee),b(oe,je)}return r(be,[{key:"componentDidMount",value:function(){var Ee=this._ref,oe=document.activeElement;Ee&&oe&&!(oe instanceof HTMLTextAreaElement)&&(Ee.focus(),Ee.setSelectionRange(0,Ee.value.length))}},{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.arg,et=oe.argValue,ct=oe.styleConfig,Ye=P(je.type),xe=typeof et.value=="string"?et.value:"",$e=this.props.argValue.kind==="StringValue"?ct.colors.string:ct.colors.number;return o.createElement("span",{style:{color:$e}},Ye.name==="String"?'"':"",o.createElement("input",{style:{border:"none",borderBottom:"1px solid #888",outline:"none",width:Math.max(1,Math.min(15,xe.length))+"ch",color:$e},ref:function(ht){Ee._ref=ht},type:"text",onChange:this._handleChange,value:xe}),Ye.name==="String"?'"':"")}}]),be}(o.PureComponent),ne=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe.state={displayArgActions:!1},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.argValue,et=oe.arg,ct=oe.styleConfig,Ye=P(et.type),xe=null;if(je){if(je.kind==="Variable")xe=o.createElement("span",{style:{color:ct.colors.variable}},"$",je.name.value);else if((0,l.isScalarType)(Ye))Ye.name==="Boolean"?xe=o.createElement("select",{style:{color:ct.colors.builtin},onChange:this.props.setArgValue,value:je.kind==="BooleanValue"?je.value:void 0},o.createElement("option",{key:"true",value:"true"},"true"),o.createElement("option",{key:"false",value:"false"},"false")):xe=o.createElement(B,{setArgValue:this.props.setArgValue,arg:et,argValue:je,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig});else if((0,l.isEnumType)(Ye))je.kind==="EnumValue"?xe=o.createElement("select",{style:{backgroundColor:"white",color:ct.colors.string2},onChange:this.props.setArgValue,value:je.value},Ye.getValues().map(function(dt){return o.createElement("option",{key:dt.name,value:dt.name},dt.name)})):console.error("arg mismatch between arg and selection",Ye,je);else if((0,l.isInputObjectType)(Ye))if(je.kind==="ObjectValue"){var $e=Ye.getFields();xe=o.createElement("div",{style:{marginLeft:16}},Object.keys($e).sort().map(function(dt){return o.createElement(V,{key:dt,arg:$e[dt],parentField:Ee.props.parentField,selection:je,modifyFields:Ee.props.setArgFields,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit,definition:Ee.props.definition})}))}else console.error("arg mismatch between arg and selection",Ye,je)}var nt=function(){var Et=et.name,pt=(Ee.props.definition.variableDefinitions||[]).filter(function(Ft){return Ft.variable.name.value.startsWith(Et)}).length,Wt=void 0;pt>0?Wt=""+Et+pt:Wt=Et;var Vt=et.type.toString(),Jt=(0,l.parseType)(Vt),ot={kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:Wt}},type:Jt,directives:[]},qn=function(cn){return(Ee.props.definition.variableDefinitions||[]).find(function(Gt){return Gt.variable.name.value===cn})},vn=void 0,mt={};if(typeof je<"u"&&je!==null){var yn=(0,l.visit)(je,{Variable:function(cn){var Gt=cn.name.value,bn=qn(Gt);if(mt[Gt]=mt[Gt]+1||1,!!bn)return bn.defaultValue}}),di=ot.type.kind==="NonNullType",on=di?n({},ot,{type:ot.type.type}):ot;vn=n({},on,{defaultValue:yn})}else vn=ot;var Mr=Object.entries(mt).filter(function(Ft){var cn=t(Ft,2);cn[0];var Gt=cn[1];return Gt<2}).map(function(Ft){var cn=t(Ft,2),Gt=cn[0];return cn[1],Gt});if(vn){var An=Ee.props.setArgValue(vn,!1);if(An){var Xi=An.definitions.find(function(Ft){return Ft.operation&&Ft.name&&Ft.name.value&&Ee.props.definition.name&&Ee.props.definition.name.value?Ft.name.value===Ee.props.definition.name.value:!1}),wt=[].concat(d(Xi.variableDefinitions||[]),[vn]).filter(function(Ft){return Mr.indexOf(Ft.variable.name.value)===-1}),Bt=n({},Xi,{variableDefinitions:wt}),un=An.definitions,kn=un.map(function(Ft){return Xi===Ft?Bt:Ft}),tr=n({},An,{definitions:kn});Ee.props.onCommit(tr)}}},ht=function(){if(!(!je||!je.name||!je.name.value)){var Et=je.name.value,pt=(Ee.props.definition.variableDefinitions||[]).find(function(on){return on.variable.name.value===Et});if(pt){var Wt=pt.defaultValue,Vt=Ee.props.setArgValue(Wt,{commit:!1});if(Vt){var Jt=Vt.definitions.find(function(on){return on.name.value===Ee.props.definition.name.value});if(!Jt)return;var ot=0;(0,l.visit)(Jt,{Variable:function(Mr){Mr.name.value===Et&&(ot=ot+1)}});var qn=Jt.variableDefinitions||[];ot<2&&(qn=qn.filter(function(on){return on.variable.name.value!==Et}));var vn=n({},Jt,{variableDefinitions:qn}),mt=Vt.definitions,yn=mt.map(function(on){return Jt===on?vn:on}),di=n({},Vt,{definitions:yn});Ee.props.onCommit(di)}}}},Ot=je&&je.kind==="Variable",jt=this.state.displayArgActions?o.createElement("button",{type:"submit",className:"toolbar-button",title:Ot?"Remove the variable":"Extract the current value into a GraphQL variable",onClick:function(Et){Et.preventDefault(),Et.stopPropagation(),Ot?ht():nt()},style:ct.styles.actionButtonStyle},o.createElement("span",{style:{color:ct.colors.variable}},"$")):null;return o.createElement("div",{style:{cursor:"pointer",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-arg-name":et.name,"data-arg-type":Ye.name,className:"graphiql-explorer-"+et.name},o.createElement("span",{style:{cursor:"pointer"},onClick:function(Et){var pt=!je;pt?Ee.props.addArg(!0):Ee.props.removeArg(!0),Ee.setState({displayArgActions:pt})}},(0,l.isInputObjectType)(Ye)?o.createElement("span",null,je?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):o.createElement(A,{checked:!!je,styleConfig:this.props.styleConfig}),o.createElement("span",{style:{color:ct.colors.attribute},title:et.description,onMouseEnter:function(){je!==null&&typeof je<"u"&&Ee.setState({displayArgActions:!0})},onMouseLeave:function(){return Ee.setState({displayArgActions:!1})}},et.name,M(et)?"*":"",": ",jt," ")," "),xe||o.createElement("span",null)," ")}}]),be}(o.PureComponent),re=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe._addFragment=function(){oe.props.modifySelections([].concat(d(oe.props.selections),[oe._previousSelection||{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:oe.props.implementingType.name}},selectionSet:{kind:"SelectionSet",selections:oe.props.getDefaultFieldNames(oe.props.implementingType).map(function(xe){return{kind:"Field",name:{kind:"Name",value:xe}}})}}]))},oe._removeFragment=function(){var xe=oe._getSelection();oe._previousSelection=xe,oe.props.modifySelections(oe.props.selections.filter(function($e){return $e!==xe}))},oe._getSelection=function(){var xe=oe.props.selections.find(function($e){return $e.kind==="InlineFragment"&&$e.typeCondition&&oe.props.implementingType.name===$e.typeCondition.name.value});if(!xe)return null;if(xe.kind==="InlineFragment")return xe},oe._modifyChildSelections=function(xe,$e){var nt=oe._getSelection();return oe.props.modifySelections(oe.props.selections.map(function(ht){return ht===nt?{directives:ht.directives,kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:oe.props.implementingType.name}},selectionSet:{kind:"SelectionSet",selections:xe}}:ht}),$e)},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.implementingType,et=oe.schema,ct=oe.getDefaultFieldNames,Ye=oe.styleConfig,xe=this._getSelection(),$e=je.getFields(),nt=xe?xe.selectionSet?xe.selectionSet.selections:[]:[];return o.createElement("div",{className:"graphiql-explorer-"+je.name},o.createElement("span",{style:{cursor:"pointer"},onClick:xe?this._removeFragment:this._addFragment},o.createElement(A,{checked:!!xe,styleConfig:this.props.styleConfig}),o.createElement("span",{style:{color:Ye.colors.atom}},this.props.implementingType.name)),xe?o.createElement("div",{style:{marginLeft:16}},Object.keys($e).sort().map(function(ht){return o.createElement(ge,{key:ht,field:$e[ht],selections:nt,modifySelections:Ee._modifyChildSelections,schema:et,getDefaultFieldNames:ct,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,onCommit:Ee.props.onCommit,styleConfig:Ee.props.styleConfig,definition:Ee.props.definition,availableFragments:Ee.props.availableFragments})})):null)}}]),be}(o.PureComponent),se=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe._addFragment=function(){oe.props.modifySelections([].concat(d(oe.props.selections),[oe._previousSelection||{kind:"FragmentSpread",name:oe.props.fragment.name}]))},oe._removeFragment=function(){var xe=oe._getSelection();oe._previousSelection=xe,oe.props.modifySelections(oe.props.selections.filter(function($e){var nt=$e.kind==="FragmentSpread"&&$e.name.value===oe.props.fragment.name.value;return!nt}))},oe._getSelection=function(){var xe=oe.props.selections.find(function($e){return $e.kind==="FragmentSpread"&&$e.name.value===oe.props.fragment.name.value});return xe},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this.props.styleConfig,oe=this._getSelection();return o.createElement("div",{className:"graphiql-explorer-"+this.props.fragment.name.value},o.createElement("span",{style:{cursor:"pointer"},onClick:oe?this._removeFragment:this._addFragment},o.createElement(A,{checked:!!oe,styleConfig:this.props.styleConfig}),o.createElement("span",{style:{color:Ee.colors.def},className:"graphiql-explorer-"+this.props.fragment.name.value},this.props.fragment.name.value)))}}]),be}(o.PureComponent);function fe(Oe,be,Le,Ee){var oe=[],je=!0,et=!1,ct=void 0;try{for(var Ye=Ee[Symbol.iterator](),xe;!(je=(xe=Ye.next()).done);je=!0){var $e=xe.value;if((0,l.isRequiredInputField)($e)||be&&be(Le,$e)){var nt=P($e.type);(0,l.isInputObjectType)(nt)?function(){var ht=nt.getFields();oe.push({kind:"ObjectField",name:{kind:"Name",value:$e.name},value:{kind:"ObjectValue",fields:fe(Oe,be,Le,Object.keys(ht).map(function(Ot){return ht[Ot]}))}})}():(0,l.isLeafType)(nt)&&oe.push({kind:"ObjectField",name:{kind:"Name",value:$e.name},value:Oe(Le,$e,nt)})}}}catch(ht){et=!0,ct=ht}finally{try{!je&&Ye.return&&Ye.return()}finally{if(et)throw ct}}return oe}function Z(Oe,be,Le){var Ee=[],oe=!0,je=!1,et=void 0;try{for(var ct=Le.args[Symbol.iterator](),Ye;!(oe=(Ye=ct.next()).done);oe=!0){var xe=Ye.value;if(M(xe)||be&&be(Le,xe)){var $e=P(xe.type);(0,l.isInputObjectType)($e)?function(){var nt=$e.getFields();Ee.push({kind:"Argument",name:{kind:"Name",value:xe.name},value:{kind:"ObjectValue",fields:fe(Oe,be,Le,Object.keys(nt).map(function(ht){return nt[ht]}))}})}():(0,l.isLeafType)($e)&&Ee.push({kind:"Argument",name:{kind:"Name",value:xe.name},value:Oe(Le,xe,$e)})}}}catch(nt){je=!0,et=nt}finally{try{!oe&&ct.return&&ct.return()}finally{if(je)throw et}}return Ee}var ge=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe.state={displayFieldActions:!1},oe._addAllFieldsToSelections=function(xe){var $e=xe?Object.keys(xe).map(function(Ot){return{kind:"Field",name:{kind:"Name",value:Ot},arguments:[]}}):[],nt={kind:"SelectionSet",selections:$e},ht=[].concat(d(oe.props.selections.filter(function(Ot){return Ot.kind==="InlineFragment"?!0:Ot.name.value!==oe.props.field.name})),[{kind:"Field",name:{kind:"Name",value:oe.props.field.name},arguments:Z(oe.props.getDefaultScalarArgValue,oe.props.makeDefaultArg,oe.props.field),selectionSet:nt}]);oe.props.modifySelections(ht)},oe._addFieldToSelections=function(xe){var $e=[].concat(d(oe.props.selections),[oe._previousSelection||{kind:"Field",name:{kind:"Name",value:oe.props.field.name},arguments:Z(oe.props.getDefaultScalarArgValue,oe.props.makeDefaultArg,oe.props.field)}]);oe.props.modifySelections($e)},oe._handleUpdateSelections=function(xe){var $e=oe._getSelection();if($e&&!xe.altKey)oe._removeFieldFromSelections();else{var nt=(0,l.getNamedType)(oe.props.field.type),ht=(0,l.isObjectType)(nt)&&nt.getFields(),Ot=!!ht&&xe.altKey;Ot?oe._addAllFieldsToSelections(ht):oe._addFieldToSelections(ht)}},oe._removeFieldFromSelections=function(){var xe=oe._getSelection();oe._previousSelection=xe,oe.props.modifySelections(oe.props.selections.filter(function($e){return $e!==xe}))},oe._getSelection=function(){var xe=oe.props.selections.find(function($e){return $e.kind==="Field"&&oe.props.field.name===$e.name.value});if(!xe)return null;if(xe.kind==="Field")return xe},oe._setArguments=function(xe,$e){var nt=oe._getSelection();if(!nt){console.error("Missing selection when setting arguments",xe);return}return oe.props.modifySelections(oe.props.selections.map(function(ht){return ht===nt?{alias:nt.alias,arguments:xe,directives:nt.directives,kind:"Field",name:nt.name,selectionSet:nt.selectionSet}:ht}),$e)},oe._modifyChildSelections=function(xe,$e){return oe.props.modifySelections(oe.props.selections.map(function(nt){if(nt.kind==="Field"&&oe.props.field.name===nt.name.value){if(nt.kind!=="Field")throw new Error("invalid selection");return{alias:nt.alias,arguments:nt.arguments,directives:nt.directives,kind:"Field",name:nt.name,selectionSet:{kind:"SelectionSet",selections:xe}}}return nt}),$e)},Ee),b(oe,je)}return r(be,[{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.field,et=oe.schema,ct=oe.getDefaultFieldNames,Ye=oe.styleConfig,xe=this._getSelection(),$e=j(je.type),nt=je.args.sort(function(pt,Wt){return pt.name.localeCompare(Wt.name)}),ht="graphiql-explorer-node graphiql-explorer-"+je.name;je.isDeprecated&&(ht+=" graphiql-explorer-deprecated");var Ot=(0,l.isObjectType)($e)||(0,l.isInterfaceType)($e)||(0,l.isUnionType)($e)?this.props.availableFragments&&this.props.availableFragments[$e.name]:null,jt=o.createElement("div",{className:ht},o.createElement("span",{title:je.description,style:{cursor:"pointer",display:"inline-flex",alignItems:"center",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-field-name":je.name,"data-field-type":$e.name,onClick:this._handleUpdateSelections,onMouseEnter:function(){var Wt=(0,l.isObjectType)($e)&&xe&&xe.selectionSet&&xe.selectionSet.selections.filter(function(Vt){return Vt.kind!=="FragmentSpread"}).length>0;Wt&&Ee.setState({displayFieldActions:!0})},onMouseLeave:function(){return Ee.setState({displayFieldActions:!1})}},(0,l.isObjectType)($e)?o.createElement("span",null,xe?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):null,(0,l.isObjectType)($e)?null:o.createElement(A,{checked:!!xe,styleConfig:this.props.styleConfig}),o.createElement("span",{style:{color:Ye.colors.property},className:"graphiql-explorer-field-view"},je.name),this.state.displayFieldActions?o.createElement("button",{type:"submit",className:"toolbar-button",title:"Extract selections into a new reusable fragment",onClick:function(Wt){Wt.preventDefault(),Wt.stopPropagation();var Vt=$e.name,Jt=Vt+"Fragment",ot=(Ot||[]).filter(function(on){return on.name.value.startsWith(Jt)}).length;ot>0&&(Jt=""+Jt+ot);var qn=xe?xe.selectionSet?xe.selectionSet.selections:[]:[],vn=[{kind:"FragmentSpread",name:{kind:"Name",value:Jt},directives:[]}],mt={kind:"FragmentDefinition",name:{kind:"Name",value:Jt},typeCondition:{kind:"NamedType",name:{kind:"Name",value:$e.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:qn}},yn=Ee._modifyChildSelections(vn,!1);if(yn){var di=n({},yn,{definitions:[].concat(d(yn.definitions),[mt])});Ee.props.onCommit(di)}else console.warn("Unable to complete extractFragment operation")},style:n({},Ye.styles.actionButtonStyle)},o.createElement("span",null,"…")):null),xe&&nt.length?o.createElement("div",{style:{marginLeft:16},className:"graphiql-explorer-graphql-arguments"},nt.map(function(pt){return o.createElement(J,{key:pt.name,parentField:je,arg:pt,selection:xe,modifyArguments:Ee._setArguments,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit,definition:Ee.props.definition})})):null);if(xe&&((0,l.isObjectType)($e)||(0,l.isInterfaceType)($e)||(0,l.isUnionType)($e))){var dt=(0,l.isUnionType)($e)?{}:$e.getFields(),Et=xe?xe.selectionSet?xe.selectionSet.selections:[]:[];return o.createElement("div",{className:"graphiql-explorer-"+je.name},jt,o.createElement("div",{style:{marginLeft:16}},Ot?Ot.map(function(pt){var Wt=et.getType(pt.typeCondition.name.value),Vt=pt.name.value;return Wt?o.createElement(se,{key:Vt,fragment:pt,selections:Et,modifySelections:Ee._modifyChildSelections,schema:et,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit}):null}):null,Object.keys(dt).sort().map(function(pt){return o.createElement(be,{key:pt,field:dt[pt],selections:Et,modifySelections:Ee._modifyChildSelections,schema:et,getDefaultFieldNames:ct,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit,definition:Ee.props.definition,availableFragments:Ee.props.availableFragments})}),(0,l.isInterfaceType)($e)||(0,l.isUnionType)($e)?et.getPossibleTypes($e).map(function(pt){return o.createElement(re,{key:pt.name,implementingType:pt,selections:Et,modifySelections:Ee._modifyChildSelections,schema:et,getDefaultFieldNames:ct,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit,definition:Ee.props.definition})}):null))}return jt}}]),be}(o.PureComponent);function ae(Oe){try{return Oe.trim()?(0,l.parse)(Oe,{noLocation:!0}):null}catch(be){return new Error(be)}}var pe={kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}},ce={kind:"Document",definitions:[pe]},he=null;function Se(Oe){if(he&&he[0]===Oe)return he[1];var be=ae(Oe);return be?be instanceof Error?he?he[1]:ce:(he=[Oe,be],be):ce}var Ie={buttonStyle:{fontSize:"1.2em",padding:"0px",backgroundColor:"white",border:"none",margin:"5px 0px",height:"40px",width:"100%",display:"block",maxWidth:"none"},actionButtonStyle:{padding:"0px",backgroundColor:"white",border:"none",margin:"0px",maxWidth:"none",height:"15px",width:"15px",display:"inline-block",fontSize:"smaller"},explorerActionsStyle:{margin:"4px -8px -8px",paddingLeft:"8px",bottom:"0px",width:"100%",textAlign:"center",background:"none",borderTop:"none",borderBottom:"none"}},Ge=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe.state={newOperationType:"query",displayTitleActions:!1},oe._modifySelections=function(xe,$e){var nt=oe.props.definition;nt.selectionSet.selections.length===0&&oe._previousOperationDef&&(nt=oe._previousOperationDef);var ht=void 0;if(nt.kind==="FragmentDefinition")ht=n({},nt,{selectionSet:n({},nt.selectionSet,{selections:xe})});else if(nt.kind==="OperationDefinition"){var Ot=xe.filter(function(jt){return!(jt.kind==="Field"&&jt.name.value==="__typename")});Ot.length===0&&(Ot=[{kind:"Field",name:{kind:"Name",value:"__typename ## Placeholder value"}}]),ht=n({},nt,{selectionSet:n({},nt.selectionSet,{selections:Ot})})}return oe.props.onEdit(ht,$e)},oe._onOperationRename=function(xe){return oe.props.onOperationRename(xe.target.value)},oe._handlePotentialRun=function(xe){ee(xe)&&Q(oe.props.definition.kind)&&oe.props.onRunOperation(oe.props.name)},oe._rootViewElId=function(){var xe=oe.props,$e=xe.operationType,nt=xe.name,ht=$e+"-"+(nt||"unknown");return ht},Ee),b(oe,je)}return r(be,[{key:"componentDidMount",value:function(){var Ee=this._rootViewElId();this.props.onMount(Ee)}},{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.operationType,et=oe.definition,ct=oe.schema,Ye=oe.getDefaultFieldNames,xe=oe.styleConfig,$e=this._rootViewElId(),nt=this.props.fields||{},ht=et,Ot=ht.selectionSet.selections,jt=this.props.name||y(je)+" Name";return o.createElement("div",{id:$e,tabIndex:"0",onKeyDown:this._handlePotentialRun,style:{borderBottom:this.props.isLast?"none":"1px solid #d6d6d6",marginBottom:"0em",paddingBottom:"1em"}},o.createElement("div",{style:{color:xe.colors.keyword,paddingBottom:4},className:"graphiql-operation-title-bar",onMouseEnter:function(){return Ee.setState({displayTitleActions:!0})},onMouseLeave:function(){return Ee.setState({displayTitleActions:!1})}},je," ",o.createElement("span",{style:{color:xe.colors.def}},o.createElement("input",{style:{color:xe.colors.def,border:"none",borderBottom:"1px solid #888",outline:"none",width:Math.max(4,jt.length)+"ch"},autoComplete:"false",placeholder:y(je)+" Name",value:this.props.name,onKeyDown:this._handlePotentialRun,onChange:this._onOperationRename})),this.props.onTypeName?o.createElement("span",null,o.createElement("br",null),"on "+this.props.onTypeName):"",this.state.displayTitleActions?o.createElement(o.Fragment,null,o.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return Ee.props.onOperationDestroy()},style:n({},xe.styles.actionButtonStyle)},o.createElement("span",null,"✕")),o.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return Ee.props.onOperationClone()},style:n({},xe.styles.actionButtonStyle)},o.createElement("span",null,"⎘"))):""),Object.keys(nt).sort().map(function(dt){return o.createElement(ge,{key:dt,field:nt[dt],selections:Ot,modifySelections:Ee._modifySelections,schema:ct,getDefaultFieldNames:Ye,getDefaultScalarArgValue:Ee.props.getDefaultScalarArgValue,makeDefaultArg:Ee.props.makeDefaultArg,onRunOperation:Ee.props.onRunOperation,styleConfig:Ee.props.styleConfig,onCommit:Ee.props.onCommit,definition:Ee.props.definition,availableFragments:Ee.props.availableFragments})}))}}]),be}(o.PureComponent);function Ze(){return o.createElement("div",{style:{fontFamily:"sans-serif",display:"flex",flexDirection:"column",alignItems:"center",margin:"1em",marginTop:0,flexGrow:1,justifyContent:"flex-end"}},o.createElement("div",{style:{borderTop:"1px solid #d6d6d6",paddingTop:"1em",width:"100%",textAlign:"center"}},"GraphiQL Explorer by ",o.createElement("a",{href:"https://www.onegraph.com"},"OneGraph")),o.createElement("div",null,"Contribute on"," ",o.createElement("a",{href:"https://github.com/OneGraph/graphiql-explorer"},"GitHub")))}var It=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe.state={newOperationType:"query",operation:null,operationToScrollTo:null},oe._resetScroll=function(){var xe=oe._ref;xe&&(xe.scrollLeft=0)},oe._onEdit=function(xe){return oe.props.onEdit(xe)},oe._setAddOperationType=function(xe){oe.setState({newOperationType:xe})},oe._handleRootViewMount=function(xe){if(oe.state.operationToScrollTo&&oe.state.operationToScrollTo===xe){var $e=".graphiql-explorer-root #"+xe,nt=document.querySelector($e);nt&&nt.scrollIntoView()}},Ee),b(oe,je)}return r(be,[{key:"componentDidMount",value:function(){this._resetScroll()}},{key:"render",value:function(){var Ee=this,oe=this.props,je=oe.schema,et=oe.query,ct=oe.makeDefaultArg;if(!je)return o.createElement("div",{style:{fontFamily:"sans-serif"},className:"error-container"},"No Schema Available");var Ye={colors:this.props.colors||x,checkboxChecked:this.props.checkboxChecked||N,checkboxUnchecked:this.props.checkboxUnchecked||D,arrowClosed:this.props.arrowClosed||k,arrowOpen:this.props.arrowOpen||w,styles:this.props.styles?n({},Ie,this.props.styles):Ie},xe=je.getQueryType(),$e=je.getMutationType(),nt=je.getSubscriptionType();if(!xe&&!$e&&!nt)return o.createElement("div",null,"Missing query type");var ht=xe&&xe.getFields(),Ot=$e&&$e.getFields(),jt=nt&&nt.getFields(),dt=Se(et),Et=this.props.getDefaultFieldNames||C,pt=this.props.getDefaultScalarArgValue||X,Wt=dt.definitions,Vt=Wt.map(function(wt){return wt.kind==="FragmentDefinition"||wt.kind==="OperationDefinition"?wt:null}).filter(Boolean),Jt=Vt.length===0?ce.definitions:Vt,ot=function(Bt,un){var kn=un==null||un===""?null:{kind:"Name",value:un,loc:void 0},tr=n({},Bt,{name:kn}),Ft=dt.definitions,cn=Ft.map(function(Gt){return Bt===Gt?tr:Gt});return n({},dt,{definitions:cn})},qn=function(Bt){var un=void 0;Bt.kind==="FragmentDefinition"?un="fragment":un=Bt.operation;var kn=(Bt.name&&Bt.name.value||"")+"Copy",tr={kind:"Name",value:kn,loc:void 0},Ft=n({},Bt,{name:tr}),cn=dt.definitions,Gt=[].concat(d(cn),[Ft]);return Ee.setState({operationToScrollTo:un+"-"+kn}),n({},dt,{definitions:Gt})},vn=function(Bt){var un=dt.definitions,kn=un.filter(function(tr){return Bt!==tr});return n({},dt,{definitions:kn})},mt=function(Bt){var un=dt.definitions,kn=dt.definitions.length===1&&dt.definitions[0]===ce.definitions[0],tr=kn?[]:un.filter(function(Xo){return Xo.kind==="OperationDefinition"?Xo.operation===Bt:!1}),Ft="My"+y(Bt)+(tr.length===0?"":tr.length+1),cn="__typename # Placeholder value",Gt={kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:cn,loc:null},arguments:[],directives:[],selectionSet:null,loc:null}],loc:null},bn={kind:"OperationDefinition",operation:Bt,name:{kind:"Name",value:Ft},variableDefinitions:[],directives:[],selectionSet:Gt,loc:null},Ii=kn?[bn]:[].concat(d(dt.definitions),[bn]),Ko=n({},dt,{definitions:Ii});Ee.setState({operationToScrollTo:Bt+"-"+Ft}),Ee.props.onEdit((0,l.print)(Ko))},yn=[ht?o.createElement("option",{key:"query",className:"toolbar-button",style:Ye.styles.buttonStyle,type:"link",value:"query"},"Query"):null,Ot?o.createElement("option",{key:"mutation",className:"toolbar-button",style:Ye.styles.buttonStyle,type:"link",value:"mutation"},"Mutation"):null,jt?o.createElement("option",{key:"subscription",className:"toolbar-button",style:Ye.styles.buttonStyle,type:"link",value:"subscription"},"Subscription"):null].filter(Boolean),di=yn.length===0||this.props.hideActions?null:o.createElement("div",{style:{minHeight:"50px",maxHeight:"50px",overflow:"none"}},o.createElement("form",{className:"variable-editor-title graphiql-explorer-actions",style:n({},Ye.styles.explorerActionsStyle,{display:"flex",flexDirection:"row",alignItems:"center",borderTop:"1px solid rgb(214, 214, 214)"}),onSubmit:function(Bt){return Bt.preventDefault()}},o.createElement("span",{style:{display:"inline-block",flexGrow:"0",textAlign:"right"}},"Add new"," "),o.createElement("select",{onChange:function(Bt){return Ee._setAddOperationType(Bt.target.value)},value:this.state.newOperationType,style:{flexGrow:"2"}},yn),o.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return Ee.state.newOperationType?mt(Ee.state.newOperationType):null},style:n({},Ye.styles.buttonStyle,{height:"22px",width:"22px"})},o.createElement("span",null,"+")))),on=this.props.externalFragments&&this.props.externalFragments.reduce(function(wt,Bt){if(Bt.kind==="FragmentDefinition"){var un=Bt.typeCondition.name.value,kn=wt[un]||[],tr=[].concat(d(kn),[Bt]).sort(function(Ft,cn){return Ft.name.value.localeCompare(cn.name.value)});return n({},wt,p({},un,tr))}return wt},{}),Mr=Jt.reduce(function(wt,Bt){if(Bt.kind==="FragmentDefinition"){var un=Bt.typeCondition.name.value,kn=wt[un]||[],tr=[].concat(d(kn),[Bt]).sort(function(Ft,cn){return Ft.name.value.localeCompare(cn.name.value)});return n({},wt,p({},un,tr))}return wt},{}),An=n({},Mr,on),Xi=this.props.showAttribution?o.createElement(Ze,null):null;return o.createElement("div",{ref:function(Bt){Ee._ref=Bt},style:{fontSize:12,textOverflow:"ellipsis",whiteSpace:"nowrap",margin:0,padding:8,fontFamily:'Consolas, Inconsolata, "Droid Sans Mono", Monaco, monospace',display:"flex",flexDirection:"column",height:"100%"},className:"graphiql-explorer-root"},o.createElement("div",{style:{flexGrow:"1",overflow:"scroll"}},Jt.map(function(wt,Bt){var un=wt&&wt.name&&wt.name.value,kn=wt.kind==="FragmentDefinition"?"fragment":wt&&wt.operation||"query",tr=function(Er){var Bn=ot(wt,Er);Ee.props.onEdit((0,l.print)(Bn))},Ft=function(){var Er=qn(wt);Ee.props.onEdit((0,l.print)(Er))},cn=function(){var Er=vn(wt);Ee.props.onEdit((0,l.print)(Er))},Gt=wt.kind==="FragmentDefinition"&&wt.typeCondition.kind==="NamedType"&&je.getType(wt.typeCondition.name.value),bn=Gt instanceof l.GraphQLObjectType?Gt.getFields():null,Ii=kn==="query"?ht:kn==="mutation"?Ot:kn==="subscription"?jt:wt.kind==="FragmentDefinition"?bn:null,Ko=wt.kind==="FragmentDefinition"?wt.typeCondition.name.value:null,Xo=function(Er){var Bn=(0,l.print)(Er);Ee.props.onEdit(Bn)};return o.createElement(Ge,{key:Bt,isLast:Bt===Jt.length-1,fields:Ii,operationType:kn,name:un,definition:wt,onOperationRename:tr,onOperationDestroy:cn,onOperationClone:Ft,onTypeName:Ko,onMount:Ee._handleRootViewMount,onCommit:Xo,onEdit:function(Er,Bn){var Lr=void 0;if((typeof Bn>"u"?"undefined":e(Bn))==="object"&&typeof Bn.commit<"u"?Lr=Bn.commit:Lr=!0,Er){var Fi=n({},dt,{definitions:dt.definitions.map(function($r){return $r===wt?Er:$r})});return Lr&&Xo(Fi),Fi}else return dt},schema:je,getDefaultFieldNames:Et,getDefaultScalarArgValue:pt,makeDefaultArg:ct,onRunOperation:function(){Ee.props.onRunOperation&&Ee.props.onRunOperation(un)},styleConfig:Ye,availableFragments:An})}),Xi),di)}}]),be}(o.PureComponent);It.defaultProps={getDefaultFieldNames:C,getDefaultScalarArgValue:X};var vt=function(Oe){E(be,Oe);function be(){var Le,Ee,oe,je;m(this,be);for(var et=arguments.length,ct=Array(et),Ye=0;Ye<et;Ye++)ct[Ye]=arguments[Ye];return je=(Ee=(oe=b(this,(Le=be.__proto__||Object.getPrototypeOf(be)).call.apply(Le,[this].concat(ct))),oe),oe.state={hasError:!1,error:null,errorInfo:null},Ee),b(oe,je)}return r(be,[{key:"componentDidCatch",value:function(Ee,oe){this.setState({hasError:!0,error:Ee,errorInfo:oe}),console.error("Error in component",Ee,oe)}},{key:"render",value:function(){return this.state.hasError?o.createElement("div",{style:{padding:18,fontFamily:"sans-serif"}},o.createElement("div",null,"Something went wrong"),o.createElement("details",{style:{whiteSpace:"pre-wrap"}},this.state.error?this.state.error.toString():null,o.createElement("br",null),this.state.errorInfo?this.state.errorInfo.componentStack:null)):this.props.children}}]),be}(o.Component),at=function(Oe){E(be,Oe);function be(){return m(this,be),b(this,(be.__proto__||Object.getPrototypeOf(be)).apply(this,arguments))}return r(be,[{key:"render",value:function(){return o.createElement("div",{className:"docExplorerWrap",style:{height:"100%",width:this.props.width,minWidth:this.props.width,zIndex:7,display:this.props.explorerIsOpen?"flex":"none",flexDirection:"column",overflow:"hidden"}},o.createElement("div",{className:"doc-explorer-title-bar"},o.createElement("div",{className:"doc-explorer-title"},this.props.title),o.createElement("div",{className:"doc-explorer-rhs"},o.createElement("div",{className:"docExplorerHide",onClick:this.props.onToggleExplorer},"✕"))),o.createElement("div",{className:"doc-explorer-contents",style:{padding:"0px",overflowY:"unset"}},o.createElement(vt,null,o.createElement(It,this.props))))}}]),be}(o.PureComponent);return at.defaultValue=$,at.defaultProps={width:320,title:"Explorer"},mg.default=at,mg}var YF;function YZ(){if(YF)return yp;YF=1,Object.defineProperty(yp,"__esModule",{value:!0}),yp.Explorer=void 0;var e=GZ(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return yp.Explorer=t.default,yp.default=t.default,yp}var WZ=YZ();const WF=({title:e,titleId:t,...n})=>L.createElement("svg",{width:5,height:8,viewBox:"0 0 5 8",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M0.910453 6.86965L3.88955 3.89061C4.09782 3.68233 4.09782 3.34465 3.88955 3.13637L0.910453 0.157278C0.574475 -0.178701 0 0.0592511 0 0.534408V6.49259C0 6.96768 0.574475 7.20565 0.910453 6.86965Z"})),QZ=({title:e,titleId:t,...n})=>L.createElement("svg",{height:"1em",strokeWidth:1.5,viewBox:"0 0 24 24",stroke:"currentColor",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("path",{d:"M18 6H20M22 6H20M20 6V4M20 6V8",strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z",strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14",strokeLinecap:"round",strokeLinejoin:"round"})),KZ=({title:e,titleId:t,...n})=>L.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("circle",{cx:7.5,cy:7.5,r:6,strokeWidth:2})),XZ=({title:e,titleId:t,...n})=>L.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-labelledby":t,...n},e?L.createElement("title",{id:t},e):null,L.createElement("circle",{cx:7.5,cy:7.5,r:7.5}),L.createElement("path",{d:"M4.64641 7.00106L6.8801 9.23256L10.5017 5.61325",stroke:"white",strokeWidth:1.5})),ZZ={keyword:"hsl(var(--color-primary))",def:"hsl(var(--color-tertiary))",property:"hsl(var(--color-info))",qualifier:"hsl(var(--color-secondary))",attribute:"hsl(var(--color-tertiary))",number:"hsl(var(--color-success))",string:"hsl(var(--color-warning))",builtin:"hsl(var(--color-success))",string2:"hsl(var(--color-secondary))",variable:"hsl(var(--color-secondary))",atom:"hsl(var(--color-tertiary))"},JZ=Ae.createElement(WF,{style:{width:"var(--px-16)",transform:"rotate(90deg)"}}),eJ=Ae.createElement(WF,{style:{width:"var(--px-16)"}}),tJ=Ae.createElement(KZ,{style:{marginRight:"var(--px-4)"}}),nJ=Ae.createElement(XZ,{style:{fill:"hsl(var(--color-info))",marginRight:"var(--px-4)"}}),rJ={buttonStyle:{cursor:"pointer",fontSize:"2em",lineHeight:0},explorerActionsStyle:{paddingTop:"var(--px-16)"},actionButtonStyle:{}};function iJ(e){const{setOperationName:t}=Ei({nonNull:!0}),{schema:n}=cs({nonNull:!0}),{run:r}=pp({nonNull:!0}),i=L.useCallback(c=>{c&&t(c),r()},[r,t]),[o,l]=NF(jZ());return Ae.createElement(WZ.Explorer,{schema:n,onRunOperation:i,explorerIsOpen:!0,colors:ZZ,arrowOpen:JZ,arrowClosed:eJ,checkboxUnchecked:tJ,checkboxChecked:nJ,styles:rJ,query:o,onEdit:l,...e})}function oJ(e){return{title:"GraphiQL Explorer",icon:QZ,content:()=>Ae.createElement(iJ,{...e})}}var gC=function(){return gC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gC.apply(this,arguments)},aJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ob=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],l;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(c){l={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return o},sJ=parseInt(Ae.version.slice(0,2),10);if(sJ<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(`
`));function nc(e){var t,n=e.dangerouslyAssumeSchemaIsValid,r=e.defaultQuery,i=e.defaultTabs,o=e.externalFragments,l=e.fetcher,c=e.getDefaultFieldNames,p=e.headers,d=e.inputValueDeprecation,m=e.introspectionQueryName,b=e.maxHistoryLength,E=e.onEditOperationName,y=e.onSchemaChange,x=e.onTabChange,w=e.onTogglePluginVisibility,k=e.operationName,N=e.plugins,D=e.query,A=e.response,C=e.schema,M=e.schemaDescription,j=e.shouldPersistHeaders,P=e.storage,F=e.validationRules,V=e.variables,$=e.visiblePlugin,X=e.defaultHeaders,J=aJ(e,["dangerouslyAssumeSchemaIsValid","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders"]);if(typeof l!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");return Ae.createElement(hC,{getDefaultFieldNames:c,dangerouslyAssumeSchemaIsValid:n,defaultQuery:r,defaultHeaders:X,defaultTabs:i,externalFragments:o,fetcher:l,headers:p,inputValueDeprecation:d,introspectionQueryName:m,maxHistoryLength:b,onEditOperationName:E,onSchemaChange:y,onTabChange:x,onTogglePluginVisibility:w,plugins:N,visiblePlugin:$,operationName:k,query:D,response:A,schema:C,schemaDescription:M,shouldPersistHeaders:j,storage:P,validationRules:F,variables:V},Ae.createElement(QF,gC({showPersistHeadersSettings:j!==!1,disableTabs:(t=J.disableTabs)!==null&&t!==void 0?t:!1},J)))}nc.Logo=KF,nc.Toolbar=XF,nc.Footer=ZF;function QF(e){var t,n,r,i,o=(t=e.isHeadersEditorEnabled)!==null&&t!==void 0?t:!0,l=Ei({nonNull:!0}),c=pp({nonNull:!0}),p=cs({nonNull:!0}),d=Zu(),m=mb(),b=gb({onCopyQuery:e.onCopyQuery}),E=Uf(),y=mp(),x=HF(),w=x.theme,k=x.setTheme,N=(n=m?.visiblePlugin)===null||n===void 0?void 0:n.content,D=wb({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:m?.visiblePlugin?void 0:"first",onHiddenElementChange:function(at){at==="first"&&m?.setVisiblePlugin(null)},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),A=wb({direction:"horizontal",storageKey:"editorFlex"}),C=wb({defaultSizeRelation:3,direction:"vertical",initiallyHidden:function(){if(!(e.defaultEditorToolsVisibility==="variables"||e.defaultEditorToolsVisibility==="headers"))return typeof e.defaultEditorToolsVisibility=="boolean"?e.defaultEditorToolsVisibility?void 0:"second":l.initialVariables||l.initialHeaders?void 0:"second"}(),sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"}),M=Ob(L.useState(function(){return e.defaultEditorToolsVisibility==="variables"||e.defaultEditorToolsVisibility==="headers"?e.defaultEditorToolsVisibility:!l.initialVariables&&l.initialHeaders&&o?"headers":"variables"}),2),j=M[0],P=M[1],F=Ob(L.useState(null),2),V=F[0],$=F[1],X=Ob(L.useState(null),2),J=X[0],ee=X[1],Q=Ae.Children.toArray(e.children),B=Q.find(function(at){return yC(at,nc.Logo)})||Ae.createElement(nc.Logo,null),ne=Q.find(function(at){return yC(at,nc.Toolbar)})||Ae.createElement(Ae.Fragment,null,Ae.createElement(Nb,{onClick:y,label:"Prettify query (Shift-Ctrl-P)"},Ae.createElement(CZ,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),Ae.createElement(Nb,{onClick:E,label:"Merge fragments into query (Shift-Ctrl-M)"},Ae.createElement(SZ,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),Ae.createElement(Nb,{onClick:b,label:"Copy query (Shift-Ctrl-C)"},Ae.createElement(lZ,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),((r=e.toolbar)===null||r===void 0?void 0:r.additionalContent)&&e.toolbar.additionalContent,((i=e.toolbar)===null||i===void 0?void 0:i.additionalComponent)&&Ae.createElement(e.toolbar.additionalComponent,null)),re=Q.find(function(at){return yC(at,nc.Footer)}),se=L.useCallback(function(){D.hiddenElement==="first"&&D.setHiddenElement(null)},[D]),fe=L.useCallback(function(){try{d?.clear(),ee("success")}catch{ee("error")}},[d]),Z=L.useCallback(function(at){l.setShouldPersistHeaders(at.currentTarget.dataset.value==="true")},[l]),ge=L.useCallback(function(at){var Oe=at.currentTarget.dataset.theme;k(Oe||null)},[k]),ae=l.addTab,pe=p.introspect,ce=l.moveTab,he=L.useCallback(function(at){$(at.currentTarget.dataset.value)},[]),Se=L.useCallback(function(at){var Oe=m,be=Number(at.currentTarget.dataset.index),Le=Oe.plugins.find(function(oe,je){return be===je}),Ee=Le===Oe.visiblePlugin;Ee?(Oe.setVisiblePlugin(null),D.setHiddenElement("first")):(Oe.setVisiblePlugin(Le),D.setHiddenElement(null))},[m,D]),Ie=L.useCallback(function(at){C.hiddenElement==="second"&&C.setHiddenElement(null),P(at.currentTarget.dataset.name)},[C]),Ge=L.useCallback(function(){C.setHiddenElement(C.hiddenElement==="second"?null:"second")},[C]),Ze=L.useCallback(function(at){at||$(null)},[]),It=L.useCallback(function(at){at||($(null),ee(null))},[]),vt=Ae.createElement(Wi,{label:"Add tab"},Ae.createElement(ci,{type:"button",className:"graphiql-tab-add",onClick:ae,"aria-label":"Add tab"},Ae.createElement(wZ,{"aria-hidden":"true"})));return Ae.createElement(Wi.Provider,null,Ae.createElement("div",{"data-testid":"graphiql-container",className:"graphiql-container"},Ae.createElement("div",{className:"graphiql-sidebar"},Ae.createElement("div",{className:"graphiql-sidebar-section"},m?.plugins.map(function(at,Oe){var be=at===m.visiblePlugin,Le="".concat(be?"Hide":"Show"," ").concat(at.title),Ee=at.icon;return Ae.createElement(Wi,{key:at.title,label:Le},Ae.createElement(ci,{type:"button",className:be?"active":"",onClick:Se,"data-index":Oe,"aria-label":Le},Ae.createElement(Ee,{"aria-hidden":"true"})))})),Ae.createElement("div",{className:"graphiql-sidebar-section"},Ae.createElement(Wi,{label:"Re-fetch GraphQL schema"},Ae.createElement(ci,{type:"button",disabled:p.isFetching,onClick:pe,"aria-label":"Re-fetch GraphQL schema"},Ae.createElement(_Z,{className:p.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),Ae.createElement(Wi,{label:"Open short keys dialog"},Ae.createElement(ci,{type:"button","data-value":"short-keys",onClick:he,"aria-label":"Open short keys dialog"},Ae.createElement(bZ,{"aria-hidden":"true"}))),Ae.createElement(Wi,{label:"Open settings dialog"},Ae.createElement(ci,{type:"button","data-value":"settings",onClick:he,"aria-label":"Open settings dialog"},Ae.createElement(AZ,{"aria-hidden":"true"}))))),Ae.createElement("div",{className:"graphiql-main"},Ae.createElement("div",{ref:D.firstRef,style:{minWidth:"200px"}},Ae.createElement("div",{className:"graphiql-plugin"},N?Ae.createElement(N,null):null)),m?.visiblePlugin&&Ae.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:D.dragBarRef}),Ae.createElement("div",{ref:D.secondRef,className:"graphiql-sessions"},Ae.createElement("div",{className:"graphiql-session-header"},e.disableTabs?null:Ae.createElement(eF,{values:l.tabs,onReorder:ce,"aria-label":"Select active operation"},l.tabs.length>1&&Ae.createElement(Ae.Fragment,null,l.tabs.map(function(at,Oe){return Ae.createElement(Gw,{key:at.id,value:at,isActive:Oe===l.activeTabIndex},Ae.createElement(Gw.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(Oe),onClick:function(){c.stop(),l.changeTab(Oe)}},at.title),Ae.createElement(Gw.Close,{onClick:function(){l.activeTabIndex===Oe&&c.stop(),l.closeTab(Oe)}}))}),vt)),Ae.createElement("div",{className:"graphiql-session-header-right"},l.tabs.length===1&&vt,B)),Ae.createElement("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":"graphiql-session-tab-".concat(l.activeTabIndex)},Ae.createElement("div",{ref:A.firstRef},Ae.createElement("div",{className:"graphiql-editors".concat(l.tabs.length===1?" full-height":"")},Ae.createElement("div",{ref:C.firstRef},Ae.createElement("section",{className:"graphiql-query-editor","aria-label":"Query Editor"},Ae.createElement(dC,{editorTheme:e.editorTheme,keyMap:e.keyMap,onClickReference:se,onCopyQuery:e.onCopyQuery,onEdit:e.onEditQuery,readOnly:e.readOnly}),Ae.createElement("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands"},Ae.createElement(Ab,null),ne))),Ae.createElement("div",{ref:C.dragBarRef},Ae.createElement("div",{className:"graphiql-editor-tools"},Ae.createElement(ci,{type:"button",className:j==="variables"&&C.hiddenElement!=="second"?"active":"",onClick:Ie,"data-name":"variables"},"Variables"),o&&Ae.createElement(ci,{type:"button",className:j==="headers"&&C.hiddenElement!=="second"?"active":"",onClick:Ie,"data-name":"headers"},"Headers"),Ae.createElement(Wi,{label:C.hiddenElement==="second"?"Show editor tools":"Hide editor tools"},Ae.createElement(ci,{type:"button",onClick:Ge,"aria-label":C.hiddenElement==="second"?"Show editor tools":"Hide editor tools",className:"graphiql-toggle-editor-tools"},C.hiddenElement==="second"?Ae.createElement(sZ,{className:"graphiql-chevron-icon","aria-hidden":"true"}):Ae.createElement(oZ,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),Ae.createElement("div",{ref:C.secondRef},Ae.createElement("section",{className:"graphiql-editor-tool","aria-label":j==="variables"?"Variables":"Headers"},Ae.createElement(xb,{editorTheme:e.editorTheme,isHidden:j!=="variables",keyMap:e.keyMap,onEdit:e.onEditVariables,onClickReference:se,readOnly:e.readOnly}),o&&Ae.createElement(Eb,{editorTheme:e.editorTheme,isHidden:j!=="headers",keyMap:e.keyMap,onEdit:e.onEditHeaders,readOnly:e.readOnly}))))),Ae.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:A.dragBarRef}),Ae.createElement("div",{ref:A.secondRef},Ae.createElement("div",{className:"graphiql-response"},c.isFetching?Ae.createElement(Hw,null):null,Ae.createElement(pC,{editorTheme:e.editorTheme,responseTooltip:e.responseTooltip,keyMap:e.keyMap}),re))))),Ae.createElement(dp,{open:V==="short-keys",onOpenChange:Ze},Ae.createElement("div",{className:"graphiql-dialog-header"},Ae.createElement(dp.Title,{className:"graphiql-dialog-title"},"Short Keys"),Ae.createElement(dp.Close,null)),Ae.createElement("div",{className:"graphiql-dialog-section"},Ae.createElement(uJ,{keyMap:e.keyMap||"sublime"}))),Ae.createElement(dp,{open:V==="settings",onOpenChange:It},Ae.createElement("div",{className:"graphiql-dialog-header"},Ae.createElement(dp.Title,{className:"graphiql-dialog-title"},"Settings"),Ae.createElement(dp.Close,null)),e.showPersistHeadersSettings?Ae.createElement("div",{className:"graphiql-dialog-section"},Ae.createElement("div",null,Ae.createElement("div",{className:"graphiql-dialog-section-title"},"Persist headers"),Ae.createElement("div",{className:"graphiql-dialog-section-caption"},"Save headers upon reloading."," ",Ae.createElement("span",{className:"graphiql-warning-text"},"Only enable if you trust this device."))),Ae.createElement(zw,null,Ae.createElement(us,{type:"button",id:"enable-persist-headers",className:l.shouldPersistHeaders?"active":"","data-value":"true",onClick:Z},"On"),Ae.createElement(us,{type:"button",id:"disable-persist-headers",className:l.shouldPersistHeaders?"":"active",onClick:Z},"Off"))):null,Ae.createElement("div",{className:"graphiql-dialog-section"},Ae.createElement("div",null,Ae.createElement("div",{className:"graphiql-dialog-section-title"},"Theme"),Ae.createElement("div",{className:"graphiql-dialog-section-caption"},"Adjust how the interface looks like.")),Ae.createElement(zw,null,Ae.createElement(us,{type:"button",className:w===null?"active":"",onClick:ge},"System"),Ae.createElement(us,{type:"button",className:w==="light"?"active":"","data-theme":"light",onClick:ge},"Light"),Ae.createElement(us,{type:"button",className:w==="dark"?"active":"","data-theme":"dark",onClick:ge},"Dark"))),d?Ae.createElement("div",{className:"graphiql-dialog-section"},Ae.createElement("div",null,Ae.createElement("div",{className:"graphiql-dialog-section-title"},"Clear storage"),Ae.createElement("div",{className:"graphiql-dialog-section-caption"},"Remove all locally stored data and start fresh.")),Ae.createElement(us,{type:"button",state:J||void 0,disabled:J==="success",onClick:fe},{success:"Cleared data",error:"Failed"}[J]||"Clear data")):null)))}var vC=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",lJ=Object.entries({"Search in editor":[vC,"F"],"Search in documentation":[vC,"K"],"Execute query":[vC,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function uJ(e){var t=e.keyMap;return Ae.createElement("div",null,Ae.createElement("table",{className:"graphiql-table"},Ae.createElement("thead",null,Ae.createElement("tr",null,Ae.createElement("th",null,"Short Key"),Ae.createElement("th",null,"Function"))),Ae.createElement("tbody",null,lJ.map(function(n){var r=Ob(n,2),i=r[0],o=r[1];return Ae.createElement("tr",{key:i},Ae.createElement("td",null,o.map(function(l,c,p){return Ae.createElement(L.Fragment,{key:l},Ae.createElement("code",{className:"graphiql-key"},l),c!==p.length-1&&" + ")})),Ae.createElement("td",null,i))}))),Ae.createElement("p",null,"The editors use"," ",Ae.createElement("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer"},"CodeMirror Key Maps")," ","that add more short keys. This instance of Graph",Ae.createElement("em",null,"i"),"QL uses"," ",Ae.createElement("code",null,t),"."))}function KF(e){return Ae.createElement("div",{className:"graphiql-logo"},e.children||Ae.createElement("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer"},"Graph",Ae.createElement("em",null,"i"),"QL"))}KF.displayName="GraphiQLLogo";function XF(e){return Ae.createElement(Ae.Fragment,null,e.children)}XF.displayName="GraphiQLToolbar";function ZF(e){return Ae.createElement("div",{className:"graphiql-footer"},e.children)}ZF.displayName="GraphiQLFooter";function yC(e,t){var n;return!((n=e?.type)===null||n===void 0)&&n.displayName&&e.type.displayName===t.displayName?!0:e.type===t}var Qs=null;typeof WebSocket<"u"?Qs=WebSocket:typeof MozWebSocket<"u"?Qs=MozWebSocket:typeof global<"u"?Qs=global.WebSocket||global.MozWebSocket:typeof window<"u"?Qs=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Qs=self.WebSocket||self.MozWebSocket);const Db=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function cr(e){return e?.then!=null}function cJ(e){const t=e;return t&&t.then&&t.catch&&t.finally}function Xt(e,t,n,r){let i=xo().then(e).then(t,n);return hJ(i)}function xo(e){return e&&cJ(e)?e:cr(e)?{then:(t,n)=>xo(e.then(t,n)),catch:t=>xo(e.then(n=>n,t)),finally:t=>xo(t?pJ(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return xo(t(e))}catch(n){return Bf(n)}return this},catch(){return this},finally(t){if(t)try{return xo(t()).then(()=>e,()=>e)}catch(n){return Bf(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[Db]:"resolved"}}function JF(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,o){e=i,t=o}),get resolve(){return e},get reject(){return t}}}function Bf(e){return{then(t,n){if(n)try{return xo(n(e))}catch(r){return Bf(r)}return this},catch(t){if(t)try{return xo(t(e))}catch(n){return Bf(n)}return this},finally(t){if(t)try{t()}catch(n){return Bf(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[Db]:"rejected"}}function bC(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,o;typeof e.return=="function"&&(i=e.return,o=p=>{const d=()=>{throw p};return i.call(e).then(d,d)});function l(p){return p.done?p:Xt(()=>p.value,d=>Xt(()=>t(d),e5,o))}let c;if(n){let p;const d=n;c=m=>(p||=Xt(()=>m,b=>Xt(()=>d(b),e5,o)),p)}return{next(){return e.next().then(l,c)},return(){return i?i.call(e).then(l,c):xo({value:void 0,done:!0})},throw(p){return typeof e.throw=="function"?e.throw(p).then(l,c):o?o(p):Bf(p)},[Symbol.asyncIterator](){return this}}}function e5(e){return{value:e,done:!1}}function fJ(e){return e?.[Db]==="resolved"}function dJ(e){return e?.[Db]==="rejected"}function pJ(e,t){return"finally"in e?e.finally(t):e.then(n=>{const r=t();return cr(r)?r.then(()=>n):n},n=>{const r=t();if(cr(r))return r.then(()=>{throw n});throw n})}function hJ(e){if(fJ(e))return e.__fakePromiseValue;if(dJ(e))throw e.__fakeRejectError;return e}const t5=new WeakMap;function mJ(e,t){let n=t5.get(e);return!n&&t&&(n=t(e),t5.set(e,n)),n}const gJ=/^(https?|wss?|file):\/\//;function vJ(e){if(typeof e!="string"||!gJ.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch{return!1}}const yJ=e=>Array.isArray(e)?e:e?[e]:[];function bJ(e){return e!=null}const n5=3;function Ri(e){return kb(e,[])}function kb(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return EJ(e,t);default:return String(e)}}function r5(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message};
${e.stack}`}function EJ(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?r5(e)+`
`+i5(e.errors,t):r5(e);if(t.includes(e))return"[Circular]";const n=[...t,e];if(SJ(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:kb(r,n)}else if(Array.isArray(e))return i5(e,n);return TJ(e,n)}function SJ(e){return typeof e.toJSON=="function"}function TJ(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>n5?"["+xJ(e)+"]":"{ "+n.map(([i,o])=>i+": "+kb(o,t)).join(", ")+" }"}function i5(e,t){if(e.length===0)return"[]";if(t.length>n5)return"[Array]";const n=e.length,r=[];for(let i=0;i<n;++i)r.push(kb(e[i],t));return"["+r.join(", ")+"]"}function xJ(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const wJ=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function CJ(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>wJ.includes(t))}function Yt(e,t){return t?.originalError&&!(t.originalError instanceof Error)&&CJ(t.originalError)&&(t.originalError=Yt(t.originalError.message,t.originalError)),Kv.major>=17?new Me(e,t):new Me(e,t?.nodes,t?.source,t?.positions,t?.path,t?.originalError,t?.extensions)}function Rb(e,t){return Yt(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t??e.path,originalError:e,extensions:e.extensions})}function _J(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function o5(e){return typeof e=="object"&&e!==null}function a5(e,t,n){let r=n;for(const i of e)r=Xt(()=>r,o=>t(o,i));return r}function s5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l5(e,t,n={}){const r={},o=(t.arguments??[]).reduce((l,c)=>({...l,[c.name.value]:c}),{});for(const{name:l,type:c,defaultValue:p}of e.args){const d=o[l];if(!d){if(p!==void 0)r[l]=p;else if(_t(c))throw Yt(`Argument "${l}" of required type "${Ri(c)}" was not provided.`,{nodes:[t]});continue}const m=d.value;let b=m.kind===K.NULL;if(m.kind===K.VARIABLE){const y=m.name.value;if(n==null||!s5(n,y)){if(p!==void 0)r[l]=p;else if(_t(c))throw Yt(`Argument "${l}" of required type "${Ri(c)}" was provided the variable "$${y}" which was not provided a runtime value.`,{nodes:[m]});continue}b=n[y]==null}if(b&&_t(c))throw Yt(`Argument "${l}" of non-null type "${Ri(c)}" must not be null.`,{nodes:[m]});const E=Ea(m,c,n);if(E===void 0)throw Yt(`Argument "${l}" has invalid value ${pn(m)}.`,{nodes:[m]});r[l]=E}return r}function ps(e){const t=new WeakMap;return function(r){const i=t.get(r);if(i===void 0){const o=e(r);return t.set(r,o),o}return i}}function Mb(e){const t=new WeakMap;return function(r,i){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);const c=e(r,i);return o.set(i,c),c}const l=o.get(i);if(l===void 0){const c=e(r,i);return o.set(i,c),c}return l}}function NJ(e){const t=new WeakMap;return function(r,i,o){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);const d=new WeakMap;l.set(i,d);const m=e(r,i,o);return d.set(o,m),m}let c=l.get(i);if(!c){c=new WeakMap,l.set(i,c);const d=e(r,i,o);return c.set(o,d),d}const p=c.get(o);if(p===void 0){const d=e(r,i,o);return c.set(o,d),d}return p}}function AJ(e){const t=new WeakMap;return function(r,i,o,l,c){let p=t.get(r);if(!p){p=new WeakMap,t.set(r,p);const y=new WeakMap;p.set(i,y);const x=new WeakMap;y.set(o,x);const w=new WeakMap;x.set(l,w);const k=e(r,i,o,l,c);return w.set(c,k),k}let d=p.get(i);if(!d){d=new WeakMap,p.set(i,d);const y=new WeakMap;d.set(o,y);const x=new WeakMap;y.set(l,x);const w=e(r,i,o,l,c);return x.set(c,w),w}let m=d.get(o);if(!m){m=new WeakMap,d.set(o,m);const y=new WeakMap;m.set(l,y);const x=e(r,i,o,l,c);return y.set(c,x),x}let b=m.get(l);if(!b){b=new WeakMap,m.set(l,b);const y=e(r,i,o,l,c);return b.set(c,y),y}const E=b.get(c);if(E===void 0){const y=e(r,i,o,l,c);return b.set(c,y),y}return E}}function OJ(e){const t=new WeakMap;return function(r,i,o,l){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);const d=e(r,i,o,l);return c.set(i,d),d}const p=c.get(i);if(p===void 0){const d=e(r,i,o,l);return c.set(i,d),d}return p}}function EC(e){if(_t(e)){const t=EC(e.ofType);if(t.kind===K.NON_NULL_TYPE)throw new Error(`Invalid type node ${Ri(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:K.NON_NULL_TYPE,type:t}}else if(mn(e))return{kind:K.LIST_TYPE,type:EC(e.ofType)};return{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:e.name}}}function Lb(e,t,n){const i=SC(e).get(t);if(i==null)throw Yt(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}const DJ=ps(function(t){const n=kJ(t);return new Set([...n].map(r=>r.name))}),kJ=ps(function(t){const n=SC(t);return new Set(n.values())}),SC=ps(function(t){const n=new Map,r=t.getQueryType();r&&n.set("query",r);const i=t.getMutationType();i&&n.set("mutation",i);const o=t.getSubscriptionType();return o&&n.set("subscription",o),n}),RJ=80;let u5={};function MJ(e){return`
# `+e.replace(/\n/g,`
# `)}function bt(e,t){return e?e.filter(n=>n).join(t||""):""}function c5(e){return e?.some(t=>t.includes(`
`))??!1}function LJ(e){return(t,n,r,i,o)=>{const l=[],c=i.reduce((m,b)=>(["fields","arguments","values"].includes(b)&&m.name&&l.push(m.name.value),m[b]),o[0]),p=[...l,c?.name?.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&u5[p]&&d.push(...u5[p]),bt([...d.map(MJ),t.description,e(t,n,r,i,o)],`
`)}}function gg(e){return e&&` ${e.replace(/\n/g,`
`)}`}function hs(e){return e&&e.length!==0?`{
${gg(bt(e,`
`))}
}`:""}function Cr(e,t,n){return t?e+t+(n||""):""}function IJ(e,t=!1){const n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(`
`)===-1?`"""${n.replace(/"$/,`"
`)}"""`:`"""
${t?n:gg(n)}
"""`}const f5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>bt(e.definitions,`
`)},OperationDefinition:{leave:e=>{const t=Cr("(",bt(e.variableDefinitions,", "),")");return bt([e.operation,bt([e.name,t]),bt(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Cr(" = ",n)+Cr(" ",bt(r," "))},SelectionSet:{leave:({selections:e})=>hs(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=Cr("",e,": ")+t;let l=o+Cr("(",bt(n,", "),")");return l.length>RJ&&(l=o+Cr(`(
`,gg(bt(n,`
`)),`
)`)),bt([l,bt(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Cr(" ",bt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>bt(["...",Cr("on ",e),bt(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Cr("(",bt(n,", "),")")} on ${t} ${Cr("",bt(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?IJ(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+bt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+bt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Cr("(",bt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>bt(["schema",bt(e," "),hs(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>bt(["scalar",e,bt(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>bt(["type",e,Cr("implements ",bt(t," & ")),bt(n," "),hs(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(c5(t)?Cr(`(
`,gg(bt(t,`
`)),`
)`):Cr("(",bt(t,", "),")"))+": "+n+Cr(" ",bt(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>bt([e+": "+t,Cr("= ",n),bt(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>bt(["interface",e,Cr("implements ",bt(t," & ")),bt(n," "),hs(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>bt(["union",e,bt(t," "),Cr("= ",bt(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>bt(["enum",e,bt(t," "),hs(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>bt([e,bt(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>bt(["input",e,bt(t," "),hs(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(c5(t)?Cr(`(
`,gg(bt(t,`
`)),`
)`):Cr("(",bt(t,", "),")"))+(n?" repeatable":"")+" on "+bt(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>bt(["extend schema",bt(e," "),hs(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>bt(["extend scalar",e,bt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>bt(["extend type",e,Cr("implements ",bt(t," & ")),bt(n," "),hs(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>bt(["extend interface",e,Cr("implements ",bt(t," & ")),bt(n," "),hs(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>bt(["extend union",e,bt(t," "),Cr("= ",bt(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>bt(["extend enum",e,bt(t," "),hs(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>bt(["extend input",e,bt(t," "),hs(n)]," ")}};Object.keys(f5).reduce((e,t)=>({...e,[t]:{leave:LJ(f5[t].leave)}}),{});function FJ(e){const t=e.loc;if(!t)return;const n=[];let r=t.startToken.prev;for(;r!=null&&r.kind===Pe.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){const i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(`
`):void 0}function PJ(e){const t=e.split(/\r\n|[\n\r]/g),n=jJ(t);if(n!==0)for(let r=1;r<t.length;r++)t[r]=t[r].slice(n);for(;t.length>0&&p5(t[0]);)t.shift();for(;t.length>0&&p5(t[t.length-1]);)t.pop();return t.join(`
`)}function jJ(e){let t=null;for(let n=1;n<e.length;n++){const r=e[n],i=d5(r);if(i!==r.length&&(t===null||i<t)&&(t=i,t===0))break}return t===null?0:t}function d5(e){let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;return t}function p5(e){return d5(e)===e.length}function VJ(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=UJ(t,n),n.noLocation&&(r=Ai(pn(r),n))):r=Ai(new Zh(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:K.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function UJ(e,t={}){const n=Ai(e,{...t,noLocation:!1});return Tr(n,{leave:i=>{if(qJ(i)){const o=FJ(i);if(o!==void 0){const l=PJ(`
`+o),c=l.includes(`
`);return i.description?{...i,description:{...i.description,value:i.description.value+`
`+l,block:!0}}:{...i,description:{kind:K.STRING,value:l,block:c}}}}}})}function qJ(e){return by(e)||e.kind===K.FIELD_DEFINITION||e.kind===K.INPUT_VALUE_DEFINITION||e.kind===K.ENUM_VALUE_DEFINITION}var zt;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(zt||(zt={}));function bp(e,t){if(t){const n=e[t.name];if(At(n))return n}}function BJ(e){if("getFields"in e){const t=e.getFields();for(const n in t)return t[n].name==="_fake"}return!1}function $J(e){switch(e.name){case rm.name:return rm;case im.name:return im;case Xn.name:return Xn;case Zn.name:return Zn;case om.name:return om;default:return e}}function zJ(e,t){const n=Object.create(null);for(const E in e)n[E]=e[E];const r=Object.create(null);for(const E in n){const y=n[E];if(y==null||E.startsWith("__"))continue;const x=y.name;if(!x.startsWith("__")){if(r[x]!=null){console.warn(`Duplicate schema type name ${x} found; keeping the existing one found in the schema`);continue}r[x]=y}}for(const E in r)r[E]=c(r[E]);const i=t.map(E=>o(E));return{typeMap:r,directives:i};function o(E){if(hy(E))return E;const y=E.toConfig();return y.args=l(y.args),new To(y)}function l(E){const y={};for(const x in E){const w=E[x],k=b(w.type);k!=null&&(w.type=k,y[x]=w)}return y}function c(E){if(At(E)){const y=E.toConfig(),x={...y,fields:()=>p(y.fields),interfaces:()=>m(y.interfaces)};return new si(x)}else if(Rt(E)){const y=E.toConfig(),x={...y,fields:()=>p(y.fields)};return"interfaces"in x&&(x.interfaces=()=>m(y.interfaces)),new ao(x)}else if(ar(E)){const y=E.toConfig(),x={...y,types:()=>m(y.types)};return new Iu(x)}else if(nn(E)){const y=E.toConfig(),x={...y,fields:()=>d(y.fields)};return new so(x)}else if(Wn(E)){const y=E.toConfig();return new Hi(y)}else if(Oi(E)){if(sm(E))return E;const y=E.toConfig();return new ma(y)}throw new Error(`Unexpected schema type: ${E}`)}function p(E){const y={};for(const x in E){const w=E[x],k=b(w.type);k!=null&&w.args&&(w.type=k,w.args=l(w.args),y[x]=w)}return y}function d(E){const y={};for(const x in E){const w=E[x],k=b(w.type);k!=null&&(w.type=k,y[x]=w)}return y}function m(E){const y=[];for(const x of E){const w=b(x);w!=null&&y.push(w)}return y}function b(E){if(mn(E)){const y=b(E.ofType);return y!=null?new lr(y):null}else if(_t(E)){const y=b(E.ofType);return y!=null?new Pt(y):null}else if(Rl(E)){let y=n[E.name];return y===void 0&&(y=BJ(E)?$J(E):c(E),r[y.name]=n[E.name]=y),y!=null?r[y.name]:null}return null}}function Ib(e,t,n=null,r=null){if(t==null)return t;const i=Mu(e);if(ai(i))return n!=null?n(i,t):t;if(mn(i))return yJ(t).map(o=>Ib(i.ofType,o,n,r));if(nn(i)){const o=i.getFields(),l={};for(const c in t){const p=o[c];p!=null&&(l[c]=Ib(p.type,t[c],n,r))}return r!=null?r(i,l):l}}function Fb(e,t){return Ib(e,t,(n,r)=>{try{return n.serialize(r)}catch{return r}})}function HJ(e,t){return Ib(e,t,(n,r)=>{try{return n.parseValue(r)}catch{return r}})}function GJ(e,t={}){const n=g5(m5(TC(h5(YJ(TC(h5(e.getTypeMap(),e,Fb),e,t,c=>ai(c)),e,t),e,HJ),e,t,c=>!ai(c)),e,t),e,t),r=e.getDirectives(),i=WJ(r,e,t),{typeMap:o,directives:l}=zJ(n,i);return new mf({...e.toConfig(),query:bp(o,bp(n,e.getQueryType())),mutation:bp(o,bp(n,e.getMutationType())),subscription:bp(o,bp(n,e.getSubscriptionType())),types:Object.values(o),directives:l})}function TC(e,t,n,r=()=>!0){const i={};for(const o in e)if(!o.startsWith("__")){const l=e[o];if(l==null||!r(l)){i[o]=l;continue}const c=KJ(t,n,o);if(c==null){i[o]=l;continue}const p=c(l,t);if(p===void 0){i[o]=l;continue}i[o]=p}return i}function YJ(e,t,n){const r=tee(n);return r?TC(e,t,{[zt.ENUM_TYPE]:i=>{const o=i.toConfig(),l=o.values,c={};for(const p in l){const d=l[p],m=r(d,i.name,t,p);if(m===void 0)c[p]=d;else if(Array.isArray(m)){const[b,E]=m;c[b]=E===void 0?d:E}else m!==null&&(c[p]=m)}return jb(new Hi({...o,values:c}))}},i=>Wn(i)):e}function h5(e,t,n){const r=g5(e,t,{[zt.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;const o=Pb(e,i.type);if(o!=null)return{...i,defaultValue:n(o,i.defaultValue)}}});return m5(r,t,{[zt.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;const o=Pb(r,i.type);if(o!=null)return{...i,defaultValue:n(o,i.defaultValue)}}})}function Pb(e,t){if(mn(t)){const n=Pb(e,t.ofType);return n!=null?new lr(n):null}else if(_t(t)){const n=Pb(e,t.ofType);return n!=null?new Pt(n):null}else if(Rl(t)){const n=e[t.name];return n??null}return null}function m5(e,t,n){const r={};for(const i in e)if(!i.startsWith("__")){const o=e[i];if(!At(o)&&!Rt(o)&&!nn(o)){r[i]=o;continue}const l=ZJ(t,n,i);if(l==null){r[i]=o;continue}const c=o.toConfig(),p=c.fields,d={};for(const m in p){const b=p[m],E=l(b,m,i,t);if(E===void 0)d[m]=b;else if(Array.isArray(E)){const[y,x]=E;x.astNode!=null&&(x.astNode={...x.astNode,name:{...x.astNode.name,value:y}}),d[y]=x===void 0?b:x}else E!==null&&(d[m]=E)}At(o)?r[i]=jb(new si({...c,fields:d})):Rt(o)?r[i]=jb(new ao({...c,fields:d})):r[i]=jb(new so({...c,fields:d}))}return r}function g5(e,t,n){const r={};for(const i in e)if(!i.startsWith("__")){const o=e[i];if(!At(o)&&!Rt(o)){r[i]=o;continue}const l=JJ(n);if(l==null){r[i]=o;continue}const c=o.toConfig(),p=c.fields,d={};for(const m in p){const b=p[m],E=b.args;if(E==null){d[m]=b;continue}const y=Object.keys(E);if(!y.length){d[m]=b;continue}const x={};for(const w of y){const k=E[w],N=l(k,m,i,t);if(N===void 0)x[w]=k;else if(Array.isArray(N)){const[D,A]=N;x[D]=A}else N!==null&&(x[w]=N)}d[m]={...b,args:x}}At(o)?r[i]=new si({...c,fields:d}):Rt(o)?r[i]=new ao({...c,fields:d}):r[i]=new so({...c,fields:d})}return r}function WJ(e,t,n){const r=eee(n);if(r==null)return e.slice();const i=[];for(const o of e){const l=r(o,t);l===void 0?i.push(o):l!==null&&i.push(l)}return i}function QJ(e,t){const n=e.getType(t),r=[zt.TYPE];return At(n)?(r.push(zt.COMPOSITE_TYPE,zt.OBJECT_TYPE),t===e.getQueryType()?.name?r.push(zt.ROOT_OBJECT,zt.QUERY):t===e.getMutationType()?.name?r.push(zt.ROOT_OBJECT,zt.MUTATION):t===e.getSubscriptionType()?.name&&r.push(zt.ROOT_OBJECT,zt.SUBSCRIPTION)):nn(n)?r.push(zt.INPUT_OBJECT_TYPE):Rt(n)?r.push(zt.COMPOSITE_TYPE,zt.ABSTRACT_TYPE,zt.INTERFACE_TYPE):ar(n)?r.push(zt.COMPOSITE_TYPE,zt.ABSTRACT_TYPE,zt.UNION_TYPE):Wn(n)?r.push(zt.ENUM_TYPE):Oi(n)&&r.push(zt.SCALAR_TYPE),r}function KJ(e,t,n){const r=QJ(e,n);let i;const o=[...r];for(;!i&&o.length>0;){const l=o.pop();i=t[l]}return i??null}function XJ(e,t){const n=e.getType(t),r=[zt.FIELD];return At(n)?(r.push(zt.COMPOSITE_FIELD,zt.OBJECT_FIELD),t===e.getQueryType()?.name?r.push(zt.ROOT_FIELD,zt.QUERY_ROOT_FIELD):t===e.getMutationType()?.name?r.push(zt.ROOT_FIELD,zt.MUTATION_ROOT_FIELD):t===e.getSubscriptionType()?.name&&r.push(zt.ROOT_FIELD,zt.SUBSCRIPTION_ROOT_FIELD)):Rt(n)?r.push(zt.COMPOSITE_FIELD,zt.INTERFACE_FIELD):nn(n)&&r.push(zt.INPUT_OBJECT_FIELD),r}function ZJ(e,t,n){const r=XJ(e,n);let i;const o=[...r];for(;!i&&o.length>0;){const l=o.pop();i=t[l]}return i??null}function JJ(e){const t=e[zt.ARGUMENT];return t??null}function eee(e){const t=e[zt.DIRECTIVE];return t??null}function tee(e){const t=e[zt.ENUM_VALUE];return t??null}function jb(e){if(At(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode={...t.astNode,kind:K.OBJECT_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:K.OBJECT_TYPE_EXTENSION,fields:void 0}))),new si(t)}else if(Rt(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode={...t.astNode,kind:K.INTERFACE_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:K.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new ao(t)}else if(nn(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode={...t.astNode,kind:K.INPUT_OBJECT_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:K.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new so(t)}else if(Wn(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.values){const i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode={...t.astNode,values:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,values:void 0}))),new Hi(t)}else return e}function vg(e,t=!1,n=!1,r=!1){let i,o=!0;const l=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else o=!1;return!1});if(r&&l)return new Array(i).fill(null).map((d,m)=>vg(e.map(b=>b[m]),t,n,r));if(o)return e.flat(1);let c,p;t&&(p=e.find(d=>v5(d)),c==null&&(c={}),p&&Object.setPrototypeOf(c,Object.create(Object.getPrototypeOf(p))));for(const d of e)if(v5(d)){if(p){const m=Object.getPrototypeOf(c),b=Object.getPrototypeOf(d);if(b)for(const E of Object.getOwnPropertyNames(b)){const y=Object.getOwnPropertyDescriptor(b,E);bJ(y)&&Object.defineProperty(m,E,y)}}for(const m in d)c==null&&(c={}),m in c?c[m]=vg([c[m],d[m]],t,n,r):c[m]=d[m]}else Array.isArray(d)&&Array.isArray(c)?c=vg([c,d],t,n,r):c=d;return c}function v5(e){return e&&typeof e=="object"&&!Array.isArray(e)}function xC(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}function Vb(e,t,n){return n==null||t==null?!1:t===n?!0:Qr(t)&&Qr(n)?nm(e,t,n):!1}function nee(e){const t=[],n=[];let r=!0;const i=m=>{t.length!==0?t.shift()({value:m,done:!1}):n.push({value:m,done:!1})},o=m=>{t.length!==0?t.shift()({value:{errors:[m]},done:!1}):n.push({value:{errors:[m]},done:!1})},l=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(m=>{if(n.length!==0){const b=n.shift();m(b)}else t.push(m)}),p=e.subscribe({next(m){return i(m)},error(m){return o(m)},complete(){return l()}}),d=()=>{if(r){r=!1,p.unsubscribe();for(const m of t)m({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),xo({value:void 0,done:!0})},throw(m){return d(),Bf(m)},[Symbol.asyncIterator](){return this}}}class Ub extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){const r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}}const ree=new To({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[lt.FRAGMENT_SPREAD,lt.INLINE_FRAGMENT],args:{if:{type:new Pt(Zn),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Xn,description:"Unique name"}}}),iee=new To({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[lt.FIELD],args:{if:{type:new Pt(Zn),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Xn,description:"Unique name"},initialCount:{defaultValue:0,type:rm,description:"Number of items to return immediately"}}});function Ep(e,t,n,r,i,o,l,c){for(const p of i.selections)switch(p.kind){case K.FIELD:{if(!CC(n,p))continue;o.add(oee(p),p);break}case K.INLINE_FRAGMENT:{if(!CC(n,p)||!y5(e,p,r))continue;const d=b5(n,p);if(d){const m=new Ub;Ep(e,t,n,r,p.selectionSet,m,l,c),l.push({label:d.label,fields:m})}else Ep(e,t,n,r,p.selectionSet,o,l,c);break}case K.FRAGMENT_SPREAD:{const d=p.name.value;if(!CC(n,p))continue;const m=b5(n,p);if(c.has(d)&&!m)continue;const b=t[d];if(!b||!y5(e,b,r))continue;if(m||c.add(d),m){const E=new Ub;Ep(e,t,n,r,b.selectionSet,E,l,c),l.push({label:m.label,fields:E})}else Ep(e,t,n,r,b.selectionSet,o,l,c);break}}}function wC(e,t,n,r,i){const o=new Ub,l=[];return Ep(e,t,n,r,i,o,l,new Set),{fields:o,patches:l}}function CC(e,t){return!(Ps(dy,t,e)?.if===!0||Ps(fy,t,e)?.if===!1)}function y5(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=yi(e,r);return i===n?!0:sr(i)?e.getPossibleTypes(i).includes(n):!1}function oee(e){return e.alias?e.alias.value:e.name.value}function b5(e,t){const n=Ps(ree,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}const aee=AJ(function(t,n,r,i,o){const l=new Ub,c=new Set,p=[],d={fields:l,patches:p};for(const m of o)m.selectionSet&&Ep(t,n,r,i,m.selectionSet,l,p,c);return d});function see(e,t){const n=WE(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}const $f=ps(function(t){return see(t.document,t.operationName)});function zf(e){return e?.[Symbol.asyncIterator]!=null}function Sp(e,t,n){return{prev:e,key:t,typename:n}}function Si(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function lee(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function _C(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n<t.length;n++)e[n]=_C(e[n],t[n]);else for(n in t){if(n==="__proto__"||n==="constructor"||n==="prototype")break;e[n]=_C(e[n],t[n])}return e}return t}function qb(e,t,n){t.split&&(t=t.split("."));for(var r=0,i=t.length,o=e,l,c;r<i&&(c=""+t[r++],!(c==="__proto__"||c==="constructor"||c==="prototype"));)o=o[c]=r===i?_C(o[c],n):typeof(l=o[c])==typeof t?l:t[r]*0!==0||~(""+t[r]).indexOf(".")?{}:[]}function E5({incrementalResult:e,executionResult:t}){const n=["data",...e.path??[]];if(e.items)for(const r of e.items)qb(t,n,r),n[n.length-1]++;e.data&&qb(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&qb(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(r=>{E5({incrementalResult:r,executionResult:t})})}const NC=ps(function(t){return uO(mJ(t,pn))});function AC({executionRequest:e,excludeQuery:t,printFn:n=NC}){return{query:t?void 0:n(e.document),variables:(e.variables&&Object.keys(e.variables).length)>0?e.variables:void 0,operationName:e.operationName?e.operationName:void 0,extensions:e.extensions&&Object.keys(e.extensions).length>0?e.extensions:void 0}}const Bl={get dispose(){return Symbol.dispose||Symbol.for("dispose")},get asyncDispose(){return Symbol.asyncDispose||Symbol.for("asyncDispose")}};function wo(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Hf(e){return wo(e)==="object"}function uee(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function S5(e,t){return e.length<124?e:t}const cee="graphql-transport-ws";var xa=(e=>(e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",e))(xa||{}),wa=(e=>(e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete",e))(wa||{});function T5(e){if(!Hf(e))throw new Error(`Message is expected to be an object, but got ${wo(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${wo(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":{if(e.payload!=null&&!Hf(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case"subscribe":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${wo(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Hf(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${wo(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${wo(e.payload.query)}`);if(e.payload.variables!=null&&!Hf(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${wo(e.payload.variables)}`);if(e.payload.operationName!=null&&wo(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${wo(e.payload.operationName)}`);if(e.payload.extensions!=null&&!Hf(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${wo(e.payload.extensions)}`);break}case"next":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${wo(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Hf(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${wo(e.payload)}`);break}case"error":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${wo(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!uee(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case"complete":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${wo(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function fee(e,t){return T5(typeof e=="string"?JSON.parse(e,t):e)}function yg(e,t){return T5(e),JSON.stringify(e,t)}function dee(e){const{url:t,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:l=0,disablePong:c,connectionAckWaitTimeout:p=0,retryAttempts:d=5,retryWait:m=async function(B){const ne=Math.pow(2,B);await new Promise(re=>setTimeout(re,ne*1e3+Math.floor(Math.random()*2700+300)))},shouldRetry:b=OC,on:E,webSocketImpl:y,generateID:x=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,B=>{const ne=Math.random()*16|0;return(B=="x"?ne:ne&3|8).toString(16)})},jsonMessageReplacer:w,jsonMessageReviver:k}=e;let N;if(y){if(!hee(y))throw new Error("Invalid WebSocket implementation provided");N=y}else typeof WebSocket<"u"?N=WebSocket:typeof global<"u"?N=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(N=window.WebSocket||window.MozWebSocket);if(!N)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const D=N,A=(()=>{const Q=(()=>{const ne={};return{on(re,se){return ne[re]=se,()=>{delete ne[re]}},emit(re){"id"in re&&ne[re.id]?.(re)}}})(),B={connecting:E?.connecting?[E.connecting]:[],opened:E?.opened?[E.opened]:[],connected:E?.connected?[E.connected]:[],ping:E?.ping?[E.ping]:[],pong:E?.pong?[E.pong]:[],message:E?.message?[Q.emit,E.message]:[Q.emit],closed:E?.closed?[E.closed]:[],error:E?.error?[E.error]:[]};return{onMessage:Q.on,on(ne,re){const se=B[ne];return se.push(re),()=>{se.splice(se.indexOf(re),1)}},emit(ne,...re){for(const se of[...B[ne]])se(...re)}}})();function C(Q){const B=[A.on("error",ne=>{B.forEach(re=>re()),Q(ne)}),A.on("closed",ne=>{B.forEach(re=>re()),Q(ne)})]}let M,j=0,P,F=!1,V=0,$=!1;async function X(){clearTimeout(P);const[Q,B]=await(M??(M=new Promise((se,fe)=>(async()=>{if(F){if(await m(V),!j)return M=void 0,fe({code:1e3,reason:"All Subscriptions Gone"});V++}A.emit("connecting",F);const Z=new D(typeof t=="function"?await t():t,cee);let ge,ae;function pe(){isFinite(l)&&l>0&&(clearTimeout(ae),ae=setTimeout(()=>{Z.readyState===D.OPEN&&(Z.send(yg({type:wa.Ping})),A.emit("ping",!1,void 0))},l))}C(he=>{M=void 0,clearTimeout(ge),clearTimeout(ae),fe(he),he instanceof x5&&(Z.close(4499,"Terminated"),Z.onerror=null,Z.onclose=null)}),Z.onerror=he=>A.emit("error",he),Z.onclose=he=>A.emit("closed",he),Z.onopen=async()=>{try{A.emit("opened",Z);const he=typeof n=="function"?await n():n;if(Z.readyState!==D.OPEN)return;Z.send(yg(he?{type:wa.ConnectionInit,payload:he}:{type:wa.ConnectionInit},w)),isFinite(p)&&p>0&&(ge=setTimeout(()=>{Z.close(xa.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},p)),pe()}catch(he){A.emit("error",he),Z.close(xa.InternalClientError,S5(he instanceof Error?he.message:String(he),"Internal client error"))}};let ce=!1;Z.onmessage=({data:he})=>{try{const Se=fee(he,k);if(A.emit("message",Se),Se.type==="ping"||Se.type==="pong"){A.emit(Se.type,!0,Se.payload),Se.type==="pong"?pe():c||(Z.send(yg(Se.payload?{type:wa.Pong,payload:Se.payload}:{type:wa.Pong})),A.emit("pong",!1,Se.payload));return}if(ce)return;if(Se.type!==wa.ConnectionAck)throw new Error(`First message cannot be of type ${Se.type}`);clearTimeout(ge),ce=!0,A.emit("connected",Z,Se.payload,F),F=!1,V=0,se([Z,new Promise((Ie,Ge)=>C(Ge))])}catch(Se){Z.onmessage=null,A.emit("error",Se),Z.close(xa.BadResponse,S5(Se instanceof Error?Se.message:String(Se),"Bad response"))}}})())));Q.readyState===D.CLOSING&&await B;let ne=()=>{};const re=new Promise(se=>ne=se);return[Q,ne,Promise.race([re.then(()=>{if(!j){const se=()=>Q.close(1e3,"Normal Closure");isFinite(o)&&o>0?P=setTimeout(()=>{Q.readyState===D.OPEN&&se()},o):se()}}),B])]}function J(Q){if(OC(Q)&&(pee(Q.code)||[xa.InternalServerError,xa.InternalClientError,xa.BadRequest,xa.BadResponse,xa.Unauthorized,xa.SubprotocolNotAcceptable,xa.SubscriberAlreadyExists,xa.TooManyInitialisationRequests].includes(Q.code)))throw Q;if($)return!1;if(OC(Q)&&Q.code===1e3)return j>0;if(!d||V>=d||!b(Q))throw Q;return F=!0}r||(async()=>{for(j++;;)try{const[,,Q]=await X();await Q}catch(Q){try{if(!J(Q))return}catch(B){return i?.(B)}}})();function ee(Q,B){const ne=x(Q);let re=!1,se=!1,fe=()=>{j--,re=!0};return(async()=>{for(j++;;)try{const[Z,ge,ae]=await X();if(re)return ge();const pe=A.onMessage(ne,ce=>{switch(ce.type){case wa.Next:{B.next(ce.payload);return}case wa.Error:{se=!0,re=!0,B.error(ce.payload),fe();return}case wa.Complete:{re=!0,fe();return}}});Z.send(yg({id:ne,type:wa.Subscribe,payload:Q},w)),fe=()=>{!re&&Z.readyState===D.OPEN&&Z.send(yg({id:ne,type:wa.Complete},w)),j--,re=!0,ge()},await ae.finally(pe);return}catch(Z){if(!J(Z))return}})().then(()=>{se||B.complete()}).catch(Z=>{B.error(Z)}),()=>{re||fe()}}return{on:A.on,subscribe:ee,iterate(Q){const B=[],ne={done:!1,error:null,resolve:()=>{}},re=ee(Q,{next(fe){B.push(fe),ne.resolve()},error(fe){ne.done=!0,ne.error=fe,ne.resolve()},complete(){ne.done=!0,ne.resolve()}}),se=async function*(){for(;;){for(B.length||await new Promise(Z=>ne.resolve=Z);B.length;)yield B.shift();if(ne.error)throw ne.error;if(ne.done)return}}();return se.throw=async fe=>(ne.done||(ne.done=!0,ne.error=fe,ne.resolve()),{done:!0,value:void 0}),se.return=async()=>(re(),{done:!0,value:void 0}),se},async dispose(){if($=!0,M){const[Q]=await M;Q.close(1e3,"Normal Closure")}},terminate(){M&&A.emit("closed",new x5)}}}class x5 extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function OC(e){return Hf(e)&&"code"in e&&"reason"in e}function pee(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function hee(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function mee(e){return"subscribe"in e}function gee(e){let t,n={},r=NC;if(mee(e))t=e;else{e.print&&(r=e.print);const o=e.headers,l=o?class extends Qs{constructor(p,d){super(p,d,{headers:o})}}:Qs;t=dee({url:e.url,webSocketImpl:l,lazy:e.lazy!==!1,lazyCloseTimeout:e.lazyCloseTimeout||0,connectionParams:()=>{const c=(typeof e.connectionParams=="function"?e.connectionParams():e.connectionParams)||{};return Object.assign(c,n)},on:e.on}),e.onClient&&e.onClient(t)}const i=function(l){const{extensions:c,operationType:p=$f(l).operation,info:d,signal:m=d?.signal}=l;c?.connectionParams&&typeof c?.connectionParams=="object"&&(n=Object.assign(n,c.connectionParams));const b=t.iterate(AC({executionRequest:l,printFn:r}));return b.return&&m&&m.addEventListener("abort",()=>{b.return?.()},{once:!0}),p==="subscription"?b:b.next().then(({value:E})=>E)};return Object.defineProperty(i,Bl.asyncDispose,{value:function(){return t.dispose()}}),i}const w5=!globalThis.Bun&&globalThis.process?.release?.name==="node",Bb=w5?new FinalizationRegistry(e=>e()):null,C5=Symbol("CONTROLLER_IN_SIGNAL");function vee(e){if(e.length===0)return;if(e.length===1)return e[0];if(!w5)return AbortSignal.any(e);for(const l of e)if(l.aborted)return l;const t=new AbortController,n=new WeakRef(t),r=[];let i=e.length;for(const l of e){let c=function(){n.deref()?.abort(p.deref()?.reason)};const p=new WeakRef(l);l.addEventListener("abort",c),r.push([p,c]),Bb.register(l,()=>!--i&&o(),l)}function o(){for(const[l,c]of r){const p=l.deref();p&&(p.removeEventListener("abort",c),Bb.unregister(p));const d=n.deref();d&&(Bb.unregister(d.signal),delete d.signal[C5])}}return t.signal.addEventListener("abort",o),Bb.register(t.signal,o,t.signal),t.signal[C5]=t,t.signal}var br={},_5;function yee(){return _5||(_5=1,br.fetch=globalThis.fetch,br.Headers=globalThis.Headers,br.Request=globalThis.Request,br.Response=globalThis.Response,br.FormData=globalThis.FormData,br.ReadableStream=globalThis.ReadableStream,br.WritableStream=globalThis.WritableStream,br.TransformStream=globalThis.TransformStream,br.CompressionStream=globalThis.CompressionStream,br.DecompressionStream=globalThis.DecompressionStream,br.TextDecoderStream=globalThis.TextDecoderStream,br.TextEncoderStream=globalThis.TextEncoderStream,br.Blob=globalThis.Blob,br.File=globalThis.File,br.crypto=globalThis.crypto,br.btoa=globalThis.btoa,br.TextEncoder=globalThis.TextEncoder,br.TextDecoder=globalThis.TextDecoder,br.URLPattern=globalThis.URLPattern,br.URL=globalThis.URL,br.URLSearchParams=globalThis.URLSearchParams,br.createFetch=()=>globalThis),br}var Gf=yee();/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var DC=function(e,t){return DC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},DC(e,t)};function bee(e,t){DC(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Tp(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function c(m){try{d(r.next(m))}catch(b){l(b)}}function p(m){try{d(r.throw(m))}catch(b){l(b)}}function d(m){m.done?o(m.value):i(m.value).then(c,p)}d((r=r.apply(e,[])).next())})}function rc(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(d){return function(m){return p([d,m])}}function p(d){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(m){d=[6,m],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function xp(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bg(e){return this instanceof bg?(this.v=e,this):new bg(e)}function Eee(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},l("next"),l("throw"),l("return"),i[Symbol.asyncIterator]=function(){return this},i;function l(E){r[E]&&(i[E]=function(y){return new Promise(function(x,w){o.push([E,y,x,w])>1||c(E,y)})})}function c(E,y){try{p(r[E](y))}catch(x){b(o[0][3],x)}}function p(E){E.value instanceof bg?Promise.resolve(E.value.v).then(d,m):b(o[0][2],E)}function d(E){c("next",E)}function m(E){c("throw",E)}function b(E,y){E(y),o.shift(),o.length&&c(o[0][0],o[0][1])}}var N5=function(e){bee(t,e);function t(n){var r=e.call(this,n)||this;return Object.defineProperty(r,"name",{value:"RepeaterOverflowError",enumerable:!1}),typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(r,r.constructor.prototype):r.__proto__=r.constructor.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(r,r.constructor),r}return t}(Error);(function(){function e(t){if(t<0)throw new RangeError("Capacity may not be less than 0");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),e.prototype.add=function(t){if(this.full)throw new Error("Buffer full");this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e})(),function(){function e(t){if(t<1)throw new RangeError("Capacity may not be less than 1");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(t){for(;this._q.length>=this._c;)this._q.shift();this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}(),function(){function e(t){if(t<1)throw new RangeError("Capacity may not be less than 1");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(t){this._q.length<this._c&&this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}();function kC(e){e!=null&&typeof e.then=="function"&&e.then(Hb,Hb)}var RC=0,A5=1,Yf=2,$b=3,MC=4,zb=1024,Hb=function(){};function wp(e){var t=e.err,n=Promise.resolve(e.execution).then(function(r){if(t!=null)throw t;return r});return e.err=void 0,e.execution=n.then(function(){},function(){}),e.pending===void 0?n:e.pending.then(function(){return n})}function Wf(e,t){var n=e.state>=$b;return Promise.resolve(t).then(function(r){return!n&&e.state>=MC?wp(e).then(function(i){return{value:i,done:!0}}):{value:r,done:n}})}function LC(e,t){var n,r;if(!(e.state>=Yf))if(e.state=Yf,e.onnext(),e.onstop(),e.err==null&&(e.err=t),e.pushes.length===0&&(typeof e.buffer>"u"||e.buffer.empty))Eg(e);else try{for(var i=xp(e.pushes),o=i.next();!o.done;o=i.next()){var l=o.value;l.resolve()}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function Eg(e){var t,n;if(!(e.state>=$b)){e.state<Yf&&LC(e),e.state=$b,e.buffer=void 0;try{for(var r=xp(e.nexts),i=r.next();!i.done;i=r.next()){var o=i.value,l=e.pending===void 0?wp(e):e.pending.then(function(){return wp(e)});o.resolve(Wf(e,l))}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.pushes=[],e.nexts=[]}}function O5(e){e.state>=MC||(e.state<$b&&Eg(e),e.state=MC)}function See(e,t){if(kC(t),e.pushes.length>=zb)throw new N5("No more than "+zb+" pending calls to push are allowed on a single repeater.");if(e.state>=Yf)return Promise.resolve(void 0);var n=e.pending===void 0?Promise.resolve(t):e.pending.then(function(){return t});n=n.catch(function(p){e.state<Yf&&(e.err=p),O5(e)});var r;if(e.nexts.length){var i=e.nexts.shift();i.resolve(Wf(e,n)),e.nexts.length?r=Promise.resolve(e.nexts[0].value):typeof e.buffer<"u"&&!e.buffer.full?r=Promise.resolve(void 0):r=new Promise(function(p){return e.onnext=p})}else typeof e.buffer<"u"&&!e.buffer.full?(e.buffer.add(n),r=Promise.resolve(void 0)):r=new Promise(function(p){return e.pushes.push({resolve:p,value:n})});var o=!0,l={},c=r.catch(function(p){if(o)throw p});return l.then=function(p,d){return o=!1,Promise.prototype.then.call(r,p,d)},l.catch=function(p){return o=!1,Promise.prototype.catch.call(r,p)},l.finally=r.finally.bind(r),e.pending=n.then(function(){return c}).catch(function(p){e.err=p,O5(e)}),l}function Tee(e){var t=LC.bind(null,e),n=new Promise(function(r){return e.onstop=r});return t.then=n.then.bind(n),t.catch=n.catch.bind(n),t.finally=n.finally.bind(n),t}function xee(e){if(!(e.state>=A5)){e.state=A5;var t=See.bind(null,e),n=Tee(e);e.execution=new Promise(function(r){return r(e.executor(t,n))}),e.execution.catch(function(){return LC(e)})}}var Gb=new WeakMap,Cp=function(){function e(t,n){Gb.set(this,{executor:t,buffer:n,err:void 0,state:RC,pushes:[],nexts:[],pending:void 0,execution:void 0,onnext:Hb,onstop:Hb})}return e.prototype.next=function(t){kC(t);var n=Gb.get(this);if(n===void 0)throw new Error("WeakMap error");if(n.nexts.length>=zb)throw new N5("No more than "+zb+" pending calls to next are allowed on a single repeater.");if(n.state<=RC&&xee(n),n.onnext(t),typeof n.buffer<"u"&&!n.buffer.empty){var r=Wf(n,n.buffer.remove());if(n.pushes.length){var i=n.pushes.shift();n.buffer.add(i.value),n.onnext=i.resolve}return r}else if(n.pushes.length){var o=n.pushes.shift();return n.onnext=o.resolve,Wf(n,o.value)}else if(n.state>=Yf)return Eg(n),Wf(n,wp(n));return new Promise(function(l){return n.nexts.push({resolve:l,value:t})})},e.prototype.return=function(t){kC(t);var n=Gb.get(this);if(n===void 0)throw new Error("WeakMap error");return Eg(n),n.execution=Promise.resolve(n.execution).then(function(){return t}),Wf(n,wp(n))},e.prototype.throw=function(t){var n=Gb.get(this);if(n===void 0)throw new Error("WeakMap error");return n.state<=RC||n.state>=Yf||typeof n.buffer<"u"&&!n.buffer.empty?(Eg(n),n.err==null&&(n.err=t),Wf(n,wp(n))):this.next(Promise.reject(t))},e.prototype[Symbol.asyncIterator]=function(){return this},e.race=wee,e.merge=Cee,e.zip=_ee,e.latest=Nee,e}();function Yb(e,t){var n,r,i=[],o=function(d){d!=null&&typeof d[Symbol.asyncIterator]=="function"?i.push(d[Symbol.asyncIterator]()):d!=null&&typeof d[Symbol.iterator]=="function"?i.push(d[Symbol.iterator]()):i.push(function(){return Eee(this,arguments,function(){return rc(this,function(E){switch(E.label){case 0:return t.yieldValues?[4,bg(d)]:[3,3];case 1:return[4,E.sent()];case 2:E.sent(),E.label=3;case 3:return t.returnValues?[4,bg(d)]:[3,5];case 4:return[2,E.sent()];case 5:return[2]}})})}())};try{for(var l=xp(e),c=l.next();!c.done;c=l.next()){var p=c.value;o(p)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return i}function wee(e){var t=this,n=Yb(e,{returnValues:!0});return new Cp(function(r,i){return Tp(t,void 0,void 0,function(){var o,l,c,p,d,m;return rc(this,function(b){switch(b.label){case 0:if(!n.length)return i(),[2];l=!1,i.then(function(){o(),l=!0}),b.label=1;case 1:b.trys.push([1,,5,7]),p=void 0,d=0,m=function(){var E,y,x,w,k,N;return rc(this,function(D){switch(D.label){case 0:E=d;try{for(y=(k=void 0,xp(n)),x=y.next();!x.done;x=y.next())w=x.value,Promise.resolve(w.next()).then(function(A){A.done?(i(),c===void 0&&(c=A)):d===E&&(d++,o(A))},function(A){return i(A)})}catch(A){k={error:A}}finally{try{x&&!x.done&&(N=y.return)&&N.call(y)}finally{if(k)throw k.error}}return[4,new Promise(function(A){return o=A})];case 1:return p=D.sent(),p===void 0?[3,3]:[4,r(p.value)];case 2:D.sent(),D.label=3;case 3:return[2]}})},b.label=2;case 2:return l?[3,4]:[5,m()];case 3:return b.sent(),[3,2];case 4:return[2,c&&c.value];case 5:return i(),[4,Promise.race(n.map(function(E){return E.return&&E.return()}))];case 6:return b.sent(),[7];case 7:return[2]}})})})}function Cee(e){var t=this,n=Yb(e,{yieldValues:!0});return new Cp(function(r,i){return Tp(t,void 0,void 0,function(){var o,l,c,p=this;return rc(this,function(d){switch(d.label){case 0:if(!n.length)return i(),[2];o=[],l=!1,i.then(function(){var m,b;l=!0;try{for(var E=xp(o),y=E.next();!y.done;y=E.next()){var x=y.value;x()}}catch(w){m={error:w}}finally{try{y&&!y.done&&(b=E.return)&&b.call(E)}finally{if(m)throw m.error}}}),d.label=1;case 1:return d.trys.push([1,,3,4]),[4,Promise.all(n.map(function(m,b){return Tp(p,void 0,void 0,function(){var E,y;return rc(this,function(x){switch(x.label){case 0:x.trys.push([0,,6,9]),x.label=1;case 1:return l?[3,5]:(Promise.resolve(m.next()).then(function(w){return o[b](w)},function(w){return i(w)}),[4,new Promise(function(w){o[b]=w})]);case 2:return E=x.sent(),E===void 0?[3,4]:E.done?(c=E,[2]):[4,r(E.value)];case 3:x.sent(),x.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return y=m.return,y?[4,m.return()]:[3,8];case 7:y=x.sent(),x.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return d.sent(),[2,c&&c.value];case 3:return i(),[7];case 4:return[2]}})})})}function _ee(e){var t=this,n=Yb(e,{returnValues:!0});return new Cp(function(r,i){return Tp(t,void 0,void 0,function(){var o,l,c,p;return rc(this,function(d){switch(d.label){case 0:if(!n.length)return i(),[2,[]];l=!1,i.then(function(){o(),l=!0}),d.label=1;case 1:d.trys.push([1,,6,8]),d.label=2;case 2:return l?[3,5]:(Promise.all(n.map(function(m){return m.next()})).then(function(m){return o(m)},function(m){return i(m)}),[4,new Promise(function(m){return o=m})]);case 3:return c=d.sent(),c===void 0?[2]:(p=c.map(function(m){return m.value}),c.some(function(m){return m.done})?[2,p]:[4,r(p)]);case 4:return d.sent(),[3,2];case 5:return[3,8];case 6:return i(),[4,Promise.all(n.map(function(m){return m.return&&m.return()}))];case 7:return d.sent(),[7];case 8:return[2]}})})})}function Nee(e){var t=this,n=Yb(e,{yieldValues:!0,returnValues:!0});return new Cp(function(r,i){return Tp(t,void 0,void 0,function(){var o,l,c,p,d,m=this;return rc(this,function(b){switch(b.label){case 0:if(!n.length)return i(),[2,[]];l=[],c=!1,i.then(function(){var E,y;o();try{for(var x=xp(l),w=x.next();!w.done;w=x.next()){var k=w.value;k()}}catch(N){E={error:N}}finally{try{w&&!w.done&&(y=x.return)&&y.call(x)}finally{if(E)throw E.error}}c=!0}),b.label=1;case 1:return b.trys.push([1,,5,7]),Promise.all(n.map(function(E){return E.next()})).then(function(E){return o(E)},function(E){return i(E)}),[4,new Promise(function(E){return o=E})];case 2:return p=b.sent(),p===void 0?[2]:(d=p.map(function(E){return E.value}),p.every(function(E){return E.done})?[2,d]:[4,r(d.slice())]);case 3:return b.sent(),[4,Promise.all(n.map(function(E,y){return Tp(m,void 0,void 0,function(){var x;return rc(this,function(w){switch(w.label){case 0:if(p[y].done)return[2,p[y].value];w.label=1;case 1:return c?[3,4]:(Promise.resolve(E.next()).then(function(k){return l[y](k)},function(k){return i(k)}),[4,new Promise(function(k){return l[y]=k})]);case 2:return x=w.sent(),x===void 0?[2,p[y].value]:x.done?[2,x.value]:(d[y]=x.value,[4,r(d.slice())]);case 3:return w.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,b.sent()];case 5:return i(),[4,Promise.all(n.map(function(E){return E.return&&E.return()}))];case 6:return b.sent(),[7];case 7:return[2]}})})})}async function Aee(e,t){let n=e.headers["content-type"];if(!n||!~n.indexOf("multipart/"))return e;let r=n.indexOf("boundary="),i="-";if(~r){let o=r+9,l=n.indexOf(";",o);i=n.slice(o,l>-1?l:void 0).trim().replace(/"/g,"")}return async function*(o,l,c){let p,d,m,b=Buffer.byteLength(l),E=Buffer.alloc(0),y=[];e:for await(let x of o){p=E.byteLength,E=Buffer.concat([E,x]);let w=x.indexOf(l);for(~w?p+=w:p=E.indexOf(l),y=[];~p;){let k=E.subarray(0,p),N=E.subarray(p+b);if(d){let D=k.indexOf(`\r
\r
`)+4,A=k.lastIndexOf(`\r
`,D),C=!1,M=k.subarray(D,A>-1?void 0:A),j=String(k.subarray(0,D)).trim().split(`\r
`),P={},F=j.length;for(;m=j[--F];m=m.split(": "),P[m.shift().toLowerCase()]=m.join(": "));if(m=P["content-type"],m&&~m.indexOf("application/json"))try{M=JSON.parse(String(M)),C=!0}catch{}if(m={headers:P,body:M,json:C},yield m,N[0]===45&&N[1]===45)break e}else l=`\r
`+l,d=b+=2;E=N,p=E.indexOf(l)}y.length&&(yield y)}y.length&&(yield y)}(e,`--${i}`)}function Oee(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dee(e,t,n=""){if(!arguments.length)throw new TypeError("Argument 1 `value` is required.");if(typeof t!="function")throw new TypeError("Argument 2 `isExtractable` must be a function.");if(typeof n!="string")throw new TypeError("Argument 3 `path` must be a string.");const r=new Map,i=new Map;function o(l,c,p){if(t(l)){const b=i.get(l);return b?b.push(c):i.set(l,[c]),null}const d=Array.isArray(l)||typeof FileList<"u"&&l instanceof FileList,m=Oee(l);if(d||m){let b=r.get(l);const E=!b;if(E&&(b=d?[]:l instanceof Object?{}:Object.create(null),r.set(l,b)),!p.has(l)){const y=c?`${c}.`:"",x=new Set(p).add(l);if(d){let w=0;for(const k of l){const N=o(k,y+w++,x);E&&b.push(N)}}else for(const w in l){const k=o(l[w],y+w,x);E&&(b[w]=k)}}return b}return l}return{clone:o(e,n,new Set),files:i}}function kee(e){return typeof File<"u"&&e instanceof File||typeof Blob<"u"&&e instanceof Blob}function Ree(e){return typeof e.createReadStream=="function"}function D5(e){const t=[],n=e[Symbol.asyncIterator]();function r(){return Xt(()=>n.next(),({value:i,done:o})=>(i!=null&&t.push(i),o?t:r()))}return r()}function Mee(e,{File:t=Gf.File,FormData:n=Gf.FormData}){if(!e.variables)return JSON.stringify(e);const r=Object.assign({},e.variables),{clone:i,files:o}=Dee(r,E=>kee(E)||E?.promise||zf(E)||E?.then||typeof E?.arrayBuffer=="function","variables");if(o.size===0)return JSON.stringify(e);const l={},c=[];let p=0;for(const[E,y]of o)l[p]=y,c[p]=E,p++;const d=new n;d.append("operations",JSON.stringify({...e,variables:i})),d.append("map",JSON.stringify(l));function m(E,y){const x=y.toString();if(E!=null)return Xt(()=>E?.promise||E,w=>{const k=w.filename||w.name||w.path||`blob-${x}`;if(Lee(w))d.append(x,w,k);else{if(zf(w))return Xt(()=>D5(w),N=>{const D=new Uint8Array(N);d.append(x,new t([D],k),k)});if(Ree(w))return Xt(()=>D5(w.createReadStream()),N=>{const D=new Uint8Array(N);d.append(x,new t([D],k,{type:w.mimetype}),k)});d.append(x,new t([w],k),k)}})}const b=[];for(const E in c){const y=c[E],x=m(y,Number(E));cr(x)&&b.push(x)}return b.length>0?Promise.all(b).then(()=>d):d}function Lee(e){return typeof e.arrayBuffer=="function"}function k5(e,t){return e instanceof Me?e:e?.name==="TimeoutError"?Yt(e.message,{extensions:{http:{status:504,...t?.http||{}},code:"TIMEOUT_ERROR",...t||{}},originalError:e}):Yt(e.message,{extensions:t,originalError:e})}function Wb(e,t){return{errors:[k5(e,t)]}}function Iee(e){const n=new Gf.TextEncoder().encode(e);return Xt(()=>Gf.crypto.subtle.digest("SHA-256",n),r=>{let i="";for(const o of new Uint8Array(r))i+=o.toString(16).padStart(2,"0");return i})}const R5=`
`;function Fee(e){return e&&typeof e.getReader=="function"}function Pee(e,t,n){const r=e.body;if(!Fee(r))throw new Error("Response body is expected to be a readable stream but got; "+Ri(r));return new Cp((i,o)=>{const l=new Gf.TextDecoder,c=r.getReader();c.closed.then(o).catch(o),o.then(()=>{t?.abort(),r.locked&&c.releaseLock()}).catch(m=>{c.cancel(m)});let p="";async function d(){if(n?.aborted)return await i(Wb(n.reason)),o();if(!r?.locked)return o();const{done:m,value:b}=await c.read();if(m)return o();for(p+=typeof b=="string"?b:l.decode(b);;){const E=p.indexOf(R5);if(E===-1)break;const y=p.slice(0,E);p=p.slice(E+R5.length);const x=y.split("data:")[1]?.trim();if(x){const k=JSON.parse(x);await i(k.payload||k)}if(y.split("event:")[1]?.trim()==="complete")return o()}return d()}return d()})}function jee(e){return e!=null&&typeof e=="object"&&"pipe"in e}async function Vee(e){const t=e.body,n=e.headers.get("content-type")||"";let r;if(jee(t)){t.headers={"content-type":n};const l=await Aee(t);"next"in l&&(r=l)}else{const l=await W8(e);"next"in l&&(r=l)}const i={};return r==null?i:bC(r,l=>{if(l.json){const c=l.body;E5({incrementalResult:c,executionResult:i})}return i})}const M5=ps(function(t){return t.operation==="query"&&t.directives?.some(n=>n.name.value==="live")});function Uee({baseUrl:e="",body:t}){const n="https://dummyhostname.com",r=e.startsWith("http")?e:e?.startsWith("/")?`${n}${e}`:`${n}/${e}`,i=new URL(r);return t.query&&i.searchParams.set("query",t.query),t.variables&&Object.keys(t.variables).length>0&&i.searchParams.set("variables",JSON.stringify(t.variables)),t.operationName&&i.searchParams.set("operationName",t.operationName),t.extensions&&i.searchParams.set("extensions",JSON.stringify(t.extensions)),i.toString().replace(n,"")}function qee(e){const t=e?.print??NC;let n;const r=e?.serviceName,i=(l,c)=>{if(n||=new AbortController,n.signal.aborted)return Wb(n.signal.reason);const p=l.extensions?.fetch??e?.fetch??Gf.fetch;let d=l.extensions?.method||e?.method;const m=$f(l),b=m.operation;(e?.useGETForQueries||l.extensions?.useGETForQueries)&&b==="query"&&(d="GET");let E="application/graphql-response+json, application/json, multipart/mixed",y;b==="subscription"||M5(m)?(d||="GET",E="text/event-stream",y=new AbortController):d||="POST";const x=l.extensions?.endpoint||e?.endpoint||"/graphql",w={accept:E};if(e?.headers&&Object.assign(w,typeof e?.headers=="function"?e.headers(l):e?.headers),l.extensions?.headers){const{headers:P,...F}=l.extensions;Object.assign(w,P),l.extensions=F}const k=[n.signal],N=l.signal||l.info?.signal;if(N){if(N.aborted)return Wb(N.reason);k.push(N)}e?.timeout&&k.push(AbortSignal.timeout(e.timeout)),y&&k.push(y.signal);const D=vee(k),A={code:"DOWNSTREAM_SERVICE_ERROR",serviceName:r,request:{method:d}},C=t(l.document);let M=function(){return AC({executionRequest:l,excludeQuery:c,printFn:t})};e?.apq&&(M=function(){return Xt(()=>Iee(C),F=>{const V=l.extensions||{};return V.persistedQuery={version:1,sha256Hash:F},AC({executionRequest:{...l,extensions:V},excludeQuery:c,printFn:t})})});function j(P){return P.name==="AggregateError"?{errors:P.errors.map(F=>L5(F,{signal:D,endpoint:x,upstreamErrorExtensions:A}))}:{errors:[L5(P,{signal:D,endpoint:x,upstreamErrorExtensions:A})]}}return Xt(()=>M(),P=>Xt(()=>{switch(d){case"GET":{const F=Uee({baseUrl:x,body:P}),V={method:"GET",headers:w,signal:D};return e?.credentials!=null&&(V.credentials=e.credentials),A.request.url=F,p(F,V,l.context,l.info)}case"POST":return A.request.body=P,Xt(()=>Mee(P,{File:e?.File,FormData:e?.FormData}),F=>{typeof F=="string"&&!w["content-type"]&&(A.request.body=F,w["content-type"]="application/json");const V={method:"POST",body:F,headers:w,signal:D};return e?.credentials!=null&&(V.credentials=e.credentials),p(x,V,l.context,l.info)},j)}},F=>Xt(()=>{if(A.response||={},A.response.status=F.status,A.response.statusText=F.statusText,Object.defineProperty(A.response,"headers",{get(){return Object.fromEntries(F.headers.entries())}}),e?.retry!=null&&!F.status.toString().startsWith("2"))throw new Error(F.statusText||`Upstream HTTP Error: ${F.status}`);const V=F.headers.get("content-type");return V?.includes("text/event-stream")?Pee(F,y,D):V?.includes("multipart/mixed")?Vee(F):F.text()},V=>{if(typeof V=="string")if(A.response||={},A.response.body=V,V)try{const $=JSON.parse(V);return A.response.body=$,$.data==null&&($.errors==null||$.errors.length===0)?{errors:[Yt('Unexpected empty "data" and "errors" fields in result: '+V,{extensions:A})]}:Array.isArray($.errors)?{...$,errors:$.errors.map(({message:X,...J})=>Yt(X,{...J,extensions:{code:"DOWNSTREAM_SERVICE_ERROR",serviceName:r,...J.extensions||{}}}))}:$}catch($){return{errors:[Yt(`Unexpected response: ${JSON.stringify(V)}`,{extensions:A,originalError:$})]}}else return{errors:[Yt("No response returned",{extensions:A})]};else return V},j),j),j)};let o=i;if(e?.apq!=null&&(o=function(c){return Xt(()=>i(c,!0),p=>p.errors?.some(d=>d.extensions.code==="PERSISTED_QUERY_NOT_FOUND"||d.message==="PersistedQueryNotFound")?i(c,!1):p)}),e?.retry!=null){const l=o;o=function(p){let d,m=0;function b(){return n?.signal.aborted?Wb(n.signal.reason):(m++,m>e.retry?d??{errors:[Yt("No response returned from fetch")]}:Xt(()=>l(p),E=>(d=E,d?.errors?.length?b():d)))}return b()}}return Object.defineProperties(o,{[Bl.dispose]:{get(){return function(){n?.abort(e?.getDisposeReason?.()),n=void 0}}},[Bl.asyncDispose]:{get(){return function(){n?.abort(e?.getDisposeReason?.()),n=void 0}}}}),o}function L5(e,{signal:t,endpoint:n,upstreamErrorExtensions:r}){return typeof e=="string"?Yt(e,{extensions:r}):e.name==="GraphQLError"?e:e.name==="TypeError"&&e.message==="fetch failed"?Yt(`fetch failed to ${n}`,{extensions:r,originalError:e}):e.name==="AbortError"?k5(t?.reason||e,r):e.message?Yt(e.message,{extensions:r,originalError:e}):Yt("Unknown error",{extensions:r,originalError:e})}var Ca;(function(e){e.CONNECTION_INIT="connection_init",e.CONNECTION_ACK="connection_ack",e.CONNECTION_ERROR="connection_error",e.CONNECTION_KEEP_ALIVE="ka",e.START="start",e.STOP="stop",e.CONNECTION_TERMINATE="connection_terminate",e.DATA="data",e.ERROR="error",e.COMPLETE="complete"})(Ca||(Ca={}));function Bee(e,t,n){let r={},i=null;const o=(p=d=>console.error(d))=>{(i==null||i.readyState!==Qs.OPEN)&&(i=new t(e,"graphql-ws",{followRedirects:!0,headers:n?.headers,rejectUnauthorized:!1,skipUTF8Validation:!0}),i.onopen=()=>{let d={};switch(typeof n?.connectionParams){case"function":d=n?.connectionParams();break;case"object":d=n?.connectionParams;break}d=Object.assign(d,r),i.send(JSON.stringify({type:Ca.CONNECTION_INIT,payload:d}),m=>{m&&p(m)})},i.onerror=d=>{p(d.error)},i.onclose=()=>{i=null})},l=()=>{i!=null&&(i.send(JSON.stringify({type:Ca.CONNECTION_TERMINATE})),i.terminate(),i=null)},c=function(d){d.extensions?.connectionParams&&typeof d.extensions?.connectionParams=="object"&&(r=Object.assign(r,d.extensions.connectionParams));const m=Date.now().toString();return nee({subscribe(b){function E(y){b.error(y)}if(o(),i==null)throw new Error("WebSocket connection is not found!");return i.onmessage=y=>{const x=JSON.parse(y.data.toString("utf-8"));switch(x.type){case Ca.CONNECTION_ACK:{if(i==null)throw new Error("WebSocket connection is not found!");i.send(JSON.stringify({type:Ca.START,id:m,payload:{query:pn(d.document),variables:d.variables,operationName:d.operationName}}),w=>{w&&E(w)});break}case Ca.CONNECTION_ERROR:{b.error(x.payload);break}case Ca.CONNECTION_KEEP_ALIVE:break;case Ca.DATA:{b.next(x.payload);break}case Ca.COMPLETE:{i?.send(JSON.stringify({type:Ca.CONNECTION_TERMINATE}),w=>{w&&E(w)}),b.complete(),l();break}}},{unsubscribe:()=>{i?.readyState===Qs.OPEN&&i?.send(JSON.stringify({type:Ca.STOP,id:m})),l()}}}})};return c[Symbol.dispose]=l,c}function Ks(e){if(e instanceof Error)return e;if(typeof e=="object"&&e!=null&&"message"in e&&typeof e.message=="string"){let t;"cause"in e&&(t={cause:e.cause});const n=new Error(e.message,t);return"stack"in e&&typeof e.stack=="string"&&(n.stack=e.stack),"name"in e&&typeof e.name=="string"&&(n.name=e.name),n}return new Error(String(e))}function $ee(e){const t=e[Symbol.asyncIterator]();let n,r,i=!1;async function o(){if(i)return{value:void 0,done:!0};try{if(!n){if(r)return await r,await o();let p;r=new Promise(m=>{p=m});const d=await t.next();return d.done?(i=!0,await o()):(n=d.value[Symbol.asyncIterator](),r=void 0,p(),await o())}const l=n,c=await n.next();return c.done?(n===l&&(n=void 0),await o()):c}catch(l){throw i=!0,l}}return{next:o,async return(){return i=!0,await Promise.all([n?.return?.(),t.return?.()]),{value:void 0,done:!0}},async throw(l){throw i=!0,await Promise.all([n?.throw?.(l),t.throw?.(l)]),l},[Symbol.asyncIterator](){return this},async[Bl.asyncDispose](){i=!0,await Promise.all([n?.[Bl.asyncDispose]?.(),t?.[Bl.asyncDispose]?.()])}}}function I5(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}function F5(e,t,n){t?.throwIfAborted();const r=Object.create(null),i=[];for(const l in e){const c=Xt(()=>e[l],p=>{r[l]=p});cr(c)&&i.push(c)}if(!i.length)return r;const o=i.length===1?i[0]:Promise.all(i);return n?Promise.race([n,o]).then(()=>r):o.then(()=>r)}function zee(e,t,n,r){const i=[],o=r?.maxErrors;try{const l=Hee(e,t,n,c=>{if(o!=null&&i.length>=o)throw Yt("Too many errors processing variables, error limit reached. Execution aborted.");i.push(c)});if(i.length===0)return{coerced:l}}catch(l){i.push(l)}return{errors:i}}function Hee(e,t,n,r){const i={};for(const o of t){const l=o.variable.name.value,c=yi(e,o.type);if(!Di(c)){const d=pn(o.type);r(Yt(`Variable "$${l}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!s5(n,l)){if(o.defaultValue)i[l]=Ea(o.defaultValue,c);else if(_t(c)){const d=Ri(c);r(Yt(`Variable "$${l}" of required type "${d}" was not provided.`,{nodes:o}))}continue}const p=n[l];if(p===null&&_t(c)){const d=Ri(c);r(Yt(`Variable "$${l}" of non-null type "${d}" must not be null.`,{nodes:o}));continue}i[l]=VE(p,c,(d,m,b)=>{let E=`Variable "$${l}" got invalid value `+Ri(m);d.length>0&&(E+=` at "${l}${lee(d)}"`),r(Yt(E+"; "+b.message,{nodes:o,originalError:b}))})}return i}const Gee=NJ((e,t,n)=>aee(e.schema,e.fragments,e.variableValues,t,n));function Yee(e){const t=V5(e);return"schema"in t?P5(t):{errors:t.map(n=>(Object.defineProperty(n,"extensions",{value:{...n.extensions,http:{...n.extensions?.http||{},status:400}}}),n))}}function P5(e){return e.signal?.throwIfAborted(),Xt(()=>Kee(e),t=>{const n=j5(t,e.errors);return e.subsequentPayloads.size>0?{initialResult:{...n,hasNext:!0},subsequentResults:dte(e)}:n},t=>(e.signal?.throwIfAborted(),t.errors?e.errors.push(...t.errors):e.errors.push(t),j5(null,e.errors)))}function j5(e,t){return t.length===0?{data:e}:{errors:t,data:e}}const Wee=ps(function(t){const n=Object.create(null);for(const r of t.definitions)r.kind===K.FRAGMENT_DEFINITION&&(n[r.name.value]=r);return n});function V5(e){const{schema:t,document:n,rootValue:r,contextValue:i,variableValues:o,operationName:l,fieldResolver:c,typeResolver:p,subscribeFieldResolver:d,signal:m}=e;m?.throwIfAborted(),yy(t);const b=Wee(n);let E;for(const N of n.definitions)switch(N.kind){case K.OPERATION_DEFINITION:if(l==null){if(E!==void 0)return[Yt("Must provide operation name if query contains multiple operations.",{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})];E=N}else N.name?.value===l&&(E=N);break}if(E==null)return l!=null?[Yt(`Unknown operation named "${l}".`,{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})]:[Yt("Must provide an operation.",{extensions:{code:"OPERATION_RESOLUTION_FAILURE"}})];const y=E.variableDefinitions??[],x=zee(t,y,o??{},{maxErrors:50});if(x.errors)return x.errors;m?.throwIfAborted();let w,k;if(m){const N=new Set,D=JF();k=D.promise;const A=()=>{D.reject(m.reason),m.removeEventListener("abort",A)};m.addEventListener("abort",A,{once:!0}),k.catch(()=>{for(const C of N)C();N.clear()}),w=C=>{N.add(C)}}return{schema:t,fragments:b,rootValue:r,contextValue:i,operation:E,variableValues:x.coerced,fieldResolver:c??W5,typeResolver:p??nte,subscribeFieldResolver:d??W5,subsequentPayloads:new Set,errors:[],signal:m,onSignalAbort:w,signalPromise:k}}function Qee(e,t){return{...e,rootValue:t,subsequentPayloads:new Set,errors:[]}}function Kee(e){const{operation:t,schema:n,fragments:r,variableValues:i,rootValue:o}=e,l=Lb(n,t.operation,[t]);l==null&&Yt(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const{fields:c,patches:p}=wC(n,r,i,l,t.selectionSet),d=void 0;let m;t.operation==="mutation"?m=Xee(e,l,o,d,c):m=IC(e,l,o,d,c);for(const b of p){const{label:E,fields:y}=b;J5(e,l,o,y,E,d)}return m}function Xee(e,t,n,r,i){return a5(i,(o,[l,c])=>{const p=Sp(r,l,t.name);return e.signal?.throwIfAborted(),Xt(()=>U5(e,t,n,c,p),d=>(d===void 0||(o[l]=d),o))},Object.create(null))}function IC(e,t,n,r,i,o){const l=Object.create(null);let c=!1;try{for(const[p,d]of i){e.signal?.throwIfAborted();const m=Sp(r,p,t.name),b=U5(e,t,n,d,m,o);b!==void 0&&(l[p]=b,cr(b)&&(c=!0))}}catch(p){if(p!==e.signal?.reason&&c)return Xt(()=>F5(l,e.signal),()=>{throw p},()=>{throw p});throw p}return c?F5(l,e.signal,e.signalPromise):l}function U5(e,t,n,r,i,o){const l=o?.errors??e.errors,c=tP(e.schema,t,r[0]);if(!c)return;const p=c.type,d=c.resolve??e.fieldResolver,m=q5(e,c,r,t,i);try{e.signal?.throwIfAborted();const b=l5(c,r[0],e.variableValues),E=e.contextValue,y=d(n,b,E,m);let x;return cr(y)?x=y.then(w=>ic(e,p,r,m,i,w,o)):x=ic(e,p,r,m,i,y,o),cr(x)?x.then(void 0,w=>{if(w instanceof AggregateError){let D;for(let A of w.errors){A=Ks(A);const C=xr(A,r,Si(i));D=_a(C,p,l),Co(e,i,o)}return D}w=Ks(w);const k=xr(w,r,Si(i)),N=_a(k,p,l);return Co(e,i,o),N}):x}catch(b){if(b instanceof AggregateError){let w;for(let k of b.errors){k=Ks(k);const N=xr(k,r,Si(i));w=_a(N,p,l),Co(e,i,o)}return w}const E=Ks(b),y=xr(E,r,Si(i)),x=_a(y,p,l);return Co(e,i,o),x}}function q5(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues,signal:e.signal}}const B5="CRITICAL_ERROR";function _a(e,t,n){if(_t(t)||e.extensions?.[B5])throw e;return n.push(e),null}function ic(e,t,n,r,i,o,l){if(o instanceof Error)throw o;if(_t(t)){const c=ic(e,t.ofType,n,r,i,o,l);if(c===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return c}if(o==null)return null;if(mn(t))return Jee(e,t,n,r,i,o,l);if(ai(t))return ete(t,o);if(sr(t))return tte(e,t,n,r,i,o,l);if(At(t))return FC(e,t,n,r,i,o,l);console.assert(!1,"Cannot complete value of unexpected output type: "+Ri(t))}function $5(e,t,n){if(typeof n.key=="number")return;const r=Ps(iee,t[0],e.variableValues);if(r&&r.if!==!1)return I5(typeof r.initialCount=="number","initialCount must be a number"),I5(r.initialCount>=0,"initialCount must be a positive integer"),{initialCount:r.initialCount,label:typeof r.label=="string"?r.label:void 0}}async function Zee(e,t,n,r,i,o,l){e.signal?.throwIfAborted(),o.return&&e.onSignalAbort?.(()=>{o.return?.()});const c=l?.errors??e.errors,p=$5(e,n,i);let d=!1;const m=[];let b=0;for(;;){if(p&&typeof p.initialCount=="number"&&b>=p.initialCount){cte(b,o,e,n,r,t,i,p.label,l);break}const E=Sp(i,b,void 0);let y;try{if(y=await o.next(),y.done)break}catch(x){const w=Ks(x),k=xr(w,n,Si(E));m.push(_a(k,t,c));break}z5(y.value,m,c,e,t,n,r,E,l)&&(d=!0),b+=1}return d?Promise.all(m):m}function Jee(e,t,n,r,i,o,l){const c=t.ofType,p=l?.errors??e.errors;if(zf(o)){const x=o[Symbol.asyncIterator]();return Zee(e,c,n,r,i,x,l)}if(!_J(o))throw Yt(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const d=$5(e,n,i);let m=!1,b=l;const E=[];let y=0;for(const x of o){const w=Sp(i,y,void 0);if(d&&typeof d.initialCount=="number"&&y>=d.initialCount){b=lte(i,w,x,e,n,r,c,d.label,b),y++;continue}z5(x,E,p,e,c,n,r,w,l)&&(m=!0),y++}return m?Promise.all(E):E}function z5(e,t,n,r,i,o,l,c,p){try{let d;if(cr(e)?d=e.then(m=>ic(r,i,o,l,c,m,p)):d=ic(r,i,o,l,c,e,p),cr(d))return t.push(d.then(void 0,m=>{m=Ks(m);const b=xr(m,o,Si(c)),E=_a(b,i,n);return Co(r,c,p),E})),!0;t.push(d)}catch(d){const m=Ks(d),b=xr(m,o,Si(c)),E=_a(b,i,n);Co(r,c,p),t.push(E)}return!1}function ete(e,t){let n;try{n=e.serialize(t)}catch(r){throw r instanceof Me?new Error(r.message):r}if(n==null)throw new Error(`Expected \`${Ri(e)}.serialize(${Ri(t)})\` to return non-nullable value, returned: ${Ri(n)}`);return n}function tte(e,t,n,r,i,o,l){const c=t.resolveType??e.typeResolver,p=e.contextValue,d=c(o,p,r,t);return cr(d)?d.then(m=>FC(e,H5(m,e,t,n,r,o),n,r,i,o,l)):FC(e,H5(d,e,t,n,r,o),n,r,i,o,l)}function H5(e,t,n,r,i,o){if(e==null)throw Yt(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,{nodes:r});if(At(e)){if(Kv.major>=16)throw Yt("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");e=e.name}if(typeof e!="string")throw Yt(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${Ri(o)}, received "${Ri(e)}".`);const l=t.schema.getType(e);if(l==null)throw Yt(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!At(l))throw Yt(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,l))throw Yt(`Runtime Object type "${l.name}" is not a possible type for "${n.name}".`,{nodes:r});return l}function FC(e,t,n,r,i,o,l){if(t.isTypeOf){const c=t.isTypeOf(o,e.contextValue,r);if(cr(c))return c.then(p=>{if(!p)throw G5(t,o,n);return Y5(e,t,n,i,o,l)});if(!c)throw G5(t,o,n)}return Y5(e,t,n,i,o,l)}function G5(e,t,n){return Yt(`Expected value of type "${e.name}" but got: ${Ri(t)}.`,{nodes:n})}function Y5(e,t,n,r,i,o){const{fields:l,patches:c}=Gee(e,t,n),p=IC(e,t,i,r,l,o);for(const d of c){const{label:m,fields:b}=d;J5(e,t,i,b,m,r,o)}return p}const nte=function(e,t,n,r){if(o5(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),o=[];for(let l=0;l<i.length;l++){const c=i[l];if(c.isTypeOf){const p=c.isTypeOf(e,t,n);if(cr(p))o[l]=p;else if(p)return c.name}}if(o.length)return Promise.all(o).then(l=>{for(let c=0;c<l.length;c++)if(l[c])return i[c].name})},W5=function(e,t,n,r){if(o5(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function rte(e){const t=V5(e);if(!("schema"in t)){for(const r of t){const i=r.extensions||={},o=i.http||={};o.status=400,r.extensions.code="BAD_USER_INPUT"}return{errors:t}}const n=ate(t);return cr(n)?n.then(r=>K5(t,r)):K5(t,n)}function ite(e){return e?.initialResult}function Q5(e){const t=e.subsequentResults;let n=!1,r=!1;return{[Symbol.asyncIterator](){return this},next(){return r?xo({value:void 0,done:r}):n?t.next():(n=!0,xo({value:e.initialResult,done:r}))},return(){return r=!0,t.return()},throw(i){return r=!0,t.throw(i)},[Bl.asyncDispose](){return r=!0,t?.[Bl.asyncDispose]?.()}}}async function*ote(e){"initialResult"in e?yield*Q5(e):yield e}function K5(e,t){return zf(t)?$ee(bC(t,n=>Xt(()=>P5(Qee(e,n)),ote),n=>{throw n instanceof AggregateError?new AggregateError(n.errors.map(r=>X5(r,e.operation)),n.message):X5(n,e.operation)})):t}function X5(e,t){return Yt(e.message,{originalError:e,nodes:[t]})}function ate(e){try{const t=ste(e);return cr(t)?t.then(void 0,n=>({errors:[n]})):t}catch(t){return{errors:[t]}}}function ste(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:o}=e,l=t.getSubscriptionType();if(l==null)throw Yt("Schema is not configured to execute subscription operation.",{nodes:r});const{fields:c}=wC(t,n,i,l,r.selectionSet),[p,d]=[...c.entries()][0],m=d[0].name.value,b=tP(t,l,d[0]);if(!b)throw Yt(`The subscription field "${m}" is not defined.`,{nodes:d});const E=Sp(void 0,p,l.name),y=q5(e,b,d,l,E);try{const x=l5(b,d[0],i),w=e.contextValue,N=(b.subscribe??e.subscribeFieldResolver)(o,x,w,y);return cr(N)?N.then(D=>Z5(D,e.signal,e.onSignalAbort)).then(void 0,D=>{throw xr(D,d,Si(E))}):Z5(N,e.signal,e.onSignalAbort)}catch(x){throw xr(x,d,Si(E))}}function Z5(e,t,n){if(t?.throwIfAborted(),e instanceof Error)throw e;if(!zf(e))throw Yt(`Subscription field must return Async Iterable. Received: ${Ri(e)}.`);return n?{[Symbol.asyncIterator](){const r=e[Symbol.asyncIterator]();return r.return&&n?.(()=>{r.return?.()}),r}}:e}function J5(e,t,n,r,i,o,l){const c=new pte({label:i,path:o,parentContext:l,exeContext:e});let p;try{p=IC(e,t,n,o,r,c),cr(p)&&(p=p.then(null,d=>(c.errors.push(d),null)))}catch(d){c.errors.push(d),p=null}c.addData(p)}function lte(e,t,n,r,i,o,l,c,p){const d=new eP({label:c,path:t,parentContext:p,exeContext:r});let m;try{try{cr(n)?m=n.then(E=>ic(r,l,i,o,t,E,d)):m=ic(r,l,i,o,t,n,d),cr(m)&&(m=m.then(void 0,E=>{E=Ks(E);const y=xr(E,i,Si(t)),x=_a(y,l,d.errors);return Co(r,t,d),x}))}catch(E){const y=Ks(E),x=xr(y,i,Si(t));m=_a(x,l,d.errors),Co(r,t,d)}}catch(E){return d.errors.push(E),Co(r,e,d),d.addItems(null),d}let b;return cr(m)?b=m.then(E=>[E],E=>(d.errors.push(E),Co(r,e,d),null)):b=[m],d.addItems(b),d}async function ute(e,t,n,r,i,o,l){let c;try{const{value:d,done:m}=await e.next();if(m)return o.setIsCompletedIterator(),{done:m,value:void 0};c=d}catch(d){const m=Ks(d),b=xr(m,n,Si(l));return{done:!0,value:_a(b,i,o.errors)}}let p;try{return p=ic(t,i,n,r,l,c,o),cr(p)&&(p=p.then(void 0,d=>{const m=xr(d,n,Si(l)),b=_a(m,i,o.errors);return Co(t,l,o),b})),{done:!1,value:p}}catch(d){const m=xr(d,n,Si(l)),b=_a(m,i,o.errors);return Co(t,l,o),{done:!1,value:b}}}async function cte(e,t,n,r,i,o,l,c,p){let d=e,m=p??void 0;for(;;){const b=Sp(l,d,void 0),E=new eP({label:c,path:b,parentContext:m,iterator:t,exeContext:n});let y;try{y=await ute(t,n,r,i,o,E,b)}catch(N){E.errors.push(N),Co(n,l,E),E.addItems(null),t?.return&&t.return().catch(()=>{});return}const{done:x,value:w}=y;let k;if(cr(w)?k=w.then(N=>[N],N=>(E.errors.push(N),Co(n,l,E),null)):k=[w],E.addItems(k),x)break;m=E,d++}}function Co(e,t,n){const r=Si(t);e.subsequentPayloads.forEach(i=>{if(i!==n){for(let o=0;o<r.length;o++)if(i.path[o]!==r[o])return;PC(i)&&i.iterator?.return&&i.iterator.return().catch(()=>{}),e.subsequentPayloads.delete(i)}})}function fte(e){const t=[];for(const n of e.subsequentPayloads){const r={};if(n.isCompleted){if(e.subsequentPayloads.delete(n),PC(n)){const i=n.items;if(n.isCompletedIterator)continue;r.items=i}else{const i=n.data;r.data=i??null}r.path=n.path,n.label&&(r.label=n.label),n.errors.length>0&&(r.errors=n.errors),t.push(r)}}return t}function dte(e){let t=!1;async function n(){if(t)return{value:void 0,done:!0};const i=Array.from(e.subsequentPayloads).map(c=>c.promise);if(e.signalPromise?await Promise.race([e.signalPromise,...i]):await Promise.race(i),t)return{value:void 0,done:!0};const o=fte(e),l=e.subsequentPayloads.size>0;return!o.length&&l?n():(l||(t=!0),{value:o.length?{incremental:o,hasNext:l}:{hasNext:l},done:!1})}function r(){const i=[];return e.subsequentPayloads.forEach(o=>{PC(o)&&o.iterator?.return&&i.push(o.iterator.return())}),Promise.all(i)}return{[Symbol.asyncIterator](){return this},next:n,async return(){return await r(),t=!0,{value:void 0,done:!0}},async throw(i){throw await r(),t=!0,i},async[Bl.asyncDispose](){await r(),t=!0}}}class pte{type;errors;label;path;promise;data;parentContext;isCompleted;_exeContext;_resolve;constructor(t){this.type="defer",this.label=t.label,this.path=Si(t.path),this.parentContext=t.parentContext,this.errors=[],this._exeContext=t.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.data=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.data=n,this.isCompleted=!0})}addData(t){const n=this.parentContext?.promise;if(n){this._resolve?.(n.then(()=>t));return}this._resolve?.(t)}}class eP{type;errors;label;path;items;promise;parentContext;iterator;isCompletedIterator;isCompleted;_exeContext;_resolve;constructor(t){this.type="stream",this.items=null,this.label=t.label,this.path=Si(t.path),this.parentContext=t.parentContext,this.iterator=t.iterator,this.errors=[],this._exeContext=t.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.items=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.items=n,this.isCompleted=!0})}addItems(t){const n=this.parentContext?.promise;if(n){this._resolve?.(n.then(()=>t));return}this._resolve?.(t)}setIsCompletedIterator(){this.isCompletedIterator=!0}}function PC(e){return e.type==="stream"}function tP(e,t,n){const r=n.name.value;return r===va.name&&e.getQueryType()===t?va:r===ya.name&&e.getQueryType()===t?ya:r===ba.name?ba:t.getFields()[r]}function hte(e){const t=WE(e.document,e.operationName);if(t==null)throw new Error("Must provide an operation.");return t.operation==="subscription"?rte(e):Xt(()=>Yee(e),n=>ite(n)?Q5(n):n)}const mte=ps(function(t){return function(r){return hte({schema:t,document:r.document,variableValues:r.variables,operationName:r.operationName,rootValue:r.rootValue,contextValue:r.context,signal:r.signal||r.info?.signal})}});var jC,nP;function gte(){if(nP)return jC;nP=1;var e=function(){function y(w,k){if(typeof w!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array<key> and returns Promise<Array<value>>, but got: "+w+"."));this._batchLoadFn=w,this._maxBatchSize=c(k),this._batchScheduleFn=p(k),this._cacheKeyFn=d(k),this._cacheMap=m(k),this._batch=null,this.name=b(k)}var x=y.prototype;return x.load=function(k){if(k==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(k)+"."));var N=r(this),D=this._cacheMap,A;if(D){A=this._cacheKeyFn(k);var C=D.get(A);if(C){var M=N.cacheHits||(N.cacheHits=[]);return new Promise(function(P){M.push(function(){P(C)})})}}N.keys.push(k);var j=new Promise(function(P,F){N.callbacks.push({resolve:P,reject:F})});return D&&D.set(A,j),j},x.loadMany=function(k){if(!E(k))throw new TypeError("The loader.loadMany() function must be called with Array<key> "+("but got: "+k+"."));for(var N=[],D=0;D<k.length;D++)N.push(this.load(k[D]).catch(function(A){return A}));return Promise.all(N)},x.clear=function(k){var N=this._cacheMap;if(N){var D=this._cacheKeyFn(k);N.delete(D)}return this},x.clearAll=function(){var k=this._cacheMap;return k&&k.clear(),this},x.prime=function(k,N){var D=this._cacheMap;if(D){var A=this._cacheKeyFn(k);if(D.get(A)===void 0){var C;N instanceof Error?(C=Promise.reject(N),C.catch(function(){})):C=Promise.resolve(N),D.set(A,C)}}return this},y}(),t=typeof process=="object"&&typeof process.nextTick=="function"?function(y){n||(n=Promise.resolve()),n.then(function(){process.nextTick(y)})}:typeof setImmediate=="function"?function(y){setImmediate(y)}:function(y){setTimeout(y)},n;function r(y){var x=y._batch;if(x!==null&&!x.hasDispatched&&x.keys.length<y._maxBatchSize)return x;var w={hasDispatched:!1,keys:[],callbacks:[]};return y._batch=w,y._batchScheduleFn(function(){i(y,w)}),w}function i(y,x){if(x.hasDispatched=!0,x.keys.length===0){l(x);return}var w;try{w=y._batchLoadFn(x.keys)}catch(k){return o(y,x,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function "+("errored synchronously: "+String(k)+".")))}if(!w||typeof w.then!="function")return o(y,x,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise: "+String(w)+".")));w.then(function(k){if(!E(k))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise of an Array: "+String(k)+"."));if(k.length!==x.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(`
Keys:
`+String(x.keys))+(`
Values:
`+String(k)));l(x);for(var N=0;N<x.callbacks.length;N++){var D=k[N];D instanceof Error?x.callbacks[N].reject(D):x.callbacks[N].resolve(D)}}).catch(function(k){o(y,x,k)})}function o(y,x,w){l(x);for(var k=0;k<x.keys.length;k++)y.clear(x.keys[k]),x.callbacks[k].reject(w)}function l(y){if(y.cacheHits)for(var x=0;x<y.cacheHits.length;x++)y.cacheHits[x]()}function c(y){var x=!y||y.batch!==!1;if(!x)return 1;var w=y&&y.maxBatchSize;if(w===void 0)return 1/0;if(typeof w!="number"||w<1)throw new TypeError("maxBatchSize must be a positive number: "+w);return w}function p(y){var x=y&&y.batchScheduleFn;if(x===void 0)return t;if(typeof x!="function")throw new TypeError("batchScheduleFn must be a function: "+x);return x}function d(y){var x=y&&y.cacheKeyFn;if(x===void 0)return function(w){return w};if(typeof x!="function")throw new TypeError("cacheKeyFn must be a function: "+x);return x}function m(y){var x=!y||y.cache!==!1;if(!x)return null;var w=y&&y.cacheMap;if(w===void 0)return new Map;if(w!==null){var k=["get","set","delete","clear"],N=k.filter(function(D){return w&&typeof w[D]!="function"});if(N.length!==0)throw new TypeError("Custom cacheMap missing methods: "+N.join(", "))}return w}function b(y){return y&&y.name?y.name:null}function E(y){return typeof y=="object"&&y!==null&&typeof y.length=="number"&&(y.length===0||y.length>0&&Object.prototype.hasOwnProperty.call(y,y.length-1))}return jC=e,jC}var vte=gte();const rP=Du(vte);function yte(e){return`_v${e}_`}function iP(e){const t=/^_v(\d+)_(.*)$/.exec(e);return t&&t.length===3&&!isNaN(Number(t[1]))&&t[2]?{index:Number(t[1]),originalKey:t[2]}:null}function bte(e){const t=iP(e);if(!t)throw new Error(`Key ${e} is not correctly prefixed`);return t}function Ete(e){let t=0,n=null;for(;!n&&t<e.length;t++){const r=e[t];typeof r=="string"&&(n=iP(r))}if(!n)throw new Error(`Path ${e.join(".")} does not contain correctly prefixed key`);return{...n,keyOffset:t}}function Ste(e,t){const n=Object.create(null),r=[],i=[],o=[];let l=Object.create(null);for(let b=0;b<e.length;b++){const E=e[b];if(E){const y=Tte(yte(b),E);for(const x of y.document.definitions)lP(x)&&(i.push(...x.selectionSet.selections),x.variableDefinitions&&r.push(...x.variableDefinitions)),Qb(x)&&o.push(x);Object.assign(n,y.variables),l=t(l,E)}}const c=e[0];if(!c)throw new Error("At least one request is required");const p=c.operationType??$f(c).operation,d={kind:K.OPERATION_DEFINITION,operation:p,variableDefinitions:r,selectionSet:{kind:K.SELECTION_SET,selections:i}},m=c.operationName??c.info?.operation?.name?.value;return m&&(d.name={kind:K.NAME,value:m}),{document:{kind:K.DOCUMENT,definitions:[d,...o]},variables:n,extensions:l,context:c.context,info:c.info,operationType:p,rootValue:c.rootValue}}function Tte(e,t){function n(d){return sP(d,e)}let r=xte(e,t.document),i=!1;for(const d of r.definitions)if(Qb(d)||lP(d)&&d.variableDefinitions?.length){i=!0;break}const o={};let l=!1;i&&(r=Tr(r,{[K.VARIABLE]:n,[K.FRAGMENT_DEFINITION](d){return l=!0,n(d)},[K.FRAGMENT_SPREAD]:d=>(d=sP(d,e),o[d.name.value]=!0,d)}));let c;const p=t.variables;if(p){c=Object.create(null);for(const d in p)c[e+d]=p[d]}return l&&(r={...r,definitions:r.definitions.filter(d=>!Qb(d)||o[d.name.value])}),{document:r,variables:c}}function xte(e,t){const n={[K.OPERATION_DEFINITION]:r=>{const{selections:i}=r.selectionSet;return{...r,selectionSet:{...r.selectionSet,selections:oP(e,i,t)}}}};return Tr(t,n,{[K.DOCUMENT]:["definitions"]})}function oP(e,t,n){return t.map(r=>{switch(r.kind){case K.INLINE_FRAGMENT:return aP(e,r,n);case K.FRAGMENT_SPREAD:{const i=wte(r,n);return aP(e,i,n)}case K.FIELD:default:return Cte(r,e)}})}function aP(e,t,n){const{selections:r}=t.selectionSet;return{...t,selectionSet:{...t.selectionSet,selections:oP(e,r,n)}}}function wte(e,t){const n=t.definitions.find(o=>Qb(o)&&o.name.value===e.name.value);if(!n)throw new Error(`Fragment ${e.name.value} does not exist`);const{typeCondition:r,selectionSet:i}=n;return{kind:K.INLINE_FRAGMENT,typeCondition:r,selectionSet:i,directives:e.directives}}function sP(e,t){return{...e,name:{...e.name,value:t+e.name.value}}}function Cte(e,t){const n=e.alias?e.alias:e.name;return{...e,alias:{...n,value:t+n.value}}}function lP(e){return e.kind===K.OPERATION_DEFINITION}function Qb(e){return e.kind===K.FRAGMENT_DEFINITION}function _te({data:e,errors:t},n){const r=new Array(n);if(e)for(const i in e){const{index:o,originalKey:l}=bte(i),c=r[o];c==null?r[o]={data:{[l]:e[i]}}:c.data==null?c.data={[l]:e[i]}:c.data[l]=e[i]}if(t)for(const i of t)if(i.path){const{index:o,originalKey:l,keyOffset:c}=Ete(i.path),p=Rb(i,[l,...i.path.slice(c)]),d=r[o];if(d==null){r[o]={errors:[p]};continue}else if(d.errors==null){d.errors=[p];continue}else d.errors.push(p)}else for(let o=0;o<n;o++){const l=r[o];if(l==null){r[o]={errors:[i]};continue}else if(l.errors==null){l.errors=[i];continue}else l.errors.push(i)}return r}function Nte(e,t,n=Ote){const r=Ate(e,n),i=new rP(r,t),o=new rP(r,t);return function(c){const p=c.operationType??$f(c)?.operation;switch(p){case"query":return i.load(c);case"mutation":return o.load(c);case"subscription":return e(c);default:throw new Error(`Invalid operation type "${p}"`)}}}function Ate(e,t){return function(r){if(r.length===1&&r[0]){const o=r[0];return xo().then(()=>e(o)).catch(l=>l).then(l=>[l])}const i=Ste(r,t);return xo().then(()=>e(i)).then(o=>_te(o,r.length)).catch(o=>r.map(()=>o))}}function Ote(e,t){const n=t.extensions;return n!=null&&Object.assign(e,n),e}const Dte=OJ(function(t,n,r,i){return Nte(n,r,i)}),VC=Mb(function(t,n){const r=n.transforms;return r==null?t:r.reduce((i,o)=>o.transformSchema?.(i,n)||i,t)});class kte{name;schema;executor;batch;batchingOptions;createProxyingResolver;transforms;_transformedSchema;merge;constructor(t){this.name=t.name,this.schema=t.schema,this.executor=t.executor,this.batch=t.batch,this.batchingOptions=t.batchingOptions,this.createProxyingResolver=t.createProxyingResolver,this.transforms=t.transforms??[],this.merge=t.merge}get transformedSchema(){return this._transformedSchema||(globalThis.process?.env?.DEBUG!=null&&console.warn("Transformed schema is not set yet. Returning a dummy one."),this._transformedSchema=VC(this.schema,this)),this._transformedSchema}set transformedSchema(t){this._transformedSchema=t}}const Rte=["__proto__","constructor","prototype"];function Mte(e){return Rte.includes(e)}const Lte=new WeakMap,uP=Symbol("PLAN_LEFT_OVER");function cP(e){if(e!=null&&typeof e=="object")return e[uP]}const ms=Symbol.for("subschemaErrors"),_p=Symbol.for("initialSubschema"),$l=Symbol.for("subschemaMap");function Kb(e){return e[ms]!==void 0}function Ite(e,t,n,r){return Object.defineProperties(e,{[_p]:{value:n,writable:!0},[$l]:{value:r,writable:!0},[ms]:{value:t,writable:!0}}),e}function Xb(e,t){return e[$l]?.[t]??e[_p]}function fP(e){return e[ms]}const Fte=[],Zb=Object.create(null),dP=ps(function(e){return[e]});function Pte(e,t,n,r,i){const o=e.delegationPlanBuilder(i.schema,n,i.variableValues!=null&&Object.keys(i.variableValues).length>0?i.variableValues:Zb,i.fragments!=null&&Object.keys(i.fragments).length>0?i.fragments:Zb,i.fieldNodes?.length?i.fieldNodes.length===1&&i.fieldNodes[0]?dP(i.fieldNodes[0]):i.fieldNodes:Fte,r,i),l=Lte.get(o);return l&&(t[uP]=l),Xt(()=>a5(o,(c,p)=>jte(e,p,t,r,i),void 0),()=>t)}function Np(e,t,n,r,i,o,l,c){if(e instanceof Error||e==null){const m=t.transformedSchema||o.schema,b=m.getType(r.__typename),{fields:E}=wC(m,o.fragments,o.variableValues,b,n),y={};for(const[x,w]of E){const k=[...l,x];e instanceof Me?e.message.includes("Cannot return null for non-nullable field")?y[x]=null:y[x]=Rb(e,k):e instanceof Error?y[x]=xr(e,w,k):y[x]=null}e=y}else e[ms]&&c.push(...e[ms]);const p=e[_p],d=e[$l];for(const m in e){if(Mte(m))continue;const b=r[m],E=e[m];m==="__typename"&&b!==E&&sr(t.transformedSchema.getType(E))||((E!=null||b==null)&&(b!=null&&typeof b=="object"&&!(b instanceof Error)&&Object.keys(b).length>0?Array.isArray(b)&&Array.isArray(E)&&b.length===E.length?r[m]=b.map((y,x)=>E instanceof Error?y:vg([y,E[x]],void 0,!0,!0)):E instanceof Error||(r[m]=vg([b,E],void 0,!0,!0)):r[m]=E),i[m]=d?.[m]??p??t)}}function jte(e,t,n,r,i){const o=n[ms],l=Si(i.path),c=n[$l],p=[];for(const[d,m]of t){const E=(d.transformedSchema||i.schema).getType(n.__typename),y=e.resolvers.get(d);if(y)try{const x=y(n,r,i,d,m,void 0,E);cr(x)?p.push(x.then(w=>Np(w,d,m,n,c,i,l,o),w=>Np(w,d,m,n,c,i,l,o))):Np(x,d,m,n,c,i,l,o)}catch(x){Np(x,d,m,n,c,i,l,o)}}if(p.length)return p.length===1?p[0]:Promise.all(p)}function Sg(e,t,n,r,i,o=Bte(i),l){const c=Mu(o);if(e instanceof Error)return e;if(e==null)return qte(t);if(ai(c))try{return c.parseValue(e)}catch{return null}else{if(Qr(c))return Xt(()=>Vte(c,e,t,n,r,i,l),p=>i&&sr(c)&&p.__typename!=null&&!i.schema.getType(p.__typename)?null:p);if(mn(c))return Array.isArray(e)?Ute(c,e,t,n,r,i,l):Sg(e,t,n,r,i,c.ofType,l)}}function Vte(e,t,n,r,i,o,l){if(Kb(t)||Ite(t,n,r,Object.create(null)),l||o==null)return t;const c=o.schema.extensions?.stitchingInfo;if(c==null)return t;let p;const d=[t.__typename,e.name];for(const m of d)if(m!=null&&c.mergedTypes[m]?.targetSubschemas?.get(r)?.length){p=c.mergedTypes[m];break}return p?Pte(p,t,r,i,o):t}function Ute(e,t,n,r,i,o,l){return t.map(c=>Sg(c,n,r,i,o,e.ofType,l))}const pP=new WeakMap;function qte(e){if(e.length){const t=[];for(const n of e)pP.has(n)||(t.push(n),pP.set(n,!0));if(t.length){const n=t[0];return t.length===1&&n?xr(n,void 0,n.path):new AggregateError(t.map(r=>xr(r,void 0,n?.path)),t.map(r=>r.message).join(`,
`))}}return null}function Bte(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function $te(e={data:null,errors:[]},t){const{context:n,info:r,fieldName:i=zte(r),subschema:o,returnType:l=Hte(r),skipTypeMerging:c,onLocatedError:p}=t,{data:d,unpathedErrors:m}=hP(e.data==null?void 0:e.data[i],e.errors==null?[]:e.errors,r!=null&&r.path?bi(r.path):void 0,p);return Sg(d,m,o,n,r,l,c)}function hP(e,t,n,r,i=1){if(e==null){if(!t.length)return{data:null,unpathedErrors:[]};if(t.length===1&&t[0]){const p=r?r(t[0]):t[0],d=n===void 0?p.path:p.path?n.concat(p.path.slice(1)):n;return{data:Rb(t[0],d),unpathedErrors:[]}}return{data:new AggregateError(t.map(p=>{const d=r?r(p):p,m=n===void 0?d.path:d.path?n.concat(d.path.slice(1)):n;return Rb(d,m)}),t.map(p=>p.message).join(`,
`)),unpathedErrors:[]}}if(!t.length)return{data:e,unpathedErrors:[]};const o=[],l=new Map;for(const c of t){const p=c.path?.[i];if(p!=null){let d=l.get(p);d===void 0?(d=[c],l.set(p,d)):d.push(c)}else o.push(c)}for(const[c,p]of l)if(e[c]!==void 0){const{data:d,unpathedErrors:m}=hP(e[c],p,n,r,i+1);e[c]=d,o.push(...m)}else o.push(...p);return{data:e,unpathedErrors:o}}function zte(e){if(e==null)throw new Error("Data cannot be extracted from result without an explicit key or source schema.");return xC(e)}function Hte(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function mP(e){const t=[],n=[],r=new Set;for(let i=0;i<e.definitions.length;i++){const o=e.definitions[i];o?.kind===K.FRAGMENT_DEFINITION?(n.push(o),r.add(o.name.value)):o?.kind===K.OPERATION_DEFINITION&&t.push(o)}return{operations:t,fragments:n,fragmentNames:r}}const UC=ps(function(t){return new Pu(t)}),Gte=Mb(function(t,n){return Kv.major<16?new Pu(t,void 0,n):new Pu(t,n)});function gP(e,t,n,r,i,o,l){if(e[r]={kind:K.ARGUMENT,name:{kind:K.NAME,value:r},value:{kind:K.VARIABLE,name:{kind:K.NAME,value:i}}},t[i]={kind:K.VARIABLE_DEFINITION,variable:{kind:K.VARIABLE,name:{kind:K.NAME,value:i}},type:EC(o)},l!==void 0){n[i]=l;return}i in n&&delete n[i]}function vP(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}function Yte(e,t,n,r,i){let o=[],l=[];const c=[];let p=[];const d=[],m=Object.create(null);for(const x of t){const w=x.typeCondition.name.value,k=e.getType(w);k!=null&&(d.push(x),m[x.name.value]=k)}let b=Object.create(null);for(const x of n){const w=Lb(e,x.operation),{selectionSet:k,usedFragments:N,usedVariables:D}=bP(e,w,m,x.selectionSet,r);l=Tg(l,N);const{usedVariables:A,newFragments:C,fragmentSet:M}=Zte(e,b,d,m,l,r),j=Tg(D,A);o=Tg(o,j),p=C,b=M;const P=(x.variableDefinitions??[]).filter(F=>j.indexOf(F.variable.name.value)!==-1);x.operation==="subscription"&&(k.selections=k.selections.filter(F=>F.kind!==K.FIELD||F.name.value!=="__typename")),!(k.selections.length===1&&k.selections[0]&&k.selections[0].kind===K.FIELD&&k.selections[0].name.value==="__typename")&&c.push({kind:K.OPERATION_DEFINITION,operation:x.operation,name:x.name,directives:x.directives,variableDefinitions:P,selectionSet:k})}if(!c.length)throw Yt("Failed to create a gateway request. The request must contain at least one operation.",{extensions:{[B5]:!0}});let E={kind:K.DOCUMENT,definitions:[...c,...p]};const y=i.info?.schema?.extensions?.stitchingInfo;if(y!=null){const x=UC(e);E=Tr(E,ju(x,{[K.FIELD](w){const k=x.getParentType();if(k){const N=k.name,D=y?.mergedTypes?.[N];if(D){const A=D?.providedSelectionsByField?.get(i.subschema);if(A){const C=A[w.name.value];if(C)return{...w,selectionSet:{kind:K.SELECTION_SET,selections:[...C.selections,...w.selectionSet?.selections??[]]}}}}}return w}}))}return{usedVariables:o,newDocument:E}}function Wte(e,t,n){let{document:r,variables:i}=e,{operations:o,fragments:l}=mP(r);const{targetSchema:c,args:p}=t;if(p){const E=Kte(c,o,p);o=E.newOperations,i=Object.assign({},i??{},E.newVariables)}const{usedVariables:d,newDocument:m}=Yte(c,l,o,n,t),b={};if(i!=null)for(const E of d){const y=i[E];y!==void 0&&(b[E]=y)}return{...e,document:m,variables:b}}function Qte(e){return e.kind===K.FIELD&&!e.alias&&e.name.value==="__typename"}function yP(e){let t=!1;const n=e.filter(r=>Qte(r)?(t=!0,!1):!0);return{hasTypeNameField:t,selections:n}}function Kte(e,t,n){const r=Object.create(null);return{newOperations:t.map(o=>{const l=(o.variableDefinitions??[]).reduce((m,b)=>({...m,[b.variable.name.value]:b}),{}),c=Lb(e,o.operation),p=[];for(const m of o.selectionSet.selections)if(m.kind===K.FIELD){const E=(m.arguments??[]).reduce((x,w)=>({...x,[w.name.value]:w}),{}),y=c.getFields()[m.name.value];y!=null&&Xte(y,E,l,r,n),p.push({...m,arguments:Object.values(E)})}else p.push(m);const d={kind:K.SELECTION_SET,selections:p};return{...o,variableDefinitions:Object.values(l),selectionSet:d}}),newVariables:r}}function Xte(e,t,n,r,i){const o=vP(n);for(const l of e.args){const c=l.name,p=l.type;c in i&&gP(t,n,r,c,o(c),p,Fb(p,i[c]))}}function Zte(e,t,n,r,i,o){let l=i.slice(),c=[];const p=[];for(;l.length!==0;){const d=l.pop(),m=n.find(b=>b.name.value===d);if(m!=null){const b=d,E=m.typeCondition.name.value,y=e.getType(E);if(y==null)throw new Error(`Fragment reference type "${E}", but the type is not contained within the target schema.`);const{selectionSet:x,usedFragments:w,usedVariables:k}=bP(e,y,r,m.selectionSet,o);l=Tg(l,w),c=Tg(c,k),b&&!(b in t)&&(t[b]=!0,p.push({kind:K.FRAGMENT_DEFINITION,name:{kind:K.NAME,value:b},typeCondition:m.typeCondition,selectionSet:x}))}}return{usedVariables:c,newFragments:p,fragmentSet:t}}const Jte={SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]},ene={SelectionSet:["selections"],Field:["arguments","directives","selectionSet"],Argument:["value"],InlineFragment:["directives","selectionSet"],FragmentSpread:["directives"],FragmentDefinition:["selectionSet"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["arguments"],ListValue:["values"]};function bP(e,t,n,r,i){const o=[],l=[],c=Gte(e,t),p=new WeakMap,d=new WeakMap,m=Tr(r,ju(c,{[K.FIELD]:{enter:b=>{const E=c.getParentType();if(At(E)||Rt(E)){const y=c.getFieldDef();if(!y)return null;const x=y.args!=null?y.args:[],w=Object.create(null);for(const k of x)w[k.name]=k;if(b.arguments!=null){const k=[];for(const N of b.arguments)N.name.value in w&&k.push(N);if(k.length!==b.arguments.length)return{...b,arguments:k}}}if(ar(E)&&c.getType()==null){const y=[],x=b.name.value;for(const w of E.getTypes()){const N=w.getFields()[x];if(N!=null){const D=gn(N.type);if(b.selectionSet?.selections?.length&&ai(D)||!b.selectionSet?.selections?.length&&Qr(D))continue;y.push(w.name)}}if(y.length>0)return y.map(w=>({kind:K.INLINE_FRAGMENT,typeCondition:{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:w}},selectionSet:{kind:K.SELECTION_SET,selections:[b]}}))}},leave:b=>{const E=c.getType();if(E==null)return null;const y=gn(E);if(e.getType(y.name)==null)return null;if(At(y)||Rt(y)){const x=b.selectionSet!=null?b.selectionSet.selections:null;if(x==null||x.length===0)return null}}},[K.FRAGMENT_SPREAD]:{enter:b=>{if(!(b.name.value in n))return null;const E=c.getParentType(),y=n[b.name.value];if(!Vb(e,E,y))return null;o.push(b.name.value)}},[K.SELECTION_SET]:{enter:(b,E,y,x)=>{const w=c.getParentType(),{hasTypeNameField:k,selections:N}=yP(b.selections);return(k||w!=null&&sr(w))&&N.unshift({kind:K.FIELD,name:{kind:K.NAME,value:"__typename"}}),{...b,selections:N}}},[K.INLINE_FRAGMENT]:{enter:b=>{if(b.typeCondition!=null){const E=c.getParentType(),y=e.getType(b.typeCondition.name.value);if(ar(E)&&E.getTypes().some(x=>x.name===y?.name))return b;if(!Vb(e,E,y))return null}},leave:(b,E,y)=>{if(!b.selectionSet?.selections?.length)return null;if(Array.isArray(y)){const w=b.typeCondition?.name.value;if(w){const k=e.getType(w);if(k&&"getFields"in k){const N=k.getFields();let D=p.get(y);D||(D=new Set,p.set(y,D));let A=d.get(y);A||(A=new Set,d.set(y,A)),b={...b,selectionSet:{...b.selectionSet,selections:b.selectionSet.selections.map(C=>{if(C.kind===K.FIELD){const M=C.name.value;if(!C.alias){const j=N[M];if(j){let P;if(tm(j.type)?(A.add(M),P=!0):(D.add(M),P=!1),A.has(M)&&D.has(M))return i(),{...C,alias:{kind:K.NAME,value:P?`_nullable_${M}`:`_nonNullable_${M}`}}}}}return C})}}}}}const{selections:x}=yP(b.selectionSet.selections);return x.length===0?null:{...b,selectionSet:{...b.selectionSet,selections:x},directives:b.directives?.filter?.(w=>w.name.value!=="defer")}}}}),Jte);return Tr(m,{[K.VARIABLE]:b=>{l.push(b.name.value)}},ene),{selectionSet:m,usedFragments:o,usedVariables:l}}function Tg(...e){const t=Object.create(null),n=[];for(const r of e)for(const i of r)i in t||(t[i]=!0,n.push(i));return n}function tne(e,t,n,r){const i=sne(n,t,e);if(r==null)return i;const o=new WeakSet,{possibleTypesMap:l,reversePossibleTypesMap:c,interfaceExtensionsMap:p,fieldNodesByType:d,fieldNodesByField:m,dynamicSelectionSetsByField:b}=ine(r,t),{operations:E,fragments:y,fragmentNames:x}=mP(i),{expandedFragments:w,fragmentReplacements:k}=ane(y,x,l),N=UC(t),D={kind:K.DOCUMENT,definitions:[...E,...y,...w]},A={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return Tr(D,ju(N,{[K.SELECTION_SET]:C=>rne(C,k,t,N,l,c,p,d,m,b,r,o)}),A)}const nne=Mb(function(t,n){const r=new Map;return function(o){let l=r.get(o);if(!l){l=new Set;const c=n.getType(o),p=t.getType(o);if(sr(c)&&sr(p)){const d=n.getPossibleTypes(c),m=t.getPossibleTypes(p);for(const b of d){const E=t.getType(b.name);E&&(E&&m.some(y=>y.name===b.name)||l.add(b.name))}}r.set(o,l)}return l}});function rne(e,t,n,r,i,o,l,c,p,d,m,b){const E=new Set,y=r.getParentType();if(y!=null){const x=gn(y),w=x.name,k=c[w];if(k)for(const A of k)E.add(A);const N=l[x.name],D=[];for(const A of e.selections)if(A.kind===K.INLINE_FRAGMENT)if(A.typeCondition!=null){if(!b.has(A)){b.add(A);const M=A.typeCondition.name.value,P=nne(n,m)(M);for(const V of P)E.add({...A,typeCondition:{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:V}}});const F=n.getType(M);if(At(F)||Rt(F)){const V=F.getFields();for(const $ of A.selectionSet.selections)if($.kind===K.FIELD){const X=$.name.value;V[X]||E.add($)}}else if(!F)for(const V of A.selectionSet.selections)E.add(V)}const C=i[A.typeCondition.name.value];if(C==null){const M=p[w]?.__typename;if(M)for(const j of M)E.add(j);E.add(A);continue}for(const M of C){const j=n.getType(M);j!=null&&Vb(n,x,j)&&E.add(SP(M,A.selectionSet))}C.length===0&&E.add(A)}else E.add(A);else if(A.kind===K.FRAGMENT_SPREAD){const C=A.name.value;if(!t[C]){E.add(A);continue}for(const M of t[C]){const j=M.typeName;n.getType(j)!=null&&Vb(n,x,y)&&E.add({kind:K.FRAGMENT_SPREAD,name:{kind:K.NAME,value:M.fragmentName}})}}else{const C=A.name.value;if(sr(x)){const P=p[w]?.__typename;if(P)for(const F of P)E.add(F)}const M=p[w];M&&EP(A,new Set,M,E);const j=d[w]?.[C];if(j!=null)for(const P of j){const F=P(A);if(F!=null)for(const V of F.selections)E.add(V)}N?.[C]?D.push(A):E.add(A)}if(o[x.name]&&E.add({kind:K.FIELD,name:{kind:K.NAME,value:"__typename"}}),D.length){const A=i[x.name];if(A!=null)for(const C of A)E.add(SP(C,{kind:K.SELECTION_SET,selections:D}))}return{...e,selections:Array.from(E)}}return e}function EP(e,t,n,r){if(t.has(e.name.value))return;t.add(e.name.value);const i=n[e.name.value];if(i!=null)for(const o of i)r.add(o),EP(o,t,n,r)}function SP(e,t){return{kind:K.INLINE_FRAGMENT,typeCondition:{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:e}},selectionSet:t}}const ine=Mb((e,t)=>{const n=e.getTypeMap(),r=t.getTypeMap(),i=Object.create(null),o=Object.create(null);for(const c in n){const p=n[c];if(sr(p)){const d=r[c];if(Rt(p)&&Rt(d)){const m=d.getFields(),b=p.getFields(),E=Object.create(null);let y=!0;for(const x in b)m[x]||(E[x]=!0,y=!1);y||(o[c]=E)}if(o[c]||!sr(d)){const m=e.getPossibleTypes(p);i[c]=[];for(const b of m)r[b.name]&&i[c].push(b.name)}}}const l=e.extensions?.stitchingInfo;return{possibleTypesMap:i,reversePossibleTypesMap:one(i),interfaceExtensionsMap:o,fieldNodesByType:l?.fieldNodesByType??{},fieldNodesByField:l?.fieldNodesByField??{},dynamicSelectionSetsByField:l?.dynamicSelectionSetsByField??{}}});function one(e){const t=Object.create(null);for(const n in e){const r=e[n];if(r)for(const i of r)t[i]||(t[i]=[]),t[i].push(n)}return t}function ane(e,t,n){let r=0;function i(c){let p;do p=`_${c}_Fragment${r.toString()}`,r++;while(t.has(p));return p}const o=[],l=Object.create(null);for(const c of e){const p=n[c.typeCondition.name.value];if(p!=null){const d=c.name.value;l[d]=[];for(const m of p){const b=i(m);t.add(b),o.push({kind:K.FRAGMENT_DEFINITION,name:{kind:K.NAME,value:b},typeCondition:{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:m}},selectionSet:c.selectionSet}),l[d].push({fragmentName:b,typeName:m})}}}return{expandedFragments:o,fragmentReplacements:l}}function sne(e,t,n){const r=gn(e);if(ai(r))return n;let i=sr(r)?t.getPossibleTypes(r):[r];i.length===0&&(i=[r]);const o=DJ(t),l=UC(t),c={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return Tr(n,ju(l,{[K.FRAGMENT_DEFINITION]:p=>{const d=p.typeCondition.name.value;if(!o.has(d))return!1},[K.FIELD]:p=>{const d=l.getType();if(d){const m=gn(d);if(sr(m)&&m.name!==r.name&&i.length>0)return{...p,selectionSet:{kind:K.SELECTION_SET,selections:i.map(b=>({kind:K.INLINE_FRAGMENT,typeCondition:{kind:K.NAMED_TYPE,name:{kind:K.NAME,value:b.name}},selectionSet:p.selectionSet}))}}}}}),c)}class lne{transformations=[];delegationContext;hasOverlappingAliases=!1;constructor(t){this.delegationContext=t;const r=t.transforms.slice().reverse();for(const i of r)this.addTransform(i)}addTransform(t,n={}){this.transformations.push({transform:t,context:n})}transformRequest(t){let n={...t,document:tne(t.document,this.delegationContext.transformedSchema,this.delegationContext.returnType,this.delegationContext.info?.schema)};for(const r of this.transformations)r.transform.transformRequest&&(n=r.transform.transformRequest(n,this.delegationContext,r.context));return Wte(n,this.delegationContext,()=>{this.hasOverlappingAliases=!0})}transformResult(t){let n=t;for(let r=this.transformations.length-1;r>=0;r--){const i=this.transformations[r];i?.transform.transformResult&&(n=i.transform.transformResult(n,this.delegationContext,i.context))}return this.hasOverlappingAliases&&(n=Jb(n)),$te(n,this.delegationContext)}}function Jb(e){if(e!=null){if(Array.isArray(e))return e.map(Jb);if(typeof e=="object"){const t={};for(const n in e)if(n.startsWith("_nullable_")||n.startsWith("_nonNullable_")){const r=n.replace(/^_nullable_/,"").replace(/^_nonNullable_/,"");t[r]=Jb(e[n])}else t[n]=Jb(e[n]);return t}}return e}function une(e,t){return e===t.getMutationType()?"mutation":e===t.getSubscriptionType()?"subscription":"query"}function cne({sourceSchema:e,sourceParentType:t,sourceFieldName:n,fragments:r,variableDefinitions:i,variableValues:o,targetRootValue:l,targetOperationName:c,targetOperation:p,targetFieldName:d,selectionSet:m,fieldNodes:b,context:E,info:y}){let x;const w=Object.create(null);if(m!=null)x=m;else{const V=[];for(const X of b||[])if(X.selectionSet)for(const J of X.selectionSet.selections)V.push(J);x=V.length?{kind:K.SELECTION_SET,selections:V}:void 0;const $=b?.[0]?.arguments;if($)for(const X of $)w[X.name.value]=X}const k=Object.create(null),N=Object.create(null);if(e!=null&&i!=null)for(const V of i){const $=V.variable.name.value;N[$]=V;const X=yi(e,V.type),J=Fb(X,o?.[$]);J!==void 0&&(k[$]=J)}t!=null&&n!=null&&fne(t,n,w,N,k);const D=b?.[0],A=d??D?.name.value;if(A===void 0)throw new Error('Either "targetFieldName" or a non empty "fieldNodes" array must be provided.');const C={kind:K.FIELD,arguments:Object.values(w),name:{kind:K.NAME,value:A},selectionSet:x,directives:D?.directives},M=c?{kind:K.NAME,value:c}:void 0,P=[{kind:K.OPERATION_DEFINITION,name:M,operation:p,variableDefinitions:Object.values(N),selectionSet:{kind:K.SELECTION_SET,selections:[C]}}];if(r!=null)for(const V in r){const $=r[V];$&&P.push($)}return{document:{kind:K.DOCUMENT,definitions:P},variables:k,rootValue:l,operationName:c,context:E,info:y,operationType:p}}function fne(e,t,n,r,i){const o=vP(r),l=e.getFields()[t];if(!l)throw new Error(`Field "${t}" was not found in type "${e}".`);for(const c of l.args){const p=c.name,d=c.type;if(n[p]===void 0){const m=c.defaultValue;m!==void 0&&gP(n,r,i,p,o(p),d,Fb(d,m))}}}function dne(e,t,n,r){if(!e)return null;const i=xC(r);if(!Kb(e))return ky(e,t,n,r);if(!Object.prototype.hasOwnProperty.call(e,i)){const o=cP(e);if(o){let l=o.missingFieldsParentMap.get(e);l||(l=[],o.missingFieldsParentMap.set(e,l)),l.push(...r.fieldNodes.filter(E=>o.unproxiableFieldNodes.some(y=>y===E)));let c=o.missingFieldsParentDeferredMap.get(e);c||(c=new Map,o.missingFieldsParentDeferredMap.set(e,c));const p=JF();c.set(i,p);const d=r.schema.extensions?.stitchingInfo,m=e?.__typename||r.parentType.name;return d?.fieldNodesByField?.[m]?.[r.fieldName]?.every(E=>{const y=E.alias?.value??E.name.value;return!!Object.prototype.hasOwnProperty.call(e,y)})&&qC(e,i,n,r),p.promise}return}return qC(e,i,n,r)}function qC(e,t,n,r){const i=Xb(e,t),o=e[t],l=fP(e),c=Sg(o,l,i,n,r),p=cP(e);return p?Xt(()=>c,d=>(e[t]=d,pne(e,n,r,p),d)):c}function pne(e,t,n,r){const i=n.schema.extensions?.stitchingInfo;if(i)for(const o of r.nonProxiableSubschemas){const l=n.parentType.name,c=new Set,p=i.mergedTypes[l]?.selectionSets.get(o);p&&c.add(p);for(const d of r.unproxiableFieldNodes){const m=d.name.value,b=i.mergedTypes[l]?.fieldSelectionSets.get(o)?.[m];b&&c.add(b)}if(c.size){const d={kind:K.SELECTION_SET,selections:Array.from(c).flatMap(m=>m.selections)};Xt(()=>e1(e),m=>{TP(m,e,o,d,r,i,l,t,n)})}}}function TP(e,t,n,r,i,o,l,c,p){if(Ap(e,r)){const d=i.missingFieldsParentMap.get(t);if(d){const m=o.mergedTypes[l]?.resolvers.get(n);if(m){Object.assign(t,e);const b={kind:K.SELECTION_SET,selections:d};Xt(()=>m(t,c,p,n,b,p.parentType,p.parentType),E=>{hne(E,n,b,t,i,c,p)},E=>mne(i,t,E))}}}else for(const d of r.selections)if(d.kind===K.FIELD&&d.selectionSet?.selections?.length){const m=d.alias?.value??d.name.value,b=e[m],E=d.selectionSet;if(b!=null&&!Ap(b,E)){async function y(x,w){const k=x.__typename,N=Xb(e,m);if(N&&k){const D=o.mergedTypes[k]?.delegationPlanBuilder(p.schema,N,p.variableValues!=null&&Object.keys(p.variableValues).length>0?p.variableValues:Zb,p.fragments!=null&&Object.keys(p.fragments).length>0?p.fragments:Zb,dP(w),c,p);if(D?.length)for(const A of D)for(const[C,M]of A){const j=o.mergedTypes[k]?.resolvers.get(C);if(j){const P=await j(x,c,p,C,M,p.parentType,p.parentType);P&&Np(P,C,M,x,x[$l]||=new Map,p,bi(p.path),x[ms]||=[])}}Ap(b,E)&&TP(e,t,n,r,i,o,l,c,p)}}Array.isArray(b)?b.forEach(x=>y(x,d)):y(b,d)}}}function hne(e,t,n,r,i,o,l){Np(e,t,n,r,r[$l],l,bi(l.path),r[ms]);const c=i.missingFieldsParentDeferredMap.get(r);if(c){for(const[p,d]of c)Object.prototype.hasOwnProperty.call(e,p)&&d.resolve(qC(r,p,o,l));i.missingFieldsParentDeferredMap.delete(r)}}function mne(e,t,n){const r=e.missingFieldsParentDeferredMap.get(t);if(r){for(const[i,o]of r)o.reject(n);e.missingFieldsParentDeferredMap.delete(t)}}function Ap(e,t){if(Array.isArray(e)){const r=new Set;for(const i of e){const o=Ap(i,t);if(o===void 0)return;for(const l of o)r.add(l)}return r}if(e===null)return new Set;if(e===void 0)return;const n=new Set;for(const r of t.selections)if(r.kind===K.FIELD){const i=r.alias?.value??r.name.value;if(e[i]===void 0)return;if(Kb(e)){const o=Xb(e,i);o&&n.add(o)}if(e[i]===null)continue;if(r.selectionSet!=null){const o=Ap(e[i],r.selectionSet);if(o===void 0)return;for(const l of o)n.add(l)}}else if(r.kind===K.INLINE_FRAGMENT){const i=Ap(e,r.selectionSet);if(i===void 0)return;for(const o of i)n.add(o)}return n}function e1(e){if(cr(e))return e.then(e1);if(Array.isArray(e))return Promise.all(e.map(e1));if(e!=null&&typeof e=="object"){const t=[],n={};for(const r in e){const i=e1(e[r]);cr(i)?t.push(i.then(o=>{n[r]=o})):n[r]=i}return _p in e&&(n[_p]=e[_p]),$l in e&&(n[$l]=e[$l]),ms in e&&(n[ms]=e[ms]),t.length?Promise.all(t).then(()=>n):n}return e}function gne(e){return!!e?.schema}function vne(e){const{info:t,schema:n,rootValue:r=n.rootValue??t.rootValue,operationName:i=t.operation.name?.value,operation:o=une(t.parentType,t.schema),fieldName:l=t.fieldName,selectionSet:c,fieldNodes:p=t.fieldNodes,context:d}=e,m=cne({sourceSchema:t.schema,sourceParentType:t.parentType,sourceFieldName:t.fieldName,fragments:t.fragments,variableDefinitions:t.operation.variableDefinitions,variableValues:t.variableValues,targetRootValue:r,targetOperationName:i,targetOperation:o,targetFieldName:l,selectionSet:c,fieldNodes:p,context:d,info:t});return yne({...e,request:m})}function xP(e,t,n){const r=Lb(e,t),i=r.getFields()[n];if(!i)throw new Error(`Unable to find field '${n}' in type '${r}'.`);return i.type}function yne(e){const t=bne(e),n=new lne(t),r=n.transformRequest(e.request);return e.validateRequest&&Ene(t,r.document),Xt(()=>Tne(t)(r),function(o){return zf(o)?t.operation==="query"&&mn(t.returnType)?new Cp(async(l,c)=>{const p=new WeakSet;let d=!1;c.finally(()=>{d=!0});try{for await(const m of o){if(d)break;if(m.incremental){const E={};for(const y of m.incremental)if(y.items?.length){for(const x of y.items)qb(E,(y.path||[]).slice(0,-1),x);await l(await n.transformResult({data:E}))}if(m.hasNext===!1)break;continue}const b=await n.transformResult(m);if(Array.isArray(b))for(const E of b){if(d)break;const y=await E;p.has(y)||(p.add(y),await l(y))}else await l(await b)}c()}catch(m){c(m)}}):bC(o,l=>n.transformResult(l)):n.transformResult(o)})}function bne({request:e,schema:t,fieldName:n,returnType:r,args:i,info:o,transforms:l=[],transformedSchema:c,skipTypeMerging:p=!1,onLocatedError:d}){const m=$f(e);let b;n==null?b=m.selectionSet.selections[0].name.value:b=n;const y=o?.schema.extensions?.stitchingInfo?.subschemaMap.get(t)??t,x=m.operation;if(gne(y)){const w=y.schema;return{subschema:t,subschemaConfig:y,targetSchema:w,operation:x,fieldName:b,args:i,context:e.context,info:o,returnType:r??o?.returnType??xP(w,x,b),transforms:y.transforms!=null?y.transforms.concat(l):l,transformedSchema:c??(y instanceof kte?y.transformedSchema:VC(w,y)),skipTypeMerging:p,onLocatedError:d}}return{subschema:t,subschemaConfig:void 0,targetSchema:y,operation:x,fieldName:b,args:i,context:e.context,info:o,returnType:r??o?.returnType??xP(y,x,b),transforms:l,transformedSchema:c??y,skipTypeMerging:p}}function Ene(e,t){const n=pm(e.targetSchema,t);if(n.length>0){if(n.length>1)throw new AggregateError(n,n.map(o=>o.message).join(`,
`));const r=n[0];if(r)throw r.originalError||r}}const Sne={};function Tne(e){const{subschemaConfig:t,targetSchema:n,context:r}=e;let i=t?.executor||mte(n);if(t?.batch){const o=t?.batchingOptions;i=Dte(r??Sne,i,o?.dataLoaderOptions,o?.extensionsReducer)}return i}function xne(e){const t=e.schema,n=e.createProxyingResolver??_ne,r=SC(t),i={};for(const[o,l]of r.entries()){const c=l.name,p=l.getFields();i[c]={};for(const d in p){const m=n({subschemaConfig:e,operation:o,fieldName:d}),b=Cne(e,m);o==="subscription"?i[c][d]={subscribe:b,resolve:wne}:i[c][d]={resolve:b}}}return i}function wne(e){return e}function Cne(e,t){return function(r,i,o,l){if(r!=null){const c=xC(l);if(Kb(r)){const p=fP(r),d=Xb(r,c);if(e===d&&r[c]!==void 0)return Sg(r[c],p,d,o,l)}}return t(r,i,o,l)}}function _ne({subschemaConfig:e,operation:t}){return function(r,i,o,l){return vne({schema:e,operation:t,context:o,info:l})}}const wP=ps(function(t){const n=t.schema,r=xne(t),i=Nne(n,r);return VC(i,t)});function Nne(e,t){return GJ(e,{[zt.ROOT_FIELD]:(n,r,i)=>({...n,...t[i]?.[r]}),[zt.OBJECT_FIELD]:n=>({...n,resolve:dne,subscribe:void 0}),[zt.OBJECT_TYPE]:n=>{const r=n.toConfig();return new si({...r,isTypeOf:void 0})},[zt.INTERFACE_TYPE]:n=>{const r=n.toConfig();return new ao({...r,resolveType:void 0})},[zt.UNION_TYPE]:n=>{const r=n.toConfig();return new Iu({...r,resolveType:void 0})},[zt.ENUM_VALUE]:n=>({...n,value:void 0})})}function Ane(e,t){if(e?.data?.__schema)return QE(e.data,t);if(e?.errors){const n=e.errors.map(r=>Yt(r.message,r));throw e.errors.length===1?n[0]:new AggregateError(n,"Could not obtain introspection result")}throw Yt(`Could not obtain introspection result, received the following as response;
${Ri(e)}`)}function CP(e,t,n){const r=Ai(Ry(n),n);return Xt(()=>Xt(()=>e({document:r,context:t}),i=>zf(i)?i[Symbol.asyncIterator]().next().then(({value:l})=>l):i),i=>Ane(i,n))}const One=Gf.fetch;var BC,_P;function Dne(){if(_P)return BC;_P=1;const e=new TextEncoder,t=new TextDecoder;function n(...y){const x=new n.Request(...y),w=new XMLHttpRequest;w.withCredentials=x.credentials==="include",w.timeout=x[r].timeout,w.open(x.method,x.url,!1);let k=!1;try{w.responseType="arraybuffer"}catch{w.overrideMimeType("text/plain; charset=x-user-defined"),k=!0}for(const C of x.headers)w.setRequestHeader(...C);w.send(x[r].body||null);let N=w.getAllResponseHeaders();N=N&&N.split(`\r
`).filter(Boolean).map(C=>C.split(": ",2));let D=w.response;if(k){const C=new Uint8Array(D.length);for(let M=0;M<D.length;M++)C[M]=D.charCodeAt(M)&255;D=C}const A=new n.Response(D,{headers:N,status:w.status,statusText:w.statusText});return A[r].url=w.responseURL,A[r].redirected=w.responseURL!==x.url,A}const r=Symbol("SyncFetch Internals"),i=["mode","cache","redirect","referrer","integrity"],o={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};class l{constructor(x,w={}){for(const k of i)if(k in w)throw new TypeError(`option ${k} not supported`);if(w.credentials==="same-origin")throw new TypeError("option credentials with value 'same-origin' not supported");if(this[r]={method:w.method||"GET",headers:new n.Headers(w.headers),body:b(w.body),credentials:w.credentials||"omit",timeout:w.timeout||0},typeof x=="string")this[r].url=x;else if(x instanceof l)this[r].url=x.url,w.method||(this[r].method=x.method),w.headers||(this[r].headers=x.headers),w.body||(this[r].body=x[r].body),w.credentials||(this[r].credentials=x.credentials);else throw new TypeError("Request input should be a URL string or a Request object")}get cache(){return"default"}get credentials(){return this[r].credentials}get destination(){return""}get headers(){return this[r].headers}get integrity(){return""}get method(){return this[r].method}get mode(){return"cors"}get priority(){return"auto"}get redirect(){return"follow"}get referrer(){return"about:client"}get referrerPolicy(){return""}get url(){return this[r].url}clone(){return d(this),new l(this.url,this[r])}}class c{constructor(x,w={}){this[r]={body:b(x),bodyUsed:!1,headers:new n.Headers(w.headers),status:w.status,statusText:w.statusText}}get headers(){return this[r].headers}get ok(){const x=this[r].status;return x>=200&&x<300}get redirected(){return this[r].redirected}get status(){return this[r].status}get statusText(){return this[r].statusText}get url(){return this[r].url}clone(){return this.redirect(this[r].url,this[r].status)}redirect(x,w){d(this);const k=new c(this[r].body,{headers:this[r].headers,status:w||this[r].status,statusText:o[w]||this[r].statusText});return k[r].url=x||this[r].url,k[r].redirected=this[r].redirected,k}}class p{constructor(x){this[r]={body:b(x),bodyUsed:!1}}get bodyUsed(){return this[r].bodyUsed}static mixin(x){for(const w of Object.getOwnPropertyNames(p.prototype)){if(w==="constructor")continue;const k=Object.getOwnPropertyDescriptor(p.prototype,w);Object.defineProperty(x,w,{...k,enumerable:!0})}}arrayBuffer(){const x=m(this);return x.buffer.slice(x.byteOffset,x.byteOffset+x.byteLength)}blob(){const x=this.headers&&this.headers.get("content-type");return new Blob([m(this)],x&&{type:x})}text(){return t.decode(m(this))}json(){try{return JSON.parse(this.text())}catch(x){throw new TypeError(`invalid json response body at ${this.url} reason: ${x.message}`,"invalid-json")}}}function d(y){if(y.bodyUsed)throw new TypeError(`body used already for: ${y.url}`)}function m(y){return d(y),y[r].bodyUsed=!0,y[r].body||new Uint8Array}function b(y){return typeof y=="string"?e.encode(y):y||null}p.mixin(l.prototype),p.mixin(c.prototype);class E{constructor(x){if(x instanceof n.Headers)this[r]={...x[r]};else if(this[r]={},Array.isArray(x))for(const[w,k]of x)this.append(w,k);else if(typeof x=="object")for(const w in x)this.set(w,x[w])}append(x,w){x=x.toLowerCase(),this[r][x]||(this[r][x]=[]),this[r][x].push(w)}delete(x){delete this[r][x.toLowerCase()]}set(x,w){this[r][x.toLowerCase()]=[w]}entries(){const x=[];for(const w in this[r])for(const k of this[r][w])x.push([w,k]);return x}get(x){return x=x.toLowerCase(),x in this[r]?this[r][x].join(", "):null}keys(){return Object.keys(this[r])}has(x){return x.toLowerCase()in this[r]}values(){const x=[];for(const w in this[r])for(const k of this[r][w])x.push(k);return x}*[Symbol.iterator](){for(const x in this[r])for(const w of this[r][x])yield[x,w]}}return n.Headers=E,n.Request=l,n.Response=c,BC=n,BC}var kne=Dne();const Rne=Du(kne),Mne=(e,t)=>(typeof e=="string"?delete t?.signal:delete e.signal,Rne(e,t)),$C=e=>import(`${e}`),NP=e=>require(`${e}`);var Qf;(function(e){e.WS="WS",e.LEGACY_WS="LEGACY_WS",e.SSE="SSE",e.GRAPHQL_SSE="GRAPHQL_SSE"})(Qf||(Qf={}));const Lne=["http:","https:","ws:","wss:"];function AP(e){return Lne.some(t=>e.startsWith(t))?vJ(e):!1}class Ine{buildHTTPExecutor(t,n,r){const i=zC(t,{wss:"https",ws:"http"});return qee({endpoint:i,fetch:n,...r})}buildWSExecutor(t,n,r){const o={url:zC(t,{https:"wss",http:"ws"}),webSocketImpl:n,connectionParams:r};return gee(o)}buildWSLegacyExecutor(t,n,r){const i=zC(t,{https:"wss",http:"ws"});return Bee(i,n,r)}getFetch(t,n){if(t){if(typeof t=="string"){const[r,i]=t.split("#");return Xt(()=>n(r),o=>i?o[i]:o)}else if(typeof t=="function")return t}return n===$C?One:Mne}getDefaultMethodFromOptions(t,n){return t&&(n=t),n}getWebSocketImpl(t,n){if(typeof n?.webSocketImpl=="string"){const[r,i]=n.webSocketImpl.split("#");return Xt(()=>t(r),o=>i?o[i]:o)}else return n?.webSocketImpl||Qs}buildSubscriptionExecutor(t,n,r,i){return i?.subscriptionsProtocol===Qf.SSE?this.buildHTTPExecutor(t,n,i):i?.subscriptionsProtocol===Qf.GRAPHQL_SSE?(i?.subscriptionsEndpoint||(t+="/stream"),this.buildHTTPExecutor(t,n,i)):o=>Xt(()=>Xt(()=>this.getWebSocketImpl(r,i),l=>i?.subscriptionsProtocol===Qf.LEGACY_WS?this.buildWSLegacyExecutor(t,l,i):this.buildWSExecutor(t,l,i?.connectionParams)),l=>l(o))}getExecutor(t,n,r){let i;const o=()=>Xt(()=>i||=this.getFetch(r?.customFetch,n),p=>this.buildHTTPExecutor(t,p,r)),l=()=>c||=o();let c;if(r?.subscriptionsEndpoint!=null||r?.subscriptionsProtocol!==Qf.SSE){let d=function(m){return m.operationType=m.operationType||$f(m)?.operation,m.operationType==="subscription"&&M5($f(m))&&(m.operationType="subscription"),m.operationType==="subscription"?p:l()};const p=Xt(()=>i||=this.getFetch(r?.customFetch,n),m=>{const b=r?.subscriptionsEndpoint||t;return this.buildSubscriptionExecutor(b,m,n,r)});return m=>Xt(()=>d(m),b=>b(m))}else return p=>Xt(l,d=>d(p))}getExecutorAsync(t,n){return this.getExecutor(t,$C,n)}getExecutorSync(t,n){return this.getExecutor(t,NP,n)}handleSDL(t,n,r){const i=this.getDefaultMethodFromOptions(r?.method,"GET");return Xt(()=>n(t,{method:i,headers:typeof r?.headers=="function"?r.headers():r?.headers}),o=>Xt(()=>o.text(),l=>VJ(t,l,r)))}async load(t,n){if(!AP(t))return[];let r={location:t},i;if(n?.handleAsSDL||t.endsWith(".graphql")||t.endsWith(".graphqls")){const o=await this.getFetch(n?.customFetch,$C);if(r=await this.handleSDL(t,o,n),!r.schema&&!r.document&&!r.rawSDL)throw new Error("Invalid SDL response");r.schema=r.schema||(r.document?Ly(r.document,n):r.rawSDL?KE(r.rawSDL,n):void 0)}else i=this.getExecutorAsync(t,n),r.schema=await CP(i,{},n);if(!r.schema)throw new Error("Invalid introspected schema");return n?.endpoint&&(i=this.getExecutorAsync(n.endpoint,n)),i&&(r.schema=wP({schema:r.schema,executor:i,batch:n?.batch})),[r]}loadSync(t,n){if(!AP(t))return[];let r={location:t},i;if(n?.handleAsSDL||t.endsWith(".graphql")||t.endsWith(".graphqls")){const o=this.getFetch(n?.customFetch,NP);if(r=this.handleSDL(t,o,n),!r.schema&&!r.document&&!r.rawSDL)throw new Error("Invalid SDL response");r.schema=r.schema||(r.document?Ly(r.document,n):r.rawSDL?KE(r.rawSDL,n):void 0)}else i=this.getExecutorSync(t,n),r.schema=CP(i,{},n);if(!r.schema)throw new Error("Invalid introspected schema");return n?.endpoint&&(i=this.getExecutorSync(n.endpoint,n)),i&&(r.schema=wP({schema:r.schema,executor:i})),[r]}}function zC(e,t){return Object.entries(t).reduce((n,[r,i])=>n.replace(`${r}://`,`${i}://`).replace(`${r}:\\`,`${i}:\\`),e)}var OP={},DP;function Fne(){if(DP)return OP;DP=1;var e={};const t=(...i)=>e.stringify(...i);(function(){var i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o,l,c={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;function d(b){return i.lastIndex=0,i.test(b)?'"'+b.replace(i,function(E){var y=c[E];return typeof y=="string"?y:"\\u"+("0000"+E.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function m(b,E){var y,x,w,k,N=o,D,A=E[b];switch(A&&typeof A=="object"&&typeof A.toJSON=="function"&&(A=A.toJSON(b)),typeof p=="function"&&(A=p.call(E,b,A)),typeof A){case"string":return d(A);case"number":return isFinite(A)?String(A):"null";case"bigint":case"boolean":case"null":return String(A);case"object":if(!A)return"null";if(o+=l,D=[],Object.prototype.toString.apply(A)==="[object Array]"){for(k=A.length,y=0;y<k;y+=1)D[y]=m(y,A)||"null";return w=D.length===0?"[]":o?`[
`+o+D.join(`,
`+o)+`
`+N+"]":"["+D.join(",")+"]",o=N,w}if(p&&typeof p=="object")for(k=p.length,y=0;y<k;y+=1)typeof p[y]=="string"&&(x=p[y],w=m(x,A),w&&D.push(d(x)+(o?": ":":")+w));else Object.keys(A).forEach(function(C){var M=m(C,A);M&&D.push(d(C)+(o?": ":":")+M)});return w=D.length===0?"{}":o?`{
`+o+D.join(`,
`+o)+`
`+N+"}":"{"+D.join(",")+"}",o=N,w}}typeof e.stringify!="function"&&(e.stringify=function(b,E,y){var x;if(o="",l="",typeof y=="number")for(x=0;x<y;x+=1)l+=" ";else typeof y=="string"&&(l=y);if(p=E,E&&typeof E!="function"&&(typeof E!="object"||typeof E.length!="number"))throw new Error("JSON.stringify");return m("",{"":b})})})();function n(i){var o,l,c={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:" "},p,d=function(D){throw{name:"SyntaxError",message:D,at:o,text:p}},m=function(D){return D&&D!==l&&d("Expected '"+D+"' instead of '"+l+"'"),l=p.charAt(o),o+=1,l},b=function(){var D="";for(l==="-"&&(D="-",m("-"));l>="0"&&l<="9";)D+=l,m();if(l===".")for(D+=".";m()&&l>="0"&&l<="9";)D+=l;if(l==="e"||l==="E")for(D+=l,m(),(l==="-"||l==="+")&&(D+=l,m());l>="0"&&l<="9";)D+=l,m();if(!isFinite(Number(D)))d("Bad number");else{const A=Number(D);return Number.isInteger(A)&&!Number.isSafeInteger(A)?BigInt(D):A}},E=function(){var D,A,C="",M;if(l==='"')for(;m();){if(l==='"')return m(),C;if(l==="\\")if(m(),l==="u"){for(M=0,A=0;A<4&&(D=parseInt(m(),16),!!isFinite(D));A+=1)M=M*16+D;C+=String.fromCharCode(M)}else if(typeof c[l]=="string")C+=c[l];else break;else C+=l}d("Bad string")},y=function(){for(;l&&l<=" ";)m()},x=function(){switch(l){case"t":return m("t"),m("r"),m("u"),m("e"),!0;case"f":return m("f"),m("a"),m("l"),m("s"),m("e"),!1;case"n":return m("n"),m("u"),m("l"),m("l"),null}d("Unexpected '"+l+"'")},w,k=function(){var D=[];if(l==="["){if(m("["),y(),l==="]")return m("]"),D;for(;l;){if(D.push(w()),y(),l==="]")return m("]"),D;m(","),y()}}d("Bad array")},N=function(){var D,A={};if(l==="{"){if(m("{"),y(),l==="}")return m("}"),A;for(;l;){if(D=E(),y(),m(":"),A[D]=w(),y(),l==="}")return m("}"),A;m(","),y()}}d("Bad object")};return w=function(){switch(y(),l){case"{":return N();case"[":return k();case'"':return E();case"-":return b();default:return l>="0"&&l<="9"?b():x()}},function(D,A){var C;return p=D+"",o=0,l=" ",C=w(),y(),l&&d("Syntax error"),typeof A=="function"?function M(j,P){var F,V=j[P];return V&&typeof V=="object"&&Object.keys(V).forEach(function($){F=M(V,$),F!==void 0?V[$]=F:delete V[$]}),A.call(j,P,V)}({"":C},""):C}}let r;return typeof globalThis<"u"?r=globalThis:typeof self<"u"?r=self:typeof window<"u"?r=window:typeof Z_<"u"&&(r=Z_),r.BigInt.prototype.toJSON=function(){return this},r.JSON.parse=n(),r.JSON.stringify=t,OP}Fne();const t1=function(){},HC={popstate:[]};let Pne={URL:function(){return{searchParams:{set:t1,append:t1,delete:t1}}},location:{href:"",search:""},history:{pushState:t1},fireEvent:function(e){HC[e].forEach(t=>{t()})},addEventListener:function(e,t){HC[e].push(t)},removeEventListener:function(e,t){const n=HC[e],r=n.findIndex(i=>i===t);n.splice(r,1)}};function oc(){return typeof window<"u"?window:Pne}const kP=[Number,String,Boolean,Date];function jne(e){const{URL:t}=oc(),n=new t(oc().location.href);return Object.keys(e).forEach(r=>{const i=e[r];i!=null?Array.isArray(i)?(n.searchParams.delete(r),i.forEach(o=>{n.searchParams.append(r,o)})):i instanceof Date?isNaN(i.getTime())||n.searchParams.set(r,i.toISOString()):typeof i=="object"?n.searchParams.set(r,JSON.stringify(i)):n.searchParams.set(r,i):n.searchParams.delete(r)}),n}function Vne(e){return Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="number"||typeof t=="string"||typeof t=="boolean")}function Une(e={}){if(!Object.values(e).every(n=>kP.includes(n)||Vne(n)||typeof n=="function"))throw new Error(`Unsupported param types. Must be one of [${kP.map(n=>n.name).join(", ")}]`)}function qne(e={},t={},n=!1){t&&Une(t);const[,r]=L.useState(),i=oc().location.search,o=L.useMemo(()=>new URLSearchParams(i),[i]),l=L.useMemo(()=>{let d=[];o.forEach((b,E)=>{d.push({key:E,value:b})}),d=d.reduce((b,E)=>((b[E.key]=b[E.key]||[]).push(E),b),{}),d=Object.keys(d).map(b=>{const E=d[b];return E.length===1?[b,E[0].value]:[b,E.map(({value:y})=>y)]});const m=Object.assign({},e);return d.forEach(([b,E])=>{m[b]=$ne(b,E,t,e)}),m},[o]);function c(d){const m=jne(d);oc().location.search!==m.search&&(n?oc().history.replaceState({},"",m.toString()):oc().history.pushState({},"",m.toString())),o.toString()!==m.searchParams.toString()&&r({})}L.useEffect(()=>{c(Object.assign(Object.assign({},e),l))},[l]);const p=d=>{c(d)};return L.useEffect(()=>{const d=()=>{r({})};return oc().addEventListener("popstate",d),()=>{oc().removeEventListener("popstate",d)}},[]),[l,p]}const Bne={true:!0,false:!1};function $ne(e,t,n,r){if(!n)return t;const i=n[e],o=t===void 0?r[e]:t;return i===Number?Number(o):i===Boolean?Bne[o]:i===Date?new Date(o):Array.isArray(i)?i.find(l=>l==o)||r[e]:typeof i=="function"?i(o):o}const zne=()=>Y.jsxs("svg",{viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Y.jsx("path",{d:"M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",fill:"url(#a)"}),Y.jsx("path",{d:"M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",fill:"url(#b)"}),Y.jsx("path",{d:"M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",fill:"url(#c)"}),Y.jsxs("mask",{id:"g",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:16,y:14,width:58,height:62,children:[Y.jsx("path",{d:"M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",fill:"url(#d)"}),Y.jsx("path",{d:"M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",fill:"url(#e)"}),Y.jsx("path",{d:"M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",fill:"url(#f)"})]}),Y.jsxs("g",{mask:"url(#g)",children:[Y.jsx("g",{filter:"url(#h)",children:Y.jsx("circle",{cx:73,cy:25,r:26,fill:"#ED2E7E"})}),Y.jsx("g",{filter:"url(#i)",children:Y.jsx("circle",{cx:26,cy:69,r:26,fill:"#1CC8EE"})})]}),Y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",fill:"url(#j)"}),Y.jsx("mask",{id:"k",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:30,y:28,width:30,height:30,children:Y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",fill:"#000"})}),Y.jsxs("g",{mask:"url(#k)",children:[Y.jsx("g",{filter:"url(#l)",children:Y.jsx("circle",{cx:38,cy:6,r:26,fill:"#ED2E7E"})}),Y.jsx("g",{filter:"url(#m)",children:Y.jsx("circle",{cx:63,cy:69,r:26,fill:"#1CC8EE"})})]}),Y.jsxs("defs",{children:[Y.jsxs("linearGradient",{id:"a",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"b",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"c",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"d",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"e",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"f",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("linearGradient",{id:"j",x1:30,y1:28,x2:66.165,y2:44.436,gradientUnits:"userSpaceOnUse",children:[Y.jsx("stop",{stopColor:"#7433FF"}),Y.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),Y.jsxs("filter",{id:"h",x:23,y:-25,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Y.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),Y.jsxs("filter",{id:"i",x:-24,y:19,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Y.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),Y.jsxs("filter",{id:"l",x:-12,y:-44,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Y.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),Y.jsxs("filter",{id:"m",x:13,y:19,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Y.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]})]})]}),Hne=(e,t)=>{const n=e.definitions.filter(r=>!(r.kind===K.OPERATION_DEFINITION&&t&&r.name?.value!==t));return{kind:K.DOCUMENT,definitions:n}};function Gne(e){const t=`#
# Welcome to ${e.title||"Yoga GraphiQL"}
#
# ${e.title||"Yoga GraphiQL"} is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
# {
# field(arg: "value") {
# subField
# }
# }
#
# Keyboard shortcuts:
#
# Prettify Query: Shift-Ctrl-P (or press the prettify button above)
#
# Merge Query: Shift-Ctrl-M (or press the merge button above)
#
# Run Query: Ctrl-Enter (or press the play button above)
#
# Auto Complete: Ctrl-Space (or just start typing)
#
`,n=new URL(e.endpoint??location.pathname,location.href).toString(),r={query:String},i=L.useMemo(()=>new Ine,[]),o=L.useMemo(()=>{if(e.fetcher)return e.endpoint&&console.warn("You are using a custom fetcher and an endpoint. The endpoint will be ignored."),e.fetcher;const b=i.getExecutorAsync(n,{subscriptionsProtocol:Qf.GRAPHQL_SSE,subscriptionsEndpoint:n,credentials:"same-origin",specifiedByUrl:!0,directiveIsRepeatable:!0,inputValueDeprecation:!0,...e,headers:e.additionalHeaders||{},fetch:(...E)=>globalThis.fetch(...E)});return function(y,x){const w=Hne(Ai(y.query),y.operationName??void 0);return b({document:w,operationName:y.operationName??void 0,variables:y.variables,extensions:{headers:x?.headers}})}},[i,n,e.fetcher]),[l,c]=qne({query:e.defaultQuery||t},r,!1),[p,d]=L.useState(l.query?.toString()),m=oJ({showAttribution:!0});return e.query&&!e.onEditQuery&&console.warn("If you provide `query` prop, you should also provide `onEditQuery` prop to handle query changes."),Y.jsx("div",{className:"graphiql-container",children:Y.jsx(hC,{shouldPersistHeaders:!0,plugins:[m],schemaDescription:!0,inputValueDeprecation:!0,query:p,...e,fetcher:o,children:Y.jsx(QF,{isHeadersEditorEnabled:!0,defaultEditorToolsVisibility:!0,...e,onEditQuery:(b,E)=>{c({query:b}),d(b),e.onEditQuery?.(b,E)},children:Y.jsx(nc.Logo,{children:Y.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[Y.jsx("div",{style:{width:40,display:"flex"},children:e?.logo||Y.jsx(zne,{})}),Y.jsx("span",{children:e?.title||Y.jsxs(Y.Fragment,{children:["Yoga Graph",Y.jsx("em",{children:"i"}),"QL"]})})]})})})})})}function Yne(e,t){uV.createRoot(e).render(Y.jsx(Gne,{...t}))}globalThis.React=Ae;var Wne=Object.defineProperty,z=(e,t)=>Wne(e,"name",{value:t,configurable:!0}),Qne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}z(fo,"getDefaultExportFromCjs");var RP={exports:{}},MP;function Qi(){return MP||(MP=1,function(e,t){(function(n,r){e.exports=r()})(Qne,function(){var n=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(n),o=/MSIE \d/.test(n),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),c=/Edge\/(\d+)/.exec(n),p=o||l||c,d=p&&(o?document.documentMode||6:+(c||l)[1]),m=!c&&/WebKit\//.test(n),b=m&&/Qt\/\d+\.\d+/.test(n),E=!c&&/Chrome\//.test(n),y=/Opera\//.test(n),x=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),k=/PhantomJS/.test(n),N=x&&(/Mobile\/\w+/.test(n)||navigator.maxTouchPoints>2),D=/Android/.test(n),A=N||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),C=N||/Mac/.test(r),M=/\bCrOS\b/.test(n),j=/win/i.test(r),P=y&&n.match(/Version\/(\d*\.\d*)/);P&&(P=Number(P[1])),P&&P>=15&&(y=!1,m=!0);var F=C&&(b||y&&(P==null||P<12.11)),V=i||p&&d>=9;function $(s){return new RegExp("(^|\\s)"+s+"(?:$|\\s)\\s*")}z($,"classTest");var X=z(function(s,f){var v=s.className,g=$(f).exec(v);if(g){var T=v.slice(g.index+g[0].length);s.className=v.slice(0,g.index)+(T?g[1]+T:"")}},"rmClass");function J(s){for(var f=s.childNodes.length;f>0;--f)s.removeChild(s.firstChild);return s}z(J,"removeChildren");function ee(s,f){return J(s).appendChild(f)}z(ee,"removeChildrenAndAdd");function Q(s,f,v,g){var T=document.createElement(s);if(v&&(T.className=v),g&&(T.style.cssText=g),typeof f=="string")T.appendChild(document.createTextNode(f));else if(f)for(var O=0;O<f.length;++O)T.appendChild(f[O]);return T}z(Q,"elt");function B(s,f,v,g){var T=Q(s,f,v,g);return T.setAttribute("role","presentation"),T}z(B,"eltP");var ne;document.createRange?ne=z(function(s,f,v,g){var T=document.createRange();return T.setEnd(g||s,v),T.setStart(s,f),T},"range"):ne=z(function(s,f,v){var g=document.body.createTextRange();try{g.moveToElementText(s.parentNode)}catch{return g}return g.collapse(!0),g.moveEnd("character",v),g.moveStart("character",f),g},"range");function re(s,f){if(f.nodeType==3&&(f=f.parentNode),s.contains)return s.contains(f);do if(f.nodeType==11&&(f=f.host),f==s)return!0;while(f=f.parentNode)}z(re,"contains");function se(){var s;try{s=document.activeElement}catch{s=document.body||null}for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}z(se,"activeElt");function fe(s,f){var v=s.className;$(f).test(v)||(s.className+=(v?" ":"")+f)}z(fe,"addClass");function Z(s,f){for(var v=s.split(" "),g=0;g<v.length;g++)v[g]&&!$(v[g]).test(f)&&(f+=" "+v[g]);return f}z(Z,"joinClasses");var ge=z(function(s){s.select()},"selectInput");N?ge=z(function(s){s.selectionStart=0,s.selectionEnd=s.value.length},"selectInput"):p&&(ge=z(function(s){try{s.select()}catch{}},"selectInput"));function ae(s){var f=Array.prototype.slice.call(arguments,1);return function(){return s.apply(null,f)}}z(ae,"bind");function pe(s,f,v){f||(f={});for(var g in s)s.hasOwnProperty(g)&&(v!==!1||!f.hasOwnProperty(g))&&(f[g]=s[g]);return f}z(pe,"copyObj");function ce(s,f,v,g,T){f==null&&(f=s.search(/[^\s\u00a0]/),f==-1&&(f=s.length));for(var O=g||0,I=T||0;;){var U=s.indexOf(" ",O);if(U<0||U>=f)return I+(f-O);I+=U-O,I+=v-I%v,O=U+1}}z(ce,"countColumn");var he=z(function(){this.id=null,this.f=null,this.time=0,this.handler=ae(this.onTimeout,this)},"Delayed");he.prototype.onTimeout=function(s){s.id=0,s.time<=+new Date?s.f():setTimeout(s.handler,s.time-+new Date)},he.prototype.set=function(s,f){this.f=f;var v=+new Date+s;(!this.id||v<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,s),this.time=v)};function Se(s,f){for(var v=0;v<s.length;++v)if(s[v]==f)return v;return-1}z(Se,"indexOf");var Ie=50,Ge={toString:function(){return"CodeMirror.Pass"}},Ze={scroll:!1},It={origin:"*mouse"},vt={origin:"+move"};function at(s,f,v){for(var g=0,T=0;;){var O=s.indexOf(" ",g);O==-1&&(O=s.length);var I=O-g;if(O==s.length||T+I>=f)return g+Math.min(I,f-T);if(T+=O-g,T+=v-T%v,g=O+1,T>=f)return g}}z(at,"findColumn");var Oe=[""];function be(s){for(;Oe.length<=s;)Oe.push(Le(Oe)+" ");return Oe[s]}z(be,"spaceStr");function Le(s){return s[s.length-1]}z(Le,"lst");function Ee(s,f){for(var v=[],g=0;g<s.length;g++)v[g]=f(s[g],g);return v}z(Ee,"map");function oe(s,f,v){for(var g=0,T=v(f);g<s.length&&v(s[g])<=T;)g++;s.splice(g,0,f)}z(oe,"insertSorted");function je(){}z(je,"nothing");function et(s,f){var v;return Object.create?v=Object.create(s):(je.prototype=s,v=new je),f&&pe(f,v),v}z(et,"createObj");var ct=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ye(s){return/\w/.test(s)||s>""&&(s.toUpperCase()!=s.toLowerCase()||ct.test(s))}z(Ye,"isWordCharBasic");function xe(s,f){return f?f.source.indexOf("\\w")>-1&&Ye(s)?!0:f.test(s):Ye(s)}z(xe,"isWordChar");function $e(s){for(var f in s)if(s.hasOwnProperty(f)&&s[f])return!1;return!0}z($e,"isEmpty");var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ht(s){return s.charCodeAt(0)>=768&&nt.test(s)}z(ht,"isExtendingChar");function Ot(s,f,v){for(;(v<0?f>0:f<s.length)&&ht(s.charAt(f));)f+=v;return f}z(Ot,"skipExtendingChars");function jt(s,f,v){for(var g=f>v?-1:1;;){if(f==v)return f;var T=(f+v)/2,O=g<0?Math.ceil(T):Math.floor(T);if(O==f)return s(O)?f:v;s(O)?v=O:f=O+g}}z(jt,"findFirst");function dt(s,f,v,g){if(!s)return g(f,v,"ltr",0);for(var T=!1,O=0;O<s.length;++O){var I=s[O];(I.from<v&&I.to>f||f==v&&I.to==f)&&(g(Math.max(I.from,f),Math.min(I.to,v),I.level==1?"rtl":"ltr",O),T=!0)}T||g(f,v,"ltr")}z(dt,"iterateBidiSections");var Et=null;function pt(s,f,v){var g;Et=null;for(var T=0;T<s.length;++T){var O=s[T];if(O.from<f&&O.to>f)return T;O.to==f&&(O.from!=O.to&&v=="before"?g=T:Et=T),O.from==f&&(O.from!=O.to&&v!="before"?g=T:Et=T)}return g??Et}z(pt,"getBidiPartAt");var Wt=function(){var s="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",f="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function v(H){return H<=247?s.charAt(H):1424<=H&&H<=1524?"R":1536<=H&&H<=1785?f.charAt(H-1536):1774<=H&&H<=2220?"r":8192<=H&&H<=8203?"w":H==8204?"b":"L"}z(v,"charType");var g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,T=/[stwN]/,O=/[LRr]/,I=/[Lb1n]/,U=/[1n]/;function q(H,ie,le){this.level=H,this.from=ie,this.to=le}return z(q,"BidiSpan"),function(H,ie){var le=ie=="ltr"?"L":"R";if(H.length==0||ie=="ltr"&&!g.test(H))return!1;for(var ye=H.length,me=[],we=0;we<ye;++we)me.push(v(H.charCodeAt(we)));for(var Ve=0,Ke=le;Ve<ye;++Ve){var rt=me[Ve];rt=="m"?me[Ve]=Ke:Ke=rt}for(var it=0,Je=le;it<ye;++it){var ut=me[it];ut=="1"&&Je=="r"?me[it]="n":O.test(ut)&&(Je=ut,ut=="r"&&(me[it]="R"))}for(var Ct=1,yt=me[0];Ct<ye-1;++Ct){var Dt=me[Ct];Dt=="+"&&yt=="1"&&me[Ct+1]=="1"?me[Ct]="1":Dt==","&&yt==me[Ct+1]&&(yt=="1"||yt=="n")&&(me[Ct]=yt),yt=Dt}for(var Ln=0;Ln<ye;++Ln){var Dr=me[Ln];if(Dr==",")me[Ln]="N";else if(Dr=="%"){var zn=void 0;for(zn=Ln+1;zn<ye&&me[zn]=="%";++zn);for(var mi=Ln&&me[Ln-1]=="!"||zn<ye&&me[zn]=="1"?"1":"N",gi=Ln;gi<zn;++gi)me[gi]=mi;Ln=zn-1}}for(var rr=0,_i=le;rr<ye;++rr){var Hn=me[rr];_i=="L"&&Hn=="1"?me[rr]="L":O.test(Hn)&&(_i=Hn)}for(var Qt=0;Qt<ye;++Qt)if(T.test(me[Qt])){var gr=void 0;for(gr=Qt+1;gr<ye&&T.test(me[gr]);++gr);for(var ir=(Qt?me[Qt-1]:le)=="L",Tn=(gr<ye?me[gr]:le)=="L",Kc=ir==Tn?ir?"L":"R":le,Is=Qt;Is<gr;++Is)me[Is]=Kc;Qt=gr-1}for(var ti=[],Sn,xn=0;xn<ye;)if(I.test(me[xn])){var ua=xn;for(++xn;xn<ye&&I.test(me[xn]);++xn);ti.push(new q(0,ua,xn))}else{var Wa=xn,Cl=ti.length,Nu=ie=="rtl"?1:0;for(++xn;xn<ye&&me[xn]!="L";++xn);for(var ni=Wa;ni<xn;)if(U.test(me[ni])){Wa<ni&&(ti.splice(Cl,0,new q(1,Wa,ni)),Cl+=Nu);var ri=ni;for(++ni;ni<xn&&U.test(me[ni]);++ni);ti.splice(Cl,0,new q(2,ri,ni)),Cl+=Nu,Wa=ni}else++ni;Wa<xn&&ti.splice(Cl,0,new q(1,Wa,xn))}return ie=="ltr"&&(ti[0].level==1&&(Sn=H.match(/^\s+/))&&(ti[0].from=Sn[0].length,ti.unshift(new q(0,0,Sn[0].length))),Le(ti).level==1&&(Sn=H.match(/\s+$/))&&(Le(ti).to-=Sn[0].length,ti.push(new q(0,ye-Sn[0].length,ye)))),ie=="rtl"?ti.reverse():ti}}();function Vt(s,f){var v=s.order;return v==null&&(v=s.order=Wt(s.text,f)),v}z(Vt,"getOrder");var Jt=[],ot=z(function(s,f,v){if(s.addEventListener)s.addEventListener(f,v,!1);else if(s.attachEvent)s.attachEvent("on"+f,v);else{var g=s._handlers||(s._handlers={});g[f]=(g[f]||Jt).concat(v)}},"on");function qn(s,f){return s._handlers&&s._handlers[f]||Jt}z(qn,"getHandlers");function vn(s,f,v){if(s.removeEventListener)s.removeEventListener(f,v,!1);else if(s.detachEvent)s.detachEvent("on"+f,v);else{var g=s._handlers,T=g&&g[f];if(T){var O=Se(T,v);O>-1&&(g[f]=T.slice(0,O).concat(T.slice(O+1)))}}}z(vn,"off");function mt(s,f){var v=qn(s,f);if(v.length)for(var g=Array.prototype.slice.call(arguments,2),T=0;T<v.length;++T)v[T].apply(null,g)}z(mt,"signal");function yn(s,f,v){return typeof f=="string"&&(f={type:f,preventDefault:function(){this.defaultPrevented=!0}}),mt(s,v||f.type,s,f),wt(f)||f.codemirrorIgnore}z(yn,"signalDOMEvent");function di(s){var f=s._handlers&&s._handlers.cursorActivity;if(f)for(var v=s.curOp.cursorActivityHandlers||(s.curOp.cursorActivityHandlers=[]),g=0;g<f.length;++g)Se(v,f[g])==-1&&v.push(f[g])}z(di,"signalCursorActivity");function on(s,f){return qn(s,f).length>0}z(on,"hasHandler");function Mr(s){s.prototype.on=function(f,v){ot(this,f,v)},s.prototype.off=function(f,v){vn(this,f,v)}}z(Mr,"eventMixin");function An(s){s.preventDefault?s.preventDefault():s.returnValue=!1}z(An,"e_preventDefault");function Xi(s){s.stopPropagation?s.stopPropagation():s.cancelBubble=!0}z(Xi,"e_stopPropagation");function wt(s){return s.defaultPrevented!=null?s.defaultPrevented:s.returnValue==!1}z(wt,"e_defaultPrevented");function Bt(s){An(s),Xi(s)}z(Bt,"e_stop");function un(s){return s.target||s.srcElement}z(un,"e_target");function kn(s){var f=s.which;return f==null&&(s.button&1?f=1:s.button&2?f=3:s.button&4&&(f=2)),C&&s.ctrlKey&&f==1&&(f=3),f}z(kn,"e_button");var tr=function(){if(p&&d<9)return!1;var s=Q("div");return"draggable"in s||"dragDrop"in s}(),Ft;function cn(s){if(Ft==null){var f=Q("span","");ee(s,Q("span",[f,document.createTextNode("x")])),s.firstChild.offsetHeight!=0&&(Ft=f.offsetWidth<=1&&f.offsetHeight>2&&!(p&&d<8))}var v=Ft?Q("span",""):Q("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return v.setAttribute("cm-text",""),v}z(cn,"zeroWidthElement");var Gt;function bn(s){if(Gt!=null)return Gt;var f=ee(s,document.createTextNode("AخA")),v=ne(f,0,1).getBoundingClientRect(),g=ne(f,1,2).getBoundingClientRect();return J(s),!v||v.left==v.right?!1:Gt=g.right-v.right<3}z(bn,"hasBadBidiRects");var Ii=`
b`.split(/\n/).length!=3?function(s){for(var f=0,v=[],g=s.length;f<=g;){var T=s.indexOf(`
`,f);T==-1&&(T=s.length);var O=s.slice(f,s.charAt(T-1)=="\r"?T-1:T),I=O.indexOf("\r");I!=-1?(v.push(O.slice(0,I)),f+=I+1):(v.push(O),f=T+1)}return v}:function(s){return s.split(/\r\n?|\n/)},Ko=window.getSelection?function(s){try{return s.selectionStart!=s.selectionEnd}catch{return!1}}:function(s){var f;try{f=s.ownerDocument.selection.createRange()}catch{}return!f||f.parentElement()!=s?!1:f.compareEndPoints("StartToEnd",f)!=0},Xo=function(){var s=Q("div");return"oncopy"in s?!0:(s.setAttribute("oncopy","return;"),typeof s.oncopy=="function")}(),Ao=null;function Er(s){if(Ao!=null)return Ao;var f=ee(s,Q("span","x")),v=f.getBoundingClientRect(),g=ne(f,0,1).getBoundingClientRect();return Ao=Math.abs(v.left-g.left)>1}z(Er,"hasBadZoomedRects");var Bn={},Lr={};function Fi(s,f){arguments.length>2&&(f.dependencies=Array.prototype.slice.call(arguments,2)),Bn[s]=f}z(Fi,"defineMode");function $r(s,f){Lr[s]=f}z($r,"defineMIME");function Oo(s){if(typeof s=="string"&&Lr.hasOwnProperty(s))s=Lr[s];else if(s&&typeof s.name=="string"&&Lr.hasOwnProperty(s.name)){var f=Lr[s.name];typeof f=="string"&&(f={name:f}),s=et(f,s),s.name=f.name}else{if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(s))return Oo("application/xml");if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(s))return Oo("application/json")}return typeof s=="string"?{name:s}:s||{name:"null"}}z(Oo,"resolveMode");function po(s,f){f=Oo(f);var v=Bn[f.name];if(!v)return po(s,"text/plain");var g=v(s,f);if(Rn.hasOwnProperty(f.name)){var T=Rn[f.name];for(var O in T)T.hasOwnProperty(O)&&(g.hasOwnProperty(O)&&(g["_"+O]=g[O]),g[O]=T[O])}if(g.name=f.name,f.helperType&&(g.helperType=f.helperType),f.modeProps)for(var I in f.modeProps)g[I]=f.modeProps[I];return g}z(po,"getMode");var Rn={};function Zi(s,f){var v=Rn.hasOwnProperty(s)?Rn[s]:Rn[s]={};pe(f,v)}z(Zi,"extendMode");function Pi(s,f){if(f===!0)return f;if(s.copyState)return s.copyState(f);var v={};for(var g in f){var T=f[g];T instanceof Array&&(T=T.concat([])),v[g]=T}return v}z(Pi,"copyState");function ho(s,f){for(var v;s.innerMode&&(v=s.innerMode(f),!(!v||v.mode==s));)f=v.state,s=v.mode;return v||{mode:s,state:f}}z(ho,"innerMode");function Do(s,f,v){return s.startState?s.startState(f,v):!0}z(Do,"startState");var nr=z(function(s,f,v){this.pos=this.start=0,this.string=s,this.tabSize=f||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=v},"StringStream");nr.prototype.eol=function(){return this.pos>=this.string.length},nr.prototype.sol=function(){return this.pos==this.lineStart},nr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nr.prototype.eat=function(s){var f=this.string.charAt(this.pos),v;if(typeof s=="string"?v=f==s:v=f&&(s.test?s.test(f):s(f)),v)return++this.pos,f},nr.prototype.eatWhile=function(s){for(var f=this.pos;this.eat(s););return this.pos>f},nr.prototype.eatSpace=function(){for(var s=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>s},nr.prototype.skipToEnd=function(){this.pos=this.string.length},nr.prototype.skipTo=function(s){var f=this.string.indexOf(s,this.pos);if(f>-1)return this.pos=f,!0},nr.prototype.backUp=function(s){this.pos-=s},nr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},nr.prototype.indentation=function(){return ce(this.string,null,this.tabSize)-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},nr.prototype.match=function(s,f,v){if(typeof s=="string"){var g=z(function(I){return v?I.toLowerCase():I},"cased"),T=this.string.substr(this.pos,s.length);if(g(T)==g(s))return f!==!1&&(this.pos+=s.length),!0}else{var O=this.string.slice(this.pos).match(s);return O&&O.index>0?null:(O&&f!==!1&&(this.pos+=O[0].length),O)}},nr.prototype.current=function(){return this.string.slice(this.start,this.pos)},nr.prototype.hideFirstChars=function(s,f){this.lineStart+=s;try{return f()}finally{this.lineStart-=s}},nr.prototype.lookAhead=function(s){var f=this.lineOracle;return f&&f.lookAhead(s)},nr.prototype.baseToken=function(){var s=this.lineOracle;return s&&s.baseToken(this.pos)};function ft(s,f){if(f-=s.first,f<0||f>=s.size)throw new Error("There is no line "+(f+s.first)+" in the document.");for(var v=s;!v.lines;)for(var g=0;;++g){var T=v.children[g],O=T.chunkSize();if(f<O){v=T;break}f-=O}return v.lines[f]}z(ft,"getLine");function mo(s,f,v){var g=[],T=f.line;return s.iter(f.line,v.line+1,function(O){var I=O.text;T==v.line&&(I=I.slice(0,v.ch)),T==f.line&&(I=I.slice(f.ch)),g.push(I),++T}),g}z(mo,"getBetween");function Yl(s,f,v){var g=[];return s.iter(f,v,function(T){g.push(T.text)}),g}z(Yl,"getLines");function zr(s,f){var v=f-s.height;if(v)for(var g=s;g;g=g.parent)g.height+=v}z(zr,"updateLineHeight");function an(s){if(s.parent==null)return null;for(var f=s.parent,v=Se(f.lines,s),g=f.parent;g;f=g,g=g.parent)for(var T=0;g.children[T]!=f;++T)v+=g.children[T].chunkSize();return v+f.first}z(an,"lineNo");function Ir(s,f){var v=s.first;e:do{for(var g=0;g<s.children.length;++g){var T=s.children[g],O=T.height;if(f<O){s=T;continue e}f-=O,v+=T.chunkSize()}return v}while(!s.lines);for(var I=0;I<s.lines.length;++I){var U=s.lines[I],q=U.height;if(f<q)break;f-=q}return v+I}z(Ir,"lineAtHeight");function Zo(s,f){return f>=s.first&&f<s.first+s.size}z(Zo,"isLine");function Js(s,f){return String(s.lineNumberFormatter(f+s.firstLineNumber))}z(Js,"lineNumberFor");function ze(s,f,v){if(v===void 0&&(v=null),!(this instanceof ze))return new ze(s,f,v);this.line=s,this.ch=f,this.sticky=v}z(ze,"Pos");function W(s,f){return s.line-f.line||s.ch-f.ch}z(W,"cmp");function ue(s,f){return s.sticky==f.sticky&&W(s,f)==0}z(ue,"equalCursorPos");function Fe(s){return ze(s.line,s.ch)}z(Fe,"copyPos");function We(s,f){return W(s,f)<0?f:s}z(We,"maxPos");function St(s,f){return W(s,f)<0?s:f}z(St,"minPos");function en(s,f){return Math.max(s.first,Math.min(f,s.first+s.size-1))}z(en,"clipLine");function st(s,f){if(f.line<s.first)return ze(s.first,0);var v=s.first+s.size-1;return f.line>v?ze(v,ft(s,v).text.length):_r(f,ft(s,f.line).text.length)}z(st,"clipPos");function _r(s,f){var v=s.ch;return v==null||v>f?ze(s.line,f):v<0?ze(s.line,0):s}z(_r,"clipToLen");function ji(s,f){for(var v=[],g=0;g<f.length;g++)v[g]=st(s,f[g]);return v}z(ji,"clipPosArray");var vs=z(function(s,f){this.state=s,this.lookAhead=f},"SavedContext"),Aa=z(function(s,f,v,g){this.state=f,this.doc=s,this.line=v,this.maxLookAhead=g||0,this.baseTokens=null,this.baseTokenPos=1},"Context");Aa.prototype.lookAhead=function(s){var f=this.doc.getLine(this.line+s);return f!=null&&s>this.maxLookAhead&&(this.maxLookAhead=s),f},Aa.prototype.baseToken=function(s){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=s;)this.baseTokenPos+=2;var f=this.baseTokens[this.baseTokenPos+1];return{type:f&&f.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-s}},Aa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Aa.fromSaved=function(s,f,v){return f instanceof vs?new Aa(s,Pi(s.mode,f.state),v,f.lookAhead):new Aa(s,Pi(s.mode,f),v)},Aa.prototype.save=function(s){var f=s!==!1?Pi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vs(f,this.maxLookAhead):f};function Ji(s,f,v,g){var T=[s.state.modeGen],O={};Mp(s,f.text,s.doc.mode,v,function(H,ie){return T.push(H,ie)},O,g);for(var I=v.state,U=z(function(H){v.baseTokens=T;var ie=s.state.overlays[H],le=1,ye=0;v.state=!0,Mp(s,f.text,ie.mode,v,function(me,we){for(var Ve=le;ye<me;){var Ke=T[le];Ke>me&&T.splice(le,1,me,T[le+1],Ke),le+=2,ye=Math.min(me,Ke)}if(we)if(ie.opaque)T.splice(Ve,le-Ve,me,"overlay "+we),le=Ve+2;else for(;Ve<le;Ve+=2){var rt=T[Ve+1];T[Ve+1]=(rt?rt+" ":"")+"overlay "+we}},O),v.state=I,v.baseTokens=null,v.baseTokenPos=1},"loop"),q=0;q<s.state.overlays.length;++q)U(q);return{styles:T,classes:O.bgClass||O.textClass?O:null}}z(Ji,"highlightLine");function Jf(s,f,v){if(!f.styles||f.styles[0]!=s.state.modeGen){var g=Wl(s,an(f)),T=f.text.length>s.options.maxHighlightLength&&Pi(s.doc.mode,g.state),O=Ji(s,f,g);T&&(g.state=T),f.stateAfter=g.save(!T),f.styles=O.styles,O.classes?f.styleClasses=O.classes:f.styleClasses&&(f.styleClasses=null),v===s.doc.highlightFrontier&&(s.doc.modeFrontier=Math.max(s.doc.modeFrontier,++s.doc.highlightFrontier))}return f.styles}z(Jf,"getLineStyles");function Wl(s,f,v){var g=s.doc,T=s.display;if(!g.mode.startState)return new Aa(g,!0,f);var O=Dg(s,f,v),I=O>g.first&&ft(g,O-1).stateAfter,U=I?Aa.fromSaved(g,I,O):new Aa(g,Do(g.mode),O);return g.iter(O,f,function(q){lc(s,q.text,U);var H=U.line;q.stateAfter=H==f-1||H%5==0||H>=T.viewFrom&&H<T.viewTo?U.save():null,U.nextLine()}),v&&(g.modeFrontier=U.line),U}z(Wl,"getContextBefore");function lc(s,f,v,g){var T=s.doc.mode,O=new nr(f,s.options.tabSize,v);for(O.start=O.pos=g||0,f==""&&el(T,v.state);!O.eol();)ed(T,O,v.state),O.start=O.pos}z(lc,"processLine");function el(s,f){if(s.blankLine)return s.blankLine(f);if(s.innerMode){var v=ho(s,f);if(v.mode.blankLine)return v.mode.blankLine(v.state)}}z(el,"callBlankLine");function ed(s,f,v,g){for(var T=0;T<10;T++){g&&(g[0]=ho(s,v).mode);var O=s.token(f,v);if(f.pos>f.start)return O}throw new Error("Mode "+s.name+" failed to advance stream.")}z(ed,"readToken");var Ag=z(function(s,f,v){this.start=s.start,this.end=s.pos,this.string=s.current(),this.type=f||null,this.state=v},"Token");function tl(s,f,v,g){var T=s.doc,O=T.mode,I;f=st(T,f);var U=ft(T,f.line),q=Wl(s,f.line,v),H=new nr(U.text,s.options.tabSize,q),ie;for(g&&(ie=[]);(g||H.pos<f.ch)&&!H.eol();)H.start=H.pos,I=ed(O,H,q.state),g&&ie.push(new Ag(H,I,Pi(T.mode,q.state)));return g?ie:new Ag(H,I,q.state)}z(tl,"takeToken");function Og(s,f){if(s)for(;;){var v=s.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!v)break;s=s.slice(0,v.index)+s.slice(v.index+v[0].length);var g=v[1]?"bgClass":"textClass";f[g]==null?f[g]=v[2]:new RegExp("(?:^|\\s)"+v[2]+"(?:$|\\s)").test(f[g])||(f[g]+=" "+v[2])}return s}z(Og,"extractLineClasses");function Mp(s,f,v,g,T,O,I){var U=v.flattenSpans;U==null&&(U=s.options.flattenSpans);var q=0,H=null,ie=new nr(f,s.options.tabSize,g),le,ye=s.options.addModeClass&&[null];for(f==""&&Og(el(v,g.state),O);!ie.eol();){if(ie.pos>s.options.maxHighlightLength?(U=!1,I&&lc(s,f,g,ie.pos),ie.pos=f.length,le=null):le=Og(ed(v,ie,g.state,ye),O),ye){var me=ye[0].name;me&&(le="m-"+(le?me+" "+le:me))}if(!U||H!=le){for(;q<ie.start;)q=Math.min(ie.start,q+5e3),T(q,H);H=le}ie.start=ie.pos}for(;q<ie.pos;){var we=Math.min(ie.pos,q+5e3);T(we,H),q=we}}z(Mp,"runMode");function Dg(s,f,v){for(var g,T,O=s.doc,I=v?-1:f-(s.doc.mode.innerMode?1e3:100),U=f;U>I;--U){if(U<=O.first)return O.first;var q=ft(O,U-1),H=q.stateAfter;if(H&&(!v||U+(H instanceof vs?H.lookAhead:0)<=O.modeFrontier))return U;var ie=ce(q.text,null,s.options.tabSize);(T==null||g>ie)&&(T=U-1,g=ie)}return T}z(Dg,"findStartLine");function Lp(s,f){if(s.modeFrontier=Math.min(s.modeFrontier,f),!(s.highlightFrontier<f-10)){for(var v=s.first,g=f-1;g>v;g--){var T=ft(s,g).stateAfter;if(T&&(!(T instanceof vs)||g+T.lookAhead<f)){v=g+1;break}}s.highlightFrontier=Math.min(s.highlightFrontier,v)}}z(Lp,"retreatFrontier");var f1=!1,ys=!1;function td(){f1=!0}z(td,"seeReadOnlySpans");function Ip(){ys=!0}z(Ip,"seeCollapsedSpans");function Ql(s,f,v){this.marker=s,this.from=f,this.to=v}z(Ql,"MarkedSpan");function Jo(s,f){if(s)for(var v=0;v<s.length;++v){var g=s[v];if(g.marker==f)return g}}z(Jo,"getMarkedSpanFor");function Kl(s,f){for(var v,g=0;g<s.length;++g)s[g]!=f&&(v||(v=[])).push(s[g]);return v}z(Kl,"removeMarkedSpan");function kg(s,f,v){var g=v&&window.WeakSet&&(v.markedSpans||(v.markedSpans=new WeakSet));g&&s.markedSpans&&g.has(s.markedSpans)?s.markedSpans.push(f):(s.markedSpans=s.markedSpans?s.markedSpans.concat([f]):[f],g&&g.add(s.markedSpans)),f.marker.attachLine(s)}z(kg,"addMarkedSpan");function Fp(s,f,v){var g;if(s)for(var T=0;T<s.length;++T){var O=s[T],I=O.marker,U=O.from==null||(I.inclusiveLeft?O.from<=f:O.from<f);if(U||O.from==f&&I.type=="bookmark"&&(!v||!O.marker.insertLeft)){var q=O.to==null||(I.inclusiveRight?O.to>=f:O.to>f);(g||(g=[])).push(new Ql(I,O.from,q?null:O.to))}}return g}z(Fp,"markedSpansBefore");function Rg(s,f,v){var g;if(s)for(var T=0;T<s.length;++T){var O=s[T],I=O.marker,U=O.to==null||(I.inclusiveRight?O.to>=f:O.to>f);if(U||O.from==f&&I.type=="bookmark"&&(!v||O.marker.insertLeft)){var q=O.from==null||(I.inclusiveLeft?O.from<=f:O.from<f);(g||(g=[])).push(new Ql(I,q?null:O.from-f,O.to==null?null:O.to-f))}}return g}z(Rg,"markedSpansAfter");function nl(s,f){if(f.full)return null;var v=Zo(s,f.from.line)&&ft(s,f.from.line).markedSpans,g=Zo(s,f.to.line)&&ft(s,f.to.line).markedSpans;if(!v&&!g)return null;var T=f.from.ch,O=f.to.ch,I=W(f.from,f.to)==0,U=Fp(v,T,I),q=Rg(g,O,I),H=f.text.length==1,ie=Le(f.text).length+(H?T:0);if(U)for(var le=0;le<U.length;++le){var ye=U[le];if(ye.to==null){var me=Jo(q,ye.marker);me?H&&(ye.to=me.to==null?null:me.to+ie):ye.to=T}}if(q)for(var we=0;we<q.length;++we){var Ve=q[we];if(Ve.to!=null&&(Ve.to+=ie),Ve.from==null){var Ke=Jo(U,Ve.marker);Ke||(Ve.from=ie,H&&(U||(U=[])).push(Ve))}else Ve.from+=ie,H&&(U||(U=[])).push(Ve)}U&&(U=ea(U)),q&&q!=U&&(q=ea(q));var rt=[U];if(!H){var it=f.text.length-2,Je;if(it>0&&U)for(var ut=0;ut<U.length;++ut)U[ut].to==null&&(Je||(Je=[])).push(new Ql(U[ut].marker,null,null));for(var Ct=0;Ct<it;++Ct)rt.push(Je);rt.push(q)}return rt}z(nl,"stretchSpansOverChange");function ea(s){for(var f=0;f<s.length;++f){var v=s[f];v.from!=null&&v.from==v.to&&v.marker.clearWhenEmpty!==!1&&s.splice(f--,1)}return s.length?s:null}z(ea,"clearEmptySpans");function Pp(s,f,v){var g=null;if(s.iter(f.line,v.line+1,function(me){if(me.markedSpans)for(var we=0;we<me.markedSpans.length;++we){var Ve=me.markedSpans[we].marker;Ve.readOnly&&(!g||Se(g,Ve)==-1)&&(g||(g=[])).push(Ve)}}),!g)return null;for(var T=[{from:f,to:v}],O=0;O<g.length;++O)for(var I=g[O],U=I.find(0),q=0;q<T.length;++q){var H=T[q];if(!(W(H.to,U.from)<0||W(H.from,U.to)>0)){var ie=[q,1],le=W(H.from,U.from),ye=W(H.to,U.to);(le<0||!I.inclusiveLeft&&!le)&&ie.push({from:H.from,to:U.from}),(ye>0||!I.inclusiveRight&&!ye)&&ie.push({from:U.to,to:H.to}),T.splice.apply(T,ie),q+=ie.length-3}}return T}z(Pp,"removeReadOnlyRanges");function Xl(s){var f=s.markedSpans;if(f){for(var v=0;v<f.length;++v)f[v].marker.detachLine(s);s.markedSpans=null}}z(Xl,"detachMarkedSpans");function Oa(s,f){if(f){for(var v=0;v<f.length;++v)f[v].marker.attachLine(s);s.markedSpans=f}}z(Oa,"attachMarkedSpans");function Zl(s){return s.inclusiveLeft?-1:0}z(Zl,"extraLeft");function rl(s){return s.inclusiveRight?1:0}z(rl,"extraRight");function nd(s,f){var v=s.lines.length-f.lines.length;if(v!=0)return v;var g=s.find(),T=f.find(),O=W(g.from,T.from)||Zl(s)-Zl(f);if(O)return-O;var I=W(g.to,T.to)||rl(s)-rl(f);return I||f.id-s.id}z(nd,"compareCollapsedMarkers");function uc(s,f){var v=ys&&s.markedSpans,g;if(v)for(var T=void 0,O=0;O<v.length;++O)T=v[O],T.marker.collapsed&&(f?T.from:T.to)==null&&(!g||nd(g,T.marker)<0)&&(g=T.marker);return g}z(uc,"collapsedSpanAtSide");function cc(s){return uc(s,!0)}z(cc,"collapsedSpanAtStart");function fc(s){return uc(s,!1)}z(fc,"collapsedSpanAtEnd");function Vi(s,f){var v=ys&&s.markedSpans,g;if(v)for(var T=0;T<v.length;++T){var O=v[T];O.marker.collapsed&&(O.from==null||O.from<f)&&(O.to==null||O.to>f)&&(!g||nd(g,O.marker)<0)&&(g=O.marker)}return g}z(Vi,"collapsedSpanAround");function bs(s,f,v,g,T){var O=ft(s,f),I=ys&&O.markedSpans;if(I)for(var U=0;U<I.length;++U){var q=I[U];if(q.marker.collapsed){var H=q.marker.find(0),ie=W(H.from,v)||Zl(q.marker)-Zl(T),le=W(H.to,g)||rl(q.marker)-rl(T);if(!(ie>=0&&le<=0||ie<=0&&le>=0)&&(ie<=0&&(q.marker.inclusiveRight&&T.inclusiveLeft?W(H.to,v)>=0:W(H.to,v)>0)||ie>=0&&(q.marker.inclusiveRight&&T.inclusiveLeft?W(H.from,g)<=0:W(H.from,g)<0)))return!0}}}z(bs,"conflictingCollapsedRange");function Ui(s){for(var f;f=cc(s);)s=f.find(-1,!0).line;return s}z(Ui,"visualLine");function dc(s){for(var f;f=fc(s);)s=f.find(1,!0).line;return s}z(dc,"visualLineEnd");function d1(s){for(var f,v;f=fc(s);)s=f.find(1,!0).line,(v||(v=[])).push(s);return v}z(d1,"visualLineContinued");function pc(s,f){var v=ft(s,f),g=Ui(v);return v==g?f:an(g)}z(pc,"visualLineNo");function rd(s,f){if(f>s.lastLine())return f;var v=ft(s,f),g;if(!go(s,v))return f;for(;g=fc(v);)v=g.find(1,!0).line;return an(v)+1}z(rd,"visualLineEndNo");function go(s,f){var v=ys&&f.markedSpans;if(v){for(var g=void 0,T=0;T<v.length;++T)if(g=v[T],!!g.marker.collapsed&&(g.from==null||!g.marker.widgetNode&&g.from==0&&g.marker.inclusiveLeft&&Jl(s,f,g)))return!0}}z(go,"lineIsHidden");function Jl(s,f,v){if(v.to==null){var g=v.marker.find(1,!0);return Jl(s,g.line,Jo(g.line.markedSpans,v.marker))}if(v.marker.inclusiveRight&&v.to==f.text.length)return!0;for(var T=void 0,O=0;O<f.markedSpans.length;++O)if(T=f.markedSpans[O],T.marker.collapsed&&!T.marker.widgetNode&&T.from==v.to&&(T.to==null||T.to!=v.from)&&(T.marker.inclusiveLeft||v.marker.inclusiveRight)&&Jl(s,f,T))return!0}z(Jl,"lineIsHiddenInner");function ta(s){s=Ui(s);for(var f=0,v=s.parent,g=0;g<v.lines.length;++g){var T=v.lines[g];if(T==s)break;f+=T.height}for(var O=v.parent;O;v=O,O=v.parent)for(var I=0;I<O.children.length;++I){var U=O.children[I];if(U==v)break;f+=U.height}return f}z(ta,"heightAtLine");function id(s){if(s.height==0)return 0;for(var f=s.text.length,v,g=s;v=cc(g);){var T=v.find(0,!0);g=T.from.line,f+=T.from.ch-T.to.ch}for(g=s;v=fc(g);){var O=v.find(0,!0);f-=g.text.length-O.from.ch,g=O.to.line,f+=g.text.length-O.to.ch}return f}z(id,"lineLength");function jp(s){var f=s.display,v=s.doc;f.maxLine=ft(v,v.first),f.maxLineLength=id(f.maxLine),f.maxLineChanged=!0,v.iter(function(g){var T=id(g);T>f.maxLineLength&&(f.maxLineLength=T,f.maxLine=g)})}z(jp,"findMaxLine");var hc=z(function(s,f,v){this.text=s,Oa(this,f),this.height=v?v(this):1},"Line");hc.prototype.lineNo=function(){return an(this)},Mr(hc);function Vp(s,f,v,g){s.text=f,s.stateAfter&&(s.stateAfter=null),s.styles&&(s.styles=null),s.order!=null&&(s.order=null),Xl(s),Oa(s,v);var T=g?g(s):1;T!=s.height&&zr(s,T)}z(Vp,"updateLine");function p1(s){s.parent=null,Xl(s)}z(p1,"cleanUpLine");var f_={},d_={};function Mg(s,f){if(!s||/^\s*$/.test(s))return null;var v=f.addModeClass?d_:f_;return v[s]||(v[s]=s.replace(/\S+/g,"cm-$&"))}z(Mg,"interpretTokenStyle");function Lg(s,f){var v=B("span",null,null,m?"padding-right: .1px":null),g={pre:B("pre",[v],"CodeMirror-line"),content:v,col:0,pos:0,cm:s,trailingSpace:!1,splitSpaces:s.getOption("lineWrapping")};f.measure={};for(var T=0;T<=(f.rest?f.rest.length:0);T++){var O=T?f.rest[T-1]:f.line,I=void 0;g.pos=0,g.addToken=h1,bn(s.display.measure)&&(I=Vt(O,s.doc.direction))&&(g.addToken=g1(g.addToken,I)),g.map=[];var U=f!=s.display.externalMeasured&&an(O);Up(O,g,Jf(s,O,U)),O.styleClasses&&(O.styleClasses.bgClass&&(g.bgClass=Z(O.styleClasses.bgClass,g.bgClass||"")),O.styleClasses.textClass&&(g.textClass=Z(O.styleClasses.textClass,g.textClass||""))),g.map.length==0&&g.map.push(0,0,g.content.appendChild(cn(s.display.measure))),T==0?(f.measure.map=g.map,f.measure.cache={}):((f.measure.maps||(f.measure.maps=[])).push(g.map),(f.measure.caches||(f.measure.caches=[])).push({}))}if(m){var q=g.content.lastChild;(/\bcm-tab\b/.test(q.className)||q.querySelector&&q.querySelector(".cm-tab"))&&(g.content.className="cm-tab-wrap-hack")}return mt(s,"renderLine",s,f.line,g.pre),g.pre.className&&(g.textClass=Z(g.pre.className,g.textClass||"")),g}z(Lg,"buildLineContent");function Ig(s){var f=Q("span","•","cm-invalidchar");return f.title="\\u"+s.charCodeAt(0).toString(16),f.setAttribute("aria-label",f.title),f}z(Ig,"defaultSpecialCharPlaceholder");function h1(s,f,v,g,T,O,I){if(f){var U=s.splitSpaces?m1(f,s.trailingSpace):f,q=s.cm.state.specialChars,H=!1,ie;if(!q.test(f))s.col+=f.length,ie=document.createTextNode(U),s.map.push(s.pos,s.pos+f.length,ie),p&&d<9&&(H=!0),s.pos+=f.length;else{ie=document.createDocumentFragment();for(var le=0;;){q.lastIndex=le;var ye=q.exec(f),me=ye?ye.index-le:f.length-le;if(me){var we=document.createTextNode(U.slice(le,le+me));p&&d<9?ie.appendChild(Q("span",[we])):ie.appendChild(we),s.map.push(s.pos,s.pos+me,we),s.col+=me,s.pos+=me}if(!ye)break;le+=me+1;var Ve=void 0;if(ye[0]==" "){var Ke=s.cm.options.tabSize,rt=Ke-s.col%Ke;Ve=ie.appendChild(Q("span",be(rt),"cm-tab")),Ve.setAttribute("role","presentation"),Ve.setAttribute("cm-text"," "),s.col+=rt}else ye[0]=="\r"||ye[0]==`
`?(Ve=ie.appendChild(Q("span",ye[0]=="\r"?"␍":"","cm-invalidchar")),Ve.setAttribute("cm-text",ye[0]),s.col+=1):(Ve=s.cm.options.specialCharPlaceholder(ye[0]),Ve.setAttribute("cm-text",ye[0]),p&&d<9?ie.appendChild(Q("span",[Ve])):ie.appendChild(Ve),s.col+=1);s.map.push(s.pos,s.pos+1,Ve),s.pos++}}if(s.trailingSpace=U.charCodeAt(f.length-1)==32,v||g||T||H||O||I){var it=v||"";g&&(it+=g),T&&(it+=T);var Je=Q("span",[ie],it,O);if(I)for(var ut in I)I.hasOwnProperty(ut)&&ut!="style"&&ut!="class"&&Je.setAttribute(ut,I[ut]);return s.content.appendChild(Je)}s.content.appendChild(ie)}}z(h1,"buildToken");function m1(s,f){if(s.length>1&&!/ /.test(s))return s;for(var v=f,g="",T=0;T<s.length;T++){var O=s.charAt(T);O==" "&&v&&(T==s.length-1||s.charCodeAt(T+1)==32)&&(O=" "),g+=O,v=O==" "}return g}z(m1,"splitSpaces");function g1(s,f){return function(v,g,T,O,I,U,q){T=T?T+" cm-force-border":"cm-force-border";for(var H=v.pos,ie=H+g.length;;){for(var le=void 0,ye=0;ye<f.length&&(le=f[ye],!(le.to>H&&le.from<=H));ye++);if(le.to>=ie)return s(v,g,T,O,I,U,q);s(v,g.slice(0,le.to-H),T,O,null,U,q),O=null,g=g.slice(le.to-H),H=le.to}}}z(g1,"buildTokenBadBidi");function Fg(s,f,v,g){var T=!g&&v.widgetNode;T&&s.map.push(s.pos,s.pos+f,T),!g&&s.cm.display.input.needsContentAttribute&&(T||(T=s.content.appendChild(document.createElement("span"))),T.setAttribute("cm-marker",v.id)),T&&(s.cm.display.input.setUneditable(T),s.content.appendChild(T)),s.pos+=f,s.trailingSpace=!1}z(Fg,"buildCollapsedSpan");function Up(s,f,v){var g=s.markedSpans,T=s.text,O=0;if(!g){for(var I=1;I<v.length;I+=2)f.addToken(f,T.slice(O,O=v[I]),Mg(v[I+1],f.cm.options));return}for(var U=T.length,q=0,H=1,ie="",le,ye,me=0,we,Ve,Ke,rt,it;;){if(me==q){we=Ve=Ke=ye="",it=null,rt=null,me=1/0;for(var Je=[],ut=void 0,Ct=0;Ct<g.length;++Ct){var yt=g[Ct],Dt=yt.marker;if(Dt.type=="bookmark"&&yt.from==q&&Dt.widgetNode)Je.push(Dt);else if(yt.from<=q&&(yt.to==null||yt.to>q||Dt.collapsed&&yt.to==q&&yt.from==q)){if(yt.to!=null&&yt.to!=q&&me>yt.to&&(me=yt.to,Ve=""),Dt.className&&(we+=" "+Dt.className),Dt.css&&(ye=(ye?ye+";":"")+Dt.css),Dt.startStyle&&yt.from==q&&(Ke+=" "+Dt.startStyle),Dt.endStyle&&yt.to==me&&(ut||(ut=[])).push(Dt.endStyle,yt.to),Dt.title&&((it||(it={})).title=Dt.title),Dt.attributes)for(var Ln in Dt.attributes)(it||(it={}))[Ln]=Dt.attributes[Ln];Dt.collapsed&&(!rt||nd(rt.marker,Dt)<0)&&(rt=yt)}else yt.from>q&&me>yt.from&&(me=yt.from)}if(ut)for(var Dr=0;Dr<ut.length;Dr+=2)ut[Dr+1]==me&&(Ve+=" "+ut[Dr]);if(!rt||rt.from==q)for(var zn=0;zn<Je.length;++zn)Fg(f,0,Je[zn]);if(rt&&(rt.from||0)==q){if(Fg(f,(rt.to==null?U+1:rt.to)-q,rt.marker,rt.from==null),rt.to==null)return;rt.to==q&&(rt=!1)}}if(q>=U)break;for(var mi=Math.min(U,me);;){if(ie){var gi=q+ie.length;if(!rt){var rr=gi>mi?ie.slice(0,mi-q):ie;f.addToken(f,rr,le?le+we:we,Ke,q+rr.length==me?Ve:"",ye,it)}if(gi>=mi){ie=ie.slice(mi-q),q=mi;break}q=gi,Ke=""}ie=T.slice(O,O=v[H++]),le=Mg(v[H++],f.cm.options)}}}z(Up,"insertLineContent");function Pg(s,f,v){this.line=f,this.rest=d1(f),this.size=this.rest?an(Le(this.rest))-v+1:1,this.node=this.text=null,this.hidden=go(s,f)}z(Pg,"LineView");function od(s,f,v){for(var g=[],T,O=f;O<v;O=T){var I=new Pg(s.doc,ft(s.doc,O),O);T=O+I.size,g.push(I)}return g}z(od,"buildViewArray");var mc=null;function jg(s){mc?mc.ops.push(s):s.ownsGroup=mc={ops:[s],delayedCallbacks:[]}}z(jg,"pushOperation");function v1(s){var f=s.delayedCallbacks,v=0;do{for(;v<f.length;v++)f[v].call(null);for(var g=0;g<s.ops.length;g++){var T=s.ops[g];if(T.cursorActivityHandlers)for(;T.cursorActivityCalled<T.cursorActivityHandlers.length;)T.cursorActivityHandlers[T.cursorActivityCalled++].call(null,T.cm)}}while(v<f.length)}z(v1,"fireCallbacksForOps");function y1(s,f){var v=s.ownsGroup;if(v)try{v1(v)}finally{mc=null,f(v)}}z(y1,"finishOperation");var ad=null;function Fr(s,f){var v=qn(s,f);if(v.length){var g=Array.prototype.slice.call(arguments,2),T;mc?T=mc.delayedCallbacks:ad?T=ad:(T=ad=[],setTimeout(b1,0));for(var O=z(function(U){T.push(function(){return v[U].apply(null,g)})},"loop"),I=0;I<v.length;++I)O(I)}}z(Fr,"signalLater");function b1(){var s=ad;ad=null;for(var f=0;f<s.length;++f)s[f]()}z(b1,"fireOrphanDelayed");function Vg(s,f,v,g){for(var T=0;T<f.changes.length;T++){var O=f.changes[T];O=="text"?qp(s,f):O=="gutter"?qg(s,f,v,g):O=="class"?il(s,f):O=="widget"&&Bg(s,f,g)}f.changes=null}z(Vg,"updateLineForChanges");function gc(s){return s.node==s.text&&(s.node=Q("div",null,null,"position: relative"),s.text.parentNode&&s.text.parentNode.replaceChild(s.node,s.text),s.node.appendChild(s.text),p&&d<8&&(s.node.style.zIndex=2)),s.node}z(gc,"ensureLineWrapped");function E1(s,f){var v=f.bgClass?f.bgClass+" "+(f.line.bgClass||""):f.line.bgClass;if(v&&(v+=" CodeMirror-linebackground"),f.background)v?f.background.className=v:(f.background.parentNode.removeChild(f.background),f.background=null);else if(v){var g=gc(f);f.background=g.insertBefore(Q("div",null,v),g.firstChild),s.display.input.setUneditable(f.background)}}z(E1,"updateLineBackground");function Ug(s,f){var v=s.display.externalMeasured;return v&&v.line==f.line?(s.display.externalMeasured=null,f.measure=v.measure,v.built):Lg(s,f)}z(Ug,"getLineContent");function qp(s,f){var v=f.text.className,g=Ug(s,f);f.text==f.node&&(f.node=g.pre),f.text.parentNode.replaceChild(g.pre,f.text),f.text=g.pre,g.bgClass!=f.bgClass||g.textClass!=f.textClass?(f.bgClass=g.bgClass,f.textClass=g.textClass,il(s,f)):v&&(f.text.className=v)}z(qp,"updateLineText");function il(s,f){E1(s,f),f.line.wrapClass?gc(f).className=f.line.wrapClass:f.node!=f.text&&(f.node.className="");var v=f.textClass?f.textClass+" "+(f.line.textClass||""):f.line.textClass;f.text.className=v||""}z(il,"updateLineClasses");function qg(s,f,v,g){if(f.gutter&&(f.node.removeChild(f.gutter),f.gutter=null),f.gutterBackground&&(f.node.removeChild(f.gutterBackground),f.gutterBackground=null),f.line.gutterClass){var T=gc(f);f.gutterBackground=Q("div",null,"CodeMirror-gutter-background "+f.line.gutterClass,"left: "+(s.options.fixedGutter?g.fixedPos:-g.gutterTotalWidth)+"px; width: "+g.gutterTotalWidth+"px"),s.display.input.setUneditable(f.gutterBackground),T.insertBefore(f.gutterBackground,f.text)}var O=f.line.gutterMarkers;if(s.options.lineNumbers||O){var I=gc(f),U=f.gutter=Q("div",null,"CodeMirror-gutter-wrapper","left: "+(s.options.fixedGutter?g.fixedPos:-g.gutterTotalWidth)+"px");if(U.setAttribute("aria-hidden","true"),s.display.input.setUneditable(U),I.insertBefore(U,f.text),f.line.gutterClass&&(U.className+=" "+f.line.gutterClass),s.options.lineNumbers&&(!O||!O["CodeMirror-linenumbers"])&&(f.lineNumber=U.appendChild(Q("div",Js(s.options,v),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+g.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+s.display.lineNumInnerWidth+"px"))),O)for(var q=0;q<s.display.gutterSpecs.length;++q){var H=s.display.gutterSpecs[q].className,ie=O.hasOwnProperty(H)&&O[H];ie&&U.appendChild(Q("div",[ie],"CodeMirror-gutter-elt","left: "+g.gutterLeft[H]+"px; width: "+g.gutterWidth[H]+"px"))}}}z(qg,"updateLineGutter");function Bg(s,f,v){f.alignable&&(f.alignable=null);for(var g=$("CodeMirror-linewidget"),T=f.node.firstChild,O=void 0;T;T=O)O=T.nextSibling,g.test(T.className)&&f.node.removeChild(T);Bp(s,f,v)}z(Bg,"updateLineWidgets");function $g(s,f,v,g){var T=Ug(s,f);return f.text=f.node=T.pre,T.bgClass&&(f.bgClass=T.bgClass),T.textClass&&(f.textClass=T.textClass),il(s,f),qg(s,f,v,g),Bp(s,f,g),f.node}z($g,"buildLineElement");function Bp(s,f,v){if($p(s,f.line,f,v,!0),f.rest)for(var g=0;g<f.rest.length;g++)$p(s,f.rest[g],f,v,!1)}z(Bp,"insertLineWidgets");function $p(s,f,v,g,T){if(f.widgets)for(var O=gc(v),I=0,U=f.widgets;I<U.length;++I){var q=U[I],H=Q("div",[q.node],"CodeMirror-linewidget"+(q.className?" "+q.className:""));q.handleMouseEvents||H.setAttribute("cm-ignore-events","true"),zg(q,H,v,g),s.display.input.setUneditable(H),T&&q.above?O.insertBefore(H,v.gutter||v.text):O.appendChild(H),Fr(q,"redraw")}}z($p,"insertLineWidgetsFor");function zg(s,f,v,g){if(s.noHScroll){(v.alignable||(v.alignable=[])).push(f);var T=g.wrapperWidth;f.style.left=g.fixedPos+"px",s.coverGutter||(T-=g.gutterTotalWidth,f.style.paddingLeft=g.gutterTotalWidth+"px"),f.style.width=T+"px"}s.coverGutter&&(f.style.zIndex=5,f.style.position="relative",s.noHScroll||(f.style.marginLeft=-g.gutterTotalWidth+"px"))}z(zg,"positionLineWidget");function na(s){if(s.height!=null)return s.height;var f=s.doc.cm;if(!f)return 0;if(!re(document.body,s.node)){var v="position: relative;";s.coverGutter&&(v+="margin-left: -"+f.display.gutters.offsetWidth+"px;"),s.noHScroll&&(v+="width: "+f.display.wrapper.clientWidth+"px;"),ee(f.display.measure,Q("div",[s.node],null,v))}return s.height=s.node.parentNode.offsetHeight}z(na,"widgetHeight");function Da(s,f){for(var v=un(f);v!=s.wrapper;v=v.parentNode)if(!v||v.nodeType==1&&v.getAttribute("cm-ignore-events")=="true"||v.parentNode==s.sizer&&v!=s.mover)return!0}z(Da,"eventInWidget");function sd(s){return s.lineSpace.offsetTop}z(sd,"paddingTop");function zp(s){return s.mover.offsetHeight-s.lineSpace.offsetHeight}z(zp,"paddingVert");function Hp(s){if(s.cachedPaddingH)return s.cachedPaddingH;var f=ee(s.measure,Q("pre","x","CodeMirror-line-like")),v=window.getComputedStyle?window.getComputedStyle(f):f.currentStyle,g={left:parseInt(v.paddingLeft),right:parseInt(v.paddingRight)};return!isNaN(g.left)&&!isNaN(g.right)&&(s.cachedPaddingH=g),g}z(Hp,"paddingH");function ko(s){return Ie-s.display.nativeBarWidth}z(ko,"scrollGap");function Ro(s){return s.display.scroller.clientWidth-ko(s)-s.display.barWidth}z(Ro,"displayWidth");function ol(s){return s.display.scroller.clientHeight-ko(s)-s.display.barHeight}z(ol,"displayHeight");function S1(s,f,v){var g=s.options.lineWrapping,T=g&&Ro(s);if(!f.measure.heights||g&&f.measure.width!=T){var O=f.measure.heights=[];if(g){f.measure.width=T;for(var I=f.text.firstChild.getClientRects(),U=0;U<I.length-1;U++){var q=I[U],H=I[U+1];Math.abs(q.bottom-H.bottom)>2&&O.push((q.bottom+H.top)/2-v.top)}}O.push(v.bottom-v.top)}}z(S1,"ensureLineHeights");function vc(s,f,v){if(s.line==f)return{map:s.measure.map,cache:s.measure.cache};if(s.rest){for(var g=0;g<s.rest.length;g++)if(s.rest[g]==f)return{map:s.measure.maps[g],cache:s.measure.caches[g]};for(var T=0;T<s.rest.length;T++)if(an(s.rest[T])>v)return{map:s.measure.maps[T],cache:s.measure.caches[T],before:!0}}}z(vc,"mapFromLineView");function Hg(s,f){f=Ui(f);var v=an(f),g=s.display.externalMeasured=new Pg(s.doc,f,v);g.lineN=v;var T=g.built=Lg(s,g);return g.text=T.pre,ee(s.display.lineMeasure,T.pre),g}z(Hg,"updateExternalMeasurement");function Gp(s,f,v,g){return Mo(s,Es(s,f),v,g)}z(Gp,"measureChar");function yc(s,f){if(f>=s.display.viewFrom&&f<s.display.viewTo)return s.display.view[Ts(s,f)];var v=s.display.externalMeasured;if(v&&f>=v.lineN&&f<v.lineN+v.size)return v}z(yc,"findViewForLine");function Es(s,f){var v=an(f),g=yc(s,v);g&&!g.text?g=null:g&&g.changes&&(Vg(s,g,v,cd(s)),s.curOp.forceUpdate=!0),g||(g=Hg(s,f));var T=vc(g,f,v);return{line:f,view:g,rect:null,map:T.map,cache:T.cache,before:T.before,hasHeights:!1}}z(Es,"prepareMeasureForLine");function Mo(s,f,v,g,T){f.before&&(v=-1);var O=v+(g||""),I;return f.cache.hasOwnProperty(O)?I=f.cache[O]:(f.rect||(f.rect=f.view.text.getBoundingClientRect()),f.hasHeights||(S1(s,f.view,f.rect),f.hasHeights=!0),I=x1(s,f,v,g),I.bogus||(f.cache[O]=I)),{left:I.left,right:I.right,top:T?I.rtop:I.top,bottom:T?I.rbottom:I.bottom}}z(Mo,"measureCharPrepared");var Gg={left:0,right:0,top:0,bottom:0};function Yp(s,f,v){for(var g,T,O,I,U,q,H=0;H<s.length;H+=3)if(U=s[H],q=s[H+1],f<U?(T=0,O=1,I="left"):f<q?(T=f-U,O=T+1):(H==s.length-3||f==q&&s[H+3]>f)&&(O=q-U,T=O-1,f>=q&&(I="right")),T!=null){if(g=s[H+2],U==q&&v==(g.insertLeft?"left":"right")&&(I=v),v=="left"&&T==0)for(;H&&s[H-2]==s[H-3]&&s[H-1].insertLeft;)g=s[(H-=3)+2],I="left";if(v=="right"&&T==q-U)for(;H<s.length-3&&s[H+3]==s[H+4]&&!s[H+5].insertLeft;)g=s[(H+=3)+2],I="right";break}return{node:g,start:T,end:O,collapse:I,coverStart:U,coverEnd:q}}z(Yp,"nodeAndOffsetInLineMap");function T1(s,f){var v=Gg;if(f=="left")for(var g=0;g<s.length&&(v=s[g]).left==v.right;g++);else for(var T=s.length-1;T>=0&&(v=s[T]).left==v.right;T--);return v}z(T1,"getUsefulRect");function x1(s,f,v,g){var T=Yp(f.map,v,g),O=T.node,I=T.start,U=T.end,q=T.collapse,H;if(O.nodeType==3){for(var ie=0;ie<4;ie++){for(;I&&ht(f.line.text.charAt(T.coverStart+I));)--I;for(;T.coverStart+U<T.coverEnd&&ht(f.line.text.charAt(T.coverStart+U));)++U;if(p&&d<9&&I==0&&U==T.coverEnd-T.coverStart?H=O.parentNode.getBoundingClientRect():H=T1(ne(O,I,U).getClientRects(),g),H.left||H.right||I==0)break;U=I,I=I-1,q="right"}p&&d<11&&(H=w1(s.display.measure,H))}else{I>0&&(q=g="right");var le;s.options.lineWrapping&&(le=O.getClientRects()).length>1?H=le[g=="right"?le.length-1:0]:H=O.getBoundingClientRect()}if(p&&d<9&&!I&&(!H||!H.left&&!H.right)){var ye=O.parentNode.getClientRects()[0];ye?H={left:ye.left,right:ye.left+ul(s.display),top:ye.top,bottom:ye.bottom}:H=Gg}for(var me=H.top-f.rect.top,we=H.bottom-f.rect.top,Ve=(me+we)/2,Ke=f.view.measure.heights,rt=0;rt<Ke.length-1&&!(Ve<Ke[rt]);rt++);var it=rt?Ke[rt-1]:0,Je=Ke[rt],ut={left:(q=="right"?H.right:H.left)-f.rect.left,right:(q=="left"?H.left:H.right)-f.rect.left,top:it,bottom:Je};return!H.left&&!H.right&&(ut.bogus=!0),s.options.singleCursorHeightPerLine||(ut.rtop=me,ut.rbottom=we),ut}z(x1,"measureCharInner");function w1(s,f){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Er(s))return f;var v=screen.logicalXDPI/screen.deviceXDPI,g=screen.logicalYDPI/screen.deviceYDPI;return{left:f.left*v,right:f.right*v,top:f.top*g,bottom:f.bottom*g}}z(w1,"maybeUpdateRectForZooming");function Yg(s){if(s.measure&&(s.measure.cache={},s.measure.heights=null,s.rest))for(var f=0;f<s.rest.length;f++)s.measure.caches[f]={}}z(Yg,"clearLineMeasurementCacheFor");function Wg(s){s.display.externalMeasure=null,J(s.display.lineMeasure);for(var f=0;f<s.display.view.length;f++)Yg(s.display.view[f])}z(Wg,"clearLineMeasurementCache");function Xr(s){Wg(s),s.display.cachedCharWidth=s.display.cachedTextHeight=s.display.cachedPaddingH=null,s.options.lineWrapping||(s.display.maxLineChanged=!0),s.display.lineNumChars=null}z(Xr,"clearCaches");function eu(){return E&&D?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}z(eu,"pageScrollX");function Wp(){return E&&D?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}z(Wp,"pageScrollY");function ld(s){var f=Ui(s),v=f.widgets,g=0;if(v)for(var T=0;T<v.length;++T)v[T].above&&(g+=na(v[T]));return g}z(ld,"widgetTopHeight");function bc(s,f,v,g,T){if(!T){var O=ld(f);v.top+=O,v.bottom+=O}if(g=="line")return v;g||(g="local");var I=ta(f);if(g=="local"?I+=sd(s.display):I-=s.display.viewOffset,g=="page"||g=="window"){var U=s.display.lineSpace.getBoundingClientRect();I+=U.top+(g=="window"?0:Wp());var q=U.left+(g=="window"?0:eu());v.left+=q,v.right+=q}return v.top+=I,v.bottom+=I,v}z(bc,"intoCoordSystem");function Qp(s,f,v){if(v=="div")return f;var g=f.left,T=f.top;if(v=="page")g-=eu(),T-=Wp();else if(v=="local"||!v){var O=s.display.sizer.getBoundingClientRect();g+=O.left,T+=O.top}var I=s.display.lineSpace.getBoundingClientRect();return{left:g-I.left,top:T-I.top}}z(Qp,"fromCoordSystem");function tu(s,f,v,g,T){return g||(g=ft(s.doc,f.line)),bc(s,g,Gp(s,g,f.ch,T),v)}z(tu,"charCoords");function Lo(s,f,v,g,T,O){g=g||ft(s.doc,f.line),T||(T=Es(s,g));function I(we,Ve){var Ke=Mo(s,T,we,Ve?"right":"left",O);return Ve?Ke.left=Ke.right:Ke.right=Ke.left,bc(s,g,Ke,v)}z(I,"get");var U=Vt(g,s.doc.direction),q=f.ch,H=f.sticky;if(q>=g.text.length?(q=g.text.length,H="before"):q<=0&&(q=0,H="after"),!U)return I(H=="before"?q-1:q,H=="before");function ie(we,Ve,Ke){var rt=U[Ve],it=rt.level==1;return I(Ke?we-1:we,it!=Ke)}z(ie,"getBidi");var le=pt(U,q,H),ye=Et,me=ie(q,le,H=="before");return ye!=null&&(me.other=ie(q,ye,H!="before")),me}z(Lo,"cursorCoords");function al(s,f){var v=0;f=st(s.doc,f),s.options.lineWrapping||(v=ul(s.display)*f.ch);var g=ft(s.doc,f.line),T=ta(g)+sd(s.display);return{left:v,right:v,top:T,bottom:T+g.height}}z(al,"estimateCoords");function Ec(s,f,v,g,T){var O=ze(s,f,v);return O.xRel=T,g&&(O.outside=g),O}z(Ec,"PosWithInfo");function sl(s,f,v){var g=s.doc;if(v+=s.display.viewOffset,v<0)return Ec(g.first,0,null,-1,-1);var T=Ir(g,v),O=g.first+g.size-1;if(T>O)return Ec(g.first+g.size-1,ft(g,O).text.length,null,1,1);f<0&&(f=0);for(var I=ft(g,T);;){var U=nu(s,I,T,f,v),q=Vi(I,U.ch+(U.xRel>0||U.outside>0?1:0));if(!q)return U;var H=q.find(1);if(H.line==T)return H;I=ft(g,T=H.line)}}z(sl,"coordsChar");function ud(s,f,v,g){g-=ld(f);var T=f.text.length,O=jt(function(I){return Mo(s,v,I-1).bottom<=g},T,0);return T=jt(function(I){return Mo(s,v,I).top>g},O,T),{begin:O,end:T}}z(ud,"wrappedLineExtent");function Kp(s,f,v,g){v||(v=Es(s,f));var T=bc(s,f,Mo(s,v,g),"line").top;return ud(s,f,v,T)}z(Kp,"wrappedLineExtentChar");function ka(s,f,v,g){return s.bottom<=v?!1:s.top>v?!0:(g?s.left:s.right)>f}z(ka,"boxIsAfter");function nu(s,f,v,g,T){T-=ta(f);var O=Es(s,f),I=ld(f),U=0,q=f.text.length,H=!0,ie=Vt(f,s.doc.direction);if(ie){var le=(s.options.lineWrapping?Qg:Xp)(s,f,v,O,ie,g,T);H=le.level!=1,U=H?le.from:le.to-1,q=H?le.to:le.from-1}var ye=null,me=null,we=jt(function(Ct){var yt=Mo(s,O,Ct);return yt.top+=I,yt.bottom+=I,ka(yt,g,T,!1)?(yt.top<=T&&yt.left<=g&&(ye=Ct,me=yt),!0):!1},U,q),Ve,Ke,rt=!1;if(me){var it=g-me.left<me.right-g,Je=it==H;we=ye+(Je?0:1),Ke=Je?"after":"before",Ve=it?me.left:me.right}else{!H&&(we==q||we==U)&&we++,Ke=we==0?"after":we==f.text.length?"before":Mo(s,O,we-(H?1:0)).bottom+I<=T==H?"after":"before";var ut=Lo(s,ze(v,we,Ke),"line",f,O);Ve=ut.left,rt=T<ut.top?-1:T>=ut.bottom?1:0}return we=Ot(f.text,we,1),Ec(v,we,Ke,rt,g-Ve)}z(nu,"coordsCharInner");function Xp(s,f,v,g,T,O,I){var U=jt(function(le){var ye=T[le],me=ye.level!=1;return ka(Lo(s,ze(v,me?ye.to:ye.from,me?"before":"after"),"line",f,g),O,I,!0)},0,T.length-1),q=T[U];if(U>0){var H=q.level!=1,ie=Lo(s,ze(v,H?q.from:q.to,H?"after":"before"),"line",f,g);ka(ie,O,I,!0)&&ie.top>I&&(q=T[U-1])}return q}z(Xp,"coordsBidiPart");function Qg(s,f,v,g,T,O,I){var U=ud(s,f,g,I),q=U.begin,H=U.end;/\s/.test(f.text.charAt(H-1))&&H--;for(var ie=null,le=null,ye=0;ye<T.length;ye++){var me=T[ye];if(!(me.from>=H||me.to<=q)){var we=me.level!=1,Ve=Mo(s,g,we?Math.min(H,me.to)-1:Math.max(q,me.from)).right,Ke=Ve<O?O-Ve+1e9:Ve-O;(!ie||le>Ke)&&(ie=me,le=Ke)}}return ie||(ie=T[T.length-1]),ie.from<q&&(ie={from:q,to:ie.to,level:ie.level}),ie.to>H&&(ie={from:ie.from,to:H,level:ie.level}),ie}z(Qg,"coordsBidiPartWrapped");var vo;function ll(s){if(s.cachedTextHeight!=null)return s.cachedTextHeight;if(vo==null){vo=Q("pre",null,"CodeMirror-line-like");for(var f=0;f<49;++f)vo.appendChild(document.createTextNode("x")),vo.appendChild(Q("br"));vo.appendChild(document.createTextNode("x"))}ee(s.measure,vo);var v=vo.offsetHeight/50;return v>3&&(s.cachedTextHeight=v),J(s.measure),v||1}z(ll,"textHeight");function ul(s){if(s.cachedCharWidth!=null)return s.cachedCharWidth;var f=Q("span","xxxxxxxxxx"),v=Q("pre",[f],"CodeMirror-line-like");ee(s.measure,v);var g=f.getBoundingClientRect(),T=(g.right-g.left)/10;return T>2&&(s.cachedCharWidth=T),T||10}z(ul,"charWidth");function cd(s){for(var f=s.display,v={},g={},T=f.gutters.clientLeft,O=f.gutters.firstChild,I=0;O;O=O.nextSibling,++I){var U=s.display.gutterSpecs[I].className;v[U]=O.offsetLeft+O.clientLeft+T,g[U]=O.clientWidth}return{fixedPos:Zp(f),gutterTotalWidth:f.gutters.offsetWidth,gutterLeft:v,gutterWidth:g,wrapperWidth:f.wrapper.clientWidth}}z(cd,"getDimensions");function Zp(s){return s.scroller.getBoundingClientRect().left-s.sizer.getBoundingClientRect().left}z(Zp,"compensateForHScroll");function Kg(s){var f=ll(s.display),v=s.options.lineWrapping,g=v&&Math.max(5,s.display.scroller.clientWidth/ul(s.display)-3);return function(T){if(go(s.doc,T))return 0;var O=0;if(T.widgets)for(var I=0;I<T.widgets.length;I++)T.widgets[I].height&&(O+=T.widgets[I].height);return v?O+(Math.ceil(T.text.length/g)||1)*f:O+f}}z(Kg,"estimateHeight");function Jp(s){var f=s.doc,v=Kg(s);f.iter(function(g){var T=v(g);T!=g.height&&zr(g,T)})}z(Jp,"estimateLineHeights");function Ss(s,f,v,g){var T=s.display;if(!v&&un(f).getAttribute("cm-not-content")=="true")return null;var O,I,U=T.lineSpace.getBoundingClientRect();try{O=f.clientX-U.left,I=f.clientY-U.top}catch{return null}var q=sl(s,O,I),H;if(g&&q.xRel>0&&(H=ft(s.doc,q.line).text).length==q.ch){var ie=ce(H,H.length,s.options.tabSize)-H.length;q=ze(q.line,Math.max(0,Math.round((O-Hp(s.display).left)/ul(s.display))-ie))}return q}z(Ss,"posFromMouse");function Ts(s,f){if(f>=s.display.viewTo||(f-=s.display.viewFrom,f<0))return null;for(var v=s.display.view,g=0;g<v.length;g++)if(f-=v[g].size,f<0)return g}z(Ts,"findViewIndex");function Zr(s,f,v,g){f==null&&(f=s.doc.first),v==null&&(v=s.doc.first+s.doc.size),g||(g=0);var T=s.display;if(g&&v<T.viewTo&&(T.updateLineNumbers==null||T.updateLineNumbers>f)&&(T.updateLineNumbers=f),s.curOp.viewChanged=!0,f>=T.viewTo)ys&&pc(s.doc,f)<T.viewTo&&Ra(s);else if(v<=T.viewFrom)ys&&rd(s.doc,v+g)>T.viewFrom?Ra(s):(T.viewFrom+=g,T.viewTo+=g);else if(f<=T.viewFrom&&v>=T.viewTo)Ra(s);else if(f<=T.viewFrom){var O=Ti(s,v,v+g,1);O?(T.view=T.view.slice(O.index),T.viewFrom=O.lineN,T.viewTo+=g):Ra(s)}else if(v>=T.viewTo){var I=Ti(s,f,f,-1);I?(T.view=T.view.slice(0,I.index),T.viewTo=I.lineN):Ra(s)}else{var U=Ti(s,f,f,-1),q=Ti(s,v,v+g,1);U&&q?(T.view=T.view.slice(0,U.index).concat(od(s,U.lineN,q.lineN)).concat(T.view.slice(q.index)),T.viewTo+=g):Ra(s)}var H=T.externalMeasured;H&&(v<H.lineN?H.lineN+=g:f<H.lineN+H.size&&(T.externalMeasured=null))}z(Zr,"regChange");function Hr(s,f,v){s.curOp.viewChanged=!0;var g=s.display,T=s.display.externalMeasured;if(T&&f>=T.lineN&&f<T.lineN+T.size&&(g.externalMeasured=null),!(f<g.viewFrom||f>=g.viewTo)){var O=g.view[Ts(s,f)];if(O.node!=null){var I=O.changes||(O.changes=[]);Se(I,v)==-1&&I.push(v)}}}z(Hr,"regLineChange");function Ra(s){s.display.viewFrom=s.display.viewTo=s.doc.first,s.display.view=[],s.display.viewOffset=0}z(Ra,"resetView");function Ti(s,f,v,g){var T=Ts(s,f),O,I=s.display.view;if(!ys||v==s.doc.first+s.doc.size)return{index:T,lineN:v};for(var U=s.display.viewFrom,q=0;q<T;q++)U+=I[q].size;if(U!=f){if(g>0){if(T==I.length-1)return null;O=U+I[T].size-f,T++}else O=U-f;f+=O,v+=O}for(;pc(s.doc,v)!=v;){if(T==(g<0?0:I.length-1))return null;v+=g*I[T-(g<0?1:0)].size,T+=g}return{index:T,lineN:v}}z(Ti,"viewCuttingPoint");function yo(s,f,v){var g=s.display,T=g.view;T.length==0||f>=g.viewTo||v<=g.viewFrom?(g.view=od(s,f,v),g.viewFrom=f):(g.viewFrom>f?g.view=od(s,f,g.viewFrom).concat(g.view):g.viewFrom<f&&(g.view=g.view.slice(Ts(s,f))),g.viewFrom=f,g.viewTo<v?g.view=g.view.concat(od(s,g.viewTo,v)):g.viewTo>v&&(g.view=g.view.slice(0,Ts(s,v)))),g.viewTo=v}z(yo,"adjustView");function cl(s){for(var f=s.display.view,v=0,g=0;g<f.length;g++){var T=f[g];!T.hidden&&(!T.node||T.changes)&&++v}return v}z(cl,"countDirtyView");function fl(s){s.display.input.showSelection(s.display.input.prepareSelection())}z(fl,"updateSelection");function Sc(s,f){f===void 0&&(f=!0);var v=s.doc,g={},T=g.cursors=document.createDocumentFragment(),O=g.selection=document.createDocumentFragment(),I=s.options.$customCursor;I&&(f=!0);for(var U=0;U<v.sel.ranges.length;U++)if(!(!f&&U==v.sel.primIndex)){var q=v.sel.ranges[U];if(!(q.from().line>=s.display.viewTo||q.to().line<s.display.viewFrom)){var H=q.empty();if(I){var ie=I(s,q);ie&&ru(s,ie,T)}else(H||s.options.showCursorWhenSelecting)&&ru(s,q.head,T);H||ou(s,q,O)}}return g}z(Sc,"prepareSelection");function ru(s,f,v){var g=Lo(s,f,"div",null,null,!s.options.singleCursorHeightPerLine),T=v.appendChild(Q("div"," ","CodeMirror-cursor"));if(T.style.left=g.left+"px",T.style.top=g.top+"px",T.style.height=Math.max(0,g.bottom-g.top)*s.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(s.getWrapperElement().className)){var O=tu(s,f,"div",null,null),I=O.right-O.left;T.style.width=(I>0?I:s.defaultCharWidth())+"px"}if(g.other){var U=v.appendChild(Q("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));U.style.display="",U.style.left=g.other.left+"px",U.style.top=g.other.top+"px",U.style.height=(g.other.bottom-g.other.top)*.85+"px"}}z(ru,"drawSelectionCursor");function iu(s,f){return s.top-f.top||s.left-f.left}z(iu,"cmpCoords");function ou(s,f,v){var g=s.display,T=s.doc,O=document.createDocumentFragment(),I=Hp(s.display),U=I.left,q=Math.max(g.sizerWidth,Ro(s)-g.sizer.offsetLeft)-I.right,H=T.direction=="ltr";function ie(Je,ut,Ct,yt){ut<0&&(ut=0),ut=Math.round(ut),yt=Math.round(yt),O.appendChild(Q("div",null,"CodeMirror-selected","position: absolute; left: "+Je+`px;
top: `+ut+"px; width: "+(Ct??q-Je)+`px;
height: `+(yt-ut)+"px"))}z(ie,"add");function le(Je,ut,Ct){var yt=ft(T,Je),Dt=yt.text.length,Ln,Dr;function zn(rr,_i){return tu(s,ze(Je,rr),"div",yt,_i)}z(zn,"coords");function mi(rr,_i,Hn){var Qt=Kp(s,yt,null,rr),gr=_i=="ltr"==(Hn=="after")?"left":"right",ir=Hn=="after"?Qt.begin:Qt.end-(/\s/.test(yt.text.charAt(Qt.end-1))?2:1);return zn(ir,gr)[gr]}z(mi,"wrapX");var gi=Vt(yt,T.direction);return dt(gi,ut||0,Ct??Dt,function(rr,_i,Hn,Qt){var gr=Hn=="ltr",ir=zn(rr,gr?"left":"right"),Tn=zn(_i-1,gr?"right":"left"),Kc=ut==null&&rr==0,Is=Ct==null&&_i==Dt,ti=Qt==0,Sn=!gi||Qt==gi.length-1;if(Tn.top-ir.top<=3){var xn=(H?Kc:Is)&&ti,ua=(H?Is:Kc)&&Sn,Wa=xn?U:(gr?ir:Tn).left,Cl=ua?q:(gr?Tn:ir).right;ie(Wa,ir.top,Cl-Wa,ir.bottom)}else{var Nu,ni,ri,So;gr?(Nu=H&&Kc&&ti?U:ir.left,ni=H?q:mi(rr,Hn,"before"),ri=H?U:mi(_i,Hn,"after"),So=H&&Is&&Sn?q:Tn.right):(Nu=H?mi(rr,Hn,"before"):U,ni=!H&&Kc&&ti?q:ir.right,ri=!H&&Is&&Sn?U:Tn.left,So=H?mi(_i,Hn,"after"):q),ie(Nu,ir.top,ni-Nu,ir.bottom),ir.bottom<Tn.top&&ie(U,ir.bottom,null,Tn.top),ie(ri,Tn.top,So-ri,Tn.bottom)}(!Ln||iu(ir,Ln)<0)&&(Ln=ir),iu(Tn,Ln)<0&&(Ln=Tn),(!Dr||iu(ir,Dr)<0)&&(Dr=ir),iu(Tn,Dr)<0&&(Dr=Tn)}),{start:Ln,end:Dr}}z(le,"drawForLine");var ye=f.from(),me=f.to();if(ye.line==me.line)le(ye.line,ye.ch,me.ch);else{var we=ft(T,ye.line),Ve=ft(T,me.line),Ke=Ui(we)==Ui(Ve),rt=le(ye.line,ye.ch,Ke?we.text.length+1:null).end,it=le(me.line,Ke?0:null,me.ch).start;Ke&&(rt.top<it.top-2?(ie(rt.right,rt.top,null,rt.bottom),ie(U,it.top,it.left,it.bottom)):ie(rt.right,rt.top,it.left-rt.right,rt.bottom)),rt.bottom<it.top&&ie(U,rt.bottom,null,it.top)}v.appendChild(O)}z(ou,"drawSelectionRange");function fd(s){if(s.state.focused){var f=s.display;clearInterval(f.blinker);var v=!0;f.cursorDiv.style.visibility="",s.options.cursorBlinkRate>0?f.blinker=setInterval(function(){s.hasFocus()||Gr(s),f.cursorDiv.style.visibility=(v=!v)?"":"hidden"},s.options.cursorBlinkRate):s.options.cursorBlinkRate<0&&(f.cursorDiv.style.visibility="hidden")}}z(fd,"restartBlink");function Tc(s){s.hasFocus()||(s.display.input.focus(),s.state.focused||eh(s))}z(Tc,"ensureFocus");function xs(s){s.state.delayingBlurEvent=!0,setTimeout(function(){s.state.delayingBlurEvent&&(s.state.delayingBlurEvent=!1,s.state.focused&&Gr(s))},100)}z(xs,"delayBlurEvent");function eh(s,f){s.state.delayingBlurEvent&&!s.state.draggingText&&(s.state.delayingBlurEvent=!1),s.options.readOnly!="nocursor"&&(s.state.focused||(mt(s,"focus",s,f),s.state.focused=!0,fe(s.display.wrapper,"CodeMirror-focused"),!s.curOp&&s.display.selForContextMenu!=s.doc.sel&&(s.display.input.reset(),m&&setTimeout(function(){return s.display.input.reset(!0)},20)),s.display.input.receivedFocus()),fd(s))}z(eh,"onFocus");function Gr(s,f){s.state.delayingBlurEvent||(s.state.focused&&(mt(s,"blur",s,f),s.state.focused=!1,X(s.display.wrapper,"CodeMirror-focused")),clearInterval(s.display.blinker),setTimeout(function(){s.state.focused||(s.display.shift=!1)},150))}z(Gr,"onBlur");function au(s){for(var f=s.display,v=f.lineDiv.offsetTop,g=Math.max(0,f.scroller.getBoundingClientRect().top),T=f.lineDiv.getBoundingClientRect().top,O=0,I=0;I<f.view.length;I++){var U=f.view[I],q=s.options.lineWrapping,H=void 0,ie=0;if(!U.hidden){if(T+=U.line.height,p&&d<8){var le=U.node.offsetTop+U.node.offsetHeight;H=le-v,v=le}else{var ye=U.node.getBoundingClientRect();H=ye.bottom-ye.top,!q&&U.text.firstChild&&(ie=U.text.firstChild.getBoundingClientRect().right-ye.left-1)}var me=U.line.height-H;if((me>.005||me<-.005)&&(T<g&&(O-=me),zr(U.line,H),ra(U.line),U.rest))for(var we=0;we<U.rest.length;we++)ra(U.rest[we]);if(ie>s.display.sizerWidth){var Ve=Math.ceil(ie/ul(s.display));Ve>s.display.maxLineLength&&(s.display.maxLineLength=Ve,s.display.maxLine=U.line,s.display.maxLineChanged=!0)}}}Math.abs(O)>2&&(f.scroller.scrollTop+=O)}z(au,"updateHeightsInViewport");function ra(s){if(s.widgets)for(var f=0;f<s.widgets.length;++f){var v=s.widgets[f],g=v.node.parentNode;g&&(v.height=g.offsetHeight)}}z(ra,"updateWidgetHeight");function xc(s,f,v){var g=v&&v.top!=null?Math.max(0,v.top):s.scroller.scrollTop;g=Math.floor(g-sd(s));var T=v&&v.bottom!=null?v.bottom:g+s.wrapper.clientHeight,O=Ir(f,g),I=Ir(f,T);if(v&&v.ensure){var U=v.ensure.from.line,q=v.ensure.to.line;U<O?(O=U,I=Ir(f,ta(ft(f,U))+s.wrapper.clientHeight)):Math.min(q,f.lastLine())>=I&&(O=Ir(f,ta(ft(f,q))-s.wrapper.clientHeight),I=q)}return{from:O,to:Math.max(I,O+1)}}z(xc,"visibleLines");function dd(s,f){if(!yn(s,"scrollCursorIntoView")){var v=s.display,g=v.sizer.getBoundingClientRect(),T=null;if(f.top+g.top<0?T=!0:f.bottom+g.top>(window.innerHeight||document.documentElement.clientHeight)&&(T=!1),T!=null&&!k){var O=Q("div","",null,`position: absolute;
top: `+(f.top-v.viewOffset-sd(s.display))+`px;
height: `+(f.bottom-f.top+ko(s)+v.barHeight)+`px;
left: `+f.left+"px; width: "+Math.max(2,f.right-f.left)+"px;");s.display.lineSpace.appendChild(O),O.scrollIntoView(T),s.display.lineSpace.removeChild(O)}}}z(dd,"maybeScrollWindow");function dl(s,f,v,g){g==null&&(g=0);var T;!s.options.lineWrapping&&f==v&&(v=f.sticky=="before"?ze(f.line,f.ch+1,"before"):f,f=f.ch?ze(f.line,f.sticky=="before"?f.ch-1:f.ch,"after"):f);for(var O=0;O<5;O++){var I=!1,U=Lo(s,f),q=!v||v==f?U:Lo(s,v);T={left:Math.min(U.left,q.left),top:Math.min(U.top,q.top)-g,right:Math.max(U.left,q.left),bottom:Math.max(U.bottom,q.bottom)+g};var H=wc(s,T),ie=s.doc.scrollTop,le=s.doc.scrollLeft;if(H.scrollTop!=null&&(Fo(s,H.scrollTop),Math.abs(s.doc.scrollTop-ie)>1&&(I=!0)),H.scrollLeft!=null&&(wi(s,H.scrollLeft),Math.abs(s.doc.scrollLeft-le)>1&&(I=!0)),!I)break}return T}z(dl,"scrollPosIntoView");function th(s,f){var v=wc(s,f);v.scrollTop!=null&&Fo(s,v.scrollTop),v.scrollLeft!=null&&wi(s,v.scrollLeft)}z(th,"scrollIntoView");function wc(s,f){var v=s.display,g=ll(s.display);f.top<0&&(f.top=0);var T=s.curOp&&s.curOp.scrollTop!=null?s.curOp.scrollTop:v.scroller.scrollTop,O=ol(s),I={};f.bottom-f.top>O&&(f.bottom=f.top+O);var U=s.doc.height+zp(v),q=f.top<g,H=f.bottom>U-g;if(f.top<T)I.scrollTop=q?0:f.top;else if(f.bottom>T+O){var ie=Math.min(f.top,(H?U:f.bottom)-O);ie!=T&&(I.scrollTop=ie)}var le=s.options.fixedGutter?0:v.gutters.offsetWidth,ye=s.curOp&&s.curOp.scrollLeft!=null?s.curOp.scrollLeft:v.scroller.scrollLeft-le,me=Ro(s)-v.gutters.offsetWidth,we=f.right-f.left>me;return we&&(f.right=f.left+me),f.left<10?I.scrollLeft=0:f.left<ye?I.scrollLeft=Math.max(0,f.left+le-(we?0:10)):f.right>me+ye-3&&(I.scrollLeft=f.right+(we?0:10)-me),I}z(wc,"calculateScrollPos");function ws(s,f){f!=null&&(xi(s),s.curOp.scrollTop=(s.curOp.scrollTop==null?s.doc.scrollTop:s.curOp.scrollTop)+f)}z(ws,"addToScrollTop");function Io(s){xi(s);var f=s.getCursor();s.curOp.scrollToPos={from:f,to:f,margin:s.options.cursorScrollMargin}}z(Io,"ensureCursorVisible");function Cs(s,f,v){(f!=null||v!=null)&&xi(s),f!=null&&(s.curOp.scrollLeft=f),v!=null&&(s.curOp.scrollTop=v)}z(Cs,"scrollToCoords");function pd(s,f){xi(s),s.curOp.scrollToPos=f}z(pd,"scrollToRange");function xi(s){var f=s.curOp.scrollToPos;if(f){s.curOp.scrollToPos=null;var v=al(s,f.from),g=al(s,f.to);eo(s,v,g,f.margin)}}z(xi,"resolveScrollToPos");function eo(s,f,v,g){var T=wc(s,{left:Math.min(f.left,v.left),top:Math.min(f.top,v.top)-g,right:Math.max(f.right,v.right),bottom:Math.max(f.bottom,v.bottom)+g});Cs(s,T.scrollLeft,T.scrollTop)}z(eo,"scrollToCoordsRange");function Fo(s,f){Math.abs(s.doc.scrollTop-f)<2||(i||uu(s,{top:f}),ia(s,f,!0),i&&uu(s),bo(s,100))}z(Fo,"updateScrollTop");function ia(s,f,v){f=Math.max(0,Math.min(s.display.scroller.scrollHeight-s.display.scroller.clientHeight,f)),!(s.display.scroller.scrollTop==f&&!v)&&(s.doc.scrollTop=f,s.display.scrollbars.setScrollTop(f),s.display.scroller.scrollTop!=f&&(s.display.scroller.scrollTop=f))}z(ia,"setScrollTop");function wi(s,f,v,g){f=Math.max(0,Math.min(f,s.display.scroller.scrollWidth-s.display.scroller.clientWidth)),!((v?f==s.doc.scrollLeft:Math.abs(s.doc.scrollLeft-f)<2)&&!g)&&(s.doc.scrollLeft=f,tv(s),s.display.scroller.scrollLeft!=f&&(s.display.scroller.scrollLeft=f),s.display.scrollbars.setScrollLeft(f))}z(wi,"setScrollLeft");function Po(s){var f=s.display,v=f.gutters.offsetWidth,g=Math.round(s.doc.height+zp(s.display));return{clientHeight:f.scroller.clientHeight,viewHeight:f.wrapper.clientHeight,scrollWidth:f.scroller.scrollWidth,clientWidth:f.scroller.clientWidth,viewWidth:f.wrapper.clientWidth,barLeft:s.options.fixedGutter?v:0,docHeight:g,scrollHeight:g+ko(s)+f.barHeight,nativeBarWidth:f.nativeBarWidth,gutterWidth:v}}z(Po,"measureForScrollbars");var pl=z(function(s,f,v){this.cm=v;var g=this.vert=Q("div",[Q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),T=this.horiz=Q("div",[Q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");g.tabIndex=T.tabIndex=-1,s(g),s(T),ot(g,"scroll",function(){g.clientHeight&&f(g.scrollTop,"vertical")}),ot(T,"scroll",function(){T.clientWidth&&f(T.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");pl.prototype.update=function(s){var f=s.scrollWidth>s.clientWidth+1,v=s.scrollHeight>s.clientHeight+1,g=s.nativeBarWidth;if(v){this.vert.style.display="block",this.vert.style.bottom=f?g+"px":"0";var T=s.viewHeight-(f?g:0);this.vert.firstChild.style.height=Math.max(0,s.scrollHeight-s.clientHeight+T)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(f){this.horiz.style.display="block",this.horiz.style.right=v?g+"px":"0",this.horiz.style.left=s.barLeft+"px";var O=s.viewWidth-s.barLeft-(v?g:0);this.horiz.firstChild.style.width=Math.max(0,s.scrollWidth-s.clientWidth+O)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&s.clientHeight>0&&(g==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:v?g:0,bottom:f?g:0}},pl.prototype.setScrollLeft=function(s){this.horiz.scrollLeft!=s&&(this.horiz.scrollLeft=s),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pl.prototype.setScrollTop=function(s){this.vert.scrollTop!=s&&(this.vert.scrollTop=s),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pl.prototype.zeroWidthHack=function(){var s=C&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=s,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new he,this.disableVert=new he},pl.prototype.enableZeroWidthBar=function(s,f,v){s.style.pointerEvents="auto";function g(){var T=s.getBoundingClientRect(),O=v=="vert"?document.elementFromPoint(T.right-1,(T.top+T.bottom)/2):document.elementFromPoint((T.right+T.left)/2,T.bottom-1);O!=s?s.style.pointerEvents="none":f.set(1e3,g)}z(g,"maybeDisable"),f.set(1e3,g)},pl.prototype.clear=function(){var s=this.horiz.parentNode;s.removeChild(this.horiz),s.removeChild(this.vert)};var su=z(function(){},"NullScrollbars");su.prototype.update=function(){return{bottom:0,right:0}},su.prototype.setScrollLeft=function(){},su.prototype.setScrollTop=function(){},su.prototype.clear=function(){};function _s(s,f){f||(f=Po(s));var v=s.display.barWidth,g=s.display.barHeight;pi(s,f);for(var T=0;T<4&&v!=s.display.barWidth||g!=s.display.barHeight;T++)v!=s.display.barWidth&&s.options.lineWrapping&&au(s),pi(s,Po(s)),v=s.display.barWidth,g=s.display.barHeight}z(_s,"updateScrollbars");function pi(s,f){var v=s.display,g=v.scrollbars.update(f);v.sizer.style.paddingRight=(v.barWidth=g.right)+"px",v.sizer.style.paddingBottom=(v.barHeight=g.bottom)+"px",v.heightForcer.style.borderBottom=g.bottom+"px solid transparent",g.right&&g.bottom?(v.scrollbarFiller.style.display="block",v.scrollbarFiller.style.height=g.bottom+"px",v.scrollbarFiller.style.width=g.right+"px"):v.scrollbarFiller.style.display="",g.bottom&&s.options.coverGutterNextToScrollbar&&s.options.fixedGutter?(v.gutterFiller.style.display="block",v.gutterFiller.style.height=g.bottom+"px",v.gutterFiller.style.width=f.gutterWidth+"px"):v.gutterFiller.style.display=""}z(pi,"updateScrollbarsInner");var dr={native:pl,null:su};function En(s){s.display.scrollbars&&(s.display.scrollbars.clear(),s.display.scrollbars.addClass&&X(s.display.wrapper,s.display.scrollbars.addClass)),s.display.scrollbars=new dr[s.options.scrollbarStyle](function(f){s.display.wrapper.insertBefore(f,s.display.scrollbarFiller),ot(f,"mousedown",function(){s.state.focused&&setTimeout(function(){return s.display.input.focus()},0)}),f.setAttribute("cm-not-content","true")},function(f,v){v=="horizontal"?wi(s,f):Fo(s,f)},s),s.display.scrollbars.addClass&&fe(s.display.wrapper,s.display.scrollbars.addClass)}z(En,"initScrollbars");var lu=0;function hi(s){s.curOp={cm:s,viewChanged:!1,startHeight:s.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++lu,markArrays:null},jg(s.curOp)}z(hi,"startOperation");function Ma(s){var f=s.curOp;f&&y1(f,function(v){for(var g=0;g<v.ops.length;g++)v.ops[g].cm.curOp=null;hl(v)})}z(Ma,"endOperation");function hl(s){for(var f=s.ops,v=0;v<f.length;v++)Xg(f[v]);for(var g=0;g<f.length;g++)Zg(f[g]);for(var T=0;T<f.length;T++)Cc(f[T]);for(var O=0;O<f.length;O++)_c(f[O]);for(var I=0;I<f.length;I++)Jg(f[I])}z(hl,"endOperations");function Xg(s){var f=s.cm,v=f.display;nh(f),s.updateMaxLine&&jp(f),s.mustUpdate=s.viewChanged||s.forceUpdate||s.scrollTop!=null||s.scrollToPos&&(s.scrollToPos.from.line<v.viewFrom||s.scrollToPos.to.line>=v.viewTo)||v.maxLineChanged&&f.options.lineWrapping,s.update=s.mustUpdate&&new Nc(f,s.mustUpdate&&{top:s.scrollTop,ensure:s.scrollToPos},s.forceUpdate)}z(Xg,"endOperation_R1");function Zg(s){s.updatedDisplay=s.mustUpdate&&Ia(s.cm,s.update)}z(Zg,"endOperation_W1");function Cc(s){var f=s.cm,v=f.display;s.updatedDisplay&&au(f),s.barMeasure=Po(f),v.maxLineChanged&&!f.options.lineWrapping&&(s.adjustWidthTo=Gp(f,v.maxLine,v.maxLine.text.length).left+3,f.display.sizerWidth=s.adjustWidthTo,s.barMeasure.scrollWidth=Math.max(v.scroller.clientWidth,v.sizer.offsetLeft+s.adjustWidthTo+ko(f)+f.display.barWidth),s.maxScrollLeft=Math.max(0,v.sizer.offsetLeft+s.adjustWidthTo-Ro(f))),(s.updatedDisplay||s.selectionChanged)&&(s.preparedSelection=v.input.prepareSelection())}z(Cc,"endOperation_R2");function _c(s){var f=s.cm;s.adjustWidthTo!=null&&(f.display.sizer.style.minWidth=s.adjustWidthTo+"px",s.maxScrollLeft<f.doc.scrollLeft&&wi(f,Math.min(f.display.scroller.scrollLeft,s.maxScrollLeft),!0),f.display.maxLineChanged=!1);var v=s.focus&&s.focus==se();s.preparedSelection&&f.display.input.showSelection(s.preparedSelection,v),(s.updatedDisplay||s.startHeight!=f.doc.height)&&_s(f,s.barMeasure),s.updatedDisplay&&ih(f,s.barMeasure),s.selectionChanged&&fd(f),f.state.focused&&s.updateInput&&f.display.input.reset(s.typing),v&&Tc(s.cm)}z(_c,"endOperation_W2");function Jg(s){var f=s.cm,v=f.display,g=f.doc;if(s.updatedDisplay&&Jr(f,s.update),v.wheelStartX!=null&&(s.scrollTop!=null||s.scrollLeft!=null||s.scrollToPos)&&(v.wheelStartX=v.wheelStartY=null),s.scrollTop!=null&&ia(f,s.scrollTop,s.forceScroll),s.scrollLeft!=null&&wi(f,s.scrollLeft,!0,!0),s.scrollToPos){var T=dl(f,st(g,s.scrollToPos.from),st(g,s.scrollToPos.to),s.scrollToPos.margin);dd(f,T)}var O=s.maybeHiddenMarkers,I=s.maybeUnhiddenMarkers;if(O)for(var U=0;U<O.length;++U)O[U].lines.length||mt(O[U],"hide");if(I)for(var q=0;q<I.length;++q)I[q].lines.length&&mt(I[q],"unhide");v.wrapper.offsetHeight&&(g.scrollTop=f.display.scroller.scrollTop),s.changeObjs&&mt(f,"changes",f,s.changeObjs),s.update&&s.update.finish()}z(Jg,"endOperation_finish");function Yr(s,f){if(s.curOp)return f();hi(s);try{return f()}finally{Ma(s)}}z(Yr,"runInOp");function Sr(s,f){return function(){if(s.curOp)return f.apply(s,arguments);hi(s);try{return f.apply(s,arguments)}finally{Ma(s)}}}z(Sr,"operation");function pr(s){return function(){if(this.curOp)return s.apply(this,arguments);hi(this);try{return s.apply(this,arguments)}finally{Ma(this)}}}z(pr,"methodOp");function Pn(s){return function(){var f=this.cm;if(!f||f.curOp)return s.apply(this,arguments);hi(f);try{return s.apply(this,arguments)}finally{Ma(f)}}}z(Pn,"docMethodOp");function bo(s,f){s.doc.highlightFrontier<s.display.viewTo&&s.state.highlight.set(f,ae(La,s))}z(bo,"startWorker");function La(s){var f=s.doc;if(!(f.highlightFrontier>=s.display.viewTo)){var v=+new Date+s.options.workTime,g=Wl(s,f.highlightFrontier),T=[];f.iter(g.line,Math.min(f.first+f.size,s.display.viewTo+500),function(O){if(g.line>=s.display.viewFrom){var I=O.styles,U=O.text.length>s.options.maxHighlightLength?Pi(f.mode,g.state):null,q=Ji(s,O,g,!0);U&&(g.state=U),O.styles=q.styles;var H=O.styleClasses,ie=q.classes;ie?O.styleClasses=ie:H&&(O.styleClasses=null);for(var le=!I||I.length!=O.styles.length||H!=ie&&(!H||!ie||H.bgClass!=ie.bgClass||H.textClass!=ie.textClass),ye=0;!le&&ye<I.length;++ye)le=I[ye]!=O.styles[ye];le&&T.push(g.line),O.stateAfter=g.save(),g.nextLine()}else O.text.length<=s.options.maxHighlightLength&&lc(s,O.text,g),O.stateAfter=g.line%5==0?g.save():null,g.nextLine();if(+new Date>v)return bo(s,s.options.workDelay),!0}),f.highlightFrontier=g.line,f.modeFrontier=Math.max(f.modeFrontier,g.line),T.length&&Yr(s,function(){for(var O=0;O<T.length;O++)Hr(s,T[O],"text")})}}z(La,"highlightWorker");var Nc=z(function(s,f,v){var g=s.display;this.viewport=f,this.visible=xc(g,s.doc,f),this.editorIsHidden=!g.wrapper.offsetWidth,this.wrapperHeight=g.wrapper.clientHeight,this.wrapperWidth=g.wrapper.clientWidth,this.oldDisplayWidth=Ro(s),this.force=v,this.dims=cd(s),this.events=[]},"DisplayUpdate");Nc.prototype.signal=function(s,f){on(s,f)&&this.events.push(arguments)},Nc.prototype.finish=function(){for(var s=0;s<this.events.length;s++)mt.apply(null,this.events[s])};function nh(s){var f=s.display;!f.scrollbarsClipped&&f.scroller.offsetWidth&&(f.nativeBarWidth=f.scroller.offsetWidth-f.scroller.clientWidth,f.heightForcer.style.height=ko(s)+"px",f.sizer.style.marginBottom=-f.nativeBarWidth+"px",f.sizer.style.borderRightWidth=ko(s)+"px",f.scrollbarsClipped=!0)}z(nh,"maybeClipScrollbars");function Ac(s){if(s.hasFocus())return null;var f=se();if(!f||!re(s.display.lineDiv,f))return null;var v={activeElt:f};if(window.getSelection){var g=window.getSelection();g.anchorNode&&g.extend&&re(s.display.lineDiv,g.anchorNode)&&(v.anchorNode=g.anchorNode,v.anchorOffset=g.anchorOffset,v.focusNode=g.focusNode,v.focusOffset=g.focusOffset)}return v}z(Ac,"selectionSnapshot");function hd(s){if(!(!s||!s.activeElt||s.activeElt==se())&&(s.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(s.activeElt.nodeName)&&s.anchorNode&&re(document.body,s.anchorNode)&&re(document.body,s.focusNode))){var f=window.getSelection(),v=document.createRange();v.setEnd(s.anchorNode,s.anchorOffset),v.collapse(!1),f.removeAllRanges(),f.addRange(v),f.extend(s.focusNode,s.focusOffset)}}z(hd,"restoreSelection");function Ia(s,f){var v=s.display,g=s.doc;if(f.editorIsHidden)return Ra(s),!1;if(!f.force&&f.visible.from>=v.viewFrom&&f.visible.to<=v.viewTo&&(v.updateLineNumbers==null||v.updateLineNumbers>=v.viewTo)&&v.renderedView==v.view&&cl(s)==0)return!1;Nr(s)&&(Ra(s),f.dims=cd(s));var T=g.first+g.size,O=Math.max(f.visible.from-s.options.viewportMargin,g.first),I=Math.min(T,f.visible.to+s.options.viewportMargin);v.viewFrom<O&&O-v.viewFrom<20&&(O=Math.max(g.first,v.viewFrom)),v.viewTo>I&&v.viewTo-I<20&&(I=Math.min(T,v.viewTo)),ys&&(O=pc(s.doc,O),I=rd(s.doc,I));var U=O!=v.viewFrom||I!=v.viewTo||v.lastWrapHeight!=f.wrapperHeight||v.lastWrapWidth!=f.wrapperWidth;yo(s,O,I),v.viewOffset=ta(ft(s.doc,v.viewFrom)),s.display.mover.style.top=v.viewOffset+"px";var q=cl(s);if(!U&&q==0&&!f.force&&v.renderedView==v.view&&(v.updateLineNumbers==null||v.updateLineNumbers>=v.viewTo))return!1;var H=Ac(s);return q>4&&(v.lineDiv.style.display="none"),ev(s,v.updateLineNumbers,f.dims),q>4&&(v.lineDiv.style.display=""),v.renderedView=v.view,hd(H),J(v.cursorDiv),J(v.selectionDiv),v.gutters.style.height=v.sizer.style.minHeight=0,U&&(v.lastWrapHeight=f.wrapperHeight,v.lastWrapWidth=f.wrapperWidth,bo(s,400)),v.updateLineNumbers=null,!0}z(Ia,"updateDisplayIfNeeded");function Jr(s,f){for(var v=f.viewport,g=!0;;g=!1){if(!g||!s.options.lineWrapping||f.oldDisplayWidth==Ro(s)){if(v&&v.top!=null&&(v={top:Math.min(s.doc.height+zp(s.display)-ol(s),v.top)}),f.visible=xc(s.display,s.doc,v),f.visible.from>=s.display.viewFrom&&f.visible.to<=s.display.viewTo)break}else g&&(f.visible=xc(s.display,s.doc,v));if(!Ia(s,f))break;au(s);var T=Po(s);fl(s),_s(s,T),ih(s,T),f.force=!1}f.signal(s,"update",s),(s.display.viewFrom!=s.display.reportedViewFrom||s.display.viewTo!=s.display.reportedViewTo)&&(f.signal(s,"viewportChange",s,s.display.viewFrom,s.display.viewTo),s.display.reportedViewFrom=s.display.viewFrom,s.display.reportedViewTo=s.display.viewTo)}z(Jr,"postUpdateDisplay");function uu(s,f){var v=new Nc(s,f);if(Ia(s,v)){au(s),Jr(s,v);var g=Po(s);fl(s),_s(s,g),ih(s,g),v.finish()}}z(uu,"updateDisplaySimple");function ev(s,f,v){var g=s.display,T=s.options.lineNumbers,O=g.lineDiv,I=O.firstChild;function U(we){var Ve=we.nextSibling;return m&&C&&s.display.currentWheelTarget==we?we.style.display="none":we.parentNode.removeChild(we),Ve}z(U,"rm");for(var q=g.view,H=g.viewFrom,ie=0;ie<q.length;ie++){var le=q[ie];if(!le.hidden)if(!le.node||le.node.parentNode!=O){var ye=$g(s,le,H,v);O.insertBefore(ye,I)}else{for(;I!=le.node;)I=U(I);var me=T&&f!=null&&f<=H&&le.lineNumber;le.changes&&(Se(le.changes,"gutter")>-1&&(me=!1),Vg(s,le,H,v)),me&&(J(le.lineNumber),le.lineNumber.appendChild(document.createTextNode(Js(s.options,H)))),I=le.node.nextSibling}H+=le.size}for(;I;)I=U(I)}z(ev,"patchDisplay");function rh(s){var f=s.gutters.offsetWidth;s.sizer.style.marginLeft=f+"px",Fr(s,"gutterChanged",s)}z(rh,"updateGutterSpace");function ih(s,f){s.display.sizer.style.minHeight=f.docHeight+"px",s.display.heightForcer.style.top=f.docHeight+"px",s.display.gutters.style.height=f.docHeight+s.display.barHeight+ko(s)+"px"}z(ih,"setDocumentHeight");function tv(s){var f=s.display,v=f.view;if(!(!f.alignWidgets&&(!f.gutters.firstChild||!s.options.fixedGutter))){for(var g=Zp(f)-f.scroller.scrollLeft+s.doc.scrollLeft,T=f.gutters.offsetWidth,O=g+"px",I=0;I<v.length;I++)if(!v[I].hidden){s.options.fixedGutter&&(v[I].gutter&&(v[I].gutter.style.left=O),v[I].gutterBackground&&(v[I].gutterBackground.style.left=O));var U=v[I].alignable;if(U)for(var q=0;q<U.length;q++)U[q].style.left=O}s.options.fixedGutter&&(f.gutters.style.left=g+T+"px")}}z(tv,"alignHorizontally");function Nr(s){if(!s.options.lineNumbers)return!1;var f=s.doc,v=Js(s.options,f.first+f.size-1),g=s.display;if(v.length!=g.lineNumChars){var T=g.measure.appendChild(Q("div",[Q("div",v)],"CodeMirror-linenumber CodeMirror-gutter-elt")),O=T.firstChild.offsetWidth,I=T.offsetWidth-O;return g.lineGutter.style.width="",g.lineNumInnerWidth=Math.max(O,g.lineGutter.offsetWidth-I)+1,g.lineNumWidth=g.lineNumInnerWidth+I,g.lineNumChars=g.lineNumInnerWidth?v.length:-1,g.lineGutter.style.width=g.lineNumWidth+"px",rh(s.display),!0}return!1}z(Nr,"maybeUpdateLineNumberWidth");function Oc(s,f){for(var v=[],g=!1,T=0;T<s.length;T++){var O=s[T],I=null;if(typeof O!="string"&&(I=O.style,O=O.className),O=="CodeMirror-linenumbers")if(f)g=!0;else continue;v.push({className:O,style:I})}return f&&!g&&v.push({className:"CodeMirror-linenumbers",style:null}),v}z(Oc,"getGutters");function cu(s){var f=s.gutters,v=s.gutterSpecs;J(f),s.lineGutter=null;for(var g=0;g<v.length;++g){var T=v[g],O=T.className,I=T.style,U=f.appendChild(Q("div",null,"CodeMirror-gutter "+O));I&&(U.style.cssText=I),O=="CodeMirror-linenumbers"&&(s.lineGutter=U,U.style.width=(s.lineNumWidth||1)+"px")}f.style.display=v.length?"":"none",rh(s)}z(cu,"renderGutters");function Fa(s){cu(s.display),Zr(s),tv(s)}z(Fa,"updateGutters");function oh(s,f,v,g){var T=this;this.input=v,T.scrollbarFiller=Q("div",null,"CodeMirror-scrollbar-filler"),T.scrollbarFiller.setAttribute("cm-not-content","true"),T.gutterFiller=Q("div",null,"CodeMirror-gutter-filler"),T.gutterFiller.setAttribute("cm-not-content","true"),T.lineDiv=B("div",null,"CodeMirror-code"),T.selectionDiv=Q("div",null,null,"position: relative; z-index: 1"),T.cursorDiv=Q("div",null,"CodeMirror-cursors"),T.measure=Q("div",null,"CodeMirror-measure"),T.lineMeasure=Q("div",null,"CodeMirror-measure"),T.lineSpace=B("div",[T.measure,T.lineMeasure,T.selectionDiv,T.cursorDiv,T.lineDiv],null,"position: relative; outline: none");var O=B("div",[T.lineSpace],"CodeMirror-lines");T.mover=Q("div",[O],null,"position: relative"),T.sizer=Q("div",[T.mover],"CodeMirror-sizer"),T.sizerWidth=null,T.heightForcer=Q("div",null,null,"position: absolute; height: "+Ie+"px; width: 1px;"),T.gutters=Q("div",null,"CodeMirror-gutters"),T.lineGutter=null,T.scroller=Q("div",[T.sizer,T.heightForcer,T.gutters],"CodeMirror-scroll"),T.scroller.setAttribute("tabIndex","-1"),T.wrapper=Q("div",[T.scrollbarFiller,T.gutterFiller,T.scroller],"CodeMirror"),T.wrapper.setAttribute("translate","no"),p&&d<8&&(T.gutters.style.zIndex=-1,T.scroller.style.paddingRight=0),!m&&!(i&&A)&&(T.scroller.draggable=!0),s&&(s.appendChild?s.appendChild(T.wrapper):s(T.wrapper)),T.viewFrom=T.viewTo=f.first,T.reportedViewFrom=T.reportedViewTo=f.first,T.view=[],T.renderedView=null,T.externalMeasured=null,T.viewOffset=0,T.lastWrapHeight=T.lastWrapWidth=0,T.updateLineNumbers=null,T.nativeBarWidth=T.barHeight=T.barWidth=0,T.scrollbarsClipped=!1,T.lineNumWidth=T.lineNumInnerWidth=T.lineNumChars=null,T.alignWidgets=!1,T.cachedCharWidth=T.cachedTextHeight=T.cachedPaddingH=null,T.maxLine=null,T.maxLineLength=0,T.maxLineChanged=!1,T.wheelDX=T.wheelDY=T.wheelStartX=T.wheelStartY=null,T.shift=!1,T.selForContextMenu=null,T.activeTouch=null,T.gutterSpecs=Oc(g.gutters,g.lineNumbers),cu(T),v.init(T)}z(oh,"Display");var Ns=0,to=null;p?to=-.53:i?to=15:E?to=-.7:x&&(to=-1/3);function nv(s){var f=s.wheelDeltaX,v=s.wheelDeltaY;return f==null&&s.detail&&s.axis==s.HORIZONTAL_AXIS&&(f=s.detail),v==null&&s.detail&&s.axis==s.VERTICAL_AXIS?v=s.detail:v==null&&(v=s.wheelDelta),{x:f,y:v}}z(nv,"wheelEventDelta");function rv(s){var f=nv(s);return f.x*=to,f.y*=to,f}z(rv,"wheelEventPixels");function iv(s,f){var v=nv(f),g=v.x,T=v.y,O=to;f.deltaMode===0&&(g=f.deltaX,T=f.deltaY,O=1);var I=s.display,U=I.scroller,q=U.scrollWidth>U.clientWidth,H=U.scrollHeight>U.clientHeight;if(g&&q||T&&H){if(T&&C&&m){e:for(var ie=f.target,le=I.view;ie!=U;ie=ie.parentNode)for(var ye=0;ye<le.length;ye++)if(le[ye].node==ie){s.display.currentWheelTarget=ie;break e}}if(g&&!i&&!y&&O!=null){T&&H&&Fo(s,Math.max(0,U.scrollTop+T*O)),wi(s,Math.max(0,U.scrollLeft+g*O)),(!T||T&&H)&&An(f),I.wheelStartX=null;return}if(T&&O!=null){var me=T*O,we=s.doc.scrollTop,Ve=we+I.wrapper.clientHeight;me<0?we=Math.max(0,we+me-50):Ve=Math.min(s.doc.height,Ve+me+50),uu(s,{top:we,bottom:Ve})}Ns<20&&f.deltaMode!==0&&(I.wheelStartX==null?(I.wheelStartX=U.scrollLeft,I.wheelStartY=U.scrollTop,I.wheelDX=g,I.wheelDY=T,setTimeout(function(){if(I.wheelStartX!=null){var Ke=U.scrollLeft-I.wheelStartX,rt=U.scrollTop-I.wheelStartY,it=rt&&I.wheelDY&&rt/I.wheelDY||Ke&&I.wheelDX&&Ke/I.wheelDX;I.wheelStartX=I.wheelStartY=null,it&&(to=(to*Ns+it)/(Ns+1),++Ns)}},200)):(I.wheelDX+=g,I.wheelDY+=T))}}z(iv,"onScrollWheel");var no=z(function(s,f){this.ranges=s,this.primIndex=f},"Selection");no.prototype.primary=function(){return this.ranges[this.primIndex]},no.prototype.equals=function(s){if(s==this)return!0;if(s.primIndex!=this.primIndex||s.ranges.length!=this.ranges.length)return!1;for(var f=0;f<this.ranges.length;f++){var v=this.ranges[f],g=s.ranges[f];if(!ue(v.anchor,g.anchor)||!ue(v.head,g.head))return!1}return!0},no.prototype.deepCopy=function(){for(var s=[],f=0;f<this.ranges.length;f++)s[f]=new tn(Fe(this.ranges[f].anchor),Fe(this.ranges[f].head));return new no(s,this.primIndex)},no.prototype.somethingSelected=function(){for(var s=0;s<this.ranges.length;s++)if(!this.ranges[s].empty())return!0;return!1},no.prototype.contains=function(s,f){f||(f=s);for(var v=0;v<this.ranges.length;v++){var g=this.ranges[v];if(W(f,g.from())>=0&&W(s,g.to())<=0)return v}return-1};var tn=z(function(s,f){this.anchor=s,this.head=f},"Range");tn.prototype.from=function(){return St(this.anchor,this.head)},tn.prototype.to=function(){return We(this.anchor,this.head)},tn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ro(s,f,v){var g=s&&s.options.selectionsMayTouch,T=f[v];f.sort(function(ye,me){return W(ye.from(),me.from())}),v=Se(f,T);for(var O=1;O<f.length;O++){var I=f[O],U=f[O-1],q=W(U.to(),I.from());if(g&&!I.empty()?q>0:q>=0){var H=St(U.from(),I.from()),ie=We(U.to(),I.to()),le=U.empty()?I.from()==I.head:U.from()==U.head;O<=v&&--v,f.splice(--O,2,new tn(le?ie:H,le?H:ie))}}return new no(f,v)}z(ro,"normalizeSelection");function jo(s,f){return new no([new tn(s,f||s)],0)}z(jo,"simpleSelection");function Pa(s){return s.text?ze(s.from.line+s.text.length-1,Le(s.text).length+(s.text.length==1?s.from.ch:0)):s.to}z(Pa,"changeEnd");function fu(s,f){if(W(s,f.from)<0)return s;if(W(s,f.to)<=0)return Pa(f);var v=s.line+f.text.length-(f.to.line-f.from.line)-1,g=s.ch;return s.line==f.to.line&&(g+=Pa(f).ch-f.to.ch),ze(v,g)}z(fu,"adjustForChange");function md(s,f){for(var v=[],g=0;g<s.sel.ranges.length;g++){var T=s.sel.ranges[g];v.push(new tn(fu(T.anchor,f),fu(T.head,f)))}return ro(s.cm,v,s.sel.primIndex)}z(md,"computeSelAfterChange");function Dc(s,f,v){return s.line==f.line?ze(v.line,s.ch-f.ch+v.ch):ze(v.line+(s.line-f.line),s.ch)}z(Dc,"offsetPos");function ah(s,f,v){for(var g=[],T=ze(s.first,0),O=T,I=0;I<f.length;I++){var U=f[I],q=Dc(U.from,T,O),H=Dc(Pa(U),T,O);if(T=U.to,O=H,v=="around"){var ie=s.sel.ranges[I],le=W(ie.head,ie.anchor)<0;g[I]=new tn(le?H:q,le?q:H)}else g[I]=new tn(q,q)}return new no(g,s.sel.primIndex)}z(ah,"computeReplacedSel");function gd(s){s.doc.mode=po(s.options,s.doc.modeOption),As(s)}z(gd,"loadMode");function As(s){s.doc.iter(function(f){f.stateAfter&&(f.stateAfter=null),f.styles&&(f.styles=null)}),s.doc.modeFrontier=s.doc.highlightFrontier=s.doc.first,bo(s,100),s.state.modeGen++,s.curOp&&Zr(s)}z(As,"resetModeState");function sh(s,f){return f.from.ch==0&&f.to.ch==0&&Le(f.text)==""&&(!s.cm||s.cm.options.wholeLineUpdateBefore)}z(sh,"isWholeLineUpdate");function ml(s,f,v,g){function T(it){return v?v[it]:null}z(T,"spansFor");function O(it,Je,ut){Vp(it,Je,ut,g),Fr(it,"change",it,f)}z(O,"update");function I(it,Je){for(var ut=[],Ct=it;Ct<Je;++Ct)ut.push(new hc(H[Ct],T(Ct),g));return ut}z(I,"linesFor");var U=f.from,q=f.to,H=f.text,ie=ft(s,U.line),le=ft(s,q.line),ye=Le(H),me=T(H.length-1),we=q.line-U.line;if(f.full)s.insert(0,I(0,H.length)),s.remove(H.length,s.size-H.length);else if(sh(s,f)){var Ve=I(0,H.length-1);O(le,le.text,me),we&&s.remove(U.line,we),Ve.length&&s.insert(U.line,Ve)}else if(ie==le)if(H.length==1)O(ie,ie.text.slice(0,U.ch)+ye+ie.text.slice(q.ch),me);else{var Ke=I(1,H.length-1);Ke.push(new hc(ye+ie.text.slice(q.ch),me,g)),O(ie,ie.text.slice(0,U.ch)+H[0],T(0)),s.insert(U.line+1,Ke)}else if(H.length==1)O(ie,ie.text.slice(0,U.ch)+H[0]+le.text.slice(q.ch),T(0)),s.remove(U.line+1,we);else{O(ie,ie.text.slice(0,U.ch)+H[0],T(0)),O(le,ye+le.text.slice(q.ch),me);var rt=I(1,H.length-1);we>1&&s.remove(U.line+1,we-1),s.insert(U.line+1,rt)}Fr(s,"change",s,f)}z(ml,"updateDoc");function ja(s,f,v){function g(T,O,I){if(T.linked)for(var U=0;U<T.linked.length;++U){var q=T.linked[U];if(q.doc!=O){var H=I&&q.sharedHist;v&&!H||(f(q.doc,H),g(q.doc,T,H))}}}z(g,"propagate"),g(s,null,!0)}z(ja,"linkedDocs");function lh(s,f){if(f.cm)throw new Error("This document is already in use.");s.doc=f,f.cm=s,Jp(s),gd(s),Va(s),s.options.direction=f.direction,s.options.lineWrapping||jp(s),s.options.mode=f.modeOption,Zr(s)}z(lh,"attachDoc");function Va(s){(s.doc.direction=="rtl"?fe:X)(s.display.lineDiv,"CodeMirror-rtl")}z(Va,"setDirectionClass");function uh(s){Yr(s,function(){Va(s),Zr(s)})}z(uh,"directionChanged");function du(s){this.done=[],this.undone=[],this.undoDepth=s?s.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=s?s.maxGeneration:1}z(du,"History");function oa(s,f){var v={from:Fe(f.from),to:Pa(f),text:mo(s,f.from,f.to)};return fh(s,v,f.from.line,f.to.line+1),ja(s,function(g){return fh(g,v,f.from.line,f.to.line+1)},!0),v}z(oa,"historyChangeFromChange");function Ua(s){for(;s.length;){var f=Le(s);if(f.ranges)s.pop();else break}}z(Ua,"clearSelectionEvents");function kc(s,f){if(f)return Ua(s.done),Le(s.done);if(s.done.length&&!Le(s.done).ranges)return Le(s.done);if(s.done.length>1&&!s.done[s.done.length-2].ranges)return s.done.pop(),Le(s.done)}z(kc,"lastChangeEvent");function vd(s,f,v,g){var T=s.history;T.undone.length=0;var O=+new Date,I,U;if((T.lastOp==g||T.lastOrigin==f.origin&&f.origin&&(f.origin.charAt(0)=="+"&&T.lastModTime>O-(s.cm?s.cm.options.historyEventDelay:500)||f.origin.charAt(0)=="*"))&&(I=kc(T,T.lastOp==g)))U=Le(I.changes),W(f.from,f.to)==0&&W(f.from,U.to)==0?U.to=Pa(f):I.changes.push(oa(s,f));else{var q=Le(T.done);for((!q||!q.ranges)&&Os(s.sel,T.done),I={changes:[oa(s,f)],generation:T.generation},T.done.push(I);T.done.length>T.undoDepth;)T.done.shift(),T.done[0].ranges||T.done.shift()}T.done.push(v),T.generation=++T.maxGeneration,T.lastModTime=T.lastSelTime=O,T.lastOp=T.lastSelOp=g,T.lastOrigin=T.lastSelOrigin=f.origin,U||mt(s,"historyAdded")}z(vd,"addChangeToHistory");function ch(s,f,v,g){var T=f.charAt(0);return T=="*"||T=="+"&&v.ranges.length==g.ranges.length&&v.somethingSelected()==g.somethingSelected()&&new Date-s.history.lastSelTime<=(s.cm?s.cm.options.historyEventDelay:500)}z(ch,"selectionEventCanBeMerged");function Rc(s,f,v,g){var T=s.history,O=g&&g.origin;v==T.lastSelOp||O&&T.lastSelOrigin==O&&(T.lastModTime==T.lastSelTime&&T.lastOrigin==O||ch(s,O,Le(T.done),f))?T.done[T.done.length-1]=f:Os(f,T.done),T.lastSelTime=+new Date,T.lastSelOrigin=O,T.lastSelOp=v,g&&g.clearRedo!==!1&&Ua(T.undone)}z(Rc,"addSelectionToHistory");function Os(s,f){var v=Le(f);v&&v.ranges&&v.equals(s)||f.push(s)}z(Os,"pushSelectionToHistory");function fh(s,f,v,g){var T=f["spans_"+s.id],O=0;s.iter(Math.max(s.first,v),Math.min(s.first+s.size,g),function(I){I.markedSpans&&((T||(T=f["spans_"+s.id]={}))[O]=I.markedSpans),++O})}z(fh,"attachLocalSpans");function ov(s){if(!s)return null;for(var f,v=0;v<s.length;++v)s[v].marker.explicitlyCleared?f||(f=s.slice(0,v)):f&&f.push(s[v]);return f?f.length?f:null:s}z(ov,"removeClearedSpans");function pu(s,f){var v=f["spans_"+s.id];if(!v)return null;for(var g=[],T=0;T<f.text.length;++T)g.push(ov(v[T]));return g}z(pu,"getOldSpans");function Mc(s,f){var v=pu(s,f),g=nl(s,f);if(!v)return g;if(!g)return v;for(var T=0;T<v.length;++T){var O=v[T],I=g[T];if(O&&I)e:for(var U=0;U<I.length;++U){for(var q=I[U],H=0;H<O.length;++H)if(O[H].marker==q.marker)continue e;O.push(q)}else I&&(v[T]=I)}return v}z(Mc,"mergeOldSpans");function gl(s,f,v){for(var g=[],T=0;T<s.length;++T){var O=s[T];if(O.ranges){g.push(v?no.prototype.deepCopy.call(O):O);continue}var I=O.changes,U=[];g.push({changes:U});for(var q=0;q<I.length;++q){var H=I[q],ie=void 0;if(U.push({from:H.from,to:H.to,text:H.text}),f)for(var le in H)(ie=le.match(/^spans_(\d+)$/))&&Se(f,Number(ie[1]))>-1&&(Le(U)[le]=H[le],delete H[le])}}return g}z(gl,"copyHistoryArray");function Lc(s,f,v,g){if(g){var T=s.anchor;if(v){var O=W(f,T)<0;O!=W(v,T)<0?(T=f,f=v):O!=W(f,v)<0&&(f=v)}return new tn(T,f)}else return new tn(v||f,f)}z(Lc,"extendRange");function hu(s,f,v,g,T){T==null&&(T=s.cm&&(s.cm.display.shift||s.extend)),hr(s,new no([Lc(s.sel.primary(),f,v,T)],0),g)}z(hu,"extendSelection");function qa(s,f,v){for(var g=[],T=s.cm&&(s.cm.display.shift||s.extend),O=0;O<s.sel.ranges.length;O++)g[O]=Lc(s.sel.ranges[O],f[O],null,T);var I=ro(s.cm,g,s.sel.primIndex);hr(s,I,v)}z(qa,"extendSelections");function Ht(s,f,v,g){var T=s.sel.ranges.slice(0);T[f]=v,hr(s,ro(s.cm,T,s.sel.primIndex),g)}z(Ht,"replaceOneSelection");function On(s,f,v,g){hr(s,jo(f,v),g)}z(On,"setSimpleSelection");function Ar(s,f,v){var g={ranges:f.ranges,update:function(T){this.ranges=[];for(var O=0;O<T.length;O++)this.ranges[O]=new tn(st(s,T[O].anchor),st(s,T[O].head))},origin:v&&v.origin};return mt(s,"beforeSelectionChange",s,g),s.cm&&mt(s.cm,"beforeSelectionChange",s.cm,g),g.ranges!=f.ranges?ro(s.cm,g.ranges,g.ranges.length-1):f}z(Ar,"filterSelectionChange");function Ic(s,f,v){var g=s.history.done,T=Le(g);T&&T.ranges?(g[g.length-1]=f,aa(s,f,v)):hr(s,f,v)}z(Ic,"setSelectionReplaceHistory");function hr(s,f,v){aa(s,f,v),Rc(s,s.sel,s.cm?s.cm.curOp.id:NaN,v)}z(hr,"setSelection");function aa(s,f,v){(on(s,"beforeSelectionChange")||s.cm&&on(s.cm,"beforeSelectionChange"))&&(f=Ar(s,f,v));var g=v&&v.bias||(W(f.primary().head,s.sel.primary().head)<0?-1:1);Fc(s,vl(s,f,g,!0)),!(v&&v.scroll===!1)&&s.cm&&s.cm.getOption("readOnly")!="nocursor"&&Io(s.cm)}z(aa,"setSelectionNoUndo");function Fc(s,f){f.equals(s.sel)||(s.sel=f,s.cm&&(s.cm.curOp.updateInput=1,s.cm.curOp.selectionChanged=!0,di(s.cm)),Fr(s,"cursorActivity",s))}z(Fc,"setSelectionInner");function mu(s){Fc(s,vl(s,s.sel,null,!1))}z(mu,"reCheckSelection");function vl(s,f,v,g){for(var T,O=0;O<f.ranges.length;O++){var I=f.ranges[O],U=f.ranges.length==s.sel.ranges.length&&s.sel.ranges[O],q=Qn(s,I.anchor,U&&U.anchor,v,g),H=Qn(s,I.head,U&&U.head,v,g);(T||q!=I.anchor||H!=I.head)&&(T||(T=f.ranges.slice(0,O)),T[O]=new tn(q,H))}return T?ro(s.cm,T,f.primIndex):f}z(vl,"skipAtomicInSelection");function gu(s,f,v,g,T){var O=ft(s,f.line);if(O.markedSpans)for(var I=0;I<O.markedSpans.length;++I){var U=O.markedSpans[I],q=U.marker,H="selectLeft"in q?!q.selectLeft:q.inclusiveLeft,ie="selectRight"in q?!q.selectRight:q.inclusiveRight;if((U.from==null||(H?U.from<=f.ch:U.from<f.ch))&&(U.to==null||(ie?U.to>=f.ch:U.to>f.ch))){if(T&&(mt(q,"beforeCursorEnter"),q.explicitlyCleared))if(O.markedSpans){--I;continue}else break;if(!q.atomic)continue;if(v){var le=q.find(g<0?1:-1),ye=void 0;if((g<0?ie:H)&&(le=yd(s,le,-g,le&&le.line==f.line?O:null)),le&&le.line==f.line&&(ye=W(le,v))&&(g<0?ye<0:ye>0))return gu(s,le,f,g,T)}var me=q.find(g<0?-1:1);return(g<0?H:ie)&&(me=yd(s,me,g,me.line==f.line?O:null)),me?gu(s,me,f,g,T):null}}return f}z(gu,"skipAtomicInner");function Qn(s,f,v,g,T){var O=g||1,I=gu(s,f,v,O,T)||!T&&gu(s,f,v,O,!0)||gu(s,f,v,-O,T)||!T&&gu(s,f,v,-O,!0);return I||(s.cantEdit=!0,ze(s.first,0))}z(Qn,"skipAtomic");function yd(s,f,v,g){return v<0&&f.ch==0?f.line>s.first?st(s,ze(f.line-1)):null:v>0&&f.ch==(g||ft(s,f.line)).text.length?f.line<s.first+s.size-1?ze(f.line+1,0):null:new ze(f.line,f.ch+v)}z(yd,"movePos");function bd(s){s.setSelection(ze(s.firstLine(),0),ze(s.lastLine()),Ze)}z(bd,"selectAll");function dh(s,f,v){var g={canceled:!1,from:f.from,to:f.to,text:f.text,origin:f.origin,cancel:function(){return g.canceled=!0}};return v&&(g.update=function(T,O,I,U){T&&(g.from=st(s,T)),O&&(g.to=st(s,O)),I&&(g.text=I),U!==void 0&&(g.origin=U)}),mt(s,"beforeChange",s,g),s.cm&&mt(s.cm,"beforeChange",s.cm,g),g.canceled?(s.cm&&(s.cm.curOp.updateInput=2),null):{from:g.from,to:g.to,text:g.text,origin:g.origin}}z(dh,"filterChange");function yl(s,f,v){if(s.cm){if(!s.cm.curOp)return Sr(s.cm,yl)(s,f,v);if(s.cm.state.suppressEdits)return}if(!((on(s,"beforeChange")||s.cm&&on(s.cm,"beforeChange"))&&(f=dh(s,f,!0),!f))){var g=f1&&!v&&Pp(s,f.from,f.to);if(g)for(var T=g.length-1;T>=0;--T)av(s,{from:g[T].from,to:g[T].to,text:T?[""]:f.text,origin:f.origin});else av(s,f)}}z(yl,"makeChange");function av(s,f){if(!(f.text.length==1&&f.text[0]==""&&W(f.from,f.to)==0)){var v=md(s,f);vd(s,f,v,s.cm?s.cm.curOp.id:NaN),bl(s,f,v,nl(s,f));var g=[];ja(s,function(T,O){!O&&Se(g,T.history)==-1&&(Pc(T.history,f),g.push(T.history)),bl(T,f,null,nl(T,f))})}}z(av,"makeChangeInner");function vu(s,f,v){var g=s.cm&&s.cm.state.suppressEdits;if(!(g&&!v)){for(var T=s.history,O,I=s.sel,U=f=="undo"?T.done:T.undone,q=f=="undo"?T.undone:T.done,H=0;H<U.length&&(O=U[H],!(v?O.ranges&&!O.equals(s.sel):!O.ranges));H++);if(H!=U.length){for(T.lastOrigin=T.lastSelOrigin=null;;)if(O=U.pop(),O.ranges){if(Os(O,q),v&&!O.equals(s.sel)){hr(s,O,{clearRedo:!1});return}I=O}else if(g){U.push(O);return}else break;var ie=[];Os(I,q),q.push({changes:ie,generation:T.generation}),T.generation=O.generation||++T.maxGeneration;for(var le=on(s,"beforeChange")||s.cm&&on(s.cm,"beforeChange"),ye=z(function(Ve){var Ke=O.changes[Ve];if(Ke.origin=f,le&&!dh(s,Ke,!1))return U.length=0,{};ie.push(oa(s,Ke));var rt=Ve?md(s,Ke):Le(U);bl(s,Ke,rt,Mc(s,Ke)),!Ve&&s.cm&&s.cm.scrollIntoView({from:Ke.from,to:Pa(Ke)});var it=[];ja(s,function(Je,ut){!ut&&Se(it,Je.history)==-1&&(Pc(Je.history,Ke),it.push(Je.history)),bl(Je,Ke,null,Mc(Je,Ke))})},"loop"),me=O.changes.length-1;me>=0;--me){var we=ye(me);if(we)return we.v}}}}z(vu,"makeChangeFromHistory");function Ed(s,f){if(f!=0&&(s.first+=f,s.sel=new no(Ee(s.sel.ranges,function(T){return new tn(ze(T.anchor.line+f,T.anchor.ch),ze(T.head.line+f,T.head.ch))}),s.sel.primIndex),s.cm)){Zr(s.cm,s.first,s.first-f,f);for(var v=s.cm.display,g=v.viewFrom;g<v.viewTo;g++)Hr(s.cm,g,"gutter")}}z(Ed,"shiftDoc");function bl(s,f,v,g){if(s.cm&&!s.cm.curOp)return Sr(s.cm,bl)(s,f,v,g);if(f.to.line<s.first){Ed(s,f.text.length-1-(f.to.line-f.from.line));return}if(!(f.from.line>s.lastLine())){if(f.from.line<s.first){var T=f.text.length-1-(s.first-f.from.line);Ed(s,T),f={from:ze(s.first,0),to:ze(f.to.line+T,f.to.ch),text:[Le(f.text)],origin:f.origin}}var O=s.lastLine();f.to.line>O&&(f={from:f.from,to:ze(O,ft(s,O).text.length),text:[f.text[0]],origin:f.origin}),f.removed=mo(s,f.from,f.to),v||(v=md(s,f)),s.cm?qi(s.cm,f,g):ml(s,f,g),aa(s,v,Ze),s.cantEdit&&Qn(s,ze(s.firstLine(),0))&&(s.cantEdit=!1)}}z(bl,"makeChangeSingleDoc");function qi(s,f,v){var g=s.doc,T=s.display,O=f.from,I=f.to,U=!1,q=O.line;s.options.lineWrapping||(q=an(Ui(ft(g,O.line))),g.iter(q,I.line+1,function(me){if(me==T.maxLine)return U=!0,!0})),g.sel.contains(f.from,f.to)>-1&&di(s),ml(g,f,v,Kg(s)),s.options.lineWrapping||(g.iter(q,O.line+f.text.length,function(me){var we=id(me);we>T.maxLineLength&&(T.maxLine=me,T.maxLineLength=we,T.maxLineChanged=!0,U=!1)}),U&&(s.curOp.updateMaxLine=!0)),Lp(g,O.line),bo(s,400);var H=f.text.length-(I.line-O.line)-1;f.full?Zr(s):O.line==I.line&&f.text.length==1&&!sh(s.doc,f)?Hr(s,O.line,"text"):Zr(s,O.line,I.line+1,H);var ie=on(s,"changes"),le=on(s,"change");if(le||ie){var ye={from:O,to:I,text:f.text,removed:f.removed,origin:f.origin};le&&Fr(s,"change",s,ye),ie&&(s.curOp.changeObjs||(s.curOp.changeObjs=[])).push(ye)}s.display.selForContextMenu=null}z(qi,"makeChangeSingleDocInEditor");function $n(s,f,v,g,T){var O;g||(g=v),W(g,v)<0&&(O=[g,v],v=O[0],g=O[1]),typeof f=="string"&&(f=s.splitLines(f)),yl(s,{from:v,to:g,text:f,origin:T})}z($n,"replaceRange");function Sd(s,f,v,g){v<s.line?s.line+=g:f<s.line&&(s.line=f,s.ch=0)}z(Sd,"rebaseHistSelSingle");function yu(s,f,v,g){for(var T=0;T<s.length;++T){var O=s[T],I=!0;if(O.ranges){O.copied||(O=s[T]=O.deepCopy(),O.copied=!0);for(var U=0;U<O.ranges.length;U++)Sd(O.ranges[U].anchor,f,v,g),Sd(O.ranges[U].head,f,v,g);continue}for(var q=0;q<O.changes.length;++q){var H=O.changes[q];if(v<H.from.line)H.from=ze(H.from.line+g,H.from.ch),H.to=ze(H.to.line+g,H.to.ch);else if(f<=H.to.line){I=!1;break}}I||(s.splice(0,T+1),T=0)}}z(yu,"rebaseHistArray");function Pc(s,f){var v=f.from.line,g=f.to.line,T=f.text.length-(g-v)-1;yu(s.done,v,g,T),yu(s.undone,v,g,T)}z(Pc,"rebaseHist");function El(s,f,v,g){var T=f,O=f;return typeof f=="number"?O=ft(s,en(s,f)):T=an(f),T==null?null:(g(O,T)&&s.cm&&Hr(s.cm,T,v),O)}z(El,"changeLine");function io(s){this.lines=s,this.parent=null;for(var f=0,v=0;v<s.length;++v)s[v].parent=this,f+=s[v].height;this.height=f}z(io,"LeafChunk"),io.prototype={chunkSize:function(){return this.lines.length},removeInner:function(s,f){for(var v=s,g=s+f;v<g;++v){var T=this.lines[v];this.height-=T.height,p1(T),Fr(T,"delete")}this.lines.splice(s,f)},collapse:function(s){s.push.apply(s,this.lines)},insertInner:function(s,f,v){this.height+=v,this.lines=this.lines.slice(0,s).concat(f).concat(this.lines.slice(s));for(var g=0;g<f.length;++g)f[g].parent=this},iterN:function(s,f,v){for(var g=s+f;s<g;++s)if(v(this.lines[s]))return!0}};function Ds(s){this.children=s;for(var f=0,v=0,g=0;g<s.length;++g){var T=s[g];f+=T.chunkSize(),v+=T.height,T.parent=this}this.size=f,this.height=v,this.parent=null}z(Ds,"BranchChunk"),Ds.prototype={chunkSize:function(){return this.size},removeInner:function(s,f){this.size-=f;for(var v=0;v<this.children.length;++v){var g=this.children[v],T=g.chunkSize();if(s<T){var O=Math.min(f,T-s),I=g.height;if(g.removeInner(s,O),this.height-=I-g.height,T==O&&(this.children.splice(v--,1),g.parent=null),(f-=O)==0)break;s=0}else s-=T}if(this.size-f<25&&(this.children.length>1||!(this.children[0]instanceof io))){var U=[];this.collapse(U),this.children=[new io(U)],this.children[0].parent=this}},collapse:function(s){for(var f=0;f<this.children.length;++f)this.children[f].collapse(s)},insertInner:function(s,f,v){this.size+=f.length,this.height+=v;for(var g=0;g<this.children.length;++g){var T=this.children[g],O=T.chunkSize();if(s<=O){if(T.insertInner(s,f,v),T.lines&&T.lines.length>50){for(var I=T.lines.length%25+25,U=I;U<T.lines.length;){var q=new io(T.lines.slice(U,U+=25));T.height-=q.height,this.children.splice(++g,0,q),q.parent=this}T.lines=T.lines.slice(0,I),this.maybeSpill()}break}s-=O}},maybeSpill:function(){if(!(this.children.length<=10)){var s=this;do{var f=s.children.splice(s.children.length-5,5),v=new Ds(f);if(s.parent){s.size-=v.size,s.height-=v.height;var g=Se(s.parent.children,s);s.parent.children.splice(g+1,0,v)}else{var T=new Ds(s.children);T.parent=s,s.children=[T,v],s=T}v.parent=s.parent}while(s.children.length>10);s.parent.maybeSpill()}},iterN:function(s,f,v){for(var g=0;g<this.children.length;++g){var T=this.children[g],O=T.chunkSize();if(s<O){var I=Math.min(f,O-s);if(T.iterN(s,I,v))return!0;if((f-=I)==0)break;s=0}else s-=O}}};var bu=z(function(s,f,v){if(v)for(var g in v)v.hasOwnProperty(g)&&(this[g]=v[g]);this.doc=s,this.node=f},"LineWidget");bu.prototype.clear=function(){var s=this.doc.cm,f=this.line.widgets,v=this.line,g=an(v);if(!(g==null||!f)){for(var T=0;T<f.length;++T)f[T]==this&&f.splice(T--,1);f.length||(v.widgets=null);var O=na(this);zr(v,Math.max(0,v.height-O)),s&&(Yr(s,function(){Td(s,v,-O),Hr(s,g,"widget")}),Fr(s,"lineWidgetCleared",s,this,g))}},bu.prototype.changed=function(){var s=this,f=this.height,v=this.doc.cm,g=this.line;this.height=null;var T=na(this)-f;T&&(go(this.doc,g)||zr(g,g.height+T),v&&Yr(v,function(){v.curOp.forceUpdate=!0,Td(v,g,T),Fr(v,"lineWidgetChanged",v,s,an(g))}))},Mr(bu);function Td(s,f,v){ta(f)<(s.curOp&&s.curOp.scrollTop||s.doc.scrollTop)&&ws(s,v)}z(Td,"adjustScrollWhenAboveVisible");function sv(s,f,v,g){var T=new bu(s,v,g),O=s.cm;return O&&T.noHScroll&&(O.display.alignWidgets=!0),El(s,f,"widget",function(I){var U=I.widgets||(I.widgets=[]);if(T.insertAt==null?U.push(T):U.splice(Math.min(U.length,Math.max(0,T.insertAt)),0,T),T.line=I,O&&!go(s,I)){var q=ta(I)<s.scrollTop;zr(I,I.height+na(T)),q&&ws(O,T.height),O.curOp.forceUpdate=!0}return!0}),O&&Fr(O,"lineWidgetAdded",O,T,typeof f=="number"?f:an(f)),T}z(sv,"addLineWidget");var lv=0,ks=z(function(s,f){this.lines=[],this.type=f,this.doc=s,this.id=++lv},"TextMarker");ks.prototype.clear=function(){if(!this.explicitlyCleared){var s=this.doc.cm,f=s&&!s.curOp;if(f&&hi(s),on(this,"clear")){var v=this.find();v&&Fr(this,"clear",v.from,v.to)}for(var g=null,T=null,O=0;O<this.lines.length;++O){var I=this.lines[O],U=Jo(I.markedSpans,this);s&&!this.collapsed?Hr(s,an(I),"text"):s&&(U.to!=null&&(T=an(I)),U.from!=null&&(g=an(I))),I.markedSpans=Kl(I.markedSpans,U),U.from==null&&this.collapsed&&!go(this.doc,I)&&s&&zr(I,ll(s.display))}if(s&&this.collapsed&&!s.options.lineWrapping)for(var q=0;q<this.lines.length;++q){var H=Ui(this.lines[q]),ie=id(H);ie>s.display.maxLineLength&&(s.display.maxLine=H,s.display.maxLineLength=ie,s.display.maxLineChanged=!0)}g!=null&&s&&this.collapsed&&Zr(s,g,T+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,s&&mu(s.doc)),s&&Fr(s,"markerCleared",s,this,g,T),f&&Ma(s),this.parent&&this.parent.clear()}},ks.prototype.find=function(s,f){s==null&&this.type=="bookmark"&&(s=1);for(var v,g,T=0;T<this.lines.length;++T){var O=this.lines[T],I=Jo(O.markedSpans,this);if(I.from!=null&&(v=ze(f?O:an(O),I.from),s==-1))return v;if(I.to!=null&&(g=ze(f?O:an(O),I.to),s==1))return g}return v&&{from:v,to:g}},ks.prototype.changed=function(){var s=this,f=this.find(-1,!0),v=this,g=this.doc.cm;!f||!g||Yr(g,function(){var T=f.line,O=an(f.line),I=yc(g,O);if(I&&(Yg(I),g.curOp.selectionChanged=g.curOp.forceUpdate=!0),g.curOp.updateMaxLine=!0,!go(v.doc,T)&&v.height!=null){var U=v.height;v.height=null;var q=na(v)-U;q&&zr(T,T.height+q)}Fr(g,"markerChanged",g,s)})},ks.prototype.attachLine=function(s){if(!this.lines.length&&this.doc.cm){var f=this.doc.cm.curOp;(!f.maybeHiddenMarkers||Se(f.maybeHiddenMarkers,this)==-1)&&(f.maybeUnhiddenMarkers||(f.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(s)},ks.prototype.detachLine=function(s){if(this.lines.splice(Se(this.lines,s),1),!this.lines.length&&this.doc.cm){var f=this.doc.cm.curOp;(f.maybeHiddenMarkers||(f.maybeHiddenMarkers=[])).push(this)}},Mr(ks);function Sl(s,f,v,g,T){if(g&&g.shared)return uv(s,f,v,g,T);if(s.cm&&!s.cm.curOp)return Sr(s.cm,Sl)(s,f,v,g,T);var O=new ks(s,T),I=W(f,v);if(g&&pe(g,O,!1),I>0||I==0&&O.clearWhenEmpty!==!1)return O;if(O.replacedWith&&(O.collapsed=!0,O.widgetNode=B("span",[O.replacedWith],"CodeMirror-widget"),g.handleMouseEvents||O.widgetNode.setAttribute("cm-ignore-events","true"),g.insertLeft&&(O.widgetNode.insertLeft=!0)),O.collapsed){if(bs(s,f.line,f,v,O)||f.line!=v.line&&bs(s,v.line,f,v,O))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ip()}O.addToHistory&&vd(s,{from:f,to:v,origin:"markText"},s.sel,NaN);var U=f.line,q=s.cm,H;if(s.iter(U,v.line+1,function(le){q&&O.collapsed&&!q.options.lineWrapping&&Ui(le)==q.display.maxLine&&(H=!0),O.collapsed&&U!=f.line&&zr(le,0),kg(le,new Ql(O,U==f.line?f.ch:null,U==v.line?v.ch:null),s.cm&&s.cm.curOp),++U}),O.collapsed&&s.iter(f.line,v.line+1,function(le){go(s,le)&&zr(le,0)}),O.clearOnEnter&&ot(O,"beforeCursorEnter",function(){return O.clear()}),O.readOnly&&(td(),(s.history.done.length||s.history.undone.length)&&s.clearHistory()),O.collapsed&&(O.id=++lv,O.atomic=!0),q){if(H&&(q.curOp.updateMaxLine=!0),O.collapsed)Zr(q,f.line,v.line+1);else if(O.className||O.startStyle||O.endStyle||O.css||O.attributes||O.title)for(var ie=f.line;ie<=v.line;ie++)Hr(q,ie,"text");O.atomic&&mu(q.doc),Fr(q,"markerAdded",q,O)}return O}z(Sl,"markText");var jc=z(function(s,f){this.markers=s,this.primary=f;for(var v=0;v<s.length;++v)s[v].parent=this},"SharedTextMarker");jc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var s=0;s<this.markers.length;++s)this.markers[s].clear();Fr(this,"clear")}},jc.prototype.find=function(s,f){return this.primary.find(s,f)},Mr(jc);function uv(s,f,v,g,T){g=pe(g),g.shared=!1;var O=[Sl(s,f,v,g,T)],I=O[0],U=g.widgetNode;return ja(s,function(q){U&&(g.widgetNode=U.cloneNode(!0)),O.push(Sl(q,st(q,f),st(q,v),g,T));for(var H=0;H<q.linked.length;++H)if(q.linked[H].isParent)return;I=Le(O)}),new jc(O,I)}z(uv,"markTextShared");function xd(s){return s.findMarks(ze(s.first,0),s.clipPos(ze(s.lastLine())),function(f){return f.parent})}z(xd,"findSharedMarkers");function cv(s,f){for(var v=0;v<f.length;v++){var g=f[v],T=g.find(),O=s.clipPos(T.from),I=s.clipPos(T.to);if(W(O,I)){var U=Sl(s,O,I,g.primary,g.primary.type);g.markers.push(U),U.parent=g}}}z(cv,"copySharedMarkers");function C1(s){for(var f=z(function(g){var T=s[g],O=[T.primary.doc];ja(T.primary.doc,function(q){return O.push(q)});for(var I=0;I<T.markers.length;I++){var U=T.markers[I];Se(O,U.doc)==-1&&(U.parent=null,T.markers.splice(I--,1))}},"loop"),v=0;v<s.length;v++)f(v)}z(C1,"detachSharedMarkers");var _1=0,Ci=z(function(s,f,v,g,T){if(!(this instanceof Ci))return new Ci(s,f,v,g,T);v==null&&(v=0),Ds.call(this,[new io([new hc("",null)])]),this.first=v,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=v;var O=ze(v,0);this.sel=jo(O),this.history=new du(null),this.id=++_1,this.modeOption=f,this.lineSep=g,this.direction=T=="rtl"?"rtl":"ltr",this.extend=!1,typeof s=="string"&&(s=this.splitLines(s)),ml(this,{from:O,to:O,text:s}),hr(this,jo(O),Ze)},"Doc");Ci.prototype=et(Ds.prototype,{constructor:Ci,iter:function(s,f,v){v?this.iterN(s-this.first,f-s,v):this.iterN(this.first,this.first+this.size,s)},insert:function(s,f){for(var v=0,g=0;g<f.length;++g)v+=f[g].height;this.insertInner(s-this.first,f,v)},remove:function(s,f){this.removeInner(s-this.first,f)},getValue:function(s){var f=Yl(this,this.first,this.first+this.size);return s===!1?f:f.join(s||this.lineSeparator())},setValue:Pn(function(s){var f=ze(this.first,0),v=this.first+this.size-1;yl(this,{from:f,to:ze(v,ft(this,v).text.length),text:this.splitLines(s),origin:"setValue",full:!0},!0),this.cm&&Cs(this.cm,0,0),hr(this,jo(f),Ze)}),replaceRange:function(s,f,v,g){f=st(this,f),v=v?st(this,v):f,$n(this,s,f,v,g)},getRange:function(s,f,v){var g=mo(this,st(this,s),st(this,f));return v===!1?g:v===""?g.join(""):g.join(v||this.lineSeparator())},getLine:function(s){var f=this.getLineHandle(s);return f&&f.text},getLineHandle:function(s){if(Zo(this,s))return ft(this,s)},getLineNumber:function(s){return an(s)},getLineHandleVisualStart:function(s){return typeof s=="number"&&(s=ft(this,s)),Ui(s)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(s){return st(this,s)},getCursor:function(s){var f=this.sel.primary(),v;return s==null||s=="head"?v=f.head:s=="anchor"?v=f.anchor:s=="end"||s=="to"||s===!1?v=f.to():v=f.from(),v},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Pn(function(s,f,v){On(this,st(this,typeof s=="number"?ze(s,f||0):s),null,v)}),setSelection:Pn(function(s,f,v){On(this,st(this,s),st(this,f||s),v)}),extendSelection:Pn(function(s,f,v){hu(this,st(this,s),f&&st(this,f),v)}),extendSelections:Pn(function(s,f){qa(this,ji(this,s),f)}),extendSelectionsBy:Pn(function(s,f){var v=Ee(this.sel.ranges,s);qa(this,ji(this,v),f)}),setSelections:Pn(function(s,f,v){if(s.length){for(var g=[],T=0;T<s.length;T++)g[T]=new tn(st(this,s[T].anchor),st(this,s[T].head||s[T].anchor));f==null&&(f=Math.min(s.length-1,this.sel.primIndex)),hr(this,ro(this.cm,g,f),v)}}),addSelection:Pn(function(s,f,v){var g=this.sel.ranges.slice(0);g.push(new tn(st(this,s),st(this,f||s))),hr(this,ro(this.cm,g,g.length-1),v)}),getSelection:function(s){for(var f=this.sel.ranges,v,g=0;g<f.length;g++){var T=mo(this,f[g].from(),f[g].to());v=v?v.concat(T):T}return s===!1?v:v.join(s||this.lineSeparator())},getSelections:function(s){for(var f=[],v=this.sel.ranges,g=0;g<v.length;g++){var T=mo(this,v[g].from(),v[g].to());s!==!1&&(T=T.join(s||this.lineSeparator())),f[g]=T}return f},replaceSelection:function(s,f,v){for(var g=[],T=0;T<this.sel.ranges.length;T++)g[T]=s;this.replaceSelections(g,f,v||"+input")},replaceSelections:Pn(function(s,f,v){for(var g=[],T=this.sel,O=0;O<T.ranges.length;O++){var I=T.ranges[O];g[O]={from:I.from(),to:I.to(),text:this.splitLines(s[O]),origin:v}}for(var U=f&&f!="end"&&ah(this,g,f),q=g.length-1;q>=0;q--)yl(this,g[q]);U?Ic(this,U):this.cm&&Io(this.cm)}),undo:Pn(function(){vu(this,"undo")}),redo:Pn(function(){vu(this,"redo")}),undoSelection:Pn(function(){vu(this,"undo",!0)}),redoSelection:Pn(function(){vu(this,"redo",!0)}),setExtending:function(s){this.extend=s},getExtending:function(){return this.extend},historySize:function(){for(var s=this.history,f=0,v=0,g=0;g<s.done.length;g++)s.done[g].ranges||++f;for(var T=0;T<s.undone.length;T++)s.undone[T].ranges||++v;return{undo:f,redo:v}},clearHistory:function(){var s=this;this.history=new du(this.history),ja(this,function(f){return f.history=s.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(s){return s&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(s){return this.history.generation==(s||this.cleanGeneration)},getHistory:function(){return{done:gl(this.history.done),undone:gl(this.history.undone)}},setHistory:function(s){var f=this.history=new du(this.history);f.done=gl(s.done.slice(0),null,!0),f.undone=gl(s.undone.slice(0),null,!0)},setGutterMarker:Pn(function(s,f,v){return El(this,s,"gutter",function(g){var T=g.gutterMarkers||(g.gutterMarkers={});return T[f]=v,!v&&$e(T)&&(g.gutterMarkers=null),!0})}),clearGutter:Pn(function(s){var f=this;this.iter(function(v){v.gutterMarkers&&v.gutterMarkers[s]&&El(f,v,"gutter",function(){return v.gutterMarkers[s]=null,$e(v.gutterMarkers)&&(v.gutterMarkers=null),!0})})}),lineInfo:function(s){var f;if(typeof s=="number"){if(!Zo(this,s)||(f=s,s=ft(this,s),!s))return null}else if(f=an(s),f==null)return null;return{line:f,handle:s,text:s.text,gutterMarkers:s.gutterMarkers,textClass:s.textClass,bgClass:s.bgClass,wrapClass:s.wrapClass,widgets:s.widgets}},addLineClass:Pn(function(s,f,v){return El(this,s,f=="gutter"?"gutter":"class",function(g){var T=f=="text"?"textClass":f=="background"?"bgClass":f=="gutter"?"gutterClass":"wrapClass";if(!g[T])g[T]=v;else{if($(v).test(g[T]))return!1;g[T]+=" "+v}return!0})}),removeLineClass:Pn(function(s,f,v){return El(this,s,f=="gutter"?"gutter":"class",function(g){var T=f=="text"?"textClass":f=="background"?"bgClass":f=="gutter"?"gutterClass":"wrapClass",O=g[T];if(O)if(v==null)g[T]=null;else{var I=O.match($(v));if(!I)return!1;var U=I.index+I[0].length;g[T]=O.slice(0,I.index)+(!I.index||U==O.length?"":" ")+O.slice(U)||null}else return!1;return!0})}),addLineWidget:Pn(function(s,f,v){return sv(this,s,f,v)}),removeLineWidget:function(s){s.clear()},markText:function(s,f,v){return Sl(this,st(this,s),st(this,f),v,v&&v.type||"range")},setBookmark:function(s,f){var v={replacedWith:f&&(f.nodeType==null?f.widget:f),insertLeft:f&&f.insertLeft,clearWhenEmpty:!1,shared:f&&f.shared,handleMouseEvents:f&&f.handleMouseEvents};return s=st(this,s),Sl(this,s,s,v,"bookmark")},findMarksAt:function(s){s=st(this,s);var f=[],v=ft(this,s.line).markedSpans;if(v)for(var g=0;g<v.length;++g){var T=v[g];(T.from==null||T.from<=s.ch)&&(T.to==null||T.to>=s.ch)&&f.push(T.marker.parent||T.marker)}return f},findMarks:function(s,f,v){s=st(this,s),f=st(this,f);var g=[],T=s.line;return this.iter(s.line,f.line+1,function(O){var I=O.markedSpans;if(I)for(var U=0;U<I.length;U++){var q=I[U];!(q.to!=null&&T==s.line&&s.ch>=q.to||q.from==null&&T!=s.line||q.from!=null&&T==f.line&&q.from>=f.ch)&&(!v||v(q.marker))&&g.push(q.marker.parent||q.marker)}++T}),g},getAllMarks:function(){var s=[];return this.iter(function(f){var v=f.markedSpans;if(v)for(var g=0;g<v.length;++g)v[g].from!=null&&s.push(v[g].marker)}),s},posFromIndex:function(s){var f,v=this.first,g=this.lineSeparator().length;return this.iter(function(T){var O=T.text.length+g;if(O>s)return f=s,!0;s-=O,++v}),st(this,ze(v,f))},indexFromPos:function(s){s=st(this,s);var f=s.ch;if(s.line<this.first||s.ch<0)return 0;var v=this.lineSeparator().length;return this.iter(this.first,s.line,function(g){f+=g.text.length+v}),f},copy:function(s){var f=new Ci(Yl(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return f.scrollTop=this.scrollTop,f.scrollLeft=this.scrollLeft,f.sel=this.sel,f.extend=!1,s&&(f.history.undoDepth=this.history.undoDepth,f.setHistory(this.getHistory())),f},linkedDoc:function(s){s||(s={});var f=this.first,v=this.first+this.size;s.from!=null&&s.from>f&&(f=s.from),s.to!=null&&s.to<v&&(v=s.to);var g=new Ci(Yl(this,f,v),s.mode||this.modeOption,f,this.lineSep,this.direction);return s.sharedHist&&(g.history=this.history),(this.linked||(this.linked=[])).push({doc:g,sharedHist:s.sharedHist}),g.linked=[{doc:this,isParent:!0,sharedHist:s.sharedHist}],cv(g,xd(this)),g},unlinkDoc:function(s){if(s instanceof Mn&&(s=s.doc),this.linked)for(var f=0;f<this.linked.length;++f){var v=this.linked[f];if(v.doc==s){this.linked.splice(f,1),s.unlinkDoc(this),C1(xd(this));break}}if(s.history==this.history){var g=[s.id];ja(s,function(T){return g.push(T.id)},!0),s.history=new du(null),s.history.done=gl(this.history.done,g),s.history.undone=gl(this.history.undone,g)}},iterLinkedDocs:function(s){ja(this,s)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(s){return this.lineSep?s.split(this.lineSep):Ii(s)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Pn(function(s){s!="rtl"&&(s="ltr"),s!=this.direction&&(this.direction=s,this.iter(function(f){return f.order=null}),this.cm&&uh(this.cm))})}),Ci.prototype.eachLine=Ci.prototype.iter;var fv=0;function ph(s){var f=this;if(hh(f),!(yn(f,s)||Da(f.display,s))){An(s),p&&(fv=+new Date);var v=Ss(f,s,!0),g=s.dataTransfer.files;if(!(!v||f.isReadOnly()))if(g&&g.length&&window.FileReader&&window.File)for(var T=g.length,O=Array(T),I=0,U=z(function(){++I==T&&Sr(f,function(){v=st(f.doc,v);var me={from:v,to:v,text:f.doc.splitLines(O.filter(function(we){return we!=null}).join(f.doc.lineSeparator())),origin:"paste"};yl(f.doc,me),Ic(f.doc,jo(st(f.doc,v),st(f.doc,Pa(me))))})()},"markAsReadAndPasteIfAllFilesAreRead"),q=z(function(me,we){if(f.options.allowDropFileTypes&&Se(f.options.allowDropFileTypes,me.type)==-1){U();return}var Ve=new FileReader;Ve.onerror=function(){return U()},Ve.onload=function(){var Ke=Ve.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ke)){U();return}O[we]=Ke,U()},Ve.readAsText(me)},"readTextFromFile"),H=0;H<g.length;H++)q(g[H],H);else{if(f.state.draggingText&&f.doc.sel.contains(v)>-1){f.state.draggingText(s),setTimeout(function(){return f.display.input.focus()},20);return}try{var ie=s.dataTransfer.getData("Text");if(ie){var le;if(f.state.draggingText&&!f.state.draggingText.copy&&(le=f.listSelections()),aa(f.doc,jo(v,v)),le)for(var ye=0;ye<le.length;++ye)$n(f.doc,"",le[ye].anchor,le[ye].head,"drag");f.replaceSelection(ie,"around","paste"),f.display.input.focus()}}catch{}}}}z(ph,"onDrop");function dv(s,f){if(p&&(!s.state.draggingText||+new Date-fv<100)){Bt(f);return}if(!(yn(s,f)||Da(s.display,f))&&(f.dataTransfer.setData("Text",s.getSelection()),f.dataTransfer.effectAllowed="copyMove",f.dataTransfer.setDragImage&&!x)){var v=Q("img",null,null,"position: fixed; left: 0; top: 0;");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y&&(v.width=v.height=1,s.display.wrapper.appendChild(v),v._top=v.offsetTop),f.dataTransfer.setDragImage(v,0,0),y&&v.parentNode.removeChild(v)}}z(dv,"onDragStart");function pv(s,f){var v=Ss(s,f);if(v){var g=document.createDocumentFragment();ru(s,v,g),s.display.dragCursor||(s.display.dragCursor=Q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),s.display.lineSpace.insertBefore(s.display.dragCursor,s.display.cursorDiv)),ee(s.display.dragCursor,g)}}z(pv,"onDragOver");function hh(s){s.display.dragCursor&&(s.display.lineSpace.removeChild(s.display.dragCursor),s.display.dragCursor=null)}z(hh,"clearDragCursor");function mh(s){if(document.getElementsByClassName){for(var f=document.getElementsByClassName("CodeMirror"),v=[],g=0;g<f.length;g++){var T=f[g].CodeMirror;T&&v.push(T)}v.length&&v[0].operation(function(){for(var O=0;O<v.length;O++)s(v[O])})}}z(mh,"forEachCodeMirror");var hv=!1;function N1(){hv||(mv(),hv=!0)}z(N1,"ensureGlobalHandlers");function mv(){var s;ot(window,"resize",function(){s==null&&(s=setTimeout(function(){s=null,mh(Eu)},100))}),ot(window,"blur",function(){return mh(Gr)})}z(mv,"registerGlobalHandlers");function Eu(s){var f=s.display;f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.scrollbarsClipped=!1,s.setSize()}z(Eu,"onResize");for(var sa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Vc=0;Vc<10;Vc++)sa[Vc+48]=sa[Vc+96]=String(Vc);for(var Su=65;Su<=90;Su++)sa[Su]=String.fromCharCode(Su);for(var Rs=1;Rs<=12;Rs++)sa[Rs+111]=sa[Rs+63235]="F"+Rs;var Ba={};Ba.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ba.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ba.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ba.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ba.default=C?Ba.macDefault:Ba.pcDefault;function gv(s){var f=s.split(/-(?!$)/);s=f[f.length-1];for(var v,g,T,O,I=0;I<f.length-1;I++){var U=f[I];if(/^(cmd|meta|m)$/i.test(U))O=!0;else if(/^a(lt)?$/i.test(U))v=!0;else if(/^(c|ctrl|control)$/i.test(U))g=!0;else if(/^s(hift)?$/i.test(U))T=!0;else throw new Error("Unrecognized modifier name: "+U)}return v&&(s="Alt-"+s),g&&(s="Ctrl-"+s),O&&(s="Cmd-"+s),T&&(s="Shift-"+s),s}z(gv,"normalizeKeyName");function vv(s){var f={};for(var v in s)if(s.hasOwnProperty(v)){var g=s[v];if(/^(name|fallthrough|(de|at)tach)$/.test(v))continue;if(g=="..."){delete s[v];continue}for(var T=Ee(v.split(" "),gv),O=0;O<T.length;O++){var I=void 0,U=void 0;O==T.length-1?(U=T.join(" "),I=g):(U=T.slice(0,O+1).join(" "),I="...");var q=f[U];if(!q)f[U]=I;else if(q!=I)throw new Error("Inconsistent bindings for "+U)}delete s[v]}for(var H in f)s[H]=f[H];return s}z(vv,"normalizeKeyMap");function Tl(s,f,v,g){f=Uc(f);var T=f.call?f.call(s,g):f[s];if(T===!1)return"nothing";if(T==="...")return"multi";if(T!=null&&v(T))return"handled";if(f.fallthrough){if(Object.prototype.toString.call(f.fallthrough)!="[object Array]")return Tl(s,f.fallthrough,v,g);for(var O=0;O<f.fallthrough.length;O++){var I=Tl(s,f.fallthrough[O],v,g);if(I)return I}}}z(Tl,"lookupKey");function gh(s){var f=typeof s=="string"?s:sa[s.keyCode];return f=="Ctrl"||f=="Alt"||f=="Shift"||f=="Mod"}z(gh,"isModifierKey");function vh(s,f,v){var g=s;return f.altKey&&g!="Alt"&&(s="Alt-"+s),(F?f.metaKey:f.ctrlKey)&&g!="Ctrl"&&(s="Ctrl-"+s),(F?f.ctrlKey:f.metaKey)&&g!="Mod"&&(s="Cmd-"+s),!v&&f.shiftKey&&g!="Shift"&&(s="Shift-"+s),s}z(vh,"addModifierNames");function wd(s,f){if(y&&s.keyCode==34&&s.char)return!1;var v=sa[s.keyCode];return v==null||s.altGraphKey?!1:(s.keyCode==3&&s.code&&(v=s.code),vh(v,s,f))}z(wd,"keyName");function Uc(s){return typeof s=="string"?Ba[s]:s}z(Uc,"getKeyMap");function xl(s,f){for(var v=s.doc.sel.ranges,g=[],T=0;T<v.length;T++){for(var O=f(v[T]);g.length&&W(O.from,Le(g).to)<=0;){var I=g.pop();if(W(I.from,O.from)<0){O.from=I.from;break}}g.push(O)}Yr(s,function(){for(var U=g.length-1;U>=0;U--)$n(s.doc,"",g[U].from,g[U].to,"+delete");Io(s)})}z(xl,"deleteNearSelection");function qc(s,f,v){var g=Ot(s.text,f+v,v);return g<0||g>s.text.length?null:g}z(qc,"moveCharLogically");function Cd(s,f,v){var g=qc(s,f.ch,v);return g==null?null:new ze(f.line,g,v<0?"after":"before")}z(Cd,"moveLogically");function _d(s,f,v,g,T){if(s){f.doc.direction=="rtl"&&(T=-T);var O=Vt(v,f.doc.direction);if(O){var I=T<0?Le(O):O[0],U=T<0==(I.level==1),q=U?"after":"before",H;if(I.level>0||f.doc.direction=="rtl"){var ie=Es(f,v);H=T<0?v.text.length-1:0;var le=Mo(f,ie,H).top;H=jt(function(ye){return Mo(f,ie,ye).top==le},T<0==(I.level==1)?I.from:I.to-1,H),q=="before"&&(H=qc(v,H,1))}else H=T<0?I.to:I.from;return new ze(g,H,q)}}return new ze(g,T<0?v.text.length:0,T<0?"before":"after")}z(_d,"endOfLine");function A1(s,f,v,g){var T=Vt(f,s.doc.direction);if(!T)return Cd(f,v,g);v.ch>=f.text.length?(v.ch=f.text.length,v.sticky="before"):v.ch<=0&&(v.ch=0,v.sticky="after");var O=pt(T,v.ch,v.sticky),I=T[O];if(s.doc.direction=="ltr"&&I.level%2==0&&(g>0?I.to>v.ch:I.from<v.ch))return Cd(f,v,g);var U=z(function(rt,it){return qc(f,rt instanceof ze?rt.ch:rt,it)},"mv"),q,H=z(function(rt){return s.options.lineWrapping?(q=q||Es(s,f),Kp(s,f,q,rt)):{begin:0,end:f.text.length}},"getWrappedLineExtent"),ie=H(v.sticky=="before"?U(v,-1):v.ch);if(s.doc.direction=="rtl"||I.level==1){var le=I.level==1==g<0,ye=U(v,le?1:-1);if(ye!=null&&(le?ye<=I.to&&ye<=ie.end:ye>=I.from&&ye>=ie.begin)){var me=le?"before":"after";return new ze(v.line,ye,me)}}var we=z(function(rt,it,Je){for(var ut=z(function(Ln,Dr){return Dr?new ze(v.line,U(Ln,1),"before"):new ze(v.line,Ln,"after")},"getRes");rt>=0&&rt<T.length;rt+=it){var Ct=T[rt],yt=it>0==(Ct.level!=1),Dt=yt?Je.begin:U(Je.end,-1);if(Ct.from<=Dt&&Dt<Ct.to||(Dt=yt?Ct.from:U(Ct.to,-1),Je.begin<=Dt&&Dt<Je.end))return ut(Dt,yt)}},"searchInVisualLine"),Ve=we(O+g,g,ie);if(Ve)return Ve;var Ke=g>0?ie.end:U(ie.begin,-1);return Ke!=null&&!(g>0&&Ke==f.text.length)&&(Ve=we(g>0?0:T.length-1,g,H(Ke)),Ve)?Ve:null}z(A1,"moveVisually");var Tu={selectAll:bd,singleSelection:function(s){return s.setSelection(s.getCursor("anchor"),s.getCursor("head"),Ze)},killLine:function(s){return xl(s,function(f){if(f.empty()){var v=ft(s.doc,f.head.line).text.length;return f.head.ch==v&&f.head.line<s.lastLine()?{from:f.head,to:ze(f.head.line+1,0)}:{from:f.head,to:ze(f.head.line,v)}}else return{from:f.from(),to:f.to()}})},deleteLine:function(s){return xl(s,function(f){return{from:ze(f.from().line,0),to:st(s.doc,ze(f.to().line+1,0))}})},delLineLeft:function(s){return xl(s,function(f){return{from:ze(f.from().line,0),to:f.from()}})},delWrappedLineLeft:function(s){return xl(s,function(f){var v=s.charCoords(f.head,"div").top+5,g=s.coordsChar({left:0,top:v},"div");return{from:g,to:f.from()}})},delWrappedLineRight:function(s){return xl(s,function(f){var v=s.charCoords(f.head,"div").top+5,g=s.coordsChar({left:s.display.lineDiv.offsetWidth+100,top:v},"div");return{from:f.from(),to:g}})},undo:function(s){return s.undo()},redo:function(s){return s.redo()},undoSelection:function(s){return s.undoSelection()},redoSelection:function(s){return s.redoSelection()},goDocStart:function(s){return s.extendSelection(ze(s.firstLine(),0))},goDocEnd:function(s){return s.extendSelection(ze(s.lastLine()))},goLineStart:function(s){return s.extendSelectionsBy(function(f){return yh(s,f.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(s){return s.extendSelectionsBy(function(f){return Nd(s,f.head)},{origin:"+move",bias:1})},goLineEnd:function(s){return s.extendSelectionsBy(function(f){return yv(s,f.head.line)},{origin:"+move",bias:-1})},goLineRight:function(s){return s.extendSelectionsBy(function(f){var v=s.cursorCoords(f.head,"div").top+5;return s.coordsChar({left:s.display.lineDiv.offsetWidth+100,top:v},"div")},vt)},goLineLeft:function(s){return s.extendSelectionsBy(function(f){var v=s.cursorCoords(f.head,"div").top+5;return s.coordsChar({left:0,top:v},"div")},vt)},goLineLeftSmart:function(s){return s.extendSelectionsBy(function(f){var v=s.cursorCoords(f.head,"div").top+5,g=s.coordsChar({left:0,top:v},"div");return g.ch<s.getLine(g.line).search(/\S/)?Nd(s,f.head):g},vt)},goLineUp:function(s){return s.moveV(-1,"line")},goLineDown:function(s){return s.moveV(1,"line")},goPageUp:function(s){return s.moveV(-1,"page")},goPageDown:function(s){return s.moveV(1,"page")},goCharLeft:function(s){return s.moveH(-1,"char")},goCharRight:function(s){return s.moveH(1,"char")},goColumnLeft:function(s){return s.moveH(-1,"column")},goColumnRight:function(s){return s.moveH(1,"column")},goWordLeft:function(s){return s.moveH(-1,"word")},goGroupRight:function(s){return s.moveH(1,"group")},goGroupLeft:function(s){return s.moveH(-1,"group")},goWordRight:function(s){return s.moveH(1,"word")},delCharBefore:function(s){return s.deleteH(-1,"codepoint")},delCharAfter:function(s){return s.deleteH(1,"char")},delWordBefore:function(s){return s.deleteH(-1,"word")},delWordAfter:function(s){return s.deleteH(1,"word")},delGroupBefore:function(s){return s.deleteH(-1,"group")},delGroupAfter:function(s){return s.deleteH(1,"group")},indentAuto:function(s){return s.indentSelection("smart")},indentMore:function(s){return s.indentSelection("add")},indentLess:function(s){return s.indentSelection("subtract")},insertTab:function(s){return s.replaceSelection(" ")},insertSoftTab:function(s){for(var f=[],v=s.listSelections(),g=s.options.tabSize,T=0;T<v.length;T++){var O=v[T].from(),I=ce(s.getLine(O.line),O.ch,g);f.push(be(g-I%g))}s.replaceSelections(f)},defaultTab:function(s){s.somethingSelected()?s.indentSelection("add"):s.execCommand("insertTab")},transposeChars:function(s){return Yr(s,function(){for(var f=s.listSelections(),v=[],g=0;g<f.length;g++)if(f[g].empty()){var T=f[g].head,O=ft(s.doc,T.line).text;if(O){if(T.ch==O.length&&(T=new ze(T.line,T.ch-1)),T.ch>0)T=new ze(T.line,T.ch+1),s.replaceRange(O.charAt(T.ch-1)+O.charAt(T.ch-2),ze(T.line,T.ch-2),T,"+transpose");else if(T.line>s.doc.first){var I=ft(s.doc,T.line-1).text;I&&(T=new ze(T.line,1),s.replaceRange(O.charAt(0)+s.doc.lineSeparator()+I.charAt(I.length-1),ze(T.line-1,I.length-1),T,"+transpose"))}}v.push(new tn(T,T))}s.setSelections(v)})},newlineAndIndent:function(s){return Yr(s,function(){for(var f=s.listSelections(),v=f.length-1;v>=0;v--)s.replaceRange(s.doc.lineSeparator(),f[v].anchor,f[v].head,"+input");f=s.listSelections();for(var g=0;g<f.length;g++)s.indentLine(f[g].from().line,null,!0);Io(s)})},openLine:function(s){return s.replaceSelection(`
`,"start")},toggleOverwrite:function(s){return s.toggleOverwrite()}};function yh(s,f){var v=ft(s.doc,f),g=Ui(v);return g!=v&&(f=an(g)),_d(!0,s,g,f,1)}z(yh,"lineStart");function yv(s,f){var v=ft(s.doc,f),g=dc(v);return g!=v&&(f=an(g)),_d(!0,s,v,f,-1)}z(yv,"lineEnd");function Nd(s,f){var v=yh(s,f.line),g=ft(s.doc,v.line),T=Vt(g,s.doc.direction);if(!T||T[0].level==0){var O=Math.max(v.ch,g.text.search(/\S/)),I=f.line==v.line&&f.ch<=O&&f.ch;return ze(v.line,I?0:O,v.sticky)}return v}z(Nd,"lineStartSmart");function Bc(s,f,v){if(typeof f=="string"&&(f=Tu[f],!f))return!1;s.display.input.ensurePolled();var g=s.display.shift,T=!1;try{s.isReadOnly()&&(s.state.suppressEdits=!0),v&&(s.display.shift=!1),T=f(s)!=Ge}finally{s.display.shift=g,s.state.suppressEdits=!1}return T}z(Bc,"doHandleBinding");function bv(s,f,v){for(var g=0;g<s.state.keyMaps.length;g++){var T=Tl(f,s.state.keyMaps[g],v,s);if(T)return T}return s.options.extraKeys&&Tl(f,s.options.extraKeys,v,s)||Tl(f,s.options.keyMap,v,s)}z(bv,"lookupKeyForEditor");var p_=new he;function $c(s,f,v,g){var T=s.state.keySeq;if(T){if(gh(f))return"handled";if(/\'$/.test(f)?s.state.keySeq=null:p_.set(50,function(){s.state.keySeq==T&&(s.state.keySeq=null,s.display.input.reset())}),bh(s,T+" "+f,v,g))return!0}return bh(s,f,v,g)}z($c,"dispatchKey");function bh(s,f,v,g){var T=bv(s,f,g);return T=="multi"&&(s.state.keySeq=f),T=="handled"&&Fr(s,"keyHandled",s,f,v),(T=="handled"||T=="multi")&&(An(v),fd(s)),!!T}z(bh,"dispatchKeyInner");function xu(s,f){var v=wd(f,!0);return v?f.shiftKey&&!s.state.keySeq?$c(s,"Shift-"+v,f,function(g){return Bc(s,g,!0)})||$c(s,v,f,function(g){if(typeof g=="string"?/^go[A-Z]/.test(g):g.motion)return Bc(s,g)}):$c(s,v,f,function(g){return Bc(s,g)}):!1}z(xu,"handleKeyBinding");function Eh(s,f,v){return $c(s,"'"+v+"'",f,function(g){return Bc(s,g,!0)})}z(Eh,"handleCharBinding");var zc=null;function Sh(s){var f=this;if(!(s.target&&s.target!=f.display.input.getField())&&(f.curOp.focus=se(),!yn(f,s))){p&&d<11&&s.keyCode==27&&(s.returnValue=!1);var v=s.keyCode;f.display.shift=v==16||s.shiftKey;var g=xu(f,s);y&&(zc=g?v:null,!g&&v==88&&!Xo&&(C?s.metaKey:s.ctrlKey)&&f.replaceSelection("",null,"cut")),i&&!C&&!g&&v==46&&s.shiftKey&&!s.ctrlKey&&document.execCommand&&document.execCommand("cut"),v==18&&!/\bCodeMirror-crosshair\b/.test(f.display.lineDiv.className)&&Ev(f)}}z(Sh,"onKeyDown");function Ev(s){var f=s.display.lineDiv;fe(f,"CodeMirror-crosshair");function v(g){(g.keyCode==18||!g.altKey)&&(X(f,"CodeMirror-crosshair"),vn(document,"keyup",v),vn(document,"mouseover",v))}z(v,"up"),ot(document,"keyup",v),ot(document,"mouseover",v)}z(Ev,"showCrossHair");function Hc(s){s.keyCode==16&&(this.doc.sel.shift=!1),yn(this,s)}z(Hc,"onKeyUp");function Th(s){var f=this;if(!(s.target&&s.target!=f.display.input.getField())&&!(Da(f.display,s)||yn(f,s)||s.ctrlKey&&!s.altKey||C&&s.metaKey)){var v=s.keyCode,g=s.charCode;if(y&&v==zc){zc=null,An(s);return}if(!(y&&(!s.which||s.which<10)&&xu(f,s))){var T=String.fromCharCode(g??v);T!="\b"&&(Eh(f,s,T)||f.display.input.onKeyPress(s))}}}z(Th,"onKeyPress");var O1=400,Sv=z(function(s,f,v){this.time=s,this.pos=f,this.button=v},"PastClick");Sv.prototype.compare=function(s,f,v){return this.time+O1>s&&W(f,this.pos)==0&&v==this.button};var $a,Ms;function Ad(s,f){var v=+new Date;return Ms&&Ms.compare(v,s,f)?($a=Ms=null,"triple"):$a&&$a.compare(v,s,f)?(Ms=new Sv(v,s,f),$a=null,"double"):($a=new Sv(v,s,f),Ms=null,"single")}z(Ad,"clickRepeat");function wu(s){var f=this,v=f.display;if(!(yn(f,s)||v.activeTouch&&v.input.supportsTouch())){if(v.input.ensurePolled(),v.shift=s.shiftKey,Da(v,s)){m||(v.scroller.draggable=!1,setTimeout(function(){return v.scroller.draggable=!0},100));return}if(!Dd(f,s)){var g=Ss(f,s),T=kn(s),O=g?Ad(g,T):"single";window.focus(),T==1&&f.state.selectingText&&f.state.selectingText(s),!(g&&Od(f,T,g,O,s))&&(T==1?g?xv(f,g,O,s):un(s)==v.scroller&&An(s):T==2?(g&&hu(f.doc,g),setTimeout(function(){return v.input.focus()},20)):T==3&&(V?f.display.input.onContextMenu(s):xs(f)))}}}z(wu,"onMouseDown");function Od(s,f,v,g,T){var O="Click";return g=="double"?O="Double"+O:g=="triple"&&(O="Triple"+O),O=(f==1?"Left":f==2?"Middle":"Right")+O,$c(s,vh(O,T),T,function(I){if(typeof I=="string"&&(I=Tu[I]),!I)return!1;var U=!1;try{s.isReadOnly()&&(s.state.suppressEdits=!0),U=I(s,v)!=Ge}finally{s.state.suppressEdits=!1}return U})}z(Od,"handleMappedButton");function Tv(s,f,v){var g=s.getOption("configureMouse"),T=g?g(s,f,v):{};if(T.unit==null){var O=M?v.shiftKey&&v.metaKey:v.altKey;T.unit=O?"rectangle":f=="single"?"char":f=="double"?"word":"line"}return(T.extend==null||s.doc.extend)&&(T.extend=s.doc.extend||v.shiftKey),T.addNew==null&&(T.addNew=C?v.metaKey:v.ctrlKey),T.moveOnDrag==null&&(T.moveOnDrag=!(C?v.altKey:v.ctrlKey)),T}z(Tv,"configureMouse");function xv(s,f,v,g){p?setTimeout(ae(Tc,s),0):s.curOp.focus=se();var T=Tv(s,v,g),O=s.doc.sel,I;s.options.dragDrop&&tr&&!s.isReadOnly()&&v=="single"&&(I=O.contains(f))>-1&&(W((I=O.ranges[I]).from(),f)<0||f.xRel>0)&&(W(I.to(),f)>0||f.xRel<0)?Cu(s,g,f,T):Eo(s,g,f,T)}z(xv,"leftButtonDown");function Cu(s,f,v,g){var T=s.display,O=!1,I=Sr(s,function(H){m&&(T.scroller.draggable=!1),s.state.draggingText=!1,s.state.delayingBlurEvent&&(s.hasFocus()?s.state.delayingBlurEvent=!1:xs(s)),vn(T.wrapper.ownerDocument,"mouseup",I),vn(T.wrapper.ownerDocument,"mousemove",U),vn(T.scroller,"dragstart",q),vn(T.scroller,"drop",I),O||(An(H),g.addNew||hu(s.doc,v,null,null,g.extend),m&&!x||p&&d==9?setTimeout(function(){T.wrapper.ownerDocument.body.focus({preventScroll:!0}),T.input.focus()},20):T.input.focus())}),U=z(function(H){O=O||Math.abs(f.clientX-H.clientX)+Math.abs(f.clientY-H.clientY)>=10},"mouseMove"),q=z(function(){return O=!0},"dragStart");m&&(T.scroller.draggable=!0),s.state.draggingText=I,I.copy=!g.moveOnDrag,ot(T.wrapper.ownerDocument,"mouseup",I),ot(T.wrapper.ownerDocument,"mousemove",U),ot(T.scroller,"dragstart",q),ot(T.scroller,"drop",I),s.state.delayingBlurEvent=!0,setTimeout(function(){return T.input.focus()},20),T.scroller.dragDrop&&T.scroller.dragDrop()}z(Cu,"leftButtonStartDrag");function xh(s,f,v){if(v=="char")return new tn(f,f);if(v=="word")return s.findWordAt(f);if(v=="line")return new tn(ze(f.line,0),st(s.doc,ze(f.line+1,0)));var g=v(s,f);return new tn(g.from,g.to)}z(xh,"rangeForUnit");function Eo(s,f,v,g){p&&xs(s);var T=s.display,O=s.doc;An(f);var I,U,q=O.sel,H=q.ranges;if(g.addNew&&!g.extend?(U=O.sel.contains(v),U>-1?I=H[U]:I=new tn(v,v)):(I=O.sel.primary(),U=O.sel.primIndex),g.unit=="rectangle")g.addNew||(I=new tn(v,v)),v=Ss(s,f,!0,!0),U=-1;else{var ie=xh(s,v,g.unit);g.extend?I=Lc(I,ie.anchor,ie.head,g.extend):I=ie}g.addNew?U==-1?(U=H.length,hr(O,ro(s,H.concat([I]),U),{scroll:!1,origin:"*mouse"})):H.length>1&&H[U].empty()&&g.unit=="char"&&!g.extend?(hr(O,ro(s,H.slice(0,U).concat(H.slice(U+1)),0),{scroll:!1,origin:"*mouse"}),q=O.sel):Ht(O,U,I,It):(U=0,hr(O,new no([I],0),It),q=O.sel);var le=v;function ye(Je){if(W(le,Je)!=0)if(le=Je,g.unit=="rectangle"){for(var ut=[],Ct=s.options.tabSize,yt=ce(ft(O,v.line).text,v.ch,Ct),Dt=ce(ft(O,Je.line).text,Je.ch,Ct),Ln=Math.min(yt,Dt),Dr=Math.max(yt,Dt),zn=Math.min(v.line,Je.line),mi=Math.min(s.lastLine(),Math.max(v.line,Je.line));zn<=mi;zn++){var gi=ft(O,zn).text,rr=at(gi,Ln,Ct);Ln==Dr?ut.push(new tn(ze(zn,rr),ze(zn,rr))):gi.length>rr&&ut.push(new tn(ze(zn,rr),ze(zn,at(gi,Dr,Ct))))}ut.length||ut.push(new tn(v,v)),hr(O,ro(s,q.ranges.slice(0,U).concat(ut),U),{origin:"*mouse",scroll:!1}),s.scrollIntoView(Je)}else{var _i=I,Hn=xh(s,Je,g.unit),Qt=_i.anchor,gr;W(Hn.anchor,Qt)>0?(gr=Hn.head,Qt=St(_i.from(),Hn.anchor)):(gr=Hn.anchor,Qt=We(_i.to(),Hn.head));var ir=q.ranges.slice(0);ir[U]=la(s,new tn(st(O,Qt),gr)),hr(O,ro(s,ir,U),It)}}z(ye,"extendTo");var me=T.wrapper.getBoundingClientRect(),we=0;function Ve(Je){var ut=++we,Ct=Ss(s,Je,!0,g.unit=="rectangle");if(Ct)if(W(Ct,le)!=0){s.curOp.focus=se(),ye(Ct);var yt=xc(T,O);(Ct.line>=yt.to||Ct.line<yt.from)&&setTimeout(Sr(s,function(){we==ut&&Ve(Je)}),150)}else{var Dt=Je.clientY<me.top?-20:Je.clientY>me.bottom?20:0;Dt&&setTimeout(Sr(s,function(){we==ut&&(T.scroller.scrollTop+=Dt,Ve(Je))}),50)}}z(Ve,"extend");function Ke(Je){s.state.selectingText=!1,we=1/0,Je&&(An(Je),T.input.focus()),vn(T.wrapper.ownerDocument,"mousemove",rt),vn(T.wrapper.ownerDocument,"mouseup",it),O.history.lastSelOrigin=null}z(Ke,"done");var rt=Sr(s,function(Je){Je.buttons===0||!kn(Je)?Ke(Je):Ve(Je)}),it=Sr(s,Ke);s.state.selectingText=it,ot(T.wrapper.ownerDocument,"mousemove",rt),ot(T.wrapper.ownerDocument,"mouseup",it)}z(Eo,"leftButtonSelect");function la(s,f){var v=f.anchor,g=f.head,T=ft(s.doc,v.line);if(W(v,g)==0&&v.sticky==g.sticky)return f;var O=Vt(T);if(!O)return f;var I=pt(O,v.ch,v.sticky),U=O[I];if(U.from!=v.ch&&U.to!=v.ch)return f;var q=I+(U.from==v.ch==(U.level!=1)?0:1);if(q==0||q==O.length)return f;var H;if(g.line!=v.line)H=(g.line-v.line)*(s.doc.direction=="ltr"?1:-1)>0;else{var ie=pt(O,g.ch,g.sticky),le=ie-I||(g.ch-v.ch)*(U.level==1?-1:1);ie==q-1||ie==q?H=le<0:H=le>0}var ye=O[q+(H?-1:0)],me=H==(ye.level==1),we=me?ye.from:ye.to,Ve=me?"after":"before";return v.ch==we&&v.sticky==Ve?f:new tn(new ze(v.line,we,Ve),g)}z(la,"bidiSimplify");function za(s,f,v,g){var T,O;if(f.touches)T=f.touches[0].clientX,O=f.touches[0].clientY;else try{T=f.clientX,O=f.clientY}catch{return!1}if(T>=Math.floor(s.display.gutters.getBoundingClientRect().right))return!1;g&&An(f);var I=s.display,U=I.lineDiv.getBoundingClientRect();if(O>U.bottom||!on(s,v))return wt(f);O-=U.top-I.viewOffset;for(var q=0;q<s.display.gutterSpecs.length;++q){var H=I.gutters.childNodes[q];if(H&&H.getBoundingClientRect().right>=T){var ie=Ir(s.doc,O),le=s.display.gutterSpecs[q];return mt(s,v,s,ie,le.className,f),wt(f)}}}z(za,"gutterEvent");function Dd(s,f){return za(s,f,"gutterClick",!0)}z(Dd,"clickInGutter");function Ha(s,f){Da(s.display,f)||Ga(s,f)||yn(s,f,"contextmenu")||V||s.display.input.onContextMenu(f)}z(Ha,"onContextMenu");function Ga(s,f){return on(s,"gutterContextMenu")?za(s,f,"gutterContextMenu",!1):!1}z(Ga,"contextMenuInGutter");function Or(s){s.display.wrapper.className=s.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+s.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Xr(s)}z(Or,"themeChanged");var Ls={toString:function(){return"CodeMirror.Init"}},wh={},Gc={};function wv(s){var f=s.optionHandlers;function v(g,T,O,I){s.defaults[g]=T,O&&(f[g]=I?function(U,q,H){H!=Ls&&O(U,q,H)}:O)}z(v,"option"),s.defineOption=v,s.Init=Ls,v("value","",function(g,T){return g.setValue(T)},!0),v("mode",null,function(g,T){g.doc.modeOption=T,gd(g)},!0),v("indentUnit",2,gd,!0),v("indentWithTabs",!1),v("smartIndent",!0),v("tabSize",4,function(g){As(g),Xr(g),Zr(g)},!0),v("lineSeparator",null,function(g,T){if(g.doc.lineSep=T,!!T){var O=[],I=g.doc.first;g.doc.iter(function(q){for(var H=0;;){var ie=q.text.indexOf(T,H);if(ie==-1)break;H=ie+T.length,O.push(ze(I,ie))}I++});for(var U=O.length-1;U>=0;U--)$n(g.doc,T,O[U],ze(O[U].line,O[U].ch+T.length))}}),v("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(g,T,O){g.state.specialChars=new RegExp(T.source+(T.test(" ")?"":"| "),"g"),O!=Ls&&g.refresh()}),v("specialCharPlaceholder",Ig,function(g){return g.refresh()},!0),v("electricChars",!0),v("inputStyle",A?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),v("spellcheck",!1,function(g,T){return g.getInputField().spellcheck=T},!0),v("autocorrect",!1,function(g,T){return g.getInputField().autocorrect=T},!0),v("autocapitalize",!1,function(g,T){return g.getInputField().autocapitalize=T},!0),v("rtlMoveVisually",!j),v("wholeLineUpdateBefore",!0),v("theme","default",function(g){Or(g),Fa(g)},!0),v("keyMap","default",function(g,T,O){var I=Uc(T),U=O!=Ls&&Uc(O);U&&U.detach&&U.detach(g,I),I.attach&&I.attach(g,U||null)}),v("extraKeys",null),v("configureMouse",null),v("lineWrapping",!1,wl,!0),v("gutters",[],function(g,T){g.display.gutterSpecs=Oc(T,g.options.lineNumbers),Fa(g)},!0),v("fixedGutter",!0,function(g,T){g.display.gutters.style.left=T?Zp(g.display)+"px":"0",g.refresh()},!0),v("coverGutterNextToScrollbar",!1,function(g){return _s(g)},!0),v("scrollbarStyle","native",function(g){En(g),_s(g),g.display.scrollbars.setScrollTop(g.doc.scrollTop),g.display.scrollbars.setScrollLeft(g.doc.scrollLeft)},!0),v("lineNumbers",!1,function(g,T){g.display.gutterSpecs=Oc(g.options.gutters,T),Fa(g)},!0),v("firstLineNumber",1,Fa,!0),v("lineNumberFormatter",function(g){return g},Fa,!0),v("showCursorWhenSelecting",!1,fl,!0),v("resetSelectionOnContextMenu",!0),v("lineWiseCopyCut",!0),v("pasteLinesPerSelection",!0),v("selectionsMayTouch",!1),v("readOnly",!1,function(g,T){T=="nocursor"&&(Gr(g),g.display.input.blur()),g.display.input.readOnlyChanged(T)}),v("screenReaderLabel",null,function(g,T){T=T===""?null:T,g.display.input.screenReaderLabelChanged(T)}),v("disableInput",!1,function(g,T){T||g.display.input.reset()},!0),v("dragDrop",!0,Cv),v("allowDropFileTypes",null),v("cursorBlinkRate",530),v("cursorScrollMargin",0),v("cursorHeight",1,fl,!0),v("singleCursorHeightPerLine",!0,fl,!0),v("workTime",100),v("workDelay",100),v("flattenSpans",!0,As,!0),v("addModeClass",!1,As,!0),v("pollInterval",100),v("undoDepth",200,function(g,T){return g.doc.history.undoDepth=T}),v("historyEventDelay",1250),v("viewportMargin",10,function(g){return g.refresh()},!0),v("maxHighlightLength",1e4,As,!0),v("moveInputWithCursor",!0,function(g,T){T||g.display.input.resetPosition()}),v("tabindex",null,function(g,T){return g.display.input.getField().tabIndex=T||""}),v("autofocus",null),v("direction","ltr",function(g,T){return g.doc.setDirection(T)},!0),v("phrases",null)}z(wv,"defineOptions");function Cv(s,f,v){var g=v&&v!=Ls;if(!f!=!g){var T=s.display.dragFunctions,O=f?ot:vn;O(s.display.scroller,"dragstart",T.start),O(s.display.scroller,"dragenter",T.enter),O(s.display.scroller,"dragover",T.over),O(s.display.scroller,"dragleave",T.leave),O(s.display.scroller,"drop",T.drop)}}z(Cv,"dragDropChanged");function wl(s){s.options.lineWrapping?(fe(s.display.wrapper,"CodeMirror-wrap"),s.display.sizer.style.minWidth="",s.display.sizerWidth=null):(X(s.display.wrapper,"CodeMirror-wrap"),jp(s)),Jp(s),Zr(s),Xr(s),setTimeout(function(){return _s(s)},100)}z(wl,"wrappingChanged");function Mn(s,f){var v=this;if(!(this instanceof Mn))return new Mn(s,f);this.options=f=f?pe(f):{},pe(wh,f,!1);var g=f.value;typeof g=="string"?g=new Ci(g,f.mode,null,f.lineSeparator,f.direction):f.mode&&(g.modeOption=f.mode),this.doc=g;var T=new Mn.inputStyles[f.inputStyle](this),O=this.display=new oh(s,g,T,f);O.wrapper.CodeMirror=this,Or(this),f.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),En(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new he,keySeq:null,specialChars:null},f.autofocus&&!A&&O.input.focus(),p&&d<11&&setTimeout(function(){return v.display.input.reset(!0)},20),_v(this),N1(),hi(this),this.curOp.forceUpdate=!0,lh(this,g),f.autofocus&&!A||this.hasFocus()?setTimeout(function(){v.hasFocus()&&!v.state.focused&&eh(v)},20):Gr(this);for(var I in Gc)Gc.hasOwnProperty(I)&&Gc[I](this,f[I],Ls);Nr(this),f.finishInit&&f.finishInit(this);for(var U=0;U<Ch.length;++U)Ch[U](this);Ma(this),m&&f.lineWrapping&&getComputedStyle(O.lineDiv).textRendering=="optimizelegibility"&&(O.lineDiv.style.textRendering="auto")}z(Mn,"CodeMirror"),Mn.defaults=wh,Mn.optionHandlers=Gc;function _v(s){var f=s.display;ot(f.scroller,"mousedown",Sr(s,wu)),p&&d<11?ot(f.scroller,"dblclick",Sr(s,function(q){if(!yn(s,q)){var H=Ss(s,q);if(!(!H||Dd(s,q)||Da(s.display,q))){An(q);var ie=s.findWordAt(H);hu(s.doc,ie.anchor,ie.head)}}})):ot(f.scroller,"dblclick",function(q){return yn(s,q)||An(q)}),ot(f.scroller,"contextmenu",function(q){return Ha(s,q)}),ot(f.input.getField(),"contextmenu",function(q){f.scroller.contains(q.target)||Ha(s,q)});var v,g={end:0};function T(){f.activeTouch&&(v=setTimeout(function(){return f.activeTouch=null},1e3),g=f.activeTouch,g.end=+new Date)}z(T,"finishTouch");function O(q){if(q.touches.length!=1)return!1;var H=q.touches[0];return H.radiusX<=1&&H.radiusY<=1}z(O,"isMouseLikeTouchEvent");function I(q,H){if(H.left==null)return!0;var ie=H.left-q.left,le=H.top-q.top;return ie*ie+le*le>20*20}z(I,"farAway"),ot(f.scroller,"touchstart",function(q){if(!yn(s,q)&&!O(q)&&!Dd(s,q)){f.input.ensurePolled(),clearTimeout(v);var H=+new Date;f.activeTouch={start:H,moved:!1,prev:H-g.end<=300?g:null},q.touches.length==1&&(f.activeTouch.left=q.touches[0].pageX,f.activeTouch.top=q.touches[0].pageY)}}),ot(f.scroller,"touchmove",function(){f.activeTouch&&(f.activeTouch.moved=!0)}),ot(f.scroller,"touchend",function(q){var H=f.activeTouch;if(H&&!Da(f,q)&&H.left!=null&&!H.moved&&new Date-H.start<300){var ie=s.coordsChar(f.activeTouch,"page"),le;!H.prev||I(H,H.prev)?le=new tn(ie,ie):!H.prev.prev||I(H,H.prev.prev)?le=s.findWordAt(ie):le=new tn(ze(ie.line,0),st(s.doc,ze(ie.line+1,0))),s.setSelection(le.anchor,le.head),s.focus(),An(q)}T()}),ot(f.scroller,"touchcancel",T),ot(f.scroller,"scroll",function(){f.scroller.clientHeight&&(Fo(s,f.scroller.scrollTop),wi(s,f.scroller.scrollLeft,!0),mt(s,"scroll",s))}),ot(f.scroller,"mousewheel",function(q){return iv(s,q)}),ot(f.scroller,"DOMMouseScroll",function(q){return iv(s,q)}),ot(f.wrapper,"scroll",function(){return f.wrapper.scrollTop=f.wrapper.scrollLeft=0}),f.dragFunctions={enter:function(q){yn(s,q)||Bt(q)},over:function(q){yn(s,q)||(pv(s,q),Bt(q))},start:function(q){return dv(s,q)},drop:Sr(s,ph),leave:function(q){yn(s,q)||hh(s)}};var U=f.input.getField();ot(U,"keyup",function(q){return Hc.call(s,q)}),ot(U,"keydown",Sr(s,Sh)),ot(U,"keypress",Sr(s,Th)),ot(U,"focus",function(q){return eh(s,q)}),ot(U,"blur",function(q){return Gr(s,q)})}z(_v,"registerEventHandlers");var Ch=[];Mn.defineInitHook=function(s){return Ch.push(s)};function _u(s,f,v,g){var T=s.doc,O;v==null&&(v="add"),v=="smart"&&(T.mode.indent?O=Wl(s,f).state:v="prev");var I=s.options.tabSize,U=ft(T,f),q=ce(U.text,null,I);U.stateAfter&&(U.stateAfter=null);var H=U.text.match(/^\s*/)[0],ie;if(!g&&!/\S/.test(U.text))ie=0,v="not";else if(v=="smart"&&(ie=T.mode.indent(O,U.text.slice(H.length),U.text),ie==Ge||ie>150)){if(!g)return;v="prev"}v=="prev"?f>T.first?ie=ce(ft(T,f-1).text,null,I):ie=0:v=="add"?ie=q+s.options.indentUnit:v=="subtract"?ie=q-s.options.indentUnit:typeof v=="number"&&(ie=q+v),ie=Math.max(0,ie);var le="",ye=0;if(s.options.indentWithTabs)for(var me=Math.floor(ie/I);me;--me)ye+=I,le+=" ";if(ye<ie&&(le+=be(ie-ye)),le!=H)return $n(T,le,ze(f,0),ze(f,H.length),"+input"),U.stateAfter=null,!0;for(var we=0;we<T.sel.ranges.length;we++){var Ve=T.sel.ranges[we];if(Ve.head.line==f&&Ve.head.ch<H.length){var Ke=ze(f,H.length);Ht(T,we,new tn(Ke,Ke));break}}}z(_u,"indentLine");var oo=null;function Yc(s){oo=s}z(Yc,"setLastCopied");function Wc(s,f,v,g,T){var O=s.doc;s.display.shift=!1,g||(g=O.sel);var I=+new Date-200,U=T=="paste"||s.state.pasteIncoming>I,q=Ii(f),H=null;if(U&&g.ranges.length>1)if(oo&&oo.text.join(`
`)==f){if(g.ranges.length%oo.text.length==0){H=[];for(var ie=0;ie<oo.text.length;ie++)H.push(O.splitLines(oo.text[ie]))}}else q.length==g.ranges.length&&s.options.pasteLinesPerSelection&&(H=Ee(q,function(rt){return[rt]}));for(var le=s.curOp.updateInput,ye=g.ranges.length-1;ye>=0;ye--){var me=g.ranges[ye],we=me.from(),Ve=me.to();me.empty()&&(v&&v>0?we=ze(we.line,we.ch-v):s.state.overwrite&&!U?Ve=ze(Ve.line,Math.min(ft(O,Ve.line).text.length,Ve.ch+Le(q).length)):U&&oo&&oo.lineWise&&oo.text.join(`
`)==q.join(`
`)&&(we=Ve=ze(we.line,0)));var Ke={from:we,to:Ve,text:H?H[ye%H.length]:q,origin:T||(U?"paste":s.state.cutIncoming>I?"cut":"+input")};yl(s.doc,Ke),Fr(s,"inputRead",s,Ke)}f&&!U&&Nh(s,f),Io(s),s.curOp.updateInput<2&&(s.curOp.updateInput=le),s.curOp.typing=!0,s.state.pasteIncoming=s.state.cutIncoming=-1}z(Wc,"applyTextInput");function _h(s,f){var v=s.clipboardData&&s.clipboardData.getData("Text");if(v)return s.preventDefault(),!f.isReadOnly()&&!f.options.disableInput&&Yr(f,function(){return Wc(f,v,0,null,"paste")}),!0}z(_h,"handlePaste");function Nh(s,f){if(!(!s.options.electricChars||!s.options.smartIndent))for(var v=s.doc.sel,g=v.ranges.length-1;g>=0;g--){var T=v.ranges[g];if(!(T.head.ch>100||g&&v.ranges[g-1].head.line==T.head.line)){var O=s.getModeAt(T.head),I=!1;if(O.electricChars){for(var U=0;U<O.electricChars.length;U++)if(f.indexOf(O.electricChars.charAt(U))>-1){I=_u(s,T.head.line,"smart");break}}else O.electricInput&&O.electricInput.test(ft(s.doc,T.head.line).text.slice(0,T.head.ch))&&(I=_u(s,T.head.line,"smart"));I&&Fr(s,"electricInput",s,T.head.line)}}}z(Nh,"triggerElectric");function Nv(s){for(var f=[],v=[],g=0;g<s.doc.sel.ranges.length;g++){var T=s.doc.sel.ranges[g].head.line,O={anchor:ze(T,0),head:ze(T+1,0)};v.push(O),f.push(s.getRange(O.anchor,O.head))}return{text:f,ranges:v}}z(Nv,"copyableRanges");function Ah(s,f,v,g){s.setAttribute("autocorrect",v?"":"off"),s.setAttribute("autocapitalize",g?"":"off"),s.setAttribute("spellcheck",!!f)}z(Ah,"disableBrowserMagic");function Pr(){var s=Q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),f=Q("div",[s],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?s.style.width="1000px":s.setAttribute("wrap","off"),N&&(s.style.border="1px solid black"),Ah(s),f}z(Pr,"hiddenTextarea");function ei(s){var f=s.optionHandlers,v=s.helpers={};s.prototype={constructor:s,focus:function(){window.focus(),this.display.input.focus()},setOption:function(g,T){var O=this.options,I=O[g];O[g]==T&&g!="mode"||(O[g]=T,f.hasOwnProperty(g)&&Sr(this,f[g])(this,T,I),mt(this,"optionChange",this,g))},getOption:function(g){return this.options[g]},getDoc:function(){return this.doc},addKeyMap:function(g,T){this.state.keyMaps[T?"push":"unshift"](Uc(g))},removeKeyMap:function(g){for(var T=this.state.keyMaps,O=0;O<T.length;++O)if(T[O]==g||T[O].name==g)return T.splice(O,1),!0},addOverlay:pr(function(g,T){var O=g.token?g:s.getMode(this.options,g);if(O.startState)throw new Error("Overlays may not be stateful.");oe(this.state.overlays,{mode:O,modeSpec:g,opaque:T&&T.opaque,priority:T&&T.priority||0},function(I){return I.priority}),this.state.modeGen++,Zr(this)}),removeOverlay:pr(function(g){for(var T=this.state.overlays,O=0;O<T.length;++O){var I=T[O].modeSpec;if(I==g||typeof g=="string"&&I.name==g){T.splice(O,1),this.state.modeGen++,Zr(this);return}}}),indentLine:pr(function(g,T,O){typeof T!="string"&&typeof T!="number"&&(T==null?T=this.options.smartIndent?"smart":"prev":T=T?"add":"subtract"),Zo(this.doc,g)&&_u(this,g,T,O)}),indentSelection:pr(function(g){for(var T=this.doc.sel.ranges,O=-1,I=0;I<T.length;I++){var U=T[I];if(U.empty())U.head.line>O&&(_u(this,U.head.line,g,!0),O=U.head.line,I==this.doc.sel.primIndex&&Io(this));else{var q=U.from(),H=U.to(),ie=Math.max(O,q.line);O=Math.min(this.lastLine(),H.line-(H.ch?0:1))+1;for(var le=ie;le<O;++le)_u(this,le,g);var ye=this.doc.sel.ranges;q.ch==0&&T.length==ye.length&&ye[I].from().ch>0&&Ht(this.doc,I,new tn(q,ye[I].to()),Ze)}}}),getTokenAt:function(g,T){return tl(this,g,T)},getLineTokens:function(g,T){return tl(this,ze(g),T,!0)},getTokenTypeAt:function(g){g=st(this.doc,g);var T=Jf(this,ft(this.doc,g.line)),O=0,I=(T.length-1)/2,U=g.ch,q;if(U==0)q=T[2];else for(;;){var H=O+I>>1;if((H?T[H*2-1]:0)>=U)I=H;else if(T[H*2+1]<U)O=H+1;else{q=T[H*2+2];break}}var ie=q?q.indexOf("overlay "):-1;return ie<0?q:ie==0?null:q.slice(0,ie-1)},getModeAt:function(g){var T=this.doc.mode;return T.innerMode?s.innerMode(T,this.getTokenAt(g).state).mode:T},getHelper:function(g,T){return this.getHelpers(g,T)[0]},getHelpers:function(g,T){var O=[];if(!v.hasOwnProperty(T))return O;var I=v[T],U=this.getModeAt(g);if(typeof U[T]=="string")I[U[T]]&&O.push(I[U[T]]);else if(U[T])for(var q=0;q<U[T].length;q++){var H=I[U[T][q]];H&&O.push(H)}else U.helperType&&I[U.helperType]?O.push(I[U.helperType]):I[U.name]&&O.push(I[U.name]);for(var ie=0;ie<I._global.length;ie++){var le=I._global[ie];le.pred(U,this)&&Se(O,le.val)==-1&&O.push(le.val)}return O},getStateAfter:function(g,T){var O=this.doc;return g=en(O,g??O.first+O.size-1),Wl(this,g+1,T).state},cursorCoords:function(g,T){var O,I=this.doc.sel.primary();return g==null?O=I.head:typeof g=="object"?O=st(this.doc,g):O=g?I.from():I.to(),Lo(this,O,T||"page")},charCoords:function(g,T){return tu(this,st(this.doc,g),T||"page")},coordsChar:function(g,T){return g=Qp(this,g,T||"page"),sl(this,g.left,g.top)},lineAtHeight:function(g,T){return g=Qp(this,{top:g,left:0},T||"page").top,Ir(this.doc,g+this.display.viewOffset)},heightAtLine:function(g,T,O){var I=!1,U;if(typeof g=="number"){var q=this.doc.first+this.doc.size-1;g<this.doc.first?g=this.doc.first:g>q&&(g=q,I=!0),U=ft(this.doc,g)}else U=g;return bc(this,U,{top:0,left:0},T||"page",O||I).top+(I?this.doc.height-ta(U):0)},defaultTextHeight:function(){return ll(this.display)},defaultCharWidth:function(){return ul(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(g,T,O,I,U){var q=this.display;g=Lo(this,st(this.doc,g));var H=g.bottom,ie=g.left;if(T.style.position="absolute",T.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(T),q.sizer.appendChild(T),I=="over")H=g.top;else if(I=="above"||I=="near"){var le=Math.max(q.wrapper.clientHeight,this.doc.height),ye=Math.max(q.sizer.clientWidth,q.lineSpace.clientWidth);(I=="above"||g.bottom+T.offsetHeight>le)&&g.top>T.offsetHeight?H=g.top-T.offsetHeight:g.bottom+T.offsetHeight<=le&&(H=g.bottom),ie+T.offsetWidth>ye&&(ie=ye-T.offsetWidth)}T.style.top=H+"px",T.style.left=T.style.right="",U=="right"?(ie=q.sizer.clientWidth-T.offsetWidth,T.style.right="0px"):(U=="left"?ie=0:U=="middle"&&(ie=(q.sizer.clientWidth-T.offsetWidth)/2),T.style.left=ie+"px"),O&&th(this,{left:ie,top:H,right:ie+T.offsetWidth,bottom:H+T.offsetHeight})},triggerOnKeyDown:pr(Sh),triggerOnKeyPress:pr(Th),triggerOnKeyUp:Hc,triggerOnMouseDown:pr(wu),execCommand:function(g){if(Tu.hasOwnProperty(g))return Tu[g].call(null,this)},triggerElectric:pr(function(g){Nh(this,g)}),findPosH:function(g,T,O,I){var U=1;T<0&&(U=-1,T=-T);for(var q=st(this.doc,g),H=0;H<T&&(q=kd(this.doc,q,U,O,I),!q.hitSide);++H);return q},moveH:pr(function(g,T){var O=this;this.extendSelectionsBy(function(I){return O.display.shift||O.doc.extend||I.empty()?kd(O.doc,I.head,g,T,O.options.rtlMoveVisually):g<0?I.from():I.to()},vt)}),deleteH:pr(function(g,T){var O=this.doc.sel,I=this.doc;O.somethingSelected()?I.replaceSelection("",null,"+delete"):xl(this,function(U){var q=kd(I,U.head,g,T,!1);return g<0?{from:q,to:U.head}:{from:U.head,to:q}})}),findPosV:function(g,T,O,I){var U=1,q=I;T<0&&(U=-1,T=-T);for(var H=st(this.doc,g),ie=0;ie<T;++ie){var le=Lo(this,H,"div");if(q==null?q=le.left:le.left=q,H=Oh(this,le,U,O),H.hitSide)break}return H},moveV:pr(function(g,T){var O=this,I=this.doc,U=[],q=!this.display.shift&&!I.extend&&I.sel.somethingSelected();if(I.extendSelectionsBy(function(ie){if(q)return g<0?ie.from():ie.to();var le=Lo(O,ie.head,"div");ie.goalColumn!=null&&(le.left=ie.goalColumn),U.push(le.left);var ye=Oh(O,le,g,T);return T=="page"&&ie==I.sel.primary()&&ws(O,tu(O,ye,"div").top-le.top),ye},vt),U.length)for(var H=0;H<I.sel.ranges.length;H++)I.sel.ranges[H].goalColumn=U[H]}),findWordAt:function(g){var T=this.doc,O=ft(T,g.line).text,I=g.ch,U=g.ch;if(O){var q=this.getHelper(g,"wordChars");(g.sticky=="before"||U==O.length)&&I?--I:++U;for(var H=O.charAt(I),ie=xe(H,q)?function(le){return xe(le,q)}:/\s/.test(H)?function(le){return/\s/.test(le)}:function(le){return!/\s/.test(le)&&!xe(le)};I>0&&ie(O.charAt(I-1));)--I;for(;U<O.length&&ie(O.charAt(U));)++U}return new tn(ze(g.line,I),ze(g.line,U))},toggleOverwrite:function(g){g!=null&&g==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?fe(this.display.cursorDiv,"CodeMirror-overwrite"):X(this.display.cursorDiv,"CodeMirror-overwrite"),mt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:pr(function(g,T){Cs(this,g,T)}),getScrollInfo:function(){var g=this.display.scroller;return{left:g.scrollLeft,top:g.scrollTop,height:g.scrollHeight-ko(this)-this.display.barHeight,width:g.scrollWidth-ko(this)-this.display.barWidth,clientHeight:ol(this),clientWidth:Ro(this)}},scrollIntoView:pr(function(g,T){g==null?(g={from:this.doc.sel.primary().head,to:null},T==null&&(T=this.options.cursorScrollMargin)):typeof g=="number"?g={from:ze(g,0),to:null}:g.from==null&&(g={from:g,to:null}),g.to||(g.to=g.from),g.margin=T||0,g.from.line!=null?pd(this,g):eo(this,g.from,g.to,g.margin)}),setSize:pr(function(g,T){var O=this,I=z(function(q){return typeof q=="number"||/^\d+$/.test(String(q))?q+"px":q},"interpret");g!=null&&(this.display.wrapper.style.width=I(g)),T!=null&&(this.display.wrapper.style.height=I(T)),this.options.lineWrapping&&Wg(this);var U=this.display.viewFrom;this.doc.iter(U,this.display.viewTo,function(q){if(q.widgets){for(var H=0;H<q.widgets.length;H++)if(q.widgets[H].noHScroll){Hr(O,U,"widget");break}}++U}),this.curOp.forceUpdate=!0,mt(this,"refresh",this)}),operation:function(g){return Yr(this,g)},startOperation:function(){return hi(this)},endOperation:function(){return Ma(this)},refresh:pr(function(){var g=this.display.cachedTextHeight;Zr(this),this.curOp.forceUpdate=!0,Xr(this),Cs(this,this.doc.scrollLeft,this.doc.scrollTop),rh(this.display),(g==null||Math.abs(g-ll(this.display))>.5||this.options.lineWrapping)&&Jp(this),mt(this,"refresh",this)}),swapDoc:pr(function(g){var T=this.doc;return T.cm=null,this.state.selectingText&&this.state.selectingText(),lh(this,g),Xr(this),this.display.input.reset(),Cs(this,g.scrollLeft,g.scrollTop),this.curOp.forceScroll=!0,Fr(this,"swapDoc",this,T),T}),phrase:function(g){var T=this.options.phrases;return T&&Object.prototype.hasOwnProperty.call(T,g)?T[g]:g},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Mr(s),s.registerHelper=function(g,T,O){v.hasOwnProperty(g)||(v[g]=s[g]={_global:[]}),v[g][T]=O},s.registerGlobalHelper=function(g,T,O,I){s.registerHelper(g,T,I),v[g]._global.push({pred:O,val:I})}}z(ei,"addEditorMethods");function kd(s,f,v,g,T){var O=f,I=v,U=ft(s,f.line),q=T&&s.direction=="rtl"?-v:v;function H(){var it=f.line+q;return it<s.first||it>=s.first+s.size?!1:(f=new ze(it,f.ch,f.sticky),U=ft(s,it))}z(H,"findNextLine");function ie(it){var Je;if(g=="codepoint"){var ut=U.text.charCodeAt(f.ch+(v>0?0:-1));if(isNaN(ut))Je=null;else{var Ct=v>0?ut>=55296&&ut<56320:ut>=56320&&ut<57343;Je=new ze(f.line,Math.max(0,Math.min(U.text.length,f.ch+v*(Ct?2:1))),-v)}}else T?Je=A1(s.cm,U,f,v):Je=Cd(U,f,v);if(Je==null)if(!it&&H())f=_d(T,s.cm,U,f.line,q);else return!1;else f=Je;return!0}if(z(ie,"moveOnce"),g=="char"||g=="codepoint")ie();else if(g=="column")ie(!0);else if(g=="word"||g=="group")for(var le=null,ye=g=="group",me=s.cm&&s.cm.getHelper(f,"wordChars"),we=!0;!(v<0&&!ie(!we));we=!1){var Ve=U.text.charAt(f.ch)||`
`,Ke=xe(Ve,me)?"w":ye&&Ve==`
`?"n":!ye||/\s/.test(Ve)?null:"p";if(ye&&!we&&!Ke&&(Ke="s"),le&&le!=Ke){v<0&&(v=1,ie(),f.sticky="after");break}if(Ke&&(le=Ke),v>0&&!ie(!we))break}var rt=Qn(s,f,O,I,!0);return ue(O,rt)&&(rt.hitSide=!0),rt}z(kd,"findPosH");function Oh(s,f,v,g){var T=s.doc,O=f.left,I;if(g=="page"){var U=Math.min(s.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),q=Math.max(U-.5*ll(s.display),3);I=(v>0?f.bottom:f.top)+v*q}else g=="line"&&(I=v>0?f.bottom+3:f.top-3);for(var H;H=sl(s,O,I),!!H.outside;){if(v<0?I<=0:I>=T.height){H.hitSide=!0;break}I+=v*5}return H}z(Oh,"findPosV");var Cn=z(function(s){this.cm=s,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");Cn.prototype.init=function(s){var f=this,v=this,g=v.cm,T=v.div=s.lineDiv;T.contentEditable=!0,Ah(T,g.options.spellcheck,g.options.autocorrect,g.options.autocapitalize);function O(U){for(var q=U.target;q;q=q.parentNode){if(q==T)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(q.className))break}return!1}z(O,"belongsToInput"),ot(T,"paste",function(U){!O(U)||yn(g,U)||_h(U,g)||d<=11&&setTimeout(Sr(g,function(){return f.updateFromDOM()}),20)}),ot(T,"compositionstart",function(U){f.composing={data:U.data,done:!1}}),ot(T,"compositionupdate",function(U){f.composing||(f.composing={data:U.data,done:!1})}),ot(T,"compositionend",function(U){f.composing&&(U.data!=f.composing.data&&f.readFromDOMSoon(),f.composing.done=!0)}),ot(T,"touchstart",function(){return v.forceCompositionEnd()}),ot(T,"input",function(){f.composing||f.readFromDOMSoon()});function I(U){if(!(!O(U)||yn(g,U))){if(g.somethingSelected())Yc({lineWise:!1,text:g.getSelections()}),U.type=="cut"&&g.replaceSelection("",null,"cut");else if(g.options.lineWiseCopyCut){var q=Nv(g);Yc({lineWise:!0,text:q.text}),U.type=="cut"&&g.operation(function(){g.setSelections(q.ranges,0,Ze),g.replaceSelection("",null,"cut")})}else return;if(U.clipboardData){U.clipboardData.clearData();var H=oo.text.join(`
`);if(U.clipboardData.setData("Text",H),U.clipboardData.getData("Text")==H){U.preventDefault();return}}var ie=Pr(),le=ie.firstChild;g.display.lineSpace.insertBefore(ie,g.display.lineSpace.firstChild),le.value=oo.text.join(`
`);var ye=se();ge(le),setTimeout(function(){g.display.lineSpace.removeChild(ie),ye.focus(),ye==T&&v.showPrimarySelection()},50)}}z(I,"onCopyCut"),ot(T,"copy",I),ot(T,"cut",I)},Cn.prototype.screenReaderLabelChanged=function(s){s?this.div.setAttribute("aria-label",s):this.div.removeAttribute("aria-label")},Cn.prototype.prepareSelection=function(){var s=Sc(this.cm,!1);return s.focus=se()==this.div,s},Cn.prototype.showSelection=function(s,f){!s||!this.cm.display.view.length||((s.focus||f)&&this.showPrimarySelection(),this.showMultipleSelections(s))},Cn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Cn.prototype.showPrimarySelection=function(){var s=this.getSelection(),f=this.cm,v=f.doc.sel.primary(),g=v.from(),T=v.to();if(f.display.viewTo==f.display.viewFrom||g.line>=f.display.viewTo||T.line<f.display.viewFrom){s.removeAllRanges();return}var O=Qc(f,s.anchorNode,s.anchorOffset),I=Qc(f,s.focusNode,s.focusOffset);if(!(O&&!O.bad&&I&&!I.bad&&W(St(O,I),g)==0&&W(We(O,I),T)==0)){var U=f.display.view,q=g.line>=f.display.viewFrom&&Dh(f,g)||{node:U[0].measure.map[2],offset:0},H=T.line<f.display.viewTo&&Dh(f,T);if(!H){var ie=U[U.length-1].measure,le=ie.maps?ie.maps[ie.maps.length-1]:ie.map;H={node:le[le.length-1],offset:le[le.length-2]-le[le.length-3]}}if(!q||!H){s.removeAllRanges();return}var ye=s.rangeCount&&s.getRangeAt(0),me;try{me=ne(q.node,q.offset,H.offset,H.node)}catch{}me&&(!i&&f.state.focused?(s.collapse(q.node,q.offset),me.collapsed||(s.removeAllRanges(),s.addRange(me))):(s.removeAllRanges(),s.addRange(me)),ye&&s.anchorNode==null?s.addRange(ye):i&&this.startGracePeriod()),this.rememberSelection()}},Cn.prototype.startGracePeriod=function(){var s=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){s.gracePeriod=!1,s.selectionChanged()&&s.cm.operation(function(){return s.cm.curOp.selectionChanged=!0})},20)},Cn.prototype.showMultipleSelections=function(s){ee(this.cm.display.cursorDiv,s.cursors),ee(this.cm.display.selectionDiv,s.selection)},Cn.prototype.rememberSelection=function(){var s=this.getSelection();this.lastAnchorNode=s.anchorNode,this.lastAnchorOffset=s.anchorOffset,this.lastFocusNode=s.focusNode,this.lastFocusOffset=s.focusOffset},Cn.prototype.selectionInEditor=function(){var s=this.getSelection();if(!s.rangeCount)return!1;var f=s.getRangeAt(0).commonAncestorContainer;return re(this.div,f)},Cn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||se()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Cn.prototype.blur=function(){this.div.blur()},Cn.prototype.getField=function(){return this.div},Cn.prototype.supportsTouch=function(){return!0},Cn.prototype.receivedFocus=function(){var s=this,f=this;this.selectionInEditor()?setTimeout(function(){return s.pollSelection()},20):Yr(this.cm,function(){return f.cm.curOp.selectionChanged=!0});function v(){f.cm.state.focused&&(f.pollSelection(),f.polling.set(f.cm.options.pollInterval,v))}z(v,"poll"),this.polling.set(this.cm.options.pollInterval,v)},Cn.prototype.selectionChanged=function(){var s=this.getSelection();return s.anchorNode!=this.lastAnchorNode||s.anchorOffset!=this.lastAnchorOffset||s.focusNode!=this.lastFocusNode||s.focusOffset!=this.lastFocusOffset},Cn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var s=this.getSelection(),f=this.cm;if(D&&E&&this.cm.display.gutterSpecs.length&&Av(s.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var v=Qc(f,s.anchorNode,s.anchorOffset),g=Qc(f,s.focusNode,s.focusOffset);v&&g&&Yr(f,function(){hr(f.doc,jo(v,g),Ze),(v.bad||g.bad)&&(f.curOp.selectionChanged=!0)})}}},Cn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var s=this.cm,f=s.display,v=s.doc.sel.primary(),g=v.from(),T=v.to();if(g.ch==0&&g.line>s.firstLine()&&(g=ze(g.line-1,ft(s.doc,g.line-1).length)),T.ch==ft(s.doc,T.line).text.length&&T.line<s.lastLine()&&(T=ze(T.line+1,0)),g.line<f.viewFrom||T.line>f.viewTo-1)return!1;var O,I,U;g.line==f.viewFrom||(O=Ts(s,g.line))==0?(I=an(f.view[0].line),U=f.view[0].node):(I=an(f.view[O].line),U=f.view[O-1].node.nextSibling);var q=Ts(s,T.line),H,ie;if(q==f.view.length-1?(H=f.viewTo-1,ie=f.lineDiv.lastChild):(H=an(f.view[q+1].line)-1,ie=f.view[q+1].node.previousSibling),!U)return!1;for(var le=s.doc.splitLines(kh(s,U,ie,I,H)),ye=mo(s.doc,ze(I,0),ze(H,ft(s.doc,H).text.length));le.length>1&&ye.length>1;)if(Le(le)==Le(ye))le.pop(),ye.pop(),H--;else if(le[0]==ye[0])le.shift(),ye.shift(),I++;else break;for(var me=0,we=0,Ve=le[0],Ke=ye[0],rt=Math.min(Ve.length,Ke.length);me<rt&&Ve.charCodeAt(me)==Ke.charCodeAt(me);)++me;for(var it=Le(le),Je=Le(ye),ut=Math.min(it.length-(le.length==1?me:0),Je.length-(ye.length==1?me:0));we<ut&&it.charCodeAt(it.length-we-1)==Je.charCodeAt(Je.length-we-1);)++we;if(le.length==1&&ye.length==1&&I==g.line)for(;me&&me>g.ch&&it.charCodeAt(it.length-we-1)==Je.charCodeAt(Je.length-we-1);)me--,we++;le[le.length-1]=it.slice(0,it.length-we).replace(/^\u200b+/,""),le[0]=le[0].slice(me).replace(/\u200b+$/,"");var Ct=ze(I,me),yt=ze(H,ye.length?Le(ye).length-we:0);if(le.length>1||le[0]||W(Ct,yt))return $n(s.doc,le,Ct,yt,"+input"),!0},Cn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Cn.prototype.reset=function(){this.forceCompositionEnd()},Cn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Cn.prototype.readFromDOMSoon=function(){var s=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(s.readDOMTimeout=null,s.composing)if(s.composing.done)s.composing=null;else return;s.updateFromDOM()},80))},Cn.prototype.updateFromDOM=function(){var s=this;(this.cm.isReadOnly()||!this.pollContent())&&Yr(this.cm,function(){return Zr(s.cm)})},Cn.prototype.setUneditable=function(s){s.contentEditable="false"},Cn.prototype.onKeyPress=function(s){s.charCode==0||this.composing||(s.preventDefault(),this.cm.isReadOnly()||Sr(this.cm,Wc)(this.cm,String.fromCharCode(s.charCode==null?s.keyCode:s.charCode),0))},Cn.prototype.readOnlyChanged=function(s){this.div.contentEditable=String(s!="nocursor")},Cn.prototype.onContextMenu=function(){},Cn.prototype.resetPosition=function(){},Cn.prototype.needsContentAttribute=!0;function Dh(s,f){var v=yc(s,f.line);if(!v||v.hidden)return null;var g=ft(s.doc,f.line),T=vc(v,g,f.line),O=Vt(g,s.doc.direction),I="left";if(O){var U=pt(O,f.ch);I=U%2?"right":"left"}var q=Yp(T.map,f.ch,I);return q.offset=q.collapse=="right"?q.end:q.start,q}z(Dh,"posToDOM");function Av(s){for(var f=s;f;f=f.parentNode)if(/CodeMirror-gutter-wrapper/.test(f.className))return!0;return!1}z(Av,"isInGutter");function Ya(s,f){return f&&(s.bad=!0),s}z(Ya,"badPos");function kh(s,f,v,g,T){var O="",I=!1,U=s.doc.lineSeparator(),q=!1;function H(me){return function(we){return we.id==me}}z(H,"recognizeMarker");function ie(){I&&(O+=U,q&&(O+=U),I=q=!1)}z(ie,"close");function le(me){me&&(ie(),O+=me)}z(le,"addText");function ye(me){if(me.nodeType==1){var we=me.getAttribute("cm-text");if(we){le(we);return}var Ve=me.getAttribute("cm-marker"),Ke;if(Ve){var rt=s.findMarks(ze(g,0),ze(T+1,0),H(+Ve));rt.length&&(Ke=rt[0].find(0))&&le(mo(s.doc,Ke.from,Ke.to).join(U));return}if(me.getAttribute("contenteditable")=="false")return;var it=/^(pre|div|p|li|table|br)$/i.test(me.nodeName);if(!/^br$/i.test(me.nodeName)&&me.textContent.length==0)return;it&&ie();for(var Je=0;Je<me.childNodes.length;Je++)ye(me.childNodes[Je]);/^(pre|p)$/i.test(me.nodeName)&&(q=!0),it&&(I=!0)}else me.nodeType==3&&le(me.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(z(ye,"walk");ye(f),f!=v;)f=f.nextSibling,q=!1;return O}z(kh,"domTextBetween");function Qc(s,f,v){var g;if(f==s.display.lineDiv){if(g=s.display.lineDiv.childNodes[v],!g)return Ya(s.clipPos(ze(s.display.viewTo-1)),!0);f=null,v=0}else for(g=f;;g=g.parentNode){if(!g||g==s.display.lineDiv)return null;if(g.parentNode&&g.parentNode==s.display.lineDiv)break}for(var T=0;T<s.display.view.length;T++){var O=s.display.view[T];if(O.node==g)return Ov(O,f,v)}}z(Qc,"domToPos");function Ov(s,f,v){var g=s.text.firstChild,T=!1;if(!f||!re(g,f))return Ya(ze(an(s.line),0),!0);if(f==g&&(T=!0,f=g.childNodes[v],v=0,!f)){var O=s.rest?Le(s.rest):s.line;return Ya(ze(an(O),O.text.length),T)}var I=f.nodeType==3?f:null,U=f;for(!I&&f.childNodes.length==1&&f.firstChild.nodeType==3&&(I=f.firstChild,v&&(v=I.nodeValue.length));U.parentNode!=g;)U=U.parentNode;var q=s.measure,H=q.maps;function ie(Ke,rt,it){for(var Je=-1;Je<(H?H.length:0);Je++)for(var ut=Je<0?q.map:H[Je],Ct=0;Ct<ut.length;Ct+=3){var yt=ut[Ct+2];if(yt==Ke||yt==rt){var Dt=an(Je<0?s.line:s.rest[Je]),Ln=ut[Ct]+it;return(it<0||yt!=Ke)&&(Ln=ut[Ct+(it?1:0)]),ze(Dt,Ln)}}}z(ie,"find");var le=ie(I,U,v);if(le)return Ya(le,T);for(var ye=U.nextSibling,me=I?I.nodeValue.length-v:0;ye;ye=ye.nextSibling){if(le=ie(ye,ye.firstChild,0),le)return Ya(ze(le.line,le.ch-me),T);me+=ye.textContent.length}for(var we=U.previousSibling,Ve=v;we;we=we.previousSibling){if(le=ie(we,we.firstChild,-1),le)return Ya(ze(le.line,le.ch+Ve),T);Ve+=we.textContent.length}}z(Ov,"locateNodeInLineView");var mr=z(function(s){this.cm=s,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null},"TextareaInput");mr.prototype.init=function(s){var f=this,v=this,g=this.cm;this.createField(s);var T=this.textarea;s.wrapper.insertBefore(this.wrapper,s.wrapper.firstChild),N&&(T.style.width="0px"),ot(T,"input",function(){p&&d>=9&&f.hasSelection&&(f.hasSelection=null),v.poll()}),ot(T,"paste",function(I){yn(g,I)||_h(I,g)||(g.state.pasteIncoming=+new Date,v.fastPoll())});function O(I){if(!yn(g,I)){if(g.somethingSelected())Yc({lineWise:!1,text:g.getSelections()});else if(g.options.lineWiseCopyCut){var U=Nv(g);Yc({lineWise:!0,text:U.text}),I.type=="cut"?g.setSelections(U.ranges,null,Ze):(v.prevInput="",T.value=U.text.join(`
`),ge(T))}else return;I.type=="cut"&&(g.state.cutIncoming=+new Date)}}z(O,"prepareCopyCut"),ot(T,"cut",O),ot(T,"copy",O),ot(s.scroller,"paste",function(I){if(!(Da(s,I)||yn(g,I))){if(!T.dispatchEvent){g.state.pasteIncoming=+new Date,v.focus();return}var U=new Event("paste");U.clipboardData=I.clipboardData,T.dispatchEvent(U)}}),ot(s.lineSpace,"selectstart",function(I){Da(s,I)||An(I)}),ot(T,"compositionstart",function(){var I=g.getCursor("from");v.composing&&v.composing.range.clear(),v.composing={start:I,range:g.markText(I,g.getCursor("to"),{className:"CodeMirror-composing"})}}),ot(T,"compositionend",function(){v.composing&&(v.poll(),v.composing.range.clear(),v.composing=null)})},mr.prototype.createField=function(s){this.wrapper=Pr(),this.textarea=this.wrapper.firstChild},mr.prototype.screenReaderLabelChanged=function(s){s?this.textarea.setAttribute("aria-label",s):this.textarea.removeAttribute("aria-label")},mr.prototype.prepareSelection=function(){var s=this.cm,f=s.display,v=s.doc,g=Sc(s);if(s.options.moveInputWithCursor){var T=Lo(s,v.sel.primary().head,"div"),O=f.wrapper.getBoundingClientRect(),I=f.lineDiv.getBoundingClientRect();g.teTop=Math.max(0,Math.min(f.wrapper.clientHeight-10,T.top+I.top-O.top)),g.teLeft=Math.max(0,Math.min(f.wrapper.clientWidth-10,T.left+I.left-O.left))}return g},mr.prototype.showSelection=function(s){var f=this.cm,v=f.display;ee(v.cursorDiv,s.cursors),ee(v.selectionDiv,s.selection),s.teTop!=null&&(this.wrapper.style.top=s.teTop+"px",this.wrapper.style.left=s.teLeft+"px")},mr.prototype.reset=function(s){if(!(this.contextMenuPending||this.composing)){var f=this.cm;if(f.somethingSelected()){this.prevInput="";var v=f.getSelection();this.textarea.value=v,f.state.focused&&ge(this.textarea),p&&d>=9&&(this.hasSelection=v)}else s||(this.prevInput=this.textarea.value="",p&&d>=9&&(this.hasSelection=null))}},mr.prototype.getField=function(){return this.textarea},mr.prototype.supportsTouch=function(){return!1},mr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!A||se()!=this.textarea))try{this.textarea.focus()}catch{}},mr.prototype.blur=function(){this.textarea.blur()},mr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},mr.prototype.receivedFocus=function(){this.slowPoll()},mr.prototype.slowPoll=function(){var s=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){s.poll(),s.cm.state.focused&&s.slowPoll()})},mr.prototype.fastPoll=function(){var s=!1,f=this;f.pollingFast=!0;function v(){var g=f.poll();!g&&!s?(s=!0,f.polling.set(60,v)):(f.pollingFast=!1,f.slowPoll())}z(v,"p"),f.polling.set(20,v)},mr.prototype.poll=function(){var s=this,f=this.cm,v=this.textarea,g=this.prevInput;if(this.contextMenuPending||!f.state.focused||Ko(v)&&!g&&!this.composing||f.isReadOnly()||f.options.disableInput||f.state.keySeq)return!1;var T=v.value;if(T==g&&!f.somethingSelected())return!1;if(p&&d>=9&&this.hasSelection===T||C&&/[\uf700-\uf7ff]/.test(T))return f.display.input.reset(),!1;if(f.doc.sel==f.display.selForContextMenu){var O=T.charCodeAt(0);if(O==8203&&!g&&(g=""),O==8666)return this.reset(),this.cm.execCommand("undo")}for(var I=0,U=Math.min(g.length,T.length);I<U&&g.charCodeAt(I)==T.charCodeAt(I);)++I;return Yr(f,function(){Wc(f,T.slice(I),g.length-I,null,s.composing?"*compose":null),T.length>1e3||T.indexOf(`
`)>-1?v.value=s.prevInput="":s.prevInput=T,s.composing&&(s.composing.range.clear(),s.composing.range=f.markText(s.composing.start,f.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},mr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},mr.prototype.onKeyPress=function(){p&&d>=9&&(this.hasSelection=null),this.fastPoll()},mr.prototype.onContextMenu=function(s){var f=this,v=f.cm,g=v.display,T=f.textarea;f.contextMenuPending&&f.contextMenuPending();var O=Ss(v,s),I=g.scroller.scrollTop;if(!O||y)return;var U=v.options.resetSelectionOnContextMenu;U&&v.doc.sel.contains(O)==-1&&Sr(v,hr)(v.doc,jo(O),Ze);var q=T.style.cssText,H=f.wrapper.style.cssText,ie=f.wrapper.offsetParent.getBoundingClientRect();f.wrapper.style.cssText="position: static",T.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(s.clientY-ie.top-5)+"px; left: "+(s.clientX-ie.left-5)+`px;
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var le;m&&(le=window.scrollY),g.input.focus(),m&&window.scrollTo(null,le),g.input.reset(),v.somethingSelected()||(T.value=f.prevInput=" "),f.contextMenuPending=me,g.selForContextMenu=v.doc.sel,clearTimeout(g.detectingSelectAll);function ye(){if(T.selectionStart!=null){var Ve=v.somethingSelected(),Ke=""+(Ve?T.value:"");T.value="⇚",T.value=Ke,f.prevInput=Ve?"":"",T.selectionStart=1,T.selectionEnd=Ke.length,g.selForContextMenu=v.doc.sel}}z(ye,"prepareSelectAllHack");function me(){if(f.contextMenuPending==me&&(f.contextMenuPending=!1,f.wrapper.style.cssText=H,T.style.cssText=q,p&&d<9&&g.scrollbars.setScrollTop(g.scroller.scrollTop=I),T.selectionStart!=null)){(!p||p&&d<9)&&ye();var Ve=0,Ke=z(function(){g.selForContextMenu==v.doc.sel&&T.selectionStart==0&&T.selectionEnd>0&&f.prevInput==""?Sr(v,bd)(v):Ve++<10?g.detectingSelectAll=setTimeout(Ke,500):(g.selForContextMenu=null,g.input.reset())},"poll");g.detectingSelectAll=setTimeout(Ke,200)}}if(z(me,"rehide"),p&&d>=9&&ye(),V){Bt(s);var we=z(function(){vn(window,"mouseup",we),setTimeout(me,20)},"mouseup");ot(window,"mouseup",we)}else setTimeout(me,50)},mr.prototype.readOnlyChanged=function(s){s||this.reset(),this.textarea.disabled=s=="nocursor",this.textarea.readOnly=!!s},mr.prototype.setUneditable=function(){},mr.prototype.needsContentAttribute=!1;function Rh(s,f){if(f=f?pe(f):{},f.value=s.value,!f.tabindex&&s.tabIndex&&(f.tabindex=s.tabIndex),!f.placeholder&&s.placeholder&&(f.placeholder=s.placeholder),f.autofocus==null){var v=se();f.autofocus=v==s||s.getAttribute("autofocus")!=null&&v==document.body}function g(){s.value=U.getValue()}z(g,"save");var T;if(s.form&&(ot(s.form,"submit",g),!f.leaveSubmitMethodAlone)){var O=s.form;T=O.submit;try{var I=O.submit=function(){g(),O.submit=T,O.submit(),O.submit=I}}catch{}}f.finishInit=function(q){q.save=g,q.getTextArea=function(){return s},q.toTextArea=function(){q.toTextArea=isNaN,g(),s.parentNode.removeChild(q.getWrapperElement()),s.style.display="",s.form&&(vn(s.form,"submit",g),!f.leaveSubmitMethodAlone&&typeof s.form.submit=="function"&&(s.form.submit=T))}},s.style.display="none";var U=Mn(function(q){return s.parentNode.insertBefore(q,s.nextSibling)},f);return U}z(Rh,"fromTextArea");function Mh(s){s.off=vn,s.on=ot,s.wheelEventPixels=rv,s.Doc=Ci,s.splitLines=Ii,s.countColumn=ce,s.findColumn=at,s.isWordChar=Ye,s.Pass=Ge,s.signal=mt,s.Line=hc,s.changeEnd=Pa,s.scrollbarModel=dr,s.Pos=ze,s.cmpPos=W,s.modes=Bn,s.mimeModes=Lr,s.resolveMode=Oo,s.getMode=po,s.modeExtensions=Rn,s.extendMode=Zi,s.copyState=Pi,s.startState=Do,s.innerMode=ho,s.commands=Tu,s.keyMap=Ba,s.keyName=wd,s.isModifierKey=gh,s.lookupKey=Tl,s.normalizeKeyMap=vv,s.StringStream=nr,s.SharedTextMarker=jc,s.TextMarker=ks,s.LineWidget=bu,s.e_preventDefault=An,s.e_stopPropagation=Xi,s.e_stop=Bt,s.addClass=fe,s.contains=re,s.rmClass=X,s.keyNames=sa}z(Mh,"addLegacyProps"),wv(Mn),ei(Mn);var Dv="iter insert remove copy getEditor constructor".split(" ");for(var Rd in Ci.prototype)Ci.prototype.hasOwnProperty(Rd)&&Se(Dv,Rd)<0&&(Mn.prototype[Rd]=function(s){return function(){return s.apply(this.doc,arguments)}}(Ci.prototype[Rd]));return Mr(Ci),Mn.inputStyles={textarea:mr,contenteditable:Cn},Mn.defineMode=function(s){!Mn.defaults.mode&&s!="null"&&(Mn.defaults.mode=s),Fi.apply(this,arguments)},Mn.defineMIME=$r,Mn.defineMode("null",function(){return{token:function(s){return s.skipToEnd()}}}),Mn.defineMIME("text/plain","null"),Mn.defineExtension=function(s,f){Mn.prototype[s]=f},Mn.defineDocExtension=function(s,f){Ci.prototype[s]=f},Mn.fromTextArea=Rh,Mh(Mn),Mn.version="5.65.3",Mn})}(RP)),RP.exports}z(Qi,"requireCodemirror");var Kne=Object.defineProperty,Xne=(e,t)=>Kne(e,"name",{value:t,configurable:!0});function LP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Xne(LP,"_mergeNamespaces");var IP=Qi();const qt=fo(IP),Zne=Object.freeze(Object.defineProperty({__proto__:null,C:qt,c:LP({__proto__:null,default:qt},[IP])},Symbol.toStringTag,{value:"Module"}));var Jne=Object.defineProperty,_o=(e,t)=>Jne(e,"name",{value:t,configurable:!0});function FP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}_o(FP,"_mergeNamespaces");var ere={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){var r="CodeMirror-hint",i="CodeMirror-hint-active";n.showHint=function(N,D,A){if(!D)return N.showHint(A);A&&A.async&&(D.async=!0);var C={hint:D};if(A)for(var M in A)C[M]=A[M];return N.showHint(C)},n.defineExtension("showHint",function(N){N=p(this,this.getCursor("start"),N);var D=this.listSelections();if(!(D.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var A=0;A<D.length;A++)if(D[A].head.line!=D[A].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var C=this.state.completionActive=new o(this,N);C.options.hint&&(n.signal(this,"startCompletion",this),C.update(!0))}}),n.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function o(N,D){if(this.cm=N,this.options=D,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var A=this;N.on("cursorActivity",this.activityFunc=function(){A.cursorActivity()})}}_o(o,"Completion");var l=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},c=window.cancelAnimationFrame||clearTimeout;o.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&n.signal(this.data,"close"),this.widget&&this.widget.close(),n.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,D){var A=N.list[D],C=this;this.cm.operation(function(){A.hint?A.hint(C.cm,N,A):C.cm.replaceRange(d(A),A.from||N.from,A.to||N.to,"complete"),n.signal(N,"pick",A),C.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(c(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var D=this.cm.getCursor(),A=this.cm.getLine(D.line);if(D.line!=this.startPos.line||A.length-D.ch!=this.startLen-this.startPos.ch||D.ch<N.ch||this.cm.somethingSelected()||!D.ch||this.options.closeCharacters.test(A.charAt(D.ch-1)))this.close();else{var C=this;this.debounce=l(function(){C.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var D=this,A=++this.tick;x(this.options.hint,this.cm,this.options,function(C){D.tick==A&&D.finishUpdate(C,N)})}},finishUpdate:function(N,D){this.data&&n.signal(this.data,"update");var A=this.widget&&this.widget.picked||D&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(A&&N.list.length==1?this.pick(N,0):(this.widget=new E(this,N),n.signal(N,"shown")))}};function p(N,D,A){var C=N.options.hintOptions,M={};for(var j in k)M[j]=k[j];if(C)for(var j in C)C[j]!==void 0&&(M[j]=C[j]);if(A)for(var j in A)A[j]!==void 0&&(M[j]=A[j]);return M.hint.resolve&&(M.hint=M.hint.resolve(N,D)),M}_o(p,"parseOptions");function d(N){return typeof N=="string"?N:N.text}_o(d,"getText");function m(N,D){var A={Up:function(){D.moveFocus(-1)},Down:function(){D.moveFocus(1)},PageUp:function(){D.moveFocus(-D.menuSize()+1,!0)},PageDown:function(){D.moveFocus(D.menuSize()-1,!0)},Home:function(){D.setFocus(0)},End:function(){D.setFocus(D.length-1)},Enter:D.pick,Tab:D.pick,Esc:D.close},C=/Mac/.test(navigator.platform);C&&(A["Ctrl-P"]=function(){D.moveFocus(-1)},A["Ctrl-N"]=function(){D.moveFocus(1)});var M=N.options.customKeys,j=M?{}:A;function P($,X){var J;typeof X!="string"?J=_o(function(ee){return X(ee,D)},"bound"):A.hasOwnProperty(X)?J=A[X]:J=X,j[$]=J}if(_o(P,"addBinding"),M)for(var F in M)M.hasOwnProperty(F)&&P(F,M[F]);var V=N.options.extraKeys;if(V)for(var F in V)V.hasOwnProperty(F)&&P(F,V[F]);return j}_o(m,"buildKeyMap");function b(N,D){for(;D&&D!=N;){if(D.nodeName.toUpperCase()==="LI"&&D.parentNode==N)return D;D=D.parentNode}}_o(b,"getHintElement");function E(N,D){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=D,this.picked=!1;var A=this,C=N.cm,M=C.getInputField().ownerDocument,j=M.defaultView||M.parentWindow,P=this.hints=M.createElement("ul");P.setAttribute("role","listbox"),P.setAttribute("aria-expanded","true"),P.id=this.id;var F=N.cm.options.theme;P.className="CodeMirror-hints "+F,this.selectedHint=D.selectedHint||0;for(var V=D.list,$=0;$<V.length;++$){var X=P.appendChild(M.createElement("li")),J=V[$],ee=r+($!=this.selectedHint?"":" "+i);J.className!=null&&(ee=J.className+" "+ee),X.className=ee,$==this.selectedHint&&X.setAttribute("aria-selected","true"),X.id=this.id+"-"+$,X.setAttribute("role","option"),J.render?J.render(X,D,J):X.appendChild(M.createTextNode(J.displayText||d(J))),X.hintId=$}var Q=N.options.container||M.body,B=C.cursorCoords(N.options.alignWithWord?D.from:null),ne=B.left,re=B.bottom,se=!0,fe=0,Z=0;if(Q!==M.body){var ge=["absolute","relative","fixed"].indexOf(j.getComputedStyle(Q).position)!==-1,ae=ge?Q:Q.offsetParent,pe=ae.getBoundingClientRect(),ce=M.body.getBoundingClientRect();fe=pe.left-ce.left-ae.scrollLeft,Z=pe.top-ce.top-ae.scrollTop}P.style.left=ne-fe+"px",P.style.top=re-Z+"px";var he=j.innerWidth||Math.max(M.body.offsetWidth,M.documentElement.offsetWidth),Se=j.innerHeight||Math.max(M.body.offsetHeight,M.documentElement.offsetHeight);Q.appendChild(P),C.getInputField().setAttribute("aria-autocomplete","list"),C.getInputField().setAttribute("aria-owns",this.id),C.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Ie=N.options.moveOnOverlap?P.getBoundingClientRect():new DOMRect,Ge=N.options.paddingForScrollbar?P.scrollHeight>P.clientHeight+1:!1,Ze;setTimeout(function(){Ze=C.getScrollInfo()});var It=Ie.bottom-Se;if(It>0){var vt=Ie.bottom-Ie.top,at=B.top-(B.bottom-Ie.top);if(at-vt>0)P.style.top=(re=B.top-vt-Z)+"px",se=!1;else if(vt>Se){P.style.height=Se-5+"px",P.style.top=(re=B.bottom-Ie.top-Z)+"px";var Oe=C.getCursor();D.from.ch!=Oe.ch&&(B=C.cursorCoords(Oe),P.style.left=(ne=B.left-fe)+"px",Ie=P.getBoundingClientRect())}}var be=Ie.right-he;if(Ge&&(be+=C.display.nativeBarWidth),be>0&&(Ie.right-Ie.left>he&&(P.style.width=he-5+"px",be-=Ie.right-Ie.left-he),P.style.left=(ne=B.left-be-fe)+"px"),Ge)for(var Le=P.firstChild;Le;Le=Le.nextSibling)Le.style.paddingRight=C.display.nativeBarWidth+"px";if(C.addKeyMap(this.keyMap=m(N,{moveFocus:function(je,et){A.changeActive(A.selectedHint+je,et)},setFocus:function(je){A.changeActive(je)},menuSize:function(){return A.screenAmount()},length:V.length,close:function(){N.close()},pick:function(){A.pick()},data:D})),N.options.closeOnUnfocus){var Ee;C.on("blur",this.onBlur=function(){Ee=setTimeout(function(){N.close()},100)}),C.on("focus",this.onFocus=function(){clearTimeout(Ee)})}C.on("scroll",this.onScroll=function(){var je=C.getScrollInfo(),et=C.getWrapperElement().getBoundingClientRect();Ze||(Ze=C.getScrollInfo());var ct=re+Ze.top-je.top,Ye=ct-(j.pageYOffset||(M.documentElement||M.body).scrollTop);if(se||(Ye+=P.offsetHeight),Ye<=et.top||Ye>=et.bottom)return N.close();P.style.top=ct+"px",P.style.left=ne+Ze.left-je.left+"px"}),n.on(P,"dblclick",function(je){var et=b(P,je.target||je.srcElement);et&&et.hintId!=null&&(A.changeActive(et.hintId),A.pick())}),n.on(P,"click",function(je){var et=b(P,je.target||je.srcElement);et&&et.hintId!=null&&(A.changeActive(et.hintId),N.options.completeOnSingleClick&&A.pick())}),n.on(P,"mousedown",function(){setTimeout(function(){C.focus()},20)});var oe=this.getSelectedHintRange();return(oe.from!==0||oe.to!==0)&&this.scrollToActive(),n.signal(D,"select",V[this.selectedHint],P.childNodes[this.selectedHint]),!0}_o(E,"Widget"),E.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var D=this.completion.cm;this.completion.options.closeOnUnfocus&&(D.off("blur",this.onBlur),D.off("focus",this.onFocus)),D.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,D){if(N>=this.data.list.length?N=D?this.data.list.length-1:0:N<0&&(N=D?0:this.data.list.length-1),this.selectedHint!=N){var A=this.hints.childNodes[this.selectedHint];A&&(A.className=A.className.replace(" "+i,""),A.removeAttribute("aria-selected")),A=this.hints.childNodes[this.selectedHint=N],A.className+=" "+i,A.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",A.id),this.scrollToActive(),n.signal(this.data,"select",this.data.list[this.selectedHint],A)}},scrollToActive:function(){var N=this.getSelectedHintRange(),D=this.hints.childNodes[N.from],A=this.hints.childNodes[N.to],C=this.hints.firstChild;D.offsetTop<this.hints.scrollTop?this.hints.scrollTop=D.offsetTop-C.offsetTop:A.offsetTop+A.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=A.offsetTop+A.offsetHeight-this.hints.clientHeight+C.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function y(N,D){if(!N.somethingSelected())return D;for(var A=[],C=0;C<D.length;C++)D[C].supportsSelection&&A.push(D[C]);return A}_o(y,"applicableHelpers");function x(N,D,A,C){if(N.async)N(D,C,A);else{var M=N(D,A);M&&M.then?M.then(C):C(M)}}_o(x,"fetchHints");function w(N,D){var A=N.getHelpers(D,"hint"),C;if(A.length){var M=_o(function(j,P,F){var V=y(j,A);function $(X){if(X==V.length)return P(null);x(V[X],j,F,function(J){J&&J.list.length>0?P(J):$(X+1)})}_o($,"run"),$(0)},"resolved");return M.async=!0,M.supportsSelection=!0,M}else return(C=N.getHelper(N.getCursor(),"hintWords"))?function(j){return n.hint.fromList(j,{words:C})}:n.hint.anyword?function(j,P){return n.hint.anyword(j,P)}:function(){}}_o(w,"resolveAutoHints"),n.registerHelper("hint","auto",{resolve:w}),n.registerHelper("hint","fromList",function(N,D){var A=N.getCursor(),C=N.getTokenAt(A),M,j=n.Pos(A.line,C.start),P=A;C.start<A.ch&&/\w/.test(C.string.charAt(A.ch-C.start-1))?M=C.string.substr(0,A.ch-C.start):(M="",j=A);for(var F=[],V=0;V<D.words.length;V++){var $=D.words[V];$.slice(0,M.length)==M&&F.push($)}if(F.length)return{list:F,from:j,to:P}}),n.commands.autocomplete=n.showHint;var k={hint:n.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};n.defineOption("hintOptions",null)})})();var PP=ere.exports;const tre=Object.freeze(Object.defineProperty({__proto__:null,s:FP({__proto__:null,default:fo(PP)},[PP])},Symbol.toStringTag,{value:"Module"}));var nre=Object.defineProperty,ac=(e,t)=>nre(e,"name",{value:t,configurable:!0}),rre={exports:{}},jP;function GC(){return jP||(jP=1,function(e,t){(function(n){n(Qi())})(function(n){var r=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),i=n.Pos,o={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function l(E){return E&&E.bracketRegex||/[(){}[\]]/}ac(l,"bracketRegex");function c(E,y,x){var w=E.getLineHandle(y.line),k=y.ch-1,N=x&&x.afterCursor;N==null&&(N=/(^| )cm-fat-cursor($| )/.test(E.getWrapperElement().className));var D=l(x),A=!N&&k>=0&&D.test(w.text.charAt(k))&&o[w.text.charAt(k)]||D.test(w.text.charAt(k+1))&&o[w.text.charAt(++k)];if(!A)return null;var C=A.charAt(1)==">"?1:-1;if(x&&x.strict&&C>0!=(k==y.ch))return null;var M=E.getTokenTypeAt(i(y.line,k+1)),j=p(E,i(y.line,k+(C>0?1:0)),C,M,x);return j==null?null:{from:i(y.line,k),to:j&&j.pos,match:j&&j.ch==A.charAt(0),forward:C>0}}ac(c,"findMatchingBracket");function p(E,y,x,w,k){for(var N=k&&k.maxScanLineLength||1e4,D=k&&k.maxScanLines||1e3,A=[],C=l(k),M=x>0?Math.min(y.line+D,E.lastLine()+1):Math.max(E.firstLine()-1,y.line-D),j=y.line;j!=M;j+=x){var P=E.getLine(j);if(P){var F=x>0?0:P.length-1,V=x>0?P.length:-1;if(!(P.length>N))for(j==y.line&&(F=y.ch-(x<0?1:0));F!=V;F+=x){var $=P.charAt(F);if(C.test($)&&(w===void 0||(E.getTokenTypeAt(i(j,F+1))||"")==(w||""))){var X=o[$];if(X&&X.charAt(1)==">"==x>0)A.push($);else if(A.length)A.pop();else return{pos:i(j,F),ch:$}}}}}return j-x==(x>0?E.lastLine():E.firstLine())?!1:null}ac(p,"scanForBracket");function d(E,y,x){for(var w=E.state.matchBrackets.maxHighlightLineLength||1e3,k=x&&x.highlightNonMatching,N=[],D=E.listSelections(),A=0;A<D.length;A++){var C=D[A].empty()&&c(E,D[A].head,x);if(C&&(C.match||k!==!1)&&E.getLine(C.from.line).length<=w){var M=C.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";N.push(E.markText(C.from,i(C.from.line,C.from.ch+1),{className:M})),C.to&&E.getLine(C.to.line).length<=w&&N.push(E.markText(C.to,i(C.to.line,C.to.ch+1),{className:M}))}}if(N.length){r&&E.state.focused&&E.focus();var j=ac(function(){E.operation(function(){for(var P=0;P<N.length;P++)N[P].clear()})},"clear");if(y)setTimeout(j,800);else return j}}ac(d,"matchBrackets");function m(E){E.operation(function(){E.state.matchBrackets.currentlyHighlighted&&(E.state.matchBrackets.currentlyHighlighted(),E.state.matchBrackets.currentlyHighlighted=null),E.state.matchBrackets.currentlyHighlighted=d(E,!1,E.state.matchBrackets)})}ac(m,"doMatchBrackets");function b(E){E.state.matchBrackets&&E.state.matchBrackets.currentlyHighlighted&&(E.state.matchBrackets.currentlyHighlighted(),E.state.matchBrackets.currentlyHighlighted=null)}ac(b,"clearHighlighted"),n.defineOption("matchBrackets",!1,function(E,y,x){x&&x!=n.Init&&(E.off("cursorActivity",m),E.off("focus",m),E.off("blur",b),b(E)),y&&(E.state.matchBrackets=typeof y=="object"?y:{},E.on("cursorActivity",m),E.on("focus",m),E.on("blur",b))}),n.defineExtension("matchBrackets",function(){d(this,!0)}),n.defineExtension("findMatchingBracket",function(E,y,x){return(x||typeof y=="boolean")&&(x?(x.strict=y,y=x):y=y?{strict:!0}:null),c(this,E,y)}),n.defineExtension("scanForBracket",function(E,y,x,w){return p(this,E,y,x,w)})})}()),rre.exports}ac(GC,"requireMatchbrackets");var ire=Object.defineProperty,ore=(e,t)=>ire(e,"name",{value:t,configurable:!0});function VP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}ore(VP,"_mergeNamespaces");var UP=GC();const are=Object.freeze(Object.defineProperty({__proto__:null,m:VP({__proto__:null,default:fo(UP)},[UP])},Symbol.toStringTag,{value:"Module"}));var sre=Object.defineProperty,Na=(e,t)=>sre(e,"name",{value:t,configurable:!0});function qP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Na(qP,"_mergeNamespaces");var lre={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){var r={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},i=n.Pos;n.defineOption("autoCloseBrackets",!1,function(N,D,A){A&&A!=n.Init&&(N.removeKeyMap(l),N.state.closeBrackets=null),D&&(c(o(D,"pairs")),N.state.closeBrackets=D,N.addKeyMap(l))});function o(N,D){return D=="pairs"&&typeof N=="string"?N:typeof N=="object"&&N[D]!=null?N[D]:r[D]}Na(o,"getOption");var l={Backspace:m,Enter:b};function c(N){for(var D=0;D<N.length;D++){var A=N.charAt(D),C="'"+A+"'";l[C]||(l[C]=p(A))}}Na(c,"ensureBound"),c(r.pairs+"`");function p(N){return function(D){return x(D,N)}}Na(p,"handler");function d(N){var D=N.state.closeBrackets;if(!D||D.override)return D;var A=N.getModeAt(N.getCursor());return A.closeBrackets||D}Na(d,"getConfig");function m(N){var D=d(N);if(!D||N.getOption("disableInput"))return n.Pass;for(var A=o(D,"pairs"),C=N.listSelections(),M=0;M<C.length;M++){if(!C[M].empty())return n.Pass;var j=w(N,C[M].head);if(!j||A.indexOf(j)%2!=0)return n.Pass}for(var M=C.length-1;M>=0;M--){var P=C[M].head;N.replaceRange("",i(P.line,P.ch-1),i(P.line,P.ch+1),"+delete")}}Na(m,"handleBackspace");function b(N){var D=d(N),A=D&&o(D,"explode");if(!A||N.getOption("disableInput"))return n.Pass;for(var C=N.listSelections(),M=0;M<C.length;M++){if(!C[M].empty())return n.Pass;var j=w(N,C[M].head);if(!j||A.indexOf(j)%2!=0)return n.Pass}N.operation(function(){var P=N.lineSeparator()||`
`;N.replaceSelection(P+P,null),E(N,-1),C=N.listSelections();for(var F=0;F<C.length;F++){var V=C[F].head.line;N.indentLine(V,null,!0),N.indentLine(V+1,null,!0)}})}Na(b,"handleEnter");function E(N,D){for(var A=[],C=N.listSelections(),M=0,j=0;j<C.length;j++){var P=C[j];P.head==N.getCursor()&&(M=j);var F=P.head.ch||D>0?{line:P.head.line,ch:P.head.ch+D}:{line:P.head.line-1};A.push({anchor:F,head:F})}N.setSelections(A,M)}Na(E,"moveSel");function y(N){var D=n.cmpPos(N.anchor,N.head)>0;return{anchor:new i(N.anchor.line,N.anchor.ch+(D?-1:1)),head:new i(N.head.line,N.head.ch+(D?1:-1))}}Na(y,"contractSelection");function x(N,D){var A=d(N);if(!A||N.getOption("disableInput"))return n.Pass;var C=o(A,"pairs"),M=C.indexOf(D);if(M==-1)return n.Pass;for(var j=o(A,"closeBefore"),P=o(A,"triples"),F=C.charAt(M+1)==D,V=N.listSelections(),$=M%2==0,X,J=0;J<V.length;J++){var ee=V[J],Q=ee.head,B,ne=N.getRange(Q,i(Q.line,Q.ch+1));if($&&!ee.empty())B="surround";else if((F||!$)&&ne==D)F&&k(N,Q)?B="both":P.indexOf(D)>=0&&N.getRange(Q,i(Q.line,Q.ch+3))==D+D+D?B="skipThree":B="skip";else if(F&&Q.ch>1&&P.indexOf(D)>=0&&N.getRange(i(Q.line,Q.ch-2),Q)==D+D){if(Q.ch>2&&/\bstring/.test(N.getTokenTypeAt(i(Q.line,Q.ch-2))))return n.Pass;B="addFour"}else if(F){var re=Q.ch==0?" ":N.getRange(i(Q.line,Q.ch-1),Q);if(!n.isWordChar(ne)&&re!=D&&!n.isWordChar(re))B="both";else return n.Pass}else if($&&(ne.length===0||/\s/.test(ne)||j.indexOf(ne)>-1))B="both";else return n.Pass;if(!X)X=B;else if(X!=B)return n.Pass}var se=M%2?C.charAt(M-1):D,fe=M%2?D:C.charAt(M+1);N.operation(function(){if(X=="skip")E(N,1);else if(X=="skipThree")E(N,3);else if(X=="surround"){for(var Z=N.getSelections(),ge=0;ge<Z.length;ge++)Z[ge]=se+Z[ge]+fe;N.replaceSelections(Z,"around"),Z=N.listSelections().slice();for(var ge=0;ge<Z.length;ge++)Z[ge]=y(Z[ge]);N.setSelections(Z)}else X=="both"?(N.replaceSelection(se+fe,null),N.triggerElectric(se+fe),E(N,-1)):X=="addFour"&&(N.replaceSelection(se+se+se+se,"before"),E(N,1))})}Na(x,"handleChar");function w(N,D){var A=N.getRange(i(D.line,D.ch-1),i(D.line,D.ch+1));return A.length==2?A:null}Na(w,"charsAround");function k(N,D){var A=N.getTokenAt(i(D.line,D.ch+1));return/\bstring/.test(A.type)&&A.start==D.ch&&(D.ch==0||!/\bstring/.test(N.getTokenTypeAt(D)))}Na(k,"stringStartsAfter")})})();var BP=lre.exports;const ure=Object.freeze(Object.defineProperty({__proto__:null,c:qP({__proto__:null,default:fo(BP)},[BP])},Symbol.toStringTag,{value:"Module"}));var cre=Object.defineProperty,Op=(e,t)=>cre(e,"name",{value:t,configurable:!0});function $P(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Op($P,"_mergeNamespaces");var fre={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){function r(i){return function(o,l){var c=l.line,p=o.getLine(c);function d(w){for(var k,N=l.ch,D=0;;){var A=N<=0?-1:p.lastIndexOf(w[0],N-1);if(A==-1){if(D==1)break;D=1,N=p.length;continue}if(D==1&&A<l.ch)break;if(k=o.getTokenTypeAt(n.Pos(c,A+1)),!/^(comment|string)/.test(k))return{ch:A+1,tokenType:k,pair:w};N=A-1}}Op(d,"findOpening");function m(w){var k=1,N=o.lastLine(),D,A=w.ch,C;e:for(var M=c;M<=N;++M)for(var j=o.getLine(M),P=M==c?A:0;;){var F=j.indexOf(w.pair[0],P),V=j.indexOf(w.pair[1],P);if(F<0&&(F=j.length),V<0&&(V=j.length),P=Math.min(F,V),P==j.length)break;if(o.getTokenTypeAt(n.Pos(M,P+1))==w.tokenType){if(P==F)++k;else if(!--k){D=M,C=P;break e}}++P}return D==null||c==D?null:{from:n.Pos(c,A),to:n.Pos(D,C)}}Op(m,"findRange");for(var b=[],E=0;E<i.length;E++){var y=d(i[E]);y&&b.push(y)}b.sort(function(w,k){return w.ch-k.ch});for(var E=0;E<b.length;E++){var x=m(b[E]);if(x)return x}return null}}Op(r,"bracketFolding"),n.registerHelper("fold","brace",r([["{","}"],["[","]"]])),n.registerHelper("fold","brace-paren",r([["{","}"],["[","]"],["(",")"]])),n.registerHelper("fold","import",function(i,o){function l(E){if(E<i.firstLine()||E>i.lastLine())return null;var y=i.getTokenAt(n.Pos(E,1));if(/\S/.test(y.string)||(y=i.getTokenAt(n.Pos(E,y.end+1))),y.type!="keyword"||y.string!="import")return null;for(var x=E,w=Math.min(i.lastLine(),E+10);x<=w;++x){var k=i.getLine(x),N=k.indexOf(";");if(N!=-1)return{startCh:y.end,end:n.Pos(x,N)}}}Op(l,"hasImport");var c=o.line,p=l(c),d;if(!p||l(c-1)||(d=l(c-2))&&d.end.line==c-1)return null;for(var m=p.end;;){var b=l(m.line+1);if(b==null)break;m=b.end}return{from:i.clipPos(n.Pos(c,p.startCh+1)),to:m}}),n.registerHelper("fold","include",function(i,o){function l(b){if(b<i.firstLine()||b>i.lastLine())return null;var E=i.getTokenAt(n.Pos(b,1));if(/\S/.test(E.string)||(E=i.getTokenAt(n.Pos(b,E.end+1))),E.type=="meta"&&E.string.slice(0,8)=="#include")return E.start+8}Op(l,"hasInclude");var c=o.line,p=l(c);if(p==null||l(c-1)!=null)return null;for(var d=c;;){var m=l(d+1);if(m==null)break;++d}return{from:n.Pos(c,p+1),to:i.clipPos(n.Pos(d))}})})})();var zP=fre.exports;const HP=Object.freeze(Object.defineProperty({__proto__:null,b:$P({__proto__:null,default:fo(zP)},[zP])},Symbol.toStringTag,{value:"Module"}));var dre=Object.defineProperty,Mi=(e,t)=>dre(e,"name",{value:t,configurable:!0});function GP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Mi(GP,"_mergeNamespaces");var pre={exports:{}},hre={exports:{}},YP;function WP(){return YP||(YP=1,function(e,t){(function(n){n(Qi())})(function(n){function r(c,p,d,m){if(d&&d.call){var b=d;d=null}else var b=l(c,d,"rangeFinder");typeof p=="number"&&(p=n.Pos(p,0));var E=l(c,d,"minFoldSize");function y(N){var D=b(c,p);if(!D||D.to.line-D.from.line<E)return null;if(m==="fold")return D;for(var A=c.findMarksAt(D.from),C=0;C<A.length;++C)if(A[C].__isFold){if(!N)return null;D.cleared=!0,A[C].clear()}return D}Mi(y,"getRange");var x=y(!0);if(l(c,d,"scanUp"))for(;!x&&p.line>c.firstLine();)p=n.Pos(p.line-1,0),x=y(!1);if(!(!x||x.cleared||m==="unfold")){var w=i(c,d,x);n.on(w,"mousedown",function(N){k.clear(),n.e_preventDefault(N)});var k=c.markText(x.from,x.to,{replacedWith:w,clearOnEnter:l(c,d,"clearOnEnter"),__isFold:!0});k.on("clear",function(N,D){n.signal(c,"unfold",c,N,D)}),n.signal(c,"fold",c,x.from,x.to)}}Mi(r,"doFold");function i(c,p,d){var m=l(c,p,"widget");if(typeof m=="function"&&(m=m(d.from,d.to)),typeof m=="string"){var b=document.createTextNode(m);m=document.createElement("span"),m.appendChild(b),m.className="CodeMirror-foldmarker"}else m&&(m=m.cloneNode(!0));return m}Mi(i,"makeWidget"),n.newFoldFunction=function(c,p){return function(d,m){r(d,m,{rangeFinder:c,widget:p})}},n.defineExtension("foldCode",function(c,p,d){r(this,c,p,d)}),n.defineExtension("isFolded",function(c){for(var p=this.findMarksAt(c),d=0;d<p.length;++d)if(p[d].__isFold)return!0}),n.commands.toggleFold=function(c){c.foldCode(c.getCursor())},n.commands.fold=function(c){c.foldCode(c.getCursor(),null,"fold")},n.commands.unfold=function(c){c.foldCode(c.getCursor(),{scanUp:!1},"unfold")},n.commands.foldAll=function(c){c.operation(function(){for(var p=c.firstLine(),d=c.lastLine();p<=d;p++)c.foldCode(n.Pos(p,0),{scanUp:!1},"fold")})},n.commands.unfoldAll=function(c){c.operation(function(){for(var p=c.firstLine(),d=c.lastLine();p<=d;p++)c.foldCode(n.Pos(p,0),{scanUp:!1},"unfold")})},n.registerHelper("fold","combine",function(){var c=Array.prototype.slice.call(arguments,0);return function(p,d){for(var m=0;m<c.length;++m){var b=c[m](p,d);if(b)return b}}}),n.registerHelper("fold","auto",function(c,p){for(var d=c.getHelpers(p,"fold"),m=0;m<d.length;m++){var b=d[m](c,p);if(b)return b}});var o={rangeFinder:n.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};n.defineOption("foldOptions",null);function l(c,p,d){if(p&&p[d]!==void 0)return p[d];var m=c.options.foldOptions;return m&&m[d]!==void 0?m[d]:o[d]}Mi(l,"getOption"),n.defineExtension("foldOption",function(c,p){return l(this,c,p)})})}()),hre.exports}Mi(WP,"requireFoldcode"),function(e,t){(function(n){n(Qi(),WP())})(function(n){n.defineOption("foldGutter",!1,function(w,k,N){N&&N!=n.Init&&(w.clearGutter(w.state.foldGutter.options.gutter),w.state.foldGutter=null,w.off("gutterClick",b),w.off("changes",E),w.off("viewportChange",y),w.off("fold",x),w.off("unfold",x),w.off("swapDoc",E)),k&&(w.state.foldGutter=new i(o(k)),m(w),w.on("gutterClick",b),w.on("changes",E),w.on("viewportChange",y),w.on("fold",x),w.on("unfold",x),w.on("swapDoc",E))});var r=n.Pos;function i(w){this.options=w,this.from=this.to=0}Mi(i,"State");function o(w){return w===!0&&(w={}),w.gutter==null&&(w.gutter="CodeMirror-foldgutter"),w.indicatorOpen==null&&(w.indicatorOpen="CodeMirror-foldgutter-open"),w.indicatorFolded==null&&(w.indicatorFolded="CodeMirror-foldgutter-folded"),w}Mi(o,"parseOptions");function l(w,k){for(var N=w.findMarks(r(k,0),r(k+1,0)),D=0;D<N.length;++D)if(N[D].__isFold){var A=N[D].find(-1);if(A&&A.line===k)return N[D]}}Mi(l,"isFolded");function c(w){if(typeof w=="string"){var k=document.createElement("div");return k.className=w+" CodeMirror-guttermarker-subtle",k}else return w.cloneNode(!0)}Mi(c,"marker");function p(w,k,N){var D=w.state.foldGutter.options,A=k-1,C=w.foldOption(D,"minFoldSize"),M=w.foldOption(D,"rangeFinder"),j=typeof D.indicatorFolded=="string"&&d(D.indicatorFolded),P=typeof D.indicatorOpen=="string"&&d(D.indicatorOpen);w.eachLine(k,N,function(F){++A;var V=null,$=F.gutterMarkers;if($&&($=$[D.gutter]),l(w,A)){if(j&&$&&j.test($.className))return;V=c(D.indicatorFolded)}else{var X=r(A,0),J=M&&M(w,X);if(J&&J.to.line-J.from.line>=C){if(P&&$&&P.test($.className))return;V=c(D.indicatorOpen)}}!V&&!$||w.setGutterMarker(F,D.gutter,V)})}Mi(p,"updateFoldInfo");function d(w){return new RegExp("(^|\\s)"+w+"(?:$|\\s)\\s*")}Mi(d,"classTest");function m(w){var k=w.getViewport(),N=w.state.foldGutter;N&&(w.operation(function(){p(w,k.from,k.to)}),N.from=k.from,N.to=k.to)}Mi(m,"updateInViewport");function b(w,k,N){var D=w.state.foldGutter;if(D){var A=D.options;if(N==A.gutter){var C=l(w,k);C?C.clear():w.foldCode(r(k,0),A)}}}Mi(b,"onGutterClick");function E(w){var k=w.state.foldGutter;if(k){var N=k.options;k.from=k.to=0,clearTimeout(k.changeUpdate),k.changeUpdate=setTimeout(function(){m(w)},N.foldOnChangeTimeSpan||600)}}Mi(E,"onChange");function y(w){var k=w.state.foldGutter;if(k){var N=k.options;clearTimeout(k.changeUpdate),k.changeUpdate=setTimeout(function(){var D=w.getViewport();k.from==k.to||D.from-k.to>20||k.from-D.to>20?m(w):w.operation(function(){D.from<k.from&&(p(w,D.from,k.from),k.from=D.from),D.to>k.to&&(p(w,k.to,D.to),k.to=D.to)})},N.updateViewportTimeSpan||400)}}Mi(y,"onViewportChange");function x(w,k){var N=w.state.foldGutter;if(N){var D=k.line;D>=N.from&&D<N.to&&p(w,D,D+1)}}Mi(x,"onFold")})}();var QP=pre.exports;const KP=Object.freeze(Object.defineProperty({__proto__:null,f:GP({__proto__:null,default:fo(QP)},[QP])},Symbol.toStringTag,{value:"Module"}));var mre=Object.defineProperty,qr=(e,t)=>mre(e,"name",{value:t,configurable:!0});function XP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}qr(XP,"_mergeNamespaces");var gre={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){var r="CodeMirror-lint-markers",i="CodeMirror-lint-line-";function o(P,F,V){var $=document.createElement("div");$.className="CodeMirror-lint-tooltip cm-s-"+P.options.theme,$.appendChild(V.cloneNode(!0)),P.state.lint.options.selfContain?P.getWrapperElement().appendChild($):document.body.appendChild($);function X(J){if(!$.parentNode)return n.off(document,"mousemove",X);$.style.top=Math.max(0,J.clientY-$.offsetHeight-5)+"px",$.style.left=J.clientX+5+"px"}return qr(X,"position"),n.on(document,"mousemove",X),X(F),$.style.opacity!=null&&($.style.opacity=1),$}qr(o,"showTooltip");function l(P){P.parentNode&&P.parentNode.removeChild(P)}qr(l,"rm");function c(P){P.parentNode&&(P.style.opacity==null&&l(P),P.style.opacity=0,setTimeout(function(){l(P)},600))}qr(c,"hideTooltip");function p(P,F,V,$){var X=o(P,F,V);function J(){n.off($,"mouseout",J),X&&(c(X),X=null)}qr(J,"hide");var ee=setInterval(function(){if(X)for(var Q=$;;Q=Q.parentNode){if(Q&&Q.nodeType==11&&(Q=Q.host),Q==document.body)return;if(!Q){J();break}}if(!X)return clearInterval(ee)},400);n.on($,"mouseout",J)}qr(p,"showTooltipFor");function d(P,F,V){this.marked=[],F instanceof Function&&(F={getAnnotations:F}),(!F||F===!0)&&(F={}),this.options={},this.linterOptions=F.options||{};for(var $ in m)this.options[$]=m[$];for(var $ in F)m.hasOwnProperty($)?F[$]!=null&&(this.options[$]=F[$]):F.options||(this.linterOptions[$]=F[$]);this.timeout=null,this.hasGutter=V,this.onMouseOver=function(X){j(P,X)},this.waitingFor=0}qr(d,"LintState");var m={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function b(P){var F=P.state.lint;F.hasGutter&&P.clearGutter(r),F.options.highlightLines&&E(P);for(var V=0;V<F.marked.length;++V)F.marked[V].clear();F.marked.length=0}qr(b,"clearMarks");function E(P){P.eachLine(function(F){var V=F.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(F.wrapClass);V&&P.removeLineClass(F,"wrap",V[0])})}qr(E,"clearErrorLines");function y(P,F,V,$,X){var J=document.createElement("div"),ee=J;return J.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+V,$&&(ee=J.appendChild(document.createElement("div")),ee.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),X!=!1&&n.on(ee,"mouseover",function(Q){p(P,Q,F,ee)}),J}qr(y,"makeMarker");function x(P,F){return P=="error"?P:F}qr(x,"getMaxSeverity");function w(P){for(var F=[],V=0;V<P.length;++V){var $=P[V],X=$.from.line;(F[X]||(F[X]=[])).push($)}return F}qr(w,"groupByLine");function k(P){var F=P.severity;F||(F="error");var V=document.createElement("div");return V.className="CodeMirror-lint-message CodeMirror-lint-message-"+F,typeof P.messageHTML<"u"?V.innerHTML=P.messageHTML:V.appendChild(document.createTextNode(P.message)),V}qr(k,"annotationTooltip");function N(P,F){var V=P.state.lint,$=++V.waitingFor;function X(){$=-1,P.off("change",X)}qr(X,"abort"),P.on("change",X),F(P.getValue(),function(J,ee){P.off("change",X),V.waitingFor==$&&(ee&&J instanceof n&&(J=ee),P.operation(function(){A(P,J)}))},V.linterOptions,P)}qr(N,"lintAsync");function D(P){var F=P.state.lint;if(F){var V=F.options,$=V.getAnnotations||P.getHelper(n.Pos(0,0),"lint");if($)if(V.async||$.async)N(P,$);else{var X=$(P.getValue(),F.linterOptions,P);if(!X)return;X.then?X.then(function(J){P.operation(function(){A(P,J)})}):P.operation(function(){A(P,X)})}}}qr(D,"startLinting");function A(P,F){var V=P.state.lint;if(V){var $=V.options;b(P);for(var X=w(F),J=0;J<X.length;++J){var ee=X[J];if(ee){var Q=[];ee=ee.filter(function(Z){return Q.indexOf(Z.message)>-1?!1:Q.push(Z.message)});for(var B=null,ne=V.hasGutter&&document.createDocumentFragment(),re=0;re<ee.length;++re){var se=ee[re],fe=se.severity;fe||(fe="error"),B=x(B,fe),$.formatAnnotation&&(se=$.formatAnnotation(se)),V.hasGutter&&ne.appendChild(k(se)),se.to&&V.marked.push(P.markText(se.from,se.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+fe,__annotation:se}))}V.hasGutter&&P.setGutterMarker(J,r,y(P,ne,B,X[J].length>1,$.tooltips)),$.highlightLines&&P.addLineClass(J,"wrap",i+B)}}$.onUpdateLinting&&$.onUpdateLinting(F,X,P)}}qr(A,"updateLinting");function C(P){var F=P.state.lint;F&&(clearTimeout(F.timeout),F.timeout=setTimeout(function(){D(P)},F.options.delay))}qr(C,"onChange");function M(P,F,V){for(var $=V.target||V.srcElement,X=document.createDocumentFragment(),J=0;J<F.length;J++){var ee=F[J];X.appendChild(k(ee))}p(P,V,X,$)}qr(M,"popupTooltips");function j(P,F){var V=F.target||F.srcElement;if(/\bCodeMirror-lint-mark-/.test(V.className)){for(var $=V.getBoundingClientRect(),X=($.left+$.right)/2,J=($.top+$.bottom)/2,ee=P.findMarksAt(P.coordsChar({left:X,top:J},"client")),Q=[],B=0;B<ee.length;++B){var ne=ee[B].__annotation;ne&&Q.push(ne)}Q.length&&M(P,Q,F)}}qr(j,"onMouseOver"),n.defineOption("lint",!1,function(P,F,V){if(V&&V!=n.Init&&(b(P),P.state.lint.options.lintOnChange!==!1&&P.off("change",C),n.off(P.getWrapperElement(),"mouseover",P.state.lint.onMouseOver),clearTimeout(P.state.lint.timeout),delete P.state.lint),F){for(var $=P.getOption("gutters"),X=!1,J=0;J<$.length;++J)$[J]==r&&(X=!0);var ee=P.state.lint=new d(P,F,X);ee.options.lintOnChange&&P.on("change",C),ee.options.tooltips!=!1&&ee.options.tooltips!="gutter"&&n.on(P.getWrapperElement(),"mouseover",ee.onMouseOver),D(P)}}),n.defineExtension("performLint",function(){D(this)})})})();var ZP=gre.exports;const vre=Object.freeze(Object.defineProperty({__proto__:null,l:XP({__proto__:null,default:fo(ZP)},[ZP])},Symbol.toStringTag,{value:"Module"}));var yre=Object.defineProperty,Li=(e,t)=>yre(e,"name",{value:t,configurable:!0}),bre={exports:{}},JP;function n1(){return JP||(JP=1,function(e,t){(function(n){n(Qi())})(function(n){var r=n.Pos;function i(D){var A=D.flags;return A??(D.ignoreCase?"i":"")+(D.global?"g":"")+(D.multiline?"m":"")}Li(i,"regexpFlags");function o(D,A){for(var C=i(D),M=C,j=0;j<A.length;j++)M.indexOf(A.charAt(j))==-1&&(M+=A.charAt(j));return C==M?D:new RegExp(D.source,M)}Li(o,"ensureFlags");function l(D){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(D.source)}Li(l,"maybeMultiline");function c(D,A,C){A=o(A,"g");for(var M=C.line,j=C.ch,P=D.lastLine();M<=P;M++,j=0){A.lastIndex=j;var F=D.getLine(M),V=A.exec(F);if(V)return{from:r(M,V.index),to:r(M,V.index+V[0].length),match:V}}}Li(c,"searchRegexpForward");function p(D,A,C){if(!l(A))return c(D,A,C);A=o(A,"gm");for(var M,j=1,P=C.line,F=D.lastLine();P<=F;){for(var V=0;V<j&&!(P>F);V++){var $=D.getLine(P++);M=M==null?$:M+`
`+$}j=j*2,A.lastIndex=C.ch;var X=A.exec(M);if(X){var J=M.slice(0,X.index).split(`
`),ee=X[0].split(`
`),Q=C.line+J.length-1,B=J[J.length-1].length;return{from:r(Q,B),to:r(Q+ee.length-1,ee.length==1?B+ee[0].length:ee[ee.length-1].length),match:X}}}}Li(p,"searchRegexpForwardMultiline");function d(D,A,C){for(var M,j=0;j<=D.length;){A.lastIndex=j;var P=A.exec(D);if(!P)break;var F=P.index+P[0].length;if(F>D.length-C)break;(!M||F>M.index+M[0].length)&&(M=P),j=P.index+1}return M}Li(d,"lastMatchIn");function m(D,A,C){A=o(A,"g");for(var M=C.line,j=C.ch,P=D.firstLine();M>=P;M--,j=-1){var F=D.getLine(M),V=d(F,A,j<0?0:F.length-j);if(V)return{from:r(M,V.index),to:r(M,V.index+V[0].length),match:V}}}Li(m,"searchRegexpBackward");function b(D,A,C){if(!l(A))return m(D,A,C);A=o(A,"gm");for(var M,j=1,P=D.getLine(C.line).length-C.ch,F=C.line,V=D.firstLine();F>=V;){for(var $=0;$<j&&F>=V;$++){var X=D.getLine(F--);M=M==null?X:X+`
`+M}j*=2;var J=d(M,A,P);if(J){var ee=M.slice(0,J.index).split(`
`),Q=J[0].split(`
`),B=F+ee.length,ne=ee[ee.length-1].length;return{from:r(B,ne),to:r(B+Q.length-1,Q.length==1?ne+Q[0].length:Q[Q.length-1].length),match:J}}}}Li(b,"searchRegexpBackwardMultiline");var E,y;String.prototype.normalize?(E=Li(function(D){return D.normalize("NFD").toLowerCase()},"doFold"),y=Li(function(D){return D.normalize("NFD")},"noFold")):(E=Li(function(D){return D.toLowerCase()},"doFold"),y=Li(function(D){return D},"noFold"));function x(D,A,C,M){if(D.length==A.length)return C;for(var j=0,P=C+Math.max(0,D.length-A.length);;){if(j==P)return j;var F=j+P>>1,V=M(D.slice(0,F)).length;if(V==C)return F;V>C?P=F:j=F+1}}Li(x,"adjustPos");function w(D,A,C,M){if(!A.length)return null;var j=M?E:y,P=j(A).split(/\r|\n\r?/);e:for(var F=C.line,V=C.ch,$=D.lastLine()+1-P.length;F<=$;F++,V=0){var X=D.getLine(F).slice(V),J=j(X);if(P.length==1){var ee=J.indexOf(P[0]);if(ee==-1)continue e;var C=x(X,J,ee,j)+V;return{from:r(F,x(X,J,ee,j)+V),to:r(F,x(X,J,ee+P[0].length,j)+V)}}else{var Q=J.length-P[0].length;if(J.slice(Q)!=P[0])continue e;for(var B=1;B<P.length-1;B++)if(j(D.getLine(F+B))!=P[B])continue e;var ne=D.getLine(F+P.length-1),re=j(ne),se=P[P.length-1];if(re.slice(0,se.length)!=se)continue e;return{from:r(F,x(X,J,Q,j)+V),to:r(F+P.length-1,x(ne,re,se.length,j))}}}}Li(w,"searchStringForward");function k(D,A,C,M){if(!A.length)return null;var j=M?E:y,P=j(A).split(/\r|\n\r?/);e:for(var F=C.line,V=C.ch,$=D.firstLine()-1+P.length;F>=$;F--,V=-1){var X=D.getLine(F);V>-1&&(X=X.slice(0,V));var J=j(X);if(P.length==1){var ee=J.lastIndexOf(P[0]);if(ee==-1)continue e;return{from:r(F,x(X,J,ee,j)),to:r(F,x(X,J,ee+P[0].length,j))}}else{var Q=P[P.length-1];if(J.slice(0,Q.length)!=Q)continue e;for(var B=1,C=F-P.length+1;B<P.length-1;B++)if(j(D.getLine(C+B))!=P[B])continue e;var ne=D.getLine(F+1-P.length),re=j(ne);if(re.slice(re.length-P[0].length)!=P[0])continue e;return{from:r(F+1-P.length,x(ne,re,ne.length-P[0].length,j)),to:r(F,x(X,J,Q.length,j))}}}}Li(k,"searchStringBackward");function N(D,A,C,M){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=D,C=C?D.clipPos(C):r(0,0),this.pos={from:C,to:C};var j;typeof M=="object"?j=M.caseFold:(j=M,M=null),typeof A=="string"?(j==null&&(j=!1),this.matches=function(P,F){return(P?k:w)(D,A,F,j)}):(A=o(A,"gm"),!M||M.multiline!==!1?this.matches=function(P,F){return(P?b:p)(D,A,F)}:this.matches=function(P,F){return(P?m:c)(D,A,F)})}Li(N,"SearchCursor"),N.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(D){var A=this.doc.clipPos(D?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(A=r(A.line,A.ch),D?(A.ch--,A.ch<0&&(A.line--,A.ch=(this.doc.getLine(A.line)||"").length)):(A.ch++,A.ch>(this.doc.getLine(A.line)||"").length&&(A.ch=0,A.line++)),n.cmpPos(A,this.doc.clipPos(A))!=0))return this.atOccurrence=!1;var C=this.matches(D,A);if(this.afterEmptyMatch=C&&n.cmpPos(C.from,C.to)==0,C)return this.pos=C,this.atOccurrence=!0,this.pos.match||!0;var M=r(D?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:M,to:M},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(D,A){if(this.atOccurrence){var C=n.splitLines(D);this.doc.replaceRange(C,this.pos.from,this.pos.to,A),this.pos.to=r(this.pos.from.line+C.length-1,C[C.length-1].length+(C.length==1?this.pos.from.ch:0))}}},n.defineExtension("getSearchCursor",function(D,A,C){return new N(this.doc,D,A,C)}),n.defineDocExtension("getSearchCursor",function(D,A,C){return new N(this,D,A,C)}),n.defineExtension("selectMatches",function(D,A){for(var C=[],M=this.getSearchCursor(D,this.getCursor("from"),A);M.findNext()&&!(n.cmpPos(M.to(),this.getCursor("to"))>0);)C.push({anchor:M.from(),head:M.to()});C.length&&this.setSelections(C,0)})})}()),bre.exports}Li(n1,"requireSearchcursor");var Ere=Object.defineProperty,Sre=(e,t)=>Ere(e,"name",{value:t,configurable:!0});function e4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Sre(e4,"_mergeNamespaces");var t4=n1();const n4=Object.freeze(Object.defineProperty({__proto__:null,s:e4({__proto__:null,default:fo(t4)},[t4])},Symbol.toStringTag,{value:"Module"}));var Tre=Object.defineProperty,Dp=(e,t)=>Tre(e,"name",{value:t,configurable:!0});function r4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Dp(r4,"_mergeNamespaces");var xre={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){function r(o,l,c){var p=o.getWrapperElement(),d;return d=p.appendChild(document.createElement("div")),c?d.className="CodeMirror-dialog CodeMirror-dialog-bottom":d.className="CodeMirror-dialog CodeMirror-dialog-top",typeof l=="string"?d.innerHTML=l:d.appendChild(l),n.addClass(p,"dialog-opened"),d}Dp(r,"dialogDiv");function i(o,l){o.state.currentNotificationClose&&o.state.currentNotificationClose(),o.state.currentNotificationClose=l}Dp(i,"closeNotification"),n.defineExtension("openDialog",function(o,l,c){c||(c={}),i(this,null);var p=r(this,o,c.bottom),d=!1,m=this;function b(x){if(typeof x=="string")E.value=x;else{if(d)return;d=!0,n.rmClass(p.parentNode,"dialog-opened"),p.parentNode.removeChild(p),m.focus(),c.onClose&&c.onClose(p)}}Dp(b,"close");var E=p.getElementsByTagName("input")[0],y;return E?(E.focus(),c.value&&(E.value=c.value,c.selectValueOnOpen!==!1&&E.select()),c.onInput&&n.on(E,"input",function(x){c.onInput(x,E.value,b)}),c.onKeyUp&&n.on(E,"keyup",function(x){c.onKeyUp(x,E.value,b)}),n.on(E,"keydown",function(x){c&&c.onKeyDown&&c.onKeyDown(x,E.value,b)||((x.keyCode==27||c.closeOnEnter!==!1&&x.keyCode==13)&&(E.blur(),n.e_stop(x),b()),x.keyCode==13&&l(E.value,x))}),c.closeOnBlur!==!1&&n.on(p,"focusout",function(x){x.relatedTarget!==null&&b()})):(y=p.getElementsByTagName("button")[0])&&(n.on(y,"click",function(){b(),m.focus()}),c.closeOnBlur!==!1&&n.on(y,"blur",b),y.focus()),b}),n.defineExtension("openConfirm",function(o,l,c){i(this,null);var p=r(this,o,c&&c.bottom),d=p.getElementsByTagName("button"),m=!1,b=this,E=1;function y(){m||(m=!0,n.rmClass(p.parentNode,"dialog-opened"),p.parentNode.removeChild(p),b.focus())}Dp(y,"close"),d[0].focus();for(var x=0;x<d.length;++x){var w=d[x];(function(k){n.on(w,"click",function(N){n.e_preventDefault(N),y(),k&&k(b)})})(l[x]),n.on(w,"blur",function(){--E,setTimeout(function(){E<=0&&y()},200)}),n.on(w,"focus",function(){++E})}}),n.defineExtension("openNotification",function(o,l){i(this,b);var c=r(this,o,l&&l.bottom),p=!1,d,m=l&&typeof l.duration<"u"?l.duration:5e3;function b(){p||(p=!0,clearTimeout(d),n.rmClass(c.parentNode,"dialog-opened"),c.parentNode.removeChild(c))}return Dp(b,"close"),n.on(c,"click",function(E){n.e_preventDefault(E),b()}),m&&(d=setTimeout(b,m)),b})})})();var xg=xre.exports;const i4=Object.freeze(Object.defineProperty({__proto__:null,a:xg,d:r4({__proto__:null,default:fo(xg)},[xg])},Symbol.toStringTag,{value:"Module"}));var wre=Object.defineProperty,r1=(e,t)=>wre(e,"name",{value:t,configurable:!0});function o4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}r1(o4,"_mergeNamespaces");var Cre={exports:{}};(function(e,t){(function(n){n(Qi(),xg)})(function(n){n.defineOption("search",{bottom:!1});function r(l,c,p,d,m){l.openDialog?l.openDialog(c,m,{value:d,selectValueOnOpen:!0,bottom:l.options.search.bottom}):m(prompt(p,d))}r1(r,"dialog");function i(l){return l.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+l.phrase("(Use line:column or scroll% syntax)")+"</span>"}r1(i,"getJumpDialog");function o(l,c){var p=Number(c);return/^[-+]/.test(c)?l.getCursor().line+p:p-1}r1(o,"interpretLine"),n.commands.jumpToLine=function(l){var c=l.getCursor();r(l,i(l),l.phrase("Jump to line:"),c.line+1+":"+c.ch,function(p){if(p){var d;if(d=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(p))l.setCursor(o(l,d[1]),Number(d[2]));else if(d=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(p)){var m=Math.round(l.lineCount()*Number(d[1])/100);/^[-+]/.test(d[1])&&(m=c.line+m+1),l.setCursor(m-1,c.ch)}else(d=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(p))&&l.setCursor(o(l,d[1]),c.ch)}})},n.keyMap.default["Alt-G"]="jumpToLine"})})();var a4=Cre.exports;const s4=Object.freeze(Object.defineProperty({__proto__:null,j:o4({__proto__:null,default:fo(a4)},[a4])},Symbol.toStringTag,{value:"Module"}));var _re=Object.defineProperty,Wo=(e,t)=>_re(e,"name",{value:t,configurable:!0});function l4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Wo(l4,"_mergeNamespaces");var Nre={exports:{}};(function(e,t){(function(n){n(Qi(),n1(),GC())})(function(n){var r=n.commands,i=n.Pos;function o(C,M,j){if(j<0&&M.ch==0)return C.clipPos(i(M.line-1));var P=C.getLine(M.line);if(j>0&&M.ch>=P.length)return C.clipPos(i(M.line+1,0));for(var F="start",V,$=M.ch,X=$,J=j<0?0:P.length,ee=0;X!=J;X+=j,ee++){var Q=P.charAt(j<0?X-1:X),B=Q!="_"&&n.isWordChar(Q)?"w":"o";if(B=="w"&&Q.toUpperCase()==Q&&(B="W"),F=="start")B!="o"?(F="in",V=B):$=X+j;else if(F=="in"&&V!=B){if(V=="w"&&B=="W"&&j<0&&X--,V=="W"&&B=="w"&&j>0)if(X==$+1){V="w";continue}else X--;break}}return i(M.line,X)}Wo(o,"findPosSubword");function l(C,M){C.extendSelectionsBy(function(j){return C.display.shift||C.doc.extend||j.empty()?o(C.doc,j.head,M):M<0?j.from():j.to()})}Wo(l,"moveSubword"),r.goSubwordLeft=function(C){l(C,-1)},r.goSubwordRight=function(C){l(C,1)},r.scrollLineUp=function(C){var M=C.getScrollInfo();if(!C.somethingSelected()){var j=C.lineAtHeight(M.top+M.clientHeight,"local");C.getCursor().line>=j&&C.execCommand("goLineUp")}C.scrollTo(null,M.top-C.defaultTextHeight())},r.scrollLineDown=function(C){var M=C.getScrollInfo();if(!C.somethingSelected()){var j=C.lineAtHeight(M.top,"local")+1;C.getCursor().line<=j&&C.execCommand("goLineDown")}C.scrollTo(null,M.top+C.defaultTextHeight())},r.splitSelectionByLine=function(C){for(var M=C.listSelections(),j=[],P=0;P<M.length;P++)for(var F=M[P].from(),V=M[P].to(),$=F.line;$<=V.line;++$)V.line>F.line&&$==V.line&&V.ch==0||j.push({anchor:$==F.line?F:i($,0),head:$==V.line?V:i($)});C.setSelections(j,0)},r.singleSelectionTop=function(C){var M=C.listSelections()[0];C.setSelection(M.anchor,M.head,{scroll:!1})},r.selectLine=function(C){for(var M=C.listSelections(),j=[],P=0;P<M.length;P++){var F=M[P];j.push({anchor:i(F.from().line,0),head:i(F.to().line+1,0)})}C.setSelections(j)};function c(C,M){if(C.isReadOnly())return n.Pass;C.operation(function(){for(var j=C.listSelections().length,P=[],F=-1,V=0;V<j;V++){var $=C.listSelections()[V].head;if(!($.line<=F)){var X=i($.line+(M?0:1),0);C.replaceRange(`
`,X,null,"+insertLine"),C.indentLine(X.line,null,!0),P.push({head:X,anchor:X}),F=$.line+1}}C.setSelections(P)}),C.execCommand("indentAuto")}Wo(c,"insertLine"),r.insertLineAfter=function(C){return c(C,!1)},r.insertLineBefore=function(C){return c(C,!0)};function p(C,M){for(var j=M.ch,P=j,F=C.getLine(M.line);j&&n.isWordChar(F.charAt(j-1));)--j;for(;P<F.length&&n.isWordChar(F.charAt(P));)++P;return{from:i(M.line,j),to:i(M.line,P),word:F.slice(j,P)}}Wo(p,"wordAt"),r.selectNextOccurrence=function(C){var M=C.getCursor("from"),j=C.getCursor("to"),P=C.state.sublimeFindFullWord==C.doc.sel;if(n.cmpPos(M,j)==0){var F=p(C,M);if(!F.word)return;C.setSelection(F.from,F.to),P=!0}else{var V=C.getRange(M,j),$=P?new RegExp("\\b"+V+"\\b"):V,X=C.getSearchCursor($,j),J=X.findNext();if(J||(X=C.getSearchCursor($,i(C.firstLine(),0)),J=X.findNext()),!J||m(C.listSelections(),X.from(),X.to()))return;C.addSelection(X.from(),X.to())}P&&(C.state.sublimeFindFullWord=C.doc.sel)},r.skipAndSelectNextOccurrence=function(C){var M=C.getCursor("anchor"),j=C.getCursor("head");r.selectNextOccurrence(C),n.cmpPos(M,j)!=0&&C.doc.setSelections(C.doc.listSelections().filter(function(P){return P.anchor!=M||P.head!=j}))};function d(C,M){for(var j=C.listSelections(),P=[],F=0;F<j.length;F++){var V=j[F],$=C.findPosV(V.anchor,M,"line",V.anchor.goalColumn),X=C.findPosV(V.head,M,"line",V.head.goalColumn);$.goalColumn=V.anchor.goalColumn!=null?V.anchor.goalColumn:C.cursorCoords(V.anchor,"div").left,X.goalColumn=V.head.goalColumn!=null?V.head.goalColumn:C.cursorCoords(V.head,"div").left;var J={anchor:$,head:X};P.push(V),P.push(J)}C.setSelections(P)}Wo(d,"addCursorToSelection"),r.addCursorToPrevLine=function(C){d(C,-1)},r.addCursorToNextLine=function(C){d(C,1)};function m(C,M,j){for(var P=0;P<C.length;P++)if(n.cmpPos(C[P].from(),M)==0&&n.cmpPos(C[P].to(),j)==0)return!0;return!1}Wo(m,"isSelectedRange");var b="(){}[]";function E(C){for(var M=C.listSelections(),j=[],P=0;P<M.length;P++){var F=M[P],V=F.head,$=C.scanForBracket(V,-1);if(!$)return!1;for(;;){var X=C.scanForBracket(V,1);if(!X)return!1;if(X.ch==b.charAt(b.indexOf($.ch)+1)){var J=i($.pos.line,$.pos.ch+1);if(n.cmpPos(J,F.from())==0&&n.cmpPos(X.pos,F.to())==0){if($=C.scanForBracket($.pos,-1),!$)return!1}else{j.push({anchor:J,head:X.pos});break}}V=i(X.pos.line,X.pos.ch+1)}}return C.setSelections(j),!0}Wo(E,"selectBetweenBrackets"),r.selectScope=function(C){E(C)||C.execCommand("selectAll")},r.selectBetweenBrackets=function(C){if(!E(C))return n.Pass};function y(C){return C?/\bpunctuation\b/.test(C)?C:void 0:null}Wo(y,"puncType"),r.goToBracket=function(C){C.extendSelectionsBy(function(M){var j=C.scanForBracket(M.head,1,y(C.getTokenTypeAt(M.head)));if(j&&n.cmpPos(j.pos,M.head)!=0)return j.pos;var P=C.scanForBracket(M.head,-1,y(C.getTokenTypeAt(i(M.head.line,M.head.ch+1))));return P&&i(P.pos.line,P.pos.ch+1)||M.head})},r.swapLineUp=function(C){if(C.isReadOnly())return n.Pass;for(var M=C.listSelections(),j=[],P=C.firstLine()-1,F=[],V=0;V<M.length;V++){var $=M[V],X=$.from().line-1,J=$.to().line;F.push({anchor:i($.anchor.line-1,$.anchor.ch),head:i($.head.line-1,$.head.ch)}),$.to().ch==0&&!$.empty()&&--J,X>P?j.push(X,J):j.length&&(j[j.length-1]=J),P=J}C.operation(function(){for(var ee=0;ee<j.length;ee+=2){var Q=j[ee],B=j[ee+1],ne=C.getLine(Q);C.replaceRange("",i(Q,0),i(Q+1,0),"+swapLine"),B>C.lastLine()?C.replaceRange(`
`+ne,i(C.lastLine()),null,"+swapLine"):C.replaceRange(ne+`
`,i(B,0),null,"+swapLine")}C.setSelections(F),C.scrollIntoView()})},r.swapLineDown=function(C){if(C.isReadOnly())return n.Pass;for(var M=C.listSelections(),j=[],P=C.lastLine()+1,F=M.length-1;F>=0;F--){var V=M[F],$=V.to().line+1,X=V.from().line;V.to().ch==0&&!V.empty()&&$--,$<P?j.push($,X):j.length&&(j[j.length-1]=X),P=X}C.operation(function(){for(var J=j.length-2;J>=0;J-=2){var ee=j[J],Q=j[J+1],B=C.getLine(ee);ee==C.lastLine()?C.replaceRange("",i(ee-1),i(ee),"+swapLine"):C.replaceRange("",i(ee,0),i(ee+1,0),"+swapLine"),C.replaceRange(B+`
`,i(Q,0),null,"+swapLine")}C.scrollIntoView()})},r.toggleCommentIndented=function(C){C.toggleComment({indent:!0})},r.joinLines=function(C){for(var M=C.listSelections(),j=[],P=0;P<M.length;P++){for(var F=M[P],V=F.from(),$=V.line,X=F.to().line;P<M.length-1&&M[P+1].from().line==X;)X=M[++P].to().line;j.push({start:$,end:X,anchor:!F.empty()&&V})}C.operation(function(){for(var J=0,ee=[],Q=0;Q<j.length;Q++){for(var B=j[Q],ne=B.anchor&&i(B.anchor.line-J,B.anchor.ch),re,se=B.start;se<=B.end;se++){var fe=se-J;se==B.end&&(re=i(fe,C.getLine(fe).length+1)),fe<C.lastLine()&&(C.replaceRange(" ",i(fe),i(fe+1,/^\s*/.exec(C.getLine(fe+1))[0].length)),++J)}ee.push({anchor:ne||re,head:re})}C.setSelections(ee,0)})},r.duplicateLine=function(C){C.operation(function(){for(var M=C.listSelections().length,j=0;j<M;j++){var P=C.listSelections()[j];P.empty()?C.replaceRange(C.getLine(P.head.line)+`
`,i(P.head.line,0)):C.replaceRange(C.getRange(P.from(),P.to()),P.from())}C.scrollIntoView()})};function x(C,M,j){if(C.isReadOnly())return n.Pass;for(var P=C.listSelections(),F=[],V,$=0;$<P.length;$++){var X=P[$];if(!X.empty()){for(var J=X.from().line,ee=X.to().line;$<P.length-1&&P[$+1].from().line==ee;)ee=P[++$].to().line;P[$].to().ch||ee--,F.push(J,ee)}}F.length?V=!0:F.push(C.firstLine(),C.lastLine()),C.operation(function(){for(var Q=[],B=0;B<F.length;B+=2){var ne=F[B],re=F[B+1],se=i(ne,0),fe=i(re),Z=C.getRange(se,fe,!1);M?Z.sort(function(ge,ae){return ge<ae?-j:ge==ae?0:j}):Z.sort(function(ge,ae){var pe=ge.toUpperCase(),ce=ae.toUpperCase();return pe!=ce&&(ge=pe,ae=ce),ge<ae?-j:ge==ae?0:j}),C.replaceRange(Z,se,fe),V&&Q.push({anchor:se,head:i(re+1,0)})}V&&C.setSelections(Q,0)})}Wo(x,"sortLines"),r.sortLines=function(C){x(C,!0,1)},r.reverseSortLines=function(C){x(C,!0,-1)},r.sortLinesInsensitive=function(C){x(C,!1,1)},r.reverseSortLinesInsensitive=function(C){x(C,!1,-1)},r.nextBookmark=function(C){var M=C.state.sublimeBookmarks;if(M)for(;M.length;){var j=M.shift(),P=j.find();if(P)return M.push(j),C.setSelection(P.from,P.to)}},r.prevBookmark=function(C){var M=C.state.sublimeBookmarks;if(M)for(;M.length;){M.unshift(M.pop());var j=M[M.length-1].find();if(!j)M.pop();else return C.setSelection(j.from,j.to)}},r.toggleBookmark=function(C){for(var M=C.listSelections(),j=C.state.sublimeBookmarks||(C.state.sublimeBookmarks=[]),P=0;P<M.length;P++){for(var F=M[P].from(),V=M[P].to(),$=M[P].empty()?C.findMarksAt(F):C.findMarks(F,V),X=0;X<$.length;X++)if($[X].sublimeBookmark){$[X].clear();for(var J=0;J<j.length;J++)j[J]==$[X]&&j.splice(J--,1);break}X==$.length&&j.push(C.markText(F,V,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},r.clearBookmarks=function(C){var M=C.state.sublimeBookmarks;if(M)for(var j=0;j<M.length;j++)M[j].clear();M.length=0},r.selectBookmarks=function(C){var M=C.state.sublimeBookmarks,j=[];if(M)for(var P=0;P<M.length;P++){var F=M[P].find();F?j.push({anchor:F.from,head:F.to}):M.splice(P--,0)}j.length&&C.setSelections(j,0)};function w(C,M){C.operation(function(){for(var j=C.listSelections(),P=[],F=[],V=0;V<j.length;V++){var $=j[V];$.empty()?(P.push(V),F.push("")):F.push(M(C.getRange($.from(),$.to())))}C.replaceSelections(F,"around","case");for(var V=P.length-1,X;V>=0;V--){var $=j[P[V]];if(!(X&&n.cmpPos($.head,X)>0)){var J=p(C,$.head);X=J.from,C.replaceRange(M(J.word),J.from,J.to)}}})}Wo(w,"modifyWordOrSelection"),r.smartBackspace=function(C){if(C.somethingSelected())return n.Pass;C.operation(function(){for(var M=C.listSelections(),j=C.getOption("indentUnit"),P=M.length-1;P>=0;P--){var F=M[P].head,V=C.getRange({line:F.line,ch:0},F),$=n.countColumn(V,null,C.getOption("tabSize")),X=C.findPosH(F,-1,"char",!1);if(V&&!/\S/.test(V)&&$%j==0){var J=new i(F.line,n.findColumn(V,$-j,j));J.ch!=F.ch&&(X=J)}C.replaceRange("",X,F,"+delete")}})},r.delLineRight=function(C){C.operation(function(){for(var M=C.listSelections(),j=M.length-1;j>=0;j--)C.replaceRange("",M[j].anchor,i(M[j].to().line),"+delete");C.scrollIntoView()})},r.upcaseAtCursor=function(C){w(C,function(M){return M.toUpperCase()})},r.downcaseAtCursor=function(C){w(C,function(M){return M.toLowerCase()})},r.setSublimeMark=function(C){C.state.sublimeMark&&C.state.sublimeMark.clear(),C.state.sublimeMark=C.setBookmark(C.getCursor())},r.selectToSublimeMark=function(C){var M=C.state.sublimeMark&&C.state.sublimeMark.find();M&&C.setSelection(C.getCursor(),M)},r.deleteToSublimeMark=function(C){var M=C.state.sublimeMark&&C.state.sublimeMark.find();if(M){var j=C.getCursor(),P=M;if(n.cmpPos(j,P)>0){var F=P;P=j,j=F}C.state.sublimeKilled=C.getRange(j,P),C.replaceRange("",j,P)}},r.swapWithSublimeMark=function(C){var M=C.state.sublimeMark&&C.state.sublimeMark.find();M&&(C.state.sublimeMark.clear(),C.state.sublimeMark=C.setBookmark(C.getCursor()),C.setCursor(M))},r.sublimeYank=function(C){C.state.sublimeKilled!=null&&C.replaceSelection(C.state.sublimeKilled,null,"paste")},r.showInCenter=function(C){var M=C.cursorCoords(null,"local");C.scrollTo(null,(M.top+M.bottom)/2-C.getScrollInfo().clientHeight/2)};function k(C){var M=C.getCursor("from"),j=C.getCursor("to");if(n.cmpPos(M,j)==0){var P=p(C,M);if(!P.word)return;M=P.from,j=P.to}return{from:M,to:j,query:C.getRange(M,j),word:P}}Wo(k,"getTarget");function N(C,M){var j=k(C);if(j){var P=j.query,F=C.getSearchCursor(P,M?j.to:j.from);(M?F.findNext():F.findPrevious())?C.setSelection(F.from(),F.to()):(F=C.getSearchCursor(P,M?i(C.firstLine(),0):C.clipPos(i(C.lastLine()))),(M?F.findNext():F.findPrevious())?C.setSelection(F.from(),F.to()):j.word&&C.setSelection(j.from,j.to))}}Wo(N,"findAndGoTo"),r.findUnder=function(C){N(C,!0)},r.findUnderPrevious=function(C){N(C,!1)},r.findAllUnder=function(C){var M=k(C);if(M){for(var j=C.getSearchCursor(M.query),P=[],F=-1;j.findNext();)P.push({anchor:j.from(),head:j.to()}),j.from().line<=M.from.line&&j.from().ch<=M.from.ch&&F++;C.setSelections(P,F)}};var D=n.keyMap;D.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},n.normalizeKeyMap(D.macSublime),D.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},n.normalizeKeyMap(D.pcSublime);var A=D.default==D.macDefault;D.sublime=A?D.macSublime:D.pcSublime})})();var u4=Nre.exports;const c4=Object.freeze(Object.defineProperty({__proto__:null,s:l4({__proto__:null,default:fo(u4)},[u4])},Symbol.toStringTag,{value:"Module"}));var Are=Object.defineProperty,Xe=(e,t)=>Are(e,"name",{value:t,configurable:!0});function f4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Xe(f4,"_mergeNamespaces");var Ore={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){n.defineMode("javascript",function(r,i){var o=r.indentUnit,l=i.statementIndent,c=i.jsonld,p=i.json||c,d=i.trackScope!==!1,m=i.typescript,b=i.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function W(_r){return{type:_r,style:"keyword"}}Xe(W,"kw");var ue=W("keyword a"),Fe=W("keyword b"),We=W("keyword c"),St=W("keyword d"),en=W("operator"),st={type:"atom",style:"atom"};return{if:W("if"),while:ue,with:ue,else:Fe,do:Fe,try:Fe,finally:Fe,return:St,break:St,continue:St,new:W("new"),delete:We,void:We,throw:We,debugger:W("debugger"),var:W("var"),const:W("var"),let:W("var"),function:W("function"),catch:W("catch"),for:W("for"),switch:W("switch"),case:W("case"),default:W("default"),in:en,typeof:en,instanceof:en,true:st,false:st,null:st,undefined:st,NaN:st,Infinity:st,this:W("this"),class:W("class"),super:W("atom"),yield:We,export:W("export"),import:W("import"),extends:We,await:We}}(),y=/[+\-*&%=<>!?|~^@]/,x=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(W){for(var ue=!1,Fe,We=!1;(Fe=W.next())!=null;){if(!ue){if(Fe=="/"&&!We)return;Fe=="["?We=!0:We&&Fe=="]"&&(We=!1)}ue=!ue&&Fe=="\\"}}Xe(w,"readRegexp");var k,N;function D(W,ue,Fe){return k=W,N=Fe,ue}Xe(D,"ret");function A(W,ue){var Fe=W.next();if(Fe=='"'||Fe=="'")return ue.tokenize=C(Fe),ue.tokenize(W,ue);if(Fe=="."&&W.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(Fe=="."&&W.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Fe))return D(Fe);if(Fe=="="&&W.eat(">"))return D("=>","operator");if(Fe=="0"&&W.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(Fe))return W.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(Fe=="/")return W.eat("*")?(ue.tokenize=M,M(W,ue)):W.eat("/")?(W.skipToEnd(),D("comment","comment")):ze(W,ue,1)?(w(W),W.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(W.eat("="),D("operator","operator",W.current()));if(Fe=="`")return ue.tokenize=j,j(W,ue);if(Fe=="#"&&W.peek()=="!")return W.skipToEnd(),D("meta","meta");if(Fe=="#"&&W.eatWhile(b))return D("variable","property");if(Fe=="<"&&W.match("!--")||Fe=="-"&&W.match("->")&&!/\S/.test(W.string.slice(0,W.start)))return W.skipToEnd(),D("comment","comment");if(y.test(Fe))return(Fe!=">"||!ue.lexical||ue.lexical.type!=">")&&(W.eat("=")?(Fe=="!"||Fe=="=")&&W.eat("="):/[<>*+\-|&?]/.test(Fe)&&(W.eat(Fe),Fe==">"&&W.eat(Fe))),Fe=="?"&&W.eat(".")?D("."):D("operator","operator",W.current());if(b.test(Fe)){W.eatWhile(b);var We=W.current();if(ue.lastType!="."){if(E.propertyIsEnumerable(We)){var St=E[We];return D(St.type,St.style,We)}if(We=="async"&&W.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",We)}return D("variable","variable",We)}}Xe(A,"tokenBase");function C(W){return function(ue,Fe){var We=!1,St;if(c&&ue.peek()=="@"&&ue.match(x))return Fe.tokenize=A,D("jsonld-keyword","meta");for(;(St=ue.next())!=null&&!(St==W&&!We);)We=!We&&St=="\\";return We||(Fe.tokenize=A),D("string","string")}}Xe(C,"tokenString");function M(W,ue){for(var Fe=!1,We;We=W.next();){if(We=="/"&&Fe){ue.tokenize=A;break}Fe=We=="*"}return D("comment","comment")}Xe(M,"tokenComment");function j(W,ue){for(var Fe=!1,We;(We=W.next())!=null;){if(!Fe&&(We=="`"||We=="$"&&W.eat("{"))){ue.tokenize=A;break}Fe=!Fe&&We=="\\"}return D("quasi","string-2",W.current())}Xe(j,"tokenQuasi");var P="([{}])";function F(W,ue){ue.fatArrowAt&&(ue.fatArrowAt=null);var Fe=W.string.indexOf("=>",W.start);if(!(Fe<0)){if(m){var We=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(W.string.slice(W.start,Fe));We&&(Fe=We.index)}for(var St=0,en=!1,st=Fe-1;st>=0;--st){var _r=W.string.charAt(st),ji=P.indexOf(_r);if(ji>=0&&ji<3){if(!St){++st;break}if(--St==0){_r=="("&&(en=!0);break}}else if(ji>=3&&ji<6)++St;else if(b.test(_r))en=!0;else if(/["'\/`]/.test(_r))for(;;--st){if(st==0)return;var vs=W.string.charAt(st-1);if(vs==_r&&W.string.charAt(st-2)!="\\"){st--;break}}else if(en&&!St){++st;break}}en&&!St&&(ue.fatArrowAt=st)}}Xe(F,"findFatArrow");var V={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function $(W,ue,Fe,We,St,en){this.indented=W,this.column=ue,this.type=Fe,this.prev=St,this.info=en,We!=null&&(this.align=We)}Xe($,"JSLexical");function X(W,ue){if(!d)return!1;for(var Fe=W.localVars;Fe;Fe=Fe.next)if(Fe.name==ue)return!0;for(var We=W.context;We;We=We.prev)for(var Fe=We.vars;Fe;Fe=Fe.next)if(Fe.name==ue)return!0}Xe(X,"inScope");function J(W,ue,Fe,We,St){var en=W.cc;for(ee.state=W,ee.stream=St,ee.marked=null,ee.cc=en,ee.style=ue,W.lexical.hasOwnProperty("align")||(W.lexical.align=!0);;){var st=en.length?en.pop():p?vt:Ze;if(st(Fe,We)){for(;en.length&&en[en.length-1].lex;)en.pop()();return ee.marked?ee.marked:Fe=="variable"&&X(W,We)?"variable-2":ue}}}Xe(J,"parseJS");var ee={state:null,marked:null,cc:null};function Q(){for(var W=arguments.length-1;W>=0;W--)ee.cc.push(arguments[W])}Xe(Q,"pass");function B(){return Q.apply(null,arguments),!0}Xe(B,"cont");function ne(W,ue){for(var Fe=ue;Fe;Fe=Fe.next)if(Fe.name==W)return!0;return!1}Xe(ne,"inList");function re(W){var ue=ee.state;if(ee.marked="def",!!d){if(ue.context){if(ue.lexical.info=="var"&&ue.context&&ue.context.block){var Fe=se(W,ue.context);if(Fe!=null){ue.context=Fe;return}}else if(!ne(W,ue.localVars)){ue.localVars=new ge(W,ue.localVars);return}}i.globalVars&&!ne(W,ue.globalVars)&&(ue.globalVars=new ge(W,ue.globalVars))}}Xe(re,"register");function se(W,ue){if(ue)if(ue.block){var Fe=se(W,ue.prev);return Fe?Fe==ue.prev?ue:new Z(Fe,ue.vars,!0):null}else return ne(W,ue.vars)?ue:new Z(ue.prev,new ge(W,ue.vars),!1);else return null}Xe(se,"registerVarScoped");function fe(W){return W=="public"||W=="private"||W=="protected"||W=="abstract"||W=="readonly"}Xe(fe,"isModifier");function Z(W,ue,Fe){this.prev=W,this.vars=ue,this.block=Fe}Xe(Z,"Context");function ge(W,ue){this.name=W,this.next=ue}Xe(ge,"Var");var ae=new ge("this",new ge("arguments",null));function pe(){ee.state.context=new Z(ee.state.context,ee.state.localVars,!1),ee.state.localVars=ae}Xe(pe,"pushcontext");function ce(){ee.state.context=new Z(ee.state.context,ee.state.localVars,!0),ee.state.localVars=null}Xe(ce,"pushblockcontext"),pe.lex=ce.lex=!0;function he(){ee.state.localVars=ee.state.context.vars,ee.state.context=ee.state.context.prev}Xe(he,"popcontext"),he.lex=!0;function Se(W,ue){var Fe=Xe(function(){var We=ee.state,St=We.indented;if(We.lexical.type=="stat")St=We.lexical.indented;else for(var en=We.lexical;en&&en.type==")"&&en.align;en=en.prev)St=en.indented;We.lexical=new $(St,ee.stream.column(),W,null,We.lexical,ue)},"result");return Fe.lex=!0,Fe}Xe(Se,"pushlex");function Ie(){var W=ee.state;W.lexical.prev&&(W.lexical.type==")"&&(W.indented=W.lexical.indented),W.lexical=W.lexical.prev)}Xe(Ie,"poplex"),Ie.lex=!0;function Ge(W){function ue(Fe){return Fe==W?B():W==";"||Fe=="}"||Fe==")"||Fe=="]"?Q():B(ue)}return Xe(ue,"exp"),ue}Xe(Ge,"expect");function Ze(W,ue){return W=="var"?B(Se("vardef",ue),tr,Ge(";"),Ie):W=="keyword a"?B(Se("form"),Oe,Ze,Ie):W=="keyword b"?B(Se("form"),Ze,Ie):W=="keyword d"?ee.stream.match(/^\s*$/,!1)?B():B(Se("stat"),Le,Ge(";"),Ie):W=="debugger"?B(Ge(";")):W=="{"?B(Se("}"),ce,Vt,Ie,he):W==";"?B():W=="if"?(ee.state.lexical.info=="else"&&ee.state.cc[ee.state.cc.length-1]==Ie&&ee.state.cc.pop()(),B(Se("form"),Oe,Ze,Ie,Ko)):W=="function"?B(Bn):W=="for"?B(Se("form"),ce,Xo,Ze,he,Ie):W=="class"||m&&ue=="interface"?(ee.marked="keyword",B(Se("form",W=="class"?W:ue),po,Ie)):W=="variable"?m&&ue=="declare"?(ee.marked="keyword",B(Ze)):m&&(ue=="module"||ue=="enum"||ue=="type")&&ee.stream.match(/^\s*\w/,!1)?(ee.marked="keyword",ue=="enum"?B(Ir):ue=="type"?B(Fi,Ge("operator"),mt,Ge(";")):B(Se("form"),Ft,Ge("{"),Se("}"),Vt,Ie,Ie)):m&&ue=="namespace"?(ee.marked="keyword",B(Se("form"),vt,Ze,Ie)):m&&ue=="abstract"?(ee.marked="keyword",B(Ze)):B(Se("stat"),ht):W=="switch"?B(Se("form"),Oe,Ge("{"),Se("}","switch"),ce,Vt,Ie,Ie,he):W=="case"?B(vt,Ge(":")):W=="default"?B(Ge(":")):W=="catch"?B(Se("form"),pe,It,Ze,Ie,he):W=="export"?B(Se("stat"),ho,Ie):W=="import"?B(Se("stat"),nr,Ie):W=="async"?B(Ze):ue=="@"?B(vt,Ze):Q(Se("stat"),vt,Ge(";"),Ie)}Xe(Ze,"statement");function It(W){if(W=="(")return B($r,Ge(")"))}Xe(It,"maybeCatchBinding");function vt(W,ue){return be(W,ue,!1)}Xe(vt,"expression");function at(W,ue){return be(W,ue,!0)}Xe(at,"expressionNoComma");function Oe(W){return W!="("?Q():B(Se(")"),Le,Ge(")"),Ie)}Xe(Oe,"parenExpr");function be(W,ue,Fe){if(ee.state.fatArrowAt==ee.stream.start){var We=Fe?Ye:ct;if(W=="(")return B(pe,Se(")"),pt($r,")"),Ie,Ge("=>"),We,he);if(W=="variable")return Q(pe,Ft,Ge("=>"),We,he)}var St=Fe?oe:Ee;return V.hasOwnProperty(W)?B(St):W=="function"?B(Bn,St):W=="class"||m&&ue=="interface"?(ee.marked="keyword",B(Se("form"),Oo,Ie)):W=="keyword c"||W=="async"?B(Fe?at:vt):W=="("?B(Se(")"),Le,Ge(")"),Ie,St):W=="operator"||W=="spread"?B(Fe?at:vt):W=="["?B(Se("]"),an,Ie,St):W=="{"?Wt(jt,"}",null,St):W=="quasi"?Q(je,St):W=="new"?B(xe(Fe)):B()}Xe(be,"expressionInner");function Le(W){return W.match(/[;\}\)\],]/)?Q():Q(vt)}Xe(Le,"maybeexpression");function Ee(W,ue){return W==","?B(Le):oe(W,ue,!1)}Xe(Ee,"maybeoperatorComma");function oe(W,ue,Fe){var We=Fe==!1?Ee:oe,St=Fe==!1?vt:at;if(W=="=>")return B(pe,Fe?Ye:ct,he);if(W=="operator")return/\+\+|--/.test(ue)||m&&ue=="!"?B(We):m&&ue=="<"&&ee.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?B(Se(">"),pt(mt,">"),Ie,We):ue=="?"?B(vt,Ge(":"),St):B(St);if(W=="quasi")return Q(je,We);if(W!=";"){if(W=="(")return Wt(at,")","call",We);if(W==".")return B(Ot,We);if(W=="[")return B(Se("]"),Le,Ge("]"),Ie,We);if(m&&ue=="as")return ee.marked="keyword",B(mt,We);if(W=="regexp")return ee.state.lastType=ee.marked="operator",ee.stream.backUp(ee.stream.pos-ee.stream.start-1),B(St)}}Xe(oe,"maybeoperatorNoComma");function je(W,ue){return W!="quasi"?Q():ue.slice(ue.length-2)!="${"?B(je):B(Le,et)}Xe(je,"quasi");function et(W){if(W=="}")return ee.marked="string-2",ee.state.tokenize=j,B(je)}Xe(et,"continueQuasi");function ct(W){return F(ee.stream,ee.state),Q(W=="{"?Ze:vt)}Xe(ct,"arrowBody");function Ye(W){return F(ee.stream,ee.state),Q(W=="{"?Ze:at)}Xe(Ye,"arrowBodyNoComma");function xe(W){return function(ue){return ue=="."?B(W?nt:$e):ue=="variable"&&m?B(Bt,W?oe:Ee):Q(W?at:vt)}}Xe(xe,"maybeTarget");function $e(W,ue){if(ue=="target")return ee.marked="keyword",B(Ee)}Xe($e,"target");function nt(W,ue){if(ue=="target")return ee.marked="keyword",B(oe)}Xe(nt,"targetNoComma");function ht(W){return W==":"?B(Ie,Ze):Q(Ee,Ge(";"),Ie)}Xe(ht,"maybelabel");function Ot(W){if(W=="variable")return ee.marked="property",B()}Xe(Ot,"property");function jt(W,ue){if(W=="async")return ee.marked="property",B(jt);if(W=="variable"||ee.style=="keyword"){if(ee.marked="property",ue=="get"||ue=="set")return B(dt);var Fe;return m&&ee.state.fatArrowAt==ee.stream.start&&(Fe=ee.stream.match(/^\s*:\s*/,!1))&&(ee.state.fatArrowAt=ee.stream.pos+Fe[0].length),B(Et)}else{if(W=="number"||W=="string")return ee.marked=c?"property":ee.style+" property",B(Et);if(W=="jsonld-keyword")return B(Et);if(m&&fe(ue))return ee.marked="keyword",B(jt);if(W=="[")return B(vt,Jt,Ge("]"),Et);if(W=="spread")return B(at,Et);if(ue=="*")return ee.marked="keyword",B(jt);if(W==":")return Q(Et)}}Xe(jt,"objprop");function dt(W){return W!="variable"?Q(Et):(ee.marked="property",B(Bn))}Xe(dt,"getterSetter");function Et(W){if(W==":")return B(at);if(W=="(")return Q(Bn)}Xe(Et,"afterprop");function pt(W,ue,Fe){function We(St,en){if(Fe?Fe.indexOf(St)>-1:St==","){var st=ee.state.lexical;return st.info=="call"&&(st.pos=(st.pos||0)+1),B(function(_r,ji){return _r==ue||ji==ue?Q():Q(W)},We)}return St==ue||en==ue?B():Fe&&Fe.indexOf(";")>-1?Q(W):B(Ge(ue))}return Xe(We,"proceed"),function(St,en){return St==ue||en==ue?B():Q(W,We)}}Xe(pt,"commasep");function Wt(W,ue,Fe){for(var We=3;We<arguments.length;We++)ee.cc.push(arguments[We]);return B(Se(ue,Fe),pt(W,ue),Ie)}Xe(Wt,"contCommasep");function Vt(W){return W=="}"?B():Q(Ze,Vt)}Xe(Vt,"block");function Jt(W,ue){if(m){if(W==":")return B(mt);if(ue=="?")return B(Jt)}}Xe(Jt,"maybetype");function ot(W,ue){if(m&&(W==":"||ue=="in"))return B(mt)}Xe(ot,"maybetypeOrIn");function qn(W){if(m&&W==":")return ee.stream.match(/^\s*\w+\s+is\b/,!1)?B(vt,vn,mt):B(mt)}Xe(qn,"mayberettype");function vn(W,ue){if(ue=="is")return ee.marked="keyword",B()}Xe(vn,"isKW");function mt(W,ue){if(ue=="keyof"||ue=="typeof"||ue=="infer"||ue=="readonly")return ee.marked="keyword",B(ue=="typeof"?at:mt);if(W=="variable"||ue=="void")return ee.marked="type",B(wt);if(ue=="|"||ue=="&")return B(mt);if(W=="string"||W=="number"||W=="atom")return B(wt);if(W=="[")return B(Se("]"),pt(mt,"]",","),Ie,wt);if(W=="{")return B(Se("}"),di,Ie,wt);if(W=="(")return B(pt(Xi,")"),yn,wt);if(W=="<")return B(pt(mt,">"),mt);if(W=="quasi")return Q(Mr,wt)}Xe(mt,"typeexpr");function yn(W){if(W=="=>")return B(mt)}Xe(yn,"maybeReturnType");function di(W){return W.match(/[\}\)\]]/)?B():W==","||W==";"?B(di):Q(on,di)}Xe(di,"typeprops");function on(W,ue){if(W=="variable"||ee.style=="keyword")return ee.marked="property",B(on);if(ue=="?"||W=="number"||W=="string")return B(on);if(W==":")return B(mt);if(W=="[")return B(Ge("variable"),ot,Ge("]"),on);if(W=="(")return Q(Lr,on);if(!W.match(/[;\}\)\],]/))return B()}Xe(on,"typeprop");function Mr(W,ue){return W!="quasi"?Q():ue.slice(ue.length-2)!="${"?B(Mr):B(mt,An)}Xe(Mr,"quasiType");function An(W){if(W=="}")return ee.marked="string-2",ee.state.tokenize=j,B(Mr)}Xe(An,"continueQuasiType");function Xi(W,ue){return W=="variable"&&ee.stream.match(/^\s*[?:]/,!1)||ue=="?"?B(Xi):W==":"?B(mt):W=="spread"?B(Xi):Q(mt)}Xe(Xi,"typearg");function wt(W,ue){if(ue=="<")return B(Se(">"),pt(mt,">"),Ie,wt);if(ue=="|"||W=="."||ue=="&")return B(mt);if(W=="[")return B(mt,Ge("]"),wt);if(ue=="extends"||ue=="implements")return ee.marked="keyword",B(mt);if(ue=="?")return B(mt,Ge(":"),mt)}Xe(wt,"afterType");function Bt(W,ue){if(ue=="<")return B(Se(">"),pt(mt,">"),Ie,wt)}Xe(Bt,"maybeTypeArgs");function un(){return Q(mt,kn)}Xe(un,"typeparam");function kn(W,ue){if(ue=="=")return B(mt)}Xe(kn,"maybeTypeDefault");function tr(W,ue){return ue=="enum"?(ee.marked="keyword",B(Ir)):Q(Ft,Jt,bn,Ii)}Xe(tr,"vardef");function Ft(W,ue){if(m&&fe(ue))return ee.marked="keyword",B(Ft);if(W=="variable")return re(ue),B();if(W=="spread")return B(Ft);if(W=="[")return Wt(Gt,"]");if(W=="{")return Wt(cn,"}")}Xe(Ft,"pattern");function cn(W,ue){return W=="variable"&&!ee.stream.match(/^\s*:/,!1)?(re(ue),B(bn)):(W=="variable"&&(ee.marked="property"),W=="spread"?B(Ft):W=="}"?Q():W=="["?B(vt,Ge("]"),Ge(":"),cn):B(Ge(":"),Ft,bn))}Xe(cn,"proppattern");function Gt(){return Q(Ft,bn)}Xe(Gt,"eltpattern");function bn(W,ue){if(ue=="=")return B(at)}Xe(bn,"maybeAssign");function Ii(W){if(W==",")return B(tr)}Xe(Ii,"vardefCont");function Ko(W,ue){if(W=="keyword b"&&ue=="else")return B(Se("form","else"),Ze,Ie)}Xe(Ko,"maybeelse");function Xo(W,ue){if(ue=="await")return B(Xo);if(W=="(")return B(Se(")"),Ao,Ie)}Xe(Xo,"forspec");function Ao(W){return W=="var"?B(tr,Er):W=="variable"?B(Er):Q(Er)}Xe(Ao,"forspec1");function Er(W,ue){return W==")"?B():W==";"?B(Er):ue=="in"||ue=="of"?(ee.marked="keyword",B(vt,Er)):Q(vt,Er)}Xe(Er,"forspec2");function Bn(W,ue){if(ue=="*")return ee.marked="keyword",B(Bn);if(W=="variable")return re(ue),B(Bn);if(W=="(")return B(pe,Se(")"),pt($r,")"),Ie,qn,Ze,he);if(m&&ue=="<")return B(Se(">"),pt(un,">"),Ie,Bn)}Xe(Bn,"functiondef");function Lr(W,ue){if(ue=="*")return ee.marked="keyword",B(Lr);if(W=="variable")return re(ue),B(Lr);if(W=="(")return B(pe,Se(")"),pt($r,")"),Ie,qn,he);if(m&&ue=="<")return B(Se(">"),pt(un,">"),Ie,Lr)}Xe(Lr,"functiondecl");function Fi(W,ue){if(W=="keyword"||W=="variable")return ee.marked="type",B(Fi);if(ue=="<")return B(Se(">"),pt(un,">"),Ie)}Xe(Fi,"typename");function $r(W,ue){return ue=="@"&&B(vt,$r),W=="spread"?B($r):m&&fe(ue)?(ee.marked="keyword",B($r)):m&&W=="this"?B(Jt,bn):Q(Ft,Jt,bn)}Xe($r,"funarg");function Oo(W,ue){return W=="variable"?po(W,ue):Rn(W,ue)}Xe(Oo,"classExpression");function po(W,ue){if(W=="variable")return re(ue),B(Rn)}Xe(po,"className");function Rn(W,ue){if(ue=="<")return B(Se(">"),pt(un,">"),Ie,Rn);if(ue=="extends"||ue=="implements"||m&&W==",")return ue=="implements"&&(ee.marked="keyword"),B(m?mt:vt,Rn);if(W=="{")return B(Se("}"),Zi,Ie)}Xe(Rn,"classNameAfter");function Zi(W,ue){if(W=="async"||W=="variable"&&(ue=="static"||ue=="get"||ue=="set"||m&&fe(ue))&&ee.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return ee.marked="keyword",B(Zi);if(W=="variable"||ee.style=="keyword")return ee.marked="property",B(Pi,Zi);if(W=="number"||W=="string")return B(Pi,Zi);if(W=="[")return B(vt,Jt,Ge("]"),Pi,Zi);if(ue=="*")return ee.marked="keyword",B(Zi);if(m&&W=="(")return Q(Lr,Zi);if(W==";"||W==",")return B(Zi);if(W=="}")return B();if(ue=="@")return B(vt,Zi)}Xe(Zi,"classBody");function Pi(W,ue){if(ue=="!"||ue=="?")return B(Pi);if(W==":")return B(mt,bn);if(ue=="=")return B(at);var Fe=ee.state.lexical.prev,We=Fe&&Fe.info=="interface";return Q(We?Lr:Bn)}Xe(Pi,"classfield");function ho(W,ue){return ue=="*"?(ee.marked="keyword",B(zr,Ge(";"))):ue=="default"?(ee.marked="keyword",B(vt,Ge(";"))):W=="{"?B(pt(Do,"}"),zr,Ge(";")):Q(Ze)}Xe(ho,"afterExport");function Do(W,ue){if(ue=="as")return ee.marked="keyword",B(Ge("variable"));if(W=="variable")return Q(at,Do)}Xe(Do,"exportField");function nr(W){return W=="string"?B():W=="("?Q(vt):W=="."?Q(Ee):Q(ft,mo,zr)}Xe(nr,"afterImport");function ft(W,ue){return W=="{"?Wt(ft,"}"):(W=="variable"&&re(ue),ue=="*"&&(ee.marked="keyword"),B(Yl))}Xe(ft,"importSpec");function mo(W){if(W==",")return B(ft,mo)}Xe(mo,"maybeMoreImports");function Yl(W,ue){if(ue=="as")return ee.marked="keyword",B(ft)}Xe(Yl,"maybeAs");function zr(W,ue){if(ue=="from")return ee.marked="keyword",B(vt)}Xe(zr,"maybeFrom");function an(W){return W=="]"?B():Q(pt(at,"]"))}Xe(an,"arrayLiteral");function Ir(){return Q(Se("form"),Ft,Ge("{"),Se("}"),pt(Zo,"}"),Ie,Ie)}Xe(Ir,"enumdef");function Zo(){return Q(Ft,bn)}Xe(Zo,"enummember");function Js(W,ue){return W.lastType=="operator"||W.lastType==","||y.test(ue.charAt(0))||/[,.]/.test(ue.charAt(0))}Xe(Js,"isContinuedStatement");function ze(W,ue,Fe){return ue.tokenize==A&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(ue.lastType)||ue.lastType=="quasi"&&/\{\s*$/.test(W.string.slice(0,W.pos-(Fe||0)))}return Xe(ze,"expressionAllowed"),{startState:function(W){var ue={tokenize:A,lastType:"sof",cc:[],lexical:new $((W||0)-o,0,"block",!1),localVars:i.localVars,context:i.localVars&&new Z(null,null,!1),indented:W||0};return i.globalVars&&typeof i.globalVars=="object"&&(ue.globalVars=i.globalVars),ue},token:function(W,ue){if(W.sol()&&(ue.lexical.hasOwnProperty("align")||(ue.lexical.align=!1),ue.indented=W.indentation(),F(W,ue)),ue.tokenize!=M&&W.eatSpace())return null;var Fe=ue.tokenize(W,ue);return k=="comment"?Fe:(ue.lastType=k=="operator"&&(N=="++"||N=="--")?"incdec":k,J(ue,Fe,k,N,W))},indent:function(W,ue){if(W.tokenize==M||W.tokenize==j)return n.Pass;if(W.tokenize!=A)return 0;var Fe=ue&&ue.charAt(0),We=W.lexical,St;if(!/^\s*else\b/.test(ue))for(var en=W.cc.length-1;en>=0;--en){var st=W.cc[en];if(st==Ie)We=We.prev;else if(st!=Ko&&st!=he)break}for(;(We.type=="stat"||We.type=="form")&&(Fe=="}"||(St=W.cc[W.cc.length-1])&&(St==Ee||St==oe)&&!/^[,\.=+\-*:?[\(]/.test(ue));)We=We.prev;l&&We.type==")"&&We.prev.type=="stat"&&(We=We.prev);var _r=We.type,ji=Fe==_r;return _r=="vardef"?We.indented+(W.lastType=="operator"||W.lastType==","?We.info.length+1:0):_r=="form"&&Fe=="{"?We.indented:_r=="form"?We.indented+o:_r=="stat"?We.indented+(Js(W,ue)?l||o:0):We.info=="switch"&&!ji&&i.doubleIndentSwitch!=!1?We.indented+(/^(?:case|default)\b/.test(ue)?o:2*o):We.align?We.column+(ji?0:1):We.indented+(ji?0:o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:p?null:"/*",blockCommentEnd:p?null:"*/",blockCommentContinue:p?null:" * ",lineComment:p?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:p?"json":"javascript",jsonldMode:c,jsonMode:p,expressionAllowed:ze,skipExpression:function(W){J(W,"atom","atom","true",new n.StringStream("",2,null))}}}),n.registerHelper("wordChars","javascript",/[\w$]/),n.defineMIME("text/javascript","javascript"),n.defineMIME("text/ecmascript","javascript"),n.defineMIME("application/javascript","javascript"),n.defineMIME("application/x-javascript","javascript"),n.defineMIME("application/ecmascript","javascript"),n.defineMIME("application/json",{name:"javascript",json:!0}),n.defineMIME("application/x-json",{name:"javascript",json:!0}),n.defineMIME("application/manifest+json",{name:"javascript",json:!0}),n.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),n.defineMIME("text/typescript",{name:"javascript",typescript:!0}),n.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var d4=Ore.exports;const Dre=Object.freeze(Object.defineProperty({__proto__:null,j:f4({__proto__:null,default:fo(d4)},[d4])},Symbol.toStringTag,{value:"Module"}));var kre=Object.defineProperty,i1=(e,t)=>kre(e,"name",{value:t,configurable:!0});function p4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}i1(p4,"_mergeNamespaces");var Rre={exports:{}};(function(e,t){(function(n){n(Qi())})(function(n){var r={},i=/[^\s\u00a0]/,o=n.Pos,l=n.cmpPos;function c(m){var b=m.search(i);return b==-1?0:b}i1(c,"firstNonWS"),n.commands.toggleComment=function(m){m.toggleComment()},n.defineExtension("toggleComment",function(m){m||(m=r);for(var b=this,E=1/0,y=this.listSelections(),x=null,w=y.length-1;w>=0;w--){var k=y[w].from(),N=y[w].to();k.line>=E||(N.line>=E&&(N=o(E,0)),E=k.line,x==null?b.uncomment(k,N,m)?x="un":(b.lineComment(k,N,m),x="line"):x=="un"?b.uncomment(k,N,m):b.lineComment(k,N,m))}});function p(m,b,E){return/\bstring\b/.test(m.getTokenTypeAt(o(b.line,0)))&&!/^[\'\"\`]/.test(E)}i1(p,"probablyInsideString");function d(m,b){var E=m.getMode();return E.useInnerComments===!1||!E.innerMode?E:m.getModeAt(b)}i1(d,"getMode"),n.defineExtension("lineComment",function(m,b,E){E||(E=r);var y=this,x=d(y,m),w=y.getLine(m.line);if(!(w==null||p(y,m,w))){var k=E.lineComment||x.lineComment;if(!k){(E.blockCommentStart||x.blockCommentStart)&&(E.fullLines=!0,y.blockComment(m,b,E));return}var N=Math.min(b.ch!=0||b.line==m.line?b.line+1:b.line,y.lastLine()+1),D=E.padding==null?" ":E.padding,A=E.commentBlankLines||m.line==b.line;y.operation(function(){if(E.indent){for(var C=null,M=m.line;M<N;++M){var j=y.getLine(M),P=j.slice(0,c(j));(C==null||C.length>P.length)&&(C=P)}for(var M=m.line;M<N;++M){var j=y.getLine(M),F=C.length;!A&&!i.test(j)||(j.slice(0,F)!=C&&(F=c(j)),y.replaceRange(C+k+D,o(M,0),o(M,F)))}}else for(var M=m.line;M<N;++M)(A||i.test(y.getLine(M)))&&y.replaceRange(k+D,o(M,0))})}}),n.defineExtension("blockComment",function(m,b,E){E||(E=r);var y=this,x=d(y,m),w=E.blockCommentStart||x.blockCommentStart,k=E.blockCommentEnd||x.blockCommentEnd;if(!w||!k){(E.lineComment||x.lineComment)&&E.fullLines!=!1&&y.lineComment(m,b,E);return}if(!/\bcomment\b/.test(y.getTokenTypeAt(o(m.line,0)))){var N=Math.min(b.line,y.lastLine());N!=m.line&&b.ch==0&&i.test(y.getLine(N))&&--N;var D=E.padding==null?" ":E.padding;m.line>N||y.operation(function(){if(E.fullLines!=!1){var A=i.test(y.getLine(N));y.replaceRange(D+k,o(N)),y.replaceRange(w+D,o(m.line,0));var C=E.blockCommentLead||x.blockCommentLead;if(C!=null)for(var M=m.line+1;M<=N;++M)(M!=N||A)&&y.replaceRange(C+D,o(M,0))}else{var j=l(y.getCursor("to"),b)==0,P=!y.somethingSelected();y.replaceRange(k,b),j&&y.setSelection(P?b:y.getCursor("from"),b),y.replaceRange(w,m)}})}}),n.defineExtension("uncomment",function(m,b,E){E||(E=r);var y=this,x=d(y,m),w=Math.min(b.ch!=0||b.line==m.line?b.line:b.line-1,y.lastLine()),k=Math.min(m.line,w),N=E.lineComment||x.lineComment,D=[],A=E.padding==null?" ":E.padding,C;e:{if(!N)break e;for(var M=k;M<=w;++M){var j=y.getLine(M),P=j.indexOf(N);if(P>-1&&!/comment/.test(y.getTokenTypeAt(o(M,P+1)))&&(P=-1),P==-1&&i.test(j)||P>-1&&i.test(j.slice(0,P)))break e;D.push(j)}if(y.operation(function(){for(var Z=k;Z<=w;++Z){var ge=D[Z-k],ae=ge.indexOf(N),pe=ae+N.length;ae<0||(ge.slice(pe,pe+A.length)==A&&(pe+=A.length),C=!0,y.replaceRange("",o(Z,ae),o(Z,pe)))}}),C)return!0}var F=E.blockCommentStart||x.blockCommentStart,V=E.blockCommentEnd||x.blockCommentEnd;if(!F||!V)return!1;var $=E.blockCommentLead||x.blockCommentLead,X=y.getLine(k),J=X.indexOf(F);if(J==-1)return!1;var ee=w==k?X:y.getLine(w),Q=ee.indexOf(V,w==k?J+F.length:0),B=o(k,J+1),ne=o(w,Q+1);if(Q==-1||!/comment/.test(y.getTokenTypeAt(B))||!/comment/.test(y.getTokenTypeAt(ne))||y.getRange(B,ne,`
`).indexOf(V)>-1)return!1;var re=X.lastIndexOf(F,m.ch),se=re==-1?-1:X.slice(0,m.ch).indexOf(V,re+F.length);if(re!=-1&&se!=-1&&se+V.length!=m.ch)return!1;se=ee.indexOf(V,b.ch);var fe=ee.slice(b.ch).lastIndexOf(F,se-b.ch);return re=se==-1||fe==-1?-1:b.ch+fe,se!=-1&&re!=-1&&re!=b.ch?!1:(y.operation(function(){y.replaceRange("",o(w,Q-(A&&ee.slice(Q-A.length,Q)==A?A.length:0)),o(w,Q+V.length));var Z=J+F.length;if(A&&X.slice(Z,Z+A.length)==A&&(Z+=A.length),y.replaceRange("",o(k,J),o(k,Z)),$)for(var ge=k+1;ge<=w;++ge){var ae=y.getLine(ge),pe=ae.indexOf($);if(!(pe==-1||i.test(ae.slice(0,pe)))){var ce=pe+$.length;A&&ae.slice(ce,ce+A.length)==A&&(ce+=A.length),y.replaceRange("",o(ge,pe),o(ge,ce))}}}),!0)})})})();var h4=Rre.exports;const Mre=Object.freeze(Object.defineProperty({__proto__:null,c:p4({__proto__:null,default:fo(h4)},[h4])},Symbol.toStringTag,{value:"Module"}));var Lre=Object.defineProperty,fr=(e,t)=>Lre(e,"name",{value:t,configurable:!0});function m4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}fr(m4,"_mergeNamespaces");var Ire={exports:{}};(function(e,t){(function(n){n(Qi(),n1(),xg)})(function(n){n.defineOption("search",{bottom:!1});function r(F,V){return typeof F=="string"?F=new RegExp(F.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),V?"gi":"g"):F.global||(F=new RegExp(F.source,F.ignoreCase?"gi":"g")),{token:function($){F.lastIndex=$.pos;var X=F.exec($.string);if(X&&X.index==$.pos)return $.pos+=X[0].length||1,"searching";X?$.pos=X.index:$.skipToEnd()}}}fr(r,"searchOverlay");function i(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}fr(i,"SearchState");function o(F){return F.state.search||(F.state.search=new i)}fr(o,"getSearchState");function l(F){return typeof F=="string"&&F==F.toLowerCase()}fr(l,"queryCaseInsensitive");function c(F,V,$){return F.getSearchCursor(V,$,{caseFold:l(V),multiline:!0})}fr(c,"getSearchCursor");function p(F,V,$,X,J){F.openDialog(V,X,{value:$,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){k(F)},onKeyDown:J,bottom:F.options.search.bottom})}fr(p,"persistentDialog");function d(F,V,$,X,J){F.openDialog?F.openDialog(V,J,{value:X,selectValueOnOpen:!0,bottom:F.options.search.bottom}):J(prompt($,X))}fr(d,"dialog");function m(F,V,$,X){F.openConfirm?F.openConfirm(V,X):confirm($)&&X[0]()}fr(m,"confirmDialog");function b(F){return F.replace(/\\([nrt\\])/g,function(V,$){return $=="n"?`
`:$=="r"?"\r":$=="t"?" ":$=="\\"?"\\":V})}fr(b,"parseString");function E(F){var V=F.match(/^\/(.*)\/([a-z]*)$/);if(V)try{F=new RegExp(V[1],V[2].indexOf("i")==-1?"":"i")}catch{}else F=b(F);return(typeof F=="string"?F=="":F.test(""))&&(F=/x^/),F}fr(E,"parseQuery");function y(F,V,$){V.queryText=$,V.query=E($),F.removeOverlay(V.overlay,l(V.query)),V.overlay=r(V.query,l(V.query)),F.addOverlay(V.overlay),F.showMatchesOnScrollbar&&(V.annotate&&(V.annotate.clear(),V.annotate=null),V.annotate=F.showMatchesOnScrollbar(V.query,l(V.query)))}fr(y,"startSearch");function x(F,V,$,X){var J=o(F);if(J.query)return w(F,V);var ee=F.getSelection()||J.lastQuery;if(ee instanceof RegExp&&ee.source=="x^"&&(ee=null),$&&F.openDialog){var Q=null,B=fr(function(ne,re){n.e_stop(re),ne&&(ne!=J.queryText&&(y(F,J,ne),J.posFrom=J.posTo=F.getCursor()),Q&&(Q.style.opacity=1),w(F,re.shiftKey,function(se,fe){var Z;fe.line<3&&document.querySelector&&(Z=F.display.wrapper.querySelector(".CodeMirror-dialog"))&&Z.getBoundingClientRect().bottom-4>F.cursorCoords(fe,"window").top&&((Q=Z).style.opacity=.4)}))},"searchNext");p(F,D(F),ee,B,function(ne,re){var se=n.keyName(ne),fe=F.getOption("extraKeys"),Z=fe&&fe[se]||n.keyMap[F.getOption("keyMap")][se];Z=="findNext"||Z=="findPrev"||Z=="findPersistentNext"||Z=="findPersistentPrev"?(n.e_stop(ne),y(F,o(F),re),F.execCommand(Z)):(Z=="find"||Z=="findPersistent")&&(n.e_stop(ne),B(re,ne))}),X&&ee&&(y(F,J,ee),w(F,V))}else d(F,D(F),"Search for:",ee,function(ne){ne&&!J.query&&F.operation(function(){y(F,J,ne),J.posFrom=J.posTo=F.getCursor(),w(F,V)})})}fr(x,"doSearch");function w(F,V,$){F.operation(function(){var X=o(F),J=c(F,X.query,V?X.posFrom:X.posTo);!J.find(V)&&(J=c(F,X.query,V?n.Pos(F.lastLine()):n.Pos(F.firstLine(),0)),!J.find(V))||(F.setSelection(J.from(),J.to()),F.scrollIntoView({from:J.from(),to:J.to()},20),X.posFrom=J.from(),X.posTo=J.to(),$&&$(J.from(),J.to()))})}fr(w,"findNext");function k(F){F.operation(function(){var V=o(F);V.lastQuery=V.query,V.query&&(V.query=V.queryText=null,F.removeOverlay(V.overlay),V.annotate&&(V.annotate.clear(),V.annotate=null))})}fr(k,"clearSearch");function N(F,V){var $=F?document.createElement(F):document.createDocumentFragment();for(var X in V)$[X]=V[X];for(var J=2;J<arguments.length;J++){var ee=arguments[J];$.appendChild(typeof ee=="string"?document.createTextNode(ee):ee)}return $}fr(N,"el");function D(F){return N("",null,N("span",{className:"CodeMirror-search-label"},F.phrase("Search:"))," ",N("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",N("span",{style:"color: #888",className:"CodeMirror-search-hint"},F.phrase("(Use /re/ syntax for regexp search)")))}fr(D,"getQueryDialog");function A(F){return N("",null," ",N("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",N("span",{style:"color: #888",className:"CodeMirror-search-hint"},F.phrase("(Use /re/ syntax for regexp search)")))}fr(A,"getReplaceQueryDialog");function C(F){return N("",null,N("span",{className:"CodeMirror-search-label"},F.phrase("With:"))," ",N("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}fr(C,"getReplacementQueryDialog");function M(F){return N("",null,N("span",{className:"CodeMirror-search-label"},F.phrase("Replace?"))," ",N("button",{},F.phrase("Yes"))," ",N("button",{},F.phrase("No"))," ",N("button",{},F.phrase("All"))," ",N("button",{},F.phrase("Stop")))}fr(M,"getDoReplaceConfirm");function j(F,V,$){F.operation(function(){for(var X=c(F,V);X.findNext();)if(typeof V!="string"){var J=F.getRange(X.from(),X.to()).match(V);X.replace($.replace(/\$(\d)/g,function(ee,Q){return J[Q]}))}else X.replace($)})}fr(j,"replaceAll");function P(F,V){if(!F.getOption("readOnly")){var $=F.getSelection()||o(F).lastQuery,X=V?F.phrase("Replace all:"):F.phrase("Replace:"),J=N("",null,N("span",{className:"CodeMirror-search-label"},X),A(F));d(F,J,X,$,function(ee){ee&&(ee=E(ee),d(F,C(F),F.phrase("Replace with:"),"",function(Q){if(Q=b(Q),V)j(F,ee,Q);else{k(F);var B=c(F,ee,F.getCursor("from")),ne=fr(function(){var se=B.from(),fe;!(fe=B.findNext())&&(B=c(F,ee),!(fe=B.findNext())||se&&B.from().line==se.line&&B.from().ch==se.ch)||(F.setSelection(B.from(),B.to()),F.scrollIntoView({from:B.from(),to:B.to()}),m(F,M(F),F.phrase("Replace?"),[function(){re(fe)},ne,function(){j(F,ee,Q)}]))},"advance"),re=fr(function(se){B.replace(typeof ee=="string"?Q:Q.replace(/\$(\d)/g,function(fe,Z){return se[Z]})),ne()},"doReplace");ne()}}))})}}fr(P,"replace"),n.commands.find=function(F){k(F),x(F)},n.commands.findPersistent=function(F){k(F),x(F,!1,!0)},n.commands.findPersistentNext=function(F){x(F,!1,!0,!0)},n.commands.findPersistentPrev=function(F){x(F,!0,!0,!0)},n.commands.findNext=x,n.commands.findPrev=function(F){x(F,!0)},n.commands.clearSearch=k,n.commands.replace=P,n.commands.replaceAll=function(F){P(F,!0)}})})();var g4=Ire.exports;const v4=Object.freeze(Object.defineProperty({__proto__:null,s:m4({__proto__:null,default:fo(g4)},[g4])},Symbol.toStringTag,{value:"Module"}));qt.registerHelper("hint","graphql",(e,t)=>{const{schema:n,externalFragments:r}=t;if(!n)return;const i=e.getCursor(),o=e.getTokenAt(i),l=o.type!==null&&/"|\w/.test(o.string[0])?o.start:o.end,c=new Sf(i.line,l),p={list:N9(n,e.getValue(),c,o,r).map(d=>({text:d.label,type:d.type,description:d.documentation,isDeprecated:d.isDeprecated,deprecationReason:d.deprecationReason})),from:{line:i.line,ch:l},to:{line:i.line,ch:o.end}};return p!=null&&p.list&&p.list.length>0&&(p.from=qt.Pos(p.from.line,p.from.ch),p.to=qt.Pos(p.to.line,p.to.ch),qt.signal(e,"hasCompletion",e,p,o)),p});const Fre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),y4=["error","warning","information","hint"],Pre={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};qt.registerHelper("lint","graphql",(e,t)=>{const{schema:n,validationRules:r,externalFragments:i}=t;return K9(e,n,r,void 0,i).map(o=>({message:o.message,severity:o.severity?y4[o.severity-1]:y4[0],type:o.source?Pre[o.source]:void 0,from:qt.Pos(o.range.start.line,o.range.start.character),to:qt.Pos(o.range.end.line,o.range.end.character)}))});const jre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Vre=Object.defineProperty,Ure=(e,t)=>Vre(e,"name",{value:t,configurable:!0});function YC(e,t){const n=[];let r=e;for(;r!=null&&r.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}Ure(YC,"forEachState");var qre=Object.defineProperty,zl=(e,t)=>qre(e,"name",{value:t,configurable:!0});function WC(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return YC(t,r=>{var i,o;switch(r.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":r.type&&(n.type=e.getType(r.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&r.name?QC(e,n.parentType,r.name):null,n.type=(i=n.fieldDef)===null||i===void 0?void 0:i.type;break;case"SelectionSet":n.parentType=n.type?gn(n.type):null;break;case"Directive":n.directiveDef=r.name?e.getDirective(r.name):null;break;case"Arguments":const l=r.prevState?r.prevState.kind==="Field"?n.fieldDef:r.prevState.kind==="Directive"?n.directiveDef:r.prevState.kind==="AliasedField"?r.prevState.name&&QC(e,n.parentType,r.prevState.name):null:null;n.argDefs=l?l.args:null;break;case"Argument":if(n.argDef=null,n.argDefs){for(let b=0;b<n.argDefs.length;b++)if(n.argDefs[b].name===r.name){n.argDef=n.argDefs[b];break}}n.inputType=(o=n.argDef)===null||o===void 0?void 0:o.type;break;case"EnumValue":const c=n.inputType?gn(n.inputType):null;n.enumValue=c instanceof Hi?b4(c.getValues(),b=>b.value===r.name):null;break;case"ListValue":const p=n.inputType?Mu(n.inputType):null;n.inputType=p instanceof lr?p.ofType:null;break;case"ObjectValue":const d=n.inputType?gn(n.inputType):null;n.objectFieldDefs=d instanceof so?d.getFields():null;break;case"ObjectField":const m=r.name&&n.objectFieldDefs?n.objectFieldDefs[r.name]:null;n.inputType=m?.type;break;case"NamedType":n.type=r.name?e.getType(r.name):null;break}}),n}zl(WC,"getTypeInfo");function QC(e,t,n){if(n===va.name&&e.getQueryType()===t)return va;if(n===ya.name&&e.getQueryType()===t)return ya;if(n===ba.name&&Qr(t))return ba;if(t&&t.getFields)return t.getFields()[n]}zl(QC,"getFieldDef");function b4(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}zl(b4,"find");function KC(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:e_(e.fieldDef)?null:e.parentType}}zl(KC,"getFieldReference");function XC(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}zl(XC,"getDirectiveReference");function ZC(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:e_(e.fieldDef)?null:e.parentType}}zl(ZC,"getArgumentReference");function JC(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?gn(e.inputType):void 0}}zl(JC,"getEnumValueReference");function o1(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}zl(o1,"getTypeReference");function e_(e){return e.name.slice(0,2)==="__"}zl(e_,"isMetaField");var Bre=Object.defineProperty,gs=(e,t)=>Bre(e,"name",{value:t,configurable:!0});qt.defineOption("info",!1,(e,t,n)=>{if(n&&n!==qt.Init){const r=e.state.info.onMouseOver;qt.off(e.getWrapperElement(),"mouseover",r),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const r=e.state.info=E4(t);r.onMouseOver=T4.bind(null,e),qt.on(e.getWrapperElement(),"mouseover",r.onMouseOver)}});function E4(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}gs(E4,"createState");function S4(e){const{options:t}=e.state.info;return t?.hoverTime||500}gs(S4,"getHoverTime");function T4(e,t){const n=e.state.info,r=t.target||t.srcElement;if(!(r instanceof HTMLElement)||r.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const i=r.getBoundingClientRect(),o=gs(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(c,p)},"onMouseMove"),l=gs(function(){qt.off(document,"mousemove",o),qt.off(e.getWrapperElement(),"mouseout",l),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),c=gs(function(){qt.off(document,"mousemove",o),qt.off(e.getWrapperElement(),"mouseout",l),n.hoverTimeout=void 0,x4(e,i)},"onHover"),p=S4(e);n.hoverTimeout=setTimeout(c,p),qt.on(document,"mousemove",o),qt.on(e.getWrapperElement(),"mouseout",l)}gs(T4,"onMouseOver");function x4(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2},"window"),r=e.state.info,{options:i}=r,o=i.render||e.getHelper(n,"info");if(o){const l=e.getTokenAt(n,!0);if(l){const c=o(l,i,e,n);c&&w4(e,t,c)}}}gs(x4,"onMouseHover");function w4(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.append(n),document.body.append(r);const i=r.getBoundingClientRect(),o=window.getComputedStyle(r),l=i.right-i.left+parseFloat(o.marginLeft)+parseFloat(o.marginRight),c=i.bottom-i.top+parseFloat(o.marginTop)+parseFloat(o.marginBottom);let p=t.bottom;c>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(p=t.top-c),p<0&&(p=t.bottom);let d=Math.max(0,window.innerWidth-l-15);d>t.left&&(d=t.left),r.style.opacity="1",r.style.top=p+"px",r.style.left=d+"px";let m;const b=gs(function(){clearTimeout(m)},"onMouseOverPopup"),E=gs(function(){clearTimeout(m),m=setTimeout(y,200)},"onMouseOut"),y=gs(function(){qt.off(r,"mouseover",b),qt.off(r,"mouseout",E),qt.off(e.getWrapperElement(),"mouseout",E),r.style.opacity?(r.style.opacity="0",setTimeout(()=>{r.parentNode&&r.remove()},600)):r.parentNode&&r.remove()},"hidePopup");qt.on(r,"mouseover",b),qt.on(r,"mouseout",E),qt.on(e.getWrapperElement(),"mouseout",E)}gs(w4,"showPopup");const $re=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var zre=Object.defineProperty,Xs=(e,t)=>zre(e,"name",{value:t,configurable:!0});qt.registerHelper("info","graphql",(e,t)=>{if(!t.schema||!e.state)return;const{kind:n,step:r}=e.state,i=WC(t.schema,e.state);if(n==="Field"&&r===0&&i.fieldDef||n==="AliasedField"&&r===2&&i.fieldDef){const o=document.createElement("div");o.className="CodeMirror-info-header",C4(o,i,t);const l=document.createElement("div");return l.append(o),kp(l,t,i.fieldDef),l}if(n==="Directive"&&r===1&&i.directiveDef){const o=document.createElement("div");o.className="CodeMirror-info-header",N4(o,i,t);const l=document.createElement("div");return l.append(o),kp(l,t,i.directiveDef),l}if(n==="Argument"&&r===0&&i.argDef){const o=document.createElement("div");o.className="CodeMirror-info-header",A4(o,i,t);const l=document.createElement("div");return l.append(o),kp(l,t,i.argDef),l}if(n==="EnumValue"&&i.enumValue&&i.enumValue.description){const o=document.createElement("div");o.className="CodeMirror-info-header",O4(o,i,t);const l=document.createElement("div");return l.append(o),kp(l,t,i.enumValue),l}if(n==="NamedType"&&i.type&&i.type.description){const o=document.createElement("div");o.className="CodeMirror-info-header",Kf(o,i,t,i.type);const l=document.createElement("div");return l.append(o),kp(l,t,i.type),l}});function C4(e,t,n){_4(e,t,n),t_(e,t,n,t.type)}Xs(C4,"renderField");function _4(e,t,n){var r;const i=((r=t.fieldDef)===null||r===void 0?void 0:r.name)||"";No(e,i,"field-name",n,KC(t))}Xs(_4,"renderQualifiedField");function N4(e,t,n){var r;const i="@"+(((r=t.directiveDef)===null||r===void 0?void 0:r.name)||"");No(e,i,"directive-name",n,XC(t))}Xs(N4,"renderDirective");function A4(e,t,n){var r;const i=((r=t.argDef)===null||r===void 0?void 0:r.name)||"";No(e,i,"arg-name",n,ZC(t)),t_(e,t,n,t.inputType)}Xs(A4,"renderArg");function O4(e,t,n){var r;const i=((r=t.enumValue)===null||r===void 0?void 0:r.name)||"";Kf(e,t,n,t.inputType),No(e,"."),No(e,i,"enum-value",n,JC(t))}Xs(O4,"renderEnumValue");function t_(e,t,n,r){const i=document.createElement("span");i.className="type-name-pill",r instanceof Pt?(Kf(i,t,n,r.ofType),No(i,"!")):r instanceof lr?(No(i,"["),Kf(i,t,n,r.ofType),No(i,"]")):No(i,r?.name||"","type-name",n,o1(t,r)),e.append(i)}Xs(t_,"renderTypeAnnotation");function Kf(e,t,n,r){r instanceof Pt?(Kf(e,t,n,r.ofType),No(e,"!")):r instanceof lr?(No(e,"["),Kf(e,t,n,r.ofType),No(e,"]")):No(e,r?.name||"","type-name",n,o1(t,r))}Xs(Kf,"renderType");function kp(e,t,n){const{description:r}=n;if(r){const i=document.createElement("div");i.className="info-description",t.renderDescription?i.innerHTML=t.renderDescription(r):i.append(document.createTextNode(r)),e.append(i)}D4(e,t,n)}Xs(kp,"renderDescription");function D4(e,t,n){const r=n.deprecationReason;if(r){const i=document.createElement("div");i.className="info-deprecation",e.append(i);const o=document.createElement("span");o.className="info-deprecation-label",o.append(document.createTextNode("Deprecated")),i.append(o);const l=document.createElement("div");l.className="info-deprecation-reason",t.renderDescription?l.innerHTML=t.renderDescription(r):l.append(document.createTextNode(r)),i.append(l)}}Xs(D4,"renderDeprecation");function No(e,t,n="",r={onClick:null},i=null){if(n){const{onClick:o}=r;let l;o?(l=document.createElement("a"),l.href="javascript:void 0",l.addEventListener("click",c=>{c.preventDefault(),o(i,c)})):l=document.createElement("span"),l.className=n,l.append(document.createTextNode(t)),e.append(l)}else e.append(document.createTextNode(t))}Xs(No,"text");const Hre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Gre=Object.defineProperty,Hl=(e,t)=>Gre(e,"name",{value:t,configurable:!0});qt.defineOption("jump",!1,(e,t,n)=>{if(n&&n!==qt.Init){const r=e.state.jump.onMouseOver;qt.off(e.getWrapperElement(),"mouseover",r);const i=e.state.jump.onMouseOut;qt.off(e.getWrapperElement(),"mouseout",i),qt.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const r=e.state.jump={options:t,onMouseOver:k4.bind(null,e),onMouseOut:R4.bind(null,e),onKeyDown:M4.bind(null,e)};qt.on(e.getWrapperElement(),"mouseover",r.onMouseOver),qt.on(e.getWrapperElement(),"mouseout",r.onMouseOut),qt.on(document,"keydown",r.onKeyDown)}});function k4(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement)||n?.nodeName!=="SPAN")return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&n_(e)}Hl(k4,"onMouseOver");function R4(e){if(!e.state.jump.isHoldingModifier&&e.state.jump.cursor){e.state.jump.cursor=null;return}e.state.jump.isHoldingModifier&&e.state.jump.marker&&r_(e)}Hl(R4,"onMouseOut");function M4(e,t){if(e.state.jump.isHoldingModifier||!L4(t.key))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&n_(e);const n=Hl(o=>{o.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&r_(e),qt.off(document,"keyup",n),qt.off(document,"click",r),e.off("mousedown",i))},"onKeyUp"),r=Hl(o=>{const{destination:l,options:c}=e.state.jump;l&&c.onClick(l,o)},"onClick"),i=Hl((o,l)=>{e.state.jump.destination&&(l.codemirrorIgnore=!0)},"onMouseDown");qt.on(document,"keyup",n),qt.on(document,"click",r),e.on("mousedown",i)}Hl(M4,"onKeyDown");const Yre=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function L4(e){return e===(Yre?"Meta":"Control")}Hl(L4,"isJumpModifier");function n_(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),i=e.getTokenAt(r,!0),o=n.getDestination||e.getHelper(r,"jump");if(o){const l=o(i,n,e);if(l){const c=e.markText({line:r.line,ch:i.start},{line:r.line,ch:i.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=c,e.state.jump.destination=l}}}Hl(n_,"enableJumpMode");function r_(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}Hl(r_,"disableJumpMode"),qt.registerHelper("jump","graphql",(e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:i}=n,o=WC(t.schema,n);if(r==="Field"&&i===0&&o.fieldDef||r==="AliasedField"&&i===2&&o.fieldDef)return KC(o);if(r==="Directive"&&i===1&&o.directiveDef)return XC(o);if(r==="Argument"&&i===0&&o.argDef)return ZC(o);if(r==="EnumValue"&&o.enumValue)return JC(o);if(r==="NamedType"&&o.type)return o1(o)});const Wre=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Qre=Object.defineProperty,Kre=(e,t)=>Qre(e,"name",{value:t,configurable:!0});function a1(e,t){var n,r;const{levels:i,indentLevel:o}=e;return((!i||i.length===0?o:i.at(-1)-(!((n=this.electricInput)===null||n===void 0)&&n.test(t)?1:0))||0)*(((r=this.config)===null||r===void 0?void 0:r.indentUnit)||0)}Kre(a1,"indent");var Xre=Object.defineProperty,Zre=(e,t)=>Xre(e,"name",{value:t,configurable:!0});const Jre=Zre(e=>{const t=bm({eatWhitespace:n=>n.eatWhile(_D),lexRules:ND,parseRules:AD,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a1,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");qt.defineMode("graphql",Jre);const eie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var tie=Object.defineProperty,sc=(e,t)=>tie(e,"name",{value:t,configurable:!0});function Xf(e,t,n){const r=I4(n,i_(t.string));if(!r)return;const i=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:r,from:{line:e.line,ch:i},to:{line:e.line,ch:t.end}}}sc(Xf,"hintList");function I4(e,t){if(!t)return s1(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:F4(i_(r.text),t),entry:r}));return s1(s1(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.text.length-i.entry.text.length).map(r=>r.entry)}sc(I4,"filterAndSortList");function s1(e,t){const n=e.filter(t);return n.length===0?e:n}sc(s1,"filterNonEmpty");function i_(e){return e.toLowerCase().replaceAll(/\W/g,"")}sc(i_,"normalizeText");function F4(e,t){let n=P4(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}sc(F4,"getProximity");function P4(e,t){let n,r;const i=[],o=e.length,l=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=l;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=l;r++){const c=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+c),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+c))}return i[o][l]}sc(P4,"lexicalDistance"),qt.registerHelper("hint","graphql-variables",(e,t)=>{const n=e.getCursor(),r=e.getTokenAt(n),i=j4(n,r,t);return i!=null&&i.list&&i.list.length>0&&(i.from=qt.Pos(i.from.line,i.from.ch),i.to=qt.Pos(i.to.line,i.to.ch),qt.signal(e,"hasCompletion",e,i,r)),i});function j4(e,t,n){const r=t.state.kind==="Invalid"?t.state.prevState:t.state,{kind:i,step:o}=r;if(i==="Document"&&o===0)return Xf(e,t,[{text:"{"}]);const{variableToType:l}=n;if(!l)return;const c=V4(l,t.state);if(i==="Document"||i==="Variable"&&o===0){const p=Object.keys(l);return Xf(e,t,p.map(d=>({text:`"${d}": `,type:l[d]})))}if((i==="ObjectValue"||i==="ObjectField"&&o===0)&&c.fields){const p=Object.keys(c.fields).map(d=>c.fields[d]);return Xf(e,t,p.map(d=>({text:`"${d.name}": `,type:d.type,description:d.description})))}if(i==="StringValue"||i==="NumberValue"||i==="BooleanValue"||i==="NullValue"||i==="ListValue"&&o===1||i==="ObjectField"&&o===2||i==="Variable"&&o===2){const p=c.type?gn(c.type):void 0;if(p instanceof so)return Xf(e,t,[{text:"{"}]);if(p instanceof Hi){const d=p.getValues();return Xf(e,t,d.map(m=>({text:`"${m.name}"`,type:p,description:m.description})))}if(p===Zn)return Xf(e,t,[{text:"true",type:Zn,description:"Not false."},{text:"false",type:Zn,description:"Not true."}])}}sc(j4,"getVariablesHint");function V4(e,t){const n={type:null,fields:null};return YC(t,r=>{switch(r.kind){case"Variable":{n.type=e[r.name];break}case"ListValue":{const i=n.type?Mu(n.type):void 0;n.type=i instanceof lr?i.ofType:null;break}case"ObjectValue":{const i=n.type?gn(n.type):void 0;n.fields=i instanceof so?i.getFields():null;break}case"ObjectField":{const i=r.name&&n.fields?n.fields[r.name]:null;n.type=i?.type;break}}}),n}sc(V4,"getTypeInfo");const nie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var rie=Object.defineProperty,Br=(e,t)=>rie(e,"name",{value:t,configurable:!0});function U4(e){Zs=e,l1=e.length,fi=Ki=wg=-1,Kr(),_g();const t=o_();return Gl("EOF"),t}Br(U4,"jsonParse");let Zs,l1,fi,Ki,wg,Nn,Qo;function o_(){const e=fi,t=[];if(Gl("{"),!Cg("}")){do t.push(q4());while(Cg(","));Gl("}")}return{kind:"Object",start:e,end:wg,members:t}}Br(o_,"parseObj");function q4(){const e=fi,t=Qo==="String"?s_():null;Gl("String"),Gl(":");const n=a_();return{kind:"Member",start:e,end:wg,key:t,value:n}}Br(q4,"parseMember");function B4(){const e=fi,t=[];if(Gl("["),!Cg("]")){do t.push(a_());while(Cg(","));Gl("]")}return{kind:"Array",start:e,end:wg,values:t}}Br(B4,"parseArr");function a_(){switch(Qo){case"[":return B4();case"{":return o_();case"String":case"Number":case"Boolean":case"Null":const e=s_();return _g(),e}Gl("Value")}Br(a_,"parseVal");function s_(){return{kind:Qo,start:fi,end:Ki,value:JSON.parse(Zs.slice(fi,Ki))}}Br(s_,"curToken");function Gl(e){if(Qo===e){_g();return}let t;if(Qo==="EOF")t="[end of file]";else if(Ki-fi>1)t="`"+Zs.slice(fi,Ki)+"`";else{const n=Zs.slice(fi).match(/^.+?\b/);t="`"+(n?n[0]:Zs[fi])+"`"}throw Zf(`Expected ${e} but found ${t}.`)}Br(Gl,"expect");class l_ extends Error{constructor(t,n){super(t),this.position=n}}Br(l_,"JSONSyntaxError");function Zf(e){return new l_(e,{start:fi,end:Ki})}Br(Zf,"syntaxError");function Cg(e){if(Qo===e)return _g(),!0}Br(Cg,"skip");function Kr(){return Ki<l1&&(Ki++,Nn=Ki===l1?0:Zs.charCodeAt(Ki)),Nn}Br(Kr,"ch");function _g(){for(wg=Ki;Nn===9||Nn===10||Nn===13||Nn===32;)Kr();if(Nn===0){Qo="EOF";return}switch(fi=Ki,Nn){case 34:return Qo="String",$4();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Qo="Number",z4();case 102:if(Zs.slice(fi,fi+5)!=="false")break;Ki+=4,Kr(),Qo="Boolean";return;case 110:if(Zs.slice(fi,fi+4)!=="null")break;Ki+=3,Kr(),Qo="Null";return;case 116:if(Zs.slice(fi,fi+4)!=="true")break;Ki+=3,Kr(),Qo="Boolean";return}Qo=Zs[fi],Kr()}Br(_g,"lex");function $4(){for(Kr();Nn!==34&&Nn>31;)if(Nn===92)switch(Nn=Kr(),Nn){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:Kr();break;case 117:Kr(),Ng(),Ng(),Ng(),Ng();break;default:throw Zf("Bad character escape sequence.")}else{if(Ki===l1)throw Zf("Unterminated string.");Kr()}if(Nn===34){Kr();return}throw Zf("Unterminated string.")}Br($4,"readString");function Ng(){if(Nn>=48&&Nn<=57||Nn>=65&&Nn<=70||Nn>=97&&Nn<=102)return Kr();throw Zf("Expected hexadecimal digit.")}Br(Ng,"readHex");function z4(){Nn===45&&Kr(),Nn===48?Kr():u1(),Nn===46&&(Kr(),u1()),(Nn===69||Nn===101)&&(Nn=Kr(),(Nn===43||Nn===45)&&Kr(),u1())}Br(z4,"readNumber");function u1(){if(Nn<48||Nn>57)throw Zf("Expected decimal digit.");do Kr();while(Nn>=48&&Nn<=57)}Br(u1,"readDigits"),qt.registerHelper("lint","graphql-variables",(e,t,n)=>{if(!e)return[];let r;try{r=U4(e)}catch(o){if(o instanceof l_)return[c1(n,o.position,o.message)];throw o}const{variableToType:i}=t;return i?H4(n,i,r):[]});function H4(e,t,n){var r;const i=[];for(const o of n.members)if(o){const l=(r=o.key)===null||r===void 0?void 0:r.value,c=t[l];if(c)for(const[p,d]of Rp(c,o.value))i.push(c1(e,p,d));else i.push(c1(e,o.key,`Variable "$${l}" does not appear in any GraphQL query.`))}return i}Br(H4,"validateVariables");function Rp(e,t){if(!e||!t)return[];if(e instanceof Pt)return t.kind==="Null"?[[t,`Type "${e}" is non-nullable and cannot be null.`]]:Rp(e.ofType,t);if(t.kind==="Null")return[];if(e instanceof lr){const n=e.ofType;if(t.kind==="Array"){const r=t.values||[];return u_(r,i=>Rp(n,i))}return Rp(n,t)}if(e instanceof so){if(t.kind!=="Object")return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=u_(t.members,i=>{var o;const l=(o=i?.key)===null||o===void 0?void 0:o.value;n[l]=!0;const c=e.getFields()[l];if(!c)return[[i.key,`Type "${e}" does not have a field "${l}".`]];const p=c?c.type:void 0;return Rp(p,i.value)});for(const i of Object.keys(e.getFields())){const o=e.getFields()[i];!n[i]&&o.type instanceof Pt&&!o.defaultValue&&r.push([t,`Object of type "${e}" is missing required field "${i}".`])}return r}return e.name==="Boolean"&&t.kind!=="Boolean"||e.name==="String"&&t.kind!=="String"||e.name==="ID"&&t.kind!=="Number"&&t.kind!=="String"||e.name==="Float"&&t.kind!=="Number"||e.name==="Int"&&(t.kind!=="Number"||(t.value|0)!==t.value)?[[t,`Expected value of type "${e}".`]]:(e instanceof Hi||e instanceof ma)&&(t.kind!=="String"&&t.kind!=="Number"&&t.kind!=="Boolean"&&t.kind!=="Null"||G4(e.parseValue(t.value)))?[[t,`Expected value of type "${e}".`]]:[]}Br(Rp,"validateValue");function c1(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}Br(c1,"lintError");function G4(e){return e==null||e!==e}Br(G4,"isNullish");function u_(e,t){return Array.prototype.concat.apply([],e.map(t))}Br(u_,"mapCat");const iie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var oie=Object.defineProperty,aie=(e,t)=>oie(e,"name",{value:t,configurable:!0});qt.defineMode("graphql-variables",e=>{const t=bm({eatWhitespace:n=>n.eatSpace(),lexRules:sie,parseRules:lie,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a1,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const sie={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},lie={Document:[gt("{"),rn("Variable",vr(gt(","))),gt("}")],Variable:[c_("variable"),gt(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[$o("Number","number")],StringValue:[$o("String","string")],BooleanValue:[$o("Keyword","builtin")],NullValue:[$o("Keyword","keyword")],ListValue:[gt("["),rn("Value",vr(gt(","))),gt("]")],ObjectValue:[gt("{"),rn("ObjectField",vr(gt(","))),gt("}")],ObjectField:[c_("attribute"),gt(":"),"Value"]};function c_(e){return{style:e,match:t=>t.kind==="String",update(t,n){t.name=n.value.slice(1,-1)}}}aie(c_,"namedKey");const uie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));qt.defineMode("graphql-results",e=>{const t=bm({eatWhitespace:n=>n.eatSpace(),lexRules:cie,parseRules:fie,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a1,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const cie={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},fie={Document:[gt("{"),rn("Entry",gt(",")),gt("}")],Entry:[$o("String","def"),gt(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[$o("Number","number")],StringValue:[$o("String","string")],BooleanValue:[$o("Keyword","builtin")],NullValue:[$o("Keyword","keyword")],ListValue:[gt("["),rn("Value",gt(",")),gt("]")],ObjectValue:[gt("{"),rn("ObjectField",gt(",")),gt("}")],ObjectField:[$o("String","property"),gt(":"),"Value"]},die=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));Fd.renderYogaGraphiQL=Yne,Object.defineProperty(Fd,Symbol.toStringTag,{value:"Module"})});