var sY=Object.defineProperty;var v8=t=>{throw TypeError(t)};var aY=(t,e,n)=>e in t?sY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Gn=(t,e,n)=>aY(t,typeof e!="symbol"?e+"":e,n),Hj=(t,e,n)=>e.has(t)||v8("Cannot "+n);var q=(t,e,n)=>(Hj(t,e,"read from private field"),n?n.call(t):e.get(t)),Ze=(t,e,n)=>e.has(t)?v8("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ee=(t,e,n,r)=>(Hj(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),$e=(t,e,n)=>(Hj(t,e,"access private method"),n);var jd=(t,e,n,r)=>({set _(i){Ee(t,e,i,n)},get _(){return q(t,e,r)}});function oY(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function M9(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var zj={exports:{}},Z0={};/**
 * @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 b8;function lY(){if(b8)return Z0;b8=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return Z0.Fragment=e,Z0.jsx=n,Z0.jsxs=n,Z0}var y8;function cY(){return y8||(y8=1,zj.exports=lY()),zj.exports}var a=cY(),qj={exports:{}},Vt={};/**
 * @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 x8;function uY(){if(x8)return Vt;x8=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function v(W){return W===null||typeof W!="object"?null:(W=m&&W[m]||W["@@iterator"],typeof W=="function"?W:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function A(W,X,V){this.props=W,this.context=X,this.refs=w,this.updater=V||b}A.prototype.isReactComponent={},A.prototype.setState=function(W,X){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,X,"setState")},A.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function j(){}j.prototype=A.prototype;function C(W,X,V){this.props=W,this.context=X,this.refs=w,this.updater=V||b}var _=C.prototype=new j;_.constructor=C,x(_,A.prototype),_.isPureReactComponent=!0;var S=Array.isArray;function O(){}var E={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function N(W,X,V){var te=V.ref;return{$$typeof:t,type:W,key:X,ref:te!==void 0?te:null,props:V}}function I(W,X){return N(W.type,X,W.props)}function R(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function L(W){var X={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(V){return X[V]})}var Q=/\/+/g;function z(W,X){return typeof W=="object"&&W!==null&&W.key!=null?L(""+W.key):X.toString(36)}function H(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(O,O):(W.status="pending",W.then(function(X){W.status==="pending"&&(W.status="fulfilled",W.value=X)},function(X){W.status==="pending"&&(W.status="rejected",W.reason=X)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function P(W,X,V,te,le){var be=typeof W;(be==="undefined"||be==="boolean")&&(W=null);var ye=!1;if(W===null)ye=!0;else switch(be){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(W.$$typeof){case t:case e:ye=!0;break;case f:return ye=W._init,P(ye(W._payload),X,V,te,le)}}if(ye)return le=le(W),ye=te===""?"."+z(W,0):te,S(le)?(V="",ye!=null&&(V=ye.replace(Q,"$&/")+"/"),P(le,X,V,"",function(Re){return Re})):le!=null&&(R(le)&&(le=I(le,V+(le.key==null||W&&W.key===le.key?"":(""+le.key).replace(Q,"$&/")+"/")+ye)),X.push(le)),1;ye=0;var Xe=te===""?".":te+":";if(S(W))for(var ze=0;ze<W.length;ze++)te=W[ze],be=Xe+z(te,ze),ye+=P(te,X,V,be,le);else if(ze=v(W),typeof ze=="function")for(W=ze.call(W),ze=0;!(te=W.next()).done;)te=te.value,be=Xe+z(te,ze++),ye+=P(te,X,V,be,le);else if(be==="object"){if(typeof W.then=="function")return P(H(W),X,V,te,le);throw X=String(W),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(W,X,V){if(W==null)return W;var te=[],le=0;return P(W,te,"","",function(be){return X.call(V,be,le++)}),te}function U(W){if(W._status===-1){var X=W._result;X=X(),X.then(function(V){(W._status===0||W._status===-1)&&(W._status=1,W._result=V)},function(V){(W._status===0||W._status===-1)&&(W._status=2,W._result=V)}),W._status===-1&&(W._status=0,W._result=X)}if(W._status===1)return W._result.default;throw W._result}var Z=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},G={map:F,forEach:function(W,X,V){F(W,function(){X.apply(this,arguments)},V)},count:function(W){var X=0;return F(W,function(){X++}),X},toArray:function(W){return F(W,function(X){return X})||[]},only:function(W){if(!R(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return Vt.Activity=p,Vt.Children=G,Vt.Component=A,Vt.Fragment=n,Vt.Profiler=i,Vt.PureComponent=C,Vt.StrictMode=r,Vt.Suspense=u,Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Vt.__COMPILER_RUNTIME={__proto__:null,c:function(W){return E.H.useMemoCache(W)}},Vt.cache=function(W){return function(){return W.apply(null,arguments)}},Vt.cacheSignal=function(){return null},Vt.cloneElement=function(W,X,V){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var te=x({},W.props),le=W.key;if(X!=null)for(be in X.key!==void 0&&(le=""+X.key),X)!D.call(X,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&X.ref===void 0||(te[be]=X[be]);var be=arguments.length-2;if(be===1)te.children=V;else if(1<be){for(var ye=Array(be),Xe=0;Xe<be;Xe++)ye[Xe]=arguments[Xe+2];te.children=ye}return N(W.type,le,te)},Vt.createContext=function(W){return W={$$typeof:o,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:s,_context:W},W},Vt.createElement=function(W,X,V){var te,le={},be=null;if(X!=null)for(te in X.key!==void 0&&(be=""+X.key),X)D.call(X,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(le[te]=X[te]);var ye=arguments.length-2;if(ye===1)le.children=V;else if(1<ye){for(var Xe=Array(ye),ze=0;ze<ye;ze++)Xe[ze]=arguments[ze+2];le.children=Xe}if(W&&W.defaultProps)for(te in ye=W.defaultProps,ye)le[te]===void 0&&(le[te]=ye[te]);return N(W,be,le)},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(W){return{$$typeof:l,render:W}},Vt.isValidElement=R,Vt.lazy=function(W){return{$$typeof:f,_payload:{_status:-1,_result:W},_init:U}},Vt.memo=function(W,X){return{$$typeof:h,type:W,compare:X===void 0?null:X}},Vt.startTransition=function(W){var X=E.T,V={};E.T=V;try{var te=W(),le=E.S;le!==null&&le(V,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(O,Z)}catch(be){Z(be)}finally{X!==null&&V.types!==null&&(X.types=V.types),E.T=X}},Vt.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Vt.use=function(W){return E.H.use(W)},Vt.useActionState=function(W,X,V){return E.H.useActionState(W,X,V)},Vt.useCallback=function(W,X){return E.H.useCallback(W,X)},Vt.useContext=function(W){return E.H.useContext(W)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(W,X){return E.H.useDeferredValue(W,X)},Vt.useEffect=function(W,X){return E.H.useEffect(W,X)},Vt.useEffectEvent=function(W){return E.H.useEffectEvent(W)},Vt.useId=function(){return E.H.useId()},Vt.useImperativeHandle=function(W,X,V){return E.H.useImperativeHandle(W,X,V)},Vt.useInsertionEffect=function(W,X){return E.H.useInsertionEffect(W,X)},Vt.useLayoutEffect=function(W,X){return E.H.useLayoutEffect(W,X)},Vt.useMemo=function(W,X){return E.H.useMemo(W,X)},Vt.useOptimistic=function(W,X){return E.H.useOptimistic(W,X)},Vt.useReducer=function(W,X,V){return E.H.useReducer(W,X,V)},Vt.useRef=function(W){return E.H.useRef(W)},Vt.useState=function(W){return E.H.useState(W)},Vt.useSyncExternalStore=function(W,X,V){return E.H.useSyncExternalStore(W,X,V)},Vt.useTransition=function(){return E.H.useTransition()},Vt.version="19.2.4",Vt}var A8;function qv(){return A8||(A8=1,qj.exports=uY()),qj.exports}var M=qv();const Cn=ll(M),D9=oY({__proto__:null,default:Cn},[M]);var $j={exports:{}},J0={},Qj={exports:{}},Uj={};/**
 * @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 w8;function hY(){return w8||(w8=1,function(t){function e(P,F){var U=P.length;P.push(F);e:for(;0<U;){var Z=U-1>>>1,G=P[Z];if(0<i(G,F))P[Z]=F,P[U]=G,U=Z;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var F=P[0],U=P.pop();if(U!==F){P[0]=U;e:for(var Z=0,G=P.length,W=G>>>1;Z<W;){var X=2*(Z+1)-1,V=P[X],te=X+1,le=P[te];if(0>i(V,U))te<G&&0>i(le,V)?(P[Z]=le,P[te]=U,Z=te):(P[Z]=V,P[X]=U,Z=X);else if(te<G&&0>i(le,U))P[Z]=le,P[te]=U,Z=te;else break e}}return F}function i(P,F){var U=P.sortIndex-F.sortIndex;return U!==0?U:P.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],h=[],f=1,p=null,m=3,v=!1,b=!1,x=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function _(P){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=P)r(h),F.sortIndex=F.expirationTime,e(u,F);else break;F=n(h)}}function S(P){if(x=!1,_(P),!b)if(n(u)!==null)b=!0,O||(O=!0,L());else{var F=n(h);F!==null&&H(S,F.startTime-P)}}var O=!1,E=-1,D=5,N=-1;function I(){return w?!0:!(t.unstable_now()-N<D)}function R(){if(w=!1,O){var P=t.unstable_now();N=P;var F=!0;try{e:{b=!1,x&&(x=!1,j(E),E=-1),v=!0;var U=m;try{t:{for(_(P),p=n(u);p!==null&&!(p.expirationTime>P&&I());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var G=Z(p.expirationTime<=P);if(P=t.unstable_now(),typeof G=="function"){p.callback=G,_(P),F=!0;break t}p===n(u)&&r(u),_(P)}else r(u);p=n(u)}if(p!==null)F=!0;else{var W=n(h);W!==null&&H(S,W.startTime-P),F=!1}}break e}finally{p=null,m=U,v=!1}F=void 0}}finally{F?L():O=!1}}}var L;if(typeof C=="function")L=function(){C(R)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,z=Q.port2;Q.port1.onmessage=R,L=function(){z.postMessage(null)}}else L=function(){A(R,0)};function H(P,F){E=A(function(){P(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(P){switch(m){case 1:case 2:case 3:var F=3;break;default:F=m}var U=m;m=F;try{return P()}finally{m=U}},t.unstable_requestPaint=function(){w=!0},t.unstable_runWithPriority=function(P,F){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var U=m;m=P;try{return F()}finally{m=U}},t.unstable_scheduleCallback=function(P,F,U){var Z=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Z+U:Z):U=Z,P){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=U+G,P={id:f++,callback:F,priorityLevel:P,startTime:U,expirationTime:G,sortIndex:-1},U>Z?(P.sortIndex=U,e(h,P),n(u)===null&&P===n(h)&&(x?(j(E),E=-1):x=!0,H(S,U-Z))):(P.sortIndex=G,e(u,P),b||v||(b=!0,O||(O=!0,L()))),P},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(P){var F=m;return function(){var U=m;m=F;try{return P.apply(this,arguments)}finally{m=U}}}}(Uj)),Uj}var S8;function dY(){return S8||(S8=1,Qj.exports=hY()),Qj.exports}var Wj={exports:{}},As={};/**
 * @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 j8;function fY(){if(j8)return As;j8=1;var t=qv();function e(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)h+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+h+" 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(e(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 s(u,h,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:u,containerInfo:h,implementation:f}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return As.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,As.createPortal=function(u,h){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(u,h,null,f)},As.flushSync=function(u){var h=o.T,f=r.p;try{if(o.T=null,r.p=2,u)return u()}finally{o.T=h,r.p=f,r.d.f()}},As.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(u,h))},As.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},As.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var f=h.as,p=l(f,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;f==="style"?r.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:v}):f==="script"&&r.d.X(u,{crossOrigin:p,integrity:m,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},As.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var f=l(h.as,h.crossOrigin);r.d.M(u,{crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(u)},As.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var f=h.as,p=l(f,h.crossOrigin);r.d.L(u,f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},As.preloadModule=function(u,h){if(typeof u=="string")if(h){var f=l(h.as,h.crossOrigin);r.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(u)},As.requestFormReset=function(u){r.d.r(u)},As.unstable_batchedUpdates=function(u,h){return u(h)},As.useFormState=function(u,h,f){return o.H.useFormState(u,h,f)},As.useFormStatus=function(){return o.H.useHostTransitionStatus()},As.version="19.2.4",As}var C8;function R9(){if(C8)return Wj.exports;C8=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Wj.exports=fY(),Wj.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 _8;function pY(){if(_8)return J0;_8=1;var t=dY(),e=qv(),n=R9();function r(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function s(c){var d=c,g=c;if(c.alternate)for(;d.return;)d=d.return;else{c=d;do d=c,(d.flags&4098)!==0&&(g=d.return),c=d.return;while(c)}return d.tag===3?g:null}function o(c){if(c.tag===13){var d=c.memoizedState;if(d===null&&(c=c.alternate,c!==null&&(d=c.memoizedState)),d!==null)return d.dehydrated}return null}function l(c){if(c.tag===31){var d=c.memoizedState;if(d===null&&(c=c.alternate,c!==null&&(d=c.memoizedState)),d!==null)return d.dehydrated}return null}function u(c){if(s(c)!==c)throw Error(r(188))}function h(c){var d=c.alternate;if(!d){if(d=s(c),d===null)throw Error(r(188));return d!==c?null:c}for(var g=c,y=d;;){var T=g.return;if(T===null)break;var k=T.alternate;if(k===null){if(y=T.return,y!==null){g=y;continue}break}if(T.child===k.child){for(k=T.child;k;){if(k===g)return u(T),c;if(k===y)return u(T),d;k=k.sibling}throw Error(r(188))}if(g.return!==y.return)g=T,y=k;else{for(var B=!1,K=T.child;K;){if(K===g){B=!0,g=T,y=k;break}if(K===y){B=!0,y=T,g=k;break}K=K.sibling}if(!B){for(K=k.child;K;){if(K===g){B=!0,g=k,y=T;break}if(K===y){B=!0,y=k,g=T;break}K=K.sibling}if(!B)throw Error(r(189))}}if(g.alternate!==y)throw Error(r(190))}if(g.tag!==3)throw Error(r(188));return g.stateNode.current===g?c:d}function f(c){var d=c.tag;if(d===5||d===26||d===27||d===6)return c;for(c=c.child;c!==null;){if(d=f(c),d!==null)return d;c=c.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),C=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function L(c){return c===null||typeof c!="object"?null:(c=R&&c[R]||c["@@iterator"],typeof c=="function"?c:null)}var Q=Symbol.for("react.client.reference");function z(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===Q?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case x:return"Fragment";case A:return"Profiler";case w:return"StrictMode";case S:return"Suspense";case O:return"SuspenseList";case N:return"Activity"}if(typeof c=="object")switch(c.$$typeof){case b:return"Portal";case C:return c.displayName||"Context";case j:return(c._context.displayName||"Context")+".Consumer";case _:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case E:return d=c.displayName||null,d!==null?d:z(c.type)||"Memo";case D:d=c._payload,c=c._init;try{return z(c(d))}catch{}}return null}var H=Array.isArray,P=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},Z=[],G=-1;function W(c){return{current:c}}function X(c){0>G||(c.current=Z[G],Z[G]=null,G--)}function V(c,d){G++,Z[G]=c.current,c.current=d}var te=W(null),le=W(null),be=W(null),ye=W(null);function Xe(c,d){switch(V(be,d),V(le,c),V(te,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?HD(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=HD(d),c=zD(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}X(te),V(te,c)}function ze(){X(te),X(le),X(be)}function Re(c){c.memoizedState!==null&&V(ye,c);var d=te.current,g=zD(d,c.type);d!==g&&(V(le,c),V(te,g))}function ae(c){le.current===c&&(X(te),X(le)),ye.current===c&&(X(ye),Y0._currentValue=U)}var je,pe;function ke(c){if(je===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);je=d&&d[1]||"",pe=-1<g.stack.indexOf(`
    at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
`+je+c+pe}var gt=!1;function We(c,d){if(!c||gt)return"";gt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(d){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(Ce){var Se=Ce}Reflect.construct(c,[],Be)}else{try{Be.call()}catch(Ce){Se=Ce}c.call(Be.prototype)}}else{try{throw Error()}catch(Ce){Se=Ce}(Be=c())&&typeof Be.catch=="function"&&Be.catch(function(){})}}catch(Ce){if(Ce&&Se&&typeof Ce.stack=="string")return[Ce.stack,Se.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=y.DetermineComponentFrameRoot(),B=k[0],K=k[1];if(B&&K){var ne=B.split(`
`),Ae=K.split(`
`);for(T=y=0;y<ne.length&&!ne[y].includes("DetermineComponentFrameRoot");)y++;for(;T<Ae.length&&!Ae[T].includes("DetermineComponentFrameRoot");)T++;if(y===ne.length||T===Ae.length)for(y=ne.length-1,T=Ae.length-1;1<=y&&0<=T&&ne[y]!==Ae[T];)T--;for(;1<=y&&0<=T;y--,T--)if(ne[y]!==Ae[T]){if(y!==1||T!==1)do if(y--,T--,0>T||ne[y]!==Ae[T]){var _e=`
`+ne[y].replace(" at new "," at ");return c.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",c.displayName)),_e}while(1<=y&&0<=T);break}}}finally{gt=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?ke(g):""}function Le(c,d){switch(c.tag){case 26:case 27:case 5:return ke(c.type);case 16:return ke("Lazy");case 13:return c.child!==d&&d!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return We(c.type,!1);case 11:return We(c.type.render,!1);case 1:return We(c.type,!0);case 31:return ke("Activity");default:return""}}function Fe(c){try{var d="",g=null;do d+=Le(c,g),g=c,c=c.return;while(c);return d}catch(y){return`
Error generating stack: `+y.message+`
`+y.stack}}var Ne=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,qt=t.unstable_cancelCallback,et=t.unstable_shouldYield,Je=t.unstable_requestPaint,Ue=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,st=t.unstable_ImmediatePriority,he=t.unstable_UserBlockingPriority,dt=t.unstable_NormalPriority,sn=t.unstable_LowPriority,Kt=t.unstable_IdlePriority,un=t.log,Zt=t.unstable_setDisableYieldValue,Pt=null,Mt=null;function Et(c){if(typeof un=="function"&&Zt(c),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Pt,c)}catch{}}var Ut=Math.clz32?Math.clz32:Tt,ei=Math.log,yt=Math.LN2;function Tt(c){return c>>>=0,c===0?32:31-(ei(c)/yt|0)|0}var qn=256,Ht=262144,dr=4194304;function Mn(c){var d=c&42;if(d!==0)return d;switch(c&-c){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:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function se(c,d,g){var y=c.pendingLanes;if(y===0)return 0;var T=0,k=c.suspendedLanes,B=c.pingedLanes;c=c.warmLanes;var K=y&134217727;return K!==0?(y=K&~k,y!==0?T=Mn(y):(B&=K,B!==0?T=Mn(B):g||(g=K&~c,g!==0&&(T=Mn(g))))):(K=y&~k,K!==0?T=Mn(K):B!==0?T=Mn(B):g||(g=y&~c,g!==0&&(T=Mn(g)))),T===0?0:d!==0&&d!==T&&(d&k)===0&&(k=T&-T,g=d&-d,k>=g||k===32&&(g&4194048)!==0)?d:T}function Te(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function tt(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 Dt(){var c=dr;return dr<<=1,(dr&62914560)===0&&(dr=4194304),c}function Dn(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function an(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function nt(c,d,g,y,T,k){var B=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var K=c.entanglements,ne=c.expirationTimes,Ae=c.hiddenUpdates;for(g=B&~g;0<g;){var _e=31-Ut(g),Be=1<<_e;K[_e]=0,ne[_e]=-1;var Se=Ae[_e];if(Se!==null)for(Ae[_e]=null,_e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce!==null&&(Ce.lane&=-536870913)}g&=~Be}y!==0&&rt(c,y,0),k!==0&&T===0&&c.tag!==0&&(c.suspendedLanes|=k&~(B&~d))}function rt(c,d,g){c.pendingLanes|=d,c.suspendedLanes&=~d;var y=31-Ut(d);c.entangledLanes|=d,c.entanglements[y]=c.entanglements[y]|1073741824|g&261930}function Ke(c,d){var g=c.entangledLanes|=d;for(c=c.entanglements;g;){var y=31-Ut(g),T=1<<y;T&d|c[y]&d&&(c[y]|=d),g&=~T}}function Wt(c,d){var g=d&-d;return g=(g&42)!==0?1:Jt(g),(g&(c.suspendedLanes|d))!==0?0:g}function Jt(c){switch(c){case 2:c=1;break;case 8:c=4;break;case 32:c=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:c=128;break;case 268435456:c=134217728;break;default:c=0}return c}function Ai(c){return c&=-c,2<c?8<c?(c&134217727)!==0?32:268435456:8:2}function hs(){var c=F.p;return c!==0?c:(c=window.event,c===void 0?32:u8(c.type))}function oc(c,d){var g=F.p;try{return F.p=c,d()}finally{F.p=g}}var fa=Math.random().toString(36).slice(2),Br="__reactFiber$"+fa,Mi="__reactProps$"+fa,ds="__reactContainer$"+fa,rd="__reactEvents$"+fa,dl="__reactListeners$"+fa,lc="__reactHandles$"+fa,pa="__reactResources$"+fa,vr="__reactMarker$"+fa;function Or(c){delete c[Br],delete c[Mi],delete c[rd],delete c[dl],delete c[lc]}function An(c){var d=c[Br];if(d)return d;for(var g=c.parentNode;g;){if(d=g[ds]||g[Br]){if(g=d.alternate,d.child!==null||g!==null&&g.child!==null)for(c=YD(c);c!==null;){if(g=c[Br])return g;c=YD(c)}return d}c=g,g=c.parentNode}return null}function Qs(c){if(c=c[Br]||c[ds]){var d=c.tag;if(d===5||d===6||d===13||d===31||d===26||d===27||d===3)return c}return null}function ci(c){var d=c.tag;if(d===5||d===26||d===27||d===6)return c.stateNode;throw Error(r(33))}function Us(c){var d=c[pa];return d||(d=c[pa]={hoistableStyles:new Map,hoistableScripts:new Map}),d}function Lr(c){c[vr]=!0}var fu=new Set,qa={};function fs(c,d){Qe(c,d),Qe(c+"Capture",d)}function Qe(c,d){for(qa[c]=d,c=0;c<d.length;c++)fu.add(d[c])}var Ct=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]*$"),en={},Sn={};function br(c){return Ne.call(Sn,c)?!0:Ne.call(en,c)?!1:Ct.test(c)?Sn[c]=!0:(en[c]=!0,!1)}function ui(c,d,g){if(br(d))if(g===null)c.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":c.removeAttribute(d);return;case"boolean":var y=d.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){c.removeAttribute(d);return}}c.setAttribute(d,""+g)}}function Yi(c,d,g){if(g===null)c.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(d);return}c.setAttribute(d,""+g)}}function $n(c,d,g,y){if(y===null)c.removeAttribute(g);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(g);return}c.setAttributeNS(d,g,""+y)}}function Qn(c){switch(typeof c){case"bigint":case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function ps(c){var d=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function pu(c,d,g){var y=Object.getOwnPropertyDescriptor(c.constructor.prototype,d);if(!c.hasOwnProperty(d)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,k=y.set;return Object.defineProperty(c,d,{configurable:!0,get:function(){return T.call(this)},set:function(B){g=""+B,k.call(this,B)}}),Object.defineProperty(c,d,{enumerable:y.enumerable}),{getValue:function(){return g},setValue:function(B){g=""+B},stopTracking:function(){c._valueTracker=null,delete c[d]}}}}function cc(c){if(!c._valueTracker){var d=ps(c)?"checked":"value";c._valueTracker=pu(c,d,""+c[d])}}function id(c){if(!c)return!1;var d=c._valueTracker;if(!d)return!0;var g=d.getValue(),y="";return c&&(y=ps(c)?c.checked?"true":"false":c.value),c=y,c!==g?(d.setValue(c),!0):!1}function mu(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var c0=/[\n"\\]/g;function Gi(c){return c.replace(c0,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function gu(c,d,g,y,T,k,B,K){c.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?c.type=B:c.removeAttribute("type"),d!=null?B==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Qn(d)):c.value!==""+Qn(d)&&(c.value=""+Qn(d)):B!=="submit"&&B!=="reset"||c.removeAttribute("value"),d!=null?hc(c,B,Qn(d)):g!=null?hc(c,B,Qn(g)):y!=null&&c.removeAttribute("value"),T==null&&k!=null&&(c.defaultChecked=!!k),T!=null&&(c.checked=T&&typeof T!="function"&&typeof T!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?c.name=""+Qn(K):c.removeAttribute("name")}function uc(c,d,g,y,T,k,B,K){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(c.type=k),d!=null||g!=null){if(!(k!=="submit"&&k!=="reset"||d!=null)){cc(c);return}g=g!=null?""+Qn(g):"",d=d!=null?""+Qn(d):g,K||d===c.value||(c.value=d),c.defaultValue=d}y=y??T,y=typeof y!="function"&&typeof y!="symbol"&&!!y,c.checked=K?c.checked:!!y,c.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(c.name=B),cc(c)}function hc(c,d,g){d==="number"&&mu(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function ti(c,d,g,y){if(c=c.options,d){d={};for(var T=0;T<g.length;T++)d["$"+g[T]]=!0;for(g=0;g<c.length;g++)T=d.hasOwnProperty("$"+c[g].value),c[g].selected!==T&&(c[g].selected=T),T&&y&&(c[g].defaultSelected=!0)}else{for(g=""+Qn(g),d=null,T=0;T<c.length;T++){if(c[T].value===g){c[T].selected=!0,y&&(c[T].defaultSelected=!0);return}d!==null||c[T].disabled||(d=c[T])}d!==null&&(d.selected=!0)}}function dc(c,d,g){if(d!=null&&(d=""+Qn(d),d!==c.value&&(c.value=d),g==null)){c.defaultValue!==d&&(c.defaultValue=d);return}c.defaultValue=g!=null?""+Qn(g):""}function Co(c,d,g,y){if(d==null){if(y!=null){if(g!=null)throw Error(r(92));if(H(y)){if(1<y.length)throw Error(r(93));y=y[0]}g=y}g==null&&(g=""),d=g}g=Qn(d),c.defaultValue=g,y=c.textContent,y===g&&y!==""&&y!==null&&(c.value=y),cc(c)}function Rt(c,d){if(d){var g=c.firstChild;if(g&&g===c.lastChild&&g.nodeType===3){g.nodeValue=d;return}}c.textContent=d}var vu=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 $r(c,d,g){var y=d.indexOf("--")===0;g==null||typeof g=="boolean"||g===""?y?c.setProperty(d,""):d==="float"?c.cssFloat="":c[d]="":y?c.setProperty(d,g):typeof g!="number"||g===0||vu.has(d)?d==="float"?c.cssFloat=g:c[d]=(""+g).trim():c[d]=g+"px"}function Rn(c,d,g){if(d!=null&&typeof d!="object")throw Error(r(62));if(c=c.style,g!=null){for(var y in g)!g.hasOwnProperty(y)||d!=null&&d.hasOwnProperty(y)||(y.indexOf("--")===0?c.setProperty(y,""):y==="float"?c.cssFloat="":c[y]="");for(var T in d)y=d[T],d.hasOwnProperty(T)&&g[T]!==y&&$r(c,T,y)}else for(var k in d)d.hasOwnProperty(k)&&$r(c,k,d[k])}function fl(c){if(c.indexOf("-")===-1)return!1;switch(c){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 ms=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"]]),pl=/^[\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 $a(c){return pl.test(""+c)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":c}function Ge(){}var wt=null;function Bt(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var on=null,fr=null;function gs(c){var d=Qs(c);if(d&&(c=d.stateNode)){var g=c[Mi]||null;e:switch(c=d.stateNode,d.type){case"input":if(gu(c,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name),d=g.name,g.type==="radio"&&d!=null){for(g=c;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll('input[name="'+Gi(""+d)+'"][type="radio"]'),d=0;d<g.length;d++){var y=g[d];if(y!==c&&y.form===c.form){var T=y[Mi]||null;if(!T)throw Error(r(90));gu(y,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(d=0;d<g.length;d++)y=g[d],y.form===c.form&&id(y)}break e;case"textarea":dc(c,g.value,g.defaultValue);break e;case"select":d=g.value,d!=null&&ti(c,!!g.multiple,d,!1)}}}var fc=!1;function bu(c,d,g){if(fc)return c(d,g);fc=!0;try{var y=c(d);return y}finally{if(fc=!1,(on!==null||fr!==null)&&(vy(),on&&(d=on,c=fr,fr=on=null,gs(d),c)))for(d=0;d<c.length;d++)gs(c[d])}}function Qa(c,d){var g=c.stateNode;if(g===null)return null;var y=g[Mi]||null;if(y===null)return null;g=y[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(c=c.type,y=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!y;break e;default:c=!1}if(c)return null;if(g&&typeof g!="function")throw Error(r(231,d,typeof g));return g}var vs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),If=!1;if(vs)try{var yu={};Object.defineProperty(yu,"passive",{get:function(){If=!0}}),window.addEventListener("test",yu,yu),window.removeEventListener("test",yu,yu)}catch{If=!1}var Ms=null,ml=null,sd=null;function u0(){if(sd)return sd;var c,d=ml,g=d.length,y,T="value"in Ms?Ms.value:Ms.textContent,k=T.length;for(c=0;c<g&&d[c]===T[c];c++);var B=g-c;for(y=1;y<=B&&d[g-y]===T[k-y];y++);return sd=T.slice(c,1<y?1-y:void 0)}function Bn(c){var d=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&d===13&&(c=13)):c=d,c===10&&(c=13),32<=c||c===13?c:0}function Un(){return!0}function _o(){return!1}function _n(c){function d(g,y,T,k,B){this._reactName=g,this._targetInst=T,this.type=y,this.nativeEvent=k,this.target=B,this.currentTarget=null;for(var K in c)c.hasOwnProperty(K)&&(g=c[K],this[K]=g?g(k):k[K]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Un:_o,this.isPropagationStopped=_o,this}return p(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=Un)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),d}var pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fr=_n(pr),Nn=p({},pr,{view:0,detail:0}),xu=_n(Nn),Au,h0,Ws,Ds=p({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:d0,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==Ws&&(Ws&&c.type==="mousemove"?(Au=c.screenX-Ws.screenX,h0=c.screenY-Ws.screenY):h0=Au=0,Ws=c),Au)},movementY:function(c){return"movementY"in c?c.movementY:h0}}),Cb=_n(Ds),V2=p({},Ds,{dataTransfer:0}),Y2=_n(V2),G2=p({},Nn,{relatedTarget:0}),ma=_n(G2),gl=p({},pr,{animationName:0,elapsedTime:0,pseudoElement:0}),pc=_n(gl),wu=p({},pr,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),X2=_n(wu),Ua=p({},pr,{data:0}),_b=_n(Ua),Tb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kb={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"},ad={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function od(c){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(c):(c=ad[c])?!!d[c]:!1}function d0(){return od}var f0=p({},Nn,{key:function(c){if(c.key){var d=Tb[c.key]||c.key;if(d!=="Unidentified")return d}return c.type==="keypress"?(c=Bn(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?kb[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:d0,charCode:function(c){return c.type==="keypress"?Bn(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?Bn(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),K2=_n(f0),mc=p({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),To=_n(mc),ld=p({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:d0}),Ob=_n(ld),p0=p({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),m0=_n(p0),g0=p({},Ds,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),Eb=_n(g0),Mb=p({},pr,{newState:0,oldState:0}),Db=_n(Mb),Rb=[9,13,27,32],Bf=vs&&"CompositionEvent"in window,Su=null;vs&&"documentMode"in document&&(Su=document.documentMode);var Z2=vs&&"TextEvent"in window&&!Su,v0=vs&&(!Bf||Su&&8<Su&&11>=Su),b0=" ",gc=!1;function cd(c,d){switch(c){case"keyup":return Rb.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ni(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var vc=!1;function Qr(c,d){switch(c){case"compositionend":return ni(d);case"keypress":return d.which!==32?null:(gc=!0,b0);case"textInput":return c=d.data,c===b0&&gc?null:c;default:return null}}function Nb(c,d){if(vc)return c==="compositionend"||!Bf&&cd(c,d)?(c=u0(),sd=ml=Ms=null,vc=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return v0&&d.locale!=="ko"?null:d.data;default:return null}}var y0={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 ju(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d==="input"?!!y0[c.type]:d==="textarea"}function Pb(c,d,g,y){on?fr?fr.push(y):fr=[y]:on=y,d=jy(d,"onChange"),0<d.length&&(g=new Fr("onChange","change",null,g,y),c.push({event:g,listeners:d}))}var ud=null,bc=null;function $(c){ND(c,0)}function Y(c){var d=ci(c);if(id(d))return c}function J(c,d){if(c==="change")return d}var ee=!1;if(vs){var ce;if(vs){var ge="oninput"in document;if(!ge){var De=document.createElement("div");De.setAttribute("oninput","return;"),ge=typeof De.oninput=="function"}ce=ge}else ce=!1;ee=ce&&(!document.documentMode||9<document.documentMode)}function qe(){ud&&(ud.detachEvent("onpropertychange",Ye),bc=ud=null)}function Ye(c){if(c.propertyName==="value"&&Y(bc)){var d=[];Pb(d,bc,c,Bt(c)),bu($,d)}}function ct(c,d,g){c==="focusin"?(qe(),ud=d,bc=g,ud.attachEvent("onpropertychange",Ye)):c==="focusout"&&qe()}function ft(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return Y(bc)}function bt(c,d){if(c==="click")return Y(d)}function Ft(c,d){if(c==="input"||c==="change")return Y(d)}function jn(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var zt=typeof Object.is=="function"?Object.is:jn;function Gt(c,d){if(zt(c,d))return!0;if(typeof c!="object"||c===null||typeof d!="object"||d===null)return!1;var g=Object.keys(c),y=Object.keys(d);if(g.length!==y.length)return!1;for(y=0;y<g.length;y++){var T=g[y];if(!Ne.call(d,T)||!zt(c[T],d[T]))return!1}return!0}function Nt(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function _t(c,d){var g=Nt(c);c=0;for(var y;g;){if(g.nodeType===3){if(y=c+g.textContent.length,c<=d&&y>=d)return{node:g,offset:d-c};c=y}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=Nt(g)}}function er(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?er(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function yr(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=mu(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=mu(c.document)}return d}function Ur(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var Ln=vs&&"documentMode"in document&&11>=document.documentMode,Wn=null,Xi=null,ri=null,bs=!1;function Vs(c,d,g){var y=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;bs||Wn==null||Wn!==mu(y)||(y=Wn,"selectionStart"in y&&Ur(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),ri&&Gt(ri,y)||(ri=y,y=jy(Xi,"onSelect"),0<y.length&&(d=new Fr("onSelect","select",null,d,g),c.push({event:d,listeners:y}),d.target=Wn)))}function Di(c,d){var g={};return g[c.toLowerCase()]=d.toLowerCase(),g["Webkit"+c]="webkit"+d,g["Moz"+c]="moz"+d,g}var hi={animationend:Di("Animation","AnimationEnd"),animationiteration:Di("Animation","AnimationIteration"),animationstart:Di("Animation","AnimationStart"),transitionrun:Di("Transition","TransitionRun"),transitionstart:Di("Transition","TransitionStart"),transitioncancel:Di("Transition","TransitionCancel"),transitionend:Di("Transition","TransitionEnd")},ys={},Ys={};vs&&(Ys=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function Ri(c){if(ys[c])return ys[c];if(!hi[c])return c;var d=hi[c],g;for(g in d)if(d.hasOwnProperty(g)&&g in Ys)return ys[c]=d[g];return c}var Ni=Ri("animationend"),xs=Ri("animationiteration"),vl=Ri("animationstart"),Ki=Ri("transitionrun"),Ib=Ri("transitionstart"),zW=Ri("transitioncancel"),f4=Ri("transitionend"),p4=new Map,J2="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(" ");J2.push("scrollEnd");function ko(c,d){p4.set(c,d),fs(d,[c])}var Bb=typeof reportError=="function"?reportError:function(c){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof c=="object"&&c!==null&&typeof c.message=="string"?String(c.message):String(c),error:c});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",c);return}console.error(c)},Wa=[],Lf=0,eS=0;function Lb(){for(var c=Lf,d=eS=Lf=0;d<c;){var g=Wa[d];Wa[d++]=null;var y=Wa[d];Wa[d++]=null;var T=Wa[d];Wa[d++]=null;var k=Wa[d];if(Wa[d++]=null,y!==null&&T!==null){var B=y.pending;B===null?T.next=T:(T.next=B.next,B.next=T),y.pending=T}k!==0&&m4(g,T,k)}}function Fb(c,d,g,y){Wa[Lf++]=c,Wa[Lf++]=d,Wa[Lf++]=g,Wa[Lf++]=y,eS|=y,c.lanes|=y,c=c.alternate,c!==null&&(c.lanes|=y)}function tS(c,d,g,y){return Fb(c,d,g,y),Hb(c)}function hd(c,d){return Fb(c,null,null,d),Hb(c)}function m4(c,d,g){c.lanes|=g;var y=c.alternate;y!==null&&(y.lanes|=g);for(var T=!1,k=c.return;k!==null;)k.childLanes|=g,y=k.alternate,y!==null&&(y.childLanes|=g),k.tag===22&&(c=k.stateNode,c===null||c._visibility&1||(T=!0)),c=k,k=k.return;return c.tag===3?(k=c.stateNode,T&&d!==null&&(T=31-Ut(g),c=k.hiddenUpdates,y=c[T],y===null?c[T]=[d]:y.push(d),d.lane=g|536870912),k):null}function Hb(c){if(50<z0)throw z0=0,uj=null,Error(r(185));for(var d=c.return;d!==null;)c=d,d=c.return;return c.tag===3?c.stateNode:null}var Ff={};function qW(c,d,g,y){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ga(c,d,g,y){return new qW(c,d,g,y)}function nS(c){return c=c.prototype,!(!c||!c.isReactComponent)}function yc(c,d){var g=c.alternate;return g===null?(g=ga(c.tag,d,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=d,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&65011712,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,d=c.dependencies,g.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g.refCleanup=c.refCleanup,g}function g4(c,d){c.flags&=65011714;var g=c.alternate;return g===null?(c.childLanes=0,c.lanes=d,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=g.childLanes,c.lanes=g.lanes,c.child=g.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=g.memoizedProps,c.memoizedState=g.memoizedState,c.updateQueue=g.updateQueue,c.type=g.type,d=g.dependencies,c.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),c}function zb(c,d,g,y,T,k){var B=0;if(y=c,typeof c=="function")nS(c)&&(B=1);else if(typeof c=="string")B=VV(c,g,te.current)?26:c==="html"||c==="head"||c==="body"?27:5;else e:switch(c){case N:return c=ga(31,g,d,T),c.elementType=N,c.lanes=k,c;case x:return dd(g.children,T,k,d);case w:B=8,T|=24;break;case A:return c=ga(12,g,d,T|2),c.elementType=A,c.lanes=k,c;case S:return c=ga(13,g,d,T),c.elementType=S,c.lanes=k,c;case O:return c=ga(19,g,d,T),c.elementType=O,c.lanes=k,c;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case C:B=10;break e;case j:B=9;break e;case _:B=11;break e;case E:B=14;break e;case D:B=16,y=null;break e}B=29,g=Error(r(130,c===null?"null":typeof c,"")),y=null}return d=ga(B,g,d,T),d.elementType=c,d.type=y,d.lanes=k,d}function dd(c,d,g,y){return c=ga(7,c,y,d),c.lanes=g,c}function rS(c,d,g){return c=ga(6,c,null,d),c.lanes=g,c}function v4(c){var d=ga(18,null,null,0);return d.stateNode=c,d}function iS(c,d,g){return d=ga(4,c.children!==null?c.children:[],c.key,d),d.lanes=g,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}var b4=new WeakMap;function Va(c,d){if(typeof c=="object"&&c!==null){var g=b4.get(c);return g!==void 0?g:(d={value:c,source:d,stack:Fe(d)},b4.set(c,d),d)}return{value:c,source:d,stack:Fe(d)}}var Hf=[],zf=0,qb=null,x0=0,Ya=[],Ga=0,Cu=null,bl=1,yl="";function xc(c,d){Hf[zf++]=x0,Hf[zf++]=qb,qb=c,x0=d}function y4(c,d,g){Ya[Ga++]=bl,Ya[Ga++]=yl,Ya[Ga++]=Cu,Cu=c;var y=bl;c=yl;var T=32-Ut(y)-1;y&=~(1<<T),g+=1;var k=32-Ut(d)+T;if(30<k){var B=T-T%5;k=(y&(1<<B)-1).toString(32),y>>=B,T-=B,bl=1<<32-Ut(d)+T|g<<T|y,yl=k+c}else bl=1<<k|g<<T|y,yl=c}function sS(c){c.return!==null&&(xc(c,1),y4(c,1,0))}function aS(c){for(;c===qb;)qb=Hf[--zf],Hf[zf]=null,x0=Hf[--zf],Hf[zf]=null;for(;c===Cu;)Cu=Ya[--Ga],Ya[Ga]=null,yl=Ya[--Ga],Ya[Ga]=null,bl=Ya[--Ga],Ya[Ga]=null}function x4(c,d){Ya[Ga++]=bl,Ya[Ga++]=yl,Ya[Ga++]=Cu,bl=d.id,yl=d.overflow,Cu=c}var Zi=null,xr=null,yn=!1,_u=null,Xa=!1,oS=Error(r(519));function Tu(c){var d=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw A0(Va(d,c)),oS}function A4(c){var d=c.stateNode,g=c.type,y=c.memoizedProps;switch(d[Br]=c,d[Mi]=y,g){case"dialog":dn("cancel",d),dn("close",d);break;case"iframe":case"object":case"embed":dn("load",d);break;case"video":case"audio":for(g=0;g<$0.length;g++)dn($0[g],d);break;case"source":dn("error",d);break;case"img":case"image":case"link":dn("error",d),dn("load",d);break;case"details":dn("toggle",d);break;case"input":dn("invalid",d),uc(d,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":dn("invalid",d);break;case"textarea":dn("invalid",d),Co(d,y.value,y.defaultValue,y.children)}g=y.children,typeof g!="string"&&typeof g!="number"&&typeof g!="bigint"||d.textContent===""+g||y.suppressHydrationWarning===!0||LD(d.textContent,g)?(y.popover!=null&&(dn("beforetoggle",d),dn("toggle",d)),y.onScroll!=null&&dn("scroll",d),y.onScrollEnd!=null&&dn("scrollend",d),y.onClick!=null&&(d.onclick=Ge),d=!0):d=!1,d||Tu(c,!0)}function w4(c){for(Zi=c.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:Xa=!1;return;case 27:case 3:Xa=!0;return;default:Zi=Zi.return}}function qf(c){if(c!==Zi)return!1;if(!yn)return w4(c),yn=!0,!1;var d=c.tag,g;if((g=d!==3&&d!==27)&&((g=d===5)&&(g=c.type,g=!(g!=="form"&&g!=="button")||Cj(c.type,c.memoizedProps)),g=!g),g&&xr&&Tu(c),w4(c),d===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));xr=VD(c)}else if(d===31){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));xr=VD(c)}else d===27?(d=xr,zu(c.type)?(c=Ej,Ej=null,xr=c):xr=d):xr=Zi?Za(c.stateNode.nextSibling):null;return!0}function fd(){xr=Zi=null,yn=!1}function lS(){var c=_u;return c!==null&&(Zs===null?Zs=c:Zs.push.apply(Zs,c),_u=null),c}function A0(c){_u===null?_u=[c]:_u.push(c)}var cS=W(null),pd=null,Ac=null;function ku(c,d,g){V(cS,d._currentValue),d._currentValue=g}function wc(c){c._currentValue=cS.current,X(cS)}function uS(c,d,g){for(;c!==null;){var y=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,y!==null&&(y.childLanes|=d)):y!==null&&(y.childLanes&d)!==d&&(y.childLanes|=d),c===g)break;c=c.return}}function hS(c,d,g,y){var T=c.child;for(T!==null&&(T.return=c);T!==null;){var k=T.dependencies;if(k!==null){var B=T.child;k=k.firstContext;e:for(;k!==null;){var K=k;k=T;for(var ne=0;ne<d.length;ne++)if(K.context===d[ne]){k.lanes|=g,K=k.alternate,K!==null&&(K.lanes|=g),uS(k.return,g,c),y||(B=null);break e}k=K.next}}else if(T.tag===18){if(B=T.return,B===null)throw Error(r(341));B.lanes|=g,k=B.alternate,k!==null&&(k.lanes|=g),uS(B,g,c),B=null}else B=T.child;if(B!==null)B.return=T;else for(B=T;B!==null;){if(B===c){B=null;break}if(T=B.sibling,T!==null){T.return=B.return,B=T;break}B=B.return}T=B}}function $f(c,d,g,y){c=null;for(var T=d,k=!1;T!==null;){if(!k){if((T.flags&524288)!==0)k=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var B=T.alternate;if(B===null)throw Error(r(387));if(B=B.memoizedProps,B!==null){var K=T.type;zt(T.pendingProps.value,B.value)||(c!==null?c.push(K):c=[K])}}else if(T===ye.current){if(B=T.alternate,B===null)throw Error(r(387));B.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(c!==null?c.push(Y0):c=[Y0])}T=T.return}c!==null&&hS(d,c,g,y),d.flags|=262144}function $b(c){for(c=c.firstContext;c!==null;){if(!zt(c.context._currentValue,c.memoizedValue))return!0;c=c.next}return!1}function md(c){pd=c,Ac=null,c=c.dependencies,c!==null&&(c.firstContext=null)}function Ji(c){return S4(pd,c)}function Qb(c,d){return pd===null&&md(c),S4(c,d)}function S4(c,d){var g=d._currentValue;if(d={context:d,memoizedValue:g,next:null},Ac===null){if(c===null)throw Error(r(308));Ac=d,c.dependencies={lanes:0,firstContext:d},c.flags|=524288}else Ac=Ac.next=d;return g}var $W=typeof AbortController<"u"?AbortController:function(){var c=[],d=this.signal={aborted:!1,addEventListener:function(g,y){c.push(y)}};this.abort=function(){d.aborted=!0,c.forEach(function(g){return g()})}},QW=t.unstable_scheduleCallback,UW=t.unstable_NormalPriority,di={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dS(){return{controller:new $W,data:new Map,refCount:0}}function w0(c){c.refCount--,c.refCount===0&&QW(UW,function(){c.controller.abort()})}var S0=null,fS=0,Qf=0,Uf=null;function WW(c,d){if(S0===null){var g=S0=[];fS=0,Qf=gj(),Uf={status:"pending",value:void 0,then:function(y){g.push(y)}}}return fS++,d.then(j4,j4),d}function j4(){if(--fS===0&&S0!==null){Uf!==null&&(Uf.status="fulfilled");var c=S0;S0=null,Qf=0,Uf=null;for(var d=0;d<c.length;d++)(0,c[d])()}}function VW(c,d){var g=[],y={status:"pending",value:null,reason:null,then:function(T){g.push(T)}};return c.then(function(){y.status="fulfilled",y.value=d;for(var T=0;T<g.length;T++)(0,g[T])(d)},function(T){for(y.status="rejected",y.reason=T,T=0;T<g.length;T++)(0,g[T])(void 0)}),y}var C4=P.S;P.S=function(c,d){lD=Ue(),typeof d=="object"&&d!==null&&typeof d.then=="function"&&WW(c,d),C4!==null&&C4(c,d)};var gd=W(null);function pS(){var c=gd.current;return c!==null?c:sr.pooledCache}function Ub(c,d){d===null?V(gd,gd.current):V(gd,d.pool)}function _4(){var c=pS();return c===null?null:{parent:di._currentValue,pool:c}}var Wf=Error(r(460)),mS=Error(r(474)),Wb=Error(r(542)),Vb={then:function(){}};function T4(c){return c=c.status,c==="fulfilled"||c==="rejected"}function k4(c,d,g){switch(g=c[g],g===void 0?c.push(d):g!==d&&(d.then(Ge,Ge),d=g),d.status){case"fulfilled":return d.value;case"rejected":throw c=d.reason,E4(c),c;default:if(typeof d.status=="string")d.then(Ge,Ge);else{if(c=sr,c!==null&&100<c.shellSuspendCounter)throw Error(r(482));c=d,c.status="pending",c.then(function(y){if(d.status==="pending"){var T=d;T.status="fulfilled",T.value=y}},function(y){if(d.status==="pending"){var T=d;T.status="rejected",T.reason=y}})}switch(d.status){case"fulfilled":return d.value;case"rejected":throw c=d.reason,E4(c),c}throw bd=d,Wf}}function vd(c){try{var d=c._init;return d(c._payload)}catch(g){throw g!==null&&typeof g=="object"&&typeof g.then=="function"?(bd=g,Wf):g}}var bd=null;function O4(){if(bd===null)throw Error(r(459));var c=bd;return bd=null,c}function E4(c){if(c===Wf||c===Wb)throw Error(r(483))}var Vf=null,j0=0;function Yb(c){var d=j0;return j0+=1,Vf===null&&(Vf=[]),k4(Vf,c,d)}function C0(c,d){d=d.props.ref,c.ref=d!==void 0?d:null}function Gb(c,d){throw d.$$typeof===m?Error(r(525)):(c=Object.prototype.toString.call(d),Error(r(31,c==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":c)))}function M4(c){function d(de,ue){if(c){var xe=de.deletions;xe===null?(de.deletions=[ue],de.flags|=16):xe.push(ue)}}function g(de,ue){if(!c)return null;for(;ue!==null;)d(de,ue),ue=ue.sibling;return null}function y(de){for(var ue=new Map;de!==null;)de.key!==null?ue.set(de.key,de):ue.set(de.index,de),de=de.sibling;return ue}function T(de,ue){return de=yc(de,ue),de.index=0,de.sibling=null,de}function k(de,ue,xe){return de.index=xe,c?(xe=de.alternate,xe!==null?(xe=xe.index,xe<ue?(de.flags|=67108866,ue):xe):(de.flags|=67108866,ue)):(de.flags|=1048576,ue)}function B(de){return c&&de.alternate===null&&(de.flags|=67108866),de}function K(de,ue,xe,Ie){return ue===null||ue.tag!==6?(ue=rS(xe,de.mode,Ie),ue.return=de,ue):(ue=T(ue,xe),ue.return=de,ue)}function ne(de,ue,xe,Ie){var Ot=xe.type;return Ot===x?_e(de,ue,xe.props.children,Ie,xe.key):ue!==null&&(ue.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===D&&vd(Ot)===ue.type)?(ue=T(ue,xe.props),C0(ue,xe),ue.return=de,ue):(ue=zb(xe.type,xe.key,xe.props,null,de.mode,Ie),C0(ue,xe),ue.return=de,ue)}function Ae(de,ue,xe,Ie){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==xe.containerInfo||ue.stateNode.implementation!==xe.implementation?(ue=iS(xe,de.mode,Ie),ue.return=de,ue):(ue=T(ue,xe.children||[]),ue.return=de,ue)}function _e(de,ue,xe,Ie,Ot){return ue===null||ue.tag!==7?(ue=dd(xe,de.mode,Ie,Ot),ue.return=de,ue):(ue=T(ue,xe),ue.return=de,ue)}function Be(de,ue,xe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=rS(""+ue,de.mode,xe),ue.return=de,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return xe=zb(ue.type,ue.key,ue.props,null,de.mode,xe),C0(xe,ue),xe.return=de,xe;case b:return ue=iS(ue,de.mode,xe),ue.return=de,ue;case D:return ue=vd(ue),Be(de,ue,xe)}if(H(ue)||L(ue))return ue=dd(ue,de.mode,xe,null),ue.return=de,ue;if(typeof ue.then=="function")return Be(de,Yb(ue),xe);if(ue.$$typeof===C)return Be(de,Qb(de,ue),xe);Gb(de,ue)}return null}function Se(de,ue,xe,Ie){var Ot=ue!==null?ue.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return Ot!==null?null:K(de,ue,""+xe,Ie);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case v:return xe.key===Ot?ne(de,ue,xe,Ie):null;case b:return xe.key===Ot?Ae(de,ue,xe,Ie):null;case D:return xe=vd(xe),Se(de,ue,xe,Ie)}if(H(xe)||L(xe))return Ot!==null?null:_e(de,ue,xe,Ie,null);if(typeof xe.then=="function")return Se(de,ue,Yb(xe),Ie);if(xe.$$typeof===C)return Se(de,ue,Qb(de,xe),Ie);Gb(de,xe)}return null}function Ce(de,ue,xe,Ie,Ot){if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return de=de.get(xe)||null,K(ue,de,""+Ie,Ot);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case v:return de=de.get(Ie.key===null?xe:Ie.key)||null,ne(ue,de,Ie,Ot);case b:return de=de.get(Ie.key===null?xe:Ie.key)||null,Ae(ue,de,Ie,Ot);case D:return Ie=vd(Ie),Ce(de,ue,xe,Ie,Ot)}if(H(Ie)||L(Ie))return de=de.get(xe)||null,_e(ue,de,Ie,Ot,null);if(typeof Ie.then=="function")return Ce(de,ue,xe,Yb(Ie),Ot);if(Ie.$$typeof===C)return Ce(de,ue,xe,Qb(ue,Ie),Ot);Gb(ue,Ie)}return null}function At(de,ue,xe,Ie){for(var Ot=null,Tn=null,jt=ue,nn=ue=0,gn=null;jt!==null&&nn<xe.length;nn++){jt.index>nn?(gn=jt,jt=null):gn=jt.sibling;var kn=Se(de,jt,xe[nn],Ie);if(kn===null){jt===null&&(jt=gn);break}c&&jt&&kn.alternate===null&&d(de,jt),ue=k(kn,ue,nn),Tn===null?Ot=kn:Tn.sibling=kn,Tn=kn,jt=gn}if(nn===xe.length)return g(de,jt),yn&&xc(de,nn),Ot;if(jt===null){for(;nn<xe.length;nn++)jt=Be(de,xe[nn],Ie),jt!==null&&(ue=k(jt,ue,nn),Tn===null?Ot=jt:Tn.sibling=jt,Tn=jt);return yn&&xc(de,nn),Ot}for(jt=y(jt);nn<xe.length;nn++)gn=Ce(jt,de,nn,xe[nn],Ie),gn!==null&&(c&&gn.alternate!==null&&jt.delete(gn.key===null?nn:gn.key),ue=k(gn,ue,nn),Tn===null?Ot=gn:Tn.sibling=gn,Tn=gn);return c&&jt.forEach(function(Wu){return d(de,Wu)}),yn&&xc(de,nn),Ot}function It(de,ue,xe,Ie){if(xe==null)throw Error(r(151));for(var Ot=null,Tn=null,jt=ue,nn=ue=0,gn=null,kn=xe.next();jt!==null&&!kn.done;nn++,kn=xe.next()){jt.index>nn?(gn=jt,jt=null):gn=jt.sibling;var Wu=Se(de,jt,kn.value,Ie);if(Wu===null){jt===null&&(jt=gn);break}c&&jt&&Wu.alternate===null&&d(de,jt),ue=k(Wu,ue,nn),Tn===null?Ot=Wu:Tn.sibling=Wu,Tn=Wu,jt=gn}if(kn.done)return g(de,jt),yn&&xc(de,nn),Ot;if(jt===null){for(;!kn.done;nn++,kn=xe.next())kn=Be(de,kn.value,Ie),kn!==null&&(ue=k(kn,ue,nn),Tn===null?Ot=kn:Tn.sibling=kn,Tn=kn);return yn&&xc(de,nn),Ot}for(jt=y(jt);!kn.done;nn++,kn=xe.next())kn=Ce(jt,de,nn,kn.value,Ie),kn!==null&&(c&&kn.alternate!==null&&jt.delete(kn.key===null?nn:kn.key),ue=k(kn,ue,nn),Tn===null?Ot=kn:Tn.sibling=kn,Tn=kn);return c&&jt.forEach(function(iY){return d(de,iY)}),yn&&xc(de,nn),Ot}function rr(de,ue,xe,Ie){if(typeof xe=="object"&&xe!==null&&xe.type===x&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case v:e:{for(var Ot=xe.key;ue!==null;){if(ue.key===Ot){if(Ot=xe.type,Ot===x){if(ue.tag===7){g(de,ue.sibling),Ie=T(ue,xe.props.children),Ie.return=de,de=Ie;break e}}else if(ue.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===D&&vd(Ot)===ue.type){g(de,ue.sibling),Ie=T(ue,xe.props),C0(Ie,xe),Ie.return=de,de=Ie;break e}g(de,ue);break}else d(de,ue);ue=ue.sibling}xe.type===x?(Ie=dd(xe.props.children,de.mode,Ie,xe.key),Ie.return=de,de=Ie):(Ie=zb(xe.type,xe.key,xe.props,null,de.mode,Ie),C0(Ie,xe),Ie.return=de,de=Ie)}return B(de);case b:e:{for(Ot=xe.key;ue!==null;){if(ue.key===Ot)if(ue.tag===4&&ue.stateNode.containerInfo===xe.containerInfo&&ue.stateNode.implementation===xe.implementation){g(de,ue.sibling),Ie=T(ue,xe.children||[]),Ie.return=de,de=Ie;break e}else{g(de,ue);break}else d(de,ue);ue=ue.sibling}Ie=iS(xe,de.mode,Ie),Ie.return=de,de=Ie}return B(de);case D:return xe=vd(xe),rr(de,ue,xe,Ie)}if(H(xe))return At(de,ue,xe,Ie);if(L(xe)){if(Ot=L(xe),typeof Ot!="function")throw Error(r(150));return xe=Ot.call(xe),It(de,ue,xe,Ie)}if(typeof xe.then=="function")return rr(de,ue,Yb(xe),Ie);if(xe.$$typeof===C)return rr(de,ue,Qb(de,xe),Ie);Gb(de,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,ue!==null&&ue.tag===6?(g(de,ue.sibling),Ie=T(ue,xe),Ie.return=de,de=Ie):(g(de,ue),Ie=rS(xe,de.mode,Ie),Ie.return=de,de=Ie),B(de)):g(de,ue)}return function(de,ue,xe,Ie){try{j0=0;var Ot=rr(de,ue,xe,Ie);return Vf=null,Ot}catch(jt){if(jt===Wf||jt===Wb)throw jt;var Tn=ga(29,jt,null,de.mode);return Tn.lanes=Ie,Tn.return=de,Tn}finally{}}}var yd=M4(!0),D4=M4(!1),Ou=!1;function gS(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vS(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function Eu(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function Mu(c,d,g){var y=c.updateQueue;if(y===null)return null;if(y=y.shared,(Pn&2)!==0){var T=y.pending;return T===null?d.next=d:(d.next=T.next,T.next=d),y.pending=d,d=Hb(c),m4(c,null,g),d}return Fb(c,y,d,g),Hb(c)}function _0(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var y=d.lanes;y&=c.pendingLanes,g|=y,d.lanes=g,Ke(c,g)}}function bS(c,d){var g=c.updateQueue,y=c.alternate;if(y!==null&&(y=y.updateQueue,g===y)){var T=null,k=null;if(g=g.firstBaseUpdate,g!==null){do{var B={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};k===null?T=k=B:k=k.next=B,g=g.next}while(g!==null);k===null?T=k=d:k=k.next=d}else T=k=d;g={baseState:y.baseState,firstBaseUpdate:T,lastBaseUpdate:k,shared:y.shared,callbacks:y.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var yS=!1;function T0(){if(yS){var c=Uf;if(c!==null)throw c}}function k0(c,d,g,y){yS=!1;var T=c.updateQueue;Ou=!1;var k=T.firstBaseUpdate,B=T.lastBaseUpdate,K=T.shared.pending;if(K!==null){T.shared.pending=null;var ne=K,Ae=ne.next;ne.next=null,B===null?k=Ae:B.next=Ae,B=ne;var _e=c.alternate;_e!==null&&(_e=_e.updateQueue,K=_e.lastBaseUpdate,K!==B&&(K===null?_e.firstBaseUpdate=Ae:K.next=Ae,_e.lastBaseUpdate=ne))}if(k!==null){var Be=T.baseState;B=0,_e=Ae=ne=null,K=k;do{var Se=K.lane&-536870913,Ce=Se!==K.lane;if(Ce?(mn&Se)===Se:(y&Se)===Se){Se!==0&&Se===Qf&&(yS=!0),_e!==null&&(_e=_e.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var At=c,It=K;Se=d;var rr=g;switch(It.tag){case 1:if(At=It.payload,typeof At=="function"){Be=At.call(rr,Be,Se);break e}Be=At;break e;case 3:At.flags=At.flags&-65537|128;case 0:if(At=It.payload,Se=typeof At=="function"?At.call(rr,Be,Se):At,Se==null)break e;Be=p({},Be,Se);break e;case 2:Ou=!0}}Se=K.callback,Se!==null&&(c.flags|=64,Ce&&(c.flags|=8192),Ce=T.callbacks,Ce===null?T.callbacks=[Se]:Ce.push(Se))}else Ce={lane:Se,tag:K.tag,payload:K.payload,callback:K.callback,next:null},_e===null?(Ae=_e=Ce,ne=Be):_e=_e.next=Ce,B|=Se;if(K=K.next,K===null){if(K=T.shared.pending,K===null)break;Ce=K,K=Ce.next,Ce.next=null,T.lastBaseUpdate=Ce,T.shared.pending=null}}while(!0);_e===null&&(ne=Be),T.baseState=ne,T.firstBaseUpdate=Ae,T.lastBaseUpdate=_e,k===null&&(T.shared.lanes=0),Iu|=B,c.lanes=B,c.memoizedState=Be}}function R4(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function N4(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;c<g.length;c++)R4(g[c],d)}var Yf=W(null),Xb=W(0);function P4(c,d){c=Mc,V(Xb,c),V(Yf,d),Mc=c|d.baseLanes}function xS(){V(Xb,Mc),V(Yf,Yf.current)}function AS(){Mc=Xb.current,X(Yf),X(Xb)}var va=W(null),Ka=null;function Du(c){var d=c.alternate;V(ii,ii.current&1),V(va,c),Ka===null&&(d===null||Yf.current!==null||d.memoizedState!==null)&&(Ka=c)}function wS(c){V(ii,ii.current),V(va,c),Ka===null&&(Ka=c)}function I4(c){c.tag===22?(V(ii,ii.current),V(va,c),Ka===null&&(Ka=c)):Ru()}function Ru(){V(ii,ii.current),V(va,va.current)}function ba(c){X(va),Ka===c&&(Ka=null),X(ii)}var ii=W(0);function Kb(c){for(var d=c;d!==null;){if(d.tag===13){var g=d.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||kj(g)||Oj(g)))return d}else if(d.tag===19&&(d.memoizedProps.revealOrder==="forwards"||d.memoizedProps.revealOrder==="backwards"||d.memoizedProps.revealOrder==="unstable_legacy-backwards"||d.memoizedProps.revealOrder==="together")){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var Sc=0,tn=null,tr=null,fi=null,Zb=!1,Gf=!1,xd=!1,Jb=0,O0=0,Xf=null,YW=0;function Wr(){throw Error(r(321))}function SS(c,d){if(d===null)return!1;for(var g=0;g<d.length&&g<c.length;g++)if(!zt(c[g],d[g]))return!1;return!0}function jS(c,d,g,y,T,k){return Sc=k,tn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,P.H=c===null||c.memoizedState===null?yM:FS,xd=!1,k=g(y,T),xd=!1,Gf&&(k=L4(d,g,y,T)),B4(c),k}function B4(c){P.H=D0;var d=tr!==null&&tr.next!==null;if(Sc=0,fi=tr=tn=null,Zb=!1,O0=0,Xf=null,d)throw Error(r(300));c===null||pi||(c=c.dependencies,c!==null&&$b(c)&&(pi=!0))}function L4(c,d,g,y){tn=c;var T=0;do{if(Gf&&(Xf=null),O0=0,Gf=!1,25<=T)throw Error(r(301));if(T+=1,fi=tr=null,c.updateQueue!=null){var k=c.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}P.H=xM,k=d(g,y)}while(Gf);return k}function GW(){var c=P.H,d=c.useState()[0];return d=typeof d.then=="function"?E0(d):d,c=c.useState()[0],(tr!==null?tr.memoizedState:null)!==c&&(tn.flags|=1024),d}function CS(){var c=Jb!==0;return Jb=0,c}function _S(c,d,g){d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~g}function TS(c){if(Zb){for(c=c.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}Zb=!1}Sc=0,fi=tr=tn=null,Gf=!1,O0=Jb=0,Xf=null}function Rs(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fi===null?tn.memoizedState=fi=c:fi=fi.next=c,fi}function si(){if(tr===null){var c=tn.alternate;c=c!==null?c.memoizedState:null}else c=tr.next;var d=fi===null?tn.memoizedState:fi.next;if(d!==null)fi=d,tr=c;else{if(c===null)throw tn.alternate===null?Error(r(467)):Error(r(310));tr=c,c={memoizedState:tr.memoizedState,baseState:tr.baseState,baseQueue:tr.baseQueue,queue:tr.queue,next:null},fi===null?tn.memoizedState=fi=c:fi=fi.next=c}return fi}function ey(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function E0(c){var d=O0;return O0+=1,Xf===null&&(Xf=[]),c=k4(Xf,c,d),d=tn,(fi===null?d.memoizedState:fi.next)===null&&(d=d.alternate,P.H=d===null||d.memoizedState===null?yM:FS),c}function ty(c){if(c!==null&&typeof c=="object"){if(typeof c.then=="function")return E0(c);if(c.$$typeof===C)return Ji(c)}throw Error(r(438,String(c)))}function kS(c){var d=null,g=tn.updateQueue;if(g!==null&&(d=g.memoCache),d==null){var y=tn.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(d={data:y.data.map(function(T){return T.slice()}),index:0})))}if(d==null&&(d={data:[],index:0}),g===null&&(g=ey(),tn.updateQueue=g),g.memoCache=d,g=d.data[d.index],g===void 0)for(g=d.data[d.index]=Array(c),y=0;y<c;y++)g[y]=I;return d.index++,g}function jc(c,d){return typeof d=="function"?d(c):d}function ny(c){var d=si();return OS(d,tr,c)}function OS(c,d,g){var y=c.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=g;var T=c.baseQueue,k=y.pending;if(k!==null){if(T!==null){var B=T.next;T.next=k.next,k.next=B}d.baseQueue=T=k,y.pending=null}if(k=c.baseState,T===null)c.memoizedState=k;else{d=T.next;var K=B=null,ne=null,Ae=d,_e=!1;do{var Be=Ae.lane&-536870913;if(Be!==Ae.lane?(mn&Be)===Be:(Sc&Be)===Be){var Se=Ae.revertLane;if(Se===0)ne!==null&&(ne=ne.next={lane:0,revertLane:0,gesture:null,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null}),Be===Qf&&(_e=!0);else if((Sc&Se)===Se){Ae=Ae.next,Se===Qf&&(_e=!0);continue}else Be={lane:0,revertLane:Ae.revertLane,gesture:null,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null},ne===null?(K=ne=Be,B=k):ne=ne.next=Be,tn.lanes|=Se,Iu|=Se;Be=Ae.action,xd&&g(k,Be),k=Ae.hasEagerState?Ae.eagerState:g(k,Be)}else Se={lane:Be,revertLane:Ae.revertLane,gesture:Ae.gesture,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null},ne===null?(K=ne=Se,B=k):ne=ne.next=Se,tn.lanes|=Be,Iu|=Be;Ae=Ae.next}while(Ae!==null&&Ae!==d);if(ne===null?B=k:ne.next=K,!zt(k,c.memoizedState)&&(pi=!0,_e&&(g=Uf,g!==null)))throw g;c.memoizedState=k,c.baseState=B,c.baseQueue=ne,y.lastRenderedState=k}return T===null&&(y.lanes=0),[c.memoizedState,y.dispatch]}function ES(c){var d=si(),g=d.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=c;var y=g.dispatch,T=g.pending,k=d.memoizedState;if(T!==null){g.pending=null;var B=T=T.next;do k=c(k,B.action),B=B.next;while(B!==T);zt(k,d.memoizedState)||(pi=!0),d.memoizedState=k,d.baseQueue===null&&(d.baseState=k),g.lastRenderedState=k}return[k,y]}function F4(c,d,g){var y=tn,T=si(),k=yn;if(k){if(g===void 0)throw Error(r(407));g=g()}else g=d();var B=!zt((tr||T).memoizedState,g);if(B&&(T.memoizedState=g,pi=!0),T=T.queue,RS(q4.bind(null,y,T,c),[c]),T.getSnapshot!==d||B||fi!==null&&fi.memoizedState.tag&1){if(y.flags|=2048,Kf(9,{destroy:void 0},z4.bind(null,y,T,g,d),null),sr===null)throw Error(r(349));k||(Sc&127)!==0||H4(y,d,g)}return g}function H4(c,d,g){c.flags|=16384,c={getSnapshot:d,value:g},d=tn.updateQueue,d===null?(d=ey(),tn.updateQueue=d,d.stores=[c]):(g=d.stores,g===null?d.stores=[c]:g.push(c))}function z4(c,d,g,y){d.value=g,d.getSnapshot=y,$4(d)&&Q4(c)}function q4(c,d,g){return g(function(){$4(d)&&Q4(c)})}function $4(c){var d=c.getSnapshot;c=c.value;try{var g=d();return!zt(c,g)}catch{return!0}}function Q4(c){var d=hd(c,2);d!==null&&Js(d,c,2)}function MS(c){var d=Rs();if(typeof c=="function"){var g=c;if(c=g(),xd){Et(!0);try{g()}finally{Et(!1)}}}return d.memoizedState=d.baseState=c,d.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:c},d}function U4(c,d,g,y){return c.baseState=g,OS(c,tr,typeof y=="function"?y:jc)}function XW(c,d,g,y,T){if(sy(c))throw Error(r(485));if(c=d.action,c!==null){var k={payload:T,action:c,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){k.listeners.push(B)}};P.T!==null?g(!0):k.isTransition=!1,y(k),g=d.pending,g===null?(k.next=d.pending=k,W4(d,k)):(k.next=g.next,d.pending=g.next=k)}}function W4(c,d){var g=d.action,y=d.payload,T=c.state;if(d.isTransition){var k=P.T,B={};P.T=B;try{var K=g(T,y),ne=P.S;ne!==null&&ne(B,K),V4(c,d,K)}catch(Ae){DS(c,d,Ae)}finally{k!==null&&B.types!==null&&(k.types=B.types),P.T=k}}else try{k=g(T,y),V4(c,d,k)}catch(Ae){DS(c,d,Ae)}}function V4(c,d,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(y){Y4(c,d,y)},function(y){return DS(c,d,y)}):Y4(c,d,g)}function Y4(c,d,g){d.status="fulfilled",d.value=g,G4(d),c.state=g,d=c.pending,d!==null&&(g=d.next,g===d?c.pending=null:(g=g.next,d.next=g,W4(c,g)))}function DS(c,d,g){var y=c.pending;if(c.pending=null,y!==null){y=y.next;do d.status="rejected",d.reason=g,G4(d),d=d.next;while(d!==y)}c.action=null}function G4(c){c=c.listeners;for(var d=0;d<c.length;d++)(0,c[d])()}function X4(c,d){return d}function K4(c,d){if(yn){var g=sr.formState;if(g!==null){e:{var y=tn;if(yn){if(xr){t:{for(var T=xr,k=Xa;T.nodeType!==8;){if(!k){T=null;break t}if(T=Za(T.nextSibling),T===null){T=null;break t}}k=T.data,T=k==="F!"||k==="F"?T:null}if(T){xr=Za(T.nextSibling),y=T.data==="F!";break e}}Tu(y)}y=!1}y&&(d=g[0])}}return g=Rs(),g.memoizedState=g.baseState=d,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:X4,lastRenderedState:d},g.queue=y,g=gM.bind(null,tn,y),y.dispatch=g,y=MS(!1),k=LS.bind(null,tn,!1,y.queue),y=Rs(),T={state:d,dispatch:null,action:c,pending:null},y.queue=T,g=XW.bind(null,tn,T,k,g),T.dispatch=g,y.memoizedState=c,[d,g,!1]}function Z4(c){var d=si();return J4(d,tr,c)}function J4(c,d,g){if(d=OS(c,d,X4)[0],c=ny(jc)[0],typeof d=="object"&&d!==null&&typeof d.then=="function")try{var y=E0(d)}catch(B){throw B===Wf?Wb:B}else y=d;d=si();var T=d.queue,k=T.dispatch;return g!==d.memoizedState&&(tn.flags|=2048,Kf(9,{destroy:void 0},KW.bind(null,T,g),null)),[y,k,c]}function KW(c,d){c.action=d}function eM(c){var d=si(),g=tr;if(g!==null)return J4(d,g,c);si(),d=d.memoizedState,g=si();var y=g.queue.dispatch;return g.memoizedState=c,[d,y,!1]}function Kf(c,d,g,y){return c={tag:c,create:g,deps:y,inst:d,next:null},d=tn.updateQueue,d===null&&(d=ey(),tn.updateQueue=d),g=d.lastEffect,g===null?d.lastEffect=c.next=c:(y=g.next,g.next=c,c.next=y,d.lastEffect=c),c}function tM(){return si().memoizedState}function ry(c,d,g,y){var T=Rs();tn.flags|=c,T.memoizedState=Kf(1|d,{destroy:void 0},g,y===void 0?null:y)}function iy(c,d,g,y){var T=si();y=y===void 0?null:y;var k=T.memoizedState.inst;tr!==null&&y!==null&&SS(y,tr.memoizedState.deps)?T.memoizedState=Kf(d,k,g,y):(tn.flags|=c,T.memoizedState=Kf(1|d,k,g,y))}function nM(c,d){ry(8390656,8,c,d)}function RS(c,d){iy(2048,8,c,d)}function ZW(c){tn.flags|=4;var d=tn.updateQueue;if(d===null)d=ey(),tn.updateQueue=d,d.events=[c];else{var g=d.events;g===null?d.events=[c]:g.push(c)}}function rM(c){var d=si().memoizedState;return ZW({ref:d,nextImpl:c}),function(){if((Pn&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}function iM(c,d){return iy(4,2,c,d)}function sM(c,d){return iy(4,4,c,d)}function aM(c,d){if(typeof d=="function"){c=c();var g=d(c);return function(){typeof g=="function"?g():d(null)}}if(d!=null)return c=c(),d.current=c,function(){d.current=null}}function oM(c,d,g){g=g!=null?g.concat([c]):null,iy(4,4,aM.bind(null,d,c),g)}function NS(){}function lM(c,d){var g=si();d=d===void 0?null:d;var y=g.memoizedState;return d!==null&&SS(d,y[1])?y[0]:(g.memoizedState=[c,d],c)}function cM(c,d){var g=si();d=d===void 0?null:d;var y=g.memoizedState;if(d!==null&&SS(d,y[1]))return y[0];if(y=c(),xd){Et(!0);try{c()}finally{Et(!1)}}return g.memoizedState=[y,d],y}function PS(c,d,g){return g===void 0||(Sc&1073741824)!==0&&(mn&261930)===0?c.memoizedState=d:(c.memoizedState=g,c=uD(),tn.lanes|=c,Iu|=c,g)}function uM(c,d,g,y){return zt(g,d)?g:Yf.current!==null?(c=PS(c,g,y),zt(c,d)||(pi=!0),c):(Sc&42)===0||(Sc&1073741824)!==0&&(mn&261930)===0?(pi=!0,c.memoizedState=g):(c=uD(),tn.lanes|=c,Iu|=c,d)}function hM(c,d,g,y,T){var k=F.p;F.p=k!==0&&8>k?k:8;var B=P.T,K={};P.T=K,LS(c,!1,d,g);try{var ne=T(),Ae=P.S;if(Ae!==null&&Ae(K,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var _e=VW(ne,y);M0(c,d,_e,Aa(c))}else M0(c,d,y,Aa(c))}catch(Be){M0(c,d,{then:function(){},status:"rejected",reason:Be},Aa())}finally{F.p=k,B!==null&&K.types!==null&&(B.types=K.types),P.T=B}}function JW(){}function IS(c,d,g,y){if(c.tag!==5)throw Error(r(476));var T=dM(c).queue;hM(c,T,d,U,g===null?JW:function(){return fM(c),g(y)})}function dM(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:U},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function fM(c){var d=dM(c);d.next===null&&(d=c.alternate.memoizedState),M0(c,d.next.queue,{},Aa())}function BS(){return Ji(Y0)}function pM(){return si().memoizedState}function mM(){return si().memoizedState}function eV(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=Aa();c=Eu(g);var y=Mu(d,c,g);y!==null&&(Js(y,d,g),_0(y,d,g)),d={cache:dS()},c.payload=d;return}d=d.return}}function tV(c,d,g){var y=Aa();g={lane:y,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},sy(c)?vM(d,g):(g=tS(c,d,g,y),g!==null&&(Js(g,c,y),bM(g,d,y)))}function gM(c,d,g){var y=Aa();M0(c,d,g,y)}function M0(c,d,g,y){var T={lane:y,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(sy(c))vM(d,T);else{var k=c.alternate;if(c.lanes===0&&(k===null||k.lanes===0)&&(k=d.lastRenderedReducer,k!==null))try{var B=d.lastRenderedState,K=k(B,g);if(T.hasEagerState=!0,T.eagerState=K,zt(K,B))return Fb(c,d,T,0),sr===null&&Lb(),!1}catch{}finally{}if(g=tS(c,d,T,y),g!==null)return Js(g,c,y),bM(g,d,y),!0}return!1}function LS(c,d,g,y){if(y={lane:2,revertLane:gj(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},sy(c)){if(d)throw Error(r(479))}else d=tS(c,g,y,2),d!==null&&Js(d,c,2)}function sy(c){var d=c.alternate;return c===tn||d!==null&&d===tn}function vM(c,d){Gf=Zb=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function bM(c,d,g){if((g&4194048)!==0){var y=d.lanes;y&=c.pendingLanes,g|=y,d.lanes=g,Ke(c,g)}}var D0={readContext:Ji,use:ty,useCallback:Wr,useContext:Wr,useEffect:Wr,useImperativeHandle:Wr,useLayoutEffect:Wr,useInsertionEffect:Wr,useMemo:Wr,useReducer:Wr,useRef:Wr,useState:Wr,useDebugValue:Wr,useDeferredValue:Wr,useTransition:Wr,useSyncExternalStore:Wr,useId:Wr,useHostTransitionStatus:Wr,useFormState:Wr,useActionState:Wr,useOptimistic:Wr,useMemoCache:Wr,useCacheRefresh:Wr};D0.useEffectEvent=Wr;var yM={readContext:Ji,use:ty,useCallback:function(c,d){return Rs().memoizedState=[c,d===void 0?null:d],c},useContext:Ji,useEffect:nM,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,ry(4194308,4,aM.bind(null,d,c),g)},useLayoutEffect:function(c,d){return ry(4194308,4,c,d)},useInsertionEffect:function(c,d){ry(4,2,c,d)},useMemo:function(c,d){var g=Rs();d=d===void 0?null:d;var y=c();if(xd){Et(!0);try{c()}finally{Et(!1)}}return g.memoizedState=[y,d],y},useReducer:function(c,d,g){var y=Rs();if(g!==void 0){var T=g(d);if(xd){Et(!0);try{g(d)}finally{Et(!1)}}}else T=d;return y.memoizedState=y.baseState=T,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:T},y.queue=c,c=c.dispatch=tV.bind(null,tn,c),[y.memoizedState,c]},useRef:function(c){var d=Rs();return c={current:c},d.memoizedState=c},useState:function(c){c=MS(c);var d=c.queue,g=gM.bind(null,tn,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:NS,useDeferredValue:function(c,d){var g=Rs();return PS(g,c,d)},useTransition:function(){var c=MS(!1);return c=hM.bind(null,tn,c.queue,!0,!1),Rs().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var y=tn,T=Rs();if(yn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),sr===null)throw Error(r(349));(mn&127)!==0||H4(y,d,g)}T.memoizedState=g;var k={value:g,getSnapshot:d};return T.queue=k,nM(q4.bind(null,y,k,c),[c]),y.flags|=2048,Kf(9,{destroy:void 0},z4.bind(null,y,k,g,d),null),g},useId:function(){var c=Rs(),d=sr.identifierPrefix;if(yn){var g=yl,y=bl;g=(y&~(1<<32-Ut(y)-1)).toString(32)+g,d="_"+d+"R_"+g,g=Jb++,0<g&&(d+="H"+g.toString(32)),d+="_"}else g=YW++,d="_"+d+"r_"+g.toString(32)+"_";return c.memoizedState=d},useHostTransitionStatus:BS,useFormState:K4,useActionState:K4,useOptimistic:function(c){var d=Rs();d.memoizedState=d.baseState=c;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return d.queue=g,d=LS.bind(null,tn,!0,g),g.dispatch=d,[c,d]},useMemoCache:kS,useCacheRefresh:function(){return Rs().memoizedState=eV.bind(null,tn)},useEffectEvent:function(c){var d=Rs(),g={impl:c};return d.memoizedState=g,function(){if((Pn&2)!==0)throw Error(r(440));return g.impl.apply(void 0,arguments)}}},FS={readContext:Ji,use:ty,useCallback:lM,useContext:Ji,useEffect:RS,useImperativeHandle:oM,useInsertionEffect:iM,useLayoutEffect:sM,useMemo:cM,useReducer:ny,useRef:tM,useState:function(){return ny(jc)},useDebugValue:NS,useDeferredValue:function(c,d){var g=si();return uM(g,tr.memoizedState,c,d)},useTransition:function(){var c=ny(jc)[0],d=si().memoizedState;return[typeof c=="boolean"?c:E0(c),d]},useSyncExternalStore:F4,useId:pM,useHostTransitionStatus:BS,useFormState:Z4,useActionState:Z4,useOptimistic:function(c,d){var g=si();return U4(g,tr,c,d)},useMemoCache:kS,useCacheRefresh:mM};FS.useEffectEvent=rM;var xM={readContext:Ji,use:ty,useCallback:lM,useContext:Ji,useEffect:RS,useImperativeHandle:oM,useInsertionEffect:iM,useLayoutEffect:sM,useMemo:cM,useReducer:ES,useRef:tM,useState:function(){return ES(jc)},useDebugValue:NS,useDeferredValue:function(c,d){var g=si();return tr===null?PS(g,c,d):uM(g,tr.memoizedState,c,d)},useTransition:function(){var c=ES(jc)[0],d=si().memoizedState;return[typeof c=="boolean"?c:E0(c),d]},useSyncExternalStore:F4,useId:pM,useHostTransitionStatus:BS,useFormState:eM,useActionState:eM,useOptimistic:function(c,d){var g=si();return tr!==null?U4(g,tr,c,d):(g.baseState=c,[c,g.queue.dispatch])},useMemoCache:kS,useCacheRefresh:mM};xM.useEffectEvent=rM;function HS(c,d,g,y){d=c.memoizedState,g=g(y,d),g=g==null?d:p({},d,g),c.memoizedState=g,c.lanes===0&&(c.updateQueue.baseState=g)}var zS={enqueueSetState:function(c,d,g){c=c._reactInternals;var y=Aa(),T=Eu(y);T.payload=d,g!=null&&(T.callback=g),d=Mu(c,T,y),d!==null&&(Js(d,c,y),_0(d,c,y))},enqueueReplaceState:function(c,d,g){c=c._reactInternals;var y=Aa(),T=Eu(y);T.tag=1,T.payload=d,g!=null&&(T.callback=g),d=Mu(c,T,y),d!==null&&(Js(d,c,y),_0(d,c,y))},enqueueForceUpdate:function(c,d){c=c._reactInternals;var g=Aa(),y=Eu(g);y.tag=2,d!=null&&(y.callback=d),d=Mu(c,y,g),d!==null&&(Js(d,c,g),_0(d,c,g))}};function AM(c,d,g,y,T,k,B){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(y,k,B):d.prototype&&d.prototype.isPureReactComponent?!Gt(g,y)||!Gt(T,k):!0}function wM(c,d,g,y){c=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(g,y),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(g,y),d.state!==c&&zS.enqueueReplaceState(d,d.state,null)}function Ad(c,d){var g=d;if("ref"in d){g={};for(var y in d)y!=="ref"&&(g[y]=d[y])}if(c=c.defaultProps){g===d&&(g=p({},g));for(var T in c)g[T]===void 0&&(g[T]=c[T])}return g}function SM(c){Bb(c)}function jM(c){console.error(c)}function CM(c){Bb(c)}function ay(c,d){try{var g=c.onUncaughtError;g(d.value,{componentStack:d.stack})}catch(y){setTimeout(function(){throw y})}}function _M(c,d,g){try{var y=c.onCaughtError;y(g.value,{componentStack:g.stack,errorBoundary:d.tag===1?d.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function qS(c,d,g){return g=Eu(g),g.tag=3,g.payload={element:null},g.callback=function(){ay(c,d)},g}function TM(c){return c=Eu(c),c.tag=3,c}function kM(c,d,g,y){var T=g.type.getDerivedStateFromError;if(typeof T=="function"){var k=y.value;c.payload=function(){return T(k)},c.callback=function(){_M(d,g,y)}}var B=g.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(c.callback=function(){_M(d,g,y),typeof T!="function"&&(Bu===null?Bu=new Set([this]):Bu.add(this));var K=y.stack;this.componentDidCatch(y.value,{componentStack:K!==null?K:""})})}function nV(c,d,g,y,T){if(g.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(d=g.alternate,d!==null&&$f(d,g,T,!0),g=va.current,g!==null){switch(g.tag){case 31:case 13:return Ka===null?by():g.alternate===null&&Vr===0&&(Vr=3),g.flags&=-257,g.flags|=65536,g.lanes=T,y===Vb?g.flags|=16384:(d=g.updateQueue,d===null?g.updateQueue=new Set([y]):d.add(y),fj(c,y,T)),!1;case 22:return g.flags|=65536,y===Vb?g.flags|=16384:(d=g.updateQueue,d===null?(d={transitions:null,markerInstances:null,retryQueue:new Set([y])},g.updateQueue=d):(g=d.retryQueue,g===null?d.retryQueue=new Set([y]):g.add(y)),fj(c,y,T)),!1}throw Error(r(435,g.tag))}return fj(c,y,T),by(),!1}if(yn)return d=va.current,d!==null?((d.flags&65536)===0&&(d.flags|=256),d.flags|=65536,d.lanes=T,y!==oS&&(c=Error(r(422),{cause:y}),A0(Va(c,g)))):(y!==oS&&(d=Error(r(423),{cause:y}),A0(Va(d,g))),c=c.current.alternate,c.flags|=65536,T&=-T,c.lanes|=T,y=Va(y,g),T=qS(c.stateNode,y,T),bS(c,T),Vr!==4&&(Vr=2)),!1;var k=Error(r(520),{cause:y});if(k=Va(k,g),H0===null?H0=[k]:H0.push(k),Vr!==4&&(Vr=2),d===null)return!0;y=Va(y,g),g=d;do{switch(g.tag){case 3:return g.flags|=65536,c=T&-T,g.lanes|=c,c=qS(g.stateNode,y,c),bS(g,c),!1;case 1:if(d=g.type,k=g.stateNode,(g.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Bu===null||!Bu.has(k))))return g.flags|=65536,T&=-T,g.lanes|=T,T=TM(T),kM(T,c,g,y),bS(g,T),!1}g=g.return}while(g!==null);return!1}var $S=Error(r(461)),pi=!1;function es(c,d,g,y){d.child=c===null?D4(d,null,g,y):yd(d,c.child,g,y)}function OM(c,d,g,y,T){g=g.render;var k=d.ref;if("ref"in y){var B={};for(var K in y)K!=="ref"&&(B[K]=y[K])}else B=y;return md(d),y=jS(c,d,g,B,k,T),K=CS(),c!==null&&!pi?(_S(c,d,T),Cc(c,d,T)):(yn&&K&&sS(d),d.flags|=1,es(c,d,y,T),d.child)}function EM(c,d,g,y,T){if(c===null){var k=g.type;return typeof k=="function"&&!nS(k)&&k.defaultProps===void 0&&g.compare===null?(d.tag=15,d.type=k,MM(c,d,k,y,T)):(c=zb(g.type,null,y,d,d.mode,T),c.ref=d.ref,c.return=d,d.child=c)}if(k=c.child,!KS(c,T)){var B=k.memoizedProps;if(g=g.compare,g=g!==null?g:Gt,g(B,y)&&c.ref===d.ref)return Cc(c,d,T)}return d.flags|=1,c=yc(k,y),c.ref=d.ref,c.return=d,d.child=c}function MM(c,d,g,y,T){if(c!==null){var k=c.memoizedProps;if(Gt(k,y)&&c.ref===d.ref)if(pi=!1,d.pendingProps=y=k,KS(c,T))(c.flags&131072)!==0&&(pi=!0);else return d.lanes=c.lanes,Cc(c,d,T)}return QS(c,d,g,y,T)}function DM(c,d,g,y){var T=y.children,k=c!==null?c.memoizedState:null;if(c===null&&d.stateNode===null&&(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((d.flags&128)!==0){if(k=k!==null?k.baseLanes|g:g,c!==null){for(y=d.child=c.child,T=0;y!==null;)T=T|y.lanes|y.childLanes,y=y.sibling;y=T&~k}else y=0,d.child=null;return RM(c,d,k,g,y)}if((g&536870912)!==0)d.memoizedState={baseLanes:0,cachePool:null},c!==null&&Ub(d,k!==null?k.cachePool:null),k!==null?P4(d,k):xS(),I4(d);else return y=d.lanes=536870912,RM(c,d,k!==null?k.baseLanes|g:g,g,y)}else k!==null?(Ub(d,k.cachePool),P4(d,k),Ru(),d.memoizedState=null):(c!==null&&Ub(d,null),xS(),Ru());return es(c,d,T,g),d.child}function R0(c,d){return c!==null&&c.tag===22||d.stateNode!==null||(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.sibling}function RM(c,d,g,y,T){var k=pS();return k=k===null?null:{parent:di._currentValue,pool:k},d.memoizedState={baseLanes:g,cachePool:k},c!==null&&Ub(d,null),xS(),I4(d),c!==null&&$f(c,d,y,!0),d.childLanes=T,null}function oy(c,d){return d=cy({mode:d.mode,children:d.children},c.mode),d.ref=c.ref,c.child=d,d.return=c,d}function NM(c,d,g){return yd(d,c.child,null,g),c=oy(d,d.pendingProps),c.flags|=2,ba(d),d.memoizedState=null,c}function rV(c,d,g){var y=d.pendingProps,T=(d.flags&128)!==0;if(d.flags&=-129,c===null){if(yn){if(y.mode==="hidden")return c=oy(d,y),d.lanes=536870912,R0(null,c);if(wS(d),(c=xr)?(c=WD(c,Xa),c=c!==null&&c.data==="&"?c:null,c!==null&&(d.memoizedState={dehydrated:c,treeContext:Cu!==null?{id:bl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},g=v4(c),g.return=d,d.child=g,Zi=d,xr=null)):c=null,c===null)throw Tu(d);return d.lanes=536870912,null}return oy(d,y)}var k=c.memoizedState;if(k!==null){var B=k.dehydrated;if(wS(d),T)if(d.flags&256)d.flags&=-257,d=NM(c,d,g);else if(d.memoizedState!==null)d.child=c.child,d.flags|=128,d=null;else throw Error(r(558));else if(pi||$f(c,d,g,!1),T=(g&c.childLanes)!==0,pi||T){if(y=sr,y!==null&&(B=Wt(y,g),B!==0&&B!==k.retryLane))throw k.retryLane=B,hd(c,B),Js(y,c,B),$S;by(),d=NM(c,d,g)}else c=k.treeContext,xr=Za(B.nextSibling),Zi=d,yn=!0,_u=null,Xa=!1,c!==null&&x4(d,c),d=oy(d,y),d.flags|=4096;return d}return c=yc(c.child,{mode:y.mode,children:y.children}),c.ref=d.ref,d.child=c,c.return=d,c}function ly(c,d){var g=d.ref;if(g===null)c!==null&&c.ref!==null&&(d.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(r(284));(c===null||c.ref!==g)&&(d.flags|=4194816)}}function QS(c,d,g,y,T){return md(d),g=jS(c,d,g,y,void 0,T),y=CS(),c!==null&&!pi?(_S(c,d,T),Cc(c,d,T)):(yn&&y&&sS(d),d.flags|=1,es(c,d,g,T),d.child)}function PM(c,d,g,y,T,k){return md(d),d.updateQueue=null,g=L4(d,y,g,T),B4(c),y=CS(),c!==null&&!pi?(_S(c,d,k),Cc(c,d,k)):(yn&&y&&sS(d),d.flags|=1,es(c,d,g,k),d.child)}function IM(c,d,g,y,T){if(md(d),d.stateNode===null){var k=Ff,B=g.contextType;typeof B=="object"&&B!==null&&(k=Ji(B)),k=new g(y,k),d.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=zS,d.stateNode=k,k._reactInternals=d,k=d.stateNode,k.props=y,k.state=d.memoizedState,k.refs={},gS(d),B=g.contextType,k.context=typeof B=="object"&&B!==null?Ji(B):Ff,k.state=d.memoizedState,B=g.getDerivedStateFromProps,typeof B=="function"&&(HS(d,g,B,y),k.state=d.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(B=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),B!==k.state&&zS.enqueueReplaceState(k,k.state,null),k0(d,y,k,T),T0(),k.state=d.memoizedState),typeof k.componentDidMount=="function"&&(d.flags|=4194308),y=!0}else if(c===null){k=d.stateNode;var K=d.memoizedProps,ne=Ad(g,K);k.props=ne;var Ae=k.context,_e=g.contextType;B=Ff,typeof _e=="object"&&_e!==null&&(B=Ji(_e));var Be=g.getDerivedStateFromProps;_e=typeof Be=="function"||typeof k.getSnapshotBeforeUpdate=="function",K=d.pendingProps!==K,_e||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(K||Ae!==B)&&wM(d,k,y,B),Ou=!1;var Se=d.memoizedState;k.state=Se,k0(d,y,k,T),T0(),Ae=d.memoizedState,K||Se!==Ae||Ou?(typeof Be=="function"&&(HS(d,g,Be,y),Ae=d.memoizedState),(ne=Ou||AM(d,g,ne,y,Se,Ae,B))?(_e||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(d.flags|=4194308)):(typeof k.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=y,d.memoizedState=Ae),k.props=y,k.state=Ae,k.context=B,y=ne):(typeof k.componentDidMount=="function"&&(d.flags|=4194308),y=!1)}else{k=d.stateNode,vS(c,d),B=d.memoizedProps,_e=Ad(g,B),k.props=_e,Be=d.pendingProps,Se=k.context,Ae=g.contextType,ne=Ff,typeof Ae=="object"&&Ae!==null&&(ne=Ji(Ae)),K=g.getDerivedStateFromProps,(Ae=typeof K=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(B!==Be||Se!==ne)&&wM(d,k,y,ne),Ou=!1,Se=d.memoizedState,k.state=Se,k0(d,y,k,T),T0();var Ce=d.memoizedState;B!==Be||Se!==Ce||Ou||c!==null&&c.dependencies!==null&&$b(c.dependencies)?(typeof K=="function"&&(HS(d,g,K,y),Ce=d.memoizedState),(_e=Ou||AM(d,g,_e,y,Se,Ce,ne)||c!==null&&c.dependencies!==null&&$b(c.dependencies))?(Ae||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(y,Ce,ne),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(y,Ce,ne)),typeof k.componentDidUpdate=="function"&&(d.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof k.componentDidUpdate!="function"||B===c.memoizedProps&&Se===c.memoizedState||(d.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||B===c.memoizedProps&&Se===c.memoizedState||(d.flags|=1024),d.memoizedProps=y,d.memoizedState=Ce),k.props=y,k.state=Ce,k.context=ne,y=_e):(typeof k.componentDidUpdate!="function"||B===c.memoizedProps&&Se===c.memoizedState||(d.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||B===c.memoizedProps&&Se===c.memoizedState||(d.flags|=1024),y=!1)}return k=y,ly(c,d),y=(d.flags&128)!==0,k||y?(k=d.stateNode,g=y&&typeof g.getDerivedStateFromError!="function"?null:k.render(),d.flags|=1,c!==null&&y?(d.child=yd(d,c.child,null,T),d.child=yd(d,null,g,T)):es(c,d,g,T),d.memoizedState=k.state,c=d.child):c=Cc(c,d,T),c}function BM(c,d,g,y){return fd(),d.flags|=256,es(c,d,g,y),d.child}var US={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function WS(c){return{baseLanes:c,cachePool:_4()}}function VS(c,d,g){return c=c!==null?c.childLanes&~g:0,d&&(c|=xa),c}function LM(c,d,g){var y=d.pendingProps,T=!1,k=(d.flags&128)!==0,B;if((B=k)||(B=c!==null&&c.memoizedState===null?!1:(ii.current&2)!==0),B&&(T=!0,d.flags&=-129),B=(d.flags&32)!==0,d.flags&=-33,c===null){if(yn){if(T?Du(d):Ru(),(c=xr)?(c=WD(c,Xa),c=c!==null&&c.data!=="&"?c:null,c!==null&&(d.memoizedState={dehydrated:c,treeContext:Cu!==null?{id:bl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},g=v4(c),g.return=d,d.child=g,Zi=d,xr=null)):c=null,c===null)throw Tu(d);return Oj(c)?d.lanes=32:d.lanes=536870912,null}var K=y.children;return y=y.fallback,T?(Ru(),T=d.mode,K=cy({mode:"hidden",children:K},T),y=dd(y,T,g,null),K.return=d,y.return=d,K.sibling=y,d.child=K,y=d.child,y.memoizedState=WS(g),y.childLanes=VS(c,B,g),d.memoizedState=US,R0(null,y)):(Du(d),YS(d,K))}var ne=c.memoizedState;if(ne!==null&&(K=ne.dehydrated,K!==null)){if(k)d.flags&256?(Du(d),d.flags&=-257,d=GS(c,d,g)):d.memoizedState!==null?(Ru(),d.child=c.child,d.flags|=128,d=null):(Ru(),K=y.fallback,T=d.mode,y=cy({mode:"visible",children:y.children},T),K=dd(K,T,g,null),K.flags|=2,y.return=d,K.return=d,y.sibling=K,d.child=y,yd(d,c.child,null,g),y=d.child,y.memoizedState=WS(g),y.childLanes=VS(c,B,g),d.memoizedState=US,d=R0(null,y));else if(Du(d),Oj(K)){if(B=K.nextSibling&&K.nextSibling.dataset,B)var Ae=B.dgst;B=Ae,y=Error(r(419)),y.stack="",y.digest=B,A0({value:y,source:null,stack:null}),d=GS(c,d,g)}else if(pi||$f(c,d,g,!1),B=(g&c.childLanes)!==0,pi||B){if(B=sr,B!==null&&(y=Wt(B,g),y!==0&&y!==ne.retryLane))throw ne.retryLane=y,hd(c,y),Js(B,c,y),$S;kj(K)||by(),d=GS(c,d,g)}else kj(K)?(d.flags|=192,d.child=c.child,d=null):(c=ne.treeContext,xr=Za(K.nextSibling),Zi=d,yn=!0,_u=null,Xa=!1,c!==null&&x4(d,c),d=YS(d,y.children),d.flags|=4096);return d}return T?(Ru(),K=y.fallback,T=d.mode,ne=c.child,Ae=ne.sibling,y=yc(ne,{mode:"hidden",children:y.children}),y.subtreeFlags=ne.subtreeFlags&65011712,Ae!==null?K=yc(Ae,K):(K=dd(K,T,g,null),K.flags|=2),K.return=d,y.return=d,y.sibling=K,d.child=y,R0(null,y),y=d.child,K=c.child.memoizedState,K===null?K=WS(g):(T=K.cachePool,T!==null?(ne=di._currentValue,T=T.parent!==ne?{parent:ne,pool:ne}:T):T=_4(),K={baseLanes:K.baseLanes|g,cachePool:T}),y.memoizedState=K,y.childLanes=VS(c,B,g),d.memoizedState=US,R0(c.child,y)):(Du(d),g=c.child,c=g.sibling,g=yc(g,{mode:"visible",children:y.children}),g.return=d,g.sibling=null,c!==null&&(B=d.deletions,B===null?(d.deletions=[c],d.flags|=16):B.push(c)),d.child=g,d.memoizedState=null,g)}function YS(c,d){return d=cy({mode:"visible",children:d},c.mode),d.return=c,c.child=d}function cy(c,d){return c=ga(22,c,null,d),c.lanes=0,c}function GS(c,d,g){return yd(d,c.child,null,g),c=YS(d,d.pendingProps.children),c.flags|=2,d.memoizedState=null,c}function FM(c,d,g){c.lanes|=d;var y=c.alternate;y!==null&&(y.lanes|=d),uS(c.return,d,g)}function XS(c,d,g,y,T,k){var B=c.memoizedState;B===null?c.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:y,tail:g,tailMode:T,treeForkCount:k}:(B.isBackwards=d,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=g,B.tailMode=T,B.treeForkCount=k)}function HM(c,d,g){var y=d.pendingProps,T=y.revealOrder,k=y.tail;y=y.children;var B=ii.current,K=(B&2)!==0;if(K?(B=B&1|2,d.flags|=128):B&=1,V(ii,B),es(c,d,y,g),y=yn?x0:0,!K&&c!==null&&(c.flags&128)!==0)e:for(c=d.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&FM(c,g,d);else if(c.tag===19)FM(c,g,d);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===d)break e;for(;c.sibling===null;){if(c.return===null||c.return===d)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}switch(T){case"forwards":for(g=d.child,T=null;g!==null;)c=g.alternate,c!==null&&Kb(c)===null&&(T=g),g=g.sibling;g=T,g===null?(T=d.child,d.child=null):(T=g.sibling,g.sibling=null),XS(d,!1,T,g,k,y);break;case"backwards":case"unstable_legacy-backwards":for(g=null,T=d.child,d.child=null;T!==null;){if(c=T.alternate,c!==null&&Kb(c)===null){d.child=T;break}c=T.sibling,T.sibling=g,g=T,T=c}XS(d,!0,g,null,k,y);break;case"together":XS(d,!1,null,null,void 0,y);break;default:d.memoizedState=null}return d.child}function Cc(c,d,g){if(c!==null&&(d.dependencies=c.dependencies),Iu|=d.lanes,(g&d.childLanes)===0)if(c!==null){if($f(c,d,g,!1),(g&d.childLanes)===0)return null}else return null;if(c!==null&&d.child!==c.child)throw Error(r(153));if(d.child!==null){for(c=d.child,g=yc(c,c.pendingProps),d.child=g,g.return=d;c.sibling!==null;)c=c.sibling,g=g.sibling=yc(c,c.pendingProps),g.return=d;g.sibling=null}return d.child}function KS(c,d){return(c.lanes&d)!==0?!0:(c=c.dependencies,!!(c!==null&&$b(c)))}function iV(c,d,g){switch(d.tag){case 3:Xe(d,d.stateNode.containerInfo),ku(d,di,c.memoizedState.cache),fd();break;case 27:case 5:Re(d);break;case 4:Xe(d,d.stateNode.containerInfo);break;case 10:ku(d,d.type,d.memoizedProps.value);break;case 31:if(d.memoizedState!==null)return d.flags|=128,wS(d),null;break;case 13:var y=d.memoizedState;if(y!==null)return y.dehydrated!==null?(Du(d),d.flags|=128,null):(g&d.child.childLanes)!==0?LM(c,d,g):(Du(d),c=Cc(c,d,g),c!==null?c.sibling:null);Du(d);break;case 19:var T=(c.flags&128)!==0;if(y=(g&d.childLanes)!==0,y||($f(c,d,g,!1),y=(g&d.childLanes)!==0),T){if(y)return HM(c,d,g);d.flags|=128}if(T=d.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),V(ii,ii.current),y)break;return null;case 22:return d.lanes=0,DM(c,d,g,d.pendingProps);case 24:ku(d,di,c.memoizedState.cache)}return Cc(c,d,g)}function zM(c,d,g){if(c!==null)if(c.memoizedProps!==d.pendingProps)pi=!0;else{if(!KS(c,g)&&(d.flags&128)===0)return pi=!1,iV(c,d,g);pi=(c.flags&131072)!==0}else pi=!1,yn&&(d.flags&1048576)!==0&&y4(d,x0,d.index);switch(d.lanes=0,d.tag){case 16:e:{var y=d.pendingProps;if(c=vd(d.elementType),d.type=c,typeof c=="function")nS(c)?(y=Ad(c,y),d.tag=1,d=IM(null,d,c,y,g)):(d.tag=0,d=QS(null,d,c,y,g));else{if(c!=null){var T=c.$$typeof;if(T===_){d.tag=11,d=OM(null,d,c,y,g);break e}else if(T===E){d.tag=14,d=EM(null,d,c,y,g);break e}}throw d=z(c)||c,Error(r(306,d,""))}}return d;case 0:return QS(c,d,d.type,d.pendingProps,g);case 1:return y=d.type,T=Ad(y,d.pendingProps),IM(c,d,y,T,g);case 3:e:{if(Xe(d,d.stateNode.containerInfo),c===null)throw Error(r(387));y=d.pendingProps;var k=d.memoizedState;T=k.element,vS(c,d),k0(d,y,null,g);var B=d.memoizedState;if(y=B.cache,ku(d,di,y),y!==k.cache&&hS(d,[di],g,!0),T0(),y=B.element,k.isDehydrated)if(k={element:y,isDehydrated:!1,cache:B.cache},d.updateQueue.baseState=k,d.memoizedState=k,d.flags&256){d=BM(c,d,y,g);break e}else if(y!==T){T=Va(Error(r(424)),d),A0(T),d=BM(c,d,y,g);break e}else{switch(c=d.stateNode.containerInfo,c.nodeType){case 9:c=c.body;break;default:c=c.nodeName==="HTML"?c.ownerDocument.body:c}for(xr=Za(c.firstChild),Zi=d,yn=!0,_u=null,Xa=!0,g=D4(d,null,y,g),d.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling}else{if(fd(),y===T){d=Cc(c,d,g);break e}es(c,d,y,g)}d=d.child}return d;case 26:return ly(c,d),c===null?(g=ZD(d.type,null,d.pendingProps,null))?d.memoizedState=g:yn||(g=d.type,c=d.pendingProps,y=Cy(be.current).createElement(g),y[Br]=d,y[Mi]=c,ts(y,g,c),Lr(y),d.stateNode=y):d.memoizedState=ZD(d.type,c.memoizedProps,d.pendingProps,c.memoizedState),null;case 27:return Re(d),c===null&&yn&&(y=d.stateNode=GD(d.type,d.pendingProps,be.current),Zi=d,Xa=!0,T=xr,zu(d.type)?(Ej=T,xr=Za(y.firstChild)):xr=T),es(c,d,d.pendingProps.children,g),ly(c,d),c===null&&(d.flags|=4194304),d.child;case 5:return c===null&&yn&&((T=y=xr)&&(y=NV(y,d.type,d.pendingProps,Xa),y!==null?(d.stateNode=y,Zi=d,xr=Za(y.firstChild),Xa=!1,T=!0):T=!1),T||Tu(d)),Re(d),T=d.type,k=d.pendingProps,B=c!==null?c.memoizedProps:null,y=k.children,Cj(T,k)?y=null:B!==null&&Cj(T,B)&&(d.flags|=32),d.memoizedState!==null&&(T=jS(c,d,GW,null,null,g),Y0._currentValue=T),ly(c,d),es(c,d,y,g),d.child;case 6:return c===null&&yn&&((c=g=xr)&&(g=PV(g,d.pendingProps,Xa),g!==null?(d.stateNode=g,Zi=d,xr=null,c=!0):c=!1),c||Tu(d)),null;case 13:return LM(c,d,g);case 4:return Xe(d,d.stateNode.containerInfo),y=d.pendingProps,c===null?d.child=yd(d,null,y,g):es(c,d,y,g),d.child;case 11:return OM(c,d,d.type,d.pendingProps,g);case 7:return es(c,d,d.pendingProps,g),d.child;case 8:return es(c,d,d.pendingProps.children,g),d.child;case 12:return es(c,d,d.pendingProps.children,g),d.child;case 10:return y=d.pendingProps,ku(d,d.type,y.value),es(c,d,y.children,g),d.child;case 9:return T=d.type._context,y=d.pendingProps.children,md(d),T=Ji(T),y=y(T),d.flags|=1,es(c,d,y,g),d.child;case 14:return EM(c,d,d.type,d.pendingProps,g);case 15:return MM(c,d,d.type,d.pendingProps,g);case 19:return HM(c,d,g);case 31:return rV(c,d,g);case 22:return DM(c,d,g,d.pendingProps);case 24:return md(d),y=Ji(di),c===null?(T=pS(),T===null&&(T=sr,k=dS(),T.pooledCache=k,k.refCount++,k!==null&&(T.pooledCacheLanes|=g),T=k),d.memoizedState={parent:y,cache:T},gS(d),ku(d,di,T)):((c.lanes&g)!==0&&(vS(c,d),k0(d,null,null,g),T0()),T=c.memoizedState,k=d.memoizedState,T.parent!==y?(T={parent:y,cache:y},d.memoizedState=T,d.lanes===0&&(d.memoizedState=d.updateQueue.baseState=T),ku(d,di,y)):(y=k.cache,ku(d,di,y),y!==T.cache&&hS(d,[di],g,!0))),es(c,d,d.pendingProps.children,g),d.child;case 29:throw d.pendingProps}throw Error(r(156,d.tag))}function _c(c){c.flags|=4}function ZS(c,d,g,y,T){if((d=(c.mode&32)!==0)&&(d=!1),d){if(c.flags|=16777216,(T&335544128)===T)if(c.stateNode.complete)c.flags|=8192;else if(pD())c.flags|=8192;else throw bd=Vb,mS}else c.flags&=-16777217}function qM(c,d){if(d.type!=="stylesheet"||(d.state.loading&4)!==0)c.flags&=-16777217;else if(c.flags|=16777216,!r8(d))if(pD())c.flags|=8192;else throw bd=Vb,mS}function uy(c,d){d!==null&&(c.flags|=4),c.flags&16384&&(d=c.tag!==22?Dt():536870912,c.lanes|=d,tp|=d)}function N0(c,d){if(!yn)switch(c.tailMode){case"hidden":d=c.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?c.tail=null:g.sibling=null;break;case"collapsed":g=c.tail;for(var y=null;g!==null;)g.alternate!==null&&(y=g),g=g.sibling;y===null?d||c.tail===null?c.tail=null:c.tail.sibling=null:y.sibling=null}}function Ar(c){var d=c.alternate!==null&&c.alternate.child===c.child,g=0,y=0;if(d)for(var T=c.child;T!==null;)g|=T.lanes|T.childLanes,y|=T.subtreeFlags&65011712,y|=T.flags&65011712,T.return=c,T=T.sibling;else for(T=c.child;T!==null;)g|=T.lanes|T.childLanes,y|=T.subtreeFlags,y|=T.flags,T.return=c,T=T.sibling;return c.subtreeFlags|=y,c.childLanes=g,d}function sV(c,d,g){var y=d.pendingProps;switch(aS(d),d.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(d),null;case 1:return Ar(d),null;case 3:return g=d.stateNode,y=null,c!==null&&(y=c.memoizedState.cache),d.memoizedState.cache!==y&&(d.flags|=2048),wc(di),ze(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(c===null||c.child===null)&&(qf(d)?_c(d):c===null||c.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,lS())),Ar(d),null;case 26:var T=d.type,k=d.memoizedState;return c===null?(_c(d),k!==null?(Ar(d),qM(d,k)):(Ar(d),ZS(d,T,null,y,g))):k?k!==c.memoizedState?(_c(d),Ar(d),qM(d,k)):(Ar(d),d.flags&=-16777217):(c=c.memoizedProps,c!==y&&_c(d),Ar(d),ZS(d,T,c,y,g)),null;case 27:if(ae(d),g=be.current,T=d.type,c!==null&&d.stateNode!=null)c.memoizedProps!==y&&_c(d);else{if(!y){if(d.stateNode===null)throw Error(r(166));return Ar(d),null}c=te.current,qf(d)?A4(d):(c=GD(T,y,g),d.stateNode=c,_c(d))}return Ar(d),null;case 5:if(ae(d),T=d.type,c!==null&&d.stateNode!=null)c.memoizedProps!==y&&_c(d);else{if(!y){if(d.stateNode===null)throw Error(r(166));return Ar(d),null}if(k=te.current,qf(d))A4(d);else{var B=Cy(be.current);switch(k){case 1:k=B.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:k=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":k=B.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":k=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":k=B.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?k.multiple=!0:y.size&&(k.size=y.size);break;default:k=typeof y.is=="string"?B.createElement(T,{is:y.is}):B.createElement(T)}}k[Br]=d,k[Mi]=y;e:for(B=d.child;B!==null;){if(B.tag===5||B.tag===6)k.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===d)break e;for(;B.sibling===null;){if(B.return===null||B.return===d)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}d.stateNode=k;e:switch(ts(k,T,y),T){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&_c(d)}}return Ar(d),ZS(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==y&&_c(d);else{if(typeof y!="string"&&d.stateNode===null)throw Error(r(166));if(c=be.current,qf(d)){if(c=d.stateNode,g=d.memoizedProps,y=null,T=Zi,T!==null)switch(T.tag){case 27:case 5:y=T.memoizedProps}c[Br]=d,c=!!(c.nodeValue===g||y!==null&&y.suppressHydrationWarning===!0||LD(c.nodeValue,g)),c||Tu(d,!0)}else c=Cy(c).createTextNode(y),c[Br]=d,d.stateNode=c}return Ar(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(y=qf(d),g!==null){if(c===null){if(!y)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[Br]=d}else fd(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Ar(d),c=!1}else g=lS(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(ba(d),d):(ba(d),null);if((d.flags&128)!==0)throw Error(r(558))}return Ar(d),null;case 13:if(y=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(T=qf(d),y!==null&&y.dehydrated!==null){if(c===null){if(!T)throw Error(r(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[Br]=d}else fd(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Ar(d),T=!1}else T=lS(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=T),T=!0;if(!T)return d.flags&256?(ba(d),d):(ba(d),null)}return ba(d),(d.flags&128)!==0?(d.lanes=g,d):(g=y!==null,c=c!==null&&c.memoizedState!==null,g&&(y=d.child,T=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(T=y.alternate.memoizedState.cachePool.pool),k=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(k=y.memoizedState.cachePool.pool),k!==T&&(y.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),uy(d,d.updateQueue),Ar(d),null);case 4:return ze(),c===null&&xj(d.stateNode.containerInfo),Ar(d),null;case 10:return wc(d.type),Ar(d),null;case 19:if(X(ii),y=d.memoizedState,y===null)return Ar(d),null;if(T=(d.flags&128)!==0,k=y.rendering,k===null)if(T)N0(y,!1);else{if(Vr!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(k=Kb(c),k!==null){for(d.flags|=128,N0(y,!1),c=k.updateQueue,d.updateQueue=c,uy(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)g4(g,c),g=g.sibling;return V(ii,ii.current&1|2),yn&&xc(d,y.treeForkCount),d.child}c=c.sibling}y.tail!==null&&Ue()>my&&(d.flags|=128,T=!0,N0(y,!1),d.lanes=4194304)}else{if(!T)if(c=Kb(k),c!==null){if(d.flags|=128,T=!0,c=c.updateQueue,d.updateQueue=c,uy(d,c),N0(y,!0),y.tail===null&&y.tailMode==="hidden"&&!k.alternate&&!yn)return Ar(d),null}else 2*Ue()-y.renderingStartTime>my&&g!==536870912&&(d.flags|=128,T=!0,N0(y,!1),d.lanes=4194304);y.isBackwards?(k.sibling=d.child,d.child=k):(c=y.last,c!==null?c.sibling=k:d.child=k,y.last=k)}return y.tail!==null?(c=y.tail,y.rendering=c,y.tail=c.sibling,y.renderingStartTime=Ue(),c.sibling=null,g=ii.current,V(ii,T?g&1|2:g&1),yn&&xc(d,y.treeForkCount),c):(Ar(d),null);case 22:case 23:return ba(d),AS(),y=d.memoizedState!==null,c!==null?c.memoizedState!==null!==y&&(d.flags|=8192):y&&(d.flags|=8192),y?(g&536870912)!==0&&(d.flags&128)===0&&(Ar(d),d.subtreeFlags&6&&(d.flags|=8192)):Ar(d),g=d.updateQueue,g!==null&&uy(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),y=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool),y!==g&&(d.flags|=2048),c!==null&&X(gd),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),wc(di),Ar(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function aV(c,d){switch(aS(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return wc(di),ze(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return ae(d),null;case 31:if(d.memoizedState!==null){if(ba(d),d.alternate===null)throw Error(r(340));fd()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(ba(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));fd()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return X(ii),null;case 4:return ze(),null;case 10:return wc(d.type),null;case 22:case 23:return ba(d),AS(),c!==null&&X(gd),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return wc(di),null;case 25:return null;default:return null}}function $M(c,d){switch(aS(d),d.tag){case 3:wc(di),ze();break;case 26:case 27:case 5:ae(d);break;case 4:ze();break;case 31:d.memoizedState!==null&&ba(d);break;case 13:ba(d);break;case 19:X(ii);break;case 10:wc(d.type);break;case 22:case 23:ba(d),AS(),c!==null&&X(gd);break;case 24:wc(di)}}function P0(c,d){try{var g=d.updateQueue,y=g!==null?g.lastEffect:null;if(y!==null){var T=y.next;g=T;do{if((g.tag&c)===c){y=void 0;var k=g.create,B=g.inst;y=k(),B.destroy=y}g=g.next}while(g!==T)}}catch(K){Yn(d,d.return,K)}}function Nu(c,d,g){try{var y=d.updateQueue,T=y!==null?y.lastEffect:null;if(T!==null){var k=T.next;y=k;do{if((y.tag&c)===c){var B=y.inst,K=B.destroy;if(K!==void 0){B.destroy=void 0,T=d;var ne=g,Ae=K;try{Ae()}catch(_e){Yn(T,ne,_e)}}}y=y.next}while(y!==k)}}catch(_e){Yn(d,d.return,_e)}}function QM(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{N4(d,g)}catch(y){Yn(c,c.return,y)}}}function UM(c,d,g){g.props=Ad(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(y){Yn(c,d,y)}}function I0(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var y=c.stateNode;break;case 30:y=c.stateNode;break;default:y=c.stateNode}typeof g=="function"?c.refCleanup=g(y):g.current=y}}catch(T){Yn(c,d,T)}}function xl(c,d){var g=c.ref,y=c.refCleanup;if(g!==null)if(typeof y=="function")try{y()}catch(T){Yn(c,d,T)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(T){Yn(c,d,T)}else g.current=null}function WM(c){var d=c.type,g=c.memoizedProps,y=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&y.focus();break e;case"img":g.src?y.src=g.src:g.srcSet&&(y.srcset=g.srcSet)}}catch(T){Yn(c,c.return,T)}}function JS(c,d,g){try{var y=c.stateNode;kV(y,c.type,g,d),y[Mi]=d}catch(T){Yn(c,c.return,T)}}function VM(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&zu(c.type)||c.tag===4}function ej(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||VM(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&zu(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function tj(c,d,g){var y=c.tag;if(y===5||y===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ge));else if(y!==4&&(y===27&&zu(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for(tj(c,d,g),c=c.sibling;c!==null;)tj(c,d,g),c=c.sibling}function hy(c,d,g){var y=c.tag;if(y===5||y===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(y!==4&&(y===27&&zu(c.type)&&(g=c.stateNode),c=c.child,c!==null))for(hy(c,d,g),c=c.sibling;c!==null;)hy(c,d,g),c=c.sibling}function YM(c){var d=c.stateNode,g=c.memoizedProps;try{for(var y=c.type,T=d.attributes;T.length;)d.removeAttributeNode(T[0]);ts(d,y,g),d[Br]=c,d[Mi]=g}catch(k){Yn(c,c.return,k)}}var Tc=!1,mi=!1,nj=!1,GM=typeof WeakSet=="function"?WeakSet:Set,Pi=null;function oV(c,d){if(c=c.containerInfo,Sj=Dy,c=yr(c),Ur(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var y=g.getSelection&&g.getSelection();if(y&&y.rangeCount!==0){g=y.anchorNode;var T=y.anchorOffset,k=y.focusNode;y=y.focusOffset;try{g.nodeType,k.nodeType}catch{g=null;break e}var B=0,K=-1,ne=-1,Ae=0,_e=0,Be=c,Se=null;t:for(;;){for(var Ce;Be!==g||T!==0&&Be.nodeType!==3||(K=B+T),Be!==k||y!==0&&Be.nodeType!==3||(ne=B+y),Be.nodeType===3&&(B+=Be.nodeValue.length),(Ce=Be.firstChild)!==null;)Se=Be,Be=Ce;for(;;){if(Be===c)break t;if(Se===g&&++Ae===T&&(K=B),Se===k&&++_e===y&&(ne=B),(Ce=Be.nextSibling)!==null)break;Be=Se,Se=Be.parentNode}Be=Ce}g=K===-1||ne===-1?null:{start:K,end:ne}}else g=null}g=g||{start:0,end:0}}else g=null;for(jj={focusedElem:c,selectionRange:g},Dy=!1,Pi=d;Pi!==null;)if(d=Pi,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,Pi=c;else for(;Pi!==null;){switch(d=Pi,k=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g<c.length;g++)T=c[g],T.ref.impl=T.nextImpl;break;case 11:case 15:break;case 1:if((c&1024)!==0&&k!==null){c=void 0,g=d,T=k.memoizedProps,k=k.memoizedState,y=g.stateNode;try{var At=Ad(g.type,T);c=y.getSnapshotBeforeUpdate(At,k),y.__reactInternalSnapshotBeforeUpdate=c}catch(It){Yn(g,g.return,It)}}break;case 3:if((c&1024)!==0){if(c=d.stateNode.containerInfo,g=c.nodeType,g===9)Tj(c);else if(g===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":Tj(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((c&1024)!==0)throw Error(r(163))}if(c=d.sibling,c!==null){c.return=d.return,Pi=c;break}Pi=d.return}}function XM(c,d,g){var y=g.flags;switch(g.tag){case 0:case 11:case 15:Oc(c,g),y&4&&P0(5,g);break;case 1:if(Oc(c,g),y&4)if(c=g.stateNode,d===null)try{c.componentDidMount()}catch(B){Yn(g,g.return,B)}else{var T=Ad(g.type,d.memoizedProps);d=d.memoizedState;try{c.componentDidUpdate(T,d,c.__reactInternalSnapshotBeforeUpdate)}catch(B){Yn(g,g.return,B)}}y&64&&QM(g),y&512&&I0(g,g.return);break;case 3:if(Oc(c,g),y&64&&(c=g.updateQueue,c!==null)){if(d=null,g.child!==null)switch(g.child.tag){case 27:case 5:d=g.child.stateNode;break;case 1:d=g.child.stateNode}try{N4(c,d)}catch(B){Yn(g,g.return,B)}}break;case 27:d===null&&y&4&&YM(g);case 26:case 5:Oc(c,g),d===null&&y&4&&WM(g),y&512&&I0(g,g.return);break;case 12:Oc(c,g);break;case 31:Oc(c,g),y&4&&JM(c,g);break;case 13:Oc(c,g),y&4&&eD(c,g),y&64&&(c=g.memoizedState,c!==null&&(c=c.dehydrated,c!==null&&(g=gV.bind(null,g),IV(c,g))));break;case 22:if(y=g.memoizedState!==null||Tc,!y){d=d!==null&&d.memoizedState!==null||mi,T=Tc;var k=mi;Tc=y,(mi=d)&&!k?Ec(c,g,(g.subtreeFlags&8772)!==0):Oc(c,g),Tc=T,mi=k}break;case 30:break;default:Oc(c,g)}}function KM(c){var d=c.alternate;d!==null&&(c.alternate=null,KM(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&Or(d)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}var Er=null,Gs=!1;function kc(c,d,g){for(g=g.child;g!==null;)ZM(c,d,g),g=g.sibling}function ZM(c,d,g){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Pt,g)}catch{}switch(g.tag){case 26:mi||xl(g,d),kc(c,d,g),g.memoizedState?g.memoizedState.count--:g.stateNode&&(g=g.stateNode,g.parentNode.removeChild(g));break;case 27:mi||xl(g,d);var y=Er,T=Gs;zu(g.type)&&(Er=g.stateNode,Gs=!1),kc(c,d,g),U0(g.stateNode),Er=y,Gs=T;break;case 5:mi||xl(g,d);case 6:if(y=Er,T=Gs,Er=null,kc(c,d,g),Er=y,Gs=T,Er!==null)if(Gs)try{(Er.nodeType===9?Er.body:Er.nodeName==="HTML"?Er.ownerDocument.body:Er).removeChild(g.stateNode)}catch(k){Yn(g,d,k)}else try{Er.removeChild(g.stateNode)}catch(k){Yn(g,d,k)}break;case 18:Er!==null&&(Gs?(c=Er,QD(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,g.stateNode),cp(c)):QD(Er,g.stateNode));break;case 4:y=Er,T=Gs,Er=g.stateNode.containerInfo,Gs=!0,kc(c,d,g),Er=y,Gs=T;break;case 0:case 11:case 14:case 15:Nu(2,g,d),mi||Nu(4,g,d),kc(c,d,g);break;case 1:mi||(xl(g,d),y=g.stateNode,typeof y.componentWillUnmount=="function"&&UM(g,d,y)),kc(c,d,g);break;case 21:kc(c,d,g);break;case 22:mi=(y=mi)||g.memoizedState!==null,kc(c,d,g),mi=y;break;default:kc(c,d,g)}}function JM(c,d){if(d.memoizedState===null&&(c=d.alternate,c!==null&&(c=c.memoizedState,c!==null))){c=c.dehydrated;try{cp(c)}catch(g){Yn(d,d.return,g)}}}function eD(c,d){if(d.memoizedState===null&&(c=d.alternate,c!==null&&(c=c.memoizedState,c!==null&&(c=c.dehydrated,c!==null))))try{cp(c)}catch(g){Yn(d,d.return,g)}}function lV(c){switch(c.tag){case 31:case 13:case 19:var d=c.stateNode;return d===null&&(d=c.stateNode=new GM),d;case 22:return c=c.stateNode,d=c._retryCache,d===null&&(d=c._retryCache=new GM),d;default:throw Error(r(435,c.tag))}}function dy(c,d){var g=lV(c);d.forEach(function(y){if(!g.has(y)){g.add(y);var T=vV.bind(null,c,y);y.then(T,T)}})}function Xs(c,d){var g=d.deletions;if(g!==null)for(var y=0;y<g.length;y++){var T=g[y],k=c,B=d,K=B;e:for(;K!==null;){switch(K.tag){case 27:if(zu(K.type)){Er=K.stateNode,Gs=!1;break e}break;case 5:Er=K.stateNode,Gs=!1;break e;case 3:case 4:Er=K.stateNode.containerInfo,Gs=!0;break e}K=K.return}if(Er===null)throw Error(r(160));ZM(k,B,T),Er=null,Gs=!1,k=T.alternate,k!==null&&(k.return=null),T.return=null}if(d.subtreeFlags&13886)for(d=d.child;d!==null;)tD(d,c),d=d.sibling}var Oo=null;function tD(c,d){var g=c.alternate,y=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:Xs(d,c),Ks(c),y&4&&(Nu(3,c,c.return),P0(3,c),Nu(5,c,c.return));break;case 1:Xs(d,c),Ks(c),y&512&&(mi||g===null||xl(g,g.return)),y&64&&Tc&&(c=c.updateQueue,c!==null&&(y=c.callbacks,y!==null&&(g=c.shared.hiddenCallbacks,c.shared.hiddenCallbacks=g===null?y:g.concat(y))));break;case 26:var T=Oo;if(Xs(d,c),Ks(c),y&512&&(mi||g===null||xl(g,g.return)),y&4){var k=g!==null?g.memoizedState:null;if(y=c.memoizedState,g===null)if(y===null)if(c.stateNode===null){e:{y=c.type,g=c.memoizedProps,T=T.ownerDocument||T;t:switch(y){case"title":k=T.getElementsByTagName("title")[0],(!k||k[vr]||k[Br]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=T.createElement(y),T.head.insertBefore(k,T.querySelector("head > title"))),ts(k,y,g),k[Br]=c,Lr(k),y=k;break e;case"link":var B=t8("link","href",T).get(y+(g.href||""));if(B){for(var K=0;K<B.length;K++)if(k=B[K],k.getAttribute("href")===(g.href==null||g.href===""?null:g.href)&&k.getAttribute("rel")===(g.rel==null?null:g.rel)&&k.getAttribute("title")===(g.title==null?null:g.title)&&k.getAttribute("crossorigin")===(g.crossOrigin==null?null:g.crossOrigin)){B.splice(K,1);break t}}k=T.createElement(y),ts(k,y,g),T.head.appendChild(k);break;case"meta":if(B=t8("meta","content",T).get(y+(g.content||""))){for(K=0;K<B.length;K++)if(k=B[K],k.getAttribute("content")===(g.content==null?null:""+g.content)&&k.getAttribute("name")===(g.name==null?null:g.name)&&k.getAttribute("property")===(g.property==null?null:g.property)&&k.getAttribute("http-equiv")===(g.httpEquiv==null?null:g.httpEquiv)&&k.getAttribute("charset")===(g.charSet==null?null:g.charSet)){B.splice(K,1);break t}}k=T.createElement(y),ts(k,y,g),T.head.appendChild(k);break;default:throw Error(r(468,y))}k[Br]=c,Lr(k),y=k}c.stateNode=y}else n8(T,c.type,c.stateNode);else c.stateNode=e8(T,y,c.memoizedProps);else k!==y?(k===null?g.stateNode!==null&&(g=g.stateNode,g.parentNode.removeChild(g)):k.count--,y===null?n8(T,c.type,c.stateNode):e8(T,y,c.memoizedProps)):y===null&&c.stateNode!==null&&JS(c,c.memoizedProps,g.memoizedProps)}break;case 27:Xs(d,c),Ks(c),y&512&&(mi||g===null||xl(g,g.return)),g!==null&&y&4&&JS(c,c.memoizedProps,g.memoizedProps);break;case 5:if(Xs(d,c),Ks(c),y&512&&(mi||g===null||xl(g,g.return)),c.flags&32){T=c.stateNode;try{Rt(T,"")}catch(At){Yn(c,c.return,At)}}y&4&&c.stateNode!=null&&(T=c.memoizedProps,JS(c,T,g!==null?g.memoizedProps:T)),y&1024&&(nj=!0);break;case 6:if(Xs(d,c),Ks(c),y&4){if(c.stateNode===null)throw Error(r(162));y=c.memoizedProps,g=c.stateNode;try{g.nodeValue=y}catch(At){Yn(c,c.return,At)}}break;case 3:if(ky=null,T=Oo,Oo=_y(d.containerInfo),Xs(d,c),Oo=T,Ks(c),y&4&&g!==null&&g.memoizedState.isDehydrated)try{cp(d.containerInfo)}catch(At){Yn(c,c.return,At)}nj&&(nj=!1,nD(c));break;case 4:y=Oo,Oo=_y(c.stateNode.containerInfo),Xs(d,c),Ks(c),Oo=y;break;case 12:Xs(d,c),Ks(c);break;case 31:Xs(d,c),Ks(c),y&4&&(y=c.updateQueue,y!==null&&(c.updateQueue=null,dy(c,y)));break;case 13:Xs(d,c),Ks(c),c.child.flags&8192&&c.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(py=Ue()),y&4&&(y=c.updateQueue,y!==null&&(c.updateQueue=null,dy(c,y)));break;case 22:T=c.memoizedState!==null;var ne=g!==null&&g.memoizedState!==null,Ae=Tc,_e=mi;if(Tc=Ae||T,mi=_e||ne,Xs(d,c),mi=_e,Tc=Ae,Ks(c),y&8192)e:for(d=c.stateNode,d._visibility=T?d._visibility&-2:d._visibility|1,T&&(g===null||ne||Tc||mi||wd(c)),g=null,d=c;;){if(d.tag===5||d.tag===26){if(g===null){ne=g=d;try{if(k=ne.stateNode,T)B=k.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{K=ne.stateNode;var Be=ne.memoizedProps.style,Se=Be!=null&&Be.hasOwnProperty("display")?Be.display:null;K.style.display=Se==null||typeof Se=="boolean"?"":(""+Se).trim()}}catch(At){Yn(ne,ne.return,At)}}}else if(d.tag===6){if(g===null){ne=d;try{ne.stateNode.nodeValue=T?"":ne.memoizedProps}catch(At){Yn(ne,ne.return,At)}}}else if(d.tag===18){if(g===null){ne=d;try{var Ce=ne.stateNode;T?UD(Ce,!0):UD(ne.stateNode,!1)}catch(At){Yn(ne,ne.return,At)}}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===c)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break e;for(;d.sibling===null;){if(d.return===null||d.return===c)break e;g===d&&(g=null),d=d.return}g===d&&(g=null),d.sibling.return=d.return,d=d.sibling}y&4&&(y=c.updateQueue,y!==null&&(g=y.retryQueue,g!==null&&(y.retryQueue=null,dy(c,g))));break;case 19:Xs(d,c),Ks(c),y&4&&(y=c.updateQueue,y!==null&&(c.updateQueue=null,dy(c,y)));break;case 30:break;case 21:break;default:Xs(d,c),Ks(c)}}function Ks(c){var d=c.flags;if(d&2){try{for(var g,y=c.return;y!==null;){if(VM(y)){g=y;break}y=y.return}if(g==null)throw Error(r(160));switch(g.tag){case 27:var T=g.stateNode,k=ej(c);hy(c,k,T);break;case 5:var B=g.stateNode;g.flags&32&&(Rt(B,""),g.flags&=-33);var K=ej(c);hy(c,K,B);break;case 3:case 4:var ne=g.stateNode.containerInfo,Ae=ej(c);tj(c,Ae,ne);break;default:throw Error(r(161))}}catch(_e){Yn(c,c.return,_e)}c.flags&=-3}d&4096&&(c.flags&=-4097)}function nD(c){if(c.subtreeFlags&1024)for(c=c.child;c!==null;){var d=c;nD(d),d.tag===5&&d.flags&1024&&d.stateNode.reset(),c=c.sibling}}function Oc(c,d){if(d.subtreeFlags&8772)for(d=d.child;d!==null;)XM(c,d.alternate,d),d=d.sibling}function wd(c){for(c=c.child;c!==null;){var d=c;switch(d.tag){case 0:case 11:case 14:case 15:Nu(4,d,d.return),wd(d);break;case 1:xl(d,d.return);var g=d.stateNode;typeof g.componentWillUnmount=="function"&&UM(d,d.return,g),wd(d);break;case 27:U0(d.stateNode);case 26:case 5:xl(d,d.return),wd(d);break;case 22:d.memoizedState===null&&wd(d);break;case 30:wd(d);break;default:wd(d)}c=c.sibling}}function Ec(c,d,g){for(g=g&&(d.subtreeFlags&8772)!==0,d=d.child;d!==null;){var y=d.alternate,T=c,k=d,B=k.flags;switch(k.tag){case 0:case 11:case 15:Ec(T,k,g),P0(4,k);break;case 1:if(Ec(T,k,g),y=k,T=y.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(Ae){Yn(y,y.return,Ae)}if(y=k,T=y.updateQueue,T!==null){var K=y.stateNode;try{var ne=T.shared.hiddenCallbacks;if(ne!==null)for(T.shared.hiddenCallbacks=null,T=0;T<ne.length;T++)R4(ne[T],K)}catch(Ae){Yn(y,y.return,Ae)}}g&&B&64&&QM(k),I0(k,k.return);break;case 27:YM(k);case 26:case 5:Ec(T,k,g),g&&y===null&&B&4&&WM(k),I0(k,k.return);break;case 12:Ec(T,k,g);break;case 31:Ec(T,k,g),g&&B&4&&JM(T,k);break;case 13:Ec(T,k,g),g&&B&4&&eD(T,k);break;case 22:k.memoizedState===null&&Ec(T,k,g),I0(k,k.return);break;case 30:break;default:Ec(T,k,g)}d=d.sibling}}function rj(c,d){var g=null;c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),c=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(c=d.memoizedState.cachePool.pool),c!==g&&(c!=null&&c.refCount++,g!=null&&w0(g))}function ij(c,d){c=null,d.alternate!==null&&(c=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==c&&(d.refCount++,c!=null&&w0(c))}function Eo(c,d,g,y){if(d.subtreeFlags&10256)for(d=d.child;d!==null;)rD(c,d,g,y),d=d.sibling}function rD(c,d,g,y){var T=d.flags;switch(d.tag){case 0:case 11:case 15:Eo(c,d,g,y),T&2048&&P0(9,d);break;case 1:Eo(c,d,g,y);break;case 3:Eo(c,d,g,y),T&2048&&(c=null,d.alternate!==null&&(c=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==c&&(d.refCount++,c!=null&&w0(c)));break;case 12:if(T&2048){Eo(c,d,g,y),c=d.stateNode;try{var k=d.memoizedProps,B=k.id,K=k.onPostCommit;typeof K=="function"&&K(B,d.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(ne){Yn(d,d.return,ne)}}else Eo(c,d,g,y);break;case 31:Eo(c,d,g,y);break;case 13:Eo(c,d,g,y);break;case 23:break;case 22:k=d.stateNode,B=d.alternate,d.memoizedState!==null?k._visibility&2?Eo(c,d,g,y):B0(c,d):k._visibility&2?Eo(c,d,g,y):(k._visibility|=2,Zf(c,d,g,y,(d.subtreeFlags&10256)!==0||!1)),T&2048&&rj(B,d);break;case 24:Eo(c,d,g,y),T&2048&&ij(d.alternate,d);break;default:Eo(c,d,g,y)}}function Zf(c,d,g,y,T){for(T=T&&((d.subtreeFlags&10256)!==0||!1),d=d.child;d!==null;){var k=c,B=d,K=g,ne=y,Ae=B.flags;switch(B.tag){case 0:case 11:case 15:Zf(k,B,K,ne,T),P0(8,B);break;case 23:break;case 22:var _e=B.stateNode;B.memoizedState!==null?_e._visibility&2?Zf(k,B,K,ne,T):B0(k,B):(_e._visibility|=2,Zf(k,B,K,ne,T)),T&&Ae&2048&&rj(B.alternate,B);break;case 24:Zf(k,B,K,ne,T),T&&Ae&2048&&ij(B.alternate,B);break;default:Zf(k,B,K,ne,T)}d=d.sibling}}function B0(c,d){if(d.subtreeFlags&10256)for(d=d.child;d!==null;){var g=c,y=d,T=y.flags;switch(y.tag){case 22:B0(g,y),T&2048&&rj(y.alternate,y);break;case 24:B0(g,y),T&2048&&ij(y.alternate,y);break;default:B0(g,y)}d=d.sibling}}var L0=8192;function Jf(c,d,g){if(c.subtreeFlags&L0)for(c=c.child;c!==null;)iD(c,d,g),c=c.sibling}function iD(c,d,g){switch(c.tag){case 26:Jf(c,d,g),c.flags&L0&&c.memoizedState!==null&&YV(g,Oo,c.memoizedState,c.memoizedProps);break;case 5:Jf(c,d,g);break;case 3:case 4:var y=Oo;Oo=_y(c.stateNode.containerInfo),Jf(c,d,g),Oo=y;break;case 22:c.memoizedState===null&&(y=c.alternate,y!==null&&y.memoizedState!==null?(y=L0,L0=16777216,Jf(c,d,g),L0=y):Jf(c,d,g));break;default:Jf(c,d,g)}}function sD(c){var d=c.alternate;if(d!==null&&(c=d.child,c!==null)){d.child=null;do d=c.sibling,c.sibling=null,c=d;while(c!==null)}}function F0(c){var d=c.deletions;if((c.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var y=d[g];Pi=y,oD(y,c)}sD(c)}if(c.subtreeFlags&10256)for(c=c.child;c!==null;)aD(c),c=c.sibling}function aD(c){switch(c.tag){case 0:case 11:case 15:F0(c),c.flags&2048&&Nu(9,c,c.return);break;case 3:F0(c);break;case 12:F0(c);break;case 22:var d=c.stateNode;c.memoizedState!==null&&d._visibility&2&&(c.return===null||c.return.tag!==13)?(d._visibility&=-3,fy(c)):F0(c);break;default:F0(c)}}function fy(c){var d=c.deletions;if((c.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var y=d[g];Pi=y,oD(y,c)}sD(c)}for(c=c.child;c!==null;){switch(d=c,d.tag){case 0:case 11:case 15:Nu(8,d,d.return),fy(d);break;case 22:g=d.stateNode,g._visibility&2&&(g._visibility&=-3,fy(d));break;default:fy(d)}c=c.sibling}}function oD(c,d){for(;Pi!==null;){var g=Pi;switch(g.tag){case 0:case 11:case 15:Nu(8,g,d);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var y=g.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:w0(g.memoizedState.cache)}if(y=g.child,y!==null)y.return=g,Pi=y;else e:for(g=c;Pi!==null;){y=Pi;var T=y.sibling,k=y.return;if(KM(y),y===g){Pi=null;break e}if(T!==null){T.return=k,Pi=T;break e}Pi=k}}}var cV={getCacheForType:function(c){var d=Ji(di),g=d.data.get(c);return g===void 0&&(g=c(),d.data.set(c,g)),g},cacheSignal:function(){return Ji(di).controller.signal}},uV=typeof WeakMap=="function"?WeakMap:Map,Pn=0,sr=null,hn=null,mn=0,Vn=0,ya=null,Pu=!1,ep=!1,sj=!1,Mc=0,Vr=0,Iu=0,Sd=0,aj=0,xa=0,tp=0,H0=null,Zs=null,oj=!1,py=0,lD=0,my=1/0,gy=null,Bu=null,wi=0,Lu=null,np=null,Dc=0,lj=0,cj=null,cD=null,z0=0,uj=null;function Aa(){return(Pn&2)!==0&&mn!==0?mn&-mn:P.T!==null?gj():hs()}function uD(){if(xa===0)if((mn&536870912)===0||yn){var c=Ht;Ht<<=1,(Ht&3932160)===0&&(Ht=262144),xa=c}else xa=536870912;return c=va.current,c!==null&&(c.flags|=32),xa}function Js(c,d,g){(c===sr&&(Vn===2||Vn===9)||c.cancelPendingCommit!==null)&&(rp(c,0),Fu(c,mn,xa,!1)),an(c,g),((Pn&2)===0||c!==sr)&&(c===sr&&((Pn&2)===0&&(Sd|=g),Vr===4&&Fu(c,mn,xa,!1)),Al(c))}function hD(c,d,g){if((Pn&6)!==0)throw Error(r(327));var y=!g&&(d&127)===0&&(d&c.expiredLanes)===0||Te(c,d),T=y?fV(c,d):dj(c,d,!0),k=y;do{if(T===0){ep&&!y&&Fu(c,d,0,!1);break}else{if(g=c.current.alternate,k&&!hV(g)){T=dj(c,d,!1),k=!1;continue}if(T===2){if(k=d,c.errorRecoveryDisabledLanes&k)var B=0;else B=c.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){d=B;e:{var K=c;T=H0;var ne=K.current.memoizedState.isDehydrated;if(ne&&(rp(K,B).flags|=256),B=dj(K,B,!1),B!==2){if(sj&&!ne){K.errorRecoveryDisabledLanes|=k,Sd|=k,T=4;break e}k=Zs,Zs=T,k!==null&&(Zs===null?Zs=k:Zs.push.apply(Zs,k))}T=B}if(k=!1,T!==2)continue}}if(T===1){rp(c,0),Fu(c,d,0,!0);break}e:{switch(y=c,k=T,k){case 0:case 1:throw Error(r(345));case 4:if((d&4194048)!==d)break;case 6:Fu(y,d,xa,!Pu);break e;case 2:Zs=null;break;case 3:case 5:break;default:throw Error(r(329))}if((d&62914560)===d&&(T=py+300-Ue(),10<T)){if(Fu(y,d,xa,!Pu),se(y,0,!0)!==0)break e;Dc=d,y.timeoutHandle=qD(dD.bind(null,y,g,Zs,gy,oj,d,xa,Sd,tp,Pu,k,"Throttled",-0,0),T);break e}dD(y,g,Zs,gy,oj,d,xa,Sd,tp,Pu,k,null,-0,0)}}break}while(!0);Al(c)}function dD(c,d,g,y,T,k,B,K,ne,Ae,_e,Be,Se,Ce){if(c.timeoutHandle=-1,Be=d.subtreeFlags,Be&8192||(Be&16785408)===16785408){Be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ge},iD(d,k,Be);var At=(k&62914560)===k?py-Ue():(k&4194048)===k?lD-Ue():0;if(At=GV(Be,At),At!==null){Dc=k,c.cancelPendingCommit=At(xD.bind(null,c,d,k,g,y,T,B,K,ne,_e,Be,null,Se,Ce)),Fu(c,k,B,!Ae);return}}xD(c,d,k,g,y,T,B,K,ne)}function hV(c){for(var d=c;;){var g=d.tag;if((g===0||g===11||g===15)&&d.flags&16384&&(g=d.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var y=0;y<g.length;y++){var T=g[y],k=T.getSnapshot;T=T.value;try{if(!zt(k(),T))return!1}catch{return!1}}if(g=d.child,d.subtreeFlags&16384&&g!==null)g.return=d,d=g;else{if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Fu(c,d,g,y){d&=~aj,d&=~Sd,c.suspendedLanes|=d,c.pingedLanes&=~d,y&&(c.warmLanes|=d),y=c.expirationTimes;for(var T=d;0<T;){var k=31-Ut(T),B=1<<k;y[k]=-1,T&=~B}g!==0&&rt(c,g,d)}function vy(){return(Pn&6)===0?(q0(0),!1):!0}function hj(){if(hn!==null){if(Vn===0)var c=hn.return;else c=hn,Ac=pd=null,TS(c),Vf=null,j0=0,c=hn;for(;c!==null;)$M(c.alternate,c),c=c.return;hn=null}}function rp(c,d){var g=c.timeoutHandle;g!==-1&&(c.timeoutHandle=-1,MV(g)),g=c.cancelPendingCommit,g!==null&&(c.cancelPendingCommit=null,g()),Dc=0,hj(),sr=c,hn=g=yc(c.current,null),mn=d,Vn=0,ya=null,Pu=!1,ep=Te(c,d),sj=!1,tp=xa=aj=Sd=Iu=Vr=0,Zs=H0=null,oj=!1,(d&8)!==0&&(d|=d&32);var y=c.entangledLanes;if(y!==0)for(c=c.entanglements,y&=d;0<y;){var T=31-Ut(y),k=1<<T;d|=c[T],y&=~k}return Mc=d,Lb(),g}function fD(c,d){tn=null,P.H=D0,d===Wf||d===Wb?(d=O4(),Vn=3):d===mS?(d=O4(),Vn=4):Vn=d===$S?8:d!==null&&typeof d=="object"&&typeof d.then=="function"?6:1,ya=d,hn===null&&(Vr=1,ay(c,Va(d,c.current)))}function pD(){var c=va.current;return c===null?!0:(mn&4194048)===mn?Ka===null:(mn&62914560)===mn||(mn&536870912)!==0?c===Ka:!1}function mD(){var c=P.H;return P.H=D0,c===null?D0:c}function gD(){var c=P.A;return P.A=cV,c}function by(){Vr=4,Pu||(mn&4194048)!==mn&&va.current!==null||(ep=!0),(Iu&134217727)===0&&(Sd&134217727)===0||sr===null||Fu(sr,mn,xa,!1)}function dj(c,d,g){var y=Pn;Pn|=2;var T=mD(),k=gD();(sr!==c||mn!==d)&&(gy=null,rp(c,d)),d=!1;var B=Vr;e:do try{if(Vn!==0&&hn!==null){var K=hn,ne=ya;switch(Vn){case 8:hj(),B=6;break e;case 3:case 2:case 9:case 6:va.current===null&&(d=!0);var Ae=Vn;if(Vn=0,ya=null,ip(c,K,ne,Ae),g&&ep){B=0;break e}break;default:Ae=Vn,Vn=0,ya=null,ip(c,K,ne,Ae)}}dV(),B=Vr;break}catch(_e){fD(c,_e)}while(!0);return d&&c.shellSuspendCounter++,Ac=pd=null,Pn=y,P.H=T,P.A=k,hn===null&&(sr=null,mn=0,Lb()),B}function dV(){for(;hn!==null;)vD(hn)}function fV(c,d){var g=Pn;Pn|=2;var y=mD(),T=gD();sr!==c||mn!==d?(gy=null,my=Ue()+500,rp(c,d)):ep=Te(c,d);e:do try{if(Vn!==0&&hn!==null){d=hn;var k=ya;t:switch(Vn){case 1:Vn=0,ya=null,ip(c,d,k,1);break;case 2:case 9:if(T4(k)){Vn=0,ya=null,bD(d);break}d=function(){Vn!==2&&Vn!==9||sr!==c||(Vn=7),Al(c)},k.then(d,d);break e;case 3:Vn=7;break e;case 4:Vn=5;break e;case 7:T4(k)?(Vn=0,ya=null,bD(d)):(Vn=0,ya=null,ip(c,d,k,7));break;case 5:var B=null;switch(hn.tag){case 26:B=hn.memoizedState;case 5:case 27:var K=hn;if(B?r8(B):K.stateNode.complete){Vn=0,ya=null;var ne=K.sibling;if(ne!==null)hn=ne;else{var Ae=K.return;Ae!==null?(hn=Ae,yy(Ae)):hn=null}break t}}Vn=0,ya=null,ip(c,d,k,5);break;case 6:Vn=0,ya=null,ip(c,d,k,6);break;case 8:hj(),Vr=6;break e;default:throw Error(r(462))}}pV();break}catch(_e){fD(c,_e)}while(!0);return Ac=pd=null,P.H=y,P.A=T,Pn=g,hn!==null?0:(sr=null,mn=0,Lb(),Vr)}function pV(){for(;hn!==null&&!et();)vD(hn)}function vD(c){var d=zM(c.alternate,c,Mc);c.memoizedProps=c.pendingProps,d===null?yy(c):hn=d}function bD(c){var d=c,g=d.alternate;switch(d.tag){case 15:case 0:d=PM(g,d,d.pendingProps,d.type,void 0,mn);break;case 11:d=PM(g,d,d.pendingProps,d.type.render,d.ref,mn);break;case 5:TS(d);default:$M(g,d),d=hn=g4(d,Mc),d=zM(g,d,Mc)}c.memoizedProps=c.pendingProps,d===null?yy(c):hn=d}function ip(c,d,g,y){Ac=pd=null,TS(d),Vf=null,j0=0;var T=d.return;try{if(nV(c,T,d,g,mn)){Vr=1,ay(c,Va(g,c.current)),hn=null;return}}catch(k){if(T!==null)throw hn=T,k;Vr=1,ay(c,Va(g,c.current)),hn=null;return}d.flags&32768?(yn||y===1?c=!0:ep||(mn&536870912)!==0?c=!1:(Pu=c=!0,(y===2||y===9||y===3||y===6)&&(y=va.current,y!==null&&y.tag===13&&(y.flags|=16384))),yD(d,c)):yy(d)}function yy(c){var d=c;do{if((d.flags&32768)!==0){yD(d,Pu);return}c=d.return;var g=sV(d.alternate,d,Mc);if(g!==null){hn=g;return}if(d=d.sibling,d!==null){hn=d;return}hn=d=c}while(d!==null);Vr===0&&(Vr=5)}function yD(c,d){do{var g=aV(c.alternate,c);if(g!==null){g.flags&=32767,hn=g;return}if(g=c.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!d&&(c=c.sibling,c!==null)){hn=c;return}hn=c=g}while(c!==null);Vr=6,hn=null}function xD(c,d,g,y,T,k,B,K,ne){c.cancelPendingCommit=null;do xy();while(wi!==0);if((Pn&6)!==0)throw Error(r(327));if(d!==null){if(d===c.current)throw Error(r(177));if(k=d.lanes|d.childLanes,k|=eS,nt(c,g,k,B,K,ne),c===sr&&(hn=sr=null,mn=0),np=d,Lu=c,Dc=g,lj=k,cj=T,cD=y,(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?(c.callbackNode=null,c.callbackPriority=0,bV(dt,function(){return CD(),null})):(c.callbackNode=null,c.callbackPriority=0),y=(d.flags&13878)!==0,(d.subtreeFlags&13878)!==0||y){y=P.T,P.T=null,T=F.p,F.p=2,B=Pn,Pn|=4;try{oV(c,d,g)}finally{Pn=B,F.p=T,P.T=y}}wi=1,AD(),wD(),SD()}}function AD(){if(wi===1){wi=0;var c=Lu,d=np,g=(d.flags&13878)!==0;if((d.subtreeFlags&13878)!==0||g){g=P.T,P.T=null;var y=F.p;F.p=2;var T=Pn;Pn|=4;try{tD(d,c);var k=jj,B=yr(c.containerInfo),K=k.focusedElem,ne=k.selectionRange;if(B!==K&&K&&K.ownerDocument&&er(K.ownerDocument.documentElement,K)){if(ne!==null&&Ur(K)){var Ae=ne.start,_e=ne.end;if(_e===void 0&&(_e=Ae),"selectionStart"in K)K.selectionStart=Ae,K.selectionEnd=Math.min(_e,K.value.length);else{var Be=K.ownerDocument||document,Se=Be&&Be.defaultView||window;if(Se.getSelection){var Ce=Se.getSelection(),At=K.textContent.length,It=Math.min(ne.start,At),rr=ne.end===void 0?It:Math.min(ne.end,At);!Ce.extend&&It>rr&&(B=rr,rr=It,It=B);var de=_t(K,It),ue=_t(K,rr);if(de&&ue&&(Ce.rangeCount!==1||Ce.anchorNode!==de.node||Ce.anchorOffset!==de.offset||Ce.focusNode!==ue.node||Ce.focusOffset!==ue.offset)){var xe=Be.createRange();xe.setStart(de.node,de.offset),Ce.removeAllRanges(),It>rr?(Ce.addRange(xe),Ce.extend(ue.node,ue.offset)):(xe.setEnd(ue.node,ue.offset),Ce.addRange(xe))}}}}for(Be=[],Ce=K;Ce=Ce.parentNode;)Ce.nodeType===1&&Be.push({element:Ce,left:Ce.scrollLeft,top:Ce.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<Be.length;K++){var Ie=Be[K];Ie.element.scrollLeft=Ie.left,Ie.element.scrollTop=Ie.top}}Dy=!!Sj,jj=Sj=null}finally{Pn=T,F.p=y,P.T=g}}c.current=d,wi=2}}function wD(){if(wi===2){wi=0;var c=Lu,d=np,g=(d.flags&8772)!==0;if((d.subtreeFlags&8772)!==0||g){g=P.T,P.T=null;var y=F.p;F.p=2;var T=Pn;Pn|=4;try{XM(c,d.alternate,d)}finally{Pn=T,F.p=y,P.T=g}}wi=3}}function SD(){if(wi===4||wi===3){wi=0,Je();var c=Lu,d=np,g=Dc,y=cD;(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?wi=5:(wi=0,np=Lu=null,jD(c,c.pendingLanes));var T=c.pendingLanes;if(T===0&&(Bu=null),Ai(g),d=d.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Pt,d,void 0,(d.current.flags&128)===128)}catch{}if(y!==null){d=P.T,T=F.p,F.p=2,P.T=null;try{for(var k=c.onRecoverableError,B=0;B<y.length;B++){var K=y[B];k(K.value,{componentStack:K.stack})}}finally{P.T=d,F.p=T}}(Dc&3)!==0&&xy(),Al(c),T=c.pendingLanes,(g&261930)!==0&&(T&42)!==0?c===uj?z0++:(z0=0,uj=c):z0=0,q0(0)}}function jD(c,d){(c.pooledCacheLanes&=d)===0&&(d=c.pooledCache,d!=null&&(c.pooledCache=null,w0(d)))}function xy(){return AD(),wD(),SD(),CD()}function CD(){if(wi!==5)return!1;var c=Lu,d=lj;lj=0;var g=Ai(Dc),y=P.T,T=F.p;try{F.p=32>g?32:g,P.T=null,g=cj,cj=null;var k=Lu,B=Dc;if(wi=0,np=Lu=null,Dc=0,(Pn&6)!==0)throw Error(r(331));var K=Pn;if(Pn|=4,aD(k.current),rD(k,k.current,B,g),Pn=K,q0(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Pt,k)}catch{}return!0}finally{F.p=T,P.T=y,jD(c,d)}}function _D(c,d,g){d=Va(g,d),d=qS(c.stateNode,d,2),c=Mu(c,d,2),c!==null&&(an(c,2),Al(c))}function Yn(c,d,g){if(c.tag===3)_D(c,c,g);else for(;d!==null;){if(d.tag===3){_D(d,c,g);break}else if(d.tag===1){var y=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Bu===null||!Bu.has(y))){c=Va(g,c),g=TM(2),y=Mu(d,g,2),y!==null&&(kM(g,y,d,c),an(y,2),Al(y));break}}d=d.return}}function fj(c,d,g){var y=c.pingCache;if(y===null){y=c.pingCache=new uV;var T=new Set;y.set(d,T)}else T=y.get(d),T===void 0&&(T=new Set,y.set(d,T));T.has(g)||(sj=!0,T.add(g),c=mV.bind(null,c,d,g),d.then(c,c))}function mV(c,d,g){var y=c.pingCache;y!==null&&y.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,sr===c&&(mn&g)===g&&(Vr===4||Vr===3&&(mn&62914560)===mn&&300>Ue()-py?(Pn&2)===0&&rp(c,0):aj|=g,tp===mn&&(tp=0)),Al(c)}function TD(c,d){d===0&&(d=Dt()),c=hd(c,d),c!==null&&(an(c,d),Al(c))}function gV(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),TD(c,g)}function vV(c,d){var g=0;switch(c.tag){case 31:case 13:var y=c.stateNode,T=c.memoizedState;T!==null&&(g=T.retryLane);break;case 19:y=c.stateNode;break;case 22:y=c.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(d),TD(c,g)}function bV(c,d){return Ve(c,d)}var Ay=null,sp=null,pj=!1,wy=!1,mj=!1,Hu=0;function Al(c){c!==sp&&c.next===null&&(sp===null?Ay=sp=c:sp=sp.next=c),wy=!0,pj||(pj=!0,xV())}function q0(c,d){if(!mj&&wy){mj=!0;do for(var g=!1,y=Ay;y!==null;){if(c!==0){var T=y.pendingLanes;if(T===0)var k=0;else{var B=y.suspendedLanes,K=y.pingedLanes;k=(1<<31-Ut(42|c)+1)-1,k&=T&~(B&~K),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(g=!0,MD(y,k))}else k=mn,k=se(y,y===sr?k:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(k&3)===0||Te(y,k)||(g=!0,MD(y,k));y=y.next}while(g);mj=!1}}function yV(){kD()}function kD(){wy=pj=!1;var c=0;Hu!==0&&EV()&&(c=Hu);for(var d=Ue(),g=null,y=Ay;y!==null;){var T=y.next,k=OD(y,d);k===0?(y.next=null,g===null?Ay=T:g.next=T,T===null&&(sp=g)):(g=y,(c!==0||(k&3)!==0)&&(wy=!0)),y=T}wi!==0&&wi!==5||q0(c),Hu!==0&&(Hu=0)}function OD(c,d){for(var g=c.suspendedLanes,y=c.pingedLanes,T=c.expirationTimes,k=c.pendingLanes&-62914561;0<k;){var B=31-Ut(k),K=1<<B,ne=T[B];ne===-1?((K&g)===0||(K&y)!==0)&&(T[B]=tt(K,d)):ne<=d&&(c.expiredLanes|=K),k&=~K}if(d=sr,g=mn,g=se(c,c===d?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),y=c.callbackNode,g===0||c===d&&(Vn===2||Vn===9)||c.cancelPendingCommit!==null)return y!==null&&y!==null&&qt(y),c.callbackNode=null,c.callbackPriority=0;if((g&3)===0||Te(c,g)){if(d=g&-g,d===c.callbackPriority)return d;switch(y!==null&&qt(y),Ai(g)){case 2:case 8:g=he;break;case 32:g=dt;break;case 268435456:g=Kt;break;default:g=dt}return y=ED.bind(null,c),g=Ve(g,y),c.callbackPriority=d,c.callbackNode=g,d}return y!==null&&y!==null&&qt(y),c.callbackPriority=2,c.callbackNode=null,2}function ED(c,d){if(wi!==0&&wi!==5)return c.callbackNode=null,c.callbackPriority=0,null;var g=c.callbackNode;if(xy()&&c.callbackNode!==g)return null;var y=mn;return y=se(c,c===sr?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),y===0?null:(hD(c,y,d),OD(c,Ue()),c.callbackNode!=null&&c.callbackNode===g?ED.bind(null,c):null)}function MD(c,d){if(xy())return null;hD(c,d,!0)}function xV(){DV(function(){(Pn&6)!==0?Ve(st,yV):kD()})}function gj(){if(Hu===0){var c=Qf;c===0&&(c=qn,qn<<=1,(qn&261888)===0&&(qn=256)),Hu=c}return Hu}function DD(c){return c==null||typeof c=="symbol"||typeof c=="boolean"?null:typeof c=="function"?c:$a(""+c)}function RD(c,d){var g=d.ownerDocument.createElement("input");return g.name=d.name,g.value=d.value,c.id&&g.setAttribute("form",c.id),d.parentNode.insertBefore(g,d),c=new FormData(c),g.parentNode.removeChild(g),c}function AV(c,d,g,y,T){if(d==="submit"&&g&&g.stateNode===T){var k=DD((T[Mi]||null).action),B=y.submitter;B&&(d=(d=B[Mi]||null)?DD(d.formAction):B.getAttribute("formAction"),d!==null&&(k=d,B=null));var K=new Fr("action","action",null,y,T);c.push({event:K,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Hu!==0){var ne=B?RD(T,B):new FormData(T);IS(g,{pending:!0,data:ne,method:T.method,action:k},null,ne)}}else typeof k=="function"&&(K.preventDefault(),ne=B?RD(T,B):new FormData(T),IS(g,{pending:!0,data:ne,method:T.method,action:k},k,ne))},currentTarget:T}]})}}for(var vj=0;vj<J2.length;vj++){var bj=J2[vj],wV=bj.toLowerCase(),SV=bj[0].toUpperCase()+bj.slice(1);ko(wV,"on"+SV)}ko(Ni,"onAnimationEnd"),ko(xs,"onAnimationIteration"),ko(vl,"onAnimationStart"),ko("dblclick","onDoubleClick"),ko("focusin","onFocus"),ko("focusout","onBlur"),ko(Ki,"onTransitionRun"),ko(Ib,"onTransitionStart"),ko(zW,"onTransitionCancel"),ko(f4,"onTransitionEnd"),Qe("onMouseEnter",["mouseout","mouseover"]),Qe("onMouseLeave",["mouseout","mouseover"]),Qe("onPointerEnter",["pointerout","pointerover"]),Qe("onPointerLeave",["pointerout","pointerover"]),fs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fs("onBeforeInput",["compositionend","keypress","textInput","paste"]),fs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $0="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(" "),jV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($0));function ND(c,d){d=(d&4)!==0;for(var g=0;g<c.length;g++){var y=c[g],T=y.event;y=y.listeners;e:{var k=void 0;if(d)for(var B=y.length-1;0<=B;B--){var K=y[B],ne=K.instance,Ae=K.currentTarget;if(K=K.listener,ne!==k&&T.isPropagationStopped())break e;k=K,T.currentTarget=Ae;try{k(T)}catch(_e){Bb(_e)}T.currentTarget=null,k=ne}else for(B=0;B<y.length;B++){if(K=y[B],ne=K.instance,Ae=K.currentTarget,K=K.listener,ne!==k&&T.isPropagationStopped())break e;k=K,T.currentTarget=Ae;try{k(T)}catch(_e){Bb(_e)}T.currentTarget=null,k=ne}}}}function dn(c,d){var g=d[rd];g===void 0&&(g=d[rd]=new Set);var y=c+"__bubble";g.has(y)||(PD(d,c,2,!1),g.add(y))}function yj(c,d,g){var y=0;d&&(y|=4),PD(g,c,y,d)}var Sy="_reactListening"+Math.random().toString(36).slice(2);function xj(c){if(!c[Sy]){c[Sy]=!0,fu.forEach(function(g){g!=="selectionchange"&&(jV.has(g)||yj(g,!1,c),yj(g,!0,c))});var d=c.nodeType===9?c:c.ownerDocument;d===null||d[Sy]||(d[Sy]=!0,yj("selectionchange",!1,d))}}function PD(c,d,g,y){switch(u8(d)){case 2:var T=ZV;break;case 8:T=JV;break;default:T=Pj}g=T.bind(null,d,g,c),T=void 0,!If||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(T=!0),y?T!==void 0?c.addEventListener(d,g,{capture:!0,passive:T}):c.addEventListener(d,g,!0):T!==void 0?c.addEventListener(d,g,{passive:T}):c.addEventListener(d,g,!1)}function Aj(c,d,g,y,T){var k=y;if((d&1)===0&&(d&2)===0&&y!==null)e:for(;;){if(y===null)return;var B=y.tag;if(B===3||B===4){var K=y.stateNode.containerInfo;if(K===T)break;if(B===4)for(B=y.return;B!==null;){var ne=B.tag;if((ne===3||ne===4)&&B.stateNode.containerInfo===T)return;B=B.return}for(;K!==null;){if(B=An(K),B===null)return;if(ne=B.tag,ne===5||ne===6||ne===26||ne===27){y=k=B;continue e}K=K.parentNode}}y=y.return}bu(function(){var Ae=k,_e=Bt(g),Be=[];e:{var Se=p4.get(c);if(Se!==void 0){var Ce=Fr,At=c;switch(c){case"keypress":if(Bn(g)===0)break e;case"keydown":case"keyup":Ce=K2;break;case"focusin":At="focus",Ce=ma;break;case"focusout":At="blur",Ce=ma;break;case"beforeblur":case"afterblur":Ce=ma;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ce=Cb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=Y2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=Ob;break;case Ni:case xs:case vl:Ce=pc;break;case f4:Ce=m0;break;case"scroll":case"scrollend":Ce=xu;break;case"wheel":Ce=Eb;break;case"copy":case"cut":case"paste":Ce=X2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=To;break;case"toggle":case"beforetoggle":Ce=Db}var It=(d&4)!==0,rr=!It&&(c==="scroll"||c==="scrollend"),de=It?Se!==null?Se+"Capture":null:Se;It=[];for(var ue=Ae,xe;ue!==null;){var Ie=ue;if(xe=Ie.stateNode,Ie=Ie.tag,Ie!==5&&Ie!==26&&Ie!==27||xe===null||de===null||(Ie=Qa(ue,de),Ie!=null&&It.push(Q0(ue,Ie,xe))),rr)break;ue=ue.return}0<It.length&&(Se=new Ce(Se,At,null,g,_e),Be.push({event:Se,listeners:It}))}}if((d&7)===0){e:{if(Se=c==="mouseover"||c==="pointerover",Ce=c==="mouseout"||c==="pointerout",Se&&g!==wt&&(At=g.relatedTarget||g.fromElement)&&(An(At)||At[ds]))break e;if((Ce||Se)&&(Se=_e.window===_e?_e:(Se=_e.ownerDocument)?Se.defaultView||Se.parentWindow:window,Ce?(At=g.relatedTarget||g.toElement,Ce=Ae,At=At?An(At):null,At!==null&&(rr=s(At),It=At.tag,At!==rr||It!==5&&It!==27&&It!==6)&&(At=null)):(Ce=null,At=Ae),Ce!==At)){if(It=Cb,Ie="onMouseLeave",de="onMouseEnter",ue="mouse",(c==="pointerout"||c==="pointerover")&&(It=To,Ie="onPointerLeave",de="onPointerEnter",ue="pointer"),rr=Ce==null?Se:ci(Ce),xe=At==null?Se:ci(At),Se=new It(Ie,ue+"leave",Ce,g,_e),Se.target=rr,Se.relatedTarget=xe,Ie=null,An(_e)===Ae&&(It=new It(de,ue+"enter",At,g,_e),It.target=xe,It.relatedTarget=rr,Ie=It),rr=Ie,Ce&&At)t:{for(It=CV,de=Ce,ue=At,xe=0,Ie=de;Ie;Ie=It(Ie))xe++;Ie=0;for(var Ot=ue;Ot;Ot=It(Ot))Ie++;for(;0<xe-Ie;)de=It(de),xe--;for(;0<Ie-xe;)ue=It(ue),Ie--;for(;xe--;){if(de===ue||ue!==null&&de===ue.alternate){It=de;break t}de=It(de),ue=It(ue)}It=null}else It=null;Ce!==null&&ID(Be,Se,Ce,It,!1),At!==null&&rr!==null&&ID(Be,rr,At,It,!0)}}e:{if(Se=Ae?ci(Ae):window,Ce=Se.nodeName&&Se.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&Se.type==="file")var Tn=J;else if(ju(Se))if(ee)Tn=Ft;else{Tn=ft;var jt=ct}else Ce=Se.nodeName,!Ce||Ce.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?Ae&&fl(Ae.elementType)&&(Tn=J):Tn=bt;if(Tn&&(Tn=Tn(c,Ae))){Pb(Be,Tn,g,_e);break e}jt&&jt(c,Se,Ae),c==="focusout"&&Ae&&Se.type==="number"&&Ae.memoizedProps.value!=null&&hc(Se,"number",Se.value)}switch(jt=Ae?ci(Ae):window,c){case"focusin":(ju(jt)||jt.contentEditable==="true")&&(Wn=jt,Xi=Ae,ri=null);break;case"focusout":ri=Xi=Wn=null;break;case"mousedown":bs=!0;break;case"contextmenu":case"mouseup":case"dragend":bs=!1,Vs(Be,g,_e);break;case"selectionchange":if(Ln)break;case"keydown":case"keyup":Vs(Be,g,_e)}var nn;if(Bf)e:{switch(c){case"compositionstart":var gn="onCompositionStart";break e;case"compositionend":gn="onCompositionEnd";break e;case"compositionupdate":gn="onCompositionUpdate";break e}gn=void 0}else vc?cd(c,g)&&(gn="onCompositionEnd"):c==="keydown"&&g.keyCode===229&&(gn="onCompositionStart");gn&&(v0&&g.locale!=="ko"&&(vc||gn!=="onCompositionStart"?gn==="onCompositionEnd"&&vc&&(nn=u0()):(Ms=_e,ml="value"in Ms?Ms.value:Ms.textContent,vc=!0)),jt=jy(Ae,gn),0<jt.length&&(gn=new _b(gn,c,null,g,_e),Be.push({event:gn,listeners:jt}),nn?gn.data=nn:(nn=ni(g),nn!==null&&(gn.data=nn)))),(nn=Z2?Qr(c,g):Nb(c,g))&&(gn=jy(Ae,"onBeforeInput"),0<gn.length&&(jt=new _b("onBeforeInput","beforeinput",null,g,_e),Be.push({event:jt,listeners:gn}),jt.data=nn)),AV(Be,c,Ae,g,_e)}ND(Be,d)})}function Q0(c,d,g){return{instance:c,listener:d,currentTarget:g}}function jy(c,d){for(var g=d+"Capture",y=[];c!==null;){var T=c,k=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||k===null||(T=Qa(c,g),T!=null&&y.unshift(Q0(c,T,k)),T=Qa(c,d),T!=null&&y.push(Q0(c,T,k))),c.tag===3)return y;c=c.return}return[]}function CV(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5&&c.tag!==27);return c||null}function ID(c,d,g,y,T){for(var k=d._reactName,B=[];g!==null&&g!==y;){var K=g,ne=K.alternate,Ae=K.stateNode;if(K=K.tag,ne!==null&&ne===y)break;K!==5&&K!==26&&K!==27||Ae===null||(ne=Ae,T?(Ae=Qa(g,k),Ae!=null&&B.unshift(Q0(g,Ae,ne))):T||(Ae=Qa(g,k),Ae!=null&&B.push(Q0(g,Ae,ne)))),g=g.return}B.length!==0&&c.push({event:d,listeners:B})}var _V=/\r\n?/g,TV=/\u0000|\uFFFD/g;function BD(c){return(typeof c=="string"?c:""+c).replace(_V,`
`).replace(TV,"")}function LD(c,d){return d=BD(d),BD(c)===d}function nr(c,d,g,y,T,k){switch(g){case"children":typeof y=="string"?d==="body"||d==="textarea"&&y===""||Rt(c,y):(typeof y=="number"||typeof y=="bigint")&&d!=="body"&&Rt(c,""+y);break;case"className":Yi(c,"class",y);break;case"tabIndex":Yi(c,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Yi(c,g,y);break;case"style":Rn(c,y,k);break;case"data":if(d!=="object"){Yi(c,"data",y);break}case"src":case"href":if(y===""&&(d!=="a"||g!=="href")){c.removeAttribute(g);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){c.removeAttribute(g);break}y=$a(""+y),c.setAttribute(g,y);break;case"action":case"formAction":if(typeof y=="function"){c.setAttribute(g,"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 k=="function"&&(g==="formAction"?(d!=="input"&&nr(c,d,"name",T.name,T,null),nr(c,d,"formEncType",T.formEncType,T,null),nr(c,d,"formMethod",T.formMethod,T,null),nr(c,d,"formTarget",T.formTarget,T,null)):(nr(c,d,"encType",T.encType,T,null),nr(c,d,"method",T.method,T,null),nr(c,d,"target",T.target,T,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){c.removeAttribute(g);break}y=$a(""+y),c.setAttribute(g,y);break;case"onClick":y!=null&&(c.onclick=Ge);break;case"onScroll":y!=null&&dn("scroll",c);break;case"onScrollEnd":y!=null&&dn("scrollend",c);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(g=y.__html,g!=null){if(T.children!=null)throw Error(r(60));c.innerHTML=g}}break;case"multiple":c.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":c.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){c.removeAttribute("xlink:href");break}g=$a(""+y),c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",g);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?c.setAttribute(g,""+y):c.removeAttribute(g);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":y&&typeof y!="function"&&typeof y!="symbol"?c.setAttribute(g,""):c.removeAttribute(g);break;case"capture":case"download":y===!0?c.setAttribute(g,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?c.setAttribute(g,y):c.removeAttribute(g);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?c.setAttribute(g,y):c.removeAttribute(g);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?c.removeAttribute(g):c.setAttribute(g,y);break;case"popover":dn("beforetoggle",c),dn("toggle",c),ui(c,"popover",y);break;case"xlinkActuate":$n(c,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":$n(c,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":$n(c,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":$n(c,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":$n(c,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":$n(c,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":$n(c,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":$n(c,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":$n(c,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":ui(c,"is",y);break;case"innerText":case"textContent":break;default:(!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(g=ms.get(g)||g,ui(c,g,y))}}function wj(c,d,g,y,T,k){switch(g){case"style":Rn(c,y,k);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(g=y.__html,g!=null){if(T.children!=null)throw Error(r(60));c.innerHTML=g}}break;case"children":typeof y=="string"?Rt(c,y):(typeof y=="number"||typeof y=="bigint")&&Rt(c,""+y);break;case"onScroll":y!=null&&dn("scroll",c);break;case"onScrollEnd":y!=null&&dn("scrollend",c);break;case"onClick":y!=null&&(c.onclick=Ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qa.hasOwnProperty(g))e:{if(g[0]==="o"&&g[1]==="n"&&(T=g.endsWith("Capture"),d=g.slice(2,T?g.length-7:void 0),k=c[Mi]||null,k=k!=null?k[g]:null,typeof k=="function"&&c.removeEventListener(d,k,T),typeof y=="function")){typeof k!="function"&&k!==null&&(g in c?c[g]=null:c.hasAttribute(g)&&c.removeAttribute(g)),c.addEventListener(d,y,T);break e}g in c?c[g]=y:y===!0?c.setAttribute(g,""):ui(c,g,y)}}}function ts(c,d,g){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dn("error",c),dn("load",c);var y=!1,T=!1,k;for(k in g)if(g.hasOwnProperty(k)){var B=g[k];if(B!=null)switch(k){case"src":y=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:nr(c,d,k,B,g,null)}}T&&nr(c,d,"srcSet",g.srcSet,g,null),y&&nr(c,d,"src",g.src,g,null);return;case"input":dn("invalid",c);var K=k=B=T=null,ne=null,Ae=null;for(y in g)if(g.hasOwnProperty(y)){var _e=g[y];if(_e!=null)switch(y){case"name":T=_e;break;case"type":B=_e;break;case"checked":ne=_e;break;case"defaultChecked":Ae=_e;break;case"value":k=_e;break;case"defaultValue":K=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(r(137,d));break;default:nr(c,d,y,_e,g,null)}}uc(c,k,K,ne,Ae,B,T,!1);return;case"select":dn("invalid",c),y=B=k=null;for(T in g)if(g.hasOwnProperty(T)&&(K=g[T],K!=null))switch(T){case"value":k=K;break;case"defaultValue":B=K;break;case"multiple":y=K;default:nr(c,d,T,K,g,null)}d=k,g=B,c.multiple=!!y,d!=null?ti(c,!!y,d,!1):g!=null&&ti(c,!!y,g,!0);return;case"textarea":dn("invalid",c),k=T=y=null;for(B in g)if(g.hasOwnProperty(B)&&(K=g[B],K!=null))switch(B){case"value":y=K;break;case"defaultValue":T=K;break;case"children":k=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(91));break;default:nr(c,d,B,K,g,null)}Co(c,y,T,k);return;case"option":for(ne in g)if(g.hasOwnProperty(ne)&&(y=g[ne],y!=null))switch(ne){case"selected":c.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:nr(c,d,ne,y,g,null)}return;case"dialog":dn("beforetoggle",c),dn("toggle",c),dn("cancel",c),dn("close",c);break;case"iframe":case"object":dn("load",c);break;case"video":case"audio":for(y=0;y<$0.length;y++)dn($0[y],c);break;case"image":dn("error",c),dn("load",c);break;case"details":dn("toggle",c);break;case"embed":case"source":case"link":dn("error",c),dn("load",c);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ae in g)if(g.hasOwnProperty(Ae)&&(y=g[Ae],y!=null))switch(Ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:nr(c,d,Ae,y,g,null)}return;default:if(fl(d)){for(_e in g)g.hasOwnProperty(_e)&&(y=g[_e],y!==void 0&&wj(c,d,_e,y,g,void 0));return}}for(K in g)g.hasOwnProperty(K)&&(y=g[K],y!=null&&nr(c,d,K,y,g,null))}function kV(c,d,g,y){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,k=null,B=null,K=null,ne=null,Ae=null,_e=null;for(Ce in g){var Be=g[Ce];if(g.hasOwnProperty(Ce)&&Be!=null)switch(Ce){case"checked":break;case"value":break;case"defaultValue":ne=Be;default:y.hasOwnProperty(Ce)||nr(c,d,Ce,null,y,Be)}}for(var Se in y){var Ce=y[Se];if(Be=g[Se],y.hasOwnProperty(Se)&&(Ce!=null||Be!=null))switch(Se){case"type":k=Ce;break;case"name":T=Ce;break;case"checked":Ae=Ce;break;case"defaultChecked":_e=Ce;break;case"value":B=Ce;break;case"defaultValue":K=Ce;break;case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(r(137,d));break;default:Ce!==Be&&nr(c,d,Se,Ce,y,Be)}}gu(c,B,K,ne,Ae,_e,k,T);return;case"select":Ce=B=K=Se=null;for(k in g)if(ne=g[k],g.hasOwnProperty(k)&&ne!=null)switch(k){case"value":break;case"multiple":Ce=ne;default:y.hasOwnProperty(k)||nr(c,d,k,null,y,ne)}for(T in y)if(k=y[T],ne=g[T],y.hasOwnProperty(T)&&(k!=null||ne!=null))switch(T){case"value":Se=k;break;case"defaultValue":K=k;break;case"multiple":B=k;default:k!==ne&&nr(c,d,T,k,y,ne)}d=K,g=B,y=Ce,Se!=null?ti(c,!!g,Se,!1):!!y!=!!g&&(d!=null?ti(c,!!g,d,!0):ti(c,!!g,g?[]:"",!1));return;case"textarea":Ce=Se=null;for(K in g)if(T=g[K],g.hasOwnProperty(K)&&T!=null&&!y.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:nr(c,d,K,null,y,T)}for(B in y)if(T=y[B],k=g[B],y.hasOwnProperty(B)&&(T!=null||k!=null))switch(B){case"value":Se=T;break;case"defaultValue":Ce=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:T!==k&&nr(c,d,B,T,y,k)}dc(c,Se,Ce);return;case"option":for(var At in g)if(Se=g[At],g.hasOwnProperty(At)&&Se!=null&&!y.hasOwnProperty(At))switch(At){case"selected":c.selected=!1;break;default:nr(c,d,At,null,y,Se)}for(ne in y)if(Se=y[ne],Ce=g[ne],y.hasOwnProperty(ne)&&Se!==Ce&&(Se!=null||Ce!=null))switch(ne){case"selected":c.selected=Se&&typeof Se!="function"&&typeof Se!="symbol";break;default:nr(c,d,ne,Se,y,Ce)}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 It in g)Se=g[It],g.hasOwnProperty(It)&&Se!=null&&!y.hasOwnProperty(It)&&nr(c,d,It,null,y,Se);for(Ae in y)if(Se=y[Ae],Ce=g[Ae],y.hasOwnProperty(Ae)&&Se!==Ce&&(Se!=null||Ce!=null))switch(Ae){case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(r(137,d));break;default:nr(c,d,Ae,Se,y,Ce)}return;default:if(fl(d)){for(var rr in g)Se=g[rr],g.hasOwnProperty(rr)&&Se!==void 0&&!y.hasOwnProperty(rr)&&wj(c,d,rr,void 0,y,Se);for(_e in y)Se=y[_e],Ce=g[_e],!y.hasOwnProperty(_e)||Se===Ce||Se===void 0&&Ce===void 0||wj(c,d,_e,Se,y,Ce);return}}for(var de in g)Se=g[de],g.hasOwnProperty(de)&&Se!=null&&!y.hasOwnProperty(de)&&nr(c,d,de,null,y,Se);for(Be in y)Se=y[Be],Ce=g[Be],!y.hasOwnProperty(Be)||Se===Ce||Se==null&&Ce==null||nr(c,d,Be,Se,y,Ce)}function FD(c){switch(c){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OV(){if(typeof performance.getEntriesByType=="function"){for(var c=0,d=0,g=performance.getEntriesByType("resource"),y=0;y<g.length;y++){var T=g[y],k=T.transferSize,B=T.initiatorType,K=T.duration;if(k&&K&&FD(B)){for(B=0,K=T.responseEnd,y+=1;y<g.length;y++){var ne=g[y],Ae=ne.startTime;if(Ae>K)break;var _e=ne.transferSize,Be=ne.initiatorType;_e&&FD(Be)&&(ne=ne.responseEnd,B+=_e*(ne<K?1:(K-Ae)/(ne-Ae)))}if(--y,d+=8*(k+B)/(T.duration/1e3),c++,10<c)break}}if(0<c)return d/c/1e6}return navigator.connection&&(c=navigator.connection.downlink,typeof c=="number")?c:5}var Sj=null,jj=null;function Cy(c){return c.nodeType===9?c:c.ownerDocument}function HD(c){switch(c){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zD(c,d){if(c===0)switch(d){case"svg":return 1;case"math":return 2;default:return 0}return c===1&&d==="foreignObject"?0:c}function Cj(c,d){return c==="textarea"||c==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.children=="bigint"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var _j=null;function EV(){var c=window.event;return c&&c.type==="popstate"?c===_j?!1:(_j=c,!0):(_j=null,!1)}var qD=typeof setTimeout=="function"?setTimeout:void 0,MV=typeof clearTimeout=="function"?clearTimeout:void 0,$D=typeof Promise=="function"?Promise:void 0,DV=typeof queueMicrotask=="function"?queueMicrotask:typeof $D<"u"?function(c){return $D.resolve(null).then(c).catch(RV)}:qD;function RV(c){setTimeout(function(){throw c})}function zu(c){return c==="head"}function QD(c,d){var g=d,y=0;do{var T=g.nextSibling;if(c.removeChild(g),T&&T.nodeType===8)if(g=T.data,g==="/$"||g==="/&"){if(y===0){c.removeChild(T),cp(d);return}y--}else if(g==="$"||g==="$?"||g==="$~"||g==="$!"||g==="&")y++;else if(g==="html")U0(c.ownerDocument.documentElement);else if(g==="head"){g=c.ownerDocument.head,U0(g);for(var k=g.firstChild;k;){var B=k.nextSibling,K=k.nodeName;k[vr]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&k.rel.toLowerCase()==="stylesheet"||g.removeChild(k),k=B}}else g==="body"&&U0(c.ownerDocument.body);g=T}while(g);cp(d)}function UD(c,d){var g=c;c=0;do{var y=g.nextSibling;if(g.nodeType===1?d?(g._stashedDisplay=g.style.display,g.style.display="none"):(g.style.display=g._stashedDisplay||"",g.getAttribute("style")===""&&g.removeAttribute("style")):g.nodeType===3&&(d?(g._stashedText=g.nodeValue,g.nodeValue=""):g.nodeValue=g._stashedText||""),y&&y.nodeType===8)if(g=y.data,g==="/$"){if(c===0)break;c--}else g!=="$"&&g!=="$?"&&g!=="$~"&&g!=="$!"||c++;g=y}while(g)}function Tj(c){var d=c.firstChild;for(d&&d.nodeType===10&&(d=d.nextSibling);d;){var g=d;switch(d=d.nextSibling,g.nodeName){case"HTML":case"HEAD":case"BODY":Tj(g),Or(g);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(g.rel.toLowerCase()==="stylesheet")continue}c.removeChild(g)}}function NV(c,d,g,y){for(;c.nodeType===1;){var T=g;if(c.nodeName.toLowerCase()!==d.toLowerCase()){if(!y&&(c.nodeName!=="INPUT"||c.type!=="hidden"))break}else if(y){if(!c[vr])switch(d){case"meta":if(!c.hasAttribute("itemprop"))break;return c;case"link":if(k=c.getAttribute("rel"),k==="stylesheet"&&c.hasAttribute("data-precedence"))break;if(k!==T.rel||c.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||c.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||c.getAttribute("title")!==(T.title==null?null:T.title))break;return c;case"style":if(c.hasAttribute("data-precedence"))break;return c;case"script":if(k=c.getAttribute("src"),(k!==(T.src==null?null:T.src)||c.getAttribute("type")!==(T.type==null?null:T.type)||c.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&k&&c.hasAttribute("async")&&!c.hasAttribute("itemprop"))break;return c;default:return c}}else if(d==="input"&&c.type==="hidden"){var k=T.name==null?null:""+T.name;if(T.type==="hidden"&&c.getAttribute("name")===k)return c}else return c;if(c=Za(c.nextSibling),c===null)break}return null}function PV(c,d,g){if(d==="")return null;for(;c.nodeType!==3;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!g||(c=Za(c.nextSibling),c===null))return null;return c}function WD(c,d){for(;c.nodeType!==8;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!d||(c=Za(c.nextSibling),c===null))return null;return c}function kj(c){return c.data==="$?"||c.data==="$~"}function Oj(c){return c.data==="$!"||c.data==="$?"&&c.ownerDocument.readyState!=="loading"}function IV(c,d){var g=c.ownerDocument;if(c.data==="$~")c._reactRetry=d;else if(c.data!=="$?"||g.readyState!=="loading")d();else{var y=function(){d(),g.removeEventListener("DOMContentLoaded",y)};g.addEventListener("DOMContentLoaded",y),c._reactRetry=y}}function Za(c){for(;c!=null;c=c.nextSibling){var d=c.nodeType;if(d===1||d===3)break;if(d===8){if(d=c.data,d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"||d==="F!"||d==="F")break;if(d==="/$"||d==="/&")return null}}return c}var Ej=null;function VD(c){c=c.nextSibling;for(var d=0;c;){if(c.nodeType===8){var g=c.data;if(g==="/$"||g==="/&"){if(d===0)return Za(c.nextSibling);d--}else g!=="$"&&g!=="$!"&&g!=="$?"&&g!=="$~"&&g!=="&"||d++}c=c.nextSibling}return null}function YD(c){c=c.previousSibling;for(var d=0;c;){if(c.nodeType===8){var g=c.data;if(g==="$"||g==="$!"||g==="$?"||g==="$~"||g==="&"){if(d===0)return c;d--}else g!=="/$"&&g!=="/&"||d++}c=c.previousSibling}return null}function GD(c,d,g){switch(d=Cy(g),c){case"html":if(c=d.documentElement,!c)throw Error(r(452));return c;case"head":if(c=d.head,!c)throw Error(r(453));return c;case"body":if(c=d.body,!c)throw Error(r(454));return c;default:throw Error(r(451))}}function U0(c){for(var d=c.attributes;d.length;)c.removeAttributeNode(d[0]);Or(c)}var Ja=new Map,XD=new Set;function _y(c){return typeof c.getRootNode=="function"?c.getRootNode():c.nodeType===9?c:c.ownerDocument}var Rc=F.d;F.d={f:BV,r:LV,D:FV,C:HV,L:zV,m:qV,X:QV,S:$V,M:UV};function BV(){var c=Rc.f(),d=vy();return c||d}function LV(c){var d=Qs(c);d!==null&&d.tag===5&&d.type==="form"?fM(d):Rc.r(c)}var ap=typeof document>"u"?null:document;function KD(c,d,g){var y=ap;if(y&&typeof d=="string"&&d){var T=Gi(d);T='link[rel="'+c+'"][href="'+T+'"]',typeof g=="string"&&(T+='[crossorigin="'+g+'"]'),XD.has(T)||(XD.add(T),c={rel:c,crossOrigin:g,href:d},y.querySelector(T)===null&&(d=y.createElement("link"),ts(d,"link",c),Lr(d),y.head.appendChild(d)))}}function FV(c){Rc.D(c),KD("dns-prefetch",c,null)}function HV(c,d){Rc.C(c,d),KD("preconnect",c,d)}function zV(c,d,g){Rc.L(c,d,g);var y=ap;if(y&&c&&d){var T='link[rel="preload"][as="'+Gi(d)+'"]';d==="image"&&g&&g.imageSrcSet?(T+='[imagesrcset="'+Gi(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(T+='[imagesizes="'+Gi(g.imageSizes)+'"]')):T+='[href="'+Gi(c)+'"]';var k=T;switch(d){case"style":k=op(c);break;case"script":k=lp(c)}Ja.has(k)||(c=p({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),Ja.set(k,c),y.querySelector(T)!==null||d==="style"&&y.querySelector(W0(k))||d==="script"&&y.querySelector(V0(k))||(d=y.createElement("link"),ts(d,"link",c),Lr(d),y.head.appendChild(d)))}}function qV(c,d){Rc.m(c,d);var g=ap;if(g&&c){var y=d&&typeof d.as=="string"?d.as:"script",T='link[rel="modulepreload"][as="'+Gi(y)+'"][href="'+Gi(c)+'"]',k=T;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=lp(c)}if(!Ja.has(k)&&(c=p({rel:"modulepreload",href:c},d),Ja.set(k,c),g.querySelector(T)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(V0(k)))return}y=g.createElement("link"),ts(y,"link",c),Lr(y),g.head.appendChild(y)}}}function $V(c,d,g){Rc.S(c,d,g);var y=ap;if(y&&c){var T=Us(y).hoistableStyles,k=op(c);d=d||"default";var B=T.get(k);if(!B){var K={loading:0,preload:null};if(B=y.querySelector(W0(k)))K.loading=5;else{c=p({rel:"stylesheet",href:c,"data-precedence":d},g),(g=Ja.get(k))&&Mj(c,g);var ne=B=y.createElement("link");Lr(ne),ts(ne,"link",c),ne._p=new Promise(function(Ae,_e){ne.onload=Ae,ne.onerror=_e}),ne.addEventListener("load",function(){K.loading|=1}),ne.addEventListener("error",function(){K.loading|=2}),K.loading|=4,Ty(B,d,y)}B={type:"stylesheet",instance:B,count:1,state:K},T.set(k,B)}}}function QV(c,d){Rc.X(c,d);var g=ap;if(g&&c){var y=Us(g).hoistableScripts,T=lp(c),k=y.get(T);k||(k=g.querySelector(V0(T)),k||(c=p({src:c,async:!0},d),(d=Ja.get(T))&&Dj(c,d),k=g.createElement("script"),Lr(k),ts(k,"link",c),g.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},y.set(T,k))}}function UV(c,d){Rc.M(c,d);var g=ap;if(g&&c){var y=Us(g).hoistableScripts,T=lp(c),k=y.get(T);k||(k=g.querySelector(V0(T)),k||(c=p({src:c,async:!0,type:"module"},d),(d=Ja.get(T))&&Dj(c,d),k=g.createElement("script"),Lr(k),ts(k,"link",c),g.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},y.set(T,k))}}function ZD(c,d,g,y){var T=(T=be.current)?_y(T):null;if(!T)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=op(g.href),g=Us(T).hoistableStyles,y=g.get(d),y||(y={type:"style",instance:null,count:0,state:null},g.set(d,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=op(g.href);var k=Us(T).hoistableStyles,B=k.get(c);if(B||(T=T.ownerDocument||T,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(c,B),(k=T.querySelector(W0(c)))&&!k._p&&(B.instance=k,B.state.loading=5),Ja.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},Ja.set(c,g),k||WV(T,c,g,B.state))),d&&y===null)throw Error(r(528,""));return B}if(d&&y!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=lp(g),g=Us(T).hoistableScripts,y=g.get(d),y||(y={type:"script",instance:null,count:0,state:null},g.set(d,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function op(c){return'href="'+Gi(c)+'"'}function W0(c){return'link[rel="stylesheet"]['+c+"]"}function JD(c){return p({},c,{"data-precedence":c.precedence,precedence:null})}function WV(c,d,g,y){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?y.loading=1:(d=c.createElement("link"),y.preload=d,d.addEventListener("load",function(){return y.loading|=1}),d.addEventListener("error",function(){return y.loading|=2}),ts(d,"link",g),Lr(d),c.head.appendChild(d))}function lp(c){return'[src="'+Gi(c)+'"]'}function V0(c){return"script[async]"+c}function e8(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var y=c.querySelector('style[data-href~="'+Gi(g.href)+'"]');if(y)return d.instance=y,Lr(y),y;var T=p({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return y=(c.ownerDocument||c).createElement("style"),Lr(y),ts(y,"style",T),Ty(y,g.precedence,c),d.instance=y;case"stylesheet":T=op(g.href);var k=c.querySelector(W0(T));if(k)return d.state.loading|=4,d.instance=k,Lr(k),k;y=JD(g),(T=Ja.get(T))&&Mj(y,T),k=(c.ownerDocument||c).createElement("link"),Lr(k);var B=k;return B._p=new Promise(function(K,ne){B.onload=K,B.onerror=ne}),ts(k,"link",y),d.state.loading|=4,Ty(k,g.precedence,c),d.instance=k;case"script":return k=lp(g.src),(T=c.querySelector(V0(k)))?(d.instance=T,Lr(T),T):(y=g,(T=Ja.get(k))&&(y=p({},g),Dj(y,T)),c=c.ownerDocument||c,T=c.createElement("script"),Lr(T),ts(T,"link",y),c.head.appendChild(T),d.instance=T);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(y=d.instance,d.state.loading|=4,Ty(y,g.precedence,c));return d.instance}function Ty(c,d,g){for(var y=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=y.length?y[y.length-1]:null,k=T,B=0;B<y.length;B++){var K=y[B];if(K.dataset.precedence===d)k=K;else if(k!==T)break}k?k.parentNode.insertBefore(c,k.nextSibling):(d=g.nodeType===9?g.head:g,d.insertBefore(c,d.firstChild))}function Mj(c,d){c.crossOrigin==null&&(c.crossOrigin=d.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=d.referrerPolicy),c.title==null&&(c.title=d.title)}function Dj(c,d){c.crossOrigin==null&&(c.crossOrigin=d.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=d.referrerPolicy),c.integrity==null&&(c.integrity=d.integrity)}var ky=null;function t8(c,d,g){if(ky===null){var y=new Map,T=ky=new Map;T.set(g,y)}else T=ky,y=T.get(g),y||(y=new Map,T.set(g,y));if(y.has(c))return y;for(y.set(c,null),g=g.getElementsByTagName(c),T=0;T<g.length;T++){var k=g[T];if(!(k[vr]||k[Br]||c==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var B=k.getAttribute(d)||"";B=c+B;var K=y.get(B);K?K.push(k):y.set(B,[k])}}return y}function n8(c,d,g){c=c.ownerDocument||c,c.head.insertBefore(g,d==="title"?c.querySelector("head > title"):null)}function VV(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function r8(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function YV(c,d,g,y){if(g.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var T=op(y.href),k=d.querySelector(W0(T));if(k){d=k._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=Oy.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=k,Lr(k);return}k=d.ownerDocument||d,y=JD(y),(T=Ja.get(T))&&Mj(y,T),k=k.createElement("link"),Lr(k);var B=k;B._p=new Promise(function(K,ne){B.onload=K,B.onerror=ne}),ts(k,"link",y),g.instance=k}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=Oy.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var Rj=0;function GV(c,d){return c.stylesheets&&c.count===0&&My(c,c.stylesheets),0<c.count||0<c.imgCount?function(g){var y=setTimeout(function(){if(c.stylesheets&&My(c,c.stylesheets),c.unsuspend){var k=c.unsuspend;c.unsuspend=null,k()}},6e4+d);0<c.imgBytes&&Rj===0&&(Rj=62500*OV());var T=setTimeout(function(){if(c.waitingForImages=!1,c.count===0&&(c.stylesheets&&My(c,c.stylesheets),c.unsuspend)){var k=c.unsuspend;c.unsuspend=null,k()}},(c.imgBytes>Rj?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(y),clearTimeout(T)}}:null}function Oy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)My(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var Ey=null;function My(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,Ey=new Map,d.forEach(XV,c),Ey=null,Oy.call(c))}function XV(c,d){if(!(d.state.loading&4)){var g=Ey.get(c);if(g)var y=g.get(null);else{g=new Map,Ey.set(c,g);for(var T=c.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<T.length;k++){var B=T[k];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(g.set(B.dataset.precedence,B),y=B)}y&&g.set(null,y)}T=d.instance,B=T.getAttribute("data-precedence"),k=g.get(B)||y,k===y&&g.set(null,T),g.set(B,T),this.count++,y=Oy.bind(this),T.addEventListener("load",y),T.addEventListener("error",y),k?k.parentNode.insertBefore(T,k.nextSibling):(c=c.nodeType===9?c.head:c,c.insertBefore(T,c.firstChild)),d.state.loading|=4}}var Y0={$$typeof:C,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function KV(c,d,g,y,T,k,B,K,ne){this.tag=1,this.containerInfo=c,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=Dn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dn(0),this.hiddenUpdates=Dn(null),this.identifierPrefix=y,this.onUncaughtError=T,this.onCaughtError=k,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ne,this.incompleteTransitions=new Map}function i8(c,d,g,y,T,k,B,K,ne,Ae,_e,Be){return c=new KV(c,d,g,B,ne,Ae,_e,Be,K),d=1,k===!0&&(d|=24),k=ga(3,null,null,d),c.current=k,k.stateNode=c,d=dS(),d.refCount++,c.pooledCache=d,d.refCount++,k.memoizedState={element:y,isDehydrated:g,cache:d},gS(k),c}function s8(c){return c?(c=Ff,c):Ff}function a8(c,d,g,y,T,k){T=s8(T),y.context===null?y.context=T:y.pendingContext=T,y=Eu(d),y.payload={element:g},k=k===void 0?null:k,k!==null&&(y.callback=k),g=Mu(c,y,d),g!==null&&(Js(g,c,d),_0(g,c,d))}function o8(c,d){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g<d?g:d}}function Nj(c,d){o8(c,d),(c=c.alternate)&&o8(c,d)}function l8(c){if(c.tag===13||c.tag===31){var d=hd(c,67108864);d!==null&&Js(d,c,67108864),Nj(c,67108864)}}function c8(c){if(c.tag===13||c.tag===31){var d=Aa();d=Jt(d);var g=hd(c,d);g!==null&&Js(g,c,d),Nj(c,d)}}var Dy=!0;function ZV(c,d,g,y){var T=P.T;P.T=null;var k=F.p;try{F.p=2,Pj(c,d,g,y)}finally{F.p=k,P.T=T}}function JV(c,d,g,y){var T=P.T;P.T=null;var k=F.p;try{F.p=8,Pj(c,d,g,y)}finally{F.p=k,P.T=T}}function Pj(c,d,g,y){if(Dy){var T=Ij(y);if(T===null)Aj(c,d,y,Ry,g),h8(c,y);else if(tY(T,c,d,g,y))y.stopPropagation();else if(h8(c,y),d&4&&-1<eY.indexOf(c)){for(;T!==null;){var k=Qs(T);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var B=Mn(k.pendingLanes);if(B!==0){var K=k;for(K.pendingLanes|=2,K.entangledLanes|=2;B;){var ne=1<<31-Ut(B);K.entanglements[1]|=ne,B&=~ne}Al(k),(Pn&6)===0&&(my=Ue()+500,q0(0))}}break;case 31:case 13:K=hd(k,2),K!==null&&Js(K,k,2),vy(),Nj(k,2)}if(k=Ij(y),k===null&&Aj(c,d,y,Ry,g),k===T)break;T=k}T!==null&&y.stopPropagation()}else Aj(c,d,y,null,g)}}function Ij(c){return c=Bt(c),Bj(c)}var Ry=null;function Bj(c){if(Ry=null,c=An(c),c!==null){var d=s(c);if(d===null)c=null;else{var g=d.tag;if(g===13){if(c=o(d),c!==null)return c;c=null}else if(g===31){if(c=l(d),c!==null)return c;c=null}else if(g===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;c=null}else d!==c&&(c=null)}}return Ry=c,null}function u8(c){switch(c){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(Pe()){case st:return 2;case he:return 8;case dt:case sn:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var Lj=!1,qu=null,$u=null,Qu=null,G0=new Map,X0=new Map,Uu=[],eY="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 h8(c,d){switch(c){case"focusin":case"focusout":qu=null;break;case"dragenter":case"dragleave":$u=null;break;case"mouseover":case"mouseout":Qu=null;break;case"pointerover":case"pointerout":G0.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":X0.delete(d.pointerId)}}function K0(c,d,g,y,T,k){return c===null||c.nativeEvent!==k?(c={blockedOn:d,domEventName:g,eventSystemFlags:y,nativeEvent:k,targetContainers:[T]},d!==null&&(d=Qs(d),d!==null&&l8(d)),c):(c.eventSystemFlags|=y,d=c.targetContainers,T!==null&&d.indexOf(T)===-1&&d.push(T),c)}function tY(c,d,g,y,T){switch(d){case"focusin":return qu=K0(qu,c,d,g,y,T),!0;case"dragenter":return $u=K0($u,c,d,g,y,T),!0;case"mouseover":return Qu=K0(Qu,c,d,g,y,T),!0;case"pointerover":var k=T.pointerId;return G0.set(k,K0(G0.get(k)||null,c,d,g,y,T)),!0;case"gotpointercapture":return k=T.pointerId,X0.set(k,K0(X0.get(k)||null,c,d,g,y,T)),!0}return!1}function d8(c){var d=An(c.target);if(d!==null){var g=s(d);if(g!==null){if(d=g.tag,d===13){if(d=o(g),d!==null){c.blockedOn=d,oc(c.priority,function(){c8(g)});return}}else if(d===31){if(d=l(g),d!==null){c.blockedOn=d,oc(c.priority,function(){c8(g)});return}}else if(d===3&&g.stateNode.current.memoizedState.isDehydrated){c.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}c.blockedOn=null}function Ny(c){if(c.blockedOn!==null)return!1;for(var d=c.targetContainers;0<d.length;){var g=Ij(c.nativeEvent);if(g===null){g=c.nativeEvent;var y=new g.constructor(g.type,g);wt=y,g.target.dispatchEvent(y),wt=null}else return d=Qs(g),d!==null&&l8(d),c.blockedOn=g,!1;d.shift()}return!0}function f8(c,d,g){Ny(c)&&g.delete(d)}function nY(){Lj=!1,qu!==null&&Ny(qu)&&(qu=null),$u!==null&&Ny($u)&&($u=null),Qu!==null&&Ny(Qu)&&(Qu=null),G0.forEach(f8),X0.forEach(f8)}function Py(c,d){c.blockedOn===d&&(c.blockedOn=null,Lj||(Lj=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nY)))}var Iy=null;function p8(c){Iy!==c&&(Iy=c,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Iy===c&&(Iy=null);for(var d=0;d<c.length;d+=3){var g=c[d],y=c[d+1],T=c[d+2];if(typeof y!="function"){if(Bj(y||g)===null)continue;break}var k=Qs(g);k!==null&&(c.splice(d,3),d-=3,IS(k,{pending:!0,data:T,method:g.method,action:y},y,T))}}))}function cp(c){function d(ne){return Py(ne,c)}qu!==null&&Py(qu,c),$u!==null&&Py($u,c),Qu!==null&&Py(Qu,c),G0.forEach(d),X0.forEach(d);for(var g=0;g<Uu.length;g++){var y=Uu[g];y.blockedOn===c&&(y.blockedOn=null)}for(;0<Uu.length&&(g=Uu[0],g.blockedOn===null);)d8(g),g.blockedOn===null&&Uu.shift();if(g=(c.ownerDocument||c).$$reactFormReplay,g!=null)for(y=0;y<g.length;y+=3){var T=g[y],k=g[y+1],B=T[Mi]||null;if(typeof k=="function")B||p8(g);else if(B){var K=null;if(k&&k.hasAttribute("formAction")){if(T=k,B=k[Mi]||null)K=B.formAction;else if(Bj(T)!==null)continue}else K=B.action;typeof K=="function"?g[y+1]=K:(g.splice(y,3),y-=3),p8(g)}}}function m8(){function c(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(B){return T=B})},focusReset:"manual",scroll:"manual"})}function d(){T!==null&&(T(),T=null),y||setTimeout(g,20)}function g(){if(!y&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,T=null;return navigation.addEventListener("navigate",c),navigation.addEventListener("navigatesuccess",d),navigation.addEventListener("navigateerror",d),setTimeout(g,100),function(){y=!0,navigation.removeEventListener("navigate",c),navigation.removeEventListener("navigatesuccess",d),navigation.removeEventListener("navigateerror",d),T!==null&&(T(),T=null)}}}function Fj(c){this._internalRoot=c}By.prototype.render=Fj.prototype.render=function(c){var d=this._internalRoot;if(d===null)throw Error(r(409));var g=d.current,y=Aa();a8(g,y,c,d,null,null)},By.prototype.unmount=Fj.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var d=c.containerInfo;a8(c.current,2,null,c,null,null),vy(),d[ds]=null}};function By(c){this._internalRoot=c}By.prototype.unstable_scheduleHydration=function(c){if(c){var d=hs();c={blockedOn:null,target:c,priority:d};for(var g=0;g<Uu.length&&d!==0&&d<Uu[g].priority;g++);Uu.splice(g,0,c),g===0&&d8(c)}};var g8=e.version;if(g8!=="19.2.4")throw Error(r(527,g8,"19.2.4"));F.findDOMNode=function(c){var d=c._reactInternals;if(d===void 0)throw typeof c.render=="function"?Error(r(188)):(c=Object.keys(c).join(","),Error(r(268,c)));return c=h(d),c=c!==null?f(c):null,c=c===null?null:c.stateNode,c};var rY={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ly=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ly.isDisabled&&Ly.supportsFiber)try{Pt=Ly.inject(rY),Mt=Ly}catch{}}return J0.createRoot=function(c,d){if(!i(c))throw Error(r(299));var g=!1,y="",T=SM,k=jM,B=CM;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(T=d.onUncaughtError),d.onCaughtError!==void 0&&(k=d.onCaughtError),d.onRecoverableError!==void 0&&(B=d.onRecoverableError)),d=i8(c,1,!1,null,null,g,y,null,T,k,B,m8),c[ds]=d.current,xj(c),new Fj(d)},J0.hydrateRoot=function(c,d,g){if(!i(c))throw Error(r(299));var y=!1,T="",k=SM,B=jM,K=CM,ne=null;return g!=null&&(g.unstable_strictMode===!0&&(y=!0),g.identifierPrefix!==void 0&&(T=g.identifierPrefix),g.onUncaughtError!==void 0&&(k=g.onUncaughtError),g.onCaughtError!==void 0&&(B=g.onCaughtError),g.onRecoverableError!==void 0&&(K=g.onRecoverableError),g.formState!==void 0&&(ne=g.formState)),d=i8(c,1,!0,d,g??null,y,T,ne,k,B,K,m8),d.context=s8(null),g=d.current,y=Aa(),y=Jt(y),T=Eu(y),T.callback=null,Mu(g,T,y),g=y,d.current.lanes=g,an(d,g),Al(d),c[ds]=d.current,xj(c),new By(d)},J0.version="19.2.4",J0}var T8;function mY(){if(T8)return $j.exports;T8=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$j.exports=pY(),$j.exports}var gY=mY();const vY=ll(gY),bY="_link_88ik9_12",Fy={link:bY},yY="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='115.333px'%20height='114px'%20viewBox='0%200%20115.333%20114'%20enable-background='new%200%200%20115.333%20114'%20xml:space='preserve'%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23EEEEEE'%20d='M56.667,0.667C25.372,0.667,0,26.036,0,57.332c0,31.295,25.372,56.666,56.667,56.666%20s56.666-25.371,56.666-56.666C113.333,26.036,87.961,0.667,56.667,0.667z%20M56.667,106.722c-8.904,0-16.123-5.948-16.123-13.283%20H72.79C72.79,100.773,65.571,106.722,56.667,106.722z%20M83.297,89.04H30.034v-9.658h53.264V89.04z%20M83.106,74.411h-52.92%20c-0.176-0.203-0.356-0.403-0.526-0.609c-5.452-6.62-6.736-10.076-7.983-13.598c-0.021-0.116,6.611,1.355,11.314,2.413%20c0,0,2.42,0.56,5.958,1.205c-3.397-3.982-5.414-9.044-5.414-14.218c0-11.359,8.712-21.285,5.569-29.308%20c3.059,0.249,6.331,6.456,6.552,16.161c3.252-4.494,4.613-12.701,4.613-17.733c0-5.21,3.433-11.262,6.867-11.469%20c-3.061,5.045,0.793,9.37,4.219,20.099c1.285,4.03,1.121,10.812,2.113,15.113C63.797,33.534,65.333,20.5,71,16%20c-2.5,5.667,0.37,12.758,2.333,16.167c3.167,5.5,5.087,9.667,5.087,17.548c0,5.284-1.951,10.259-5.242,14.148%20c3.742-0.702,6.326-1.335,6.326-1.335l12.152-2.371C91.657,60.156,89.891,67.418,83.106,74.411z'/%3e%3c/g%3e%3c/svg%3e";var Rl=function(){return Rl=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Rl.apply(this,arguments)};function N9(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function xY(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var H1="right-scroll-bar-position",z1="width-before-scroll-bar",AY="with-scroll-bars-hidden",wY="--removed-body-scroll-bar-size";function Vj(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function SY(t,e){var n=M.useState(function(){return{value:t,callback:e,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=e,n.facade}var jY=typeof window<"u"?M.useLayoutEffect:M.useEffect,k8=new WeakMap;function CY(t,e){var n=SY(null,function(r){return t.forEach(function(i){return Vj(i,r)})});return jY(function(){var r=k8.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(l){s.has(l)||Vj(l,null)}),s.forEach(function(l){i.has(l)||Vj(l,o)})}k8.set(n,t)},[t]),n}function _Y(t){return t}function TY(t,e){e===void 0&&(e=_Y);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]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(s),o=n}var u=function(){var f=o;o=[],f.forEach(s)},h=function(){return Promise.resolve().then(u)};h(),n={push:function(f){o.push(f),h()},filter:function(f){return o=o.filter(f),n}}}};return i}function kY(t){t===void 0&&(t={});var e=TY(null);return e.options=Rl({async:!0,ssr:!1},t),e}var P9=function(t){var e=t.sideCar,n=N9(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return M.createElement(r,Rl({},n))};P9.isSideCarExport=!0;function OY(t,e){return t.useMedium(e),P9}var I9=kY(),Yj=function(){},qA=M.forwardRef(function(t,e){var n=M.useRef(null),r=M.useState({onScrollCapture:Yj,onWheelCapture:Yj,onTouchMoveCapture:Yj}),i=r[0],s=r[1],o=t.forwardProps,l=t.children,u=t.className,h=t.removeScrollBar,f=t.enabled,p=t.shards,m=t.sideCar,v=t.noRelative,b=t.noIsolation,x=t.inert,w=t.allowPinchZoom,A=t.as,j=A===void 0?"div":A,C=t.gapMode,_=N9(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,O=CY([n,e]),E=Rl(Rl({},_),i);return M.createElement(M.Fragment,null,f&&M.createElement(S,{sideCar:I9,removeScrollBar:h,shards:p,noRelative:v,noIsolation:b,inert:x,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:C}),o?M.cloneElement(M.Children.only(l),Rl(Rl({},E),{ref:O})):M.createElement(j,Rl({},E,{className:u,ref:O}),l))});qA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qA.classNames={fullWidth:z1,zeroRight:H1};var EY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MY(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=EY();return e&&t.setAttribute("nonce",e),t}function DY(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function RY(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var NY=function(){var t=0,e=null;return{add:function(n){t==0&&(e=MY())&&(DY(e,n),RY(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},PY=function(){var t=NY();return function(e,n){M.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},B9=function(){var t=PY(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},IY={left:0,top:0,right:0,gap:0},Gj=function(t){return parseInt(t||"",10)||0},BY=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Gj(n),Gj(r),Gj(i)]},LY=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return IY;var e=BY(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},FY=B9(),Pp="data-scroll-locked",HY=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,l=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(AY,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(l,"px ").concat(r,`;
  }
  body[`).concat(Pp,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(H1,` {
    right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(z1,` {
    margin-right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(H1," .").concat(H1,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(z1," .").concat(z1,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Pp,`] {
    `).concat(wY,": ").concat(l,`px;
  }
`)},O8=function(){var t=parseInt(document.body.getAttribute(Pp)||"0",10);return isFinite(t)?t:0},zY=function(){M.useEffect(function(){return document.body.setAttribute(Pp,(O8()+1).toString()),function(){var t=O8()-1;t<=0?document.body.removeAttribute(Pp):document.body.setAttribute(Pp,t.toString())}},[])},qY=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;zY();var s=M.useMemo(function(){return LY(i)},[i]);return M.createElement(FY,{styles:HY(s,!e,i,n?"":"!important")})},l3=!1;if(typeof window<"u")try{var Hy=Object.defineProperty({},"passive",{get:function(){return l3=!0,!0}});window.addEventListener("test",Hy,Hy),window.removeEventListener("test",Hy,Hy)}catch{l3=!1}var up=l3?{passive:!1}:!1,$Y=function(t){return t.tagName==="TEXTAREA"},L9=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!$Y(t)&&n[e]==="visible")},QY=function(t){return L9(t,"overflowY")},UY=function(t){return L9(t,"overflowX")},E8=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=F9(t,r);if(i){var s=H9(t,r),o=s[1],l=s[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WY=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},VY=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},F9=function(t,e){return t==="v"?QY(e):UY(e)},H9=function(t,e){return t==="v"?WY(e):VY(e)},YY=function(t,e){return t==="h"&&e==="rtl"?-1:1},GY=function(t,e,n,r,i){var s=YY(t,window.getComputedStyle(e).direction),o=s*r,l=n.target,u=e.contains(l),h=!1,f=o>0,p=0,m=0;do{if(!l)break;var v=H9(t,l),b=v[0],x=v[1],w=v[2],A=x-w-s*b;(b||A)&&F9(t,l)&&(p+=A,m+=b);var j=l.parentNode;l=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!u&&l!==document.body||u&&(e.contains(l)||e===l));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(h=!0),h},zy=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},M8=function(t){return[t.deltaX,t.deltaY]},D8=function(t){return t&&"current"in t?t.current:t},XY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},KY=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},ZY=0,hp=[];function JY(t){var e=M.useRef([]),n=M.useRef([0,0]),r=M.useRef(),i=M.useState(ZY++)[0],s=M.useState(B9)[0],o=M.useRef(t);M.useEffect(function(){o.current=t},[t]),M.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var x=xY([t.lockRef.current],(t.shards||[]).map(D8),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=M.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var A=zy(x),j=n.current,C="deltaX"in x?x.deltaX:j[0]-A[0],_="deltaY"in x?x.deltaY:j[1]-A[1],S,O=x.target,E=Math.abs(C)>Math.abs(_)?"h":"v";if("touches"in x&&E==="h"&&O.type==="range")return!1;var D=E8(E,O);if(!D)return!0;if(D?S=E:(S=E==="v"?"h":"v",D=E8(E,O)),!D)return!1;if(!r.current&&"changedTouches"in x&&(C||_)&&(r.current=S),!S)return!0;var N=r.current||S;return GY(N,w,x,N==="h"?C:_)},[]),u=M.useCallback(function(x){var w=x;if(!(!hp.length||hp[hp.length-1]!==s)){var A="deltaY"in w?M8(w):zy(w),j=e.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&XY(S.delta,A)})[0];if(j&&j.should){w.cancelable&&w.preventDefault();return}if(!j){var C=(o.current.shards||[]).map(D8).filter(Boolean).filter(function(S){return S.contains(w.target)}),_=C.length>0?l(w,C[0]):!o.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),h=M.useCallback(function(x,w,A,j){var C={name:x,delta:w,target:A,should:j,shadowParent:eG(A)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(_){return _!==C})},1)},[]),f=M.useCallback(function(x){n.current=zy(x),r.current=void 0},[]),p=M.useCallback(function(x){h(x.type,M8(x),x.target,l(x,t.lockRef.current))},[]),m=M.useCallback(function(x){h(x.type,zy(x),x.target,l(x,t.lockRef.current))},[]);M.useEffect(function(){return hp.push(s),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,up),document.addEventListener("touchmove",u,up),document.addEventListener("touchstart",f,up),function(){hp=hp.filter(function(x){return x!==s}),document.removeEventListener("wheel",u,up),document.removeEventListener("touchmove",u,up),document.removeEventListener("touchstart",f,up)}},[]);var v=t.removeScrollBar,b=t.inert;return M.createElement(M.Fragment,null,b?M.createElement(s,{styles:KY(i)}):null,v?M.createElement(qY,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function eG(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const tG=OY(I9,JY);var pf=M.forwardRef(function(t,e){return M.createElement(qA,Rl({},t,{ref:e,sideCar:tG}))});pf.classNames=qA.classNames;function Zr(t){return Object.keys(t)}function Xj(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Dk(t,e){const n={...t},r=e;return Xj(t)&&Xj(e)&&Object.keys(e).forEach(i=>{Xj(r[i])&&i in t?n[i]=Dk(n[i],r[i]):n[i]=r[i]}),n}function nG(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function rG(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function Xg(t){const e=rG(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function R8(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function z9(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const i=`${r/16}${t}`;return e?R8(i):i}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(s=>n(s)).join(",");if(r.includes(" "))return r.split(" ").map(s=>n(s)).join(" ");const i=r.replace("px","");if(!Number.isNaN(Number(i))){const s=`${Number(i)/16}${t}`;return e?R8(s):s}}return r}return n}const fe=z9("rem",{shouldScale:!0}),Os=z9("em");function $v(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function q9(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(r=>e.test(r))}return!1}function Rk(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==M.Fragment:!1}function Wi(t){const e=M.createContext(null);return[({children:i,value:s})=>a.jsx(e.Provider,{value:s,children:i}),()=>{const i=M.useContext(e);if(i===null)throw new Error(t);return i}]}function Vh(t=null){const e=M.createContext(t);return[({children:i,value:s})=>a.jsx(e.Provider,{value:s,children:i}),()=>M.useContext(e)]}function jx(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function Cx(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function iG(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function sG(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function aG(t,e,n){return Cx(t,n)===Cx(e,n)}function $A({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:s="rtl",orientation:o}){return l=>{var b;n==null||n(l);const u=Array.from(((b=Cx(l.currentTarget,t))==null?void 0:b.querySelectorAll(e))||[]).filter(x=>aG(l.currentTarget,x,t)),h=u.findIndex(x=>l.currentTarget===x),f=sG(h,u,r),p=iG(h,u,r),m=s==="rtl"?p:f,v=s==="rtl"?f:p;switch(l.key){case"ArrowRight":{o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[m].focus(),i&&u[m].click());break}case"ArrowLeft":{o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[v].focus(),i&&u[v].click());break}case"ArrowUp":{o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),i&&u[p].click());break}case"ArrowDown":{o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[f].focus(),i&&u[f].click());break}case"Home":{l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break}case"End":{l.stopPropagation(),l.preventDefault();const x=u.length-1;!u[x].disabled&&u[x].focus();break}}}}const oG={app:100,modal:200,popover:300,overlay:400,max:9999};function vo(t){return oG[t]}const _x=()=>{};function lG(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||_x:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function $t(t,e="size",n=!0){if(t!==void 0)return q9(t)?n?fe(t):t:`var(--${e}-${t})`}function zi(t){return $t(t,"mantine-spacing")}function Jn(t){return t===void 0?"var(--mantine-radius-default)":$t(t,"mantine-radius")}function kr(t){return $t(t,"mantine-font-size")}function $9(t){return $t(t,"mantine-line-height",!1)}function Nk(t){if(t)return $t(t,"mantine-shadow",!1)}function qi(t,e){return n=>{t==null||t(n),e==null||e(n)}}function Pk(t,e){return t in e?Xg(e[t]):Xg(t)}function c3(t,e){const n=t.map(r=>({value:r,px:Pk(r,e)}));return n.sort((r,i)=>r.px-i.px),n}function Ip(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function cG(t,e,n){var r;return n?Array.from(((r=Cx(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(i=>i===n):null}function Ch(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function bm(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function uG(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:r}=n;if(r!==Object.keys(e).length)return!1;for(let i=0;i<r;i+=1){const s=n[i];if(!(s in e)||t[s]!==e[s]&&!(Number.isNaN(t[s])&&Number.isNaN(e[s])))return!1}return!0}function Pd(t){const e=M.useRef(t);return M.useEffect(()=>{e.current=t}),M.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function QA(t,e){const{delay:n,flushOnUnmount:r,leading:i}=typeof e=="number"?{delay:e,flushOnUnmount:!1,leading:!1}:e,s=Pd(t),o=M.useRef(0),l=M.useMemo(()=>{const u=Object.assign((...h)=>{window.clearTimeout(o.current);const f=u._isFirstCall;u._isFirstCall=!1;function p(){window.clearTimeout(o.current),o.current=0,u._isFirstCall=!0}if(i&&f){s(...h);const b=()=>{p()},x=()=>{o.current!==0&&(p(),s(...h))},w=()=>{p()};u.flush=x,u.cancel=w,o.current=window.setTimeout(b,n);return}if(i&&!f){const b=()=>{o.current!==0&&(p(),s(...h))},x=()=>{p()};u.flush=b,u.cancel=x;const w=()=>{p()};o.current=window.setTimeout(w,n);return}const m=()=>{o.current!==0&&(p(),s(...h))},v=()=>{p()};u.flush=m,u.cancel=v,o.current=window.setTimeout(m,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return u},[s,n,i]);return M.useEffect(()=>()=>{r?l.flush():l.cancel()},[l,r]),l}const hG=["mousedown","touchstart"];function dG(t,e,n){const r=M.useRef(null),i=e||hG;return M.useEffect(()=>{const s=o=>{const{target:l}=o??{};if(Array.isArray(n)){const u=!document.body.contains(l)&&(l==null?void 0:l.tagName)!=="HTML";n.every(f=>!!f&&!o.composedPath().includes(f))&&!u&&t(o)}else r.current&&!r.current.contains(l)&&t(o)};return i.forEach(o=>document.addEventListener(o,s)),()=>{i.forEach(o=>document.removeEventListener(o,s))}},[r,t,n]),r}function Q9(t={timeout:2e3}){const[e,n]=M.useState(null),[r,i]=M.useState(!1),[s,o]=M.useState(null),l=f=>{window.clearTimeout(s),o(window.setTimeout(()=>i(!1),t.timeout)),i(f)};return{copy:f=>{"clipboard"in navigator?navigator.clipboard.writeText(f).then(()=>l(!0)).catch(p=>n(p)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),n(null),window.clearTimeout(s)},error:e,copied:r}}function fG(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function pG(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function U9(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=M.useState(n?e:pG(t));return M.useEffect(()=>{try{const s=window.matchMedia(t);return i(s.matches),fG(s,o=>i(o.matches))}catch{return}},[t]),r||!1}function W9(t,e){return U9("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}function Qv(t,e,n={leading:!1}){const[r,i]=M.useState(t),s=M.useRef(!1),o=M.useRef(null),l=M.useRef(!1),u=M.useCallback(()=>window.clearTimeout(o.current),[]);return M.useEffect(()=>{s.current&&(!l.current&&n.leading?(l.current=!0,i(t)):(u(),o.current=window.setTimeout(()=>{l.current=!1,i(t)},e)))},[t,n.leading,e]),M.useEffect(()=>(s.current=!0,u),[]),[r,u]}const Cf=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Gl(t,e){const n=M.useRef(!1);M.useEffect(()=>()=>{n.current=!1},[]),M.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function V9({opened:t,shouldReturnFocus:e=!0}){const n=M.useRef(null),r=()=>{var i;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((i=n.current)==null||i.focus({preventScroll:!0}))};return Gl(()=>{let i=-1;const s=o=>{o.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",s),t?n.current=document.activeElement:e&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",s)}},[t,e]),r}const mG=/input|select|textarea|button|object/,Y9="a, input, select, textarea, button, object, [tabindex]";function gG(t){return t.style.display==="none"}function vG(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(gG(n))return!1;n=n.parentNode}return!0}function G9(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function u3(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(G9(t));return(mG.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&vG(t)}function X9(t){const e=G9(t);return(Number.isNaN(e)||e>=0)&&u3(t)}function bG(t){return Array.from(t.querySelectorAll(Y9)).filter(X9)}function yG(t,e){const n=bG(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],i=t.getRootNode();let s=r===i.activeElement||t===i.activeElement;const o=i.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(s=n.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(r)),!s)return;e.preventDefault();const u=n[e.shiftKey?n.length-1:0];u&&u.focus()}function xG(t=!0){const e=M.useRef(null),n=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const o=Array.from(i.querySelectorAll(Y9));s=o.find(X9)||o.find(u3)||null,!s&&u3(i)&&(s=i)}s&&s.focus({preventScroll:!0})},r=M.useCallback(i=>{t&&i!==null&&e.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),e.current=i):e.current=null)},[t]);return M.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const i=s=>{s.key==="Tab"&&e.current&&yG(e.current,s)};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t]),r}const AG=t=>(t+1)%1e6;function wG(){const[,t]=M.useReducer(AG,0);return t}const SG=Cn.useId||(()=>{});function jG(){const t=SG();return t?`mantine-${t.replace(/:/g,"")}`:""}function ki(t){const e=jG(),[n,r]=M.useState(e);return Cf(()=>{r(bm())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function Tx(t,e,n){M.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function CG(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function _G(t){try{return t&&JSON.parse(t)}catch{return t}}function TG(t){return{getItem:i=>{try{return window[t].getItem(i)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(i,s)=>{try{window[t].setItem(i,s)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:i=>{try{window[t].removeItem(i)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function kG(t,e){const n="mantine-local-storage",{getItem:r,setItem:i,removeItem:s}=TG(t);return function({key:l,defaultValue:u,getInitialValueInEffect:h=!0,sync:f=!0,deserialize:p=_G,serialize:m=v=>CG(v,e)}){const v=M.useCallback(j=>{let C;try{C=typeof window>"u"||!(t in window)||window[t]===null||!!j}catch{C=!0}if(C)return u;const _=r(l);return _!==null?p(_):u},[l,u]),[b,x]=M.useState(v(h)),w=M.useCallback(j=>{j instanceof Function?x(C=>{const _=j(C);return i(l,m(_)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:j(C)}}))}),_}):(i(l,m(j)),window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:j}})),x(j))},[l]),A=M.useCallback(()=>{s(l),x(u),window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:u}}))},[l,u]);return Tx("storage",j=>{f&&j.storageArea===window[t]&&j.key===l&&x(p(j.newValue??void 0))}),Tx(n,j=>{f&&j.detail.key===l&&x(j.detail.value)}),M.useEffect(()=>{u!==void 0&&b===void 0&&w(u)},[u,b,w]),M.useEffect(()=>{const j=v();j!==void 0&&w(j)},[l]),[b===void 0?u:b,w,A]}}function Uv(t){return kG("localStorage","use-local-storage")(t)}function kx(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function K9(...t){const e=new Map;return n=>{if(t.forEach(r=>{const i=kx(r,n);i&&e.set(r,i)}),e.size>0)return()=>{t.forEach(r=>{const i=e.get(r);i&&typeof i=="function"?i():kx(r,null)}),e.clear()}}}function cr(...t){return M.useCallback(K9(...t),t)}function Ui({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[i,s]=M.useState(e!==void 0?e:n),o=(l,...u)=>{s(l),r==null||r(l,...u)};return t!==void 0?[t,r,!0]:[i,o,!1]}function Vu(t,e){const n=e-t+1;return Array.from({length:n},(r,i)=>i+t)}const qy="dots";function OG({total:t,siblings:e=1,boundaries:n=1,page:r,initialPage:i=1,onChange:s}){const o=Math.max(Math.trunc(t),0),[l,u]=Ui({value:r,onChange:s,defaultValue:i,finalValue:i}),h=x=>{x<=0?u(1):x>o?u(o):u(x)},f=()=>h(l+1),p=()=>h(l-1),m=()=>h(1),v=()=>h(o);return{range:M.useMemo(()=>{if(e*2+3+n*2>=o)return Vu(1,o);const w=Math.max(l-e,n),A=Math.min(l+e,o-n),j=w>n+2,C=A<o-(n+1);if(!j&&C){const _=e*2+n+2;return[...Vu(1,_),qy,...Vu(o-(n-1),o)]}if(j&&!C){const _=n+1+2*e;return[...Vu(1,n),qy,...Vu(o-_,o)]}return[...Vu(1,n),qy,...Vu(w,A),qy,...Vu(o-n+1,o)]},[o,e,l]),active:l,setPage:h,next:f,previous:p,first:m,last:v}}function UA(t,e){return U9("(prefers-reduced-motion: reduce)",t,e)}const EG={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function MG(t){const e=M.useRef(0),n=M.useRef(null),[r,i]=M.useState(EG),s=M.useMemo(()=>typeof window<"u"?new ResizeObserver(o=>{const l=o[0];l&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{var u,h;if(n.current){const f=((u=l.borderBoxSize)==null?void 0:u[0])||((h=l.contentBoxSize)==null?void 0:h[0]);if(f){const p=f.inlineSize,m=f.blockSize;i({width:p,height:m,x:l.contentRect.x,y:l.contentRect.y,top:l.contentRect.top,left:l.contentRect.left,bottom:l.contentRect.bottom,right:l.contentRect.right})}else i(l.contentRect)}}))}):null,[]);return M.useEffect(()=>(n.current&&(s==null||s.observe(n.current,t)),()=>{s==null||s.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[n.current]),[n,r]}function DG(t){const[e,{width:n,height:r}]=MG(t);return{ref:e,width:n,height:r}}function RG(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!uG(t[n],e[n]))return!1;return!0}function NG(t){const e=M.useRef([]),n=M.useRef(0);return RG(e.current,t)||(e.current=t,n.current+=1),[n.current]}function PG(t,e){M.useEffect(t,NG(e))}function Wv(t=!1,e={}){const[n,r]=M.useState(t),i=M.useCallback(()=>{r(l=>{var u;return l||((u=e.onOpen)==null||u.call(e),!0)})},[e.onOpen]),s=M.useCallback(()=>{r(l=>{var u;return l&&((u=e.onClose)==null||u.call(e),!1)})},[e.onClose]),o=M.useCallback(()=>{n?s():i()},[s,i,n]);return[n,{open:i,close:s,toggle:o}]}function IG(t,e,n={autoInvoke:!1}){const r=M.useRef(null),i=M.useCallback((...o)=>{r.current||(r.current=window.setTimeout(()=>{t(o),r.current=null},e))},[e]),s=M.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return M.useEffect(()=>(n.autoInvoke&&i(),s),[s,i]),{start:i,clear:s}}function BG(t){const e=M.useRef(void 0);return M.useEffect(()=>{e.current=t},[t]),e.current}function LG(t,e,n){const r=M.useRef(null),i=M.useRef(null);return M.useEffect(()=>{const s=typeof n=="function"?n():n;return(s||i.current)&&(r.current=new MutationObserver(t),r.current.observe(s||i.current,e)),()=>{var o;(o=r.current)==null||o.disconnect()}},[t,e]),i}function FG(){const[t,e]=M.useState(!1);return M.useEffect(()=>e(!0),[]),t}var HG={};function zG(){return typeof process<"u"&&HG?"production":"development"}function WA(t){var n;const e=Cn.version;return typeof Cn.version!="string"||e.startsWith("18.")?t==null?void 0:t.ref:(n=t==null?void 0:t.props)==null?void 0:n.ref}function q1(t,e=document){const n=e.querySelector(t);if(n)return n;const r=e.querySelectorAll("*");for(let i=0;i<r.length;i+=1){const s=r[i];if(s.shadowRoot){const o=q1(t,s.shadowRoot);if(o)return o}}return null}function Xu(t,e=document){const n=[],r=e.querySelectorAll(t);n.push(...Array.from(r));const i=e.querySelectorAll("*");for(let s=0;s<i.length;s+=1){const o=i[s];if(o.shadowRoot){const l=Xu(t,o.shadowRoot);n.push(...l)}}return n}function Yu(t){if(!t)return document;const e=t.getRootNode();return e instanceof ShadowRoot||e instanceof Document?e:document}function _f(t){const e=M.Children.toArray(t);return e.length!==1||!Rk(e[0])?null:e[0]}function Z9(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Z9(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ir(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Z9(t))&&(r&&(r+=" "),r+=e);return r}const qG={};function $G(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,i])=>{e[r]?e[r]=Ir(e[r],i):e[r]=i})}),e}function VA({theme:t,classNames:e,props:n,stylesCtx:r}){const s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o(t,n,r):o||qG);return $G(s)}function Ox({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((s,o)=>typeof o=="function"?{...s,...o(t,n,r)}:{...s,...o},{})}const Ik=M.createContext(null);function su(){const t=M.useContext(Ik);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function QG(){return su().cssVariablesResolver}function UG(){return su().classNamesPrefix}function YA(){return su().getStyleNonce}function WG(){return su().withStaticClasses}function VG(){return su().headless}function YG(){var t;return(t=su().stylesTransform)==null?void 0:t.sx}function GG(){var t;return(t=su().stylesTransform)==null?void 0:t.styles}function GA(){return su().env||"default"}function XG(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function KG(t){let e=t.replace("#","");if(e.length===3){const o=e.split("");e=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}if(e.length===8){const o=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:o}}const n=parseInt(e,16),r=n>>16&255,i=n>>8&255,s=n&255;return{r,g:i,b:s,a:1}}function ZG(t){const[e,n,r,i]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:i===void 0?1:i}}function JG(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),i=parseInt(n[2],10)/100,s=parseInt(n[3],10)/100,o=n[5]?parseFloat(n[5]):void 0,l=(1-Math.abs(2*s-1))*i,u=r/60,h=l*(1-Math.abs(u%2-1)),f=s-l/2;let p,m,v;return u>=0&&u<1?(p=l,m=h,v=0):u>=1&&u<2?(p=h,m=l,v=0):u>=2&&u<3?(p=0,m=l,v=h):u>=3&&u<4?(p=0,m=h,v=l):u>=4&&u<5?(p=h,m=0,v=l):(p=l,m=0,v=h),{r:Math.round((p+f)*255),g:Math.round((m+f)*255),b:Math.round((v+f)*255),a:o||1}}function XA(t){return XG(t)?KG(t):t.startsWith("rgb")?ZG(t):t.startsWith("hsl")?JG(t):{r:0,g:0,b:0,a:1}}function $y(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:i,a:s}=XA(t),o=1-e,l=u=>Math.round(u*o);return`rgba(${l(n)}, ${l(r)}, ${l(i)}, ${s})`}function Kg(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function Kj(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function eX(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function tX(t){if(t.startsWith("oklch("))return(eX(t)||0)/100;const{r:e,g:n,b:r}=XA(t),i=e/255,s=n/255,o=r/255,l=Kj(i),u=Kj(s),h=Kj(o);return .2126*l+.7152*u+.0722*h}function eg(t,e=.179){return t.startsWith("var(")?!1:tX(t)>e}function au({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:eg(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:eg(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:eg(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,i]=t.split("."),s=i?Number(i):void 0,o=r in e.colors;if(o){const l=s!==void 0?e.colors[r][s]:e.colors[r][Kg(e,n||"light")];return{color:r,value:l,shade:s,isThemeColor:o,isLight:eg(l,e.luminanceThreshold),variable:i?`--mantine-color-${r}-${s}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:o,isLight:eg(t,e.luminanceThreshold),shade:s,variable:void 0}}function hr(t,e){const n=au({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function h3(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)??e.defaultGradient.deg??0},r=hr(n.from,e),i=hr(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function kl(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const s=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${s}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:i}=XA(t);return`rgba(${n}, ${r}, ${i}, ${e})`}const dp=kl,nX=({color:t,theme:e,variant:n,gradient:r,autoContrast:i})=>{const s=au({color:t,theme:e}),o=typeof i=="boolean"?i:e.autoContrast;if(n==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(n==="filled"){const l=o&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?s.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:l,border:`${fe(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${s.shade===9?8:s.shade+1})`,color:l,border:`${fe(1)} solid transparent`}:{background:t,hover:$y(t,.1),color:l,border:`${fe(1)} solid transparent`}}if(n==="light"){if(s.isThemeColor){if(s.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`};const l=e.colors[s.color][s.shade];return{background:kl(l,.1),hover:kl(l,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${fe(1)} solid transparent`}}return{background:kl(t,.1),hover:kl(t,.12),color:t,border:`${fe(1)} solid transparent`}}if(n==="outline")return s.isThemeColor?s.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${fe(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:kl(e.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${fe(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:kl(t,.05),color:t,border:`${fe(1)} solid ${t}`};if(n==="subtle"){if(s.isThemeColor){if(s.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`};const l=e.colors[s.color][s.shade];return{background:"transparent",hover:kl(l,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${fe(1)} solid transparent`}}return{background:"transparent",hover:kl(t,.12),color:t,border:`${fe(1)} solid transparent`}}return n==="transparent"?s.isThemeColor?s.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${fe(1)} solid transparent`}:n==="white"?s.isThemeColor?s.shade===void 0?{background:"var(--mantine-color-white)",hover:$y(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:$y(e.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:$y(e.white,.01),color:t,border:`${fe(1)} solid transparent`}:n==="gradient"?{background:h3(r,e),hover:h3(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${fe(1)} solid var(--mantine-color-default-border)`}:{}},rX={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},N8="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Bk={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:rX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:nX,autoContrast:!1,luminanceThreshold:.3,fontFamily:N8,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:N8,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:fe(34),lineHeight:"1.3"},h2:{fontSize:fe(26),lineHeight:"1.35"},h3:{fontSize:fe(22),lineHeight:"1.4"},h4:{fontSize:fe(18),lineHeight:"1.45"},h5:{fontSize:fe(16),lineHeight:"1.5"},h6:{fontSize:fe(14),lineHeight:"1.5"}}},fontSizes:{xs:fe(12),sm:fe(14),md:fe(16),lg:fe(18),xl:fe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:fe(2),sm:fe(4),md:fe(8),lg:fe(16),xl:fe(32)},spacing:{xs:fe(10),sm:fe(12),md:fe(16),lg:fe(20),xl:fe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), 0 ${fe(1)} ${fe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(10)} ${fe(15)} ${fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${fe(7)} ${fe(7)} ${fe(-5)}`,md:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(20)} ${fe(25)} ${fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${fe(10)} ${fe(10)} ${fe(-5)}`,lg:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(28)} ${fe(23)} ${fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${fe(12)} ${fe(12)} ${fe(-7)}`,xl:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(36)} ${fe(28)} ${fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${fe(17)} ${fe(17)} ${fe(-7)}`},other:{},components:{}};function P8(t){return t==="auto"||t==="dark"||t==="light"}function iX({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return P8(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&P8(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const sX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",I8="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Zj(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function B8(t){if(!(t.primaryColor in t.colors))throw new Error(sX);if(typeof t.primaryShade=="object"&&(!Zj(t.primaryShade.dark)||!Zj(t.primaryShade.light)))throw new Error(I8);if(typeof t.primaryShade=="number"&&!Zj(t.primaryShade))throw new Error(I8)}function aX(t,e){var r;if(!e)return B8(t),t;const n=Dk(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),B8(n),n}const Lk=M.createContext(null),oX=()=>M.useContext(Lk)||Bk;function xi(){const t=M.useContext(Lk);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function J9({theme:t,children:e,inherit:n=!0}){const r=oX(),i=M.useMemo(()=>aX(n?r:Bk,t),[t,r,n]);return a.jsx(Lk.Provider,{value:i,children:e})}J9.displayName="@mantine/core/MantineThemeProvider";function lX(){const t=xi(),e=YA(),n=Zr(t.breakpoints).reduce((r,i)=>{const s=t.breakpoints[i].includes("px"),o=Xg(t.breakpoints[i]),l=s?`${o-.1}px`:Os(o-.1),u=s?`${o}px`:Os(o);return`${r}@media (max-width: ${l}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${u}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return a.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function Jj(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function eL(t,e){const n=e?[e]:[":root",":host"],r=Jj(t.variables),i=r?`${n.join(", ")}{${r}}`:"",s=Jj(t.dark),o=Jj(t.light),l=f=>n.map(p=>p===":host"?`${p}([data-mantine-color-scheme="${f}"])`:`${p}[data-mantine-color-scheme="${f}"]`).join(", "),u=s?`${l("dark")}{${s}}`:"",h=o?`${l("light")}{${o}}`:"";return`${i}

${u}

${h}`}function Yh({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&au({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function L8(t,e){return Yh({color:t.colors[t.primaryColor][Kg(t,e)],theme:t,autoContrast:null})}function Qy({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:i=!0}){if(!t.colors[e])return{};if(n==="light"){const l=Kg(t,"light"),u={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${l})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${l===9?8:l+1})`,[`--mantine-color-${r}-light`]:dp(t.colors[e][l],.1),[`--mantine-color-${r}-light-hover`]:dp(t.colors[e][l],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${l})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${l})`,[`--mantine-color-${r}-outline-hover`]:dp(t.colors[e][l],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...u}:u}const s=Kg(t,"dark"),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:dp(t.colors[e][Math.max(0,s-2)],.15),[`--mantine-color-${r}-light-hover`]:dp(t.colors[e][Math.max(0,s-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(s-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:dp(t.colors[e][Math.max(s-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...o}:o}function cX(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function fp(t,e,n){Zr(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const tL=t=>{const e=Kg(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:fe(t.defaultRadius),r={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":L8(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":L8(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};fp(r.variables,t.breakpoints,"breakpoint"),fp(r.variables,t.spacing,"spacing"),fp(r.variables,t.fontSizes,"font-size"),fp(r.variables,t.lineHeights,"line-height"),fp(r.variables,t.shadows,"shadow"),fp(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((s,o)=>{r.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${t.primaryColor}-${o})`}),Zr(t.colors).forEach(s=>{const o=t.colors[s];if(cX(o)){Object.assign(r.light,Qy({theme:t,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,Qy({theme:t,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,u)=>{r.variables[`--mantine-color-${s}-${u}`]=l}),Object.assign(r.light,Qy({theme:t,color:s,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,Qy({theme:t,color:s,colorScheme:"dark",withColorValues:!1}))});const i=t.headings.sizes;return Zr(i).forEach(s=>{r.variables[`--mantine-${s}-font-size`]=i[s].fontSize,r.variables[`--mantine-${s}-line-height`]=i[s].lineHeight,r.variables[`--mantine-${s}-font-weight`]=i[s].fontWeight||t.headings.fontWeight}),r};function uX({theme:t,generator:e}){const n=tL(t),r=e==null?void 0:e(t);return r?Dk(n,r):n}const eC=tL(Bk);function hX(t){const e={variables:{},light:{},dark:{}};return Zr(t.variables).forEach(n=>{eC.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),Zr(t.light).forEach(n=>{eC.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),Zr(t.dark).forEach(n=>{eC.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function dX(t){return eL({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function nL({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=xi(),r=YA(),i=QG(),s=uX({theme:n,generator:i}),o=(t===void 0||t===":root"||t===":host")&&e,l=o?hX(s):s,u=eL(l,t);return u?a.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${u}${o?"":dX(t)}`}}):null}nL.displayName="@mantine/CssVariables";function pp(t,e){var i,s;const n=typeof window<"u"&&"matchMedia"in window&&((i=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:i.matches),r=t!=="auto"?t:n?"dark":"light";(s=e())==null||s.setAttribute("data-mantine-color-scheme",r)}function fX({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const i=M.useRef(null),[s,o]=M.useState(()=>t.get(e)),l=r||s,u=M.useCallback(f=>{r||(pp(f,n),o(f),t.set(f))},[t.set,l,r]),h=M.useCallback(()=>{o(e),pp(e,n),t.clear()},[t.clear,e]);return M.useEffect(()=>(t.subscribe(u),t.unsubscribe),[t.subscribe,t.unsubscribe]),Cf(()=>{pp(t.get(e),n)},[]),M.useEffect(()=>{var p;if(r)return pp(r,n),()=>{};r===void 0&&pp(s,n),typeof window<"u"&&"matchMedia"in window&&(i.current=window.matchMedia("(prefers-color-scheme: dark)"));const f=m=>{s==="auto"&&pp(m.matches?"dark":"light",n)};return(p=i.current)==null||p.addEventListener("change",f),()=>{var m;return(m=i.current)==null?void 0:m.removeEventListener("change",f)}},[s,r]),{colorScheme:l,setColorScheme:u,clearColorScheme:h}}function pX({respectReducedMotion:t,getRootElement:e}){Cf(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}function rL({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:s=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:u="mantine",colorSchemeManager:h=iX(),defaultColorScheme:f="light",getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:v,stylesTransform:b,env:x}){const{colorScheme:w,setColorScheme:A,clearColorScheme:j}=fX({defaultColorScheme:f,forceColorScheme:v,manager:h,getRootElement:p});return pX({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:p}),a.jsx(Ik.Provider,{value:{colorScheme:w,setColorScheme:A,clearColorScheme:j,getRootElement:p,classNamesPrefix:u,getStyleNonce:n,cssVariablesResolver:m,cssVariablesSelector:l??":root",withStaticClasses:r,stylesTransform:b,env:x},children:a.jsxs(J9,{theme:t,children:[o&&a.jsx(nL,{cssVariablesSelector:l,deduplicateCssVariables:s}),i&&a.jsx(lX,{}),e]})})}rL.displayName="@mantine/core/MantineProvider";function bo({classNames:t,styles:e,props:n,stylesCtx:r}){const i=xi();return{resolvedClassNames:VA({theme:i,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:Ox({theme:i,styles:e,props:n,stylesCtx:r||void 0})}}const mX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function gX({theme:t,options:e,unstyled:n}){return Ir((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||mX[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function vX({selector:t,stylesCtx:e,options:n,props:r,theme:i}){return VA({theme:i,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function F8({selector:t,stylesCtx:e,theme:n,classNames:r,props:i}){return VA({theme:n,classNames:r,props:i,stylesCtx:e})[t]}function bX({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function yX({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function xX({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(i=>`${e}-${i}-${n}`)}function AX({themeName:t,theme:e,selector:n,props:r,stylesCtx:i}){return t.map(s=>{var o,l;return(l=VA({theme:e,classNames:(o=e.components[s])==null?void 0:o.classNames,props:r,stylesCtx:i}))==null?void 0:l[n]})}function wX({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function SX({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:i,classNames:s,classes:o,unstyled:l,className:u,rootSelector:h,props:f,stylesCtx:p,withStaticClasses:m,headless:v,transformedStyles:b}){return Ir(gX({theme:t,options:e,unstyled:l||v}),AX({theme:t,themeName:n,selector:r,props:f,stylesCtx:p}),wX({options:e,classes:o,selector:r,unstyled:l}),F8({selector:r,stylesCtx:p,theme:t,classNames:s,props:f}),F8({selector:r,stylesCtx:p,theme:t,classNames:b,props:f}),vX({selector:r,stylesCtx:p,options:e,props:f,theme:t}),bX({rootSelector:h,selector:r,className:u}),yX({selector:r,classes:o,unstyled:l||v}),m&&!v&&xX({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function jX({theme:t,themeName:e,props:n,stylesCtx:r,selector:i}){return e.map(s=>{var o;return Ox({theme:t,styles:(o=t.components[s])==null?void 0:o.styles,props:n,stylesCtx:r})[i]}).reduce((s,o)=>({...s,...o}),{})}function d3({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...d3({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function CX(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...$v(n[r])}}),e),{})}function _X({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:i,selector:s,themeName:o,headless:l}){var u;return(u=CX([l?{}:e==null?void 0:e(n,r,i),...o.map(h=>{var f,p,m;return(m=(p=(f=n.components)==null?void 0:f[h])==null?void 0:p.vars)==null?void 0:m.call(p,n,r,i)}),t==null?void 0:t(n,r,i)]))==null?void 0:u[s]}function TX({theme:t,themeName:e,selector:n,options:r,props:i,stylesCtx:s,rootSelector:o,styles:l,style:u,vars:h,varsResolver:f,headless:p,withStylesTransform:m}){return{...!m&&jX({theme:t,themeName:e,props:i,stylesCtx:s,selector:n}),...!m&&Ox({theme:t,styles:l,props:i,stylesCtx:s})[n],...!m&&Ox({theme:t,styles:r==null?void 0:r.styles,props:(r==null?void 0:r.props)||i,stylesCtx:s})[n],..._X({theme:t,props:i,stylesCtx:s,vars:h,varsResolver:f,selector:n,themeName:e,headless:p}),...o===n?d3({style:u,theme:t}):null,...d3({style:r==null?void 0:r.style,theme:t})}}function kX({props:t,stylesCtx:e,themeName:n}){var o;const r=xi(),i=(o=GG())==null?void 0:o();return{getTransformedStyles:l=>i?[...l.map(h=>i(h,{props:t,theme:r,ctx:e})),...n.map(h=>{var f;return i((f=r.components[h])==null?void 0:f.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!i}}function lt({name:t,classes:e,props:n,stylesCtx:r,className:i,style:s,rootSelector:o="root",unstyled:l,classNames:u,styles:h,vars:f,varsResolver:p,attributes:m}){const v=xi(),b=UG(),x=WG(),w=VG(),A=(Array.isArray(t)?t:[t]).filter(_=>_),{withStylesTransform:j,getTransformedStyles:C}=kX({props:n,stylesCtx:r,themeName:A});return(_,S)=>({className:SX({theme:v,options:S,themeName:A,selector:_,classNamesPrefix:b,classNames:u,classes:e,unstyled:l,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:x,headless:w,transformedStyles:C([S==null?void 0:S.styles,h])}),style:TX({theme:v,themeName:A,selector:_,options:S,props:n,stylesCtx:r,rootSelector:o,styles:h,style:s,vars:f,varsResolver:p,headless:w,withStylesTransform:j}),...m==null?void 0:m[_]})}function iL(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, white ${e*100}%)`;const{r:n,g:r,b:i,a:s}=XA(t),o=l=>Math.round(l+(255-l)*e);return`rgba(${o(n)}, ${o(r)}, ${o(i)}, ${s})`}function zm(t,e){return typeof t=="boolean"?t:e.autoContrast}function H8(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function sL({keepTransitions:t}={}){const e=M.useRef(_x),n=M.useRef(-1),r=M.useContext(Ik),i=YA(),s=M.useRef(i==null?void 0:i());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const o=p=>{r.setColorScheme(p),e.current=t?()=>{}:H8(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var m;(m=e.current)==null||m.call(e)},10)},l=()=>{r.clearColorScheme(),e.current=t?()=>{}:H8(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var p;(p=e.current)==null||p.call(e)},10)},u=W9("light",{getInitialValueInEffect:!1}),h=r.colorScheme==="auto"?u:r.colorScheme,f=M.useCallback(()=>o(h==="light"?"dark":"light"),[o,h]);return M.useEffect(()=>()=>{var p;(p=e.current)==null||p.call(e),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:o,clearColorScheme:l,toggleColorScheme:f}}function KA(t,e={getInitialValueInEffect:!0}){const n=W9(t,e),{colorScheme:r}=sL();return r==="auto"?n:r}function we(t,e,n){var o;const r=xi(),i=(o=r.components[t])==null?void 0:o.defaultProps,s=typeof i=="function"?i(r):i;return{...e,...s,...$v(n)}}function tC(t){return Zr(t).reduce((e,n)=>t[n]!==void 0?`${e}${nG(n)}:${t[n]};`:e,"").trim()}function OX({selector:t,styles:e,media:n,container:r}){const i=e?tC(e):"",s=Array.isArray(n)?n.map(l=>`@media${l.query}{${t}{${tC(l.styles)}}}`):[],o=Array.isArray(r)?r.map(l=>`@container ${l.query}{${t}{${tC(l.styles)}}}`):[];return`${i?`${t}{${i}}`:""}${s.join("")}${o.join("")}`.trim()}function ZA(t){const e=YA();return a.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:OX(t)}})}function Vv(t){const{m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:l,me:u,ms:h,p:f,px:p,py:m,pt:v,pb:b,pl:x,pr:w,pe:A,ps:j,bd:C,bdrs:_,bg:S,c:O,opacity:E,ff:D,fz:N,fw:I,lts:R,ta:L,lh:Q,fs:z,tt:H,td:P,w:F,miw:U,maw:Z,h:G,mih:W,mah:X,bgsz:V,bgp:te,bgr:le,bga:be,pos:ye,top:Xe,left:ze,bottom:Re,right:ae,inset:je,display:pe,flex:ke,hiddenFrom:gt,visibleFrom:We,lightHidden:Le,darkHidden:Fe,sx:Ne,...Ve}=t;return{styleProps:$v({m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:l,me:u,ms:h,p:f,px:p,py:m,pt:v,pb:b,pl:x,pr:w,pe:A,ps:j,bd:C,bg:S,c:O,opacity:E,ff:D,fz:N,fw:I,lts:R,ta:L,lh:Q,fs:z,tt:H,td:P,w:F,miw:U,maw:Z,h:G,mih:W,mah:X,bgsz:V,bgp:te,bgr:le,bga:be,pos:ye,top:Xe,left:ze,bottom:Re,right:ae,inset:je,display:pe,flex:ke,bdrs:_,hiddenFrom:gt,visibleFrom:We,lightHidden:Le,darkHidden:Fe,sx:Ne}),rest:Ve}}const EX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Fk(t,e){const n=au({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function MX(t,e){const n=au({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Fk(t,e)}function DX(t,e){if(typeof t=="number")return fe(t);if(typeof t=="string"){const[n,r,...i]=t.split(" ").filter(o=>o.trim()!=="");let s=`${fe(n)}`;return r&&(s+=` ${r}`),i.length>0&&(s+=` ${Fk(i.join(" "),e)}`),s.trim()}return t}const z8={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function RX(t){return typeof t=="string"&&t in z8?z8[t]:t}const NX=["h1","h2","h3","h4","h5","h6"];function PX(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&NX.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?fe(t):t}function IX(t){return t}const BX=["h1","h2","h3","h4","h5","h6"];function LX(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&BX.includes(t)?`var(--mantine-${t}-line-height)`:t}function FX(t,e){return typeof t=="string"&&t in e.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?fe(t):t}function HX(t){return typeof t=="number"?fe(t):t}function zX(t,e){if(typeof t=="number")return fe(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return fe(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const nC={color:Fk,textColor:MX,fontSize:PX,spacing:zX,radius:FX,identity:IX,size:HX,lineHeight:LX,fontFamily:RX,border:DX};function q8(t){return t.replace("(min-width: ","").replace("em)","")}function qX({media:t,...e}){const r=Object.keys(t).sort((i,s)=>Number(q8(i))-Number(q8(s))).map(i=>({query:i,styles:t[i]}));return{...e,media:r}}function $X(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function QX(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function UX(t){return typeof t=="object"&&t!==null?Zr(t).filter(e=>e!=="base"):[]}function WX(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function VX({styleProps:t,data:e,theme:n}){return qX(Zr(t).reduce((r,i)=>{if(i==="hiddenFrom"||i==="visibleFrom"||i==="sx")return r;const s=e[i],o=Array.isArray(s.property)?s.property:[s.property],l=QX(t[i]);if(!$X(t[i]))return o.forEach(h=>{r.inlineStyles[h]=nC[s.type](l,n)}),r;r.hasResponsiveStyles=!0;const u=UX(t[i]);return o.forEach(h=>{l!=null&&(r.styles[h]=nC[s.type](l,n)),u.forEach(f=>{const p=`(min-width: ${n.breakpoints[f]})`;r.media[p]={...r.media[p],[h]:nC[s.type](WX(t[i],f),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function aL(){return`__m__-${M.useId().replace(/[:«»]/g,"")}`}function Hk(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...Hk(r,e)}),{}):typeof t=="function"?t(e):t??{}}function oL(t){return t.startsWith("data-")?t:`data-${t}`}function YX(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[oL(n)]=t[n]),e},{})}function lL(t){return t?typeof t=="string"?{[oL(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...lL(n)}),{}):YX(t):null}function f3(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...f3(r,e)}),{}):typeof t=="function"?t(e):t??{}}function GX({theme:t,style:e,vars:n,styleProps:r}){const i=f3(e,t),s=f3(n,t);return{...i,...s,...r}}const cL=M.forwardRef(({component:t,style:e,__vars:n,className:r,variant:i,mod:s,size:o,hiddenFrom:l,visibleFrom:u,lightHidden:h,darkHidden:f,renderRoot:p,__size:m,...v},b)=>{var D;const x=xi(),w=t||"div",{styleProps:A,rest:j}=Vv(v),C=YG(),_=(D=C==null?void 0:C())==null?void 0:D(A.sx),S=aL(),O=VX({styleProps:A,theme:x,data:EX}),E={ref:b,style:GX({theme:x,style:e,vars:n,styleProps:O.inlineStyles}),className:Ir(r,_,{[S]:O.hasResponsiveStyles,"mantine-light-hidden":h,"mantine-dark-hidden":f,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${u}`]:u}),"data-variant":i,"data-size":q9(o)?void 0:o||void 0,size:m,...lL(s),...j};return a.jsxs(a.Fragment,{children:[O.hasResponsiveStyles&&a.jsx(ZA,{selector:`.${S}`,styles:O.styles,media:O.media}),typeof p=="function"?p(E):a.jsx(w,{...E})]})});cL.displayName="@mantine/core/Box";const ve=cL;function uL(t){return t}function hL(t){const e=t;return n=>{const r=M.forwardRef((i,s)=>a.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r}}function Oe(t){const e=M.forwardRef(t);return e.extend=uL,e.withProps=n=>{const r=M.forwardRef((i,s)=>a.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function Vi(t){const e=M.forwardRef(t);return e.withProps=n=>{const r=M.forwardRef((i,s)=>a.jsx(e,{...n,...i,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=uL,e}const XX=M.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Tf(){return M.useContext(XX)}var JA=R9();const xg=ll(JA);function KX(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function rC(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const tg=typeof window<"u"&&window.requestAnimationFrame,$8=0,ZX=t=>({height:0,overflow:"hidden",...t?{}:{display:"none"}});function JX({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r,keepMounted:i=!1}){const s=M.useRef(null),o=ZX(i),[l,u]=M.useState(r?{}:o),h=b=>{JA.flushSync(()=>u(b))},f=b=>{h(x=>({...x,...b}))};function p(b){const x=t||KX(b);return{transition:`height ${x}ms ${e}, opacity ${x}ms ${e}`}}Gl(()=>{typeof tg=="function"&&tg(r?()=>{f({willChange:"height",display:"block",overflow:"hidden"}),tg(()=>{const b=rC(s);f({...p(b),height:b})})}:()=>{const b=rC(s);f({...p(b),willChange:"height",height:b}),tg(()=>f({height:$8,overflow:"hidden"}))})},[r]);const m=b=>{if(!(b.target!==s.current||b.propertyName!=="height"))if(r){const x=rC(s);x===l.height?h({}):f({height:x}),n()}else l.height===$8&&(h(o),n())};function v({style:b={},refKey:x="ref",...w}={}){const A=w[x],j={"aria-hidden":!r,...w,[x]:K9(s,A),onTransitionEnd:m,style:{boxSizing:"border-box",...b,...l}};return Cn.version.startsWith("18")?r||(j.inert=""):j.inert=!r,j}return v}const eK={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},ew=Oe((t,e)=>{const{children:n,in:r,transitionDuration:i,transitionTimingFunction:s,style:o,onTransitionEnd:l,animateOpacity:u,keepMounted:h,...f}=we("Collapse",eK,t),p=xi(),m=UA(),b=(p.respectReducedMotion?m:!1)?0:i,x=JX({opened:r,transitionDuration:b,transitionTimingFunction:s,onTransitionEnd:l,keepMounted:h});return b===0?r?a.jsx(ve,{...f,children:n}):null:a.jsx(ve,{...x({style:{opacity:r||!u?1:0,transition:u?`opacity ${b}ms ${s}`:"none",...Hk(o,p)},ref:e,...f}),children:n})});ew.displayName="@mantine/core/Collapse";function tw(){return typeof window<"u"}function qm(t){return dL(t)?(t.nodeName||"").toLowerCase():"#document"}function ca(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Jl(t){var e;return(e=(dL(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function dL(t){return tw()?t instanceof Node||t instanceof ca(t).Node:!1}function _r(t){return tw()?t instanceof Element||t instanceof ca(t).Element:!1}function yo(t){return tw()?t instanceof HTMLElement||t instanceof ca(t).HTMLElement:!1}function p3(t){return!tw()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ca(t).ShadowRoot}function Yv(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=mo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&i!=="inline"&&i!=="contents"}function tK(t){return/^(table|td|th)$/.test(qm(t))}function nw(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const nK=/transform|translate|scale|rotate|perspective|filter/,rK=/paint|layout|strict|content/,Cd=t=>!!t&&t!=="none";let iC;function zk(t){const e=_r(t)?mo(t):t;return Cd(e.transform)||Cd(e.translate)||Cd(e.scale)||Cd(e.rotate)||Cd(e.perspective)||!rw()&&(Cd(e.backdropFilter)||Cd(e.filter))||nK.test(e.willChange||"")||rK.test(e.contain||"")}function iK(t){let e=Zc(t);for(;yo(e)&&!Vc(e);){if(zk(e))return e;if(nw(e))return null;e=Zc(e)}return null}function rw(){return iC==null&&(iC=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),iC}function Vc(t){return/^(html|body|#document)$/.test(qm(t))}function mo(t){return ca(t).getComputedStyle(t)}function iw(t){return _r(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Zc(t){if(qm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||p3(t)&&t.host||Jl(t);return p3(e)?e.host:e}function fL(t){const e=Zc(t);return Vc(e)?t.ownerDocument?t.ownerDocument.body:t.body:yo(e)&&Yv(e)?e:fL(e)}function Yc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=fL(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ca(i);if(s){const l=m3(o);return e.concat(o,o.visualViewport||[],Yv(i)?i:[],l&&n?Yc(l):[])}else return e.concat(i,Yc(i,[],n))}function m3(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const sK=["top","right","bottom","left"],rl=Math.min,Cs=Math.max,Ex=Math.round,Uy=Math.floor,Ql=t=>({x:t,y:t}),aK={left:"right",right:"left",bottom:"top",top:"bottom"};function g3(t,e,n){return Cs(t,rl(e,n))}function Xl(t,e){return typeof t=="function"?t(e):t}function il(t){return t.split("-")[0]}function $m(t){return t.split("-")[1]}function qk(t){return t==="x"?"y":"x"}function $k(t){return t==="y"?"height":"width"}function Ko(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Qk(t){return qk(Ko(t))}function oK(t,e,n){n===void 0&&(n=!1);const r=$m(t),i=Qk(t),s=$k(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Mx(o)),[o,Mx(o)]}function lK(t){const e=Mx(t);return[v3(t),e,v3(e)]}function v3(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Q8=["left","right"],U8=["right","left"],cK=["top","bottom"],uK=["bottom","top"];function hK(t,e,n){switch(t){case"top":case"bottom":return n?e?U8:Q8:e?Q8:U8;case"left":case"right":return e?cK:uK;default:return[]}}function dK(t,e,n,r){const i=$m(t);let s=hK(il(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(v3)))),s}function Mx(t){const e=il(t);return aK[e]+t.slice(e.length)}function fK(t){return{top:0,right:0,bottom:0,left:0,...t}}function Uk(t){return typeof t!="number"?fK(t):{top:t,right:t,bottom:t,left:t}}function ym(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function pK(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function mK(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function gK(){return/apple/i.test(navigator.vendor)}function vK(){return pK().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function bK(){return mK().includes("jsdom/")}const W8="data-floating-ui-focusable",yK="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function V8(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function Zg(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&p3(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function xp(t){return"composedPath"in t?t.composedPath()[0]:t.target}function sC(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function xK(t){return t.matches("html,body")}function Hd(t){return(t==null?void 0:t.ownerDocument)||document}function AK(t){return yo(t)&&t.matches(yK)}function wK(t){if(!t||bK())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function SK(t){return t?t.hasAttribute(W8)?t:t.querySelector("["+W8+"]")||t:null}function $1(t,e,n){return n===void 0&&(n=!0),t.filter(i=>{var s;return i.parentId===e&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,...$1(t,i.id,n)])}function jK(t){return"nativeEvent"in t}function b3(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}var CK=typeof document<"u",_K=function(){},Ul=CK?M.useLayoutEffect:_K;const TK={...D9};function Wy(t){const e=M.useRef(t);return Ul(()=>{e.current=t}),e}const kK=TK.useInsertionEffect,OK=kK||(t=>t());function Nl(t){const e=M.useRef(()=>{});return OK(()=>{e.current=t}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function Y8(t,e,n){let{reference:r,floating:i}=t;const s=Ko(e),o=Qk(e),l=$k(o),u=il(e),h=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let v;switch(u){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}switch($m(e)){case"start":v[o]-=m*(n&&h?-1:1);break;case"end":v[o]+=m*(n&&h?-1:1);break}return v}async function EK(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=Xl(e,t),b=Uk(v),w=l[m?p==="floating"?"reference":"floating":p],A=ym(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:h,rootBoundary:f,strategy:u})),j=p==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),_=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},S=ym(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:j,offsetParent:C,strategy:u}):j);return{top:(A.top-S.top+b.top)/_.y,bottom:(S.bottom-A.bottom+b.bottom)/_.y,left:(A.left-S.left+b.left)/_.x,right:(S.right-A.right+b.right)/_.x}}const MK=50,DK=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:EK},u=await(o.isRTL==null?void 0:o.isRTL(e));let h=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=Y8(h,r,u),m=r,v=0;const b={};for(let x=0;x<s.length;x++){const w=s[x];if(!w)continue;const{name:A,fn:j}=w,{x:C,y:_,data:S,reset:O}=await j({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:b,rects:h,platform:l,elements:{reference:t,floating:e}});f=C??f,p=_??p,b[A]={...b[A],...S},O&&v<MK&&(v++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(h=O.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:f,y:p}=Y8(h,m,u)),x=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:b}},RK=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:u}=e,{element:h,padding:f=0}=Xl(t,e)||{};if(h==null)return{};const p=Uk(f),m={x:n,y:r},v=Qk(i),b=$k(v),x=await o.getDimensions(h),w=v==="y",A=w?"top":"left",j=w?"bottom":"right",C=w?"clientHeight":"clientWidth",_=s.reference[b]+s.reference[v]-m[v]-s.floating[b],S=m[v]-s.reference[v],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let E=O?O[C]:0;(!E||!await(o.isElement==null?void 0:o.isElement(O)))&&(E=l.floating[C]||s.floating[b]);const D=_/2-S/2,N=E/2-x[b]/2-1,I=rl(p[A],N),R=rl(p[j],N),L=I,Q=E-x[b]-R,z=E/2-x[b]/2+D,H=g3(L,z,Q),P=!u.arrow&&$m(i)!=null&&z!==H&&s.reference[b]/2-(z<L?I:R)-x[b]/2<0,F=P?z<L?z-L:z-Q:0;return{[v]:m[v]+F,data:{[v]:H,centerOffset:z-H-F,...P&&{alignmentOffset:F}},reset:P}}}),NK=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:u,elements:h}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...w}=Xl(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const A=il(i),j=Ko(l),C=il(l)===l,_=await(u.isRTL==null?void 0:u.isRTL(h.floating)),S=m||(C||!x?[Mx(l)]:lK(l)),O=b!=="none";!m&&O&&S.push(...dK(l,x,b,_));const E=[l,...S],D=await u.detectOverflow(e,w),N=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&N.push(D[A]),p){const z=oK(i,o,_);N.push(D[z[0]],D[z[1]])}if(I=[...I,{placement:i,overflows:N}],!N.every(z=>z<=0)){var R,L;const z=(((R=s.flip)==null?void 0:R.index)||0)+1,H=E[z];if(H&&(!(p==="alignment"?j!==Ko(H):!1)||I.every(U=>Ko(U.placement)===j?U.overflows[0]>0:!0)))return{data:{index:z,overflows:I},reset:{placement:H}};let P=(L=I.filter(F=>F.overflows[0]<=0).sort((F,U)=>F.overflows[1]-U.overflows[1])[0])==null?void 0:L.placement;if(!P)switch(v){case"bestFit":{var Q;const F=(Q=I.filter(U=>{if(O){const Z=Ko(U.placement);return Z===j||Z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Z=>Z>0).reduce((Z,G)=>Z+G,0)]).sort((U,Z)=>U[1]-Z[1])[0])==null?void 0:Q[0];F&&(P=F);break}case"initialPlacement":P=l;break}if(i!==P)return{reset:{placement:P}}}return{}}}};function G8(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function X8(t){return sK.some(e=>t[e]>=0)}const PK=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=Xl(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),l=G8(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:X8(l)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),l=G8(o,n.floating);return{data:{escapedOffsets:l,escaped:X8(l)}}}default:return{}}}}};function pL(t){const e=rl(...t.map(s=>s.left)),n=rl(...t.map(s=>s.top)),r=Cs(...t.map(s=>s.right)),i=Cs(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function IK(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>ym(pL(i)))}const BK=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:s,strategy:o}=e,{padding:l=2,x:u,y:h}=Xl(t,e),f=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),p=IK(f),m=ym(pL(f)),v=Uk(l);function b(){if(p.length===2&&p[0].left>p[1].right&&u!=null&&h!=null)return p.find(w=>u>w.left-v.left&&u<w.right+v.right&&h>w.top-v.top&&h<w.bottom+v.bottom)||m;if(p.length>=2){if(Ko(n)==="y"){const I=p[0],R=p[p.length-1],L=il(n)==="top",Q=I.top,z=R.bottom,H=L?I.left:R.left,P=L?I.right:R.right,F=P-H,U=z-Q;return{top:Q,bottom:z,left:H,right:P,width:F,height:U,x:H,y:Q}}const w=il(n)==="left",A=Cs(...p.map(I=>I.right)),j=rl(...p.map(I=>I.left)),C=p.filter(I=>w?I.left===j:I.right===A),_=C[0].top,S=C[C.length-1].bottom,O=j,E=A,D=E-O,N=S-_;return{top:_,bottom:S,left:O,right:E,width:D,height:N,x:O,y:_}}return m}const x=await s.getElementRects({reference:{getBoundingClientRect:b},floating:r.floating,strategy:o});return i.reference.x!==x.reference.x||i.reference.y!==x.reference.y||i.reference.width!==x.reference.width||i.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},mL=new Set(["left","top"]);async function LK(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=il(n),l=$m(n),u=Ko(n)==="y",h=mL.has(o)?-1:1,f=s&&u?-1:1,p=Xl(e,t);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),u?{x:v*f,y:m*h}:{x:m*h,y:v*f}}const FK=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:l}=e,u=await LK(e,t);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:o}}}}},HK=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:j,y:C}=A;return{x:j,y:C}}},...h}=Xl(t,e),f={x:n,y:r},p=await s.detectOverflow(e,h),m=Ko(il(i)),v=qk(m);let b=f[v],x=f[m];if(o){const A=v==="y"?"top":"left",j=v==="y"?"bottom":"right",C=b+p[A],_=b-p[j];b=g3(C,b,_)}if(l){const A=m==="y"?"top":"left",j=m==="y"?"bottom":"right",C=x+p[A],_=x-p[j];x=g3(C,x,_)}const w=u.fn({...e,[v]:b,[m]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[v]:o,[m]:l}}}}}},zK=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:h=!0}=Xl(t,e),f={x:n,y:r},p=Ko(i),m=qk(p);let v=f[m],b=f[p];const x=Xl(l,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const C=m==="y"?"height":"width",_=s.reference[m]-s.floating[C]+w.mainAxis,S=s.reference[m]+s.reference[C]-w.mainAxis;v<_?v=_:v>S&&(v=S)}if(h){var A,j;const C=m==="y"?"width":"height",_=mL.has(il(i)),S=s.reference[p]-s.floating[C]+(_&&((A=o.offset)==null?void 0:A[p])||0)+(_?0:w.crossAxis),O=s.reference[p]+s.reference[C]+(_?0:((j=o.offset)==null?void 0:j[p])||0)-(_?w.crossAxis:0);b<S?b=S:b>O&&(b=O)}return{[m]:v,[p]:b}}}},qK=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...h}=Xl(t,e),f=await o.detectOverflow(e,h),p=il(i),m=$m(i),v=Ko(i)==="y",{width:b,height:x}=s.floating;let w,A;p==="top"||p==="bottom"?(w=p,A=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(A=p,w=m==="end"?"top":"bottom");const j=x-f.top-f.bottom,C=b-f.left-f.right,_=rl(x-f[w],j),S=rl(b-f[A],C),O=!e.middlewareData.shift;let E=_,D=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=j),O&&!m){const I=Cs(f.left,0),R=Cs(f.right,0),L=Cs(f.top,0),Q=Cs(f.bottom,0);v?D=b-2*(I!==0||R!==0?I+R:Cs(f.left,f.right)):E=x-2*(L!==0||Q!==0?L+Q:Cs(f.top,f.bottom))}await u({...e,availableWidth:D,availableHeight:E});const N=await o.getDimensions(l.floating);return b!==N.width||x!==N.height?{reset:{rects:!0}}:{}}}};function gL(t){const e=mo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=yo(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=Ex(n)!==s||Ex(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function Wk(t){return _r(t)?t:t.contextElement}function Bp(t){const e=Wk(t);if(!yo(e))return Ql(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=gL(e);let o=(s?Ex(n.width):n.width)/r,l=(s?Ex(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const $K=Ql(0);function vL(t){const e=ca(t);return!rw()||!e.visualViewport?$K:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QK(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ca(t)?!1:e}function mf(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Wk(t);let o=Ql(1);e&&(r?_r(r)&&(o=Bp(r)):o=Bp(t));const l=QK(s,n,r)?vL(s):Ql(0);let u=(i.left+l.x)/o.x,h=(i.top+l.y)/o.y,f=i.width/o.x,p=i.height/o.y;if(s){const m=ca(s),v=r&&_r(r)?ca(r):r;let b=m,x=m3(b);for(;x&&r&&v!==b;){const w=Bp(x),A=x.getBoundingClientRect(),j=mo(x),C=A.left+(x.clientLeft+parseFloat(j.paddingLeft))*w.x,_=A.top+(x.clientTop+parseFloat(j.paddingTop))*w.y;u*=w.x,h*=w.y,f*=w.x,p*=w.y,u+=C,h+=_,b=ca(x),x=m3(b)}}return ym({width:f,height:p,x:u,y:h})}function sw(t,e){const n=iw(t).scrollLeft;return e?e.left+n:mf(Jl(t)).left+n}function bL(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-sw(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function UK(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Jl(r),l=e?nw(e.floating):!1;if(r===o||l&&s)return n;let u={scrollLeft:0,scrollTop:0},h=Ql(1);const f=Ql(0),p=yo(r);if((p||!p&&!s)&&((qm(r)!=="body"||Yv(o))&&(u=iw(r)),p)){const v=mf(r);h=Bp(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=o&&!p&&!s?bL(o,u):Ql(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+f.x+m.x,y:n.y*h.y-u.scrollTop*h.y+f.y+m.y}}function WK(t){return Array.from(t.getClientRects())}function VK(t){const e=Jl(t),n=iw(t),r=t.ownerDocument.body,i=Cs(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Cs(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sw(t);const l=-n.scrollTop;return mo(r).direction==="rtl"&&(o+=Cs(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const K8=25;function YK(t,e){const n=ca(t),r=Jl(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;const f=rw();(!f||f&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const h=sw(r);if(h<=0){const f=r.ownerDocument,p=f.body,m=getComputedStyle(p),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-v);b<=K8&&(s-=b)}else h<=K8&&(s+=h);return{width:s,height:o,x:l,y:u}}function GK(t,e){const n=mf(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=yo(t)?Bp(t):Ql(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,h=r*s.y;return{width:o,height:l,x:u,y:h}}function Z8(t,e,n){let r;if(e==="viewport")r=YK(t,n);else if(e==="document")r=VK(Jl(t));else if(_r(e))r=GK(e,n);else{const i=vL(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ym(r)}function yL(t,e){const n=Zc(t);return n===e||!_r(n)||Vc(n)?!1:mo(n).position==="fixed"||yL(n,e)}function XK(t,e){const n=e.get(t);if(n)return n;let r=Yc(t,[],!1).filter(l=>_r(l)&&qm(l)!=="body"),i=null;const s=mo(t).position==="fixed";let o=s?Zc(t):t;for(;_r(o)&&!Vc(o);){const l=mo(o),u=zk(o);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Yv(o)&&!u&&yL(t,o))?r=r.filter(f=>f!==o):i=l,o=Zc(o)}return e.set(t,r),r}function KK(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?nw(e)?[]:XK(e,this._c):[].concat(n),r],l=Z8(e,o[0],i);let u=l.top,h=l.right,f=l.bottom,p=l.left;for(let m=1;m<o.length;m++){const v=Z8(e,o[m],i);u=Cs(v.top,u),h=rl(v.right,h),f=rl(v.bottom,f),p=Cs(v.left,p)}return{width:h-p,height:f-u,x:p,y:u}}function ZK(t){const{width:e,height:n}=gL(t);return{width:e,height:n}}function JK(t,e,n){const r=yo(e),i=Jl(e),s=n==="fixed",o=mf(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Ql(0);function h(){u.x=sw(i)}if(r||!r&&!s)if((qm(e)!=="body"||Yv(i))&&(l=iw(e)),r){const v=mf(e,!0,s,e);u.x=v.x+e.clientLeft,u.y=v.y+e.clientTop}else i&&h();s&&!r&&i&&h();const f=i&&!r&&!s?bL(i,l):Ql(0),p=o.left+l.scrollLeft-u.x-f.x,m=o.top+l.scrollTop-u.y-f.y;return{x:p,y:m,width:o.width,height:o.height}}function aC(t){return mo(t).position==="static"}function J8(t,e){if(!yo(t)||mo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Jl(t)===n&&(n=n.ownerDocument.body),n}function xL(t,e){const n=ca(t);if(nw(t))return n;if(!yo(t)){let i=Zc(t);for(;i&&!Vc(i);){if(_r(i)&&!aC(i))return i;i=Zc(i)}return n}let r=J8(t,e);for(;r&&tK(r)&&aC(r);)r=J8(r,e);return r&&Vc(r)&&aC(r)&&!zk(r)?n:r||iK(t)||n}const eZ=async function(t){const e=this.getOffsetParent||xL,n=this.getDimensions,r=await n(t.floating);return{reference:JK(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tZ(t){return mo(t).direction==="rtl"}const nZ={convertOffsetParentRelativeRectToViewportRelativeRect:UK,getDocumentElement:Jl,getClippingRect:KK,getOffsetParent:xL,getElementRects:eZ,getClientRects:WK,getDimensions:ZK,getScale:Bp,isElement:_r,isRTL:tZ};function AL(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function rZ(t,e){let n=null,r;const i=Jl(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const h=t.getBoundingClientRect(),{left:f,top:p,width:m,height:v}=h;if(l||e(),!m||!v)return;const b=Uy(p),x=Uy(i.clientWidth-(f+m)),w=Uy(i.clientHeight-(p+v)),A=Uy(f),C={rootMargin:-b+"px "+-x+"px "+-w+"px "+-A+"px",threshold:Cs(0,rl(1,u))||1};let _=!0;function S(O){const E=O[0].intersectionRatio;if(E!==u){if(!_)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!AL(h,t.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(t)}return o(!0),s}function y3(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Wk(t),f=i||s?[...h?Yc(h):[],...e?Yc(e):[]]:[];f.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),s&&A.addEventListener("resize",n)});const p=h&&l?rZ(h,n):null;let m=-1,v=null;o&&(v=new ResizeObserver(A=>{let[j]=A;j&&j.target===h&&v&&e&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(e)})),n()}),h&&!u&&v.observe(h),e&&v.observe(e));let b,x=u?mf(t):null;u&&w();function w(){const A=mf(t);x&&!AL(x,A)&&n(),x=A,b=requestAnimationFrame(w)}return n(),()=>{var A;f.forEach(j=>{i&&j.removeEventListener("scroll",n),s&&j.removeEventListener("resize",n)}),p==null||p(),(A=v)==null||A.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const wL=FK,SL=HK,jL=NK,iZ=qK,sZ=PK,eR=RK,aZ=BK,oZ=zK,CL=(t,e,n)=>{const r=new Map,i={platform:nZ,...n},s={...i.platform,_c:r};return DK(t,e,{...i,platform:s})};var lZ=typeof document<"u",cZ=function(){},Q1=lZ?M.useLayoutEffect:cZ;function Dx(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Dx(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!Dx(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function _L(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function tR(t,e){const n=_L(t);return Math.round(e*n)/n}function oC(t){const e=M.useRef(t);return Q1(()=>{e.current=t}),e}function uZ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:u,open:h}=t,[f,p]=M.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=M.useState(r);Dx(m,r)||v(r);const[b,x]=M.useState(null),[w,A]=M.useState(null),j=M.useCallback(U=>{U!==O.current&&(O.current=U,x(U))},[]),C=M.useCallback(U=>{U!==E.current&&(E.current=U,A(U))},[]),_=s||b,S=o||w,O=M.useRef(null),E=M.useRef(null),D=M.useRef(f),N=u!=null,I=oC(u),R=oC(i),L=oC(h),Q=M.useCallback(()=>{if(!O.current||!E.current)return;const U={placement:e,strategy:n,middleware:m};R.current&&(U.platform=R.current),CL(O.current,E.current,U).then(Z=>{const G={...Z,isPositioned:L.current!==!1};z.current&&!Dx(D.current,G)&&(D.current=G,JA.flushSync(()=>{p(G)}))})},[m,e,n,R,L]);Q1(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(U=>({...U,isPositioned:!1})))},[h]);const z=M.useRef(!1);Q1(()=>(z.current=!0,()=>{z.current=!1}),[]),Q1(()=>{if(_&&(O.current=_),S&&(E.current=S),_&&S){if(I.current)return I.current(_,S,Q);Q()}},[_,S,Q,I,N]);const H=M.useMemo(()=>({reference:O,floating:E,setReference:j,setFloating:C}),[j,C]),P=M.useMemo(()=>({reference:_,floating:S}),[_,S]),F=M.useMemo(()=>{const U={position:n,left:0,top:0};if(!P.floating)return U;const Z=tR(P.floating,f.x),G=tR(P.floating,f.y);return l?{...U,transform:"translate("+Z+"px, "+G+"px)",..._L(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:G}},[n,l,P.floating,f.x,f.y]);return M.useMemo(()=>({...f,update:Q,refs:H,elements:P,floatingStyles:F}),[f,Q,H,P,F])}const hZ=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?eR({element:r.current,padding:i}).fn(n):{}:r?eR({element:r,padding:i}).fn(n):{}}}},TL=(t,e)=>({...wL(t),options:[t,e]}),Vk=(t,e)=>({...SL(t),options:[t,e]}),nR=(t,e)=>({...oZ(t),options:[t,e]}),Rx=(t,e)=>({...jL(t),options:[t,e]}),dZ=(t,e)=>({...iZ(t),options:[t,e]}),fZ=(t,e)=>({...sZ(t),options:[t,e]}),Ig=(t,e)=>({...aZ(t),options:[t,e]}),kL=(t,e)=>({...hZ(t),options:[t,e]});function OL(t){const e=M.useRef(void 0),n=M.useCallback(r=>{const i=t.map(s=>{if(s!=null){if(typeof s=="function"){const o=s,l=o(r);return typeof l=="function"?l:()=>{o(null)}}return s.current=r,()=>{s.current=null}}});return()=>{i.forEach(s=>s==null?void 0:s())}},t);return M.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const pZ="data-floating-ui-focusable",rR="active",iR="selected",mZ={...D9};let sR=!1,gZ=0;const aR=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+gZ++;function vZ(){const[t,e]=M.useState(()=>sR?aR():void 0);return Ul(()=>{t==null&&e(aR())},[]),M.useEffect(()=>{sR=!0},[]),t}const bZ=mZ.useId,EL=bZ||vZ;function yZ(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const xZ=M.createContext(null),AZ=M.createContext(null),Yk=()=>{var t;return((t=M.useContext(xZ))==null?void 0:t.id)||null},Gk=()=>M.useContext(AZ);function Xk(t){return"data-floating-ui-"+t}function eo(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const oR=Xk("safe-polygon");function U1(t,e,n){if(n&&!b3(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const r=t();return typeof r=="number"?r:r==null?void 0:r[e]}return t==null?void 0:t[e]}function lC(t){return typeof t=="function"?t():t}function wZ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,events:s,elements:o}=t,{enabled:l=!0,delay:u=0,handleClose:h=null,mouseOnly:f=!1,restMs:p=0,move:m=!0}=e,v=Gk(),b=Yk(),x=Wy(h),w=Wy(u),A=Wy(n),j=Wy(p),C=M.useRef(),_=M.useRef(-1),S=M.useRef(),O=M.useRef(-1),E=M.useRef(!0),D=M.useRef(!1),N=M.useRef(()=>{}),I=M.useRef(!1),R=Nl(()=>{var F;const U=(F=i.current.openEvent)==null?void 0:F.type;return(U==null?void 0:U.includes("mouse"))&&U!=="mousedown"});M.useEffect(()=>{if(!l)return;function F(U){let{open:Z}=U;Z||(eo(_),eo(O),E.current=!0,I.current=!1)}return s.on("openchange",F),()=>{s.off("openchange",F)}},[l,s]),M.useEffect(()=>{if(!l||!x.current||!n)return;function F(Z){R()&&r(!1,Z,"hover")}const U=Hd(o.floating).documentElement;return U.addEventListener("mouseleave",F),()=>{U.removeEventListener("mouseleave",F)}},[o.floating,n,r,l,x,R]);const L=M.useCallback(function(F,U,Z){U===void 0&&(U=!0),Z===void 0&&(Z="hover");const G=U1(w.current,"close",C.current);G&&!S.current?(eo(_),_.current=window.setTimeout(()=>r(!1,F,Z),G)):U&&(eo(_),r(!1,F,Z))},[w,r]),Q=Nl(()=>{N.current(),S.current=void 0}),z=Nl(()=>{if(D.current){const F=Hd(o.floating).body;F.style.pointerEvents="",F.removeAttribute(oR),D.current=!1}}),H=Nl(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);M.useEffect(()=>{if(!l)return;function F(X){if(eo(_),E.current=!1,f&&!b3(C.current)||lC(j.current)>0&&!U1(w.current,"open"))return;const V=U1(w.current,"open",C.current);V?_.current=window.setTimeout(()=>{A.current||r(!0,X,"hover")},V):n||r(!0,X,"hover")}function U(X){if(H()){z();return}N.current();const V=Hd(o.floating);if(eo(O),I.current=!1,x.current&&i.current.floatingContext){n||eo(_),S.current=x.current({...i.current.floatingContext,tree:v,x:X.clientX,y:X.clientY,onClose(){z(),Q(),H()||L(X,!0,"safe-polygon")}});const le=S.current;V.addEventListener("mousemove",le),N.current=()=>{V.removeEventListener("mousemove",le)};return}(C.current==="touch"?!Zg(o.floating,X.relatedTarget):!0)&&L(X)}function Z(X){H()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:v,x:X.clientX,y:X.clientY,onClose(){z(),Q(),H()||L(X)}})(X))}function G(){eo(_)}function W(X){H()||L(X,!1)}if(_r(o.domReference)){const X=o.domReference,V=o.floating;return n&&X.addEventListener("mouseleave",Z),m&&X.addEventListener("mousemove",F,{once:!0}),X.addEventListener("mouseenter",F),X.addEventListener("mouseleave",U),V&&(V.addEventListener("mouseleave",Z),V.addEventListener("mouseenter",G),V.addEventListener("mouseleave",W)),()=>{n&&X.removeEventListener("mouseleave",Z),m&&X.removeEventListener("mousemove",F),X.removeEventListener("mouseenter",F),X.removeEventListener("mouseleave",U),V&&(V.removeEventListener("mouseleave",Z),V.removeEventListener("mouseenter",G),V.removeEventListener("mouseleave",W))}}},[o,l,t,f,m,L,Q,z,r,n,A,v,w,x,i,H,j]),Ul(()=>{var F;if(l&&n&&(F=x.current)!=null&&(F=F.__options)!=null&&F.blockPointerEvents&&R()){D.current=!0;const Z=o.floating;if(_r(o.domReference)&&Z){var U;const G=Hd(o.floating).body;G.setAttribute(oR,"");const W=o.domReference,X=v==null||(U=v.nodesRef.current.find(V=>V.id===b))==null||(U=U.context)==null?void 0:U.elements.floating;return X&&(X.style.pointerEvents=""),G.style.pointerEvents="none",W.style.pointerEvents="auto",Z.style.pointerEvents="auto",()=>{G.style.pointerEvents="",W.style.pointerEvents="",Z.style.pointerEvents=""}}}},[l,n,b,o,v,x,R]),Ul(()=>{n||(C.current=void 0,I.current=!1,Q(),z())},[n,Q,z]),M.useEffect(()=>()=>{Q(),eo(_),eo(O),z()},[l,o.domReference,Q,z]);const P=M.useMemo(()=>{function F(U){C.current=U.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(U){const{nativeEvent:Z}=U;function G(){!E.current&&!A.current&&r(!0,Z,"hover")}f&&!b3(C.current)||n||lC(j.current)===0||I.current&&U.movementX**2+U.movementY**2<2||(eo(O),C.current==="touch"?G():(I.current=!0,O.current=window.setTimeout(G,lC(j.current))))}}},[f,r,n,A,j]);return M.useMemo(()=>l?{reference:P}:{},[l,P])}const x3=()=>{},ML=M.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:x3,setState:x3,isInstantPhase:!1}),SZ=()=>M.useContext(ML);function jZ(t){const{children:e,delay:n,timeoutMs:r=0}=t,[i,s]=M.useReducer((u,h)=>({...u,...h}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=M.useRef(null),l=M.useCallback(u=>{s({currentId:u})},[]);return Ul(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||s({isInstantPhase:!0}):(i.isInstantPhase&&s({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),a.jsx(ML.Provider,{value:M.useMemo(()=>({...i,setState:s,setCurrentId:l}),[i,l]),children:e})}function CZ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,floatingId:i}=t,{id:s,enabled:o=!0}=e,l=s??i,u=SZ(),{currentId:h,setCurrentId:f,initialDelay:p,setState:m,timeoutMs:v}=u;return Ul(()=>{o&&h&&(m({delay:{open:1,close:U1(p,"close")}}),h!==l&&r(!1))},[o,l,r,m,h,p]),Ul(()=>{function b(){r(!1),m({delay:p,currentId:null})}if(o&&h&&!n&&h===l){if(v){const x=window.setTimeout(b,v);return()=>{clearTimeout(x)}}b()}},[o,n,m,h,l,r,p,v]),Ul(()=>{o&&(f===x3||!n||f(l))},[o,n,f,l]),u}const _Z={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},TZ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},lR=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function kZ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:i,dataRef:s}=t,{enabled:o=!0,escapeKey:l=!0,outsidePress:u=!0,outsidePressEvent:h="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:b}=e,x=Gk(),w=Nl(typeof u=="function"?u:()=>!1),A=typeof u=="function"?w:u,j=M.useRef(!1),{escapeKey:C,outsidePress:_}=lR(v),{escapeKey:S,outsidePress:O}=lR(b),E=M.useRef(!1),D=Nl(z=>{var H;if(!n||!o||!l||z.key!=="Escape"||E.current)return;const P=(H=s.current.floatingContext)==null?void 0:H.nodeId,F=x?$1(x.nodesRef.current,P):[];if(!C&&(z.stopPropagation(),F.length>0)){let U=!0;if(F.forEach(Z=>{var G;if((G=Z.context)!=null&&G.open&&!Z.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,jK(z)?z.nativeEvent:z,"escape-key")}),N=Nl(z=>{var H;const P=()=>{var F;D(z),(F=xp(z))==null||F.removeEventListener("keydown",P)};(H=xp(z))==null||H.addEventListener("keydown",P)}),I=Nl(z=>{var H;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const F=j.current;if(j.current=!1,h==="click"&&F||P||typeof A=="function"&&!A(z))return;const U=xp(z),Z="["+Xk("inert")+"]",G=Hd(i.floating).querySelectorAll(Z);let W=_r(U)?U:null;for(;W&&!Vc(W);){const le=Zc(W);if(Vc(le)||!_r(le))break;W=le}if(G.length&&_r(U)&&!xK(U)&&!Zg(U,i.floating)&&Array.from(G).every(le=>!Zg(W,le)))return;if(yo(U)&&Q){const le=Vc(U),be=mo(U),ye=/auto|scroll/,Xe=le||ye.test(be.overflowX),ze=le||ye.test(be.overflowY),Re=Xe&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,ae=ze&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,je=be.direction==="rtl",pe=ae&&(je?z.offsetX<=U.offsetWidth-U.clientWidth:z.offsetX>U.clientWidth),ke=Re&&z.offsetY>U.clientHeight;if(pe||ke)return}const X=(H=s.current.floatingContext)==null?void 0:H.nodeId,V=x&&$1(x.nodesRef.current,X).some(le=>{var be;return sC(z,(be=le.context)==null?void 0:be.elements.floating)});if(sC(z,i.floating)||sC(z,i.domReference)||V)return;const te=x?$1(x.nodesRef.current,X):[];if(te.length>0){let le=!0;if(te.forEach(be=>{var ye;if((ye=be.context)!=null&&ye.open&&!be.context.dataRef.current.__outsidePressBubbles){le=!1;return}}),!le)return}r(!1,z,"outside-press")}),R=Nl(z=>{var H;const P=()=>{var F;I(z),(F=xp(z))==null||F.removeEventListener(h,P)};(H=xp(z))==null||H.addEventListener(h,P)});M.useEffect(()=>{if(!n||!o)return;s.current.__escapeKeyBubbles=C,s.current.__outsidePressBubbles=_;let z=-1;function H(G){r(!1,G,"ancestor-scroll")}function P(){window.clearTimeout(z),E.current=!0}function F(){z=window.setTimeout(()=>{E.current=!1},rw()?5:0)}const U=Hd(i.floating);l&&(U.addEventListener("keydown",S?N:D,S),U.addEventListener("compositionstart",P),U.addEventListener("compositionend",F)),A&&U.addEventListener(h,O?R:I,O);let Z=[];return m&&(_r(i.domReference)&&(Z=Yc(i.domReference)),_r(i.floating)&&(Z=Z.concat(Yc(i.floating))),!_r(i.reference)&&i.reference&&i.reference.contextElement&&(Z=Z.concat(Yc(i.reference.contextElement)))),Z=Z.filter(G=>{var W;return G!==((W=U.defaultView)==null?void 0:W.visualViewport)}),Z.forEach(G=>{G.addEventListener("scroll",H,{passive:!0})}),()=>{l&&(U.removeEventListener("keydown",S?N:D,S),U.removeEventListener("compositionstart",P),U.removeEventListener("compositionend",F)),A&&U.removeEventListener(h,O?R:I,O),Z.forEach(G=>{G.removeEventListener("scroll",H)}),window.clearTimeout(z)}},[s,i,l,A,h,n,r,m,o,C,_,D,S,N,I,O,R]),M.useEffect(()=>{s.current.insideReactTree=!1},[s,A,h]);const L=M.useMemo(()=>({onKeyDown:D,...f&&{[_Z[p]]:z=>{r(!1,z.nativeEvent,"reference-press")},...p!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[D,r,f,p]),Q=M.useMemo(()=>({onKeyDown:D,onMouseDown(){j.current=!0},onMouseUp(){j.current=!0},[TZ[h]]:()=>{s.current.insideReactTree=!0}}),[D,h,s]);return M.useMemo(()=>o?{reference:L,floating:Q}:{},[o,L,Q])}function OZ(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=EL(),s=M.useRef({}),[o]=M.useState(()=>yZ()),l=Yk()!=null,[u,h]=M.useState(r.reference),f=Nl((v,b,x)=>{s.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:x,nested:l}),n==null||n(v,b,x)}),p=M.useMemo(()=>({setPositionReference:h}),[]),m=M.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:m,events:o,floatingId:i,refs:p}),[e,f,m,o,i,p])}function Kk(t){t===void 0&&(t={});const{nodeId:e}=t,n=OZ({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[s,o]=M.useState(null),[l,u]=M.useState(null),f=(i==null?void 0:i.domReference)||s,p=M.useRef(null),m=Gk();Ul(()=>{f&&(p.current=f)},[f]);const v=uZ({...t,elements:{...i,...l&&{reference:l}}}),b=M.useCallback(C=>{const _=_r(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;u(_),v.refs.setReference(_)},[v.refs]),x=M.useCallback(C=>{(_r(C)||C===null)&&(p.current=C,o(C)),(_r(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!_r(C))&&v.refs.setReference(C)},[v.refs]),w=M.useMemo(()=>({...v.refs,setReference:x,setPositionReference:b,domReference:p}),[v.refs,x,b]),A=M.useMemo(()=>({...v.elements,domReference:f}),[v.elements,f]),j=M.useMemo(()=>({...v,...r,refs:w,elements:A,nodeId:e}),[v,w,A,e,r]);return Ul(()=>{r.dataRef.current.floatingContext=j;const C=m==null?void 0:m.nodesRef.current.find(_=>_.id===e);C&&(C.context=j)}),M.useMemo(()=>({...v,context:j,refs:w,elements:A}),[v,w,A,j])}function cC(){return vK()&&gK()}function EZ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:i,dataRef:s,elements:o}=t,{enabled:l=!0,visibleOnly:u=!0}=e,h=M.useRef(!1),f=M.useRef(-1),p=M.useRef(!0);M.useEffect(()=>{if(!l)return;const v=ca(o.domReference);function b(){!n&&yo(o.domReference)&&o.domReference===V8(Hd(o.domReference))&&(h.current=!0)}function x(){p.current=!0}function w(){p.current=!1}return v.addEventListener("blur",b),cC()&&(v.addEventListener("keydown",x,!0),v.addEventListener("pointerdown",w,!0)),()=>{v.removeEventListener("blur",b),cC()&&(v.removeEventListener("keydown",x,!0),v.removeEventListener("pointerdown",w,!0))}},[o.domReference,n,l]),M.useEffect(()=>{if(!l)return;function v(b){let{reason:x}=b;(x==="reference-press"||x==="escape-key")&&(h.current=!0)}return i.on("openchange",v),()=>{i.off("openchange",v)}},[i,l]),M.useEffect(()=>()=>{eo(f)},[]);const m=M.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(v){if(h.current)return;const b=xp(v.nativeEvent);if(u&&_r(b)){if(cC()&&!v.relatedTarget){if(!p.current&&!AK(b))return}else if(!wK(b))return}r(!0,v.nativeEvent,"focus")},onBlur(v){h.current=!1;const b=v.relatedTarget,x=v.nativeEvent,w=_r(b)&&b.hasAttribute(Xk("focus-guard"))&&b.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var A;const j=V8(o.domReference?o.domReference.ownerDocument:document);!b&&j===o.domReference||Zg((A=s.current.floatingContext)==null?void 0:A.refs.floating.current,j)||Zg(o.domReference,j)||w||r(!1,x,"focus")})}}),[s,o.domReference,r,u]);return M.useMemo(()=>l?{reference:m}:{},[l,m])}function uC(t,e,n){const r=new Map,i=n==="item";let s=t;if(i&&t){const{[rR]:o,[iR]:l,...u}=t;s=u}return{...n==="floating"&&{tabIndex:-1,[pZ]:""},...s,...e.map(o=>{const l=o?o[n]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((o,l)=>(l&&Object.entries(l).forEach(u=>{let[h,f]=u;if(!(i&&[rR,iR].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof f=="function"){var p;(p=r.get(h))==null||p.push(f),o[h]=function(){for(var m,v=arguments.length,b=new Array(v),x=0;x<v;x++)b[x]=arguments[x];return(m=r.get(h))==null?void 0:m.map(w=>w(...b)).find(w=>w!==void 0)}}}else o[h]=f}),o),{})}}function MZ(t){t===void 0&&(t=[]);const e=t.map(l=>l==null?void 0:l.reference),n=t.map(l=>l==null?void 0:l.floating),r=t.map(l=>l==null?void 0:l.item),i=M.useCallback(l=>uC(l,t,"reference"),e),s=M.useCallback(l=>uC(l,t,"floating"),n),o=M.useCallback(l=>uC(l,t,"item"),r);return M.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}const DZ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function RZ(t,e){var n,r;e===void 0&&(e={});const{open:i,elements:s,floatingId:o}=t,{enabled:l=!0,role:u="dialog"}=e,h=EL(),f=((n=s.domReference)==null?void 0:n.id)||h,p=M.useMemo(()=>{var j;return((j=SK(s.floating))==null?void 0:j.id)||o},[s.floating,o]),m=(r=DZ.get(u))!=null?r:u,b=Yk()!=null,x=M.useMemo(()=>m==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":i?p:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:f},...m==="menu"&&b&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[m,p,b,i,f,u]),w=M.useMemo(()=>{const j={id:p,...m&&{role:m}};return m==="tooltip"||u==="label"?j:{...j,...m==="menu"&&{"aria-labelledby":f}}},[m,p,f,u]),A=M.useCallback(j=>{let{active:C,selected:_}=j;const S={role:"option",...C&&{id:p+"-fui-option"}};switch(u){case"select":case"combobox":return{...S,"aria-selected":_}}return{}},[p,u]);return M.useMemo(()=>l?{reference:x,floating:w,item:A}:{},[l,x,w,A])}var Zk={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const[NZ,xo]=Wi("ScrollArea.Root component was not found in tree");function xm(t,e){const n=Pd(e);Cf(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const PZ=M.forwardRef((t,e)=>{const{style:n,...r}=t,i=xo(),[s,o]=M.useState(0),[l,u]=M.useState(0),h=!!(s&&l);return xm(i.scrollbarX,()=>{var p;const f=((p=i.scrollbarX)==null?void 0:p.offsetHeight)||0;i.onCornerHeightChange(f),u(f)}),xm(i.scrollbarY,()=>{var p;const f=((p=i.scrollbarY)==null?void 0:p.offsetWidth)||0;i.onCornerWidthChange(f),o(f)}),h?a.jsx("div",{...r,ref:e,style:{...n,width:s,height:l}}):null}),IZ=M.forwardRef((t,e)=>{const n=xo(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(PZ,{...t,ref:e}):null}),BZ={scrollHideDelay:1e3,type:"hover"},DL=M.forwardRef((t,e)=>{const{type:n,scrollHideDelay:r,scrollbars:i,getStyles:s,...o}=we("ScrollAreaRoot",BZ,t),[l,u]=M.useState(null),[h,f]=M.useState(null),[p,m]=M.useState(null),[v,b]=M.useState(null),[x,w]=M.useState(null),[A,j]=M.useState(0),[C,_]=M.useState(0),[S,O]=M.useState(!1),[E,D]=M.useState(!1),N=cr(e,I=>u(I));return a.jsx(NZ,{value:{type:n,scrollHideDelay:r,scrollArea:l,viewport:h,onViewportChange:f,content:p,onContentChange:m,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:S,onScrollbarXEnabledChange:O,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:E,onScrollbarYEnabledChange:D,onCornerWidthChange:j,onCornerHeightChange:_,getStyles:s},children:a.jsx(ve,{...o,ref:N,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${A}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})});DL.displayName="@mantine/core/ScrollAreaRoot";function RL(t,e){const n=t/e;return Number.isNaN(n)?0:n}function aw(t){const e=RL(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function NL(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function LZ(t,[e,n]){return Math.min(n,Math.max(e,t))}function cR(t,e,n="ltr"){const r=aw(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,l=s-r,u=n==="ltr"?[0,o]:[o*-1,0],h=LZ(t,u);return NL([0,o],[0,l])(h)}function FZ(t,e,n,r="ltr"){const i=aw(n),s=i/2,o=e||s,l=i-o,u=n.scrollbar.paddingStart+o,h=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return NL([u,h],p)(t)}function PL(t,e){return t>0&&t<e}function yh(t){return t?parseInt(t,10):0}function af(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t==null||t(r),(n===!1||!r.defaultPrevented)&&(e==null||e(r))}}const[HZ,IL]=Wi("ScrollAreaScrollbar was not found in tree"),BL=M.forwardRef((t,e)=>{const{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:o,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:h,onResize:f,...p}=t,m=xo(),[v,b]=M.useState(null),x=cr(e,D=>b(D)),w=M.useRef(null),A=M.useRef(""),{viewport:j}=m,C=n.content-n.viewport,_=Pd(h),S=Pd(l),O=QA(f,10),E=D=>{if(w.current){const N=D.clientX-w.current.left,I=D.clientY-w.current.top;u({x:N,y:I})}};return M.useEffect(()=>{const D=N=>{const I=N.target;(v==null?void 0:v.contains(I))&&_(N,C)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[j,v,C,_]),M.useEffect(S,[n,S]),xm(v,O),xm(m.content,O),a.jsx(HZ,{value:{scrollbar:v,hasThumb:r,onThumbChange:Pd(i),onThumbPointerUp:Pd(s),onThumbPositionChange:S,onThumbPointerDown:Pd(o)},children:a.jsx("div",{...p,ref:x,"data-mantine-scrollbar":!0,style:{position:"absolute",...p.style},onPointerDown:af(t.onPointerDown,D=>{D.preventDefault(),D.button===0&&(D.target.setPointerCapture(D.pointerId),w.current=v.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E(D))}),onPointerMove:af(t.onPointerMove,E),onPointerUp:af(t.onPointerUp,D=>{const N=D.target;N.hasPointerCapture(D.pointerId)&&(D.preventDefault(),N.releasePointerCapture(D.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=A.current,w.current=null}})})}),LL=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:i,...s}=t,o=xo(),[l,u]=M.useState(),h=M.useRef(null),f=cr(e,h,o.onScrollbarXChange);return M.useEffect(()=>{h.current&&u(getComputedStyle(h.current))},[h]),a.jsx(BL,{"data-orientation":"horizontal",...s,ref:f,sizes:n,style:{...i,"--sa-thumb-width":`${aw(n)}px`},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollLeft+p.deltaX;t.onWheelScroll(v),PL(v,m)&&p.preventDefault()}},onResize:()=>{h.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:yh(l.paddingLeft),paddingEnd:yh(l.paddingRight)}})}})});LL.displayName="@mantine/core/ScrollAreaScrollbarX";const FL=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:i,...s}=t,o=xo(),[l,u]=M.useState(),h=M.useRef(null),f=cr(e,h,o.onScrollbarYChange);return M.useEffect(()=>{h.current&&u(window.getComputedStyle(h.current))},[]),a.jsx(BL,{...s,"data-orientation":"vertical",ref:f,sizes:n,style:{"--sa-thumb-height":`${aw(n)}px`,...i},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollTop+p.deltaY;t.onWheelScroll(v),PL(v,m)&&p.preventDefault()}},onResize:()=>{h.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:yh(l.paddingTop),paddingEnd:yh(l.paddingBottom)}})}})});FL.displayName="@mantine/core/ScrollAreaScrollbarY";const ow=M.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,{dir:i}=Tf(),s=xo(),o=M.useRef(null),l=M.useRef(0),[u,h]=M.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=RL(u.viewport,u.content),p={...r,sizes:u,onSizesChange:h,hasThumb:f>0&&f<1,onThumbChange:v=>{o.current=v},onThumbPointerUp:()=>{l.current=0},onThumbPointerDown:v=>{l.current=v}},m=(v,b)=>FZ(v,l.current,u,b);return n==="horizontal"?a.jsx(LL,{...p,ref:e,onThumbPositionChange:()=>{if(s.viewport&&o.current){const v=s.viewport.scrollLeft,b=cR(v,u,i);o.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollLeft=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollLeft=m(v,i))}}):n==="vertical"?a.jsx(FL,{...p,ref:e,onThumbPositionChange:()=>{if(s.viewport&&o.current){const v=s.viewport.scrollTop,b=cR(v,u);u.scrollbar.size===0?o.current.style.setProperty("--thumb-opacity","0"):o.current.style.setProperty("--thumb-opacity","1"),o.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollTop=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollTop=m(v))}}):null});ow.displayName="@mantine/core/ScrollAreaScrollbarVisible";const Jk=M.forwardRef((t,e)=>{const n=xo(),{forceMount:r,...i}=t,[s,o]=M.useState(!1),l=t.orientation==="horizontal",u=QA(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?h:f)}},10);return xm(n.viewport,u),xm(n.content,u),r||s?a.jsx(ow,{"data-state":s?"visible":"hidden",...i,ref:e}):null});Jk.displayName="@mantine/core/ScrollAreaScrollbarAuto";const HL=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xo(),[s,o]=M.useState(!1);return M.useEffect(()=>{const{scrollArea:l}=i;let u=0;if(l){const h=()=>{window.clearTimeout(u),o(!0)},f=()=>{u=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",h),l.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",h),l.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),n||s?a.jsx(Jk,{"data-state":s?"visible":"hidden",...r,ref:e}):null});HL.displayName="@mantine/core/ScrollAreaScrollbarHover";const zZ=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xo(),s=t.orientation==="horizontal",[o,l]=M.useState("hidden"),u=QA(()=>l("idle"),100);return M.useEffect(()=>{if(o==="idle"){const h=window.setTimeout(()=>l("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(h)}},[o,i.scrollHideDelay]),M.useEffect(()=>{const{viewport:h}=i,f=s?"scrollLeft":"scrollTop";if(h){let p=h[f];const m=()=>{const v=h[f];p!==v&&(l("scrolling"),u()),p=v};return h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[i.viewport,s,u]),n||o!=="hidden"?a.jsx(ow,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:af(t.onPointerEnter,()=>l("interacting")),onPointerLeave:af(t.onPointerLeave,()=>l("idle"))}):null}),A3=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xo(),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,l=t.orientation==="horizontal";return M.useEffect(()=>(l?s(!0):o(!0),()=>{l?s(!1):o(!1)}),[l,s,o]),i.type==="hover"?a.jsx(HL,{...r,ref:e,forceMount:n}):i.type==="scroll"?a.jsx(zZ,{...r,ref:e,forceMount:n}):i.type==="auto"?a.jsx(Jk,{...r,ref:e,forceMount:n}):i.type==="always"?a.jsx(ow,{...r,ref:e}):null});A3.displayName="@mantine/core/ScrollAreaScrollbar";function qZ(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,l=n.top!==s.top;(o||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}const zL=M.forwardRef((t,e)=>{const{style:n,...r}=t,i=xo(),s=IL(),{onThumbPositionChange:o}=s,l=cr(e,f=>s.onThumbChange(f)),u=M.useRef(void 0),h=QA(()=>{u.current&&(u.current(),u.current=void 0)},100);return M.useEffect(()=>{const{viewport:f}=i;if(f){const p=()=>{if(h(),!u.current){const m=qZ(f,o);u.current=m,o()}};return o(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,h,o]),a.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:af(t.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),v=f.clientX-m.left,b=f.clientY-m.top;s.onThumbPointerDown({x:v,y:b})}),onPointerUp:af(t.onPointerUp,s.onThumbPointerUp)})});zL.displayName="@mantine/core/ScrollAreaThumb";const w3=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=IL();return n||i.hasThumb?a.jsx(zL,{ref:e,...r}):null});w3.displayName="@mantine/core/ScrollAreaThumb";const qL=M.forwardRef(({children:t,style:e,onWheel:n,...r},i)=>{const s=xo(),o=cr(i,s.onViewportChange),l=u=>{if(n==null||n(u),s.scrollbarXEnabled&&s.viewport&&u.shiftKey){const{scrollTop:h,scrollHeight:f,clientHeight:p,scrollWidth:m,clientWidth:v}=s.viewport,b=h<1,x=h>=f-p-1;m>v&&(b||x)&&u.stopPropagation()}};return a.jsx(ve,{...r,ref:o,onWheel:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e},children:a.jsx("div",{...s.getStyles("content"),ref:s.onContentChange,children:t})})});qL.displayName="@mantine/core/ScrollAreaViewport";const $L={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},$Z=(t,{scrollbarSize:e,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r==="x"?i=`${n} auto`:r==="y"&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":fe(e),"--scrollarea-over-scroll-behavior":i}}},La=Oe((t,e)=>{const n=we("ScrollArea",$L,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,scrollbarSize:u,vars:h,type:f,scrollHideDelay:p,viewportProps:m,viewportRef:v,onScrollPositionChange:b,children:x,offsetScrollbars:w,scrollbars:A,onBottomReached:j,onTopReached:C,overscrollBehavior:_,attributes:S,...O}=n,[E,D]=M.useState(!1),[N,I]=M.useState(!1),[R,L]=M.useState(!1),Q=lt({name:"ScrollArea",props:n,classes:Zk,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:S,vars:h,varsResolver:$Z}),z=M.useRef(null),H=OL([v,z]);return M.useEffect(()=>{if(!z.current||w!=="present")return;const P=z.current,F=new ResizeObserver(()=>{const{scrollHeight:U,clientHeight:Z,scrollWidth:G,clientWidth:W}=P;I(U>Z),L(G>W)});return F.observe(P),()=>F.disconnect()},[z,w]),a.jsxs(DL,{getStyles:Q,type:f==="never"?"always":f,scrollHideDelay:p,ref:e,scrollbars:A,...Q("root"),...O,children:[a.jsx(qL,{...m,...Q("viewport",{style:m==null?void 0:m.style}),ref:H,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":A||void 0,"data-horizontal-hidden":w==="present"&&!R?"true":void 0,"data-vertical-hidden":w==="present"&&!N?"true":void 0,onScroll:P=>{var G;(G=m==null?void 0:m.onScroll)==null||G.call(m,P),b==null||b({x:P.currentTarget.scrollLeft,y:P.currentTarget.scrollTop});const{scrollTop:F,scrollHeight:U,clientHeight:Z}=P.currentTarget;F-(U-Z)>=-.8&&(j==null||j()),F===0&&(C==null||C())},children:x}),(A==="xy"||A==="x")&&a.jsx(A3,{...Q("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||w==="present"&&!R?!0:void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:a.jsx(w3,{...Q("thumb")})}),(A==="xy"||A==="y")&&a.jsx(A3,{...Q("scrollbar"),orientation:"vertical","data-hidden":f==="never"||w==="present"&&!N?!0:void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:a.jsx(w3,{...Q("thumb")})}),a.jsx(IZ,{...Q("corner"),"data-hovered":E||void 0,"data-hidden":f==="never"||void 0})]})});La.displayName="@mantine/core/ScrollArea";const eO=Oe((t,e)=>{const{children:n,classNames:r,styles:i,scrollbarSize:s,scrollHideDelay:o,type:l,dir:u,offsetScrollbars:h,overscrollBehavior:f,viewportRef:p,onScrollPositionChange:m,unstyled:v,variant:b,viewportProps:x,scrollbars:w,style:A,vars:j,onBottomReached:C,onTopReached:_,onOverflowChange:S,...O}=we("ScrollAreaAutosize",$L,t),E=M.useRef(null),D=OL([p,E]),[N,I]=M.useState(!1),R=M.useRef(!1);return M.useEffect(()=>{if(!S)return;const L=E.current;if(!L)return;const Q=()=>{const H=L.scrollHeight>L.clientHeight;H!==N&&(R.current?S==null||S(H):(R.current=!0,H&&(S==null||S(!0))),I(H))};Q();const z=new ResizeObserver(Q);return z.observe(L),()=>z.disconnect()},[S,N]),a.jsx(ve,{...O,ref:e,style:[{display:"flex",overflow:"hidden"},A],children:a.jsx(ve,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:a.jsx(La,{classNames:r,styles:i,scrollHideDelay:o,scrollbarSize:s,type:l,dir:u,offsetScrollbars:h,overscrollBehavior:f,viewportRef:D,onScrollPositionChange:m,unstyled:v,variant:b,viewportProps:x,vars:j,scrollbars:w,onBottomReached:C,onTopReached:_,"data-autosize":"true",children:n})})})});La.classes=Zk;eO.displayName="@mantine/core/ScrollAreaAutosize";eO.classes=Zk;La.Autosize=eO;var QL={root:"m_87cf2631"};const QZ={__staticSelector:"UnstyledButton"},Rr=Vi((t,e)=>{const n=we("UnstyledButton",QZ,t),{className:r,component:i="button",__staticSelector:s,unstyled:o,classNames:l,styles:u,style:h,attributes:f,...p}=n,m=lt({name:s,props:n,classes:QL,className:r,style:h,classNames:l,styles:u,unstyled:o,attributes:f});return a.jsx(ve,{...m("root",{focusable:!0}),component:i,ref:e,type:i==="button"?"button":void 0,...p})});Rr.classes=QL;Rr.displayName="@mantine/core/UnstyledButton";var UL={root:"m_515a97f8"};const tO=Oe((t,e)=>{const n=we("VisuallyHidden",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,attributes:h,...f}=n,p=lt({name:"VisuallyHidden",classes:UL,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:h});return a.jsx(ve,{component:"span",ref:e,...p("root"),...f})});tO.classes=UL;tO.displayName="@mantine/core/VisuallyHidden";var WL={root:"m_1b7284a3"};const UZ=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:Jn(e),"--paper-shadow":Nk(n)}}),lw=Vi((t,e)=>{const n=we("Paper",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,withBorder:u,vars:h,radius:f,shadow:p,variant:m,mod:v,attributes:b,...x}=n,w=lt({name:"Paper",props:n,classes:WL,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:h,varsResolver:UZ});return a.jsx(ve,{ref:e,mod:[{"data-with-border":u},v],...w("root"),variant:m,...x})});lw.classes=WL;lw.displayName="@mantine/core/Paper";function uR(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function hR(t,e,n,r,i){return t==="center"||r==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:n}:t==="start"?{[i==="ltr"?"left":"right"]:n}:{}}const WZ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function VZ({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:s,arrowY:o,dir:l}){const[u,h="center"]=t.split("-"),f={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[WZ[u]]:r},p=-e/2;return u==="left"?{...f,...uR(h,o,n,i),right:p,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:u==="right"?{...f,...uR(h,o,n,i),left:p,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:u==="top"?{...f,...hR(h,s,n,i,l),bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:u==="bottom"?{...f,...hR(h,s,n,i,l),top:p,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const Nx=M.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:s,arrowX:o,arrowY:l,style:u,...h},f)=>{const{dir:p}=Tf();return s?a.jsx("div",{...h,ref:f,style:{...u,...VZ({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:p,arrowX:o,arrowY:l})}}):null});Nx.displayName="@mantine/core/FloatingArrow";function VL(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),i=n==="right"?"left":"right";return r===void 0?i:`${i}-${r}`}return e}var YL={root:"m_9814e45f"};const YZ={zIndex:vo("modal")},GZ=(t,{gradient:e,color:n,backgroundOpacity:r,blur:i,radius:s,zIndex:o})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&kl(n||"#000",r??.6)||void 0,"--overlay-filter":i?`blur(${fe(i)})`:void 0,"--overlay-radius":s===void 0?void 0:Jn(s),"--overlay-z-index":o==null?void 0:o.toString()}}),Am=Vi((t,e)=>{const n=we("Overlay",YZ,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,fixed:h,center:f,children:p,radius:m,zIndex:v,gradient:b,blur:x,color:w,backgroundOpacity:A,mod:j,attributes:C,..._}=n,S=lt({name:"Overlay",props:n,classes:YL,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:C,vars:u,varsResolver:GZ});return a.jsx(ve,{ref:e,...S("root"),mod:[{center:f,fixed:h},j],..._,children:p})});Am.classes=YL;Am.displayName="@mantine/core/Overlay";function hC(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function XZ({target:t,reuseTargetNode:e,...n}){if(t)return typeof t=="string"?document.querySelector(t)||hC(n):t;if(e){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const i=hC(n);return i.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(i),i}return hC(n)}const KZ={reuseTargetNode:!0},GL=Oe((t,e)=>{const{children:n,target:r,reuseTargetNode:i,...s}=we("Portal",KZ,t),[o,l]=M.useState(!1),u=M.useRef(null);return Cf(()=>(l(!0),u.current=XZ({target:r,reuseTargetNode:i,...s}),kx(e,u.current),!r&&!i&&u.current&&document.body.appendChild(u.current),()=>{!r&&!i&&u.current&&document.body.removeChild(u.current)}),[r]),!o||!u.current?null:JA.createPortal(a.jsx(a.Fragment,{children:n}),u.current)});GL.displayName="@mantine/core/Portal";const Mh=Oe(({withinPortal:t=!0,children:e,...n},r)=>GA()==="test"||!t?a.jsx(a.Fragment,{children:e}):a.jsx(GL,{ref:r,...n,children:e}));Mh.displayName="@mantine/core/OptionalPortal";const ng=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Vy={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...ng("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...ng("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...ng("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...ng("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...ng("top"),common:{transformOrigin:"top right"}}},dR={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function ZZ({transition:t,state:e,duration:n,timingFunction:r}){const i={WebkitBackfaceVisibility:"hidden",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in Vy?{transitionProperty:Vy[t].transitionProperty,...i,...Vy[t].common,...Vy[t][dR[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[dR[e]]}}function JZ({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:s,onEntered:o,onExited:l,enterDelay:u,exitDelay:h}){const f=xi(),p=UA(),m=f.respectReducedMotion?p:!1,[v,b]=M.useState(m?0:t),[x,w]=M.useState(r?"entered":"exited"),A=M.useRef(-1),j=M.useRef(-1),C=M.useRef(-1);function _(){window.clearTimeout(A.current),window.clearTimeout(j.current),cancelAnimationFrame(C.current)}const S=E=>{_();const D=E?i:s,N=E?o:l,I=m?0:E?t:e;b(I),I===0?(typeof D=="function"&&D(),typeof N=="function"&&N(),w(E?"entered":"exited")):C.current=requestAnimationFrame(()=>{xg.flushSync(()=>{w(E?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof D=="function"&&D(),w(E?"entering":"exiting"),A.current=window.setTimeout(()=>{typeof N=="function"&&N(),w(E?"entered":"exited")},I)})})},O=E=>{if(_(),typeof(E?u:h)!="number"){S(E);return}j.current=window.setTimeout(()=>{S(E)},E?u:h)};return Gl(()=>{O(r)},[r]),M.useEffect(()=>()=>{_()},[]),{transitionDuration:v,transitionStatus:x,transitionTimingFunction:n||"ease"}}function Kl({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:i,children:s,timingFunction:o="ease",onExit:l,onEntered:u,onEnter:h,onExited:f,enterDelay:p,exitDelay:m}){const v=GA(),{transitionDuration:b,transitionStatus:x,transitionTimingFunction:w}=JZ({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:l,onEntered:u,onEnter:h,onExited:f,enterDelay:p,exitDelay:m});return b===0||v==="test"?i?a.jsx(a.Fragment,{children:s({})}):t?s({display:"none"}):null:x==="exited"?t?s({display:"none"}):null:a.jsx(a.Fragment,{children:s(ZZ({transition:e,duration:b,state:x,timingFunction:w}))})}Kl.displayName="@mantine/core/Transition";const[eJ,XL]=Wi("Popover component was not found in the tree");var KL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};function cw({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const i=xG(e),s=cr(i,r),o=_f(t);return o?M.cloneElement(o,{[n]:s}):t}function ZL(t){return a.jsx(tO,{tabIndex:-1,"data-autofocus":!0,...t})}cw.displayName="@mantine/core/FocusTrap";ZL.displayName="@mantine/core/FocusTrapInitialFocus";cw.InitialFocus=ZL;const nO=Oe((t,e)=>{var w,A,j,C;const n=we("PopoverDropdown",null,t),{className:r,style:i,vars:s,children:o,onKeyDownCapture:l,variant:u,classNames:h,styles:f,...p}=n,m=XL(),v=V9({opened:m.opened,shouldReturnFocus:m.returnFocus}),b=m.withRoles?{"aria-labelledby":m.getTargetId(),id:m.getDropdownId(),role:"dialog",tabIndex:-1}:{},x=cr(e,m.floating);return m.disabled?null:a.jsx(Mh,{...m.portalProps,withinPortal:m.withinPortal,children:a.jsx(Kl,{mounted:m.opened,...m.transitionProps,transition:((w=m.transitionProps)==null?void 0:w.transition)||"fade",duration:((A=m.transitionProps)==null?void 0:A.duration)??150,keepMounted:m.keepMounted,exitDuration:typeof((j=m.transitionProps)==null?void 0:j.exitDuration)=="number"?m.transitionProps.exitDuration:(C=m.transitionProps)==null?void 0:C.duration,children:_=>a.jsx(cw,{active:m.trapFocus&&m.opened,innerRef:x,children:a.jsxs(ve,{...b,...p,variant:u,onKeyDownCapture:lG(()=>{var S,O;(S=m.onClose)==null||S.call(m),(O=m.onDismiss)==null||O.call(m)},{active:m.closeOnEscape,onTrigger:v,onKeyDown:l}),"data-position":m.placement,"data-fixed":m.floatingStrategy==="fixed"||void 0,...m.getStyles("dropdown",{className:r,props:n,classNames:h,styles:f,style:[{..._,zIndex:m.zIndex,top:m.y??0,left:m.x??0,width:m.width==="target"?void 0:fe(m.width),...m.referenceHidden?{display:"none"}:null},m.resolvedStyles.dropdown,f==null?void 0:f.dropdown,i]}),children:[o,a.jsx(Nx,{ref:m.arrowRef,arrowX:m.arrowX,arrowY:m.arrowY,visible:m.withArrow,position:m.placement,arrowSize:m.arrowSize,arrowRadius:m.arrowRadius,arrowOffset:m.arrowOffset,arrowPosition:m.arrowPosition,...m.getStyles("arrow",{props:n,classNames:h,styles:f})})]})})})})});nO.classes=KL;nO.displayName="@mantine/core/PopoverDropdown";const tJ={refProp:"ref",popupType:"dialog"},JL=Oe((t,e)=>{const{children:n,refProp:r,popupType:i,...s}=we("PopoverTarget",tJ,t),o=_f(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=s,u=XL(),h=cr(u.reference,WA(o),e),f=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.opened?u.getDropdownId():void 0,id:u.getTargetId()}:{},p=o.props;return M.cloneElement(o,{...l,...f,...u.targetProps,className:Ir(u.targetProps.className,l.className,p.className),[r]:h,...u.controlled?null:{onClick:()=>{var m;u.onToggle(),(m=p.onClick)==null||m.call(p)}}})});JL.displayName="@mantine/core/PopoverTarget";function nJ(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function rJ(t,e,n){const r=nJ(t.middlewares),i=[TL(t.offset),fZ()];return t.dropdownVisible&&n!=="test"&&t.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip=="boolean"?Rx():Rx(r.flip)),r.shift&&i.push(Vk(typeof r.shift=="boolean"?{limiter:nR(),padding:5}:{limiter:nR(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline=="boolean"?Ig():Ig(r.inline)),i.push(kL({element:t.arrowRef,padding:t.arrowOffset})),(r.size||t.width==="target")&&i.push(dZ({...typeof r.size=="boolean"?{}:r.size,apply({rects:s,availableWidth:o,availableHeight:l,...u}){var p;const f=((p=e().refs.floating.current)==null?void 0:p.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:s,availableWidth:o,availableHeight:l,...u}):Object.assign(f,{maxWidth:`${o}px`,maxHeight:`${l}px`})),t.width==="target"&&Object.assign(f,{width:`${s.reference.width}px`})}})),i}function iJ(t){const e=GA(),[n,r]=Ui({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),i=M.useRef(n),s=()=>{n&&!t.disabled&&r(!1)},o=()=>{t.disabled||r(!n)},l=Kk({strategy:t.strategy,placement:t.preventPositionChangeWhenVisible?t.positionRef.current:t.position,middleware:rJ(t,()=>l,e),whileElementsMounted:t.keepMounted?void 0:y3});return M.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&n)return y3(l.refs.reference.current,l.refs.floating.current,l.update)},[n,l.update]),Gl(()=>{var u;(u=t.onPositionChange)==null||u.call(t,l.placement),t.positionRef.current=l.placement},[l.placement,t.preventPositionChangeWhenVisible]),Gl(()=>{var u,h;n!==i.current&&(n?(h=t.onOpen)==null||h.call(t):(u=t.onClose)==null||u.call(t)),i.current=n},[n,t.onClose,t.onOpen]),Cf(()=>{let u=-1;return n&&(u=window.setTimeout(()=>t.setDropdownVisible(!0),4)),()=>{window.clearTimeout(u)}},[n,t.position]),{floating:l,controlled:typeof t.opened=="boolean",opened:n,onClose:s,onToggle:o}}const sJ={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:vo("popover"),__staticSelector:"Popover",width:"max-content"},aJ=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:Jn(e),"--popover-shadow":Nk(n)}});function Zn(t){var Zt,Pt,Mt,Et,Ut,ei,yt;const e=we("Popover",sJ,t),{children:n,position:r,offset:i,onPositionChange:s,positionDependencies:o,opened:l,transitionProps:u,onExitTransitionEnd:h,onEnterTransitionEnd:f,width:p,middlewares:m,withArrow:v,arrowSize:b,arrowOffset:x,arrowRadius:w,arrowPosition:A,unstyled:j,classNames:C,styles:_,closeOnClickOutside:S,withinPortal:O,portalProps:E,closeOnEscape:D,clickOutsideEvents:N,trapFocus:I,onClose:R,onDismiss:L,onOpen:Q,onChange:z,zIndex:H,radius:P,shadow:F,id:U,defaultOpened:Z,__staticSelector:G,withRoles:W,disabled:X,returnFocus:V,variant:te,keepMounted:le,vars:be,floatingStrategy:ye,withOverlay:Xe,overlayProps:ze,hideDetached:Re,attributes:ae,preventPositionChangeWhenVisible:je,...pe}=e,ke=lt({name:G,props:e,classes:KL,classNames:C,styles:_,unstyled:j,attributes:ae,rootSelector:"dropdown",vars:be,varsResolver:aJ}),{resolvedStyles:gt}=bo({classNames:C,styles:_,props:e}),[We,Le]=M.useState(l??Z??!1),Fe=M.useRef(r),Ne=M.useRef(null),[Ve,qt]=M.useState(null),[et,Je]=M.useState(null),{dir:Ue}=Tf(),Pe=GA(),st=ki(U),he=iJ({middlewares:m,width:p,position:VL(Ue,r),offset:typeof i=="number"?i+(v?b/2:0):i,arrowRef:Ne,arrowOffset:x,onPositionChange:s,positionDependencies:o,opened:l,defaultOpened:Z,onChange:z,onOpen:Q,onClose:R,onDismiss:L,strategy:ye,dropdownVisible:We,setDropdownVisible:Le,positionRef:Fe,disabled:X,preventPositionChangeWhenVisible:je,keepMounted:le});dG(()=>{S&&(he.onClose(),L==null||L())},N,[Ve,et]);const dt=M.useCallback(Tt=>{qt(Tt),he.floating.refs.setReference(Tt)},[he.floating.refs.setReference]),sn=M.useCallback(Tt=>{Je(Tt),he.floating.refs.setFloating(Tt)},[he.floating.refs.setFloating]),Kt=M.useCallback(()=>{var Tt;(Tt=u==null?void 0:u.onExited)==null||Tt.call(u),h==null||h(),Le(!1),je||(Fe.current=r)},[u==null?void 0:u.onExited,h,je,r]),un=M.useCallback(()=>{var Tt;(Tt=u==null?void 0:u.onEntered)==null||Tt.call(u),f==null||f()},[u==null?void 0:u.onEntered,f]);return a.jsxs(eJ,{value:{returnFocus:V,disabled:X,controlled:he.controlled,reference:dt,floating:sn,x:he.floating.x,y:he.floating.y,arrowX:(Mt=(Pt=(Zt=he.floating)==null?void 0:Zt.middlewareData)==null?void 0:Pt.arrow)==null?void 0:Mt.x,arrowY:(ei=(Ut=(Et=he.floating)==null?void 0:Et.middlewareData)==null?void 0:Ut.arrow)==null?void 0:ei.y,opened:he.opened,arrowRef:Ne,transitionProps:{...u,onExited:Kt,onEntered:un},width:p,withArrow:v,arrowSize:b,arrowOffset:x,arrowRadius:w,arrowPosition:A,placement:he.floating.placement,trapFocus:I,withinPortal:O,portalProps:E,zIndex:H,radius:P,shadow:F,closeOnEscape:D,onDismiss:L,onClose:he.onClose,onToggle:he.onToggle,getTargetId:()=>`${st}-target`,getDropdownId:()=>`${st}-dropdown`,withRoles:W,targetProps:pe,__staticSelector:G,classNames:C,styles:_,unstyled:j,variant:te,keepMounted:le,getStyles:ke,resolvedStyles:gt,floatingStrategy:ye,referenceHidden:Re&&Pe!=="test"?(yt=he.floating.middlewareData.hide)==null?void 0:yt.referenceHidden:!1},children:[n,Xe&&a.jsx(Kl,{transition:"fade",mounted:he.opened,duration:(u==null?void 0:u.duration)||250,exitDuration:(u==null?void 0:u.exitDuration)||250,children:Tt=>a.jsx(Mh,{withinPortal:O,children:a.jsx(Am,{...ze,...ke("overlay",{className:ze==null?void 0:ze.className,style:[Tt,ze==null?void 0:ze.style]})})})})]})}Zn.Target=JL;Zn.Dropdown=nO;Zn.displayName="@mantine/core/Popover";Zn.extend=t=>t;var Zo={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const e7=M.forwardRef(({className:t,...e},n)=>a.jsxs(ve,{component:"span",className:Ir(Zo.barsLoader,t),...e,ref:n,children:[a.jsx("span",{className:Zo.bar}),a.jsx("span",{className:Zo.bar}),a.jsx("span",{className:Zo.bar})]}));e7.displayName="@mantine/core/Bars";const t7=M.forwardRef(({className:t,...e},n)=>a.jsxs(ve,{component:"span",className:Ir(Zo.dotsLoader,t),...e,ref:n,children:[a.jsx("span",{className:Zo.dot}),a.jsx("span",{className:Zo.dot}),a.jsx("span",{className:Zo.dot})]}));t7.displayName="@mantine/core/Dots";const n7=M.forwardRef(({className:t,...e},n)=>a.jsx(ve,{component:"span",className:Ir(Zo.ovalLoader,t),...e,ref:n}));n7.displayName="@mantine/core/Oval";const r7={bars:e7,oval:n7,dots:t7},oJ={loaders:r7,type:"oval"},lJ=(t,{size:e,color:n})=>({root:{"--loader-size":$t(e,"loader-size"),"--loader-color":n?hr(n,t):void 0}}),Zl=Oe((t,e)=>{const n=we("Loader",oJ,t),{size:r,color:i,type:s,vars:o,className:l,style:u,classNames:h,styles:f,unstyled:p,loaders:m,variant:v,children:b,attributes:x,...w}=n,A=lt({name:"Loader",props:n,classes:Zo,className:l,style:u,classNames:h,styles:f,unstyled:p,attributes:x,vars:o,varsResolver:lJ});return b?a.jsx(ve,{...A("root"),ref:e,...w,children:b}):a.jsx(ve,{...A("root"),ref:e,component:m[s],variant:v,size:r,...w})});Zl.defaultLoaders=r7;Zl.classes=Zo;Zl.displayName="@mantine/core/Loader";var Qm={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const fR={orientation:"horizontal"},cJ=(t,{borderWidth:e})=>({group:{"--ai-border-width":fe(e)}}),rO=Oe((t,e)=>{const n=we("ActionIconGroup",fR,t),{className:r,style:i,classNames:s,styles:o,unstyled:l,orientation:u,vars:h,borderWidth:f,variant:p,mod:m,attributes:v,...b}=we("ActionIconGroup",fR,t),x=lt({name:"ActionIconGroup",props:n,classes:Qm,className:r,style:i,classNames:s,styles:o,unstyled:l,attributes:v,vars:h,varsResolver:cJ,rootSelector:"group"});return a.jsx(ve,{...x("group"),ref:e,variant:p,mod:[{"data-orientation":u},m],role:"group",...b})});rO.classes=Qm;rO.displayName="@mantine/core/ActionIconGroup";const uJ=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":$t(o,"section-height"),"--section-padding-x":$t(o,"section-padding-x"),"--section-fz":kr(o),"--section-radius":e===void 0?void 0:Jn(e),"--section-bg":n||i?l.background:void 0,"--section-color":l.color,"--section-bd":n||i?l.border:void 0}}},iO=Oe((t,e)=>{const n=we("ActionIconGroupSection",null,t),{className:r,style:i,classNames:s,styles:o,unstyled:l,vars:u,variant:h,gradient:f,radius:p,autoContrast:m,attributes:v,...b}=n,x=lt({name:"ActionIconGroupSection",props:n,classes:Qm,className:r,style:i,classNames:s,styles:o,unstyled:l,attributes:v,vars:u,varsResolver:uJ,rootSelector:"groupSection"});return a.jsx(ve,{...x("groupSection"),ref:e,variant:h,...b})});iO.classes=Qm;iO.displayName="@mantine/core/ActionIconGroupSection";const hJ=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o})=>{const l=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--ai-size":$t(e,"ai-size"),"--ai-radius":n===void 0?void 0:Jn(n),"--ai-bg":s||r?l.background:void 0,"--ai-hover":s||r?l.hover:void 0,"--ai-hover-color":s||r?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":s||r?l.border:void 0}}},Nr=Vi((t,e)=>{const n=we("ActionIcon",null,t),{className:r,unstyled:i,variant:s,classNames:o,styles:l,style:u,loading:h,loaderProps:f,size:p,color:m,radius:v,__staticSelector:b,gradient:x,vars:w,children:A,disabled:j,"data-disabled":C,autoContrast:_,mod:S,attributes:O,...E}=n,D=lt({name:["ActionIcon",b],props:n,className:r,style:u,classes:Qm,classNames:o,styles:l,unstyled:i,attributes:O,vars:w,varsResolver:hJ});return a.jsxs(Rr,{...D("root",{active:!j&&!h&&!C}),...E,unstyled:i,variant:s,size:p,disabled:j||h,ref:e,mod:[{loading:h,disabled:j||C},S],children:[typeof h=="boolean"&&a.jsx(Kl,{mounted:h,transition:"slide-down",duration:150,children:N=>a.jsx(ve,{component:"span",...D("loader",{style:N}),"aria-hidden":!0,children:a.jsx(Zl,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...f})})}),a.jsx(ve,{component:"span",mod:{loading:h},...D("icon"),children:A})]})});Nr.classes=Qm;Nr.displayName="@mantine/core/ActionIcon";Nr.Group=rO;Nr.GroupSection=iO;const i7=M.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},r)=>a.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:r,...n,children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));i7.displayName="@mantine/core/CloseIcon";var s7={root:"m_86a44da5","root--subtle":"m_220c80f2"};const dJ={variant:"subtle"},fJ=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":$t(e,"cb-size"),"--cb-radius":n===void 0?void 0:Jn(n),"--cb-icon-size":fe(r)}}),ec=Vi((t,e)=>{const n=we("CloseButton",dJ,t),{iconSize:r,children:i,vars:s,radius:o,className:l,classNames:u,style:h,styles:f,unstyled:p,"data-disabled":m,disabled:v,variant:b,icon:x,mod:w,attributes:A,__staticSelector:j,...C}=n,_=lt({name:j||"CloseButton",props:n,className:l,style:h,classes:s7,classNames:u,styles:f,unstyled:p,attributes:A,vars:s,varsResolver:fJ});return a.jsxs(Rr,{ref:e,...C,unstyled:p,variant:b,disabled:v,mod:[{disabled:v||m},w],..._("root",{variant:b,active:!v&&!m}),children:[x||a.jsx(i7,{}),i]})});ec.classes=s7;ec.displayName="@mantine/core/CloseButton";function pJ(t){return M.Children.toArray(t).filter(Boolean)}var a7={root:"m_4081bf90"};const mJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},gJ=(t,{grow:e,preventGrowOverflow:n,gap:r,align:i,justify:s,wrap:o},{childWidth:l})=>({root:{"--group-child-width":e&&n?l:void 0,"--group-gap":zi(r),"--group-align":i,"--group-justify":s,"--group-wrap":o}}),ht=Oe((t,e)=>{const n=we("Group",mJ,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,children:u,gap:h,align:f,justify:p,wrap:m,grow:v,preventGrowOverflow:b,vars:x,variant:w,__size:A,mod:j,attributes:C,..._}=n,S=pJ(u),O=S.length,E=zi(h??"md"),N={childWidth:`calc(${100/O}% - (${E} - ${E} / ${O}))`},I=lt({name:"Group",props:n,stylesCtx:N,className:i,style:s,classes:a7,classNames:r,styles:o,unstyled:l,attributes:C,vars:x,varsResolver:gJ});return a.jsx(ve,{...I("root"),ref:e,variant:w,mod:[{grow:v},j],size:A,..._,children:S})});ht.classes=a7;ht.displayName="@mantine/core/Group";const[vJ,ou]=Wi("ModalBase component was not found in tree");function bJ({opened:t,transitionDuration:e}){const[n,r]=M.useState(t),i=M.useRef(-1),o=UA()?0:e;return M.useEffect(()=>(t?(r(!0),window.clearTimeout(i.current)):o===0?r(!1):i.current=window.setTimeout(()=>r(!1),o),()=>window.clearTimeout(i.current)),[t,o]),n}function yJ({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:i,onClose:s,returnFocus:o}){const l=ki(t),[u,h]=M.useState(!1),[f,p]=M.useState(!1),m=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,v=bJ({opened:n,transitionDuration:m});return Tx("keydown",b=>{var x;b.key==="Escape"&&i&&!b.isComposing&&n&&((x=b.target)==null?void 0:x.getAttribute("data-mantine-stop-propagation"))!=="true"&&s()},{capture:!0}),V9({opened:n,shouldReturnFocus:r&&o}),{_id:l,titleMounted:u,bodyMounted:f,shouldLockScroll:v,setTitleMounted:h,setBodyMounted:p}}const o7=M.forwardRef(({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:s,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:u,returnFocus:h,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:v,children:b,zIndex:x,shadow:w,padding:A,__vars:j,unstyled:C,removeScrollProps:_,...S},O)=>{const{_id:E,titleMounted:D,bodyMounted:N,shouldLockScroll:I,setTitleMounted:R,setBodyMounted:L}=yJ({id:r,transitionProps:i,opened:e,trapFocus:l,closeOnEscape:u,onClose:n,returnFocus:h}),{key:Q,...z}=_||{};return a.jsx(Mh,{...m,withinPortal:p,children:a.jsx(vJ,{value:{opened:e,onClose:n,closeOnClickOutside:f,onExitTransitionEnd:s,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${E}-title`,getBodyId:()=>`${E}-body`,titleMounted:D,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:u,zIndex:x,unstyled:C},children:a.jsx(pf,{enabled:I&&v,...z,children:a.jsx(ve,{ref:O,...S,__vars:{...j,"--mb-z-index":(x||vo("modal")).toString(),"--mb-shadow":Nk(w),"--mb-padding":zi(A)},children:b})},Q)})})});o7.displayName="@mantine/core/ModalBase";var wm={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function xJ(){const t=ou();return M.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}const l7=M.forwardRef(({className:t,...e},n)=>{const r=xJ(),i=ou();return a.jsx(ve,{ref:n,...e,id:r,className:Ir({[wm.body]:!i.unstyled},t)})});l7.displayName="@mantine/core/ModalBaseBody";const c7=M.forwardRef(({className:t,onClick:e,...n},r)=>{const i=ou();return a.jsx(ec,{ref:r,...n,onClick:s=>{i.onClose(),e==null||e(s)},className:Ir({[wm.close]:!i.unstyled},t),unstyled:i.unstyled})});c7.displayName="@mantine/core/ModalBaseCloseButton";const u7=M.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:i,...s},o)=>{const l=ou();return a.jsx(Kl,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var u,h,f;(u=l.onExitTransitionEnd)==null||u.call(l),(f=(h=l.transitionProps)==null?void 0:h.onExited)==null||f.call(h)},onEntered:()=>{var u,h,f;(u=l.onEnterTransitionEnd)==null||u.call(l),(f=(h=l.transitionProps)==null?void 0:h.onEntered)==null||f.call(h)},...t,children:u=>a.jsx("div",{...n,className:Ir({[wm.inner]:!l.unstyled},n.className),children:a.jsx(cw,{active:l.opened&&l.trapFocus,innerRef:o,children:a.jsx(lw,{...s,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[i,u],className:Ir({[wm.content]:!l.unstyled},e),unstyled:l.unstyled,children:s.children})})})})});u7.displayName="@mantine/core/ModalBaseContent";const h7=M.forwardRef(({className:t,...e},n)=>{const r=ou();return a.jsx(ve,{component:"header",ref:n,className:Ir({[wm.header]:!r.unstyled},t),...e})});h7.displayName="@mantine/core/ModalBaseHeader";const AJ={duration:200,timingFunction:"ease",transition:"fade"};function wJ(t){const e=ou();return{...AJ,...e.transitionProps,...t}}const d7=M.forwardRef(({onClick:t,transitionProps:e,style:n,visible:r,...i},s)=>{const o=ou(),l=wJ(e);return a.jsx(Kl,{mounted:r!==void 0?r:o.opened,...l,transition:"fade",children:u=>a.jsx(Am,{ref:s,fixed:!0,style:[n,u],zIndex:o.zIndex,unstyled:o.unstyled,onClick:h=>{t==null||t(h),o.closeOnClickOutside&&o.onClose()},...i})})});d7.displayName="@mantine/core/ModalBaseOverlay";function SJ(){const t=ou();return M.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const f7=M.forwardRef(({className:t,...e},n)=>{const r=SJ(),i=ou();return a.jsx(ve,{component:"h2",ref:n,className:Ir({[wm.title]:!i.unstyled},t),...e,id:r})});f7.displayName="@mantine/core/ModalBaseTitle";function jJ({children:t}){return a.jsx(a.Fragment,{children:t})}const[CJ,_J]=Vh({size:"sm"});var Ao={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const p7=Oe((t,e)=>{const n=we("InputClearButton",null,t),{size:r,variant:i,vars:s,classNames:o,styles:l,...u}=n,h=_J(),{resolvedClassNames:f,resolvedStyles:p}=bo({classNames:o,styles:l,props:n});return a.jsx(ec,{variant:i||"transparent",ref:e,size:r||(h==null?void 0:h.size)||"sm",classNames:f,styles:p,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...u.style},...u})});p7.displayName="@mantine/core/InputClearButton";const TJ={xs:7,sm:8,md:10,lg:12,xl:15};function kJ({__clearable:t,__clearSection:e,rightSection:n,__defaultRightSection:r,size:i="sm"}){const s=t&&e;return s&&(n||r)?a.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:TJ[i]},children:[s,n||r]}):n===null?null:n||s||r}const[OJ,Um]=Vh({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),EJ=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${kr(e)} - ${fe(2)})`}}),uw=Oe((t,e)=>{const n=we("InputDescription",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,size:h,__staticSelector:f,__inheritStyles:p=!0,attributes:m,variant:v,...b}=we("InputDescription",null,n),x=Um(),w=lt({name:["InputWrapper",f],props:n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:m,rootSelector:"description",vars:u,varsResolver:EJ}),A=p&&(x==null?void 0:x.getStyles)||w;return a.jsx(ve,{component:"p",ref:e,variant:v,size:h,...A("description",x!=null&&x.getStyles?{className:i,style:s}:void 0),...b})});uw.classes=Ao;uw.displayName="@mantine/core/InputDescription";const MJ=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${kr(e)} - ${fe(2)})`}}),hw=Oe((t,e)=>{const n=we("InputError",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,size:h,attributes:f,__staticSelector:p,__inheritStyles:m=!0,variant:v,...b}=n,x=lt({name:["InputWrapper",p],props:n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:f,rootSelector:"error",vars:u,varsResolver:MJ}),w=Um(),A=m&&(w==null?void 0:w.getStyles)||x;return a.jsx(ve,{component:"p",ref:e,variant:v,size:h,...A("error",w!=null&&w.getStyles?{className:i,style:s}:void 0),...b})});hw.classes=Ao;hw.displayName="@mantine/core/InputError";const pR={labelElement:"label"},DJ=(t,{size:e})=>({label:{"--input-label-size":kr(e),"--input-asterisk-color":void 0}}),dw=Oe((t,e)=>{const n=we("InputLabel",pR,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,labelElement:h,size:f,required:p,htmlFor:m,onMouseDown:v,children:b,__staticSelector:x,variant:w,mod:A,attributes:j,...C}=we("InputLabel",pR,n),_=lt({name:["InputWrapper",x],props:n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:j,rootSelector:"label",vars:u,varsResolver:DJ}),S=Um(),O=(S==null?void 0:S.getStyles)||_;return a.jsxs(ve,{...O("label",S!=null&&S.getStyles?{className:i,style:s}:void 0),component:h,variant:w,size:f,ref:e,htmlFor:h==="label"?m:void 0,mod:[{required:p},A],onMouseDown:E=>{v==null||v(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...C,children:[b,p&&a.jsx("span",{...O("required"),"aria-hidden":!0,children:" *"})]})});dw.classes=Ao;dw.displayName="@mantine/core/InputLabel";const sO=Oe((t,e)=>{const n=we("InputPlaceholder",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,__staticSelector:h,variant:f,error:p,mod:m,attributes:v,...b}=n,x=lt({name:["InputPlaceholder",h],props:n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:v,rootSelector:"placeholder"});return a.jsx(ve,{...x("placeholder"),mod:[{error:!!p},m],component:"span",variant:f,ref:e,...b})});sO.classes=Ao;sO.displayName="@mantine/core/InputPlaceholder";function RJ(t,{hasDescription:e,hasError:n}){const r=t.findIndex(u=>u==="input"),i=t.slice(0,r),s=t.slice(r+1),o=e&&i.includes("description")||n&&i.includes("error");return{offsetBottom:e&&s.includes("description")||n&&s.includes("error"),offsetTop:o}}const NJ={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},PJ=(t,{size:e})=>({label:{"--input-label-size":kr(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${kr(e)} - ${fe(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${kr(e)} - ${fe(2)})`}}),aO=Oe((t,e)=>{const n=we("InputWrapper",NJ,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,size:h,variant:f,__staticSelector:p,inputContainer:m,inputWrapperOrder:v,label:b,error:x,description:w,labelProps:A,descriptionProps:j,errorProps:C,labelElement:_,children:S,withAsterisk:O,id:E,required:D,__stylesApiProps:N,mod:I,attributes:R,...L}=n,Q=lt({name:["InputWrapper",p],props:N||n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:R,vars:u,varsResolver:PJ}),z={size:h,variant:f,__staticSelector:p},H=ki(E),P=typeof O=="boolean"?O:D,F=(C==null?void 0:C.id)||`${H}-error`,U=(j==null?void 0:j.id)||`${H}-description`,Z=H,G=!!x&&typeof x!="boolean",W=!!w,X=`${G?F:""} ${W?U:""}`,V=X.trim().length>0?X.trim():void 0,te=(A==null?void 0:A.id)||`${H}-label`,le=b&&a.jsx(dw,{labelElement:_,id:te,htmlFor:Z,required:P,...z,...A,children:b},"label"),be=W&&a.jsx(uw,{...j,...z,size:(j==null?void 0:j.size)||z.size,id:(j==null?void 0:j.id)||U,children:w},"description"),ye=a.jsx(M.Fragment,{children:m(S)},"input"),Xe=G&&M.createElement(hw,{...C,...z,size:(C==null?void 0:C.size)||z.size,key:"error",id:(C==null?void 0:C.id)||F},x),ze=v.map(Re=>{switch(Re){case"label":return le;case"input":return ye;case"description":return be;case"error":return Xe;default:return null}});return a.jsx(OJ,{value:{getStyles:Q,describedBy:V,inputId:Z,labelId:te,...RJ(v,{hasDescription:W,hasError:G})},children:a.jsx(ve,{ref:e,variant:f,size:h,mod:[{error:!!x},I],...Q("root"),...L,children:ze})})});aO.classes=Ao;aO.displayName="@mantine/core/InputWrapper";const IJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm"},BJ=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":$t(e.size,"input-height"),"--input-fz":kr(e.size),"--input-radius":e.radius===void 0?void 0:Jn(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?fe(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?fe(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?$t(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),Mr=Vi((t,e)=>{const n=we("Input",IJ,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,required:u,__staticSelector:h,__stylesApiProps:f,size:p,wrapperProps:m,error:v,disabled:b,leftSection:x,leftSectionProps:w,leftSectionWidth:A,rightSection:j,rightSectionProps:C,rightSectionWidth:_,rightSectionPointerEvents:S,leftSectionPointerEvents:O,variant:E,vars:D,pointer:N,multiline:I,radius:R,id:L,withAria:Q,withErrorStyles:z,mod:H,inputSize:P,attributes:F,__clearSection:U,__clearable:Z,__defaultRightSection:G,...W}=n,{styleProps:X,rest:V}=Vv(W),te=Um(),le={offsetBottom:te==null?void 0:te.offsetBottom,offsetTop:te==null?void 0:te.offsetTop},be=lt({name:["Input",h],props:f||n,classes:Ao,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:F,stylesCtx:le,rootSelector:"wrapper",vars:D,varsResolver:BJ}),ye=Q?{required:u,disabled:b,"aria-invalid":!!v,"aria-describedby":te==null?void 0:te.describedBy,id:(te==null?void 0:te.inputId)||L}:{},Xe=kJ({__clearable:Z,__clearSection:U,rightSection:j,__defaultRightSection:G,size:p});return a.jsx(CJ,{value:{size:p||"sm"},children:a.jsxs(ve,{...be("wrapper"),...X,...m,mod:[{error:!!v&&z,pointer:N,disabled:b,multiline:I,"data-with-right-section":!!Xe,"data-with-left-section":!!x},H],variant:E,size:p,children:[x&&a.jsx("div",{...w,"data-position":"left",...be("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:x}),a.jsx(ve,{component:"input",...V,...ye,ref:e,required:u,mod:{disabled:b,error:!!v&&z},variant:E,__size:P,...be("input")}),Xe&&a.jsx("div",{...C,"data-position":"right",...be("section",{className:C==null?void 0:C.className,style:C==null?void 0:C.style}),children:Xe})]})})});Mr.classes=Ao;Mr.Wrapper=aO;Mr.Label=dw;Mr.Error=hw;Mr.Description=uw;Mr.Placeholder=sO;Mr.ClearButton=p7;Mr.displayName="@mantine/core/Input";function m7(t,e,n){const r=we(t,e,n),{label:i,description:s,error:o,required:l,classNames:u,styles:h,className:f,unstyled:p,__staticSelector:m,__stylesApiProps:v,errorProps:b,labelProps:x,descriptionProps:w,wrapperProps:A,id:j,size:C,style:_,inputContainer:S,inputWrapperOrder:O,withAsterisk:E,variant:D,vars:N,mod:I,attributes:R,...L}=r,{styleProps:Q,rest:z}=Vv(L),H={label:i,description:s,error:o,required:l,classNames:u,className:f,__staticSelector:m,__stylesApiProps:v||r,errorProps:b,labelProps:x,descriptionProps:w,unstyled:p,styles:h,size:C,style:_,inputContainer:S,inputWrapperOrder:O,withAsterisk:E,variant:D,id:j,mod:I,attributes:R,...A};return{...z,classNames:u,styles:h,unstyled:p,wrapperProps:{...H,...Q},inputProps:{required:l,classNames:u,styles:h,unstyled:p,size:C,__staticSelector:m,__stylesApiProps:v||r,error:o,variant:D,id:j,attributes:R}}}const LJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},Fa=Vi((t,e)=>{const{inputProps:n,wrapperProps:r,...i}=m7("InputBase",LJ,t);return a.jsx(Mr.Wrapper,{...r,children:a.jsx(Mr,{...n,...i,ref:e})})});Fa.classes={...Mr.classes,...Mr.Wrapper.classes};Fa.displayName="@mantine/core/InputBase";var g7={root:"m_96b553a6"};function FJ(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function HJ({target:t,parent:e,ref:n,displayAfterTransitionEnd:r}){const i=M.useRef(-1),[s,o]=M.useState(!1),[l,u]=M.useState(typeof r=="boolean"?r:!1),h=()=>{if(!t||!e||!n.current)return;const v=t.getBoundingClientRect(),b=e.getBoundingClientRect(),x=window.getComputedStyle(t),w=window.getComputedStyle(e),A=yh(x.borderTopWidth)+yh(w.borderTopWidth),j=yh(x.borderLeftWidth)+yh(w.borderLeftWidth),C={top:v.top-b.top-A,left:v.left-b.left-j,width:v.width,height:v.height};n.current.style.transform=`translateY(${C.top}px) translateX(${C.left}px)`,n.current.style.width=`${C.width}px`,n.current.style.height=`${C.height}px`},f=()=>{window.clearTimeout(i.current),n.current&&(n.current.style.transitionDuration="0ms"),h(),i.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},p=M.useRef(null),m=M.useRef(null);return M.useEffect(()=>{if(h(),t)return p.current=new ResizeObserver(f),p.current.observe(t),e&&(m.current=new ResizeObserver(f),m.current.observe(e)),()=>{var v,b;(v=p.current)==null||v.disconnect(),(b=m.current)==null||b.disconnect()}},[e,t]),M.useEffect(()=>{if(e){const v=b=>{FJ(b.target,e)&&(f(),u(!1))};return e.addEventListener("transitionend",v),()=>{e.removeEventListener("transitionend",v)}}},[e]),IG(()=>{zG()!=="test"&&o(!0)},20,{autoInvoke:!0}),LG(v=>{v.forEach(b=>{b.type==="attributes"&&b.attributeName==="dir"&&f()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:s,hidden:l}}const zJ=(t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}}),oO=Oe((t,e)=>{const n=we("FloatingIndicator",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,target:h,parent:f,transitionDuration:p,mod:m,displayAfterTransitionEnd:v,attributes:b,...x}=n,w=lt({name:"FloatingIndicator",classes:g7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:u,varsResolver:zJ}),A=M.useRef(null),{initialized:j,hidden:C}=HJ({target:h,parent:f,ref:A,displayAfterTransitionEnd:v}),_=cr(e,A);return!h||!f?null:a.jsx(ve,{ref:_,mod:[{initialized:j,hidden:C},m],...w("root"),...x})});oO.displayName="@mantine/core/FloatingIndicator";oO.classes=g7;function v7({open:t,close:e,openDelay:n,closeDelay:r}){const i=M.useRef(-1),s=M.useRef(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(s.current)},l=()=>{o(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)},u=()=>{o(),r===0||r===void 0?e():s.current=window.setTimeout(e,r)};return M.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:u}}function Px({style:t,size:e=16,...n}){return a.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:fe(e),height:fe(e),display:"block"},...n,children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Px.displayName="@mantine/core/AccordionChevron";var b7={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const qJ=(t,{radius:e,color:n,variant:r,autoContrast:i})=>{const s=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:r||"light",autoContrast:i});return{root:{"--alert-radius":e===void 0?void 0:Jn(e),"--alert-bg":n||r?s.background:void 0,"--alert-color":s.color,"--alert-bd":n||r?s.border:void 0}}},Lt=Oe((t,e)=>{const n=we("Alert",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,radius:h,color:f,title:p,children:m,id:v,icon:b,withCloseButton:x,onClose:w,closeButtonLabel:A,variant:j,autoContrast:C,role:_,attributes:S,...O}=n,E=lt({name:"Alert",classes:b7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:S,vars:u,varsResolver:qJ}),D=ki(v),N=p&&`${D}-title`||void 0,I=`${D}-body`;return a.jsx(ve,{id:D,...E("root",{variant:j}),variant:j,ref:e,role:_||"alert",...O,"aria-describedby":m?I:void 0,"aria-labelledby":p?N:void 0,children:a.jsxs("div",{...E("wrapper"),children:[b&&a.jsx("div",{...E("icon"),children:b}),a.jsxs("div",{...E("body"),children:[p&&a.jsx("div",{...E("title"),"data-with-close-button":x||void 0,children:a.jsx("span",{id:N,...E("label"),children:p})}),m&&a.jsx("div",{id:I,...E("message"),"data-variant":j,children:m})]}),x&&a.jsx(ec,{...E("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":A,unstyled:l})]})})});Lt.classes=b7;Lt.displayName="@mantine/core/Alert";var y7={root:"m_b6d8b162"};function $J(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const QJ={inherit:!1},UJ=(t,{variant:e,lineClamp:n,gradient:r,size:i,color:s})=>({root:{"--text-fz":kr(i),"--text-lh":$9(i),"--text-gradient":e==="gradient"?h3(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":s?hr(s,t):void 0}}),ut=Vi((t,e)=>{const n=we("Text",QJ,t),{lineClamp:r,truncate:i,inline:s,inherit:o,gradient:l,span:u,__staticSelector:h,vars:f,className:p,style:m,classNames:v,styles:b,unstyled:x,variant:w,mod:A,size:j,attributes:C,..._}=n,S=lt({name:["Text",h],props:n,classes:y7,className:p,style:m,classNames:v,styles:b,unstyled:x,attributes:C,vars:f,varsResolver:UJ});return a.jsx(ve,{...S("root",{focusable:!0}),ref:e,component:u?"span":"p",variant:w,mod:[{"data-truncate":$J(i),"data-line-clamp":typeof r=="number","data-inline":s,"data-inherit":o},A],size:j,..._})});ut.classes=y7;ut.displayName="@mantine/core/Text";var x7={root:"m_849cf0da"};const WJ={underline:"hover"},zr=Vi((t,e)=>{const{underline:n,className:r,unstyled:i,mod:s,...o}=we("Anchor",WJ,t);return a.jsx(ut,{component:"a",ref:e,className:Ir({[x7.root]:!i},r),...o,mod:[{underline:n},s],__staticSelector:"Anchor",unstyled:i})});zr.classes=x7;zr.displayName="@mantine/core/Anchor";const[VJ,Wm]=Wi("AppShell was not found in tree");var Gh={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const lO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,withBorder:u,zIndex:h,mod:f,...p}=we("AppShellAside",null,t),m=Wm();return m.disabled?null:a.jsx(ve,{component:"aside",ref:e,mod:[{"with-border":u??m.withBorder},f],...m.getStyles("aside",{className:Ir({[pf.classNames.zeroRight]:m.offsetScrollbars},r),classNames:n,styles:s,style:i}),...p,__vars:{"--app-shell-aside-z-index":`calc(${h??m.zIndex} + 1)`}})});lO.classes=Gh;lO.displayName="@mantine/core/AppShellAside";const cO=Oe((t,e)=>{var v;const{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,withBorder:u,zIndex:h,mod:f,...p}=we("AppShellFooter",null,t),m=Wm();return m.disabled?null:a.jsx(ve,{component:"footer",ref:e,mod:[{"with-border":u??m.withBorder},f],...m.getStyles("footer",{className:Ir({[pf.classNames.zeroRight]:m.offsetScrollbars},r),classNames:n,styles:s,style:i}),...p,__vars:{"--app-shell-footer-z-index":(v=h??m.zIndex)==null?void 0:v.toString()}})});cO.classes=Gh;cO.displayName="@mantine/core/AppShellFooter";const uO=Oe((t,e)=>{var v;const{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,withBorder:u,zIndex:h,mod:f,...p}=we("AppShellHeader",null,t),m=Wm();return m.disabled?null:a.jsx(ve,{component:"header",ref:e,mod:[{"with-border":u??m.withBorder},f],...m.getStyles("header",{className:Ir({[pf.classNames.zeroRight]:m.offsetScrollbars},r),classNames:n,styles:s,style:i}),...p,__vars:{"--app-shell-header-z-index":(v=h??m.zIndex)==null?void 0:v.toString()}})});uO.classes=Gh;uO.displayName="@mantine/core/AppShellHeader";const hO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("AppShellMain",null,t),u=Wm();return a.jsx(ve,{component:"main",ref:e,...u.getStyles("main",{className:r,style:i,classNames:n,styles:s}),...l})});hO.classes=Gh;hO.displayName="@mantine/core/AppShellMain";function Gv(t){return typeof t=="object"?t.base:t}function Xv(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function Kv(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function YJ({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:i,mode:s}){var h,f,p;const o=r==null?void 0:r.width,l="translateX(var(--app-shell-aside-width))",u="translateX(calc(var(--app-shell-aside-width) * -1))";if(r!=null&&r.breakpoint&&!((h=r==null?void 0:r.collapsed)!=null&&h.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},s==="fixed"?(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px"):(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px")),Xv(o)){const m=fe(Gv(o));t["--app-shell-aside-width"]=m,t["--app-shell-aside-offset"]=m}if(Kv(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=fe(o.base),t["--app-shell-aside-offset"]=fe(o.base)),Zr(o).forEach(m=>{m!=="base"&&(e[m]=e[m]||{},e[m]["--app-shell-aside-width"]=fe(o[m]),e[m]["--app-shell-aside-offset"]=fe(o[m]))})),r!=null&&r.breakpoint&&s==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-aside-position"]="sticky",e[r.breakpoint]["--app-shell-aside-grid-row"]="2",e[r.breakpoint]["--app-shell-aside-grid-column"]="3",e[r.breakpoint]["--app-shell-main-column-end"]="3"),(f=r==null?void 0:r.collapsed)!=null&&f.desktop){const m=r.breakpoint;e[m]=e[m]||{},e[m]["--app-shell-aside-transform"]=l,e[m]["--app-shell-aside-transform-rtl"]=u,s==="fixed"?e[m]["--app-shell-aside-offset"]="0px !important":(e[m]["--app-shell-aside-width"]="0px",e[m]["--app-shell-aside-display"]="none",e[m]["--app-shell-main-column-end"]="-1"),e[m]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((p=r==null?void 0:r.collapsed)!=null&&p.mobile){const m=Pk(r.breakpoint,i.breakpoints)-.1;n[m]=n[m]||{},s==="fixed"?(n[m]["--app-shell-aside-width"]="100%",n[m]["--app-shell-aside-offset"]="0px"):n[m]["--app-shell-aside-width"]="0px",n[m]["--app-shell-aside-transform"]=l,n[m]["--app-shell-aside-transform-rtl"]=u,n[m]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function GJ({baseStyles:t,minMediaStyles:e,footer:n,mode:r}){const i=n==null?void 0:n.height,s="translateY(var(--app-shell-footer-height))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-footer-position"]="sticky",t["--app-shell-footer-grid-column"]="1 / -1",t["--app-shell-footer-grid-row"]="3"),Xv(i)){const l=fe(Gv(i));t["--app-shell-footer-height"]=l,o&&(t["--app-shell-footer-offset"]=l)}Kv(i)&&(typeof i.base<"u"&&(t["--app-shell-footer-height"]=fe(i.base),o&&(t["--app-shell-footer-offset"]=fe(i.base))),Zr(i).forEach(l=>{l!=="base"&&(e[l]=e[l]||{},e[l]["--app-shell-footer-height"]=fe(i[l]),o&&(e[l]["--app-shell-footer-offset"]=fe(i[l])))})),n!=null&&n.collapsed&&(t["--app-shell-footer-transform"]=s,r==="fixed"&&(t["--app-shell-footer-offset"]="0px !important"))}function XJ({baseStyles:t,minMediaStyles:e,header:n,mode:r}){const i=n==null?void 0:n.height,s="translateY(calc(var(--app-shell-header-height) * -1))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-header-position"]="sticky",t["--app-shell-header-grid-column"]="1 / -1",t["--app-shell-header-grid-row"]="1"),Xv(i)){const l=fe(Gv(i));t["--app-shell-header-height"]=l,o&&(t["--app-shell-header-offset"]=l)}Kv(i)&&(typeof i.base<"u"&&(t["--app-shell-header-height"]=fe(i.base),o&&(t["--app-shell-header-offset"]=fe(i.base))),Zr(i).forEach(l=>{l!=="base"&&(e[l]=e[l]||{},e[l]["--app-shell-header-height"]=fe(i[l]),o&&(e[l]["--app-shell-header-offset"]=fe(i[l])))})),n!=null&&n.collapsed&&(t["--app-shell-header-transform"]=s,r==="fixed"&&(t["--app-shell-header-offset"]="0px !important"))}function KJ({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:i,mode:s}){var h,f,p;const o=r==null?void 0:r.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",u="translateX(var(--app-shell-navbar-width))";if(r!=null&&r.breakpoint&&!((h=r==null?void 0:r.collapsed)!=null&&h.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-navbar-offset"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-navbar-width"]="100%",s==="static"&&(n[r==null?void 0:r.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Xv(o)){const m=fe(Gv(o));t["--app-shell-navbar-width"]=m,t["--app-shell-navbar-offset"]=m,s==="static"&&(t["--app-shell-navbar-grid-width"]=m)}if(Kv(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=fe(o.base),t["--app-shell-navbar-offset"]=fe(o.base),s==="static"&&(t["--app-shell-navbar-grid-width"]=fe(o.base))),Zr(o).forEach(m=>{m!=="base"&&(e[m]=e[m]||{},e[m]["--app-shell-navbar-width"]=fe(o[m]),e[m]["--app-shell-navbar-offset"]=fe(o[m]),s==="static"&&(e[m]["--app-shell-navbar-grid-width"]=fe(o[m])))})),r!=null&&r.breakpoint&&s==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-navbar-position"]="sticky",e[r.breakpoint]["--app-shell-navbar-grid-row"]="2",e[r.breakpoint]["--app-shell-navbar-grid-column"]="1",e[r.breakpoint]["--app-shell-main-column-start"]="2"),(f=r==null?void 0:r.collapsed)!=null&&f.desktop){const m=r.breakpoint;e[m]=e[m]||{},e[m]["--app-shell-navbar-transform"]=l,e[m]["--app-shell-navbar-transform-rtl"]=u,s==="fixed"?e[m]["--app-shell-navbar-offset"]="0px !important":(e[m]["--app-shell-navbar-width"]="0px",e[m]["--app-shell-navbar-display"]="none",e[m]["--app-shell-main-column-start"]="1")}if((p=r==null?void 0:r.collapsed)!=null&&p.mobile){const m=Pk(r.breakpoint,i.breakpoints)-.1;n[m]=n[m]||{},n[m]["--app-shell-navbar-width"]="100%",n[m]["--app-shell-navbar-offset"]="0px",s==="static"&&(n[m]["--app-shell-navbar-grid-width"]="0px"),n[m]["--app-shell-navbar-transform"]=l,n[m]["--app-shell-navbar-transform-rtl"]=u}}function dC(t){return Number(t)===0?"0px":zi(t)}function ZJ({padding:t,baseStyles:e,minMediaStyles:n}){Xv(t)&&(e["--app-shell-padding"]=dC(Gv(t))),Kv(t)&&(t.base&&(e["--app-shell-padding"]=dC(t.base)),Zr(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=dC(t[r]))}))}function JJ({navbar:t,header:e,footer:n,aside:r,padding:i,theme:s,mode:o}){const l={},u={},h={};o==="static"&&(h["--app-shell-main-grid-column"]="1 / -1",h["--app-shell-main-grid-row"]="2"),KJ({baseStyles:h,minMediaStyles:l,maxMediaStyles:u,navbar:t,theme:s,mode:o}),YJ({baseStyles:h,minMediaStyles:l,maxMediaStyles:u,aside:r,theme:s,mode:o}),XJ({baseStyles:h,minMediaStyles:l,header:e,mode:o}),GJ({baseStyles:h,minMediaStyles:l,footer:n,mode:o}),ZJ({baseStyles:h,minMediaStyles:l,padding:i});const f=c3(Zr(l),s.breakpoints).map(v=>({query:`(min-width: ${Os(v.px)})`,styles:l[v.value]})),p=c3(Zr(u),s.breakpoints).map(v=>({query:`(max-width: ${Os(v.px)})`,styles:u[v.value]})),m=[...f,...p];return{baseStyles:h,media:m}}function eee({navbar:t,header:e,aside:n,footer:r,padding:i,mode:s,selector:o}){const l=xi(),u=su(),{media:h,baseStyles:f}=JJ({navbar:t,header:e,footer:r,aside:n,padding:i,theme:l,mode:s});return a.jsx(ZA,{media:h,styles:f,selector:o||u.cssVariablesSelector})}const dO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,withBorder:u,zIndex:h,mod:f,...p}=we("AppShellNavbar",null,t),m=Wm();return m.disabled?null:a.jsx(ve,{component:"nav",ref:e,mod:[{"with-border":u??m.withBorder},f],...m.getStyles("navbar",{className:r,classNames:n,styles:s,style:i}),...p,__vars:{"--app-shell-navbar-z-index":`calc(${h??m.zIndex} + 1)`}})});dO.classes=Gh;dO.displayName="@mantine/core/AppShellNavbar";const fO=Vi((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,grow:l,mod:u,...h}=we("AppShellSection",null,t),f=Wm();return a.jsx(ve,{ref:e,mod:[{grow:l},u],...f.getStyles("section",{className:r,style:i,classNames:n,styles:s}),...h})});fO.classes=Gh;fO.displayName="@mantine/core/AppShellSection";function tee({transitionDuration:t,disabled:e}){const[n,r]=M.useState(!0),i=M.useRef(-1),s=M.useRef(-1);return Tx("resize",()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>M.startTransition(()=>{r(!1)}),200)}),Cf(()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>M.startTransition(()=>{r(!1)}),t||0)},[e,t]),n}const nee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:vo("app"),mode:"fixed"},ree=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),lo=Oe((t,e)=>{const n=we("AppShell",nee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,navbar:h,withBorder:f,padding:p,transitionDuration:m,transitionTimingFunction:v,header:b,zIndex:x,layout:w,disabled:A,aside:j,footer:C,offsetScrollbars:_=!0,mode:S,mod:O,attributes:E,id:D,...N}=n,I=lt({name:"AppShell",classes:Gh,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:E,vars:u,varsResolver:ree}),R=tee({disabled:A,transitionDuration:m}),L=ki(D);return a.jsxs(VJ,{value:{getStyles:I,withBorder:f,zIndex:x,disabled:A,offsetScrollbars:_,mode:S},children:[a.jsx(eee,{navbar:h,header:b,aside:j,footer:C,padding:p,mode:S,selector:S==="static"?`#${L}`:void 0}),a.jsx(ve,{ref:e,...I("root"),mod:[{resizing:R,layout:w,disabled:A,mode:S},O],id:L,...N})]})});lo.classes=Gh;lo.displayName="@mantine/core/AppShell";lo.Navbar=dO;lo.Header=uO;lo.Main=hO;lo.Aside=lO;lo.Footer=cO;lo.Section=fO;function A7(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>A7(e))}:t}function w7(t){return t?t.map(e=>A7(e)):[]}function pO(t){return t.reduce((e,n)=>"group"in n?{...e,...pO(n.items)}:(e[n.value]=n,e),{})}var zs={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const iee={error:null},see=(t,{size:e,color:n})=>({chevron:{"--combobox-chevron-size":$t(e,"combobox-chevron-size"),"--combobox-chevron-color":n?hr(n,t):void 0}}),fw=Oe((t,e)=>{const n=we("ComboboxChevron",iee,t),{size:r,error:i,style:s,className:o,classNames:l,styles:u,unstyled:h,vars:f,mod:p,...m}=n,v=lt({name:"ComboboxChevron",classes:zs,props:n,style:s,className:o,classNames:l,styles:u,unstyled:h,vars:f,varsResolver:see,rootSelector:"chevron"});return a.jsx(ve,{component:"svg",...m,...v("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},p],ref:e,children:a.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});fw.classes=zs;fw.displayName="@mantine/core/ComboboxChevron";const[aee,wo]=Wi("Combobox component was not found in tree"),mO=M.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:r,...i},s)=>a.jsx(Mr.ClearButton,{ref:s,tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:o=>{o.preventDefault(),e==null||e(o)},onClick:o=>{r(),n==null||n(o)}}));mO.displayName="@mantine/core/ComboboxClearButton";const gO=Oe((t,e)=>{const{classNames:n,styles:r,className:i,style:s,hidden:o,...l}=we("ComboboxDropdown",null,t),u=wo();return a.jsx(Zn.Dropdown,{...l,ref:e,role:"presentation","data-hidden":o||void 0,...u.getStyles("dropdown",{className:i,style:s,classNames:n,styles:r})})});gO.classes=zs;gO.displayName="@mantine/core/ComboboxDropdown";const oee={refProp:"ref"},S7=Oe((t,e)=>{const{children:n,refProp:r}=we("ComboboxDropdownTarget",oee,t);if(wo(),!Rk(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return a.jsx(Zn.Target,{ref:e,refProp:r,children:n})});S7.displayName="@mantine/core/ComboboxDropdownTarget";const vO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("ComboboxEmpty",null,t),u=wo();return a.jsx(ve,{ref:e,...u.getStyles("empty",{className:r,classNames:n,styles:s,style:i}),...l})});vO.classes=zs;vO.displayName="@mantine/core/ComboboxEmpty";function bO({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:s}){const o=wo(),[l,u]=M.useState(null),h=p=>{if(t==null||t(p),!o.readOnly&&e){if(p.nativeEvent.isComposing)return;if(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),o.store.dropdownOpened?u(o.store.selectNextOption()):(o.store.openDropdown("keyboard"),u(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),o.store.dropdownOpened?u(o.store.selectPreviousOption()):(o.store.openDropdown("keyboard"),u(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter"){if(p.nativeEvent.keyCode===229)return;const m=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&m!==-1?(p.preventDefault(),o.store.clickSelectedOption()):i==="button"&&(p.preventDefault(),o.store.openDropdown("keyboard"))}p.key==="Escape"&&o.store.closeDropdown("keyboard"),p.nativeEvent.code==="Space"&&i==="button"&&(p.preventDefault(),o.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&l||void 0,autoComplete:s,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:h}}const lee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},j7=Oe((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:s,withExpandedAttribute:o,targetType:l,autoComplete:u,...h}=we("ComboboxEventsTarget",lee,t),f=_f(n);if(!f)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=wo(),m=bO({targetType:l,withAriaAttributes:s,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:f.props.onKeyDown,autoComplete:u});return M.cloneElement(f,{...m,...h,[r]:cr(e,p.store.targetRef,WA(f))})});j7.displayName="@mantine/core/ComboboxEventsTarget";const yO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("ComboboxFooter",null,t),u=wo();return a.jsx(ve,{ref:e,...u.getStyles("footer",{className:r,classNames:n,style:i,styles:s}),...l,onMouseDown:h=>{h.preventDefault()}})});yO.classes=zs;yO.displayName="@mantine/core/ComboboxFooter";const xO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,children:l,label:u,id:h,...f}=we("ComboboxGroup",null,t),p=wo(),m=ki(h);return a.jsxs(ve,{ref:e,role:"group","aria-labelledby":u?m:void 0,...p.getStyles("group",{className:r,classNames:n,style:i,styles:s}),...f,children:[u&&a.jsx("div",{id:m,...p.getStyles("groupLabel",{classNames:n,styles:s}),children:u}),l]})});xO.classes=zs;xO.displayName="@mantine/core/ComboboxGroup";const AO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("ComboboxHeader",null,t),u=wo();return a.jsx(ve,{ref:e,...u.getStyles("header",{className:r,classNames:n,style:i,styles:s}),...l,onMouseDown:h=>{h.preventDefault()}})});AO.classes=zs;AO.displayName="@mantine/core/ComboboxHeader";function C7({value:t,valuesDivider:e=",",...n}){return a.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}C7.displayName="@mantine/core/ComboboxHiddenInput";const wO=Oe((t,e)=>{const n=we("ComboboxOption",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,onClick:u,id:h,active:f,onMouseDown:p,onMouseOver:m,disabled:v,selected:b,mod:x,...w}=n,A=wo(),j=M.useId(),C=h||j;return a.jsx(ve,{...A.getStyles("option",{className:i,classNames:r,styles:o,style:s}),...w,ref:e,id:C,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":v,"combobox-selected":b},x],role:"option",onClick:_=>{var S;v?_.preventDefault():((S=A.onOptionSubmit)==null||S.call(A,n.value,n),u==null||u(_))},onMouseDown:_=>{_.preventDefault(),p==null||p(_)},onMouseOver:_=>{A.resetSelectionOnOptionHover&&A.store.resetSelectedOption(),m==null||m(_)}})});wO.classes=zs;wO.displayName="@mantine/core/ComboboxOption";const SO=Oe((t,e)=>{const n=we("ComboboxOptions",null,t),{classNames:r,className:i,style:s,styles:o,id:l,onMouseDown:u,labelledBy:h,...f}=n,p=wo(),m=ki(l);return M.useEffect(()=>{p.store.setListId(m)},[m]),a.jsx(ve,{ref:e,...p.getStyles("options",{className:i,style:s,classNames:r,styles:o}),...f,id:m,role:"listbox","aria-labelledby":h,onMouseDown:v=>{v.preventDefault(),u==null||u(v)}})});SO.classes=zs;SO.displayName="@mantine/core/ComboboxOptions";const cee={withAriaAttributes:!0,withKeyboardNavigation:!0},jO=Oe((t,e)=>{const n=we("ComboboxSearch",cee,t),{classNames:r,styles:i,unstyled:s,vars:o,withAriaAttributes:l,onKeyDown:u,withKeyboardNavigation:h,size:f,...p}=n,m=wo(),v=m.getStyles("search"),b=bO({targetType:"input",withAriaAttributes:l,withKeyboardNavigation:h,withExpandedAttribute:!1,onKeyDown:u,autoComplete:"off"});return a.jsx(Mr,{ref:cr(e,m.store.searchRef),classNames:[{input:v.className},r],styles:[{input:v.style},i],size:f||m.size,...b,...p,__staticSelector:"Combobox"})});jO.classes=zs;jO.displayName="@mantine/core/ComboboxSearch";const uee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},_7=Oe((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:s,withExpandedAttribute:o,targetType:l,autoComplete:u,...h}=we("ComboboxTarget",uee,t),f=_f(n);if(!f)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=wo(),m=bO({targetType:l,withAriaAttributes:s,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:f.props.onKeyDown,autoComplete:u}),v=M.cloneElement(f,{...m,...h});return a.jsx(Zn.Target,{ref:cr(e,p.store.targetRef),children:v})});_7.displayName="@mantine/core/ComboboxTarget";function hee(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function dee(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function fee(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function pw({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:s=!0,scrollBehavior:o="instant"}={}){const[l,u]=Ui({value:e,defaultValue:t,finalValue:!1,onChange:n}),h=M.useRef(null),f=M.useRef(-1),p=M.useRef(null),m=M.useRef(null),v=M.useRef(-1),b=M.useRef(-1),x=M.useRef(-1),w=M.useCallback((P="unknown")=>{l||(u(!0),i==null||i(P))},[u,i,l]),A=M.useCallback((P="unknown")=>{l&&(u(!1),r==null||r(P))},[u,r,l]),j=M.useCallback((P="unknown")=>{l?A(P):w(P)},[A,w,l]),C=M.useCallback(()=>{const P=Yu(m.current),F=q1(`#${h.current} [data-combobox-selected]`,P);F==null||F.removeAttribute("data-combobox-selected"),F==null||F.removeAttribute("aria-selected")},[]),_=M.useCallback(P=>{const F=Yu(m.current),U=q1(`#${h.current}`,F),Z=U?Xu("[data-combobox-option]",U):null;if(!Z)return null;const G=P>=Z.length?0:P<0?Z.length-1:P;return f.current=G,Z!=null&&Z[G]&&!Z[G].hasAttribute("data-combobox-disabled")?(C(),Z[G].setAttribute("data-combobox-selected","true"),Z[G].setAttribute("aria-selected","true"),Z[G].scrollIntoView({block:"nearest",behavior:o}),Z[G].id):null},[o,C]),S=M.useCallback(()=>{const P=Yu(m.current),F=q1(`#${h.current} [data-combobox-active]`,P);if(F){const Z=Xu(`#${h.current} [data-combobox-option]`,P).findIndex(G=>G===F);return _(Z)}return _(0)},[_]),O=M.useCallback(()=>{const P=Yu(m.current),F=Xu(`#${h.current} [data-combobox-option]`,P);return _(dee(f.current,F,s))},[_,s]),E=M.useCallback(()=>{const P=Yu(m.current),F=Xu(`#${h.current} [data-combobox-option]`,P);return _(hee(f.current,F,s))},[_,s]),D=M.useCallback(()=>{const P=Yu(m.current),F=Xu(`#${h.current} [data-combobox-option]`,P);return _(fee(F))},[_]),N=M.useCallback((P="selected",F)=>{x.current=window.setTimeout(()=>{var W;const U=Yu(m.current),Z=Xu(`#${h.current} [data-combobox-option]`,U),G=Z.findIndex(X=>X.hasAttribute(`data-combobox-${P}`));f.current=G,F!=null&&F.scrollIntoView&&((W=Z[G])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),I=M.useCallback(()=>{f.current=-1,C()},[C]),R=M.useCallback(()=>{const P=Yu(m.current),F=Xu(`#${h.current} [data-combobox-option]`,P),U=F==null?void 0:F[f.current];U==null||U.click()},[]),L=M.useCallback(P=>{h.current=P},[]),Q=M.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),z=M.useCallback(()=>{b.current=window.setTimeout(()=>{var P;return(P=m.current)==null?void 0:P.focus()},0)},[]),H=M.useCallback(()=>f.current,[]);return M.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(x.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:A,toggleDropdown:j,selectedOptionIndex:f.current,getSelectedOptionIndex:H,selectOption:_,selectFirstOption:D,selectActiveOption:S,selectNextOption:O,selectPreviousOption:E,resetSelectedOption:I,updateSelectedOptionIndex:N,listId:h.current,setListId:L,clickSelectedOption:R,searchRef:p,focusSearchInput:Q,targetRef:m,focusTarget:z}}const pee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},mee=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":kr(e),"--combobox-option-padding":$t(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:fe(n),"--combobox-option-fz":kr(e),"--combobox-option-padding":$t(e,"combobox-option-padding")}});function ln(t){const e=we("Combobox",pee,t),{classNames:n,styles:r,unstyled:i,children:s,store:o,vars:l,onOptionSubmit:u,onClose:h,size:f,dropdownPadding:p,resetSelectionOnOptionHover:m,__staticSelector:v,readOnly:b,attributes:x,...w}=e,A=pw(),j=o||A,C=lt({name:v||"Combobox",classes:zs,props:e,classNames:n,styles:r,unstyled:i,attributes:x,vars:l,varsResolver:mee}),_=()=>{h==null||h(),j.closeDropdown()};return a.jsx(aee,{value:{getStyles:C,store:j,onOptionSubmit:u,size:f,resetSelectionOnOptionHover:m,readOnly:b},children:a.jsx(Zn,{opened:j.dropdownOpened,preventPositionChangeWhenVisible:!1,...w,onChange:S=>!S&&_(),withRoles:!1,unstyled:i,children:s})})}const gee=t=>t;ln.extend=gee;ln.classes=zs;ln.displayName="@mantine/core/Combobox";ln.Target=_7;ln.Dropdown=gO;ln.Options=SO;ln.Option=wO;ln.Search=jO;ln.Empty=vO;ln.Chevron=fw;ln.Footer=yO;ln.Header=AO;ln.EventsTarget=j7;ln.DropdownTarget=S7;ln.Group=xO;ln.ClearButton=mO;ln.HiddenInput=C7;var T7={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const k7=T7,CO=M.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:i,unstyled:s,children:o,label:l,description:u,id:h,disabled:f,error:p,size:m,labelPosition:v="left",bodyElement:b="div",labelElement:x="label",variant:w,style:A,vars:j,mod:C,attributes:_,...S},O)=>{const E=lt({name:t,props:e,className:n,style:A,classes:T7,classNames:r,styles:i,unstyled:s,attributes:_});return a.jsx(ve,{...E("root"),ref:O,__vars:{"--label-fz":kr(m),"--label-lh":$t(m,"label-lh")},mod:[{"label-position":v},C],variant:w,size:m,...S,children:a.jsxs(ve,{component:b,htmlFor:b==="label"?h:void 0,...E("body"),children:[o,a.jsxs("div",{...E("labelWrapper"),"data-disabled":f||void 0,children:[l&&a.jsx(ve,{component:x,htmlFor:x==="label"?h:void 0,...E("label"),"data-disabled":f||void 0,children:l}),u&&a.jsx(Mr.Description,{size:m,__inheritStyles:!1,...E("description"),children:u}),p&&typeof p!="boolean"&&a.jsx(Mr.Error,{size:m,__inheritStyles:!1,...E("error"),children:p})]})]})})});CO.displayName="@mantine/core/InlineInput";var O7={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const E7=M.createContext(null),vee=E7.Provider,M7=()=>M.useContext(E7),[bee,yee]=Vh();var D7={card:"m_26775b0a"};const xee={withBorder:!0},Aee=(t,{radius:e})=>({card:{"--card-radius":Jn(e)}}),_O=Oe((t,e)=>{const n=we("CheckboxCard",xee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,checked:h,mod:f,withBorder:p,value:m,onClick:v,defaultChecked:b,onChange:x,attributes:w,...A}=n,j=lt({name:"CheckboxCard",classes:D7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:w,vars:u,varsResolver:Aee,rootSelector:"card"}),C=M7(),_=typeof h=="boolean"?h:C?C.value.includes(m||""):void 0,[S,O]=Ui({value:_,defaultValue:b,finalValue:!1,onChange:x});return a.jsx(bee,{value:{checked:S},children:a.jsx(Rr,{ref:e,mod:[{"with-border":p,checked:S},f],...j("card"),...A,role:"checkbox","aria-checked":S,onClick:E=>{v==null||v(E),C==null||C.onChange(m||""),O(!S)}})})});_O.displayName="@mantine/core/CheckboxCard";_O.classes=D7;function R7({children:t,role:e}){const n=Um();return n?a.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):a.jsx(a.Fragment,{children:t})}const TO=Oe((t,e)=>{const{value:n,defaultValue:r,onChange:i,size:s,wrapperProps:o,children:l,readOnly:u,disabled:h,...f}=we("CheckboxGroup",null,t),[p,m]=Ui({value:n,defaultValue:r,finalValue:[],onChange:i}),v=b=>{const x=typeof b=="string"?b:b.currentTarget.value;!u&&m(p.includes(x)?p.filter(w=>w!==x):[...p,x])};return a.jsx(vee,{value:{value:p,onChange:v,size:s,disabled:h},children:a.jsx(Mr.Wrapper,{size:s,ref:e,...o,...f,labelElement:"div",__staticSelector:"CheckboxGroup",children:a.jsx(R7,{role:"group",children:l})})})});TO.classes=Mr.Wrapper.classes;TO.displayName="@mantine/core/CheckboxGroup";function mw({size:t,style:e,...n}){const r=t!==void 0?{width:fe(t),height:fe(t),...e}:e;return a.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,children:a.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function N7({indeterminate:t,...e}){return t?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:a.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):a.jsx(mw,{...e})}var P7={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const wee={icon:N7,variant:"filled"},See=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const l=au({color:n||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":$t(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Jn(e),"--checkbox-color":s==="outline"?u:hr(n,t),"--checkbox-icon-color":i?hr(i,t):zm(o,t)?Yh({color:n,theme:t,autoContrast:o}):void 0}}},kO=Oe((t,e)=>{const n=we("CheckboxIndicator",wee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,icon:h,indeterminate:f,radius:p,color:m,iconColor:v,autoContrast:b,checked:x,mod:w,variant:A,disabled:j,attributes:C,..._}=n,S=lt({name:"CheckboxIndicator",classes:P7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:C,vars:u,varsResolver:See,rootSelector:"indicator"}),O=yee(),E=typeof x=="boolean"||typeof f=="boolean"?x||f:(O==null?void 0:O.checked)||!1;return a.jsx(ve,{ref:e,...S("indicator",{variant:A}),variant:A,mod:[{checked:E,disabled:j},w],..._,children:a.jsx(h,{indeterminate:f,...S("icon")})})});kO.displayName="@mantine/core/CheckboxIndicator";kO.classes=P7;const jee={labelPosition:"right",icon:N7,variant:"filled"},Cee=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const l=au({color:n||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":$t(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Jn(e),"--checkbox-color":s==="outline"?u:hr(n,t),"--checkbox-icon-color":i?hr(i,t):zm(o,t)?Yh({color:n,theme:t,autoContrast:o}):void 0}}},na=Oe((t,e)=>{const n=we("Checkbox",jee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,color:h,label:f,id:p,size:m,radius:v,wrapperProps:b,checked:x,labelPosition:w,description:A,error:j,disabled:C,variant:_,indeterminate:S,icon:O,rootRef:E,iconColor:D,onChange:N,autoContrast:I,mod:R,attributes:L,...Q}=n,z=M7(),H=m||(z==null?void 0:z.size),P=lt({name:"Checkbox",props:n,classes:O7,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:L,vars:u,varsResolver:Cee}),{styleProps:F,rest:U}=Vv(Q),Z=ki(p),G={checked:(z==null?void 0:z.value.includes(U.value))??x,onChange:V=>{z==null||z.onChange(V),N==null||N(V)},disabled:(z==null?void 0:z.disabled)??C},W=M.useRef(null),X=e||W;return M.useEffect(()=>{X&&"current"in X&&X.current&&(X.current.indeterminate=S||!1,S?X.current.setAttribute("data-indeterminate","true"):X.current.removeAttribute("data-indeterminate"))},[S,X]),a.jsx(CO,{...P("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:Z,size:H,labelPosition:w,label:f,description:A,error:j,disabled:G.disabled,classNames:r,styles:o,unstyled:l,"data-checked":G.checked||x||void 0,variant:_,ref:E,mod:R,inert:U.inert,...F,...b,children:a.jsxs(ve,{...P("inner"),mod:{"data-label-position":w},children:[a.jsx(ve,{component:"input",id:Z,ref:X,mod:{error:!!j},...P("input",{focusable:!0,variant:_}),...U,...G,inert:U.inert,type:"checkbox"}),a.jsx(O,{indeterminate:S,...P("icon")})]})})});na.classes={...O7,...k7};na.displayName="@mantine/core/Checkbox";na.Group=TO;na.Indicator=kO;na.Card=_O;function Jg(t){return"group"in t}function I7({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),i=[];for(let s=0;s<t.length;s+=1){const o=t[s];if(i.length===n)return i;Jg(o)&&i.push({group:o.group,items:I7({options:o.items,search:e,limit:n-i.length})}),Jg(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function _ee(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function B7(t,e=new Set){if(Array.isArray(t))for(const n of t)if(Jg(n))B7(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function Tee(t,e){return Array.isArray(t)?t.includes(e):t===e}function L7({data:t,withCheckIcon:e,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:s,renderOption:o}){if(!Jg(t)){const u=Tee(r,t.value),h=e&&(u?a.jsx(mw,{className:zs.optionsDropdownCheckIcon}):n?a.jsx("div",{className:zs.optionsDropdownCheckPlaceholder}):null),f=a.jsxs(a.Fragment,{children:[i==="left"&&h,a.jsx("span",{children:t.label}),i==="right"&&h]});return a.jsx(ln.Option,{value:t.value,disabled:t.disabled,className:Ir({[zs.optionsDropdownOption]:!s}),"data-reverse":i==="right"||void 0,"data-checked":u||void 0,"aria-selected":u,active:u,children:typeof o=="function"?o({option:t,checked:u}):f})}const l=t.items.map(u=>a.jsx(L7,{data:u,value:r,unstyled:s,withCheckIcon:e,withAlignedLabels:n,checkIconPosition:i,renderOption:o},u.value));return a.jsx(ln.Group,{label:t.group,children:l})}function F7({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:i,limit:s,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:u=!0,withCheckIcon:h=!1,withAlignedLabels:f=!1,value:p,checkIconPosition:m,nothingFoundMessage:v,unstyled:b,labelId:x,renderOption:w,scrollAreaProps:A,"aria-label":j}){B7(t);const _=typeof i=="string"?(r||I7)({options:t,search:u?i:"",limit:s??1/0}):t,S=_ee(_),O=_.map(E=>a.jsx(L7,{data:E,withCheckIcon:h,withAlignedLabels:f,value:p,checkIconPosition:m,unstyled:b,renderOption:w},Jg(E)?E.group:E.value));return a.jsx(ln.Dropdown,{hidden:e||n&&S,"data-composed":!0,children:a.jsxs(ln.Options,{labelledBy:x,"aria-label":j,children:[l?a.jsx(La.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...A,children:O}):O,S&&v&&a.jsx(ln.Empty,{children:v})]})})}const OO=Oe((t,e)=>{const n=we("Autocomplete",null,t),{classNames:r,styles:i,unstyled:s,vars:o,dropdownOpened:l,defaultDropdownOpened:u,onDropdownClose:h,onDropdownOpen:f,onFocus:p,onBlur:m,onClick:v,onChange:b,data:x,value:w,defaultValue:A,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:_,comboboxProps:S,readOnly:O,disabled:E,filter:D,limit:N,withScrollArea:I,maxDropdownHeight:R,size:L,id:Q,renderOption:z,autoComplete:H,scrollAreaProps:P,onClear:F,clearButtonProps:U,error:Z,clearable:G,rightSection:W,autoSelectOnBlur:X,openOnFocus:V=!0,attributes:te,...le}=n,be=ki(Q),ye=w7(x),Xe=pO(ye),[ze,Re]=Ui({value:w,defaultValue:A,finalValue:"",onChange:b}),ae=pw({opened:l,defaultOpened:u,onDropdownOpen:()=>{f==null||f(),C&&ae.selectFirstOption()},onDropdownClose:()=>{h==null||h(),setTimeout(ae.resetSelectedOption,0)}}),je=We=>{Re(We),ae.resetSelectedOption()},{resolvedClassNames:pe,resolvedStyles:ke}=bo({props:n,styles:i,classNames:r});M.useEffect(()=>{j&&ae.selectFirstOption()},[j,ze]);const gt=a.jsx(ln.ClearButton,{...U,onClear:()=>{je(""),F==null||F()}});return a.jsxs(ln,{store:ae,__staticSelector:"Autocomplete",classNames:pe,styles:ke,unstyled:s,readOnly:O,size:L,attributes:te,keepMounted:X,onOptionSubmit:We=>{_==null||_(We),je(Xe[We].label),ae.closeDropdown()},...S,children:[a.jsx(ln.Target,{autoComplete:H,children:a.jsx(Fa,{ref:e,...le,size:L,__staticSelector:"Autocomplete",__clearSection:gt,__clearable:G&&!!ze&&!E&&!O,rightSection:W,disabled:E,readOnly:O,value:ze,error:Z,onChange:We=>{je(We.currentTarget.value),ae.openDropdown(),j&&ae.selectFirstOption()},onFocus:We=>{V&&ae.openDropdown(),p==null||p(We)},onBlur:We=>{X&&ae.clickSelectedOption(),ae.closeDropdown(),m==null||m(We)},onClick:We=>{ae.openDropdown(),v==null||v(We)},classNames:pe,styles:ke,unstyled:s,attributes:te,id:be})}),a.jsx(F7,{data:ye,hidden:O||E,filter:D,search:ze,limit:N,hiddenWhenEmpty:!0,withScrollArea:I,maxDropdownHeight:R,unstyled:s,labelId:le.label?`${be}-label`:void 0,"aria-label":le.label?void 0:le["aria-label"],renderOption:z,scrollAreaProps:P})]})});OO.classes={...Fa.classes,...ln.classes};OO.displayName="@mantine/core/Autocomplete";var H7={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const kee=(t,{radius:e,color:n,gradient:r,variant:i,size:s,autoContrast:o,circle:l})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--badge-height":$t(s,"badge-height"),"--badge-padding-x":$t(s,"badge-padding-x"),"--badge-fz":$t(s,"badge-fz"),"--badge-radius":l||e===void 0?void 0:Jn(e),"--badge-bg":n||i?u.background:void 0,"--badge-color":n||i?u.color:void 0,"--badge-bd":n||i?u.border:void 0,"--badge-dot-color":i==="dot"?hr(n,t):void 0}}},Hr=Vi((t,e)=>{const n=we("Badge",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,radius:h,color:f,gradient:p,leftSection:m,rightSection:v,children:b,variant:x,fullWidth:w,autoContrast:A,circle:j,mod:C,attributes:_,...S}=n,O=lt({name:"Badge",props:n,classes:H7,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:_,vars:u,varsResolver:kee});return a.jsxs(ve,{variant:x,mod:[{block:w,circle:j,"with-right-section":!!v,"with-left-section":!!m},C],...O("root",{variant:x}),ref:e,...S,children:[m&&a.jsx("span",{...O("section"),"data-position":"left",children:m}),a.jsx("span",{...O("label"),children:b}),v&&a.jsx("span",{...O("section"),"data-position":"right",children:v})]})});Hr.classes=H7;Hr.displayName="@mantine/core/Badge";var z7={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const Oee=(t,{color:e,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:s})=>({root:{"--burger-color":e?hr(e,t):void 0,"--burger-size":$t(n,"burger-size"),"--burger-line-size":r?fe(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":s}}),EO=Oe((t,e)=>{const n=we("Burger",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,opened:h,children:f,transitionDuration:p,transitionTimingFunction:m,lineSize:v,attributes:b,...x}=n,w=lt({name:"Burger",classes:z7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:u,varsResolver:Oee});return a.jsxs(Rr,{...w("root"),ref:e,...x,children:[a.jsx(ve,{mod:["reduce-motion",{opened:h}],...w("burger")}),f]})});EO.classes=z7;EO.displayName="@mantine/core/Burger";var Vm={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const mR={orientation:"horizontal"},Eee=(t,{borderWidth:e})=>({group:{"--button-border-width":fe(e)}}),MO=Oe((t,e)=>{const n=we("ButtonGroup",mR,t),{className:r,style:i,classNames:s,styles:o,unstyled:l,orientation:u,vars:h,borderWidth:f,variant:p,mod:m,attributes:v,...b}=we("ButtonGroup",mR,t),x=lt({name:"ButtonGroup",props:n,classes:Vm,className:r,style:i,classNames:s,styles:o,unstyled:l,attributes:v,vars:h,varsResolver:Eee,rootSelector:"group"});return a.jsx(ve,{...x("group"),ref:e,variant:p,mod:[{"data-orientation":u},m],role:"group",...b})});MO.classes=Vm;MO.displayName="@mantine/core/ButtonGroup";const Mee=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":$t(o,"section-height"),"--section-padding-x":$t(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?kr(o.replace("compact-","")):kr(o),"--section-radius":e===void 0?void 0:Jn(e),"--section-bg":n||i?l.background:void 0,"--section-color":l.color,"--section-bd":n||i?l.border:void 0}}},DO=Oe((t,e)=>{const n=we("ButtonGroupSection",null,t),{className:r,style:i,classNames:s,styles:o,unstyled:l,vars:u,variant:h,gradient:f,radius:p,autoContrast:m,attributes:v,...b}=n,x=lt({name:"ButtonGroupSection",props:n,classes:Vm,className:r,style:i,classNames:s,styles:o,unstyled:l,attributes:v,vars:u,varsResolver:Mee,rootSelector:"groupSection"});return a.jsx(ve,{...x("groupSection"),ref:e,variant:h,...b})});DO.classes=Vm;DO.displayName="@mantine/core/ButtonGroupSection";const Dee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${fe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Ree=(t,{radius:e,color:n,gradient:r,variant:i,size:s,justify:o,autoContrast:l})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":$t(s,"button-height"),"--button-padding-x":$t(s,"button-padding-x"),"--button-fz":s!=null&&s.includes("compact")?kr(s.replace("compact-","")):kr(s),"--button-radius":e===void 0?void 0:Jn(e),"--button-bg":n||i?u.background:void 0,"--button-hover":n||i?u.hover:void 0,"--button-color":u.color,"--button-bd":n||i?u.border:void 0,"--button-hover-color":n||i?u.hoverColor:void 0}}},_s=Vi((t,e)=>{const n=we("Button",null,t),{style:r,vars:i,className:s,color:o,disabled:l,children:u,leftSection:h,rightSection:f,fullWidth:p,variant:m,radius:v,loading:b,loaderProps:x,gradient:w,classNames:A,styles:j,unstyled:C,"data-disabled":_,autoContrast:S,mod:O,attributes:E,...D}=n,N=lt({name:"Button",props:n,classes:Vm,className:s,style:r,classNames:A,styles:j,unstyled:C,attributes:E,vars:i,varsResolver:Ree}),I=!!h,R=!!f;return a.jsxs(Rr,{ref:e,...N("root",{active:!l&&!b&&!_}),unstyled:C,variant:m,disabled:l||b,mod:[{disabled:l||_,loading:b,block:p,"with-left-section":I,"with-right-section":R},O],...D,children:[typeof b=="boolean"&&a.jsx(Kl,{mounted:b,transition:Dee,duration:150,children:L=>a.jsx(ve,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:a.jsx(Zl,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...x})})}),a.jsxs("span",{...N("inner"),children:[h&&a.jsx(ve,{component:"span",...N("section"),mod:{position:"left"},children:h}),a.jsx(ve,{component:"span",mod:{loading:b},...N("label"),children:u}),f&&a.jsx(ve,{component:"span",...N("section"),mod:{position:"right"},children:f})]})]})});_s.classes=Vm;_s.displayName="@mantine/core/Button";_s.Group=MO;_s.GroupSection=DO;const[Nee,Pee]=Wi("Card component was not found in tree");var RO={root:"m_e615b15f",section:"m_599a2148"};const gw=Vi((t,e)=>{const n=we("CardSection",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,withBorder:u,inheritPadding:h,mod:f,...p}=n,m=Pee();return a.jsx(ve,{ref:e,mod:[{"with-border":u,"inherit-padding":h},f],...m.getStyles("section",{className:i,style:s,styles:o,classNames:r}),...p})});gw.classes=RO;gw.displayName="@mantine/core/CardSection";const Iee=(t,{padding:e})=>({root:{"--card-padding":zi(e)}}),Kr=Vi((t,e)=>{const n=we("Card",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,children:h,padding:f,attributes:p,...m}=n,v=lt({name:"Card",props:n,classes:RO,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:p,vars:u,varsResolver:Iee}),b=M.Children.toArray(h),x=b.map((w,A)=>typeof w=="object"&&w&&"type"in w&&w.type===gw?M.cloneElement(w,{"data-first-section":A===0||void 0,"data-last-section":A===b.length-1||void 0}):w);return a.jsx(Nee,{value:{getStyles:v},children:a.jsx(lw,{ref:e,unstyled:l,...v("root"),...m,children:x})})});Kr.classes=RO;Kr.displayName="@mantine/core/Card";Kr.Section=gw;var q7={root:"m_4451eb3a"};const ev=Vi((t,e)=>{const n=we("Center",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,inline:h,mod:f,attributes:p,...m}=n,v=lt({name:"Center",props:n,classes:q7,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:p,vars:u});return a.jsx(ve,{ref:e,mod:[{inline:h},f],...v("root"),...m})});ev.classes=q7;ev.displayName="@mantine/core/Center";var $7={root:"m_b183c0a2"};const Bee=(t,{color:e})=>({root:{"--code-bg":e?hr(e,t):void 0}}),NO=Oe((t,e)=>{const n=we("Code",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,color:h,block:f,variant:p,mod:m,attributes:v,...b}=n,x=lt({name:"Code",props:n,classes:$7,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:v,vars:u,varsResolver:Bee});return a.jsx(ve,{component:f?"pre":"code",variant:p,ref:e,mod:[{block:f},m],...x("root"),...b,dir:"ltr"})});NO.classes=$7;NO.displayName="@mantine/core/Code";const Lee={timeout:1e3};function PO(t){const{children:e,timeout:n,value:r,...i}=we("CopyButton",Lee,t),s=Q9({timeout:n}),o=()=>s.copy(r);return a.jsx(a.Fragment,{children:e({copy:o,copied:s.copied,...i})})}PO.displayName="@mantine/core/CopyButton";var Q7={root:"m_3eebeb36",label:"m_9e365f20"};const Fee={orientation:"horizontal"},Hee=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?hr(e,t):void 0,"--divider-border-style":n,"--divider-size":$t(r,"divider-size")}}),Zv=Oe((t,e)=>{const n=we("Divider",Fee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,color:h,orientation:f,label:p,labelPosition:m,mod:v,attributes:b,...x}=n,w=lt({name:"Divider",classes:Q7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:u,varsResolver:Hee});return a.jsx(ve,{ref:e,mod:[{orientation:f,"with-label":!!p},v],...w("root"),...x,role:"separator",children:p&&a.jsx(ve,{component:"span",mod:{position:m},...w("label"),children:p})})});Zv.classes=Q7;Zv.displayName="@mantine/core/Divider";var U7={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const zee={variant:"default"},qee=(t,{radius:e})=>({root:{"--fieldset-radius":e===void 0?void 0:Jn(e)}}),kp=Oe((t,e)=>{const n=we("Fieldset",zee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,legend:h,variant:f,children:p,attributes:m,...v}=n,b=lt({name:"Fieldset",classes:U7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:m,vars:u,varsResolver:qee});return a.jsxs(ve,{component:"fieldset",ref:e,variant:f,...b("root",{variant:f}),...v,children:[h&&a.jsx("legend",{...b("legend",{variant:f}),children:h}),p]})});kp.classes=U7;kp.displayName="@mantine/core/Fieldset";function $ee(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=fe(e),[i,s]=t.split("-");return i==="top"&&(n["--indicator-top"]=r,n["--indicator-translate-y"]="-50%"),i==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),i==="bottom"&&(n["--indicator-bottom"]=r,n["--indicator-translate-y"]="50%"),s==="start"&&(n["--indicator-left"]=r,n["--indicator-translate-x"]="-50%"),s==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),s==="end"&&(n["--indicator-right"]=r,n["--indicator-translate-x"]="50%"),n}var W7={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const Qee={position:"top-end",offset:0},Uee=(t,{color:e,position:n,offset:r,size:i,radius:s,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":e?hr(e,t):void 0,"--indicator-text-color":zm(l,t)?Yh({color:e,theme:t,autoContrast:l}):void 0,"--indicator-size":fe(i),"--indicator-radius":s===void 0?void 0:Jn(s),"--indicator-z-index":o==null?void 0:o.toString(),...$ee(n,r)}}),IO=Oe((t,e)=>{const n=we("Indicator",Qee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,children:h,position:f,offset:p,inline:m,label:v,radius:b,color:x,withBorder:w,disabled:A,processing:j,zIndex:C,autoContrast:_,mod:S,attributes:O,...E}=n,D=lt({name:"Indicator",classes:W7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:O,vars:u,varsResolver:Uee});return a.jsxs(ve,{ref:e,...D("root"),mod:[{inline:m},S],...E,children:[!A&&a.jsx(ve,{mod:{"with-label":!!v,"with-border":w,processing:j},...D("indicator"),children:v}),h]})});IO.classes=W7;IO.displayName="@mantine/core/Indicator";function Ix(){return Ix=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ix.apply(null,arguments)}function BO(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const[Wee,Vee]=Wi("List component was not found in tree");var LO={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const FO=Oe((t,e)=>{const n=we("ListItem",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,icon:u,children:h,mod:f,...p}=n,m=Vee(),v=u||m.icon,b={classNames:r,styles:o};return a.jsx(ve,{...m.getStyles("item",{...b,className:i,style:s}),component:"li",mod:[{"with-icon":!!v,centered:m.center},f],ref:e,...p,children:a.jsxs("div",{...m.getStyles("itemWrapper",b),children:[v&&a.jsx("span",{...m.getStyles("itemIcon",b),children:v}),a.jsx("span",{...m.getStyles("itemLabel",b),children:h})]})})});FO.classes=LO;FO.displayName="@mantine/core/ListItem";const Yee={type:"unordered"},Gee=(t,{size:e,spacing:n})=>({root:{"--list-fz":kr(e),"--list-lh":$9(e),"--list-spacing":zi(n)}}),ir=Oe((t,e)=>{const n=we("List",Yee,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,children:h,type:f,withPadding:p,icon:m,spacing:v,center:b,listStyleType:x,mod:w,attributes:A,...j}=n,C=lt({name:"List",classes:LO,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:A,vars:u,varsResolver:Gee});return a.jsx(Wee,{value:{center:b,icon:m,getStyles:C},children:a.jsx(ve,{...C("root",{style:{listStyleType:x}}),component:f==="unordered"?"ul":"ol",mod:[{"with-padding":p,type:m?"none":x},w],ref:e,...j,children:h})})});ir.classes=LO;ir.displayName="@mantine/core/List";ir.Item=FO;var V7={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const gR={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:vo("overlay")},Xee=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),HO=Oe((t,e)=>{const n=we("LoadingOverlay",gR,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,transitionProps:h,loaderProps:f,overlayProps:p,visible:m,zIndex:v,attributes:b,...x}=n,w=xi(),A=lt({name:"LoadingOverlay",classes:V7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:u,varsResolver:Xee}),j={...gR.overlayProps,...p};return a.jsx(Kl,{transition:"fade",...h,mounted:!!m,children:C=>a.jsxs(ve,{...A("root",{style:C}),ref:e,...x,children:[a.jsx(Zl,{...A("loader"),unstyled:l,...f}),a.jsx(Am,{...j,...A("overlay"),darkHidden:!0,unstyled:l,color:(p==null?void 0:p.color)||w.white}),a.jsx(Am,{...j,...A("overlay"),lightHidden:!0,unstyled:l,color:(p==null?void 0:p.color)||w.colors.dark[5]})]})})});HO.classes=V7;HO.displayName="@mantine/core/LoadingOverlay";const[Kee,Xh]=Wi("Menu component was not found in the tree");var Kh={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const zO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("MenuDivider",null,t),u=Xh();return a.jsx(ve,{ref:e,...u.getStyles("divider",{className:r,style:i,styles:s,classNames:n}),...l})});zO.classes=Kh;zO.displayName="@mantine/core/MenuDivider";const qO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,onMouseEnter:l,onMouseLeave:u,onKeyDown:h,children:f,...p}=we("MenuDropdown",null,t),m=M.useRef(null),v=Xh(),b=qi(h,A=>{var j,C;(A.key==="ArrowUp"||A.key==="ArrowDown")&&(A.preventDefault(),(C=(j=m.current)==null?void 0:j.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),x=qi(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),w=qi(u,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return a.jsxs(Zn.Dropdown,{...p,onMouseEnter:x,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:cr(e,m),...v.getStyles("dropdown",{className:r,style:i,styles:s,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&a.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});qO.classes=Kh;qO.displayName="@mantine/core/MenuDropdown";const[Zee,vw]=Vh(),$O=Vi((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,color:l,closeMenuOnClick:u,leftSection:h,rightSection:f,children:p,disabled:m,"data-disabled":v,...b}=we("MenuItem",null,t),x=Xh(),w=vw(),A=xi(),{dir:j}=Tf(),C=M.useRef(null),_=b,S=qi(_.onClick,()=>{v||(typeof u=="boolean"?u&&x.closeDropdownImmediately():x.closeOnItemClick&&x.closeDropdownImmediately())}),O=l?A.variantColorResolver({color:l,theme:A,variant:"light"}):void 0,E=l?au({color:l,theme:A}):null,D=qi(_.onKeyDown,N=>{N.key==="ArrowLeft"&&w&&(w.close(),w.focusParentItem())});return a.jsxs(Rr,{onMouseDown:N=>N.preventDefault(),...b,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,...x.getStyles("item",{className:r,style:i,styles:s,classNames:n}),ref:cr(C,e),role:"menuitem",disabled:m,"data-menu-item":!0,"data-disabled":m||v||void 0,"data-mantine-stop-propagation":!0,onClick:S,onKeyDown:$A({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:j,orientation:"vertical",onKeyDown:D}),__vars:{"--menu-item-color":E!=null&&E.isThemeColor&&(E==null?void 0:E.shade)===void 0?`var(--mantine-color-${E.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[h&&a.jsx("div",{...x.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"left",children:h}),p&&a.jsx("div",{...x.getStyles("itemLabel",{styles:s,classNames:n}),children:p}),f&&a.jsx("div",{...x.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"right",children:f})]})});$O.classes=Kh;$O.displayName="@mantine/core/MenuItem";const QO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("MenuLabel",null,t),u=Xh();return a.jsx(ve,{ref:e,...u.getStyles("label",{className:r,style:i,styles:s,classNames:n}),...l})});QO.classes=Kh;QO.displayName="@mantine/core/MenuLabel";const UO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,onMouseEnter:l,onMouseLeave:u,onKeyDown:h,children:f,...p}=we("MenuSubDropdown",null,t),m=M.useRef(null),v=Xh(),b=vw(),x=qi(l,b==null?void 0:b.open),w=qi(u,b==null?void 0:b.close);return a.jsx(Zn.Dropdown,{...p,onMouseEnter:x,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:cr(e,m),...v.getStyles("dropdown",{className:r,style:i,styles:s,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:f})});UO.classes=Kh;UO.displayName="@mantine/core/MenuSubDropdown";const WO=Vi((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,color:l,leftSection:u,rightSection:h,children:f,disabled:p,"data-disabled":m,closeMenuOnClick:v,...b}=we("MenuSubItem",null,t),x=Xh(),w=vw(),A=xi(),{dir:j}=Tf(),C=M.useRef(null),_=b,S=l?A.variantColorResolver({color:l,theme:A,variant:"light"}):void 0,O=l?au({color:l,theme:A}):null,E=qi(_.onKeyDown,R=>{R.key==="ArrowRight"&&(w==null||w.open(),w==null||w.focusFirstItem()),R.key==="ArrowLeft"&&(w!=null&&w.parentContext)&&(w.parentContext.close(),w.parentContext.focusParentItem())}),D=qi(_.onClick,()=>{!m&&v&&x.closeDropdownImmediately()}),N=qi(_.onMouseEnter,w==null?void 0:w.open),I=qi(_.onMouseLeave,w==null?void 0:w.close);return a.jsxs(Rr,{onMouseDown:R=>R.preventDefault(),...b,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,...x.getStyles("item",{className:r,style:i,styles:s,classNames:n}),ref:cr(C,e),role:"menuitem",disabled:p,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":p||m||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:N,onMouseLeave:I,onClick:D,onKeyDown:$A({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:j,orientation:"vertical",onKeyDown:E}),__vars:{"--menu-item-color":O!=null&&O.isThemeColor&&(O==null?void 0:O.shade)===void 0?`var(--mantine-color-${O.color}-6)`:S==null?void 0:S.color,"--menu-item-hover":S==null?void 0:S.hover},children:[u&&a.jsx("div",{...x.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"left",children:u}),f&&a.jsx("div",{...x.getStyles("itemLabel",{styles:s,classNames:n}),children:f}),a.jsx("div",{...x.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"right",children:h||a.jsx(Px,{...x.getStyles("chevron"),size:14})})]})});WO.classes=Kh;WO.displayName="@mantine/core/MenuSubItem";function Y7({children:t,refProp:e}){if(!Rk(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return Xh(),a.jsx(Zn.Target,{refProp:e,popupType:"menu",children:t})}Y7.displayName="@mantine/core/MenuSubTarget";const Jee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Ym(t){const{children:e,closeDelay:n,openDelay:r,...i}=we("MenuSub",Jee,t),s=ki(),[o,{open:l,close:u}]=Wv(!1),h=vw(),{openDropdown:f,closeDropdown:p}=v7({open:l,close:u,closeDelay:n,openDelay:r}),m=()=>window.setTimeout(()=>{var b,x;(x=(b=document.getElementById(`${s}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||x.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${s}-target`))==null||b.focus()},16);return a.jsx(Zee,{value:{opened:o,close:p,open:f,focusFirstItem:m,focusParentItem:v,parentContext:h},children:a.jsx(Zn,{opened:o,withinPortal:!1,withArrow:!1,id:s,...i,children:e})})}Ym.extend=t=>t;Ym.displayName="@mantine/core/MenuSub";Ym.Target=Y7;Ym.Dropdown=UO;Ym.Item=WO;const ete={refProp:"ref"},G7=M.forwardRef((t,e)=>{const{children:n,refProp:r,...i}=we("MenuTarget",ete,t),s=_f(n);if(!s)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=Xh(),l=s.props,u=qi(l.onClick,()=>{o.trigger==="click"?o.toggleDropdown():o.trigger==="click-hover"&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),h=qi(l.onMouseEnter,()=>(o.trigger==="hover"||o.trigger==="click-hover")&&o.openDropdown()),f=qi(l.onMouseLeave,()=>{(o.trigger==="hover"||o.trigger==="click-hover"&&!o.openedViaClick)&&o.closeDropdown()});return a.jsx(Zn.Target,{refProp:r,popupType:"menu",ref:e,...i,children:M.cloneElement(s,{onClick:u,onMouseEnter:h,onMouseLeave:f,"data-expanded":o.opened?!0:void 0})})});G7.displayName="@mantine/core/MenuTarget";const tte={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Xn(t){const e=we("Menu",tte,t),{children:n,onOpen:r,onClose:i,opened:s,defaultOpened:o,trapFocus:l,onChange:u,closeOnItemClick:h,loop:f,closeOnEscape:p,trigger:m,openDelay:v,closeDelay:b,classNames:x,styles:w,unstyled:A,variant:j,vars:C,menuItemTabIndex:_,keepMounted:S,withInitialFocusPlaceholder:O,attributes:E,...D}=e,N=lt({name:"Menu",classes:Kh,props:e,classNames:x,styles:w,unstyled:A,attributes:E}),[I,R]=Ui({value:s,defaultValue:o,finalValue:!1,onChange:u}),[L,Q]=M.useState(!1),z=()=>{R(!1),Q(!1),I&&(i==null||i())},H=()=>{R(!0),!I&&(r==null||r())},P=()=>{I?z():H()},{openDropdown:F,closeDropdown:U}=v7({open:H,close:z,closeDelay:b,openDelay:v}),Z=X=>cG("[data-menu-item]","[data-menu-dropdown]",X),{resolvedClassNames:G,resolvedStyles:W}=bo({classNames:x,styles:w,props:e});return a.jsx(Kee,{value:{getStyles:N,opened:I,toggleDropdown:P,getItemIndex:Z,openedViaClick:L,setOpenedViaClick:Q,closeOnItemClick:h,closeDropdown:m==="click"?z:U,openDropdown:m==="click"?H:F,closeDropdownImmediately:z,loop:f,trigger:m,unstyled:A,menuItemTabIndex:_,withInitialFocusPlaceholder:O},children:a.jsx(Zn,{returnFocus:!0,...D,opened:I,onChange:P,defaultOpened:o,trapFocus:S?!1:l,closeOnEscape:p,__staticSelector:"Menu",classNames:G,styles:W,unstyled:A,variant:j,keepMounted:S,children:n})})}Xn.extend=t=>t;Xn.withProps=hL(Xn);Xn.classes=Kh;Xn.displayName="@mantine/core/Menu";Xn.Item=$O;Xn.Label=QO;Xn.Dropdown=qO;Xn.Target=G7;Xn.Divider=zO;Xn.Sub=Ym;var lu={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const[nte,Gm]=Wi("Modal component was not found in tree"),bw=Oe((t,e)=>{const n=we("ModalBody",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,...u}=n,h=Gm();return a.jsx(l7,{ref:e,...h.getStyles("body",{classNames:r,style:s,styles:o,className:i}),...u})});bw.classes=lu;bw.displayName="@mantine/core/ModalBody";const yw=Oe((t,e)=>{const n=we("ModalCloseButton",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,...u}=n,h=Gm();return a.jsx(c7,{ref:e,...h.getStyles("close",{classNames:r,style:s,styles:o,className:i}),...u})});yw.classes=lu;yw.displayName="@mantine/core/ModalCloseButton";const xw=Oe((t,e)=>{const n=we("ModalContent",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,children:u,__hidden:h,...f}=n,p=Gm(),m=p.scrollAreaComponent||jJ;return a.jsx(u7,{...p.getStyles("content",{className:i,style:s,styles:o,classNames:r}),innerProps:p.getStyles("inner",{className:i,style:s,styles:o,classNames:r}),"data-full-screen":p.fullScreen||void 0,"data-modal-content":!0,"data-hidden":h||void 0,ref:e,...f,children:a.jsx(m,{style:{maxHeight:p.fullScreen?"100dvh":`calc(100dvh - (${fe(p.yOffset)} * 2))`},children:u})})});xw.classes=lu;xw.displayName="@mantine/core/ModalContent";const Aw=Oe((t,e)=>{const n=we("ModalHeader",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,...u}=n,h=Gm();return a.jsx(h7,{ref:e,...h.getStyles("header",{classNames:r,style:s,styles:o,className:i}),...u})});Aw.classes=lu;Aw.displayName="@mantine/core/ModalHeader";const ww=Oe((t,e)=>{const n=we("ModalOverlay",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,...u}=n,h=Gm();return a.jsx(d7,{ref:e,...h.getStyles("overlay",{classNames:r,style:s,styles:o,className:i}),...u})});ww.classes=lu;ww.displayName="@mantine/core/ModalOverlay";const rte={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:vo("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},ite=(t,{radius:e,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:Jn(e),"--modal-size":$t(n,"modal-size"),"--modal-y-offset":fe(r),"--modal-x-offset":fe(i)}}),Sw=Oe((t,e)=>{const n=we("ModalRoot",rte,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,yOffset:h,scrollAreaComponent:f,radius:p,fullScreen:m,centered:v,xOffset:b,__staticSelector:x,attributes:w,...A}=n,j=lt({name:x,classes:lu,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:w,vars:u,varsResolver:ite});return a.jsx(nte,{value:{yOffset:h,scrollAreaComponent:f,getStyles:j,fullScreen:m},children:a.jsx(o7,{ref:e,...j("root"),"data-full-screen":m||void 0,"data-centered":v||void 0,"data-offset-scrollbars":f===La.Autosize||void 0,unstyled:l,...A})})});Sw.classes=lu;Sw.displayName="@mantine/core/ModalRoot";const[ste,ate]=Vh();function X7({children:t}){const[e,n]=M.useState([]),[r,i]=M.useState(vo("modal"));return a.jsx(ste,{value:{stack:e,addModal:(s,o)=>{n(l=>[...new Set([...l,s])]),i(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:s=>n(o=>o.filter(l=>l!==s)),getZIndex:s=>`calc(${r} + ${e.indexOf(s)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}X7.displayName="@mantine/core/ModalStack";const jw=Oe((t,e)=>{const n=we("ModalTitle",null,t),{classNames:r,className:i,style:s,styles:o,vars:l,...u}=n,h=Gm();return a.jsx(f7,{ref:e,...h.getStyles("title",{classNames:r,style:s,styles:o,className:i}),...u})});jw.classes=lu;jw.displayName="@mantine/core/ModalTitle";const ote={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:vo("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ha=Oe((t,e)=>{const{title:n,withOverlay:r,overlayProps:i,withCloseButton:s,closeButtonProps:o,children:l,radius:u,opened:h,stackId:f,zIndex:p,...m}=we("Modal",ote,t),v=ate(),b=!!n||s,x=v&&f?{closeOnEscape:v.currentId===f,trapFocus:v.currentId===f,zIndex:v.getZIndex(f)}:{},w=r===!1?!1:f&&v?v.currentId===f:h;return M.useEffect(()=>{v&&f&&(h?v.addModal(f,p||vo("modal")):v.removeModal(f))},[h,f,p]),a.jsxs(Sw,{ref:e,radius:u,opened:h,zIndex:v&&f?v.getZIndex(f):p,...m,...x,children:[r&&a.jsx(ww,{visible:w,transitionProps:v&&f?{duration:0}:void 0,...i}),a.jsxs(xw,{radius:u,__hidden:v&&f&&h?f!==v.currentId:!1,children:[b&&a.jsxs(Aw,{children:[n&&a.jsx(jw,{children:n}),s&&a.jsx(yw,{...o})]}),a.jsx(bw,{children:l})]})]})});Ha.classes=lu;Ha.displayName="@mantine/core/Modal";Ha.Root=Sw;Ha.Overlay=ww;Ha.Content=xw;Ha.Body=bw;Ha.Header=Aw;Ha.Title=jw;Ha.CloseButton=yw;Ha.Stack=X7;const[lte,VO]=Vh();var Cw={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const[cte,ute]=Vh(),hte=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?$t(e):$t(n,"pg-gap")}}),YO=Oe((t,e)=>{const n=we("PillGroup",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,size:h,disabled:f,attributes:p,...m}=n,v=VO(),b=(v==null?void 0:v.size)||h||void 0,x=lt({name:"PillGroup",classes:Cw,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:p,vars:u,varsResolver:hte,stylesCtx:{size:b},rootSelector:"group"});return a.jsx(cte,{value:{size:b,disabled:f},children:a.jsx(ve,{ref:e,size:b,...x("group"),...m})})});YO.classes=Cw;YO.displayName="@mantine/core/PillGroup";const dte={variant:"default"},fte=(t,{radius:e},{size:n})=>({root:{"--pill-fz":$t(n,"pill-fz"),"--pill-height":$t(n,"pill-height"),"--pill-radius":e===void 0?void 0:Jn(e)}}),Wc=Oe((t,e)=>{const n=we("Pill",dte,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,variant:h,children:f,withRemoveButton:p,onRemove:m,removeButtonProps:v,radius:b,size:x,disabled:w,mod:A,attributes:j,...C}=n,_=ute(),S=VO(),O=x||(_==null?void 0:_.size)||void 0,E=(S==null?void 0:S.variant)==="filled"?"contrast":h||"default",D=lt({name:"Pill",classes:Cw,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:j,vars:u,varsResolver:fte,stylesCtx:{size:O}});return a.jsxs(ve,{component:"span",ref:e,variant:E,size:O,...D("root",{variant:E}),mod:[{"with-remove":p&&!w,disabled:w||(_==null?void 0:_.disabled)},A],...C,children:[a.jsx("span",{...D("label"),children:f}),p&&a.jsx(ec,{variant:"transparent",radius:b,tabIndex:-1,"aria-hidden":!0,unstyled:l,...v,...D("remove",{className:v==null?void 0:v.className,style:v==null?void 0:v.style}),onMouseDown:N=>{var I;N.preventDefault(),N.stopPropagation(),(I=v==null?void 0:v.onMouseDown)==null||I.call(v,N)},onClick:N=>{var I;N.stopPropagation(),m==null||m(),(I=v==null?void 0:v.onClick)==null||I.call(v,N)}})]})});Wc.classes=Cw;Wc.displayName="@mantine/core/Pill";Wc.Group=YO;var K7={field:"m_45c4369d"};const pte={type:"visible"},GO=Oe((t,e)=>{const n=we("PillsInputField",pte,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,type:h,disabled:f,id:p,pointer:m,mod:v,attributes:b,...x}=n,w=VO(),A=Um(),j=lt({name:"PillsInputField",classes:K7,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,rootSelector:"field"}),C=f||(w==null?void 0:w.disabled);return a.jsx(ve,{component:"input",ref:cr(e,w==null?void 0:w.fieldRef),"data-type":h,disabled:C,mod:[{disabled:C,pointer:m},v],...j("field"),...x,id:(A==null?void 0:A.inputId)||p,"aria-invalid":w==null?void 0:w.hasError,"aria-describedby":A==null?void 0:A.describedBy,type:"text",onMouseDown:_=>!m&&_.stopPropagation()})});GO.classes=K7;GO.displayName="@mantine/core/PillsInputField";const mte={size:"sm"},Bg=Oe((t,e)=>{const n=we("PillsInput",mte,t),{children:r,onMouseDown:i,onClick:s,size:o,disabled:l,__staticSelector:u,error:h,variant:f,...p}=n,m=M.useRef(null);return a.jsx(lte,{value:{fieldRef:m,size:o,disabled:l,hasError:!!h,variant:f},children:a.jsx(Fa,{size:o,error:h,variant:f,component:"div",ref:e,"data-no-overflow":!0,onMouseDown:v=>{var b;v.preventDefault(),i==null||i(v),(b=m.current)==null||b.focus()},onClick:v=>{var x;v.preventDefault();const b=v.currentTarget.closest("fieldset");b!=null&&b.disabled||((x=m.current)==null||x.focus(),s==null||s(v))},...p,multiline:!0,disabled:l,__staticSelector:u||"PillsInput",withAria:!1,children:r})})});Bg.displayName="@mantine/core/PillsInput";Bg.Field=GO;var Z7={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const gte={withCloseButton:!0},vte=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:Jn(e),"--notification-color":n?hr(n,t):void 0}}),XO=Oe((t,e)=>{const n=we("Notification",gte,t),{className:r,color:i,radius:s,loading:o,withCloseButton:l,withBorder:u,title:h,icon:f,children:p,onClose:m,closeButtonProps:v,classNames:b,style:x,styles:w,unstyled:A,vars:j,mod:C,loaderProps:_,role:S,attributes:O,...E}=n,D=lt({name:"Notification",classes:Z7,props:n,className:r,style:x,classNames:b,styles:w,unstyled:A,attributes:O,vars:j,varsResolver:vte});return a.jsxs(ve,{...D("root"),mod:[{"data-with-icon":!!f||o,"data-with-border":u},C],ref:e,role:S||"alert",...E,children:[f&&!o&&a.jsx("div",{...D("icon"),children:f}),o&&a.jsx(Zl,{size:28,color:i,..._,...D("loader")}),a.jsxs("div",{...D("body"),children:[h&&a.jsx("div",{...D("title"),children:h}),a.jsx(ve,{...D("description"),mod:{"data-with-title":!!h},children:p})]}),l&&a.jsx(ec,{iconSize:16,color:"gray",...v,unstyled:A,onClick:m,...D("closeButton")})]})});XO.classes=Z7;XO.displayName="@mantine/core/Notification";function J7(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var tv;(function(t){t.event="event",t.props="prop"})(tv||(tv={}));function lh(){}function bte(t){var e,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e&&r.length===e.length&&r.every(function(s,o){return s===e[o]})||(e=r,n=t.apply(void 0,r)),n}}function nv(t){return!!(t||"").match(/\d/)}function Lp(t){return t==null}function yte(t){return typeof t=="number"&&isNaN(t)}function eF(t){return Lp(t)||yte(t)||typeof t=="number"&&!isFinite(t)}function tF(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function xte(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Ate(t,e,n){var r=xte(n),i=t.search(/[1-9]/);return i=i===-1?t.length:i,t.substring(0,i)+t.substring(i,t.length).replace(r,"$1"+e)}function wte(t){var e=M.useRef(t);e.current=t;var n=M.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e.current.apply(e,r)});return n.current}function KO(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var i=t.split("."),s=i[0],o=i[1]||"";return{beforeDecimal:s,afterDecimal:o,hasNegation:n,addNegation:r}}function Ste(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")}function nF(t,e,n){for(var r="",i=n?"0":"",s=0;s<=e-1;s++)r+=t[s]||i;return r}function vR(t,e){return Array(e+1).join(t)}function rF(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),i=r[0],s=r[1];if(s=Number(s),!s)return n+i;i=i.replace(".","");var o=1+s,l=i.length;return o<0?i="0."+vR("0",Math.abs(o))+i:o>=l?i=i+vR("0",o-l):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function bR(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,i=KO(t),s=i.beforeDecimal,o=i.afterDecimal,l=i.hasNegation,u=parseFloat("0."+(o||"0")),h=o.length<=e?"0."+o:u.toFixed(e),f=h.split("."),p=s;s&&Number(f[0])&&(p=s.split("").reverse().reduce(function(x,w,A){return x.length>A?(Number(x[0])+Number(w)).toString()+x.substring(1,x.length):w+x},f[0]));var m=nF(f[1]||"",e,n),v=l?"-":"",b=r?".":"";return""+v+p+b+m}function Id(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var iF=bte(function(t,e){for(var n=0,r=0,i=t.length,s=e.length;t[n]===e[n]&&n<i;)n++;for(;t[i-1-r]===e[s-1-r]&&s-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:s-r}}}),jte=function(t,e){var n=Math.min(t.selectionStart,e);return{from:{start:n,end:t.selectionEnd},to:{start:n,end:e}}};function Cte(t,e,n){return Math.min(Math.max(t,e),n)}function fC(t){return Math.max(t.selectionStart,t.selectionEnd)}function _te(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Tte(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function kte(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,i=t.formattedValueIndex;return e[r]===n[i]}function Ote(t,e,n,r,i,s,o){o===void 0&&(o=kte);var l=i.findIndex(function(_){return _}),u=t.slice(0,l);!e&&!n.startsWith(u)&&(e=u,n=u+n,r=r+u.length);for(var h=n.length,f=t.length,p={},m=new Array(h),v=0;v<h;v++){m[v]=-1;for(var b=0,x=f;b<x;b++){var w=o({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:v,formattedValueIndex:b});if(w&&p[b]!==!0){m[v]=b,p[b]=!0;break}}}for(var A=r;A<h&&(m[A]===-1||!s(n[A]));)A++;var j=A===h||m[A]===-1?f:m[A];for(A=r-1;A>0&&m[A]===-1;)A--;var C=A===-1||m[A]===-1?0:m[A]+1;return C>j?j:r-C<j-r?C:j}function yR(t,e,n,r){var i=t.length;if(e=Cte(e,0,i),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=i&&!n[e];)e++;e>i&&(e=n.lastIndexOf(!0))}return e===-1&&(e=i),e}function Ete(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(nv(t[n])||nv(t[n-1]));return e}function sF(t,e,n,r,i,s){s===void 0&&(s=lh);var o=wte(function(b,x){var w,A;return eF(b)?(A="",w=""):typeof b=="number"||x?(A=typeof b=="number"?rF(b):b,w=r(A)):(A=i(b,void 0),w=r(A)),{formattedValue:w,numAsString:A}}),l=M.useState(function(){return o(Lp(t)?e:t,n)}),u=l[0],h=l[1],f=function(b,x){b.formattedValue!==u.formattedValue&&h({formattedValue:b.formattedValue,numAsString:b.value}),s(b,x)},p=t,m=n;Lp(t)&&(p=u.numAsString,m=!0);var v=o(p,m);return M.useMemo(function(){h(v)},[v.formattedValue]),[u,f]}function Mte(t){return t.replace(/[^0-9]/g,"")}function Dte(t){return t}function Rte(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,i=t.renderText,s=t.getInputRef,o=t.format;o===void 0&&(o=Dte);var l=t.removeFormatting;l===void 0&&(l=Mte);var u=t.defaultValue,h=t.valueIsNumericString,f=t.onValueChange,p=t.isAllowed,m=t.onChange;m===void 0&&(m=lh);var v=t.onKeyDown;v===void 0&&(v=lh);var b=t.onMouseUp;b===void 0&&(b=lh);var x=t.onFocus;x===void 0&&(x=lh);var w=t.onBlur;w===void 0&&(w=lh);var A=t.value,j=t.getCaretBoundary;j===void 0&&(j=Ete);var C=t.isValidInputCharacter;C===void 0&&(C=nv);var _=t.isCharacterSame,S=J7(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),O=sF(A,u,!!h,o,l,f),E=O[0],D=E.formattedValue,N=E.numAsString,I=O[1],R=M.useRef(),L=M.useRef({formattedValue:D,numAsString:N}),Q=function(Le,Fe){L.current={formattedValue:Le.formattedValue,numAsString:Le.value},I(Le,Fe)},z=M.useState(!1),H=z[0],P=z[1],F=M.useRef(null),U=M.useRef({setCaretTimeout:null,focusTimeout:null});M.useEffect(function(){return P(!0),function(){clearTimeout(U.current.setCaretTimeout),clearTimeout(U.current.focusTimeout)}},[]);var Z=o,G=function(Le,Fe){var Ne=parseFloat(Fe);return{formattedValue:Le,value:Fe,floatValue:isNaN(Ne)?void 0:Ne}},W=function(Le,Fe,Ne){Le.selectionStart===0&&Le.selectionEnd===Le.value.length||(Id(Le,Fe),U.current.setCaretTimeout=setTimeout(function(){Le.value===Ne&&Le.selectionStart!==Fe&&Id(Le,Fe)},0))},X=function(Le,Fe,Ne){return yR(Le,Fe,j(Le),Ne)},V=function(Le,Fe,Ne){var Ve=j(Fe),qt=Ote(Fe,D,Le,Ne,Ve,C,_);return qt=yR(Fe,qt,Ve),qt},te=function(Le){var Fe=Le.formattedValue;Fe===void 0&&(Fe="");var Ne=Le.input,Ve=Le.source,qt=Le.event,et=Le.numAsString,Je;if(Ne){var Ue=Le.inputValue||Ne.value,Pe=fC(Ne);Ne.value=Fe,Je=V(Ue,Fe,Pe),Je!==void 0&&W(Ne,Je,Fe)}Fe!==D&&Q(G(Fe,et),{event:qt,source:Ve})};M.useEffect(function(){var Le=L.current,Fe=Le.formattedValue,Ne=Le.numAsString;(D!==Fe||N!==Ne)&&Q(G(D,N),{event:void 0,source:tv.props})},[D,N]);var le=F.current?fC(F.current):void 0,be=typeof window<"u"?M.useLayoutEffect:M.useEffect;be(function(){var Le=F.current;if(D!==L.current.formattedValue&&Le){var Fe=V(L.current.formattedValue,D,le);Le.value=D,W(Le,Fe,D)}},[D]);var ye=function(Le,Fe,Ne){var Ve=Fe.target,qt=R.current?jte(R.current,Ve.selectionEnd):iF(D,Le),et=Object.assign(Object.assign({},qt),{lastValue:D}),Je=l(Le,et),Ue=Z(Je);if(Je=l(Ue,void 0),p&&!p(G(Ue,Je))){var Pe=Fe.target,st=fC(Pe),he=V(Le,D,st);return Pe.value=D,W(Pe,he,D),!1}return te({formattedValue:Ue,numAsString:Je,inputValue:Le,event:Fe,source:Ne,input:Fe.target}),!0},Xe=function(Le,Fe){Fe===void 0&&(Fe=0);var Ne=Le.selectionStart,Ve=Le.selectionEnd;R.current={selectionStart:Ne,selectionEnd:Ve+Fe}},ze=function(Le){var Fe=Le.target,Ne=Fe.value,Ve=ye(Ne,Le,tv.event);Ve&&m(Le),R.current=void 0},Re=function(Le){var Fe=Le.target,Ne=Le.key,Ve=Fe.selectionStart,qt=Fe.selectionEnd,et=Fe.value;et===void 0&&(et="");var Je;Ne==="ArrowLeft"||Ne==="Backspace"?Je=Math.max(Ve-1,0):Ne==="ArrowRight"?Je=Math.min(Ve+1,et.length):Ne==="Delete"&&(Je=Ve);var Ue=0;Ne==="Delete"&&Ve===qt&&(Ue=1);var Pe=Ne==="ArrowLeft"||Ne==="ArrowRight";if(Je===void 0||Ve!==qt&&!Pe){v(Le),Xe(Fe,Ue);return}var st=Je;if(Pe){var he=Ne==="ArrowLeft"?"left":"right";st=X(et,Je,he),st!==Je&&Le.preventDefault()}else Ne==="Delete"&&!C(et[Je])?st=X(et,Je,"right"):Ne==="Backspace"&&!C(et[Je])&&(st=X(et,Je,"left"));st!==Je&&W(Fe,st,et),v(Le),Xe(Fe,Ue)},ae=function(Le){var Fe=Le.target,Ne=function(){var Ve=Fe.selectionStart,qt=Fe.selectionEnd,et=Fe.value;if(et===void 0&&(et=""),Ve===qt){var Je=X(et,Ve);Je!==Ve&&W(Fe,Je,et)}};Ne(),requestAnimationFrame(function(){Ne()}),b(Le),Xe(Fe)},je=function(Le){Le.persist&&Le.persist();var Fe=Le.target,Ne=Le.currentTarget;F.current=Fe,U.current.focusTimeout=setTimeout(function(){var Ve=Fe.selectionStart,qt=Fe.selectionEnd,et=Fe.value;et===void 0&&(et="");var Je=X(et,Ve);Je!==Ve&&!(Ve===0&&qt===et.length)&&W(Fe,Je,et),x(Object.assign(Object.assign({},Le),{currentTarget:Ne}))},0)},pe=function(Le){F.current=null,clearTimeout(U.current.focusTimeout),clearTimeout(U.current.setCaretTimeout),w(Le)},ke=H&&_te()?"numeric":void 0,gt=Object.assign({inputMode:ke},S,{type:e,value:D,onChange:ze,onKeyDown:Re,onMouseUp:ae,onFocus:je,onBlur:pe});if(n==="text")return i?Cn.createElement(Cn.Fragment,null,i(D,S)||null):Cn.createElement("span",Object.assign({},S,{ref:s}),D);if(r){var We=r;return Cn.createElement(We,Object.assign({},gt,{ref:s}))}return Cn.createElement("input",Object.assign({},gt,{ref:s}))}function xR(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix;i===void 0&&(i="");var s=e.suffix;s===void 0&&(s="");var o=e.allowNegative,l=e.thousandsGroupStyle;if(l===void 0&&(l="thousand"),t===""||t==="-")return t;var u=_w(e),h=u.thousandSeparator,f=u.decimalSeparator,p=n!==0&&t.indexOf(".")!==-1||n&&r,m=KO(t,o),v=m.beforeDecimal,b=m.afterDecimal,x=m.addNegation;return n!==void 0&&(b=nF(b,n,!!r)),h&&(v=Ate(v,h,l)),i&&(v=i+v),s&&(b=b+s),x&&(v="-"+v),t=v+(p&&f||"")+b,t}function _w(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function Nte(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),s=r.test(t);return t=t.replace(/-/g,""),i&&!s&&e&&(t="-"+t),t}function Pte(t,e){return new RegExp("(^-)|[0-9]|"+tF(t),"g")}function Ite(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function Bte(t,e,n){var r;e===void 0&&(e=Tte(t));var i=n.allowNegative,s=n.prefix;s===void 0&&(s="");var o=n.suffix;o===void 0&&(o="");var l=n.decimalScale,u=e.from,h=e.to,f=h.start,p=h.end,m=_w(n),v=m.allowedDecimalSeparators,b=m.decimalSeparator,x=t[p]===b;if(nv(t)&&(t===s||t===o)&&e.lastValue==="")return t;if(p-f===1&&v.indexOf(t[f])!==-1){var w=l===0?"":b;t=t.substring(0,f)+w+t.substring(f+1,t.length)}var A=function(F,U,Z){var G=!1,W=!1;s.startsWith("-")?G=!1:F.startsWith("--")?(G=!1,W=!0):o.startsWith("-")&&F.length===o.length?G=!1:F[0]==="-"&&(G=!0);var X=G?1:0;return W&&(X=2),X&&(F=F.substring(X),U-=X,Z-=X),{value:F,start:U,end:Z,hasNegation:G}},j=A(t,f,p),C=j.hasNegation;r=j,t=r.value,f=r.start,p=r.end;var _=A(e.lastValue,u.start,u.end),S=_.start,O=_.end,E=_.value,D=t.substring(f,p);t.length&&E.length&&(S>E.length-o.length||O<s.length)&&!(D&&o.startsWith(D))&&(t=E);var N=0;t.startsWith(s)?N+=s.length:f<s.length&&(N=f),t=t.substring(N),p-=N;var I=t.length,R=t.length-o.length;t.endsWith(o)?I=R:(p>R||p>t.length-o.length)&&(I=p),t=t.substring(0,I),t=Nte(C?"-"+t:t,i),t=(t.match(Pte(b))||[]).join("");var L=t.indexOf(b);t=t.replace(new RegExp(tF(b),"g"),function(F,U){return U===L?".":""});var Q=KO(t,i),z=Q.beforeDecimal,H=Q.afterDecimal,P=Q.addNegation;return h.end-h.start<u.end-u.start&&z===""&&x&&!parseFloat(H)&&(t=P?"-":""),t}function Lte(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var i=Array.from({length:t.length+1}).map(function(){return!0}),s=t[0]==="-";i.fill(!1,0,n.length+(s?1:0));var o=t.length;return i.fill(!1,o-r.length+1,o+1),i}function Fte(t){var e=_w(t),n=e.thousandSeparator,r=e.decimalSeparator,i=t.prefix;i===void 0&&(i="");var s=t.allowNegative;if(s===void 0&&(s=!0),n===r)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+r+` (default value for decimalSeparator is .)
     `);return i.startsWith("-")&&s&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+i+`
      allowNegative: `+s+`
    `),s=!1),Object.assign(Object.assign({},t),{allowNegative:s})}function Hte(t){t=Fte(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=lh);var s=t.onBlur;s===void 0&&(s=lh);var o=t.thousandSeparator,l=t.decimalScale,u=t.fixedDecimalScale,h=t.prefix;h===void 0&&(h="");var f=t.defaultValue,p=t.value,m=t.valueIsNumericString,v=t.onValueChange,b=J7(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=_w(t),w=x.decimalSeparator,A=x.allowedDecimalSeparators,j=function(P){return xR(P,t)},C=function(P,F){return Bte(P,F,t)},_=Lp(p)?f:p,S=m??Ite(_,h,e);Lp(p)?Lp(f)||(S=S||typeof f=="number"):S=S||typeof p=="number";var O=function(P){return eF(P)?P:(typeof P=="number"&&(P=rF(P)),S&&typeof l=="number"?bR(P,l,!!u):P)},E=sF(O(p),O(f),!!S,j,C,v),D=E[0],N=D.numAsString,I=D.formattedValue,R=E[1],L=function(P){var F=P.target,U=P.key,Z=F.selectionStart,G=F.selectionEnd,W=F.value;if(W===void 0&&(W=""),(U==="Backspace"||U==="Delete")&&G<h.length){P.preventDefault();return}if(Z!==G){i(P);return}U==="Backspace"&&W[0]==="-"&&Z===h.length+1&&n&&Id(F,1),l&&u&&(U==="Backspace"&&W[Z-1]===w?(Id(F,Z-1),P.preventDefault()):U==="Delete"&&W[Z]===w&&P.preventDefault()),A!=null&&A.includes(U)&&W[Z]===w&&Id(F,Z+1);var X=o===!0?",":o;U==="Backspace"&&W[Z-1]===X&&Id(F,Z-1),U==="Delete"&&W[Z]===X&&Id(F,Z+1),i(P)},Q=function(P){var F=N;if(F.match(/\d/g)||(F=""),r||(F=Ste(F)),u&&l&&(F=bR(F,l,u)),F!==N){var U=xR(F,t);R({formattedValue:U,value:F,floatValue:parseFloat(F)},{event:P,source:tv.event})}s(P)},z=function(P){return P===w?!0:nv(P)},H=function(P){var F=P.currentValue,U=P.lastValue,Z=P.formattedValue,G=P.currentValueIndex,W=P.formattedValueIndex,X=F[G],V=Z[W],te=iF(U,F),le=te.to,be=function(ye){return C(ye).indexOf(".")+h.length};return p===0&&u&&l&&F[le.start]===w&&be(F)<G&&be(Z)>W?!1:G>=le.start&&G<le.end&&A&&A.includes(X)&&V===w?!0:X===V};return Object.assign(Object.assign({},b),{value:I,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:H,onValueChange:R,format:j,removeFormatting:C,getCaretBoundary:function(P){return Lte(P,t)},onKeyDown:L,onBlur:Q})}function zte(t){var e=Hte(t);return Cn.createElement(Rte,Object.assign({},e))}var S3={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};function AR({direction:t,style:e,...n}){return a.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:t==="up"?"rotate(180deg)":void 0,...e},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}const qte=/^(0\.0*|-0(\.0*)?)$/,$te=/^-?0\d+(\.\d+)?\.?$/,Qte=/\.\d*0$/,aF=/^-?\d+\.$/;function j3(t){return typeof t=="string"&&t!==""&&!Number.isNaN(Number(t))}function pC(t){return typeof t=="number"?t<Number.MAX_SAFE_INTEGER:t===""||j3(t)&&Number(t)<Number.MAX_SAFE_INTEGER}function Ute(t){return t.toString().replace(".","").length}function Wte(t,e){return(typeof t=="number"?t<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(t)))&&!Number.isNaN(t)&&Ute(e)<14&&e!==""}function wR(t,e,n){if(t===void 0)return!0;const r=e===void 0||t>=e,i=n===void 0||t<=n;return r&&i}const Vte={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},Yte=(t,{size:e})=>({controls:{"--ni-chevron-size":$t(e,"ni-chevron-size")}});function Gte(t,e,n){const r=t.toString(),i=aF.test(r),s=r.replace(/^0+(?=\d)/,""),o=parseFloat(s);if(Number.isNaN(o))return s;if(o>Number.MAX_SAFE_INTEGER)return e!==void 0?e:s;const l=Ch(o,n,e);return i?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}const Bx=Oe((t,e)=>{const n=we("NumberInput",Vte,t),{className:r,classNames:i,styles:s,unstyled:o,vars:l,onChange:u,onValueChange:h,value:f,defaultValue:p,max:m,min:v,step:b,hideControls:x,rightSection:w,isAllowed:A,clampBehavior:j,onBlur:C,allowDecimal:_,decimalScale:S,onKeyDown:O,onKeyDownCapture:E,handlersRef:D,startValue:N,disabled:I,rightSectionPointerEvents:R,allowNegative:L,readOnly:Q,size:z,rightSectionWidth:H,stepHoldInterval:P,stepHoldDelay:F,allowLeadingZeros:U,withKeyboardEvents:Z,trimLeadingZeroesOnBlur:G,allowedDecimalSeparators:W,attributes:X,...V}=n,te=lt({name:"NumberInput",classes:S3,props:n,classNames:i,styles:s,unstyled:o,attributes:X,vars:l,varsResolver:Yte}),{resolvedClassNames:le,resolvedStyles:be}=bo({classNames:i,styles:s,props:n}),[ye,Xe]=Ui({value:f,defaultValue:p,finalValue:"",onChange:u}),ze=F!==void 0&&P!==void 0,Re=M.useRef(null),ae=M.useRef(null),je=M.useRef(0),pe=(he,dt)=>{dt.source==="event"&&Xe(Wte(he.floatValue,he.value)&&!qte.test(he.value)&&!(U&&$te.test(he.value))&&!Qte.test(he.value)&&!aF.test(he.value)?he.floatValue:he.value),h==null||h(he,dt)},ke=he=>{const dt=String(he).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return dt?Math.max(0,(dt[1]?dt[1].length:0)-(dt[2]?+dt[2]:0)):0},gt=he=>{Re.current&&typeof he<"u"&&Re.current.setSelectionRange(he,he)},We=M.useRef(_x);We.current=()=>{if(!pC(ye))return;let he;const dt=ke(ye),sn=ke(b),Kt=Math.max(dt,sn),un=10**Kt;if(!j3(ye)&&(typeof ye!="number"||Number.isNaN(ye)))he=Ch(N,v,m);else if(m!==void 0){const Pt=(Math.round(Number(ye)*un)+Math.round(b*un))/un;he=Pt<=m?Pt:m}else he=(Math.round(Number(ye)*un)+Math.round(b*un))/un;const Zt=he.toFixed(Kt);Xe(parseFloat(Zt)),h==null||h({floatValue:parseFloat(Zt),formattedValue:Zt,value:Zt},{source:"increment"}),setTimeout(()=>{var Pt;return gt((Pt=Re.current)==null?void 0:Pt.value.length)},0)};const Le=M.useRef(_x);Le.current=()=>{if(!pC(ye))return;let he;const dt=v!==void 0?v:L?Number.MIN_SAFE_INTEGER:0,sn=ke(ye),Kt=ke(b),un=Math.max(sn,Kt),Zt=10**un;if(!j3(ye)&&typeof ye!="number"||Number.isNaN(ye))he=Ch(N,dt,m);else{const Mt=(Math.round(Number(ye)*Zt)-Math.round(b*Zt))/Zt;he=dt!==void 0&&Mt<dt?dt:Mt}const Pt=he.toFixed(un);Xe(parseFloat(Pt)),h==null||h({floatValue:parseFloat(Pt),formattedValue:Pt,value:Pt},{source:"decrement"}),setTimeout(()=>{var Mt;return gt((Mt=Re.current)==null?void 0:Mt.value.length)},0)};const Fe=he=>{var un,Zt;const dt=he.clipboardData.getData("text"),sn=V.decimalSeparator||".",Kt=(W||[".",","]).filter(Pt=>Pt!==sn);if(Kt.some(Pt=>dt.includes(Pt))){he.preventDefault();let Pt=dt;Kt.forEach(Et=>{Pt=Pt.split(Et).join(sn)});const Mt=Re.current;if(Mt){const Et=Mt.selectionStart??0,Ut=Mt.selectionEnd??0,ei=Mt.value,yt=ei.substring(0,Et)+Pt+ei.substring(Ut),Tt=(un=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:un.set;Tt==null||Tt.call(Mt,yt),Mt.dispatchEvent(new Event("change",{bubbles:!0}));const qn=Et+Pt.length;setTimeout(()=>gt(qn),0)}}(Zt=V.onPaste)==null||Zt.call(V,he)},Ne=he=>{var dt,sn;O==null||O(he),!(Q||!Z)&&(he.key==="ArrowUp"&&(he.preventDefault(),(dt=We.current)==null||dt.call(We)),he.key==="ArrowDown"&&(he.preventDefault(),(sn=Le.current)==null||sn.call(Le)))},Ve=he=>{if(E==null||E(he),he.key==="Backspace"){const dt=Re.current;dt&&dt.selectionStart===0&&dt.selectionStart===dt.selectionEnd&&(he.preventDefault(),window.setTimeout(()=>gt(0),0))}},qt=he=>{let dt=ye;j==="blur"&&typeof dt=="number"&&(dt=Ch(dt,v,m)),G&&typeof dt=="string"&&ke(dt)<15&&(dt=Gte(dt,m,v)),ye!==dt&&Xe(dt),C==null||C(he)};kx(D,{increment:We.current,decrement:Le.current});const et=he=>{var dt,sn;he?(dt=We.current)==null||dt.call(We):(sn=Le.current)==null||sn.call(Le),je.current+=1},Je=he=>{if(et(he),ze){const dt=typeof P=="number"?P:P(je.current);ae.current=window.setTimeout(()=>Je(he),dt)}},Ue=(he,dt)=>{var sn;he.preventDefault(),(sn=Re.current)==null||sn.focus(),et(dt),ze&&(ae.current=window.setTimeout(()=>Je(dt),F))},Pe=()=>{ae.current&&window.clearTimeout(ae.current),ae.current=null,je.current=0},st=a.jsxs("div",{...te("controls"),children:[a.jsx(Rr,{...te("control"),tabIndex:-1,"aria-hidden":!0,disabled:I||typeof ye=="number"&&m!==void 0&&ye>=m,mod:{direction:"up"},onMouseDown:he=>he.preventDefault(),onPointerDown:he=>{Ue(he,!0)},onPointerUp:Pe,onPointerLeave:Pe,children:a.jsx(AR,{direction:"up"})}),a.jsx(Rr,{...te("control"),tabIndex:-1,"aria-hidden":!0,disabled:I||typeof ye=="number"&&v!==void 0&&ye<=v,mod:{direction:"down"},onMouseDown:he=>he.preventDefault(),onPointerDown:he=>{Ue(he,!1)},onPointerUp:Pe,onPointerLeave:Pe,children:a.jsx(AR,{direction:"down"})})]});return a.jsx(Fa,{component:zte,allowNegative:L,className:Ir(S3.root,r),size:z,inputMode:"decimal",...V,readOnly:Q,disabled:I,value:ye,getInputRef:cr(e,Re),onValueChange:pe,rightSection:x||Q||!pC(ye)?w:w||st,classNames:le,styles:be,unstyled:o,__staticSelector:"NumberInput",decimalScale:_?S:0,onPaste:Fe,onKeyDown:Ne,onKeyDownCapture:Ve,rightSectionPointerEvents:R??(I?"none":void 0),rightSectionWidth:H??`var(--ni-right-section-width-${z||"sm"})`,allowLeadingZeros:U,allowedDecimalSeparators:W,onBlur:qt,attributes:X,isAllowed:he=>j==="strict"?A?A(he)&&wR(he.floatValue,v,m):wR(he.floatValue,v,m):A?A(he):!0})});Bx.classes={...Fa.classes,...S3};Bx.displayName="@mantine/core/NumberInput";var Jv={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const[Xte,Tw]=Wi("Pagination.Root component was not found in tree"),Kte={withPadding:!0},eb=Oe((t,e)=>{const n=we("PaginationControl",Kte,t),{classNames:r,className:i,style:s,styles:o,vars:l,active:u,disabled:h,withPadding:f,mod:p,...m}=n,v=Tw(),b=h||v.disabled;return a.jsx(Rr,{ref:e,disabled:b,mod:[{active:u,disabled:b,"with-padding":f},p],...v.getStyles("control",{className:i,style:s,classNames:r,styles:o,active:!b}),...m})});eb.classes=Jv;eb.displayName="@mantine/core/PaginationControl";function tb({style:t,children:e,path:n,...r}){return a.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...t},...r,children:a.jsx("path",{d:n,fill:"currentColor"})})}const Zte=t=>a.jsx(tb,{...t,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),Jte=t=>a.jsx(tb,{...t,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),ene=t=>a.jsx(tb,{...t,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),tne=t=>a.jsx(tb,{...t,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),nne=t=>a.jsx(tb,{...t,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),rne={icon:nne},kw=Oe((t,e)=>{const n=we("PaginationDots",rne,t),{classNames:r,className:i,style:s,styles:o,vars:l,icon:u,...h}=n,f=Tw();return a.jsx(ve,{ref:e,...f.getStyles("dots",{className:i,style:s,styles:o,classNames:r}),...h,children:a.jsx(u,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});kw.classes=Jv;kw.displayName="@mantine/core/PaginationDots";function Ow({icon:t,name:e,action:n,type:r}){const i={icon:t},s=M.forwardRef((o,l)=>{const{icon:u,...h}=we(e,i,o),f=Tw(),p=r==="next"?f.active===f.total:f.active===1;return a.jsx(eb,{disabled:f.disabled||p,ref:l,onClick:f[n],withPadding:!1,...h,children:a.jsx(u,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return s.displayName=`@mantine/core/${e}`,s}const oF=Ow({icon:Zte,name:"PaginationNext",action:"onNext",type:"next"}),lF=Ow({icon:Jte,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),cF=Ow({icon:ene,name:"PaginationFirst",action:"onFirst",type:"previous"}),uF=Ow({icon:tne,name:"PaginationLast",action:"onLast",type:"next"});function ZO({dotsIcon:t}){const e=Tw(),n=e.range.map((r,i)=>{var s,o,l;return r==="dots"?a.jsx(kw,{icon:t},i):a.jsx(eb,{active:r===e.active,"aria-current":r===e.active?"page":void 0,onClick:()=>e.onChange(r),disabled:e.disabled,...(s=e.getItemProps)==null?void 0:s.call(e,r),children:((l=(o=e.getItemProps)==null?void 0:o.call(e,r))==null?void 0:l.children)??r},i)});return a.jsx(a.Fragment,{children:n})}ZO.displayName="@mantine/core/PaginationItems";const ine={siblings:1,boundaries:1},sne=(t,{size:e,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:Jn(n),"--pagination-control-size":$t(e,"pagination-control-size"),"--pagination-control-fz":kr(e),"--pagination-active-bg":r?hr(r,t):void 0,"--pagination-active-color":zm(i,t)?Yh({color:r,theme:t,autoContrast:i}):void 0}}),Ew=Oe((t,e)=>{const n=we("PaginationRoot",ine,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,total:h,value:f,defaultValue:p,onChange:m,disabled:v,siblings:b,boundaries:x,color:w,radius:A,onNextPage:j,onPreviousPage:C,onFirstPage:_,onLastPage:S,getItemProps:O,autoContrast:E,attributes:D,...N}=n,I=lt({name:"Pagination",classes:Jv,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:D,vars:u,varsResolver:sne}),{range:R,setPage:L,next:Q,previous:z,active:H,first:P,last:F}=OG({page:f,initialPage:p,onChange:m,total:h,siblings:b,boundaries:x}),U=qi(j,Q),Z=qi(C,z),G=qi(_,P),W=qi(S,F);return a.jsx(Xte,{value:{total:h,range:R,active:H,disabled:v,getItemProps:O,onChange:L,onNext:U,onPrevious:Z,onFirst:G,onLast:W,getStyles:I},children:a.jsx(ve,{ref:e,...I("root"),...N})})});Ew.classes=Jv;Ew.displayName="@mantine/core/PaginationRoot";const ane={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},So=Oe((t,e)=>{const n=we("Pagination",ane,t),{withEdges:r,withControls:i,getControlProps:s,nextIcon:o,previousIcon:l,lastIcon:u,firstIcon:h,dotsIcon:f,total:p,gap:m,hideWithOnePage:v,withPages:b,...x}=n;return p<=0||v&&p===1?null:a.jsx(Ew,{ref:e,total:p,...x,children:a.jsxs(ht,{gap:m,children:[r&&a.jsx(cF,{icon:h,...s==null?void 0:s("first")}),i&&a.jsx(lF,{icon:l,...s==null?void 0:s("previous")}),b&&a.jsx(ZO,{dotsIcon:f}),i&&a.jsx(oF,{icon:o,...s==null?void 0:s("next")}),r&&a.jsx(uF,{icon:u,...s==null?void 0:s("last")})]})})});So.classes=Jv;So.displayName="@mantine/core/Pagination";So.Root=Ew;So.Control=eb;So.Dots=kw;So.First=cF;So.Last=uF;So.Next=oF;So.Previous=lF;So.Items=ZO;var nb={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd","stripes-animation-vertical":"m_e0fb7a86",label:"m_91e40b74"};const[one,hF]=Wi("Progress.Root component was not found in tree"),JO=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,...l}=we("ProgressLabel",null,t),u=hF();return a.jsx(ve,{ref:e,...u.getStyles("label",{className:r,style:i,classNames:n,styles:s}),...l})});JO.classes=nb;JO.displayName="@mantine/core/ProgressLabel";const lne=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":$t(e,"progress-size"),"--progress-radius":n===void 0?void 0:Jn(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),Mw=Oe((t,e)=>{const n=we("ProgressRoot",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,autoContrast:h,transitionDuration:f,orientation:p,attributes:m,mod:v,...b}=n,x=lt({name:"Progress",classes:nb,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:m,vars:u,varsResolver:lne});return a.jsx(one,{value:{getStyles:x,autoContrast:h},children:a.jsx(ve,{ref:e,mod:[{orientation:p},v],...x("root"),...b})})});Mw.classes=nb;Mw.displayName="@mantine/core/ProgressRoot";const cne={withAria:!0},Dw=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,value:l,withAria:u,color:h,striped:f,animated:p,mod:m,...v}=we("ProgressSection",cne,t),b=hF(),x=xi(),w=u?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":l,"aria-valuetext":`${l}%`}:{};return a.jsx(ve,{ref:e,...b.getStyles("section",{className:r,classNames:n,styles:s,style:i}),...v,...w,mod:[{striped:f||p,animated:p},m],__vars:{"--progress-section-size":`${l}%`,"--progress-section-color":hr(h,x),"--progress-label-color":zm(b.autoContrast,x)?Yh({color:h,theme:x,autoContrast:b.autoContrast}):void 0}})});Dw.classes=nb;Dw.displayName="@mantine/core/ProgressSection";const Xm=Oe((t,e)=>{const n=we("Progress",null,t),{value:r,classNames:i,styles:s,vars:o,color:l,striped:u,animated:h,"aria-label":f,...p}=n,{resolvedClassNames:m,resolvedStyles:v}=bo({classNames:i,styles:s,props:n});return a.jsx(Mw,{ref:e,classNames:m,styles:v,vars:o,...p,children:a.jsx(Dw,{value:r,color:l,striped:u,animated:h,"aria-label":f})})});Xm.classes=nb;Xm.displayName="@mantine/core/Progress";Xm.Section=Dw;Xm.Root=Mw;Xm.Label=JO;const une={duration:100,transition:"fade"};function SR(t,e){return{...une,...e,...t}}var Rw={tooltip:"m_1b3c8819",arrow:"m_f898399f"};function hne({offset:t,position:e,defaultOpened:n}){const[r,i]=M.useState(n),s=M.useRef(null),{x:o,y:l,elements:u,refs:h,update:f,placement:p}=Kk({placement:e,middleware:[Vk({crossAxis:!0,padding:5,rootBoundary:"document"})]}),m=p.includes("right")?t:e.includes("left")?t*-1:0,v=p.includes("bottom")?t:e.includes("top")?t*-1:0,b=M.useCallback(({clientX:x,clientY:w})=>{h.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x,y:w,left:x+m,top:w+v,right:x,bottom:w}}})},[u.reference]);return M.useEffect(()=>{if(h.floating.current){const x=s.current;x.addEventListener("mousemove",b);const w=Yc(h.floating.current);return w.forEach(A=>{A.addEventListener("scroll",f)}),()=>{x.removeEventListener("mousemove",b),w.forEach(A=>{A.removeEventListener("scroll",f)})}}},[u.reference,h.floating.current,f,b,r]),{handleMouseMove:b,x:o,y:l,opened:r,setOpened:i,boundaryRef:s,floating:h.setFloating}}const dne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:vo("popover")},fne=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:Jn(e),"--tooltip-bg":n?hr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),eE=Oe((t,e)=>{const n=we("TooltipFloating",dne,t),{children:r,refProp:i,withinPortal:s,style:o,className:l,classNames:u,styles:h,unstyled:f,radius:p,color:m,label:v,offset:b,position:x,multiline:w,zIndex:A,disabled:j,defaultOpened:C,variant:_,vars:S,portalProps:O,attributes:E,...D}=n,N=xi(),I=lt({name:"TooltipFloating",props:n,classes:Rw,className:l,style:o,classNames:u,styles:h,unstyled:f,attributes:E,rootSelector:"tooltip",vars:S,varsResolver:fne}),{handleMouseMove:R,x:L,y:Q,opened:z,boundaryRef:H,floating:P,setOpened:F}=hne({offset:b,position:x,defaultOpened:C}),U=_f(r);if(!U)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Z=cr(H,WA(U),e),G=U.props,W=V=>{var te;(te=G.onMouseEnter)==null||te.call(G,V),R(V),F(!0)},X=V=>{var te;(te=G.onMouseLeave)==null||te.call(G,V),F(!1)};return a.jsxs(a.Fragment,{children:[a.jsx(Mh,{...O,withinPortal:s,children:a.jsx(ve,{...D,...I("tooltip",{style:{...Hk(o,N),zIndex:A,display:!j&&z?"block":"none",top:(Q&&Math.round(Q))??"",left:(L&&Math.round(L))??""}}),variant:_,ref:P,mod:{multiline:w},children:v})}),M.cloneElement(U,{...G,[i]:Z,onMouseEnter:W,onMouseLeave:X})]})});eE.classes=Rw;eE.displayName="@mantine/core/TooltipFloating";const dF=M.createContext(!1),pne=dF.Provider,mne=()=>M.useContext(dF),gne={openDelay:0,closeDelay:0};function tE(t){const{openDelay:e,closeDelay:n,children:r}=we("TooltipGroup",gne,t);return a.jsx(pne,{value:!0,children:a.jsx(jZ,{delay:{open:e,close:n},children:r})})}tE.displayName="@mantine/core/TooltipGroup";tE.extend=t=>t;function vne(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function bne(t){const e=vne(t.middlewares),n=[TL(t.offset)];return e.shift&&n.push(Vk(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&n.push(typeof e.flip=="boolean"?Rx():Rx(e.flip)),n.push(kL({element:t.arrowRef,padding:t.arrowOffset})),e.inline?n.push(typeof e.inline=="boolean"?Ig():Ig(e.inline)):t.inline&&n.push(Ig()),n}function yne(t){var S,O,E;const[e,n]=M.useState(t.defaultOpened),i=typeof t.opened=="boolean"?t.opened:e,s=mne(),o=ki(),l=M.useCallback(D=>{n(D),D&&A(o)},[o]),{x:u,y:h,context:f,refs:p,placement:m,middlewareData:{arrow:{x:v,y:b}={}}}=Kk({strategy:t.strategy,placement:t.position,open:i,onOpenChange:l,middleware:bne(t),whileElementsMounted:y3}),{delay:x,currentId:w,setCurrentId:A}=CZ(f,{id:o}),{getReferenceProps:j,getFloatingProps:C}=MZ([wZ(f,{enabled:(S=t.events)==null?void 0:S.hover,delay:s?x:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((O=t.events)!=null&&O.touch)}),EZ(f,{enabled:(E=t.events)==null?void 0:E.focus,visibleOnly:!0}),RZ(f,{role:"tooltip"}),kZ(f,{enabled:typeof t.opened>"u"})]);Gl(()=>{var D;(D=t.onPositionChange)==null||D.call(t,m)},[m]);const _=i&&w&&w!==o;return{x:u,y:h,arrowX:v,arrowY:b,reference:p.setReference,floating:p.setFloating,getFloatingProps:C,getReferenceProps:j,isGroupPhase:_,opened:i,placement:m}}const jR={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:vo("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},xne=(t,{radius:e,color:n,variant:r,autoContrast:i})=>{const s=t.variantColorResolver({theme:t,color:n||t.primaryColor,autoContrast:i,variant:r||"filled"});return{tooltip:{"--tooltip-radius":e===void 0?void 0:Jn(e),"--tooltip-bg":n?s.background:void 0,"--tooltip-color":n?s.color:void 0}}},Xr=Oe((t,e)=>{const n=we("Tooltip",jR,t),{children:r,position:i,refProp:s,label:o,openDelay:l,closeDelay:u,onPositionChange:h,opened:f,defaultOpened:p,withinPortal:m,radius:v,color:b,classNames:x,styles:w,unstyled:A,style:j,className:C,withArrow:_,arrowSize:S,arrowOffset:O,arrowRadius:E,arrowPosition:D,offset:N,transitionProps:I,multiline:R,events:L,zIndex:Q,disabled:z,positionDependencies:H,onClick:P,onMouseEnter:F,onMouseLeave:U,inline:Z,variant:G,keepMounted:W,vars:X,portalProps:V,mod:te,floatingStrategy:le,middlewares:be,autoContrast:ye,attributes:Xe,target:ze,...Re}=we("Tooltip",jR,n),{dir:ae}=Tf(),je=M.useRef(null),pe=yne({position:VL(ae,i),closeDelay:u,openDelay:l,onPositionChange:h,opened:f,defaultOpened:p,events:L,arrowRef:je,arrowOffset:O,offset:typeof N=="number"?N+(_?S/2:0):N,positionDependencies:[...H,ze??r],inline:Z,strategy:le,middlewares:be});M.useEffect(()=>{const Ne=ze instanceof HTMLElement?ze:typeof ze=="string"?document.querySelector(ze):(ze==null?void 0:ze.current)||null;Ne&&pe.reference(Ne)},[ze,pe]);const ke=lt({name:"Tooltip",props:n,classes:Rw,className:C,style:j,classNames:x,styles:w,unstyled:A,attributes:Xe,rootSelector:"tooltip",vars:X,varsResolver:xne}),gt=_f(r);if(!ze&&!gt)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");if(ze){const Ne=SR(I,{duration:100,transition:"fade"});return a.jsx(a.Fragment,{children:a.jsx(Mh,{...V,withinPortal:m,children:a.jsx(Kl,{...Ne,keepMounted:W,mounted:!z&&!!pe.opened,duration:pe.isGroupPhase?10:Ne.duration,children:Ve=>a.jsxs(ve,{...Re,"data-fixed":le==="fixed"||void 0,variant:G,mod:[{multiline:R},te],...pe.getFloatingProps({ref:pe.floating,className:ke("tooltip").className,style:{...ke("tooltip").style,...Ve,zIndex:Q,top:pe.y??0,left:pe.x??0}}),children:[o,a.jsx(Nx,{ref:je,arrowX:pe.arrowX,arrowY:pe.arrowY,visible:_,position:pe.placement,arrowSize:S,arrowOffset:O,arrowRadius:E,arrowPosition:D,...ke("arrow")})]})})})})}const We=gt.props,Le=cr(pe.reference,WA(gt),e),Fe=SR(I,{duration:100,transition:"fade"});return a.jsxs(a.Fragment,{children:[a.jsx(Mh,{...V,withinPortal:m,children:a.jsx(Kl,{...Fe,keepMounted:W,mounted:!z&&!!pe.opened,duration:pe.isGroupPhase?10:Fe.duration,children:Ne=>a.jsxs(ve,{...Re,"data-fixed":le==="fixed"||void 0,variant:G,mod:[{multiline:R},te],...pe.getFloatingProps({ref:pe.floating,className:ke("tooltip").className,style:{...ke("tooltip").style,...Ne,zIndex:Q,top:pe.y??0,left:pe.x??0}}),children:[o,a.jsx(Nx,{ref:je,arrowX:pe.arrowX,arrowY:pe.arrowY,visible:_,position:pe.placement,arrowSize:S,arrowOffset:O,arrowRadius:E,arrowPosition:D,...ke("arrow")})]})})}),M.cloneElement(gt,pe.getReferenceProps({onClick:P,onMouseEnter:F,onMouseLeave:U,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...We,className:Ir(C,We.className),[s]:Le}))]})});Xr.classes=Rw;Xr.displayName="@mantine/core/Tooltip";Xr.Floating=eE;Xr.Group=tE;function Ane({size:t,thickness:e,sum:n,value:r,root:i,offset:s}){const o=(t*.9-e*2)/2,l=Math.PI*o*2/100,u=i||r===void 0?`${(100-n)*l}, ${n*l}`:`${r*l}, ${(100-r)*l}`;return{strokeWidth:Number.isNaN(e)?12:e,cx:t/2||0,cy:t/2||0,r:o||0,transform:i?`scale(1, -1) translate(0, -${t})`:void 0,strokeDasharray:u,strokeDashoffset:i?0:s||0}}function fF({size:t,value:e,offset:n,sum:r,thickness:i,root:s,color:o,lineRoundCaps:l,tooltip:u,getStyles:h,display:f,...p}){const m=xi();return a.jsx(Xr.Floating,{disabled:!u,label:u,children:a.jsx(ve,{component:"circle",...p,...h("curve"),__vars:{"--curve-color":o?hr(o,m):void 0},fill:"none",strokeLinecap:l?"round":"butt",...Ane({sum:r,size:t,thickness:i,value:e,offset:n,root:s})})})}fF.displayName="@mantine/core/Curve";function wne({size:t,thickness:e,sections:n,renderRoundedLineCaps:r,rootColor:i}){const s=n.reduce((f,p)=>f+p.value,0),o=Math.PI*((t*.9-e*2)/2)*2;let l=o;const u=[],h=[];for(let f=0;f<n.length;f+=1)u.push({sum:s,offset:l,data:n[f],root:!1}),l-=n[f].value/100*o;if(u.push({sum:s,offset:l,data:{color:i},root:!0}),h.push({...u[u.length-1],lineRoundCaps:!1}),u.length>2){h.push({...u[0],lineRoundCaps:r}),h.push({...u[u.length-2],lineRoundCaps:r});for(let f=1;f<=u.length-3;f+=1)h.push({...u[f],lineRoundCaps:!1})}else h.push({...u[0],lineRoundCaps:r});return h}var pF={root:"m_b32e4812",svg:"m_d43b5134",curve:"m_b1ca1fbf",label:"m_b23f9dc4"};function Sne(t,e){return Math.min(t||12,(e||120)/4)}const jne={size:120,thickness:12},Cne=(t,{size:e,thickness:n,transitionDuration:r})=>({root:{"--rp-size":fe(e),"--rp-label-offset":fe(n*2),"--rp-transition-duration":r?`${r}ms`:void 0}}),Nw=Oe((t,e)=>{const n=we("RingProgress",jne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,label:h,sections:f,size:p,thickness:m,roundCaps:v,rootColor:b,transitionDuration:x,attributes:w,...A}=n,j=lt({name:"RingProgress",classes:pF,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:w,vars:u,varsResolver:Cne}),C=Sne(m,p),_=wne({size:p,thickness:C,sections:f,renderRoundedLineCaps:v,rootColor:b}).map(({data:S,sum:O,root:E,lineRoundCaps:D,offset:N},I)=>M.createElement(fF,{...S,key:I,size:p,thickness:C,sum:O,offset:N,color:S==null?void 0:S.color,root:E,lineRoundCaps:D,getStyles:j}));return a.jsxs(ve,{...j("root"),size:p,ref:e,...A,children:[a.jsx("svg",{...j("svg"),children:_}),h&&a.jsx("div",{...j("label"),children:h})]})});Nw.classes=pF;Nw.displayName="@mantine/core/RingProgress";var mF={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const _ne={withItemsBorders:!0},Tne=(t,{radius:e,color:n,transitionDuration:r,size:i,transitionTimingFunction:s})=>({root:{"--sc-radius":e===void 0?void 0:Jn(e),"--sc-color":n?hr(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":s,"--sc-padding":$t(i,"sc-padding"),"--sc-font-size":kr(i)}}),rb=Oe((t,e)=>{var ze,Re;const n=we("SegmentedControl",_ne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,data:h,value:f,defaultValue:p,onChange:m,size:v,name:b,disabled:x,readOnly:w,fullWidth:A,orientation:j,radius:C,color:_,transitionDuration:S,transitionTimingFunction:O,variant:E,autoContrast:D,withItemsBorders:N,mod:I,attributes:R,...L}=n,Q=lt({name:"SegmentedControl",props:n,classes:mF,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:R,vars:u,varsResolver:Tne}),z=xi(),H=h.map(ae=>typeof ae=="string"?{label:ae,value:ae}:ae),P=FG(),[F,U]=M.useState(bm()),[Z,G]=M.useState(null),[W,X]=M.useState({}),V=(ae,je)=>{W[je]=ae,X(W)},[te,le]=Ui({value:f,defaultValue:p,finalValue:Array.isArray(h)?((ze=H.find(ae=>!ae.disabled))==null?void 0:ze.value)??((Re=h[0])==null?void 0:Re.value)??null:null,onChange:m}),be=ki(b),ye=H.map(ae=>M.createElement(ve,{...Q("control"),mod:{active:te===ae.value,orientation:j},key:ae.value},M.createElement("input",{...Q("input"),disabled:x||ae.disabled,type:"radio",name:be,value:ae.value,id:`${be}-${ae.value}`,checked:te===ae.value,onChange:()=>!w&&le(ae.value),"data-focus-ring":z.focusRing,key:`${ae.value}-input`}),M.createElement(ve,{component:"label",...Q("label"),mod:{active:te===ae.value&&!(x||ae.disabled),disabled:x||ae.disabled,"read-only":w},htmlFor:`${be}-${ae.value}`,ref:je=>V(je,ae.value),__vars:{"--sc-label-color":_!==void 0?Yh({color:_,theme:z,autoContrast:D}):void 0},key:`${ae.value}-label`},a.jsx("span",{...Q("innerLabel"),children:ae.label})))),Xe=cr(e,ae=>G(ae));return PG(()=>{U(bm())},[h.length]),h.length===0?null:a.jsxs(ve,{...Q("root"),variant:E,size:v,ref:Xe,mod:[{"full-width":A,orientation:j,initialized:P,"with-items-borders":N},I],...L,role:"radiogroup","data-disabled":x,children:[typeof te=="string"&&a.jsx(oO,{target:W[te],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...Q("indicator")},F),ye]})});rb.classes=mF;rb.displayName="@mantine/core/SegmentedControl";const kne={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Km=Oe((t,e)=>{const n=we("Select",kne,t),{classNames:r,styles:i,unstyled:s,vars:o,dropdownOpened:l,defaultDropdownOpened:u,onDropdownClose:h,onDropdownOpen:f,onFocus:p,onBlur:m,onClick:v,onChange:b,data:x,value:w,defaultValue:A,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:_,comboboxProps:S,readOnly:O,disabled:E,filter:D,limit:N,withScrollArea:I,maxDropdownHeight:R,size:L,searchable:Q,rightSection:z,checkIconPosition:H,withCheckIcon:P,withAlignedLabels:F,nothingFoundMessage:U,name:Z,form:G,searchValue:W,defaultSearchValue:X,onSearchChange:V,allowDeselect:te,error:le,rightSectionPointerEvents:be,id:ye,clearable:Xe,clearButtonProps:ze,hiddenInputProps:Re,renderOption:ae,onClear:je,autoComplete:pe,scrollAreaProps:ke,__defaultRightSection:gt,__clearSection:We,__clearable:Le,chevronColor:Fe,autoSelectOnBlur:Ne,openOnFocus:Ve,attributes:qt,...et}=n,Je=M.useMemo(()=>w7(x),[x]),Ue=M.useRef({}),Pe=M.useMemo(()=>pO(Je),[Je]),st=ki(ye),[he,dt,sn]=Ui({value:w,defaultValue:A,finalValue:null,onChange:b}),Kt=typeof he=="string"?he in Pe?Pe[he]:Ue.current[he]:void 0,un=BG(Kt),[Zt,Pt,Mt]=Ui({value:W,defaultValue:X,finalValue:Kt?Kt.label:"",onChange:V}),Et=pw({opened:l,defaultOpened:u,onDropdownOpen:()=>{f==null||f(),C?Et.selectFirstOption():Et.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{h==null||h(),setTimeout(Et.resetSelectedOption,0)}}),Ut=Ht=>{Pt(Ht),Et.resetSelectedOption()},{resolvedClassNames:ei,resolvedStyles:yt}=bo({props:n,styles:i,classNames:r});M.useEffect(()=>{j&&Et.selectFirstOption()},[j,Zt]),M.useEffect(()=>{w===null&&Ut(""),typeof w=="string"&&Kt&&((un==null?void 0:un.value)!==Kt.value||(un==null?void 0:un.label)!==Kt.label)&&Ut(Kt.label)},[w,Kt]),M.useEffect(()=>{var Ht,dr;!sn&&!Mt&&Ut(typeof he=="string"?he in Pe?(Ht=Pe[he])==null?void 0:Ht.label:((dr=Ue.current[he])==null?void 0:dr.label)||"":"")},[Pe,he]),M.useEffect(()=>{he&&he in Pe&&(Ue.current[he]=Pe[he])},[Pe,he]);const Tt=a.jsx(ln.ClearButton,{...ze,onClear:()=>{dt(null,null),Ut(""),je==null||je()}}),qn=Xe&&!!he&&!E&&!O;return a.jsxs(a.Fragment,{children:[a.jsxs(ln,{store:Et,__staticSelector:"Select",classNames:ei,styles:yt,unstyled:s,readOnly:O,size:L,attributes:qt,keepMounted:Ne,onOptionSubmit:Ht=>{_==null||_(Ht);const dr=te&&Pe[Ht].value===he?null:Pe[Ht],Mn=dr?dr.value:null;Mn!==he&&dt(Mn,dr),!sn&&Ut(typeof Mn=="string"&&(dr==null?void 0:dr.label)||""),Et.closeDropdown()},...S,children:[a.jsx(ln.Target,{targetType:Q?"input":"button",autoComplete:pe,children:a.jsx(Fa,{id:st,ref:e,__defaultRightSection:a.jsx(ln.Chevron,{size:L,error:le,unstyled:s,color:Fe}),__clearSection:Tt,__clearable:qn,rightSection:z,rightSectionPointerEvents:be||"none",...et,size:L,__staticSelector:"Select",disabled:E,readOnly:O||!Q,value:Zt,onChange:Ht=>{Ut(Ht.currentTarget.value),Et.openDropdown(),j&&Et.selectFirstOption()},onFocus:Ht=>{Ve&&Q&&Et.openDropdown(),p==null||p(Ht)},onBlur:Ht=>{Ne&&Et.clickSelectedOption(),Q&&Et.closeDropdown();const dr=typeof he=="string"&&(he in Pe?Pe[he]:Ue.current[he]);Ut(dr&&dr.label||""),m==null||m(Ht)},onClick:Ht=>{Q?Et.openDropdown():Et.toggleDropdown(),v==null||v(Ht)},classNames:ei,styles:yt,unstyled:s,pointer:!Q,error:le,attributes:qt})}),a.jsx(F7,{data:Je,hidden:O||E,filter:D,search:Zt,limit:N,hiddenWhenEmpty:!U,withScrollArea:I,maxDropdownHeight:R,filterOptions:!!Q&&(Kt==null?void 0:Kt.label)!==Zt,value:he,checkIconPosition:H,withCheckIcon:P,withAlignedLabels:F,nothingFoundMessage:U,unstyled:s,labelId:et.label?`${st}-label`:void 0,"aria-label":et.label?void 0:et["aria-label"],renderOption:ae,scrollAreaProps:ke})]}),a.jsx(ln.HiddenInput,{value:he,name:Z,form:G,disabled:E,...Re})]})});Km.classes={...Fa.classes,...ln.classes};Km.displayName="@mantine/core/Select";var gF={container:"m_925c2d2c",root:"m_2415a157"};function One({spacing:t,verticalSpacing:e,cols:n,selector:r}){var f;const i=xi(),s=e===void 0?t:e,o=$v({"--sg-spacing-x":zi(Ip(t)),"--sg-spacing-y":zi(Ip(s)),"--sg-cols":(f=Ip(n))==null?void 0:f.toString()}),l=Zr(i.breakpoints).reduce((p,m)=>(p[m]||(p[m]={}),typeof t=="object"&&t[m]!==void 0&&(p[m]["--sg-spacing-x"]=zi(t[m])),typeof s=="object"&&s[m]!==void 0&&(p[m]["--sg-spacing-y"]=zi(s[m])),typeof n=="object"&&n[m]!==void 0&&(p[m]["--sg-cols"]=n[m]),p),{}),h=c3(Zr(l),i.breakpoints).filter(p=>Zr(l[p.value]).length>0).map(p=>({query:`(min-width: ${i.breakpoints[p.value]})`,styles:l[p.value]}));return a.jsx(ZA,{styles:o,media:h,selector:r})}function mC(t){return typeof t=="object"&&t!==null?Zr(t):[]}function Ene(t){return t.sort((e,n)=>Xg(e)-Xg(n))}function Mne({spacing:t,verticalSpacing:e,cols:n}){const r=Array.from(new Set([...mC(t),...mC(e),...mC(n)]));return Ene(r)}function Dne({spacing:t,verticalSpacing:e,cols:n,selector:r}){var h;const i=e===void 0?t:e,s=$v({"--sg-spacing-x":zi(Ip(t)),"--sg-spacing-y":zi(Ip(i)),"--sg-cols":(h=Ip(n))==null?void 0:h.toString()}),o=Mne({spacing:t,verticalSpacing:e,cols:n}),l=o.reduce((f,p)=>(f[p]||(f[p]={}),typeof t=="object"&&t[p]!==void 0&&(f[p]["--sg-spacing-x"]=zi(t[p])),typeof i=="object"&&i[p]!==void 0&&(f[p]["--sg-spacing-y"]=zi(i[p])),typeof n=="object"&&n[p]!==void 0&&(f[p]["--sg-cols"]=n[p]),f),{}),u=o.map(f=>({query:`simple-grid (min-width: ${f})`,styles:l[f]}));return a.jsx(ZA,{styles:s,container:u,selector:r})}const Rne={cols:1,spacing:"md",type:"media"},Pw=Oe((t,e)=>{const n=we("SimpleGrid",Rne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,cols:h,verticalSpacing:f,spacing:p,type:m,attributes:v,...b}=n,x=lt({name:"SimpleGrid",classes:gF,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:v,vars:u}),w=aL();return m==="container"?a.jsxs(a.Fragment,{children:[a.jsx(Dne,{...n,selector:`.${w}`}),a.jsx("div",{...x("container"),children:a.jsx(ve,{ref:e,...x("root",{className:w}),...b})})]}):a.jsxs(a.Fragment,{children:[a.jsx(One,{...n,selector:`.${w}`}),a.jsx(ve,{ref:e,...x("root",{className:w}),...b})]})});Pw.classes=gF;Pw.displayName="@mantine/core/SimpleGrid";var vF={root:"m_18320242","skeleton-fade":"m_299c329c"};const Nne={visible:!0,animate:!0},Pne=(t,{width:e,height:n,radius:r,circle:i})=>({root:{"--skeleton-height":fe(n),"--skeleton-width":fe(i?n:e),"--skeleton-radius":i?"1000px":r===void 0?void 0:Jn(r)}}),go=Oe((t,e)=>{const n=we("Skeleton",Nne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,width:h,height:f,circle:p,visible:m,radius:v,animate:b,mod:x,attributes:w,...A}=n,j=lt({name:"Skeleton",classes:vF,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:w,vars:u,varsResolver:Pne});return a.jsx(ve,{ref:e,...j("root"),mod:[{visible:m,animate:b},x],...A})});go.classes=vF;go.displayName="@mantine/core/Skeleton";const bF=Oe((t,e)=>{const{w:n,h:r,miw:i,mih:s,...o}=we("Space",null,t);return a.jsx(ve,{ref:e,...o,w:n,miw:i??n,h:r,mih:s??r})});bF.displayName="@mantine/core/Space";var yF={root:"m_6d731127"};const Ine={gap:"md",align:"stretch",justify:"flex-start"},Bne=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":zi(e),"--stack-align":n,"--stack-justify":r}}),En=Oe((t,e)=>{const n=we("Stack",Ine,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,align:h,justify:f,gap:p,variant:m,attributes:v,...b}=n,x=lt({name:"Stack",props:n,classes:yF,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:v,vars:u,varsResolver:Bne});return a.jsx(ve,{ref:e,...x("root"),variant:m,...b})});En.classes=yF;En.displayName="@mantine/core/Stack";var xF={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const AF=M.createContext(null),Lne=AF.Provider,Fne=()=>M.useContext(AF),nE=Oe((t,e)=>{const{value:n,defaultValue:r,onChange:i,size:s,wrapperProps:o,children:l,readOnly:u,disabled:h,...f}=we("SwitchGroup",null,t),[p,m]=Ui({value:n,defaultValue:r,finalValue:[],onChange:i}),v=b=>{const x=b.currentTarget.value;!u&&m(p.includes(x)?p.filter(w=>w!==x):[...p,x])};return a.jsx(Lne,{value:{value:p,onChange:v,size:s,disabled:h},children:a.jsx(Mr.Wrapper,{size:s,ref:e,...o,...f,labelElement:"div",__staticSelector:"SwitchGroup",children:a.jsx(R7,{role:"group",children:l})})})});nE.classes=Mr.Wrapper.classes;nE.displayName="@mantine/core/SwitchGroup";const Hne={labelPosition:"right",withThumbIndicator:!0},zne=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:Jn(e),"--switch-height":$t(r,"switch-height"),"--switch-width":$t(r,"switch-width"),"--switch-thumb-size":$t(r,"switch-thumb-size"),"--switch-label-font-size":$t(r,"switch-label-font-size"),"--switch-track-label-padding":$t(r,"switch-track-label-padding"),"--switch-color":n?hr(n,t):void 0}}),Iw=Oe((t,e)=>{const n=we("Switch",Hne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,color:h,label:f,offLabel:p,onLabel:m,id:v,size:b,radius:x,wrapperProps:w,thumbIcon:A,checked:j,defaultChecked:C,onChange:_,labelPosition:S,description:O,error:E,disabled:D,variant:N,rootRef:I,mod:R,withThumbIndicator:L,attributes:Q,...z}=n,H=Fne(),P=b||(H==null?void 0:H.size),F=lt({name:"Switch",props:n,classes:xF,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:Q,vars:u,varsResolver:zne}),{styleProps:U,rest:Z}=Vv(z),G=ki(v),W={checked:(H==null?void 0:H.value.includes(Z.value))??j,onChange:te=>{H==null||H.onChange(te),_==null||_(te)},disabled:(H==null?void 0:H.disabled)??D},[X,V]=Ui({value:W.checked??j,defaultValue:C,finalValue:!1});return a.jsxs(CO,{...F("root"),__staticSelector:"Switch",__stylesApiProps:n,id:G,size:P,labelPosition:S,label:f,description:O,error:E,disabled:W.disabled,bodyElement:"label",labelElement:"span",classNames:r,styles:o,unstyled:l,"data-checked":W.checked,variant:N,ref:I,mod:R,inert:Z.inert,...U,...w,children:[a.jsx("input",{...Z,...W,checked:X,"data-checked":W.checked,onChange:te=>{var le;(le=W.onChange)==null||le.call(W,te),V(te.currentTarget.checked)},id:G,ref:e,type:"checkbox",role:"switch",inert:Z.inert,...F("input")}),a.jsxs(ve,{"aria-hidden":"true",component:"span",mod:{error:E,"label-position":S,"without-labels":!m&&!p},...F("track"),children:[a.jsx(ve,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":L&&!A},...F("thumb"),children:A}),a.jsx("span",{...F("trackLabel"),children:X?m:p})]})]})});Iw.classes={...xF,...k7};Iw.displayName="@mantine/core/Switch";Iw.Group=nE;const[qne,$ne]=Wi("Table component was not found in the tree");var ib={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Qne(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function kf(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=Oe((i,s)=>{const o=we(n,{},i),{classNames:l,className:u,style:h,styles:f,...p}=o,m=$ne();return a.jsx(ve,{component:t,ref:s,...Qne(m,e),...m.getStyles(t,{className:u,classNames:l,style:h,styles:f,props:o}),...p})});return r.displayName=`@mantine/core/${n}`,r.classes=ib,r}const C3=kf("th",{columnBorder:!0}),wF=kf("td",{columnBorder:!0}),W1=kf("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),SF=kf("thead",{stickyHeader:!0}),jF=kf("tbody"),CF=kf("tfoot"),_F=kf("caption",{captionSide:!0});function rE({data:t}){return a.jsxs(a.Fragment,{children:[t.caption&&a.jsx(_F,{children:t.caption}),t.head&&a.jsx(SF,{children:a.jsx(W1,{children:t.head.map((e,n)=>a.jsx(C3,{children:e},n))})}),t.body&&a.jsx(jF,{children:t.body.map((e,n)=>a.jsx(W1,{children:e.map((r,i)=>a.jsx(wF,{children:r},i))},n))}),t.foot&&a.jsx(CF,{children:a.jsx(W1,{children:t.foot.map((e,n)=>a.jsx(C3,{children:e},n))})})]})}rE.displayName="@mantine/core/TableDataRenderer";const Une={type:"scrollarea"},Wne=(t,{minWidth:e,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":fe(e),"--table-max-height":fe(n),"--table-overflow":r==="native"?"auto":void 0}}),iE=Oe((t,e)=>{const n=we("TableScrollContainer",Une,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,children:h,minWidth:f,maxHeight:p,type:m,scrollAreaProps:v,attributes:b,...x}=n,w=lt({name:"TableScrollContainer",classes:ib,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:b,vars:u,varsResolver:Wne,rootSelector:"scrollContainer"});return a.jsx(ve,{component:m==="scrollarea"?La:"div",...m==="scrollarea"?p?{offsetScrollbars:"xy",...v}:{offsetScrollbars:"x",...v}:{},ref:e,...w("scrollContainer"),...x,children:a.jsx("div",{...w("scrollContainerInner"),children:h})})});iE.classes=ib;iE.displayName="@mantine/core/TableScrollContainer";const Vne={withRowBorders:!0,verticalSpacing:7},Yne=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:s,stripedColor:o,highlightOnHoverColor:l,striped:u,highlightOnHover:h,stickyHeaderOffset:f,stickyHeader:p})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":zi(r),"--table-vertical-spacing":zi(i),"--table-border-color":s?hr(s,t):void 0,"--table-striped-color":u&&o?hr(o,t):void 0,"--table-highlight-on-hover-color":h&&l?hr(l,t):void 0,"--table-sticky-header-offset":p?fe(f):void 0}}),re=Oe((t,e)=>{const n=we("Table",Vne,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,horizontalSpacing:h,verticalSpacing:f,captionSide:p,stripedColor:m,highlightOnHoverColor:v,striped:b,highlightOnHover:x,withColumnBorders:w,withRowBorders:A,withTableBorder:j,borderColor:C,layout:_,variant:S,data:O,children:E,stickyHeader:D,stickyHeaderOffset:N,mod:I,tabularNums:R,attributes:L,...Q}=n,z=lt({name:"Table",props:n,className:i,style:s,classes:ib,classNames:r,styles:o,unstyled:l,attributes:L,rootSelector:"table",vars:u,varsResolver:Yne});return a.jsx(qne,{value:{getStyles:z,stickyHeader:D,striped:b===!0?"odd":b||void 0,highlightOnHover:x,withColumnBorders:w,withRowBorders:A,captionSide:p||"bottom"},children:a.jsx(ve,{component:"table",variant:S,ref:e,mod:[{"data-with-table-border":j,"data-tabular-nums":R},I],...z("table"),...Q,children:E||!!O&&a.jsx(rE,{data:O})})})});re.classes=ib;re.displayName="@mantine/core/Table";re.Td=wF;re.Th=C3;re.Tr=W1;re.Thead=SF;re.Tbody=jF;re.Tfoot=CF;re.Caption=_F;re.ScrollContainer=iE;re.DataRenderer=rE;const[Gne,sE]=Wi("Tabs component was not found in the tree");var sb={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const aE=Oe((t,e)=>{const n=we("TabsList",null,t),{children:r,className:i,grow:s,justify:o,classNames:l,styles:u,style:h,mod:f,...p}=n,m=sE();return a.jsx(ve,{...p,...m.getStyles("list",{className:i,style:h,classNames:l,styles:u,props:n,variant:m.variant}),ref:e,role:"tablist",variant:m.variant,mod:[{grow:s,orientation:m.orientation,placement:m.orientation==="vertical"&&m.placement,inverted:m.inverted},f],"aria-orientation":m.orientation,__vars:{"--tabs-justify":o},children:r})});aE.classes=sb;aE.displayName="@mantine/core/TabsList";const oE=Oe((t,e)=>{const n=we("TabsPanel",null,t),{children:r,className:i,value:s,classNames:o,styles:l,style:u,mod:h,keepMounted:f,...p}=n,m=sE(),v=m.value===s,b=m.keepMounted||f||v?r:null;return a.jsx(ve,{...m.getStyles("panel",{className:i,classNames:o,styles:l,style:[u,v?void 0:{display:"none"}],props:n}),ref:e,mod:[{orientation:m.orientation},h],role:"tabpanel",id:m.getPanelId(s),"aria-labelledby":m.getTabId(s),...p,children:b})});oE.classes=sb;oE.displayName="@mantine/core/TabsPanel";const lE=Oe((t,e)=>{const n=we("TabsTab",null,t),{className:r,children:i,rightSection:s,leftSection:o,value:l,onClick:u,onKeyDown:h,disabled:f,color:p,style:m,classNames:v,styles:b,vars:x,mod:w,tabIndex:A,...j}=n,C=xi(),{dir:_}=Tf(),S=sE(),O=l===S.value,E=N=>{S.onChange(S.allowTabDeactivation&&l===S.value?null:l),u==null||u(N)},D={classNames:v,styles:b,props:n};return a.jsxs(Rr,{...S.getStyles("tab",{className:r,style:m,variant:S.variant,...D}),disabled:f,unstyled:S.unstyled,variant:S.variant,mod:[{active:O,disabled:f,orientation:S.orientation,inverted:S.inverted,placement:S.orientation==="vertical"&&S.placement},w],ref:e,role:"tab",id:S.getTabId(l),"aria-selected":O,tabIndex:A!==void 0?A:O||S.value===null?0:-1,"aria-controls":S.getPanelId(l),onClick:E,__vars:{"--tabs-color":p?hr(p,C):void 0},onKeyDown:$A({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:S.activateTabWithKeyboard,loop:S.loop,orientation:S.orientation||"horizontal",dir:_,onKeyDown:h}),...j,children:[o&&a.jsx("span",{...S.getStyles("tabSection",D),"data-position":"left",children:o}),i&&a.jsx("span",{...S.getStyles("tabLabel",D),children:i}),s&&a.jsx("span",{...S.getStyles("tabSection",D),"data-position":"right",children:s})]})});lE.classes=sb;lE.displayName="@mantine/core/TabsTab";const CR="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Xne={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},Kne=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":Jn(e),"--tabs-color":hr(n,t),"--tabs-text-color":zm(r,t)?Yh({color:n,theme:t,autoContrast:r}):void 0}}),Ma=Oe((t,e)=>{const n=we("Tabs",Xne,t),{defaultValue:r,value:i,onChange:s,orientation:o,children:l,loop:u,id:h,activateTabWithKeyboard:f,allowTabDeactivation:p,variant:m,color:v,radius:b,inverted:x,placement:w,keepMounted:A,classNames:j,styles:C,unstyled:_,className:S,style:O,vars:E,autoContrast:D,mod:N,attributes:I,...R}=n,L=ki(h),[Q,z]=Ui({value:i,defaultValue:r,finalValue:null,onChange:s}),H=lt({name:"Tabs",props:n,classes:sb,className:S,style:O,classNames:j,styles:C,unstyled:_,attributes:I,vars:E,varsResolver:Kne});return a.jsx(Gne,{value:{placement:w,value:Q,orientation:o,id:L,loop:u,activateTabWithKeyboard:f,getTabId:jx(`${L}-tab`,CR),getPanelId:jx(`${L}-panel`,CR),onChange:z,allowTabDeactivation:p,variant:m,color:v,radius:b,inverted:x,keepMounted:A,unstyled:_,getStyles:H},children:a.jsx(ve,{ref:e,id:L,variant:m,mod:[{orientation:o,inverted:o==="horizontal"&&x,placement:o==="vertical"&&w},N],...H("root"),...R,children:l})})});Ma.classes=sb;Ma.displayName="@mantine/core/Tabs";Ma.Tab=lE;Ma.Panel=oE;Ma.List=aE;const tc=Oe((t,e)=>{const n=we("TextInput",null,t);return a.jsx(Fa,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});tc.classes=Fa.classes;tc.displayName="@mantine/core/TextInput";/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Zne={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const St=(t,e,n,r)=>{const i=M.forwardRef(({color:s="currentColor",size:o=24,stroke:l=2,title:u,className:h,children:f,...p},m)=>M.createElement("svg",{ref:m,...Zne[t],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,h].join(" "),...t==="filled"?{fill:s}:{strokeWidth:l,stroke:s},...p},[u&&M.createElement("title",{key:"svg-title"},u),...r.map(([v,b])=>M.createElement(v,b)),...Array.isArray(f)?f:[f]]));return i.displayName=`${n}`,i};/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jne=[["path",{d:"M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 6l8 0",key:"svg-1"}],["path",{d:"M16 6l4 0",key:"svg-2"}],["path",{d:"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M4 12l2 0",key:"svg-4"}],["path",{d:"M10 12l10 0",key:"svg-5"}],["path",{d:"M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-6"}],["path",{d:"M4 18l11 0",key:"svg-7"}],["path",{d:"M19 18l1 0",key:"svg-8"}]],ere=St("outline","adjustments-horizontal","AdjustmentsHorizontal",Jne);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tre=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],nre=St("outline","alert-circle","AlertCircle",tre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const rre=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Qi=St("outline","alert-triangle","AlertTriangle",rre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ire=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]],sre=St("outline","align-justified","AlignJustified",ire);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const are=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]],_R=St("outline","arrow-down","ArrowDown",are);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ore=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],lre=St("outline","arrow-left","ArrowLeft",ore);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cre=[["path",{d:"M9.346 5.353c.21 -.129 .428 -.246 .654 -.353a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3m-1 3h-13a4 4 0 0 0 2 -3v-3a6.996 6.996 0 0 1 1.273 -3.707",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],ure=St("outline","bell-off","BellOff",cre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hre=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],cE=St("outline","bell","Bell",hre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const dre=[["path",{d:"M6 20a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-0"}],["path",{d:"M16 4a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-1"}],["path",{d:"M16 20a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-2"}],["path",{d:"M11 12a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-3"}],["path",{d:"M21 12a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-4"}],["path",{d:"M5.058 18.306l2.88 -4.606",key:"svg-5"}],["path",{d:"M10.061 10.303l2.877 -4.604",key:"svg-6"}],["path",{d:"M10.065 13.705l2.876 4.6",key:"svg-7"}],["path",{d:"M15.063 5.7l2.881 4.61",key:"svg-8"}]],fre=St("outline","binary-tree","BinaryTree",dre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pre=[["path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-0"}],["path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-1"}],["path",{d:"M3 6l0 13",key:"svg-2"}],["path",{d:"M12 6l0 13",key:"svg-3"}],["path",{d:"M21 6l0 13",key:"svg-4"}]],mre=St("outline","book","Book",pre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gre=[["path",{d:"M4 19l16 0",key:"svg-0"}],["path",{d:"M4 15l4 -6l4 2l4 -5l4 4",key:"svg-1"}]],vre=St("outline","chart-line","ChartLine",gre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bre=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],TF=St("outline","check","Check",bre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yre=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],rv=St("outline","chevron-down","ChevronDown",yre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xre=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],Are=St("outline","chevron-left","ChevronLeft",xre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wre=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],kF=St("outline","chevron-right","ChevronRight",wre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sre=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],uE=St("outline","chevron-up","ChevronUp",Sre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jre=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],Cre=St("outline","circle-minus","CircleMinus",jre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _re=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],Tre=St("outline","circle-plus","CirclePlus",_re);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const kre=[["path",{d:"M20.942 13.018a9 9 0 1 0 -7.909 7.922",key:"svg-0"}],["path",{d:"M12 7v5l2 2",key:"svg-1"}],["path",{d:"M17 17v5",key:"svg-2"}],["path",{d:"M21 17v5",key:"svg-3"}]],Ore=St("outline","clock-pause","ClockPause",kre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ere=[["path",{d:"M12 7v5l2 2",key:"svg-0"}],["path",{d:"M17 22l5 -3l-5 -3l0 6",key:"svg-1"}],["path",{d:"M13.017 20.943a9 9 0 1 1 7.831 -7.292",key:"svg-2"}]],Mre=St("outline","clock-play","ClockPlay",Ere);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dre=[["path",{d:"M5 9.897c0 -1.714 1.46 -3.104 3.26 -3.104c.275 -1.22 1.255 -2.215 2.572 -2.611c1.317 -.397 2.77 -.134 3.811 .69c1.042 .822 1.514 2.08 1.239 3.3h.693a2.42 2.42 0 0 1 2.425 2.414a2.42 2.42 0 0 1 -2.425 2.414h-8.315c-1.8 0 -3.26 -1.39 -3.26 -3.103",key:"svg-0"}],["path",{d:"M12 13v3",key:"svg-1"}],["path",{d:"M10 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M14 18h7",key:"svg-3"}],["path",{d:"M3 18h7",key:"svg-4"}]],Rre=St("outline","cloud-data-connection","CloudDataConnection",Dre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nre=[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 9v6",key:"svg-1"}],["path",{d:"M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2",key:"svg-2"}],["path",{d:"M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2",key:"svg-3"}]],OF=St("outline","code-plus","CodePlus",Nre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pre=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],hE=St("outline","copy","Copy",Pre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ire=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Bre=St("outline","database","Database",Ire);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lre=[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1l0 -10",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}],["path",{d:"M9 12v-4",key:"svg-4"}],["path",{d:"M12 12v-1",key:"svg-5"}],["path",{d:"M15 12v-2",key:"svg-6"}],["path",{d:"M12 12v-1",key:"svg-7"}]],Fre=St("outline","device-desktop-analytics","DeviceDesktopAnalytics",Lre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hre=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],zre=St("outline","dots-vertical","DotsVertical",Hre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qre=[["path",{d:"M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9",key:"svg-0"}],["path",{d:"M5 21v-7",key:"svg-1"}]],$re=St("outline","flag","Flag",qre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qre=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M7 14l3 -3l2 2l3 -3l2 2",key:"svg-1"}]],Ure=St("outline","graph","Graph",Qre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wre=[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1l0 -10",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}],["path",{d:"M7 10h2l2 3l2 -6l1 3h3",key:"svg-4"}]],EF=St("outline","heart-rate-monitor","HeartRateMonitor",Wre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vre=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],_3=St("outline","hourglass","Hourglass",Vre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yre=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],Kn=St("outline","info-circle","InfoCircle",Yre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gre=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M10 16l2 -2l2 2",key:"svg-2"}]],MF=St("outline","layout-navbar-collapse","LayoutNavbarCollapse",Gre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xre=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M10 14l2 2l2 -2",key:"svg-2"}]],DF=St("outline","layout-navbar-expand","LayoutNavbarExpand",Xre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kre=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M15 18h-2l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5",key:"svg-2"}],["path",{d:"M19 16v3",key:"svg-3"}],["path",{d:"M19 22v.01",key:"svg-4"}]],Zre=St("outline","message-exclamation","MessageExclamation",Kre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jre=[["path",{d:"M5 12l14 0",key:"svg-0"}]],eie=St("outline","minus","Minus",Jre);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tie=[["path",{d:"M6.528 6.536a6 6 0 0 0 7.942 7.933m2.247 -1.76a6 6 0 0 0 -8.427 -8.425",key:"svg-0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6c0 .337 -.006 .66 -.017 .968m-.55 3.473c-.333 .884 -.81 1.403 -1.433 1.559",key:"svg-1"}],["path",{d:"M12 3c-.936 .234 -1.544 1.29 -1.822 3.167m-.16 3.838c.116 3.029 .776 4.695 1.982 4.995",key:"svg-2"}],["path",{d:"M6 9h3m4 0h5",key:"svg-3"}],["path",{d:"M3 20h7",key:"svg-4"}],["path",{d:"M14 20h7",key:"svg-5"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M12 15v3",key:"svg-7"}],["path",{d:"M3 3l18 18",key:"svg-8"}]],nie=St("outline","network-off","NetworkOff",tie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const rie=[["path",{d:"M20 16l-4 4",key:"svg-0"}],["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5",key:"svg-1"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5",key:"svg-2"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-3"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-4"}],["path",{d:"M10 11l-2 2",key:"svg-5"}],["path",{d:"M13 14l-2 2",key:"svg-6"}],["path",{d:"M16 16l4 4",key:"svg-7"}]],iie=St("outline","plug-connected-x","PlugConnectedX",rie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const sie=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],RF=St("outline","plus","Plus",sie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const aie=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],T3=St("outline","refresh","Refresh",aie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const oie=[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]],NF=St("outline","repeat","Repeat",oie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lie=[["path",{d:"M3 4a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M15 16a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M21 11v-3a2 2 0 0 0 -2 -2h-6l3 3m0 -6l-3 3",key:"svg-2"}],["path",{d:"M3 13v3a2 2 0 0 0 2 2h6l-3 -3m0 6l3 -3",key:"svg-3"}]],PF=St("outline","replace","Replace",lie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cie=[["path",{d:"M12 4a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M4 17l5 1l.75 -1.5",key:"svg-1"}],["path",{d:"M15 21l0 -4l-4 -3l1 -6",key:"svg-2"}],["path",{d:"M7 12l0 -3l5 -1l3 3l3 1",key:"svg-3"}]],uie=St("outline","run","Run",cie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hie=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],Zh=St("outline","search","Search",hie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const die=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],fie=St("outline","selector","Selector",die);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pie=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-2",key:"svg-0"}],["path",{d:"M12 20h-6a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h10.5",key:"svg-1"}],["path",{d:"M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M18 14.5v1.5",key:"svg-3"}],["path",{d:"M18 20v1.5",key:"svg-4"}],["path",{d:"M21.032 16.25l-1.299 .75",key:"svg-5"}],["path",{d:"M16.27 19l-1.3 .75",key:"svg-6"}],["path",{d:"M14.97 16.25l1.3 .75",key:"svg-7"}],["path",{d:"M19.733 19l1.3 .75",key:"svg-8"}],["path",{d:"M7 8v.01",key:"svg-9"}],["path",{d:"M7 16v.01",key:"svg-10"}]],mie=St("outline","server-cog","ServerCog",pie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gie=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3",key:"svg-0"}],["path",{d:"M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],vie=St("outline","server","Server",gie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bie=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],yie=St("outline","settings","Settings",bie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xie=[["path",{d:"M3 11h18",key:"svg-0"}],["path",{d:"M5 11v-4a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v4",key:"svg-1"}],["path",{d:"M4 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}],["path",{d:"M10 17h4",key:"svg-4"}]],Aie=St("outline","spy","Spy",xie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wie=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]],IF=St("outline","table","Table",wie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sie=[["path",{d:"M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2",key:"svg-0"}],["path",{d:"M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592",key:"svg-1"}],["path",{d:"M7 10h-.01",key:"svg-2"}]],jie=St("outline","tags","Tags",Sie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cie=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],_ie=St("outline","terminal","Terminal",Cie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tie=[["path",{d:"M4 16l6 -7l5 5l5 -6",key:"svg-0"}],["path",{d:"M14 14a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 9a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M3 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 8a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],kie=St("outline","timeline","Timeline",Tie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oie=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Eie=St("outline","trash","Trash",Oie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mie=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 8h16",key:"svg-1"}],["path",{d:"M20 12h-16",key:"svg-2"}],["path",{d:"M4 16h16",key:"svg-3"}],["path",{d:"M9 4v4",key:"svg-4"}],["path",{d:"M14 8v4",key:"svg-5"}],["path",{d:"M8 12v4",key:"svg-6"}],["path",{d:"M16 12v4",key:"svg-7"}],["path",{d:"M11 16v4",key:"svg-8"}]],Die=St("outline","wall","Wall",Mie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rie=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Nie=St("outline","x","X",Rie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pie=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}],["path",{d:"M8 8l-2 2l2 2",key:"svg-2"}],["path",{d:"M12 8l2 2l-2 2",key:"svg-3"}]],Iie=St("outline","zoom-code","ZoomCode",Pie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bie=[["path",{d:"M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z",key:"svg-0"}],["path",{d:"M12 2c1.358 0 2.506 .903 2.875 2.141l.046 .171l.008 .043a8.013 8.013 0 0 1 4.024 6.069l.028 .287l.019 .289v2.931l.021 .136a3 3 0 0 0 1.143 1.847l.167 .117l.162 .099c.86 .487 .56 1.766 -.377 1.864l-.116 .006h-16c-1.028 0 -1.387 -1.364 -.493 -1.87a3 3 0 0 0 1.472 -2.063l.021 -.143l.001 -2.97a8 8 0 0 1 3.821 -6.454l.248 -.146l.01 -.043a3.003 3.003 0 0 1 2.562 -2.29l.182 -.017l.176 -.004z",key:"svg-1"}]],Lie=St("filled","bell-filled","BellFilled",Bie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fie=[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-9 1.732a8 8 0 0 0 4.001 14.928l-.001 -16a8 8 0 0 0 -4 1.072",key:"svg-0"}]],Hie=St("filled","brightness-filled","BrightnessFilled",Fie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const zie=[["path",{d:"M20 18a1 1 0 0 1 .117 1.993l-.117 .007h-16a1 1 0 0 1 -.117 -1.993l.117 -.007h16z",key:"svg-0"}],["path",{d:"M15.22 5.375a1 1 0 0 1 1.393 -.165l.094 .083l4 4a1 1 0 0 1 .284 .576l.009 .131v5a1 1 0 0 1 -.883 .993l-.117 .007h-16.022l-.11 -.009l-.11 -.02l-.107 -.034l-.105 -.046l-.1 -.059l-.094 -.07l-.06 -.055l-.072 -.082l-.064 -.089l-.054 -.096l-.016 -.035l-.04 -.103l-.027 -.106l-.015 -.108l-.004 -.11l.009 -.11l.019 -.105c.01 -.04 .022 -.077 .035 -.112l.046 -.105l.059 -.1l4 -6a1 1 0 0 1 1.165 -.39l.114 .05l3.277 1.638l3.495 -4.369z",key:"svg-1"}]],qie=St("filled","chart-area-filled","ChartAreaFilled",zie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $ie=[["path",{d:"M12 1.992a10 10 0 1 0 9.236 13.838c.341 -.82 -.476 -1.644 -1.298 -1.31a6.5 6.5 0 0 1 -6.864 -10.787l.077 -.08c.551 -.63 .113 -1.653 -.758 -1.653h-.266l-.068 -.006l-.06 -.002z",key:"svg-0"}]],Qie=St("filled","moon-filled","MoonFilled",$ie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uie=[["path",{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",key:"svg-0"}]],gC=St("filled","point-filled","PointFilled",Uie);/**
 * @license @tabler/icons-react v3.40.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wie=[["path",{d:"M12 19a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z",key:"svg-0"}],["path",{d:"M18.313 16.91l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.218 -1.567l.102 .07z",key:"svg-1"}],["path",{d:"M7.007 16.993a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z",key:"svg-2"}],["path",{d:"M4 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",key:"svg-3"}],["path",{d:"M21 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",key:"svg-4"}],["path",{d:"M6.213 4.81l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.217 -1.567l.102 .07z",key:"svg-5"}],["path",{d:"M19.107 4.893a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z",key:"svg-6"}],["path",{d:"M12 2a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z",key:"svg-7"}],["path",{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",key:"svg-8"}]],Vie=St("filled","sun-filled","SunFilled",Wie);/**
 * react-router v7.13.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var TR="popstate";function kR(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function Yie(t={}){function e(r,i){var h;let s=(h=i.state)==null?void 0:h.masked,{pathname:o,search:l,hash:u}=s||r.location;return k3("",{pathname:o,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:iv(i)}return Xie(e,n,null,t)}function Pr(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function sl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Gie(){return Math.random().toString(36).substring(2,10)}function OR(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function k3(t,e,n=null,r,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Zm(e):e,state:n,key:e&&e.key||r||Gie(),unstable_mask:i}}function iv({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zm(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Xie(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l="POP",u=null,h=f();h==null&&(h=0,o.replaceState({...o.state,idx:h},""));function f(){return(o.state||{idx:null}).idx}function p(){l="POP";let w=f(),A=w==null?null:w-h;h=w,u&&u({action:l,location:x.location,delta:A})}function m(w,A){l="PUSH";let j=kR(w)?w:k3(x.location,w,A);h=f()+1;let C=OR(j,h),_=x.createHref(j.unstable_mask||j);try{o.pushState(C,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(_)}s&&u&&u({action:l,location:x.location,delta:1})}function v(w,A){l="REPLACE";let j=kR(w)?w:k3(x.location,w,A);h=f();let C=OR(j,h),_=x.createHref(j.unstable_mask||j);o.replaceState(C,"",_),s&&u&&u({action:l,location:x.location,delta:0})}function b(w){return Kie(w)}let x={get action(){return l},get location(){return t(i,o)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(TR,p),u=w,()=>{i.removeEventListener(TR,p),u=null}},createHref(w){return e(i,w)},createURL:b,encodeLocation(w){let A=b(w);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:v,go(w){return o.go(w)}};return x}function Kie(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Pr(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:iv(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function BF(t,e,n="/"){return Zie(t,e,n,!1)}function Zie(t,e,n,r){let i=typeof e=="string"?Zm(e):e,s=Jc(i.pathname||"/",n);if(s==null)return null;let o=LF(t);Jie(o);let l=null;for(let u=0;l==null&&u<o.length;++u){let h=use(s);l=lse(o[u],h,r)}return l}function LF(t,e=[],n=[],r="",i=!1){let s=(o,l,u=i,h)=>{let f={relativePath:h===void 0?o.path||"":h,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;Pr(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let p=Wl([r,f.relativePath]),m=n.concat(f);o.children&&o.children.length>0&&(Pr(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),LF(o.children,e,m,p,u)),!(o.path==null&&!o.index)&&e.push({path:p,score:ase(p,o.index),routesMeta:m})};return t.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))s(o,l);else for(let h of FF(o.path))s(o,l,!0,h)}),e}function FF(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=FF(r.join("/")),l=[];return l.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&l.push(...o),l.map(u=>t.startsWith("/")&&u===""?"/":u)}function Jie(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:ose(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ese=/^:[\w-]+$/,tse=3,nse=2,rse=1,ise=10,sse=-2,ER=t=>t==="*";function ase(t,e){let n=t.split("/"),r=n.length;return n.some(ER)&&(r+=sse),e&&(r+=nse),n.filter(i=>!ER(i)).reduce((i,s)=>i+(ese.test(s)?tse:s===""?rse:ise),r)}function ose(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function lse(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let l=0;l<r.length;++l){let u=r[l],h=l===r.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=Lx({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},f),m=u.route;if(!p&&h&&n&&!r[r.length-1].route.index&&(p=Lx({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:Wl([s,p.pathname]),pathnameBase:pse(Wl([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=Wl([s,p.pathnameBase]))}return o}function Lx(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=cse(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((h,{paramName:f,isOptional:p},m)=>{if(f==="*"){let b=l[m]||"";o=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const v=l[m];return p&&!v?h[f]=void 0:h[f]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:t}}function cse(t,e=!1,n=!0){sl(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,u,h,f)=>{if(r.push({paramName:l,isOptional:u!=null}),u){let p=f.charAt(h+o.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function use(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return sl(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Jc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var hse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dse(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Zm(t):t,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=MR(n.substring(1),"/"):s=MR(n,e)):s=e,{pathname:s,search:mse(r),hash:gse(i)}}function MR(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function vC(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fse(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function dE(t){let e=fse(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function Bw(t,e,n,r=!1){let i;typeof t=="string"?i=Zm(t):(i={...t},Pr(!i.pathname||!i.pathname.includes("?"),vC("?","pathname","search",i)),Pr(!i.pathname||!i.pathname.includes("#"),vC("#","pathname","hash",i)),Pr(!i.search||!i.search.includes("#"),vC("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let p=e.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?e[p]:"/"}let u=dse(i,l),h=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(h||f)&&(u.pathname+="/"),u}var Wl=t=>t.join("/").replace(/\/\/+/g,"/"),pse=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mse=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,gse=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,vse=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function bse(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function yse(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var HF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zF(t,e){let n=t;if(typeof n!="string"||!hse.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(HF)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),l=Jc(o.pathname,e);o.origin===s.origin&&l!=null?n=l+o.search+o.hash:i=!0}catch{sl(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var qF=["POST","PUT","PATCH","DELETE"];new Set(qF);var xse=["GET",...qF];new Set(xse);var Of=M.createContext(null);Of.displayName="DataRouter";var Lw=M.createContext(null);Lw.displayName="DataRouterState";var Ase=M.createContext(!1),$F=M.createContext({isTransitioning:!1});$F.displayName="ViewTransition";var wse=M.createContext(new Map);wse.displayName="Fetchers";var Sse=M.createContext(null);Sse.displayName="Await";var da=M.createContext(null);da.displayName="Navigation";var ab=M.createContext(null);ab.displayName="Location";var nc=M.createContext({outlet:null,matches:[],isDataRoute:!1});nc.displayName="Route";var fE=M.createContext(null);fE.displayName="RouteError";var QF="REACT_ROUTER_ERROR",jse="REDIRECT",Cse="ROUTE_ERROR_RESPONSE";function _se(t){if(t.startsWith(`${QF}:${jse}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function Tse(t){if(t.startsWith(`${QF}:${Cse}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new vse(e.status,e.statusText,e.data)}catch{}}function kse(t,{relative:e}={}){Pr(Jm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=M.useContext(da),{hash:i,pathname:s,search:o}=ob(t,{relative:e}),l=s;return n!=="/"&&(l=s==="/"?n:Wl([n,s])),r.createHref({pathname:l,search:o,hash:i})}function Jm(){return M.useContext(ab)!=null}function cl(){return Pr(Jm(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(ab).location}var UF="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function WF(t){M.useContext(da).static||M.useLayoutEffect(t)}function pE(){let{isDataRoute:t}=M.useContext(nc);return t?zse():Ose()}function Ose(){Pr(Jm(),"useNavigate() may be used only in the context of a <Router> component.");let t=M.useContext(Of),{basename:e,navigator:n}=M.useContext(da),{matches:r}=M.useContext(nc),{pathname:i}=cl(),s=JSON.stringify(dE(r)),o=M.useRef(!1);return WF(()=>{o.current=!0}),M.useCallback((u,h={})=>{if(sl(o.current,UF),!o.current)return;if(typeof u=="number"){n.go(u);return}let f=Bw(u,JSON.parse(s),i,h.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Wl([e,f.pathname])),(h.replace?n.replace:n.push)(f,h.state,h)},[e,n,s,i,t])}M.createContext(null);function ob(t,{relative:e}={}){let{matches:n}=M.useContext(nc),{pathname:r}=cl(),i=JSON.stringify(dE(n));return M.useMemo(()=>Bw(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function Ese(t,e){return VF(t,e)}function VF(t,e,n){var w;Pr(Jm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=M.useContext(da),{matches:i}=M.useContext(nc),s=i[i.length-1],o=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",h=s&&s.route;{let A=h&&h.path||"";GF(l,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let f=cl(),p;if(e){let A=typeof e=="string"?Zm(e):e;Pr(u==="/"||((w=A.pathname)==null?void 0:w.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${A.pathname}" was given in the \`location\` prop.`),p=A}else p=f;let m=p.pathname||"/",v=m;if(u!=="/"){let A=u.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(A.length).join("/")}let b=BF(t,{pathname:v});sl(h||b!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),sl(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=Pse(b&&b.map(A=>Object.assign({},A,{params:Object.assign({},o,A.params),pathname:Wl([u,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?u:Wl([u,r.encodeLocation?r.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,n);return e&&x?M.createElement(ab.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...p},navigationType:"POP"}},x):x}function Mse(){let t=Hse(),e=bse(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:s},"ErrorBoundary")," or"," ",M.createElement("code",{style:s},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},e),n?M.createElement("pre",{style:i},n):null,o)}var Dse=M.createElement(Mse,null),YF=class extends M.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=Tse(t.digest);n&&(t=n)}let e=t!==void 0?M.createElement(nc.Provider,{value:this.props.routeContext},M.createElement(fE.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?M.createElement(Rse,{error:t},e):e}};YF.contextType=Ase;var bC=new WeakMap;function Rse({children:t,error:e}){let{basename:n}=M.useContext(da);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=_se(e.digest);if(r){let i=bC.get(e);if(i)throw i;let s=zF(r.location,n);if(HF&&!bC.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw bC.set(e,o),o}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function Nse({routeContext:t,match:e,children:n}){let r=M.useContext(Of);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),M.createElement(nc.Provider,{value:t},n)}function Pse(t,e=[],n){let r=n==null?void 0:n.state;if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let i=t,s=r==null?void 0:r.errors;if(s!=null){let f=i.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);Pr(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let o=!1,l=-1;if(n&&r){o=r.renderFallback;for(let f=0;f<i.length;f++){let p=i[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(l=f),p.route.id){let{loaderData:m,errors:v}=r,b=p.route.loader&&!m.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||b){n.isStatic&&(o=!0),l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}}let u=n==null?void 0:n.onError,h=r&&u?(f,p)=>{var m,v;u(f,{location:r.location,params:((v=(m=r.matches)==null?void 0:m[0])==null?void 0:v.params)??{},unstable_pattern:yse(r.matches),errorInfo:p})}:void 0;return i.reduceRight((f,p,m)=>{let v,b=!1,x=null,w=null;r&&(v=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||Dse,o&&(l<0&&m===0?(GF("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,w=null):l===m&&(b=!0,w=p.route.hydrateFallbackElement||null)));let A=e.concat(i.slice(0,m+1)),j=()=>{let C;return v?C=x:b?C=w:p.route.Component?C=M.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=f,M.createElement(Nse,{match:p,routeContext:{outlet:f,matches:A,isDataRoute:r!=null},children:C})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?M.createElement(YF,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:j(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):j()},null)}function mE(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ise(t){let e=M.useContext(Of);return Pr(e,mE(t)),e}function Bse(t){let e=M.useContext(Lw);return Pr(e,mE(t)),e}function Lse(t){let e=M.useContext(nc);return Pr(e,mE(t)),e}function gE(t){let e=Lse(t),n=e.matches[e.matches.length-1];return Pr(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Fse(){return gE("useRouteId")}function Hse(){var r;let t=M.useContext(fE),e=Bse("useRouteError"),n=gE("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function zse(){let{router:t}=Ise("useNavigate"),e=gE("useNavigate"),n=M.useRef(!1);return WF(()=>{n.current=!0}),M.useCallback(async(i,s={})=>{sl(n.current,UF),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var DR={};function GF(t,e,n){!e&&!DR[t]&&(DR[t]=!0,sl(!1,n))}M.memo(qse);function qse({routes:t,future:e,state:n,isStatic:r,onError:i}){return VF(t,void 0,{state:n,isStatic:r,onError:i})}function $se({to:t,replace:e,state:n,relative:r}){Pr(Jm(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=M.useContext(da);sl(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=M.useContext(nc),{pathname:o}=cl(),l=pE(),u=Bw(t,dE(s),o,r==="path"),h=JSON.stringify(u);return M.useEffect(()=>{l(JSON.parse(h),{replace:e,state:n,relative:r})},[l,h,r,e,n]),null}function Ku(t){Pr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Qse({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){Pr(!Jm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),u=M.useMemo(()=>({basename:l,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[l,i,s,o]);typeof n=="string"&&(n=Zm(n));let{pathname:h="/",search:f="",hash:p="",state:m=null,key:v="default",unstable_mask:b}=n,x=M.useMemo(()=>{let w=Jc(h,l);return w==null?null:{location:{pathname:w,search:f,hash:p,state:m,key:v,unstable_mask:b},navigationType:r}},[l,h,f,p,m,v,r,b]);return sl(x!=null,`<Router basename="${l}"> is not able to match the URL "${h}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:M.createElement(da.Provider,{value:u},M.createElement(ab.Provider,{children:e,value:x}))}function RR({children:t,location:e}){return Ese(O3(t),e)}function O3(t,e=[]){let n=[];return M.Children.forEach(t,(r,i)=>{if(!M.isValidElement(r))return;let s=[...e,i];if(r.type===M.Fragment){n.push.apply(n,O3(r.props.children,s));return}Pr(r.type===Ku,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pr(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=O3(r.props.children,s)),n.push(o)}),n}var V1="get",Y1="application/x-www-form-urlencoded";function Fw(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Use(t){return Fw(t)&&t.tagName.toLowerCase()==="button"}function Wse(t){return Fw(t)&&t.tagName.toLowerCase()==="form"}function Vse(t){return Fw(t)&&t.tagName.toLowerCase()==="input"}function Yse(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Gse(t,e){return t.button===0&&(!e||e==="_self")&&!Yse(t)}var Yy=null;function Xse(){if(Yy===null)try{new FormData(document.createElement("form"),0),Yy=!1}catch{Yy=!0}return Yy}var Kse=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yC(t){return t!=null&&!Kse.has(t)?(sl(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Y1}"`),null):t}function Zse(t,e){let n,r,i,s,o;if(Wse(t)){let l=t.getAttribute("action");r=l?Jc(l,e):null,n=t.getAttribute("method")||V1,i=yC(t.getAttribute("enctype"))||Y1,s=new FormData(t)}else if(Use(t)||Vse(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=t.getAttribute("formaction")||l.getAttribute("action");if(r=u?Jc(u,e):null,n=t.getAttribute("formmethod")||l.getAttribute("method")||V1,i=yC(t.getAttribute("formenctype"))||yC(l.getAttribute("enctype"))||Y1,s=new FormData(l,t),!Xse()){let{name:h,type:f,value:p}=t;if(f==="image"){let m=h?`${h}.`:"";s.append(`${m}x`,"0"),s.append(`${m}y`,"0")}else h&&s.append(h,p)}}else{if(Fw(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=V1,r=null,i=Y1,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vE(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Jse(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&Jc(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function eae(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tae(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function nae(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await eae(s,n);return o.links?o.links():[]}return[]}));return aae(r.flat(1).filter(tae).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function NR(t,e,n,r,i,s){let o=(u,h)=>n[h]?u.route.id!==n[h].route.id:!0,l=(u,h)=>{var f;return n[h].pathname!==u.pathname||((f=n[h].route.path)==null?void 0:f.endsWith("*"))&&n[h].params["*"]!==u.params["*"]};return s==="assets"?e.filter((u,h)=>o(u,h)||l(u,h)):s==="data"?e.filter((u,h)=>{var p;let f=r.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(o(u,h)||l(u,h))return!0;if(u.route.shouldRevalidate){let m=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(t,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function rae(t,e,{includeHydrateFallback:n}={}){return iae(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function iae(t){return[...new Set(t)]}function sae(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function aae(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(sae(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function XF(){let t=M.useContext(Of);return vE(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function oae(){let t=M.useContext(Lw);return vE(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var bE=M.createContext(void 0);bE.displayName="FrameworkContext";function KF(){let t=M.useContext(bE);return vE(t,"You must render this element inside a <HydratedRouter> element"),t}function lae(t,e){let n=M.useContext(bE),[r,i]=M.useState(!1),[s,o]=M.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,m=M.useRef(null);M.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let x=A=>{A.forEach(j=>{o(j.isIntersecting)})},w=new IntersectionObserver(x,{threshold:.5});return m.current&&w.observe(m.current),()=>{w.disconnect()}}},[t]),M.useEffect(()=>{if(r){let x=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(x)}}},[r]);let v=()=>{i(!0)},b=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,m,{}]:[s,m,{onFocus:rg(l,v),onBlur:rg(u,b),onMouseEnter:rg(h,v),onMouseLeave:rg(f,b),onTouchStart:rg(p,v)}]:[!1,m,{}]}function rg(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function cae({page:t,...e}){let{router:n}=XF(),r=M.useMemo(()=>BF(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?M.createElement(hae,{page:t,matches:r,...e}):null}function uae(t){let{manifest:e,routeModules:n}=KF(),[r,i]=M.useState([]);return M.useEffect(()=>{let s=!1;return nae(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function hae({page:t,matches:e,...n}){let r=cl(),{future:i,manifest:s,routeModules:o}=KF(),{basename:l}=XF(),{loaderData:u,matches:h}=oae(),f=M.useMemo(()=>NR(t,e,h,s,r,"data"),[t,e,h,s,r]),p=M.useMemo(()=>NR(t,e,h,s,r,"assets"),[t,e,h,s,r]),m=M.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let x=new Set,w=!1;if(e.forEach(j=>{var _;let C=s.routes[j.route.id];!C||!C.hasLoader||(!f.some(S=>S.route.id===j.route.id)&&j.route.id in u&&((_=o[j.route.id])!=null&&_.shouldRevalidate)||C.hasClientLoader?w=!0:x.add(j.route.id))}),x.size===0)return[];let A=Jse(t,l,i.unstable_trailingSlashAwareDataRequests,"data");return w&&x.size>0&&A.searchParams.set("_routes",e.filter(j=>x.has(j.route.id)).map(j=>j.route.id).join(",")),[A.pathname+A.search]},[l,i.unstable_trailingSlashAwareDataRequests,u,r,s,f,e,t,o]),v=M.useMemo(()=>rae(p,s),[p,s]),b=uae(p);return M.createElement(M.Fragment,null,m.map(x=>M.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),v.map(x=>M.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),b.map(({key:x,link:w})=>M.createElement("link",{key:x,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function dae(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var fae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fae&&(window.__reactRouterVersion="7.13.2")}catch{}function pae({basename:t,children:e,unstable_useTransitions:n,window:r}){let i=M.useRef();i.current==null&&(i.current=Yie({window:r,v5Compat:!0}));let s=i.current,[o,l]=M.useState({action:s.action,location:s.location}),u=M.useCallback(h=>{n===!1?l(h):M.startTransition(()=>l(h))},[n]);return M.useLayoutEffect(()=>s.listen(u),[s,u]),M.createElement(Qse,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var ZF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yE=M.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,unstable_mask:l,state:u,target:h,to:f,preventScrollReset:p,viewTransition:m,unstable_defaultShouldRevalidate:v,...b},x){let{basename:w,navigator:A,unstable_useTransitions:j}=M.useContext(da),C=typeof f=="string"&&ZF.test(f),_=zF(f,w);f=_.to;let S=kse(f,{relative:i}),O=cl(),E=null;if(l){let H=Bw(l,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);w!=="/"&&(H.pathname=H.pathname==="/"?w:Wl([w,H.pathname])),E=A.createHref(H)}let[D,N,I]=lae(r,b),R=vae(f,{replace:o,unstable_mask:l,state:u,target:h,preventScrollReset:p,relative:i,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:j});function L(H){e&&e(H),H.defaultPrevented||R(H)}let Q=!(_.isExternal||s),z=M.createElement("a",{...b,...I,href:(Q?E:void 0)||_.absoluteURL||S,onClick:Q?L:e,ref:dae(x,N),target:h,"data-discover":!C&&n==="render"?"true":void 0});return D&&!C?M.createElement(M.Fragment,null,z,M.createElement(cae,{page:S})):z});yE.displayName="Link";var Ag=M.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:l,children:u,...h},f){let p=ob(o,{relative:h.relative}),m=cl(),v=M.useContext(Lw),{navigator:b,basename:x}=M.useContext(da),w=v!=null&&wae(p)&&l===!0,A=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,j=m.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(j=j.toLowerCase(),C=C?C.toLowerCase():null,A=A.toLowerCase()),C&&x&&(C=Jc(C,x)||C);const _=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let S=j===A||!i&&j.startsWith(A)&&j.charAt(_)==="/",O=C!=null&&(C===A||!i&&C.startsWith(A)&&C.charAt(A.length)==="/"),E={isActive:S,isPending:O,isTransitioning:w},D=S?e:void 0,N;typeof r=="function"?N=r(E):N=[r,S?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(E):s;return M.createElement(yE,{...h,"aria-current":D,className:N,ref:f,style:I,to:o,viewTransition:l},typeof u=="function"?u(E):u)});Ag.displayName="NavLink";var mae=M.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=V1,action:l,onSubmit:u,relative:h,preventScrollReset:f,viewTransition:p,unstable_defaultShouldRevalidate:m,...v},b)=>{let{unstable_useTransitions:x}=M.useContext(da),w=xae(),A=Aae(l,{relative:h}),j=o.toLowerCase()==="get"?"get":"post",C=typeof l=="string"&&ZF.test(l),_=S=>{if(u&&u(S),S.defaultPrevented)return;S.preventDefault();let O=S.nativeEvent.submitter,E=(O==null?void 0:O.getAttribute("formmethod"))||o,D=()=>w(O||S.currentTarget,{fetcherKey:e,method:E,navigate:n,replace:i,state:s,relative:h,preventScrollReset:f,viewTransition:p,unstable_defaultShouldRevalidate:m});x&&n!==!1?M.startTransition(()=>D()):D()};return M.createElement("form",{ref:b,method:j,action:A,onSubmit:r?u:_,...v,"data-discover":!C&&t==="render"?"true":void 0})});mae.displayName="Form";function gae(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function JF(t){let e=M.useContext(Of);return Pr(e,gae(t)),e}function vae(t,{target:e,replace:n,unstable_mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:h}={}){let f=pE(),p=cl(),m=ob(t,{relative:o});return M.useCallback(v=>{if(Gse(v,e)){v.preventDefault();let b=n!==void 0?n:iv(p)===iv(m),x=()=>f(t,{replace:b,unstable_mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u});h?M.startTransition(()=>x()):x()}},[p,f,m,n,r,i,e,t,s,o,l,u,h])}var bae=0,yae=()=>`__${String(++bae)}__`;function xae(){let{router:t}=JF("useSubmit"),{basename:e}=M.useContext(da),n=Fse(),r=t.fetch,i=t.navigate;return M.useCallback(async(s,o={})=>{let{action:l,method:u,encType:h,formData:f,body:p}=Zse(s,e);if(o.navigate===!1){let m=o.fetcherKey||yae();await r(m,n,o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:p,formMethod:o.method||u,formEncType:o.encType||h,flushSync:o.flushSync})}else await i(o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:p,formMethod:o.method||u,formEncType:o.encType||h,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function Aae(t,{relative:e}={}){let{basename:n}=M.useContext(da),r=M.useContext(nc);Pr(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...ob(t||".",{relative:e})},o=cl();if(t==null){s.search=o.search;let l=new URLSearchParams(s.search),u=l.getAll("index");if(u.some(f=>f==="")){l.delete("index"),u.filter(p=>p).forEach(p=>l.append("index",p));let f=l.toString();s.search=f?`?${f}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Wl([n,s.pathname])),iv(s)}function wae(t,{relative:e}={}){let n=M.useContext($F);Pr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=JF("useViewTransitionState"),i=ob(t,{relative:e});if(!n.isTransitioning)return!1;let s=Jc(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Jc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Lx(i.pathname,o)!=null||Lx(i.pathname,s)!=null}var lb=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vd,uh,em,b9,Sae=(b9=class extends lb{constructor(){super();Ze(this,Vd);Ze(this,uh);Ze(this,em);Ee(this,em,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,uh)||this.setEventListener(q(this,em))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,uh))==null||e.call(this),Ee(this,uh,void 0))}setEventListener(e){var n;Ee(this,em,e),(n=q(this,uh))==null||n.call(this),Ee(this,uh,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){q(this,Vd)!==e&&(Ee(this,Vd,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof q(this,Vd)=="boolean"?q(this,Vd):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Vd=new WeakMap,uh=new WeakMap,em=new WeakMap,b9),xE=new Sae,jae={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},hh,Mk,y9,Cae=(y9=class{constructor(){Ze(this,hh,jae);Ze(this,Mk,!1)}setTimeoutProvider(t){Ee(this,hh,t)}setTimeout(t,e){return q(this,hh).setTimeout(t,e)}clearTimeout(t){q(this,hh).clearTimeout(t)}setInterval(t,e){return q(this,hh).setInterval(t,e)}clearInterval(t){q(this,hh).clearInterval(t)}},hh=new WeakMap,Mk=new WeakMap,y9),zd=new Cae;function _ae(t){setTimeout(t,0)}var Tae=typeof window>"u"||"Deno"in globalThis;function ra(){}function kae(t,e){return typeof t=="function"?t(e):t}function E3(t){return typeof t=="number"&&t>=0&&t!==1/0}function eH(t,e){return Math.max(t+(e||0)-Date.now(),0)}function _h(t,e){return typeof t=="function"?t(e):t}function so(t,e){return typeof t=="function"?t(e):t}function PR(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=t;if(o){if(r){if(e.queryHash!==AE(o,e.options))return!1}else if(!av(e.queryKey,o))return!1}if(n!=="all"){const u=e.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function IR(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(sv(e.options.mutationKey)!==sv(s))return!1}else if(!av(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function AE(t,e){return((e==null?void 0:e.queryKeyHashFn)||sv)(t)}function sv(t){return JSON.stringify(t,(e,n)=>D3(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function av(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>av(t[n],e[n])):!1}var Oae=Object.prototype.hasOwnProperty;function tH(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=BR(t)&&BR(e);if(!r&&!(D3(t)&&D3(e)))return e;const s=(r?t:Object.keys(t)).length,o=r?e:Object.keys(e),l=o.length,u=r?new Array(l):{};let h=0;for(let f=0;f<l;f++){const p=r?f:o[f],m=t[p],v=e[p];if(m===v){u[p]=m,(r?f<s:Oae.call(t,p))&&h++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){u[p]=v;continue}const b=tH(m,v,n+1);u[p]=b,b===m&&h++}return s===l&&h===s?t:u}function M3(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function BR(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function D3(t){if(!LR(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!LR(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function LR(t){return Object.prototype.toString.call(t)==="[object Object]"}function Eae(t){return new Promise(e=>{zd.setTimeout(e,t)})}function R3(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?tH(t,e):e}function Mae(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Dae(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var wE=Symbol();function nH(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===wE?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function rH(t,e){return typeof t=="function"?t(...e):!!t}function Rae(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var ov=(()=>{let t=()=>Tae;return{isServer(){return t()},setIsServer(e){t=e}}})();function N3(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var Nae=_ae;function Pae(){let t=[],e=0,n=l=>{l()},r=l=>{l()},i=Nae;const s=l=>{e?t.push(l):i(()=>{n(l)})},o=()=>{const l=t;t=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var as=Pae(),tm,dh,nm,x9,Iae=(x9=class extends lb{constructor(){super();Ze(this,tm,!0);Ze(this,dh);Ze(this,nm);Ee(this,nm,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,dh)||this.setEventListener(q(this,nm))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,dh))==null||e.call(this),Ee(this,dh,void 0))}setEventListener(e){var n;Ee(this,nm,e),(n=q(this,dh))==null||n.call(this),Ee(this,dh,e(this.setOnline.bind(this)))}setOnline(e){q(this,tm)!==e&&(Ee(this,tm,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return q(this,tm)}},tm=new WeakMap,dh=new WeakMap,nm=new WeakMap,x9),Fx=new Iae;function Bae(t){return Math.min(1e3*2**t,3e4)}function iH(t){return(t??"online")==="online"?Fx.isOnline():!0}var P3=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function sH(t){let e=!1,n=0,r;const i=N3(),s=()=>i.status!=="pending",o=x=>{var w;if(!s()){const A=new P3(x);m(A),(w=t.onCancel)==null||w.call(t,A)}},l=()=>{e=!0},u=()=>{e=!1},h=()=>xE.isFocused()&&(t.networkMode==="always"||Fx.isOnline())&&t.canRun(),f=()=>iH(t.networkMode)&&t.canRun(),p=x=>{s()||(r==null||r(),i.resolve(x))},m=x=>{s()||(r==null||r(),i.reject(x))},v=()=>new Promise(x=>{var w;r=A=>{(s()||h())&&x(A)},(w=t.onPause)==null||w.call(t)}).then(()=>{var x;r=void 0,s()||(x=t.onContinue)==null||x.call(t)}),b=()=>{if(s())return;let x;const w=n===0?t.initialPromise:void 0;try{x=w??t.fn()}catch(A){x=Promise.reject(A)}Promise.resolve(x).then(p).catch(A=>{var O;if(s())return;const j=t.retry??(ov.isServer()?0:3),C=t.retryDelay??Bae,_=typeof C=="function"?C(n,A):C,S=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,A);if(e||!S){m(A);return}n++,(O=t.onFail)==null||O.call(t,n,A),Eae(_).then(()=>h()?void 0:v()).then(()=>{e?m(A):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:f,start:()=>(f()?b():v().then(b),i)}}var Yd,A9,aH=(A9=class{constructor(){Ze(this,Yd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),E3(this.gcTime)&&Ee(this,Yd,zd.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ov.isServer()?1/0:5*60*1e3))}clearGcTimeout(){q(this,Yd)&&(zd.clearTimeout(q(this,Yd)),Ee(this,Yd,void 0))}},Yd=new WeakMap,A9),Gd,rm,ro,Xd,Bi,Pv,Kd,Ra,oH,Fc,w9,Lae=(w9=class extends aH{constructor(e){super();Ze(this,Ra);Ze(this,Gd);Ze(this,rm);Ze(this,ro);Ze(this,Xd);Ze(this,Bi);Ze(this,Pv);Ze(this,Kd);Ee(this,Kd,!1),Ee(this,Pv,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ee(this,Xd,e.client),Ee(this,ro,q(this,Xd).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ee(this,Gd,HR(this.options)),this.state=e.state??q(this,Gd),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=q(this,Bi))==null?void 0:e.promise}setOptions(e){if(this.options={...q(this,Pv),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=HR(this.options);n.data!==void 0&&(this.setState(FR(n.data,n.dataUpdatedAt)),Ee(this,Gd,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,ro).remove(this)}setData(e,n){const r=R3(this.state.data,e,this.options);return $e(this,Ra,Fc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){$e(this,Ra,Fc).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=q(this,Bi))==null?void 0:r.promise;return(i=q(this,Bi))==null||i.cancel(e),n?n.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,Gd)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>so(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wE||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>_h(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!eH(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=q(this,Bi))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=q(this,Bi))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),q(this,ro).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(q(this,Bi)&&(q(this,Kd)||$e(this,Ra,oH).call(this)?q(this,Bi).cancel({revert:!0}):q(this,Bi).cancelRetry()),this.scheduleGc()),q(this,ro).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Ra,Fc).call(this,{type:"invalidate"})}async fetch(e,n){var u,h,f,p,m,v,b,x,w,A,j,C;if(this.state.fetchStatus!=="idle"&&((u=q(this,Bi))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,Bi))return q(this,Bi).continueRetry(),q(this,Bi).promise}if(e&&this.setOptions(e),!this.options.queryFn){const _=this.observers.find(S=>S.options.queryFn);_&&this.setOptions(_.options)}const r=new AbortController,i=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(Ee(this,Kd,!0),r.signal)})},s=()=>{const _=nH(this.options,n),O=(()=>{const E={client:q(this,Xd),queryKey:this.queryKey,meta:this.meta};return i(E),E})();return Ee(this,Kd,!1),this.options.persister?this.options.persister(_,O,this):_(O)},l=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,Xd),state:this.state,fetchFn:s};return i(_),_})();(h=this.options.behavior)==null||h.onFetch(l,this),Ee(this,rm,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&$e(this,Ra,Fc).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),Ee(this,Bi,sH({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:_=>{_ instanceof P3&&_.revert&&this.setState({...q(this,rm),fetchStatus:"idle"}),r.abort()},onFail:(_,S)=>{$e(this,Ra,Fc).call(this,{type:"failed",failureCount:_,error:S})},onPause:()=>{$e(this,Ra,Fc).call(this,{type:"pause"})},onContinue:()=>{$e(this,Ra,Fc).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const _=await q(this,Bi).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(v=(m=q(this,ro).config).onSuccess)==null||v.call(m,_,this),(x=(b=q(this,ro).config).onSettled)==null||x.call(b,_,this.state.error,this),_}catch(_){if(_ instanceof P3){if(_.silent)return q(this,Bi).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw $e(this,Ra,Fc).call(this,{type:"error",error:_}),(A=(w=q(this,ro).config).onError)==null||A.call(w,_,this),(C=(j=q(this,ro).config).onSettled)==null||C.call(j,this.state.data,_,this),_}finally{this.scheduleGc()}}},Gd=new WeakMap,rm=new WeakMap,ro=new WeakMap,Xd=new WeakMap,Bi=new WeakMap,Pv=new WeakMap,Kd=new WeakMap,Ra=new WeakSet,oH=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Fc=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lH(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...FR(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,rm,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),as.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,ro).notify({query:this,type:"updated",action:e})})},w9);function lH(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iH(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function FR(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function HR(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ta,xn,Iv,Ns,Zd,im,qc,fh,Bv,sm,am,Jd,ef,ph,om,zn,wg,I3,B3,L3,F3,H3,z3,q3,uH,S9,cH=(S9=class extends lb{constructor(e,n){super();Ze(this,zn);Ze(this,ta);Ze(this,xn);Ze(this,Iv);Ze(this,Ns);Ze(this,Zd);Ze(this,im);Ze(this,qc);Ze(this,fh);Ze(this,Bv);Ze(this,sm);Ze(this,am);Ze(this,Jd);Ze(this,ef);Ze(this,ph);Ze(this,om,new Set);this.options=n,Ee(this,ta,e),Ee(this,fh,null),Ee(this,qc,N3()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,xn).addObserver(this),zR(q(this,xn),this.options)?$e(this,zn,wg).call(this):this.updateResult(),$e(this,zn,F3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $3(q(this,xn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $3(q(this,xn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,zn,H3).call(this),$e(this,zn,z3).call(this),q(this,xn).removeObserver(this)}setOptions(e){const n=this.options,r=q(this,xn);if(this.options=q(this,ta).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof so(this.options.enabled,q(this,xn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,zn,q3).call(this),q(this,xn).setOptions(this.options),n._defaulted&&!M3(this.options,n)&&q(this,ta).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,xn),observer:this});const i=this.hasListeners();i&&qR(q(this,xn),r,this.options,n)&&$e(this,zn,wg).call(this),this.updateResult(),i&&(q(this,xn)!==r||so(this.options.enabled,q(this,xn))!==so(n.enabled,q(this,xn))||_h(this.options.staleTime,q(this,xn))!==_h(n.staleTime,q(this,xn)))&&$e(this,zn,I3).call(this);const s=$e(this,zn,B3).call(this);i&&(q(this,xn)!==r||so(this.options.enabled,q(this,xn))!==so(n.enabled,q(this,xn))||s!==q(this,ph))&&$e(this,zn,L3).call(this,s)}getOptimisticResult(e){const n=q(this,ta).getQueryCache().build(q(this,ta),e),r=this.createResult(n,e);return Hae(this,r)&&(Ee(this,Ns,r),Ee(this,im,this.options),Ee(this,Zd,q(this,xn).state)),r}getCurrentResult(){return q(this,Ns)}trackResult(e,n){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,qc).status==="pending"&&q(this,qc).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){q(this,om).add(e)}getCurrentQuery(){return q(this,xn)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=q(this,ta).defaultQueryOptions(e),r=q(this,ta).getQueryCache().build(q(this,ta),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return $e(this,zn,wg).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,Ns)))}createResult(e,n){var N;const r=q(this,xn),i=this.options,s=q(this,Ns),o=q(this,Zd),l=q(this,im),h=e!==r?e.state:q(this,Iv),{state:f}=e;let p={...f},m=!1,v;if(n._optimisticResults){const I=this.hasListeners(),R=!I&&zR(e,n),L=I&&qR(e,r,n,i);(R||L)&&(p={...p,...lH(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:w}=p;v=p.data;let A=!1;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let I;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(I=s.data,A=!0):I=typeof n.placeholderData=="function"?n.placeholderData((N=q(this,am))==null?void 0:N.state.data,q(this,am)):n.placeholderData,I!==void 0&&(w="success",v=R3(s==null?void 0:s.data,I,n),m=!0)}if(n.select&&v!==void 0&&!A)if(s&&v===(o==null?void 0:o.data)&&n.select===q(this,Bv))v=q(this,sm);else try{Ee(this,Bv,n.select),v=n.select(v),v=R3(s==null?void 0:s.data,v,n),Ee(this,sm,v),Ee(this,fh,null)}catch(I){Ee(this,fh,I)}q(this,fh)&&(b=q(this,fh),v=q(this,sm),x=Date.now(),w="error");const j=p.fetchStatus==="fetching",C=w==="pending",_=w==="error",S=C&&j,O=v!==void 0,D={status:w,fetchStatus:p.fetchStatus,isPending:C,isSuccess:w==="success",isError:_,isInitialLoading:S,isLoading:S,data:v,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!C,isLoadingError:_&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:_&&O,isStale:SE(e,n),refetch:this.refetch,promise:q(this,qc),isEnabled:so(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=D.data!==void 0,R=D.status==="error"&&!I,L=H=>{R?H.reject(D.error):I&&H.resolve(D.data)},Q=()=>{const H=Ee(this,qc,D.promise=N3());L(H)},z=q(this,qc);switch(z.status){case"pending":e.queryHash===r.queryHash&&L(z);break;case"fulfilled":(R||D.data!==z.value)&&Q();break;case"rejected":(!R||D.error!==z.reason)&&Q();break}}return D}updateResult(){const e=q(this,Ns),n=this.createResult(q(this,xn),this.options);if(Ee(this,Zd,q(this,xn).state),Ee(this,im,this.options),q(this,Zd).data!==void 0&&Ee(this,am,q(this,xn)),M3(n,e))return;Ee(this,Ns,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!q(this,om).size)return!0;const o=new Set(s??q(this,om));return this.options.throwOnError&&o.add("error"),Object.keys(q(this,Ns)).some(l=>{const u=l;return q(this,Ns)[u]!==e[u]&&o.has(u)})};$e(this,zn,uH).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,zn,F3).call(this)}},ta=new WeakMap,xn=new WeakMap,Iv=new WeakMap,Ns=new WeakMap,Zd=new WeakMap,im=new WeakMap,qc=new WeakMap,fh=new WeakMap,Bv=new WeakMap,sm=new WeakMap,am=new WeakMap,Jd=new WeakMap,ef=new WeakMap,ph=new WeakMap,om=new WeakMap,zn=new WeakSet,wg=function(e){$e(this,zn,q3).call(this);let n=q(this,xn).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(ra)),n},I3=function(){$e(this,zn,H3).call(this);const e=_h(this.options.staleTime,q(this,xn));if(ov.isServer()||q(this,Ns).isStale||!E3(e))return;const r=eH(q(this,Ns).dataUpdatedAt,e)+1;Ee(this,Jd,zd.setTimeout(()=>{q(this,Ns).isStale||this.updateResult()},r))},B3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,xn)):this.options.refetchInterval)??!1},L3=function(e){$e(this,zn,z3).call(this),Ee(this,ph,e),!(ov.isServer()||so(this.options.enabled,q(this,xn))===!1||!E3(q(this,ph))||q(this,ph)===0)&&Ee(this,ef,zd.setInterval(()=>{(this.options.refetchIntervalInBackground||xE.isFocused())&&$e(this,zn,wg).call(this)},q(this,ph)))},F3=function(){$e(this,zn,I3).call(this),$e(this,zn,L3).call(this,$e(this,zn,B3).call(this))},H3=function(){q(this,Jd)&&(zd.clearTimeout(q(this,Jd)),Ee(this,Jd,void 0))},z3=function(){q(this,ef)&&(zd.clearInterval(q(this,ef)),Ee(this,ef,void 0))},q3=function(){const e=q(this,ta).getQueryCache().build(q(this,ta),this.options);if(e===q(this,xn))return;const n=q(this,xn);Ee(this,xn,e),Ee(this,Iv,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},uH=function(e){as.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(q(this,Ns))}),q(this,ta).getQueryCache().notify({query:q(this,xn),type:"observerResultsUpdated"})})},S9);function Fae(t,e){return so(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function zR(t,e){return Fae(t,e)||t.state.data!==void 0&&$3(t,e,e.refetchOnMount)}function $3(t,e,n){if(so(e.enabled,t)!==!1&&_h(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&SE(t,e)}return!1}function qR(t,e,n,r){return(t!==e||so(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&SE(t,n)}function SE(t,e){return so(e.enabled,t)!==!1&&t.isStaleByTime(_h(e.staleTime,t))}function Hae(t,e){return!M3(t.getCurrentResult(),e)}function $R(t){return{onFetch:(e,n)=>{var f,p,m,v,b;const r=e.options,i=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((v=e.state.data)==null?void 0:v.pages)||[],o=((b=e.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const h=async()=>{let x=!1;const w=C=>{Rae(C,()=>e.signal,()=>x=!0)},A=nH(e.options,e.fetchOptions),j=async(C,_,S)=>{if(x)return Promise.reject();if(_==null&&C.pages.length)return Promise.resolve(C);const E=(()=>{const R={client:e.client,queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};return w(R),R})(),D=await A(E),{maxPages:N}=e.options,I=S?Dae:Mae;return{pages:I(C.pages,D,N),pageParams:I(C.pageParams,_,N)}};if(i&&s.length){const C=i==="backward",_=C?zae:QR,S={pages:s,pageParams:o},O=_(r,S);l=await j(S,O,C)}else{const C=t??s.length;do{const _=u===0?o[0]??r.initialPageParam:QR(r,l);if(u>0&&_==null)break;l=await j(l,_),u++}while(u<C)}return l};e.options.persister?e.fetchFn=()=>{var x,w;return(w=(x=e.options).persister)==null?void 0:w.call(x,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=h}}}function QR(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function zae(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Lv,El,ws,tf,Ml,Zu,j9,qae=(j9=class extends aH{constructor(e){super();Ze(this,Ml);Ze(this,Lv);Ze(this,El);Ze(this,ws);Ze(this,tf);Ee(this,Lv,e.client),this.mutationId=e.mutationId,Ee(this,ws,e.mutationCache),Ee(this,El,[]),this.state=e.state||$ae(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){q(this,El).includes(e)||(q(this,El).push(e),this.clearGcTimeout(),q(this,ws).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ee(this,El,q(this,El).filter(n=>n!==e)),this.scheduleGc(),q(this,ws).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){q(this,El).length||(this.state.status==="pending"?this.scheduleGc():q(this,ws).remove(this))}continue(){var e;return((e=q(this,tf))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,u,h,f,p,m,v,b,x,w,A,j,C,_,S,O,E;const n=()=>{$e(this,Ml,Zu).call(this,{type:"continue"})},r={client:q(this,Lv),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,tf,sH({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(D,N)=>{$e(this,Ml,Zu).call(this,{type:"failed",failureCount:D,error:N})},onPause:()=>{$e(this,Ml,Zu).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,ws).canRun(this)}));const i=this.state.status==="pending",s=!q(this,tf).canStart();try{if(i)n();else{$e(this,Ml,Zu).call(this,{type:"pending",variables:e,isPaused:s}),q(this,ws).config.onMutate&&await q(this,ws).config.onMutate(e,this,r);const N=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e,r));N!==this.state.context&&$e(this,Ml,Zu).call(this,{type:"pending",context:N,variables:e,isPaused:s})}const D=await q(this,tf).start();return await((h=(u=q(this,ws).config).onSuccess)==null?void 0:h.call(u,D,e,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,D,e,this.state.context,r)),await((v=(m=q(this,ws).config).onSettled)==null?void 0:v.call(m,D,null,this.state.variables,this.state.context,this,r)),await((x=(b=this.options).onSettled)==null?void 0:x.call(b,D,null,e,this.state.context,r)),$e(this,Ml,Zu).call(this,{type:"success",data:D}),D}catch(D){try{await((A=(w=q(this,ws).config).onError)==null?void 0:A.call(w,D,e,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((C=(j=this.options).onError)==null?void 0:C.call(j,D,e,this.state.context,r))}catch(N){Promise.reject(N)}try{await((S=(_=q(this,ws).config).onSettled)==null?void 0:S.call(_,void 0,D,this.state.variables,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((E=(O=this.options).onSettled)==null?void 0:E.call(O,void 0,D,e,this.state.context,r))}catch(N){Promise.reject(N)}throw $e(this,Ml,Zu).call(this,{type:"error",error:D}),D}finally{q(this,ws).runNext(this)}}},Lv=new WeakMap,El=new WeakMap,ws=new WeakMap,tf=new WeakMap,Ml=new WeakSet,Zu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),as.batch(()=>{q(this,El).forEach(r=>{r.onMutationUpdate(e)}),q(this,ws).notify({mutation:this,type:"updated",action:e})})},j9);function $ae(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $c,Bo,Fv,C9,Qae=(C9=class extends lb{constructor(e={}){super();Ze(this,$c);Ze(this,Bo);Ze(this,Fv);this.config=e,Ee(this,$c,new Set),Ee(this,Bo,new Map),Ee(this,Fv,0)}build(e,n,r){const i=new qae({client:e,mutationCache:this,mutationId:++jd(this,Fv)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){q(this,$c).add(e);const n=Gy(e);if(typeof n=="string"){const r=q(this,Bo).get(n);r?r.push(e):q(this,Bo).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(q(this,$c).delete(e)){const n=Gy(e);if(typeof n=="string"){const r=q(this,Bo).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&q(this,Bo).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Gy(e);if(typeof n=="string"){const r=q(this,Bo).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Gy(e);if(typeof n=="string"){const i=(r=q(this,Bo).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){as.batch(()=>{q(this,$c).forEach(e=>{this.notify({type:"removed",mutation:e})}),q(this,$c).clear(),q(this,Bo).clear()})}getAll(){return Array.from(q(this,$c))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>IR(n,r))}findAll(e={}){return this.getAll().filter(n=>IR(e,n))}notify(e){as.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return as.batch(()=>Promise.all(e.map(n=>n.continue().catch(ra))))}},$c=new WeakMap,Bo=new WeakMap,Fv=new WeakMap,C9);function Gy(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Dl,_9,Uae=(_9=class extends lb{constructor(e={}){super();Ze(this,Dl);this.config=e,Ee(this,Dl,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??AE(i,n);let o=this.get(s);return o||(o=new Lae({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){q(this,Dl).has(e.queryHash)||(q(this,Dl).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=q(this,Dl).get(e.queryHash);n&&(e.destroy(),n===e&&q(this,Dl).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){as.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return q(this,Dl).get(e)}getAll(){return[...q(this,Dl).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>PR(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>PR(e,r)):n}notify(e){as.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){as.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){as.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Dl=new WeakMap,_9),Yr,mh,gh,lm,cm,vh,um,hm,T9,Wae=(T9=class{constructor(t={}){Ze(this,Yr);Ze(this,mh);Ze(this,gh);Ze(this,lm);Ze(this,cm);Ze(this,vh);Ze(this,um);Ze(this,hm);Ee(this,Yr,t.queryCache||new Uae),Ee(this,mh,t.mutationCache||new Qae),Ee(this,gh,t.defaultOptions||{}),Ee(this,lm,new Map),Ee(this,cm,new Map),Ee(this,vh,0)}mount(){jd(this,vh)._++,q(this,vh)===1&&(Ee(this,um,xE.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,Yr).onFocus())})),Ee(this,hm,Fx.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,Yr).onOnline())})))}unmount(){var t,e;jd(this,vh)._--,q(this,vh)===0&&((t=q(this,um))==null||t.call(this),Ee(this,um,void 0),(e=q(this,hm))==null||e.call(this),Ee(this,hm,void 0))}isFetching(t){return q(this,Yr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return q(this,mh).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=q(this,Yr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=q(this,Yr).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(_h(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return q(this,Yr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=q(this,Yr).get(r.queryHash),s=i==null?void 0:i.state.data,o=kae(e,s);if(o!==void 0)return q(this,Yr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return as.batch(()=>q(this,Yr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=q(this,Yr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=q(this,Yr);as.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=q(this,Yr);return as.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=as.batch(()=>q(this,Yr).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(t,e={}){return as.batch(()=>(q(this,Yr).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=as.batch(()=>q(this,Yr).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(ra)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ra)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=q(this,Yr).build(this,e);return n.isStaleByTime(_h(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ra).catch(ra)}fetchInfiniteQuery(t){return t.behavior=$R(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ra).catch(ra)}ensureInfiniteQueryData(t){return t.behavior=$R(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Fx.isOnline()?q(this,mh).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,Yr)}getMutationCache(){return q(this,mh)}getDefaultOptions(){return q(this,gh)}setDefaultOptions(t){Ee(this,gh,t)}setQueryDefaults(t,e){q(this,lm).set(sv(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...q(this,lm).values()],n={};return e.forEach(r=>{av(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){q(this,cm).set(sv(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...q(this,cm).values()],n={};return e.forEach(r=>{av(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...q(this,gh).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=AE(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===wE&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...q(this,gh).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){q(this,Yr).clear(),q(this,mh).clear()}},Yr=new WeakMap,mh=new WeakMap,gh=new WeakMap,lm=new WeakMap,cm=new WeakMap,vh=new WeakMap,um=new WeakMap,hm=new WeakMap,T9),hH=M.createContext(void 0),Vae=t=>{const e=M.useContext(hH);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Yae=({client:t,children:e})=>(M.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),a.jsx(hH.Provider,{value:t,children:e})),dH=M.createContext(!1),Gae=()=>M.useContext(dH);dH.Provider;function Xae(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Kae=M.createContext(Xae()),Zae=()=>M.useContext(Kae),Jae=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?rH(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},eoe=t=>{M.useEffect(()=>{t.clearReset()},[t])},toe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||rH(n,[t.error,r])),noe=(t,e)=>e.state.data===void 0,roe=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ioe=(t,e)=>t.isLoading&&t.isFetching&&!e,soe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,UR=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function fH(t,e,n){var m,v,b,x;const r=Gae(),i=Zae(),s=Vae(),o=s.defaultQueryOptions(t);(v=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||v.call(m,o);const l=s.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",roe(o),Jae(o,i,l),eoe(i);const u=!s.getQueryCache().get(o.queryHash),[h]=M.useState(()=>new e(s,o)),f=h.getOptimisticResult(o),p=!r&&t.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(w=>{const A=p?h.subscribe(as.batchCalls(w)):ra;return h.updateResult(),A},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.useEffect(()=>{h.setOptions(o)},[o,h]),soe(o,f))throw UR(o,h,i);if(toe({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;if((x=(b=s.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||x.call(b,o,f),o.experimental_prefetchInRender&&!ov.isServer()&&ioe(f,r)){const w=u?UR(o,h,i):l==null?void 0:l.promise;w==null||w.catch(ra).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?f:h.trackResult(f)}function aoe(t,e){return fH(t,cH)}function pH(t,e){return fH({...t,enabled:!0,suspense:!0,throwOnError:noe,placeholderData:void 0},cH)}var xC={exports:{}},AC={};/**
 * @license React
 * use-sync-external-store-with-selector.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 WR;function ooe(){if(WR)return AC;WR=1;var t=qv();function e(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return AC.useSyncExternalStoreWithSelector=function(u,h,f,p,m){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=o(function(){function w(S){if(!A){if(A=!0,j=S,S=p(S),m!==void 0&&b.hasValue){var O=b.value;if(m(O,S))return C=O}return C=S}if(O=C,n(j,S))return O;var E=p(S);return m!==void 0&&m(O,E)?(j=S,O):(j=S,C=E)}var A=!1,j,C,_=f===void 0?null:f;return[function(){return w(h())},_===null?void 0:function(){return w(_())}]},[h,f,p,m]);var x=r(u,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=x},[x]),l(x),x},AC}var VR;function loe(){return VR||(VR=1,xC.exports=ooe()),xC.exports}var coe=loe();function uoe(t){t()}function hoe(){let t=null,e=null;return{clear(){t=null,e=null},notify(){uoe(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!r||t===null||(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var YR={notify(){},get:()=>[]};function doe(t,e){let n,r=YR,i=0,s=!1;function o(x){f();const w=r.subscribe(x);let A=!1;return()=>{A||(A=!0,w(),p())}}function l(){r.notify()}function u(){b.onStateChange&&b.onStateChange()}function h(){return s}function f(){i++,n||(n=t.subscribe(u),r=hoe())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=YR)}function m(){s||(s=!0,f())}function v(){s&&(s=!1,p())}const b={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:u,isSubscribed:h,trySubscribe:m,tryUnsubscribe:v,getListeners:()=>r};return b}var foe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",poe=foe(),moe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",goe=moe(),voe=()=>poe||goe?M.useLayoutEffect:M.useEffect,boe=voe(),wC=Symbol.for("react-redux-context"),SC=typeof globalThis<"u"?globalThis:{};function yoe(){if(!M.createContext)return{};const t=SC[wC]??(SC[wC]=new Map);let e=t.get(M.createContext);return e||(e=M.createContext(null),t.set(M.createContext,e)),e}var Dh=yoe();function xoe(t){const{children:e,context:n,serverState:r,store:i}=t,s=M.useMemo(()=>{const u=doe(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),o=M.useMemo(()=>i.getState(),[i]);boe(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,o]);const l=n||Dh;return M.createElement(l.Provider,{value:s},e)}var Aoe=xoe;function jE(t=Dh){return function(){return M.useContext(t)}}var mH=jE();function gH(t=Dh){const e=t===Dh?mH:jE(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var woe=gH();function Soe(t=Dh){const e=t===Dh?woe:gH(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var joe=Soe(),Coe=(t,e)=>t===e;function _oe(t=Dh){const e=t===Dh?mH:jE(t),n=(r,i={})=>{const{equalityFn:s=Coe}=typeof i=="function"?{equalityFn:i}:i,o=e(),{store:l,subscription:u,getServerState:h}=o;M.useRef(!0);const f=M.useCallback({[r.name](m){return r(m)}}[r.name],[r]),p=coe.useSyncExternalStoreWithSelector(u.addNestedSub,l.getState,h||l.getState,f,s);return M.useDebugValue(p),p};return Object.assign(n,{withTypes:()=>n}),n}var Toe=_oe();const cu=joe.withTypes(),rc=Toe.withTypes();function ns(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var koe=typeof Symbol=="function"&&Symbol.observable||"@@observable",GR=koe,jC=()=>Math.random().toString(36).substring(7).split("").join("."),Ooe={INIT:`@@redux/INIT${jC()}`,REPLACE:`@@redux/REPLACE${jC()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jC()}`},Hx=Ooe;function CE(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function vH(t,e,n){if(typeof t!="function")throw new Error(ns(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ns(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ns(1));return n(vH)(t,e)}let r=t,i=e,s=new Map,o=s,l=0,u=!1;function h(){o===s&&(o=new Map,s.forEach((w,A)=>{o.set(A,w)}))}function f(){if(u)throw new Error(ns(3));return i}function p(w){if(typeof w!="function")throw new Error(ns(4));if(u)throw new Error(ns(5));let A=!0;h();const j=l++;return o.set(j,w),function(){if(A){if(u)throw new Error(ns(6));A=!1,h(),o.delete(j),s=null}}}function m(w){if(!CE(w))throw new Error(ns(7));if(typeof w.type>"u")throw new Error(ns(8));if(typeof w.type!="string")throw new Error(ns(17));if(u)throw new Error(ns(9));try{u=!0,i=r(i,w)}finally{u=!1}return(s=o).forEach(j=>{j()}),w}function v(w){if(typeof w!="function")throw new Error(ns(10));r=w,m({type:Hx.REPLACE})}function b(){const w=p;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(ns(11));function j(){const _=A;_.next&&_.next(f())}return j(),{unsubscribe:w(j)}},[GR](){return this}}}return m({type:Hx.INIT}),{dispatch:m,subscribe:p,getState:f,replaceReducer:v,[GR]:b}}function Eoe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Hx.INIT})>"u")throw new Error(ns(12));if(typeof n(void 0,{type:Hx.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ns(13))})}function Moe(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let i;try{Eoe(n)}catch(s){i=s}return function(o={},l){if(i)throw i;let u=!1;const h={};for(let f=0;f<r.length;f++){const p=r[f],m=n[p],v=o[p],b=m(v,l);if(typeof b>"u")throw l&&l.type,new Error(ns(14));h[p]=b,u=u||b!==v}return u=u||r.length!==Object.keys(o).length,u?h:o}}function zx(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Doe(...t){return e=>(n,r)=>{const i=e(n,r);let s=()=>{throw new Error(ns(15))};const o={getState:i.getState,dispatch:(u,...h)=>s(u,...h)},l=t.map(u=>u(o));return s=zx(...l)(i.dispatch),{...i,dispatch:s}}}function bH(t){return CE(t)&&"type"in t&&typeof t.type=="string"}var yH=Symbol.for("immer-nothing"),XR=Symbol.for("immer-draftable"),$s=Symbol.for("immer-state");function Vo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Na=Object,Sm=Na.getPrototypeOf,qx="constructor",Hw="prototype",Q3="configurable",$x="enumerable",G1="writable",lv="value",eu=t=>!!t&&!!t[$s];function al(t){var e;return t?xH(t)||qw(t)||!!t[XR]||!!((e=t[qx])!=null&&e[XR])||$w(t)||Qw(t):!1}var Roe=Na[Hw][qx].toString(),KR=new WeakMap;function xH(t){if(!t||!_E(t))return!1;const e=Sm(t);if(e===null||e===Na[Hw])return!0;const n=Na.hasOwnProperty.call(e,qx)&&e[qx];if(n===Object)return!0;if(!Ap(n))return!1;let r=KR.get(n);return r===void 0&&(r=Function.toString.call(n),KR.set(n,r)),r===Roe}function zw(t,e,n=!0){cb(t)===0?(n?Reflect.ownKeys(t):Na.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((r,i)=>e(i,r,t))}function cb(t){const e=t[$s];return e?e.type_:qw(t)?1:$w(t)?2:Qw(t)?3:0}var ZR=(t,e,n=cb(t))=>n===2?t.has(e):Na[Hw].hasOwnProperty.call(t,e),U3=(t,e,n=cb(t))=>n===2?t.get(e):t[e],Qx=(t,e,n,r=cb(t))=>{r===2?t.set(e,n):r===3?t.add(n):t[e]=n};function Noe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var qw=Array.isArray,$w=t=>t instanceof Map,Qw=t=>t instanceof Set,_E=t=>typeof t=="object",Ap=t=>typeof t=="function",CC=t=>typeof t=="boolean";function Poe(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var Hc=t=>t.copy_||t.base_,TE=t=>t.modified_?t.copy_:t.base_;function W3(t,e){if($w(t))return new Map(t);if(Qw(t))return new Set(t);if(qw(t))return Array[Hw].slice.call(t);const n=xH(t);if(e===!0||e==="class_only"&&!n){const r=Na.getOwnPropertyDescriptors(t);delete r[$s];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const o=i[s],l=r[o];l[G1]===!1&&(l[G1]=!0,l[Q3]=!0),(l.get||l.set)&&(r[o]={[Q3]:!0,[G1]:!0,[$x]:l[$x],[lv]:t[o]})}return Na.create(Sm(t),r)}else{const r=Sm(t);if(r!==null&&n)return{...t};const i=Na.create(r);return Na.assign(i,t)}}function kE(t,e=!1){return Uw(t)||eu(t)||!al(t)||(cb(t)>1&&Na.defineProperties(t,{set:Xy,add:Xy,clear:Xy,delete:Xy}),Na.freeze(t),e&&zw(t,(n,r)=>{kE(r,!0)},!1)),t}function Ioe(){Vo(2)}var Xy={[lv]:Ioe};function Uw(t){return t===null||!_E(t)?!0:Na.isFrozen(t)}var Ux="MapSet",V3="Patches",JR="ArrayMethods",AH={};function gf(t){const e=AH[t];return e||Vo(0,t),e}var e5=t=>!!AH[t],cv,wH=()=>cv,Boe=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:e5(Ux)?gf(Ux):void 0,arrayMethodsPlugin_:e5(JR)?gf(JR):void 0});function t5(t,e){e&&(t.patchPlugin_=gf(V3),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Y3(t){G3(t),t.drafts_.forEach(Loe),t.drafts_=null}function G3(t){t===cv&&(cv=t.parent_)}var n5=t=>cv=Boe(cv,t);function Loe(t){const e=t[$s];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function r5(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[$s].modified_&&(Y3(e),Vo(4)),al(t)&&(t=i5(e,t));const{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(n[$s].base_,t,e)}else t=i5(e,n);return Foe(e,t,!0),Y3(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==yH?t:void 0}function i5(t,e){if(Uw(e))return e;const n=e[$s];if(!n)return Wx(e,t.handledSet_,t);if(!Ww(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(t);CH(n,t)}return n.copy_}function Foe(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&kE(e,n)}function SH(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Ww=(t,e)=>t.scope_===e,Hoe=[];function jH(t,e,n,r){const i=Hc(t),s=t.type_;if(r!==void 0&&U3(i,r,s)===e){Qx(i,r,n,s);return}if(!t.draftLocations_){const l=t.draftLocations_=new Map;zw(i,(u,h)=>{if(eu(h)){const f=l.get(h)||[];f.push(u),l.set(h,f)}})}const o=t.draftLocations_.get(e)??Hoe;for(const l of o)Qx(i,l,n,s)}function zoe(t,e,n){t.callbacks_.push(function(i){var l;const s=e;if(!s||!Ww(s,i))return;(l=i.mapSetPlugin_)==null||l.fixSetContents(s);const o=TE(s);jH(t,s.draft_??s,o,n),CH(s,i)})}function CH(t,e){var r;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((r=t.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:i}=e;if(i){const s=i.getPath(t);s&&i.generatePatches_(t,s,e)}SH(t)}}function qoe(t,e,n){const{scope_:r}=t;if(eu(n)){const i=n[$s];Ww(i,r)&&i.callbacks_.push(function(){X1(t);const o=TE(i);jH(t,n,o,e)})}else al(n)&&t.callbacks_.push(function(){const s=Hc(t);t.type_===3?s.has(n)&&Wx(n,r.handledSet_,r):U3(s,e,t.type_)===n&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Wx(U3(t.copy_,e,t.type_),r.handledSet_,r)})}function Wx(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||eu(t)||e.has(t)||!al(t)||Uw(t)||(e.add(t),zw(t,(r,i)=>{if(eu(i)){const s=i[$s];if(Ww(s,n)){const o=TE(s);Qx(t,r,o,t.type_),SH(s)}}else al(i)&&Wx(i,e,n)})),t}function $oe(t,e){const n=qw(t),r={type_:n?1:0,scope_:e?e.scope_:wH(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,s=Vx;n&&(i=[r],s=uv);const{revoke:o,proxy:l}=Proxy.revocable(i,s);return r.draft_=l,r.revoke_=o,[l,r]}var Vx={get(t,e){if(e===$s)return t;let n=t.scope_.arrayMethodsPlugin_;const r=t.type_===1&&typeof e=="string";if(r&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const i=Hc(t);if(!ZR(i,e,t.type_))return Qoe(t,i,e);const s=i[e];if(t.finalized_||!al(s)||r&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&Poe(e))return s;if(s===_C(t.base_,e)){X1(t);const o=t.type_===1?+e:e,l=K3(t.scope_,s,t,o);return t.copy_[o]=l}return s},has(t,e){return e in Hc(t)},ownKeys(t){return Reflect.ownKeys(Hc(t))},set(t,e,n){const r=_H(Hc(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=_C(Hc(t),e),s=i==null?void 0:i[$s];if(s&&s.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(Noe(n,i)&&(n!==void 0||ZR(t.base_,e,t.type_)))return!0;X1(t),X3(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),qoe(t,e,n)),!0},deleteProperty(t,e){return X1(t),_C(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),X3(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Hc(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{[G1]:!0,[Q3]:t.type_!==1||e!=="length",[$x]:r[$x],[lv]:n[e]}},defineProperty(){Vo(11)},getPrototypeOf(t){return Sm(t.base_)},setPrototypeOf(){Vo(12)}},uv={};for(let t in Vx){let e=Vx[t];uv[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}uv.deleteProperty=function(t,e){return uv.set.call(this,t,e,void 0)};uv.set=function(t,e,n){return Vx.set.call(this,t[0],e,n,t[0])};function _C(t,e){const n=t[$s];return(n?Hc(n):t)[e]}function Qoe(t,e,n){var i;const r=_H(e,n);return r?lv in r?r[lv]:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function _H(t,e){if(!(e in t))return;let n=Sm(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Sm(n)}}function X3(t){t.modified_||(t.modified_=!0,t.parent_&&X3(t.parent_))}function X1(t){t.copy_||(t.assigned_=new Map,t.copy_=W3(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Uoe=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,r)=>{if(Ap(e)&&!Ap(n)){const s=n;n=e;const o=this;return function(u=s,...h){return o.produce(u,f=>n.call(this,f,...h))}}Ap(n)||Vo(6),r!==void 0&&!Ap(r)&&Vo(7);let i;if(al(e)){const s=n5(this),o=K3(s,e,void 0);let l=!0;try{i=n(o),l=!1}finally{l?Y3(s):G3(s)}return t5(s,r),r5(i,s)}else if(!e||!_E(e)){if(i=n(e),i===void 0&&(i=e),i===yH&&(i=void 0),this.autoFreeze_&&kE(i,!0),r){const s=[],o=[];gf(V3).generateReplacementPatches_(e,i,{patches_:s,inversePatches_:o}),r(s,o)}return i}else Vo(1,e)},this.produceWithPatches=(e,n)=>{if(Ap(e))return(o,...l)=>this.produceWithPatches(o,u=>e(u,...l));let r,i;return[this.produce(e,n,(o,l)=>{r=o,i=l}),r,i]},CC(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),CC(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),CC(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){al(t)||Vo(8),eu(t)&&(t=Woe(t));const e=n5(this),n=K3(e,t,void 0);return n[$s].isManual_=!0,G3(e),n}finishDraft(t,e){const n=t&&t[$s];(!n||!n.isManual_)&&Vo(9);const{scope_:r}=n;return t5(r,e),r5(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=gf(V3).applyPatches_;return eu(t)?r(t,e):this.produce(t,i=>r(i,e))}};function K3(t,e,n,r){const[i,s]=$w(e)?gf(Ux).proxyMap_(e,n):Qw(e)?gf(Ux).proxySet_(e,n):$oe(e,n);return((n==null?void 0:n.scope_)??wH()).drafts_.push(i),s.callbacks_=(n==null?void 0:n.callbacks_)??[],s.key_=r,n&&r!==void 0?zoe(n,s,r):s.callbacks_.push(function(u){var f;(f=u.mapSetPlugin_)==null||f.fixSetContents(s);const{patchPlugin_:h}=u;s.modified_&&h&&h.generatePatches_(s,[],u)}),i}function Woe(t){return eu(t)||Vo(10,t),TH(t)}function TH(t){if(!al(t)||Uw(t))return t;const e=t[$s];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=W3(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=W3(t,!0);return zw(n,(i,s)=>{Qx(n,i,TH(s))},r),e&&(e.finalized_=!1),n}var Voe=new Uoe,kH=Voe.produce;function OH(t){return({dispatch:n,getState:r})=>i=>s=>typeof s=="function"?s(n,r,t):i(s)}var Yoe=OH(),Goe=OH,Xoe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zx:zx.apply(null,arguments)};function jm(t,e){function n(...r){if(e){let i=e(...r);if(!i)throw new Error(Ia(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>bH(r)&&r.type===t,n}var EH=class Sg extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Sg.prototype)}static get[Symbol.species](){return Sg}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Sg(...e[0].concat(this)):new Sg(...e.concat(this))}};function s5(t){return al(t)?kH(t,()=>{}):t}function Ky(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function Koe(t){return typeof t=="boolean"}var Zoe=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=e??{};let o=new EH;return n&&(Koe(n)?o.push(Yoe):o.push(Goe(n.extraArgument))),o},Joe="RTK_autoBatch",a5=t=>e=>{setTimeout(e,t)},ele=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,s=!1,o=!1;const l=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:a5(10):t.type==="callback"?t.queueNotification:a5(t.timeout),h=()=>{o=!1,s&&(s=!1,l.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const p=()=>i&&f(),m=r.subscribe(p);return l.add(f),()=>{m(),l.delete(f)}},dispatch(f){var p;try{return i=!((p=f==null?void 0:f.meta)!=null&&p[Joe]),s=!i,s&&(o||(o=!0,u(h))),r.dispatch(f)}finally{i=!0}}})},tle=t=>function(n){const{autoBatch:r=!0}=n??{};let i=new EH(t);return r&&i.push(ele(typeof r=="object"?r:void 0)),i};function nle(t){const e=Zoe(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=t||{};let l;if(typeof n=="function")l=n;else if(CE(n))l=Moe(n);else throw new Error(Ia(1));let u;typeof r=="function"?u=r(e):u=e();let h=zx;i&&(h=Xoe({trace:!1,...typeof i=="object"&&i}));const f=Doe(...u),p=tle(f);let m=typeof o=="function"?o(p):p();const v=h(...m);return vH(l,s,v)}function MH(t){const e={},n=[];let r;const i={addCase(s,o){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(Ia(28));if(l in e)throw new Error(Ia(29));return e[l]=o,i},addAsyncThunk(s,o){return o.pending&&(e[s.pending.type]=o.pending),o.rejected&&(e[s.rejected.type]=o.rejected),o.fulfilled&&(e[s.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return n.push({matcher:s,reducer:o}),i},addDefaultCase(s){return r=s,i}};return t(i),[e,n,r]}function rle(t){return typeof t=="function"}function ile(t,e){let[n,r,i]=MH(e),s;if(rle(t))s=()=>s5(t());else{const l=s5(t);s=()=>l}function o(l=s(),u){let h=[n[u.type],...r.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return h.filter(f=>!!f).length===0&&(h=[i]),h.reduce((f,p)=>{if(p)if(eu(f)){const v=p(f,u);return v===void 0?f:v}else{if(al(f))return kH(f,m=>p(m,u));{const m=p(f,u);if(m===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return f},l)}return o.getInitialState=s,o}var sle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ale=(t=21)=>{let e="",n=t;for(;n--;)e+=sle[Math.random()*64|0];return e},ole=Symbol.for("rtk-slice-createasyncthunk");function lle(t,e){return`${t}/${e}`}function cle({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[ole];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(Ia(11));const l=(typeof i.reducers=="function"?i.reducers(hle()):i.reducers)||{},u=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(_,S){const O=typeof _=="string"?_:_.type;if(!O)throw new Error(Ia(12));if(O in h.sliceCaseReducersByType)throw new Error(Ia(13));return h.sliceCaseReducersByType[O]=S,f},addMatcher(_,S){return h.sliceMatchers.push({matcher:_,reducer:S}),f},exposeAction(_,S){return h.actionCreators[_]=S,f},exposeCaseReducer(_,S){return h.sliceCaseReducersByName[_]=S,f}};u.forEach(_=>{const S=l[_],O={reducerName:_,type:lle(s,_),createNotation:typeof i.reducers=="function"};fle(S)?mle(O,S,f,e):dle(O,S,f)});function p(){const[_={},S=[],O=void 0]=typeof i.extraReducers=="function"?MH(i.extraReducers):[i.extraReducers],E={..._,...h.sliceCaseReducersByType};return ile(i.initialState,D=>{for(let N in E)D.addCase(N,E[N]);for(let N of h.sliceMatchers)D.addMatcher(N.matcher,N.reducer);for(let N of S)D.addMatcher(N.matcher,N.reducer);O&&D.addDefaultCase(O)})}const m=_=>_,v=new Map,b=new WeakMap;let x;function w(_,S){return x||(x=p()),x(_,S)}function A(){return x||(x=p()),x.getInitialState()}function j(_,S=!1){function O(D){let N=D[_];return typeof N>"u"&&S&&(N=Ky(b,O,A)),N}function E(D=m){const N=Ky(v,S,()=>new WeakMap);return Ky(N,D,()=>{const I={};for(const[R,L]of Object.entries(i.selectors??{}))I[R]=ule(L,D,()=>Ky(b,D,A),S);return I})}return{reducerPath:_,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const C={name:s,reducer:w,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:A,...j(o),injectInto(_,{reducerPath:S,...O}={}){const E=S??o;return _.inject({reducerPath:E,reducer:w},O),{...C,...j(E,!0)}}};return C}}function ule(t,e,n,r){function i(s,...o){let l=e(s);return typeof l>"u"&&r&&(l=n()),t(l,...o)}return i.unwrapped=t,i}var Vw=cle();function hle(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function dle({type:t,reducerName:e,createNotation:n},r,i){let s,o;if("reducer"in r){if(n&&!ple(r))throw new Error(Ia(17));s=r.reducer,o=r.prepare}else s=r;i.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,o?jm(t,o):jm(t))}function fle(t){return t._reducerDefinitionType==="asyncThunk"}function ple(t){return t._reducerDefinitionType==="reducerWithPrepare"}function mle({type:t,reducerName:e},n,r,i){if(!i)throw new Error(Ia(18));const{payloadCreator:s,fulfilled:o,pending:l,rejected:u,settled:h,options:f}=n,p=i(t,s,f);r.exposeAction(e,p),o&&r.addCase(p.fulfilled,o),l&&r.addCase(p.pending,l),u&&r.addCase(p.rejected,u),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(e,{fulfilled:o||Zy,pending:l||Zy,rejected:u||Zy,settled:h||Zy})}function Zy(){}var gle="task",DH="listener",RH="completed",OE="cancelled",vle=`task-${OE}`,ble=`task-${RH}`,Z3=`${DH}-${OE}`,yle=`${DH}-${RH}`,Yw=class{constructor(t){Gn(this,"name","TaskAbortError");Gn(this,"message");this.code=t,this.message=`${gle} ${OE} (reason: ${t})`}},EE=(t,e)=>{if(typeof t!="function")throw new TypeError(Ia(32))},Yx=()=>{},NH=(t,e=Yx)=>(t.catch(e),t),PH=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),of=t=>{if(t.aborted)throw new Yw(t.reason)};function IH(t,e){let n=Yx;return new Promise((r,i)=>{const s=()=>i(new Yw(t.reason));if(t.aborted){s();return}n=PH(t,s),e.finally(()=>n()).then(r,i)}).finally(()=>{n=Yx})}var xle=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof Yw?"cancelled":"rejected",error:n}}finally{e==null||e()}},Gx=t=>e=>NH(IH(t,e).then(n=>(of(t),n))),BH=t=>{const e=Gx(t);return n=>e(new Promise(r=>setTimeout(r,n)))},{assign:Fp}=Object,o5={},Gw="listenerMiddleware",Ale=(t,e)=>{const n=r=>PH(t,()=>r.abort(t.reason));return(r,i)=>{EE(r);const s=new AbortController;n(s);const o=xle(async()=>{of(t),of(s.signal);const l=await r({pause:Gx(s.signal),delay:BH(s.signal),signal:s.signal});return of(s.signal),l},()=>s.abort(ble));return i!=null&&i.autoJoin&&e.push(o.catch(Yx)),{result:Gx(t)(o),cancel(){s.abort(vle)}}}},wle=(t,e)=>{const n=async(r,i)=>{of(e);let s=()=>{};const l=[new Promise((u,h)=>{let f=t({predicate:r,effect:(p,m)=>{m.unsubscribe(),u([p,m.getState(),m.getOriginalState()])}});s=()=>{f(),h()}})];i!=null&&l.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await IH(e,Promise.race(l));return of(e),u}finally{s()}};return(r,i)=>NH(n(r,i))},LH=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:s}=t;if(e)i=jm(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ia(21));return EE(s),{predicate:i,type:e,effect:s}},FH=Fp(t=>{const{type:e,predicate:n,effect:r}=LH(t);return{id:ale(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ia(22))}}},{withTypes:()=>FH}),l5=(t,e)=>{const{type:n,effect:r,predicate:i}=LH(e);return Array.from(t.values()).find(s=>(typeof n=="string"?s.type===n:s.predicate===i)&&s.effect===r)},J3=t=>{t.pending.forEach(e=>{e.abort(Z3)})},Sle=(t,e)=>()=>{for(const n of e.keys())J3(n);t.clear()},c5=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},HH=Fp(jm(`${Gw}/add`),{withTypes:()=>HH}),jle=jm(`${Gw}/removeAll`),zH=Fp(jm(`${Gw}/remove`),{withTypes:()=>zH}),Cle=(...t)=>{console.error(`${Gw}/error`,...t)},_le=(t={})=>{const e=new Map,n=new Map,r=v=>{const b=n.get(v)??0;n.set(v,b+1)},i=v=>{const b=n.get(v)??1;b===1?n.delete(v):n.set(v,b-1)},{extra:s,onError:o=Cle}=t;EE(o);const l=v=>(v.unsubscribe=()=>e.delete(v.id),e.set(v.id,v),b=>{v.unsubscribe(),b!=null&&b.cancelActive&&J3(v)}),u=v=>{const b=l5(e,v)??FH(v);return l(b)};Fp(u,{withTypes:()=>u});const h=v=>{const b=l5(e,v);return b&&(b.unsubscribe(),v.cancelActive&&J3(b)),!!b};Fp(h,{withTypes:()=>h});const f=async(v,b,x,w)=>{const A=new AbortController,j=wle(u,A.signal),C=[];try{v.pending.add(A),r(v),await Promise.resolve(v.effect(b,Fp({},x,{getOriginalState:w,condition:(_,S)=>j(_,S).then(Boolean),take:j,delay:BH(A.signal),pause:Gx(A.signal),extra:s,signal:A.signal,fork:Ale(A.signal,C),unsubscribe:v.unsubscribe,subscribe:()=>{e.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((_,S,O)=>{_!==A&&(_.abort(Z3),O.delete(_))})},cancel:()=>{A.abort(Z3),v.pending.delete(A)},throwIfCancelled:()=>{of(A.signal)}})))}catch(_){_ instanceof Yw||c5(o,_,{raisedBy:"effect"})}finally{await Promise.all(C),A.abort(yle),i(v),v.pending.delete(A)}},p=Sle(e,n);return{middleware:v=>b=>x=>{if(!bH(x))return b(x);if(HH.match(x))return u(x.payload);if(jle.match(x)){p();return}if(zH.match(x))return h(x.payload);let w=v.getState();const A=()=>{if(w===o5)throw new Error(Ia(23));return w};let j;try{if(j=b(x),e.size>0){const C=v.getState(),_=Array.from(e.values());for(const S of _){let O=!1;try{O=S.predicate(x,C,w)}catch(E){O=!1,c5(o,E,{raisedBy:"predicate"})}O&&f(S,x,v,A)}}}finally{w=o5}return j},startListening:u,stopListening:h,clearListeners:p}};function Ia(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var K1={exports:{}},Tle=K1.exports,u5;function kle(){return u5||(u5=1,function(t,e){(function(n,r){t.exports=r()})(Tle,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",h="day",f="week",p="month",m="quarter",v="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var H=["th","st","nd","rd"],P=z%100;return"["+z+(H[(P-20)%10]||H[P]||H[0])+"]"}},C=function(z,H,P){var F=String(z);return!F||F.length>=H?z:""+Array(H+1-F.length).join(P)+z},_={s:C,z:function(z){var H=-z.utcOffset(),P=Math.abs(H),F=Math.floor(P/60),U=P%60;return(H<=0?"+":"-")+C(F,2,"0")+":"+C(U,2,"0")},m:function z(H,P){if(H.date()<P.date())return-z(P,H);var F=12*(P.year()-H.year())+(P.month()-H.month()),U=H.clone().add(F,p),Z=P-U<0,G=H.clone().add(F+(Z?-1:1),p);return+(-(F+(P-U)/(Z?U-G:G-U))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:p,y:v,w:f,d:h,D:b,h:u,m:l,s:o,ms:s,Q:m}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",O={};O[S]=j;var E="$isDayjsObject",D=function(z){return z instanceof L||!(!z||!z[E])},N=function z(H,P,F){var U;if(!H)return S;if(typeof H=="string"){var Z=H.toLowerCase();O[Z]&&(U=Z),P&&(O[Z]=P,U=Z);var G=H.split("-");if(!U&&G.length>1)return z(G[0])}else{var W=H.name;O[W]=H,U=W}return!F&&U&&(S=U),U||!F&&S},I=function(z,H){if(D(z))return z.clone();var P=typeof H=="object"?H:{};return P.date=z,P.args=arguments,new L(P)},R=_;R.l=N,R.i=D,R.w=function(z,H){return I(z,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var L=function(){function z(P){this.$L=N(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[E]=!0}var H=z.prototype;return H.parse=function(P){this.$d=function(F){var U=F.date,Z=F.utc;if(U===null)return new Date(NaN);if(R.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var G=U.match(w);if(G){var W=G[2]-1||0,X=(G[7]||"0").substring(0,3);return Z?new Date(Date.UTC(G[1],W,G[3]||1,G[4]||0,G[5]||0,G[6]||0,X)):new Date(G[1],W,G[3]||1,G[4]||0,G[5]||0,G[6]||0,X)}}return new Date(U)}(P),this.init()},H.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},H.$utils=function(){return R},H.isValid=function(){return this.$d.toString()!==x},H.isSame=function(P,F){var U=I(P);return this.startOf(F)<=U&&U<=this.endOf(F)},H.isAfter=function(P,F){return I(P)<this.startOf(F)},H.isBefore=function(P,F){return this.endOf(F)<I(P)},H.$g=function(P,F,U){return R.u(P)?this[F]:this.set(U,P)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(P,F){var U=this,Z=!!R.u(F)||F,G=R.p(P),W=function(ze,Re){var ae=R.w(U.$u?Date.UTC(U.$y,Re,ze):new Date(U.$y,Re,ze),U);return Z?ae:ae.endOf(h)},X=function(ze,Re){return R.w(U.toDate()[ze].apply(U.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(Re)),U)},V=this.$W,te=this.$M,le=this.$D,be="set"+(this.$u?"UTC":"");switch(G){case v:return Z?W(1,0):W(31,11);case p:return Z?W(1,te):W(0,te+1);case f:var ye=this.$locale().weekStart||0,Xe=(V<ye?V+7:V)-ye;return W(Z?le-Xe:le+(6-Xe),te);case h:case b:return X(be+"Hours",0);case u:return X(be+"Minutes",1);case l:return X(be+"Seconds",2);case o:return X(be+"Milliseconds",3);default:return this.clone()}},H.endOf=function(P){return this.startOf(P,!1)},H.$set=function(P,F){var U,Z=R.p(P),G="set"+(this.$u?"UTC":""),W=(U={},U[h]=G+"Date",U[b]=G+"Date",U[p]=G+"Month",U[v]=G+"FullYear",U[u]=G+"Hours",U[l]=G+"Minutes",U[o]=G+"Seconds",U[s]=G+"Milliseconds",U)[Z],X=Z===h?this.$D+(F-this.$W):F;if(Z===p||Z===v){var V=this.clone().set(b,1);V.$d[W](X),V.init(),this.$d=V.set(b,Math.min(this.$D,V.daysInMonth())).$d}else W&&this.$d[W](X);return this.init(),this},H.set=function(P,F){return this.clone().$set(P,F)},H.get=function(P){return this[R.p(P)]()},H.add=function(P,F){var U,Z=this;P=Number(P);var G=R.p(F),W=function(te){var le=I(Z);return R.w(le.date(le.date()+Math.round(te*P)),Z)};if(G===p)return this.set(p,this.$M+P);if(G===v)return this.set(v,this.$y+P);if(G===h)return W(1);if(G===f)return W(7);var X=(U={},U[l]=r,U[u]=i,U[o]=n,U)[G]||1,V=this.$d.getTime()+P*X;return R.w(V,this)},H.subtract=function(P,F){return this.add(-1*P,F)},H.format=function(P){var F=this,U=this.$locale();if(!this.isValid())return U.invalidDate||x;var Z=P||"YYYY-MM-DDTHH:mm:ssZ",G=R.z(this),W=this.$H,X=this.$m,V=this.$M,te=U.weekdays,le=U.months,be=U.meridiem,ye=function(Re,ae,je,pe){return Re&&(Re[ae]||Re(F,Z))||je[ae].slice(0,pe)},Xe=function(Re){return R.s(W%12||12,Re,"0")},ze=be||function(Re,ae,je){var pe=Re<12?"AM":"PM";return je?pe.toLowerCase():pe};return Z.replace(A,function(Re,ae){return ae||function(je){switch(je){case"YY":return String(F.$y).slice(-2);case"YYYY":return R.s(F.$y,4,"0");case"M":return V+1;case"MM":return R.s(V+1,2,"0");case"MMM":return ye(U.monthsShort,V,le,3);case"MMMM":return ye(le,V);case"D":return F.$D;case"DD":return R.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return ye(U.weekdaysMin,F.$W,te,2);case"ddd":return ye(U.weekdaysShort,F.$W,te,3);case"dddd":return te[F.$W];case"H":return String(W);case"HH":return R.s(W,2,"0");case"h":return Xe(1);case"hh":return Xe(2);case"a":return ze(W,X,!0);case"A":return ze(W,X,!1);case"m":return String(X);case"mm":return R.s(X,2,"0");case"s":return String(F.$s);case"ss":return R.s(F.$s,2,"0");case"SSS":return R.s(F.$ms,3,"0");case"Z":return G}return null}(Re)||G.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(P,F,U){var Z,G=this,W=R.p(F),X=I(P),V=(X.utcOffset()-this.utcOffset())*r,te=this-X,le=function(){return R.m(G,X)};switch(W){case v:Z=le()/12;break;case p:Z=le();break;case m:Z=le()/3;break;case f:Z=(te-V)/6048e5;break;case h:Z=(te-V)/864e5;break;case u:Z=te/i;break;case l:Z=te/r;break;case o:Z=te/n;break;default:Z=te}return U?Z:R.a(Z)},H.daysInMonth=function(){return this.endOf(p).$D},H.$locale=function(){return O[this.$L]},H.locale=function(P,F){if(!P)return this.$L;var U=this.clone(),Z=N(P,F,!0);return Z&&(U.$L=Z),U},H.clone=function(){return R.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},z}(),Q=L.prototype;return I.prototype=Q,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",h],["$M",p],["$y",v],["$D",b]].forEach(function(z){Q[z[1]]=function(H){return this.$g(H,z[0],z[1])}}),I.extend=function(z,H){return z.$i||(z(H,L,I),z.$i=!0),I},I.locale=N,I.isDayjs=D,I.unix=function(z){return I(1e3*z)},I.en=O[S],I.Ls=O,I.p={},I})}(K1)),K1.exports}var Ole=kle();const He=ll(Ole);var Z1={exports:{}},Ele=Z1.exports,h5;function Mle(){return h5||(h5=1,function(t,e){(function(n,r){t.exports=r()})(Ele,function(){var n,r,i=1e3,s=6e4,o=36e5,l=864e5,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,f=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:h,months:f,days:l,hours:o,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},v=function(O){return O instanceof _},b=function(O,E,D){return new _(O,D,E.$l)},x=function(O){return r.p(O)+"s"},w=function(O){return O<0},A=function(O){return w(O)?Math.ceil(O):Math.floor(O)},j=function(O){return Math.abs(O)},C=function(O,E){return O?w(O)?{negative:!0,format:""+j(O)+E}:{negative:!1,format:""+O+E}:{negative:!1,format:""}},_=function(){function O(D,N,I){var R=this;if(this.$d={},this.$l=I,D===void 0&&(this.$ms=0,this.parseFromMilliseconds()),N)return b(D*m[x(N)],this);if(typeof D=="number")return this.$ms=D,this.parseFromMilliseconds(),this;if(typeof D=="object")return Object.keys(D).forEach(function(z){R.$d[x(z)]=D[z]}),this.calMilliseconds(),this;if(typeof D=="string"){var L=D.match(p);if(L){var Q=L.slice(2).map(function(z){return z!=null?Number(z):0});return this.$d.years=Q[0],this.$d.months=Q[1],this.$d.weeks=Q[2],this.$d.days=Q[3],this.$d.hours=Q[4],this.$d.minutes=Q[5],this.$d.seconds=Q[6],this.calMilliseconds(),this}}return this}var E=O.prototype;return E.calMilliseconds=function(){var D=this;this.$ms=Object.keys(this.$d).reduce(function(N,I){return N+(D.$d[I]||0)*m[I]},0)},E.parseFromMilliseconds=function(){var D=this.$ms;this.$d.years=A(D/h),D%=h,this.$d.months=A(D/f),D%=f,this.$d.days=A(D/l),D%=l,this.$d.hours=A(D/o),D%=o,this.$d.minutes=A(D/s),D%=s,this.$d.seconds=A(D/i),D%=i,this.$d.milliseconds=D},E.toISOString=function(){var D=C(this.$d.years,"Y"),N=C(this.$d.months,"M"),I=+this.$d.days||0;this.$d.weeks&&(I+=7*this.$d.weeks);var R=C(I,"D"),L=C(this.$d.hours,"H"),Q=C(this.$d.minutes,"M"),z=this.$d.seconds||0;this.$d.milliseconds&&(z+=this.$d.milliseconds/1e3,z=Math.round(1e3*z)/1e3);var H=C(z,"S"),P=D.negative||N.negative||R.negative||L.negative||Q.negative||H.negative,F=L.format||Q.format||H.format?"T":"",U=(P?"-":"")+"P"+D.format+N.format+R.format+F+L.format+Q.format+H.format;return U==="P"||U==="-P"?"P0D":U},E.toJSON=function(){return this.toISOString()},E.format=function(D){var N=D||"YYYY-MM-DDTHH:mm:ss",I={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return N.replace(u,function(R,L){return L||String(I[R])})},E.as=function(D){return this.$ms/m[x(D)]},E.get=function(D){var N=this.$ms,I=x(D);return I==="milliseconds"?N%=1e3:N=I==="weeks"?A(N/m[I]):this.$d[I],N||0},E.add=function(D,N,I){var R;return R=N?D*m[x(N)]:v(D)?D.$ms:b(D,this).$ms,b(this.$ms+R*(I?-1:1),this)},E.subtract=function(D,N){return this.add(D,N,!0)},E.locale=function(D){var N=this.clone();return N.$l=D,N},E.clone=function(){return b(this.$ms,this)},E.humanize=function(D){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!D)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},O}(),S=function(O,E,D){return O.add(E.years()*D,"y").add(E.months()*D,"M").add(E.days()*D,"d").add(E.hours()*D,"h").add(E.minutes()*D,"m").add(E.seconds()*D,"s").add(E.milliseconds()*D,"ms")};return function(O,E,D){n=D,r=D().$utils(),D.duration=function(R,L){var Q=D.locale();return b(R,{$l:Q},L)},D.isDuration=v;var N=E.prototype.add,I=E.prototype.subtract;E.prototype.add=function(R,L){return v(R)?S(this,R,1):N.bind(this)(R,L)},E.prototype.subtract=function(R,L){return v(R)?S(this,R,-1):I.bind(this)(R,L)}}})}(Z1)),Z1.exports}var Dle=Mle();const Rle=ll(Dle);var J1={exports:{}},Nle=J1.exports,d5;function Ple(){return d5||(d5=1,function(t,e){(function(n,r){t.exports=r()})(Nle,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,o,l){var u=o.prototype;l.utc=function(x){var w={date:x,utc:!0,args:arguments};return new o(w)},u.utc=function(x){var w=l(this.toDate(),{locale:this.$L,utc:!0});return x?w.add(this.utcOffset(),n):w},u.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var h=u.parse;u.parse=function(x){x.utc&&(this.$u=!0),this.$utils().u(x.$offset)||(this.$offset=x.$offset),h.call(this,x)};var f=u.init;u.init=function(){if(this.$u){var x=this.$d;this.$y=x.getUTCFullYear(),this.$M=x.getUTCMonth(),this.$D=x.getUTCDate(),this.$W=x.getUTCDay(),this.$H=x.getUTCHours(),this.$m=x.getUTCMinutes(),this.$s=x.getUTCSeconds(),this.$ms=x.getUTCMilliseconds()}else f.call(this)};var p=u.utcOffset;u.utcOffset=function(x,w){var A=this.$utils().u;if(A(x))return this.$u?0:A(this.$offset)?p.call(this):this.$offset;if(typeof x=="string"&&(x=function(S){S===void 0&&(S="");var O=S.match(r);if(!O)return null;var E=(""+O[0]).match(i)||["-",0,0],D=E[0],N=60*+E[1]+ +E[2];return N===0?0:D==="+"?N:-N}(x),x===null))return this;var j=Math.abs(x)<=16?60*x:x;if(j===0)return this.utc(w);var C=this.clone();if(w)return C.$offset=j,C.$u=!1,C;var _=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(j+_,n)).$offset=j,C.$x.$localOffset=_,C};var m=u.format;u.format=function(x){var w=x||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,w)},u.valueOf=function(){var x=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*x},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var v=u.toDate;u.toDate=function(x){return x==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var b=u.diff;u.diff=function(x,w,A){if(x&&this.$u===x.$u)return b.call(this,x,w,A);var j=this.local(),C=l(x).local();return b.call(j,C,w,A)}}})}(J1)),J1.exports}var Ile=Ple();const Ble=ll(Ile);He.extend(Rle);He.extend(Ble);const ME=t=>{if(t==="")return null;if(t==="0")return 0;const e=new RegExp("^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$"),n=t.match(e);if(!n)return null;let r=0;const i=(s,o)=>{if(n[s]===void 0)return;const l=parseInt(n[s]);r+=l*o};return i(2,1e3*60*60*24*365),i(4,1e3*60*60*24*7),i(6,1e3*60*60*24),i(8,1e3*60*60),i(10,1e3*60),i(12,1e3),i(14,1),r},qH=(t,e,n)=>{if(t===0)return"0s";const r=t<0?"-":"";let i=Math.abs(t);const s=[];for(const{unit:o,mult:l,exact:u}of[{unit:"y",mult:1e3*60*60*24*365,exact:!0},{unit:"w",mult:1e3*60*60*24*7,exact:!0},{unit:"d",mult:1e3*60*60*24,exact:!1},{unit:"h",mult:1e3*60*60,exact:!1},{unit:"m",mult:1e3*60,exact:!1},{unit:"s",mult:1e3,exact:!1},{unit:"ms",mult:1,exact:!1}]){if(u&&i%l!==0)continue;const h=Math.floor(i/l);if(h>0)if(i-=h*l,n&&o==="s"&&i>0){s.push(`${parseFloat((h+i/1e3).toFixed(3))}s`);break}else s.push(`${h}${o}`);s.length==0&&o=="ms"&&s.push(`${Math.round(i)}ms`)}return r+s.join(e||"")},Hn=t=>qH(t);function Lle(t){return He.utc(t).valueOf()}const Xx=()=>He().valueOf(),Hp=t=>qH(t," ",!0),Kx=(t,e,n=" ago")=>{const r=Lle(t);return r<0?"never":Hp(e-r)+n},lf=(t,e)=>e?He.unix(t).tz(He.tz.guess()).format():He.unix(t).utc().format();function f5(t){return He.utc(t).valueOf()}const Fle=t=>{const e=new URLSearchParams(t),n=[];for(let r=0;e.has(`g${r}.expr`);r++){const i=Xw(),s=(o,l)=>{const u=`g${r}.${o}`;e.has(u)&&l(e.get(u))};s("expr",o=>{i.expr=o}),s("show_tree",o=>{i.showTree=o==="1"}),s("tab",o=>{switch(o){case"0":case"graph":i.visualizer.activeTab="graph";break;case"1":case"table":i.visualizer.activeTab="table";break;case"explain":i.visualizer.activeTab="explain";break;default:console.log("Unknown tab",o)}}),s("display_mode",o=>{i.visualizer.displayMode=o}),s("stacked",o=>{i.visualizer.displayMode=o==="1"?Cm.Stacked:Cm.Lines}),s("y_axis_min",o=>{i.visualizer.yAxisMin=o===""?null:parseFloat(o)}),s("show_exemplars",o=>{i.visualizer.showExemplars=o==="1"}),s("range_input",o=>{i.visualizer.range=ME(o)||i.visualizer.range}),s("end_input",o=>{i.visualizer.endTime=f5(o)}),s("step_input",o=>{parseInt(o)>0&&(i.visualizer.resolution={type:"custom",step:parseInt(o)*1e3})}),s("res_type",o=>{switch(o){case"auto":s("res_density",l=>{["low","medium","high"].includes(l)&&(i.visualizer.resolution={type:"auto",density:l})});break;case"fixed":s("res_step",l=>{i.visualizer.resolution={type:"fixed",step:parseFloat(l)*1e3}});break;case"custom":s("res_step",l=>{i.visualizer.resolution={type:"custom",step:parseFloat(l)*1e3}});break;default:console.log("Unknown resolution type",o)}}),s("moment_input",o=>{i.visualizer.endTime=f5(o)}),n.push(i)}return n};function p5(t){return He.utc(t).format("YYYY-MM-DD HH:mm:ss")}const Hle=t=>{const e=new URLSearchParams,n=(r,i,s)=>e.append(`g${r}.${i}`,s);return t.forEach((r,i)=>{switch(n(i,"expr",r.expr),n(i,"show_tree",r.showTree?"1":"0"),n(i,"tab",r.visualizer.activeTab),r.visualizer.endTime!==null&&(n(i,"end_input",p5(r.visualizer.endTime)),n(i,"moment_input",p5(r.visualizer.endTime))),n(i,"range_input",Hn(r.visualizer.range)),r.visualizer.resolution.type){case"auto":n(i,"res_type","auto"),n(i,"res_density",r.visualizer.resolution.density);break;case"fixed":n(i,"res_type","fixed"),n(i,"res_step",(r.visualizer.resolution.step/1e3).toString());break;case"custom":n(i,"res_type","custom"),n(i,"res_step",(r.visualizer.resolution.step/1e3).toString());break}n(i,"display_mode",r.visualizer.displayMode),r.visualizer.yAxisMin!==null&&n(i,"y_axis_min",r.visualizer.yAxisMin.toString()),n(i,"show_exemplars",r.visualizer.showExemplars?"1":"0")}),e},Ca=(t,e)=>{const n=localStorage.getItem(t);return n===null?e:JSON.parse(n)},$H="queryPage.queryHistory";var Cm=(t=>(t.Lines="lines",t.Stacked="stacked",t.Heatmap="heatmap",t))(Cm||{});const ex=(t,e)=>{switch(t.type){case"auto":{const n=t.density==="high"?750:t.density==="medium"?250:100;return Math.max(Math.floor(e/n/1e3)*1e3,1e3)}case"fixed":return t.step;case"custom":return t.step}},Xw=()=>({id:bm(),expr:"",showTree:!1,showMetricsExplorer:!1,visualizer:{activeTab:"table",endTime:null,range:3600*1e3,resolution:{type:"auto",density:"medium"},displayMode:"lines",showExemplars:!1,yAxisMin:null}}),zle={panels:[Xw()],queryHistory:Ca($H,[])},mp=t=>{const e="?"+Hle(t).toString();window.history.pushState({},"",e)},QH=Vw({name:"queryPage",initialState:zle,reducers:{setPanels:(t,{payload:e})=>{t.panels=e},addPanel:t=>{t.panels.push(Xw()),mp(t.panels)},duplicatePanel:(t,{payload:e})=>{const n={...t.panels[e.idx],id:bm(),expr:e.expr};t.panels.splice(e.idx+1,0,n),mp(t.panels)},removePanel:(t,{payload:e})=>{t.panels.splice(e,1),mp(t.panels)},setExpr:(t,{payload:e})=>{t.panels[e.idx].expr=e.expr,mp(t.panels)},addQueryToHistory:(t,{payload:e})=>{t.queryHistory=[e,...t.queryHistory.filter(n=>n!==e)].slice(0,50)},setShowTree:(t,{payload:e})=>{t.panels[e.idx].showTree=e.showTree,mp(t.panels)},setVisualizer:(t,{payload:e})=>{t.panels[e.idx].visualizer=e.visualizer,mp(t.panels)}}}),{setPanels:m5,addPanel:qle,removePanel:$le,duplicatePanel:Qle,setExpr:Ule,addQueryToHistory:UH,setShowTree:TC,setVisualizer:Ju}=QH.actions,Wle=QH.reducer;function Vle({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:i}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=i[e-1][i[e-1].length-1]-1?i[e-1].length-1:i[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===i[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===i[e].length-2&&r>=i[e][i[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:i[e-1].length-1,cellIndex:i[e-1][i[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:i[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===i[e].length-1&&r===i[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===i[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function WH({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:i,size:s}){var u,h,f;const o=Vle({direction:e,size:s,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;const l=(f=(h=(u=t.current)==null?void 0:u[o.levelIndex])==null?void 0:h[o.rowIndex])==null?void 0:f[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?WH({controlsRef:t,direction:e,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:s}):l.focus())}function Yle(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Gle(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(r=>r.length))}function DE({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:i}){const s=Yle(i.key);if(s){i.preventDefault();const o=Gle(t);WH({controlsRef:t,direction:s,levelIndex:e,rowIndex:n,cellIndex:r,size:o})}}function g5(t,e){let n=t?He(t):He();if(e==="")return n.format("YYYY-MM-DD HH:mm:ss");const[r,i,s=0]=e.split(":").map(Number);return n=n.set("hour",r),n=n.set("minute",i),n=n.set("second",s),n=n.set("millisecond",0),n.format("YYYY-MM-DD HH:mm:ss")}function ks(t){return t==null||t===""?t:He(t).format("YYYY-MM-DD")}function Op(t){return t==null||t===""?t:He(t).format("YYYY-MM-DD HH:mm:ss")}function Xle({minDate:t,maxDate:e}){const n=He();return!t&&!e?ks(n):t&&He(n).isBefore(t)?ks(t):e&&He(n).isAfter(e)?ks(e):ks(n)}function kC(t,e,n){return!t&&!e?Op(n):t&&He(n).isBefore(t)?Op(t):e&&He(n).isAfter(e)?Op(e):Op(n)}const Kle={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Zle=M.createContext(Kle);function Jh(){const t=M.useContext(Zle),e=M.useCallback(s=>s||t.locale,[t.locale]),n=M.useCallback(s=>typeof s=="number"?s:t.firstDayOfWeek,[t.firstDayOfWeek]),r=M.useCallback(s=>Array.isArray(s)?s:t.weekendDays,[t.weekendDays]),i=M.useCallback(s=>typeof s=="string"?s:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function Jle({value:t,type:e,withTime:n}){const r=n?Op:ks;if(e==="range"&&Array.isArray(t)){const i=r(t[0]),s=r(t[1]);return i?s?`${i} – ${s}`:`${i} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?r(t):""}function VH({value:t,type:e,name:n,form:r,withTime:i=!1}){return a.jsx("input",{type:"hidden",value:Jle({value:t,type:e,withTime:i}),name:n,form:r})}VH.displayName="@mantine/dates/HiddenDatesInput";function Ts(t){return t<10?`0${t}`:`${t}`}const ece=t=>Number(t.toFixed(0)[0]),tx=M.forwardRef(({value:t,min:e,max:n,onChange:r,focusable:i,step:s,onNextInput:o,onPreviousInput:l,onFocus:u,readOnly:h,allowTemporaryZero:f=!1,placeholder:p="--",...m},v)=>{const b=ece(n),x=n+1-s,w=j=>{if(h)return;const C=j.replace(/\D/g,"");if(C!==""){const _=parseInt(C,10),S=f&&_===0&&e>0?0:Ch(_,e,n);r(S),(S>b||j.startsWith("00"))&&(o==null||o())}},A=j=>{if(!h){if((j.key==="0"||j.key==="Num0")&&t===0&&(j.preventDefault(),o==null||o()),j.key==="Home"&&(j.preventDefault(),r(e)),j.key==="End"&&(j.preventDefault(),r(n)),(j.key==="Backspace"||j.key==="Delete")&&(j.preventDefault(),t!==null?r(null):l==null||l()),j.key==="ArrowRight"&&(j.preventDefault(),o==null||o()),j.key==="ArrowLeft"&&(j.preventDefault(),l==null||l()),j.key==="ArrowUp"){j.preventDefault();const C=t===null?e:Ch(t+s,e,x);r(C)}if(j.key==="ArrowDown"){j.preventDefault();const C=t===null?x:Ch(t-s,e,x);r(C)}}};return a.jsx("input",{ref:v,type:"text",role:"spinbutton","aria-valuemin":e,"aria-valuemax":n,"aria-valuenow":t===null?0:t,"data-empty":t===null||void 0,inputMode:"numeric",placeholder:p,value:t===null?"":Ts(t),onChange:j=>w(j.currentTarget.value),onKeyDown:A,onFocus:j=>{j.currentTarget.select(),u==null||u(j)},onClick:j=>{j.stopPropagation(),j.currentTarget.select()},onMouseDown:j=>j.stopPropagation(),...m})});tx.displayName="@mantine/dates/SpinInput";const[tce,Ef]=Wi("TimeInput component was not found in the component tree"),YH=M.forwardRef(({labels:t,value:e,onChange:n,className:r,style:i,onPreviousInput:s,readOnly:o,onMouseDown:l,onTouchStart:u,inputType:h,...f},p)=>{const m=Ef(),v=b=>{o||(b.key==="Home"&&(b.preventDefault(),n(t.am)),b.key==="End"&&(b.preventDefault(),n(t.pm)),(b.key==="Backspace"||b.key==="Delete")&&(b.preventDefault(),e===null?s==null||s():n(null)),b.key==="ArrowLeft"&&(b.preventDefault(),s==null||s()),(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),n(e===t.am?t.pm:t.am)),b.code==="KeyA"&&(b.preventDefault(),n(t.am)),b.code==="KeyP"&&(b.preventDefault(),n(t.pm)))};if(h==="input"){const b=e||"--",x=b.length+1;return a.jsx("input",{...m.getStyles("field",{className:r,style:i}),ref:p,value:b,size:x,readOnly:!0,onChange:()=>{},onClick:w=>w.stopPropagation(),onKeyDown:v,onMouseDown:w=>{w.stopPropagation(),l==null||l(w)},"data-am-pm":!0,...f})}return a.jsxs("select",{...m.getStyles("field",{className:r,style:i}),ref:p,value:e||"",onChange:b=>!o&&n(b.target.value||null),onClick:b=>b.stopPropagation(),onKeyDown:v,onMouseDown:b=>{b.stopPropagation(),l==null||l(b)},"data-am-pm":!0,...f,children:[a.jsx("option",{value:"",children:"--"}),a.jsx("option",{value:t.am,children:t.am}),a.jsx("option",{value:t.pm,children:t.pm})]})});YH.displayName="@mantine/dates/AmPmInput";function RE({value:t,active:e,onSelect:n}){const r=Ef();return a.jsx(Rr,{mod:{active:e},onClick:()=>n(t),onMouseDown:i=>i.preventDefault(),"data-value":t,tabIndex:-1,...r.getStyles("control"),children:typeof t=="number"?Ts(t):t})}RE.displayName="@mantine/dates/TimeControl";function GH({labels:t,value:e,onSelect:n}){const r=Ef(),i=[t.am,t.pm].map(s=>a.jsx(RE,{value:s,active:e===s,onSelect:n},s));return a.jsx("div",{...r.getStyles("controlsList"),children:i})}GH.displayName="@mantine/dates/AmPmControlsList";function nce(t,e){if(!t||!e)return!1;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function rce(t,e,n){const r=[];for(let i=t;i<=e;i+=n)r.push(i);return r}function nx({min:t,max:e,step:n,value:r,onSelect:i,reversed:s}){const o=Ef(),l=M.useRef(null),u=rce(t,e,n),h=(s?u.reverse():u).map(f=>a.jsx(RE,{value:f,active:r===f,onSelect:i},f));return M.useEffect(()=>{r!==null&&requestAnimationFrame(()=>{var m;const p=(m=l.current)==null?void 0:m.querySelector(`[data-value="${r}"]`);nce(p,l.current)||p==null||p.scrollIntoView({block:"nearest"})})},[r]),a.jsx(La,{h:o.maxDropdownContentHeight,type:"never",viewportRef:l,...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("controlsList"),children:h})})}nx.displayName="@mantine/dates/TimeControlsList";var XH={fieldsRoot:"m_7a8f1e6d",fieldsGroup:"m_d6bb0a54",controlsList:"m_b97ecb26",controlsListGroup:"m_31fe42f9",dropdown:"m_9c4817c3",control:"m_154c536b",presetControl:"m_7be09d0c",presetsGroup:"m_7d00001d",presetsGroupLabel:"m_d8d918d7",field:"m_6b43ba88"};function Zx(t){const[e=null,n=null,r=null]=t.split(":").map(Number);return{hours:e,minutes:n,seconds:r}}function KH({time:t,compare:e,withSeconds:n}){const r=Zx(t),i=Zx(e);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function ice(t,e){return`${t.getHours()}:${t.getMinutes()}${e?`:${t.getSeconds()}`:""}`}function sce({value:t,format:e,amPmLabels:n,withSeconds:r}){const i=Zx(typeof t=="string"?t:ice(t,r));if(i.hours===null||i.minutes===null)return null;if(e==="24h")return`${Ts(i.hours)}:${Ts(i.minutes)}${r?`:${Ts(i.seconds||0)}`:""}`;const s=i.hours>=12;return`${i.hours%12===0?12:i.hours%12}:${Ts(i.minutes)}${r?`:${Ts(i.seconds||0)}`:""} ${s?n.pm:n.am}`}function ZH({value:t,format:e="24h",amPmLabels:n={am:"AM",pm:"PM"},withSeconds:r=!1}){return a.jsx(a.Fragment,{children:sce({value:t,format:e,amPmLabels:n,withSeconds:r})})}ZH.displayName="@mantine/dates/TimeValue";function NE({value:t,active:e,onChange:n,format:r,amPmLabels:i,withSeconds:s}){const o=Ef();return a.jsx(Rr,{mod:{active:e},onClick:()=>n(t),...o.getStyles("presetControl"),children:a.jsx(ZH,{withSeconds:s,value:t,format:r,amPmLabels:i})})}NE.displayName="@mantine/dates/TimePresetControl";function JH({value:t,data:e,onChange:n,format:r,amPmLabels:i,withSeconds:s}){const o=Ef(),l=e.values.map(u=>a.jsx(NE,{value:u,format:r,amPmLabels:i,withSeconds:s,active:KH({time:u,compare:t,withSeconds:s}),onChange:n},u));return a.jsxs("div",{...o.getStyles("presetsGroup"),children:[a.jsx("div",{...o.getStyles("presetsGroupLabel"),children:e.label}),a.jsx(Pw,{cols:s?2:3,spacing:4,children:l})]})}JH.displayName="@mantine/dates/TimePresetGroup";function ez({presets:t,format:e,amPmLabels:n,withSeconds:r,value:i,onChange:s}){const o=Ef();if(t.length===0)return null;if(typeof t[0]=="string"){const u=t.map(h=>a.jsx(NE,{value:h,format:e,amPmLabels:n,withSeconds:r,active:KH({time:h,compare:i,withSeconds:r}),onChange:s},h));return a.jsx(La.Autosize,{mah:o.maxDropdownContentHeight,type:"never",...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("presetsRoot"),children:a.jsx(Pw,{cols:r?2:3,spacing:4,children:u})})})}const l=t.map((u,h)=>a.jsx(JH,{data:u,value:i,format:e,amPmLabels:n,withSeconds:r,onChange:s},h));return a.jsx(La.Autosize,{mah:o.maxDropdownContentHeight,type:"never",...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("presetsRoot"),children:l})})}ez.displayName="@mantine/dates/TimePresets";function OC(t){const[e=0,n=0,r=0]=t.split(":").map(Number);return e*3600+n*60+r}function ace(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60),r=t%60;return{timeString:`${Ts(e)}:${Ts(n)}:${Ts(r)}`,hours:e,minutes:n,seconds:r}}function tz(t,e,n){const r=OC(t),i=e?OC(e):-1/0,s=n?OC(n):1/0,o=Math.max(i,Math.min(r,s));return ace(o)}function oce({hours:t,minutes:e,seconds:n,amPmLabels:r}){if(t===null)return{hours:null,minutes:null,seconds:null,amPm:null};const i=t>=12?r.pm:r.am;return{hours:t%12===0?12:t%12,minutes:typeof e=="number"?e:null,seconds:typeof n=="number"?n:null,amPm:i}}function jg({time:t,format:e,amPmLabels:n}){if(t==="")return{hours:null,minutes:null,seconds:null,amPm:null};const{hours:r,minutes:i,seconds:s}=Zx(t),o={hours:r,minutes:i,seconds:s};return e==="12h"?oce({...o,amPmLabels:n}):{...o,amPm:null}}function lce({hours:t,minutes:e,seconds:n,amPm:r,amPmLabels:i,withSeconds:s}){let o=t;return r===i.pm&&t!==12?o+=12:r===i.am&&t===12&&(o=0),`${Ts(o)}:${Ts(e)}${s?`:${Ts(n||0)}`:""}`}function wp({hours:t,minutes:e,seconds:n,format:r,withSeconds:i,amPm:s,amPmLabels:o}){return t===null||e===null?{valid:!1,value:""}:i&&n===null?{valid:!1,value:""}:r==="24h"?{valid:!0,value:`${Ts(t)}:${Ts(e)}${i?`:${Ts(n)}`:""}`}:s===null?{valid:!1,value:""}:{valid:!0,value:lce({hours:t,minutes:e,seconds:n,amPm:s,amPmLabels:o,withSeconds:i})}}function cce({value:t,defaultValue:e,onChange:n,format:r,amPmLabels:i,withSeconds:s=!1,min:o,max:l,clearable:u,readOnly:h,disabled:f,pasteSplit:p}){const m=jg({time:t||e||"",amPmLabels:i,format:r}),v=wp({hours:m.hours,minutes:m.minutes,seconds:m.seconds,format:r,withSeconds:s,amPm:m.amPm,amPmLabels:i}),b=M.useRef(!0),x=M.useRef(!v.valid),[w,A]=M.useState(m.hours),[j,C]=M.useState(m.minutes),[_,S]=M.useState(m.seconds),[O,E]=M.useState(m.amPm),D=u&&!h&&!f&&(w!==null||j!==null||_!==null||O!==null),N=M.useRef(null),I=M.useRef(null),R=M.useRef(null),L=M.useRef(null),Q=V=>{var te,le,be,ye;V==="hours"&&((te=N.current)==null||te.focus()),V==="minutes"&&((le=I.current)==null||le.focus()),V==="seconds"&&((be=R.current)==null||be.focus()),V==="amPm"&&((ye=L.current)==null||ye.focus())},z=(V,te)=>{const le={hours:w,minutes:j,seconds:_,amPm:O,[V]:te},be=wp({...le,format:r,withSeconds:s,amPmLabels:i});be.valid?(b.current=!1,x.current=!1,V==="hours"&&A(te),V==="minutes"&&C(te),V==="seconds"&&S(te),V==="amPm"&&E(te),n==null||n(be.value)):(b.current=!1,x.current||(n==null||n(""),x.current=!0))},H=V=>{b.current=!1;const te=jg({time:V,amPmLabels:i,format:r});A(te.hours),C(te.minutes),S(te.seconds),E(te.amPm);const le=wp({...te,format:r,withSeconds:s,amPmLabels:i});x.current=!le.valid,n==null||n(V)},P=V=>{let te=V;r==="12h"&&typeof V=="number"&&V>12&&(te=(V-1)%12+1),A(te),z("hours",te),Q("hours")},F=V=>{C(V),z("minutes",V),Q("minutes")},U=V=>{S(V),z("seconds",V),Q("seconds")},Z=V=>{E(V),z("amPm",V),Q("amPm")},G=()=>{b.current=!1,A(null),C(null),S(null),E(null),n==null||n(""),x.current=!0,Q("hours")},W=V=>{V.preventDefault();const te=V.clipboardData.getData("text"),le=(p||jg)({time:te,format:r,amPmLabels:i}),be=wp({...le,format:r,withSeconds:s,amPmLabels:i});if(be.valid){b.current=!1;const ye=tz(be.value,o||"00:00:00",l||"23:59:59");n==null||n(ye.timeString),A(le.hours),C(le.minutes),S(le.seconds),E(le.amPm)}},X=wp({hours:w,minutes:j,seconds:_,format:r,withSeconds:s,amPm:O,amPmLabels:i});return Gl(()=>{if(t===""){b.current=!1,A(null),C(null),S(null),E(null),b.current=!0;return}if(b.current&&typeof t=="string"){const V=jg({time:t||"",amPmLabels:i,format:r});A(V.hours),C(V.minutes),S(V.seconds),E(V.amPm)}b.current=!0},[t]),{refs:{hours:N,minutes:I,seconds:R,amPm:L},values:{hours:w,minutes:j,seconds:_,amPm:O},setHours:P,setMinutes:F,setSeconds:U,setAmPm:Z,focus:Q,clear:G,onPaste:W,setTimeString:H,isClearable:D,hiddenInputValue:X.value}}const uce={hoursStep:1,minutesStep:1,secondsStep:1,format:"24h",amPmLabels:{am:"AM",pm:"PM"},pasteSplit:jg,maxDropdownContentHeight:200,hoursPlaceholder:"--",minutesPlaceholder:"--",secondsPlaceholder:"--"},hce=(t,{size:e})=>({dropdown:{"--control-font-size":kr(e)}}),PE=Oe((t,e)=>{const n=we("TimePicker",uce,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,onClick:h,format:f,value:p,defaultValue:m,onChange:v,hoursStep:b,minutesStep:x,secondsStep:w,withSeconds:A,hoursInputLabel:j,minutesInputLabel:C,secondsInputLabel:_,amPmInputLabel:S,amPmLabels:O,clearable:E,onMouseDown:D,onFocusCapture:N,onBlurCapture:I,min:R,max:L,popoverProps:Q,withDropdown:z,rightSection:H,onFocus:P,onBlur:F,clearButtonProps:U,hoursInputProps:Z,minutesInputProps:G,secondsInputProps:W,amPmSelectProps:X,readOnly:V,disabled:te,size:le,name:be,form:ye,hiddenInputProps:Xe,labelProps:ze,pasteSplit:Re,hoursRef:ae,minutesRef:je,secondsRef:pe,amPmRef:ke,presets:gt,maxDropdownContentHeight:We,scrollAreaProps:Le,attributes:Fe,reverseTimeControlsList:Ne,hoursPlaceholder:Ve,minutesPlaceholder:qt,secondsPlaceholder:et,...Je}=n,{resolvedClassNames:Ue,resolvedStyles:Pe}=bo({classNames:r,styles:o,props:n}),st=lt({name:"TimePicker",classes:XH,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:Fe,vars:u,varsResolver:hce}),he=cce({value:p,defaultValue:m,onChange:v,format:f,amPmLabels:O,withSeconds:A,min:R,max:L,clearable:E,disabled:te,readOnly:V,pasteSplit:Re}),dt=cr(he.refs.hours,ae),sn=cr(he.refs.minutes,je),Kt=cr(he.refs.seconds,pe),un=cr(he.refs.amPm,ke),Zt=ki(),Pt=M.useRef(!1),[Mt,Et]=M.useState(!1),Ut=yt=>{Pt.current||(Pt.current=!0,P==null||P(yt))},ei=yt=>{if(!yt.currentTarget.contains(yt.relatedTarget)){const Tt=he.values,qn=wp({...Tt,format:f,amPmLabels:O,withSeconds:!!A});if(qn.valid&&(R||L)){const Ht=tz(qn.value,R,L);Ht.timeString!==qn.value&&he.setTimeString(Ht.timeString)}Pt.current=!1,F==null||F(yt)}};return a.jsx(tce,{value:{getStyles:st,scrollAreaProps:Le,maxDropdownContentHeight:We},children:a.jsxs(Zn,{opened:Mt,transitionProps:{duration:0},position:"bottom-start",withRoles:!1,disabled:te||V||!z,...Q,children:[a.jsx(Zn.Target,{children:a.jsxs(Fa,{component:"div",size:le,disabled:te,ref:e,onClick:yt=>{h==null||h(yt),he.focus("hours")},onMouseDown:yt=>{yt.preventDefault(),D==null||D(yt)},onFocusCapture:yt=>{Et(!0),N==null||N(yt)},onBlurCapture:yt=>{Et(!1),I==null||I(yt)},rightSection:H||he.isClearable&&a.jsx(ec,{...U,size:le,onClick:yt=>{var Tt;he.clear(),(Tt=U==null?void 0:U.onClick)==null||Tt.call(U,yt)},onMouseDown:yt=>{var Tt;yt.preventDefault(),(Tt=U==null?void 0:U.onMouseDown)==null||Tt.call(U,yt)}}),labelProps:{htmlFor:Zt,...ze},style:s,className:i,classNames:Ue,styles:Pe,__staticSelector:"TimePicker",...Je,children:[a.jsx("div",{...st("fieldsRoot"),dir:"ltr",children:a.jsxs("div",{...st("fieldsGroup"),onBlur:ei,children:[a.jsx(tx,{id:Zt,...Z,...st("field",{className:Z==null?void 0:Z.className,style:Z==null?void 0:Z.style}),value:he.values.hours,onChange:he.setHours,onNextInput:()=>he.focus("minutes"),min:f==="12h"?1:0,max:f==="12h"?12:23,allowTemporaryZero:f==="12h",focusable:!0,step:b,ref:dt,"aria-label":j,readOnly:V,disabled:te,onPaste:he.onPaste,onFocus:yt=>{var Tt;Ut(yt),(Tt=Z==null?void 0:Z.onFocus)==null||Tt.call(Z,yt)},onBlur:yt=>{var Ht;const Tt=yt.currentTarget.value,qn=Tt?parseInt(Tt,10):null;f==="12h"&&qn===0&&he.setHours(12),(Ht=Z==null?void 0:Z.onBlur)==null||Ht.call(Z,yt)},placeholder:Ve}),a.jsx("span",{children:":"}),a.jsx(tx,{...G,...st("field",{className:G==null?void 0:G.className,style:G==null?void 0:G.style}),value:he.values.minutes,onChange:he.setMinutes,min:0,max:59,focusable:!0,step:x,ref:sn,onPreviousInput:()=>he.focus("hours"),onNextInput:()=>A?he.focus("seconds"):he.focus("amPm"),"aria-label":C,tabIndex:-1,readOnly:V,disabled:te,onPaste:he.onPaste,onFocus:yt=>{var Tt;Ut(yt),(Tt=G==null?void 0:G.onFocus)==null||Tt.call(G,yt)},placeholder:qt}),A&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:":"}),a.jsx(tx,{...W,...st("field",{className:W==null?void 0:W.className,style:W==null?void 0:W.style}),value:he.values.seconds,onChange:he.setSeconds,min:0,max:59,focusable:!0,step:w,ref:Kt,onPreviousInput:()=>he.focus("minutes"),onNextInput:()=>he.focus("amPm"),"aria-label":_,tabIndex:-1,readOnly:V,disabled:te,onPaste:he.onPaste,onFocus:yt=>{var Tt;Ut(yt),(Tt=W==null?void 0:W.onFocus)==null||Tt.call(W,yt)},placeholder:et})]}),f==="12h"&&a.jsx(YH,{...X,inputType:z?"input":"select",labels:O,value:he.values.amPm,onChange:he.setAmPm,ref:un,"aria-label":S,onPreviousInput:()=>A?he.focus("seconds"):he.focus("minutes"),readOnly:V,disabled:te,tabIndex:-1,onPaste:he.onPaste,onFocus:yt=>{var Tt;Ut(yt),(Tt=X==null?void 0:X.onFocus)==null||Tt.call(X,yt)}})]})}),a.jsx("input",{type:"hidden",name:be,form:ye,value:he.hiddenInputValue,...Xe})]})}),a.jsx(Zn.Dropdown,{...st("dropdown"),onMouseDown:yt=>yt.preventDefault(),children:gt?a.jsx(ez,{value:he.hiddenInputValue,onChange:he.setTimeString,format:f,presets:gt,amPmLabels:O,withSeconds:A||!1}):a.jsxs("div",{...st("controlsListGroup"),children:[a.jsx(nx,{min:f==="12h"?1:0,max:f==="12h"?12:23,step:b,value:he.values.hours,onSelect:he.setHours,reversed:Ne}),a.jsx(nx,{min:0,max:59,step:x,value:he.values.minutes,onSelect:he.setMinutes,reversed:Ne}),A&&a.jsx(nx,{min:0,max:59,step:w,value:he.values.seconds,onSelect:he.setSeconds,reversed:Ne}),f==="12h"&&a.jsx(GH,{labels:O,value:he.values.amPm,onSelect:he.setAmPm})]})})]})})});PE.displayName="@mantine/dates/TimePicker";PE.classes=XH;var nz={day:"m_396ce5cb"};const dce=(t,{size:e})=>({day:{"--day-size":$t(e,"day-size")}}),IE=Oe((t,e)=>{const n=we("Day",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,date:h,disabled:f,__staticSelector:p,weekend:m,outside:v,selected:b,renderDay:x,inRange:w,firstInRange:A,lastInRange:j,hidden:C,static:_,highlightToday:S,attributes:O,...E}=n,D=lt({name:p||"Day",classes:nz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:O,vars:u,varsResolver:dce,rootSelector:"day"});return a.jsx(Rr,{...D("day",{style:C?{display:"none"}:void 0}),component:_?"div":"button",ref:e,disabled:f,"data-today":He(h).isSame(new Date,"day")||void 0,"data-hidden":C||void 0,"data-highlight-today":S||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!v&&m||void 0,"data-outside":!f&&v||void 0,"data-selected":!f&&b||void 0,"data-in-range":w&&!f||void 0,"data-first-in-range":A&&!f||void 0,"data-last-in-range":j&&!f||void 0,"data-static":_||void 0,unstyled:l,...E,children:(x==null?void 0:x(h))||He(h).date()})});IE.classes=nz;IE.displayName="@mantine/dates/Day";function fce({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=He().day(n),i=[];for(let s=0;s<7;s+=1)typeof e=="string"?i.push(He(r).add(s,"days").locale(t).format(e)):i.push(e(He(r).add(s,"days").format("YYYY-MM-DD")));return i}var rz={weekday:"m_18a3eca"};const pce=(t,{size:e})=>({weekdaysRow:{"--wr-fz":kr(e),"--wr-spacing":zi(e)}}),BE=Oe((t,e)=>{const n=we("WeekdaysRow",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,locale:h,firstDayOfWeek:f,weekdayFormat:p,cellComponent:m="th",__staticSelector:v,withWeekNumbers:b,attributes:x,...w}=n,A=lt({name:v||"WeekdaysRow",classes:rz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:x,vars:u,varsResolver:pce,rootSelector:"weekdaysRow"}),j=Jh(),C=fce({locale:j.getLocale(h),format:p,firstDayOfWeek:j.getFirstDayOfWeek(f)}).map((_,S)=>a.jsx(m,{...A("weekday"),children:_},S));return a.jsxs(ve,{component:"tr",ref:e,...A("weekdaysRow"),...w,children:[b&&a.jsx(m,{...A("weekday"),children:"#"}),C]})});BE.classes=rz;BE.displayName="@mantine/dates/WeekdaysRow";function mce(t,e=1){let n=He(t);if(!n.isValid())return n;const r=e===0?6:e-1;for(;n.day()!==r;)n=n.add(1,"day");return n.format("YYYY-MM-DD")}function gce(t,e=1){let n=He(t);for(;n.day()!==e;)n=n.subtract(1,"day");return n.format("YYYY-MM-DD")}function vce({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const r=He(t).subtract(He(t).date()-1,"day"),i=He(r.format("YYYY-M-D")),s=i.format("YYYY-MM-DD"),o=i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),l=mce(o,e),u=[];let h=He(gce(s,e));for(;He(h).isBefore(l,"day");){const f=[];for(let p=0;p<7;p+=1)f.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");u.push(f)}if(n&&u.length<6){const f=u[u.length-1],p=f[f.length-1];let m=He(p).add(1,"day");for(;u.length<6;){const v=[];for(let b=0;b<7;b+=1)v.push(m.format("YYYY-MM-DD")),m=m.add(1,"day");u.push(v)}}return u}function LE(t,e){return He(t).format("YYYY-MM")===He(e).format("YYYY-MM")}function iz(t,e){return e?He(t).isAfter(He(e).subtract(1,"day"),"day"):!0}function sz(t,e){return e?He(t).isBefore(He(e).add(1,"day"),"day"):!0}function bce({dates:t,minDate:e,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:s,month:o}){const l=t.flat().filter(f=>{var p;return sz(f,n)&&iz(f,e)&&!(i!=null&&i(f))&&!((p=r==null?void 0:r(f))!=null&&p.disabled)&&(!s||LE(f,o))}),u=l.find(f=>{var p;return(p=r==null?void 0:r(f))==null?void 0:p.selected});if(u)return u;const h=l.find(f=>He().isSame(f,"date"));return h||l[0]}var rx={exports:{}},yce=rx.exports,v5;function xce(){return v5||(v5=1,function(t,e){(function(n,r){t.exports=r()})(yce,function(){var n="day";return function(r,i,s){var o=function(h){return h.add(4-h.isoWeekday(),n)},l=i.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),n);var f,p,m,v,b=o(this),x=(f=this.isoWeekYear(),p=this.$u,m=(p?s.utc:s)().year(f).startOf("year"),v=4-m.isoWeekday(),m.isoWeekday()>4&&(v+=7),m.add(v,n));return b.diff(x,"week")+1},l.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var u=l.startOf;l.startOf=function(h,f){var p=this.$utils(),m=!!p.u(f)||f;return p.p(h)==="isoweek"?m?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(h,f)}}})}(rx)),rx.exports}var Ace=xce();const wce=ll(Ace);He.extend(wce);function Sce(t){const e=t.find(n=>He(n).day()===1);return He(e).isoWeek()}var az={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const jce={withCellSpacing:!0},Cce=(t,{size:e})=>({weekNumber:{"--wn-fz":kr(e),"--wn-size":$t(e,"wn-size")}}),Kw=Oe((t,e)=>{const n=we("Month",jce,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,__staticSelector:h,locale:f,firstDayOfWeek:p,weekdayFormat:m,month:v,weekendDays:b,getDayProps:x,excludeDate:w,minDate:A,maxDate:j,renderDay:C,hideOutsideDates:_,hideWeekdays:S,getDayAriaLabel:O,static:E,__getDayRef:D,__onDayKeyDown:N,__onDayClick:I,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:Q,withCellSpacing:z,size:H,highlightToday:P,withWeekNumbers:F,attributes:U,...Z}=n,G=lt({name:h||"Month",classes:az,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:U,vars:u,varsResolver:Cce,rootSelector:"month"}),W=Jh(),X=vce({month:v,firstDayOfWeek:W.getFirstDayOfWeek(p),consistentWeeks:W.consistentWeeks}),V=bce({dates:X,minDate:ks(A),maxDate:ks(j),getDayProps:x,excludeDate:w,hideOutsideDates:_,month:v}),{resolvedClassNames:te,resolvedStyles:le}=bo({classNames:r,styles:o,props:n}),be=X.map((ye,Xe)=>{const ze=ye.map((Re,ae)=>{const je=!LE(Re,v),pe=(O==null?void 0:O(Re))||He(Re).locale(f||W.locale).format("D MMMM YYYY"),ke=x==null?void 0:x(Re),gt=He(Re).isSame(V,"date");return a.jsx("td",{...G("monthCell"),"data-with-spacing":z||void 0,children:a.jsx(IE,{__staticSelector:h||"Month",classNames:te,styles:le,unstyled:l,"data-mantine-stop-propagation":Q||void 0,highlightToday:P,renderDay:C,date:Re,size:H,weekend:W.getWeekendDays(b).includes(He(Re).get("day")),outside:je,hidden:_?je:!1,"aria-label":pe,static:E,disabled:(w==null?void 0:w(Re))||!sz(Re,ks(j))||!iz(Re,ks(A)),ref:We=>{We&&(D==null||D(Xe,ae,We))},...ke,onKeyDown:We=>{var Le;(Le=ke==null?void 0:ke.onKeyDown)==null||Le.call(ke,We),N==null||N(We,{rowIndex:Xe,cellIndex:ae,date:Re})},onMouseEnter:We=>{var Le;(Le=ke==null?void 0:ke.onMouseEnter)==null||Le.call(ke,We),R==null||R(We,Re)},onClick:We=>{var Le;(Le=ke==null?void 0:ke.onClick)==null||Le.call(ke,We),I==null||I(We,Re)},onMouseDown:We=>{var Le;(Le=ke==null?void 0:ke.onMouseDown)==null||Le.call(ke,We),L&&We.preventDefault()},tabIndex:L||!gt?-1:0})},Re.toString())});return a.jsxs("tr",{...G("monthRow"),children:[F&&a.jsx("td",{...G("weekNumber"),children:Sce(ye)}),ze]},Xe)});return a.jsxs(ve,{component:"table",...G("month"),size:H,ref:e,...Z,children:[!S&&a.jsx("thead",{...G("monthThead"),children:a.jsx(BE,{__staticSelector:h||"Month",locale:f,firstDayOfWeek:p,weekdayFormat:m,size:H,classNames:te,styles:le,unstyled:l,withWeekNumbers:F})}),a.jsx("tbody",{...G("monthTbody"),children:be})]})});Kw.classes=az;Kw.displayName="@mantine/dates/Month";var oz={pickerControl:"m_dc6a3c71"};const _ce=(t,{size:e})=>({pickerControl:{"--dpc-fz":kr(e),"--dpc-size":$t(e,"dpc-size")}}),Zw=Oe((t,e)=>{const n=we("PickerControl",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,firstInRange:h,lastInRange:f,inRange:p,__staticSelector:m,selected:v,disabled:b,attributes:x,...w}=n,A=lt({name:m||"PickerControl",classes:oz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:x,vars:u,varsResolver:_ce,rootSelector:"pickerControl"});return a.jsx(Rr,{...A("pickerControl"),ref:e,unstyled:l,"data-picker-control":!0,"data-selected":v&&!b||void 0,"data-disabled":b||void 0,"data-in-range":p&&!b&&!v||void 0,"data-first-in-range":h&&!b||void 0,"data-last-in-range":f&&!b||void 0,disabled:b,...w})});Zw.classes=oz;Zw.displayName="@mantine/dates/PickerControl";function lz({year:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&He(t).isBefore(e,"year")||n&&He(t).isAfter(n,"year"))}function Tce({years:t,minDate:e,maxDate:n,getYearControlProps:r}){const i=t.flat().filter(l=>{var u;return!lz({year:l,minDate:e,maxDate:n})&&!((u=r==null?void 0:r(l))!=null&&u.disabled)}),s=i.find(l=>{var u;return(u=r==null?void 0:r(l))==null?void 0:u.selected});if(s)return s;const o=i.find(l=>He().isSame(l,"year"));return o||i[0]}function cz(t){const e=He(t).year(),n=e-e%10;let r=0;const i=[[],[],[],[]];for(let s=0;s<4;s+=1){const o=s===3?1:3;for(let l=0;l<o;l+=1)i[s].push(He(new Date(n+r,0)).format("YYYY-MM-DD")),r+=1}return i}var uz={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const kce={yearsListFormat:"YYYY",withCellSpacing:!0},Jw=Oe((t,e)=>{const n=we("YearsList",kce,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,decade:h,yearsListFormat:f,locale:p,minDate:m,maxDate:v,getYearControlProps:b,__staticSelector:x,__getControlRef:w,__onControlKeyDown:A,__onControlClick:j,__onControlMouseEnter:C,__preventFocus:_,__stopPropagation:S,withCellSpacing:O,size:E,attributes:D,...N}=n,I=lt({name:x||"YearsList",classes:uz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:D,vars:u,rootSelector:"yearsList"}),R=Jh(),L=cz(h),Q=Tce({years:L,minDate:m,maxDate:v,getYearControlProps:b}),z=L.map((H,P)=>{const F=H.map((U,Z)=>{const G=b==null?void 0:b(U),W=He(U).isSame(Q,"year");return a.jsx("td",{...I("yearsListCell"),"data-with-spacing":O||void 0,children:a.jsx(Zw,{...I("yearsListControl"),size:E,unstyled:l,"data-mantine-stop-propagation":S||void 0,disabled:lz({year:U,minDate:m,maxDate:v}),ref:X=>{X&&(w==null||w(P,Z,X))},...G,onKeyDown:X=>{var V;(V=G==null?void 0:G.onKeyDown)==null||V.call(G,X),A==null||A(X,{rowIndex:P,cellIndex:Z,date:U})},onClick:X=>{var V;(V=G==null?void 0:G.onClick)==null||V.call(G,X),j==null||j(X,U)},onMouseEnter:X=>{var V;(V=G==null?void 0:G.onMouseEnter)==null||V.call(G,X),C==null||C(X,U)},onMouseDown:X=>{var V;(V=G==null?void 0:G.onMouseDown)==null||V.call(G,X),_&&X.preventDefault()},tabIndex:_||!W?-1:0,children:(G==null?void 0:G.children)??He(U).locale(R.getLocale(p)).format(f)})},Z)});return a.jsx("tr",{...I("yearsListRow"),children:F},P)});return a.jsx(ve,{component:"table",ref:e,size:E,...I("yearsList"),...N,children:a.jsx("tbody",{children:z})})});Jw.classes=uz;Jw.displayName="@mantine/dates/YearsList";function hz({month:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&He(t).isBefore(e,"month")||n&&He(t).isAfter(n,"month"))}function Oce({months:t,minDate:e,maxDate:n,getMonthControlProps:r}){const i=t.flat().filter(l=>{var u;return!hz({month:l,minDate:e,maxDate:n})&&!((u=r==null?void 0:r(l))!=null&&u.disabled)}),s=i.find(l=>{var u;return(u=r==null?void 0:r(l))==null?void 0:u.selected});if(s)return s;const o=i.find(l=>He().isSame(l,"month"));return o||i[0]}function Ece(t){const e=He(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let i=0;i<4;i+=1)for(let s=0;s<3;s+=1)n[i].push(He(e).add(r,"months").format("YYYY-MM-DD")),r+=1;return n}var dz={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Mce={monthsListFormat:"MMM",withCellSpacing:!0},e2=Oe((t,e)=>{const n=we("MonthsList",Mce,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,__staticSelector:h,year:f,monthsListFormat:p,locale:m,minDate:v,maxDate:b,getMonthControlProps:x,__getControlRef:w,__onControlKeyDown:A,__onControlClick:j,__onControlMouseEnter:C,__preventFocus:_,__stopPropagation:S,withCellSpacing:O,size:E,attributes:D,...N}=n,I=lt({name:h||"MonthsList",classes:dz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:D,vars:u,rootSelector:"monthsList"}),R=Jh(),L=Ece(f),Q=Oce({months:L,minDate:ks(v),maxDate:ks(b),getMonthControlProps:x}),z=L.map((H,P)=>{const F=H.map((U,Z)=>{const G=x==null?void 0:x(U),W=He(U).isSame(Q,"month");return a.jsx("td",{...I("monthsListCell"),"data-with-spacing":O||void 0,children:a.jsx(Zw,{...I("monthsListControl"),size:E,unstyled:l,__staticSelector:h||"MonthsList","data-mantine-stop-propagation":S||void 0,disabled:hz({month:U,minDate:ks(v),maxDate:ks(b)}),ref:X=>{X&&(w==null||w(P,Z,X))},...G,onKeyDown:X=>{var V;(V=G==null?void 0:G.onKeyDown)==null||V.call(G,X),A==null||A(X,{rowIndex:P,cellIndex:Z,date:U})},onClick:X=>{var V;(V=G==null?void 0:G.onClick)==null||V.call(G,X),j==null||j(X,U)},onMouseEnter:X=>{var V;(V=G==null?void 0:G.onMouseEnter)==null||V.call(G,X),C==null||C(X,U)},onMouseDown:X=>{var V;(V=G==null?void 0:G.onMouseDown)==null||V.call(G,X),_&&X.preventDefault()},tabIndex:_||!W?-1:0,children:(G==null?void 0:G.children)??He(U).locale(R.getLocale(m)).format(p)})},Z)});return a.jsx("tr",{...I("monthsListRow"),children:F},P)});return a.jsx(ve,{component:"table",ref:e,size:E,...I("monthsList"),...N,children:a.jsx("tbody",{children:z})})});e2.classes=dz;e2.displayName="@mantine/dates/MonthsList";var fz={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Dce={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},Rce=(t,{size:e})=>({calendarHeader:{"--dch-control-size":$t(e,"dch-control-size"),"--dch-fz":kr(e)}}),ed=Oe((t,e)=>{const n=we("CalendarHeader",Dce,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,nextIcon:h,previousIcon:f,nextLabel:p,previousLabel:m,onNext:v,onPrevious:b,onLevelClick:x,label:w,nextDisabled:A,previousDisabled:j,hasNextLevel:C,levelControlAriaLabel:_,withNext:S,withPrevious:O,headerControlsOrder:E,__staticSelector:D,__preventFocus:N,__stopPropagation:I,attributes:R,...L}=n,Q=lt({name:D||"CalendarHeader",classes:fz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:R,vars:u,varsResolver:Rce,rootSelector:"calendarHeader"}),z=N?Z=>Z.preventDefault():void 0,H=O&&M.createElement(Rr,{...Q("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":m,onClick:b,unstyled:l,onMouseDown:z,disabled:j,"data-disabled":j||void 0,tabIndex:N||j?-1:0,"data-mantine-stop-propagation":I||void 0},f||a.jsx(Px,{...Q("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=M.createElement(Rr,{component:C?"button":"div",...Q("calendarHeaderLevel"),key:"level",onClick:C?x:void 0,unstyled:l,onMouseDown:C?z:void 0,disabled:!C,"data-static":!C||void 0,"aria-label":_,tabIndex:N||!C?-1:0,"data-mantine-stop-propagation":I||void 0},w),F=S&&M.createElement(Rr,{...Q("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":p,onClick:v,unstyled:l,onMouseDown:z,disabled:A,"data-disabled":A||void 0,tabIndex:N||A?-1:0,"data-mantine-stop-propagation":I||void 0},h||a.jsx(Px,{...Q("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),U=E.map(Z=>Z==="previous"?H:Z==="level"?P:Z==="next"?F:null);return a.jsx(ve,{...Q("calendarHeader"),ref:e,...L,children:U})});ed.classes=fz;ed.displayName="@mantine/dates/CalendarHeader";function Nce(t){const e=cz(t);return[e[0][0],e[3][0]]}const Pce={decadeLabelFormat:"YYYY"},t2=Oe((t,e)=>{const n=we("DecadeLevel",Pce,t),{decade:r,locale:i,minDate:s,maxDate:o,yearsListFormat:l,getYearControlProps:u,__getControlRef:h,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:m,withCellSpacing:v,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:A,previousLabel:j,onNext:C,onPrevious:_,nextDisabled:S,previousDisabled:O,levelControlAriaLabel:E,withNext:D,withPrevious:N,headerControlsOrder:I,decadeLabelFormat:R,classNames:L,styles:Q,unstyled:z,__staticSelector:H,__stopPropagation:P,size:F,attributes:U,...Z}=n,G=Jh(),[W,X]=Nce(r),V={__staticSelector:H||"DecadeLevel",classNames:L,styles:Q,unstyled:z,size:F,attributes:U},te=typeof S=="boolean"?S:o?!He(X).endOf("year").isBefore(o):!1,le=typeof O=="boolean"?O:s?!He(W).startOf("year").isAfter(s):!1,be=(ye,Xe)=>He(ye).locale(i||G.locale).format(Xe);return a.jsxs(ve,{"data-decade-level":!0,size:F,ref:e,...Z,children:[a.jsx(ed,{label:typeof R=="function"?R(W,X):`${be(W,R)} – ${be(X,R)}`,__preventFocus:b,__stopPropagation:P,nextIcon:x,previousIcon:w,nextLabel:A,previousLabel:j,onNext:C,onPrevious:_,nextDisabled:te,previousDisabled:le,hasNextLevel:!1,levelControlAriaLabel:E,withNext:D,withPrevious:N,headerControlsOrder:I,...V}),a.jsx(Jw,{decade:r,locale:i,minDate:s,maxDate:o,yearsListFormat:l,getYearControlProps:u,__getControlRef:h,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:m,__preventFocus:b,__stopPropagation:P,withCellSpacing:v,...V})]})});t2.classes={...Jw.classes,...ed.classes};t2.displayName="@mantine/dates/DecadeLevel";const Ice={yearLabelFormat:"YYYY"},n2=Oe((t,e)=>{const n=we("YearLevel",Ice,t),{year:r,locale:i,minDate:s,maxDate:o,monthsListFormat:l,getMonthControlProps:u,__getControlRef:h,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:m,withCellSpacing:v,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:A,previousLabel:j,onNext:C,onPrevious:_,onLevelClick:S,nextDisabled:O,previousDisabled:E,hasNextLevel:D,levelControlAriaLabel:N,withNext:I,withPrevious:R,headerControlsOrder:L,yearLabelFormat:Q,__staticSelector:z,__stopPropagation:H,size:P,classNames:F,styles:U,unstyled:Z,attributes:G,...W}=n,X=Jh(),V={__staticSelector:z||"YearLevel",classNames:F,styles:U,unstyled:Z,size:P,attributes:G},te=typeof O=="boolean"?O:o?!He(r).endOf("year").isBefore(o):!1,le=typeof E=="boolean"?E:s?!He(r).startOf("year").isAfter(s):!1;return a.jsxs(ve,{"data-year-level":!0,size:P,ref:e,...W,children:[a.jsx(ed,{label:typeof Q=="function"?Q(r):He(r).locale(i||X.locale).format(Q),__preventFocus:b,__stopPropagation:H,nextIcon:x,previousIcon:w,nextLabel:A,previousLabel:j,onNext:C,onPrevious:_,onLevelClick:S,nextDisabled:te,previousDisabled:le,hasNextLevel:D,levelControlAriaLabel:N,withNext:I,withPrevious:R,headerControlsOrder:L,...V}),a.jsx(e2,{year:r,locale:i,minDate:s,maxDate:o,monthsListFormat:l,getMonthControlProps:u,__getControlRef:h,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:m,__preventFocus:b,__stopPropagation:H,withCellSpacing:v,...V})]})});n2.classes={...ed.classes,...e2.classes};n2.displayName="@mantine/dates/YearLevel";const Bce={monthLabelFormat:"MMMM YYYY"},r2=Oe((t,e)=>{const n=we("MonthLevel",Bce,t),{month:r,locale:i,firstDayOfWeek:s,weekdayFormat:o,weekendDays:l,getDayProps:u,excludeDate:h,minDate:f,maxDate:p,renderDay:m,hideOutsideDates:v,hideWeekdays:b,getDayAriaLabel:x,__getDayRef:w,__onDayKeyDown:A,__onDayClick:j,__onDayMouseEnter:C,withCellSpacing:_,highlightToday:S,withWeekNumbers:O,__preventFocus:E,__stopPropagation:D,nextIcon:N,previousIcon:I,nextLabel:R,previousLabel:L,onNext:Q,onPrevious:z,onLevelClick:H,nextDisabled:P,previousDisabled:F,hasNextLevel:U,levelControlAriaLabel:Z,withNext:G,withPrevious:W,headerControlsOrder:X,monthLabelFormat:V,classNames:te,styles:le,unstyled:be,__staticSelector:ye,size:Xe,static:ze,attributes:Re,...ae}=n,je=Jh(),pe={__staticSelector:ye||"MonthLevel",classNames:te,styles:le,unstyled:be,size:Xe,attributes:Re},ke=typeof P=="boolean"?P:p?!He(r).endOf("month").isBefore(p):!1,gt=typeof F=="boolean"?F:f?!He(r).startOf("month").isAfter(f):!1;return a.jsxs(ve,{"data-month-level":!0,size:Xe,ref:e,...ae,children:[a.jsx(ed,{label:typeof V=="function"?V(r):He(r).locale(i||je.locale).format(V),__preventFocus:E,__stopPropagation:D,nextIcon:N,previousIcon:I,nextLabel:R,previousLabel:L,onNext:Q,onPrevious:z,onLevelClick:H,nextDisabled:ke,previousDisabled:gt,hasNextLevel:U,levelControlAriaLabel:Z,withNext:G,withPrevious:W,headerControlsOrder:X,...pe}),a.jsx(Kw,{month:r,locale:i,firstDayOfWeek:s,weekdayFormat:o,weekendDays:l,getDayProps:u,excludeDate:h,minDate:f,maxDate:p,renderDay:m,hideOutsideDates:v,hideWeekdays:b,getDayAriaLabel:x,__getDayRef:w,__onDayKeyDown:A,__onDayClick:j,__onDayMouseEnter:C,__preventFocus:E,__stopPropagation:D,static:ze,withCellSpacing:_,highlightToday:S,withWeekNumbers:O,...pe})]})});r2.classes={...Kw.classes,...ed.classes};r2.displayName="@mantine/dates/MonthLevel";var pz={levelsGroup:"m_30b26e33"};const td=Oe((t,e)=>{const n=we("LevelsGroup",null,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,__staticSelector:h,attributes:f,...p}=n,m=lt({name:h||"LevelsGroup",classes:pz,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:f,vars:u,rootSelector:"levelsGroup"});return a.jsx(ve,{ref:e,...m("levelsGroup"),...p})});td.classes=pz;td.displayName="@mantine/dates/LevelsGroup";const Lce={numberOfColumns:1},i2=Oe((t,e)=>{const n=we("DecadeLevelGroup",Lce,t),{decade:r,locale:i,minDate:s,maxDate:o,yearsListFormat:l,getYearControlProps:u,__onControlClick:h,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:m,nextIcon:v,previousIcon:b,nextLabel:x,previousLabel:w,onNext:A,onPrevious:j,nextDisabled:C,previousDisabled:_,headerControlsOrder:S,classNames:O,styles:E,unstyled:D,__staticSelector:N,__stopPropagation:I,numberOfColumns:R,levelControlAriaLabel:L,decadeLabelFormat:Q,size:z,vars:H,attributes:P,...F}=n,U=M.useRef([]),Z=Array(R).fill(0).map((G,W)=>{const X=He(r).add(W*10,"years").format("YYYY-MM-DD");return a.jsx(t2,{size:z,yearsListFormat:l,decade:X,withNext:W===R-1,withPrevious:W===0,decadeLabelFormat:Q,__onControlClick:h,__onControlMouseEnter:f,__onControlKeyDown:(V,te)=>DE({levelIndex:W,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:V,controlsRef:U}),__getControlRef:(V,te,le)=>{Array.isArray(U.current[W])||(U.current[W]=[]),Array.isArray(U.current[W][V])||(U.current[W][V]=[]),U.current[W][V][te]=le},levelControlAriaLabel:typeof L=="function"?L(X):L,locale:i,minDate:s,maxDate:o,__preventFocus:m,__stopPropagation:I,nextIcon:v,previousIcon:b,nextLabel:x,previousLabel:w,onNext:A,onPrevious:j,nextDisabled:C,previousDisabled:_,getYearControlProps:u,__staticSelector:N||"DecadeLevelGroup",classNames:O,styles:E,unstyled:D,withCellSpacing:p,headerControlsOrder:S,attributes:P},W)});return a.jsx(td,{classNames:O,styles:E,__staticSelector:N||"DecadeLevelGroup",ref:e,size:z,unstyled:D,attributes:P,...F,children:Z})});i2.classes={...td.classes,...t2.classes};i2.displayName="@mantine/dates/DecadeLevelGroup";const Fce={numberOfColumns:1},s2=Oe((t,e)=>{const n=we("YearLevelGroup",Fce,t),{year:r,locale:i,minDate:s,maxDate:o,monthsListFormat:l,getMonthControlProps:u,__onControlClick:h,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:m,nextIcon:v,previousIcon:b,nextLabel:x,previousLabel:w,onNext:A,onPrevious:j,onLevelClick:C,nextDisabled:_,previousDisabled:S,hasNextLevel:O,headerControlsOrder:E,classNames:D,styles:N,unstyled:I,__staticSelector:R,__stopPropagation:L,numberOfColumns:Q,levelControlAriaLabel:z,yearLabelFormat:H,size:P,vars:F,attributes:U,...Z}=n,G=M.useRef([]),W=Array(Q).fill(0).map((X,V)=>{const te=He(r).add(V,"years").format("YYYY-MM-DD");return a.jsx(n2,{size:P,monthsListFormat:l,year:te,withNext:V===Q-1,withPrevious:V===0,yearLabelFormat:H,__stopPropagation:L,__onControlClick:h,__onControlMouseEnter:f,__onControlKeyDown:(le,be)=>DE({levelIndex:V,rowIndex:be.rowIndex,cellIndex:be.cellIndex,event:le,controlsRef:G}),__getControlRef:(le,be,ye)=>{Array.isArray(G.current[V])||(G.current[V]=[]),Array.isArray(G.current[V][le])||(G.current[V][le]=[]),G.current[V][le][be]=ye},levelControlAriaLabel:typeof z=="function"?z(te):z,locale:i,minDate:s,maxDate:o,__preventFocus:m,nextIcon:v,previousIcon:b,nextLabel:x,previousLabel:w,onNext:A,onPrevious:j,onLevelClick:C,nextDisabled:_,previousDisabled:S,hasNextLevel:O,getMonthControlProps:u,classNames:D,styles:N,unstyled:I,__staticSelector:R||"YearLevelGroup",withCellSpacing:p,headerControlsOrder:E,attributes:U},V)});return a.jsx(td,{classNames:D,styles:N,__staticSelector:R||"YearLevelGroup",ref:e,size:P,unstyled:I,attributes:U,...Z,children:W})});s2.classes={...n2.classes,...td.classes};s2.displayName="@mantine/dates/YearLevelGroup";const Hce={numberOfColumns:1},a2=Oe((t,e)=>{const n=we("MonthLevelGroup",Hce,t),{month:r,locale:i,firstDayOfWeek:s,weekdayFormat:o,weekendDays:l,getDayProps:u,excludeDate:h,minDate:f,maxDate:p,renderDay:m,hideOutsideDates:v,hideWeekdays:b,getDayAriaLabel:x,__onDayClick:w,__onDayMouseEnter:A,withCellSpacing:j,highlightToday:C,withWeekNumbers:_,__preventFocus:S,nextIcon:O,previousIcon:E,nextLabel:D,previousLabel:N,onNext:I,onPrevious:R,onLevelClick:L,nextDisabled:Q,previousDisabled:z,hasNextLevel:H,headerControlsOrder:P,classNames:F,styles:U,unstyled:Z,numberOfColumns:G,levelControlAriaLabel:W,monthLabelFormat:X,__staticSelector:V,__stopPropagation:te,size:le,static:be,vars:ye,attributes:Xe,...ze}=n,Re=M.useRef([]),ae=Array(G).fill(0).map((je,pe)=>{const ke=He(r).add(pe,"months").format("YYYY-MM-DD");return a.jsx(r2,{month:ke,withNext:pe===G-1,withPrevious:pe===0,monthLabelFormat:X,__stopPropagation:te,__onDayClick:w,__onDayMouseEnter:A,__onDayKeyDown:(gt,We)=>DE({levelIndex:pe,rowIndex:We.rowIndex,cellIndex:We.cellIndex,event:gt,controlsRef:Re}),__getDayRef:(gt,We,Le)=>{Array.isArray(Re.current[pe])||(Re.current[pe]=[]),Array.isArray(Re.current[pe][gt])||(Re.current[pe][gt]=[]),Re.current[pe][gt][We]=Le},levelControlAriaLabel:typeof W=="function"?W(ke):W,locale:i,firstDayOfWeek:s,weekdayFormat:o,weekendDays:l,getDayProps:u,excludeDate:h,minDate:f,maxDate:p,renderDay:m,hideOutsideDates:v,hideWeekdays:b,getDayAriaLabel:x,__preventFocus:S,nextIcon:O,previousIcon:E,nextLabel:D,previousLabel:N,onNext:I,onPrevious:R,onLevelClick:L,nextDisabled:Q,previousDisabled:z,hasNextLevel:H,classNames:F,styles:U,unstyled:Z,__staticSelector:V||"MonthLevelGroup",size:le,static:be,withCellSpacing:j,highlightToday:C,withWeekNumbers:_,headerControlsOrder:P,attributes:Xe},pe)});return a.jsx(td,{classNames:F,styles:U,__staticSelector:V||"MonthLevelGroup",ref:e,size:le,attributes:Xe,...ze,children:ae})});a2.classes={...td.classes,...r2.classes};a2.displayName="@mantine/dates/MonthLevelGroup";var mz={input:"m_6fa5e2aa"};const o2=Oe((t,e)=>{const{inputProps:n,wrapperProps:r,placeholder:i,classNames:s,styles:o,unstyled:l,popoverProps:u,modalProps:h,dropdownType:f,children:p,formattedValue:m,dropdownHandlers:v,dropdownOpened:b,onClick:x,clearable:w,onClear:A,clearButtonProps:j,rightSection:C,shouldClear:_,readOnly:S,disabled:O,value:E,name:D,form:N,type:I,onDropdownClose:R,withTime:L,...Q}=m7("PickerInputBase",{size:"sm"},t),z=a.jsx(Mr.ClearButton,{onClick:A,unstyled:l,...j}),H=()=>{I==="range"&&Array.isArray(E)&&E[0]&&!E[1]&&A(),v.close()};return a.jsxs(a.Fragment,{children:[f==="modal"&&!S&&a.jsx(Ha,{opened:b,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:l,...h,children:p}),a.jsx(Mr.Wrapper,{...r,children:a.jsxs(Zn,{position:"bottom-start",opened:b,trapFocus:!0,returnFocus:!1,unstyled:l,onClose:R,...u,disabled:(u==null?void 0:u.disabled)||f==="modal"||S,onChange:P=>{var F;P||((F=u==null?void 0:u.onClose)==null||F.call(u),H())},children:[a.jsx(Zn.Target,{children:a.jsx(Mr,{"data-dates-input":!0,"data-read-only":S||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:P=>{x==null||x(P),v.toggle()},__clearSection:z,__clearable:w&&_&&!S&&!O,rightSection:C,...n,ref:e,classNames:{...s,input:Ir(mz.input,s==null?void 0:s.input)},...Q,children:m||a.jsx(Mr.Placeholder,{error:n.error,unstyled:l,classNames:s,styles:o,__staticSelector:n.__staticSelector,children:i})})}),a.jsx(Zn.Dropdown,{"data-dates-dropdown":!0,children:p})]})}),a.jsx(VH,{value:E,name:D,form:N,type:I,withTime:L})]})});o2.classes=mz;o2.displayName="@mantine/dates/PickerInputBase";const b5=t=>t==="range"?[null,null]:t==="multiple"?[]:null,y5=(t,e)=>{const n=e?Op:ks;return Array.isArray(t)?t.map(n):n(t)};function FE({type:t,value:e,defaultValue:n,onChange:r,withTime:i=!1}){const s=M.useRef(t),[o,l,u]=Ui({value:y5(e,i),defaultValue:y5(n,i),finalValue:b5(t),onChange:r});let h=o;return s.current!==t&&(s.current=t,e===void 0&&(h=n!==void 0?n:b5(t),l(h))),[h,l,u]}function EC(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function zce(t){return t===0?"month":t===1?"year":"decade"}function ig(t,e,n){return zce(Ch(EC(t,0),EC(e,0),EC(n,2)))}const qce={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},l2=Oe((t,e)=>{const n=we("Calendar",qce,t),{vars:r,maxLevel:i,minLevel:s,defaultLevel:o,level:l,onLevelChange:u,date:h,defaultDate:f,onDateChange:p,numberOfColumns:m,columnsToScroll:v,ariaLabels:b,nextLabel:x,previousLabel:w,onYearSelect:A,onMonthSelect:j,onYearMouseEnter:C,onMonthMouseEnter:_,headerControlsOrder:S,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:E,__setDateRef:D,__setLevelRef:N,firstDayOfWeek:I,weekdayFormat:R,weekendDays:L,getDayProps:Q,excludeDate:z,renderDay:H,hideOutsideDates:P,hideWeekdays:F,getDayAriaLabel:U,monthLabelFormat:Z,nextIcon:G,previousIcon:W,__onDayClick:X,__onDayMouseEnter:V,withCellSpacing:te,highlightToday:le,withWeekNumbers:be,monthsListFormat:ye,getMonthControlProps:Xe,yearLabelFormat:ze,yearsListFormat:Re,getYearControlProps:ae,decadeLabelFormat:je,classNames:pe,styles:ke,unstyled:gt,minDate:We,maxDate:Le,locale:Fe,__staticSelector:Ne,size:Ve,__preventFocus:qt,__stopPropagation:et,onNextDecade:Je,onPreviousDecade:Ue,onNextYear:Pe,onPreviousYear:st,onNextMonth:he,onPreviousMonth:dt,static:sn,enableKeyboardNavigation:Kt,attributes:un,...Zt}=n,{resolvedClassNames:Pt,resolvedStyles:Mt}=bo({classNames:pe,styles:ke,props:n}),[Et,Ut]=Ui({value:l?ig(l,s,i):void 0,defaultValue:o?ig(o,s,i):void 0,finalValue:ig(void 0,s,i),onChange:u}),[ei,yt]=FE({type:"default",value:ks(h),defaultValue:ks(f),onChange:p});M.useImperativeHandle(D,()=>Ke=>{yt(Ke)}),M.useImperativeHandle(N,()=>Ke=>{Ut(Ke)});const Tt={__staticSelector:Ne||"Calendar",styles:Mt,classNames:Pt,unstyled:gt,size:Ve,attributes:un},qn=v||m||1,Ht=new Date,dr=We&&He(Ht).isAfter(We)?We:He(Ht).format("YYYY-MM-DD"),Mn=ei||dr,se=()=>{const Ke=He(Mn).add(qn,"month").format("YYYY-MM-DD");he==null||he(Ke),yt(Ke)},Te=()=>{const Ke=He(Mn).subtract(qn,"month").format("YYYY-MM-DD");dt==null||dt(Ke),yt(Ke)},tt=()=>{const Ke=He(Mn).add(qn,"year").format("YYYY-MM-DD");Pe==null||Pe(Ke),yt(Ke)},Dt=()=>{const Ke=He(Mn).subtract(qn,"year").format("YYYY-MM-DD");st==null||st(Ke),yt(Ke)},Dn=()=>{const Ke=He(Mn).add(10*qn,"year").format("YYYY-MM-DD");Je==null||Je(Ke),yt(Ke)},an=()=>{const Ke=He(Mn).subtract(10*qn,"year").format("YYYY-MM-DD");Ue==null||Ue(Ke),yt(Ke)},nt=M.useRef(null);M.useEffect(()=>{if(!Kt||sn)return;const Ke=Wt=>{var hs;if(!((hs=nt.current)!=null&&hs.contains(document.activeElement)))return;const Jt=Wt.ctrlKey||Wt.metaKey,Ai=Wt.shiftKey;switch(Wt.key){case"ArrowUp":Jt&&Ai?(Wt.preventDefault(),an()):Jt&&(Wt.preventDefault(),Dt());break;case"ArrowDown":Jt&&Ai?(Wt.preventDefault(),Dn()):Jt&&(Wt.preventDefault(),tt());break;case"y":case"Y":Et==="month"&&(Wt.preventDefault(),Ut("year"));break}};return document.addEventListener("keydown",Ke),()=>{document.removeEventListener("keydown",Ke)}},[Kt,sn,Et,tt,Dt,Dn,an]);const rt=Ke=>{nt.current=Ke,typeof e=="function"?e(Ke):e&&(e.current=Ke)};return a.jsxs(ve,{ref:rt,size:Ve,"data-calendar":!0,...Zt,children:[Et==="month"&&a.jsx(a2,{month:Mn,minDate:We,maxDate:Le,firstDayOfWeek:I,weekdayFormat:R,weekendDays:L,getDayProps:Q,excludeDate:z,renderDay:H,hideOutsideDates:P,hideWeekdays:F,getDayAriaLabel:U,onNext:se,onPrevious:Te,hasNextLevel:i!=="month",onLevelClick:()=>Ut("year"),numberOfColumns:m,locale:Fe,levelControlAriaLabel:b==null?void 0:b.monthLevelControl,nextLabel:(b==null?void 0:b.nextMonth)??x,nextIcon:G,previousLabel:(b==null?void 0:b.previousMonth)??w,previousIcon:W,monthLabelFormat:Z,__onDayClick:X,__onDayMouseEnter:V,__preventFocus:qt,__stopPropagation:et,static:sn,withCellSpacing:te,highlightToday:le,withWeekNumbers:be,headerControlsOrder:S,...Tt}),Et==="year"&&a.jsx(s2,{year:Mn,numberOfColumns:m,minDate:We,maxDate:Le,monthsListFormat:ye,getMonthControlProps:Xe,locale:Fe,onNext:tt,onPrevious:Dt,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Ut("decade"),levelControlAriaLabel:b==null?void 0:b.yearLevelControl,nextLabel:(b==null?void 0:b.nextYear)??x,nextIcon:G,previousLabel:(b==null?void 0:b.previousYear)??w,previousIcon:W,yearLabelFormat:ze,__onControlMouseEnter:_,__onControlClick:(Ke,Wt)=>{E&&yt(Wt),Ut(ig("month",s,i)),j==null||j(Wt)},__preventFocus:qt,__stopPropagation:et,withCellSpacing:te,headerControlsOrder:S,...Tt}),Et==="decade"&&a.jsx(i2,{decade:Mn,minDate:We,maxDate:Le,yearsListFormat:Re,getYearControlProps:ae,locale:Fe,onNext:Dn,onPrevious:an,numberOfColumns:m,nextLabel:(b==null?void 0:b.nextDecade)??x,nextIcon:G,previousLabel:(b==null?void 0:b.previousDecade)??w,previousIcon:W,decadeLabelFormat:je,__onControlMouseEnter:C,__onControlClick:(Ke,Wt)=>{O&&yt(Wt),Ut(ig("year",s,i)),A==null||A(Wt)},__preventFocus:qt,__stopPropagation:et,withCellSpacing:te,headerControlsOrder:S,...Tt})]})});l2.classes={...i2.classes,...s2.classes,...a2.classes};l2.displayName="@mantine/dates/Calendar";function gz(t){const{maxLevel:e,minLevel:n,defaultLevel:r,level:i,onLevelChange:s,nextIcon:o,previousIcon:l,date:u,defaultDate:h,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:b,previousLabel:x,onYearSelect:w,onMonthSelect:A,onYearMouseEnter:j,onMonthMouseEnter:C,onNextMonth:_,onPreviousMonth:S,onNextYear:O,onPreviousYear:E,onNextDecade:D,onPreviousDecade:N,withCellSpacing:I,highlightToday:R,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:Q,__setDateRef:z,__setLevelRef:H,withWeekNumbers:P,headerControlsOrder:F,firstDayOfWeek:U,weekdayFormat:Z,weekendDays:G,getDayProps:W,excludeDate:X,renderDay:V,hideOutsideDates:te,hideWeekdays:le,getDayAriaLabel:be,monthLabelFormat:ye,monthsListFormat:Xe,getMonthControlProps:ze,yearLabelFormat:Re,yearsListFormat:ae,getYearControlProps:je,decadeLabelFormat:pe,allowSingleDateInRange:ke,allowDeselect:gt,minDate:We,maxDate:Le,locale:Fe,...Ne}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:r,level:i,onLevelChange:s,nextIcon:o,previousIcon:l,date:u,defaultDate:h,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:b,previousLabel:x,onYearSelect:w,onMonthSelect:A,onYearMouseEnter:j,onMonthMouseEnter:C,onNextMonth:_,onPreviousMonth:S,onNextYear:O,onPreviousYear:E,onNextDecade:D,onPreviousDecade:N,withCellSpacing:I,highlightToday:R,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:Q,__setDateRef:z,withWeekNumbers:P,headerControlsOrder:F,firstDayOfWeek:U,weekdayFormat:Z,weekendDays:G,getDayProps:W,excludeDate:X,renderDay:V,hideOutsideDates:te,hideWeekdays:le,getDayAriaLabel:be,monthLabelFormat:ye,monthsListFormat:Xe,getMonthControlProps:ze,yearLabelFormat:Re,yearsListFormat:ae,getYearControlProps:je,decadeLabelFormat:pe,allowSingleDateInRange:ke,allowDeselect:gt,minDate:We,maxDate:Le,locale:Fe},others:Ne}}function x5(t,e){const n=[...e].sort((r,i)=>He(r).isAfter(He(i))?1:-1);return He(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&He(n[1]).endOf("day").add(1,"ms").isAfter(t)}function $ce({type:t,level:e,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:s,allowDeselect:o,onMouseLeave:l}){const[u,h]=FE({type:t,value:n,defaultValue:r,onChange:i}),[f,p]=M.useState(t==="range"&&u[0]&&!u[1]?u[0]:null),[m,v]=M.useState(null),b=S=>{if(t==="range"){if(f&&!u[1]){if(He(S).isSame(f,e)&&!s){p(null),v(null),h([null,null]);return}const O=[S,f];O.sort((E,D)=>He(E).isAfter(He(D))?1:-1),h(O),v(null),p(null);return}if(u[0]&&!u[1]&&He(S).isSame(u[0],e)&&!s){p(null),v(null),h([null,null]);return}h([S,null]),v(null),p(S);return}if(t==="multiple"){u.some(O=>He(O).isSame(S,e))?h(u.filter(O=>!He(O).isSame(S,e))):h([...u,S]);return}u&&o&&He(S).isSame(u,e)?h(null):h(S)},x=S=>f&&m?x5(S,[m,f]):u[0]&&u[1]?x5(S,u):!1,w=t==="range"?S=>{l==null||l(S),v(null)}:l,A=S=>u[0]&&He(S).isSame(u[0],e)?!(m&&He(m).isBefore(u[0])):!1,j=S=>u[1]?He(S).isSame(u[1],e):!u[0]||!m?!1:He(m).isBefore(u[0])&&He(S).isSame(u[0],e),C=S=>{if(t==="range")return{selected:u.some(E=>E&&He(E).isSame(S,e)),inRange:x(S),firstInRange:A(S),lastInRange:j(S),"data-autofocus":!!u[0]&&He(u[0]).isSame(S,e)||void 0};if(t==="multiple")return{selected:u.some(E=>E&&He(E).isSame(S,e)),"data-autofocus":!!u[0]&&He(u[0]).isSame(S,e)||void 0};const O=He(u).isSame(S,e);return{selected:O,"data-autofocus":O||void 0}},_=t==="range"&&f?v:()=>{};return M.useEffect(()=>{if(t==="range")if(u[0]&&!u[1])p(u[0]);else{const S=u[0]==null&&u[1]==null,O=u[0]!=null&&u[1]!=null;(S||O)&&(p(null),v(null))}},[u]),{onDateChange:b,onRootMouseLeave:w,onHoveredDateChange:_,getControlProps:C,_value:u,setValue:h}}var Qce={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const Uce=(t,{size:e})=>({datePickerRoot:{"--preset-font-size":kr(e)}}),Wce={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},c2=Oe((t,e)=>{const n=we("DatePicker",Wce,t),{allowDeselect:r,allowSingleDateInRange:i,value:s,defaultValue:o,onChange:l,onMouseLeave:u,classNames:h,styles:f,__staticSelector:p,__onDayClick:m,__onDayMouseEnter:v,__onPresetSelect:b,__stopPropagation:x,presets:w,className:A,style:j,unstyled:C,size:_,vars:S,attributes:O,...E}=n,{calendarProps:D,others:N}=gz(E),I=M.useRef(null),R=M.useRef(null),L=lt({name:p||"DatePicker",classes:Qce,props:n,className:A,style:j,classNames:h,styles:f,unstyled:C,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:Uce,vars:S}),{onDateChange:Q,onRootMouseLeave:z,onHoveredDateChange:H,getControlProps:P,_value:F,setValue:U}=$ce({type:N.type,level:"day",allowDeselect:r,allowSingleDateInRange:i,value:s,defaultValue:o,onChange:l,onMouseLeave:u}),{resolvedClassNames:Z,resolvedStyles:G}=bo({classNames:h,styles:f,props:n}),W=a.jsx(l2,{ref:e,classNames:Z,styles:G,__staticSelector:p||"DatePicker",onMouseLeave:z,size:_,...D,...w?{}:N,__stopPropagation:x,__setDateRef:I,__setLevelRef:R,minLevel:D.minLevel||"month",__onDayMouseEnter:(te,le)=>{H(le),v==null||v(te,le)},__onDayClick:(te,le)=>{Q(le),m==null||m(te,le)},getDayProps:te=>{var le;return{...P(te),...(le=D.getDayProps)==null?void 0:le.call(D,te)}},getMonthControlProps:te=>{var le;return{selected:typeof F=="string"?LE(te,F):!1,...(le=D.getMonthControlProps)==null?void 0:le.call(D,te)}},getYearControlProps:te=>{var le;return{selected:typeof F=="string"?He(te).isSame(F,"year"):!1,...(le=D.getYearControlProps)==null?void 0:le.call(D,te)}},hideOutsideDates:D.hideOutsideDates??D.numberOfColumns!==1,...w?{}:{className:A,style:j,attributes:O}});if(!w)return W;const X=te=>{var be,ye;const le=Array.isArray(te)?te[0]:te;le!==void 0&&((be=I.current)==null||be.call(I,le),(ye=R.current)==null||ye.call(R,"month"),b?b(le):U(te))},V=w.map((te,le)=>a.jsx(Rr,{...L("presetButton"),onClick:()=>X(te.value),onMouseDown:be=>be.preventDefault(),"data-mantine-stop-propagation":x||void 0,children:te.label},le));return a.jsxs(ve,{...L("datePickerRoot"),size:_,...N,children:[a.jsx("div",{...L("presetsList"),children:V}),W]})});c2.classes=l2.classes;c2.displayName="@mantine/dates/DatePicker";var vz={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};function Vce({minDate:t,value:e}){const n=t?He(t).format("HH:mm:ss"):null;return e&&t&&e===t?n??void 0:void 0}function Yce({maxDate:t,value:e}){const n=t?He(t).format("HH:mm:ss"):null;return e&&t&&e===t?n??void 0:void 0}const Gce={dropdownType:"popover",size:"sm"},HE=Oe((t,e)=>{const n=we("DateTimePicker",Gce,t),{value:r,defaultValue:i,onChange:s,valueFormat:o,locale:l,classNames:u,styles:h,unstyled:f,timePickerProps:p,submitButtonProps:m,withSeconds:v,level:b,defaultLevel:x,size:w,variant:A,dropdownType:j,vars:C,minDate:_,maxDate:S,defaultDate:O,defaultTimeValue:E,presets:D,attributes:N,onDropdownClose:I,...R}=n,L=lt({name:"DateTimePicker",classes:vz,props:n,classNames:u,styles:h,unstyled:f,attributes:N,vars:C}),{resolvedClassNames:Q,resolvedStyles:z}=bo({classNames:u,styles:h,props:n}),H=o||(v?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),P=M.useRef(null),F=cr(P,p==null?void 0:p.hoursRef),{calendarProps:{allowSingleDateInRange:U,...Z},others:G}=gz(R),W=Jh(),[X,V]=FE({type:"default",value:r,defaultValue:i,onChange:s,withTime:!0}),te=O||X,le=Fe=>Fe?He(Fe).format(v?"HH:mm:ss":"HH:mm"):"",[be,ye]=M.useState(E||le(X)),[Xe,ze]=M.useState(b||x||"month"),[Re,ae]=Wv(!1),je=X?He(X).locale(W.getLocale(l)).format(H):"",pe=Fe=>{var Ne;(Ne=p==null?void 0:p.onChange)==null||Ne.call(p,Fe),ye(Fe),Fe&&V(g5(X,Fe))},ke=Fe=>{var Ne;Fe&&V(g5(kC(_,S,Fe),be||E||"")),(Ne=P.current)==null||Ne.focus()},gt=Fe=>{Fe.key==="Enter"&&(Fe.preventDefault(),ae.close())};Gl(()=>{Re||ye(le(X))},[X,Re]),Gl(()=>{Re&&ze("month")},[Re]);const We=j==="popover",Le=()=>{const Fe=kC(_,S,X);X&&X!==Fe&&V(kC(_,S,X)),I==null||I()};return a.jsxs(o2,{formattedValue:je,dropdownOpened:R.disabled?!1:Re,dropdownHandlers:ae,classNames:Q,styles:z,unstyled:f,ref:e,onClear:()=>V(null),shouldClear:!!X,value:X,size:w,variant:A,dropdownType:j,...G,type:"default",__staticSelector:"DateTimePicker",onDropdownClose:Le,withTime:!0,attributes:N,children:[a.jsx(c2,{...Z,maxDate:S,minDate:_,size:w,variant:A,type:"default",value:X,defaultDate:te||Xle({maxDate:S,minDate:_}),onChange:ke,locale:l,classNames:Q,styles:z,unstyled:f,__staticSelector:"DateTimePicker",__stopPropagation:We,level:b,defaultLevel:x,onLevelChange:Fe=>{var Ne;ze(Fe),(Ne=Z.onLevelChange)==null||Ne.call(Z,Fe)},presets:D,__onPresetSelect:Fe=>{V(Fe),Fe&&ye(le(Fe))},attributes:N}),Xe==="month"&&a.jsxs("div",{...L("timeWrapper"),children:[a.jsx(PE,{value:be,withSeconds:v,unstyled:f,min:Vce({minDate:_,value:X}),max:Yce({maxDate:S,value:X}),...p,...L("timeInput",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onChange:pe,onKeyDown:gt,size:w,"data-mantine-stop-propagation":We||void 0,hoursRef:F,attributes:N}),a.jsx(Nr,{variant:"default",size:`input-${w||"sm"}`,...L("submitButton",{className:m==null?void 0:m.className,style:m==null?void 0:m.style}),unstyled:f,"data-mantine-stop-propagation":We||void 0,children:a.jsx(mw,{size:"30%"}),...m,onClick:Fe=>{var Ne;(Ne=m==null?void 0:m.onClick)==null||Ne.call(m,Fe),ae.close(),Le()}})]})]})});HE.classes={...vz,...o2.classes,...c2.classes};HE.displayName="@mantine/dates/DateTimePicker";const Xce="settings.useLocalTime",Kce="settings.enableQueryHistory",Zce="settings.enableAutocomplete",Jce="settings.enableSyntaxHighlighting",eue="settings.enableLinter",tue="settings.showAnnotations",nue="settings.showQueryWarnings",rue="settings.showQueryInfoNotices",iue="settings.ruleGroupsPerPage",sue="settings.alertGroupsPerPage",aue=t=>{t.endsWith("/")&&(t=t.slice(0,-1));const n=["/query","/alerts","/targets","/rules","/service-discovery","/status","/tsdb-status","/flags","/config","/alertmanager-discovery","/agent"].find(r=>t.endsWith(r));return t.slice(0,t.length-(n||"").length)},oue={consolesLink:GLOBAL_CONSOLES_LINK==="CONSOLES_LINK_PLACEHOLDER"||GLOBAL_CONSOLES_LINK===""||GLOBAL_CONSOLES_LINK===null?null:GLOBAL_CONSOLES_LINK,agentMode:GLOBAL_AGENT_MODE==="true",ready:GLOBAL_READY==="true",lookbackDelta:GLOBAL_LOOKBACKDELTA==="LOOKBACKDELTA_PLACEHOLDER"||GLOBAL_LOOKBACKDELTA===null?"":GLOBAL_LOOKBACKDELTA,pathPrefix:aue(window.location.pathname),useLocalTime:Ca(Xce,!1),enableQueryHistory:Ca(Kce,!1),enableAutocomplete:Ca(Zce,!0),enableSyntaxHighlighting:Ca(Jce,!0),enableLinter:Ca(eue,!0),showAnnotations:Ca(tue,!1),showQueryWarnings:Ca(nue,!0),showQueryInfoNotices:Ca(rue,!0),ruleGroupsPerPage:Ca(iue,10),alertGroupsPerPage:Ca(sue,10)},bz=Vw({name:"settings",initialState:oue,reducers:{updateSettings:(t,{payload:e})=>{Object.assign(t,e)}}}),{updateSettings:no}=bz.actions,li=()=>rc(t=>t.settings),lue=bz.reducer,A5={width:"0.9rem",height:"0.9rem"},yz=({time:t,range:e,description:n,onChangeTime:r})=>{const i=()=>t!==null?t:Date.now().valueOf(),{useLocalTime:s}=li(),o=s?He(t).format():He(t).subtract(He().utcOffset(),"minutes").format();return a.jsx(ht,{gap:5,children:a.jsx(HE,{title:"End time",w:230,valueFormat:"YYYY-MM-DD HH:mm:ss",withSeconds:!0,value:t!==null?o:void 0,onChange:l=>r(l?s?new Date(l).getTime():He.utc(l).valueOf():null),"aria-label":n,placeholder:n,onClick:()=>{t===null&&r(i())},leftSection:a.jsx(Nr,{size:"lg",color:"gray",variant:"transparent",title:"Decrease time","aria-label":"Decrease time",onClick:()=>r(i()-e/2),children:a.jsx(Are,{style:A5})}),styles:{section:{width:"unset"}},rightSection:a.jsxs(a.Fragment,{children:[t&&a.jsx(ec,{variant:"transparent",color:"gray",onMouseDown:l=>l.preventDefault(),tabIndex:-1,onClick:()=>{r(null)},size:"xs"}),a.jsx(Nr,{size:"lg",color:"gray",variant:"transparent",title:"Increase time","aria-label":"Increase time",onClick:()=>r(i()+e/2),children:a.jsx(kF,{style:A5})})]})})})},w5={width:"0.9rem",height:"0.9rem"},S5=[1,10,60,5*60,15*60,30*60,60*60,2*60*60,6*60*60,12*60*60,24*60*60,48*60*60,7*24*60*60,14*24*60*60,28*24*60*60,56*24*60*60,112*24*60*60,182*24*60*60,365*24*60*60,730*24*60*60].map(t=>t*1e3),cue=({range:t,onChangeRange:e})=>{const[n,r]=M.useState(Hn(t));M.useEffect(()=>{r(Hn(t))},[t]);const i=l=>{const u=ME(l);u===null?r(Hn(t)):e(u)},s=()=>{for(const l of S5)if(t<l){r(Hn(l)),e(l);return}},o=()=>{for(const l of S5.slice().reverse())if(t>l){r(Hn(l)),e(l);return}};return a.jsx(ht,{gap:5,children:a.jsx(tc,{title:"Range",value:n,onChange:l=>r(l.currentTarget.value),onBlur:()=>i(n),onKeyDown:l=>l.key==="Enter"&&i(n),"aria-label":"Range",style:{width:`calc(44px + ${n.length+3}ch)`},leftSection:a.jsx(Nr,{size:"lg",variant:"transparent",color:"gray","aria-label":"Decrease range",onClick:o,children:a.jsx(eie,{style:w5})}),rightSection:a.jsx(Nr,{size:"lg",variant:"transparent",color:"gray","aria-label":"Increase range",onClick:s,children:a.jsx(RF,{style:w5})}),leftSectionPointerEvents:"all",rightSectionPointerEvents:"all"})})},xz=1024;let uue=0,MC=class{constructor(e,n){this.from=e,this.to=n}};class cn{constructor(e={}){this.id=uue++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ua.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}cn.closedBy=new cn({deserialize:t=>t.split(" ")});cn.openedBy=new cn({deserialize:t=>t.split(" ")});cn.group=new cn({deserialize:t=>t.split(" ")});cn.isolate=new cn({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});cn.contextHash=new cn({perNode:!0});cn.lookAhead=new cn({perNode:!0});cn.mounted=new cn({perNode:!0});class Lg{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[cn.mounted.id]}}const hue=Object.create(null);class ua{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):hue,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new ua(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(cn.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(cn.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}ua.none=new ua("",Object.create(null),0,8);class zE{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],u=o[0];u.combine&&u.id in i&&(l=u.combine(i[u.id],l)),i[u.id]=l}}n.push(i?new ua(r.name,i,r.id,r.flags):r)}return new zE(n)}}const Jy=new WeakMap,j5=new WeakMap;var Gr;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Gr||(Gr={}));class oi{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Lg.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new tT(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Jy.get(this)||this.topNode,s=new tT(i);return s.moveTo(e,n),Jy.set(this,s._tree),s}get topNode(){return new Nh(this,0,0,null)}resolve(e,n=0){let r=hv(Jy.get(this)||this.topNode,e,n,!1);return Jy.set(this,r),r}resolveInner(e,n=0){let r=hv(j5.get(this)||this.topNode,e,n,!0);return j5.set(this,r),r}resolveStack(e,n=0){return pue(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&Gr.IncludeAnonymous)>0;for(let u=this.cursor(o|Gr.IncludeAnonymous);;){let h=!1;if(u.from<=s&&u.to>=i&&(!l&&u.type.isAnonymous||n(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&r&&(l||!u.type.isAnonymous)&&r(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:QE(ua.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new oi(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new oi(ua.none,n,r,i)))}static build(e){return mue(e)}}oi.empty=new oi(ua.none,[],[],0);class qE{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new qE(this.buffer,this.index)}}class Rh{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return ua.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,l=-1;for(let u=e;u!=n&&!(Az(s,i,o[u+1],o[u+2])&&(l=u,r>0));u=o[u+3]);return l}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let l=e,u=0;l<n;){s[u++]=i[l++],s[u++]=i[l++]-r;let h=s[u++]=i[l++]-r;s[u++]=i[l++]-e,o=Math.max(o,h)}return new Rh(s,o,this.set)}}function Az(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function hv(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof Nh&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:Gr.IgnoreOverlays;if(r)for(let o=t,l=o.parent;l;o=l,l=o.parent)o instanceof Nh&&o.index<0&&((i=l.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=l);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class wz{cursor(e=0){return new tT(this,e)}getChild(e,n=null,r=null){let i=C5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return C5(this,e,n,r)}resolve(e,n=0){return hv(this,e,n,!1)}resolveInner(e,n=0){return hv(this,e,n,!0)}matchContext(e){return eT(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}let Nh=class ix extends wz{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:l,positions:u}=o._tree,h=n>0?l.length:-1;e!=h;e+=n){let f=l[e],p=u[e]+o.from,m;if(!(!(s&Gr.EnterBracketed&&f instanceof oi&&(m=Lg.get(f))&&!m.overlay&&m.bracketed&&r>=p&&r<=p+f.length)&&!Az(i,r,p,p+f.length))){if(f instanceof Rh){if(s&Gr.ExcludeBuffers)continue;let v=f.findChild(0,f.buffer.length,n,r-p,i);if(v>-1)return new xh(new due(o,f,e,p),null,v)}else if(s&Gr.IncludeAnonymous||!f.type.isAnonymous||$E(f)){let v;if(!(s&Gr.IgnoreMounts)&&(v=Lg.get(f))&&!v.overlay)return new ix(v.tree,p,e,o);let b=new ix(f,p,e,o);return s&Gr.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?f.children.length-1:0,n,r,i,s)}}}if(s&Gr.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&Gr.IgnoreOverlays)&&(i=Lg.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Gr.EnterBracketed&&i.bracketed;for(let{from:l,to:u}of i.overlay)if((n>0||o?l<=s:l<s)&&(n<0||o?u>=s:u>s))return new ix(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function C5(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function eT(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class due{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class xh extends wz{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new xh(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&Gr.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new xh(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new xh(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new xh(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new oi(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Sz(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof Nh&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new fue(i,n)}class fue{constructor(e,n){this.heads=e,this.node=n}get next(){return Sz(this.heads)}}function pue(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof Nh?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=Lg.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Nh(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(hv(l,e,n,!1))}}return i?Sz(i):r}class tT{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Gr.EnterBracketed,e instanceof Nh)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Nh?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Gr.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Gr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Gr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&Gr.IncludeAnonymous||l instanceof Rh||!l.type.isAnonymous||$E(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new xh(this.buffer,n,this.stack[i]);return this.bufferNode=new xh(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return eT(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return eT(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function $E(t){return t.children.some(e=>e instanceof Rh||!e.type.isAnonymous||$E(e))}function mue(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=xz,reused:s=[],minRepeatType:o=r.types.length}=t,l=Array.isArray(n)?new qE(n,n.length):n,u=r.types,h=0,f=0;function p(S,O,E,D,N,I){let{id:R,start:L,end:Q,size:z}=l,H=f,P=h;if(z<0)if(l.next(),z==-1){let W=s[R];E.push(W),D.push(L-S);return}else if(z==-3){h=R;return}else if(z==-4){f=R;return}else throw new RangeError(`Unrecognized record size: ${z}`);let F=u[R],U,Z,G=L-S;if(Q-L<=i&&(Z=w(l.pos-O,N))){let W=new Uint16Array(Z.size-Z.skip),X=l.pos-Z.size,V=W.length;for(;l.pos>X;)V=A(Z.start,W,V);U=new Rh(W,Q-Z.start,r),G=Z.start-S}else{let W=l.pos-z;l.next();let X=[],V=[],te=R>=o?R:-1,le=0,be=Q;for(;l.pos>W;)te>=0&&l.id==te&&l.size>=0?(l.end<=be-i&&(b(X,V,L,le,l.end,be,te,H,P),le=X.length,be=l.end),l.next()):I>2500?m(L,W,X,V):p(L,W,X,V,te,I+1);if(te>=0&&le>0&&le<X.length&&b(X,V,L,le,L,be,te,H,P),X.reverse(),V.reverse(),te>-1&&le>0){let ye=v(F,P);U=QE(F,X,V,0,X.length,0,Q-L,ye,ye)}else U=x(F,X,V,Q-L,H-Q,P)}E.push(U),D.push(G)}function m(S,O,E,D){let N=[],I=0,R=-1;for(;l.pos>O;){let{id:L,start:Q,end:z,size:H}=l;if(H>4)l.next();else{if(R>-1&&Q<R)break;R<0&&(R=z-i),N.push(L,Q,z),I++,l.next()}}if(I){let L=new Uint16Array(I*4),Q=N[N.length-2];for(let z=N.length-3,H=0;z>=0;z-=3)L[H++]=N[z],L[H++]=N[z+1]-Q,L[H++]=N[z+2]-Q,L[H++]=H;E.push(new Rh(L,N[2]-Q,r)),D.push(Q-S)}}function v(S,O){return(E,D,N)=>{let I=0,R=E.length-1,L,Q;if(R>=0&&(L=E[R])instanceof oi){if(!R&&L.type==S&&L.length==N)return L;(Q=L.prop(cn.lookAhead))&&(I=D[R]+L.length+Q)}return x(S,E,D,N,I,O)}}function b(S,O,E,D,N,I,R,L,Q){let z=[],H=[];for(;S.length>D;)z.push(S.pop()),H.push(O.pop()+E-N);S.push(x(r.types[R],z,H,I-N,L-I,Q)),O.push(N-E)}function x(S,O,E,D,N,I,R){if(I){let L=[cn.contextHash,I];R=R?[L].concat(R):[L]}if(N>25){let L=[cn.lookAhead,N];R=R?[L].concat(R):[L]}return new oi(S,O,E,D,R)}function w(S,O){let E=l.fork(),D=0,N=0,I=0,R=E.end-i,L={size:0,start:0,skip:0};e:for(let Q=E.pos-S;E.pos>Q;){let z=E.size;if(E.id==O&&z>=0){L.size=D,L.start=N,L.skip=I,I+=4,D+=4,E.next();continue}let H=E.pos-z;if(z<0||H<Q||E.start<R)break;let P=E.id>=o?4:0,F=E.start;for(E.next();E.pos>H;){if(E.size<0)if(E.size==-3||E.size==-4)P+=4;else break e;else E.id>=o&&(P+=4);E.next()}N=F,D+=z,I+=P}return(O<0||D==S)&&(L.size=D,L.start=N,L.skip=I),L.size>4?L:void 0}function A(S,O,E){let{id:D,start:N,end:I,size:R}=l;if(l.next(),R>=0&&D<o){let L=E;if(R>4){let Q=l.pos-(R-4);for(;l.pos>Q;)E=A(S,O,E)}O[--E]=L,O[--E]=I-S,O[--E]=N-S,O[--E]=D}else R==-3?h=D:R==-4&&(f=D);return E}let j=[],C=[];for(;l.pos>0;)p(t.start||0,t.bufferStart||0,j,C,-1,0);let _=(e=t.length)!==null&&e!==void 0?e:j.length?C[0]+j[0].length:0;return new oi(u[t.topID],j.reverse(),C.reverse(),_)}const _5=new WeakMap;function sx(t,e){if(!t.isAnonymous||e instanceof Rh||e.type!=t)return 1;let n=_5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof oi)){n=1;break}n+=sx(t,r)}_5.set(e,n)}return n}function QE(t,e,n,r,i,s,o,l,u){let h=0;for(let b=r;b<i;b++)h+=sx(t,e[b]);let f=Math.ceil(h*1.5/8),p=[],m=[];function v(b,x,w,A,j){for(let C=w;C<A;){let _=C,S=x[C],O=sx(t,b[C]);for(C++;C<A;C++){let E=sx(t,b[C]);if(O+E>=f)break;O+=E}if(C==_+1){if(O>f){let E=b[_];v(E.children,E.positions,0,E.children.length,x[_]+j);continue}p.push(b[_])}else{let E=x[C-1]+b[C-1].length-S;p.push(QE(t,b,x,_,C,S,E,null,u))}m.push(S+j-s)}}return v(e,n,r,i,0),(l||u)(p,m,o)}class cf{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new cf(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,u=0,h=0;;l++){let f=l<n.length?n[l]:null,p=f?f.fromA:1e9;if(p-u>=r)for(;o&&o.from<p;){let m=o;if(u>=m.from||p<=m.to||h){let v=Math.max(m.from,u)-h,b=Math.min(m.to,p)-h;m=v>=b?null:new cf(v,b,m.tree,m.offset+h,l>0,!!f)}if(m&&i.push(m),o.to>p)break;o=s<e.length?e[s++]:null}if(!f)break;u=f.toA,h=f.toA-f.toB}return i}}let jz=class{startParse(e,n,r){return typeof e=="string"&&(e=new gue(e)),r=r?r.length?r.map(i=>new MC(i.from,i.to)):[new MC(0,0)]:[new MC(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}};class gue{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new cn({perNode:!0});var T5={};class Jx{constructor(e,n,r,i,s,o,l,u,h,f=0,p){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=u,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Jx(e,[],n,r,r,0,[],0,i?new k5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(r-1)*3-(e&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=u?this.stack[u-1]:0,m=this.bufferBase+this.buffer.length-p;if(i<s.minRepeatTerm||e&131072){let v=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,v,m+4,!0)}if(e&262144)this.state=this.stack[u];else{let v=this.stack[u-3];this.state=s.getGoto(v,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(n==r)return;if(o.buffer[l-2]>=n){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let u=o;u>0&&this.buffer[u-2]>r;u-=4)if(this.buffer[u-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Jx(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new vue(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((l,u)=>u&1&&l==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let u=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],u,!1)>=0)return l<<19|65536|u}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new k5(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class k5{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class vue{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class eA{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new eA(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new eA(this.stack,this.pos,this.index)}}function e1(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let u=o-32;if(u>=46&&(u-=46,l=!0),s+=u,l)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class ax{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const O5=new ax;class bue{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=O5,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=O5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class zp{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;yue(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}zp.prototype.contextual=zp.prototype.fallback=zp.prototype.extend=!1;zp.prototype.fallback=zp.prototype.extend=!1;function yue(t,e,n,r,i,s){let o=0,l=1<<r,{dialect:u}=n.p.parser;e:for(;(l&t[o])!=0;){let h=t[o+1];for(let v=o+3;v<h;v+=2)if((t[v+1]&l)>0){let b=t[v];if(u.allows(b)&&(e.token.value==-1||e.token.value==b||xue(b,e.token.value,i,s))){e.acceptToken(b);break}}let f=e.next,p=0,m=t[o+2];if(e.next<0&&m>p&&t[h+m*3-3]==65535){o=t[h+m*3-1];continue e}for(;p<m;){let v=p+m>>1,b=h+v+(v<<1),x=t[b],w=t[b+1]||65536;if(f<x)m=v;else if(f>=w)p=v+1;else{o=t[b+2],e.advance();continue e}}break}}function E5(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function xue(t,e,n,r){let i=E5(n,r,e);return i<0||E5(n,r,t)<i}const wa=typeof process<"u"&&T5&&/\bparse\b/.test(T5.LOG);let DC=null;function M5(t,e,n){let r=t.cursor(Gr.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Aue{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?M5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?M5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof oi){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let u=s.prop(cn.lookAhead);if(!u||l+u<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class wue{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new ax)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,u=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let f=s[h],p=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||p.start!=e.pos||p.mask!=o||p.context!=l)&&(this.updateCachedToken(p,f,e),p.mask=o,p.context=l),p.lookAhead>p.end+25&&(u=Math.max(p.lookAhead,u)),p.value!=0)){let m=n;if(p.extended>-1&&(n=this.addActions(e,p.extended,p.end,n)),n=this.addActions(e,p.value,p.end,n),!f.extend&&(r=p,n>m))break}}for(;this.actions.length>n;)this.actions.pop();return u&&e.setLookAhead(u),!r&&e.pos==this.stream.end&&(r=new ax,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new ax,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let u=0;u<2;u++)for(let h=o.stateSlot(s,u?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=zc(l,h+2);else{i==0&&l[h+1]==2&&(i=this.putAction(zc(l,h+2),n,r,i));break}l[h]==n&&(i=this.putAction(zc(l,h+1),n,r,i))}return i}}class Sue{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new bue(n,i),this.tokens=new wue(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Jx.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new Aue(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let u=this.tokens.getMainToken(l);s.push(u.value,u.end)}}break}}if(!r.length){let o=i&&Cue(i);if(o)return wa&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw wa&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return wa&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,u)=>u.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let u=o+1;u<r.length;u++){let h=r[u];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)r.splice(u--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=wa?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(cn.contextHash)||0)==f))return e.useNode(p,m),wa&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof oi)||p.children.length==0||p.positions[0]>0)break;let v=p.children[0];if(v instanceof oi&&p.positions[0]==0)p=v;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),wa&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let h=0;h<u.length;){let f=u[h++],p=u[h++],m=u[h++],v=h==u.length||!r,b=v?e:e.split(),x=this.tokens.mainToken;if(b.apply(f,p,x?x.start:b.pos,m),wa&&console.log(o+this.stackID(b)+` (via ${(f&65536)==0?"shift":`reduce of ${s.getName(f&65535)}`} for ${s.getName(p)} @ ${i}${b==e?"":", split"})`),v)return!0;b.pos>i?n.push(b):r.push(b)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return D5(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],u=n[o<<1],h=n[(o<<1)+1],f=wa?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),wa&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let p=l.split(),m=f;for(let v=0;v<10&&p.forceReduce()&&(wa&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));v++)wa&&(m=this.stackID(p)+" -> ");for(let v of l.recoverByInsert(u))wa&&console.log(f+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>l.pos?(h==l.pos&&(h++,u=0),l.recoverByDelete(u,h),wa&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(u)})`),D5(l,r)):(!i||i.score<p.score)&&(i=p)}return i}stackToTree(e){return e.close(),oi.build({buffer:eA.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(DC||(DC=new WeakMap)).get(e);return n||DC.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function D5(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class jue{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class tA extends jz{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function s(l,u,h){i[l].push([u,u.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let u=l[0];typeof u=="string"&&(u=cn[u]);for(let h=1;h<l.length;){let f=l[h++];if(f>=0)s(f,u,l[h++]);else{let p=l[h+-f];for(let m=-f;m>0;m--)s(l[h++],u,p);h++}}}this.nodeSet=new zE(n.map((l,u)=>ua.define({name:u>=this.minRepeatTerm?void 0:l,id:u,props:i[u],top:r.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=xz;let o=e1(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(R5),this.states=e1(e.states,Uint32Array),this.data=e1(e.stateData),this.goto=e1(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new zp(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Sue(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],l=o&1,u=i[s++];if(l&&r)return u;for(let h=s+(o>>1);s<h;s++)if(i[s]==e)return u;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=zc(r,s+2)];else{if(r[s+1]==2)return zc(r,s+2);break}if(o==n||o==0)return zc(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=zc(this.data,s+2);else break;i=n(zc(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=zc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(tA.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=R5(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new jue(e,r,i)}static deserialize(e){return new tA(e)}}function zc(t,e){return t[e]|t[e+1]<<16}function Cue(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function R5(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let _ue=0;class oo{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=_ue++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof oo&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new oo(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new nA(e);return r=>r.modified.indexOf(n)>-1?r:nA.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let Tue=0;class nA{constructor(e){this.name=e,this.instances=[],this.id=Tue++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&kue(n,l.modified));if(r)return r;let i=[],s=new oo(e.name,i,e,n);for(let l of n)l.instances.push(s);let o=Oue(n);for(let l of e.set)if(!l.modified.length)for(let u of o)i.push(nA.get(l,u));return s}}function kue(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Oue(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Cz(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,l=i;for(let p=0;;){if(l=="..."&&p>0&&p+3==i.length){o=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!m)throw new RangeError("Invalid path: "+i);if(s.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==i.length)break;let v=i[p++];if(p==i.length&&v=="!"){o=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);l=i.slice(p)}let u=s.length-1,h=s[u];if(!h)throw new RangeError("Invalid path: "+i);let f=new dv(r,o,u>0?s.slice(0,u):null);e[h]=f.sort(e[h])}}return _z.add(e)}const _z=new cn({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new dv(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class dv{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}dv.empty=new dv([],2,null);function Tz(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let u of l.set){let h=n[u.id];if(h){o=o?o+" "+h:h;break}}return o},scope:r}}function Eue(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Mue(t,e,n,r=0,i=t.length){let s=new Due(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class Due{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:l,to:u}=e;if(l>=r||u<=n)return;o.isTop&&(s=this.highlighters.filter(v=>!v.scope||v.scope(o)));let h=i,f=Rue(e)||dv.empty,p=Eue(s,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(n,l),h),f.opaque)return;let m=e.tree&&e.tree.prop(cn.mounted);if(m&&m.overlay){let v=e.node.enter(m.overlay[0].from+l,1),b=this.highlighters.filter(w=>!w.scope||w.scope(m.tree.type)),x=e.firstChild();for(let w=0,A=l;;w++){let j=w<m.overlay.length?m.overlay[w]:null,C=j?j.from+l:u,_=Math.max(n,A),S=Math.min(r,C);if(_<S&&x)for(;e.from<S&&(this.highlightRange(e,_,S,i,s),this.startSpan(Math.min(S,e.to),h),!(e.to>=C||!e.nextSibling())););if(!j||C>r)break;A=j.to+l,A>n&&(this.highlightRange(v.cursor(),Math.max(n,j.from+l),Math.min(r,A),"",b),this.startSpan(Math.min(r,A),h))}x&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function Rue(t){let e=t.type.prop(_z);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const at=oo.define,t1=at(),ih=at(),N5=at(ih),P5=at(ih),sh=at(),n1=at(sh),RC=at(sh),Tl=at(),_d=at(Tl),wl=at(),Sl=at(),nT=at(),sg=at(nT),r1=at(),me={comment:t1,lineComment:at(t1),blockComment:at(t1),docComment:at(t1),name:ih,variableName:at(ih),typeName:N5,tagName:at(N5),propertyName:P5,attributeName:at(P5),className:at(ih),labelName:at(ih),namespace:at(ih),macroName:at(ih),literal:sh,string:n1,docString:at(n1),character:at(n1),attributeValue:at(n1),number:RC,integer:at(RC),float:at(RC),bool:at(sh),regexp:at(sh),escape:at(sh),color:at(sh),url:at(sh),keyword:wl,self:at(wl),null:at(wl),atom:at(wl),unit:at(wl),modifier:at(wl),operatorKeyword:at(wl),controlKeyword:at(wl),definitionKeyword:at(wl),moduleKeyword:at(wl),operator:Sl,derefOperator:at(Sl),arithmeticOperator:at(Sl),logicOperator:at(Sl),bitwiseOperator:at(Sl),compareOperator:at(Sl),updateOperator:at(Sl),definitionOperator:at(Sl),typeOperator:at(Sl),controlOperator:at(Sl),punctuation:nT,separator:at(nT),bracket:sg,angleBracket:at(sg),squareBracket:at(sg),paren:at(sg),brace:at(sg),content:Tl,heading:_d,heading1:at(_d),heading2:at(_d),heading3:at(_d),heading4:at(_d),heading5:at(_d),heading6:at(_d),contentSeparator:at(Tl),list:at(Tl),quote:at(Tl),emphasis:at(Tl),strong:at(Tl),link:at(Tl),monospace:at(Tl),strikethrough:at(Tl),inserted:at(),deleted:at(),changed:at(),invalid:at(),meta:r1,documentMeta:at(r1),annotation:at(r1),processingInstruction:at(r1),definition:oo.defineModifier("definition"),constant:oo.defineModifier("constant"),function:oo.defineModifier("function"),standard:oo.defineModifier("standard"),local:oo.defineModifier("local"),special:oo.defineModifier("special")};for(let t in me){let e=me[t];e instanceof oo&&(e.name=t)}Tz([{tag:me.link,class:"tok-link"},{tag:me.heading,class:"tok-heading"},{tag:me.emphasis,class:"tok-emphasis"},{tag:me.strong,class:"tok-strong"},{tag:me.keyword,class:"tok-keyword"},{tag:me.atom,class:"tok-atom"},{tag:me.bool,class:"tok-bool"},{tag:me.url,class:"tok-url"},{tag:me.labelName,class:"tok-labelName"},{tag:me.inserted,class:"tok-inserted"},{tag:me.deleted,class:"tok-deleted"},{tag:me.literal,class:"tok-literal"},{tag:me.string,class:"tok-string"},{tag:me.number,class:"tok-number"},{tag:[me.regexp,me.escape,me.special(me.string)],class:"tok-string2"},{tag:me.variableName,class:"tok-variableName"},{tag:me.local(me.variableName),class:"tok-variableName tok-local"},{tag:me.definition(me.variableName),class:"tok-variableName tok-definition"},{tag:me.special(me.variableName),class:"tok-variableName2"},{tag:me.definition(me.propertyName),class:"tok-propertyName tok-definition"},{tag:me.typeName,class:"tok-typeName"},{tag:me.namespace,class:"tok-namespace"},{tag:me.className,class:"tok-className"},{tag:me.macroName,class:"tok-macroName"},{tag:me.propertyName,class:"tok-propertyName"},{tag:me.operator,class:"tok-operator"},{tag:me.comment,class:"tok-comment"},{tag:me.meta,class:"tok-meta"},{tag:me.invalid,class:"tok-invalid"},{tag:me.punctuation,class:"tok-punctuation"}]);const Nue=177,Pue=178,Iue=1,Bue=2,Lue=3,Fue=4,Hue=5,zue=6,que=7,$ue=8,Que=9,Uue=10,Wue=11,Vue=12,Yue=13,Gue=14,Xue=15,Kue=16,Zue=17,Jue=18,ehe=19,the=20,nhe=21,rhe=22,ihe=23,she=24,ahe=25,ohe=26,lhe=27,che=28,uhe=29,hhe=30,dhe=31,fhe=32,phe=33,mhe={inf:Nue,nan:Pue,bool:Iue,ignoring:Bue,on:Lue,group_left:Fue,group_right:Hue,offset:zue},I5=(t,e)=>mhe[t.toLowerCase()]||-1,ghe={avg:$ue,atan2:que,bottomk:Que,count:Uue,count_values:Wue,group:Vue,max:Yue,min:Gue,quantile:Xue,limitk:Kue,limit_ratio:Zue,stddev:Jue,stdvar:ehe,sum:the,topk:nhe,by:rhe,without:ihe,and:she,or:ahe,unless:ohe,start:lhe,end:che,smoothed:uhe,anchored:hhe,fill:dhe,fill_left:fhe,fill_right:phe},B5=(t,e)=>ghe[t.toLowerCase()]||-1,vhe=Cz({LineComment:me.comment,LabelName:me.labelName,StringLiteral:me.string,NumberDurationLiteral:me.number,NumberDurationLiteralInDurationContext:me.number,Identifier:me.variableName,"Abs Absent AbsentOverTime Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp Floor HistogramAvg HistogramCount HistogramFraction HistogramQuantile HistogramSum DoubleExponentialSmoothing Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":me.function(me.variableName),"Avg Bottomk Count Count_values Group LimitK LimitRatio Max Min Quantile Stddev Stdvar Sum Topk":me.operatorKeyword,"By Without Bool On Ignoring GroupLeft GroupRight Offset Start End Smoothed Anchored":me.modifier,"And Unless Or":me.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":me.operator,UnaryOp:me.arithmeticOperator,"( )":me.paren,"[ ]":me.squareBracket,"{ }":me.brace,"⚠":me.invalid}),bhe={__proto__:null,absent_over_time:379,absent:381,abs:383,acos:385,acosh:387,asin:389,asinh:391,atan:393,atanh:395,avg_over_time:397,ceil:399,changes:401,clamp:403,clamp_max:405,clamp_min:407,cos:409,cosh:411,count_over_time:413,days_in_month:415,day_of_month:417,day_of_week:419,day_of_year:421,deg:423,delta:425,deriv:427,exp:429,first_over_time:431,floor:433,histogram_count:435,histogram_fraction:437,histogram_quantile:439,histogram_quantiles:441,histogram_stddev:443,histogram_stdvar:445,histogram_sum:447,histogram_avg:449,double_exponential_smoothing:451,hour:453,idelta:455,increase:457,info:459,irate:461,label_replace:463,label_join:465,last_over_time:467,ln:469,log10:471,log2:473,mad_over_time:475,max_over_time:477,min_over_time:479,ts_of_first_over_time:481,ts_of_max_over_time:483,ts_of_min_over_time:485,ts_of_last_over_time:487,minute:489,month:491,pi:493,predict_linear:495,present_over_time:497,quantile_over_time:499,rad:501,rate:503,resets:505,round:507,scalar:509,sgn:511,sin:513,sinh:515,sort:517,sort_desc:519,sort_by_label:521,sort_by_label_desc:523,sqrt:525,stddev_over_time:527,stdvar_over_time:529,sum_over_time:531,tan:533,tanh:535,timestamp:537,time:539,vector:541,year:543},yhe=tA.deserialize({version:14,states:"<zOYQPOOO(WQPOOOOQO'#DR'#DRO(]QPO'#DQOOQO'#D`'#D`O(hQPO'#FrQ/oQQOOOOQO'#Dq'#DqO(cQPO'#DpOYQPO'#FoOYQPO'#FqO1YQSO'#FtO1eQQO'#FsOOQO'#Fs'#FsOOQO'#GX'#GXOOQO'#Dr'#DrOOQO'#Dt'#DtOOQO'#Du'#DuOOQO'#Dv'#DvOOQO'#Dw'#DwOOQO'#Dx'#DxOOQO'#Dy'#DyOOQO'#Dz'#DzOOQO'#D{'#D{OOQO'#D|'#D|OOQO'#D}'#D}OOQO'#EO'#EOOOQO'#EP'#EPOOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETOOQO'#EU'#EUOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EY'#EYOOQO'#EZ'#EZOOQO'#E['#E[OOQO'#E]'#E]OOQO'#E^'#E^OOQO'#E_'#E_OOQO'#E`'#E`OOQO'#Ea'#EaOOQO'#Eb'#EbOOQO'#Ec'#EcOOQO'#Ed'#EdOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsOOQO'#Et'#EtOOQO'#Eu'#EuOOQO'#Ev'#EvOOQO'#Ew'#EwOOQO'#Ex'#ExOOQO'#Ey'#EyOOQO'#Ez'#EzOOQO'#E{'#E{OOQO'#E|'#E|OOQO'#E}'#E}OOQO'#FO'#FOOOQO'#FP'#FPOOQO'#FQ'#FQOOQO'#FR'#FROOQO'#FS'#FSOOQO'#FT'#FTOOQO'#FU'#FUOOQO'#FV'#FVOOQO'#FW'#FWOOQO'#FX'#FXOOQO'#FY'#FYOOQO'#FZ'#FZOOQO'#F['#F[OOQO'#F]'#F]OOQO'#F^'#F^OOQO'#F_'#F_OOQO'#F`'#F`OOQO'#Fa'#FaOOQO'#Fb'#FbOOQO'#Fc'#FcOOQO'#Fd'#FdOOQO'#Fe'#FeOOQO'#Ff'#FfOOQO'#Fg'#FgOOQO'#Fh'#FhOOQO'#Fi'#FiQOQPOOO3[QPO'#DSO3aQPO'#DXO(cQPO,59lO3hQQO,59lOOQO,59z,59zO5bQPO,59tO5bQPO,59tO5bQPO,59tO5bQPO,59tO5bQPO,59tO<rQPO,5<UO<rQPO,5<WOOQO,5<X,5<XOOQO,5<Y,5<YO=fQPO,5<gOOQO,5:[,5:[O=pQQO,5<ZO=wQQO,5<]OOQO'#DV'#DVO?kQPO'#FuO?yQPO,5<`OOQO,5<`,5<`O@VQPO,5<`OOQO,5<_,5<_O@_QSO'#DTOOQO,59n,59nOOQO,59s,59sO@jQQO,59sOOQO1G/W1G/WOOQO'#D['#D[O3[QPO'#D]O@tQPO'#D_O@yQPO'#DaOAOQPO'#DbOOQO'#D^'#D^OHRQPO'#D^OHYQPO'#D^OOQO'#G]'#G]OHaQPO'#G]O! hQPO'#G]OYQPO1G/`OYQPO1G/`OYQPO1G/`OYQPO1G/`OYQPO1G/`OOQO'#Fk'#FkO! rQPO'#FkO! }QSO1G1pOOQO1G1r1G1rO!!VQPO'#D`OOQO'#F}'#F}OOQO1G2R1G2RO!!bQPO1G2ROOQO1G1u1G1uOOQO'#Fv'#FvO!!gQPO,5<aO!!lQPO,5<fO!!qQSO1G1zO!!|QPO1G1zOOQO1G1z1G1zOOQO,59o,59oO!#UQPO,59oOYQPO'#GQO!#^QPO1G/_OOQO1G/_1G/_O!#fQPO,59wO=TQPO,59yO=TQPO,59{O=TQPO,59|OOQO,59x,59xOOQO,5<w,5<wO!*sQPO,5<wO!3bQQO7+$zO!3rQQO7+$zO!5^QQO7+$zO!5zQQO7+$zO!7oQQO7+$zOOQO,5<V,5<VOOQO7+'[7+'[O!8`QPO7+'bO!8gQPO7+'mOOQO1G1{1G1{OOQO1G2Q1G2QO!8lQPO,5<mOOQO,5<m,5<mOOQO7+'f7+'fO!9QQSO7+'fOOQO-E:P-E:PO!9]QSO1G/ZO!9hQPO1G/ZOOQO1G/Z1G/ZO!9pQQO,5<lOOQO-E:O-E:OOOQO7+$y7+$yO!9zQPO1G/cO!ARQPO1G/eO!AWQPO1G/gO!A]QPO1G/hOOQO1G2c1G2cOOQO<<J|<<J|O!AbQPO<<J|OOQO<<KX<<KXOOQO<<KQ<<KQP!AgQSO'#GROOQO,5<k,5<kOOQO7+$u7+$uO!AoQSO7+$uOOQO-E9}-E9}OOQO7+$}7+$}OOQO7+%P7+%POOQO7+%R7+%ROOQO7+%S7+%SOOQOAN@hAN@hOOQO<<Ha<<HaP!AzQSO'#GP",stateData:"!BS~O$zOSrOS~OWQOXQOYQOZQO[QO]QO^QO_QO`QOaQObQOcQOdQOeQOz^O!g[O$wSO$xSO$|XO%QTO%RTO%SSO%T_O%U`O%VaO%WbO%XcO%YdO%ZeO%[fO%]gO%^hO%_iO%`jO%akO%blO%cmO%dnO%eoO%fpO%gqO%hrO%isO%jtO%kuO%lvO%mwO%nxO%oyO%pzO%q{O%r|O%s}O%t!OO%u!PO%v!QO%w!RO%x!SO%y!TO%z!UO%{!VO%|!WO%}!XO&O!YO&P!ZO&Q![O&R!]O&S!^O&T!_O&U!`O&V!aO&W!bO&X!cO&Y!dO&Z!eO&[!fO&]!gO&^!hO&_!iO&`!jO&a!kO&b!lO&c!mO&d!nO&e!oO&f!pO&g!qO&h!rO&i!sO&j!tO&k!uO&l!vO&m!wO&n!xO&o!yO&p!zO&q!{O&r!|O&s!}O&t#OO&u#PO&v#QO&w#RO&x#SO&y#TO&}ZO~O!g#UO~Of#VOg#VO$|#WO~O$w#ZO$x#ZO%S#ZOW$fXX$fXY$fXZ$fX[$fX]$fX^$fX_$fX`$fXa$fXb$fXc$fXd$fXe$fXz$fX!g$fX$w$fX$x$fX$|$fX%Q$fX%R$fX%S$fX%T$fX%U$fX%V$fX%W$fX%X$fX%Y$fX%Z$fX%[$fX%]$fX%^$fX%_$fX%`$fX%a$fX%b$fX%c$fX%d$fX%e$fX%f$fX%g$fX%h$fX%i$fX%j$fX%k$fX%l$fX%m$fX%n$fX%o$fX%p$fX%q$fX%r$fX%s$fX%t$fX%u$fX%v$fX%w$fX%x$fX%y$fX%z$fX%{$fX%|$fX%}$fX&O$fX&P$fX&Q$fX&R$fX&S$fX&T$fX&U$fX&V$fX&W$fX&X$fX&Y$fX&Z$fX&[$fX&]$fX&^$fX&_$fX&`$fX&a$fX&b$fX&c$fX&d$fX&e$fX&f$fX&g$fX&h$fX&i$fX&j$fX&k$fX&l$fX&m$fX&n$fX&o$fX&p$fX&q$fX&r$fX&s$fX&t$fX&u$fX&v$fX&w$fX&x$fX&y$fX&}$fX~OU#bOV#[Oh#_Oi#`Oj#_Om#dOn#cO}#[O!V#[O!W#[O!X#[O!Y#]O!Z#]O![#^O!]#^O!^#^O!_#^O!`#^O!a#^O!b#^O!c#^O$p#eO&z#aO~Ox#jOz#iO'O#lO~O&}ZOU$gXV$gXh$gXi$gXj$gXm$gXn$gX}$gX!V$gX!W$gX!X$gX!Y$gX!Z$gX![$gX!]$gX!^$gX!_$gX!`$gX!a$gX!b$gX!c$gX$p$gX$v$gX&z$gX%O$gX$}$gX~O$|#oO~O%O#qO~PYOf#VOg#VOUtaVtahtaitajtamtanta}ta!Vta!Wta!Xta!Yta!Zta![ta!]ta!^ta!_ta!`ta!ata!bta!cta$pta$vta&zta%Ota$}ta~OP#tOQ#uOR#uOo#vOp#wOq#xOW%PPX%PPY%PPZ%PP[%PP]%PP^%PP_%PP`%PPa%PPb%PPc%PPd%PPe%PPz%PP!g%PP$w%PP$x%PP$|%PP%Q%PP%R%PP%S%PP%T%PP%U%PP%V%PP%W%PP%X%PP%Y%PP%Z%PP%[%PP%]%PP%^%PP%_%PP%`%PP%a%PP%b%PP%c%PP%d%PP%e%PP%f%PP%g%PP%h%PP%i%PP%j%PP%k%PP%l%PP%m%PP%n%PP%o%PP%p%PP%q%PP%r%PP%s%PP%t%PP%u%PP%v%PP%w%PP%x%PP%y%PP%z%PP%{%PP%|%PP%}%PP&O%PP&P%PP&Q%PP&R%PP&S%PP&T%PP&U%PP&V%PP&W%PP&X%PP&Y%PP&Z%PP&[%PP&]%PP&^%PP&_%PP&`%PP&a%PP&b%PP&c%PP&d%PP&e%PP&f%PP&g%PP&h%PP&i%PP&j%PP&k%PP&l%PP&m%PP&n%PP&o%PP&p%PP&q%PP&r%PP&s%PP&t%PP&u%PP&v%PP&w%PP&x%PP&y%PP&}%PP~O$w$UO$x$UO%Q$VO%R$VO%S$UO~O$wSO$xSO%Q$YO%R$YO%SSO~Ok$ZOl$ZO~P=TO%O$^O~P/oO}#[OU$eaV$eah$eai$eaj$eam$ean$ea!V$ea!W$ea!X$ea!Y$ea!Z$ea![$ea!]$ea!^$ea!_$ea!`$ea!a$ea!b$ea!c$ea$p$ea$v$ea&z$ea%O$ea$}$ea~O!c$_O$k$_O$l$_O$m$_O~O!c$_O$k$_O$l$_O$m$_O$}$bO'O$dO~Ox$fOz#iO%O$eO~O$}$gO%O$iO~P/oO$|$kO~O$|$lO~O$|$mO~OW!QXX!QXY!QXZ!QX[!QX]!QX^!QX_!QX`!QXa!QXb!QXc!QXd!QXe!QXz!QX!g!QX$w!QX$x!QX$|!QX%Q!QX%R!QX%S!QX%T!QX%U!QX%V!QX%W!QX%X!QX%Y!QX%Z!QX%[!QX%]!QX%^!QX%_!QX%`!QX%a!QX%b!QX%c!QX%d!QX%e!QX%f!QX%g!QX%h!QX%i!QX%j!QX%k!QX%l!QX%m!QX%n!QX%o!QX%p!QX%q!QX%r!QX%s!QX%t!QX%u!QX%v!QX%w!QX%x!QX%y!QX%z!QX%{!QX%|!QX%}!QX&O!QX&P!QX&Q!QX&R!QX&S!QX&T!QX&U!QX&V!QX&W!QX&X!QX&Y!QX&Z!QX&[!QX&]!QX&^!QX&_!QX&`!QX&a!QX&b!QX&c!QX&d!QX&e!QX&f!QX&g!QX&h!QX&i!QX&j!QX&k!QX&l!QX&m!QX&n!QX&o!QX&p!QX&q!QX&r!QX&s!QX&t!QX&u!QX&v!QX&w!QX&x!QX&y!QX&}!QX~Oq#xO~PATOp#wO~PATOo#vOp#wOq#xOW%PXX%PXY%PXZ%PX[%PX]%PX^%PX_%PX`%PXa%PXb%PXc%PXd%PXe%PXz%PX!g%PX$w%PX$x%PX$|%PX%Q%PX%R%PX%S%PX%T%PX%U%PX%V%PX%W%PX%X%PX%Y%PX%Z%PX%[%PX%]%PX%^%PX%_%PX%`%PX%a%PX%b%PX%c%PX%d%PX%e%PX%f%PX%g%PX%h%PX%i%PX%j%PX%k%PX%l%PX%m%PX%n%PX%o%PX%p%PX%q%PX%r%PX%s%PX%t%PX%u%PX%v%PX%w%PX%x%PX%y%PX%z%PX%{%PX%|%PX%}%PX&O%PX&P%PX&Q%PX&R%PX&S%PX&T%PX&U%PX&V%PX&W%PX&X%PX&Y%PX&Z%PX&[%PX&]%PX&^%PX&_%PX&`%PX&a%PX&b%PX&c%PX&d%PX&e%PX&f%PX&g%PX&h%PX&i%PX&j%PX&k%PX&l%PX&m%PX&n%PX&o%PX&p%PX&q%PX&r%PX&s%PX&t%PX&u%PX&v%PX&w%PX&x%PX&y%PX&}%PX~OQ#uOR#uO~PHaO$w$vO$x$vO%S$vO~O&{$wO&|$xO~O$w#ZO$x#ZO%S#ZO~O$|$yO~Oz$zO~Oz${O~Ox#jOz#iO'O%OO~O$}%PO'O%OO~O$}%RO%O%TO~O$}$gO%O%WO~OS%XOT%XOW!PaX!PaY!PaZ!Pa[!Pa]!Pa^!Pa_!Pa`!Paa!Pab!Pac!Pad!Pae!Pao!Pap!Paq!Paz!Pa!g!Pa$w!Pa$x!Pa$|!Pa%Q!Pa%R!Pa%S!Pa%T!Pa%U!Pa%V!Pa%W!Pa%X!Pa%Y!Pa%Z!Pa%[!Pa%]!Pa%^!Pa%_!Pa%`!Pa%a!Pa%b!Pa%c!Pa%d!Pa%e!Pa%f!Pa%g!Pa%h!Pa%i!Pa%j!Pa%k!Pa%l!Pa%m!Pa%n!Pa%o!Pa%p!Pa%q!Pa%r!Pa%s!Pa%t!Pa%u!Pa%v!Pa%w!Pa%x!Pa%y!Pa%z!Pa%{!Pa%|!Pa%}!Pa&O!Pa&P!Pa&Q!Pa&R!Pa&S!Pa&T!Pa&U!Pa&V!Pa&W!Pa&X!Pa&Y!Pa&Z!Pa&[!Pa&]!Pa&^!Pa&_!Pa&`!Pa&a!Pa&b!Pa&c!Pa&d!Pa&e!Pa&f!Pa&g!Pa&h!Pa&i!Pa&j!Pa&k!Pa&l!Pa&m!Pa&n!Pa&o!Pa&p!Pa&q!Pa&r!Pa&s!Pa&t!Pa&u!Pa&v!Pa&w!Pa&x!Pa&y!Pa&}!Pa~Oo#vOp#wOq#xOW%PaX%PaY%PaZ%Pa[%Pa]%Pa^%Pa_%Pa`%Paa%Pab%Pac%Pad%Pae%Paz%Pa!g%Pa$w%Pa$x%Pa$|%Pa%Q%Pa%R%Pa%S%Pa%T%Pa%U%Pa%V%Pa%W%Pa%X%Pa%Y%Pa%Z%Pa%[%Pa%]%Pa%^%Pa%_%Pa%`%Pa%a%Pa%b%Pa%c%Pa%d%Pa%e%Pa%f%Pa%g%Pa%h%Pa%i%Pa%j%Pa%k%Pa%l%Pa%m%Pa%n%Pa%o%Pa%p%Pa%q%Pa%r%Pa%s%Pa%t%Pa%u%Pa%v%Pa%w%Pa%x%Pa%y%Pa%z%Pa%{%Pa%|%Pa%}%Pa&O%Pa&P%Pa&Q%Pa&R%Pa&S%Pa&T%Pa&U%Pa&V%Pa&W%Pa&X%Pa&Y%Pa&Z%Pa&[%Pa&]%Pa&^%Pa&_%Pa&`%Pa&a%Pa&b%Pa&c%Pa&d%Pa&e%Pa&f%Pa&g%Pa&h%Pa&i%Pa&j%Pa&k%Pa&l%Pa&m%Pa&n%Pa&o%Pa&p%Pa&q%Pa&r%Pa&s%Pa&t%Pa&u%Pa&v%Pa&w%Pa&x%Pa&y%Pa&}%Pa~O}#[OU|qh|qi|qj|qm|qn|q!Y|q!Z|q![|q!]|q!^|q!_|q!`|q!a|q!b|q!c|q$p|q$v|q&z|q%O|q$}|q~OV|q!V|q!W|q!X|q~P!1zOV#[O!V#[O!W#[O!X#[O~P!1zOV#[O}#[O!V#[O!W#[O!X#[O!Y#]O!Z#]OU|qh|qi|qj|qm|qn|q$p|q$v|q&z|q%O|q$}|q~O![|q!]|q!^|q!_|q!`|q!a|q!b|q!c|q~P!4SO![#^O!]#^O!^#^O!_#^O!`#^O!a#^O!b#^O!c#^O~P!4SOV#[Oh#_Oj#_O}#[O!V#[O!W#[O!X#[O!Y#]O!Z#]O![#^O!]#^O!^#^O!_#^O!`#^O!a#^O!b#^O!c#^O~OU|qi|qm|qn|q$p|q$v|q&z|q%O|q$}|q~P!6hO&{%^O~P<rO%O%`O~O!c$_O$k$_O$l$_O$m$_O$}$ua'O$ua~Ox#jOz#iO'O%aO~Ox%cOz#iO%O%dO~O$}%eO%O%dO~O$}$ta%O$ta~P/oO$|#oOW!PiX!PiY!PiZ!Pi[!Pi]!Pi^!Pi_!Pi`!Pia!Pib!Pic!Pid!Pie!Pio!Pip!Piq!Piz!Pi!g!Pi$w!Pi$x!Pi%Q!Pi%R!Pi%S!Pi%T!Pi%U!Pi%V!Pi%W!Pi%X!Pi%Y!Pi%Z!Pi%[!Pi%]!Pi%^!Pi%_!Pi%`!Pi%a!Pi%b!Pi%c!Pi%d!Pi%e!Pi%f!Pi%g!Pi%h!Pi%i!Pi%j!Pi%k!Pi%l!Pi%m!Pi%n!Pi%o!Pi%p!Pi%q!Pi%r!Pi%s!Pi%t!Pi%u!Pi%v!Pi%w!Pi%x!Pi%y!Pi%z!Pi%{!Pi%|!Pi%}!Pi&O!Pi&P!Pi&Q!Pi&R!Pi&S!Pi&T!Pi&U!Pi&V!Pi&W!Pi&X!Pi&Y!Pi&Z!Pi&[!Pi&]!Pi&^!Pi&_!Pi&`!Pi&a!Pi&b!Pi&c!Pi&d!Pi&e!Pi&f!Pi&g!Pi&h!Pi&i!Pi&j!Pi&k!Pi&l!Pi&m!Pi&n!Pi&o!Pi&p!Pi&q!Pi&r!Pi&s!Pi&t!Pi&u!Pi&v!Pi&w!Pi&x!Pi&y!Pi&}!Pi~O%O%hO~O%O%iO~O%O%jO~O&{%kO~Ox#jOz#iO~Ox%cOz#iO%O%lO~Ox%cOz#iO~O",goto:"+h%QPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP%R%_%k%qP%zP&[%RP&e&l&v'U'`'x(VPPPPPPPPPPPPP%R(d(pP(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p%R(|%R%R%R%R%R%R)V%R)c)r)zPPP)r%RP*RP*U*[*bPPPPP*iPPP+Xe^OXY#W$P$Q$R$S$T$geROXY#W$P$Q$R$S$T$gQ#XRR#s#YQ#p#VQ$j#uR%g%XQ#kZQ$f#oU$|$b%P%bV%c%R%e%mQ#YRQ#fWR#s#XZ$O#[#]#^#_#`Y#}#[#]#^#_#`R$p$OY#|#[#]#^#_#`S$o#}$OR%]$pa#y#[#]#^#_#`#}$O$pd^OXY#W$P$Q$R$S$T$gQ$[#eQ%Y$kQ%Z$lR%[$m`#z#[#]#^#_#`#}$O$pR$n#{`#{#[#]#^#_#`#}$O$pR$n#zeWOXY#W$P$Q$R$S$T$geVOXY#W$P$Q$R$S$T$gQ$W#aQ$X#bR%_$xeYOXY#W$P$Q$R$S$T$gd]OXY#W$P$Q$R$S$T$gR#n[Q#mZV$}$b%P%bQ$`#jT$a#k$|R$]#eQ%S$fR%f%SQ$h#rR%V$hS$c#k#mR%Q$cQUOQ#gXQ#hYQ#r#WQ$q$PQ$r$QQ$s$RQ$t$SQ$u$TR%U$gQ$P#[Q$Q#]Q$R#^Q$S#_R$T#`",nodeNames:"⚠ Bool Ignoring On GroupLeft GroupRight Offset Atan2 Avg Bottomk Count CountValues Group Max Min Quantile LimitK LimitRatio Stddev Stdvar Sum Topk By Without And Or Unless Start End Smoothed Anchored Fill FillLeft FillRight LineComment PromQL AggregateExpr AggregateOp AggregateModifier GroupingLabels LabelName QuotedLabelName StringLiteral FunctionCallBody BinaryExpr Pow BoolModifier MatchingModifierClause FillModifier FillClause NumberDurationLiteral FillLeftClause FillRightClause Mul Div Mod Add Sub Eql Gte Gtr TrimUpper TrimLower Lte Lss Neq FunctionCall FunctionIdentifier AbsentOverTime Identifier Absent Abs Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp FirstOverTime Floor HistogramCount HistogramFraction HistogramQuantile HistogramQuantiles HistogramStdDev HistogramStdVar HistogramSum HistogramAvg DoubleExponentialSmoothing Hour Idelta Increase Info Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MadOverTime MaxOverTime MinOverTime TsOfFirstOverTime TsOfMaxOverTime TsOfMinOverTime TsOfLastOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Timestamp Time Vector Year MatrixSelector NumberDurationLiteralInDurationContext OffsetExpr AnchoredExpr SmoothedExpr ParenExpr SubqueryExpr UnaryExpr UnaryOp VectorSelector LabelMatchers UnquotedLabelMatcher MatchOp EqlSingle EqlRegex NeqRegex QuotedLabelMatcher StepInvariantExpr At AtModifierPreprocessors MetricName",maxTerm:276,nodeProps:[["group",-14,36,42,44,50,66,152,154,155,156,157,158,159,161,169,"Expr"]],propSources:[vhe],skippedNodes:[0,34],repeatNodeCount:3,tokenData:"4{~RwX^#lpq#lqr$ars$tst&luv'Twx'Yxy({yz)Qz{)V{|)[|})c}!O)h!O!P)o!P!Q*u!Q!R*z!R![+u![!]1O!^!_1z!_!`2a!`!a2v!b!c3]!c!}3b!}#O3x#P#Q3}#Q#R4S#R#S3b#S#T4X#T#o3b#o#p4q#q#r4v#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~#qY$z~X^#lpq#l#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~$dQ!_!`$j#r#s$o~$oO!c~~$tO$m~~$yWz~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f<%lO$t~%hOz~~%kRO;'S$t;'S;=`%t;=`O$t~%yXz~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f;=`<%l$t<%lO$t~&iP;=`<%l$t~&qSr~OY&lZ;'S&l;'S;=`&}<%lO&l~'QP;=`<%l&l~'YO!X~~'_Wz~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u<%lO'Y~'zRO;'S'Y;'S;=`(T;=`O'Y~(YXz~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u;=`<%l'Y<%lO'Y~(xP;=`<%l'Y~)QO$|~~)VO%O~~)[O!V~R)cO%RP!YQ~)hO$}~R)oO%QP!ZQ~)rP!Q![)u~)zS%S~!Q![)u!g!h*W#R#S)o#X#Y*W~*ZR{|*d}!O*d!Q![*j~*gP!Q![*j~*oQ%S~!Q![*j#R#S*d~*zO!W~~+P[%S~!O!P)o!Q![+u!g!h*W#R#S,m#W#X-X#X#Y*W#[#]-p#a#b.U#g#h.x#k#l/Z#l#m0d#m#n/u~+zZ%S~!O!P)o!Q![+u!g!h*W#R#S,m#W#X-X#X#Y*W#[#]-p#a#b.U#g#h.x#k#l/Z#m#n/u~,pP!Q![,s~,xT%S~!O!P)o!Q![,s!g!h*W#R#S,m#X#Y*W~-^P%S~!Q![-a~-dS!Q![-a#[#]-p#a#b.U#g#h.x~-uP%S~!Q![-x~-{R!Q![-x#a#b.U#g#h.x~.ZQ%S~!Q![.a#g#h.s~.dR!Q![.a#a#b.m#g#h.x~.pP#g#h.s~.xO%S~~.}P%S~!Q![/Q~/TQ!Q![/Q#a#b.m~/`P%S~!Q![/c~/fT!Q![/c#W#X-X#[#]-p#a#b.U#g#h.x~/zP%S~!Q![/}~0QU!Q![/}#W#X-X#[#]-p#a#b.U#g#h.x#k#l/Z~0gR!Q![0p!c!i0p#T#Z0p~0uR%S~!Q![0p!c!i0p#T#Z0pV1VT&|S!gR!Q![1f![!]1f!c!}1f#R#S1f#T#o1fR1kT!gR!Q![1f![!]1f!c!}1f#R#S1f#T#o1f~2PQ!b~!P!Q2V!_!`2[~2[O!_~~2aO!a~~2fQ$kP!_!`2l#r#s2qQ2qO![Q~2vO$l~~2{Q!^~!P!Q3R!_!`3W~3WO!`~~3]O!]~~3bO$p~V3iT!gRxS!Q![3b![!]1f!c!}3b#R#S3b#T#o3b~3}O&z~~4SO&{~~4XO}~~4[TO#S4X#S#T%c#T;'S4X;'S;=`4k<%lO4X~4nP;=`<%l4X~4vO&}~~4{O'O~",tokenizers:[0,1,2],topRules:{PromQL:[0,35],MetricName:[1,172]},specialized:[{term:69,get:(t,e)=>I5(t)<<1,external:I5},{term:69,get:(t,e)=>B5(t)<<1|1,external:B5,extend:!0},{term:69,get:t=>bhe[t]||-1}],tokenPrec:0}),xhe=3,Ahe=4,whe=5,kz=9,Oz=11,She=15,Ez=16,Mz=17,Dz=21,UE=24,WE=25,VE=26,jhe=35,u2=36,Che=37,qp=39,fv=40,pv=41,_m=42,Th=43,$p=44,_he=45,Rz=46,The=47,khe=48,Ohe=49,h2=50,Ehe=51,Mhe=52,Dhe=53,Rhe=54,Nhe=55,Phe=56,Ihe=57,rT=58,iT=59,sT=60,Nz=61,Pz=62,aT=63,oT=64,mv=65,lT=66,Bhe=68,rA=69,Lhe=70,Fhe=71,Hhe=72,zhe=73,qhe=74,$he=75,Qhe=76,Uhe=77,Whe=78,Vhe=79,Iz=80,Yhe=81,Ghe=82,Xhe=83,Khe=84,Zhe=85,Jhe=86,ede=87,tde=88,nde=89,rde=90,ide=91,cT=92,sde=93,ade=94,ode=95,lde=96,cde=97,ude=98,hde=99,dde=100,fde=101,pde=102,mde=103,gde=104,vde=105,bde=106,yde=107,uT=108,xde=109,Ade=110,wde=111,Sde=112,jde=113,Cde=114,_de=115,Tde=116,kde=117,Ode=118,Ede=119,Mde=120,Dde=121,Rde=122,Nde=123,Pde=124,Ide=125,Bde=126,Lde=127,Fde=128,Hde=129,zde=130,hT=131,Bz=132,qde=133,$de=134,Qde=135,Ude=136,Wde=137,Vde=138,Yde=139,Gde=140,Xde=141,Kde=142,Zde=143,Jde=144,efe=145,tfe=146,nfe=147,rfe=148,ife=149,sfe=150,afe=151,Tm=152,iA=153,gv=154,Lz=155,Fz=156,Hz=157,vf=158,zz=159,ub=161,Qp=162,Ah=163,sA=164,hb=165,qz=166,$z=167,uf=168,YE=169;var ie;(function(t){t.none="none",t.vector="vector",t.scalar="scalar",t.matrix="matrix",t.string="string"})(ie||(ie={}));const ofe={[Fhe]:{name:"abs",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Lhe]:{name:"absent",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Bhe]:{name:"absent_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Hhe]:{name:"acos",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[zhe]:{name:"acosh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[qhe]:{name:"asin",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[$he]:{name:"asinh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Qhe]:{name:"atan",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Uhe]:{name:"atanh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Whe]:{name:"avg_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Vhe]:{name:"ceil",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Iz]:{name:"changes",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Yhe]:{name:"clamp",argTypes:[ie.vector,ie.scalar,ie.scalar],variadic:0,returnType:ie.vector},[Ghe]:{name:"clamp_max",argTypes:[ie.vector,ie.scalar],variadic:0,returnType:ie.vector},[Xhe]:{name:"clamp_min",argTypes:[ie.vector,ie.scalar],variadic:0,returnType:ie.vector},[Khe]:{name:"cos",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Zhe]:{name:"Cosh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Jhe]:{name:"count_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[ede]:{name:"days_in_month",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[tde]:{name:"day_of_month",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[nde]:{name:"day_of_week",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[rde]:{name:"day_of_year",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[ide]:{name:"deg",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[cT]:{name:"delta",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[sde]:{name:"deriv",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[ade]:{name:"exp",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[ode]:{name:"first_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[lde]:{name:"floor",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[gde]:{name:"histogram_avg",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[cde]:{name:"histogram_count",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[ude]:{name:"histogram_fraction",argTypes:[ie.scalar,ie.scalar,ie.vector],variadic:0,returnType:ie.vector},[hde]:{name:"histogram_quantile",argTypes:[ie.scalar,ie.vector],variadic:0,returnType:ie.vector},[dde]:{name:"histogram_quantiles",argTypes:[ie.vector,ie.string,ie.scalar,ie.scalar],variadic:10,returnType:ie.vector},[fde]:{name:"histogram_stddev",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[pde]:{name:"histogram_stdvar",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[mde]:{name:"histogram_sum",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[vde]:{name:"double_exponential_smoothing",argTypes:[ie.matrix,ie.scalar,ie.scalar],variadic:0,returnType:ie.vector},[bde]:{name:"hour",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[yde]:{name:"idelta",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[uT]:{name:"increase",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[xde]:{name:"info",argTypes:[ie.vector,ie.vector],variadic:1,returnType:ie.vector},[Ade]:{name:"irate",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[wde]:{name:"label_replace",argTypes:[ie.vector,ie.string,ie.string,ie.string,ie.string],variadic:0,returnType:ie.vector},[Sde]:{name:"label_join",argTypes:[ie.vector,ie.string,ie.string,ie.string],variadic:-1,returnType:ie.vector},[jde]:{name:"last_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Cde]:{name:"ln",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[_de]:{name:"log10",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Tde]:{name:"log2",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[kde]:{name:"mad_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Ode]:{name:"max_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Ede]:{name:"min_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Mde]:{name:"ts_of_first_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Dde]:{name:"ts_of_max_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Rde]:{name:"ts_of_min_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Nde]:{name:"ts_of_last_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Pde]:{name:"minute",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[Ide]:{name:"month",argTypes:[ie.vector],variadic:1,returnType:ie.vector},[Bde]:{name:"pi",argTypes:[],variadic:0,returnType:ie.vector},[Lde]:{name:"predict_linear",argTypes:[ie.matrix,ie.scalar],variadic:0,returnType:ie.vector},[Fde]:{name:"present_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Hde]:{name:"quantile_over_time",argTypes:[ie.scalar,ie.matrix],variadic:0,returnType:ie.vector},[zde]:{name:"rad",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[hT]:{name:"rate",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Bz]:{name:"resets",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[qde]:{name:"round",argTypes:[ie.vector,ie.scalar],variadic:1,returnType:ie.vector},[$de]:{name:"scalar",argTypes:[ie.vector],variadic:0,returnType:ie.scalar},[Qde]:{name:"sgn",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Ude]:{name:"sin",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Wde]:{name:"Sinh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Vde]:{name:"sort",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Yde]:{name:"sort_desc",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Gde]:{name:"sort_by_label",argTypes:[ie.vector,ie.string],variadic:-1,returnType:ie.vector},[Xde]:{name:"sort_by_label_desc",argTypes:[ie.vector,ie.string],variadic:-1,returnType:ie.vector},[Kde]:{name:"sqrt",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[Zde]:{name:"stddev_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[Jde]:{name:"stdvar_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[efe]:{name:"sum_over_time",argTypes:[ie.matrix],variadic:0,returnType:ie.vector},[tfe]:{name:"tan",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[nfe]:{name:"tanh",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[ife]:{name:"time",argTypes:[],variadic:0,returnType:ie.scalar},[rfe]:{name:"timestamp",argTypes:[ie.vector],variadic:0,returnType:ie.vector},[sfe]:{name:"vector",argTypes:[ie.scalar],variadic:0,returnType:ie.vector},[afe]:{name:"year",argTypes:[ie.vector],variadic:1,returnType:ie.vector}};function Qz(t){return ofe[t]}class Uz{constructor(e,n,r){this.type=e,this.name=n,this.value=r}matchesEmpty(){switch(this.type){case hb:return this.value==="";case mv:return this.value!=="";default:return!1}}}var Pl;(function(t){t.CardOneToOne="one-to-one",t.CardManyToOne="many-to-one",t.CardOneToMany="one-to-many",t.CardManyToMany="many-to-many"})(Pl||(Pl={}));function lfe(t,e){const n=new Uz(0,"",""),r=t.cursor();switch(r.type.id){case uf:if(!r.next())return n;do switch(r.type.id){case pv:n.name=e.sliceDoc(r.from,r.to).slice(1,-1);break;case sA:{const i=r.node.firstChild;i&&(n.type=i.type.id);break}case _m:n.value=e.sliceDoc(r.from,r.to).slice(1,-1);break}while(r.nextSibling());break;case Ah:if(!r.next())return n;do switch(r.type.id){case fv:n.name=e.sliceDoc(r.from,r.to);break;case sA:{const i=r.node.firstChild;i&&(n.type=i.type.id);break}case _m:n.value=e.sliceDoc(r.from,r.to).slice(1,-1);break}while(r.nextSibling());break;case pv:n.name="__name__",n.value=e.sliceDoc(r.from,r.to).slice(1,-1),n.type=hb;break}return n}function Wz(t,e){const n=[];return t.forEach(r=>{n.push(lfe(r,e))}),n}function NC(t,e,n){if(!e||e.length===0)return t;let r="";for(const i of e){if(i.name===n||i.value==="")continue;let s="";switch(i.type){case hb:s="=";break;case mv:s="!=";break;case $z:s="!~";break;case qz:s="=~";break;default:s="="}const o=`${i.name}${s}"${i.value}"`;r===""?r=o:r=`${r},${o}`}return`${t}{${r}}`}function GE(t,e){for(;;){if(!t||t.type.id===e)return t;t=t.parent}return null}function wh(t,...e){const n=t.cursor();if(!n.next())return!1;let r=!1;do r=e.some(i=>n.type.id===i||n.type.name===i);while(!r&&n.nextSibling());return r}function aA(t,...e){const n=t.cursor();if(!n.next())return!1;let r=0;do n.type.is(e[r])&&r++;while(r<e.length&&n.nextSibling());return r>=e.length}function Ol(t){var e;if(!t)return ie.none;switch(t.type.id){case u2:return ie.vector;case ub:return ie.vector;case gv:return Ol(t.firstChild);case _m:return ie.string;case h2:return ie.scalar;case Tm:return ie.matrix;case vf:return ie.matrix;case Fz:return Ol(t.firstChild);case Lz:return Ol(t.firstChild);case Hz:return Ol(t.getChild("Expr"));case zz:return Ol(t.getChild("Expr"));case $p:{const n=Ol(t.firstChild),r=Ol(t.lastChild);return n===ie.scalar&&r===ie.scalar?ie.scalar:ie.vector}case lT:{const n=(e=t.firstChild)===null||e===void 0?void 0:e.firstChild;return n?Qz(n.type.id).returnType:ie.none}case YE:return Ol(t.getChild("Expr"));default:return ie.none}}let dT=[],Vz=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?Vz:dT).push(n=n+t[e])})();function cfe(t){if(t<768)return!1;for(let e=0,n=dT.length;;){let r=e+n>>1;if(t<dT[r])n=r;else if(t>=Vz[r])e=r+1;else return!0;if(e==n)return!1}}function L5(t){return t>=127462&&t<=127487}const F5=8205;function ufe(t,e,n=!0,r=!0){return(n?Yz:hfe)(t,e,r)}function Yz(t,e,n){if(e==t.length)return e;e&&Gz(t.charCodeAt(e))&&Xz(t.charCodeAt(e-1))&&e--;let r=PC(t,e);for(e+=H5(r);e<t.length;){let i=PC(t,e);if(r==F5||i==F5||n&&cfe(i))e+=H5(i),r=i;else if(L5(i)){let s=0,o=e-2;for(;o>=0&&L5(PC(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function hfe(t,e,n){for(;e>0;){let r=Yz(t,e-2,n);if(r<e)return r;e--}return 0}function PC(t,e){let n=t.charCodeAt(e);if(!Xz(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Gz(r)?(n-55296<<10)+(r-56320)+65536:n}function Gz(t){return t>=56320&&t<57344}function Xz(t){return t>=55296&&t<56320}function H5(t){return t<65536?1:2}class wn{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=km(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Il.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=km(this,e,n);let r=[];return this.decompose(e,n,r,0),Il.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Fg(this),s=new Fg(e);for(let o=n,l=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new Fg(this,e)}iterRange(e,n=this.length){return new Kz(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Zz(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?wn.empty:e.length<=32?new ai(e):Il.from(ai.split(e,[]))}}class ai extends wn{constructor(e,n=dfe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((n?r:l)>=e)return new ffe(i,l,r,o);i=l+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new ai(z5(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=ox(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new ai(l,o.length+s.length));else{let u=l.length>>1;r.push(new ai(l.slice(0,u)),new ai(l.slice(u)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof ai))return super.replace(e,n,r);[e,n]=km(this,e,n);let i=ox(this.text,ox(r.text,z5(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new ai(i,s):Il.from(ai.split(i,[]),s)}sliceString(e,n=this.length,r=`
`){[e,n]=km(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let l=this.text[o],u=s+l.length;s>e&&o&&(i+=r),e<u&&n>s&&(i+=l.slice(Math.max(0,e-s),n-s)),s=u+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new ai(r,i)),r=[],i=-1);return i>-1&&n.push(new ai(r,i)),n}}class Il extends wn{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,u=r+o.lines-1;if((n?u:l)>=e)return o.lineInner(e,n,r,i);i=l+1,r=u+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let l=this.children[s],u=o+l.length;if(e<=u&&n>=o){let h=i&((o<=e?1:0)|(u>=n?2:0));o>=e&&u<=n&&!h?r.push(l):l.decompose(e-o,n-o,r,h)}o=u+1}}replace(e,n,r){if([e,n]=km(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&n<=l){let u=o.replace(e-s,n-s,r),h=this.lines-o.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let f=this.children.slice();return f[i]=u,new Il(f,this.length-(n-e)+r.length)}return super.replace(s,l,u)}s=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=km(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let l=this.children[s],u=o+l.length;o>e&&s&&(i+=r),e<u&&n>o&&(i+=l.sliceString(e-o,n-o,r)),o=u+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Il))return 0;let r=0,[i,s,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==l)return r;let u=this.children[i],h=e.children[s];if(u!=h)return r+u.scanIdentical(h,n);r+=u.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let b of e)b.flatten(v);return new ai(v,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],u=0,h=-1,f=[];function p(v){let b;if(v.lines>s&&v instanceof Il)for(let x of v.children)p(x);else v.lines>o&&(u>o||!u)?(m(),l.push(v)):v instanceof ai&&u&&(b=f[f.length-1])instanceof ai&&v.lines+b.lines<=32?(u+=v.lines,h+=v.length+1,f[f.length-1]=new ai(b.text.concat(v.text),b.length+1+v.length)):(u+v.lines>i&&m(),u+=v.lines,h+=v.length+1,f.push(v))}function m(){u!=0&&(l.push(f.length==1?f[0]:Il.from(f,h)),h=-1,u=f.length=0)}for(let v of e)p(v);return m(),l.length==1?l[0]:new Il(l,n)}}wn.empty=new ai([""],0);function dfe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function ox(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let l=t[s],u=i+l.length;u>=n&&(u>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=u+1}return e}function z5(t,e,n){return ox(t,[""],e,n)}class Fg{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof ai?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof ai?i.text.length:i.children.length;if(o==(n>0?l:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof ai){let u=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,u.length>Math.max(0,e))return this.value=e==0?u:n>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=i.children[o+(n<0?-1:0)];e>u.length?(e-=u.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(u),this.offsets.push(n>0?1:(u instanceof ai?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Kz{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Fg(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Zz{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(wn.prototype[Symbol.iterator]=function(){return this.iter()},Fg.prototype[Symbol.iterator]=Kz.prototype[Symbol.iterator]=Zz.prototype[Symbol.iterator]=function(){return this});class ffe{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function km(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function $i(t,e,n=!0,r=!0){return ufe(t,e,n,r)}function pfe(t){return t>=56320&&t<57344}function mfe(t){return t>=55296&&t<56320}function ia(t,e){let n=t.charCodeAt(e);if(!mfe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return pfe(r)?(n-55296<<10)+(r-56320)+65536:n}function XE(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bl(t){return t<65536?1:2}const fT=/\r\n?|\n/;var ls=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ls||(ls={}));class Vl{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){pT(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Vl(e)}composeDesc(e){return this.empty?e:e.empty?this:Jz(this,e)}mapDesc(e,n=!1){return e.empty?this:mT(this,e,n)}mapPos(e,n=-1,r=ls.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],u=this.sections[o++],h=i+l;if(u<0){if(h>e)return s+(e-i);s+=l}else{if(r!=ls.Simple&&h>=e&&(r==ls.TrackDel&&i<e&&h>e||r==ls.TrackBefore&&i<e||r==ls.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!l)return e==i||n<0?s:s+u;s+=u}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=n&&l>=e)return i<e&&l>n?"cover":!0;i=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Vl(e)}static create(e){return new Vl(e)}}class _i extends Vl{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return pT(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return mT(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=o;let u=i>>1;for(;r.length<u;)r.push(wn.empty);r.push(o?e.slice(s,s+o):wn.empty)}s+=o}return new _i(n,r)}compose(e){return this.empty?e:e.empty?this:Jz(this,e,!0)}map(e,n=!1){return e.empty?this:mT(this,e,n,!0)}iterChanges(e,n=!1){pT(this,e,n)}get desc(){return Vl.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new vv(this);e:for(let o=0,l=0;;){let u=o==e.length?1e9:e[o++];for(;l<u||l==u&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,u-l);js(i,f,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;js(n,f,p),p>0&&Sh(r,n,s.text),s.forward(f),l+=f}let h=e[o++];for(;l<h;){if(s.done)break e;let f=Math.min(s.len,h-l);js(n,f,-1),js(i,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new _i(n,r),filtered:Vl.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,l=null;function u(f=!1){if(!f&&!i.length)return;o<n&&js(i,n-o,-1);let p=new _i(i,s);l=l?l.compose(p.map(l)):p,i=[],s=[],o=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof _i){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);u(),l=l?l.compose(f.map(l)):f}else{let{from:p,to:m=p,insert:v}=f;if(p>m||p<0||m>n)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${n})`);let b=v?typeof v=="string"?wn.of(v.split(r||fT)):v:wn.empty,x=b.length;if(p==m&&x==0)return;p<o&&u(),p>o&&js(i,p-o,-1),js(i,m-p,x),Sh(s,i,b),o=m}}return h(e),u(!l),l}static empty(e){return new _i(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(wn.empty);r[i]=wn.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new _i(n,r)}static createSet(e,n){return new _i(e,n)}}function js(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Sh(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(wn.empty);t.push(n)}}function pT(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let l=t.sections[o++],u=t.sections[o++];if(u<0)i+=l,s+=l;else{let h=i,f=s,p=wn.empty;for(;h+=l,f+=u,u&&r&&(p=p.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],u=t.sections[o++];e(i,h,s,f,p),i=h,s=f}}}function mT(t,e,n,r=!1){let i=[],s=r?[]:null,o=new vv(t),l=new vv(e);for(let u=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);js(i,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||u==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!n))){let h=l.len;for(js(i,l.ins,-1);h;){let f=Math.min(o.len,h);o.ins>=0&&u<o.i&&o.len<=f&&(js(i,0,o.ins),s&&Sh(s,i,o.text),u=o.i),o.forward(f),h-=f}l.next()}else if(o.ins>=0){let h=0,f=o.len;for(;f;)if(l.ins==-1){let p=Math.min(f,l.len);h+=p,f-=p,l.forward(p)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;js(i,h,u<o.i?o.ins:0),s&&u<o.i&&Sh(s,i,o.text),u=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?_i.createSet(i,s):Vl.create(i);throw new Error("Mismatched change set lengths")}}}function Jz(t,e,n=!1){let r=[],i=n?[]:null,s=new vv(t),o=new vv(e);for(let l=!1;;){if(s.done&&o.done)return i?_i.createSet(r,i):Vl.create(r);if(s.ins==0)js(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)js(r,0,o.ins,l),i&&Sh(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,o.len),h=r.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;js(r,u,f,l),i&&f&&Sh(i,r,o.text)}else o.ins==-1?(js(r,s.off?0:s.len,u,l),i&&Sh(i,r,s.textBit(u))):(js(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&Sh(i,r,o.text));l=(s.ins>u||o.ins>=0&&o.len>u)&&(l||r.length>h),s.forward2(u),o.forward(u)}}}}class vv{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?wn.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?wn.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class qd{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new qd(r,i,this.flags)}extend(e,n=e,r=0){if(e<=this.anchor&&n>=this.anchor)return Me.range(e,n,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Me.range(this.anchor,i,void 0,void 0,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Me.range(e.anchor,e.head)}static create(e,n,r){return new qd(e,n,r)}}class Me{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Me.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Me([this.main],0)}addRange(e,n=!0){return Me.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Me.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Me(e.ranges.map(n=>qd.fromJSON(n)),e.main)}static single(e,n=e){return new Me([Me.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return Me.normalized(e.slice(),n);r=s.to}return new Me(e,n)}static cursor(e,n=0,r,i){return qd.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i,s){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=n&&(s=n<e?1:-1),n<e?qd.create(n,e,48|o):qd.create(e,n,(s?s<0?8:16:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,u=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?Me.range(u,l):Me.range(l,u))}}return new Me(e,n)}}function eq(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let KE=0;class mt{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=KE++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new mt(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:ZE),!!e.static,e.enables)}of(e){return new lx([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new lx(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new lx(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function ZE(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class lx{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=KE++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,u=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?u=!0:p=="selection"?h=!0:(((n=e[p.id])!==null&&n!==void 0?n:1)&1)==0&&f.push(e[p.id]);return{create(p){return p.values[o]=r(p),1},update(p,m){if(u&&m.docChanged||h&&(m.docChanged||m.selection)||gT(p,f)){let v=r(p);if(l?!q5(v,p.values[o],i):!i(v,p.values[o]))return p.values[o]=v,1}return 0},reconfigure:(p,m)=>{let v,b=m.config.address[s];if(b!=null){let x=lA(m,b);if(this.dependencies.every(w=>w instanceof mt?m.facet(w)===p.facet(w):w instanceof us?m.field(w,!1)==p.field(w,!1):!0)||(l?q5(v=r(p),x,i):i(v=r(p),x)))return p.values[o]=x,0}else v=r(p);return p.values[o]=v,1}}}}function q5(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function gT(t,e){let n=!1;for(let r of e)Hg(t,r)&1&&(n=!0);return n}function gfe(t,e,n){let r=n.map(u=>t[u.id]),i=n.map(u=>u.type),s=r.filter(u=>!(u&1)),o=t[e.id]>>1;function l(u){let h=[];for(let f=0;f<r.length;f++){let p=lA(u,r[f]);if(i[f]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(u){for(let h of r)Hg(u,h);return u.values[o]=l(u),1},update(u,h){if(!gT(u,s))return 0;let f=l(u);return e.compare(f,u.values[o])?0:(u.values[o]=f,1)},reconfigure(u,h){let f=gT(u,r),p=h.config.facets[e.id],m=h.facet(e);if(p&&!f&&ZE(n,p))return u.values[o]=m,0;let v=l(u);return e.compare(v,m)?(u.values[o]=m,0):(u.values[o]=v,1)}}}const i1=mt.define({static:!0});class us{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new us(KE++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(i1).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(i1),o=i.facet(i1),l;return(l=s.find(u=>u.field==this))&&l!=o.find(u=>u.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,i1.of({field:this,create:e})]}get extension(){return this}}const Bd={lowest:4,low:3,default:2,high:1,highest:0};function ag(t){return e=>new tq(e,t)}const uu={highest:ag(Bd.highest),high:ag(Bd.high),default:ag(Bd.default),low:ag(Bd.low),lowest:ag(Bd.lowest)};class tq{constructor(e,n){this.inner=e,this.prec=n}}class d2{of(e){return new vT(this,e)}reconfigure(e){return d2.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class vT{constructor(e,n){this.compartment=e,this.inner=n}}class oA{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let m of vfe(e,n,o))m instanceof us?i.push(m):(s[m.facet.id]||(s[m.facet.id]=[])).push(m);let l=Object.create(null),u=[],h=[];for(let m of i)l[m.id]=h.length<<1,h.push(v=>m.slot(v));let f=r==null?void 0:r.config.facets;for(let m in s){let v=s[m],b=v[0].facet,x=f&&f[m]||[];if(v.every(w=>w.type==0))if(l[b.id]=u.length<<1|1,ZE(x,v))u.push(r.facet(b));else{let w=b.combine(v.map(A=>A.value));u.push(r&&b.compare(w,r.facet(b))?r.facet(b):w)}else{for(let w of v)w.type==0?(l[w.id]=u.length<<1|1,u.push(w.value)):(l[w.id]=h.length<<1,h.push(A=>w.dynamicSlot(A)));l[b.id]=h.length<<1,h.push(w=>gfe(w,b,v))}}let p=h.map(m=>m(l));return new oA(e,o,p,l,u,s)}}function vfe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let u=i.get(o);if(u!=null){if(u<=l)return;let h=r[u].indexOf(o);h>-1&&r[u].splice(h,1),o instanceof vT&&n.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof vT){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;n.set(o.compartment,h),s(h,l)}else if(o instanceof tq)s(o.inner,o.prec);else if(o instanceof us)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof lx)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,Bd.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(t,Bd.default),r.reduce((o,l)=>o.concat(l))}function Hg(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function lA(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const nq=mt.define(),bT=mt.define({combine:t=>t.some(e=>e),static:!0}),rq=mt.define({combine:t=>t.length?t[0]:void 0,static:!0}),iq=mt.define(),sq=mt.define(),aq=mt.define(),oq=mt.define({combine:t=>t.length?t[0]:!1});class ic{constructor(e,n){this.type=e,this.value=n}static define(){return new bfe}}class bfe{of(e){return new ic(this,e)}}class yfe{constructor(e){this.map=e}of(e){return new Qt(this,e)}}class Qt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Qt(this.type,n)}is(e){return this.type==e}static define(e={}){return new yfe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Qt.reconfigure=Qt.define();Qt.appendConfig=Qt.define();class bi{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&eq(r,n.newLength),s.some(l=>l.type==bi.time)||(this.annotations=s.concat(bi.time.of(Date.now())))}static create(e,n,r,i,s,o){return new bi(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(bi.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}bi.time=ic.define();bi.userEvent=ic.define();bi.addToHistory=ic.define();bi.remote=ic.define();function xfe(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function lq(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=_i.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Qt.mapEffects(t.effects,i).concat(Qt.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function yT(t,e,n){let r=e.selection,i=Up(e.annotations);return e.userEvent&&(i=i.concat(bi.userEvent.of(e.userEvent))),{changes:e.changes instanceof _i?e.changes:_i.of(e.changes||[],n,t.facet(rq)),selection:r&&(r instanceof Me?r:Me.single(r.anchor,r.head)),effects:Up(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function cq(t,e,n){let r=yT(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=lq(r,yT(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=bi.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return wfe(n?Afe(i):i)}function Afe(t){let e=t.startState,n=!0;for(let i of e.facet(iq)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:xfe(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=_i.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=bi.create(e,i,t.selection&&t.selection.map(s),Qt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(sq);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof bi?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof bi?t=s[0]:t=cq(e,Up(s),!1)}return t}function wfe(t){let e=t.startState,n=e.facet(aq),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=lq(r,yT(e,s,t.changes.newLength),!0))}return r==t?t:bi.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Sfe=[];function Up(t){return t==null?Sfe:Array.isArray(t)?t:[t]}var Dr=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Dr||(Dr={}));const jfe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let xT;try{xT=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Cfe(t){if(xT)return xT.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||jfe.test(n)))return!0}return!1}function _fe(t){return e=>{if(!/\S/.test(e))return Dr.Space;if(Cfe(e))return Dr.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Dr.Word;return Dr.Other}}class bn{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Hg(this,l<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Hg(this,r),lA(this,r)}update(...e){return cq(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let l of e.effects)l.is(d2.reconfigure)?(n&&(i=new Map,n.compartments.forEach((u,h)=>i.set(h,u)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(Qt.reconfigure)?(n=null,r=l.value):l.is(Qt.appendConfig)&&(n=null,r=Up(r).concat(l.value));let s;n?s=e.startState.values.slice():(n=oA.resolve(r,i,this),s=new bn(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let o=e.startState.facet(bT)?e.newSelection:e.newSelection.asSingle();new bn(n,e.newDoc,o,s,(l,u)=>u.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Me.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Up(r.effects);for(let l=1;l<n.ranges.length;l++){let u=e(n.ranges[l]),h=this.changes(u.changes),f=h.map(i);for(let m=0;m<l;m++)s[m]=s[m].map(f);let p=i.mapDesc(h,!0);s.push(u.range.map(p)),i=i.compose(f),o=Qt.mapEffects(o,f).concat(Qt.mapEffects(Up(u.effects),p))}return{changes:i,selection:Me.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof _i?e:_i.of(e,this.doc.length,this.facet(bn.lineSeparator))}toText(e){return wn.of(e.split(this.facet(bn.lineSeparator)||fT))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Hg(this,n),lA(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof us&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(u=>o.spec.fromJSON(l,u)))}}return bn.create({doc:e.doc,selection:Me.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=oA.resolve(e.extensions||[],new Map),r=e.doc instanceof wn?e.doc:wn.of((e.doc||"").split(n.staticFacet(bn.lineSeparator)||fT)),i=e.selection?e.selection instanceof Me?e.selection:Me.single(e.selection.anchor,e.selection.head):Me.single(0);return eq(i,r.length),n.staticFacet(bT)||(i=i.asSingle()),new bn(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(bn.tabSize)}get lineBreak(){return this.facet(bn.lineSeparator)||`
`}get readOnly(){return this.facet(oq)}phrase(e,...n){for(let r of this.facet(bn.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(nq))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return _fe(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let u=$i(n,o,!1);if(s(n.slice(u,o))!=Dr.Word)break;o=u}for(;l<i;){let u=$i(n,l);if(s(n.slice(l,u))!=Dr.Word)break;l=u}return o==l?null:Me.range(o+r,l+r)}}bn.allowMultipleSelections=bT;bn.tabSize=mt.define({combine:t=>t.length?t[0]:4});bn.lineSeparator=rq;bn.readOnly=oq;bn.phrases=mt.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});bn.languageData=nq;bn.changeFilter=iq;bn.transactionFilter=sq;bn.transactionExtender=aq;d2.reconfigure=Qt.define();function sc(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ph{eq(e){return this==e}range(e,n=e){return bv.create(e,n,this)}}Ph.prototype.startSide=Ph.prototype.endSide=0;Ph.prototype.point=!1;Ph.prototype.mapMode=ls.TrackDel;function JE(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}class bv{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new bv(e,n,r)}}function AT(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class e6{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let u=o+l>>1,h=s[u]-e||(r?this.value[u].endSide:this.value[u].startSide)-n;if(u==o)return h>=0?o:l;h>=0?l=u:o=u+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,l=-1;for(let u=0;u<this.value.length;u++){let h=this.value[u],f=this.from[u]+e,p=this.to[u]+e,m,v;if(f==p){let b=n.mapPos(f,h.startSide,h.mapMode);if(b==null||(m=v=b,h.startSide!=h.endSide&&(v=n.mapPos(f,h.endSide),v<m)))continue}else if(m=n.mapPos(f,h.startSide),v=n.mapPos(p,h.endSide),m>v||m==v&&h.startSide>0&&h.endSide<=0)continue;(v-m||h.endSide-h.startSide)<0||(o<0&&(o=m),h.point&&(l=Math.max(l,v-m)),r.push(h),i.push(m-o),s.push(v-o))}return{mapped:r.length?new e6(i,s,r,l):null,pos:o}}}class pn{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new pn(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(AT)),this.isEmpty)return n.length?pn.of(n):this;let l=new uq(this,null,-1).goto(0),u=0,h=[],f=new tu;for(;l.value||u<n.length;)if(u<n.length&&(l.from-n[u].from||l.startSide-n[u].value.startSide)>=0){let p=n[u++];f.addInner(p.from,p.to,p.value)||h.push(p)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(u==n.length||this.chunkEnd(l.chunkIndex)<n[u].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||h.push(bv.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?pn.empty:this.nextLayer.update({add:h,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],u=this.chunk[o],h=e.touchesRange(l,l+u.length);if(h===!1)i=Math.max(i,u.maxPoint),n.push(u),r.push(e.mapPos(l));else if(h===!0){let{mapped:f,pos:p}=u.map(l,e);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(p))}}let s=this.nextLayer.map(e);return n.length==0?s:new pn(r,n,s||pn.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return yv.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return yv.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),l=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),u=$5(o,l,r),h=new og(o,u,s),f=new og(l,u,s);r.iterGaps((p,m,v)=>Q5(h,p,f,m,v,i)),r.empty&&r.length==0&&Q5(h,0,f,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(f=>!f.isEmpty&&n.indexOf(f)<0),o=n.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=$5(s,o),u=new og(s,l,0).goto(r),h=new og(o,l,0).goto(r);for(;;){if(u.to!=h.to||!wT(u.active,h.active)||u.point&&(!h.point||!JE(u.point,h.point)))return!1;if(u.to>i)return!0;u.next(),h.next()}}static spans(e,n,r,i,s=-1){let o=new og(e,null,s).goto(n),l=n,u=o.openStart;for(;;){let h=Math.min(o.to,r);if(o.point){let f=o.activeForPoint(o.to),p=o.pointFrom<n?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,u);i.point(l,h,o.point,f,p,o.pointRank),u=Math.min(o.openEnd(h),f.length)}else h>l&&(i.span(l,h,o.active,u),u=o.openEnd(h));if(o.to>r)return u+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,n=!1){let r=new tu;for(let i of e instanceof bv?[e]:n?Tfe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return pn.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=pn.empty;i=i.nextLayer)n=new pn(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}pn.empty=new pn([],[],null,-1);function Tfe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(AT(e,r)>0)return t.slice().sort(AT);e=r}return t}pn.empty.nextLayer=pn.empty;class tu{finishChunk(e){this.chunks.push(new e6(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new tu)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(pn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=pn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function $5(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(n?n.mapPos(l):l)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class uq{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class yv{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new uq(o,n,r,s));return i.length==1?i[0]:new yv(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)IC(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)IC(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),IC(this.heap,0)}}}function IC(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class og{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=yv.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){s1(this.active,e),s1(this.activeTo,e),s1(this.activeRank,e),this.minActive=U5(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;a1(this.active,n,r),a1(this.activeTo,n,i),a1(this.activeRank,n,s),e&&a1(e,n,this.cursor.from),this.minActive=U5(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&s1(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function Q5(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,l=r,u=r-e,h=!!s.boundChange;for(let f=!1;;){let p=t.to+u-n.to,m=p||t.endSide-n.endSide,v=m<0?t.to+u:n.to,b=Math.min(v,o);if(t.point||n.point?(t.point&&n.point&&JE(t.point,n.point)&&wT(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(l,b,t.point,n.point),f=!1):(f&&s.boundChange(l),b>l&&!wT(t.active,n.active)&&s.compareRange(l,b,t.active,n.active),h&&b<o&&(p||t.openEnd(v)!=n.openEnd(v))&&(f=!0)),v>o)break;l=v,m<=0&&t.next(),m>=0&&n.next()}}function wT(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!JE(t[n],e[n]))return!1;return!0}function s1(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function a1(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function U5(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function e0(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=$i(t,i));return r}function ST(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=$i(t,i)}return r===!0?-1:t.length}const jT="ͼ",W5=typeof Symbol>"u"?"__"+jT:Symbol.for(jT),CT=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),V5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ih{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,u,h){let f=[],p=/^@(\w+)\b/.exec(o[0]),m=p&&p[1]=="keyframes";if(p&&l==null)return u.push(o[0]+";");for(let v in l){let b=l[v];if(/&/.test(v))s(v.split(/,\s*/).map(x=>o.map(w=>x.replace(/&/,w))).reduce((x,w)=>x.concat(w)),b,u);else if(b&&typeof b=="object"){if(!p)throw new RangeError("The value of a property ("+v+") should be a primitive value.");s(i(v),b,f,m)}else b!=null&&f.push(v.replace(/_.*/,"").replace(/[A-Z]/g,x=>"-"+x.toLowerCase())+": "+b+";")}(f.length||m)&&u.push((r&&!p&&!h?o.map(r):o).join(", ")+" {"+f.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=V5[W5]||1;return V5[W5]=e+1,jT+e.toString(36)}static mount(e,n,r){let i=e[CT],s=r&&r.nonce;i?s&&i.setNonce(s):i=new kfe(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let Y5=new Map;class kfe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=Y5.get(r);if(s)return e[CT]=s;this.sheet=new i.CSSStyleSheet,Y5.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[CT]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],u=this.modules.indexOf(l);if(u<s&&u>-1&&(this.modules.splice(u,1),s--,u=-1),u==-1){if(this.modules.splice(s++,0,l),r)for(let h=0;h<l.rules.length;h++)r.insertRule(l.rules[h],i++)}else{for(;s<u;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let u=0;u<this.modules.length;u++)o+=this.modules[u].getRules()+`
`;this.styleTag.textContent=o;let l=n.head||n;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Bh={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},xv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ofe=typeof navigator<"u"&&/Mac/.test(navigator.platform),Efe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var os=0;os<10;os++)Bh[48+os]=Bh[96+os]=String(os);for(var os=1;os<=24;os++)Bh[os+111]="F"+os;for(var os=65;os<=90;os++)Bh[os]=String.fromCharCode(os+32),xv[os]=String.fromCharCode(os);for(var BC in Bh)xv.hasOwnProperty(BC)||(xv[BC]=Bh[BC]);function Mfe(t){var e=Ofe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Efe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?xv:Bh)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function mr(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)hq(t,arguments[e]);return t}function hq(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)hq(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let Bs=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},_T=typeof document<"u"?document:{documentElement:{style:{}}};const TT=/Edge\/(\d+)/.exec(Bs.userAgent),dq=/MSIE \d/.test(Bs.userAgent),kT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bs.userAgent),f2=!!(dq||kT||TT),G5=!f2&&/gecko\/(\d+)/i.test(Bs.userAgent),LC=!f2&&/Chrome\/(\d+)/.exec(Bs.userAgent),Dfe="webkitFontSmoothing"in _T.documentElement.style,OT=!f2&&/Apple Computer/.test(Bs.vendor),X5=OT&&(/Mobile\/\w+/.test(Bs.userAgent)||Bs.maxTouchPoints>2);var pt={mac:X5||/Mac/.test(Bs.platform),windows:/Win/.test(Bs.platform),linux:/Linux|X11/.test(Bs.platform),ie:f2,ie_version:dq?_T.documentMode||6:kT?+kT[1]:TT?+TT[1]:0,gecko:G5,gecko_version:G5?+(/Firefox\/(\d+)/.exec(Bs.userAgent)||[0,0])[1]:0,chrome:!!LC,chrome_version:LC?+LC[1]:0,ios:X5,android:/Android\b/.test(Bs.userAgent),webkit_version:Dfe?+(/\bAppleWebKit\/(\d+)/.exec(Bs.userAgent)||[0,0])[1]:0,safari:OT,safari_version:OT?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Bs.userAgent)||[0,0])[1]:0,tabSize:_T.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function t6(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const cA=Object.create(null);function n6(t,e,n){if(t==e)return!0;t||(t=cA),e||(e=cA);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Rfe(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function K5(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function Nfe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ul{eq(e){return!1}updateDOM(e,n,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var cs=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(cs||(cs={}));class kt extends Ph{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new db(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new bf(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=fq(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new bf(e,r,i,n,e.widget||null,!0)}static line(e){return new fb(e)}static set(e,n=!1){return pn.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}kt.none=pn.empty;class db extends kt{constructor(e){let{start:n,end:r}=fq(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?t6(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||cA}eq(e){return this==e||e instanceof db&&this.tagName==e.tagName&&n6(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}db.prototype.point=!1;class fb extends kt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof fb&&this.spec.class==e.spec.class&&n6(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}fb.prototype.mapMode=ls.TrackBefore;fb.prototype.point=!0;class bf extends kt{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?ls.TrackBefore:ls.TrackAfter:ls.TrackDel}get type(){return this.startSide!=this.endSide?cs.WidgetRange:this.startSide<=0?cs.WidgetBefore:cs.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof bf&&Pfe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}bf.prototype.point=!0;function fq(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function Pfe(t,e){return t==e||!!(t&&e&&t.compare(e))}function Wp(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Av extends Ph{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof Av&&this.tagName==e.tagName&&n6(this.attributes,e.attributes)}static create(e){return new Av(e.tagName,e.attributes||cA)}static set(e,n=!1){return pn.of(e,n)}}Av.prototype.startSide=Av.prototype.endSide=-1;function wv(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function ET(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function zg(t,e){if(!e.anchorNode)return!1;try{return ET(t,e.anchorNode)}catch{return!1}}function qg(t){return t.nodeType==3?jv(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function $g(t,e,n,r){return n?Z5(t,e,n,r,-1)||Z5(t,e,n,r,1):!1}function Lh(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function uA(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Z5(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:nu(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Lh(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?nu(t):0}else return!1}}function nu(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Sv(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Ife(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function pq(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Bfe(t,e,n,r,i,s,o,l){let u=t.ownerDocument,h=u.defaultView||window;for(let f=t,p=!1;f&&!p;)if(f.nodeType==1){let m,v=f==u.body,b=1,x=1;if(v)m=Ife(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let j=f.getBoundingClientRect();({scaleX:b,scaleY:x}=pq(f,j)),m={left:j.left,right:j.left+f.clientWidth*b,top:j.top,bottom:j.top+f.clientHeight*x}}let w=0,A=0;if(i=="nearest")e.top<m.top?(A=e.top-(m.top+o),n>0&&e.bottom>m.bottom+A&&(A=e.bottom-m.bottom+o)):e.bottom>m.bottom&&(A=e.bottom-m.bottom+o,n<0&&e.top-A<m.top&&(A=e.top-(m.top+o)));else{let j=e.bottom-e.top,C=m.bottom-m.top;A=(i=="center"&&j<=C?e.top+j/2-C/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-C+o)-m.top}if(r=="nearest"?e.left<m.left?(w=e.left-(m.left+s),n>0&&e.right>m.right+w&&(w=e.right-m.right+s)):e.right>m.right&&(w=e.right-m.right+s,n<0&&e.left<m.left+w&&(w=e.left-(m.left+s))):w=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==l?e.left-s:e.right-(m.right-m.left)+s)-m.left,w||A)if(v)h.scrollBy(w,A);else{let j=0,C=0;if(A){let _=f.scrollTop;f.scrollTop+=A/x,C=(f.scrollTop-_)*x}if(w){let _=f.scrollLeft;f.scrollLeft+=w/b,j=(f.scrollLeft-_)*b}e={left:e.left-j,top:e.top-C,right:e.right-j,bottom:e.bottom-C},j&&Math.abs(j-w)<1&&(r="nearest"),C&&Math.abs(C-A)<1&&(i="nearest")}if(v)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function mq(t,e=!0){let n=t.ownerDocument,r=null,i=null;for(let s=t.parentNode;s&&!(s==n.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class Lfe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?nu(n):0),r,Math.min(e.focusOffset,r?nu(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Ed=null;pt.safari&&pt.safari_version>=26&&(Ed=!1);function gq(t){if(t.setActive)return t.setActive();if(Ed)return t.focus(Ed);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ed==null?{get preventScroll(){return Ed={preventScroll:!0},!0}}:void 0),!Ed){Ed=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let J5;function jv(t,e,n=e){let r=J5||(J5=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Vp(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function Ffe(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function Hfe(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,nu(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=nu(n))}else{if(n==t)return!0;r=Lh(n),n=n.parentNode}}function vq(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function bq(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=nu(n)}else if(n.parentNode&&!uA(n))r=Lh(n),n=n.parentNode;else return null}}function yq(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!uA(n))r=Lh(n)+1,n=n.parentNode;else return null}}class Jo{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Jo(e.parentNode,Lh(e),n)}static after(e,n){return new Jo(e.parentNode,Lh(e)+1,n)}}var ur=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(ur||(ur={}));const yf=ur.LTR,r6=ur.RTL;function xq(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const zfe=xq("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),qfe=xq("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),MT=Object.create(null),jl=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);MT[e]=n,MT[n]=-e}function Aq(t){return t<=247?zfe[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?qfe[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const $fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Fl{get dir(){return this.level%2?r6:yf}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=n&&l.to>=n){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<n:l.to>n:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function wq(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!wq(r.inner,i.inner))return!1}return!0}const ar=[];function Qfe(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:n,u=s?256:i;for(let h=o,f=u,p=u;h<l;h++){let m=Aq(t.charCodeAt(h));m==512?m=f:m==8&&p==4&&(m=16),ar[h]=m==4?2:m,m&7&&(p=m),f=m}for(let h=o,f=u,p=u;h<l;h++){let m=ar[h];if(m==128)h<l-1&&f==ar[h+1]&&f&24?m=ar[h]=f:ar[h]=256;else if(m==64){let v=h+1;for(;v<l&&ar[v]==64;)v++;let b=h&&f==8||v<n&&ar[v]==8?p==1?1:8:256;for(let x=h;x<v;x++)ar[x]=b;h=v-1}else m==8&&p==1&&(ar[h]=1);f=m,m&7&&(p=m)}}}function Ufe(t,e,n,r,i){let s=i==1?2:1;for(let o=0,l=0,u=0;o<=r.length;o++){let h=o?r[o-1].to:e,f=o<r.length?r[o].from:n;for(let p=h,m,v,b;p<f;p++)if(v=MT[m=t.charCodeAt(p)])if(v<0){for(let x=l-3;x>=0;x-=3)if(jl[x+1]==-v){let w=jl[x+2],A=w&2?i:w&4?w&1?s:i:0;A&&(ar[p]=ar[jl[x]]=A),l=x;break}}else{if(jl.length==189)break;jl[l++]=p,jl[l++]=m,jl[l++]=u}else if((b=ar[p])==2||b==1){let x=b==i;u=x?0:1;for(let w=l-3;w>=0;w-=3){let A=jl[w+2];if(A&2)break;if(x)jl[w+2]|=2;else{if(A&4)break;jl[w+2]|=4}}}}}function Wfe(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,l=i<n.length?n[i].from:e;for(let u=o;u<l;){let h=ar[u];if(h==256){let f=u+1;for(;;)if(f==l){if(i==n.length)break;f=n[i++].to,l=i<n.length?n[i].from:e}else if(ar[f]==256)f++;else break;let p=s==1,m=(f<e?ar[f]:r)==1,v=p==m?p?1:2:r;for(let b=f,x=i,w=x?n[x-1].to:t;b>u;)b==w&&(b=n[--x].from,w=x?n[x-1].to:t),ar[--b]=v;u=f}else s=h,u++}}}function DT(t,e,n,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let u=e,h=0;u<n;){let f=!0,p=!1;if(h==s.length||u<s[h].from){let x=ar[u];x!=l&&(f=!1,p=x==16)}let m=!f&&l==1?[]:null,v=f?r:r+1,b=u;e:for(;;)if(h<s.length&&b==s[h].from){if(p)break e;let x=s[h];if(!f)for(let w=x.to,A=h+1;;){if(w==n)break e;if(A<s.length&&s[A].from==w)w=s[A++].to;else{if(ar[w]==l)break e;break}}if(h++,m)m.push(x);else{x.from>u&&o.push(new Fl(u,x.from,v));let w=x.direction==yf!=!(v%2);RT(t,w?r+1:r,i,x.inner,x.from,x.to,o),u=x.to}b=x.to}else{if(b==n||(f?ar[b]!=l:ar[b]==l))break;b++}m?DT(t,u,b,r+1,i,m,o):u<b&&o.push(new Fl(u,b,v)),u=b}else for(let u=n,h=s.length;u>e;){let f=!0,p=!1;if(!h||u>s[h-1].to){let x=ar[u-1];x!=l&&(f=!1,p=x==16)}let m=!f&&l==1?[]:null,v=f?r:r+1,b=u;e:for(;;)if(h&&b==s[h-1].to){if(p)break e;let x=s[--h];if(!f)for(let w=x.from,A=h;;){if(w==e)break e;if(A&&s[A-1].to==w)w=s[--A].from;else{if(ar[w-1]==l)break e;break}}if(m)m.push(x);else{x.to<u&&o.push(new Fl(x.to,u,v));let w=x.direction==yf!=!(v%2);RT(t,w?r+1:r,i,x.inner,x.from,x.to,o),u=x.from}b=x.from}else{if(b==e||(f?ar[b-1]!=l:ar[b-1]==l))break;b--}m?DT(t,b,u,r+1,i,m,o):b<u&&o.push(new Fl(b,u,v)),u=b}}function RT(t,e,n,r,i,s,o){let l=e%2?2:1;Qfe(t,i,s,r,l),Ufe(t,i,s,r,l),Wfe(i,s,r,l),DT(t,i,s,e,n,r,o)}function Vfe(t,e,n){if(!t)return[new Fl(0,0,e==r6?1:0)];if(e==yf&&!n.length&&!$fe.test(t))return Sq(t.length);if(n.length)for(;t.length>ar.length;)ar[ar.length]=256;let r=[],i=e==yf?0:1;return RT(t,i,i,n,0,t.length,r),r}function Sq(t){return[new Fl(0,t,0)]}let jq="";function Yfe(t,e,n,r,i){var s;let o=r.head-t.from,l=Fl.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),u=e[l],h=u.side(i,n);if(o==h){let m=l+=i?1:-1;if(m<0||m>=e.length)return null;u=e[l=m],o=u.side(!i,n),h=u.side(i,n)}let f=$i(t.text,o,u.forward(i,n));(f<u.from||f>u.to)&&(f=h),jq=t.text.slice(Math.min(o,f),Math.max(o,f));let p=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<u.level?Me.cursor(p.side(!i,n)+t.from,p.forward(i,n)?1:-1,p.level):Me.cursor(f+t.from,u.forward(i,n)?-1:1,u.level)}function Gfe(t,e,n){for(let r=e;r<n;r++){let i=Aq(t.charCodeAt(r));if(i==1)return yf;if(i==2||i==4)return r6}return yf}const Cq=mt.define(),_q=mt.define(),Tq=mt.define(),kq=mt.define(),NT=mt.define(),Oq=mt.define(),Eq=mt.define(),i6=mt.define(),s6=mt.define(),Mq=mt.define({combine:t=>t.some(e=>e)}),Dq=mt.define({combine:t=>t.some(e=>e)}),Rq=mt.define();class Yp{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Yp(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Yp(Me.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const o1=Qt.define({map:(t,e)=>t.map(e)}),Nq=Qt.define();function Fs(t,e,n){let r=t.facet(kq);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Uc=mt.define({combine:t=>t.length?t[0]:!0});let Xfe=0;const Ep=mt.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class qr{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Ep.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Ep.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new qr(Xfe++,e,r,i,l=>{let u=[];return o&&u.push(p2.of(h=>{let f=h.plugin(l);return f?o(f):kt.none})),s&&u.push(s(l)),u})}static fromClass(e,n){return qr.define((r,i)=>new e(r,i),n)}}class FC{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Fs(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Fs(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Fs(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Pq=mt.define(),a6=mt.define(),p2=mt.define(),Iq=mt.define(),o6=mt.define(),pb=mt.define(),Bq=mt.define();function eN(t,e){let n=t.state.facet(Bq);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return pn.spans(r,e.from,e.to,{point(){},span(s,o,l,u){let h=s-e.from,f=o-e.from,p=i;for(let m=l.length-1;m>=0;m--,u--){let v=l[m].spec.bidiIsolate,b;if(v==null&&(v=Gfe(e.text,h,f)),u>0&&p.length&&(b=p[p.length-1]).to==h&&b.direction==v)b.to=f,p=b.inner;else{let x={from:h,to:f,direction:v,inner:[]};p.push(x),p=x.inner}}}}),i}const Lq=mt.define();function l6(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(Lq)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Cg=mt.define();class co{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new co(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,u=s<n.length?n[s]:1e9,h=Math.min(l,u);if(h==1e9)break;let f=h+o,p=h,m=f;for(;;)if(s<n.length&&n[s]<=p){let v=n[s+1];s+=2,p=Math.max(p,v);for(let b=i;b<e.length&&e[b].fromB<=p;b++)o=e[b].toA-e[b].toB;m=Math.max(m,v+o)}else if(i<e.length&&e[i].fromB<=p){let v=e[i++];p=Math.max(p,v.toB),m=Math.max(m,v.toA),o=v.toA-v.toB}else break;r.push(new co(f,m,h,p))}return r}}class hA{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=_i.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,u)=>i.push(new co(s,o,l,u))),this.changedRanges=i}static create(e,n,r){return new hA(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const Kfe=[];class Jr{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Kfe}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&Rfe(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Lh(this.dom),i=this.length?e>0:n>0;return new Jo(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof g2)return e;return null}static get(e){return e.cmTile}}class m2 extends Jr{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==n)for(;i&&i!=l.dom;)i=tN(i);else n.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=tN(i);this.length=o}}function tN(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class g2 extends m2{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=Jr.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Gc)n.push(i),r=o,i=0;else{let l=s+o.length,u=e(o,s);if(u!==void 0)return u;s=l+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,s,o=-1;if(this.blockTiles((l,u)=>{let h=u+l.length;if(e>=u&&e<=h){if(l.isWidget()&&n>=-1&&n<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(u<e||e==h&&(n<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-u),(h>e||e==u&&(n>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-u)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Gc extends m2{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new Gc(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Om extends m2{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new Om(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,s=-1,o=null,l=-1;function u(f,p){for(let m=0,v=0;m<f.children.length&&v<=p;m++){let b=f.children[m],x=v+b.length;x>=p&&(b.isComposite()?u(b,p-v):(!o||o.isHidden&&(n>0||r&&Jfe(o,b)))&&(x>p||b.flags&32)?(o=b,l=p-v):(v<p||b.flags&16&&!b.isHidden)&&(i=b,s=p-v)),v=x}}u(this,e);let h=(n<0?i:o)||i||o;return h?{tile:h,offset:h==i?s:l}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):Zfe(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Jo(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,l=!1;for(let u of o.children){if(l)return new Jo(u.dom,0);u==r.tile&&(l=!0)}}return new Jo(this.dom,0)}}function Zfe(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=qg(e);return n[n.length-1]||null}function Jfe(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class oa extends m2{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new oa(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class $d extends Jr{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?pt.chrome||pt.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let l=jv(this.dom,i,s).getClientRects();if(!l.length)return null;let u=l[(o?o<0:n>=0)?0:l.length-1];return pt.safari&&!o&&u.width==0&&(u=Array.prototype.find.call(l,h=>h.width)||u),o?Sv(u,o<0):u||null}static of(e,n){let r=new $d(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class xf extends Jr{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return Sv(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=l?s.length-1:0;o=s[u],!(e>0?u==0:u==s.length-1||o.top<o.bottom);u+=l?-1:1);return Sv(o,!l)}}get overrideDOMText(){if(!this.length)return wn.empty;let{root:e}=this;if(!e)return wn.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new xf(s,r,e,i)}}class dA extends Jr{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return wn.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class epe{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let u=i.children[s],h=u.breakAfter;(n>0?u.length<=e:u.length<e)&&(!r||r.skip(u,0,u.length)!==!1||!u.isComposite)?(o=!!h,s++,e-=u.length):(l.push({tile:i,index:s}),i=u,s=0,r&&u.isComposite()&&r.enter(u))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let u=Math.min(e,i.length-s);r&&r.skip(i,s,s+u),e-=u,s+=u}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class tpe{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class npe{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let u=o.children[o.children.length-1]=new $d(l.dom,l.text+e);u.parent=o}else o.append(i||$d.of(e,(s=this.cache.find($d))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?HC(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let l=n.marks.length-1;l>=0;l--){let u=n.marks[l],h=i.lastChild;if(h instanceof oa&&h.mark.eq(u.mark))h.dom!=u.dom&&h.setDOM(HC(u.dom)),i=h;else{if(this.cache.reused.get(u)){let p=Jr.get(u.dom);p&&p.setDOM(HC(u.dom))}let f=oa.of(u.mark,u.dom);i.append(f),i=f}this.cache.reused.set(u,2)}let s=Jr.get(e.text);s&&this.cache.reused.set(s,2);let o=new $d(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=Fq);let i=Om.start(e,n||((r=this.cache.find(Om))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(n>0&&(l=i.lastChild)&&l instanceof oa&&l.mark.eq(o))i=l,n--;else{let u=oa.of(o,(r=this.cache.find(oa,h=>h.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(u),i=u,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!nN(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(pt.ios&&nN(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(zC,0,32)||new xf(zC.toDOM(),0,zC,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new tpe(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Gc&&i.wrapper.eq(r.wrapper))n=i;else{let s=Gc.of(r.wrapper,(e=this.cache.find(Gc,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(dA,void 0,1);return r&&(r.flags=n),r||new dA(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class rpe{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const fA=[xf,Om,$d,oa,dA,Gc,g2];for(let t=0;t<fA.length;t++)fA[t].bucket=t;class ipe{constructor(e){this.view=e,this.buckets=fA.map(()=>[]),this.index=fA.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let u=(l+o)%s.length,h=s[u];if((!n||n(h))&&!this.reused.has(h))return s.splice(u,1),u<o&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view,l.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==n&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new xf(l.dom,n,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class spe{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new ipe(e),this.text=new rpe(e.state.doc),this.builder=new npe(this.cache,new g2(e,e.contentDOM),pn.iter(r)),this.cache.reused.set(n,2),this.old=new epe(n),this.reuseWalker={skip:(o,l,u)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,u=l?l.fromA:this.old.root.length;if(u>i){let h=u-i;this.preserve(h,!o,!l),i=u,s+=h}if(!l)break;n&&l.fromA<=n.range.fromA&&l.toA>=n.range.toA?(this.forward(l.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,l.toA),this.emit(n.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=lpe(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,u)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(u-l);else{let h=u>0||l<o.length?xf.of(o.widget,this.view,u-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&u==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,u),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof dA)this.cache.add(o);else if(o instanceof oa)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof oa&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof oa&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=pn.spans(this.decorations,e,n,{point:(l,u,h,f,p,m)=>{if(h instanceof bf){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,p>f.length)i.continueWidget(u-l);else{let v=h.widget||(h.block?Em.block:Em.inline),b=ape(h),x=this.cache.findWidget(v,u-l,b)||xf.of(v,this.view,u-l,b);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(x)):(i.ensureLine(r),i.addInlineWidget(x,f,p))}r=null}else r=ope(r,h);u>l&&this.text.skip(u-l)},span:(l,u,h,f)=>{for(let p=l;p<u;){let m=this.text.next(Math.min(512,u-p));m==null?(i.addLineStartIfNotCovered(r),i.addBreak(),p++):(i.ensureLine(r),i.addText(m,h,p==l?f:h.length),p+=m.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=Jr.get(i);if(i==this.view.contentDOM)break;s instanceof oa?n.push(s):s!=null&&s.isLine()?r=s:s instanceof Gc||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Om(i,Fq):r||n.push(oa.of(new db({tagName:i.nodeName.toLowerCase(),attributes:Nfe(i)}),i)))}return{line:r,marks:n}}}function nN(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function ape(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const Fq={class:"cm-line"};function ope(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&t6(n,t),r&&(t.class+=" "+r)),t}function lpe(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof oa&&e.push(r.mark)}return e}function HC(t){let e=Jr.get(t);return e&&e.setDOM(t.cloneNode()),t}class Em extends ul{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Em.inline=new Em("span");Em.block=new Em("div");const zC=new class extends ul{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class rN{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=kt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new g2(e,e.contentDOM),this.updateInner([new co(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:p})=>p<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!vpe(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?upe(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:p}=this.hasComposition;r=new co(f,p,e.changes.mapPos(f,-1),e.changes.mapPos(p,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(pt.ie||pt.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let u=fpe(o,this.decorations,e.changes);u.length&&(r=co.extendWithRanges(r,u));let h=mpe(l,this.blockWrappers,e.changes);return h.length&&(r=co.extendWithRanges(r,h)),s&&!r.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,l=new spe(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&Jr.get(n.text)&&l.cache.reused.set(Jr.get(n.text),2),this.tile=l.run(e,n),PT(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=pt.chrome||pt.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof qC&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(Nq)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Uc)||r.tabIndex>-1)&&zg(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||o))return;let l=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,h,f;if(u.empty?f=h=this.inlineDOMNearPos(u.anchor,u.assoc||1):(f=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),h=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),pt.gecko&&u.empty&&!this.hasComposition&&cpe(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=f=new Jo(m,0),l=!0}let p=this.view.observer.selectionRange;(l||!p.focusNode||(!$g(h.node,h.offset,p.anchorNode,p.anchorOffset)||!$g(f.node,f.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,u))&&(this.view.observer.ignore(()=>{pt.android&&pt.chrome&&r.contains(p.focusNode)&&gpe(p.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let m=wv(this.view.root);if(m)if(u.empty){if(pt.gecko){let v=hpe(h.node,h.offset);if(v&&v!=3){let b=(v==1?bq:yq)(h.node,h.offset);b&&(h=new Jo(b.node,b.offset))}}m.collapse(h.node,h.offset),u.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=u.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(f.node,f.offset)}catch{}}else{let v=document.createRange();u.anchor>u.head&&([h,f]=[f,h]),v.setEnd(f.node,f.offset),v.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(v)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new Jo(p.anchorNode,p.anchorOffset),this.impreciseHead=f.precise?null:new Jo(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&$g(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=wv(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let u=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!u||!h||u.bottom>h.top)return;let f=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(f.node,f.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[n];else{let o=nu(e)==0?0:n==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!Jr.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let u=r.children[o];if(u.dom==s)return l;l+=u.length+u.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,s=!1,o,l=-1,u=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let p=f+h.length;if(f<=e&&(r=h,i=e-f,s=p<e),p>=e&&!o&&(o=h,l=e-f,u=f>e),f>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(s&&o?r=null:u&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(l,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof qC?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let u=i(l,o);if(u)return u}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=$i(s.text,o);if(l==o)return null;let u=jv(s.dom,o,l).getClientRects();for(let h=0;h<u.length;h++){let f=u[h];if(h==u.length-1||f.top<f.bottom&&f.left<f.right)return f}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,u=this.view.textDirection==ur.LTR,h=0,f=(p,m,v)=>{for(let b=0;b<p.children.length&&!(m>i);b++){let x=p.children[b],w=m+x.length,A=x.dom.getBoundingClientRect(),{height:j}=A;if(v&&!b&&(h+=A.top-v.top),x instanceof Gc)w>r&&f(x,m,A);else if(m>=r&&(h>0&&n.push(-h),n.push(j+h),h=0,o)){let C=x.dom.lastChild,_=C?qg(C):[];if(_.length){let S=_[_.length-1],O=u?S.right-A.left:A.right-S.left;O>l&&(l=O,this.minWidth=s,this.minWidthFrom=m,this.minWidthTo=w)}}v&&b==p.children.length-1&&(h+=v.bottom-A.bottom),m=w+x.breakAfter}};return f(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?ur.RTL:ur.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,u;for(let h of o.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=qg(h.dom);if(f.length!=1)return;l+=f[0].width,u=f[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:u}}});if(e)return e;let n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=qg(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(kt.replace({widget:new qC(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return kt.set(e)}updateDeco(){let e=1,n=this.view.state.facet(p2).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(o6).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(pn.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Iq).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var n;if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(Rq))try{if(f(this.view,e.range,e))return!0}catch(p){Fs(this.view.state,p,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(n=r.assoc)!==null&&n!==void 0?n:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let o=l6(this.view),l={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:u,offsetHeight:h}=this.view.scrollDOM;if(Bfe(this.view.scrollDOM,l,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,u),-u),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==ur.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let f=this.view.docView.lineAt(r.head,1);f&&f.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){PT(this.tile)}}function PT(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)PT(r,e)}}function cpe(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function Hq(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=bq(n.focusNode,n.focusOffset),i=yq(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=Jr.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let u=Jr.get(r.node);!u||u.isText()&&u.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function upe(t,e,n){let r=Hq(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||t.state.doc.sliceString(r.from,r.to)!=l)return null;let u=e.invertedDesc;return{range:new co(u.mapPos(s),u.mapPos(o),s,o),text:i}}function hpe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let dpe=class{constructor(){this.changes=[]}compareRange(e,n){Wp(e,n,this.changes)}comparePoint(e,n){Wp(e,n,this.changes)}boundChange(e){Wp(e,e,this.changes)}};function fpe(t,e,n){let r=new dpe;return pn.compare(t,e,n,r),r.changes}class ppe{constructor(){this.changes=[]}compareRange(e,n){Wp(e,n,this.changes)}comparePoint(){}boundChange(e){Wp(e,e,this.changes)}}function mpe(t,e,n){let r=new ppe;return pn.compare(t,e,n,r),r.changes}function gpe(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function vpe(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class qC extends ul{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function bpe(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return Me.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,l=s;n<0?o=$i(i.text,s,!1):l=$i(i.text,s);let u=r(i.text.slice(o,l));for(;o>0;){let h=$i(i.text,o,!1);if(r(i.text.slice(h,o))!=u)break;o=h}for(;l<i.length;){let h=$i(i.text,l);if(r(i.text.slice(l,h))!=u)break;l=h}return Me.range(o+i.from,l+i.from)}function ype(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,u=Math.floor((i-n.top-(t.defaultLineHeight-l)*.5)/l);s+=u*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+ST(o,s,t.state.tabSize)}function IT(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==cs.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function xpe(t,e,n,r){let i=IT(t,e.head,e.assoc||-1),s=!r||i.type!=cs.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),l=t.textDirectionAt(i.from),u=t.posAtCoords({x:n==(l==ur.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(u!=null)return Me.cursor(u,n?-1:1)}return Me.cursor(n?i.to:i.from,n?-1:1)}function iN(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let l=e,u=null;;){let h=Yfe(i,s,o,l,n),f=jq;if(!h){if(i.number==(n?t.state.doc.lines:1))return l;f=`
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),h=t.visualLineSide(i,!n)}if(u){if(!u(f))return l}else{if(!r)return h;u=r(f)}l=h}}function Ape(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==Dr.Space&&(i=o),i==o}}function wpe(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return Me.cursor(i,e.assoc);let o=e.goalColumn,l,u=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(i,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),f=t.documentTop;if(h)o==null&&(o=h.left-u.left),l=s<0?h.top:h.bottom;else{let b=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(u.right-u.left,t.defaultCharacterWidth*(i-b.from))),l=(s<0?b.top:b.bottom)+f}let p=u.left+o,m=t.viewState.heightOracle.textHeight>>1,v=r??m;for(let b=0;;b+=m){let x=l+(v+b)*s,w=BT(t,{x:p,y:x},!1,s);if(n?x>u.bottom:x<u.top)return Me.cursor(w.pos,w.assoc);let A=t.coordsAtPos(w.pos,w.assoc),j=A?(A.top+A.bottom)/2:0;if(!A||(n?j>l:j<l))return Me.cursor(w.pos,w.assoc,void 0,o)}}function Qg(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let u=r||n||(e-s<o-e?-1:1);e=u<0?s:o,r=u}});if(!r)return e}}function zq(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Qg(t,i.from,0);o!=i.from&&(s=Me.cursor(o,-1))}else{let o=Qg(t,i.from,-1),l=Qg(t,i.to,1);(o!=i.from||l!=i.to)&&(s=Me.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?Me.create(n,e.mainIndex):e}function $C(t,e,n){let r=Qg(t.state.facet(pb).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Me.cursor(r,r<n.from?1:-1)}class Ll{constructor(e,n){this.pos=e,this.assoc=n}}function BT(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:l}=e,u=l-s,h;for(;;){if(u<0)return new Ll(0,1);if(u>t.viewState.docHeight)return new Ll(t.state.doc.length,-1);if(h=t.elementAtHeight(u),r==null)break;if(h.type==cs.Text){if(r<0?h.to<t.viewport.from:h.from>t.viewport.to)break;let m=t.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(m&&(r<0?m.top<=u+s:m.bottom>=u+s))break}let p=t.viewState.heightOracle.textHeight/2;u=r>0?h.bottom+p:h.top-p}if(t.viewport.from>=h.to||t.viewport.to<=h.from){if(n)return null;if(h.type==cs.Text){let p=ype(t,i,h,o,l);return new Ll(p,p==h.from?1:-1)}}if(h.type!=cs.Text)return u<(h.top+h.bottom)/2?new Ll(h.from,1):new Ll(h.to,-1);let f=t.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=t.docView.lineAt(h.from,-2)),new Spe(t,o,l,t.textDirectionAt(h.from)).scanTile(f,h.from)}class Spe{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Fl.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Fl.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,u,h=-1,f=1e9,p;e:for(;r<i;){let v=i-r,b=r+i>>1;t:if(s.has(b)){let w=r+Math.floor(Math.random()*v);for(let A=0;A<v;A++){if(!s.has(w)){b=w;break t}w++,w==i&&(w=r)}break e}s.add(b);let x=n(b);if(x)for(let w=0;w<x.length;w++){let A=x[w],j=0;if(!(A.width==0&&x.length>1)){if(A.bottom<this.y)(!l||l.bottom<A.bottom)&&(l=A),j=1;else if(A.top>this.y)(!u||u.top>A.top)&&(u=A),j=-1;else{let C=A.left>this.x?this.x-A.left:A.right<this.x?this.x-A.right:0,_=Math.abs(C);_<f&&(h=b,f=_,p=A),C&&(j=C<0==(this.baseDir==ur.LTR)?-1:1)}j==-1&&(!o||this.baseDirAt(e[b],1))?i=b:j==1&&(!o||this.baseDirAt(e[b+1],-1))&&(r=b+1)}}}if(!p){let v=l&&(!u||this.y-l.bottom<u.top-this.y)?l:u;return this.y=(v.top+v.bottom)/2,this.scan(e,n)}let m=(o?this.dirAt(e[h],1):this.baseDir)==ur.LTR;return{i:h,after:this.x>(p.left+p.right)/2==m}}scanText(e,n){let r=[];for(let s=0;s<e.length;s=$i(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,l=r[s+1]-n;return jv(e.dom,o,l).getClientRects()});return i.after?new Ll(r[i.i+1],-1):new Ll(r[i.i],1)}scanTile(e,n){if(!e.length)return new Ll(n,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,n);if(l.isComposite())return this.scanTile(l,n)}let r=[n];for(let l=0,u=n;l<e.children.length;l++)r.push(u+=e.children[l].length);let i=this.scan(r,l=>{let u=e.children[l];return u.flags&48?null:(u.dom.nodeType==1?u.dom:jv(u.dom,0,u.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new Ll(r[i.i+1],-1):new Ll(o,1)}}const Sp="";class jpe{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(bn.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Sp}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=Jr.get(i),l=i.nextSibling;if(l==n){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let u=Jr.get(l);(o&&u?o.breakAfter:(o?o.breakAfter:uA(i))||uA(l)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!_pe(l,n)&&this.lineBreak(),i=l}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(n))&&(s=l.index,o=l[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=o-1);r=s+o}}readNode(e){let n=Jr.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(Cpe(e,r.node,r.offset)?n:0))}}function Cpe(t,e,n){for(;;){if(!e||n<nu(e))return!1;if(e==t)return!0;n=Lh(e)+1,e=e.parentNode}}function _pe(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=Jr.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class sN{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Tpe{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,l=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=qq(e.docView.tile,n,r,0))){let u=s||o?[]:Ope(e),h=new jpe(u,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=Epe(u,this.bounds.from)}else{let u=e.observer.selectionRange,h=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!ET(e.contentDOM,u.focusNode)?l.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),f=o&&o.node==u.anchorNode&&o.offset==u.anchorOffset||!ET(e.contentDOM,u.anchorNode)?l.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),p=e.viewport;if((pt.ios||pt.chrome)&&l.main.empty&&h!=f&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,f),v=Math.max(h,f),b=p.from-m,x=p.to-v;(b==0||b==1||m==0)&&(x==0||x==-1||v==e.state.doc.length)&&(h=0,f=e.state.doc.length)}if(e.inputState.composing>-1&&l.ranges.length>1)this.newSel=l.replaceRange(Me.range(f,h));else if(e.lineWrapping&&f==h&&!(l.main.empty&&l.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),v=0;m&&(v=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=Me.create([Me.cursor(h,v)])}else this.newSel=Me.single(f,h)}}}function qq(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let u=0,h=r,f=r;u<t.children.length;u++){let p=t.children[u],m=h+p.length;if(h<e&&m>n)return qq(p,e,n,h);if(m>=e&&i==-1&&(i=u,s=h),h>n&&p.dom.parentNode==t.dom){o=u,l=f;break}f=m,h=m+p.breakAfter}return{from:s,to:l<0?r+t.length:l,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function $q(t,e){let n,{newSel:r}=e,{state:i}=t,s=i.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:u}=e.bounds,h=s.from,f=null;(o===8||pt.android&&e.text.length<u-l)&&(h=s.to,f="end");let p=i.doc.sliceString(l,u,Sp),m,v;!s.empty&&s.from>=l&&s.to<=u&&(e.typeOver||p!=e.text)&&p.slice(0,s.from-l)==e.text.slice(0,s.from-l)&&p.slice(s.to-l)==e.text.slice(m=e.text.length-(p.length-(s.to-l)))?n={from:s.from,to:s.to,insert:wn.of(e.text.slice(s.from-l,m).split(Sp))}:(v=Qq(p,e.text,h-l,f))&&(pt.chrome&&o==13&&v.toB==v.from+2&&e.text.slice(v.from,v.toB)==Sp+Sp&&v.toB--,n={from:l+v.from,to:l+v.toA,insert:wn.of(e.text.slice(v.from,v.toB).split(Sp))})}else r&&(!t.hasFocus&&i.facet(Uc)||pA(r,s))&&(r=null);if(!n&&!r)return!1;if((pt.mac||pt.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Me.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:wn.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&t.docView.lineHasWidget(s.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:s.from,to:s.to,insert:i.toText(t.inputState.insertingText)}:pt.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==`
 `&&t.lineWrapping&&(r&&(r=Me.single(r.main.anchor-1,r.main.head-1)),n={from:s.from,to:s.to,insert:wn.of([" "])}),n)return c6(t,n,r,o);if(r&&!pA(r,s)){let l=!1,u="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(l=!0),u=t.inputState.lastSelectionOrigin,u=="select.pointer"&&(r=zq(i.facet(pb).map(h=>h(t)),r))),t.dispatch({selection:r,scrollIntoView:l,userEvent:u}),!0}else return!1}function c6(t,e,n,r=-1){if(pt.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(pt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Vp(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Vp(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Vp(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=kpe(t,e,n));return t.state.facet(Oq).some(u=>u(t,e.from,e.to,s,l))||t.dispatch(l()),!0}function kpe(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,h=u<0?s.from:s.to,f=Qg(i.facet(pb).map(p=>p(t)),h,u);e.from==f&&(o=f)}if(o>-1)r={changes:e,selection:Me.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let u=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(u+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let u=i.changes(e),h=n&&n.main.to<=u.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=t.state.sliceDoc(e.from,e.to),p,m=n&&Hq(t,n.main.head);if(m){let b=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-b}}else p=t.state.doc.lineAt(s.head);let v=s.to-e.to;r=i.changeByRange(b=>{if(b.from==s.from&&b.to==s.to)return{changes:u,range:h||b.map(u)};let x=b.to-v,w=x-f.length;if(t.state.sliceDoc(w,x)!=f||x>=p.from&&w<=p.to)return{range:b};let A=i.changes({from:w,to:x,insert:e.insert}),j=b.to-s.to;return{changes:A,range:h?Me.range(Math.max(0,h.anchor+j),Math.max(0,h.head+j)):b.map(A)}})}else r={changes:u,selection:h&&i.selection.replaceRange(h)}}let l="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function Qq(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let u=Math.max(0,s-Math.min(o,l));n-=o+u-s}if(o<s&&t.length<e.length){let u=n<=s&&n>=o?s-n:0;s-=u,l=s+(l-o),o=s}else if(l<s){let u=n<=s&&n>=l?s-n:0;s-=u,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function Ope(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new sN(n,r)),(i!=n||s!=r)&&e.push(new sN(i,s))),e}function Epe(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Me.single(n+e,r+e):null}function pA(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class Mpe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,pt.safari&&e.contentDOM.addEventListener("input",()=>null),pt.gecko&&Wpe(e.contentDOM.ownerDocument)}handleEvent(e){!Fpe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Dpe(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Wq.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),pt.android&&pt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return pt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((n=Uq.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Rpe.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Vp(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:pt.safari&&!pt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function aN(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Fs(n.state,i)}}}function Dpe(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let u=s[l];u&&n(l).handlers.push(aN(r.value,u))}if(o)for(let l in o){let u=o[l];u&&n(l).observers.push(aN(r.value,u))}}for(let r in ol)n(r).handlers.push(ol[r]);for(let r in ha)n(r).observers.push(ha[r]);return e}const Uq=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Rpe="dthko",Wq=[16,17,18,20,91,92,224,225],l1=6;function c1(t){return Math.max(0,t)*.7+8}function Npe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Ppe{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=mq(e.contentDOM),this.atoms=e.state.facet(pb).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(bn.allowMultipleSelections)&&Ipe(e,n),this.dragging=Lpe(e,n)&&Gq(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Npe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let u=l6(this.view);e.clientX-u.left<=i+l1?n=-c1(i-e.clientX):e.clientX+u.right>=o-l1&&(n=c1(e.clientX-o)),e.clientY-u.top<=s+l1?r=-c1(s-e.clientY):e.clientY+u.bottom>=l-l1&&(r=c1(e.clientY-l)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=zq(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Ipe(t,e){let n=t.state.facet(Cq);return n.length?n[0](e):pt.mac?e.metaKey:e.ctrlKey}function Bpe(t,e){let n=t.state.facet(_q);return n.length?n[0](e):pt.mac?!e.altKey:!e.ctrlKey}function Lpe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=wv(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Fpe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Jr.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const ol=Object.create(null),ha=Object.create(null),Vq=pt.ie&&pt.ie_version<15||pt.ios&&pt.webkit_version<604;function Hpe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),Yq(t,n.value)},50)}function v2(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function Yq(t,e){e=v2(t.state,i6,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(LT!=null&&n.selection.ranges.every(u=>u.empty)&&LT==s.toString()){let u=-1;r=n.changeByRange(h=>{let f=n.doc.lineAt(h.from);if(f.from==u)return{range:h};u=f.from;let p=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:f.from,insert:p},range:Me.cursor(h.from+p.length)}})}else o?r=n.changeByRange(u=>{let h=s.line(i++);return{changes:{from:u.from,to:u.to,insert:h.text},range:Me.cursor(u.from+h.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ha.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};ha.wheel=ha.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};ol.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);ha.touchstart=(t,e)=>{let n=t.inputState,r=e.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};ha.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};ol.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(Tq))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=qpe(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new Ppe(t,e,n,r)),r&&t.observer.ignore(()=>{gq(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function oN(t,e,n,r){if(r==1)return Me.cursor(e,n);if(r==2)return bpe(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<t.state.doc.length&&l==s.to&&l++,Me.range(o,l)}}const zpe=pt.ie&&pt.ie_version<=11;let lN=null,cN=0,uN=0;function Gq(t){if(!zpe)return t.detail;let e=lN,n=uN;return lN=t,uN=Date.now(),cN=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(cN+1)%3:1}function qpe(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=Gq(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,l){let u=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=oN(t,u.pos,u.assoc,r);if(n.pos!=u.pos&&!o){let p=oN(t,n.pos,n.assoc,r),m=Math.min(p.from,f.from),v=Math.max(p.to,f.to);f=m<f.from?Me.range(m,v,f.assoc):Me.range(v,m,f.assoc)}return o?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(h=$pe(i,u.pos))?h:l?i.addRange(f):Me.create([f])}}}function $pe(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Me.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ol.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=Me.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",v2(t.state,s6,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ol.dragend=t=>(t.inputState.draggedContent=null,!1);function hN(t,e,n,r){if(n=v2(t.state,i6,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&Bpe(t,e)?{from:s.from,to:s.to}:null,l={from:i,insert:n},u=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ol.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&hN(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return hN(t,e,r,!0),!0}return!1};ol.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=Vq?null:e.clipboardData;return n?(Yq(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Hpe(t),!1)};function Qpe(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function Upe(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:v2(t,s6,e.join(t.lineBreak)),ranges:n,linewise:r}}let LT=null;ol.copy=ol.cut=(t,e)=>{if(!zg(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=Upe(t.state);if(!n&&!i)return!1;LT=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Vq?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(Qpe(t,n),!1)};const Xq=ic.define();function Kq(t,e){let n=[];for(let r of t.facet(Eq)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:Xq.of(!0)}):null}function Zq(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=Kq(t.state,e);n?t.dispatch(n):t.update([])}},10)}ha.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Zq(t)};ha.blur=t=>{t.observer.clearSelectionRange(),Zq(t)};ha.compositionstart=ha.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};ha.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,pt.chrome&&pt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};ha.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ol.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],u=t.posAtDOM(l.startContainer,l.startOffset),h=t.posAtDOM(l.endContainer,l.endOffset);return c6(t,{from:u,to:h,insert:t.state.toText(s)},null),!0}}let i;if(pt.chrome&&pt.android&&(i=Uq.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return pt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),pt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>ha.compositionend(t,e),20),!1};const dN=new Set;function Wpe(t){dN.has(t)||(dN.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const fN=["pre-wrap","normal","pre-line","break-spaces"];let Mm=!1;function pN(){Mm=!1}class Vpe{constructor(e){this.lineWrapping=e,this.doc=wn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return fN.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let l=fN.indexOf(e)>-1,u=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=l||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,u){this.heightSamples={};for(let h=0;h<o.length;h++){let f=o[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return u}}class Ype{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Yo{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?cs.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof bf?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Yo(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var gr=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(gr||(gr={}));const cx=.001;class qs{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>cx&&(Mm=!0),this.height=e)}replace(e,n,r){return qs.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:u,toA:h,fromB:f,toB:p}=i[l],m=s.lineAt(u,gr.ByPosNoHeight,r.setDoc(n),0,0),v=m.to>=h?m:s.lineAt(h,gr.ByPosNoHeight,r,0,0);for(p+=v.to-h,h=v.to;l>0&&m.from<=i[l-1].toA;)u=i[l-1].fromA,f=i[l-1].fromB,l--,u<m.from&&(m=s.lineAt(u,gr.ByPosNoHeight,r,0,0));f+=m.from-u,u=m.from;let b=u6.build(r.setDoc(o),e,f,p);s=mA(s,s.replace(u,h,b))}return s.updateHeight(r,0)}static empty(){return new Da(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new Xpe(qs.of(e.slice(0,n)),o,qs.of(e.slice(r)))}}function mA(t,e){return t==e?t:(t.constructor!=e.constructor&&(Mm=!0),e)}qs.prototype.size=1;const Gpe=kt.replace({});class Jq extends qs{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new Yo(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Yo(i,0,r,this.spaceAbove,Gpe):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,gr.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Da extends Jq{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new Yo(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Da||i instanceof rs&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof rs?i=new Da(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):qs.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class rs extends qs{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);o=u/s,this.length>s+1&&(l=(this.height-u)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:u}=this.heightMetrics(n,i);if(n.lineWrapping){let h=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=n.doc.lineAt(h),p=l+f.length*u,m=Math.max(r,e-p/2);return new Yo(f.from,f.length,m,p,0)}else{let h=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:f,length:p}=n.doc.line(s+h);return new Yo(f,p,r+l*h,l,0)}}lineAt(e,n,r,i,s){if(n==gr.ByHeight)return this.blockAt(e,r,i,s);if(n==gr.ByPosNoHeight){let{from:v,to:b}=r.doc.lineAt(e);return new Yo(v,b-v,0,0,0)}let{firstLine:o,perLine:l,perChar:u}=this.heightMetrics(r,s),h=r.doc.lineAt(e),f=l+h.length*u,p=h.number-o,m=i+l*p+u*(h.from-s-p);return new Yo(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:l,perLine:u,perChar:h}=this.heightMetrics(r,s);for(let f=e,p=i;f<=n;){let m=r.doc.lineAt(f);if(f==e){let b=m.number-l;p+=u*b+h*(e-s-b)}let v=u+h*m.length;o(new Yo(m.from,m.length,p,v,0)),p+=v,f=m.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof rs?r[r.length-1]=new rs(s.length+i):r.push(null,new rs(i-1))}if(e>0){let s=r[0];s instanceof rs?r[0]=new rs(e+s.length):r.unshift(new rs(e-1),null)}return qs.of(r)}decomposeLeft(e,n){n.push(new rs(e-1),null)}decomposeRight(e,n){n.push(null,new rs(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],l=Math.max(n,i.from),u=-1;for(i.from>n&&o.push(new rs(i.from-n-1).updateHeight(e,n));l<=s&&i.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let p=i.heights[i.index++],m=0;p<0&&(m=-p,p=i.heights[i.index++]),u==-1?u=p:Math.abs(p-u)>=cx&&(u=-2);let v=new Da(f,p,m);v.outdated=!1,o.push(v),l+=f+1}l<=s&&o.push(null,new rs(s-l).updateHeight(e,l));let h=qs.of(o);return(u<0||Math.abs(h.height-this.height)>=cx||Math.abs(u-this.heightMetrics(e,n).perLine)>=cx)&&(Mm=!0),mA(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Xpe extends qs{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,u=n==gr.ByHeight?e<o:e<l,h=u?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,l);if(this.break||(u?h.to<l:h.from>l))return h;let f=n==gr.ByPosNoHeight?gr.ByPosNoHeight:gr.ByPos;return u?h.join(this.right.lineAt(l,f,r,o,l)):this.left.lineAt(l,f,r,i,s).join(h)}forEachLine(e,n,r,i,s,o){let l=i+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,n,r,i,s,o),n>=u&&this.right.forEachLine(e,n,r,l,u,o);else{let h=this.lineAt(u,gr.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,o),h.to>=e&&h.from<=n&&o(h),n>h.to&&this.right.forEachLine(h.to+1,n,r,l,u,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&mN(s,o-1),n<this.length){let l=s.length;this.decomposeRight(n,s),mN(s,l)}return qs.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?qs.of(this.break?[e,null,n]:[e,n]):(this.left=mA(this.left,e),this.right=mA(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,l=n+s.length+this.break,u=null;return i&&i.from<=n+s.length&&i.more?u=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=l+o.length&&i.more?u=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),u?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mN(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof rs&&(r=t[e+1])instanceof rs&&t.splice(e-1,3,new rs(n.length+1+r.length))}const Kpe=5;class u6{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Da?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Da(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new Jq(o,i,r)):(o||s||i>=Kpe)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Da(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new rs(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Da)return e;let n=new Da(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Da)&&!this.isCovered?this.nodes.push(new Da(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Da&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new u6(r,e);return pn.spans(n,r,i,s,0),s.finish(r)}}function Zpe(t,e,n){let r=new Jpe;return pn.compare(t,e,n,r,0),r.changes}class Jpe{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Wp(e,n,this.changes,5)}}function eme(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),u=Math.min(i.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let m=f.getBoundingClientRect();s=Math.max(s,m.left),o=Math.min(o,m.right),l=Math.max(l,m.top),u=Math.min(h==t.parentNode?i.innerHeight:u,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,u)-(n.top+e)}}function tme(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function nme(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class QC{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return kt.replace({widget:new rme(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class rme extends ul{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class gN{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=vN,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ur.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=n.facet(a6).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Vpe(r),this.stateDeco=bN(n),this.heightMap=qs.empty().applyChanges(this.stateDeco,wn.empty,this.heightOracle.setDoc(n.doc),[new co(0,0,0,n.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=kt.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new u1(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?vN:new h6(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(_g(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=bN(this.state);let i=e.changedRanges,s=co.extendWithRanges(i,Zpe(r,this.stateDeco,e?e.changes:_i.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);pN(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Mm)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<u.from||n.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,n));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Dq)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?ur.RTL:ur.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=n.getBoundingClientRect(),u=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,f=0;if(l.width&&l.height){let{scaleX:S,scaleY:O}=pq(n,l);(S>.005&&Math.abs(this.scaleX-S)>.005||O>.005&&Math.abs(this.scaleY-O)>.005)&&(this.scaleX=S,this.scaleY=O,h|=16,o=u=!0)}let p=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let v=mq(this.view.contentDOM,!1).y;v!=this.scrollParent&&(this.scrollParent=v,this.scrollAnchorHeight=-1,this.scrollOffset=0);let b=this.getScrollOffset();this.scrollOffset!=b&&(this.scrollAnchorHeight=-1,this.scrollOffset=b),this.scrolledToBottom=vq(this.scrollParent||e.win);let x=(this.printing?nme:eme)(n,this.paddingTop),w=x.top-this.pixelViewport.top,A=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let j=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(j!=this.inView&&(this.inView=j,j&&(u=!0)),!this.inView&&!this.scrollTarget&&!tme(e.dom))return 0;let C=l.width;if((this.contentDOMWidth!=C||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),u){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(o=!0),o||i.lineWrapping&&Math.abs(C-this.contentDOMWidth)>i.charWidth){let{lineHeight:O,charWidth:E,textHeight:D}=e.docView.measureTextSize();o=O>0&&i.refresh(s,O,E,D,Math.max(5,C/E),S),o&&(e.docView.minWidth=0,h|=16)}w>0&&A>0?f=Math.max(w,A):w<0&&A<0&&(f=Math.min(w,A)),pN();for(let O of this.viewports){let E=O.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(O);this.heightMap=(o?qs.empty().applyChanges(this.stateDeco,wn.empty,this.heightOracle,[new co(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new Ype(O.from,E))}Mm&&(h|=2)}let _=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return _&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,u=new u1(i.lineAt(o-r*1e3,gr.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,gr.ByHeight,s,0,0).to);if(n){let{head:h}=n.range;if(h<u.from||h>u.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,gr.ByPos,s,0,0),m;n.y=="center"?m=(p.top+p.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&h<u.from?m=p.top:m=p.bottom-f,u=new u1(i.lineAt(m-1e3/2,gr.ByHeight,s,0,0).from,i.lineAt(m+f+1e3/2,gr.ByHeight,s,0,0).to)}}return u}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new u1(this.heightMap.lineAt(r,gr.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,gr.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,gr.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,gr.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new QC(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=ur.LTR&&!r)return[];let l=[],u=(f,p,m,v)=>{if(p-f<s)return;let b=this.state.selection.main,x=[b.from];b.empty||x.push(b.to);for(let A of x)if(A>f&&A<p){u(f,A-10,m,v),u(A+10,p,m,v);return}let w=sme(e,A=>A.from>=m.from&&A.to<=m.to&&Math.abs(A.from-f)<s&&Math.abs(A.to-p)<s&&!x.some(j=>A.from<j&&A.to>j));if(!w){if(p<m.to&&n&&r&&n.visibleRanges.some(C=>C.from<=p&&C.to>=p)){let C=n.moveToLineBoundary(Me.cursor(p),!1,!0).head;C>f&&(p=C)}let A=this.gapSize(m,f,p,v),j=r||A<2e6?A:2e6;w=new QC(f,p,A,j)}l.push(w)},h=f=>{if(f.length<o||f.type!=cs.Text)return;let p=ime(f.from,f.to,this.stateDeco);if(p.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,v,b;if(r){let x=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,w,A;if(m!=null){let j=d1(p,m),C=((this.visibleBottom-this.visibleTop)/2+x)/f.height;w=j-C,A=j+C}else w=(this.visibleTop-f.top-x)/f.height,A=(this.visibleBottom-f.top+x)/f.height;v=h1(p,w),b=h1(p,A)}else{let x=p.total*this.heightOracle.charWidth,w=i*this.heightOracle.charWidth,A=0;if(x>2e6)for(let O of e)O.from>=f.from&&O.from<f.to&&O.size!=O.displaySize&&O.from*this.heightOracle.charWidth+A<this.pixelViewport.left&&(A=O.size-O.displaySize);let j=this.pixelViewport.left+A,C=this.pixelViewport.right+A,_,S;if(m!=null){let O=d1(p,m),E=((C-j)/2+w)/x;_=O-E,S=O+E}else _=(j-w)/x,S=(C+w)/x;v=h1(p,_),b=h1(p,S)}v>f.from&&u(f.from,v,f,p),b<f.to&&u(b,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return l}gapSize(e,n,r,i){let s=d1(i,r)-d1(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){QC.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=kt.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];pn.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||_g(this.heightMap.lineAt(e,gr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||_g(this.heightMap.lineAt(this.scaler.fromDOM(e),gr.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return _g(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class u1{constructor(e,n){this.from=e,this.to=n}}function ime(t,e,n){let r=[],i=t,s=0;return pn.spans(n,t,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function h1({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function d1(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function sme(t,e){for(let n of t)if(e(n))return n}const vN={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function bN(t){let e=t.facet(p2).filter(r=>typeof r!="function"),n=t.facet(o6).filter(r=>typeof r!="function");return n.length&&e.push(pn.join(n)),e}class h6{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:u})=>{let h=n.lineAt(l,gr.ByPos,e,0,0).top,f=n.lineAt(u,gr.ByPos,e,0,0).bottom;return i+=f-h,{from:l,to:u,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof h6?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function _g(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Yo(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>_g(i,e)):t._content)}const f1=mt.define({combine:t=>t.join(" ")}),FT=mt.define({combine:t=>t.indexOf(!0)>-1}),HT=Ih.newName(),e$=Ih.newName(),t$=Ih.newName(),n$={"&light":"."+e$,"&dark":"."+t$};function zT(t,e,n){return new Ih(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const ame=zT("."+HT,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},n$),ome={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},UC=pt.ie&&pt.ie_version<=11;class lme{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Lfe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(pt.ie&&pt.ie_version<=11||pt.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&pt.android&&e.constructor.EDIT_CONTEXT!==!1&&!(pt.chrome&&pt.chrome_version<126)&&(this.editContext=new ume(e),e.state.facet(Uc)&&(e.contentDOM.editContext=this.editContext.editContext)),UC&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Uc)?r.root.activeElement!=this.dom:!zg(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(pt.ie&&pt.ie_version<=11||pt.android&&pt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&$g(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=wv(e.root);if(!n)return!1;let r=pt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&cme(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=zg(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Hfe(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,ome),UC&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),UC&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Vp(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&zg(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Tpe(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=$q(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!pA(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=yN(n,e.previousSibling||e.target.previousSibling,-1),i=yN(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Uc)!=e.state.facet(Uc)&&(e.view.contentDOM.editContext=e.state.facet(Uc)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function yN(t,e,n){for(;e;){let r=Jr.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function xN(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return $g(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function cme(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return xN(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?xN(t,n):null}class ume{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),u=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let h=u-l>r.text.length;l==this.from&&s<this.from?l=s:u==this.to&&s>this.to&&(u=s);let f=Qq(e.state.sliceDoc(l,u),r.text,(h?i.from:i.to)-l,h?"end":null);if(!f){let m=Me.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));pA(m,i)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:f.from+l,to:f.toA+l,insert:wn.of(r.text.slice(f.from,f.toB).split(`
`))};if((pt.mac||pt.android)&&p.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:l,to:u,insert:wn.of([r.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);c6(e,p,Me.single(this.toEditorPos(r.selectionStart,m),this.toEditorPos(r.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let u=e.coordsForChar(o);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let u=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(u<h){let f=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(kt.mark({attributes:{style:f}}).range(u,h))}}}e.dispatch({effects:Nq.of(kt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=wv(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,u,h)=>{if(r)return;let f=h.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(h)){i=this.pendingContextChange=null,n+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),h.toString()),this.to+=f}n+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class it{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Ffe(e.parent)||document,this.viewState=new gN(this,e.state||bn.create(e)),e.scrollTo&&e.scrollTo.is(o1)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ep).map(i=>new FC(i));for(let i of this.plugins)i.update(this);this.observer=new lme(this),this.inputState=new Mpe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new rN(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof bi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let m of e){if(m.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=m.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,u=null;e.some(m=>m.annotation(Xq))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,u=Kq(s,o),u||(l=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(bn.phrases)!=this.state.facet(bn.phrases))return this.setState(s);i=hA.create(this,s,e),i.flags|=l;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:v}=m.state.selection;p=new Yp(v.empty?v:Me.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of m.effects)v.is(o1)&&(p=v.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=gA.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Cg)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(f1)!=i.state.facet(f1)&&(this.viewState.mustMeasureContent=!0),(n||r||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(NT))try{m(i)}catch(v){Fs(this.state,v,"update listener")}(u||f)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),f&&!$q(this,f)&&h.force&&Vp(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new gN(this,e),this.plugins=e.facet(Ep).map(r=>new FC(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new rN(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ep),r=e.state.facet(Ep);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new FC(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Fs(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(vq(r||this.win))s=-1,o=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);s=v.from,o=v.top}this.updateState=1;let u=this.viewState.measure();if(!u&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];u&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(v=>{try{return v.read(this)}catch(b){return Fs(this.state,b),AN}}),p=hA.create(this,this.state,[]),m=!1;p.flags|=u,n?n.flags|=u:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let v=0;v<h.length;v++)if(f[v]!=AN)try{let b=h[v];b.write&&b.write(f[v],this)}catch(b){Fs(this.state,b)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let b=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o)/this.scaleY;if((b>1||b<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+b,r?r.scrollTop+=b:this.win.scrollBy(0,b),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(NT))l(n)}get themeClasses(){return HT+" "+(this.state.facet(FT)?t$:e$)+" "+this.state.facet(f1)}updateAttrs(){let e=wN(this,Pq,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Uc)?"true":"false",class:"cm-content",style:`${pt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),wN(this,a6,n);let r=this.observer.ignore(()=>{let i=K5(this.contentDOM,this.contentAttrs,n),s=K5(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(it.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Cg);let e=this.state.facet(it.cspNonce);Ih.mount(this.root,this.styleModules.concat(ame).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return $C(this,e,iN(this,e,n,r))}moveByGroup(e,n){return $C(this,e,iN(this,e,n,r=>Ape(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return Me.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return xpe(this,e,n,r)}moveVertically(e,n,r){return $C(this,e,wpe(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=BT(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),BT(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Fl.find(s,e-i.from,-1,n)];return Sv(r,o.dir==ur.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Mq)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>hme)return Sq(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||wq(s.isolates,r=eN(this,e))))return s.order;r||(r=eN(this,e));let i=Vfe(e.text,n,r);return this.bidiCache.push(new gA(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{gq(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return o1.of(new Yp(typeof e=="number"?Me.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return o1.of(new Yp(Me.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return qr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qr.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ih.newName(),i=[f1.of(r),Cg.of(zT(`.${r}`,e))];return n&&n.dark&&i.push(FT.of(!0)),i}static baseTheme(e){return uu.lowest(Cg.of(zT("."+HT,e,n$)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Jr.get(r)||Jr.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}it.styleModule=Cg;it.inputHandler=Oq;it.clipboardInputFilter=i6;it.clipboardOutputFilter=s6;it.scrollHandler=Rq;it.focusChangeEffect=Eq;it.perLineTextDirection=Mq;it.exceptionSink=kq;it.updateListener=NT;it.editable=Uc;it.mouseSelectionStyle=Tq;it.dragMovesSelection=_q;it.clickAddsSelectionRange=Cq;it.decorations=p2;it.blockWrappers=Iq;it.outerDecorations=o6;it.atomicRanges=pb;it.bidiIsolatedRanges=Bq;it.scrollMargins=Lq;it.darkTheme=FT;it.cspNonce=mt.define({combine:t=>t.length?t[0]:""});it.contentAttributes=a6;it.editorAttributes=Pq;it.lineWrapping=it.contentAttributes.of({class:"cm-lineWrapping"});it.announce=Qt.define();const hme=4096,AN={};class gA{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:ur.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new gA(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function wN(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&t6(o,n)}return n}const dme=pt.mac?"mac":pt.windows?"win":pt.linux?"linux":"key";function fme(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let u=0;u<n.length-1;++u){const h=n[u];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function p1(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const pme=uu.default(it.domEventHandlers({keydown(t,e){return i$(r$(e.state),t,e,"editor")}})),kh=mt.define({enables:pme}),SN=new WeakMap;function r$(t){let e=t.facet(kh),n=SN.get(e);return n||SN.set(e,n=vme(e.reduce((r,i)=>r.concat(i),[]))),n}function mme(t,e,n){return i$(r$(t.state),e,t,n)}let ch=null;const gme=4e3;function vme(t,e=dme){let n=Object.create(null),r=Object.create(null),i=(o,l)=>{let u=r[o];if(u==null)r[o]=l;else if(u!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,u,h,f)=>{var p,m;let v=n[o]||(n[o]=Object.create(null)),b=l.split(/ (?!$)/).map(A=>fme(A,e));for(let A=1;A<b.length;A++){let j=b.slice(0,A).join(" ");i(j,!0),v[j]||(v[j]={preventDefault:!0,stopPropagation:!1,run:[C=>{let _=ch={view:C,prefix:j,scope:o};return setTimeout(()=>{ch==_&&(ch=null)},gme),!0}]})}let x=b.join(" ");i(x,!1);let w=v[x]||(v[x]={preventDefault:!1,stopPropagation:!1,run:((m=(p=v._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});u&&w.run.push(u),h&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let f=n[h]||(n[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let m in f)f[m].run.push(v=>p(v,qT))}let u=o[e]||o.key;if(u)for(let h of l)s(h,u,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(h,"Shift-"+u,o.shift,o.preventDefault,o.stopPropagation)}return n}let qT=null;function i$(t,e,n,r){qT=e;let i=Mfe(e),s=ia(i,0),o=Bl(s)==i.length&&i!=" ",l="",u=!1,h=!1,f=!1;ch&&ch.view==n&&ch.scope==r&&(l=ch.prefix+" ",Wq.indexOf(e.keyCode)<0&&(h=!0,ch=null));let p=new Set,m=w=>{if(w){for(let A of w.run)if(!p.has(A)&&(p.add(A),A(n)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),h=!0)}return!1},v=t[r],b,x;return v&&(m(v[l+p1(i,e,!o)])?u=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(pt.windows&&e.ctrlKey&&e.altKey)&&!(pt.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(b=Bh[e.keyCode])&&b!=i?(m(v[l+p1(b,e,!0)])||e.shiftKey&&(x=xv[e.keyCode])!=i&&x!=b&&m(v[l+p1(x,e,!1)]))&&(u=!0):o&&e.shiftKey&&m(v[l+p1(i,e,!0)])&&(u=!0),!u&&m(v._any)&&(u=!0)),h&&(u=!0),u&&f&&e.stopPropagation(),qT=null,u}class hf{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=s$(e);return[new hf(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return bme(e,n,r)}}function s$(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ur.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function jN(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,l=t.posAtCoords({x:s.left+1,y:o}),u=t.posAtCoords({x:s.right-1,y:o});return l==null||u==null?r:{from:Math.max(r.from,Math.min(l,u)),to:Math.min(r.to,Math.max(l,u))}}function bme(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==ur.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),u=s$(t),h=o.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),p=l.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),m=l.right-(f?parseInt(f.paddingRight):0),v=IT(t,r,1),b=IT(t,i,-1),x=v.type==cs.Text?v:null,w=b.type==cs.Text?b:null;if(x&&(t.lineWrapping||v.widgetLineBreaks)&&(x=jN(t,r,1,x)),w&&(t.lineWrapping||b.widgetLineBreaks)&&(w=jN(t,i,-1,w)),x&&w&&x.from==w.from&&x.to==w.to)return j(C(n.from,n.to,x));{let S=x?C(n.from,null,x):_(v,!1),O=w?C(null,n.to,w):_(b,!0),E=[];return(x||v).to<(w||b).from-(x&&w?1:0)||v.widgetLineBreaks>1&&S.bottom+t.defaultLineHeight/2<O.top?E.push(A(p,S.bottom,m,O.top)):S.bottom<O.top&&t.elementAtHeight((S.bottom+O.top)/2).type==cs.Text&&(S.bottom=O.top=(S.bottom+O.top)/2),j(S).concat(E).concat(j(O))}function A(S,O,E,D){return new hf(e,S-u.left,O-u.top,Math.max(0,E-S),D-O)}function j({top:S,bottom:O,horizontal:E}){let D=[];for(let N=0;N<E.length;N+=2)D.push(A(E[N],S,E[N+1],O));return D}function C(S,O,E){let D=1e9,N=-1e9,I=[];function R(z,H,P,F,U){let Z=t.coordsAtPos(z,z==E.to?-2:2),G=t.coordsAtPos(P,P==E.from?2:-2);!Z||!G||(D=Math.min(Z.top,G.top,D),N=Math.max(Z.bottom,G.bottom,N),U==ur.LTR?I.push(s&&H?p:Z.left,s&&F?m:G.right):I.push(!s&&F?p:G.left,!s&&H?m:Z.right))}let L=S??E.from,Q=O??E.to;for(let z of t.visibleRanges)if(z.to>L&&z.from<Q)for(let H=Math.max(z.from,L),P=Math.min(z.to,Q);;){let F=t.state.doc.lineAt(H);for(let U of t.bidiSpans(F)){let Z=U.from+F.from,G=U.to+F.from;if(Z>=P)break;G>H&&R(Math.max(Z,H),S==null&&Z<=L,Math.min(G,P),O==null&&G>=Q,U.dir)}if(H=F.to+1,H>=P)break}return I.length==0&&R(L,S==null,Q,O==null,t.textDirection),{top:D,bottom:N,horizontal:I}}function _(S,O){let E=l.top+(O?S.top:S.bottom);return{top:E,bottom:E,horizontal:[]}}}function yme(t,e){return t.constructor==e.constructor&&t.eq(e)}class xme{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ux)!=e.state.facet(ux)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(ux);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!yme(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,pt.safari&&pt.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ux=mt.define();function a$(t){return[qr.define(e=>new xme(e,t)),ux.of(t)]}const Dm=mt.define({combine(t){return sc(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Ame(t={}){return[Dm.of(t),wme,Sme,jme,Dq.of(!0)]}function o$(t){return t.startState.facet(Dm)!=t.state.facet(Dm)}const wme=a$({above:!0,markers(t){let{state:e}=t,n=e.facet(Dm),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor&&!(s&&pt.ios&&n.iosSelectionHandles)){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:Me.cursor(i.head,i.assoc);for(let u of hf.forRange(t,o,l))r.push(u)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=o$(t);return n&&CN(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){CN(e.state,t)},class:"cm-cursorLayer"});function CN(t,e){e.style.animationDuration=t.facet(Dm).cursorBlinkRate+"ms"}const Sme=a$({above:!1,markers(t){let e=[],{main:n,ranges:r}=t.state.selection;for(let i of r)if(!i.empty)for(let s of hf.forRange(t,"cm-selectionBackground",i))e.push(s);if(pt.ios&&!n.empty&&t.state.facet(Dm).iosSelectionHandles){for(let i of hf.forRange(t,"cm-selectionHandle cm-selectionHandle-start",Me.cursor(n.from,1)))e.push(i);for(let i of hf.forRange(t,"cm-selectionHandle cm-selectionHandle-end",Me.cursor(n.to,1)))e.push(i)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||o$(t)},class:"cm-selectionLayer"}),jme=uu.highest(it.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),l$=Qt.define({map(t,e){return t==null?null:e.mapPos(t)}}),Tg=us.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(l$)?r.value:n,t)}}),Cme=qr.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Tg);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Tg)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Tg),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Tg)!=t&&this.view.dispatch({effects:l$.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function _me(){return[Tg,Cme]}function _N(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)i(o+l.index,l)}function Tme(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class kme{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(l,u,h,f)=>i(f,h,h+l[0].length,l,u);else if(typeof r=="function")this.addMatch=(l,u,h,f)=>{let p=r(l,u,h);p&&f(h,h+l[0].length,p)};else if(r)this.addMatch=(l,u,h,f)=>f(h,h+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new tu,r=n.add.bind(n);for(let{from:i,to:s}of Tme(e,this.maxLength))_N(e.state.doc,this.regexp,i,s,(o,l)=>this.addMatch(l,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,u)=>{u>=e.view.viewport.from&&l<=e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(u,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),l=Math.min(s.to,i);if(l>=o){let u=e.state.doc.lineAt(o),h=u.to<l?e.state.doc.lineAt(l):u,f=Math.max(s.from,u.from),p=Math.min(s.to,h.to);if(this.boundary){for(;o>u.from;o--)if(this.boundary.test(u.text[o-1-u.from])){f=o;break}for(;l<h.to;l++)if(this.boundary.test(h.text[l-h.from])){p=l;break}}let m=[],v,b=(x,w,A)=>m.push(A.range(x,w));if(u==h)for(this.regexp.lastIndex=f-u.from;(v=this.regexp.exec(u.text))&&v.index<p-u.from;)this.addMatch(v,e,v.index+u.from,b);else _N(e.state.doc,this.regexp,f,p,(x,w)=>this.addMatch(w,e,x,b));n=n.update({filterFrom:f,filterTo:p,filter:(x,w)=>x<f||w>p,add:m})}}return n}}const $T=/x/.unicode!=null?"gu":"g",Ome=new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`,$T),Eme={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let WC=null;function Mme(){var t;if(WC==null&&typeof document<"u"&&document.body){let e=document.body.style;WC=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return WC||!1}const hx=mt.define({combine(t){let e=sc(t,{render:null,specialChars:Ome,addSpecialChars:null});return(e.replaceTabs=!Mme())&&(e.specialChars=new RegExp("	|"+e.specialChars.source,$T)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,$T)),e}});function c$(t={}){return[hx.of(t),Dme()]}let TN=null;function Dme(){return TN||(TN=qr.fromClass(class{constructor(t){this.view=t,this.decorations=kt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(hx)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new kme({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=ia(e[0],0);if(s==9){let o=i.lineAt(r),l=n.state.tabSize,u=e0(o.text,l,r-o.from);return kt.replace({widget:new Ime((l-u%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=kt.replace({widget:new Pme(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(hx);t.startState.facet(hx)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Rme="•";function Nme(t){return t>=32?Rme:t==10?"␤":String.fromCharCode(9216+t)}class Pme extends ul{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Nme(this.code),r=e.state.phrase("Control character")+" "+(Eme[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Ime extends ul{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="	",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Bme(){return Fme}const Lme=kt.line({class:"cm-activeLine"}),Fme=qr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Lme.range(i.from)),e=i.from)}return kt.set(n)}},{decorations:t=>t.decorations});class Hme extends ul{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?qg(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Sv(n[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function u$(t){let e=qr.fromClass(class{constructor(n){this.view=n,this.placeholder=t?kt.set([kt.widget({widget:new Hme(t),side:1}).range(0)]):kt.none}get decorations(){return this.view.state.doc.length?kt.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,it.contentAttributes.of({"aria-placeholder":t})]:e}const QT=2e3;function zme(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>QT||n.off>QT||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let u=r;u<=i;u++){let h=t.doc.line(u);h.length<=l&&s.push(Me.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let u=r;u<=i;u++){let h=t.doc.line(u),f=ST(h.text,o,t.tabSize,!0);if(f<0)s.push(Me.cursor(h.to));else{let p=ST(h.text,l,t.tabSize);s.push(Me.range(h.from+f,h.from+p))}}}return s}function qme(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function kN(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>QT?-1:i==r.length?qme(t,e.clientX):e0(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function $me(t,e){let n=kN(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=kN(t,i);if(!l)return r;let u=zme(t.state,n,l);return u.length?o?Me.create(u.concat(r.ranges)):Me.create(u):r}}:null}function Qme(t){let e=n=>n.altKey&&n.button==0;return it.mouseSelectionStyle.of((n,r)=>e(r)?$me(n,r):null)}const Ume={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Wme={style:"cursor: crosshair"};function Vme(t={}){let[e,n]=Ume[t.key||"Alt"],r=qr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,it.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?Wme:null})]}const m1="-10000px";class h${constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(u=>u);if(i===this.input){for(let u of this.tooltipViews)u.update&&u.update(e);return!1}let o=[],l=n?[]:null;for(let u=0;u<s.length;u++){let h=s[u],f=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let m=this.tooltips[p];m&&m.create==h.create&&(f=p)}if(f<0)o[u]=this.createTooltipView(h,u?o[u-1]:null),l&&(l[u]=!!h.above);else{let p=o[u]=this.tooltipViews[f];l&&(l[u]=n[f]),p.update&&p.update(e)}}}for(let u of this.tooltipViews)o.indexOf(u)<0&&(this.removeTooltipView(u),(r=u.destroy)===null||r===void 0||r.call(u));return n&&(l.forEach((u,h)=>n[h]=u),n.length=l.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function Yme(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const VC=mt.define({combine:t=>{var e,n,r;return{position:pt.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||Yme}}}),ON=new WeakMap,d6=qr.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(VC);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new h$(t,f6,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(VC);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=m1,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(pt.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=l6(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(VC).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let u=this.manager.tooltips[l],h=this.manager.tooltipViews[l],{dom:f}=h,p=t.pos[l],m=t.size[l];if(!p||u.clip!==!1&&(p.bottom<=Math.max(n.top,r.top)||p.top>=Math.min(n.bottom,r.bottom)||p.right<Math.max(n.left,r.left)-.1||p.left>Math.min(n.right,r.right)+.1)){f.style.top=m1;continue}let v=u.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,b=v?7:0,x=m.right-m.left,w=(e=ON.get(h))!==null&&e!==void 0?e:m.bottom-m.top,A=h.offset||Xme,j=this.view.textDirection==ur.LTR,C=m.width>r.right-r.left?j?r.left:r.right-m.width:j?Math.max(r.left,Math.min(p.left-(v?14:0)+A.x,r.right-x)):Math.min(Math.max(r.left,p.left-x+(v?14:0)-A.x),r.right-x),_=this.above[l];!u.strictSide&&(_?p.top-w-b-A.y<r.top:p.bottom+w+b+A.y>r.bottom)&&_==r.bottom-p.bottom>p.top-r.top&&(_=this.above[l]=!_);let S=(_?p.top-r.top:r.bottom-p.bottom)-b;if(S<w&&h.resize!==!1){if(S<this.view.defaultLineHeight){f.style.top=m1;continue}ON.set(h,w),f.style.height=(w=S)/s+"px"}else f.style.height&&(f.style.height="");let O=_?p.top-w-b-A.y:p.bottom+b+A.y,E=C+x;if(h.overlap!==!0)for(let D of o)D.left<E&&D.right>C&&D.top<O+w&&D.bottom>O&&(O=_?D.top-w-2-b:D.bottom+b+2);if(this.position=="absolute"?(f.style.top=(O-t.parent.top)/s+"px",EN(f,(C-t.parent.left)/i)):(f.style.top=O/s+"px",EN(f,C/i)),v){let D=p.left+(j?A.x:-A.x)-(C+14-7);v.style.left=D/i+"px"}h.overlap!==!0&&o.push({left:C,top:O,right:E,bottom:O+w}),f.classList.toggle("cm-tooltip-above",_),f.classList.toggle("cm-tooltip-below",!_),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=m1}},{eventObservers:{scroll(){this.maybeMeasure()}}});function EN(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const Gme=it.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Xme={x:0,y:0},f6=mt.define({enables:[d6,Gme]}),vA=mt.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class b2{static create(e){return new b2(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new h$(e,vA,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Kme=f6.compute([vA],t=>{let e=t.facet(vA);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:b2.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Zme{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.tile.nearest(n.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let l=e.coordsAtPos(i);if(!l||n.y<l.top||n.y>l.bottom||n.x<l.left-e.defaultCharacterWidth||n.x>l.right+e.defaultCharacterWidth)return;let u=e.bidiSpans(e.state.doc.lineAt(i)).find(f=>f.from<=i&&f.to>=i),h=u&&u.dir==ur.RTL?-1:1;s=n.x<l.left?-h:h}let o=this.source(e,i,s);if(o!=null&&o.then){let l=this.pending={pos:i};o.then(u=>{this.pending==l&&(this.pending=null,u&&!(Array.isArray(u)&&!u.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(u)?u:[u])}))},u=>Fs(e.state,u,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(d6),n=e?e.manager.tooltips.findIndex(r=>r.create==b2.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!Jme(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,l=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!e0e(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const g1=4;function Jme(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();i=Math.min(l.top,i),s=Math.max(l.bottom,s)}return e.clientX>=n-g1&&e.clientX<=r+g1&&e.clientY>=i-g1&&e.clientY<=s+g1}function e0e(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,l)<i)return!1;let u=t.posAtCoords({x:r,y:i},!1);return u>=e&&u<=n}function t0e(t,e={}){let n=Qt.define(),r=us.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of i){let u=s.changes.mapPos(l.pos,-1,ls.TrackDel);if(u!=null){let h=Object.assign(Object.create(null),l);h.pos=u,h.end!=null&&(h.end=s.changes.mapPos(h.end)),o.push(h)}}i=o}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(n0e)&&(i=[]);return i},provide:i=>vA.from(i)});return{active:r,extension:[r,qr.define(i=>new Zme(i,t,r,n,e.hoverTime||300)),Kme]}}function d$(t,e){let n=t.plugin(d6);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const n0e=Qt.define(),MN=mt.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Cv(t,e){let n=t.plugin(f$),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const f$=qr.fromClass(class{constructor(t){this.input=t.state.facet(_v),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(MN);this.top=new v1(t,!0,e.topContainer),this.bottom=new v1(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(MN);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new v1(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new v1(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(_v);if(n!=this.input){let r=n.filter(u=>u),i=[],s=[],o=[],l=[];for(let u of r){let h=this.specs.indexOf(u),f;h<0?(f=u(t.view),l.push(f)):(f=this.panels[h],f.update&&f.update(t)),i.push(f),(f.top?s:o).push(f)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let u of l)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>it.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class v1{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=DN(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=DN(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function DN(t){let e=t.nextSibling;return t.remove(),e}const _v=mt.define({enables:f$});class ru extends Ph{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ru.prototype.elementClass="";ru.prototype.toDOM=void 0;ru.prototype.mapMode=ls.TrackBefore;ru.prototype.startSide=ru.prototype.endSide=-1;ru.prototype.point=!0;const dx=mt.define(),r0e=mt.define(),i0e={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>pn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Ug=mt.define();function s0e(t){return[p$(),Ug.of({...i0e,...t})]}const RN=mt.define({combine:t=>t.some(e=>e)});function p$(t){return[a0e]}const a0e=qr.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Ug).map(e=>new PN(t,e)),this.fixed=!t.state.facet(RN);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(RN)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=pn.iter(this.view.state.facet(dx),this.view.viewport.from),r=[],i=this.gutters.map(s=>new o0e(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==cs.Text&&o){UT(n,r,l.from);for(let u of i)u.line(this.view,l,r);o=!1}else if(l.widget)for(let u of i)u.widget(this.view,l)}else if(s.type==cs.Text){UT(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Ug),n=t.state.facet(Ug),r=t.docChanged||t.heightChanged||t.viewportChanged||!pn.eq(t.startState.facet(dx),t.state.facet(dx),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new PN(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>it.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==ur.LTR?{left:r,right:i}:{right:r,left:i}})});function NN(t){return Array.isArray(t)?t:[t]}function UT(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class o0e{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=pn.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let l=new m$(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];UT(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(r0e)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class PN{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();o=(u.top+u.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=NN(n.markers(e)),n.initialSpacer&&(this.spacer=new m$(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=NN(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!pn.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class m${constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),l0e(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,u=s<n.length?n[s++]:null,h=!1;if(u){let f=u.elementClass;f&&(r+=" "+f);for(let p=o;p<this.markers.length;p++)if(this.markers[p].compare(u)){l=p,h=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!u)break;u.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(u.toDOM(e),i)),h&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function l0e(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const c0e=mt.define(),u0e=mt.define(),Mp=mt.define({combine(t){return sc(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(l,u,h)=>s(l,u,h)||o(l,u,h):o}return r}})}});class YC extends ru{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function GC(t,e){return t.state.facet(Mp).formatNumber(e,t.state)}const h0e=Ug.compute([Mp],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(c0e)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new YC(GC(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(u0e)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Mp)!=e.state.facet(Mp),initialSpacer(e){return new YC(GC(e,IN(e.state.doc.lines)))},updateSpacer(e,n){let r=GC(n.view,IN(n.view.state.doc.lines));return r==e.number?e:new YC(r)},domEventHandlers:t.facet(Mp).domEventHandlers,side:"before"}));function d0e(t={}){return[Mp.of(t),p$(),h0e]}function IN(t){let e=9;for(;e<t;)e=e*10+9;return e}const f0e=new class extends ru{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},p0e=dx.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(f0e.range(i)))}return pn.of(e)});function m0e(){return p0e}var XC;const Dp=new cn;function g0e(t){return mt.define({combine:t?e=>e.concat(t):void 0})}const v0e=new cn;class el{constructor(e,n,r=[],i=""){this.data=e,this.name=i,bn.prototype.hasOwnProperty("tree")||Object.defineProperty(bn.prototype,"tree",{get(){return Oi(this)}}),this.parser=n,this.extension=[Fh.of(this),bn.languageData.of((s,o,l)=>{let u=BN(s,o,l),h=u.type.prop(Dp);if(!h)return[];let f=s.facet(h),p=u.type.prop(v0e);if(p){let m=u.resolve(o-u.from,l);for(let v of p)if(v.test(m,s)){let b=s.facet(v.facet);return v.type=="replace"?b:b.concat(f)}}return f})].concat(r)}isActiveAt(e,n,r=-1){return BN(e,n,r).type.prop(Dp)==this.data}findRegions(e){let n=e.facet(Fh);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Dp)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(cn.mounted);if(l){if(l.tree.prop(Dp)==this.data){if(l.overlay)for(let u of l.overlay)r.push({from:u.from+o,to:u.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let u=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>u)return}}for(let u=0;u<s.children.length;u++){let h=s.children[u];h instanceof oi&&i(h,s.positions[u]+o)}};return i(Oi(e),0),r}get allowsNesting(){return!0}}el.setState=Qt.define();function BN(t,e,n){let r=t.facet(Fh),i=Oi(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,Gr.ExcludeBuffers|Gr.EnterBracketed))s.type.isTop&&(i=s);return i}class bA extends el{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=g0e(e.languageData);return new bA(n,e.parser.configure({props:[Dp.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new bA(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Oi(t){let e=t.field(el.state,!1);return e?e.tree:oi.empty}class b0e{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let lg=null;class yA{constructor(e,n,r=[],i,s,o,l,u){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new yA(e,n,[],oi.empty,0,r,[],null)}startParse(){return this.parser.startParse(new b0e(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=oi.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(cf.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(cf.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=lg;lg=this;try{return e()}finally{lg=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=LN(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((h,f,p,m)=>u.push({fromA:h,toA:f,fromB:p,toB:m})),r=cf.applyChanges(r,u),i=oi.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);f<p&&l.push({from:f,to:p})}}}return new yA(this.parser,n,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=LN(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends jz{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let u=lg;if(u){for(let h of i)u.tempSkipped.push(h);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=o,new oi(ua.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return lg}}function LN(t,e,n){return cf.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Rm{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Rm(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=yA.create(e.facet(Fh).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Rm(r)}}el.state=us.define({create:Rm.init,update(t,e){for(let n of e.effects)if(n.is(el.setState))return n.value;return e.startState.facet(Fh)!=e.state.facet(Fh)?Rm.init(e.state):t.apply(e)}});let g$=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(g$=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const KC=typeof navigator<"u"&&(!((XC=navigator.scheduling)===null||XC===void 0)&&XC.isInputPending)?()=>navigator.scheduling.isInputPending():null,y0e=qr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(el.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(el.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=g$(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(el.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!KC?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,u=s.context.work(()=>KC&&KC()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:el.setState.of(new Rm(s.context))})),this.chunkBudget>0&&!(u&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Fs(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Fh=mt.define({combine(t){return t.length?t[0]:null},enables:t=>[el.state,y0e,it.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]}),x0e=mt.define(),mb=mt.define({combine:t=>{if(!t.length)return"  ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function xA(t){let e=t.facet(mb);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Tv(t,e){let n="",r=t.tabSize,i=t.facet(mb)[0];if(i=="	"){for(;e>=r;)n+="	",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function p6(t,e){t instanceof bn&&(t=new y2(t));for(let r of t.state.facet(x0e)){let i=r(t,e);if(i!==void 0)return i}let n=Oi(t.state);return n.length>=e?w0e(t,n,e):null}class y2{constructor(e,n={}){this.state=e,this.options=n,this.unit=xA(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return e0(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const A0e=new cn;function w0e(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return v$(r,t,n)}function v$(t,e,n){for(let r=t;r;r=r.next){let i=j0e(r.node);if(i)return i(m6.create(e,n,r))}return 0}function S0e(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function j0e(t){let e=t.type.prop(A0e);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(cn.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>k0e(o,!0,1,void 0,s&&!S0e(o)?i.from:void 0)}return t.parent==null?C0e:null}function C0e(){return 0}class m6 extends y2{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new m6(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(_0e(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return v$(this.context.next,this.base,this.pos)}}function _0e(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function T0e(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=n.to;;){let u=e.childAfter(l);if(!u||u==r)return null;if(!u.type.isSkipped){if(u.from>=o)return null;let h=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+h}}l=u.to}}function k0e(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==t.pos+o,u=T0e(t);return u?l?t.column(u.from):t.column(u.to):t.baseIndent+(l?0:t.unit*n)}const O0e=200;function b$(){return bn.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+O0e)return t;let s=n.sliceString(i.from,r);if(!e.some(h=>h.test(s)))return t;let{state:o}=t,l=-1,u=[];for(let{head:h}of o.selection.ranges){let f=o.doc.lineAt(h);if(f.from==l)continue;l=f.from;let p=p6(o,f.from);if(p==null)continue;let m=/^\s*/.exec(f.text)[0],v=Tv(o,p);m!=v&&u.push({from:f.from,to:f.from+m.length,insert:v})}return u.length?[t,{changes:u,sequential:!0}]:t})}const E0e=mt.define(),M0e=new cn;function D0e(t,e,n){let r=Oi(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=n||l.from>n)continue;if(s&&l.from<e)break;let u=l.type.prop(M0e);if(u&&(l.to<r.length-50||r.length==t.doc.length||!R0e(l))){let h=u(l,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(s=h)}}return s}function R0e(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function AA(t,e,n){for(let r of t.facet(E0e)){let i=r(t,e,n);if(i)return i}return D0e(t,e,n)}function y$(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const x2=Qt.define({map:y$}),gb=Qt.define({map:y$});function x$(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Af=us.define({create(){return kt.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=FN(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(x2)&&!N0e(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(S$),i=r?kt.replace({widget:new z0e(r(e.state,n.value))}):HN;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(gb)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=FN(t,e.selection.main.head)),t},provide:t=>it.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(HN.range(r,i))}return kt.set(e,!0)}});function FN(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function wA(t,e,n){var r;let i=null;return(r=t.field(Af,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function N0e(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function A$(t,e){return t.field(Af,!1)?e:e.concat(Qt.appendConfig.of(j$()))}const P0e=t=>{for(let e of x$(t)){let n=AA(t.state,e.from,e.to);if(n)return t.dispatch({effects:A$(t.state,[x2.of(n),w$(t,n)])}),!0}return!1},I0e=t=>{if(!t.state.field(Af,!1))return!1;let e=[];for(let n of x$(t)){let r=wA(t.state,n.from,n.to);r&&e.push(gb.of(r),w$(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function w$(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return it.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const B0e=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=AA(e,i.from,i.to);s&&n.push(x2.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:A$(t.state,n)}),!!n.length},L0e=t=>{let e=t.state.field(Af,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(gb.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},F0e=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:P0e},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:I0e},{key:"Ctrl-Alt-[",run:B0e},{key:"Ctrl-Alt-]",run:L0e}],H0e={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},S$=mt.define({combine(t){return sc(t,H0e)}});function j$(t){return[Af,Q0e]}function C$(t,e){let{state:n}=t,r=n.facet(S$),i=o=>{let l=t.lineBlockAt(t.posAtDOM(o.target)),u=wA(t.state,l.from,l.to);u&&t.dispatch({effects:gb.of(u)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const HN=kt.replace({widget:new class extends ul{toDOM(t){return C$(t,null)}}});class z0e extends ul{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return C$(e,this.value)}}const q0e={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ZC extends ru{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function $0e(t={}){let e={...q0e,...t},n=new ZC(e,!0),r=new ZC(e,!1),i=qr.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Fh)!=o.state.facet(Fh)||o.startState.field(Af,!1)!=o.state.field(Af,!1)||Oi(o.startState)!=Oi(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new tu;for(let u of o.viewportLineBlocks){let h=wA(o.state,u.from,u.to)?r:AA(o.state,u.from,u.to)?n:null;h&&l.add(u.from,u.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[i,s0e({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||pn.empty},initialSpacer(){return new ZC(e,!1)},domEventHandlers:{...s,click:(o,l,u)=>{if(s.click&&s.click(o,l,u))return!0;let h=wA(o.state,l.from,l.to);if(h)return o.dispatch({effects:gb.of(h)}),!0;let f=AA(o.state,l.from,l.to);return f?(o.dispatch({effects:x2.of(f)}),!0):!1}}}),j$()]}const Q0e=it.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Mf{constructor(e,n){this.specs=e;let r;function i(l){let u=Ih.newName();return(r||(r=Object.create(null)))["."+u]=l,u}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof el?l=>l.prop(Dp)==o.data:o?l=>l==o:void 0,this.style=Tz(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new Ih(r):null,this.themeType=n.themeType}static define(e,n){return new Mf(e,n||{})}}const WT=mt.define(),_$=mt.define({combine(t){return t.length?[t[0]]:null}});function JC(t){let e=t.facet(WT);return e.length?e:t.facet(_$)}function A2(t,e){let n=[W0e],r;return t instanceof Mf&&(t.module&&n.push(it.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(_$.of(t)):r?n.push(WT.computeN([it.darkTheme],i=>i.facet(it.darkTheme)==(r=="dark")?[t]:[])):n.push(WT.of(t)),n}class U0e{constructor(e){this.markCache=Object.create(null),this.tree=Oi(e.state),this.decorations=this.buildDeco(e,JC(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Oi(e.state),r=JC(e.state),i=r!=JC(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return kt.none;let r=new tu;for(let{from:i,to:s}of e.visibleRanges)Mue(this.tree,n,(o,l,u)=>{r.add(o,l,this.markCache[u]||(this.markCache[u]=kt.mark({class:u})))},i,s);return r.finish()}}const W0e=uu.high(qr.fromClass(U0e,{decorations:t=>t.decorations})),V0e=Mf.define([{tag:me.meta,color:"#404740"},{tag:me.link,textDecoration:"underline"},{tag:me.heading,textDecoration:"underline",fontWeight:"bold"},{tag:me.emphasis,fontStyle:"italic"},{tag:me.strong,fontWeight:"bold"},{tag:me.strikethrough,textDecoration:"line-through"},{tag:me.keyword,color:"#708"},{tag:[me.atom,me.bool,me.url,me.contentSeparator,me.labelName],color:"#219"},{tag:[me.literal,me.inserted],color:"#164"},{tag:[me.string,me.deleted],color:"#a11"},{tag:[me.regexp,me.escape,me.special(me.string)],color:"#e40"},{tag:me.definition(me.variableName),color:"#00f"},{tag:me.local(me.variableName),color:"#30a"},{tag:[me.typeName,me.namespace],color:"#085"},{tag:me.className,color:"#167"},{tag:[me.special(me.variableName),me.macroName],color:"#256"},{tag:me.definition(me.propertyName),color:"#00c"},{tag:me.comment,color:"#940"},{tag:me.invalid,color:"#f00"}]),Y0e=it.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),T$=1e4,k$="()[]{}",O$=mt.define({combine(t){return sc(t,{afterCursor:!0,brackets:k$,maxScanDistance:T$,renderMatch:K0e})}}),G0e=kt.mark({class:"cm-matchingBracket"}),X0e=kt.mark({class:"cm-nonmatchingBracket"});function K0e(t){let e=[],n=t.matched?G0e:X0e;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function zN(t){let e=[],n=t.facet(O$);for(let r of t.selection.ranges){if(!r.empty)continue;let i=Hl(t,r.head,-1,n)||r.head>0&&Hl(t,r.head-1,1,n)||n.afterCursor&&(Hl(t,r.head,1,n)||r.head<t.doc.length&&Hl(t,r.head+1,-1,n));i&&(e=e.concat(n.renderMatch(i,t)))}return kt.set(e,!0)}const Z0e=qr.fromClass(class{constructor(t){this.paused=!1,this.decorations=zN(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=zN(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),J0e=[Z0e,Y0e];function E$(t={}){return[O$.of(t),J0e]}const ege=new cn;function VT(t,e,n){let r=t.prop(e<0?cn.openedBy:cn.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function YT(t){let e=t.type.prop(ege);return e?e(t.node):t}function Hl(t,e,n,r={}){let i=r.maxScanDistance||T$,s=r.brackets||k$,o=Oi(t),l=o.resolveInner(e,n);for(let u=l;u;u=u.parent){let h=VT(u.type,n,s);if(h&&u.from<u.to){let f=YT(u);if(f&&(n>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return tge(t,e,n,u,f,h,s)}}return nge(t,e,n,o,l.type,i,s)}function tge(t,e,n,r,i,s,o){let l=r.parent,u={from:i.from,to:i.to},h=0,f=l==null?void 0:l.cursor();if(f&&(n<0?f.childBefore(r.from):f.childAfter(r.to)))do if(n<0?f.to<=r.from:f.from>=r.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let p=YT(f);return{start:u,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(VT(f.type,n,o))h++;else if(VT(f.type,-n,o)){if(h==0){let p=YT(f);return{start:u,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(n<0?f.prevSibling():f.nextSibling());return{start:u,matched:!1}}function nge(t,e,n,r,i,s,o){if(n<0?!e:e==t.doc.length)return null;let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),u=o.indexOf(l);if(u<0||u%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},f=t.doc.iterRange(e,n>0?t.doc.length:0),p=0;for(let m=0;!f.next().done&&m<=s;){let v=f.value;n<0&&(m+=v.length);let b=e+m*n;for(let x=n>0?0:v.length-1,w=n>0?v.length:-1;x!=w;x+=n){let A=o.indexOf(v[x]);if(!(A<0||r.resolveInner(b+x,1).type!=i))if(A%2==0==n>0)p++;else{if(p==1)return{start:h,end:{from:b+x,to:b+x+1},matched:A>>1==u>>1};p--}}n>0&&(m+=v.length)}return f.done?{start:h,matched:!1}:null}const rge=Object.create(null),qN=[ua.none],$N=[],QN=Object.create(null),ige=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ige[t]=sge(rge,e);function e_(t,e){$N.indexOf(t)>-1||($N.push(t),console.warn(e))}function sge(t,e){let n=[];for(let l of e.split(" ")){let u=[];for(let h of l.split(".")){let f=t[h]||me[h];f?typeof f=="function"?u.length?u=u.map(f):e_(h,`Modifier ${h} used at start of tag`):u.length?e_(h,`Tag ${h} used as modifier`):u=Array.isArray(f)?f:[f]:e_(h,`Unknown highlighting tag ${h}`)}for(let h of u)n.push(h)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),s=QN[i];if(s)return s.id;let o=QN[i]=ua.define({id:qN.length,name:r,props:[Cz({[r]:n})]});return qN.push(o),o.id}ur.RTL,ur.LTR;function age(t,e){if(!e||e.type.id!==$p)return null;const n={card:Pl.CardOneToOne,matchingLabels:[],on:!1,include:[],fill:{lhs:null,rhs:null}},r=e.getChild(The);if(r){n.on=r.getChild(xhe)!==null;const o=r.getChild(qp),l=o?o.getChildren(fv):[];for(const p of l)n.matchingLabels.push(t.sliceDoc(p.from,p.to));const u=r.getChild(Ahe),h=r.getChild(whe),f=u||h;if(f){n.card=u?Pl.CardManyToOne:Pl.CardOneToMany;const p=f.nextSibling,m=(p==null?void 0:p.getChildren(fv))||[];for(const v of m)n.include.push(t.sliceDoc(v.from,v.to))}}const i=e.getChild(khe);if(i){const o=i.getChild(Ohe),l=i.getChild(Ehe),u=i.getChild(Mhe),h=f=>{const p=f.getChild(h2);return p?parseFloat(t.sliceDoc(p.from,p.to)):null};if(o){const f=h(o);n.fill.lhs=f,n.fill.rhs=f}l&&(n.fill.lhs=h(l)),u&&(n.fill.rhs=h(u))}return wh(e,UE,WE,VE)&&n.card===Pl.CardOneToOne&&(n.card=Pl.CardManyToMany),n}let oge=class{constructor(e){this.tree=Oi(e),this.state=e,this.diagnostics=[]}getDiagnostics(){return this.diagnostics.sort((e,n)=>e.from-n.from)}analyze(){this.checkAST(this.tree.topNode.firstChild),this.diagnoseAllErrorNodes()}diagnoseAllErrorNodes(){const e=this.tree.cursor();for(;e.next();)if(e.type.id===0&&e.to!==this.tree.topNode.to){const n=e.node.parent;this.diagnostics.push({severity:"error",message:"unexpected expression",from:n?n.from:e.from,to:n?n.to:e.to})}}checkAST(e){if(!e)return ie.none;switch(e.type.id){case u2:this.checkAggregationExpr(e);break;case $p:this.checkBinaryExpr(e);break;case lT:this.checkCallFunction(e);break;case Hz:this.checkAST(e.getChild("Expr"));break;case zz:{const n=this.checkAST(e.getChild("Expr"));n!==ie.scalar&&n!==ie.vector&&this.addDiagnostic(e,`unary expression only allowed on expressions of type scalar or instant vector, got ${n}`);break}case Fz:{this.checkAnchoredSmoothedExpr(e,[hT,uT,cT]);break}case Lz:{this.checkAnchoredSmoothedExpr(e,[Bz,Iz,hT,uT,cT]);break}case vf:{const n=this.checkAST(e.getChild("Expr"));n!==ie.vector&&this.addDiagnostic(e,`subquery is only allowed on instant vector, got ${n} in ${e.name} instead`);break}case Tm:this.checkAST(e.getChild("Expr"));break;case ub:this.checkVectorSelector(e);break;case YE:{const n=this.checkAST(e.getChild("Expr"));n!==ie.vector&&n!==ie.matrix&&this.addDiagnostic(e,"@ modifier must be preceded by an instant selector vector or range vector selector or a subquery");break}}return Ol(e)}checkAggregationExpr(e){var n;const r=(n=e.firstChild)===null||n===void 0?void 0:n.firstChild;if(!r){this.addDiagnostic(e,"aggregation operator expected in aggregation expression but got nothing");return}const i=e.getChild(Th),s=i?i.getChildren("Expr"):[];if(!s.length){this.addDiagnostic(e,"unable to find the parameter for the expression");return}this.expectType(s[s.length-1],ie.vector,"aggregation expression"),(r.type.id===Dz||r.type.id===kz||r.type.id===Ez||r.type.id===Mz||r.type.id===She)&&this.expectType(s[0],ie.scalar,"aggregation parameter"),r.type.id===Oz&&this.expectType(s[0],ie.string,"aggregation parameter")}checkBinaryExpr(e){const n=e.firstChild,r=e.lastChild;if(!n||!r){this.addDiagnostic(e,"left or right expression is missing in binary expression");return}const i=this.checkAST(n),s=this.checkAST(r),o=e.getChild(Rz),l=wh(e,rT,mv,aT,oT,iT,sT),u=aA(e,Pz),h=aA(e,Nz),f=wh(e,UE,WE,VE);o?l||this.addDiagnostic(e,"bool modifier can only be used on comparison operators"):i===ie.scalar&&s===ie.scalar&&(l?this.addDiagnostic(e,"comparisons between scalars must use BOOL modifier"):u?this.addDiagnostic(e,'operator ">/" not allowed for Scalar operations'):h&&this.addDiagnostic(e,'operator "</" not allowed for Scalar operations'));const p=age(this.state,e);if(p!==null&&p.on)for(const m of p.matchingLabels)for(const v of p.include)m===v&&this.addDiagnostic(e,`label "${m}" must not occur in ON and GROUP clause at once`);i!==ie.scalar&&i!==ie.vector&&this.addDiagnostic(n,"binary expression must contain only scalar and instant vector types"),s!==ie.scalar&&s!==ie.vector&&this.addDiagnostic(r,"binary expression must contain only scalar and instant vector types"),(i!==ie.vector||s!==ie.vector)&&p!==null?p.matchingLabels.length>0&&this.addDiagnostic(e,"vector matching only allowed between instant vectors"):f&&(((p==null?void 0:p.card)===Pl.CardOneToMany||(p==null?void 0:p.card)===Pl.CardManyToOne)&&this.addDiagnostic(e,"no grouping allowed for set operations"),(p==null?void 0:p.card)!==Pl.CardManyToMany&&this.addDiagnostic(e,"set operations must always be many-to-many")),(i===ie.scalar||s===ie.scalar)&&f&&this.addDiagnostic(e,"set operator not allowed in binary scalar expression")}checkCallFunction(e){var n;const r=(n=e.firstChild)===null||n===void 0?void 0:n.firstChild;if(!r){this.addDiagnostic(e,"function not defined");return}const i=e.getChild(Th),s=i?i.getChildren("Expr"):[],o=Qz(r.type.id),l=o.argTypes.length;if(o.variadic===0)s.length!==l&&this.addDiagnostic(e,`expected ${l} argument(s) in call to "${o.name}", got ${s.length}`);else{const h=l-1;if(h>s.length)this.addDiagnostic(e,`expected at least ${h} argument(s) in call to "${o.name}", got ${s.length}`);else{const f=h+o.variadic;o.variadic>0&&f<s.length&&this.addDiagnostic(e,`expected at most ${f} argument(s) in call to "${o.name}", got ${s.length}`)}}o.name==="info"&&s.length>1&&s[1].getChild(rA)&&this.addDiagnostic(e,`expected label selectors as the second argument to "info" function, got ${s[1].type}`);let u=0;for(let h=0;h<s.length;h++){if(u=h,u>=o.argTypes.length){if(o.variadic===0)break;u=o.argTypes.length-1}this.expectType(s[h],o.argTypes[u],`call to function "${o.name}"`)}}checkAnchoredSmoothedExpr(e,n){var r,i;const s=Ol(e);if(s!==ie.vector&&s!==ie.matrix){this.addDiagnostic(e,`smoothed/anchored expression only allowed on instant vector or range vector selector, got ${s} instead`);return}const o=(r=e.parent)===null||r===void 0?void 0:r.parent;if(!o||o.type.id!==lT)return;const l=(i=o.firstChild)===null||i===void 0?void 0:i.firstChild;if(!l){this.addDiagnostic(e,"function not defined");return}n.includes(l.type.id)||this.addDiagnostic(e,"smoothed/anchored expression can only be used in specific functions")}checkVectorSelector(e){const n=e.getChild(Qp),r=[pv,uf,Ah];let i=[];for(const u of r)i=i.concat(Wz(n?n.getChildren(u):[],this.state));let s="";const o=e.getChild(rA);if(o&&(s=this.state.sliceDoc(o.from,o.to)),s!==""){const u=i.find(h=>h.name==="__name__");u&&this.addDiagnostic(e,`metric name must not be set twice: ${s} or ${u.value}`),i.push(new Uz(hb,"__name__",s))}else{const u=i.filter(h=>h.name==="__name__");u.length>1&&this.addDiagnostic(e,`metric name must not be set twice: ${u[0].value} or ${u[1].value}`)}i.every(u=>u.matchesEmpty())&&this.addDiagnostic(e,"vector selector must contain at least one non-empty matcher")}expectType(e,n,r){const i=this.checkAST(e);i!==n&&this.addDiagnostic(e,`expected type ${n} in ${r}, got ${i}`)}addDiagnostic(e,n){this.diagnostics.push({severity:"error",message:n,from:e.from,to:e.to})}};class M${constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Oi(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(D$(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function UN(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lge(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=UN(e)+UN(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function cge(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:lge(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}class WN{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function df(t){return t.selection.main.from}function D$(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const g6=ic.define();function uge(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(l=>{if(l!=i&&n!=r&&t.sliceDoc(l.from+s,l.from+o)!=t.sliceDoc(n,r))return{range:l};let u=t.toText(e);return{changes:{from:l.from+s,to:r==i.from?l.to:l.from+o,insert:u},range:Me.cursor(l.from+s+u.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const VN=new WeakMap;function hge(t){if(!Array.isArray(t))return t;let e=VN.get(t);return e||VN.set(t,e=cge(t)),e}const SA=Qt.define(),kv=Qt.define();class dge{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ia(e,n),i=Bl(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(ia(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let j=ia(e,0),C=Bl(j),_=C==e.length?0:-100;if(j!=n[0])if(j==r[0])_+=-200;else return null;return this.ret(_,[0,C])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let u=n.length,h=0;if(l<0){for(let j=0,C=Math.min(e.length,200);j<C&&h<u;){let _=ia(e,j);(_==n[h]||_==r[h])&&(i[h++]=j),j+=Bl(_)}if(h<u)return null}let f=0,p=0,m=!1,v=0,b=-1,x=-1,w=/[a-z]/.test(e),A=!0;for(let j=0,C=Math.min(e.length,200),_=0;j<C&&p<u;){let S=ia(e,j);l<0&&(f<u&&S==n[f]&&(s[f++]=j),v<u&&(S==n[v]||S==r[v]?(v==0&&(b=j),x=j+1,v++):v=0));let O,E=S<255?S>=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(O=XE(S))!=O.toLowerCase()?1:O!=O.toUpperCase()?2:0;(!j||E==1&&w||_==0&&E!=0)&&(n[p]==S||r[p]==S&&(m=!0)?o[p++]=j:o.length&&(A=!1)),_=E,j+=Bl(S)}return p==u&&o[0]==0&&A?this.result(-100+(m?-200:0),o,e):v==u&&b==0?this.ret(-200-e.length+(x==e.length?0:-100),[0,x]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):v==u?this.ret(-900-e.length,[b,x]):p==u?this.result(-100+(m?-200:0)+-700+(A?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let l=o+(this.astral?Bl(ia(r,o)):1);s&&i[s-1]==o?i[s-1]=l:(i[s++]=o,i[s++]=l)}return this.ret(e-r.length,i)}}class fge{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Hi=mt.define({combine(t){return sc(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pge,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>YN(e(r),n(r)),optionClass:(e,n)=>r=>YN(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function YN(t,e){return t?e?t+" "+e:t:e}function pge(t,e,n,r,i,s){let o=t.textDirection==ur.RTL,l=o,u=!1,h="top",f,p,m=e.left-i.left,v=i.right-e.right,b=r.right-r.left,x=r.bottom-r.top;if(l&&m<Math.min(b,v)?l=!1:!l&&v<Math.min(b,m)&&(l=!0),b<=(l?m:v))f=Math.max(i.top,Math.min(n.top,i.bottom-x))-e.top,p=Math.min(400,l?m:v);else{u=!0,p=Math.min(400,(o?e.right:i.right-e.left)-30);let j=i.bottom-e.bottom;j>=x||j>e.top?f=n.bottom-e.top:(h="bottom",f=e.bottom-n.top)}let w=(e.bottom-e.top)/s.offsetHeight,A=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${f/w}px; max-width: ${p/A}px`,class:"cm-completionInfo-"+(u?o?"left-narrow":"right-narrow":l?"left":"right")}}const v6=Qt.define();function mge(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let l=n.displayLabel||n.label,u=0;for(let h=0;h<s.length;){let f=s[h++],p=s[h++];f>u&&o.appendChild(document.createTextNode(l.slice(u,f)));let m=o.appendChild(document.createElement("span"));m.appendChild(document.createTextNode(l.slice(f,p))),m.className="cm-completionMatchedText",u=p}return u<l.length&&o.appendChild(document.createTextNode(l.slice(u))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function t_(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class gge{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:u=>this.placeInfo(u),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,l=e.state.facet(Hi);this.optionContent=mge(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=t_(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",u=>{let{options:h}=e.state.field(n).open;for(let f=u.target,p;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(p=/-(\d+)$/.exec(f.id))&&+p[1]<h.length){this.applyCompletion(e,h[+p[1]]),u.preventDefault();return}if(u.target==this.list){let f=this.list.classList.contains("cm-completionListIncompleteTop")&&u.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&u.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;f!=null&&(e.dispatch({effects:v6.of(f)}),u.preventDefault())}}),this.dom.addEventListener("focusout",u=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Hi).closeOnBlur&&u.relatedTarget!=e.contentDOM&&e.dispatch({effects:kv.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:l}=r.open;(!i.open||i.open.options!=s)&&(this.range=t_(s.length,o,e.state.facet(Hi).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),l!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=t_(n.options.length,n.selected,this.view.state.facet(Hi).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,i)}).catch(l=>Fs(this.view.state,l,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&bge(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Hi).positionInfo(this.view,n,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:l,match:u}=e[o],{section:h}=l;if(h){let m=typeof h=="string"?h:h.name;if(m!=s&&(o>r.from||r.from==0))if(s=m,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let v=i.appendChild(document.createElement("completion-section"));v.textContent=m}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+o,f.setAttribute("role","option");let p=this.optionClass(l);p&&(f.className=p);for(let m of this.optionContent){let v=m(l,this.view.state,this.view,u);v&&f.appendChild(v)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function vge(t,e){return n=>new gge(n,t,e)}function bge(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function GN(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function yge(t,e){let n=[],r=null,i=null,s=f=>{n.push(f);let{section:p}=f.completion;if(p){r||(r=[]);let m=typeof p=="string"?p:p.name;r.some(v=>v.name==m)||r.push(typeof p=="string"?{name:m}:p)}},o=e.facet(Hi);for(let f of t)if(f.hasResult()){let p=f.result.getMatch;if(f.result.filter===!1)for(let m of f.result.options)s(new WN(m,f.source,p?p(m):[],1e9-n.length));else{let m=e.sliceDoc(f.from,f.to),v,b=o.filterStrict?new fge(m):new dge(m);for(let x of f.result.options)if(v=b.match(x.label)){let w=x.displayLabel?p?p(x,v.matched):[]:v.matched,A=v.score+(x.boost||0);if(s(new WN(x,f.source,w,A)),typeof x.section=="object"&&x.section.rank==="dynamic"){let{name:j}=x.section;i||(i=Object.create(null)),i[j]=Math.max(A,i[j]||-1e9)}}}}if(r){let f=Object.create(null),p=0,m=(v,b)=>(v.rank==="dynamic"&&b.rank==="dynamic"?i[b.name]-i[v.name]:0)||(typeof v.rank=="number"?v.rank:1e9)-(typeof b.rank=="number"?b.rank:1e9)||(v.name<b.name?-1:1);for(let v of r.sort(m))p-=1e5,f[v.name]=p;for(let v of n){let{section:b}=v.completion;b&&(v.score+=f[typeof b=="string"?b:b.name])}}let l=[],u=null,h=o.compareCompletions;for(let f of n.sort((p,m)=>m.score-p.score||h(p.completion,m.completion))){let p=f.completion;!u||u.label!=p.label||u.detail!=p.detail||u.type!=null&&p.type!=null&&u.type!=p.type||u.apply!=p.apply||u.boost!=p.boost?l.push(f):GN(f.completion)>GN(u)&&(l[l.length-1]=f),u=f.completion}return l}class Rp{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Rp(this.options,XN(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(h=>h.isPending))return i.setDisabled();let l=yge(e,n);if(!l.length)return i&&e.some(h=>h.isPending)?i.setDisabled():null;let u=n.facet(Hi).selectOnOpen?0:-1;if(i&&i.selected!=u&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<l.length;f++)if(l[f].completion==h){u=f;break}}return new Rp(l,XN(r,u),{pos:e.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:Cge,above:s.aboveCursor},i?i.timestamp:Date.now(),u,!1)}map(e){return new Rp(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Rp(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class jA{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new jA(Sge,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Hi),s=(r.override||n.languageDataAt("autocomplete",df(n)).map(hge)).map(u=>(this.active.find(f=>f.source==u)||new uo(u,this.active.some(f=>f.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((u,h)=>u==this.active[h])&&(s=this.active);let o=this.open,l=e.effects.some(u=>u.is(b6));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(u=>u.hasResult()&&e.changes.touchesRange(u.from,u.to))||!xge(s,this.active)||l?o=Rp.build(s,n,this.id,o,r,l):o&&o.disabled&&!s.some(u=>u.isPending)&&(o=null),!o&&s.every(u=>!u.isPending)&&s.some(u=>u.hasResult())&&(s=s.map(u=>u.hasResult()?new uo(u.source,0):u));for(let u of e.effects)u.is(v6)&&(o=o&&o.setSelected(u.value,this.id));return s==this.active&&o==this.open?this:new jA(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Age:wge}}function xge(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const Age={"aria-autocomplete":"list"},wge={};function XN(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Sge=[];function R$(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(g6);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class uo{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=R$(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new uo(i.source,0)),r&4&&i.state==0&&(i=new uo(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(SA))i=new uo(i.source,1,s.value);else if(s.is(kv))i=new uo(i.source,0);else if(s.is(b6))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(df(e.state))}}class Gp extends uo{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=df(e.state);if(l>o||!i||n&2&&(df(e.startState)==this.from||l<this.limit))return new uo(this.source,n&4?1:0);let u=e.changes.mapPos(this.limit);return jge(i.validFor,e.state,s,o)?new Gp(this.source,this.explicit,u,i,s,o):i.update&&(i=i.update(i,s,o,new M$(e.state,l,!1)))?new Gp(this.source,this.explicit,u,i,i.from,(r=i.to)!==null&&r!==void 0?r:df(e.state)):new uo(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Gp(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new uo(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function jge(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):D$(t,!0).test(i)}const b6=Qt.define({map(t,e){return t.map(n=>n.map(e))}}),sa=us.define({create(){return jA.start()},update(t,e){return t.update(e)},provide:t=>[f6.from(t,e=>e.tooltip),it.contentAttributes.from(t,e=>e.attrs)]});function y6(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(sa).active.find(i=>i.source==e.source);return r instanceof Gp?(typeof n=="string"?t.dispatch({...uge(t.state,n,r.from,r.to),annotations:g6.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Cge=vge(sa,y6);function b1(t,e="option"){return n=>{let r=n.state.field(sa,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Hi).interactionDelay)return!1;let i=1,s;e=="page"&&(s=d$(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:v6.of(l)}),!0}}const _ge=t=>{let e=t.state.field(sa,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Hi).interactionDelay?!1:y6(t,e.open.options[e.open.selected])},n_=t=>t.state.field(sa,!1)?(t.dispatch({effects:SA.of(!0)}),!0):!1,Tge=t=>{let e=t.state.field(sa,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:kv.of(null)}),!0)};class kge{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Oge=50,Ege=1e3,Mge=qr.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(sa).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(sa),n=t.state.facet(Hi);if(!t.selectionSet&&!t.docChanged&&t.startState.field(sa)==e)return;let r=t.transactions.some(s=>{let o=R$(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>Oge&&Date.now()-o.time>Ege){for(let l of o.context.abortListeners)try{l()}catch(u){Fs(this.view.state,u)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(SA)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(sa);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hi).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=df(e),r=new M$(e,n,t.explicit,this.view),i=new kge(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:kv.of(null)}),Fs(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hi).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Hi),r=this.view.state.field(sa);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let l=df(s.updates.length?s.updates[0].startState:this.view.state),u=Math.min(l,s.done.from+(s.active.explicit?0:1)),h=new Gp(s.active.source,s.active.explicit,u,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:l);for(let f of s.updates)h=h.update(f,n);if(h.hasResult()){e.push(h);continue}}let o=r.active.find(l=>l.source==s.active.source);if(o&&o.isPending)if(s.done==null){let l=new uo(s.active.source,0);for(let u of s.updates)l=l.update(u,n);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:b6.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(sa,!1);if(e&&e.tooltip&&this.view.state.facet(Hi).closeOnBlur){let n=e.open&&d$(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:kv.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:SA.of(!1)}),20),this.composing=0}}}),Dge=typeof navigator=="object"&&/Win/.test(navigator.platform),Rge=uu.highest(it.domEventHandlers({keydown(t,e){let n=e.state.field(sa,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Dge&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&y6(e,r),!1}})),N$=it.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Nge{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class x6{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,ls.TrackDel),r=e.mapPos(this.to,1,ls.TrackDel);return n==null||r==null?null:new x6(this.field,n,r)}}class A6{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(r.length){let h=o,f=/^\t*/.exec(u)[0].length;for(let p=0;p<f;p++)h+=e.facet(mb);i.push(n+h.length-f),u=h+u.slice(f)}r.push(u),n+=u.length+1}let l=this.fieldPositions.map(u=>new x6(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,u=s[2]||s[3]||"",h=-1,f=u.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<n.length;p++)(l!=null?n[p].seq==l:f&&n[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<n.length&&(l==null||n[p].seq!=null&&n[p].seq<l);)p++;n.splice(p,0,{seq:l,name:f}),h=p;for(let m of i)m.field>=h&&m.field++}for(let p of i)if(p.line==r.length&&p.from>s.index){let m=s[2]?3+(s[1]||"").length:2;p.from-=m,p.to-=m}i.push(new Nge(h,r.length,s.index,s.index+f.length)),o=o.slice(0,s.index)+u+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,u,h)=>{for(let f of i)f.line==r.length&&f.from>h&&(f.from--,f.to--);return u}),r.push(o)}return new A6(r,i)}}let Pge=kt.widget({widget:new class extends ul{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Ige=kt.mark({class:"cm-snippetField"});class t0{constructor(e,n){this.ranges=e,this.active=n,this.deco=kt.set(e.map(r=>(r.from==r.to?Pge:Ige).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new t0(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const vb=Qt.define({map(t,e){return t&&t.map(e)}}),Bge=Qt.define(),Ov=us.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(vb))return n.value;if(n.is(Bge)&&t)return new t0(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>it.decorations.from(t,e=>e?e.deco:kt.none)});function w6(t,e){return Me.create(t.filter(n=>n.field==e).map(n=>Me.range(n.from,n.to)))}function gp(t){let e=A6.parse(t);return(n,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(n.state,i),{main:u}=n.state.selection,h={changes:{from:i,to:s==u.from?u.to:s,insert:wn.of(o)},scrollIntoView:!0,annotations:r?[g6.of(r),bi.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=w6(l,0)),l.some(f=>f.field>0)){let f=new t0(l,0),p=h.effects=[vb.of(f)];n.state.field(Ov,!1)===void 0&&p.push(Qt.appendConfig.of([Ov,qge,$ge,N$]))}n.dispatch(n.state.update(h))}}function P$(t){return({state:e,dispatch:n})=>{let r=e.field(Ov,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:w6(r.ranges,i),effects:vb.of(s?null:new t0(r.ranges,i)),scrollIntoView:!0})),!0}}const Lge=({state:t,dispatch:e})=>t.field(Ov,!1)?(e(t.update({effects:vb.of(null)})),!0):!1,Fge=P$(1),Hge=P$(-1),zge=[{key:"Tab",run:Fge,shift:Hge},{key:"Escape",run:Lge}],KN=mt.define({combine(t){return t.length?t[0]:zge}}),qge=uu.highest(kh.compute([KN],t=>t.facet(KN))),$ge=it.domEventHandlers({mousedown(t,e){let n=e.state.field(Ov,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:w6(n.ranges,i.field),effects:vb.of(n.ranges.some(s=>s.field>i.field)?new t0(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Ev={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Qd=Qt.define({map(t,e){let n=e.mapPos(t,-1,ls.TrackAfter);return n??void 0}}),S6=new class extends Ph{};S6.startSide=1;S6.endSide=-1;const I$=us.define({create(){return pn.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Qd)&&(t=t.update({add:[S6.range(n.value,n.value+1)]}));return t}});function B$(){return[Uge,I$]}const r_="()[]{}<>«»»«［］｛｝";function L$(t){for(let e=0;e<r_.length;e+=2)if(r_.charCodeAt(e)==t)return r_.charAt(e+1);return XE(t<128?t:t+1)}function F$(t,e){return t.languageDataAt("closeBrackets",e)[0]||Ev}const Qge=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Uge=it.inputHandler.of((t,e,n,r)=>{if((Qge?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Bl(ia(r,0))==1||e!=i.from||n!=i.to)return!1;let s=Vge(t.state,r);return s?(t.dispatch(s),!0):!1}),Wge=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=F$(t,t.selection.main.head).brackets||Ev.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let l=Yge(t.doc,o.head);for(let u of r)if(u==l&&w2(t.doc,o.head)==L$(ia(u,0)))return{changes:{from:o.head-u.length,to:o.head+u.length},range:Me.cursor(o.head-u.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},H$=[{key:"Backspace",run:Wge}];function Vge(t,e){let n=F$(t,t.selection.main.head),r=n.brackets||Ev.brackets;for(let i of r){let s=L$(ia(i,0));if(e==i)return s==i?Kge(t,i,r.indexOf(i+i+i)>-1,n):Gge(t,i,s,n.before||Ev.before);if(e==s&&z$(t,t.selection.main.from))return Xge(t,i,s)}return null}function z$(t,e){let n=!1;return t.field(I$).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function w2(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Bl(ia(n,0)))}function Yge(t,e){let n=t.sliceString(e-2,e);return Bl(ia(n,0))==n.length?n:n.slice(1)}function Gge(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Qd.of(o.to+e.length),range:Me.range(o.anchor+e.length,o.head+e.length)};let l=w2(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:Qd.of(o.head+e.length),range:Me.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Xge(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&w2(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Me.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Kge(t,e,n,r){let i=r.stringPrefixes||Ev.stringPrefixes,s=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Qd.of(l.to+e.length),range:Me.range(l.anchor+e.length,l.head+e.length)};let u=l.head,h=w2(t.doc,u),f;if(h==e){if(ZN(t,u))return{changes:{insert:e+e,from:u},effects:Qd.of(u+e.length),range:Me.cursor(u+e.length)};if(z$(t,u)){let m=n&&t.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+m.length,insert:m},range:Me.cursor(u+m.length)}}}else{if(n&&t.sliceDoc(u-2*e.length,u)==e+e&&(f=JN(t,u-2*e.length,i))>-1&&ZN(t,f))return{changes:{insert:e+e+e+e,from:u},effects:Qd.of(u+e.length),range:Me.cursor(u+e.length)};if(t.charCategorizer(u)(h)!=Dr.Word&&JN(t,u,i)>-1&&!Zge(t,u,e,i))return{changes:{insert:e+e,from:u},effects:Qd.of(u+e.length),range:Me.cursor(u+e.length)}}return{range:s=l}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function ZN(t,e){let n=Oi(t).resolveInner(e+1);return n.parent&&n.from==e}function Zge(t,e,n,r){let i=Oi(t).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),u=l.indexOf(n);if(!u||u>-1&&r.indexOf(l.slice(0,u))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+u;){if(t.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function JN(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Dr.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=Dr.Word)return s}return-1}function q$(t={}){return[Rge,sa,Hi.of(t),Mge,Jge,N$]}const j6=[{key:"Ctrl-Space",run:n_},{mac:"Alt-`",run:n_},{mac:"Alt-i",run:n_},{key:"Escape",run:Tge},{key:"ArrowDown",run:b1(!0)},{key:"ArrowUp",run:b1(!1)},{key:"PageDown",run:b1(!0,"page")},{key:"PageUp",run:b1(!1,"page")},{key:"Enter",run:_ge}],Jge=uu.highest(kh.computeN([Hi],t=>t.facet(Hi).defaultKeymap?[j6]:[])),C6=[{label:"y"},{label:"w"},{label:"d"},{label:"h"},{label:"m"},{label:"s"},{label:"ms"}],eve=[{label:"="},{label:"!="},{label:"=~"},{label:"!~"}],$$=[{label:"^"},{label:"*"},{label:"/"},{label:"%"},{label:"+"},{label:"-"},{label:"=="},{label:">="},{label:">"},{label:"<"},{label:"</"},{label:">/"},{label:"<="},{label:"!="},{label:"atan2"},{label:"and"},{label:"or"},{label:"unless"}],tve=[{label:"on",info:"Match only on specified labels",type:"keyword"},{label:"ignoring",info:"Ignore specified labels for matching",type:"keyword"},{label:"group_left",info:"Allow many-to-one matching",type:"keyword"},{label:"group_right",info:"Allow one-to-many matching",type:"keyword"},{label:"bool",info:"Return boolean result (0 or 1) instead of filtering",type:"keyword"},{label:"fill",info:"Fill in missing series on both sides",type:"keyword"},{label:"fill_left",info:"Fill in missing series on the left side",type:"keyword"},{label:"fill_right",info:"Fill in missing series on the right side",type:"keyword"}],nve=[{label:"start()",info:"resolve to the start of the query",type:"keyword"},{label:"end()",info:"resolve to the end of the query",type:"keyword"}],rve=[{label:"abs",detail:"function",info:"Return absolute values of input series",type:"function"},{label:"absent",detail:"function",info:"Determine whether input vector is empty",type:"function"},{label:"absent_over_time",detail:"function",info:"Determine whether input range vector is empty",type:"function"},{label:"acos",detail:"function",info:"Calculate the arccosine, in radians, for input series",type:"function"},{label:"acosh",detail:"function",info:"Calculate the inverse hyperbolic cosine, in radians, for input series",type:"function"},{label:"asin",detail:"function",info:"Calculate the arcsine, in radians, for input series",type:"function"},{label:"asinh",detail:"function",info:"Calculate the inverse hyperbolic sine, in radians, for input series",type:"function"},{label:"atan",detail:"function",info:"Calculate the arctangent, in radians, for input series",type:"function"},{label:"atanh",detail:"function",info:"Calculate the inverse hyperbolic tangent, in radians, for input series",type:"function"},{label:"avg_over_time",detail:"function",info:"Average series values over time",type:"function"},{label:"ceil",detail:"function",info:"Round up values of input series to nearest integer",type:"function"},{label:"changes",detail:"function",info:"Return number of value changes in input series over time",type:"function"},{label:"clamp",detail:"function",info:"Limit the value of input series between a minimum and a maximum",type:"function"},{label:"clamp_max",detail:"function",info:"Limit the value of input series to a maximum",type:"function"},{label:"clamp_min",detail:"function",info:"Limit the value of input series to a minimum",type:"function"},{label:"cos",detail:"function",info:"Calculate the cosine, in radians, for input series",type:"function",boost:-1},{label:"cosh",detail:"function",info:"Calculate the hyperbolic cosine, in radians, for input series",type:"function",boost:-1},{label:"count_over_time",detail:"function",info:"Count the number of values for each input series",type:"function"},{label:"days_in_month",detail:"function",info:"Return the number of days in current month for provided timestamps",type:"function"},{label:"day_of_month",detail:"function",info:"Return the day of the month for provided timestamps",type:"function"},{label:"day_of_week",detail:"function",info:"Return the day of the week for provided timestamps",type:"function"},{label:"day_of_year",detail:"function",info:"Return the day of the year for provided timestamps",type:"function"},{label:"deg",detail:"function",info:"Convert radians to degrees for input series",type:"function",boost:-1},{label:"delta",detail:"function",info:"Calculate the difference between beginning and end of a range vector (for gauges)",type:"function"},{label:"deriv",detail:"function",info:"Calculate the per-second derivative over series in a range vector (for gauges)",type:"function"},{label:"exp",detail:"function",info:"Calculate exponential function for input vector values",type:"function"},{label:"floor",detail:"function",info:"Round down values of input series to nearest integer",type:"function"},{label:"histogram_avg",detail:"function",info:"Return the average of observations from a native histogram",type:"function"},{label:"histogram_count",detail:"function",info:"Return the count of observations from a native histogram",type:"function"},{label:"histogram_fraction",detail:"function",info:"Calculate fractions of observations within an interval from a native histogram",type:"function"},{label:"histogram_quantile",detail:"function",info:"Calculate quantiles from native histograms and from conventional histogram buckets",type:"function"},{label:"histogram_quantiles",detail:"function",info:"Calculate multiple quantiles from native histograms and from conventional histogram buckets",type:"function"},{label:"histogram_sum",detail:"function",info:"Return the sum of observations from a native histogram",type:"function"},{label:"histogram_stddev",detail:"function",info:"Estimate the standard deviation of observations from a native histogram",type:"function"},{label:"histogram_stdvar",detail:"function",info:"Estimate the standard variance of observations from a native histogram",type:"function"},{label:"double_exponential_smoothing",detail:"function",info:"Calculate smoothed value of input series",type:"function"},{label:"hour",detail:"function",info:"Return the hour of the day for provided timestamps",type:"function"},{label:"idelta",detail:"function",info:"Calculate the difference between the last two samples of a range vector (for counters)",type:"function"},{label:"increase",detail:"function",info:"Calculate the increase in value over a range of time (for counters)",type:"function"},{label:"info",detail:"function",info:"Add data labels from corresponding info metrics",type:"function"},{label:"irate",detail:"function",info:"Calculate the per-second increase over the last two samples of a range vector (for counters)",type:"function"},{label:"label_replace",detail:"function",info:"Set or replace label values",type:"function"},{label:"label_join",detail:"function",info:"Join together label values into new label",type:"function"},{label:"first_over_time",detail:"function",info:"Return the value of the oldest sample in the specified interval",type:"function"},{label:"last_over_time",detail:"function",info:"Return the value of the most recent sample in the specified interval",type:"function"},{label:"ln",detail:"function",info:"Calculate natural logarithm of input series",type:"function"},{label:"log10",detail:"function",info:"Calulcate base-10 logarithm of input series",type:"function"},{label:"log2",detail:"function",info:"Calculate base-2 logarithm of input series",type:"function"},{label:"mad_over_time",detail:"function",info:"Return the median absolute deviation over time for input series",type:"function"},{label:"max_over_time",detail:"function",info:"Return the maximum value over time for input series",type:"function"},{label:"min_over_time",detail:"function",info:"Return the minimum value over time for input series",type:"function"},{label:"ts_of_max_over_time",detail:"function",info:"Return the timestamp of the maximum value over time for input series",type:"function"},{label:"ts_of_min_over_time",detail:"function",info:"Return the timestamp of the minimum value over time for input series",type:"function"},{label:"ts_of_first_over_time",detail:"function",info:"Return the timestamp of the first value over time for input series",type:"function"},{label:"ts_of_last_over_time",detail:"function",info:"Return the timestamp of the last value over time for input series",type:"function"},{label:"minute",detail:"function",info:"Return the minute of the hour for provided timestamps",type:"function"},{label:"month",detail:"function",info:"Return the month for provided timestamps",type:"function"},{label:"pi",detail:"function",info:"Return pi",type:"function"},{label:"predict_linear",detail:"function",info:"Predict the value of a gauge into the future",type:"function"},{label:"present_over_time",detail:"function",info:"the value 1 for any series in the specified interval",type:"function"},{label:"quantile_over_time",detail:"function",info:"Calculate value quantiles over time for input series",type:"function"},{label:"rad",detail:"function",info:"Convert degrees to radians for input series",type:"function",boost:-1},{label:"rate",detail:"function",info:"Calculate per-second increase over a range vector (for counters)",type:"function"},{label:"resets",detail:"function",info:"Return number of value decreases (resets) in input series of time",type:"function"},{label:"round",detail:"function",info:"Round values of input series to nearest integer",type:"function"},{label:"scalar",detail:"function",info:"Convert single-element series vector into scalar value",type:"function"},{label:"sgn",detail:"function",info:"Returns the sign of the instant vector",type:"function"},{label:"sin",detail:"function",info:"Calculate the sine, in radians, for input series",type:"function"},{label:"sinh",detail:"function",info:"Calculate the hyperbolic sine, in radians, for input series",type:"function"},{label:"sort",detail:"function",info:"Sort input series ascendingly by value",type:"function"},{label:"sort_desc",detail:"function",info:"Sort input series descendingly by value",type:"function"},{label:"sort_by_label",detail:"function",info:"Sort input series ascendingly by label value",type:"function"},{label:"sort_by_label_desc",detail:"function",info:"Sort input series descendingly by value value",type:"function"},{label:"sqrt",detail:"function",info:"Return the square root for input series",type:"function"},{label:"stddev_over_time",detail:"function",info:"Calculate the standard deviation within input series over time",type:"function"},{label:"stdvar_over_time",detail:"function",info:"Calculate the standard variance within input series over time",type:"function"},{label:"sum_over_time",detail:"function",info:"Calculate the sum over the values of input series over time",type:"function"},{label:"tan",detail:"function",info:"Calculate the tangent, in radians, for input series",type:"function"},{label:"tanh",detail:"function",info:"Calculate the hyperbolic tangent, in radians, for input series",type:"function"},{label:"time",detail:"function",info:"Return the Unix timestamp at the current evaluation time",type:"function"},{label:"timestamp",detail:"function",info:"Return the Unix timestamp for the samples in the input vector",type:"function"},{label:"vector",detail:"function",info:"Convert a scalar value into a single-element series vector",type:"function"},{label:"year",detail:"function",info:"Return the year for provided timestamps",type:"function"}],Q$=[{label:"avg",detail:"aggregation",info:"Calculate the average over dimensions",type:"keyword"},{label:"bottomk",detail:"aggregation",info:"Smallest k elements by sample value",type:"keyword"},{label:"count",detail:"aggregation",info:"Count number of elements in the vector",type:"keyword"},{label:"count_values",detail:"aggregation",info:"Count number of elements with the same value",type:"keyword"},{label:"group",detail:"aggregation",info:"Group series, while setting the sample value to 1",type:"keyword"},{label:"limitk",detail:"aggregation",info:"Sample k elements",type:"keyword"},{label:"limit_ratio",detail:"aggregation",info:"Sample given ratio of elements",type:"keyword"},{label:"max",detail:"aggregation",info:"Select maximum over dimensions",type:"keyword"},{label:"min",detail:"aggregation",info:"Select minimum over dimensions",type:"keyword"},{label:"quantile",detail:"aggregation",info:"Calculate φ-quantile (0 ≤ φ ≤ 1) over dimensions",type:"keyword"},{label:"stddev",detail:"aggregation",info:"Calculate population standard deviation over dimensions",type:"keyword"},{label:"stdvar",detail:"aggregation",info:"Calculate population standard variance over dimensions",type:"keyword"},{label:"sum",detail:"aggregation",info:"Calculate sum over dimensions",type:"keyword"},{label:"topk",detail:"aggregation",info:"Largest k elements by sample value",type:"keyword"}],ive=[{label:"by",info:"Keep the listed labels, remove all others.",type:"keyword"},{label:"without",info:"Remove the listed labels, preserve all others.",type:"keyword"}],sve=[{label:"nan",info:"Floating-point NaN value",type:"constant"},{label:"inf",info:"Floating-point infinity",type:"constant"}],ave=[{label:"sum(rate(__input_vector__[5m]))",type:"function",detail:"snippet",info:"Sum over rates of increase",apply:gp("sum(rate(${__input_vector__}[5m]))")},{label:"histogram_quantile(__quantile__, sum by(le) (rate(__histogram_metric__[5m])))",type:"function",detail:"snippet",info:"Approximate a quantile value from an aggregated histogram",apply:gp("histogram_quantile(${__quantile__}, sum by(le) (rate(${__histogram_metric__}[5m])))")},{label:'label_replace(__input_vector__, "__dst__", "__replacement__", "__src__", "__regex__")',type:"function",detail:"snippet",info:"Set or replace a label value in an input vector",apply:gp('label_replace(${__input_vector__}, "${__dst__}", "${__replacement__}", "${__src__}", "${__regex__}")')},{label:"topk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Largest k elements by sample value",apply:gp("topk(${__rank_number__}, ${__input_vector__})")},{label:"bottomk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Smallest k elements by sample value",apply:gp("bottomk(${__rank_number__}, ${__input_vector__})")},{label:'count_values("__label_name__", __input_vector__)',type:"function",detail:"snippet",info:"Count the number of series per distinct sample value",apply:gp('count_values("${__label_name__}", ${__metric__})')}],Nc={matchOp:eve,binOp:$$,duration:C6,binOpModifier:tve,atModifier:nve,functionIdentifier:rve,aggregateOp:Q$,aggregateOpModifier:ive,number:sve};var xt;(function(t){t[t.MetricName=0]="MetricName",t[t.LabelName=1]="LabelName",t[t.LabelValue=2]="LabelValue",t[t.Function=3]="Function",t[t.Aggregation=4]="Aggregation",t[t.BinOpModifier=5]="BinOpModifier",t[t.BinOp=6]="BinOp",t[t.MatchOp=7]="MatchOp",t[t.AggregateOpModifier=8]="AggregateOpModifier",t[t.Duration=9]="Duration",t[t.Offset=10]="Offset",t[t.Bool=11]="Bool",t[t.AtModifiers=12]="AtModifiers",t[t.Number=13]="Number"})(xt||(xt={}));function ove(t,e){const n=GE(t,u2);if(!n)return"";let r="";return n.cursor().iterate(i=>{if(i.type.id===ub&&(r=kg(i.node,e),r))return!1}),r}function kg(t,e){let n=GE(t,ub);return!n||(n=n.getChild(rA),!n)?"":e.sliceDoc(n.from,n.to)}function lve(t,e,n,r=!1,i=!0){const s=t;return r&&s.push(...ave),{from:e,to:n,options:s,validFor:i?/^[a-zA-Z0-9_:]+$/:void 0}}function cve(t,e){var n,r;return t.type.id===0?e:t.type.id===Qp||t.type.id===qp||t.type.id===Th||t.type.id===Tm||t.type.id===vf?t.to-1:t.type.id===_m&&(((n=t.parent)===null||n===void 0?void 0:n.type.id)===Ah||((r=t.parent)===null||r===void 0?void 0:r.type.id)===uf)?t.parent.to-1:t.to}const uve=new RegExp(`^(\\d+(${C6.map(t=>t.label).join("|")}))+$`);function eP(t,e){if(e.from>=e.to)return!1;const n=t.sliceDoc(e.from,e.to);return uve.test(n)}function hve(t,e){let n=t.from+1;return t.firstChild!==null&&(n=e),n}function dve(t,e,n){var r,i,s,o,l,u,h;const f=t.doc.slice(e.from,n).toString();let p=e.from;return e.type.id===Qp||e.type.id===qp?p=hve(e,n):e.type.id===Th&&e.firstChild===null||e.type.id===_m&&(((r=e.parent)===null||r===void 0?void 0:r.type.id)===Ah||((i=e.parent)===null||i===void 0?void 0:i.type.id)===uf)?p++:(e.type.id===gv||e.type.id===iA&&!C6.map(m=>m.label).includes(f[f.length-1])||e.type.id===h2&&((s=e.parent)===null||s===void 0?void 0:s.type.id)===0&&((o=e.parent.parent)===null||o===void 0?void 0:o.type.id)===vf||e.type.id===Th&&U$(e)&&e.firstChild!==null||e.type.id===0&&(((l=e.parent)===null||l===void 0?void 0:l.type.id)===gv||((u=e.parent)===null||u===void 0?void 0:u.type.id)===Tm||((h=e.parent)===null||h===void 0?void 0:h.type.id)===vf&&wh(e.parent,iA)))&&(p=n),p}function U$(t){var e;const n=t.parent;if(n!==null&&((e=n.firstChild)===null||e===void 0?void 0:e.type.id)===Che){const r=n.firstChild.firstChild;if(r!==null&&[Dz,kz,Ez,Mz,Oz].includes(r.type.id))return!0}return!1}function fve(t,e,n){var r,i,s,o,l,u,h,f,p,m,v,b,x,w,A,j,C,_,S,O,E;const D=[];switch(e.type.id){case 0:{if(((r=e.parent)===null||r===void 0?void 0:r.type.id)===gv){D.push({kind:xt.Duration});break}if(((i=e.parent)===null||i===void 0?void 0:i.type.id)===Ah||((s=e.parent)===null||s===void 0?void 0:s.type.id)===uf){D.push({kind:xt.MatchOp});break}if(((o=e.parent)===null||o===void 0?void 0:o.type.id)===Tm){D.push({kind:xt.Duration});break}if(((l=e.parent)===null||l===void 0?void 0:l.type.id)===vf&&wh(e.parent,iA)){D.push({kind:xt.Duration});break}const N=t.sliceDoc(e.from,e.to);$$.filter(I=>I.label.includes(N)).length>0&&D.push({kind:xt.BinOp});break}case rA:{if(((u=e.parent)===null||u===void 0?void 0:u.type.id)===0){const R=e.parent.parent;if((R==null?void 0:R.type.id)===YE){D.push({kind:xt.AtModifiers});break}if((R==null?void 0:R.type.id)===u2){D.push({kind:xt.AggregateOpModifier},{kind:xt.BinOp});break}if((R==null?void 0:R.type.id)===ub){const L=kg(e,t);Q$.filter(Q=>Q.label===L).length>0&&D.push({kind:xt.AggregateOpModifier}),D.push({kind:xt.BinOp},{kind:xt.Offset});break}if(R&&aA(R,"Expr")){D.push({kind:xt.BinOp},{kind:xt.Offset});break}}const N=(h=e.parent)===null||h===void 0?void 0:h.parent;if(!N){D.push({kind:xt.MetricName,metricName:t.sliceDoc(e.from,e.to)});break}aA(N,"Expr","Expr")&&N.type.id!==Th?N.type.id===$p&&!wh(N,0)&&(D.push({kind:xt.MetricName,metricName:t.sliceDoc(e.from,e.to)},{kind:xt.Function},{kind:xt.Aggregation},{kind:xt.BinOpModifier},{kind:xt.Number}),wh(N,rT,iT,sT,aT,oT,mv)&&!wh(N,Rz)&&D.push({kind:xt.Bool})):(D.push({kind:xt.MetricName,metricName:t.sliceDoc(e.from,e.to)},{kind:xt.Function},{kind:xt.Aggregation}),N.type.id!==Th&&N.type.id!==Tm&&D.push({kind:xt.Number}));break}case jhe:e.firstChild!==null&&e.firstChild.type.id===0&&D.push({kind:xt.MetricName,metricName:""},{kind:xt.Function},{kind:xt.Aggregation},{kind:xt.Number});break;case qp:D.push({kind:xt.LabelName,metricName:ove(e,t)});break;case Qp:{if(n>=e.to)break;D.push({kind:xt.LabelName,metricName:kg(e,t)});break}case fv:((f=e.parent)===null||f===void 0?void 0:f.type.id)===qp?D.push({kind:xt.LabelName}):((p=e.parent)===null||p===void 0?void 0:p.type.id)===Ah&&D.push({kind:xt.LabelName,metricName:kg(e,t)});break;case _m:if(((m=e.parent)===null||m===void 0?void 0:m.type.id)===Ah||((v=e.parent)===null||v===void 0?void 0:v.type.id)===uf){let N="";((b=e.parent.firstChild)===null||b===void 0?void 0:b.type.id)===fv?N=t.sliceDoc(e.parent.firstChild.from,e.parent.firstChild.to):((x=e.parent.firstChild)===null||x===void 0?void 0:x.type.id)===pv&&(N=t.sliceDoc(e.parent.firstChild.from,e.parent.firstChild.to).slice(1,-1));const I=kg(e,t),R=GE(e,Qp),L=[pv,uf,Ah];let Q=[];for(const z of L)Q=Q.concat(Wz(R?R.getChildren(z):[],t));D.push({kind:xt.LabelValue,metricName:I,labelName:N,matchers:Q})}else((A=(w=e.parent)===null||w===void 0?void 0:w.parent)===null||A===void 0?void 0:A.type.id)===qp?D.push({kind:xt.LabelName}):((C=(j=e.parent)===null||j===void 0?void 0:j.parent)===null||C===void 0?void 0:C.type.id)===Qp&&D.push({kind:xt.MetricName,metricName:t.sliceDoc(e.from,e.to).slice(1,-1)});break;case h2:((_=e.parent)===null||_===void 0?void 0:_.type.id)===0&&((S=e.parent.parent)===null||S===void 0?void 0:S.type.id)===vf?eP(t,e)||D.push({kind:xt.Duration}):D.push({kind:xt.Number});break;case iA:eP(t,e)||D.push({kind:xt.Duration});break;case gv:D.push({kind:xt.Duration});break;case Th:if(U$(e)){if(e.firstChild===null||e.firstChild.from<=n&&e.firstChild.to>=n){D.push({kind:xt.Number});break}D.push({kind:xt.MetricName,metricName:""},{kind:xt.Function},{kind:xt.Aggregation});break}D.push({kind:xt.MetricName,metricName:""},{kind:xt.Function},{kind:xt.Aggregation});break;case mv:((O=e.parent)===null||O===void 0?void 0:O.type.id)===sA?D.push({kind:xt.MatchOp}):((E=e.parent)===null||E===void 0?void 0:E.type.id)===$p&&D.push({kind:xt.BinOp});break;case hb:case qz:case $z:case sA:D.push({kind:xt.MatchOp});break;case _he:case Dhe:case Rhe:case Nhe:case Phe:case Ihe:case rT:case iT:case sT:case Pz:case Nz:case aT:case oT:case UE:case VE:case WE:case $p:D.push({kind:xt.BinOp});break}return D}class i_{constructor(e,n=1e4){this.prometheusClient=e,this.maxMetricsMetadata=n}getPrometheusClient(){return this.prometheusClient}destroy(){var e,n;(n=(e=this.prometheusClient)===null||e===void 0?void 0:e.destroy)===null||n===void 0||n.call(e)}promQL(e){const{state:n,pos:r}=e,i=Oi(n).resolve(r,-1),s=fve(n,i,r);let o=Promise.resolve([]),l=!1,u=!0;for(const h of s)switch(h.kind){case xt.Aggregation:l=!0,o=o.then(f=>f.concat(Nc.aggregateOp));break;case xt.Function:l=!0,o=o.then(f=>f.concat(Nc.functionIdentifier));break;case xt.BinOpModifier:o=o.then(f=>f.concat(Nc.binOpModifier));break;case xt.BinOp:o=o.then(f=>f.concat(Nc.binOp));break;case xt.MatchOp:o=o.then(f=>f.concat(Nc.matchOp));break;case xt.AggregateOpModifier:o=o.then(f=>f.concat(Nc.aggregateOpModifier));break;case xt.Duration:u=!1,o=o.then(f=>f.concat(Nc.duration));break;case xt.Offset:o=o.then(f=>f.concat([{label:"offset"}]));break;case xt.Bool:o=o.then(f=>f.concat([{label:"bool"}]));break;case xt.AtModifiers:o=o.then(f=>f.concat(Nc.atModifier));break;case xt.Number:o=o.then(f=>f.concat(Nc.number));break;case xt.MetricName:o=o.then(f=>this.autocompleteMetricName(f,h));break;case xt.LabelName:o=o.then(f=>this.autocompleteLabelName(f,h));break;case xt.LabelValue:o=o.then(f=>this.autocompleteLabelValue(f,h))}return o.then(h=>lve(h,dve(n,i,r),cve(i,r),l,u))}autocompleteMetricName(e,n){if(!this.prometheusClient)return e;const r=new Map;return this.prometheusClient.metricNames(n.metricName).then(i=>{var s;for(const o of i)r.set(o,{label:o,type:"constant"});if(i.length<=this.maxMetricsMetadata)return(s=this.prometheusClient)===null||s===void 0?void 0:s.metricMetadata()}).then(i=>{var s;if(i)for(const[o,l]of r){const u=(s=i[o])!==null&&s!==void 0?s:i[o.replace(/(_count|_sum|_bucket|_total)$/,"")];if(u){if(u.length>1)for(const h of u)l.detail===""?l.detail=h.type:l.detail!==h.type&&(l.detail="unknown",l.info="multiple different definitions for this metric"),l.info===""?l.info=h.help:l.info!==h.help&&(l.info="multiple different definitions for this metric");else if(u.length===1){let{type:h,help:f}=u[0];(h==="histogram"||h==="summary")&&(o.endsWith("_count")&&(h="counter",f=`The total number of observations for: ${f}`),o.endsWith("_sum")&&(h="counter",f=`The total sum of observations for: ${f}`),o.endsWith("_bucket")&&(h="counter",f=`The total count of observations for a bucket in the histogram: ${f}`)),l.detail=h,l.info=f}}}return e.concat(Array.from(r.values()))})}autocompleteLabelName(e,n){return this.prometheusClient?this.prometheusClient.labelNames(n.metricName).then(r=>e.concat(r.map(i=>({label:i,type:"constant"})))):e}autocompleteLabelValue(e,n){return!this.prometheusClient||!n.labelName?e:this.prometheusClient.labelValues(n.labelName,n.metricName,n.matchers).then(r=>e.concat(r.map(i=>({label:i,type:"text"}))))}}var pve=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,W$=new Set,GT=typeof process=="object"&&process?process:{},V$=(t,e,n,r)=>{typeof GT.emitWarning=="function"?GT.emitWarning(t,e,n,r):console.error(`[${n}] ${e}: ${t}`)},CA=globalThis.AbortController,tP=globalThis.AbortSignal,k9;if(typeof CA>"u"){tP=class{constructor(){Gn(this,"onabort");Gn(this,"_onabort",[]);Gn(this,"reason");Gn(this,"aborted",!1)}addEventListener(n,r){this._onabort.push(r)}},CA=class{constructor(){Gn(this,"signal",new tP);e()}abort(n){var r,i;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);(i=(r=this.signal).onabort)==null||i.call(r,n)}}};let t=((k9=GT.env)==null?void 0:k9.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{t&&(t=!1,V$("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var mve=t=>!W$.has(t),eh=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Y$=t=>eh(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?fx:null:null,fx=class extends Array{constructor(t){super(t),this.fill(0)}},$l,dm,gve=($l=class{constructor(e,n){Gn(this,"heap");Gn(this,"length");if(!q($l,dm))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){let n=Y$(e);if(!n)return[];Ee($l,dm,!0);let r=new $l(e,n);return Ee($l,dm,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},dm=new WeakMap,Ze($l,dm,!1),$l),O9,E9,io,_a,Lo,nf,Fo,fm,pm,Ho,Si,zo,gi,Sr,Yt,Ps,Ta,Ss,Li,qo,Fi,$o,Qo,ka,Oa,Uo,bh,Is,mm,ot,XT,rf,Qc,Hv,Ea,G$,sf,gm,zv,th,nh,KT,px,mx,wr,ZT,Og,rh,JT,vm,nP=(vm=class{constructor(e){Ze(this,ot);Ze(this,io);Ze(this,_a);Ze(this,Lo);Ze(this,nf);Ze(this,Fo);Ze(this,fm);Ze(this,pm);Ze(this,Ho);Gn(this,"ttl");Gn(this,"ttlResolution");Gn(this,"ttlAutopurge");Gn(this,"updateAgeOnGet");Gn(this,"updateAgeOnHas");Gn(this,"allowStale");Gn(this,"noDisposeOnSet");Gn(this,"noUpdateTTL");Gn(this,"maxEntrySize");Gn(this,"sizeCalculation");Gn(this,"noDeleteOnFetchRejection");Gn(this,"noDeleteOnStaleGet");Gn(this,"allowStaleOnFetchAbort");Gn(this,"allowStaleOnFetchRejection");Gn(this,"ignoreFetchAbort");Ze(this,Si);Ze(this,zo);Ze(this,gi);Ze(this,Sr);Ze(this,Yt);Ze(this,Ps);Ze(this,Ta);Ze(this,Ss);Ze(this,Li);Ze(this,qo);Ze(this,Fi);Ze(this,$o);Ze(this,Qo);Ze(this,ka);Ze(this,Oa);Ze(this,Uo);Ze(this,bh);Ze(this,Is);Ze(this,mm);Ze(this,rf,()=>{});Ze(this,Qc,()=>{});Ze(this,Hv,()=>{});Ze(this,Ea,()=>!1);Ze(this,sf,e=>{});Ze(this,gm,(e,n,r)=>{});Ze(this,zv,(e,n,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Gn(this,O9,"LRUCache");let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:h,onInsert:f,disposeAfter:p,noDisposeOnSet:m,noUpdateTTL:v,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:w,fetchMethod:A,memoMethod:j,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:O,ignoreFetchAbort:E,perf:D}=e;if(D!==void 0&&typeof(D==null?void 0:D.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(Ee(this,Ho,D??pve),n!==0&&!eh(n))throw new TypeError("max option must be a nonnegative integer");let N=n?Y$(n):Array;if(!N)throw new Error("invalid max value: "+n);if(Ee(this,io,n),Ee(this,_a,b),this.maxEntrySize=x||q(this,_a),this.sizeCalculation=w,this.sizeCalculation){if(!q(this,_a)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(j!==void 0&&typeof j!="function")throw new TypeError("memoMethod must be a function if defined");if(Ee(this,pm,j),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(Ee(this,fm,A),Ee(this,bh,!!A),Ee(this,gi,new Map),Ee(this,Sr,new Array(n).fill(void 0)),Ee(this,Yt,new Array(n).fill(void 0)),Ee(this,Ps,new N(n)),Ee(this,Ta,new N(n)),Ee(this,Ss,0),Ee(this,Li,0),Ee(this,qo,gve.create(n)),Ee(this,Si,0),Ee(this,zo,0),typeof h=="function"&&Ee(this,Lo,h),typeof f=="function"&&Ee(this,nf,f),typeof p=="function"?(Ee(this,Fo,p),Ee(this,Fi,[])):(Ee(this,Fo,void 0),Ee(this,Fi,void 0)),Ee(this,Uo,!!q(this,Lo)),Ee(this,mm,!!q(this,nf)),Ee(this,Is,!!q(this,Fo)),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(q(this,_a)!==0&&!eh(q(this,_a)))throw new TypeError("maxSize must be a positive integer if specified");if(!eh(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");$e(this,ot,G$).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=eh(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!eh(this.ttl))throw new TypeError("ttl must be a positive integer if specified");$e(this,ot,XT).call(this)}if(q(this,io)===0&&this.ttl===0&&q(this,_a)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!q(this,io)&&!q(this,_a)){let I="LRU_CACHE_UNBOUNDED";mve(I)&&(W$.add(I),V$("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,vm))}}get perf(){return q(this,Ho)}static unsafeExposeInternals(e){return{starts:q(e,Qo),ttls:q(e,ka),autopurgeTimers:q(e,Oa),sizes:q(e,$o),keyMap:q(e,gi),keyList:q(e,Sr),valList:q(e,Yt),next:q(e,Ps),prev:q(e,Ta),get head(){return q(e,Ss)},get tail(){return q(e,Li)},free:q(e,qo),isBackgroundFetch:n=>{var r;return $e(r=e,ot,wr).call(r,n)},backgroundFetch:(n,r,i,s)=>{var o;return $e(o=e,ot,mx).call(o,n,r,i,s)},moveToTail:n=>{var r;return $e(r=e,ot,Og).call(r,n)},indexes:n=>{var r;return $e(r=e,ot,th).call(r,n)},rindexes:n=>{var r;return $e(r=e,ot,nh).call(r,n)},isStale:n=>{var r;return q(r=e,Ea).call(r,n)}}}get max(){return q(this,io)}get maxSize(){return q(this,_a)}get calculatedSize(){return q(this,zo)}get size(){return q(this,Si)}get fetchMethod(){return q(this,fm)}get memoMethod(){return q(this,pm)}get dispose(){return q(this,Lo)}get onInsert(){return q(this,nf)}get disposeAfter(){return q(this,Fo)}getRemainingTTL(e){return q(this,gi).has(e)?1/0:0}*entries(){for(let e of $e(this,ot,th).call(this))q(this,Yt)[e]!==void 0&&q(this,Sr)[e]!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield[q(this,Sr)[e],q(this,Yt)[e]])}*rentries(){for(let e of $e(this,ot,nh).call(this))q(this,Yt)[e]!==void 0&&q(this,Sr)[e]!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield[q(this,Sr)[e],q(this,Yt)[e]])}*keys(){for(let e of $e(this,ot,th).call(this)){let n=q(this,Sr)[e];n!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield n)}}*rkeys(){for(let e of $e(this,ot,nh).call(this)){let n=q(this,Sr)[e];n!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield n)}}*values(){for(let e of $e(this,ot,th).call(this))q(this,Yt)[e]!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield q(this,Yt)[e])}*rvalues(){for(let e of $e(this,ot,nh).call(this))q(this,Yt)[e]!==void 0&&!$e(this,ot,wr).call(this,q(this,Yt)[e])&&(yield q(this,Yt)[e])}[(E9=Symbol.iterator,O9=Symbol.toStringTag,E9)](){return this.entries()}find(e,n={}){for(let r of $e(this,ot,th).call(this)){let i=q(this,Yt)[r],s=$e(this,ot,wr).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,q(this,Sr)[r],this))return this.get(q(this,Sr)[r],n)}}forEach(e,n=this){for(let r of $e(this,ot,th).call(this)){let i=q(this,Yt)[r],s=$e(this,ot,wr).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,q(this,Sr)[r],this)}}rforEach(e,n=this){for(let r of $e(this,ot,nh).call(this)){let i=q(this,Yt)[r],s=$e(this,ot,wr).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,q(this,Sr)[r],this)}}purgeStale(){let e=!1;for(let n of $e(this,ot,nh).call(this,{allowStale:!0}))q(this,Ea).call(this,n)&&($e(this,ot,rh).call(this,q(this,Sr)[n],"expire"),e=!0);return e}info(e){let n=q(this,gi).get(e);if(n===void 0)return;let r=q(this,Yt)[n],i=$e(this,ot,wr).call(this,r)?r.__staleWhileFetching:r;if(i===void 0)return;let s={value:i};if(q(this,ka)&&q(this,Qo)){let o=q(this,ka)[n],l=q(this,Qo)[n];if(o&&l){let u=o-(q(this,Ho).now()-l);s.ttl=u,s.start=Date.now()}}return q(this,$o)&&(s.size=q(this,$o)[n]),s}dump(){let e=[];for(let n of $e(this,ot,th).call(this,{allowStale:!0})){let r=q(this,Sr)[n],i=q(this,Yt)[n],s=$e(this,ot,wr).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||r===void 0)continue;let o={value:s};if(q(this,ka)&&q(this,Qo)){o.ttl=q(this,ka)[n];let l=q(this,Ho).now()-q(this,Qo)[n];o.start=Math.floor(Date.now()-l)}q(this,$o)&&(o.size=q(this,$o)[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let i=Date.now()-r.start;r.start=q(this,Ho).now()-i}this.set(n,r.value,r)}}set(e,n,r={}){var m,v,b,x,w,A,j;if(n===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=r,{noUpdateTTL:h=this.noUpdateTTL}=r,f=q(this,zv).call(this,e,n,r.size||0,l);if(this.maxEntrySize&&f>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),$e(this,ot,rh).call(this,e,"set"),this;let p=q(this,Si)===0?void 0:q(this,gi).get(e);if(p===void 0)p=q(this,Si)===0?q(this,Li):q(this,qo).length!==0?q(this,qo).pop():q(this,Si)===q(this,io)?$e(this,ot,px).call(this,!1):q(this,Si),q(this,Sr)[p]=e,q(this,Yt)[p]=n,q(this,gi).set(e,p),q(this,Ps)[q(this,Li)]=p,q(this,Ta)[p]=q(this,Li),Ee(this,Li,p),jd(this,Si)._++,q(this,gm).call(this,p,f,u),u&&(u.set="add"),h=!1,q(this,mm)&&((m=q(this,nf))==null||m.call(this,n,e,"add"));else{$e(this,ot,Og).call(this,p);let C=q(this,Yt)[p];if(n!==C){if(q(this,bh)&&$e(this,ot,wr).call(this,C)){C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:_}=C;_!==void 0&&!o&&(q(this,Uo)&&((v=q(this,Lo))==null||v.call(this,_,e,"set")),q(this,Is)&&((b=q(this,Fi))==null||b.push([_,e,"set"])))}else o||(q(this,Uo)&&((x=q(this,Lo))==null||x.call(this,C,e,"set")),q(this,Is)&&((w=q(this,Fi))==null||w.push([C,e,"set"])));if(q(this,sf).call(this,p),q(this,gm).call(this,p,f,u),q(this,Yt)[p]=n,u){u.set="replace";let _=C&&$e(this,ot,wr).call(this,C)?C.__staleWhileFetching:C;_!==void 0&&(u.oldValue=_)}}else u&&(u.set="update");q(this,mm)&&((A=this.onInsert)==null||A.call(this,n,e,n===C?"update":"replace"))}if(i!==0&&!q(this,ka)&&$e(this,ot,XT).call(this),q(this,ka)&&(h||q(this,Hv).call(this,p,i,s),u&&q(this,Qc).call(this,u,p)),!o&&q(this,Is)&&q(this,Fi)){let C=q(this,Fi),_;for(;_=C==null?void 0:C.shift();)(j=q(this,Fo))==null||j.call(this,..._)}return this}pop(){var e;try{for(;q(this,Si);){let n=q(this,Yt)[q(this,Ss)];if($e(this,ot,px).call(this,!0),$e(this,ot,wr).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(q(this,Is)&&q(this,Fi)){let n=q(this,Fi),r;for(;r=n==null?void 0:n.shift();)(e=q(this,Fo))==null||e.call(this,...r)}}}has(e,n={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=n,s=q(this,gi).get(e);if(s!==void 0){let o=q(this,Yt)[s];if($e(this,ot,wr).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(q(this,Ea).call(this,s))i&&(i.has="stale",q(this,Qc).call(this,i,s));else return r&&q(this,rf).call(this,s),i&&(i.has="hit",q(this,Qc).call(this,i,s)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){let{allowStale:r=this.allowStale}=n,i=q(this,gi).get(e);if(i===void 0||!r&&q(this,Ea).call(this,i))return;let s=q(this,Yt)[i];return $e(this,ot,wr).call(this,s)?s.__staleWhileFetching:s}async fetch(e,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:x,forceRefresh:w=!1,status:A,signal:j}=n;if(!q(this,bh))return A&&(A.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:A});let C={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:l,size:u,sizeCalculation:h,noUpdateTTL:f,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:b,ignoreFetchAbort:v,status:A,signal:j},_=q(this,gi).get(e);if(_===void 0){A&&(A.fetch="miss");let S=$e(this,ot,mx).call(this,e,_,C,x);return S.__returned=S}else{let S=q(this,Yt)[_];if($e(this,ot,wr).call(this,S)){let N=r&&S.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",N&&(A.returnedStale=!0)),N?S.__staleWhileFetching:S.__returned=S}let O=q(this,Ea).call(this,_);if(!w&&!O)return A&&(A.fetch="hit"),$e(this,ot,Og).call(this,_),i&&q(this,rf).call(this,_),A&&q(this,Qc).call(this,A,_),S;let E=$e(this,ot,mx).call(this,e,_,C,x),D=E.__staleWhileFetching!==void 0&&r;return A&&(A.fetch=O?"stale":"refresh",D&&O&&(A.returnedStale=!0)),D?E.__staleWhileFetching:E.__returned=E}}async forceFetch(e,n={}){let r=await this.fetch(e,n);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,n={}){let r=q(this,pm);if(!r)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:s,...o}=n,l=this.get(e,o);if(!s&&l!==void 0)return l;let u=r(e,l,{options:o,context:i});return this.set(e,u,o),u}get(e,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=n,l=q(this,gi).get(e);if(l!==void 0){let u=q(this,Yt)[l],h=$e(this,ot,wr).call(this,u);return o&&q(this,Qc).call(this,o,l),q(this,Ea).call(this,l)?(o&&(o.get="stale"),h?(o&&r&&u.__staleWhileFetching!==void 0&&(o.returnedStale=!0),r?u.__staleWhileFetching:void 0):(s||$e(this,ot,rh).call(this,e,"expire"),o&&r&&(o.returnedStale=!0),r?u:void 0)):(o&&(o.get="hit"),h?u.__staleWhileFetching:($e(this,ot,Og).call(this,l),i&&q(this,rf).call(this,l),u))}else o&&(o.get="miss")}delete(e){return $e(this,ot,rh).call(this,e,"delete")}clear(){return $e(this,ot,JT).call(this,"delete")}},io=new WeakMap,_a=new WeakMap,Lo=new WeakMap,nf=new WeakMap,Fo=new WeakMap,fm=new WeakMap,pm=new WeakMap,Ho=new WeakMap,Si=new WeakMap,zo=new WeakMap,gi=new WeakMap,Sr=new WeakMap,Yt=new WeakMap,Ps=new WeakMap,Ta=new WeakMap,Ss=new WeakMap,Li=new WeakMap,qo=new WeakMap,Fi=new WeakMap,$o=new WeakMap,Qo=new WeakMap,ka=new WeakMap,Oa=new WeakMap,Uo=new WeakMap,bh=new WeakMap,Is=new WeakMap,mm=new WeakMap,ot=new WeakSet,XT=function(){let e=new fx(q(this,io)),n=new fx(q(this,io));Ee(this,ka,e),Ee(this,Qo,n);let r=this.ttlAutopurge?new Array(q(this,io)):void 0;Ee(this,Oa,r),Ee(this,Hv,(l,u,h=q(this,Ho).now())=>{n[l]=u!==0?h:0,e[l]=u,i(l,u)}),Ee(this,rf,l=>{n[l]=e[l]!==0?q(this,Ho).now():0,i(l,e[l])});let i=this.ttlAutopurge?(l,u)=>{if(r!=null&&r[l]&&(clearTimeout(r[l]),r[l]=void 0),u&&u!==0&&r){let h=setTimeout(()=>{q(this,Ea).call(this,l)&&$e(this,ot,rh).call(this,q(this,Sr)[l],"expire")},u+1);h.unref&&h.unref(),r[l]=h}}:()=>{};Ee(this,Qc,(l,u)=>{if(e[u]){let h=e[u],f=n[u];if(!h||!f)return;l.ttl=h,l.start=f,l.now=s||o();let p=l.now-f;l.remainingTTL=h-p}});let s=0,o=()=>{let l=q(this,Ho).now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l};this.getRemainingTTL=l=>{let u=q(this,gi).get(l);if(u===void 0)return 0;let h=e[u],f=n[u];if(!h||!f)return 1/0;let p=(s||o())-f;return h-p},Ee(this,Ea,l=>{let u=n[l],h=e[l];return!!h&&!!u&&(s||o())-u>h})},rf=new WeakMap,Qc=new WeakMap,Hv=new WeakMap,Ea=new WeakMap,G$=function(){let e=new fx(q(this,io));Ee(this,zo,0),Ee(this,$o,e),Ee(this,sf,n=>{Ee(this,zo,q(this,zo)-e[n]),e[n]=0}),Ee(this,zv,(n,r,i,s)=>{if($e(this,ot,wr).call(this,r))return 0;if(!eh(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(r,n),!eh(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Ee(this,gm,(n,r,i)=>{if(e[n]=r,q(this,_a)){let s=q(this,_a)-e[n];for(;q(this,zo)>s;)$e(this,ot,px).call(this,!0)}Ee(this,zo,q(this,zo)+e[n]),i&&(i.entrySize=r,i.totalCalculatedSize=q(this,zo))})},sf=new WeakMap,gm=new WeakMap,zv=new WeakMap,th=function*({allowStale:e=this.allowStale}={}){if(q(this,Si))for(let n=q(this,Li);!(!$e(this,ot,KT).call(this,n)||((e||!q(this,Ea).call(this,n))&&(yield n),n===q(this,Ss)));)n=q(this,Ta)[n]},nh=function*({allowStale:e=this.allowStale}={}){if(q(this,Si))for(let n=q(this,Ss);!(!$e(this,ot,KT).call(this,n)||((e||!q(this,Ea).call(this,n))&&(yield n),n===q(this,Li)));)n=q(this,Ps)[n]},KT=function(e){return e!==void 0&&q(this,gi).get(q(this,Sr)[e])===e},px=function(e){var s,o,l;let n=q(this,Ss),r=q(this,Sr)[n],i=q(this,Yt)[n];return q(this,bh)&&$e(this,ot,wr).call(this,i)?i.__abortController.abort(new Error("evicted")):(q(this,Uo)||q(this,Is))&&(q(this,Uo)&&((s=q(this,Lo))==null||s.call(this,i,r,"evict")),q(this,Is)&&((o=q(this,Fi))==null||o.push([i,r,"evict"]))),q(this,sf).call(this,n),(l=q(this,Oa))!=null&&l[n]&&(clearTimeout(q(this,Oa)[n]),q(this,Oa)[n]=void 0),e&&(q(this,Sr)[n]=void 0,q(this,Yt)[n]=void 0,q(this,qo).push(n)),q(this,Si)===1?(Ee(this,Ss,Ee(this,Li,0)),q(this,qo).length=0):Ee(this,Ss,q(this,Ps)[n]),q(this,gi).delete(r),jd(this,Si)._--,n},mx=function(e,n,r,i){let s=n===void 0?void 0:q(this,Yt)[n];if($e(this,ot,wr).call(this,s))return s;let o=new CA,{signal:l}=r;l==null||l.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let u={signal:o.signal,options:r,context:i},h=(x,w=!1)=>{let{aborted:A}=o.signal,j=r.ignoreFetchAbort&&x!==void 0,C=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&x!==void 0);if(r.status&&(A&&!w?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,j&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),A&&!j&&!w)return p(o.signal.reason,C);let _=v,S=q(this,Yt)[n];return(S===v||j&&w&&S===void 0)&&(x===void 0?_.__staleWhileFetching!==void 0?q(this,Yt)[n]=_.__staleWhileFetching:$e(this,ot,rh).call(this,e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,x,u.options))),x},f=x=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=x),p(x,!1)),p=(x,w)=>{let{aborted:A}=o.signal,j=A&&r.allowStaleOnFetchAbort,C=j||r.allowStaleOnFetchRejection,_=C||r.noDeleteOnFetchRejection,S=v;if(q(this,Yt)[n]===v&&(!_||!w&&S.__staleWhileFetching===void 0?$e(this,ot,rh).call(this,e,"fetch"):j||(q(this,Yt)[n]=S.__staleWhileFetching)),C)return r.status&&S.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw x},m=(x,w)=>{var j;let A=(j=q(this,fm))==null?void 0:j.call(this,e,s,u);A&&A instanceof Promise&&A.then(C=>x(C===void 0?void 0:C),w),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(x(void 0),r.allowStaleOnFetchAbort&&(x=C=>h(C,!0)))})};r.status&&(r.status.fetchDispatched=!0);let v=new Promise(m).then(h,f),b=Object.assign(v,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return n===void 0?(this.set(e,b,{...u.options,status:void 0}),n=q(this,gi).get(e)):q(this,Yt)[n]=b,b},wr=function(e){if(!q(this,bh))return!1;let n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof CA},ZT=function(e,n){q(this,Ta)[n]=e,q(this,Ps)[e]=n},Og=function(e){e!==q(this,Li)&&(e===q(this,Ss)?Ee(this,Ss,q(this,Ps)[e]):$e(this,ot,ZT).call(this,q(this,Ta)[e],q(this,Ps)[e]),$e(this,ot,ZT).call(this,q(this,Li),e),Ee(this,Li,e))},rh=function(e,n){var i,s,o,l,u,h;let r=!1;if(q(this,Si)!==0){let f=q(this,gi).get(e);if(f!==void 0)if((i=q(this,Oa))!=null&&i[f]&&(clearTimeout((s=q(this,Oa))==null?void 0:s[f]),q(this,Oa)[f]=void 0),r=!0,q(this,Si)===1)$e(this,ot,JT).call(this,n);else{q(this,sf).call(this,f);let p=q(this,Yt)[f];if($e(this,ot,wr).call(this,p)?p.__abortController.abort(new Error("deleted")):(q(this,Uo)||q(this,Is))&&(q(this,Uo)&&((o=q(this,Lo))==null||o.call(this,p,e,n)),q(this,Is)&&((l=q(this,Fi))==null||l.push([p,e,n]))),q(this,gi).delete(e),q(this,Sr)[f]=void 0,q(this,Yt)[f]=void 0,f===q(this,Li))Ee(this,Li,q(this,Ta)[f]);else if(f===q(this,Ss))Ee(this,Ss,q(this,Ps)[f]);else{let m=q(this,Ta)[f];q(this,Ps)[m]=q(this,Ps)[f];let v=q(this,Ps)[f];q(this,Ta)[v]=q(this,Ta)[f]}jd(this,Si)._--,q(this,qo).push(f)}}if(q(this,Is)&&((u=q(this,Fi))!=null&&u.length)){let f=q(this,Fi),p;for(;p=f==null?void 0:f.shift();)(h=q(this,Fo))==null||h.call(this,...p)}return r},JT=function(e){var n,r,i,s;for(let o of $e(this,ot,nh).call(this,{allowStale:!0})){let l=q(this,Yt)[o];if($e(this,ot,wr).call(this,l))l.__abortController.abort(new Error("deleted"));else{let u=q(this,Sr)[o];q(this,Uo)&&((n=q(this,Lo))==null||n.call(this,l,u,e)),q(this,Is)&&((r=q(this,Fi))==null||r.push([l,u,e]))}}if(q(this,gi).clear(),q(this,Yt).fill(void 0),q(this,Sr).fill(void 0),q(this,ka)&&q(this,Qo)){q(this,ka).fill(0),q(this,Qo).fill(0);for(let o of q(this,Oa)??[])o!==void 0&&clearTimeout(o);(i=q(this,Oa))==null||i.fill(void 0)}if(q(this,$o)&&q(this,$o).fill(0),Ee(this,Ss,0),Ee(this,Li,0),q(this,qo).length=0,Ee(this,zo,0),Ee(this,Si,0),q(this,Is)&&q(this,Fi)){let o=q(this,Fi),l;for(;l=o==null?void 0:o.shift();)(s=q(this,Fo))==null||s.call(this,...l)}},vm);const vve=400,bve=422,yve=503;class xve{constructor(e){this.httpMethod="POST",this.apiPrefix="/api/v1",this.fetchFn=(n,r)=>fetch(n,r),this.requestHeaders=new Headers,this.abortControllers=new Set,this.url=e.url?e.url:"",this.errorHandler=e.httpErrorHandler,this.lookbackInterval=e.lookbackInterval,e.fetchFn&&(this.fetchFn=e.fetchFn),e.httpMethod&&(this.httpMethod=e.httpMethod),e.apiPrefix&&(this.apiPrefix=e.apiPrefix),e.requestHeaders&&(this.requestHeaders=e.requestHeaders)}labelNames(e){const n=new URLSearchParams;if(this.lookbackInterval){const i=new Date,s=new Date(i.getTime()-this.lookbackInterval);n.set("start",s.toISOString()),n.set("end",i.toISOString())}e&&e.length>0&&n.set("match[]",NC(e));const r=this.buildRequest(this.labelsEndpoint(),n);return this.fetchAPI(r.uri,{method:this.httpMethod,body:r.body}).catch(i=>(this.errorHandler&&this.errorHandler(i),[]))}labelValues(e,n,r){const i=new URLSearchParams;if(this.lookbackInterval){const s=new Date,o=new Date(s.getTime()-this.lookbackInterval);i.set("start",o.toISOString()),i.set("end",s.toISOString())}return n&&n.length>0&&i.set("match[]",NC(n,r,e)),this.fetchAPI(`${this.labelValuesEndpoint().replace(/:name/gi,e)}?${i}`).catch(s=>(this.errorHandler&&this.errorHandler(s),[]))}metricMetadata(){return this.fetchAPI(this.metricMetadataEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}series(e,n,r){const i=new URLSearchParams;if(this.lookbackInterval){const o=new Date,l=new Date(o.getTime()-this.lookbackInterval);i.set("start",l.toISOString()),i.set("end",o.toISOString())}i.set("match[]",NC(e,n,r));const s=this.buildRequest(this.seriesEndpoint(),i);return this.fetchAPI(s.uri,{method:this.httpMethod,body:s.body}).catch(o=>(this.errorHandler&&this.errorHandler(o),[]))}metricNames(){return this.labelValues("__name__")}flags(){return this.fetchAPI(this.flagsEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}destroy(){for(const e of this.abortControllers)e.abort();this.abortControllers.clear()}fetchAPI(e,n){const r=new AbortController;return this.abortControllers.add(r),n?(n.headers=this.requestHeaders,n.signal=r.signal):n={headers:this.requestHeaders,signal:r.signal},this.fetchFn(this.url+e,n).then(i=>{if(!i.ok&&![vve,bve,yve].includes(i.status))throw new Error(i.statusText);return i}).then(i=>i.json()).then(i=>{if(i.status==="error")throw new Error(i.error!==void 0?i.error:'missing "error" field in response JSON');if(i.data===void 0)throw new Error('missing "data" field in response JSON');return i.data}).finally(()=>{this.abortControllers.delete(r)})}buildRequest(e,n){let r=e,i=n;return this.httpMethod==="GET"&&(r=`${r}?${n}`,i=null),{uri:r,body:i}}labelsEndpoint(){return`${this.apiPrefix}/labels`}labelValuesEndpoint(){return`${this.apiPrefix}/label/:name/values`}seriesEndpoint(){return`${this.apiPrefix}/series`}metricMetadataEndpoint(){return`${this.apiPrefix}/metadata`}flagsEndpoint(){return`${this.apiPrefix}/status/flags`}}class Ave{constructor(e){const n={ttl:e&&e.maxAge?e.maxAge:3e5,ttlAutopurge:!0};this.completeAssociation=new nP(n),this.metricMetadata={},this.labelValues=new nP(n),this.labelNames=[],this.flags={},e!=null&&e.initialMetricList&&this.setLabelValues("__name__",e.initialMetricList)}getAssociations(e){let n=this.completeAssociation.get(e);return n||(n=new Map,this.completeAssociation.set(e,n)),n}setAssociations(e,n){n.forEach(r=>{const i=this.getAssociations(e);for(const[s,o]of Object.entries(r)){if(s==="__name__")continue;const l=i.get(s);l===void 0?i.set(s,new Set([o])):l.add(o)}})}setLabelValuesAssociation(e,n,r){const i=this.getAssociations(e),s=i.get(n);s===void 0?i.set(n,new Set(r)):r.forEach(o=>{s.add(o)})}setLabelNamesAssociation(e,n){const r=this.getAssociations(e);n.forEach(i=>{i!=="__name__"&&(r.has(i)||r.set(i,new Set))})}setFlags(e){this.flags=e}getFlags(){return this.flags}setMetricMetadata(e){this.metricMetadata=e}getMetricMetadata(){return this.metricMetadata}setLabelNames(e,n){n&&n.length>0&&this.setLabelNamesAssociation(n,e),this.labelNames=e}getLabelNames(e){if(!e||e.length===0)return this.labelNames;const n=this.completeAssociation.get(e);return n?Array.from(n.keys()):[]}setLabelValues(e,n,r){r&&r.length>0&&this.setLabelValuesAssociation(r,e,n),this.labelValues.set(e,n)}getLabelValues(e,n){if(!n||n.length===0){const i=this.labelValues.get(e);return i||[]}const r=this.completeAssociation.get(n);if(r){const i=r.get(e);return i?Array.from(i):[]}return[]}}class wve{constructor(e,n){this.client=e,this.cache=new Ave(n)}labelNames(e){const n=this.cache.getLabelNames(e);return n&&n.length>0?Promise.resolve(n):this.client.labelNames(e).then(r=>(this.cache.setLabelNames(r,e),this.cache.getLabelNames(e)))}labelValues(e,n){const r=this.cache.getLabelValues(e,n);return r&&r.length>0?Promise.resolve(r):this.client.labelValues(e,n).then(i=>(this.cache.setLabelValues(e,i,n),i))}metricMetadata(){const e=this.cache.getMetricMetadata();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.metricMetadata().then(n=>(this.cache.setMetricMetadata(n),n))}series(e){return this.client.series(e).then(n=>(this.cache.setAssociations(e,n),n))}metricNames(){return this.labelValues("__name__")}flags(){const e=this.cache.getFlags();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.flags().then(n=>(this.cache.setFlags(n),n))}destroy(){var e,n;(n=(e=this.client).destroy)===null||n===void 0||n.call(e)}}function Sve(t){const e=t;return typeof e.labelNames=="function"&&typeof e.labelValues=="function"&&typeof e.metricMetadata=="function"&&typeof e.series=="function"&&typeof e.metricNames=="function"}function ek(t){return t!=null&&t.completeStrategy?t.completeStrategy:t!=null&&t.remote?Sve(t.remote)?new i_(t.remote,t.maxMetricsMetadata):new i_(new wve(new xve(t.remote),t.remote.cache),t.maxMetricsMetadata):new i_}class rP{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ld{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(zl).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((v,b)=>v.from-b.from||v.to-b.to),o=new tu,l=[],u=0,h=r.doc.iter(),f=0,p=r.doc.length;for(let v=0;;){let b=v==s.length?null:s[v];if(!b&&!l.length)break;let x,w;if(l.length)x=u,w=l.reduce((C,_)=>Math.min(C,_.to),b&&b.from>x?b.from:1e8);else{if(x=b.from,x>p)break;w=b.to,l.push(b),v++}for(;v<s.length;){let C=s[v];if(C.from==x&&(C.to>C.from||C.to==x))l.push(C),v++,w=Math.min(C.to,w);else{w=Math.min(C.from,w);break}}w=Math.min(w,p);let A=!1;if(l.some(C=>C.from==x&&(C.to==w||w==p))&&(A=x==w,!A&&w-x<10)){let C=x-(f+h.value.length);C>0&&(h.next(C),f=x);for(let _=x;;){if(_>=w){A=!0;break}if(!h.lineBreak&&f+h.value.length>_)break;_=f+h.value.length,f+=h.value.length,h.next()}}let j=Lve(l);if(A)o.add(x,x,kt.widget({widget:new Nve(j),diagnostics:l.slice()}));else{let C=l.reduce((_,S)=>S.markClass?_+" "+S.markClass:_,"");o.add(x,w,kt.mark({class:"cm-lintRange cm-lintRange-"+j+C,diagnostics:l.slice(),inclusiveEnd:l.some(_=>_.to>w)}))}if(u=w,u==p)break;for(let C=0;C<l.length;C++)l[C].to<=u&&l.splice(C--,1)}let m=o.finish();return new Ld(m,n,Hh(m))}}function Hh(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new rP(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new rP(r.from,s,r.diagnostic)}}),r}function jve(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(zl).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(_6))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function X$(t,e){return t.field(Pa,!1)?e:e.concat(Qt.appendConfig.of(tQ))}function Cve(t,e){return{effects:X$(t,[_6.of(e)])}}const _6=Qt.define(),T6=Qt.define(),K$=Qt.define(),Pa=us.define({create(){return new Ld(kt.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=Hh(n,t.selected.diagnostic,s)||Hh(n,null,s)}!n.size&&i&&e.state.facet(zl).autoPanel&&(i=null),t=new Ld(n,i,r)}for(let n of e.effects)if(n.is(_6)){let r=e.state.facet(zl).autoPanel?n.value.length?Mv.open:null:t.panel;t=Ld.init(n.value,r,e.state)}else n.is(T6)?t=new Ld(t.diagnostics,n.value?Mv.open:null,t.selected):n.is(K$)&&(t=new Ld(t.diagnostics,t.panel,n.value));return t},provide:t=>[_v.from(t,e=>e.panel),it.decorations.from(t,e=>e.diagnostics)]}),_ve=kt.mark({class:"cm-lintRange cm-lintRange-active"});function Tve(t,e,n){let{diagnostics:r}=t.state.field(Pa),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(u,h,{spec:f})=>{if(e>=u&&e<=h&&(u==h||(e>u||n>0)&&(e<h||n<0)))return i=f.diagnostics,s=u,o=h,!1});let l=t.state.facet(zl).tooltipFilter;return i&&l&&(i=l(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:kve(t,i)}}}:null}function kve(t,e){return mr("ul",{class:"cm-tooltip-lint"},e.map(n=>eQ(t,n,!1)))}const Ove=t=>{let e=t.state.field(Pa,!1);(!e||!e.panel)&&t.dispatch({effects:X$(t.state,[T6.of(!0)])});let n=Cv(t,Mv.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},iP=t=>{let e=t.state.field(Pa,!1);return!e||!e.panel?!1:(t.dispatch({effects:T6.of(!1)}),!0)},Eve=t=>{let e=t.state.field(Pa,!1);if(!e)return!1;let n=t.state.selection.main,r=Hh(e.diagnostics,null,n.to+1);return!r&&(r=Hh(e.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Z$=[{key:"Mod-Shift-m",run:Ove,preventDefault:!0},{key:"F8",run:Eve}],Mve=qr.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(zl);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(zl);n.length&&Dve(n.map(r=>Promise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(Cve(this.view.state,r.reduce((i,s)=>i.concat(s))))},r=>{Fs(this.view.state,r)})}}update(t){let e=t.state.facet(zl);(t.docChanged||e!=t.startState.facet(zl)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function Dve(t,e,n){let r=[],i=-1;for(let s of t)s.then(o=>{r.push(o),clearTimeout(i),r.length==t.length?e(r):i=setTimeout(()=>e(r),200)},n)}const zl=mt.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...sc(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:sP,tooltipFilter:sP,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function sP(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function Rve(t,e={}){return[zl.of({source:t,config:e}),Mve,tQ]}function J$(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function eQ(t,e,n){var r;let i=n?J$(e.actions):[];return mr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},mr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let l=!1,u=v=>{if(v.preventDefault(),l)return;l=!0;let b=Hh(t.state.field(Pa).diagnostics,e);b&&s.apply(t,b.from,b.to)},{name:h}=s,f=i[o]?h.indexOf(i[o]):-1,p=f<0?h:[h.slice(0,f),mr("u",h.slice(f,f+1)),h.slice(f+1)],m=s.markClass?" "+s.markClass:"";return mr("button",{type:"button",class:"cm-diagnosticAction"+m,onclick:u,onmousedown:u,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[o]})"`}.`},p)}),e.source&&mr("div",{class:"cm-diagnosticSource"},e.source))}class Nve extends ul{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return mr("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class aP{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=eQ(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Mv{constructor(e){this.view=e,this.items=[];let n=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)iP(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=J$(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==i.keyCode){let u=Hh(this.view.state.field(Pa).diagnostics,s);u&&s.actions[l].apply(e,u.from,u.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=mr("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=mr("div",{class:"cm-panel-lint"},this.list,mr("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>iP(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Pa).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Pa),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(l,u,{spec:h})=>{for(let f of h.diagnostics){if(o.has(f))continue;o.add(f);let p=-1,m;for(let v=r;v<this.items.length;v++)if(this.items[v].diagnostic==f){p=v;break}p<0?(m=new aP(this.view,f),this.items.splice(r,0,m),i=!0):(m=this.items[p],p>r&&(this.items.splice(r,p-r),i=!0)),n&&m.diagnostic==n.diagnostic?m.dom.hasAttribute("aria-selected")||(m.dom.setAttribute("aria-selected","true"),s=m):m.dom.hasAttribute("aria-selected")&&m.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new aP(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:u})=>{let h=u.height/this.list.offsetHeight;l.top<u.top?this.list.scrollTop-=(u.top-l.top)/h:l.bottom>u.bottom&&(this.list.scrollTop+=(l.bottom-u.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Pa),r=Hh(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:K$.of(r)})}static open(e){return new Mv(e)}}function Pve(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function y1(t){return Pve(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Ive=it.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:y1("#d11")},".cm-lintRange-warning":{backgroundImage:y1("orange")},".cm-lintRange-info":{backgroundImage:y1("#999")},".cm-lintRange-hint":{backgroundImage:y1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function Bve(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Lve(t){let e="hint",n=1;for(let r of t){let i=Bve(r.severity);i>n&&(n=i,e=r.severity)}return e}const tQ=[Pa,it.decorations.compute([Pa],t=>{let{selected:e,panel:n}=t.field(Pa);return!e||!n||e.from==e.to?kt.none:kt.set([_ve.range(e.from,e.to)])}),t0e(Tve,{hideOn:jve}),Ive];class Fve{promQL(){return e=>{const n=new oge(e.state);return n.analyze(),n.getDiagnostics()}}}function Hve(){return new Fve}function zve(t,e){return Rve(t.call(e))}var tk;(function(t){t.PromQL="PromQL",t.MetricName="MetricName"})(tk||(tk={}));function qve(t){return bA.define({parser:yhe.configure({top:t}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}})}class nQ{constructor(){this.complete=ek(),this.lint=Hve(),this.enableLinter=!0,this.enableCompletion=!0}setComplete(e){return this.complete=ek(e),this}getComplete(){return this.complete}activateCompletion(e){return this.enableCompletion=e,this}setLinter(e){return this.lint=e,this}getLinter(){return this.lint}activateLinter(e){return this.enableLinter=e,this}destroy(){var e,n;(n=(e=this.complete).destroy)===null||n===void 0||n.call(e)}asExtension(e=tk.PromQL){const n=qve(e);let r=[n];if(this.enableCompletion){const i=n.data.of({autocomplete:s=>this.complete.promQL(s)});r=r.concat(i)}return this.enableLinter&&(r=r.concat(zve(this.lint.promQL,this.lint))),r}}const $ve=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=O6(t.state,n.from);return r.line?Qve(t):r.block?Wve(t):!1};function k6(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Qve=k6(Gve,0),Uve=k6(rQ,0),Wve=k6((t,e)=>rQ(t,e,Yve(e)),0);function O6(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const cg=50;function Vve(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-cg,r),o=t.sliceDoc(i,i+cg),l=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(u,u+n.length)==n)return{open:{pos:r-l,margin:l&&1},close:{pos:i+u,margin:u&&1}};let f,p;i-r<=2*cg?f=p=t.sliceDoc(r,i):(f=t.sliceDoc(r,r+cg),p=t.sliceDoc(i-cg,i));let m=/^\s*/.exec(f)[0].length,v=/\s*$/.exec(p)[0].length,b=p.length-v-n.length;return f.slice(m,m+e.length)==e&&p.slice(b,b+n.length)==n?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-v-n.length,margin:/\s/.test(p.charAt(b-1))?1:0}}:null}function Yve(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function rQ(t,e,n=e.selection.ranges){let r=n.map(s=>O6(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>Vve(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let u=r[o],{open:h,close:f}=l;s.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+u.close.length})}return{changes:s}}return null}function Gve(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:s,to:o}of n){let l=r.length,u=1e9,h=O6(e,s).line;if(h){for(let f=s;f<=o;){let p=e.doc.lineAt(f);if(p.from>i&&(s==o||o>p.from)){i=p.from;let m=/^\s*/.exec(p.text)[0].length,v=m==p.length,b=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<u&&(u=m),r.push({line:p,comment:b,token:h,indent:m,empty:v,single:!1})}f=p.to+1}if(u<1e9)for(let f=l;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=u);r.length==l+1&&(r[l].single=!0)}}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:u,indent:h,empty:f,single:p}of r)(p||!f)&&s.push({from:l.from+h,insert:u+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:u}of r)if(l>=0){let h=o.from+l,f=h+u.length;o.text[f-o.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}const nk=ic.define(),Xve=ic.define(),Kve=mt.define(),iQ=mt.define({combine(t){return sc(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),sQ=us.define({create(){return ql.empty},update(t,e){let n=e.state.facet(iQ),r=e.annotation(nk);if(r){let u=la.fromTransaction(e,r.selection),h=r.side,f=h==0?t.undone:t.done;return u?f=_A(f,f.length,n.minDepth,u):f=cQ(f,e.startState.selection),new ql(h==0?r.rest:f,h==0?f:r.rest)}let i=e.annotation(Xve);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(bi.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=la.fromTransaction(e),o=e.annotation(bi.time),l=e.annotation(bi.userEvent);return s?t=t.addChanges(s,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new ql(t.done.map(la.fromJSON),t.undone.map(la.fromJSON))}});function aQ(t={}){return[sQ,iQ.of(t),it.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?oQ:e.inputType=="historyRedo"?rk:null;return r?(e.preventDefault(),r(n)):!1}})]}function S2(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(sQ,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const oQ=S2(0,!1),rk=S2(1,!1),Zve=S2(0,!0),Jve=S2(1,!0);class la{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new la(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new la(e.changes&&_i.fromJSON(e.changes),[],e.mapped&&Vl.fromJSON(e.mapped),e.startSelection&&Me.fromJSON(e.startSelection),e.selectionsAfter.map(Me.fromJSON))}static fromTransaction(e,n){let r=ho;for(let i of e.startState.facet(Kve)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new la(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ho)}static selection(e){return new la(void 0,ho,void 0,void 0,e)}}function _A(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function ebe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,l)=>{for(let u=0;u<n.length;){let h=n[u++],f=n[u++];l>=h&&o<=f&&(r=!0)}}),r}function tbe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function lQ(t,e){return t.length?e.length?t.concat(e):t:e}const ho=[],nbe=200;function cQ(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-nbe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),_A(t,t.length-1,1e9,n.setSelAfter(r)))}else return[la.selection([e])]}function rbe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function s_(t,e){if(!t.length)return t;let n=t.length,r=ho;for(;n;){let i=ibe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[la.selection(r)]:ho}function ibe(t,e,n){let r=lQ(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):ho,n);if(!t.changes)return la.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new la(i,Qt.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const sbe=/^(input\.type|delete)($|\.)/;class ql{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new ql(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||sbe.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,ebe(l.changes,e.changes))||r=="input.type.compose")?o=_A(o,o.length-1,i.minDepth,new la(e.changes.compose(l.changes),lQ(Qt.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,ho)):o=_A(o,o.length,i.minDepth,e),new ql(o,ho,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:ho;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&tbe(s[s.length-1],e)?this:new ql(cQ(this.done,e),this.undone,n,r)}addMapping(e){return new ql(s_(this.done,e),s_(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||n.selection;if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:nk.of({side:e,rest:rbe(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=i.length==1?ho:i.slice(0,i.length-1);return s.mapped&&(l=s_(l,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:nk.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}ql.empty=new ql(ho,ho);const uQ=[{key:"Mod-z",run:oQ,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:rk,preventDefault:!0},{linux:"Ctrl-Shift-z",run:rk,preventDefault:!0},{key:"Mod-u",run:Zve,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Jve,preventDefault:!0}];function n0(t,e){return Me.create(t.ranges.map(e),t.mainIndex)}function ac(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function hl({state:t,dispatch:e},n){let r=n0(t.selection,n);return r.eq(t.selection,!0)?!1:(e(ac(t,r)),!0)}function j2(t,e){return Me.cursor(e?t.to:t.from)}function hQ(t,e){return hl(t,n=>n.empty?t.moveByChar(n,e):j2(n,e))}function Es(t){return t.textDirectionAt(t.state.selection.main.head)==ur.LTR}const dQ=t=>hQ(t,!Es(t)),fQ=t=>hQ(t,Es(t));function pQ(t,e){return hl(t,n=>n.empty?t.moveByGroup(n,e):j2(n,e))}const abe=t=>pQ(t,!Es(t)),obe=t=>pQ(t,Es(t));function lbe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function C2(t,e,n){let r=Oi(t).resolveInner(e.head),i=n?cn.closedBy:cn.openedBy;for(let u=e.head;;){let h=n?r.childAfter(u):r.childBefore(u);if(!h)break;lbe(t,h,i)?r=h:u=n?h.to:h.from}let s=r.type.prop(i),o,l;return s&&(o=n?Hl(t,r.from,1):Hl(t,r.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?r.to:r.from,Me.cursor(l,n?-1:1)}const cbe=t=>hl(t,e=>C2(t.state,e,!Es(t))),ube=t=>hl(t,e=>C2(t.state,e,Es(t)));function mQ(t,e){return hl(t,n=>{if(!n.empty)return j2(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const gQ=t=>mQ(t,!1),vQ=t=>mQ(t,!0);function bQ(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(it.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function yQ(t,e){let n=bQ(t),{state:r}=t,i=n0(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):j2(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),u=l.top+n.marginTop,h=l.bottom-n.marginBottom;o&&o.top>u&&o.bottom<h&&(s=it.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-u}))}return t.dispatch(ac(r,i),{effects:s}),!0}const oP=t=>yQ(t,!1),ik=t=>yQ(t,!0);function nd(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Me.cursor(r.from+s))}return i}const hbe=t=>hl(t,e=>nd(t,e,!0)),dbe=t=>hl(t,e=>nd(t,e,!1)),fbe=t=>hl(t,e=>nd(t,e,!Es(t))),pbe=t=>hl(t,e=>nd(t,e,Es(t))),mbe=t=>hl(t,e=>Me.cursor(t.lineBlockAt(e.head).from,1)),gbe=t=>hl(t,e=>Me.cursor(t.lineBlockAt(e.head).to,-1));function vbe(t,e,n){let r=!1,i=n0(t.selection,s=>{let o=Hl(t,s.head,-1)||Hl(t,s.head,1)||s.head>0&&Hl(t,s.head-1,1)||s.head<t.doc.length&&Hl(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return Me.cursor(l)});return r?(e(ac(t,i)),!0):!1}const bbe=({state:t,dispatch:e})=>vbe(t,e);function jo(t,e){let n=n0(t.state.selection,r=>{let i=e(r);return Me.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(ac(t.state,n)),!0)}function xQ(t,e){return jo(t,n=>t.moveByChar(n,e))}const AQ=t=>xQ(t,!Es(t)),wQ=t=>xQ(t,Es(t));function SQ(t,e){return jo(t,n=>t.moveByGroup(n,e))}const ybe=t=>SQ(t,!Es(t)),xbe=t=>SQ(t,Es(t)),Abe=t=>jo(t,e=>C2(t.state,e,!Es(t))),wbe=t=>jo(t,e=>C2(t.state,e,Es(t)));function jQ(t,e){return jo(t,n=>t.moveVertically(n,e))}const CQ=t=>jQ(t,!1),_Q=t=>jQ(t,!0);function TQ(t,e){return jo(t,n=>t.moveVertically(n,e,bQ(t).height))}const lP=t=>TQ(t,!1),cP=t=>TQ(t,!0),Sbe=t=>jo(t,e=>nd(t,e,!0)),jbe=t=>jo(t,e=>nd(t,e,!1)),Cbe=t=>jo(t,e=>nd(t,e,!Es(t))),_be=t=>jo(t,e=>nd(t,e,Es(t))),Tbe=t=>jo(t,e=>Me.cursor(t.lineBlockAt(e.head).from)),kbe=t=>jo(t,e=>Me.cursor(t.lineBlockAt(e.head).to)),uP=({state:t,dispatch:e})=>(e(ac(t,{anchor:0})),!0),hP=({state:t,dispatch:e})=>(e(ac(t,{anchor:t.doc.length})),!0),dP=({state:t,dispatch:e})=>(e(ac(t,{anchor:t.selection.main.anchor,head:0})),!0),fP=({state:t,dispatch:e})=>(e(ac(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Obe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Ebe=({state:t,dispatch:e})=>{let n=_2(t).map(({from:r,to:i})=>Me.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Me.create(n),userEvent:"select"})),!0},Mbe=({state:t,dispatch:e})=>{let n=n0(t.selection,r=>{var i;let s=Oi(t).resolveStack(r.from,1);for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&(!((i=l.parent)===null||i===void 0)&&i.parent))return Me.range(l.to,l.from)}return r});return e(ac(t,n)),!0},Dbe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Me.create([n.main]):n.main.empty||(r=Me.create([Me.cursor(n.main.head)])),r?(e(ac(t,r)),!0):!1};function bb(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let u=e(s);u<o?(n="delete.backward",u=x1(t,u,!1)):u>o&&(n="delete.forward",u=x1(t,u,!0)),o=Math.min(o,u),l=Math.max(l,u)}else o=x1(t,o,!1),l=x1(t,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:Me.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?it.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function x1(t,e,n){if(t instanceof it)for(let r of t.state.facet(it.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const kQ=(t,e,n)=>bb(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),l,u;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]=="	")return i-1;let h=e0(l,s.tabSize),f=h%xA(s)||xA(s);for(let p=0;p<f&&l[l.length-1-p]==" ";p++)i--;u=i}else u=$i(o.text,i-o.from,e,e)+o.from,u==i&&o.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(u-o.from,i-o.from))&&(u=$i(o.text,u-o.from,!1,!1)+o.from);return u}),sk=t=>kQ(t,!1,!0),OQ=t=>kQ(t,!0,!1),EQ=(t,e)=>bb(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let u=$i(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,u)-s.from,Math.max(r,u)-s.from),f=o(h);if(l!=null&&f!=l)break;(h!=" "||r!=n.head)&&(l=f),r=u}return r}),MQ=t=>EQ(t,!1),Rbe=t=>EQ(t,!0),Nbe=t=>bb(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Pbe=t=>bb(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Ibe=t=>bb(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Bbe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:wn.of(["",""])},range:Me.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Lbe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:$i(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:$i(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(o,i))},range:Me.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function _2(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function DQ(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of _2(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),l=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let u of s.ranges)i.push(Me.range(Math.min(t.doc.length,u.anchor+l),Math.min(t.doc.length,u.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let u of s.ranges)i.push(Me.range(u.anchor-l,u.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Me.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Fbe=({state:t,dispatch:e})=>DQ(t,e,!1),Hbe=({state:t,dispatch:e})=>DQ(t,e,!0);function RQ(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of _2(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const zbe=({state:t,dispatch:e})=>RQ(t,e,!1),qbe=({state:t,dispatch:e})=>RQ(t,e,!0),$be=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(_2(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=n0(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),l=t.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+t.documentTop-l.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Qbe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Oi(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(cn.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const NQ=PQ(!1),Ube=PQ(!0);function PQ(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),u=!t&&s==o&&Qbe(e,s);t&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new y2(e,{simulateBreak:s,simulateDoubleBreak:!!u}),f=p6(h,s);for(f==null&&(f=e0(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;u?{from:s,to:o}=u:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let p=["",Tv(e,f)];return u&&p.push(Tv(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:wn.of(p)},range:Me.cursor(s+1+p[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function E6(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=t.doc.lineAt(o);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),o=l.to+1}let s=t.changes(i);return{changes:i,range:Me.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const Wbe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new y2(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=E6(t,(s,o,l)=>{let u=p6(r,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let h=/^\s*/.exec(s.text)[0],f=Tv(t,u);(h!=f||l.from<s.from+h.length)&&(n[s.from]=u,o.push({from:s.from,to:s.from+h.length,insert:f}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},IQ=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(E6(t,(n,r)=>{r.push({from:n.from,insert:t.facet(mb)})}),{userEvent:"input.indent"})),!0),BQ=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(E6(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=e0(i,t.tabSize),o=0,l=Tv(t,Math.max(0,s-xA(t)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),Vbe=t=>(t.setTabFocusMode(),!0),Ybe=[{key:"Ctrl-b",run:dQ,shift:AQ,preventDefault:!0},{key:"Ctrl-f",run:fQ,shift:wQ},{key:"Ctrl-p",run:gQ,shift:CQ},{key:"Ctrl-n",run:vQ,shift:_Q},{key:"Ctrl-a",run:mbe,shift:Tbe},{key:"Ctrl-e",run:gbe,shift:kbe},{key:"Ctrl-d",run:OQ},{key:"Ctrl-h",run:sk},{key:"Ctrl-k",run:Nbe},{key:"Ctrl-Alt-h",run:MQ},{key:"Ctrl-o",run:Bbe},{key:"Ctrl-t",run:Lbe},{key:"Ctrl-v",run:ik}],Gbe=[{key:"ArrowLeft",run:dQ,shift:AQ,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:abe,shift:ybe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:fbe,shift:Cbe,preventDefault:!0},{key:"ArrowRight",run:fQ,shift:wQ,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:obe,shift:xbe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:pbe,shift:_be,preventDefault:!0},{key:"ArrowUp",run:gQ,shift:CQ,preventDefault:!0},{mac:"Cmd-ArrowUp",run:uP,shift:dP},{mac:"Ctrl-ArrowUp",run:oP,shift:lP},{key:"ArrowDown",run:vQ,shift:_Q,preventDefault:!0},{mac:"Cmd-ArrowDown",run:hP,shift:fP},{mac:"Ctrl-ArrowDown",run:ik,shift:cP},{key:"PageUp",run:oP,shift:lP},{key:"PageDown",run:ik,shift:cP},{key:"Home",run:dbe,shift:jbe,preventDefault:!0},{key:"Mod-Home",run:uP,shift:dP},{key:"End",run:hbe,shift:Sbe,preventDefault:!0},{key:"Mod-End",run:hP,shift:fP},{key:"Enter",run:NQ},{key:"Mod-a",run:Obe},{key:"Backspace",run:sk,shift:sk},{key:"Delete",run:OQ},{key:"Mod-Backspace",mac:"Alt-Backspace",run:MQ},{key:"Mod-Delete",mac:"Alt-Delete",run:Rbe},{mac:"Mod-Backspace",run:Pbe},{mac:"Mod-Delete",run:Ibe}].concat(Ybe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),LQ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cbe,shift:Abe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:ube,shift:wbe},{key:"Alt-ArrowUp",run:Fbe},{key:"Shift-Alt-ArrowUp",run:zbe},{key:"Alt-ArrowDown",run:Hbe},{key:"Shift-Alt-ArrowDown",run:qbe},{key:"Escape",run:Dbe},{key:"Mod-Enter",run:Ube},{key:"Alt-l",mac:"Ctrl-l",run:Ebe},{key:"Mod-i",run:Mbe,preventDefault:!0},{key:"Mod-[",run:BQ},{key:"Mod-]",run:IQ},{key:"Mod-Alt-\\",run:Wbe},{key:"Shift-Mod-k",run:$be},{key:"Shift-Mod-\\",run:bbe},{key:"Mod-/",run:$ve},{key:"Alt-A",run:Uve},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Vbe}].concat(Gbe),Xbe={key:"Tab",run:IQ,shift:BQ},pP=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Nm{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(pP(l)):pP,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ia(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=XE(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Bl(e);let i=this.normalize(n);for(let s=0,o=r;;s++){let l=i.charCodeAt(s),u=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(u)return this.value=u,this;break}o==r&&s<n.length&&n.charCodeAt(s)==l&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Nm.prototype[Symbol.iterator]=function(){return this});const FQ={from:-1,to:-1,match:/.*/.exec("")},M6="gm"+(/x/.unicode==null?"":"u");class HQ{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=FQ,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new zQ(e,n,r,i,s);this.re=new RegExp(n,M6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=TA(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=TA(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const a_=new WeakMap;class Xp{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=a_.get(e);if(!i||i.from>=r||i.to<=n){let l=new Xp(n,e.sliceString(n,r));return a_.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),a_.set(e,new Xp(o,s)),new Xp(n,s.slice(n-o,r-o))}}class zQ{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=FQ,this.matchPos=TA(e,i),this.re=new RegExp(n,M6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Xp.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=TA(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Xp.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(HQ.prototype[Symbol.iterator]=zQ.prototype[Symbol.iterator]=function(){return this});function Kbe(t){try{return new RegExp(t,M6),!0}catch{return!1}}function TA(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function ak(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=mr("input",{class:"cm-textfield",name:"line",value:e}),r=mr("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:kA.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},mr("label",t.state.phrase("Go to line"),": ",n)," ",mr("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,l=o.doc.lineAt(o.selection.main.head),[,u,h,f,p]=s,m=f?+f.slice(1):0,v=h?+h:l.number;if(h&&p){let w=v/100;u&&(w=w*(u=="-"?-1:1)+l.number/o.doc.lines),v=Math.round(o.doc.lines*w)}else h&&u&&(v=v*(u=="-"?-1:1)+l.number);let b=o.doc.line(Math.max(1,Math.min(o.doc.lines,v))),x=Me.cursor(b.from+Math.max(0,Math.min(m,b.length)));t.dispatch({effects:[kA.of(!1),it.scrollIntoView(x.from,{y:"center"})],selection:x}),t.focus()}return{dom:r}}const kA=Qt.define(),mP=us.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(kA)&&(t=n.value);return t},provide:t=>_v.from(t,e=>e?ak:null)}),Zbe=t=>{let e=Cv(t,ak);if(!e){let n=[kA.of(!0)];t.state.field(mP,!1)==null&&n.push(Qt.appendConfig.of([mP,Jbe])),t.dispatch({effects:n}),e=Cv(t,ak)}return e&&e.dom.querySelector("input").select(),!0},Jbe=it.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),eye={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},tye=mt.define({combine(t){return sc(t,eye,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function qQ(t){return[aye,sye]}const nye=kt.mark({class:"cm-selectionMatch"}),rye=kt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function gP(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Dr.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Dr.Word)}function iye(t,e,n,r){return t(e.sliceDoc(n,n+1))==Dr.Word&&t(e.sliceDoc(r-1,r))==Dr.Word}const sye=qr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(tye),{state:n}=t,r=n.selection;if(r.ranges.length>1)return kt.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return kt.none;let u=n.wordAt(i.head);if(!u)return kt.none;o=n.charCategorizer(i.head),s=n.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<e.minSelectionLength||u>200)return kt.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(gP(o,n,i.from,i.to)&&iye(o,n,i.from,i.to)))return kt.none}else if(s=n.sliceDoc(i.from,i.to),!s)return kt.none}let l=[];for(let u of t.visibleRanges){let h=new Nm(n.doc,s,u.from,u.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!o||gP(o,n,f,p))&&(i.empty&&f<=i.from&&p>=i.to?l.push(rye.range(f,p)):(f>=i.to||p<=i.from)&&l.push(nye.range(f,p)),l.length>e.maxMatches))return kt.none}}return kt.set(l)}},{decorations:t=>t.decorations}),aye=it.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),oye=({state:t,dispatch:e})=>{let{selection:n}=t,r=Me.create(n.ranges.map(i=>t.wordAt(i.head)||Me.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function lye(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,l=new Nm(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Nm(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(u=>u.from==l.value.from))continue;if(s){let u=t.wordAt(l.value.from);if(!u||u.from!=l.value.from||u.to!=l.value.to)continue}return l.value}}const cye=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return oye({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=lye(t,r);return i?(e(t.update({selection:t.selection.addRange(Me.range(i.from,i.to),!1),effects:it.scrollIntoView(i.to)})),!0):!1},r0=mt.define({combine(t){return sc(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Aye(e),scrollToMatch:e=>it.scrollIntoView(e)})}});class $Q{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Kbe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
`:r=="r"?"\r":r=="t"?"	":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new fye(this):new hye(this)}getCursor(e,n=0,r){let i=e.doc?e:bn.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Cp(this,i,n,r):jp(this,i,n,r)}}class QQ{constructor(e){this.spec=e}}function jp(t,e,n,r){return new Nm(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?uye(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function uye(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(OA(i,n-s))!=Dr.Word||e(EA(i,n-s))!=Dr.Word)&&(e(EA(i,r-s))!=Dr.Word||e(OA(i,r-s))!=Dr.Word))}class hye extends QQ{constructor(e){super(e)}nextMatch(e,n,r){let i=jp(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=jp(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=jp(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=jp(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=jp(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function Cp(t,e,n,r){return new HQ(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?dye(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function OA(t,e){return t.slice($i(t,e,!1),e)}function EA(t,e){return t.slice(e,$i(t,e))}function dye(t){return(e,n,r)=>!r[0].length||(t(OA(r.input,r.index))!=Dr.Word||t(EA(r.input,r.index))!=Dr.Word)&&(t(EA(r.input,r.index+r[0].length))!=Dr.Word||t(OA(r.input,r.index+r[0].length))!=Dr.Word)}class fye extends QQ{nextMatch(e,n,r){let i=Cp(this.spec,e,r,e.doc.length).next();return i.done&&(i=Cp(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Cp(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=Cp(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Cp(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Dv=Qt.define(),D6=Qt.define(),Oh=us.define({create(t){return new o_(ok(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Dv)?t=new o_(n.value.create(),t.panel):n.is(D6)&&(t=new o_(t.query,n.value?R6:null));return t},provide:t=>_v.from(t,e=>e.panel)});class o_{constructor(e,n){this.query=e,this.panel=n}}const pye=kt.mark({class:"cm-searchMatch"}),mye=kt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),gye=qr.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Oh))}update(t){let e=t.state.field(Oh);(e!=t.startState.field(Oh)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return kt.none;let{view:n}=this,r=new tu;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:l,to:u}=s[i];for(;i<o-1&&u>s[i+1].from-2*250;)u=s[++i].to;t.highlight(n.state,l,u,(h,f)=>{let p=n.state.selection.ranges.some(m=>m.from==h&&m.to==f);r.add(h,f,p?mye:pye)})}return r.finish()}},{decorations:t=>t.decorations});function yb(t){return e=>{let n=e.state.field(Oh,!1);return n&&n.query.spec.valid?t(e,n):VQ(e)}}const MA=yb((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Me.single(r.from,r.to),s=t.state.facet(r0);return t.dispatch({selection:i,effects:[N6(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),WQ(t),!0}),DA=yb((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=Me.single(i.from,i.to),o=t.state.facet(r0);return t.dispatch({selection:s,effects:[N6(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),WQ(t),!0}),vye=yb((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Me.create(n.map(r=>Me.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),bye=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let l=new Nm(t.doc,t.sliceDoc(r,i));!l.next().done;){if(s.length>1e3)return!1;l.value.from==r&&(o=s.length),s.push(Me.range(l.value.from,l.value.to))}return e(t.update({selection:Me.create(s,o),userEvent:"select.search.matches"})),!0},vP=yb((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=[],l,u,h=[];if(s.from==r&&s.to==i&&(u=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:u}),s=e.nextMatch(n,s.from,s.to),h.push(it.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let f=o.length==0||o[0].from>=s.to?0:s.to-s.from-u.length;l=Me.single(s.from-f,s.to-f),h.push(N6(t,s)),h.push(n.facet(r0).scrollToMatch(l.main,t))}return t.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),yye=yb((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:it.announce.of(r),userEvent:"input.replace.all"}),!0});function R6(t){return t.state.facet(r0).createPanel(t)}function ok(t,e){var n,r,i,s,o;let l=t.selection.main,u=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!u)return e;let h=t.facet(r0);return new $Q({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function UQ(t){let e=Cv(t,R6);return e&&e.dom.querySelector("[main-field]")}function WQ(t){let e=UQ(t);e&&e==t.root.activeElement&&e.select()}const VQ=t=>{let e=t.state.field(Oh,!1);if(e&&e.panel){let n=UQ(t);if(n&&n!=t.root.activeElement){let r=ok(t.state,e.query.spec);r.valid&&t.dispatch({effects:Dv.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[D6.of(!0),e?Dv.of(ok(t.state,e.query.spec)):Qt.appendConfig.of(Sye)]});return!0},YQ=t=>{let e=t.state.field(Oh,!1);if(!e||!e.panel)return!1;let n=Cv(t,R6);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:D6.of(!1)}),!0},xye=[{key:"Mod-f",run:VQ,scope:"editor search-panel"},{key:"F3",run:MA,shift:DA,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:MA,shift:DA,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:YQ,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bye},{key:"Mod-Alt-g",run:Zbe},{key:"Mod-d",run:cye,preventDefault:!0}];class Aye{constructor(e){this.view=e;let n=this.query=e.state.field(Oh).query.spec;this.commit=this.commit.bind(this),this.searchField=mr("input",{value:n.search,placeholder:Sa(e,"Find"),"aria-label":Sa(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=mr("input",{value:n.replace,placeholder:Sa(e,"Replace"),"aria-label":Sa(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=mr("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=mr("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=mr("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return mr("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=mr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>MA(e),[Sa(e,"next")]),r("prev",()=>DA(e),[Sa(e,"previous")]),r("select",()=>vye(e),[Sa(e,"all")]),mr("label",null,[this.caseField,Sa(e,"match case")]),mr("label",null,[this.reField,Sa(e,"regexp")]),mr("label",null,[this.wordField,Sa(e,"by word")]),...e.state.readOnly?[]:[mr("br"),this.replaceField,r("replace",()=>vP(e),[Sa(e,"replace")]),r("replaceAll",()=>yye(e),[Sa(e,"replace all")])],mr("button",{name:"close",onclick:()=>YQ(e),"aria-label":Sa(e,"close"),type:"button"},["×"])])}commit(){let e=new $Q({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Dv.of(e)}))}keydown(e){mme(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?DA:MA)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),vP(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Dv)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(r0).top}}function Sa(t,e){return t.state.phrase(e)}const A1=30,w1=/[\s\.,:;?!]/;function N6(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-A1),o=Math.min(i,n+A1),l=t.state.sliceDoc(s,o);if(s!=r.from){for(let u=0;u<A1;u++)if(!w1.test(l[u+1])&&w1.test(l[u])){l=l.slice(u);break}}if(o!=i){for(let u=l.length-1;u>l.length-A1;u--)if(!w1.test(l[u-1])&&w1.test(l[u])){l=l.slice(0,u);break}}return it.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const wye=it.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Sye=[Oh,uu.low(gye),wye];var bP=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(H$)),e.defaultKeymap!==!1&&(r=r.concat(LQ)),e.searchKeymap!==!1&&(r=r.concat(xye)),e.historyKeymap!==!1&&(r=r.concat(uQ)),e.foldKeymap!==!1&&(r=r.concat(F0e)),e.completionKeymap!==!1&&(r=r.concat(j6)),e.lintKeymap!==!1&&(r=r.concat(Z$));var i=[];return e.lineNumbers!==!1&&i.push(d0e()),e.highlightActiveLineGutter!==!1&&i.push(m0e()),e.highlightSpecialChars!==!1&&i.push(c$()),e.history!==!1&&i.push(aQ()),e.foldGutter!==!1&&i.push($0e()),e.drawSelection!==!1&&i.push(Ame()),e.dropCursor!==!1&&i.push(_me()),e.allowMultipleSelections!==!1&&i.push(bn.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(b$()),e.syntaxHighlighting!==!1&&i.push(A2(V0e,{fallback:!0})),e.bracketMatching!==!1&&i.push(E$()),e.closeBrackets!==!1&&i.push(B$()),e.autocompletion!==!1&&i.push(q$()),e.rectangularSelection!==!1&&i.push(Qme()),n!==!1&&i.push(Vme()),e.highlightActiveLine!==!1&&i.push(Bme()),e.highlightSelectionMatches!==!1&&i.push(qQ()),e.tabSize&&typeof e.tabSize=="number"&&i.push(mb.of(" ".repeat(e.tabSize))),i.concat([kh.of(r.flat())]).filter(Boolean)};const jye="#e5c07b",yP="#e06c75",Cye="#56b6c2",_ye="#ffffff",gx="#abb2bf",lk="#7d8799",Tye="#61afef",kye="#98c379",xP="#d19a66",Oye="#c678dd",Eye="#21252b",AP="#2c313a",wP="#282c34",l_="#353a42",Mye="#3E4451",SP="#528bff",Dye=it.theme({"&":{color:gx,backgroundColor:wP},".cm-content":{caretColor:SP},".cm-cursor, .cm-dropCursor":{borderLeftColor:SP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Mye},".cm-panels":{backgroundColor:Eye,color:gx},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:wP,color:lk,border:"none"},".cm-activeLineGutter":{backgroundColor:AP},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:l_},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:l_,borderBottomColor:l_},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:AP,color:gx}}},{dark:!0}),Rye=Mf.define([{tag:me.keyword,color:Oye},{tag:[me.name,me.deleted,me.character,me.propertyName,me.macroName],color:yP},{tag:[me.function(me.variableName),me.labelName],color:Tye},{tag:[me.color,me.constant(me.name),me.standard(me.name)],color:xP},{tag:[me.definition(me.name),me.separator],color:gx},{tag:[me.typeName,me.className,me.number,me.changed,me.annotation,me.modifier,me.self,me.namespace],color:jye},{tag:[me.operator,me.operatorKeyword,me.url,me.escape,me.regexp,me.link,me.special(me.string)],color:Cye},{tag:[me.meta,me.comment],color:lk},{tag:me.strong,fontWeight:"bold"},{tag:me.emphasis,fontStyle:"italic"},{tag:me.strikethrough,textDecoration:"line-through"},{tag:me.link,color:lk,textDecoration:"underline"},{tag:me.heading,fontWeight:"bold",color:yP},{tag:[me.atom,me.bool,me.special(me.variableName)],color:xP},{tag:[me.processingInstruction,me.string,me.inserted],color:kye},{tag:me.invalid,color:_ye}]),Nye=[Dye,A2(Rye)];var Pye=it.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Iye=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:s="light",placeholder:o="",basicSetup:l=!0}=e,u=[];switch(n&&u.unshift(kh.of([Xbe])),l&&(typeof l=="boolean"?u.unshift(bP()):u.unshift(bP(l))),o&&u.unshift(u$(o)),s){case"light":u.push(Pye);break;case"dark":u.push(Nye);break;case"none":break;default:u.push(s);break}return r===!1&&u.push(it.editable.of(!1)),i&&u.push(bn.readOnly.of(!0)),[...u]},Bye=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class Lye{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class jP{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var c_=null,Fye=()=>typeof window>"u"?new jP:(c_||(c_=new jP),c_),CP=ic.define(),Hye=200,zye=[];function qye(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:s,onUpdate:o,extensions:l=zye,autoFocus:u,theme:h="light",height:f=null,minHeight:p=null,maxHeight:m=null,width:v=null,minWidth:b=null,maxWidth:x=null,placeholder:w="",editable:A=!0,readOnly:j=!1,indentWithTab:C=!0,basicSetup:_=!0,root:S,initialState:O}=t,[E,D]=M.useState(),[N,I]=M.useState(),[R,L]=M.useState(),Q=M.useState(()=>({current:null}))[0],z=M.useState(()=>({current:null}))[0],H=it.theme({"&":{height:f,minHeight:p,maxHeight:m,width:v,minWidth:b,maxWidth:x},"& .cm-scroller":{height:"100% !important"}}),P=it.updateListener.of(Z=>{if(Z.docChanged&&typeof r=="function"&&!Z.transactions.some(X=>X.annotation(CP))){Q.current?Q.current.reset():(Q.current=new Lye(()=>{if(z.current){var X=z.current;z.current=null,X()}Q.current=null},Hye),Fye().add(Q.current));var G=Z.state.doc,W=G.toString();r(W,Z)}i&&i(Bye(Z))}),F=Iye({theme:h,editable:A,readOnly:j,placeholder:w,indentWithTab:C,basicSetup:_}),U=[P,H,...F];return o&&typeof o=="function"&&U.push(it.updateListener.of(o)),U=U.concat(l),M.useLayoutEffect(()=>{if(E&&!R){var Z={doc:e,selection:n,extensions:U},G=O?bn.fromJSON(O.json,Z,O.fields):bn.create(Z);if(L(G),!N){var W=new it({state:G,parent:E,root:S});I(W),s&&s(W,G)}}return()=>{N&&(L(void 0),I(void 0))}},[E,R]),M.useEffect(()=>{t.container&&D(t.container)},[t.container]),M.useEffect(()=>()=>{N&&(N.destroy(),I(void 0)),Q.current&&(Q.current.cancel(),Q.current=null)},[N]),M.useEffect(()=>{u&&N&&N.focus()},[u,N]),M.useEffect(()=>{N&&N.dispatch({effects:Qt.reconfigure.of(U)})},[h,l,f,p,m,v,b,x,w,A,j,C,_,r,o]),M.useEffect(()=>{if(e!==void 0){var Z=N?N.state.doc.toString():"";if(N&&e!==Z){var G=Q.current&&!Q.current.isDone,W=()=>{N&&e!==N.state.doc.toString()&&N.dispatch({changes:{from:0,to:N.state.doc.toString().length,insert:e||""},annotations:[CP.of(!0)]})};G?z.current=W:W()}}},[e,N]),{state:R,setState:L,view:N,setView:I,container:E,setContainer:D}}var $ye=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],P6=M.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:s=[],onChange:o,onStatistics:l,onCreateEditor:u,onUpdate:h,autoFocus:f,theme:p="light",height:m,minHeight:v,maxHeight:b,width:x,minWidth:w,maxWidth:A,basicSetup:j,placeholder:C,indentWithTab:_,editable:S,readOnly:O,root:E,initialState:D}=t,N=BO(t,$ye),I=M.useRef(null),{state:R,view:L,container:Q,setContainer:z}=qye({root:E,value:r,autoFocus:f,theme:p,height:m,minHeight:v,maxHeight:b,width:x,minWidth:w,maxWidth:A,basicSetup:j,placeholder:C,indentWithTab:_,editable:S,readOnly:O,selection:i,onChange:o,onStatistics:l,onCreateEditor:u,onUpdate:h,extensions:s,initialState:D});M.useImperativeHandle(e,()=>({editor:I.current,state:R,view:L}),[I,Q,R,L]);var H=M.useCallback(F=>{I.current=F,z(F)},[z]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var P=typeof p=="string"?"cm-theme-"+p:"cm-theme";return a.jsx("div",Ix({ref:H,className:""+P+(n?" "+n:"")},N))});P6.displayName="CodeMirror";const GQ=it.theme({".cm-content":{paddingTop:"3px",paddingBottom:"0px"},"&.cm-editor":{"&.cm-focused":{outline:"none",outline_fallback:"none"},backgroundColor:"transparent"},".cm-scroller":{overflow:"hidden",fontFamily:'"DejaVu Sans Mono", monospace'},".cm-placeholder":{fontFamily:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'},".cm-matchingBracket":{fontWeight:"bold",outline:"1px dashed transparent"},".cm-nonmatchingBracket":{borderColor:"red"},".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{maxHeight:"350px",fontFamily:'"DejaVu Sans Mono", monospace',maxWidth:"unset"},"& > ul > li":{padding:"2px 1em 2px 3px"},minWidth:"30%"},".cm-completionDetail":{float:"right",color:"#999"},".cm-tooltip.cm-completionInfo":{padding:"10px",fontFamily:"'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;",border:"none",minWidth:"250px",maxWidth:"min-content"},".cm-completionInfo.cm-completionInfo-right":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",left:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"-11px",marginLeft:"12px"},".cm-completionInfo.cm-completionInfo-left":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",right:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"-11px",marginRight:"12px"},".cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",top:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"10px",marginLeft:"150px"},".cm-completionMatchedText":{textDecoration:"none",fontWeight:"bold"},".cm-selectionMatch":{backgroundColor:"#e6f3ff"},".cm-diagnostic":{"&.cm-diagnostic-error":{borderLeft:"3px solid #e65013"}},".cm-completionIcon":{boxSizing:"content-box",fontSize:"16px",lineHeight:"1",marginRight:"10px",verticalAlign:"top","&:after":{content:"'\\ea88'"},fontFamily:"codicon",paddingRight:"0",opacity:"1"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\\ea8c'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'\\eb5f'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\\eb62'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'\\ea95'"},color:"#ee9d28"}}),XQ=it.theme({".cm-tooltip":{backgroundColor:"#f8f8f8",borderColor:"rgba(52, 79, 113, 0.2)"},".cm-tooltip.cm-tooltip-autocomplete":{"& li:hover":{backgroundColor:"#ddd"},"& > ul > li[aria-selected]":{backgroundColor:"#d6ebff",color:"unset"}},".cm-tooltip.cm-completionInfo":{backgroundColor:"#d6ebff"},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right":{"&:before":{borderRightColor:"#d6ebff"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{borderBottomColor:"#d6ebff"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-left":{"&:before":{borderLeftColor:"#d6ebff"}},".cm-line":{"&::selection":{backgroundColor:"#add6ff"},"& > span::selection":{backgroundColor:"#add6ff"}},".cm-matchingBracket":{color:"#000",backgroundColor:"#dedede"},".cm-completionMatchedText":{color:"#0066bf"},".cm-completionIcon":{color:"#007acc"},".cm-completionIcon-constant":{color:"#007acc"},".cm-completionIcon-function, .cm-completionIcon-method":{color:"#652d90"},".cm-completionIcon-keyword":{color:"#616161"}},{dark:!1}),Qye=it.theme({".cm-content":{caretColor:"#fff"},".cm-tooltip.cm-completionInfo":{backgroundColor:"#333338"},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right":{"&:before":{borderRightColor:"#333338"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{borderBottomColor:"#333338"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-left":{"&:before":{borderLeftColor:"#333338"}},".cm-line":{"&::selection":{backgroundColor:"#767676"},"& > span::selection":{backgroundColor:"#767676"}},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:"#616161"},".cm-completionMatchedText":{color:"#7dd3fc"},".cm-completionIcon, .cm-completionIcon-constant":{color:"#7dd3fc"},".cm-completionIcon-function, .cm-completionIcon-method":{color:"#d8b4fe"},".cm-completionIcon-keyword":{color:"#cbd5e1 !important"}},{dark:!0}),KQ=Mf.define([{tag:me.number,color:"#09885a"},{tag:me.string,color:"#a31515"},{tag:me.keyword,color:"#008080"},{tag:me.function(me.variableName),color:"#008080"},{tag:me.labelName,color:"#800000"},{tag:me.operator},{tag:me.modifier,color:"#008080"},{tag:me.paren},{tag:me.squareBracket},{tag:me.brace},{tag:me.invalid,color:"red"},{tag:me.comment,color:"#888",fontStyle:"italic"}]),ZQ=Mf.define([{tag:me.number,color:"#22c55e"},{tag:me.string,color:"#fca5a5"},{tag:me.keyword,color:"#14bfad"},{tag:me.function(me.variableName),color:"#14bfad"},{tag:me.labelName,color:"#ff8585"},{tag:me.operator},{tag:me.modifier,color:"#14bfad"},{tag:me.paren},{tag:me.squareBracket},{tag:me.brace},{tag:me.invalid,color:"#ff3d3d"},{tag:me.comment,color:"#9ca3af",fontStyle:"italic"}]),Uye="_input_k0obd_1",Wye={input:Uye},Vye="api/v1",JQ=({pathPrefix:t,path:e,params:n,recordResponseTime:r})=>async({signal:i})=>{var o;const s=n?`?${new URLSearchParams(n).toString()}`:"";try{const l=Date.now(),u=await fetch(`${t}/${Vye}${e}${s}`,{cache:"no-store",credentials:"same-origin",signal:i});if(!u.ok&&!((o=u.headers.get("content-type"))!=null&&o.startsWith("application/json")))throw new Error(u.statusText);const h=await u.json();if(r&&r(Date.now()-l),h.status==="error")throw new Error(h.error!==void 0?h.error:'missing "error" field in response JSON');return h}catch(l){if(!(l instanceof Error))throw new Error("Unknown error");switch(l.name){case"TypeError":throw new Error("Network error or unable to reach the server");case"SyntaxError":throw new Error("Invalid JSON response");default:throw l}}},zh=({key:t,path:e,params:n,enabled:r,recordResponseTime:i,refetchInterval:s})=>{const{pathPrefix:o}=li();return aoe({queryKey:t!==void 0?t:[e,n],retry:!1,refetchOnWindowFocus:!1,refetchInterval:s,gcTime:0,enabled:r,queryFn:JQ({pathPrefix:o,path:e,params:n,recordResponseTime:i})})},yi=({key:t,path:e,params:n})=>{const{pathPrefix:r}=li();return pH({queryKey:t!==void 0?t:[e,n],retry:!1,refetchOnWindowFocus:!1,staleTime:1/0,gcTime:0,queryFn:JQ({pathPrefix:r,path:e,params:n})})};function Yye(t){let e=t,n=!1;const r=new Set;return{getState(){return e},updateState(i){e=typeof i=="function"?i(e):i},setState(i){this.updateState(i),r.forEach(s=>s(e))},initialize(i){n||(e=i,n=!0)},subscribe(i){return r.add(i),()=>r.delete(i)}}}function Gye(t){return M.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function Xye(t,e,n){const r=[],i=[],s={};for(const o of t){const l=o.position||e;s[l]=s[l]||0,s[l]+=1,s[l]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}const Kye=()=>Yye({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Df=Kye(),Zye=(t=Df)=>Gye(t);function i0(t,e){const n=t.getState(),r=e([...n.notifications,...n.queue]),i=Xye(r,n.defaultPosition,n.limit);t.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function Jye(t,e=Df){const n=t.id||bm();return i0(e,r=>t.id&&r.some(i=>i.id===t.id)?r:[...r,{...t,id:n}]),n}function eU(t,e=Df){return i0(e,n=>n.filter(r=>{var i;return r.id===t?((i=r.onClose)==null||i.call(r,r),!1):!0})),t}function e1e(t,e=Df){return i0(e,n=>n.map(r=>r.id===t.id?{...r,...t}:r)),t.id}function t1e(t=Df){i0(t,()=>[])}function n1e(t=Df){i0(t,e=>e.slice(0,t.getState().limit))}const nl={show:Jye,hide:eU,update:e1e,clean:t1e,cleanQueue:n1e,updateState:i0};function ck(t,e){return ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ck(t,e)}function tU(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ck(t,e)}const _P={disabled:!1},RA=Cn.createContext(null);var r1e=function(e){return e.scrollTop},Eg="unmounted",Md="exited",Dd="entering",_p="entered",uk="exiting",hu=function(t){tU(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,l=o&&!o.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?l?(u=Md,s.appearStatus=Dd):u=_p:r.unmountOnExit||r.mountOnEnter?u=Eg:u=Md,s.state={status:u},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===Eg?{status:Md}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Dd&&o!==_p&&(s=Dd):(o===Dd||o===_p)&&(s=uk)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,l;return s=o=l=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,l=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:l}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Dd){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:xg.findDOMNode(this);o&&r1e(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Md&&this.setState({status:Eg})},n.performEnter=function(i){var s=this,o=this.props.enter,l=this.context?this.context.isMounting:i,u=this.props.nodeRef?[l]:[xg.findDOMNode(this),l],h=u[0],f=u[1],p=this.getTimeouts(),m=l?p.appear:p.enter;if(!i&&!o||_P.disabled){this.safeSetState({status:_p},function(){s.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Dd},function(){s.props.onEntering(h,f),s.onTransitionEnd(m,function(){s.safeSetState({status:_p},function(){s.props.onEntered(h,f)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),l=this.props.nodeRef?void 0:xg.findDOMNode(this);if(!s||_P.disabled){this.safeSetState({status:Md},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:uk},function(){i.props.onExiting(l),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Md},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(l){o&&(o=!1,s.nextCallback=null,i(l))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:xg.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!o||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Eg)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=BO(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Cn.createElement(RA.Provider,{value:null},typeof o=="function"?o(i,l):Cn.cloneElement(Cn.Children.only(o),l))},e}(Cn.Component);hu.contextType=RA;hu.propTypes={};function vp(){}hu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:vp,onEntering:vp,onEntered:vp,onExit:vp,onExiting:vp,onExited:vp};hu.UNMOUNTED=Eg;hu.EXITED=Md;hu.ENTERING=Dd;hu.ENTERED=_p;hu.EXITING=uk;function i1e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I6(t,e){var n=function(s){return e&&M.isValidElement(s)?e(s):s},r=Object.create(null);return t&&M.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function s1e(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,l={};for(var u in e){if(r[u])for(o=0;o<r[u].length;o++){var h=r[u][o];l[r[u][o]]=n(h)}l[u]=n(u)}for(o=0;o<i.length;o++)l[i[o]]=n(i[o]);return l}function Ud(t,e,n){return n[e]!=null?n[e]:t.props[e]}function a1e(t,e){return I6(t.children,function(n){return M.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Ud(n,"appear",t),enter:Ud(n,"enter",t),exit:Ud(n,"exit",t)})})}function o1e(t,e,n){var r=I6(t.children),i=s1e(e,r);return Object.keys(i).forEach(function(s){var o=i[s];if(M.isValidElement(o)){var l=s in e,u=s in r,h=e[s],f=M.isValidElement(h)&&!h.props.in;u&&(!l||f)?i[s]=M.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:Ud(o,"exit",t),enter:Ud(o,"enter",t)}):!u&&l&&!f?i[s]=M.cloneElement(o,{in:!1}):u&&l&&M.isValidElement(h)&&(i[s]=M.cloneElement(o,{onExited:n.bind(null,o),in:h.props.in,exit:Ud(o,"exit",t),enter:Ud(o,"enter",t)}))}}),i}var l1e=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},c1e={component:"div",childFactory:function(e){return e}},ah=function(t){tU(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=s.handleExited.bind(i1e(s));return s.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,s){var o=s.children,l=s.handleExited,u=s.firstRender;return{children:u?a1e(i,l):o1e(i,o,l),firstRender:!1}},n.handleExited=function(i,s){var o=I6(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(l){var u=Ix({},l.children);return delete u[i.key],{children:u}}))},n.render=function(){var i=this.props,s=i.component,o=i.childFactory,l=BO(i,["component","childFactory"]),u=this.state.contextValue,h=l1e(this.state.children).map(o);return delete l.appear,delete l.enter,delete l.exit,s===null?Cn.createElement(RA.Provider,{value:u},h):Cn.createElement(RA.Provider,{value:u},Cn.createElement(s,l,h))},e}(Cn.Component);ah.propTypes={};ah.defaultProps=c1e;const nU=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function u1e(t,e){return t.reduce((n,r)=>(n[r.position||e].push(r),n),nU.reduce((n,r)=>(n[r]=[],n),{}))}const TP={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},h1e={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function d1e({state:t,maxHeight:e,position:n,transitionDuration:r}){const[i,s]=n.split("-"),o=s==="center"?`${i}-center`:s,l={opacity:0,maxHeight:e,transform:TP[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},u={opacity:1,transform:h1e[o]},h={opacity:0,maxHeight:0,transform:TP[o]};return{...l,...{entering:u,entered:u,exiting:h,exited:h}[t]}}function f1e(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const rU=M.forwardRef(({data:t,onHide:e,autoClose:n,...r},i)=>{const{autoClose:s,message:o,...l}=t,u=f1e(n,t.autoClose),h=M.useRef(-1),f=()=>window.clearTimeout(h.current),p=()=>{e(t.id),f()},m=()=>{typeof u=="number"&&(h.current=window.setTimeout(p,u))};return M.useEffect(()=>{var v;(v=t.onOpen)==null||v.call(t,t)},[]),M.useEffect(()=>(m(),f),[u]),a.jsx(XO,{...r,...l,onClose:p,ref:i,onMouseEnter:f,onMouseLeave:m,children:o})});rU.displayName="@mantine/notifications/NotificationContainer";var iU={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const p1e=hu,m1e={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:vo("overlay"),store:Df,withinPortal:!0},g1e=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":fe(n)}}),du=Oe((t,e)=>{const n=we("Notifications",m1e,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,position:h,autoClose:f,transitionDuration:p,containerWidth:m,notificationMaxHeight:v,limit:b,zIndex:x,store:w,portalProps:A,withinPortal:j,...C}=n,_=xi(),S=Zye(w),O=wG(),E=UA(),D=M.useRef({}),N=M.useRef(0),R=(_.respectReducedMotion?E:!1)?1:p,L=lt({name:"Notifications",classes:iU,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,vars:u,varsResolver:g1e});M.useEffect(()=>{w==null||w.updateState(H=>({...H,limit:b||5,defaultPosition:h}))},[b,h]),Gl(()=>{S.notifications.length>N.current&&setTimeout(()=>O(),0),N.current=S.notifications.length},[S.notifications]);const Q=u1e(S.notifications,h),z=nU.reduce((H,P)=>(H[P]=Q[P].map(({style:F,...U})=>a.jsx(p1e,{timeout:R,onEnter:()=>D.current[U.id].offsetHeight,nodeRef:{current:D.current[U.id]},children:Z=>a.jsx(rU,{ref:G=>{G&&(D.current[U.id]=G)},data:U,onHide:G=>eU(G,w),autoClose:f,...L("notification",{style:{...d1e({state:Z,position:P,transitionDuration:R,maxHeight:v}),...F}})})},U.id)),H),{});return a.jsxs(Mh,{withinPortal:j,...A,children:[a.jsx(ve,{...L("root"),"data-position":"top-center",ref:e,...C,children:a.jsx(ah,{children:z["top-center"]})}),a.jsx(ve,{...L("root"),"data-position":"top-left",...C,children:a.jsx(ah,{children:z["top-left"]})}),a.jsx(ve,{...L("root",{className:pf.classNames.fullWidth}),"data-position":"top-right",...C,children:a.jsx(ah,{children:z["top-right"]})}),a.jsx(ve,{...L("root",{className:pf.classNames.fullWidth}),"data-position":"bottom-right",...C,children:a.jsx(ah,{children:z["bottom-right"]})}),a.jsx(ve,{...L("root"),"data-position":"bottom-left",...C,children:a.jsx(ah,{children:z["bottom-left"]})}),a.jsx(ve,{...L("root"),"data-position":"bottom-center",...C,children:a.jsx(ah,{children:z["bottom-center"]})})]})});du.classes=iU;du.displayName="@mantine/notifications/Notifications";du.show=nl.show;du.hide=nl.hide;du.update=nl.update;du.clean=nl.clean;du.cleanQueue=nl.cleanQueue;du.updateState=nl.updateState;function v1e(t){return t.replace(/[&<>"']/g,e=>{switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#039;"}})}function hk(t){return t.to-t.from+1}function sU(t,e){const n=t[e];let r=null;return e===0&&n.from!==0&&(r={from:0,to:n.from-1}),e>0&&(r={from:t[e-1].to+1,to:n.from-1}),r}function b1e(t,e){let n=0;for(let r=0;r<t.length;r++){const i=t[r],s=sU(t,r);s!==null&&(n=n-hk(s)/e),n=n+hk(i)**2}return n}class aU{constructor(e){this.conf={caseSensitive:(e==null?void 0:e.caseSensitive)===void 0?!1:e.caseSensitive,excludedChars:(e==null?void 0:e.excludedChars)===void 0?[]:e.excludedChars,includeMatches:(e==null?void 0:e.includeMatches)===void 0?!1:e.includeMatches,shouldSort:(e==null?void 0:e.shouldSort)===void 0?!1:e.shouldSort,shouldRender:(e==null?void 0:e.shouldRender)===void 0?!0:e.shouldRender,escapeHTML:(e==null?void 0:e.escapeHTML)===void 0?!1:e.escapeHTML,pre:(e==null?void 0:e.pre)===void 0?"":e.pre,post:(e==null?void 0:e.post)===void 0?"":e.post}}filter(e,n,r){const i=(r==null?void 0:r.shouldSort)!==void 0?r.shouldSort:this.conf.shouldSort;let s=[];for(let o=0;o<n.length;o++){const l=this.match(e,n[o],r);l!==null&&(l.index=o,s.push(l))}return i&&(s=s.sort((o,l)=>l.score-o.score)),s}match(e,n,r){let i=e,s=n;const o=(r==null?void 0:r.caseSensitive)!==void 0?r.caseSensitive:this.conf.caseSensitive,l=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,u=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender;if(o||(i=i.toLowerCase(),s=s.toLowerCase()),i===s){const m=[{from:0,to:e.length-1}],v={original:n,rendered:u?this.render(n,m,r):n,score:1/0};return l&&(v.intervals=m),v}let h=[],f=0;for(let m=0;m<s.length-i.length+1;m++)if(s[m]===i[0]){const v=this.generateMatchingInterval(i,s,m,r);if(v===null)break;v.score>f&&(f=v.score,h=v.intervals)}if(h.length===0)return null;const p={original:n,rendered:u?this.render(n,h,r):n,score:f};return l&&(p.intervals=h),p}render(e,n,r){if(n.length==0)return e;let i="";const s=r!=null&&r.pre?r.pre:this.conf.pre,o=r!=null&&r.post?r.post:this.conf.post;for(let u=0;u<n.length;u++){const h=n[u],f=sU(n,u);let p="";f!==null&&(p=this.extractSubString(e,f,r));const m=this.extractSubString(e,h,r);i=`${i}${p}${s}${m}${o}`}const l=n[n.length-1];return l.to<e.length-1&&(i=i+this.extractSubString(e,{from:l.to+1,to:e.length},r)),i}extractSubString(e,n,r){const i=(r==null?void 0:r.escapeHTML)!==void 0?r.escapeHTML:this.conf.escapeHTML;let s=e.substr(n.from,hk(n));return i&&(s=v1e(s)),s}generateMatchingInterval(e,n,r,i){let s=[];(i==null?void 0:i.excludedChars)!==void 0?s=i.excludedChars:this.conf.excludedChars!==void 0&&(s=this.conf.excludedChars);let o=0;const l=[];for(let u=r;u<n.length&&o<e.length;){if(s.includes(n[u])){u++;continue}if(s.includes(e[o])){o++;continue}if(n[u]===e[o]){const h={from:u,to:u};o++,u++;for(let f=u;f<n.length&&o<e.length&&n[f]===e[o];f++)h.to=f,o++,u=f;l.push(h)}u++}return l.length===0||o!==e.length?null:{score:b1e(l,n.length),intervals:l}}}const oU=new aU;function y1e(t,e,n){return oU.match(t,e,n)}function kP(t,e,n){return oU.render(t,e,n)}var Mo={},Do={},bp={},u_={},h_={},OP;function EP(){return OP||(OP=1,function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.fromCodePoint=void 0,t.replaceCodePoint=r,t.decodeCodePoint=i;const n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:s=>{let o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function r(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=n.get(s))!==null&&o!==void 0?o:s}function i(s){return(0,t.fromCodePoint)(r(s))}}(h_)),h_}var ug={},S1={},MP;function lU(){if(MP)return S1;MP=1,Object.defineProperty(S1,"__esModule",{value:!0}),S1.decodeBase64=t;function t(e){const n=typeof atob=="function"?atob(e):typeof Buffer.from=="function"?Buffer.from(e,"base64").toString("binary"):new Buffer(e,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let s=0,o=0;s<r;s+=2){const l=n.charCodeAt(s),u=n.charCodeAt(s+1);i[o++]=l|u<<8}return i}return S1}var DP;function RP(){if(DP)return ug;DP=1,Object.defineProperty(ug,"__esModule",{value:!0}),ug.htmlDecodeTree=void 0;const t=lU();return ug.htmlDecodeTree=(0,t.decodeBase64)(" "),ug}var hg={},NP;function PP(){if(NP)return hg;NP=1,Object.defineProperty(hg,"__esModule",{value:!0}),hg.xmlDecodeTree=void 0;const t=lU();return hg.xmlDecodeTree=(0,t.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),hg}var dg={},IP;function x1e(){if(IP)return dg;IP=1,Object.defineProperty(dg,"__esModule",{value:!0}),dg.BinTrieFlags=void 0;var t;return function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(t||(dg.BinTrieFlags=t={})),dg}var BP;function cU(){return BP||(BP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.xmlDecodeTree=t.htmlDecodeTree=t.replaceCodePoint=t.fromCodePoint=t.decodeCodePoint=t.EntityDecoder=t.DecodingMode=void 0,t.determineBranch=x,t.decodeHTML=j,t.decodeHTMLAttribute=C,t.decodeHTMLStrict=_,t.decodeXML=S;const e=EP(),n=RP(),r=PP(),i=x1e();var s;(function(N){N[N.NUM=35]="NUM",N[N.SEMI=59]="SEMI",N[N.EQUALS=61]="EQUALS",N[N.ZERO=48]="ZERO",N[N.NINE=57]="NINE",N[N.LOWER_A=97]="LOWER_A",N[N.LOWER_F=102]="LOWER_F",N[N.LOWER_X=120]="LOWER_X",N[N.LOWER_Z=122]="LOWER_Z",N[N.UPPER_A=65]="UPPER_A",N[N.UPPER_F=70]="UPPER_F",N[N.UPPER_Z=90]="UPPER_Z"})(s||(s={}));const o=32;function l(N){return N>=s.ZERO&&N<=s.NINE}function u(N){return N>=s.UPPER_A&&N<=s.UPPER_F||N>=s.LOWER_A&&N<=s.LOWER_F}function h(N){return N>=s.UPPER_A&&N<=s.UPPER_Z||N>=s.LOWER_A&&N<=s.LOWER_Z||l(N)}function f(N){return N===s.EQUALS||h(N)}var p;(function(N){N[N.EntityStart=0]="EntityStart",N[N.NumericStart=1]="NumericStart",N[N.NumericDecimal=2]="NumericDecimal",N[N.NumericHex=3]="NumericHex",N[N.NamedEntity=4]="NamedEntity"})(p||(p={}));var m;(function(N){N[N.Legacy=0]="Legacy",N[N.Strict=1]="Strict",N[N.Attribute=2]="Attribute"})(m||(t.DecodingMode=m={}));class v{constructor(I,R,L){this.decodeTree=I,this.emitCodePoint=R,this.errors=L,this.state=p.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=m.Strict,this.runConsumed=0}startEntity(I){this.decodeMode=I,this.state=p.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(I,R){switch(this.state){case p.EntityStart:return I.charCodeAt(R)===s.NUM?(this.state=p.NumericStart,this.consumed+=1,this.stateNumericStart(I,R+1)):(this.state=p.NamedEntity,this.stateNamedEntity(I,R));case p.NumericStart:return this.stateNumericStart(I,R);case p.NumericDecimal:return this.stateNumericDecimal(I,R);case p.NumericHex:return this.stateNumericHex(I,R);case p.NamedEntity:return this.stateNamedEntity(I,R)}}stateNumericStart(I,R){return R>=I.length?-1:(I.charCodeAt(R)|o)===s.LOWER_X?(this.state=p.NumericHex,this.consumed+=1,this.stateNumericHex(I,R+1)):(this.state=p.NumericDecimal,this.stateNumericDecimal(I,R))}stateNumericHex(I,R){for(;R<I.length;){const L=I.charCodeAt(R);if(l(L)||u(L)){const Q=L<=s.NINE?L-s.ZERO:(L|o)-s.LOWER_A+10;this.result=this.result*16+Q,this.consumed++,R++}else return this.emitNumericEntity(L,3)}return-1}stateNumericDecimal(I,R){for(;R<I.length;){const L=I.charCodeAt(R);if(l(L))this.result=this.result*10+(L-s.ZERO),this.consumed++,R++;else return this.emitNumericEntity(L,2)}return-1}emitNumericEntity(I,R){var L;if(this.consumed<=R)return(L=this.errors)===null||L===void 0||L.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(I===s.SEMI)this.consumed+=1;else if(this.decodeMode===m.Strict)return 0;return this.emitCodePoint((0,e.replaceCodePoint)(this.result),this.consumed),this.errors&&(I!==s.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(I,R){const{decodeTree:L}=this;let Q=L[this.treeIndex],z=(Q&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;R<I.length;){if(z===0&&(Q&i.BinTrieFlags.FLAG13)!==0){const P=(Q&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const F=Q&i.BinTrieFlags.JUMP_TABLE;if(I.charCodeAt(R)!==F)return this.result===0?0:this.emitNotTerminatedNamedEntity();R++,this.excess++,this.runConsumed++}for(;this.runConsumed<P;){if(R>=I.length)return-1;const F=this.runConsumed-1,U=L[this.treeIndex+1+(F>>1)],Z=F%2===0?U&255:U>>8&255;if(I.charCodeAt(R)!==Z)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();R++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(P>>1),Q=L[this.treeIndex],z=(Q&i.BinTrieFlags.VALUE_LENGTH)>>14}if(R>=I.length)break;const H=I.charCodeAt(R);if(H===s.SEMI&&z!==0&&(Q&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,z,this.consumed+this.excess);if(this.treeIndex=x(L,Q,this.treeIndex+Math.max(1,z),H),this.treeIndex<0)return this.result===0||this.decodeMode===m.Attribute&&(z===0||f(H))?0:this.emitNotTerminatedNamedEntity();if(Q=L[this.treeIndex],z=(Q&i.BinTrieFlags.VALUE_LENGTH)>>14,z!==0){if(H===s.SEMI)return this.emitNamedEntityData(this.treeIndex,z,this.consumed+this.excess);this.decodeMode!==m.Strict&&(Q&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}R++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var I;const{result:R,decodeTree:L}=this,Q=(L[R]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(R,Q,this.consumed),(I=this.errors)===null||I===void 0||I.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(I,R,L){const{decodeTree:Q}=this;return this.emitCodePoint(R===1?Q[I]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):Q[I+1],L),R===3&&this.emitCodePoint(Q[I+2],L),L}end(){var I;switch(this.state){case p.NamedEntity:return this.result!==0&&(this.decodeMode!==m.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case p.NumericDecimal:return this.emitNumericEntity(0,2);case p.NumericHex:return this.emitNumericEntity(0,3);case p.NumericStart:return(I=this.errors)===null||I===void 0||I.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case p.EntityStart:return 0}}}t.EntityDecoder=v;function b(N){let I="";const R=new v(N,L=>I+=(0,e.fromCodePoint)(L));return function(Q,z){let H=0,P=0;for(;(P=Q.indexOf("&",P))>=0;){I+=Q.slice(H,P),R.startEntity(z);const U=R.write(Q,P+1);if(U<0){H=P+R.end();break}H=P+U,P=U===0?H+1:H}const F=I+Q.slice(H);return I="",F}}function x(N,I,R,L){const Q=(I&i.BinTrieFlags.BRANCH_LENGTH)>>7,z=I&i.BinTrieFlags.JUMP_TABLE;if(Q===0)return z!==0&&L===z?R:-1;if(z){const U=L-z;return U<0||U>=Q?-1:N[R+U]-1}const H=Q+1>>1;let P=0,F=Q-1;for(;P<=F;){const U=P+F>>>1,Z=U>>1,W=N[R+Z]>>(U&1)*8&255;if(W<L)P=U+1;else if(W>L)F=U-1;else return N[R+H+U]}return-1}const w=b(n.htmlDecodeTree),A=b(r.xmlDecodeTree);function j(N,I=m.Legacy){return w(N,I)}function C(N){return w(N,m.Attribute)}function _(N){return w(N,m.Strict)}function S(N){return A(N,m.Strict)}var O=EP();Object.defineProperty(t,"decodeCodePoint",{enumerable:!0,get:function(){return O.decodeCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return O.fromCodePoint}}),Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return O.replaceCodePoint}});var E=RP();Object.defineProperty(t,"htmlDecodeTree",{enumerable:!0,get:function(){return E.htmlDecodeTree}});var D=PP();Object.defineProperty(t,"xmlDecodeTree",{enumerable:!0,get:function(){return D.xmlDecodeTree}})}(u_)),u_}var LP;function uU(){if(LP)return bp;LP=1,Object.defineProperty(bp,"__esModule",{value:!0}),bp.QuoteType=void 0;const t=cU();var e;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(e||(e={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.BeforeSpecialT=23]="BeforeSpecialT",h[h.SpecialStartSequence=24]="SpecialStartSequence",h[h.InSpecialTag=25]="InSpecialTag",h[h.InEntity=26]="InEntity"})(n||(n={}));function r(h){return h===e.Space||h===e.NewLine||h===e.Tab||h===e.FormFeed||h===e.CarriageReturn}function i(h){return h===e.Slash||h===e.Gt||r(h)}function s(h){return h>=e.LowerA&&h<=e.LowerZ||h>=e.UpperA&&h<=e.UpperZ}var o;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(o||(bp.QuoteType=o={}));const l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};let u=class{constructor({xmlMode:f=!1,decodeEntities:p=!0},m){this.cbs=m,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=f,this.decodeEntities=p,this.entityDecoder=new t.EntityDecoder(f?t.xmlDecodeTree:t.htmlDecodeTree,(v,b)=>this.emitCodePoint(v,b))}reset(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(f){f===e.Lt||!this.decodeEntities&&this.fastForwardTo(e.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateSpecialStartSequence(f){const p=this.sequenceIndex===this.currentSequence.length;if(!(p?i(f):(f|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!p){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(f)}stateInSpecialTag(f){if(this.sequenceIndex===this.currentSequence.length){if(f===e.Gt||r(f)){const p=this.index-this.currentSequence.length;if(this.sectionStart<p){const m=this.index;this.index=p,this.cbs.ontext(this.sectionStart,p),this.index=m}this.isSpecial=!1,this.sectionStart=p+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}(f|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===l.TitleEnd?this.decodeEntities&&f===e.Amp&&this.startEntity():this.fastForwardTo(e.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(f===e.Lt)}stateCDATASequence(f){f===l.Cdata[this.sequenceIndex]?++this.sequenceIndex===l.Cdata.length&&(this.state=n.InCommentLike,this.currentSequence=l.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=n.InDeclaration,this.stateInDeclaration(f))}fastForwardTo(f){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(f){f===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=n.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):f!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(f){return this.xmlMode?!i(f):s(f)}startSpecial(f,p){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=p,this.state=n.SpecialStartSequence}stateBeforeTagName(f){if(f===e.ExclamationMark)this.state=n.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===e.Questionmark)this.state=n.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){const p=f|32;this.sectionStart=this.index,this.xmlMode?this.state=n.InTagName:p===l.ScriptEnd[2]?this.state=n.BeforeSpecialS:p===l.TitleEnd[2]||p===l.XmpEnd[2]?this.state=n.BeforeSpecialT:this.state=n.InTagName}else f===e.Slash?this.state=n.BeforeClosingTagName:(this.state=n.Text,this.stateText(f))}stateInTagName(f){i(f)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))}stateBeforeClosingTagName(f){r(f)||(f===e.Gt?this.state=n.Text:(this.state=this.isTagStartChar(f)?n.InClosingTagName:n.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(f){(f===e.Gt||r(f))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterClosingTagName,this.stateAfterClosingTagName(f))}stateAfterClosingTagName(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(f){f===e.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=n.InSpecialTag,this.sequenceIndex=0):this.state=n.Text,this.sectionStart=this.index+1):f===e.Slash?this.state=n.InSelfClosingTag:r(f)||(this.state=n.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(f){f===e.Gt?(this.cbs.onselfclosingtag(this.index),this.state=n.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(f)||(this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))}stateInAttributeName(f){(f===e.Eq||i(f))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=n.AfterAttributeName,this.stateAfterAttributeName(f))}stateAfterAttributeName(f){f===e.Eq?this.state=n.BeforeAttributeValue:f===e.Slash||f===e.Gt?(this.cbs.onattribend(o.NoValue,this.sectionStart),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):r(f)||(this.cbs.onattribend(o.NoValue,this.sectionStart),this.state=n.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(f){f===e.DoubleQuote?(this.state=n.InAttributeValueDq,this.sectionStart=this.index+1):f===e.SingleQuote?(this.state=n.InAttributeValueSq,this.sectionStart=this.index+1):r(f)||(this.sectionStart=this.index,this.state=n.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f))}handleInAttributeValue(f,p){f===p||!this.decodeEntities&&this.fastForwardTo(p)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(p===e.DoubleQuote?o.Double:o.Single,this.index+1),this.state=n.BeforeAttributeName):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(f){this.handleInAttributeValue(f,e.DoubleQuote)}stateInAttributeValueSingleQuotes(f){this.handleInAttributeValue(f,e.SingleQuote)}stateInAttributeValueNoQuotes(f){r(f)||f===e.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o.Unquoted,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateBeforeDeclaration(f){f===e.OpeningSquareBracket?(this.state=n.CDATASequence,this.sequenceIndex=0):this.state=f===e.Dash?n.BeforeComment:n.InDeclaration}stateInDeclaration(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeComment(f){f===e.Dash?(this.state=n.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=n.InDeclaration}stateInSpecialComment(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(f){const p=f|32;p===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):p===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=n.InTagName,this.stateInTagName(f))}stateBeforeSpecialT(f){switch(f|32){case l.TitleEnd[3]:{this.startSpecial(l.TitleEnd,4);break}case l.TextareaEnd[3]:{this.startSpecial(l.TextareaEnd,4);break}case l.XmpEnd[3]:{this.startSpecial(l.XmpEnd,4);break}default:this.state=n.InTagName,this.stateInTagName(f)}}startEntity(){this.baseState=this.state,this.state=n.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?t.DecodingMode.Strict:this.baseState===n.Text||this.baseState===n.InSpecialTag?t.DecodingMode.Legacy:t.DecodingMode.Attribute)}stateInEntity(){const f=this.index-this.offset,p=this.entityDecoder.write(this.buffer,f);if(p>=0)this.state=this.baseState,p===0&&(this.index-=1);else{if(f<this.buffer.length&&this.buffer.charCodeAt(f)===e.Amp){this.state=this.baseState,this.index-=1;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case n.Text:{this.stateText(f);break}case n.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case n.InSpecialTag:{this.stateInSpecialTag(f);break}case n.CDATASequence:{this.stateCDATASequence(f);break}case n.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case n.InAttributeName:{this.stateInAttributeName(f);break}case n.InCommentLike:{this.stateInCommentLike(f);break}case n.InSpecialComment:{this.stateInSpecialComment(f);break}case n.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case n.InTagName:{this.stateInTagName(f);break}case n.InClosingTagName:{this.stateInClosingTagName(f);break}case n.BeforeTagName:{this.stateBeforeTagName(f);break}case n.AfterAttributeName:{this.stateAfterAttributeName(f);break}case n.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case n.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case n.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case n.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case n.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case n.BeforeSpecialT:{this.stateBeforeSpecialT(f);break}case n.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case n.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case n.InDeclaration:{this.stateInDeclaration(f);break}case n.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case n.BeforeComment:{this.stateBeforeComment(f);break}case n.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case n.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===n.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const f=this.buffer.length+this.offset;this.sectionStart>=f||(this.state===n.InCommentLike?this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,f,0):this.cbs.oncomment(this.sectionStart,f,0):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,f))}emitCodePoint(f,p){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+p,this.index=this.sectionStart-1,this.cbs.onattribentity(f)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+p,this.index=this.sectionStart-1,this.cbs.ontextentity(f,this.sectionStart))}};return bp.default=u,bp}var FP;function HP(){if(FP)return Do;FP=1;var t=Do&&Do.__createBinding||(Object.create?function(w,A,j,C){C===void 0&&(C=j);var _=Object.getOwnPropertyDescriptor(A,j);(!_||("get"in _?!A.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return A[j]}}),Object.defineProperty(w,C,_)}:function(w,A,j,C){C===void 0&&(C=j),w[C]=A[j]}),e=Do&&Do.__setModuleDefault||(Object.create?function(w,A){Object.defineProperty(w,"default",{enumerable:!0,value:A})}:function(w,A){w.default=A}),n=Do&&Do.__importStar||function(){var w=function(A){return w=Object.getOwnPropertyNames||function(j){var C=[];for(var _ in j)Object.prototype.hasOwnProperty.call(j,_)&&(C[C.length]=_);return C},w(A)};return function(A){if(A&&A.__esModule)return A;var j={};if(A!=null)for(var C=w(A),_=0;_<C.length;_++)C[_]!=="default"&&t(j,A,C[_]);return e(j,A),j}}();Object.defineProperty(Do,"__esModule",{value:!0}),Do.Parser=void 0;const r=n(uU()),i=cU(),s=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),l=new Set(["thead","tbody"]),u=new Set(["dd","dt"]),h=new Set(["rt","rp"]),f=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",o],["h1",o],["h2",o],["h3",o],["h4",o],["h5",o],["h6",o],["select",s],["input",s],["output",s],["button",s],["datalist",s],["textarea",s],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",u],["dt",u],["address",o],["article",o],["aside",o],["blockquote",o],["details",o],["div",o],["dl",o],["fieldset",o],["figcaption",o],["figure",o],["footer",o],["form",o],["header",o],["hr",o],["main",o],["nav",o],["ol",o],["pre",o],["section",o],["table",o],["ul",o],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),m=new Set(["math","svg"]),v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),b=/\s|\//;let x=class{constructor(A,j={}){var C,_,S,O,E,D;this.options=j,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=A??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(C=j.lowerCaseTags)!==null&&C!==void 0?C:this.htmlMode,this.lowerCaseAttributeNames=(_=j.lowerCaseAttributeNames)!==null&&_!==void 0?_:this.htmlMode,this.recognizeSelfClosing=(S=j.recognizeSelfClosing)!==null&&S!==void 0?S:!this.htmlMode,this.tokenizer=new((O=j.Tokenizer)!==null&&O!==void 0?O:r.default)(this.options,this),this.foreignContext=[!this.htmlMode],(D=(E=this.cbs).onparserinit)===null||D===void 0||D.call(E,this)}ontext(A,j){var C,_;const S=this.getSlice(A,j);this.endIndex=j-1,(_=(C=this.cbs).ontext)===null||_===void 0||_.call(C,S),this.startIndex=j}ontextentity(A,j){var C,_;this.endIndex=j-1,(_=(C=this.cbs).ontext)===null||_===void 0||_.call(C,(0,i.fromCodePoint)(A)),this.startIndex=j}isVoidElement(A){return this.htmlMode&&p.has(A)}onopentagname(A,j){this.endIndex=j;let C=this.getSlice(A,j);this.lowerCaseTagNames&&(C=C.toLowerCase()),this.emitOpenTag(C)}emitOpenTag(A){var j,C,_,S;this.openTagStart=this.startIndex,this.tagname=A;const O=this.htmlMode&&f.get(A);if(O)for(;this.stack.length>0&&O.has(this.stack[0]);){const E=this.stack.shift();(C=(j=this.cbs).onclosetag)===null||C===void 0||C.call(j,E,!0)}this.isVoidElement(A)||(this.stack.unshift(A),this.htmlMode&&(m.has(A)?this.foreignContext.unshift(!0):v.has(A)&&this.foreignContext.unshift(!1))),(S=(_=this.cbs).onopentagname)===null||S===void 0||S.call(_,A),this.cbs.onopentag&&(this.attribs={})}endOpenTag(A){var j,C;this.startIndex=this.openTagStart,this.attribs&&((C=(j=this.cbs).onopentag)===null||C===void 0||C.call(j,this.tagname,this.attribs,A),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(A){this.endIndex=A,this.endOpenTag(!1),this.startIndex=A+1}onclosetag(A,j){var C,_,S,O,E,D,N,I;this.endIndex=j;let R=this.getSlice(A,j);if(this.lowerCaseTagNames&&(R=R.toLowerCase()),this.htmlMode&&(m.has(R)||v.has(R))&&this.foreignContext.shift(),this.isVoidElement(R))this.htmlMode&&R==="br"&&((O=(S=this.cbs).onopentagname)===null||O===void 0||O.call(S,"br"),(D=(E=this.cbs).onopentag)===null||D===void 0||D.call(E,"br",{},!0),(I=(N=this.cbs).onclosetag)===null||I===void 0||I.call(N,"br",!1));else{const L=this.stack.indexOf(R);if(L!==-1)for(let Q=0;Q<=L;Q++){const z=this.stack.shift();(_=(C=this.cbs).onclosetag)===null||_===void 0||_.call(C,z,Q!==L)}else this.htmlMode&&R==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=j+1}onselfclosingtag(A){this.endIndex=A,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=A+1):this.onopentagend(A)}closeCurrentTag(A){var j,C;const _=this.tagname;this.endOpenTag(A),this.stack[0]===_&&((C=(j=this.cbs).onclosetag)===null||C===void 0||C.call(j,_,!A),this.stack.shift())}onattribname(A,j){this.startIndex=A;const C=this.getSlice(A,j);this.attribname=this.lowerCaseAttributeNames?C.toLowerCase():C}onattribdata(A,j){this.attribvalue+=this.getSlice(A,j)}onattribentity(A){this.attribvalue+=(0,i.fromCodePoint)(A)}onattribend(A,j){var C,_;this.endIndex=j,(_=(C=this.cbs).onattribute)===null||_===void 0||_.call(C,this.attribname,this.attribvalue,A===r.QuoteType.Double?'"':A===r.QuoteType.Single?"'":A===r.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(A){const j=A.search(b);let C=j<0?A:A.substr(0,j);return this.lowerCaseTagNames&&(C=C.toLowerCase()),C}ondeclaration(A,j){this.endIndex=j;const C=this.getSlice(A,j);if(this.cbs.onprocessinginstruction){const _=this.getInstructionName(C);this.cbs.onprocessinginstruction(`!${_}`,`!${C}`)}this.startIndex=j+1}onprocessinginstruction(A,j){this.endIndex=j;const C=this.getSlice(A,j);if(this.cbs.onprocessinginstruction){const _=this.getInstructionName(C);this.cbs.onprocessinginstruction(`?${_}`,`?${C}`)}this.startIndex=j+1}oncomment(A,j,C){var _,S,O,E;this.endIndex=j,(S=(_=this.cbs).oncomment)===null||S===void 0||S.call(_,this.getSlice(A,j-C)),(E=(O=this.cbs).oncommentend)===null||E===void 0||E.call(O),this.startIndex=j+1}oncdata(A,j,C){var _,S,O,E,D,N,I,R,L,Q;this.endIndex=j;const z=this.getSlice(A,j-C);!this.htmlMode||this.options.recognizeCDATA?((S=(_=this.cbs).oncdatastart)===null||S===void 0||S.call(_),(E=(O=this.cbs).ontext)===null||E===void 0||E.call(O,z),(N=(D=this.cbs).oncdataend)===null||N===void 0||N.call(D)):((R=(I=this.cbs).oncomment)===null||R===void 0||R.call(I,`[CDATA[${z}]]`),(Q=(L=this.cbs).oncommentend)===null||Q===void 0||Q.call(L)),this.startIndex=j+1}onend(){var A,j;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let C=0;C<this.stack.length;C++)this.cbs.onclosetag(this.stack[C],!0)}(j=(A=this.cbs).onend)===null||j===void 0||j.call(A)}reset(){var A,j,C,_;(j=(A=this.cbs).onreset)===null||j===void 0||j.call(A),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(_=(C=this.cbs).onparserinit)===null||_===void 0||_.call(C,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(A){this.reset(),this.end(A)}getSlice(A,j){for(;A-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let C=this.buffers[0].slice(A-this.bufferOffset,j-this.bufferOffset);for(;j-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),C+=this.buffers[0].slice(0,j-this.bufferOffset);return C}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(A){var j,C;if(this.ended){(C=(j=this.cbs).onerror)===null||C===void 0||C.call(j,new Error(".write() after done!"));return}this.buffers.push(A),this.tokenizer.running&&(this.tokenizer.write(A),this.writeIndex++)}end(A){var j,C;if(this.ended){(C=(j=this.cbs).onerror)===null||C===void 0||C.call(j,new Error(".end() after done!"));return}A&&this.write(A),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(A){this.write(A)}done(A){this.end(A)}};return Do.Parser=x,Do}var Td={},d_={},zP;function xb(){return zP||(zP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype}(d_)),d_}var rn={},qP;function $P(){if(qP)return rn;qP=1;var t=rn&&rn.__extends||function(){var S=function(O,E){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,N){D.__proto__=N}||function(D,N){for(var I in N)Object.prototype.hasOwnProperty.call(N,I)&&(D[I]=N[I])},S(O,E)};return function(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");S(O,E);function D(){this.constructor=O}O.prototype=E===null?Object.create(E):(D.prototype=E.prototype,new D)}}(),e=rn&&rn.__assign||function(){return e=Object.assign||function(S){for(var O,E=1,D=arguments.length;E<D;E++){O=arguments[E];for(var N in O)Object.prototype.hasOwnProperty.call(O,N)&&(S[N]=O[N])}return S},e.apply(this,arguments)};Object.defineProperty(rn,"__esModule",{value:!0}),rn.cloneNode=rn.hasChildren=rn.isDocument=rn.isDirective=rn.isComment=rn.isText=rn.isCDATA=rn.isTag=rn.Element=rn.Document=rn.CDATA=rn.NodeWithChildren=rn.ProcessingInstruction=rn.Comment=rn.Text=rn.DataNode=rn.Node=void 0;var n=xb(),r=function(){function S(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent},set:function(O){this.parent=O},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){return this.prev},set:function(O){this.prev=O},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){return this.next},set:function(O){this.next=O},enumerable:!1,configurable:!0}),S.prototype.cloneNode=function(O){return O===void 0&&(O=!1),C(this,O)},S}();rn.Node=r;var i=function(S){t(O,S);function O(E){var D=S.call(this)||this;return D.data=E,D}return Object.defineProperty(O.prototype,"nodeValue",{get:function(){return this.data},set:function(E){this.data=E},enumerable:!1,configurable:!0}),O}(r);rn.DataNode=i;var s=function(S){t(O,S);function O(){var E=S!==null&&S.apply(this,arguments)||this;return E.type=n.ElementType.Text,E}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),O}(i);rn.Text=s;var o=function(S){t(O,S);function O(){var E=S!==null&&S.apply(this,arguments)||this;return E.type=n.ElementType.Comment,E}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),O}(i);rn.Comment=o;var l=function(S){t(O,S);function O(E,D){var N=S.call(this,D)||this;return N.name=E,N.type=n.ElementType.Directive,N}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),O}(i);rn.ProcessingInstruction=l;var u=function(S){t(O,S);function O(E){var D=S.call(this)||this;return D.children=E,D}return Object.defineProperty(O.prototype,"firstChild",{get:function(){var E;return(E=this.children[0])!==null&&E!==void 0?E:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"childNodes",{get:function(){return this.children},set:function(E){this.children=E},enumerable:!1,configurable:!0}),O}(r);rn.NodeWithChildren=u;var h=function(S){t(O,S);function O(){var E=S!==null&&S.apply(this,arguments)||this;return E.type=n.ElementType.CDATA,E}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),O}(u);rn.CDATA=h;var f=function(S){t(O,S);function O(){var E=S!==null&&S.apply(this,arguments)||this;return E.type=n.ElementType.Root,E}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),O}(u);rn.Document=f;var p=function(S){t(O,S);function O(E,D,N,I){N===void 0&&(N=[]),I===void 0&&(I=E==="script"?n.ElementType.Script:E==="style"?n.ElementType.Style:n.ElementType.Tag);var R=S.call(this,N)||this;return R.name=E,R.attribs=D,R.type=I,R}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"tagName",{get:function(){return this.name},set:function(E){this.name=E},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"attributes",{get:function(){var E=this;return Object.keys(this.attribs).map(function(D){var N,I;return{name:D,value:E.attribs[D],namespace:(N=E["x-attribsNamespace"])===null||N===void 0?void 0:N[D],prefix:(I=E["x-attribsPrefix"])===null||I===void 0?void 0:I[D]}})},enumerable:!1,configurable:!0}),O}(u);rn.Element=p;function m(S){return(0,n.isTag)(S)}rn.isTag=m;function v(S){return S.type===n.ElementType.CDATA}rn.isCDATA=v;function b(S){return S.type===n.ElementType.Text}rn.isText=b;function x(S){return S.type===n.ElementType.Comment}rn.isComment=x;function w(S){return S.type===n.ElementType.Directive}rn.isDirective=w;function A(S){return S.type===n.ElementType.Root}rn.isDocument=A;function j(S){return Object.prototype.hasOwnProperty.call(S,"children")}rn.hasChildren=j;function C(S,O){O===void 0&&(O=!1);var E;if(b(S))E=new s(S.data);else if(x(S))E=new o(S.data);else if(m(S)){var D=O?_(S.children):[],N=new p(S.name,e({},S.attribs),D);D.forEach(function(Q){return Q.parent=N}),S.namespace!=null&&(N.namespace=S.namespace),S["x-attribsNamespace"]&&(N["x-attribsNamespace"]=e({},S["x-attribsNamespace"])),S["x-attribsPrefix"]&&(N["x-attribsPrefix"]=e({},S["x-attribsPrefix"])),E=N}else if(v(S)){var D=O?_(S.children):[],I=new h(D);D.forEach(function(z){return z.parent=I}),E=I}else if(A(S)){var D=O?_(S.children):[],R=new f(D);D.forEach(function(z){return z.parent=R}),S["x-mode"]&&(R["x-mode"]=S["x-mode"]),E=R}else if(w(S)){var L=new l(S.name,S.data);S["x-name"]!=null&&(L["x-name"]=S["x-name"],L["x-publicId"]=S["x-publicId"],L["x-systemId"]=S["x-systemId"]),E=L}else throw new Error("Not implemented yet: ".concat(S.type));return E.startIndex=S.startIndex,E.endIndex=S.endIndex,S.sourceCodeLocation!=null&&(E.sourceCodeLocation=S.sourceCodeLocation),E}rn.cloneNode=C;function _(S){for(var O=S.map(function(D){return C(D,!0)}),E=1;E<O.length;E++)O[E].prev=O[E-1],O[E-1].next=O[E];return O}return rn}var QP;function qh(){return QP||(QP=1,function(t){var e=Td&&Td.__createBinding||(Object.create?function(l,u,h,f){f===void 0&&(f=h);var p=Object.getOwnPropertyDescriptor(u,h);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[h]}}),Object.defineProperty(l,f,p)}:function(l,u,h,f){f===void 0&&(f=h),l[f]=u[h]}),n=Td&&Td.__exportStar||function(l,u){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(u,h)&&e(u,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=xb(),i=$P();n($P(),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function l(u,h,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof h=="function"&&(f=h,h=s),typeof u=="object"&&(h=u,u=void 0),this.callback=u??null,this.options=h??s,this.elementCB=f??null}return l.prototype.onparserinit=function(u){this.parser=u},l.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(u){this.handleCallback(u)},l.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},l.prototype.onopentag=function(u,h){var f=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,h,void 0,f);this.addNode(p),this.tagStack.push(p)},l.prototype.ontext=function(u){var h=this.lastNode;if(h&&h.type===r.ElementType.Text)h.data+=u,this.options.withEndIndices&&(h.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},l.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var h=new i.Comment(u);this.addNode(h),this.lastNode=h},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var u=new i.Text(""),h=new i.CDATA([u]);this.addNode(h),u.parent=h,this.lastNode=u},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(u,h){var f=new i.ProcessingInstruction(u,h);this.addNode(f)},l.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},l.prototype.addNode=function(u){var h=this.tagStack[this.tagStack.length-1],f=h.children[h.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),h.children.push(u),f&&(u.prev=f,f.next=u),u.parent=h,this.lastNode=null},l}();t.DomHandler=o,t.default=o}(Td)),Td}var kd={},Cl={},ea={},f_={},Ro={},j1={},UP;function A1e(){return UP||(UP=1,Object.defineProperty(j1,"__esModule",{value:!0}),j1.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(t){return t.charCodeAt(0)}))),j1}var C1={},WP;function w1e(){return WP||(WP=1,Object.defineProperty(C1,"__esModule",{value:!0}),C1.default=new Uint16Array("Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t){return t.charCodeAt(0)}))),C1}var p_={},VP;function YP(){return VP||(VP=1,function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function r(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=n.get(s))!==null&&o!==void 0?o:s}t.replaceCodePoint=r;function i(s){return(0,t.fromCodePoint)(r(s))}t.default=i}(p_)),p_}var GP;function XP(){return GP||(GP=1,function(t){var e=Ro&&Ro.__createBinding||(Object.create?function(R,L,Q,z){z===void 0&&(z=Q);var H=Object.getOwnPropertyDescriptor(L,Q);(!H||("get"in H?!L.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return L[Q]}}),Object.defineProperty(R,z,H)}:function(R,L,Q,z){z===void 0&&(z=Q),R[z]=L[Q]}),n=Ro&&Ro.__setModuleDefault||(Object.create?function(R,L){Object.defineProperty(R,"default",{enumerable:!0,value:L})}:function(R,L){R.default=L}),r=Ro&&Ro.__importStar||function(R){if(R&&R.__esModule)return R;var L={};if(R!=null)for(var Q in R)Q!=="default"&&Object.prototype.hasOwnProperty.call(R,Q)&&e(L,R,Q);return n(L,R),L},i=Ro&&Ro.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=i(A1e());t.htmlDecodeTree=s.default;var o=i(w1e());t.xmlDecodeTree=o.default;var l=r(YP());t.decodeCodePoint=l.default;var u=YP();Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var h;(function(R){R[R.NUM=35]="NUM",R[R.SEMI=59]="SEMI",R[R.EQUALS=61]="EQUALS",R[R.ZERO=48]="ZERO",R[R.NINE=57]="NINE",R[R.LOWER_A=97]="LOWER_A",R[R.LOWER_F=102]="LOWER_F",R[R.LOWER_X=120]="LOWER_X",R[R.LOWER_Z=122]="LOWER_Z",R[R.UPPER_A=65]="UPPER_A",R[R.UPPER_F=70]="UPPER_F",R[R.UPPER_Z=90]="UPPER_Z"})(h||(h={}));var f=32,p;(function(R){R[R.VALUE_LENGTH=49152]="VALUE_LENGTH",R[R.BRANCH_LENGTH=16256]="BRANCH_LENGTH",R[R.JUMP_TABLE=127]="JUMP_TABLE"})(p=t.BinTrieFlags||(t.BinTrieFlags={}));function m(R){return R>=h.ZERO&&R<=h.NINE}function v(R){return R>=h.UPPER_A&&R<=h.UPPER_F||R>=h.LOWER_A&&R<=h.LOWER_F}function b(R){return R>=h.UPPER_A&&R<=h.UPPER_Z||R>=h.LOWER_A&&R<=h.LOWER_Z||m(R)}function x(R){return R===h.EQUALS||b(R)}var w;(function(R){R[R.EntityStart=0]="EntityStart",R[R.NumericStart=1]="NumericStart",R[R.NumericDecimal=2]="NumericDecimal",R[R.NumericHex=3]="NumericHex",R[R.NamedEntity=4]="NamedEntity"})(w||(w={}));var A;(function(R){R[R.Legacy=0]="Legacy",R[R.Strict=1]="Strict",R[R.Attribute=2]="Attribute"})(A=t.DecodingMode||(t.DecodingMode={}));var j=function(){function R(L,Q,z){this.decodeTree=L,this.emitCodePoint=Q,this.errors=z,this.state=w.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=A.Strict}return R.prototype.startEntity=function(L){this.decodeMode=L,this.state=w.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},R.prototype.write=function(L,Q){switch(this.state){case w.EntityStart:return L.charCodeAt(Q)===h.NUM?(this.state=w.NumericStart,this.consumed+=1,this.stateNumericStart(L,Q+1)):(this.state=w.NamedEntity,this.stateNamedEntity(L,Q));case w.NumericStart:return this.stateNumericStart(L,Q);case w.NumericDecimal:return this.stateNumericDecimal(L,Q);case w.NumericHex:return this.stateNumericHex(L,Q);case w.NamedEntity:return this.stateNamedEntity(L,Q)}},R.prototype.stateNumericStart=function(L,Q){return Q>=L.length?-1:(L.charCodeAt(Q)|f)===h.LOWER_X?(this.state=w.NumericHex,this.consumed+=1,this.stateNumericHex(L,Q+1)):(this.state=w.NumericDecimal,this.stateNumericDecimal(L,Q))},R.prototype.addToNumericResult=function(L,Q,z,H){if(Q!==z){var P=z-Q;this.result=this.result*Math.pow(H,P)+parseInt(L.substr(Q,P),H),this.consumed+=P}},R.prototype.stateNumericHex=function(L,Q){for(var z=Q;Q<L.length;){var H=L.charCodeAt(Q);if(m(H)||v(H))Q+=1;else return this.addToNumericResult(L,z,Q,16),this.emitNumericEntity(H,3)}return this.addToNumericResult(L,z,Q,16),-1},R.prototype.stateNumericDecimal=function(L,Q){for(var z=Q;Q<L.length;){var H=L.charCodeAt(Q);if(m(H))Q+=1;else return this.addToNumericResult(L,z,Q,10),this.emitNumericEntity(H,2)}return this.addToNumericResult(L,z,Q,10),-1},R.prototype.emitNumericEntity=function(L,Q){var z;if(this.consumed<=Q)return(z=this.errors)===null||z===void 0||z.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(L===h.SEMI)this.consumed+=1;else if(this.decodeMode===A.Strict)return 0;return this.emitCodePoint((0,l.replaceCodePoint)(this.result),this.consumed),this.errors&&(L!==h.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},R.prototype.stateNamedEntity=function(L,Q){for(var z=this.decodeTree,H=z[this.treeIndex],P=(H&p.VALUE_LENGTH)>>14;Q<L.length;Q++,this.excess++){var F=L.charCodeAt(Q);if(this.treeIndex=_(z,H,this.treeIndex+Math.max(1,P),F),this.treeIndex<0)return this.result===0||this.decodeMode===A.Attribute&&(P===0||x(F))?0:this.emitNotTerminatedNamedEntity();if(H=z[this.treeIndex],P=(H&p.VALUE_LENGTH)>>14,P!==0){if(F===h.SEMI)return this.emitNamedEntityData(this.treeIndex,P,this.consumed+this.excess);this.decodeMode!==A.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},R.prototype.emitNotTerminatedNamedEntity=function(){var L,Q=this,z=Q.result,H=Q.decodeTree,P=(H[z]&p.VALUE_LENGTH)>>14;return this.emitNamedEntityData(z,P,this.consumed),(L=this.errors)===null||L===void 0||L.missingSemicolonAfterCharacterReference(),this.consumed},R.prototype.emitNamedEntityData=function(L,Q,z){var H=this.decodeTree;return this.emitCodePoint(Q===1?H[L]&~p.VALUE_LENGTH:H[L+1],z),Q===3&&this.emitCodePoint(H[L+2],z),z},R.prototype.end=function(){var L;switch(this.state){case w.NamedEntity:return this.result!==0&&(this.decodeMode!==A.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case w.NumericDecimal:return this.emitNumericEntity(0,2);case w.NumericHex:return this.emitNumericEntity(0,3);case w.NumericStart:return(L=this.errors)===null||L===void 0||L.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case w.EntityStart:return 0}},R}();t.EntityDecoder=j;function C(R){var L="",Q=new j(R,function(z){return L+=(0,l.fromCodePoint)(z)});return function(H,P){for(var F=0,U=0;(U=H.indexOf("&",U))>=0;){L+=H.slice(F,U),Q.startEntity(P);var Z=Q.write(H,U+1);if(Z<0){F=U+Q.end();break}F=U+Z,U=Z===0?F+1:F}var G=L+H.slice(F);return L="",G}}function _(R,L,Q,z){var H=(L&p.BRANCH_LENGTH)>>7,P=L&p.JUMP_TABLE;if(H===0)return P!==0&&z===P?Q:-1;if(P){var F=z-P;return F<0||F>=H?-1:R[Q+F]-1}for(var U=Q,Z=U+H-1;U<=Z;){var G=U+Z>>>1,W=R[G];if(W<z)U=G+1;else if(W>z)Z=G-1;else return R[G+H]}return-1}t.determineBranch=_;var S=C(s.default),O=C(o.default);function E(R,L){return L===void 0&&(L=A.Legacy),S(R,L)}t.decodeHTML=E;function D(R){return S(R,A.Attribute)}t.decodeHTMLAttribute=D;function N(R){return S(R,A.Strict)}t.decodeHTMLStrict=N;function I(R){return O(R,A.Strict)}t.decodeXML=I}(Ro)),Ro}var Pc={},_1={},KP;function S1e(){if(KP)return _1;KP=1,Object.defineProperty(_1,"__esModule",{value:!0});function t(e){for(var n=1;n<e.length;n++)e[n][0]+=e[n-1][0]+1;return e}return _1.default=new Map(t([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(t([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(t([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(t([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]])),_1}var m_={},ZP;function dk(){return ZP||(ZP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var e=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(i,s){return i.codePointAt(s)}:function(i,s){return(i.charCodeAt(s)&64512)===55296?(i.charCodeAt(s)-55296)*1024+i.charCodeAt(s+1)-56320+65536:i.charCodeAt(s)};function n(i){for(var s="",o=0,l;(l=t.xmlReplacer.exec(i))!==null;){var u=l.index,h=i.charCodeAt(u),f=e.get(h);f!==void 0?(s+=i.substring(o,u)+f,o=u+1):(s+="".concat(i.substring(o,u),"&#x").concat((0,t.getCodePoint)(i,u).toString(16),";"),o=t.xmlReplacer.lastIndex+=+((h&64512)===55296))}return s+i.substr(o)}t.encodeXML=n,t.escape=n;function r(i,s){return function(l){for(var u,h=0,f="";u=i.exec(l);)h!==u.index&&(f+=l.substring(h,u.index)),f+=s.get(u[0].charCodeAt(0)),h=u.index+1;return f+l.substring(h)}}t.escapeUTF8=r(/[&<>'"]/g,e),t.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),t.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))}(m_)),m_}var JP;function eI(){if(JP)return Pc;JP=1;var t=Pc&&Pc.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.encodeNonAsciiHTML=Pc.encodeHTML=void 0;var e=t(S1e()),n=dk(),r=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function i(l){return o(r,l)}Pc.encodeHTML=i;function s(l){return o(n.xmlReplacer,l)}Pc.encodeNonAsciiHTML=s;function o(l,u){for(var h="",f=0,p;(p=l.exec(u))!==null;){var m=p.index;h+=u.substring(f,m);var v=u.charCodeAt(m),b=e.default.get(v);if(typeof b=="object"){if(m+1<u.length){var x=u.charCodeAt(m+1),w=typeof b.n=="number"?b.n===x?b.o:void 0:b.n.get(x);if(w!==void 0){h+=w,f=l.lastIndex+=1;continue}}b=b.v}if(b!==void 0)h+=b,f=m+1;else{var A=(0,n.getCodePoint)(u,m);h+="&#x".concat(A.toString(16),";"),f=l.lastIndex+=+(A!==v)}}return h+u.substr(f)}return Pc}var tI;function j1e(){return tI||(tI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var e=XP(),n=eI(),r=dk(),i;(function(m){m[m.XML=0]="XML",m[m.HTML=1]="HTML"})(i=t.EntityLevel||(t.EntityLevel={}));var s;(function(m){m[m.UTF8=0]="UTF8",m[m.ASCII=1]="ASCII",m[m.Extensive=2]="Extensive",m[m.Attribute=3]="Attribute",m[m.Text=4]="Text"})(s=t.EncodingMode||(t.EncodingMode={}));function o(m,v){v===void 0&&(v=i.XML);var b=typeof v=="number"?v:v.level;if(b===i.HTML){var x=typeof v=="object"?v.mode:void 0;return(0,e.decodeHTML)(m,x)}return(0,e.decodeXML)(m)}t.decode=o;function l(m,v){var b;v===void 0&&(v=i.XML);var x=typeof v=="number"?{level:v}:v;return(b=x.mode)!==null&&b!==void 0||(x.mode=e.DecodingMode.Strict),o(m,x)}t.decodeStrict=l;function u(m,v){v===void 0&&(v=i.XML);var b=typeof v=="number"?{level:v}:v;return b.mode===s.UTF8?(0,r.escapeUTF8)(m):b.mode===s.Attribute?(0,r.escapeAttribute)(m):b.mode===s.Text?(0,r.escapeText)(m):b.level===i.HTML?b.mode===s.ASCII?(0,n.encodeNonAsciiHTML)(m):(0,n.encodeHTML)(m):(0,r.encodeXML)(m)}t.encode=u;var h=dk();Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return h.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return h.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return h.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return h.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return h.escapeText}});var f=eI();Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return f.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return f.encodeHTML}});var p=XP();Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return p.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return p.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return p.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return p.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return p.decodeXML}})}(f_)),f_}var Od={},nI;function C1e(){return nI||(nI=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.attributeNames=Od.elementNames=void 0,Od.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(t){return[t.toLowerCase(),t]})),Od.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(t){return[t.toLowerCase(),t]}))),Od}var rI;function _1e(){if(rI)return ea;rI=1;var t=ea&&ea.__assign||function(){return t=Object.assign||function(_){for(var S,O=1,E=arguments.length;O<E;O++){S=arguments[O];for(var D in S)Object.prototype.hasOwnProperty.call(S,D)&&(_[D]=S[D])}return _},t.apply(this,arguments)},e=ea&&ea.__createBinding||(Object.create?function(_,S,O,E){E===void 0&&(E=O);var D=Object.getOwnPropertyDescriptor(S,O);(!D||("get"in D?!S.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return S[O]}}),Object.defineProperty(_,E,D)}:function(_,S,O,E){E===void 0&&(E=O),_[E]=S[O]}),n=ea&&ea.__setModuleDefault||(Object.create?function(_,S){Object.defineProperty(_,"default",{enumerable:!0,value:S})}:function(_,S){_.default=S}),r=ea&&ea.__importStar||function(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var O in _)O!=="default"&&Object.prototype.hasOwnProperty.call(_,O)&&e(S,_,O);return n(S,_),S};Object.defineProperty(ea,"__esModule",{value:!0}),ea.render=void 0;var i=r(xb()),s=j1e(),o=C1e(),l=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function u(_){return _.replace(/"/g,"&quot;")}function h(_,S){var O;if(_){var E=((O=S.encodeEntities)!==null&&O!==void 0?O:S.decodeEntities)===!1?u:S.xmlMode||S.encodeEntities!=="utf8"?s.encodeXML:s.escapeAttribute;return Object.keys(_).map(function(D){var N,I,R=(N=_[D])!==null&&N!==void 0?N:"";return S.xmlMode==="foreign"&&(D=(I=o.attributeNames.get(D))!==null&&I!==void 0?I:D),!S.emptyAttrs&&!S.xmlMode&&R===""?D:"".concat(D,'="').concat(E(R),'"')}).join(" ")}}var f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function p(_,S){S===void 0&&(S={});for(var O=("length"in _)?_:[_],E="",D=0;D<O.length;D++)E+=m(O[D],S);return E}ea.render=p,ea.default=p;function m(_,S){switch(_.type){case i.Root:return p(_.children,S);case i.Doctype:case i.Directive:return w(_);case i.Comment:return C(_);case i.CDATA:return j(_);case i.Script:case i.Style:case i.Tag:return x(_,S);case i.Text:return A(_,S)}}var v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),b=new Set(["svg","math"]);function x(_,S){var O;S.xmlMode==="foreign"&&(_.name=(O=o.elementNames.get(_.name))!==null&&O!==void 0?O:_.name,_.parent&&v.has(_.parent.name)&&(S=t(t({},S),{xmlMode:!1}))),!S.xmlMode&&b.has(_.name)&&(S=t(t({},S),{xmlMode:"foreign"}));var E="<".concat(_.name),D=h(_.attribs,S);return D&&(E+=" ".concat(D)),_.children.length===0&&(S.xmlMode?S.selfClosingTags!==!1:S.selfClosingTags&&f.has(_.name))?(S.xmlMode||(E+=" "),E+="/>"):(E+=">",_.children.length>0&&(E+=p(_.children,S)),(S.xmlMode||!f.has(_.name))&&(E+="</".concat(_.name,">"))),E}function w(_){return"<".concat(_.data,">")}function A(_,S){var O,E=_.data||"";return((O=S.encodeEntities)!==null&&O!==void 0?O:S.decodeEntities)!==!1&&!(!S.xmlMode&&_.parent&&l.has(_.parent.name))&&(E=S.xmlMode||S.encodeEntities!=="utf8"?(0,s.encodeXML)(E):(0,s.escapeText)(E)),E}function j(_){return"<![CDATA[".concat(_.children[0].data,"]]>")}function C(_){return"<!--".concat(_.data,"-->")}return ea}var iI;function hU(){if(iI)return Cl;iI=1;var t=Cl&&Cl.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.getOuterHTML=i,Cl.getInnerHTML=s,Cl.getText=o,Cl.textContent=l,Cl.innerText=u;var e=qh(),n=t(_1e()),r=xb();function i(h,f){return(0,n.default)(h,f)}function s(h,f){return(0,e.hasChildren)(h)?h.children.map(function(p){return i(p,f)}).join(""):""}function o(h){return Array.isArray(h)?h.map(o).join(""):(0,e.isTag)(h)?h.name==="br"?`
`:o(h.children):(0,e.isCDATA)(h)?o(h.children):(0,e.isText)(h)?h.data:""}function l(h){return Array.isArray(h)?h.map(l).join(""):(0,e.hasChildren)(h)&&!(0,e.isComment)(h)?l(h.children):(0,e.isText)(h)?h.data:""}function u(h){return Array.isArray(h)?h.map(u).join(""):(0,e.hasChildren)(h)&&(h.type===r.ElementType.Tag||(0,e.isCDATA)(h))?u(h.children):(0,e.isText)(h)?h.data:""}return Cl}var No={},sI;function T1e(){if(sI)return No;sI=1,Object.defineProperty(No,"__esModule",{value:!0}),No.getChildren=e,No.getParent=n,No.getSiblings=r,No.getAttributeValue=i,No.hasAttrib=s,No.getName=o,No.nextElementSibling=l,No.prevElementSibling=u;var t=qh();function e(h){return(0,t.hasChildren)(h)?h.children:[]}function n(h){return h.parent||null}function r(h){var f,p,m=n(h);if(m!=null)return e(m);for(var v=[h],b=h.prev,x=h.next;b!=null;)v.unshift(b),f=b,b=f.prev;for(;x!=null;)v.push(x),p=x,x=p.next;return v}function i(h,f){var p;return(p=h.attribs)===null||p===void 0?void 0:p[f]}function s(h,f){return h.attribs!=null&&Object.prototype.hasOwnProperty.call(h.attribs,f)&&h.attribs[f]!=null}function o(h){return h.name}function l(h){for(var f,p=h.next;p!==null&&!(0,t.isTag)(p);)f=p,p=f.next;return p}function u(h){for(var f,p=h.prev;p!==null&&!(0,t.isTag)(p);)f=p,p=f.prev;return p}return No}var Ic={},aI;function k1e(){if(aI)return Ic;aI=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.removeElement=t,Ic.replaceElement=e,Ic.appendChild=n,Ic.append=r,Ic.prependChild=i,Ic.prepend=s;function t(o){if(o.prev&&(o.prev.next=o.next),o.next&&(o.next.prev=o.prev),o.parent){var l=o.parent.children,u=l.lastIndexOf(o);u>=0&&l.splice(u,1)}o.next=null,o.prev=null,o.parent=null}function e(o,l){var u=l.prev=o.prev;u&&(u.next=l);var h=l.next=o.next;h&&(h.prev=l);var f=l.parent=o.parent;if(f){var p=f.children;p[p.lastIndexOf(o)]=l,o.parent=null}}function n(o,l){if(t(l),l.next=null,l.parent=o,o.children.push(l)>1){var u=o.children[o.children.length-2];u.next=l,l.prev=u}else l.prev=null}function r(o,l){t(l);var u=o.parent,h=o.next;if(l.next=h,l.prev=o,o.next=l,l.parent=u,h){if(h.prev=l,u){var f=u.children;f.splice(f.lastIndexOf(h),0,l)}}else u&&u.children.push(l)}function i(o,l){if(t(l),l.parent=o,l.prev=null,o.children.unshift(l)!==1){var u=o.children[1];u.prev=l,l.next=u}else l.next=null}function s(o,l){t(l);var u=o.parent;if(u){var h=u.children;h.splice(h.indexOf(o),0,l)}o.prev&&(o.prev.next=l),l.parent=u,l.prev=o.prev,l.next=o,o.prev=l}return Ic}var Bc={},oI;function dU(){if(oI)return Bc;oI=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.filter=e,Bc.find=n,Bc.findOneChild=r,Bc.findOne=i,Bc.existsOne=s,Bc.findAll=o;var t=qh();function e(l,u,h,f){return h===void 0&&(h=!0),f===void 0&&(f=1/0),n(l,Array.isArray(u)?u:[u],h,f)}function n(l,u,h,f){for(var p=[],m=[Array.isArray(u)?u:[u]],v=[0];;){if(v[0]>=m[0].length){if(v.length===1)return p;m.shift(),v.shift();continue}var b=m[0][v[0]++];if(l(b)&&(p.push(b),--f<=0))return p;h&&(0,t.hasChildren)(b)&&b.children.length>0&&(v.unshift(0),m.unshift(b.children))}}function r(l,u){return u.find(l)}function i(l,u,h){h===void 0&&(h=!0);for(var f=Array.isArray(u)?u:[u],p=0;p<f.length;p++){var m=f[p];if((0,t.isTag)(m)&&l(m))return m;if(h&&(0,t.hasChildren)(m)&&m.children.length>0){var v=i(l,m.children,!0);if(v)return v}}return null}function s(l,u){return(Array.isArray(u)?u:[u]).some(function(h){return(0,t.isTag)(h)&&l(h)||(0,t.hasChildren)(h)&&s(l,h.children)})}function o(l,u){for(var h=[],f=[Array.isArray(u)?u:[u]],p=[0];;){if(p[0]>=f[0].length){if(f.length===1)return h;f.shift(),p.shift();continue}var m=f[0][p[0]++];(0,t.isTag)(m)&&l(m)&&h.push(m),(0,t.hasChildren)(m)&&m.children.length>0&&(p.unshift(0),f.unshift(m.children))}}return Bc}var Lc={},lI;function fU(){if(lI)return Lc;lI=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.testElement=o,Lc.getElements=l,Lc.getElementById=u,Lc.getElementsByTagName=h,Lc.getElementsByClassName=f,Lc.getElementsByTagType=p;var t=qh(),e=dU(),n={tag_name:function(m){return typeof m=="function"?function(v){return(0,t.isTag)(v)&&m(v.name)}:m==="*"?t.isTag:function(v){return(0,t.isTag)(v)&&v.name===m}},tag_type:function(m){return typeof m=="function"?function(v){return m(v.type)}:function(v){return v.type===m}},tag_contains:function(m){return typeof m=="function"?function(v){return(0,t.isText)(v)&&m(v.data)}:function(v){return(0,t.isText)(v)&&v.data===m}}};function r(m,v){return typeof v=="function"?function(b){return(0,t.isTag)(b)&&v(b.attribs[m])}:function(b){return(0,t.isTag)(b)&&b.attribs[m]===v}}function i(m,v){return function(b){return m(b)||v(b)}}function s(m){var v=Object.keys(m).map(function(b){var x=m[b];return Object.prototype.hasOwnProperty.call(n,b)?n[b](x):r(b,x)});return v.length===0?null:v.reduce(i)}function o(m,v){var b=s(m);return b?b(v):!0}function l(m,v,b,x){x===void 0&&(x=1/0);var w=s(m);return w?(0,e.filter)(w,v,b,x):[]}function u(m,v,b){return b===void 0&&(b=!0),Array.isArray(v)||(v=[v]),(0,e.findOne)(r("id",m),v,b)}function h(m,v,b,x){return b===void 0&&(b=!0),x===void 0&&(x=1/0),(0,e.filter)(n.tag_name(m),v,b,x)}function f(m,v,b,x){return b===void 0&&(b=!0),x===void 0&&(x=1/0),(0,e.filter)(r("class",m),v,b,x)}function p(m,v,b,x){return b===void 0&&(b=!0),x===void 0&&(x=1/0),(0,e.filter)(n.tag_type(m),v,b,x)}return Lc}var Gu={},cI;function O1e(){if(cI)return Gu;cI=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.DocumentPosition=void 0,Gu.removeSubsets=e,Gu.compareDocumentPosition=r,Gu.uniqueSort=i;var t=qh();function e(s){for(var o=s.length;--o>=0;){var l=s[o];if(o>0&&s.lastIndexOf(l,o-1)>=0){s.splice(o,1);continue}for(var u=l.parent;u;u=u.parent)if(s.includes(u)){s.splice(o,1);break}}return s}var n;(function(s){s[s.DISCONNECTED=1]="DISCONNECTED",s[s.PRECEDING=2]="PRECEDING",s[s.FOLLOWING=4]="FOLLOWING",s[s.CONTAINS=8]="CONTAINS",s[s.CONTAINED_BY=16]="CONTAINED_BY"})(n||(Gu.DocumentPosition=n={}));function r(s,o){var l=[],u=[];if(s===o)return 0;for(var h=(0,t.hasChildren)(s)?s:s.parent;h;)l.unshift(h),h=h.parent;for(h=(0,t.hasChildren)(o)?o:o.parent;h;)u.unshift(h),h=h.parent;for(var f=Math.min(l.length,u.length),p=0;p<f&&l[p]===u[p];)p++;if(p===0)return n.DISCONNECTED;var m=l[p-1],v=m.children,b=l[p],x=u[p];return v.indexOf(b)>v.indexOf(x)?m===o?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:m===s?n.PRECEDING|n.CONTAINS:n.PRECEDING}function i(s){return s=s.filter(function(o,l,u){return!u.includes(o,l+1)}),s.sort(function(o,l){var u=r(o,l);return u&n.PRECEDING?-1:u&n.FOLLOWING?1:0}),s}return Gu}var T1={},uI;function E1e(){if(uI)return T1;uI=1,Object.defineProperty(T1,"__esModule",{value:!0}),T1.getFeed=n;var t=hU(),e=fU();function n(m){var v=u(p,m);return v?v.name==="feed"?r(v):i(v):null}function r(m){var v,b=m.children,x={type:"atom",items:(0,e.getElementsByTagName)("entry",b).map(function(j){var C,_=j.children,S={media:l(_)};f(S,"id","id",_),f(S,"title","title",_);var O=(C=u("link",_))===null||C===void 0?void 0:C.attribs.href;O&&(S.link=O);var E=h("summary",_)||h("content",_);E&&(S.description=E);var D=h("updated",_);return D&&(S.pubDate=new Date(D)),S})};f(x,"id","id",b),f(x,"title","title",b);var w=(v=u("link",b))===null||v===void 0?void 0:v.attribs.href;w&&(x.link=w),f(x,"description","subtitle",b);var A=h("updated",b);return A&&(x.updated=new Date(A)),f(x,"author","email",b,!0),x}function i(m){var v,b,x=(b=(v=u("channel",m.children))===null||v===void 0?void 0:v.children)!==null&&b!==void 0?b:[],w={type:m.name.substr(0,3),id:"",items:(0,e.getElementsByTagName)("item",m.children).map(function(j){var C=j.children,_={media:l(C)};f(_,"id","guid",C),f(_,"title","title",C),f(_,"link","link",C),f(_,"description","description",C);var S=h("pubDate",C)||h("dc:date",C);return S&&(_.pubDate=new Date(S)),_})};f(w,"title","title",x),f(w,"link","link",x),f(w,"description","description",x);var A=h("lastBuildDate",x);return A&&(w.updated=new Date(A)),f(w,"author","managingEditor",x,!0),w}var s=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function l(m){return(0,e.getElementsByTagName)("media:content",m).map(function(v){for(var b=v.attribs,x={medium:b.medium,isDefault:!!b.isDefault},w=0,A=s;w<A.length;w++){var j=A[w];b[j]&&(x[j]=b[j])}for(var C=0,_=o;C<_.length;C++){var j=_[C];b[j]&&(x[j]=parseInt(b[j],10))}return b.expression&&(x.expression=b.expression),x})}function u(m,v){return(0,e.getElementsByTagName)(m,v,!0,1)[0]}function h(m,v,b){return b===void 0&&(b=!1),(0,t.textContent)((0,e.getElementsByTagName)(m,v,b,1)).trim()}function f(m,v,b,x,w){w===void 0&&(w=!1);var A=h(b,x,w);A&&(m[v]=A)}function p(m){return m==="rss"||m==="feed"||m==="rdf:RDF"}return T1}var hI;function g_(){return hI||(hI=1,function(t){var e=kd&&kd.__createBinding||(Object.create?function(i,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(i,l,u)}:function(i,s,o,l){l===void 0&&(l=o),i[l]=s[o]}),n=kd&&kd.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,n(hU(),t),n(T1e(),t),n(k1e(),t),n(dU(),t),n(fU(),t),n(O1e(),t),n(E1e(),t);var r=qh();Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return r.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return r.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return r.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return r.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return r.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return r.hasChildren}})}(kd)),kd}var dI;function M1e(){return dI||(dI=1,function(t){var e=Mo&&Mo.__createBinding||(Object.create?function(j,C,_,S){S===void 0&&(S=_);var O=Object.getOwnPropertyDescriptor(C,_);(!O||("get"in O?!C.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return C[_]}}),Object.defineProperty(j,S,O)}:function(j,C,_,S){S===void 0&&(S=_),j[S]=C[_]}),n=Mo&&Mo.__setModuleDefault||(Object.create?function(j,C){Object.defineProperty(j,"default",{enumerable:!0,value:C})}:function(j,C){j.default=C}),r=Mo&&Mo.__importStar||function(){var j=function(C){return j=Object.getOwnPropertyNames||function(_){var S=[];for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&(S[S.length]=O);return S},j(C)};return function(C){if(C&&C.__esModule)return C;var _={};if(C!=null)for(var S=j(C),O=0;O<S.length;O++)S[O]!=="default"&&e(_,C,S[O]);return n(_,C),_}}(),i=Mo&&Mo.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomUtils=t.getFeed=t.ElementType=t.QuoteType=t.Tokenizer=t.DefaultHandler=t.DomHandler=t.Parser=void 0,t.parseDocument=h,t.parseDOM=f,t.createDocumentStream=p,t.createDomStream=m,t.parseFeed=A;const s=HP();var o=HP();Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return o.Parser}});const l=qh();var u=qh();Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return u.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return u.DomHandler}});function h(j,C){const _=new l.DomHandler(void 0,C);return new s.Parser(_,C).end(j),_.root}function f(j,C){return h(j,C).children}function p(j,C,_){const S=new l.DomHandler(O=>j(O,S.root),C,_);return new s.Parser(S,C)}function m(j,C,_){const S=new l.DomHandler(j,C,_);return new s.Parser(S,C)}var v=uU();Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return i(v).default}}),Object.defineProperty(t,"QuoteType",{enumerable:!0,get:function(){return v.QuoteType}}),t.ElementType=r(xb());const b=g_();var x=g_();Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});const w={xmlMode:!0};function A(j,C=w){return(0,b.getFeed)(f(j,C))}t.DomUtils=r(g_())}(Mo)),Mo}var v_,fI;function D1e(){return fI||(fI=1,v_=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),v_}var k1={},pI;function R1e(){if(pI)return k1;pI=1,Object.defineProperty(k1,"__esModule",{value:!0});/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */function t(n){return Object.prototype.toString.call(n)==="[object Object]"}function e(n){var r,i;return t(n)===!1?!1:(r=n.constructor,r===void 0?!0:(i=r.prototype,!(t(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}return k1.isPlainObject=e,k1}var b_,mI;function N1e(){if(mI)return b_;mI=1;var t=function(j){return e(j)&&!n(j)};function e(A){return!!A&&typeof A=="object"}function n(A){var j=Object.prototype.toString.call(A);return j==="[object RegExp]"||j==="[object Date]"||s(A)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function s(A){return A.$$typeof===i}function o(A){return Array.isArray(A)?[]:{}}function l(A,j){return j.clone!==!1&&j.isMergeableObject(A)?x(o(A),A,j):A}function u(A,j,C){return A.concat(j).map(function(_){return l(_,C)})}function h(A,j){if(!j.customMerge)return x;var C=j.customMerge(A);return typeof C=="function"?C:x}function f(A){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(A).filter(function(j){return Object.propertyIsEnumerable.call(A,j)}):[]}function p(A){return Object.keys(A).concat(f(A))}function m(A,j){try{return j in A}catch{return!1}}function v(A,j){return m(A,j)&&!(Object.hasOwnProperty.call(A,j)&&Object.propertyIsEnumerable.call(A,j))}function b(A,j,C){var _={};return C.isMergeableObject(A)&&p(A).forEach(function(S){_[S]=l(A[S],C)}),p(j).forEach(function(S){v(A,S)||(m(A,S)&&C.isMergeableObject(j[S])?_[S]=h(S,C)(A[S],j[S],C):_[S]=l(j[S],C))}),_}function x(A,j,C){C=C||{},C.arrayMerge=C.arrayMerge||u,C.isMergeableObject=C.isMergeableObject||t,C.cloneUnlessOtherwiseSpecified=l;var _=Array.isArray(j),S=Array.isArray(A),O=_===S;return O?_?C.arrayMerge(A,j,C):b(A,j,C):l(j,C)}x.all=function(j,C){if(!Array.isArray(j))throw new Error("first argument should be an array");return j.reduce(function(_,S){return x(_,S,C)},{})};var w=x;return b_=w,b_}var vx={exports:{}},P1e=vx.exports,gI;function I1e(){return gI||(gI=1,function(t){(function(e,n){t.exports?t.exports=n():e.parseSrcset=n()})(P1e,function(){return function(e){function n(_){return _===" "||_==="	"||_===`
`||_==="\f"||_==="\r"}function r(_){var S,O=_.exec(e.substring(w));if(O)return S=O[0],w+=S.length,S}for(var i=e.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,l=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,h=/^\d+$/,f=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,p,m,v,b,x,w=0,A=[];;){if(r(o),w>=i)return A;p=r(l),m=[],p.slice(-1)===","?(p=p.replace(u,""),C()):j()}function j(){for(r(s),v="",b="in descriptor";;){if(x=e.charAt(w),b==="in descriptor")if(n(x))v&&(m.push(v),v="",b="after descriptor");else if(x===","){w+=1,v&&m.push(v),C();return}else if(x==="(")v=v+x,b="in parens";else if(x===""){v&&m.push(v),C();return}else v=v+x;else if(b==="in parens")if(x===")")v=v+x,b="in descriptor";else if(x===""){m.push(v),C();return}else v=v+x;else if(b==="after descriptor"&&!n(x))if(x===""){C();return}else b="in descriptor",w-=1;w+=1}}function C(){var _=!1,S,O,E,D,N={},I,R,L,Q,z;for(D=0;D<m.length;D++)I=m[D],R=I[I.length-1],L=I.substring(0,I.length-1),Q=parseInt(L,10),z=parseFloat(L),h.test(L)&&R==="w"?((S||O)&&(_=!0),Q===0?_=!0:S=Q):f.test(L)&&R==="x"?((S||O||E)&&(_=!0),z<0?_=!0:O=z):h.test(L)&&R==="h"?((E||O)&&(_=!0),Q===0?_=!0:E=Q):_=!0;_?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+I+"'."):(N.url=p,S&&(N.w=S),O&&(N.d=O),E&&(N.h=E),A.push(N))}}})}(vx)),vx.exports}var O1={exports:{}},vI;function B1e(){if(vI)return O1.exports;vI=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return O1.exports=e(),O1.exports.createColors=e,O1.exports}const L1e={},F1e=Object.freeze(Object.defineProperty({__proto__:null,default:L1e},Symbol.toStringTag,{value:"Module"})),tl=M9(F1e);var y_,bI;function B6(){if(bI)return y_;bI=1;let t=B1e(),e=tl;class n extends Error{constructor(i,s,o,l,u,h){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),h&&(this.plugin=h),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported);let o=v=>v,l=v=>v,u=v=>v;if(i){let{bold:v,gray:b,red:x}=t.createColors(!0);l=w=>v(x(w)),o=w=>b(w),e&&(u=w=>e(w))}let h=s.split(/\r?\n/),f=Math.max(this.line-3,0),p=Math.min(this.line+2,h.length),m=String(p).length;return h.slice(f,p).map((v,b)=>{let x=f+1+b,w=" "+(" "+x).slice(-m)+" | ";if(x===this.line){if(v.length>160){let j=20,C=Math.max(0,this.column-j),_=Math.max(this.column+j,this.endColumn+j),S=v.slice(C,_),O=o(w.replace(/\d/g," "))+v.slice(0,Math.min(this.column-1,j-1)).replace(/[^\t]/g," ");return l(">")+o(w)+u(S)+`
 `+O+l("^")}let A=o(w.replace(/\d/g," "))+v.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(w)+u(v)+`
 `+A+l("^")}return" "+o(w)+u(v)}).join(`
`)}toString(){let i=this.showSourceCode();return i&&(i=`

`+i+`
`),this.name+": "+this.message+i}}return y_=n,n.default=n,y_}var x_,yI;function pU(){if(yI)return x_;yI=1;const t={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function e(r){return r[0].toUpperCase()+r.slice(1)}class n{constructor(i){this.builder=i}atrule(i,s){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let u=(i.raws.between||"")+(s?";":"");this.builder(o+l+u,i)}}beforeAfter(i,s){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):s==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,u=0;for(;l&&l.type!=="root";)u+=1,l=l.parent;if(o.includes(`
`)){let h=this.raw(i,null,"indent");if(h.length)for(let f=0;f<u;f++)o+=h}return o}block(i,s){let o=this.raw(i,"between","beforeOpen");this.builder(s+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let s=i.nodes.length-1;for(;s>0&&i.nodes[s].type==="comment";)s-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let u=i.nodes[l],h=this.raw(u,"before");h&&this.builder(h),this.stringify(u,s!==l||o)}}comment(i){let s=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+s+i.text+o+"*/",i)}decl(i,s){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),s&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,s,o){let l;if(o||(o=s),s&&(l=i.raws[s],typeof l<"u"))return l;let u=i.parent;if(o==="before"&&(!u||u.type==="root"&&u.first===i||u&&u.type==="document"))return"";if(!u)return t[o];let h=i.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[o]<"u")return h.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let f="raw"+e(o);this[f]?l=this[f](h,i):h.walk(p=>{if(l=p.raws[s],typeof l<"u")return!1})}return typeof l>"u"&&(l=t[o]),h.rawCache[o]=l,l}rawBeforeClose(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return s=o.raws.after,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(i,s){let o;return i.walkComments(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,s){let o;return i.walkDecls(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let s;return i.walk(o=>{if(o.type!=="decl"&&(s=o.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(i){let s;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before<"u")return s=o.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(i){let s;return i.walkDecls(o=>{if(typeof o.raws.between<"u")return s=o.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(s=o.raws.after,typeof s<"u"))return!1}),s}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before<"u"){let u=o.raws.before.split(`
`);return s=u[u.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(s=o.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(i,s){let o=i[s],l=i.raws[s];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,s){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,s)}}return x_=n,n.default=n,x_}var A_,xI;function T2(){if(xI)return A_;xI=1;let t=pU();function e(n,r){new t(r).stringify(n)}return A_=e,e.default=e,A_}var E1={},AI;function L6(){return AI||(AI=1,E1.isClean=Symbol("isClean"),E1.my=Symbol("my")),E1}var w_,wI;function k2(){if(wI)return w_;wI=1;let t=B6(),e=pU(),n=T2(),{isClean:r,my:i}=L6();function s(u,h){let f=new u.constructor;for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||p==="proxyCache")continue;let m=u[p],v=typeof m;p==="parent"&&v==="object"?h&&(f[p]=h):p==="source"?f[p]=m:Array.isArray(m)?f[p]=m.map(b=>s(b,f)):(v==="object"&&m!==null&&(m=s(m)),f[p]=m)}return f}function o(u,h){if(h&&typeof h.offset<"u")return h.offset;let f=1,p=1,m=0;for(let v=0;v<u.length;v++){if(p===h.line&&f===h.column){m=v;break}u[v]===`
`?(f=1,p+=1):f+=1}return m}class l{get proxyOf(){return this}constructor(h={}){this.raws={},this[r]=!1,this[i]=!0;for(let f in h)if(f==="nodes"){this.nodes=[];for(let p of h[f])typeof p.clone=="function"?this.append(p.clone()):this.append(p)}else this[f]=h[f]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let f=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${f.input.from}:${f.start.line}:${f.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let f in h)this[f]=h[f];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let f=s(this);for(let p in h)f[p]=h[p];return f}cloneAfter(h={}){let f=this.clone(h);return this.parent.insertAfter(this,f),f}cloneBefore(h={}){let f=this.clone(h);return this.parent.insertBefore(this,f),f}error(h,f={}){if(this.source){let{end:p,start:m}=this.rangeBy(f);return this.source.input.error(h,{column:m.column,line:m.line},{column:p.column,line:p.line},f)}return new t(h)}getProxyProcessor(){return{get(h,f){return f==="proxyOf"?h:f==="root"?()=>h.root().toProxy():h[f]},set(h,f,p){return h[f]===p||(h[f]=p,(f==="prop"||f==="value"||f==="name"||f==="params"||f==="important"||f==="text")&&h.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let h=this;for(;h=h.parent;)h[r]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h={}){let f=this.source.start;if(h.index)f=this.positionInside(h.index);else if(h.word){let p="document"in this.source.input?this.source.input.document:this.source.input.css,v=p.slice(o(p,this.source.start),o(p,this.source.end)).indexOf(h.word);v!==-1&&(f=this.positionInside(v))}return f}positionInside(h){let f=this.source.start.column,p=this.source.start.line,m="document"in this.source.input?this.source.input.document:this.source.input.css,v=o(m,this.source.start),b=v+h;for(let x=v;x<b;x++)m[x]===`
`?(f=1,p+=1):f+=1;return{column:f,line:p,offset:b}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h={}){let f="document"in this.source.input?this.source.input.document:this.source.input.css,p={column:this.source.start.column,line:this.source.start.line,offset:o(f,this.source.start)},m=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(f,this.source.end)+1}:{column:p.column+1,line:p.line,offset:p.offset+1};if(h.word){let b=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(h.word);b!==-1&&(p=this.positionInside(b),m=this.positionInside(b+h.word.length))}else h.start?p={column:h.start.column,line:h.start.line,offset:o(f,h.start)}:h.index&&(p=this.positionInside(h.index)),h.end?m={column:h.end.column,line:h.end.line,offset:o(f,h.end)}:typeof h.endIndex=="number"?m=this.positionInside(h.endIndex):h.index&&(m=this.positionInside(h.index+1));return(m.line<p.line||m.line===p.line&&m.column<=p.column)&&(m={column:p.column+1,line:p.line,offset:p.offset+1}),{end:m,start:p}}raw(h,f){return new e().raw(this,h,f)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let f=this,p=!1;for(let m of h)m===this?p=!0:p?(this.parent.insertAfter(f,m),f=m):this.parent.insertBefore(f,m);p||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,f){let p={},m=f==null;f=f||new Map;let v=0;for(let b in this){if(!Object.prototype.hasOwnProperty.call(this,b)||b==="parent"||b==="proxyCache")continue;let x=this[b];if(Array.isArray(x))p[b]=x.map(w=>typeof w=="object"&&w.toJSON?w.toJSON(null,f):w);else if(typeof x=="object"&&x.toJSON)p[b]=x.toJSON(null,f);else if(b==="source"){if(x==null)continue;let w=f.get(x.input);w==null&&(w=v,f.set(x.input,v),v++),p[b]={end:x.end,inputId:w,start:x.start}}else p[b]=x}return m&&(p.inputs=[...f.keys()].map(b=>b.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=n){h.stringify&&(h=h.stringify);let f="";return h(this,p=>{f+=p}),f}warn(h,f,p={}){let m={node:this};for(let v in p)m[v]=p[v];return h.warn(f,m)}}return w_=l,l.default=l,w_}var S_,SI;function O2(){if(SI)return S_;SI=1;let t=k2();class e extends t{constructor(r){super(r),this.type="comment"}}return S_=e,e.default=e,S_}var j_,jI;function E2(){if(jI)return j_;jI=1;let t=k2();class e extends t{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(r){r&&typeof r.value<"u"&&typeof r.value!="string"&&(r={...r,value:String(r.value)}),super(r),this.type="decl"}}return j_=e,e.default=e,j_}var C_,CI;function Rf(){if(CI)return C_;CI=1;let t=O2(),e=E2(),n=k2(),{isClean:r,my:i}=L6(),s,o,l,u;function h(m){return m.map(v=>(v.nodes&&(v.nodes=h(v.nodes)),delete v.source,v))}function f(m){if(m[r]=!1,m.proxyOf.nodes)for(let v of m.proxyOf.nodes)f(v)}class p extends n{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...v){for(let b of v){let x=this.normalize(b,this.last);for(let w of x)this.proxyOf.nodes.push(w)}return this.markDirty(),this}cleanRaws(v){if(super.cleanRaws(v),this.nodes)for(let b of this.nodes)b.cleanRaws(v)}each(v){if(!this.proxyOf.nodes)return;let b=this.getIterator(),x,w;for(;this.indexes[b]<this.proxyOf.nodes.length&&(x=this.indexes[b],w=v(this.proxyOf.nodes[x],x),w!==!1);)this.indexes[b]+=1;return delete this.indexes[b],w}every(v){return this.nodes.every(v)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let v=this.lastEach;return this.indexes[v]=0,v}getProxyProcessor(){return{get(v,b){return b==="proxyOf"?v:v[b]?b==="each"||typeof b=="string"&&b.startsWith("walk")?(...x)=>v[b](...x.map(w=>typeof w=="function"?(A,j)=>w(A.toProxy(),j):w)):b==="every"||b==="some"?x=>v[b]((w,...A)=>x(w.toProxy(),...A)):b==="root"?()=>v.root().toProxy():b==="nodes"?v.nodes.map(x=>x.toProxy()):b==="first"||b==="last"?v[b].toProxy():v[b]:v[b]},set(v,b,x){return v[b]===x||(v[b]=x,(b==="name"||b==="params"||b==="selector")&&v.markDirty()),!0}}}index(v){return typeof v=="number"?v:(v.proxyOf&&(v=v.proxyOf),this.proxyOf.nodes.indexOf(v))}insertAfter(v,b){let x=this.index(v),w=this.normalize(b,this.proxyOf.nodes[x]).reverse();x=this.index(v);for(let j of w)this.proxyOf.nodes.splice(x+1,0,j);let A;for(let j in this.indexes)A=this.indexes[j],x<A&&(this.indexes[j]=A+w.length);return this.markDirty(),this}insertBefore(v,b){let x=this.index(v),w=x===0?"prepend":!1,A=this.normalize(b,this.proxyOf.nodes[x],w).reverse();x=this.index(v);for(let C of A)this.proxyOf.nodes.splice(x,0,C);let j;for(let C in this.indexes)j=this.indexes[C],x<=j&&(this.indexes[C]=j+A.length);return this.markDirty(),this}normalize(v,b){if(typeof v=="string")v=h(o(v).nodes);else if(typeof v>"u")v=[];else if(Array.isArray(v)){v=v.slice(0);for(let w of v)w.parent&&w.parent.removeChild(w,"ignore")}else if(v.type==="root"&&this.type!=="document"){v=v.nodes.slice(0);for(let w of v)w.parent&&w.parent.removeChild(w,"ignore")}else if(v.type)v=[v];else if(v.prop){if(typeof v.value>"u")throw new Error("Value field is missed in node creation");typeof v.value!="string"&&(v.value=String(v.value)),v=[new e(v)]}else if(v.selector||v.selectors)v=[new u(v)];else if(v.name)v=[new s(v)];else if(v.text)v=[new t(v)];else throw new Error("Unknown node type in node creation");return v.map(w=>(w[i]||p.rebuild(w),w=w.proxyOf,w.parent&&w.parent.removeChild(w),w[r]&&f(w),w.raws||(w.raws={}),typeof w.raws.before>"u"&&b&&typeof b.raws.before<"u"&&(w.raws.before=b.raws.before.replace(/\S/g,"")),w.parent=this.proxyOf,w))}prepend(...v){v=v.reverse();for(let b of v){let x=this.normalize(b,this.first,"prepend").reverse();for(let w of x)this.proxyOf.nodes.unshift(w);for(let w in this.indexes)this.indexes[w]=this.indexes[w]+x.length}return this.markDirty(),this}push(v){return v.parent=this,this.proxyOf.nodes.push(v),this}removeAll(){for(let v of this.proxyOf.nodes)v.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(v){v=this.index(v),this.proxyOf.nodes[v].parent=void 0,this.proxyOf.nodes.splice(v,1);let b;for(let x in this.indexes)b=this.indexes[x],b>=v&&(this.indexes[x]=b-1);return this.markDirty(),this}replaceValues(v,b,x){return x||(x=b,b={}),this.walkDecls(w=>{b.props&&!b.props.includes(w.prop)||b.fast&&!w.value.includes(b.fast)||(w.value=w.value.replace(v,x))}),this.markDirty(),this}some(v){return this.nodes.some(v)}walk(v){return this.each((b,x)=>{let w;try{w=v(b,x)}catch(A){throw b.addToError(A)}return w!==!1&&b.walk&&(w=b.walk(v)),w})}walkAtRules(v,b){return b?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="atrule"&&v.test(x.name))return b(x,w)}):this.walk((x,w)=>{if(x.type==="atrule"&&x.name===v)return b(x,w)}):(b=v,this.walk((x,w)=>{if(x.type==="atrule")return b(x,w)}))}walkComments(v){return this.walk((b,x)=>{if(b.type==="comment")return v(b,x)})}walkDecls(v,b){return b?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="decl"&&v.test(x.prop))return b(x,w)}):this.walk((x,w)=>{if(x.type==="decl"&&x.prop===v)return b(x,w)}):(b=v,this.walk((x,w)=>{if(x.type==="decl")return b(x,w)}))}walkRules(v,b){return b?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="rule"&&v.test(x.selector))return b(x,w)}):this.walk((x,w)=>{if(x.type==="rule"&&x.selector===v)return b(x,w)}):(b=v,this.walk((x,w)=>{if(x.type==="rule")return b(x,w)}))}}return p.registerParse=m=>{o=m},p.registerRule=m=>{u=m},p.registerAtRule=m=>{s=m},p.registerRoot=m=>{l=m},C_=p,p.default=p,p.rebuild=m=>{m.type==="atrule"?Object.setPrototypeOf(m,s.prototype):m.type==="rule"?Object.setPrototypeOf(m,u.prototype):m.type==="decl"?Object.setPrototypeOf(m,e.prototype):m.type==="comment"?Object.setPrototypeOf(m,t.prototype):m.type==="root"&&Object.setPrototypeOf(m,l.prototype),m[i]=!0,m.nodes&&m.nodes.forEach(v=>{p.rebuild(v)})},C_}var __,_I;function F6(){if(_I)return __;_I=1;let t=Rf();class e extends t{constructor(r){super(r),this.type="atrule"}append(...r){return this.proxyOf.nodes||(this.nodes=[]),super.append(...r)}prepend(...r){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...r)}}return __=e,e.default=e,t.registerAtRule(e),__}var T_,TI;function H6(){if(TI)return T_;TI=1;let t=Rf(),e,n;class r extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new n,this,s).stringify()}}return r.registerLazyResult=i=>{e=i},r.registerProcessor=i=>{n=i},T_=r,r.default=r,T_}var k_,kI;function H1e(){if(kI)return k_;kI=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return k_={nanoid:(r=21)=>{let i="",s=r|0;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(r,i=21)=>(s=i)=>{let o="",l=s|0;for(;l--;)o+=r[Math.random()*r.length|0];return o}},k_}var O_,OI;function mU(){if(OI)return O_;OI=1;let{existsSync:t,readFileSync:e}=tl,{dirname:n,join:r}=tl,{SourceMapConsumer:i,SourceMapGenerator:s}=tl;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(h,f){if(f.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let p=f.map?f.map.prev:void 0,m=this.loadMap(f.from,p);!this.mapFile&&f.from&&(this.mapFile=f.from),this.mapFile&&(this.root=n(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(h){let f=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,m=/^data:application\/json;charset=utf-?8,/,v=/^data:application\/json,/,b=h.match(m)||h.match(v);if(b)return decodeURIComponent(h.substr(b[0].length));let x=h.match(f)||h.match(p);if(x)return o(h.substr(x[0].length));let w=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+w)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let f=h.match(/\/\*\s*# sourceMappingURL=/g);if(!f)return;let p=h.lastIndexOf(f.pop()),m=h.indexOf("*/",p);p>-1&&m>-1&&(this.annotation=this.getAnnotationURL(h.substring(p,m)))}loadFile(h){if(this.root=n(h),t(h))return this.mapFile=h,e(h,"utf-8").toString().trim()}loadMap(h,f){if(f===!1)return!1;if(f){if(typeof f=="string")return f;if(typeof f=="function"){let p=f(h);if(p){let m=this.loadFile(p);if(!m)throw new Error("Unable to load previous source map: "+p.toString());return m}}else{if(f instanceof i)return s.fromSourceMap(f).toString();if(f instanceof s)return f.toString();if(this.isMap(f))return JSON.stringify(f);throw new Error("Unsupported previous source map format: "+f.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return h&&(p=r(n(h),p)),this.loadFile(p)}}}startWith(h,f){return h?h.substr(0,f.length)===f:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return O_=l,l.default=l,O_}var E_,EI;function M2(){if(EI)return E_;EI=1;let{nanoid:t}=H1e(),{isAbsolute:e,resolve:n}=tl,{SourceMapConsumer:r,SourceMapGenerator:i}=tl,{fileURLToPath:s,pathToFileURL:o}=tl,l=B6(),u=mU(),h=tl,f=Symbol("lineToIndexCache"),p=!!(r&&i),m=!!(n&&e);function v(x){if(x[f])return x[f];let w=x.css.split(`
`),A=new Array(w.length),j=0;for(let C=0,_=w.length;C<_;C++)A[C]=j,j+=w[C].length+1;return x[f]=A,A}class b{get from(){return this.file||this.id}constructor(w,A={}){if(w===null||typeof w>"u"||typeof w=="object"&&!w.toString)throw new Error(`PostCSS received ${w} instead of CSS string`);if(this.css=w.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,A.document&&(this.document=A.document.toString()),A.from&&(!m||/^\w+:\/\//.test(A.from)||e(A.from)?this.file=A.from:this.file=n(A.from)),m&&p){let j=new u(this.css,A);if(j.text){this.map=j;let C=j.consumer().file;!this.file&&C&&(this.file=this.mapResolve(C))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(w,A,j,C={}){let _,S,O,E,D;if(A&&typeof A=="object"){let I=A,R=j;if(typeof I.offset=="number"){E=I.offset;let L=this.fromOffset(E);A=L.line,j=L.col}else A=I.line,j=I.column,E=this.fromLineAndColumn(A,j);if(typeof R.offset=="number"){O=R.offset;let L=this.fromOffset(O);S=L.line,_=L.col}else S=R.line,_=R.column,O=this.fromLineAndColumn(R.line,R.column)}else if(j)E=this.fromLineAndColumn(A,j);else{E=A;let I=this.fromOffset(E);A=I.line,j=I.col}let N=this.origin(A,j,S,_);return N?D=new l(w,N.endLine===void 0?N.line:{column:N.column,line:N.line},N.endLine===void 0?N.column:{column:N.endColumn,line:N.endLine},N.source,N.file,C.plugin):D=new l(w,S===void 0?A:{column:j,line:A},S===void 0?j:{column:_,line:S},this.css,this.file,C.plugin),D.input={column:j,endColumn:_,endLine:S,endOffset:O,line:A,offset:E,source:this.css},this.file&&(o&&(D.input.url=o(this.file).toString()),D.input.file=this.file),D}fromLineAndColumn(w,A){return v(this)[w-1]+A-1}fromOffset(w){let A=v(this),j=A[A.length-1],C=0;if(w>=j)C=A.length-1;else{let _=A.length-2,S;for(;C<_;)if(S=C+(_-C>>1),w<A[S])_=S-1;else if(w>=A[S+1])C=S+1;else{C=S;break}}return{col:w-A[C]+1,line:C+1}}mapResolve(w){return/^\w+:\/\//.test(w)?w:n(this.map.consumer().sourceRoot||this.map.root||".",w)}origin(w,A,j,C){if(!this.map)return!1;let _=this.map.consumer(),S=_.originalPositionFor({column:A,line:w});if(!S.source)return!1;let O;typeof j=="number"&&(O=_.originalPositionFor({column:C,line:j}));let E;e(S.source)?E=o(S.source):E=new URL(S.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let D={column:S.column,endColumn:O&&O.column,endLine:O&&O.line,line:S.line,url:E.toString()};if(E.protocol==="file:")if(s)D.file=s(E);else throw new Error("file: protocol is not available in this PostCSS build");let N=_.sourceContentFor(S.source);return N&&(D.source=N),D}toJSON(){let w={};for(let A of["hasBOM","css","file","id"])this[A]!=null&&(w[A]=this[A]);return this.map&&(w.map={...this.map},w.map.consumerCache&&(w.map.consumerCache=void 0)),w}}return E_=b,b.default=b,h&&h.registerInput&&h.registerInput(b),E_}var M_,MI;function Ab(){if(MI)return M_;MI=1;let t=Rf(),e,n;class r extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let u=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of u)h.raws.before=o.raws.before}return u}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new n,this,s).stringify()}}return r.registerLazyResult=i=>{e=i},r.registerProcessor=i=>{n=i},M_=r,r.default=r,t.registerRoot(r),M_}var D_,DI;function gU(){if(DI)return D_;DI=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let n=[" ",`
`,"	"];return t.split(e,n)},split(e,n,r){let i=[],s="",o=!1,l=0,u=!1,h="",f=!1;for(let p of e)f?f=!1:p==="\\"?f=!0:u?p===h&&(u=!1):p==='"'||p==="'"?(u=!0,h=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&n.includes(p)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=p;return(r||s!=="")&&i.push(s.trim()),i}};return D_=t,t.default=t,D_}var R_,RI;function z6(){if(RI)return R_;RI=1;let t=Rf(),e=gU();class n extends t{get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return R_=n,n.default=n,t.registerRule(n),R_}var N_,NI;function z1e(){if(NI)return N_;NI=1;let t=F6(),e=O2(),n=E2(),r=M2(),i=mU(),s=Ab(),o=z6();function l(u,h){if(Array.isArray(u))return u.map(m=>l(m));let{inputs:f,...p}=u;if(f){h=[];for(let m of f){let v={...m,__proto__:r.prototype};v.map&&(v.map={...v.map,__proto__:i.prototype}),h.push(v)}}if(p.nodes&&(p.nodes=u.nodes.map(m=>l(m,h))),p.source){let{inputId:m,...v}=p.source;p.source=v,m!=null&&(p.source.input=h[m])}if(p.type==="root")return new s(p);if(p.type==="decl")return new n(p);if(p.type==="rule")return new o(p);if(p.type==="comment")return new e(p);if(p.type==="atrule")return new t(p);throw new Error("Unknown node type: "+u.type)}return N_=l,l.default=l,N_}var P_,PI;function vU(){if(PI)return P_;PI=1;let{dirname:t,relative:e,resolve:n,sep:r}=tl,{SourceMapConsumer:i,SourceMapGenerator:s}=tl,{pathToFileURL:o}=tl,l=M2(),u=!!(i&&s),h=!!(t&&n&&e&&r);class f{constructor(m,v,b,x){this.stringify=m,this.mapOpts=b.map||{},this.root=v,this.opts=b,this.css=x,this.originalCSS=x,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let m;this.isInline()?m="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?m=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?m=this.mapOpts.annotation(this.opts.to,this.root):m=this.outputFile()+".map";let v=`
`;this.css.includes(`\r
`)&&(v=`\r
`),this.css+=v+"/*# sourceMappingURL="+m+" */"}applyPrevMaps(){for(let m of this.previous()){let v=this.toUrl(this.path(m.file)),b=m.root||t(m.file),x;this.mapOpts.sourcesContent===!1?(x=new i(m.text),x.sourcesContent&&(x.sourcesContent=null)):x=m.consumer(),this.map.applySourceMap(x,v,this.toUrl(this.path(b)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let m;for(let v=this.root.nodes.length-1;v>=0;v--)m=this.root.nodes[v],m.type==="comment"&&m.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(v)}else if(this.css){let m;for(;(m=this.css.lastIndexOf("/*#"))!==-1;){let v=this.css.indexOf("*/",m+3);if(v===-1)break;for(;m>0&&this.css[m-1]===`
`;)m--;this.css=this.css.slice(0,m)+this.css.slice(v+2)}}}}generate(){if(this.clearAnnotation(),h&&u&&this.isMap())return this.generateMap();{let m="";return this.stringify(this.root,v=>{m+=v}),[m]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let m=this.previous()[0].consumer();m.file=this.outputFile(),this.map=s.fromSourceMap(m,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let m=1,v=1,b="<no source>",x={generated:{column:0,line:0},original:{column:0,line:0},source:""},w,A;this.stringify(this.root,(j,C,_)=>{if(this.css+=j,C&&_!=="end"&&(x.generated.line=m,x.generated.column=v-1,C.source&&C.source.start?(x.source=this.sourcePath(C),x.original.line=C.source.start.line,x.original.column=C.source.start.column-1,this.map.addMapping(x)):(x.source=b,x.original.line=1,x.original.column=0,this.map.addMapping(x))),A=j.match(/\n/g),A?(m+=A.length,w=j.lastIndexOf(`
`),v=j.length-w):v+=j.length,C&&_!=="start"){let S=C.parent||{raws:{}};(!(C.type==="decl"||C.type==="atrule"&&!C.nodes)||C!==S.last||S.raws.semicolon)&&(C.source&&C.source.end?(x.source=this.sourcePath(C),x.original.line=C.source.end.line,x.original.column=C.source.end.column-1,x.generated.line=m,x.generated.column=v-2,this.map.addMapping(x)):(x.source=b,x.original.line=1,x.original.column=0,x.generated.line=m,x.generated.column=v-1,this.map.addMapping(x)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(m=>m.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let m=this.mapOpts.annotation;return typeof m<"u"&&m!==!0?!1:this.previous().length?this.previous().some(v=>v.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(m=>m.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(m){if(this.mapOpts.absolute||m.charCodeAt(0)===60||/^\w+:\/\//.test(m))return m;let v=this.memoizedPaths.get(m);if(v)return v;let b=this.opts.to?t(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(b=t(n(b,this.mapOpts.annotation)));let x=e(b,m);return this.memoizedPaths.set(m,x),x}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(m=>{if(m.source&&m.source.input.map){let v=m.source.input.map;this.previousMaps.includes(v)||this.previousMaps.push(v)}});else{let m=new l(this.originalCSS,this.opts);m.map&&this.previousMaps.push(m.map)}return this.previousMaps}setSourcesContent(){let m={};if(this.root)this.root.walk(v=>{if(v.source){let b=v.source.input.from;if(b&&!m[b]){m[b]=!0;let x=this.usesFileUrls?this.toFileUrl(b):this.toUrl(this.path(b));this.map.setSourceContent(x,v.source.input.css)}}});else if(this.css){let v=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(v,this.css)}}sourcePath(m){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(m.source.input.from):this.toUrl(this.path(m.source.input.from))}toBase64(m){return Buffer?Buffer.from(m).toString("base64"):window.btoa(unescape(encodeURIComponent(m)))}toFileUrl(m){let v=this.memoizedFileURLs.get(m);if(v)return v;if(o){let b=o(m).toString();return this.memoizedFileURLs.set(m,b),b}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(m){let v=this.memoizedURLs.get(m);if(v)return v;r==="\\"&&(m=m.replace(/\\/g,"/"));let b=encodeURI(m).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(m,b),b}}return P_=f,P_}var I_,II;function q1e(){if(II)return I_;II=1;const t=39,e=34,n=92,r=47,i=10,s=32,o=12,l=9,u=13,h=91,f=93,p=40,m=41,v=123,b=125,x=59,w=42,A=58,j=64,C=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,O=/[\da-f]/i;return I_=function(D,N={}){let I=D.css.valueOf(),R=N.ignoreErrors,L,Q,z,H,P,F,U,Z,G,W,X=I.length,V=0,te=[],le=[];function be(){return V}function ye(ae){throw D.error("Unclosed "+ae,V)}function Xe(){return le.length===0&&V>=X}function ze(ae){if(le.length)return le.pop();if(V>=X)return;let je=ae?ae.ignoreUnclosed:!1;switch(L=I.charCodeAt(V),L){case i:case s:case l:case u:case o:{H=V;do H+=1,L=I.charCodeAt(H);while(L===s||L===i||L===l||L===u||L===o);F=["space",I.slice(V,H)],V=H-1;break}case h:case f:case v:case b:case A:case x:case m:{let pe=String.fromCharCode(L);F=[pe,pe,V];break}case p:{if(W=te.length?te.pop()[1]:"",G=I.charCodeAt(V+1),W==="url"&&G!==t&&G!==e&&G!==s&&G!==i&&G!==l&&G!==o&&G!==u){H=V;do{if(U=!1,H=I.indexOf(")",H+1),H===-1)if(R||je){H=V;break}else ye("bracket");for(Z=H;I.charCodeAt(Z-1)===n;)Z-=1,U=!U}while(U);F=["brackets",I.slice(V,H+1),V,H],V=H}else H=I.indexOf(")",V+1),Q=I.slice(V,H+1),H===-1||S.test(Q)?F=["(","(",V]:(F=["brackets",Q,V,H],V=H);break}case t:case e:{P=L===t?"'":'"',H=V;do{if(U=!1,H=I.indexOf(P,H+1),H===-1)if(R||je){H=V+1;break}else ye("string");for(Z=H;I.charCodeAt(Z-1)===n;)Z-=1,U=!U}while(U);F=["string",I.slice(V,H+1),V,H],V=H;break}case j:{C.lastIndex=V+1,C.test(I),C.lastIndex===0?H=I.length-1:H=C.lastIndex-2,F=["at-word",I.slice(V,H+1),V,H],V=H;break}case n:{for(H=V,z=!0;I.charCodeAt(H+1)===n;)H+=1,z=!z;if(L=I.charCodeAt(H+1),z&&L!==r&&L!==s&&L!==i&&L!==l&&L!==u&&L!==o&&(H+=1,O.test(I.charAt(H)))){for(;O.test(I.charAt(H+1));)H+=1;I.charCodeAt(H+1)===s&&(H+=1)}F=["word",I.slice(V,H+1),V,H],V=H;break}default:{L===r&&I.charCodeAt(V+1)===w?(H=I.indexOf("*/",V+2)+1,H===0&&(R||je?H=I.length:ye("comment")),F=["comment",I.slice(V,H+1),V,H],V=H):(_.lastIndex=V+1,_.test(I),_.lastIndex===0?H=I.length-1:H=_.lastIndex-2,F=["word",I.slice(V,H+1),V,H],te.push(F),V=H);break}}return V++,F}function Re(ae){le.push(ae)}return{back:Re,endOfFile:Xe,nextToken:ze,position:be}},I_}var B_,BI;function $1e(){if(BI)return B_;BI=1;let t=F6(),e=O2(),n=E2(),r=Ab(),i=z6(),s=q1e();const o={empty:!0,space:!0};function l(h){for(let f=h.length-1;f>=0;f--){let p=h[f],m=p[3]||p[2];if(m)return m}}class u{constructor(f){this.input=f,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:f,start:{column:1,line:1,offset:0}}}atrule(f){let p=new t;p.name=f[1].slice(1),p.name===""&&this.unnamedAtrule(p,f),this.init(p,f[2]);let m,v,b,x=!1,w=!1,A=[],j=[];for(;!this.tokenizer.endOfFile();){if(f=this.tokenizer.nextToken(),m=f[0],m==="("||m==="["?j.push(m==="("?")":"]"):m==="{"&&j.length>0?j.push("}"):m===j[j.length-1]&&j.pop(),j.length===0)if(m===";"){p.source.end=this.getPosition(f[2]),p.source.end.offset++,this.semicolon=!0;break}else if(m==="{"){w=!0;break}else if(m==="}"){if(A.length>0){for(b=A.length-1,v=A[b];v&&v[0]==="space";)v=A[--b];v&&(p.source.end=this.getPosition(v[3]||v[2]),p.source.end.offset++)}this.end(f);break}else A.push(f);else A.push(f);if(this.tokenizer.endOfFile()){x=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(A),A.length?(p.raws.afterName=this.spacesAndCommentsFromStart(A),this.raw(p,"params",A),x&&(f=A[A.length-1],p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),w&&(p.nodes=[],this.current=p)}checkMissedSemicolon(f){let p=this.colon(f);if(p===!1)return;let m=0,v;for(let b=p-1;b>=0&&(v=f[b],!(v[0]!=="space"&&(m+=1,m===2)));b--);throw this.input.error("Missed semicolon",v[0]==="word"?v[3]+1:v[2])}colon(f){let p=0,m,v,b;for(let[x,w]of f.entries()){if(v=w,b=v[0],b==="("&&(p+=1),b===")"&&(p-=1),p===0&&b===":")if(!m)this.doubleColon(v);else{if(m[0]==="word"&&m[1]==="progid")continue;return x}m=v}return!1}comment(f){let p=new e;this.init(p,f[2]),p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++;let m=f[1].slice(2,-2);if(!m.trim())p.text="",p.raws.left=m,p.raws.right="";else{let v=m.match(/^(\s*)([^]*\S)(\s*)$/);p.text=v[2],p.raws.left=v[1],p.raws.right=v[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(f,p){let m=new n;this.init(m,f[0][2]);let v=f[f.length-1];for(v[0]===";"&&(this.semicolon=!0,f.pop()),m.source.end=this.getPosition(v[3]||v[2]||l(f)),m.source.end.offset++;f[0][0]!=="word";)f.length===1&&this.unknownWord(f),m.raws.before+=f.shift()[1];for(m.source.start=this.getPosition(f[0][2]),m.prop="";f.length;){let j=f[0][0];if(j===":"||j==="space"||j==="comment")break;m.prop+=f.shift()[1]}m.raws.between="";let b;for(;f.length;)if(b=f.shift(),b[0]===":"){m.raws.between+=b[1];break}else b[0]==="word"&&/\w/.test(b[1])&&this.unknownWord([b]),m.raws.between+=b[1];(m.prop[0]==="_"||m.prop[0]==="*")&&(m.raws.before+=m.prop[0],m.prop=m.prop.slice(1));let x=[],w;for(;f.length&&(w=f[0][0],!(w!=="space"&&w!=="comment"));)x.push(f.shift());this.precheckMissedSemicolon(f);for(let j=f.length-1;j>=0;j--){if(b=f[j],b[1].toLowerCase()==="!important"){m.important=!0;let C=this.stringFrom(f,j);C=this.spacesFromEnd(f)+C,C!==" !important"&&(m.raws.important=C);break}else if(b[1].toLowerCase()==="important"){let C=f.slice(0),_="";for(let S=j;S>0;S--){let O=C[S][0];if(_.trim().startsWith("!")&&O!=="space")break;_=C.pop()[1]+_}_.trim().startsWith("!")&&(m.important=!0,m.raws.important=_,f=C)}if(b[0]!=="space"&&b[0]!=="comment")break}f.some(j=>j[0]!=="space"&&j[0]!=="comment")&&(m.raws.between+=x.map(j=>j[1]).join(""),x=[]),this.raw(m,"value",x.concat(f),p),m.value.includes(":")&&!p&&this.checkMissedSemicolon(f)}doubleColon(f){throw this.input.error("Double colon",{offset:f[2]},{offset:f[2]+f[1].length})}emptyRule(f){let p=new i;this.init(p,f[2]),p.selector="",p.raws.between="",this.current=p}end(f){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(f[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(f)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(f){if(this.spaces+=f[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="",p.source.end=this.getPosition(f[2]),p.source.end.offset+=p.raws.ownSemicolon.length)}}getPosition(f){let p=this.input.fromOffset(f);return{column:p.col,line:p.line,offset:f}}init(f,p){this.current.push(f),f.source={input:this.input,start:this.getPosition(p)},f.raws.before=this.spaces,this.spaces="",f.type!=="comment"&&(this.semicolon=!1)}other(f){let p=!1,m=null,v=!1,b=null,x=[],w=f[1].startsWith("--"),A=[],j=f;for(;j;){if(m=j[0],A.push(j),m==="("||m==="[")b||(b=j),x.push(m==="("?")":"]");else if(w&&v&&m==="{")b||(b=j),x.push("}");else if(x.length===0)if(m===";")if(v){this.decl(A,w);return}else break;else if(m==="{"){this.rule(A);return}else if(m==="}"){this.tokenizer.back(A.pop()),p=!0;break}else m===":"&&(v=!0);else m===x[x.length-1]&&(x.pop(),x.length===0&&(b=null));j=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),x.length>0&&this.unclosedBracket(b),p&&v){if(!w)for(;A.length&&(j=A[A.length-1][0],!(j!=="space"&&j!=="comment"));)this.tokenizer.back(A.pop());this.decl(A,w)}else this.unknownWord(A)}parse(){let f;for(;!this.tokenizer.endOfFile();)switch(f=this.tokenizer.nextToken(),f[0]){case"space":this.spaces+=f[1];break;case";":this.freeSemicolon(f);break;case"}":this.end(f);break;case"comment":this.comment(f);break;case"at-word":this.atrule(f);break;case"{":this.emptyRule(f);break;default:this.other(f);break}this.endFile()}precheckMissedSemicolon(){}raw(f,p,m,v){let b,x,w=m.length,A="",j=!0,C,_;for(let S=0;S<w;S+=1)b=m[S],x=b[0],x==="space"&&S===w-1&&!v?j=!1:x==="comment"?(_=m[S-1]?m[S-1][0]:"empty",C=m[S+1]?m[S+1][0]:"empty",!o[_]&&!o[C]?A.slice(-1)===","?j=!1:A+=b[1]:j=!1):A+=b[1];if(!j){let S=m.reduce((O,E)=>O+E[1],"");f.raws[p]={raw:S,value:A}}f[p]=A}rule(f){f.pop();let p=new i;this.init(p,f[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(f),this.raw(p,"selector",f),this.current=p}spacesAndCommentsFromEnd(f){let p,m="";for(;f.length&&(p=f[f.length-1][0],!(p!=="space"&&p!=="comment"));)m=f.pop()[1]+m;return m}spacesAndCommentsFromStart(f){let p,m="";for(;f.length&&(p=f[0][0],!(p!=="space"&&p!=="comment"));)m+=f.shift()[1];return m}spacesFromEnd(f){let p,m="";for(;f.length&&(p=f[f.length-1][0],p==="space");)m=f.pop()[1]+m;return m}stringFrom(f,p){let m="";for(let v=p;v<f.length;v++)m+=f[v][1];return f.splice(p,f.length-p),m}unclosedBlock(){let f=this.current.source.start;throw this.input.error("Unclosed block",f.line,f.column)}unclosedBracket(f){throw this.input.error("Unclosed bracket",{offset:f[2]},{offset:f[2]+1})}unexpectedClose(f){throw this.input.error("Unexpected }",{offset:f[2]},{offset:f[2]+1})}unknownWord(f){throw this.input.error("Unknown word "+f[0][1],{offset:f[0][2]},{offset:f[0][2]+f[0][1].length})}unnamedAtrule(f,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return B_=u,B_}var L_,LI;function q6(){if(LI)return L_;LI=1;let t=Rf(),e=M2(),n=$1e();function r(i,s){let o=new e(i,s),l=new n(o);try{l.parse()}catch(u){throw u}return l.root}return L_=r,r.default=r,t.registerParse(r),L_}var F_,FI;function bU(){if(FI)return F_;FI=1;class t{constructor(n,r={}){if(this.type="warning",this.text=n,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return F_=t,t.default=t,F_}var H_,HI;function $6(){if(HI)return H_;HI=1;let t=bU();class e{get content(){return this.css}constructor(r,i,s){this.processor=r,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(r,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(r,i);return this.messages.push(s),s}warnings(){return this.messages.filter(r=>r.type==="warning")}}return H_=e,e.default=e,H_}var z_,zI;function yU(){if(zI)return z_;zI=1;let t=Rf(),e=H6(),n=vU(),r=q6(),i=$6(),s=Ab(),o=T2(),{isClean:l,my:u}=L6();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function v(C){return typeof C=="object"&&typeof C.then=="function"}function b(C){let _=!1,S=h[C.type];return C.type==="decl"?_=C.prop.toLowerCase():C.type==="atrule"&&(_=C.name.toLowerCase()),_&&C.append?[S,S+"-"+_,m,S+"Exit",S+"Exit-"+_]:_?[S,S+"-"+_,S+"Exit",S+"Exit-"+_]:C.append?[S,m,S+"Exit"]:[S,S+"Exit"]}function x(C){let _;return C.type==="document"?_=["Document",m,"DocumentExit"]:C.type==="root"?_=["Root",m,"RootExit"]:_=b(C),{eventIndex:0,events:_,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(_=>w(_)),C}let A={};class j{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(_,S,O){this.stringified=!1,this.processed=!1;let E;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))E=w(S);else if(S instanceof j||S instanceof i)E=w(S.root),S.map&&(typeof O.map>"u"&&(O.map={}),O.map.inline||(O.map.inline=!1),O.map.prev=S.map);else{let D=r;O.syntax&&(D=O.syntax.parse),O.parser&&(D=O.parser),D.parse&&(D=D.parse);try{E=D(S,O)}catch(N){this.processed=!0,this.error=N}E&&!E[u]&&t.rebuild(E)}this.result=new i(_,E,O),this.helpers={...A,postcss:A,result:this.result},this.plugins=this.processor.plugins.map(D=>typeof D=="object"&&D.prepare?{...D,...D.prepare(this.result)}:D)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(_){return this.async().catch(_)}finally(_){return this.async().then(_,_)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(_,S){let O=this.result.lastPlugin;try{S&&S.addToError(_),this.error=_,_.name==="CssSyntaxError"&&!_.plugin?(_.plugin=O.postcssPlugin,_.setMessage()):O.postcssVersion}catch(E){console&&console.error&&console.error(E)}return _}prepareVisitors(){this.listeners={};let _=(S,O,E)=>{this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push([S,E])};for(let S of this.plugins)if(typeof S=="object")for(let O in S){if(!f[O]&&/^[A-Z]/.test(O))throw new Error(`Unknown event ${O} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[O])if(typeof S[O]=="object")for(let E in S[O])E==="*"?_(S,O,S[O][E]):_(S,O+"-"+E.toLowerCase(),S[O][E]);else typeof S[O]=="function"&&_(S,O,S[O])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let _=0;_<this.plugins.length;_++){let S=this.plugins[_],O=this.runOnRoot(S);if(v(O))try{await O}catch(E){throw this.handleError(E)}}if(this.prepareVisitors(),this.hasListener){let _=this.result.root;for(;!_[l];){_[l]=!0;let S=[x(_)];for(;S.length>0;){let O=this.visitTick(S);if(v(O))try{await O}catch(E){let D=S[S.length-1].node;throw this.handleError(E,D)}}}if(this.listeners.OnceExit)for(let[S,O]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(_.type==="document"){let E=_.nodes.map(D=>O(D,this.helpers));await Promise.all(E)}else await O(_,this.helpers)}catch(E){throw this.handleError(E)}}}return this.processed=!0,this.stringify()}runOnRoot(_){this.result.lastPlugin=_;try{if(typeof _=="object"&&_.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(O=>_.Once(O,this.helpers));return v(S[0])?Promise.all(S):S}return _.Once(this.result.root,this.helpers)}else if(typeof _=="function")return _(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let _=this.result.opts,S=o;_.syntax&&(S=_.syntax.stringify),_.stringifier&&(S=_.stringifier),S.stringify&&(S=S.stringify);let E=new n(S,this.result.root,this.result.opts).generate();return this.result.css=E[0],this.result.map=E[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let _ of this.plugins){let S=this.runOnRoot(_);if(v(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let _=this.result.root;for(;!_[l];)_[l]=!0,this.walkSync(_);if(this.listeners.OnceExit)if(_.type==="document")for(let S of _.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,_)}return this.result}then(_,S){return this.async().then(_,S)}toString(){return this.css}visitSync(_,S){for(let[O,E]of _){this.result.lastPlugin=O;let D;try{D=E(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(v(D))throw this.getAsyncError()}}visitTick(_){let S=_[_.length-1],{node:O,visitors:E}=S;if(O.type!=="root"&&O.type!=="document"&&!O.parent){_.pop();return}if(E.length>0&&S.visitorIndex<E.length){let[N,I]=E[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===E.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return I(O.toProxy(),this.helpers)}catch(R){throw this.handleError(R,O)}}if(S.iterator!==0){let N=S.iterator,I;for(;I=O.nodes[O.indexes[N]];)if(O.indexes[N]+=1,!I[l]){I[l]=!0,_.push(x(I));return}S.iterator=0,delete O.indexes[N]}let D=S.events;for(;S.eventIndex<D.length;){let N=D[S.eventIndex];if(S.eventIndex+=1,N===m){O.nodes&&O.nodes.length&&(O[l]=!0,S.iterator=O.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}_.pop()}walkSync(_){_[l]=!0;let S=b(_);for(let O of S)if(O===m)_.nodes&&_.each(E=>{E[l]||this.walkSync(E)});else{let E=this.listeners[O];if(E&&this.visitSync(E,_.toProxy()))return}}warnings(){return this.sync().warnings()}}return j.registerPostcss=C=>{A=C},z_=j,j.default=j,s.registerLazyResult(j),e.registerLazyResult(j),z_}var q_,qI;function Q1e(){if(qI)return q_;qI=1;let t=vU(),e=q6();const n=$6();let r=T2();class i{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let o,l=e;try{o=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=o,o}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(o,l,u){l=l.toString(),this.stringified=!1,this._processor=o,this._css=l,this._opts=u,this._map=void 0;let h=r;this.result=new n(this._processor,void 0,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let p=new t(h,void 0,this._opts,l);if(p.isMap()){let[m,v]=p.generate();m&&(this.result.css=m),v&&(this.result.map=v)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(o){return this.async().catch(o)}finally(o){return this.async().then(o,o)}sync(){if(this.error)throw this.error;return this.result}then(o,l){return this.async().then(o,l)}toString(){return this._css}warnings(){return[]}}return q_=i,i.default=i,q_}var $_,$I;function U1e(){if($I)return $_;$I=1;let t=H6(),e=yU(),n=Q1e(),r=Ab();class i{constructor(o=[]){this.version="8.5.8",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new n(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return $_=i,i.default=i,r.registerProcessor(i),t.registerProcessor(i),$_}var Q_,QI;function W1e(){if(QI)return Q_;QI=1;var t={};let e=F6(),n=O2(),r=Rf(),i=B6(),s=E2(),o=H6(),l=z1e(),u=M2(),h=yU(),f=gU(),p=k2(),m=q6(),v=U1e(),b=$6(),x=Ab(),w=z6(),A=T2(),j=bU();function C(..._){return _.length===1&&Array.isArray(_[0])&&(_=_[0]),new v(_)}return C.plugin=function(S,O){let E=!1;function D(...I){console&&console.warn&&!E&&(E=!0,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),t.LANG&&t.LANG.startsWith("cn")&&console.warn(S+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let R=O(...I);return R.postcssPlugin=S,R.postcssVersion=new v().version,R}let N;return Object.defineProperty(D,"postcss",{get(){return N||(N=D()),N}}),D.process=function(I,R,L){return C([D(L)]).process(I,R)},D},C.stringify=A,C.parse=m,C.fromJSON=l,C.list=f,C.comment=_=>new n(_),C.atRule=_=>new e(_),C.decl=_=>new s(_),C.rule=_=>new w(_),C.root=_=>new x(_),C.document=_=>new o(_),C.CssSyntaxError=i,C.Declaration=s,C.Container=r,C.Processor=v,C.Document=o,C.Comment=n,C.Warning=j,C.AtRule=e,C.Result=b,C.Input=u,C.Rule=w,C.Root=x,C.Node=p,h.registerPostcss(C),Q_=C,C.default=C,Q_}var U_,UI;function V1e(){if(UI)return U_;UI=1;const t=M1e(),e=D1e(),{isPlainObject:n}=R1e(),r=N1e(),i=I1e(),{parse:s}=W1e(),o=["img","audio","video","picture","svg","object","map","iframe","embed"],l=["script","style"];function u(w,A){w&&Object.keys(w).forEach(function(j){A(w[j],j)})}function h(w,A){return{}.hasOwnProperty.call(w,A)}function f(w,A){const j=[];return u(w,function(C){A(C)&&j.push(C)}),j}function p(w){for(const A in w)if(h(w,A))return!1;return!0}function m(w){return w.map(function(A){if(!A.url)throw new Error("URL missing");return A.url+(A.w?` ${A.w}w`:"")+(A.h?` ${A.h}h`:"")+(A.d?` ${A.d}x`:"")}).join(", ")}U_=b;const v=/^[^\0\t\n\f\r /<=>]+$/;function b(w,A,j){if(w==null)return"";typeof w=="number"&&(w=w.toString());let C="",_="";function S(ae,je){const pe=this;this.tag=ae,this.attribs=je||{},this.tagPosition=C.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){if(P.length){const ke=P[P.length-1];ke.text+=pe.text}},this.updateParentNodeMediaChildren=function(){P.length&&o.includes(this.tag)&&P[P.length-1].mediaChildren.push(this.tag)}}A=Object.assign({},b.defaults,A),A.parser=Object.assign({},x,A.parser);const O=function(ae){return A.allowedTags===!1||(A.allowedTags||[]).indexOf(ae)>-1};l.forEach(function(ae){O(ae)&&!A.allowVulnerableTags&&console.warn(`

⚠️ Your \`allowedTags\` option includes, \`${ae}\`, which is inherently
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
Or, to disable this warning, add the \`allowVulnerableTags\` option
and ensure you are accounting for this risk.

`)});const E=A.nonTextTags||["script","style","textarea","option"];let D,N;A.allowedAttributes&&(D={},N={},u(A.allowedAttributes,function(ae,je){D[je]=[];const pe=[];ae.forEach(function(ke){typeof ke=="string"&&ke.indexOf("*")>=0?pe.push(e(ke).replace(/\\\*/g,".*")):D[je].push(ke)}),pe.length&&(N[je]=new RegExp("^("+pe.join("|")+")$"))}));const I={},R={},L={};u(A.allowedClasses,function(ae,je){if(D&&(h(D,je)||(D[je]=[]),D[je].push("class")),I[je]=ae,Array.isArray(ae)){const pe=[];I[je]=[],L[je]=[],ae.forEach(function(ke){typeof ke=="string"&&ke.indexOf("*")>=0?pe.push(e(ke).replace(/\\\*/g,".*")):ke instanceof RegExp?L[je].push(ke):I[je].push(ke)}),pe.length&&(R[je]=new RegExp("^("+pe.join("|")+")$"))}});const Q={};let z;u(A.transformTags,function(ae,je){let pe;typeof ae=="function"?pe=ae:typeof ae=="string"&&(pe=b.simpleTransform(ae)),je==="*"?z=pe:Q[je]=pe});let H,P,F,U,Z,G,W=!1;V();const X=new t.Parser({onopentag:function(ae,je){if(A.onOpenTag&&A.onOpenTag(ae,je),A.enforceHtmlBoundary&&ae==="html"&&V(),Z){G++;return}const pe=new S(ae,je);P.push(pe);let ke=!1;const gt=!!pe.text;let We;if(h(Q,ae)&&(We=Q[ae](ae,je),pe.attribs=je=We.attribs,We.text!==void 0&&(pe.innerText=We.text),ae!==We.tagName&&(pe.name=ae=We.tagName,U[H]=We.tagName)),z&&(We=z(ae,je),pe.attribs=je=We.attribs,ae!==We.tagName&&(pe.name=ae=We.tagName,U[H]=We.tagName)),(!O(ae)||A.disallowedTagsMode==="recursiveEscape"&&!p(F)||A.nestingLimit!=null&&H>=A.nestingLimit)&&(ke=!0,F[H]=!0,(A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&E.indexOf(ae)!==-1&&(Z=!0,G=1)),H++,ke){if(A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard"){if(pe.innerText&&!gt){const Ne=te(pe.innerText);A.textFilter?C+=A.textFilter(Ne,ae):C+=Ne,W=!0}return}_=C,C=""}C+="<"+ae,ae==="script"&&(A.allowedScriptHostnames||A.allowedScriptDomains)&&(pe.innerText=""),ke&&(A.disallowedTagsMode==="escape"||A.disallowedTagsMode==="recursiveEscape")&&A.preserveEscapedAttributes?u(je,function(Ne,Ve){C+=" "+Ve+'="'+te(Ne||"",!0)+'"'}):(!D||h(D,ae)||D["*"])&&u(je,function(Ne,Ve){if(!v.test(Ve)){delete pe.attribs[Ve];return}if(Ne===""&&!A.allowedEmptyAttributes.includes(Ve)&&(A.nonBooleanAttributes.includes(Ve)||A.nonBooleanAttributes.includes("*"))){delete pe.attribs[Ve];return}let qt=!1;if(!D||h(D,ae)&&D[ae].indexOf(Ve)!==-1||D["*"]&&D["*"].indexOf(Ve)!==-1||h(N,ae)&&N[ae].test(Ve)||N["*"]&&N["*"].test(Ve))qt=!0;else if(D&&D[ae]){for(const et of D[ae])if(n(et)&&et.name&&et.name===Ve){qt=!0;let Je="";if(et.multiple===!0){const Ue=Ne.split(" ");for(const Pe of Ue)et.values.indexOf(Pe)!==-1&&(Je===""?Je=Pe:Je+=" "+Pe)}else et.values.indexOf(Ne)>=0&&(Je=Ne);Ne=Je}}if(qt){if(A.allowedSchemesAppliedToAttributes.indexOf(Ve)!==-1&&le(ae,Ne)){delete pe.attribs[Ve];return}if(ae==="script"&&Ve==="src"){let et=!0;try{const Je=be(Ne);if(A.allowedScriptHostnames||A.allowedScriptDomains){const Ue=(A.allowedScriptHostnames||[]).find(function(st){return st===Je.url.hostname}),Pe=(A.allowedScriptDomains||[]).find(function(st){return Je.url.hostname===st||Je.url.hostname.endsWith(`.${st}`)});et=Ue||Pe}}catch{et=!1}if(!et){delete pe.attribs[Ve];return}}if(ae==="iframe"&&Ve==="src"){let et=!0;try{const Je=be(Ne);if(Je.isRelativeUrl)et=h(A,"allowIframeRelativeUrls")?A.allowIframeRelativeUrls:!A.allowedIframeHostnames&&!A.allowedIframeDomains;else if(A.allowedIframeHostnames||A.allowedIframeDomains){const Ue=(A.allowedIframeHostnames||[]).find(function(st){return st===Je.url.hostname}),Pe=(A.allowedIframeDomains||[]).find(function(st){return Je.url.hostname===st||Je.url.hostname.endsWith(`.${st}`)});et=Ue||Pe}}catch{et=!1}if(!et){delete pe.attribs[Ve];return}}if(Ve==="srcset")try{let et=i(Ne);if(et.forEach(function(Je){le("srcset",Je.url)&&(Je.evil=!0)}),et=f(et,function(Je){return!Je.evil}),et.length)Ne=m(f(et,function(Je){return!Je.evil})),pe.attribs[Ve]=Ne;else{delete pe.attribs[Ve];return}}catch{delete pe.attribs[Ve];return}if(Ve==="class"){const et=I[ae],Je=I["*"],Ue=R[ae],Pe=L[ae],st=L["*"],he=R["*"],dt=[Ue,he].concat(Pe,st).filter(function(sn){return sn});if(et&&Je?Ne=Re(Ne,r(et,Je),dt):Ne=Re(Ne,et||Je,dt),!Ne.length){delete pe.attribs[Ve];return}}if(Ve==="style"){if(A.parseStyleAttributes)try{const et=s(ae+" {"+Ne+"}",{map:!1}),Je=ye(et,A.allowedStyles);if(Ne=Xe(Je),Ne.length===0){delete pe.attribs[Ve];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+ae+" {"+Ne+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete pe.attribs[Ve];return}else if(A.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}C+=" "+Ve,Ne&&Ne.length?C+='="'+te(Ne,!0)+'"':A.allowedEmptyAttributes.includes(Ve)&&(C+='=""')}else delete pe.attribs[Ve]}),A.selfClosing.indexOf(ae)!==-1?C+=" />":(C+=">",pe.innerText&&!gt&&!A.textFilter&&(C+=te(pe.innerText),W=!0)),ke&&(C=_+te(C),_=""),pe.openingTagLength=C.length-pe.tagPosition},ontext:function(ae){if(Z)return;const je=P[P.length-1];let pe;if(je&&(pe=je.tag,ae=je.innerText!==void 0?je.innerText:ae),A.disallowedTagsMode==="completelyDiscard"&&!O(pe))ae="";else if((A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&(pe==="script"||pe==="style"))C+=ae;else if((A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&E.indexOf(pe)!==-1)C+=ae;else if(!W){const ke=te(ae,!1);A.textFilter?C+=A.textFilter(ke,pe):C+=ke}if(P.length){const ke=P[P.length-1];ke.text+=ae}},onclosetag:function(ae,je){if(A.onCloseTag&&A.onCloseTag(ae,je),Z)if(G--,!G)Z=!1;else return;const pe=P.pop();if(!pe)return;if(pe.tag!==ae){P.push(pe);return}Z=A.enforceHtmlBoundary?ae==="html":!1,H--;const ke=F[H];if(ke){if(delete F[H],A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard"){pe.updateParentNodeText();return}_=C,C=""}if(U[H]&&(ae=U[H],delete U[H]),A.exclusiveFilter){const gt=A.exclusiveFilter(pe);if(gt==="excludeTag"){ke&&(C=_,_=""),C=C.substring(0,pe.tagPosition)+C.substring(pe.tagPosition+pe.openingTagLength);return}else if(gt){C=C.substring(0,pe.tagPosition);return}}if(pe.updateParentNodeMediaChildren(),pe.updateParentNodeText(),A.selfClosing.indexOf(ae)!==-1||je&&!O(ae)&&["escape","recursiveEscape"].indexOf(A.disallowedTagsMode)>=0){ke&&(C=_,_="");return}C+="</"+ae+">",ke&&(C=_+te(C),_=""),W=!1}},A.parser);if(X.write(w),X.end(),A.disallowedTagsMode==="escape"||A.disallowedTagsMode==="recursiveEscape"){const ae=X.endIndex;if(ae!=null&&ae>=0&&ae<w.length){const je=w.substring(ae);C+=te(je)}else(ae==null||ae<0)&&w.length>0&&C===""&&(C=te(w))}return C;function V(){C="",H=0,P=[],F={},U={},Z=!1,G=0}function te(ae,je){return typeof ae!="string"&&(ae=ae+""),A.parser.decodeEntities&&(ae=ae.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),je&&(ae=ae.replace(/"/g,"&quot;"))),ae=ae.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),je&&(ae=ae.replace(/"/g,"&quot;")),ae}function le(ae,je){for(je=je.replace(/[\x00-\x20]+/g,"");;){const gt=je.indexOf("<!--");if(gt===-1)break;const We=je.indexOf("-->",gt+4);if(We===-1)break;je=je.substring(0,gt)+je.substring(We+3)}const pe=je.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!pe)return je.match(/^[/\\]{2}/)?!A.allowProtocolRelative:!1;const ke=pe[1].toLowerCase();return h(A.allowedSchemesByTag,ae)?A.allowedSchemesByTag[ae].indexOf(ke)===-1:!A.allowedSchemes||A.allowedSchemes.indexOf(ke)===-1}function be(ae){if(ae=ae.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),ae.startsWith("relative:"))throw new Error("relative: exploit attempt");let je="relative://relative-site";for(let gt=0;gt<100;gt++)je+=`/${gt}`;const pe=new URL(ae,je);return{isRelativeUrl:pe&&pe.hostname==="relative-site"&&pe.protocol==="relative:",url:pe}}function ye(ae,je){if(!je)return ae;const pe=ae.nodes[0];let ke;return je[pe.selector]&&je["*"]?ke=r(je[pe.selector],je["*"]):ke=je[pe.selector]||je["*"],ke&&(ae.nodes[0].nodes=pe.nodes.reduce(ze(ke),[])),ae}function Xe(ae){return ae.nodes[0].nodes.reduce(function(je,pe){return je.push(`${pe.prop}:${pe.value}${pe.important?" !important":""}`),je},[]).join(";")}function ze(ae){return function(je,pe){return h(ae,pe.prop)&&ae[pe.prop].some(function(gt){return gt.test(pe.value)})&&je.push(pe),je}}function Re(ae,je,pe){return je?(ae=ae.split(/\s+/),ae.filter(function(ke){return je.indexOf(ke)!==-1||pe.some(function(gt){return gt.test(ke)})}).join(" ")):ae}}const x={decodeEntities:!0};return b.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},b.simpleTransform=function(w,A,j){return j=j===void 0?!0:j,A=A||{},function(C,_){let S;if(j)for(S in A)_[S]=A[S];else _=A;return{tagName:w,attribs:_}}},U_}var Y1e=V1e();const G1e=ll(Y1e);var vt=(t=>(t.aggregation="aggregation",t.binaryExpr="binaryExpr",t.call="call",t.matrixSelector="matrixSelector",t.subquery="subquery",t.numberLiteral="numberLiteral",t.parenExpr="parenExpr",t.stringLiteral="stringLiteral",t.unaryExpr="unaryExpr",t.vectorSelector="vectorSelector",t.placeholder="placeholder",t))(vt||{}),Xt=(t=>(t.add="+",t.sub="-",t.mul="*",t.div="/",t.mod="%",t.pow="^",t.eql="==",t.neq="!=",t.gtr=">",t.lss="<",t.trimUpper="</",t.trimLower=">/",t.gte=">=",t.lte="<=",t.and="and",t.or="or",t.unless="unless",t.atan2="atan2",t))(Xt||{});const X1e=["==","!=",">","<",">=","<="],K1e=["and","or","unless"];var Cr=(t=>(t.oneToOne="one-to-one",t.manyToOne="many-to-one",t.oneToMany="one-to-many",t.manyToMany="many-to-many",t))(Cr||{}),oe=(t=>(t.none="none",t.vector="vector",t.scalar="scalar",t.matrix="matrix",t.string="string",t))(oe||{}),fo=(t=>(t.equal="=",t.notEqual="!=",t.matchRegexp="=~",t.matchNotRegexp="!~",t))(fo||{});const Eh=t=>t.replace(/([\\"])/g,"\\$1"),Q6=t=>X1e.includes(t),fk=t=>K1e.includes(t),WI={[Xt.add]:3,[Xt.sub]:3,[Xt.mul]:2,[Xt.div]:2,[Xt.mod]:2,[Xt.pow]:1,[Xt.eql]:4,[Xt.neq]:4,[Xt.gtr]:4,[Xt.lss]:4,[Xt.gte]:4,[Xt.lte]:4,[Xt.trimLower]:4,[Xt.trimUpper]:4,[Xt.and]:5,[Xt.or]:6,[Xt.unless]:5,[Xt.atan2]:2},NA=(t,e)=>e.type!==vt.binaryExpr||WI[t]>WI[e.op]?e:{type:vt.parenExpr,expr:e},Z1e=t=>{switch(t.type){case vt.aggregation:return t.param===null?[t.expr]:[t.param,t.expr];case vt.subquery:return[t.expr];case vt.parenExpr:return[t.expr];case vt.call:return t.args;case vt.matrixSelector:case vt.vectorSelector:case vt.numberLiteral:case vt.stringLiteral:return[];case vt.placeholder:return t.children;case vt.unaryExpr:return[t.expr];case vt.binaryExpr:return[t.lhs,t.rhs];default:throw new Error("unsupported node type")}},Np=t=>{switch(t.type){case vt.aggregation:return oe.vector;case vt.binaryExpr:{const e=[Np(t.lhs),Np(t.rhs)];return e.includes(null)?null:e.includes(oe.vector)?oe.vector:oe.scalar}case vt.call:return t.func.returnType;case vt.matrixSelector:return oe.matrix;case vt.numberLiteral:return oe.scalar;case vt.parenExpr:return Np(t.expr);case vt.placeholder:return null;case vt.stringLiteral:return oe.string;case vt.subquery:return oe.matrix;case vt.unaryExpr:return Np(t.expr);case vt.vectorSelector:return oe.vector;default:throw new Error("invalid node type")}},J1e=["topk","bottomk","quantile","count_values","limitk","limit_ratio"];oe.scalar,oe.string,oe.matrix,oe.vector;oe.none+"",oe.string+"",oe.scalar+"",oe.vector+"",oe.matrix+"";const exe=/^[a-zA-Z_:][a-zA-Z0-9_:]*$/,txe=/^[a-zA-Z_][a-zA-Z0-9_]*$/,D2=t=>t!==""&&!exe.test(t),nxe=t=>!txe.test(t),ss=t=>t.replace(/([\\"])/g,"\\$1"),$h=t=>nxe(t)?`"${ss(t)}"`:t,M1=t=>t.map(e=>$h(e)).join(", "),xU=(t,e,n)=>`${t!==null?` @ ${(t/1e3).toFixed(3)}`:e!==null?` @ ${e}()`:""}${n===0?"":n>0?` offset ${Hn(n)}`:` offset -${Hn(-n)}`}`,VI=t=>{var l;const e=t.matchers.filter(u=>!(u.name==="__name__"&&u.type===fo.equal)).map(u=>`${$h(u.name)}${u.type}"${ss(u.value)}"`),n=t.name||((l=t.matchers.find(u=>u.name==="__name__"&&u.type===fo.equal))==null?void 0:l.value)||"",r=D2(n);r&&e.unshift(`"${ss(n)}"`);const i=t.type===vt.matrixSelector?`[${Hn(t.range)}]`:"",s=t.anchored?" anchored":t.smoothed?" smoothed":"",o=xU(t.timestamp,t.startOrEnd,t.offset);return`${r?"":n}${e.length>0?`{${e.join(",")}}`:""}${i}${s}${o}`},is=(t,e=0,n=!1,r=!0)=>{const i=n?`
`:"",s=n?`
`:" ",o=e+2,l=n?" ".repeat(e):"",u=r?l:"";switch(t.type){case vt.aggregation:return`${u}${t.op}${t.without?` without(${M1(t.grouping)}) `:t.grouping.length>0?` by(${M1(t.grouping)}) `:""}(${i}${J1e.includes(t.op)&&t.param!==null?`${is(t.param,o,n)},${s}`:""}${is(t.expr,o,n)}${i}${l})`;case vt.subquery:return`${u}${is(t.expr,e,n)}[${Hn(t.range)}:${t.step!==0?Hn(t.step):""}]${xU(t.timestamp,t.startOrEnd,t.offset)}`;case vt.parenExpr:return`${u}(${i}${is(t.expr,o,n)}${i}${l})`;case vt.call:{const h=t.args.length>0?i:"";return`${u}${t.func.name}(${h}${t.args.map(f=>is(f,o,n)).join(","+s)}${h}${t.args.length>0?l:""})`}case vt.matrixSelector:return`${u}${VI(t)}`;case vt.vectorSelector:return`${u}${VI(t)}`;case vt.numberLiteral:return`${u}${t.val}`;case vt.stringLiteral:return`${u}"${ss(t.val)}"`;case vt.unaryExpr:return`${u}${t.op}${is(t.expr,e,n,!1)}`;case vt.binaryExpr:{let h="",f="",p="";const m=t.matching;if(m!==null){(m.labels.length>0||m.on||m.card===Cr.manyToOne||m.card===Cr.oneToMany)&&(h=` ${m.on?"on":"ignoring"}(${M1(m.labels)})`),(m.card===Cr.manyToOne||m.card===Cr.oneToMany)&&(f=` group_${m.card===Cr.manyToOne?"left":"right"}(${M1(m.include)})`);const v=m.fillValues.lhs,b=m.fillValues.rhs;(v!==null||b!==null)&&(v===b?p=` fill(${v})`:(v!==null&&(p+=` fill_left(${v})`),b!==null&&(p+=` fill_right(${b})`)))}return`${is(NA(t.op,t.lhs),o,n)}${s}${l}${t.op}${t.bool?" bool":""}${h}${f}${p}${s}${is(NA(t.op,t.rhs),o,n)}`}case vt.placeholder:return`${u}…${t.children.length>0?`(${i}${t.children.map(h=>is(h,o,n)).join(","+s)}${i}${l})`:""}`;default:throw new Error("unsupported node type")}},aa=t=>t.map((e,n)=>a.jsxs("span",{children:[n!==0&&", ",a.jsx("span",{className:"promql-code promql-label-name",children:$h(e)})]},n)),AU=(t,e,n)=>a.jsxs(a.Fragment,{children:[t!==null?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-operator",children:"@"})," ",a.jsx("span",{className:"promql-number",children:(t/1e3).toFixed(3)})]}):e!==null?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-operator",children:"@"})," ",a.jsx("span",{className:"promql-keyword",children:e}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-paren",children:")"})]}):a.jsx(a.Fragment,{}),n===0?a.jsx(a.Fragment,{}):n>0?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"offset"})," ",a.jsx("span",{className:"promql-duration",children:Hn(n)})]}):a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"offset"})," ",a.jsxs("span",{className:"promql-duration",children:["-",Hn(-n)]})]})]}),YI=t=>{var i;const e=[],n=t.name||((i=t.matchers.find(s=>s.name==="__name__"&&s.type===fo.equal))==null?void 0:i.value)||"",r=D2(n);return r&&e.push(a.jsx("span",{children:a.jsxs("span",{className:"promql-string",children:['"',ss(n),'"']})},"__name__")),e.push(...t.matchers.filter(s=>!(s.name==="__name__"&&s.type===fo.equal)).map((s,o)=>a.jsxs("span",{children:[(o!==0||r)&&",",a.jsx("span",{className:"promql-label-name",children:$h(s.name)}),s.type,a.jsxs("span",{className:"promql-string",children:['"',ss(s.value),'"']})]},o))),a.jsxs(a.Fragment,{children:[!r&&a.jsx("span",{className:"promql-metric-name",children:n}),e.length>0&&a.jsxs(a.Fragment,{children:["{",a.jsx("span",{className:"promql-metric-name",children:e}),"}"]}),t.type===vt.matrixSelector&&a.jsxs(a.Fragment,{children:["[",a.jsx("span",{className:"promql-duration",children:Hn(t.range)}),"]"]}),t.anchored&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"anchored"})]}),t.smoothed&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"smoothed"})]}),AU(t.timestamp,t.startOrEnd,t.offset)]})},W_=a.jsx("span",{className:"promql-ellipsis",children:"…"}),rxe=(t,e,n)=>{if(n===0)return W_;const r=n===void 0?void 0:n-1;switch(t.type){case vt.aggregation:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-keyword",children:t.op}),t.without?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"without"}),a.jsx("span",{className:"promql-paren",children:"("}),aa(t.grouping),a.jsx("span",{className:"promql-paren",children:")"})," "]}):t.grouping.length>0&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"by"}),a.jsx("span",{className:"promql-paren",children:"("}),aa(t.grouping),a.jsx("span",{className:"promql-paren",children:")"})," "]}),e&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),t.param!==null&&a.jsxs(a.Fragment,{children:[Io(t.param,e,r),", "]}),Io(t.expr,e,r),a.jsx("span",{className:"promql-paren",children:")"})]})]});case vt.subquery:return a.jsxs(a.Fragment,{children:[e&&Io(t.expr,e,r),"[",a.jsx("span",{className:"promql-duration",children:Hn(t.range)}),":",t.step!==0&&a.jsx("span",{className:"promql-duration",children:Hn(t.step)}),"]",AU(t.timestamp,t.startOrEnd,t.offset)]});case vt.parenExpr:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),e&&Io(t.expr,e,r),a.jsx("span",{className:"promql-paren",children:")"})]});case vt.call:{const i=r===void 0||r>0?t.args.map((s,o)=>a.jsxs("span",{children:[o!==0&&", ",Io(s,e)]},o)):t.args.length>0?W_:"";return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-keyword",children:t.func.name}),e&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),i,a.jsx("span",{className:"promql-paren",children:")"})]})]})}case vt.matrixSelector:return YI(t);case vt.vectorSelector:return YI(t);case vt.numberLiteral:return a.jsx("span",{className:"promql-number",children:t.val});case vt.stringLiteral:return a.jsxs("span",{className:"promql-string",children:['"',ss(t.val),'"']});case vt.unaryExpr:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-operator",children:t.op}),e&&Io(t.expr,e,r)]});case vt.binaryExpr:{let i=a.jsx(a.Fragment,{}),s=a.jsx(a.Fragment,{}),o=a.jsx(a.Fragment,{});const l=t.matching;if(l!==null){(l.labels.length>0||l.on||l.card===Cr.manyToOne||l.card===Cr.oneToMany)&&(i=a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:l.on?"on":"ignoring"}),a.jsx("span",{className:"promql-paren",children:"("}),aa(l.labels),a.jsx("span",{className:"promql-paren",children:")"})]})),(l.card===Cr.manyToOne||l.card===Cr.oneToMany)&&(s=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"promql-keyword",children:[" ","group_",l.card===Cr.manyToOne?"left":"right"]}),a.jsx("span",{className:"promql-paren",children:"("}),aa(l.include),a.jsx("span",{className:"promql-paren",children:")"})]}));const u=l.fillValues.lhs,h=l.fillValues.rhs;(u!==null||h!==null)&&(u===h?o=a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:u}),a.jsx("span",{className:"promql-paren",children:")"})]}):o=a.jsxs(a.Fragment,{children:[u!==null&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill_left"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:u}),a.jsx("span",{className:"promql-paren",children:")"})]}),h!==null&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill_right"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:h}),a.jsx("span",{className:"promql-paren",children:")"})]})]}))}return a.jsxs(a.Fragment,{children:[e&&Io(NA(t.op,t.lhs),e,r)," ",["atan2","and","or","unless"].includes(t.op)?a.jsx("span",{className:"promql-keyword",children:t.op}):a.jsx("span",{className:"promql-operator",children:t.op}),t.bool&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"bool"})]}),i,s,o," ",e&&Io(NA(t.op,t.rhs),e,r)]})}case vt.placeholder:return W_;default:throw new Error("unsupported node type")}},Io=(t,e,n)=>a.jsx("span",{className:"promql-code",children:rxe(t,e,n)}),ixe="_labelValue_1cwwq_1",sxe="_promqlPill_1cwwq_13",V_={labelValue:ixe,promqlPill:sxe},Ls={width:fe(16),height:fe(16)},fg={width:fe(14),height:fe(14)},Go={width:Os(17),height:Os(17)},iu={width:"70%",height:"70%"},Nf={width:Os(16),height:Os(16)},Mg={width:Os(20),height:Os(20)},axe={width:Os(17.5),height:Os(17.5)},PA={width:Os(16),height:Os(16)};fe(20),fe(20);const oxe=({metricName:t,insertText:e,hideLabelsExplorer:n})=>{const[r,i]=M.useState([]),[s,o]=M.useState([]),[l,u]=M.useState(null),[h,f]=M.useState(!0),p=S=>{o(s.filter(O=>O.name!==S))},m=()=>{if(l===null)throw new Error("tried to add null label matcher");o([...s,l]),u(null)},v=S=>a.jsx(Wc,{size:"md",withRemoveButton:!0,onRemove:()=>{p(S.name)},className:V_.promqlPill,children:a.jsxs("span",{className:"promql-code",children:[a.jsx("span",{className:"promql-label-name",children:S.name}),S.type,a.jsxs("span",{className:"promql-string",children:['"',Eh(S.value),'"']})]})},S.name),b={type:vt.vectorSelector,name:t,matchers:s,offset:0,timestamp:null,startOrEnd:null,anchored:!1,smoothed:!1},{data:x,error:w,isLoading:A}=zh({path:"/series",params:{"match[]":is(b)}}),[j,C,_]=M.useMemo(()=>{const S={},O={},E={};x!==void 0&&(x.data.forEach(N=>{Object.entries(N).forEach(([I,R])=>{I!=="__name__"&&(I in E?R in E[I]?E[I][R]++:E[I][R]=1:E[I]={[R]:1})})}),Object.entries(E).forEach(([N,I])=>{S[N]=Object.keys(I).length,O[N]=Object.entries(I).sort(([,R],[,L])=>L-R).map(([R,L])=>({value:R,count:L}))}));const D=Object.entries(S).sort((N,I)=>h?I[1]-N[1]:0);return[x==null?void 0:x.data.length,D,O]},[x,h]);return w?a.jsxs(Lt,{color:"red",title:"Error querying series",icon:a.jsx(Qi,{}),children:[a.jsx("strong",{children:"Error:"})," ",w.message]}):a.jsxs(En,{fz:"sm",children:[a.jsxs(En,{style:{overflow:"auto"},children:[a.jsxs(ht,{align:"center",mt:"lg",wrap:"nowrap",children:[a.jsx(ve,{w:70,fw:700,style:{flexShrink:0},children:"Selector:"}),a.jsx(Wc.Group,{children:a.jsx(Wc,{size:"md",className:V_.promqlPill,children:a.jsx("span",{style:{wordBreak:"break-word",whiteSpace:"pre"},children:Io(b,!1)})})}),a.jsxs(ht,{wrap:"nowrap",children:[a.jsx(_s,{variant:"light",size:"xs",onClick:()=>e(is(b)),leftSection:a.jsx(OF,{style:Mg}),title:"Insert selector at cursor and close explorer",children:"Insert"}),a.jsx(PO,{value:is(b),children:({copied:S,copy:O})=>a.jsx(_s,{variant:"light",size:"xs",leftSection:S?a.jsx(TF,{style:Mg}):a.jsx(hE,{style:Mg}),onClick:O,title:"Copy selector to clipboard",children:"Copy"})})]})]}),a.jsxs(ht,{align:"center",children:[a.jsx(ve,{w:70,fw:700,style:{flexShrink:0},children:"Filters:"}),s.length>0?a.jsx(Wc.Group,{children:s.map(S=>v(S))}):a.jsx(a.Fragment,{children:"No label filters"})]}),a.jsxs(ht,{style:{display:"flex",alignItems:"center",marginBottom:25},children:[a.jsx(ve,{w:70,fw:700,style:{flexShrink:0},children:"Results:"}),a.jsx(a.Fragment,{children:j!==void 0?`${j} series`:"loading..."})]})]}),a.jsxs(ht,{justify:"space-between",children:[a.jsx(ve,{children:a.jsx(_s,{variant:"light",size:"xs",onClick:n,leftSection:a.jsx(lre,{style:Mg}),children:"Back to all metrics"})}),a.jsx(rb,{w:"fit-content",size:"xs",value:h?"cardinality":"alphabetic",onChange:S=>f(S==="cardinality"),data:[{label:"By cardinality",value:"cardinality"},{label:"Alphabetic",value:"alphabetic"}]})]}),A?a.jsx(ve,{mt:"lg",children:Array.from(Array(10),(S,O)=>a.jsx(go,{height:40,mb:15,width:"100%"},O))}):a.jsxs(re,{fz:"sm",children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{children:"Label"}),a.jsx(re.Th,{children:"Values"})]})}),a.jsx(re.Tbody,{children:C.map(([S,O])=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{w:"50%",children:a.jsx("form",{onSubmit:E=>{E.preventDefault()},children:a.jsxs(ht,{justify:"space-between",align:"baseline",children:[a.jsx("span",{className:"promql-code promql-label-name",children:S}),s.some(E=>E.name===S)?v(s.find(E=>E.name===S)):(l==null?void 0:l.name)===S?a.jsxs(ht,{wrap:"nowrap",gap:"xs",children:[a.jsx(Km,{size:"xs",w:50,style:{width:"auto"},value:l.type,data:Object.values(fo).map(E=>({value:E,label:E})),onChange:(E,D)=>u({...l,type:D.value})}),a.jsx(OO,{value:l.value,size:"xs",placeholder:"label value",onChange:E=>u({...l,value:E}),data:_[S].map(E=>E.value),autoFocus:!0}),a.jsx(_s,{variant:"secondary",size:"xs",onClick:()=>m(),style:{flexShrink:0},children:"Apply"}),a.jsx(_s,{variant:"light",w:40,size:"xs",onClick:()=>u(null),title:"Cancel",style:{flexShrink:0},children:a.jsx(Nie,{style:{width:fe(18),height:fe(18)}})})]}):a.jsx(_s,{variant:"light",size:"xs",mr:"xs",onClick:()=>u({name:S,type:fo.equal,value:""}),children:"Filter..."})]})})}),a.jsxs(re.Td,{w:"50%",children:[a.jsxs(ut,{fw:700,fz:"sm",my:"xs",children:[O," value",O>1&&"s"]}),a.jsxs(ir,{size:"sm",listStyleType:"none",children:[(r.includes(S)?_[S]:_[S].slice(0,5)).map(({value:E,count:D})=>a.jsxs(ir.Item,{children:[a.jsxs("span",{className:`${V_.labelValue} promql-code promql-string`,onClick:()=>{o([...s.filter(N=>N.name!==S),{name:S,type:fo.equal,value:E}]),u(null)},title:"Click to filter by value",children:['"',Eh(E),'"']})," ","(",D," series)"]},E)),r.includes(S)?a.jsx(ir.Item,{my:"xs",children:a.jsx(zr,{size:"sm",href:"#",onClick:E=>{E.preventDefault(),i(r.filter(D=>D!=S))},children:"Hide full values"})}):_[S].length>5&&a.jsx(ir.Item,{my:"xs",children:a.jsxs(zr,{size:"sm",href:"#",onClick:E=>{E.preventDefault(),i([...r,S])},children:["Show ",_[S].length-5," more values..."]})})]})]})]},S))})]})]})},lxe="_typeLabel_u9odf_1",cxe="_helpLabel_u9odf_5",GI={typeLabel:lxe,helpLabel:cxe};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var pk=function(t,e){return pk=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])},pk(t,e)};function uxe(t,e){pk(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Wg=function(){return Wg=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Wg.apply(this,arguments)};function hxe(t,e,n,r){var i,s=!1,o=0;function l(){i&&clearTimeout(i)}function u(){l(),s=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function h(){var f=this,p=Date.now()-o,m=arguments;if(s)return;function v(){o=Date.now(),n.apply(f,m)}function b(){i=void 0}r&&!i&&v(),l(),r===void 0&&p>t?v():e!==!0&&(i=setTimeout(r?b:v,r===void 0?t-p:t))}return h.cancel=u,h}var Kp={Pixel:"Pixel",Percent:"Percent"},XI={unit:Kp.Percent,value:.8};function KI(t){return typeof t=="number"?{unit:Kp.Percent,value:t*100}:typeof t=="string"?t.match(/^(\d*(\.\d+)?)px$/)?{unit:Kp.Pixel,value:parseFloat(t)}:t.match(/^(\d*(\.\d+)?)%$/)?{unit:Kp.Percent,value:parseFloat(t)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),XI):(console.warn("scrollThreshold should be string or number"),XI)}var dxe=function(t){uxe(e,t);function e(n){var r=t.call(this,n)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:typeof r.props.scrollableTarget=="string"?document.getElementById(r.props.scrollableTarget):(r.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might
        happen because the element may not have been added to DOM yet.
        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
      `),null)},r.onStart=function(i){r.lastScrollTop||(r.dragging=!0,i instanceof MouseEvent?r.startY=i.pageY:i instanceof TouchEvent&&(r.startY=i.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(i){r.dragging&&(i instanceof MouseEvent?r.currentY=i.pageY:i instanceof TouchEvent&&(r.currentY=i.touches[0].pageY),!(r.currentY<r.startY)&&(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>r.maxPullDownDistance*1.5)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(i){typeof r.props.onScroll=="function"&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(i)},0);var s=r.props.height||r._scrollableNode?i.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!r.actionTriggered){var o=r.props.inverse?r.isElementAtTop(s,r.props.scrollThreshold):r.isElementAtBottom(s,r.props.scrollThreshold);o&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=s.scrollTop}},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},r.throttledOnScrollListener=hxe(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return e.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
          Pull Down To Refresh functionality will not work
          as expected. Check README.md for usage'`)},e.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},e.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},e.getDerivedStateFromProps=function(n,r){var i=n.dataLength!==r.prevDataLength;return i?Wg(Wg({},r),{prevDataLength:n.dataLength}):null},e.prototype.isElementAtTop=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=KI(r);return s.unit===Kp.Pixel?n.scrollTop<=s.value+i-n.scrollHeight+1:n.scrollTop<=s.value/100+i-n.scrollHeight+1},e.prototype.isElementAtBottom=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=KI(r);return s.unit===Kp.Pixel?n.scrollTop+i>=n.scrollHeight-s.value:n.scrollTop+i>=s.value/100*n.scrollHeight},e.prototype.render=function(){var n=this,r=Wg({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),i=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),s=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return Cn.createElement("div",{style:s,className:"infinite-scroll-component__outerdiv"},Cn.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(o){return n._infScroll=o},style:r},this.props.pullDownToRefresh&&Cn.createElement("div",{style:{position:"relative"},ref:function(o){return n._pullDown=o}},Cn.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!i&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},e}(M.Component);const pg=50,Pm=({allItems:t,child:e})=>{const[n,r]=M.useState(t.slice(0,50)),[i,s]=M.useState(pg),[o,l]=M.useState(t.length>pg),u=e;M.useEffect(()=>{r(t.slice(0,pg)),l(t.length>pg)},[t]);const h=()=>{if(n.length===t.length)l(!1);else{const f=i+pg;s(f),r(t.slice(0,f))}};return a.jsx(dxe,{next:h,hasMore:o,loader:a.jsx("h4",{children:"loading..."}),dataLength:n.length,height:n.length>25?"75vh":"",children:a.jsx(u,{items:n})})},fxe=new aU({pre:'<b style="color: rgb(0, 102, 191)">',post:"</b>",shouldSort:!0}),pxe={allowedTags:["b"],allowedAttributes:{b:["style"]}},mxe=(t,e)=>fxe.filter(t.replace(/ /g,""),e,{pre:'<b style="color: rgb(0, 102, 191)">',post:"</b>"}),gxe=({metricNames:t,insertText:e,close:n})=>{const{data:r}=yi({path:"/metadata"}),[i,s]=M.useState(null),[o,l]=M.useState(""),[u]=Qv(o,250),h=M.useMemo(()=>u===""?t.map(p=>({original:p,rendered:p})):mxe(u,t),[u,t]),f=p=>r.data[p]??r.data[p.replace(/(_count|_sum|_bucket|_total)$/,"")]??[{help:"unknown",type:"unknown",unit:"unknown"}];return i!==null?a.jsx(oxe,{metricName:i,insertText:p=>{e(p),n()},hideLabelsExplorer:()=>s(null)}):a.jsxs(En,{children:[a.jsx(tc,{title:"Filter by text",placeholder:"Enter text to filter metric names by...",value:o,onChange:p=>l(p.target.value),autoFocus:!0}),a.jsx(Pm,{allItems:h,child:({items:p})=>a.jsxs(re,{children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{children:"Metric"}),a.jsx(re.Th,{children:"Type"}),a.jsx(re.Th,{children:"Help"})]})}),a.jsx(re.Tbody,{children:p.map(m=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsxs(ht,{justify:"space-between",wrap:"nowrap",children:[u===""?m.original:a.jsx("div",{dangerouslySetInnerHTML:{__html:G1e(m.rendered,pxe)}}),a.jsxs(ht,{gap:"xs",children:[a.jsx(Nr,{size:"sm",color:"gray",variant:"light",title:"Explore metric",onClick:()=>{s(m.original)},children:a.jsx(Iie,{style:{width:"70%",height:"70%"},stroke:1.5})}),a.jsx(Nr,{size:"sm",color:"gray",variant:"light",title:"Insert at cursor and close explorer",onClick:()=>{e(m.original),n()},children:a.jsx(OF,{style:{width:"70%",height:"70%"},stroke:1.5})}),a.jsx(PO,{value:m.original,children:({copied:v,copy:b})=>a.jsx(Nr,{size:"sm",color:"gray",variant:"light",title:"Copy to clipboard",onClick:b,children:v?a.jsx(TF,{style:{width:"70%",height:"70%"},stroke:1.5}):a.jsx(hE,{style:{width:"70%",height:"70%"},stroke:1.5})})})]})]})}),a.jsx(re.Td,{px:"lg",children:f(m.original).map((v,b)=>a.jsxs(Cn.Fragment,{children:[a.jsx("span",{className:GI.typeLabel,children:v.type}),a.jsx("br",{})]},b))}),a.jsx(re.Td,{children:f(m.original).map((v,b)=>a.jsxs(Cn.Fragment,{children:[a.jsx("span",{className:GI.helpLabel,children:v.help}),a.jsx("br",{})]},b))})]},m.original))})]})})]})};class vxe extends M.Component{constructor(){super(...arguments);Gn(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){console.error("Uncaught error:",n,r)}render(){return this.state.error!==null?a.jsxs(Lt,{color:"red",title:this.props.title||"Error querying page data",icon:a.jsx(Qi,{}),maw:500,mx:"auto",mt:"lg",children:[a.jsx("strong",{children:"Error:"})," ",this.state.error.message]}):this.props.children}}const wf=t=>{const e=cl();return a.jsx(vxe,{title:t.title,children:t.children},e.pathname)};class bxe{constructor(e,n){Gn(this,"complete");Gn(this,"queryHistory");this.complete=e,this.queryHistory=n}promQL(e){return Promise.resolve(this.complete.promQL(e)).then(n=>{const{state:r,pos:i}=e,s=Oi(r).resolve(i,-1),o=n!=null?n.from:s.from;if(o!==0)return n;const l={from:o,to:i,options:this.queryHistory.map(u=>({label:u.length<80?u:u.slice(0,76).concat("..."),detail:"past query",apply:u,info:u.length<80?void 0:u})),validFor:/^[a-zA-Z0-9_:]+$/};return n!==null&&(l.options=l.options.concat(n.options)),l})}}const ZI=new nQ,yxe=({initialExpr:t,metricNames:e,executeQuery:n,duplicatePanel:r,removePanel:i,treeShown:s,setShowTree:o})=>{const l=KA(),{queryHistory:u}=rc(E=>E.queryPage),{pathPrefix:h,enableAutocomplete:f,enableSyntaxHighlighting:p,enableLinter:m,enableQueryHistory:v}=li(),[b,x]=M.useState(t);M.useEffect(()=>{x(t)},[t]);const{data:w,error:A,isFetching:j,refetch:C}=zh({path:"/format_query",params:{query:b},enabled:!1});M.useEffect(()=>{if(A){nl.show({color:"red",title:"Error formatting query",message:A.message});return}w&&(x(w.data),nl.show({title:"Expression formatted",message:"Expression formatted successfully!"}))},[w,A]);const _=M.useRef(null),[S,O]=M.useState(!1);return M.useEffect(()=>{ZI.activateCompletion(f).activateLinter(m).setComplete({completeStrategy:new bxe(ek({remote:{url:h,cache:{initialMetricList:e}}}),v?u:[])})},[h,e,f,m,v,u]),a.jsxs(ht,{align:"flex-start",wrap:"nowrap",gap:"xs",children:[a.jsx(Fa,{leftSection:j?a.jsx(Zl,{size:"xs",color:"gray.5"}):a.jsx(_ie,{}),rightSection:a.jsxs(Xn,{shadow:"md",width:200,children:[a.jsx(Xn.Target,{children:a.jsx(Nr,{size:"lg",variant:"transparent",color:"gray","aria-label":"Show query options",children:a.jsx(zre,{style:Nf})})}),a.jsxs(Xn.Dropdown,{children:[a.jsx(Xn.Label,{children:"Query options"}),a.jsx(Xn.Item,{leftSection:a.jsx(Zh,{style:fg}),onClick:()=>O(!0),children:"Explore metrics"}),a.jsx(Xn.Item,{leftSection:a.jsx(sre,{style:fg}),onClick:()=>C(),disabled:j||b===""||b===(w==null?void 0:w.data),children:"Format expression"}),a.jsxs(Xn.Item,{leftSection:a.jsx(fre,{style:fg}),onClick:()=>o(!s),children:[s?"Hide":"Show"," tree view"]}),a.jsx(Xn.Item,{leftSection:a.jsx(hE,{style:fg}),onClick:()=>r(b),children:"Duplicate query"}),a.jsx(Xn.Item,{color:"red",leftSection:a.jsx(Eie,{style:fg}),onClick:i,children:"Remove query"})]})]}),component:P6,className:Wye.input,basicSetup:!1,value:b,onChange:x,autoFocus:!0,ref:_,extensions:[GQ,c$(),aQ(),bn.allowMultipleSelections.of(!0),b$(),E$(),B$(),q$(),qQ(),it.lineWrapping,kh.of([...H$,...LQ,...uQ,...j6,...Z$]),u$("Enter expression (press Shift+Enter for newlines)"),p?A2(l==="light"?KQ:ZQ):[],ZI.asExtension(),l==="light"?XQ:Qye,kh.of([{key:"Escape",run:E=>(E.contentDOM.blur(),!1)}]),uu.highest(kh.of([{key:"Enter",run:()=>(n(b),!0)},{key:"Shift-Enter",run:NQ}]))],multiline:!0}),a.jsx(_s,{variant:"primary",onClick:()=>n(b),style:{flexShrink:0},children:"Execute"}),a.jsx(Ha,{size:"95%",opened:S,onClose:()=>O(!1),title:"Explore metrics",children:a.jsx(wf,{title:"Error showing metrics",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(20),(E,D)=>a.jsx(go,{height:30,mb:15,width:"100%"},D))}),children:a.jsx(gxe,{metricNames:e,insertText:E=>{if(_.current&&_.current.view){const D=_.current.view;D.dispatch(D.state.update({changes:{from:D.state.selection.ranges[0].from,to:D.state.selection.ranges[0].to,insert:E}}))}},close:()=>O(!1)})})},location.pathname)})]})},xxe="_chartWrapper_apsqz_1",Axe="_uplotChart_apsqz_7",wU={chartWrapper:xxe,uplotChart:Axe};var bx={exports:{}};const wxe=!0,Ei="u-",Sxe="uplot",jxe=Ei+"hz",Cxe=Ei+"vt",_xe=Ei+"title",Txe=Ei+"wrap",kxe=Ei+"under",Oxe=Ei+"over",Exe=Ei+"axis",Fd=Ei+"off",Mxe=Ei+"select",Dxe=Ei+"cursor-x",Rxe=Ei+"cursor-y",Nxe=Ei+"cursor-pt",Pxe=Ei+"legend",Ixe=Ei+"live",Bxe=Ei+"inline",Lxe=Ei+"series",Fxe=Ei+"marker",JI=Ei+"label",Hxe=Ei+"value",Dg="width",Rg="height",mg="top",eB="bottom",yp="left",Y_="right",U6="#000",tB=U6+"0",G_="mousemove",nB="mousedown",X_="mouseup",rB="mouseenter",iB="mouseleave",sB="dblclick",zxe="resize",qxe="scroll",aB="change",IA="dppxchange",W6="--",s0=typeof window<"u",mk=s0?document:null,Zp=s0?window:null,$xe=s0?navigator:null;let In,D1;function gk(){let t=devicePixelRatio;In!=t&&(In=t,D1&&bk(aB,D1,gk),D1=matchMedia(`(min-resolution: ${In-.001}dppx) and (max-resolution: ${In+.001}dppx)`),ff(aB,D1,gk),Zp.dispatchEvent(new CustomEvent(IA)))}function ja(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function vk(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function jr(t,e,n){t.style[e]=n+"px"}function Po(t,e,n,r){let i=mk.createElement(t);return e!=null&&ja(i,e),n!=null&&n.insertBefore(i,r),i}function to(t,e){return Po("div",t,e)}const oB=new WeakMap;function _l(t,e,n,r,i){let s="translate("+e+"px,"+n+"px)",o=oB.get(t);s!=o&&(t.style.transform=s,oB.set(t,s),e<0||n<0||e>r||n>i?ja(t,Fd):vk(t,Fd))}const lB=new WeakMap;function cB(t,e,n){let r=e+n,i=lB.get(t);r!=i&&(lB.set(t,r),t.style.background=e,t.style.borderColor=n)}const uB=new WeakMap;function hB(t,e,n,r){let i=e+""+n,s=uB.get(t);i!=s&&(uB.set(t,i),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const V6={passive:!0},Qxe={...V6,capture:!0};function ff(t,e,n,r){e.addEventListener(t,n,r?Qxe:V6)}function bk(t,e,n,r){e.removeEventListener(t,n,V6)}s0&&gk();function Wo(t,e,n,r){let i;n=n||0,r=r||e.length-1;let s=r<=2147483647;for(;r-n>1;)i=s?n+r>>1:Ba((n+r)/2),e[i]<t?n=i:r=i;return t-e[n]<=e[r]-t?n:r}function SU(t){return(n,r,i)=>{let s=-1,o=-1;for(let l=r;l<=i;l++)if(t(n[l])){s=l;break}for(let l=i;l>=r;l--)if(t(n[l])){o=l;break}return[s,o]}}const jU=t=>t!=null,CU=t=>t!=null&&t>0,R2=SU(jU),Uxe=SU(CU);function Wxe(t,e,n,r=0,i=!1){let s=i?Uxe:R2,o=i?CU:jU;[e,n]=s(t,e,n);let l=t[e],u=t[e];if(e>-1)if(r==1)l=t[e],u=t[n];else if(r==-1)l=t[n],u=t[e];else for(let h=e;h<=n;h++){let f=t[h];o(f)&&(f<l?l=f:f>u&&(u=f))}return[l??or,u??-or]}function N2(t,e,n,r){let i=pB(t),s=pB(e);t==e&&(i==-1?(t*=n,e/=n):(t/=n,e*=n));let o=n==10?Xc:_U,l=i==1?Ba:ao,u=s==1?ao:Ba,h=l(o(Ci(t))),f=u(o(Ci(e))),p=Im(n,h),m=Im(n,f);return n==10&&(h<0&&(p=lr(p,-h)),f<0&&(m=lr(m,-f))),r||n==2?(t=p*i,e=m*s):(t=EU(t,p),e=P2(e,m)),[t,e]}function Y6(t,e,n,r){let i=N2(t,e,n,r);return t==0&&(i[0]=0),e==0&&(i[1]=0),i}const G6=.1,dB={mode:3,pad:G6},Vg={pad:0,soft:null,mode:0},Vxe={min:Vg,max:Vg};function BA(t,e,n,r){return I2(n)?fB(t,e,n):(Vg.pad=n,Vg.soft=r?0:null,Vg.mode=r?3:0,fB(t,e,Vxe))}function On(t,e){return t??e}function Yxe(t,e,n){for(e=On(e,0),n=On(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function fB(t,e,n){let r=n.min,i=n.max,s=On(r.pad,0),o=On(i.pad,0),l=On(r.hard,-or),u=On(i.hard,or),h=On(r.soft,or),f=On(i.soft,-or),p=On(r.mode,0),m=On(i.mode,0),v=e-t,b=Xc(v),x=Hs(Ci(t),Ci(e)),w=Xc(x),A=Ci(w-b);(v<1e-24||A>10)&&(v=0,(t==0||e==0)&&(v=1e-24,p==2&&h!=or&&(s=0),m==2&&f!=-or&&(o=0)));let j=v||x||1e3,C=Xc(j),_=Im(10,Ba(C)),S=j*(v==0?t==0?.1:1:s),O=lr(EU(t-S,_/10),24),E=t>=h&&(p==1||p==3&&O<=h||p==2&&O>=h)?h:or,D=Hs(l,O<E&&t>=E?E:Xo(E,O)),N=j*(v==0?e==0?.1:1:o),I=lr(P2(e+N,_/10),24),R=e<=f&&(m==1||m==3&&I>=f||m==2&&I<=f)?f:-or,L=Xo(u,I>R&&e<=R?R:Hs(R,I));return D==L&&D==0&&(L=100),[D,L]}const Gxe=new Intl.NumberFormat(s0?$xe.language:"en-US"),X6=t=>Gxe.format(t),za=Math,yx=za.PI,Ci=za.abs,Ba=za.floor,ji=za.round,ao=za.ceil,Xo=za.min,Hs=za.max,Im=za.pow,pB=za.sign,Xc=za.log10,_U=za.log2,Xxe=(t,e=1)=>za.sinh(t)*e,K_=(t,e=1)=>za.asinh(t/e),or=1/0;function mB(t){return(Xc((t^t>>31)-(t>>31))|0)+1}function yk(t,e,n){return Xo(Hs(t,e),n)}function TU(t){return typeof t=="function"}function vn(t){return TU(t)?t:()=>t}const Kxe=()=>{},kU=t=>t,OU=(t,e)=>e,Zxe=t=>null,gB=t=>!0,vB=(t,e)=>t==e,Jxe=/\.\d*?(?=9{6,}|0{6,})/gm,Sf=t=>{if(DU(t)||Qh.has(t))return t;const e=`${t}`,n=e.match(Jxe);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[i,s]=e.split("e");return+`${Sf(i)}e${s}`}return lr(t,r)};function Rd(t,e){return Sf(lr(Sf(t/e))*e)}function P2(t,e){return Sf(ao(Sf(t/e))*e)}function EU(t,e){return Sf(Ba(Sf(t/e))*e)}function lr(t,e=0){if(DU(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return ji(r)/n}const Qh=new Map;function MU(t){return((""+t).split(".")[1]||"").length}function Rv(t,e,n,r){let i=[],s=r.map(MU);for(let o=e;o<n;o++){let l=Ci(o),u=lr(Im(t,o),l);for(let h=0;h<r.length;h++){let f=t==10?+`${r[h]}e${o}`:r[h]*u,p=(o>=0?0:l)+(o>=s[h]?0:s[h]),m=t==10?f:lr(f,p);i.push(m),Qh.set(m,p)}}return i}const Yg={},K6=[],Bm=[null,null],oh=Array.isArray,DU=Number.isInteger,eAe=t=>t===void 0;function bB(t){return typeof t=="string"}function I2(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function tAe(t){return t!=null&&typeof t=="object"}const nAe=Object.getPrototypeOf(Uint8Array),RU="__proto__";function Lm(t,e=I2){let n;if(oh(t)){let r=t.find(i=>i!=null);if(oh(r)||e(r)){n=Array(t.length);for(let i=0;i<t.length;i++)n[i]=Lm(t[i],e)}else n=t.slice()}else if(t instanceof nAe)n=t.slice();else if(e(t)){n={};for(let r in t)r!=RU&&(n[r]=Lm(t[r],e))}else n=t;return n}function vi(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let i in r)i!=RU&&(I2(t[i])?vi(t[i],Lm(r[i])):t[i]=Lm(r[i]))}return t}const rAe=0,iAe=1,sAe=2;function aAe(t,e,n){for(let r=0,i,s=-1;r<e.length;r++){let o=e[r];if(o>s){for(i=o-1;i>=0&&t[i]==null;)t[i--]=null;for(i=o+1;i<n&&t[i]==null;)t[s=i++]=null}}}function oAe(t,e){if(uAe(t)){let o=t[0].slice();for(let l=1;l<t.length;l++)o.push(...t[l].slice(1));return hAe(o[0])||(o=cAe(o)),o}let n=new Set;for(let o=0;o<t.length;o++){let u=t[o][0],h=u.length;for(let f=0;f<h;f++)n.add(u[f])}let r=[Array.from(n).sort((o,l)=>o-l)],i=r[0].length,s=new Map;for(let o=0;o<i;o++)s.set(r[0][o],o);for(let o=0;o<t.length;o++){let l=t[o],u=l[0];for(let h=1;h<l.length;h++){let f=l[h],p=Array(i).fill(void 0),m=e?e[o][h]:iAe,v=[];for(let b=0;b<f.length;b++){let x=f[b],w=s.get(u[b]);x===null?m!=rAe&&(p[w]=x,m==sAe&&v.push(w)):p[w]=x}aAe(p,v,i),r.push(p)}}return r}const lAe=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function cAe(t){let e=t[0],n=e.length,r=Array(n);for(let s=0;s<r.length;s++)r[s]=s;r.sort((s,o)=>e[s]-e[o]);let i=[];for(let s=0;s<t.length;s++){let o=t[s],l=Array(n);for(let u=0;u<n;u++)l[u]=o[r[u]];i.push(l)}return i}function uAe(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let i=t[r][0];if(i.length!=n)return!1;if(i!=e){for(let s=0;s<n;s++)if(i[s]!=e[s])return!1}}return!0}function hAe(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,i=n-1;for(;r<=i&&t[r]==null;)r++;for(;i>=r&&t[i]==null;)i--;if(i<=r)return!0;const s=Hs(1,Ba((i-r+1)/e));for(let o=t[r],l=r+s;l<=i;l+=s){const u=t[l];if(u!=null){if(u<=o)return!1;o=u}}return!0}const NU=["January","February","March","April","May","June","July","August","September","October","November","December"],PU=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function IU(t){return t.slice(0,3)}const dAe=PU.map(IU),fAe=NU.map(IU),pAe={MMMM:NU,MMM:fAe,WWWW:PU,WWW:dAe};function gg(t){return(t<10?"0":"")+t}function mAe(t){return(t<10?"00":t<100?"0":"")+t}const gAe={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>gg(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>gg(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>gg(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>gg(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>gg(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>mAe(t.getMilliseconds())};function Z6(t,e){e=e||pAe;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,i;for(;i=r.exec(t);)n.push(i[0][0]=="{"?gAe[i[1]]:i[0]);return s=>{let o="";for(let l=0;l<n.length;l++)o+=typeof n[l]=="string"?n[l]:n[l](s,e);return o}}const vAe=new Intl.DateTimeFormat().resolvedOptions().timeZone;function bAe(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==vAe?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const BU=t=>t%1==0,LA=[1,2,2.5,5],yAe=Rv(10,-32,0,LA),LU=Rv(10,0,32,LA),xAe=LU.filter(BU),Nd=yAe.concat(LU),J6=`
`,FU="{YYYY}",yB=J6+FU,HU="{M}/{D}",Ng=J6+HU,R1=Ng+"/{YY}",zU="{aa}",AAe="{h}:{mm}",Tp=AAe+zU,xB=J6+Tp,AB=":{ss}",Fn=null;function qU(t){let e=t*1e3,n=e*60,r=n*60,i=r*24,s=i*30,o=i*365,u=(t==1?Rv(10,0,3,LA).filter(BU):Rv(10,-3,0,LA)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,i,i*2,i*3,i*4,i*5,i*6,i*7,i*8,i*9,i*10,i*15,s,s*2,s*3,s*4,s*6,o,o*2,o*5,o*10,o*25,o*50,o*100]);const h=[[o,FU,Fn,Fn,Fn,Fn,Fn,Fn,1],[i*28,"{MMM}",yB,Fn,Fn,Fn,Fn,Fn,1],[i,HU,yB,Fn,Fn,Fn,Fn,Fn,1],[r,"{h}"+zU,R1,Fn,Ng,Fn,Fn,Fn,1],[n,Tp,R1,Fn,Ng,Fn,Fn,Fn,1],[e,AB,R1+" "+Tp,Fn,Ng+" "+Tp,Fn,xB,Fn,1],[t,AB+".{fff}",R1+" "+Tp,Fn,Ng+" "+Tp,Fn,xB,Fn,1]];function f(p){return(m,v,b,x,w,A)=>{let j=[],C=w>=o,_=w>=s&&w<o,S=p(b),O=lr(S*t,3),E=Z_(S.getFullYear(),C?0:S.getMonth(),_||C?1:S.getDate()),D=lr(E*t,3);if(_||C){let N=_?w/s:0,I=C?w/o:0,R=O==D?O:lr(Z_(E.getFullYear()+I,E.getMonth()+N,1)*t,3),L=new Date(ji(R/t)),Q=L.getFullYear(),z=L.getMonth();for(let H=0;R<=x;H++){let P=Z_(Q+I*H,z+N*H,1),F=P-p(lr(P*t,3));R=lr((+P+F)*t,3),R<=x&&j.push(R)}}else{let N=w>=i?i:w,I=Ba(b)-Ba(O),R=D+I+P2(O-D,N);j.push(R);let L=p(R),Q=L.getHours()+L.getMinutes()/n+L.getSeconds()/r,z=w/r,H=m.axes[v]._space,P=A/H;for(;R=lr(R+w,t==1?0:3),!(R>x);)if(z>1){let F=Ba(lr(Q+z,6))%24,G=p(R).getHours()-F;G>1&&(G=-1),R-=G*r,Q=(Q+z)%24;let W=j[j.length-1];lr((R-W)/w,3)*P>=.7&&j.push(R)}else j.push(R)}return j}}return[u,h,f]}const[wAe,SAe,jAe]=qU(1),[CAe,_Ae,TAe]=qU(.001);Rv(2,-53,53,[1]);function wB(t,e){return t.map(n=>n.map((r,i)=>i==0||i==8||r==null?r:e(i==1||n[8]==0?r:n[1]+r)))}function SB(t,e){return(n,r,i,s,o)=>{let l=e.find(b=>o>=b[0])||e[e.length-1],u,h,f,p,m,v;return r.map(b=>{let x=t(b),w=x.getFullYear(),A=x.getMonth(),j=x.getDate(),C=x.getHours(),_=x.getMinutes(),S=x.getSeconds(),O=w!=u&&l[2]||A!=h&&l[3]||j!=f&&l[4]||C!=p&&l[5]||_!=m&&l[6]||S!=v&&l[7]||l[1];return u=w,h=A,f=j,p=C,m=_,v=S,O(x)})}}function kAe(t,e){let n=Z6(e);return(r,i,s,o,l)=>i.map(u=>n(t(u)))}function Z_(t,e,n){return new Date(t,e,n)}function jB(t,e){return e(t)}const OAe="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function CB(t,e){return(n,r,i,s)=>s==null?W6:e(t(r))}function EAe(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function MAe(t,e){return t.series[e].fill(t,e)}const DAe={show:!0,live:!0,isolate:!1,mount:Kxe,markers:{show:!0,width:2,stroke:EAe,fill:MAe,dash:"solid"},idx:null,idxs:null,values:[]};function RAe(t,e){let n=t.cursor.points,r=to(),i=n.size(t,e);jr(r,Dg,i),jr(r,Rg,i);let s=i/-2;jr(r,"marginLeft",s),jr(r,"marginTop",s);let o=n.width(t,e,i);return o&&jr(r,"borderWidth",o),r}function NAe(t,e){let n=t.series[e].points;return n._fill||n._stroke}function PAe(t,e){let n=t.series[e].points;return n._stroke||n._fill}function IAe(t,e){return t.series[e].points.size}const J_=[0,0];function BAe(t,e,n){return J_[0]=e,J_[1]=n,J_}function N1(t,e,n,r=!0){return i=>{i.button==0&&(!r||i.target==e)&&n(i)}}function e3(t,e,n,r=!0){return i=>{(!r||i.target==e)&&n(i)}}const LAe={show:!0,x:!0,y:!0,lock:!1,move:BAe,points:{one:!1,show:RAe,size:IAe,width:0,stroke:PAe,fill:NAe},bind:{mousedown:N1,mouseup:N1,click:N1,dblclick:N1,mousemove:e3,mouseleave:e3,mouseenter:e3},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,i)=>r-i,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},$U={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},e4=vi({},$U,{filter:OU}),QU=vi({},e4,{size:10}),UU=vi({},$U,{show:!1}),t4='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',WU="bold "+t4,VU=1.5,_B={show:!0,scale:"x",stroke:U6,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:WU,side:2,grid:e4,ticks:QU,border:UU,font:t4,lineGap:VU,rotate:0},FAe="Value",HAe="Time",TB={show:!0,scale:"x",auto:!1,sorted:1,min:or,max:-or,idxs:[]};function zAe(t,e,n,r,i){return e.map(s=>s==null?"":X6(s))}function qAe(t,e,n,r,i,s,o){let l=[],u=Qh.get(i)||0;n=o?n:lr(P2(n,i),u);for(let h=n;h<=r;h=lr(h+i,u))l.push(Object.is(h,-0)?0:h);return l}function xk(t,e,n,r,i,s,o){const l=[],u=t.scales[t.axes[e].scale].log,h=u==10?Xc:_U,f=Ba(h(n));i=Im(u,f),u==10&&(i=Nd[Wo(i,Nd)]);let p=n,m=i*u;u==10&&(m=Nd[Wo(m,Nd)]);do l.push(p),p=p+i,u==10&&!Qh.has(p)&&(p=lr(p,Qh.get(i))),p>=m&&(i=p,m=i*u,u==10&&(m=Nd[Wo(m,Nd)]));while(p<=r);return l}function $Ae(t,e,n,r,i,s,o){let u=t.scales[t.axes[e].scale].asinh,h=r>u?xk(t,e,Hs(u,n),r,i):[u],f=r>=0&&n<=0?[0]:[];return(n<-u?xk(t,e,Hs(u,-r),-n,i):[u]).reverse().map(m=>-m).concat(f,h)}const YU=/./,QAe=/[12357]/,UAe=/[125]/,kB=/1/,Ak=(t,e,n,r)=>t.map((i,s)=>e==4&&i==0||s%r==0&&n.test(i.toExponential()[i<0?1:0])?i:null);function WAe(t,e,n,r,i){let s=t.axes[n],o=s.scale,l=t.scales[o],u=t.valToPos,h=s._space,f=u(10,o),p=u(9,o)-f>=h?YU:u(7,o)-f>=h?QAe:u(5,o)-f>=h?UAe:kB;if(p==kB){let m=Ci(u(1,o)-f);if(m<h)return Ak(e.slice().reverse(),l.distr,p,ao(h/m)).reverse()}return Ak(e,l.distr,p,1)}function VAe(t,e,n,r,i){let s=t.axes[n],o=s.scale,l=s._space,u=t.valToPos,h=Ci(u(1,o)-u(2,o));return h<l?Ak(e.slice().reverse(),3,YU,ao(l/h)).reverse():e}function YAe(t,e,n,r){return r==null?W6:e==null?"":X6(e)}const OB={show:!0,scale:"y",stroke:U6,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:WU,side:3,grid:e4,ticks:QU,border:UU,font:t4,lineGap:VU,rotate:0};function GAe(t,e){let n=3+(t||1)*2;return lr(n*e,3)}function XAe(t,e){let{scale:n,idxs:r}=t.series[0],i=t._data[0],s=t.valToPos(i[r[0]],n,!0),o=t.valToPos(i[r[1]],n,!0),l=Ci(o-s),u=t.series[e],h=l/(u.points.space*In);return r[1]-r[0]<=h}const EB={scale:null,auto:!0,sorted:0,min:or,max:-or},GU=(t,e,n,r,i)=>i,MB={show:!0,auto:!0,sorted:0,gaps:GU,alpha:1,facets:[vi({},EB,{scale:"x"}),vi({},EB,{scale:"y"})]},DB={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:GU,alpha:1,points:{show:XAe,filter:null},values:null,min:or,max:-or,idxs:[],path:null,clip:null};function KAe(t,e,n,r,i){return n/10}const XU={time:wxe,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ZAe=vi({},XU,{time:!1,ori:1}),RB={};function KU(t,e){let n=RB[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(i=>i!=r)},pub(r,i,s,o,l,u,h){for(let f=0;f<n.plots.length;f++)n.plots[f]!=i&&n.plots[f].pub(r,i,s,o,l,u,h)}},t!=null&&(RB[t]=n)),n}const Fm=1,wk=2;function Pf(t,e,n){const r=t.mode,i=t.series[e],s=r==2?t._data[e]:t._data,o=t.scales,l=t.bbox;let u=s[0],h=r==2?s[1]:s[e],f=r==2?o[i.facets[0].scale]:o[t.series[0].scale],p=r==2?o[i.facets[1].scale]:o[i.scale],m=l.left,v=l.top,b=l.width,x=l.height,w=t.valToPosH,A=t.valToPosV;return f.ori==0?n(i,u,h,f,p,w,A,m,v,b,x,L2,a0,H2,JU,tW):n(i,u,h,f,p,A,w,v,m,x,b,F2,o0,i4,eW,nW)}function n4(t,e){let n=0,r=0,i=On(t.bands,K6);for(let s=0;s<i.length;s++){let o=i[s];o.series[0]==e?n=o.dir:o.series[1]==e&&(o.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function JAe(t,e,n,r,i){let s=t.mode,o=t.series[e],l=s==2?o.facets[1].scale:o.scale,u=t.scales[l];return i==-1?u.min:i==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function Kc(t,e,n,r,i,s){return Pf(t,e,(o,l,u,h,f,p,m,v,b,x,w)=>{let A=o.pxRound;const j=h.dir*(h.ori==0?1:-1),C=h.ori==0?a0:o0;let _,S;j==1?(_=n,S=r):(_=r,S=n);let O=A(p(l[_],h,x,v)),E=A(m(u[_],f,w,b)),D=A(p(l[S],h,x,v)),N=A(m(s==1?f.max:f.min,f,w,b)),I=new Path2D(i);return C(I,D,N),C(I,O,N),C(I,O,E),I})}function B2(t,e,n,r,i,s){let o=null;if(t.length>0){o=new Path2D;const l=e==0?H2:i4;let u=n;for(let p=0;p<t.length;p++){let m=t[p];if(m[1]>m[0]){let v=m[0]-u;v>0&&l(o,u,r,v,r+s),u=m[1]}}let h=n+i-u,f=10;h>0&&l(o,u,r-f/2,h,r+s+f)}return o}function ewe(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function r4(t,e,n,r,i,s,o){let l=[],u=t.length;for(let h=i==1?n:r;h>=n&&h<=r;h+=i)if(e[h]===null){let p=h,m=h;if(i==1)for(;++h<=r&&e[h]===null;)m=h;else for(;--h>=n&&e[h]===null;)m=h;let v=s(t[p]),b=m==p?v:s(t[m]),x=p-i;v=o<=0&&x>=0&&x<u?s(t[x]):v;let A=m+i;b=o>=0&&A>=0&&A<u?s(t[A]):b,b>=v&&l.push([v,b])}return l}function NB(t){return t==0?kU:t==1?ji:e=>Rd(e,t)}function ZU(t){let e=t==0?L2:F2,n=t==0?(i,s,o,l,u,h)=>{i.arcTo(s,o,l,u,h)}:(i,s,o,l,u,h)=>{i.arcTo(o,s,u,l,h)},r=t==0?(i,s,o,l,u)=>{i.rect(s,o,l,u)}:(i,s,o,l,u)=>{i.rect(o,s,u,l)};return(i,s,o,l,u,h=0,f=0)=>{h==0&&f==0?r(i,s,o,l,u):(h=Xo(h,l/2,u/2),f=Xo(f,l/2,u/2),e(i,s+h,o),n(i,s+l,o,s+l,o+u,h),n(i,s+l,o+u,s,o+u,f),n(i,s,o+u,s,o,f),n(i,s,o,s+l,o,h),i.closePath())}}const L2=(t,e,n)=>{t.moveTo(e,n)},F2=(t,e,n)=>{t.moveTo(n,e)},a0=(t,e,n)=>{t.lineTo(e,n)},o0=(t,e,n)=>{t.lineTo(n,e)},H2=ZU(0),i4=ZU(1),JU=(t,e,n,r,i,s)=>{t.arc(e,n,r,i,s)},eW=(t,e,n,r,i,s)=>{t.arc(n,e,r,i,s)},tW=(t,e,n,r,i,s,o)=>{t.bezierCurveTo(e,n,r,i,s,o)},nW=(t,e,n,r,i,s,o)=>{t.bezierCurveTo(n,e,i,r,o,s)};function rW(t){return(e,n,r,i,s)=>Pf(e,n,(o,l,u,h,f,p,m,v,b,x,w)=>{let{pxRound:A,points:j}=o,C,_;h.ori==0?(C=L2,_=JU):(C=F2,_=eW);const S=lr(j.width*In,3);let O=(j.size-j.width)/2*In,E=lr(O*2,3),D=new Path2D,N=new Path2D,{left:I,top:R,width:L,height:Q}=e.bbox;H2(N,I-E,R-E,L+E*2,Q+E*2);const z=H=>{if(u[H]!=null){let P=A(p(l[H],h,x,v)),F=A(m(u[H],f,w,b));C(D,P+O,F),_(D,P,F,O,0,yx*2)}};if(s)s.forEach(z);else for(let H=r;H<=i;H++)z(H);return{stroke:S>0?D:null,fill:D,clip:N,flags:Fm|wk}})}function iW(t){return(e,n,r,i,s,o)=>{r!=i&&(s!=r&&o!=r&&t(e,n,r),s!=i&&o!=i&&t(e,n,i),t(e,n,o))}}const twe=iW(a0),nwe=iW(o0);function sW(t){const e=On(t==null?void 0:t.alignGaps,0);return(n,r,i,s)=>Pf(n,r,(o,l,u,h,f,p,m,v,b,x,w)=>{[i,s]=R2(u,i,s);let A=o.pxRound,j=Q=>A(p(Q,h,x,v)),C=Q=>A(m(Q,f,w,b)),_,S;h.ori==0?(_=a0,S=twe):(_=o0,S=nwe);const O=h.dir*(h.ori==0?1:-1),E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Fm},D=E.stroke;let N=!1;if(s-i>=x*4){let Q=V=>n.posToVal(V,h.key,!0),z=null,H=null,P,F,U,Z=j(l[O==1?i:s]),G=j(l[i]),W=j(l[s]),X=Q(O==1?G+1:W-1);for(let V=O==1?i:s;V>=i&&V<=s;V+=O){let te=l[V],be=(O==1?te<X:te>X)?Z:j(te),ye=u[V];be==Z?ye!=null?(F=ye,z==null?(_(D,be,C(F)),P=z=H=F):F<z?z=F:F>H&&(H=F)):ye===null&&(N=!0):(z!=null&&S(D,Z,C(z),C(H),C(P),C(F)),ye!=null?(F=ye,_(D,be,C(F)),z=H=P=F):(z=H=null,ye===null&&(N=!0)),Z=be,X=Q(Z+O))}z!=null&&z!=H&&U!=Z&&S(D,Z,C(z),C(H),C(P),C(F))}else for(let Q=O==1?i:s;Q>=i&&Q<=s;Q+=O){let z=u[Q];z===null?N=!0:z!=null&&_(D,j(l[Q]),C(z))}let[R,L]=n4(n,r);if(o.fill!=null||R!=0){let Q=E.fill=new Path2D(D),z=o.fillTo(n,r,o.min,o.max,R),H=C(z),P=j(l[i]),F=j(l[s]);O==-1&&([F,P]=[P,F]),_(Q,F,H),_(Q,P,H)}if(!o.spanGaps){let Q=[];N&&Q.push(...r4(l,u,i,s,O,j,e)),E.gaps=Q=o.gaps(n,r,i,s,Q),E.clip=B2(Q,h.ori,v,b,x,w)}return L!=0&&(E.band=L==2?[Kc(n,r,i,s,D,-1),Kc(n,r,i,s,D,1)]:Kc(n,r,i,s,D,L)),E})}function rwe(t){const e=On(t.align,1),n=On(t.ascDesc,!1),r=On(t.alignGaps,0),i=On(t.extend,!1);return(s,o,l,u)=>Pf(s,o,(h,f,p,m,v,b,x,w,A,j,C)=>{[l,u]=R2(p,l,u);let _=h.pxRound,{left:S,width:O}=s.bbox,E=G=>_(b(G,m,j,w)),D=G=>_(x(G,v,C,A)),N=m.ori==0?a0:o0;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Fm},R=I.stroke,L=m.dir*(m.ori==0?1:-1);let Q=D(p[L==1?l:u]),z=E(f[L==1?l:u]),H=z,P=z;i&&e==-1&&(P=S,N(R,P,Q)),N(R,z,Q);for(let G=L==1?l:u;G>=l&&G<=u;G+=L){let W=p[G];if(W==null)continue;let X=E(f[G]),V=D(W);e==1?N(R,X,Q):N(R,H,V),N(R,X,V),Q=V,H=X}let F=H;i&&e==1&&(F=S+O,N(R,F,Q));let[U,Z]=n4(s,o);if(h.fill!=null||U!=0){let G=I.fill=new Path2D(R),W=h.fillTo(s,o,h.min,h.max,U),X=D(W);N(G,F,X),N(G,P,X)}if(!h.spanGaps){let G=[];G.push(...r4(f,p,l,u,L,E,r));let W=h.width*In/2,X=n||e==1?W:-W,V=n||e==-1?-W:W;G.forEach(te=>{te[0]+=X,te[1]+=V}),I.gaps=G=h.gaps(s,o,l,u,G),I.clip=B2(G,m.ori,w,A,j,C)}return Z!=0&&(I.band=Z==2?[Kc(s,o,l,u,R,-1),Kc(s,o,l,u,R,1)]:Kc(s,o,l,u,R,Z)),I})}function PB(t,e,n,r,i,s,o=or){if(t.length>1){let l=null;for(let u=0,h=1/0;u<t.length;u++)if(e[u]!==void 0){if(l!=null){let f=Ci(t[u]-t[l]);f<h&&(h=f,o=Ci(n(t[u],r,i,s)-n(t[l],r,i,s)))}l=u}}return o}function iwe(t){t=t||Yg;const e=On(t.size,[.6,or,1]),n=t.align||0,r=t.gap||0;let i=t.radius;i=i==null?[0,0]:typeof i=="number"?[i,0]:i;const s=vn(i),o=1-e[0],l=On(e[1],or),u=On(e[2],1),h=On(t.disp,Yg),f=On(t.each,v=>{}),{fill:p,stroke:m}=h;return(v,b,x,w)=>Pf(v,b,(A,j,C,_,S,O,E,D,N,I,R)=>{let L=A.pxRound,Q=n,z=r*In,H=l*In,P=u*In,F,U;_.ori==0?[F,U]=s(v,b):[U,F]=s(v,b);const Z=_.dir*(_.ori==0?1:-1);let G=_.ori==0?H2:i4,W=_.ori==0?f:(Pe,st,he,dt,sn,Kt,un)=>{f(Pe,st,he,sn,dt,un,Kt)},X=On(v.bands,K6).find(Pe=>Pe.series[0]==b),V=X!=null?X.dir:0,te=A.fillTo(v,b,A.min,A.max,V),le=L(E(te,S,R,N)),be,ye,Xe,ze=I,Re=L(A.width*In),ae=!1,je=null,pe=null,ke=null,gt=null;p!=null&&(Re==0||m!=null)&&(ae=!0,je=p.values(v,b,x,w),pe=new Map,new Set(je).forEach(Pe=>{Pe!=null&&pe.set(Pe,new Path2D)}),Re>0&&(ke=m.values(v,b,x,w),gt=new Map,new Set(ke).forEach(Pe=>{Pe!=null&&gt.set(Pe,new Path2D)})));let{x0:We,size:Le}=h;if(We!=null&&Le!=null){Q=1,j=We.values(v,b,x,w),We.unit==2&&(j=j.map(he=>v.posToVal(D+he*I,_.key,!0)));let Pe=Le.values(v,b,x,w);Le.unit==2?ye=Pe[0]*I:ye=O(Pe[0],_,I,D)-O(0,_,I,D),ze=PB(j,C,O,_,I,D,ze),Xe=ze-ye+z}else ze=PB(j,C,O,_,I,D,ze),Xe=ze*o+z,ye=ze-Xe;Xe<1&&(Xe=0),Re>=ye/2&&(Re=0),Xe<5&&(L=kU);let Fe=Xe>0,Ne=ze-Xe-(Fe?Re:0);ye=L(yk(Ne,P,H)),be=(Q==0?ye/2:Q==Z?0:ye)-Q*Z*((Q==0?z/2:0)+(Fe?Re/2:0));const Ve={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},qt=ae?null:new Path2D;let et=null;if(X!=null)et=v.data[X.series[1]];else{let{y0:Pe,y1:st}=h;Pe!=null&&st!=null&&(C=st.values(v,b,x,w),et=Pe.values(v,b,x,w))}let Je=F*ye,Ue=U*ye;for(let Pe=Z==1?x:w;Pe>=x&&Pe<=w;Pe+=Z){let st=C[Pe];if(st==null)continue;if(et!=null){let Mt=et[Pe]??0;if(st-Mt==0)continue;le=E(Mt,S,R,N)}let he=_.distr!=2||h!=null?j[Pe]:Pe,dt=O(he,_,I,D),sn=E(On(st,te),S,R,N),Kt=L(dt-be),un=L(Hs(sn,le)),Zt=L(Xo(sn,le)),Pt=un-Zt;if(st!=null){let Mt=st<0?Ue:Je,Et=st<0?Je:Ue;ae?(Re>0&&ke[Pe]!=null&&G(gt.get(ke[Pe]),Kt,Zt+Ba(Re/2),ye,Hs(0,Pt-Re),Mt,Et),je[Pe]!=null&&G(pe.get(je[Pe]),Kt,Zt+Ba(Re/2),ye,Hs(0,Pt-Re),Mt,Et)):G(qt,Kt,Zt+Ba(Re/2),ye,Hs(0,Pt-Re),Mt,Et),W(v,b,Pe,Kt-Re/2,Zt,ye+Re,Pt)}}return Re>0?Ve.stroke=ae?gt:qt:ae||(Ve._fill=A.width==0?A._fill:A._stroke??A._fill,Ve.width=0),Ve.fill=ae?pe:qt,Ve})}function swe(t,e){const n=On(e==null?void 0:e.alignGaps,0);return(r,i,s,o)=>Pf(r,i,(l,u,h,f,p,m,v,b,x,w,A)=>{[s,o]=R2(h,s,o);let j=l.pxRound,C=F=>j(m(F,f,w,b)),_=F=>j(v(F,p,A,x)),S,O,E;f.ori==0?(S=L2,E=a0,O=tW):(S=F2,E=o0,O=nW);const D=f.dir*(f.ori==0?1:-1);let N=C(u[D==1?s:o]),I=N,R=[],L=[];for(let F=D==1?s:o;F>=s&&F<=o;F+=D)if(h[F]!=null){let Z=u[F],G=C(Z);R.push(I=G),L.push(_(h[F]))}const Q={stroke:t(R,L,S,E,O,j),fill:null,clip:null,band:null,gaps:null,flags:Fm},z=Q.stroke;let[H,P]=n4(r,i);if(l.fill!=null||H!=0){let F=Q.fill=new Path2D(z),U=l.fillTo(r,i,l.min,l.max,H),Z=_(U);E(F,I,Z),E(F,N,Z)}if(!l.spanGaps){let F=[];F.push(...r4(u,h,s,o,D,C,n)),Q.gaps=F=l.gaps(r,i,s,o,F),Q.clip=B2(F,f.ori,b,x,w,A)}return P!=0&&(Q.band=P==2?[Kc(r,i,s,o,z,-1),Kc(r,i,s,o,z,1)]:Kc(r,i,s,o,z,P)),Q})}function awe(t){return swe(owe,t)}function owe(t,e,n,r,i,s){const o=t.length;if(o<2)return null;const l=new Path2D;if(n(l,t[0],e[0]),o==2)r(l,t[1],e[1]);else{let u=Array(o),h=Array(o-1),f=Array(o-1),p=Array(o-1);for(let m=0;m<o-1;m++)f[m]=e[m+1]-e[m],p[m]=t[m+1]-t[m],h[m]=f[m]/p[m];u[0]=h[0];for(let m=1;m<o-1;m++)h[m]===0||h[m-1]===0||h[m-1]>0!=h[m]>0?u[m]=0:(u[m]=3*(p[m-1]+p[m])/((2*p[m]+p[m-1])/h[m-1]+(p[m]+2*p[m-1])/h[m]),isFinite(u[m])||(u[m]=0));u[o-1]=h[o-2];for(let m=0;m<o-1;m++)i(l,t[m]+p[m]/3,e[m]+u[m]*p[m]/3,t[m+1]-p[m]/3,e[m+1]-u[m+1]*p[m]/3,t[m+1],e[m+1])}return l}const Sk=new Set;function IB(){for(let t of Sk)t.syncRect(!0)}s0&&(ff(zxe,Zp,IB),ff(qxe,Zp,IB,!0),ff(IA,Zp,()=>{Ti.pxRatio=In}));const lwe=sW(),cwe=rW();function BB(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((s,o)=>jk(s,o,e,n))}function uwe(t,e){return t.map((n,r)=>r==0?{}:vi({},e,n))}function jk(t,e,n,r){return vi({},e==0?n:r,t)}function aW(t,e,n){return e==null?Bm:[e,n]}const hwe=aW;function dwe(t,e,n){return e==null?Bm:BA(e,n,G6,!0)}function oW(t,e,n,r){return e==null?Bm:N2(e,n,t.scales[r].log,!1)}const fwe=oW;function lW(t,e,n,r){return e==null?Bm:Y6(e,n,t.scales[r].log,!1)}const pwe=lW;function mwe(t,e,n,r,i){let s=Hs(mB(t),mB(e)),o=e-t,l=Wo(i/r*o,n);do{let u=n[l],h=r*u/o;if(h>=i&&s+(u<5?Qh.get(u):0)<=17)return[u,h]}while(++l<n.length);return[0,0]}function LB(t){let e,n;return t=t.replace(/(\d+)px/,(r,i)=>(e=ji((n=+i)*In))+"px"),[t,e,n]}function gwe(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=lr(e[2]*In,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Ti(t,e,n){const r={mode:On(t.mode,1)},i=r.mode;function s($,Y,J,ee){let ce=Y.valToPct($);return ee+J*(Y.dir==-1?1-ce:ce)}function o($,Y,J,ee){let ce=Y.valToPct($);return ee+J*(Y.dir==-1?ce:1-ce)}function l($,Y,J,ee){return Y.ori==0?s($,Y,J,ee):o($,Y,J,ee)}r.valToPosH=s,r.valToPosV=o;let u=!1;r.status=0;const h=r.root=to(Sxe);if(t.id!=null&&(h.id=t.id),ja(h,t.class),t.title){let $=to(_xe,h);$.textContent=t.title}const f=Po("canvas"),p=r.ctx=f.getContext("2d"),m=to(Txe,h);ff("click",m,$=>{$.target===b&&(Bn!=Ms||Un!=ml)&&_n.click(r,$)},!0);const v=r.under=to(kxe,m);m.appendChild(f);const b=r.over=to(Oxe,m);t=Lm(t);const x=+On(t.pxAlign,1),w=NB(x);(t.plugins||[]).forEach($=>{$.opts&&(t=$.opts(r,t)||t)});const A=t.ms||.001,j=r.series=i==1?BB(t.series||[],TB,DB,!1):uwe(t.series||[null],MB),C=r.axes=BB(t.axes||[],_B,OB,!0),_=r.scales={},S=r.bands=t.bands||[];S.forEach($=>{$.fill=vn($.fill||null),$.dir=On($.dir,-1)});const O=i==2?j[1].facets[0].scale:j[0].scale,E={axes:fl,series:c0},D=(t.drawOrder||["axes","series"]).map($=>E[$]);function N($){const Y=$.distr==3?J=>Xc(J>0?J:$.clamp(r,J,$.min,$.max,$.key)):$.distr==4?J=>K_(J,$.asinh):$.distr==100?J=>$.fwd(J):J=>J;return J=>{let ee=Y(J),{_min:ce,_max:ge}=$,De=ge-ce;return(ee-ce)/De}}function I($){let Y=_[$];if(Y==null){let J=(t.scales||Yg)[$]||Yg;if(J.from!=null){I(J.from);let ee=vi({},_[J.from],J,{key:$});ee.valToPct=N(ee),_[$]=ee}else{Y=_[$]=vi({},$==O?XU:ZAe,J),Y.key=$;let ee=Y.time,ce=Y.range,ge=oh(ce);if(($!=O||i==2&&!ee)&&(ge&&(ce[0]==null||ce[1]==null)&&(ce={min:ce[0]==null?dB:{mode:1,hard:ce[0],soft:ce[0]},max:ce[1]==null?dB:{mode:1,hard:ce[1],soft:ce[1]}},ge=!1),!ge&&I2(ce))){let De=ce;ce=(qe,Ye,ct)=>Ye==null?Bm:BA(Ye,ct,De)}Y.range=vn(ce||(ee?hwe:$==O?Y.distr==3?fwe:Y.distr==4?pwe:aW:Y.distr==3?oW:Y.distr==4?lW:dwe)),Y.auto=vn(ge?!1:Y.auto),Y.clamp=vn(Y.clamp||KAe),Y._min=Y._max=null,Y.valToPct=N(Y)}}}I("x"),I("y"),i==1&&j.forEach($=>{I($.scale)}),C.forEach($=>{I($.scale)});for(let $ in t.scales)I($);const R=_[O],L=R.distr;let Q,z;R.ori==0?(ja(h,jxe),Q=s,z=o):(ja(h,Cxe),Q=o,z=s);const H={};for(let $ in _){let Y=_[$];(Y.min!=null||Y.max!=null)&&(H[$]={min:Y.min,max:Y.max},Y.min=Y.max=null)}const P=t.tzDate||($=>new Date(ji($/A))),F=t.fmtDate||Z6,U=A==1?jAe(P):TAe(P),Z=SB(P,wB(A==1?SAe:_Ae,F)),G=CB(P,jB(OAe,F)),W=[],X=r.legend=vi({},DAe,t.legend),V=r.cursor=vi({},LAe,{drag:{y:i==2}},t.cursor),te=X.show,le=V.show,be=X.markers;X.idxs=W,be.width=vn(be.width),be.dash=vn(be.dash),be.stroke=vn(be.stroke),be.fill=vn(be.fill);let ye,Xe,ze,Re=[],ae=[],je,pe=!1,ke={};if(X.live){const $=j[1]?j[1].values:null;pe=$!=null,je=pe?$(r,1,0):{_:0};for(let Y in je)ke[Y]=W6}if(te)if(ye=Po("table",Pxe,h),ze=Po("tbody",null,ye),X.mount(r,ye),pe){Xe=Po("thead",null,ye,ze);let $=Po("tr",null,Xe);Po("th",null,$);for(var gt in je)Po("th",JI,$).textContent=gt}else ja(ye,Bxe),X.live&&ja(ye,Ixe);const We={show:!0},Le={show:!1};function Fe($,Y){if(Y==0&&(pe||!X.live||i==2))return Bm;let J=[],ee=Po("tr",Lxe,ze,ze.childNodes[Y]);ja(ee,$.class),$.show||ja(ee,Fd);let ce=Po("th",null,ee);if(be.show){let qe=to(Fxe,ce);if(Y>0){let Ye=be.width(r,Y);Ye&&(qe.style.border=Ye+"px "+be.dash(r,Y)+" "+be.stroke(r,Y)),qe.style.background=be.fill(r,Y)}}let ge=to(JI,ce);$.label instanceof HTMLElement?ge.appendChild($.label):ge.textContent=$.label,Y>0&&(be.show||(ge.style.color=$.width>0?be.stroke(r,Y):be.fill(r,Y)),Ve("click",ce,qe=>{if(V._lock)return;an(qe);let Ye=j.indexOf($);if((qe.ctrlKey||qe.metaKey)!=X.isolate){let ct=j.some((ft,bt)=>bt>0&&bt!=Ye&&ft.show);j.forEach((ft,bt)=>{bt>0&&Ds(bt,ct?bt==Ye?We:Le:We,!0,Qr.setSeries)})}else Ds(Ye,{show:!$.show},!0,Qr.setSeries)},!1),Ke&&Ve(rB,ce,qe=>{V._lock||(an(qe),Ds(j.indexOf($),wu,!0,Qr.setSeries))},!1));for(var De in je){let qe=Po("td",Hxe,ee);qe.textContent="--",J.push(qe)}return[ee,J]}const Ne=new Map;function Ve($,Y,J,ee=!0){const ce=Ne.get(Y)||{},ge=V.bind[$](r,Y,J,ee);ge&&(ff($,Y,ce[$]=ge),Ne.set(Y,ce))}function qt($,Y,J){const ee=Ne.get(Y)||{};for(let ce in ee)($==null||ce==$)&&(bk(ce,Y,ee[ce]),delete ee[ce]);$==null&&Ne.delete(Y)}let et=0,Je=0,Ue=0,Pe=0,st=0,he=0,dt=st,sn=he,Kt=Ue,un=Pe,Zt=0,Pt=0,Mt=0,Et=0;r.bbox={};let Ut=!1,ei=!1,yt=!1,Tt=!1,qn=!1,Ht=!1;function dr($,Y,J){(J||$!=r.width||Y!=r.height)&&Mn($,Y),ms(!1),yt=!0,ei=!0,Bt()}function Mn($,Y){r.width=et=Ue=$,r.height=Je=Pe=Y,st=he=0,Dt(),Dn();let J=r.bbox;Zt=J.left=Rd(st*In,.5),Pt=J.top=Rd(he*In,.5),Mt=J.width=Rd(Ue*In,.5),Et=J.height=Rd(Pe*In,.5)}const se=3;function Te(){let $=!1,Y=0;for(;!$;){Y++;let J=$r(Y),ee=Rn(Y);$=Y==se||J&&ee,$||(Mn(r.width,r.height),ei=!0)}}function tt({width:$,height:Y}){dr($,Y)}r.setSize=tt;function Dt(){let $=!1,Y=!1,J=!1,ee=!1;C.forEach((ce,ge)=>{if(ce.show&&ce._show){let{side:De,_size:qe}=ce,Ye=De%2,ct=ce.label!=null?ce.labelSize:0,ft=qe+ct;ft>0&&(Ye?(Ue-=ft,De==3?(st+=ft,ee=!0):J=!0):(Pe-=ft,De==0?(he+=ft,$=!0):Y=!0))}}),ds[0]=$,ds[1]=J,ds[2]=Y,ds[3]=ee,Ue-=pa[1]+pa[3],st+=pa[3],Pe-=pa[2]+pa[0],he+=pa[0]}function Dn(){let $=st+Ue,Y=he+Pe,J=st,ee=he;function ce(ge,De){switch(ge){case 1:return $+=De,$-De;case 2:return Y+=De,Y-De;case 3:return J-=De,J+De;case 0:return ee-=De,ee+De}}C.forEach((ge,De)=>{if(ge.show&&ge._show){let qe=ge.side;ge._pos=ce(qe,ge._size),ge.label!=null&&(ge._lpos=ce(qe,ge.labelSize))}})}if(V.dataIdx==null){let $=V.hover,Y=$.skip=new Set($.skip??[]);Y.add(void 0);let J=$.prox=vn($.prox),ee=$.bias??($.bias=0);V.dataIdx=(ce,ge,De,qe)=>{if(ge==0)return De;let Ye=De,ct=J(ce,ge,De,qe)??or,ft=ct>=0&&ct<or,bt=R.ori==0?Ue:Pe,Ft=V.left,jn=e[0],zt=e[ge];if(Y.has(zt[De])){Ye=null;let Gt=null,Nt=null,_t;if(ee==0||ee==-1)for(_t=De;Gt==null&&_t-- >0;)Y.has(zt[_t])||(Gt=_t);if(ee==0||ee==1)for(_t=De;Nt==null&&_t++<zt.length;)Y.has(zt[_t])||(Nt=_t);if(Gt!=null||Nt!=null)if(ft){let er=Gt==null?-1/0:Q(jn[Gt],R,bt,0),yr=Nt==null?1/0:Q(jn[Nt],R,bt,0),Ur=Ft-er,Ln=yr-Ft;Ur<=Ln?Ur<=ct&&(Ye=Gt):Ln<=ct&&(Ye=Nt)}else Ye=Nt==null?Gt:Gt==null?Nt:De-Gt<=Nt-De?Gt:Nt}else ft&&Ci(Ft-Q(jn[De],R,bt,0))>ct&&(Ye=null);return Ye}}const an=$=>{V.event=$};V.idxs=W,V._lock=!1;let nt=V.points;nt.show=vn(nt.show),nt.size=vn(nt.size),nt.stroke=vn(nt.stroke),nt.width=vn(nt.width),nt.fill=vn(nt.fill);const rt=r.focus=vi({},t.focus||{alpha:.3},V.focus),Ke=rt.prox>=0,Wt=Ke&&nt.one;let Jt=[],Ai=[],hs=[];function oc($,Y){let J=nt.show(r,Y);if(J instanceof HTMLElement)return ja(J,Nxe),ja(J,$.class),_l(J,-10,-10,Ue,Pe),b.insertBefore(J,Jt[Y]),J}function fa($,Y){if(i==1||Y>0){let J=i==1&&_[$.scale].time,ee=$.value;$.value=J?bB(ee)?CB(P,jB(ee,F)):ee||G:ee||YAe,$.label=$.label||(J?HAe:FAe)}if(Wt||Y>0){$.width=$.width==null?1:$.width,$.paths=$.paths||lwe||Zxe,$.fillTo=vn($.fillTo||JAe),$.pxAlign=+On($.pxAlign,x),$.pxRound=NB($.pxAlign),$.stroke=vn($.stroke||null),$.fill=vn($.fill||null),$._stroke=$._fill=$._paths=$._focus=null;let J=GAe(Hs(1,$.width),1),ee=$.points=vi({},{size:J,width:Hs(1,J*.2),stroke:$.stroke,space:J*2,paths:cwe,_stroke:null,_fill:null},$.points);ee.show=vn(ee.show),ee.filter=vn(ee.filter),ee.fill=vn(ee.fill),ee.stroke=vn(ee.stroke),ee.paths=vn(ee.paths),ee.pxAlign=$.pxAlign}if(te){let J=Fe($,Y);Re.splice(Y,0,J[0]),ae.splice(Y,0,J[1]),X.values.push(null)}if(le){W.splice(Y,0,null);let J=null;Wt?Y==0&&(J=oc($,Y)):Y>0&&(J=oc($,Y)),Jt.splice(Y,0,J),Ai.splice(Y,0,0),hs.splice(Y,0,0)}ni("addSeries",Y)}function Br($,Y){Y=Y??j.length,$=i==1?jk($,Y,TB,DB):jk($,Y,{},MB),j.splice(Y,0,$),fa(j[Y],Y)}r.addSeries=Br;function Mi($){if(j.splice($,1),te){X.values.splice($,1),ae.splice($,1);let Y=Re.splice($,1)[0];qt(null,Y.firstChild),Y.remove()}le&&(W.splice($,1),Jt.splice($,1)[0].remove(),Ai.splice($,1),hs.splice($,1)),ni("delSeries",$)}r.delSeries=Mi;const ds=[!1,!1,!1,!1];function rd($,Y){if($._show=$.show,$.show){let J=$.side%2,ee=_[$.scale];ee==null&&($.scale=J?j[1].scale:O,ee=_[$.scale]);let ce=ee.time;$.size=vn($.size),$.space=vn($.space),$.rotate=vn($.rotate),oh($.incrs)&&$.incrs.forEach(De=>{!Qh.has(De)&&Qh.set(De,MU(De))}),$.incrs=vn($.incrs||(ee.distr==2?xAe:ce?A==1?wAe:CAe:Nd)),$.splits=vn($.splits||(ce&&ee.distr==1?U:ee.distr==3?xk:ee.distr==4?$Ae:qAe)),$.stroke=vn($.stroke),$.grid.stroke=vn($.grid.stroke),$.ticks.stroke=vn($.ticks.stroke),$.border.stroke=vn($.border.stroke);let ge=$.values;$.values=oh(ge)&&!oh(ge[0])?vn(ge):ce?oh(ge)?SB(P,wB(ge,F)):bB(ge)?kAe(P,ge):ge||Z:ge||zAe,$.filter=vn($.filter||(ee.distr>=3&&ee.log==10?WAe:ee.distr==3&&ee.log==2?VAe:OU)),$.font=LB($.font),$.labelFont=LB($.labelFont),$._size=$.size(r,null,Y,0),$._space=$._rotate=$._incrs=$._found=$._splits=$._values=null,$._size>0&&(ds[Y]=!0,$._el=to(Exe,m))}}function dl($,Y,J,ee){let[ce,ge,De,qe]=J,Ye=Y%2,ct=0;return Ye==0&&(qe||ge)&&(ct=Y==0&&!ce||Y==2&&!De?ji(_B.size/3):0),Ye==1&&(ce||De)&&(ct=Y==1&&!ge||Y==3&&!qe?ji(OB.size/2):0),ct}const lc=r.padding=(t.padding||[dl,dl,dl,dl]).map($=>vn(On($,dl))),pa=r._padding=lc.map(($,Y)=>$(r,Y,ds,0));let vr,Or=null,An=null;const Qs=i==1?j[0].idxs:null;let ci=null,Us=!1;function Lr($,Y){if(e=$??[],r.data=r._data=e,i==2){vr=0;for(let J=1;J<j.length;J++)vr+=e[J][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),ci=e[0],vr=ci.length;let J=e;if(L==2){J=e.slice();let ee=J[0]=Array(vr);for(let ce=0;ce<vr;ce++)ee[ce]=ce}r._data=e=J}if(ms(!0),ni("setData"),L==2&&(yt=!0),Y!==!1){let J=R;J.auto(r,Us)?fu():Ws(O,J.min,J.max),Tt=Tt||V.left>=0,Ht=!0,Bt()}}r.setData=Lr;function fu(){Us=!0;let $,Y;i==1&&(vr>0?(Or=Qs[0]=0,An=Qs[1]=vr-1,$=e[0][Or],Y=e[0][An],L==2?($=Or,Y=An):$==Y&&(L==3?[$,Y]=N2($,$,R.log,!1):L==4?[$,Y]=Y6($,$,R.log,!1):R.time?Y=$+ji(86400/A):[$,Y]=BA($,Y,G6,!0))):(Or=Qs[0]=$=null,An=Qs[1]=Y=null)),Ws(O,$,Y)}let qa,fs,Qe,Ct,en,Sn,br,ui,Yi,$n;function Qn($,Y,J,ee,ce,ge){$??($=tB),J??(J=K6),ee??(ee="butt"),ce??(ce=tB),ge??(ge="round"),$!=qa&&(p.strokeStyle=qa=$),ce!=fs&&(p.fillStyle=fs=ce),Y!=Qe&&(p.lineWidth=Qe=Y),ge!=en&&(p.lineJoin=en=ge),ee!=Sn&&(p.lineCap=Sn=ee),J!=Ct&&p.setLineDash(Ct=J)}function ps($,Y,J,ee){Y!=fs&&(p.fillStyle=fs=Y),$!=br&&(p.font=br=$),J!=ui&&(p.textAlign=ui=J),ee!=Yi&&(p.textBaseline=Yi=ee)}function pu($,Y,J,ee,ce=0){if(ee.length>0&&$.auto(r,Us)&&(Y==null||Y.min==null)){let ge=On(Or,0),De=On(An,ee.length-1),qe=J.min==null?Wxe(ee,ge,De,ce,$.distr==3):[J.min,J.max];$.min=Xo($.min,J.min=qe[0]),$.max=Hs($.max,J.max=qe[1])}}const cc={min:null,max:null};function id(){for(let ee in _){let ce=_[ee];H[ee]==null&&(ce.min==null||H[O]!=null&&ce.auto(r,Us))&&(H[ee]=cc)}for(let ee in _){let ce=_[ee];H[ee]==null&&ce.from!=null&&H[ce.from]!=null&&(H[ee]=cc)}H[O]!=null&&ms(!0);let $={};for(let ee in H){let ce=H[ee];if(ce!=null){let ge=$[ee]=Lm(_[ee],tAe);if(ce.min!=null)vi(ge,ce);else if(ee!=O||i==2)if(vr==0&&ge.from==null){let De=ge.range(r,null,null,ee);ge.min=De[0],ge.max=De[1]}else ge.min=or,ge.max=-or}}if(vr>0){j.forEach((ee,ce)=>{if(i==1){let ge=ee.scale,De=H[ge];if(De==null)return;let qe=$[ge];if(ce==0){let Ye=qe.range(r,qe.min,qe.max,ge);qe.min=Ye[0],qe.max=Ye[1],Or=Wo(qe.min,e[0]),An=Wo(qe.max,e[0]),An-Or>1&&(e[0][Or]<qe.min&&Or++,e[0][An]>qe.max&&An--),ee.min=ci[Or],ee.max=ci[An]}else ee.show&&ee.auto&&pu(qe,De,ee,e[ce],ee.sorted);ee.idxs[0]=Or,ee.idxs[1]=An}else if(ce>0&&ee.show&&ee.auto){let[ge,De]=ee.facets,qe=ge.scale,Ye=De.scale,[ct,ft]=e[ce],bt=$[qe],Ft=$[Ye];bt!=null&&pu(bt,H[qe],ge,ct,ge.sorted),Ft!=null&&pu(Ft,H[Ye],De,ft,De.sorted),ee.min=De.min,ee.max=De.max}});for(let ee in $){let ce=$[ee],ge=H[ee];if(ce.from==null&&(ge==null||ge.min==null)){let De=ce.range(r,ce.min==or?null:ce.min,ce.max==-or?null:ce.max,ee);ce.min=De[0],ce.max=De[1]}}}for(let ee in $){let ce=$[ee];if(ce.from!=null){let ge=$[ce.from];if(ge.min==null)ce.min=ce.max=null;else{let De=ce.range(r,ge.min,ge.max,ee);ce.min=De[0],ce.max=De[1]}}}let Y={},J=!1;for(let ee in $){let ce=$[ee],ge=_[ee];if(ge.min!=ce.min||ge.max!=ce.max){ge.min=ce.min,ge.max=ce.max;let De=ge.distr;ge._min=De==3?Xc(ge.min):De==4?K_(ge.min,ge.asinh):De==100?ge.fwd(ge.min):ge.min,ge._max=De==3?Xc(ge.max):De==4?K_(ge.max,ge.asinh):De==100?ge.fwd(ge.max):ge.max,Y[ee]=J=!0}}if(J){j.forEach((ee,ce)=>{i==2?ce>0&&Y.y&&(ee._paths=null):Y[ee.scale]&&(ee._paths=null)});for(let ee in Y)yt=!0,ni("setScale",ee);le&&V.left>=0&&(Tt=Ht=!0)}for(let ee in H)H[ee]=null}function mu($){let Y=yk(Or-1,0,vr-1),J=yk(An+1,0,vr-1);for(;$[Y]==null&&Y>0;)Y--;for(;$[J]==null&&J<vr-1;)J++;return[Y,J]}function c0(){if(vr>0){let $=j.some(Y=>Y._focus)&&$n!=rt.alpha;$&&(p.globalAlpha=$n=rt.alpha),j.forEach((Y,J)=>{if(J>0&&Y.show&&(Gi(J,!1),Gi(J,!0),Y._paths==null)){let ee=$n;$n!=Y.alpha&&(p.globalAlpha=$n=Y.alpha);let ce=i==2?[0,e[J][0].length-1]:mu(e[J]);Y._paths=Y.paths(r,J,ce[0],ce[1]),$n!=ee&&(p.globalAlpha=$n=ee)}}),j.forEach((Y,J)=>{if(J>0&&Y.show){let ee=$n;$n!=Y.alpha&&(p.globalAlpha=$n=Y.alpha),Y._paths!=null&&gu(J,!1);{let ce=Y._paths!=null?Y._paths.gaps:null,ge=Y.points.show(r,J,Or,An,ce),De=Y.points.filter(r,J,ge,ce);(ge||De)&&(Y.points._paths=Y.points.paths(r,J,Or,An,De),gu(J,!0))}$n!=ee&&(p.globalAlpha=$n=ee),ni("drawSeries",J)}}),$&&(p.globalAlpha=$n=1)}}function Gi($,Y){let J=Y?j[$].points:j[$];J._stroke=J.stroke(r,$),J._fill=J.fill(r,$)}function gu($,Y){let J=Y?j[$].points:j[$],{stroke:ee,fill:ce,clip:ge,flags:De,_stroke:qe=J._stroke,_fill:Ye=J._fill,_width:ct=J.width}=J._paths;ct=lr(ct*In,3);let ft=null,bt=ct%2/2;Y&&Ye==null&&(Ye=ct>0?"#fff":qe);let Ft=J.pxAlign==1&&bt>0;if(Ft&&p.translate(bt,bt),!Y){let jn=Zt-ct/2,zt=Pt-ct/2,Gt=Mt+ct,Nt=Et+ct;ft=new Path2D,ft.rect(jn,zt,Gt,Nt)}Y?ti(qe,ct,J.dash,J.cap,Ye,ee,ce,De,ge):uc($,qe,ct,J.dash,J.cap,Ye,ee,ce,De,ft,ge),Ft&&p.translate(-bt,-bt)}function uc($,Y,J,ee,ce,ge,De,qe,Ye,ct,ft){let bt=!1;Ye!=0&&S.forEach((Ft,jn)=>{if(Ft.series[0]==$){let zt=j[Ft.series[1]],Gt=e[Ft.series[1]],Nt=(zt._paths||Yg).band;oh(Nt)&&(Nt=Ft.dir==1?Nt[0]:Nt[1]);let _t,er=null;zt.show&&Nt&&Yxe(Gt,Or,An)?(er=Ft.fill(r,jn)||ge,_t=zt._paths.clip):Nt=null,ti(Y,J,ee,ce,er,De,qe,Ye,ct,ft,_t,Nt),bt=!0}}),bt||ti(Y,J,ee,ce,ge,De,qe,Ye,ct,ft)}const hc=Fm|wk;function ti($,Y,J,ee,ce,ge,De,qe,Ye,ct,ft,bt){Qn($,Y,J,ee,ce),(Ye||ct||bt)&&(p.save(),Ye&&p.clip(Ye),ct&&p.clip(ct)),bt?(qe&hc)==hc?(p.clip(bt),ft&&p.clip(ft),Co(ce,De),dc($,ge,Y)):qe&wk?(Co(ce,De),p.clip(bt),dc($,ge,Y)):qe&Fm&&(p.save(),p.clip(bt),ft&&p.clip(ft),Co(ce,De),p.restore(),dc($,ge,Y)):(Co(ce,De),dc($,ge,Y)),(Ye||ct||bt)&&p.restore()}function dc($,Y,J){J>0&&(Y instanceof Map?Y.forEach((ee,ce)=>{p.strokeStyle=qa=ce,p.stroke(ee)}):Y!=null&&$&&p.stroke(Y))}function Co($,Y){Y instanceof Map?Y.forEach((J,ee)=>{p.fillStyle=fs=ee,p.fill(J)}):Y!=null&&$&&p.fill(Y)}function Rt($,Y,J,ee){let ce=C[$],ge;if(ee<=0)ge=[0,0];else{let De=ce._space=ce.space(r,$,Y,J,ee),qe=ce._incrs=ce.incrs(r,$,Y,J,ee,De);ge=mwe(Y,J,qe,ee,De)}return ce._found=ge}function vu($,Y,J,ee,ce,ge,De,qe,Ye,ct){let ft=De%2/2;x==1&&p.translate(ft,ft),Qn(qe,De,Ye,ct,qe),p.beginPath();let bt,Ft,jn,zt,Gt=ce+(ee==0||ee==3?-ge:ge);J==0?(Ft=ce,zt=Gt):(bt=ce,jn=Gt);for(let Nt=0;Nt<$.length;Nt++)Y[Nt]!=null&&(J==0?bt=jn=$[Nt]:Ft=zt=$[Nt],p.moveTo(bt,Ft),p.lineTo(jn,zt));p.stroke(),x==1&&p.translate(-ft,-ft)}function $r($){let Y=!0;return C.forEach((J,ee)=>{if(!J.show)return;let ce=_[J.scale];if(ce.min==null){J._show&&(Y=!1,J._show=!1,ms(!1));return}else J._show||(Y=!1,J._show=!0,ms(!1));let ge=J.side,De=ge%2,{min:qe,max:Ye}=ce,[ct,ft]=Rt(ee,qe,Ye,De==0?Ue:Pe);if(ft==0)return;let bt=ce.distr==2,Ft=J._splits=J.splits(r,ee,qe,Ye,ct,ft,bt),jn=ce.distr==2?Ft.map(_t=>ci[_t]):Ft,zt=ce.distr==2?ci[Ft[1]]-ci[Ft[0]]:ct,Gt=J._values=J.values(r,J.filter(r,jn,ee,ft,zt),ee,ft,zt);J._rotate=ge==2?J.rotate(r,Gt,ee,ft):0;let Nt=J._size;J._size=ao(J.size(r,Gt,ee,$)),Nt!=null&&J._size!=Nt&&(Y=!1)}),Y}function Rn($){let Y=!0;return lc.forEach((J,ee)=>{let ce=J(r,ee,ds,$);ce!=pa[ee]&&(Y=!1),pa[ee]=ce}),Y}function fl(){for(let $=0;$<C.length;$++){let Y=C[$];if(!Y.show||!Y._show)continue;let J=Y.side,ee=J%2,ce,ge,De=Y.stroke(r,$),qe=J==0||J==3?-1:1,[Ye,ct]=Y._found;if(Y.label!=null){let Ni=Y.labelGap*qe,xs=ji((Y._lpos+Ni)*In);ps(Y.labelFont[0],De,"center",J==2?mg:eB),p.save(),ee==1?(ce=ge=0,p.translate(xs,ji(Pt+Et/2)),p.rotate((J==3?-yx:yx)/2)):(ce=ji(Zt+Mt/2),ge=xs);let vl=TU(Y.label)?Y.label(r,$,Ye,ct):Y.label;p.fillText(vl,ce,ge),p.restore()}if(ct==0)continue;let ft=_[Y.scale],bt=ee==0?Mt:Et,Ft=ee==0?Zt:Pt,jn=Y._splits,zt=ft.distr==2?jn.map(Ni=>ci[Ni]):jn,Gt=ft.distr==2?ci[jn[1]]-ci[jn[0]]:Ye,Nt=Y.ticks,_t=Y.border,er=Nt.show?Nt.size:0,yr=ji(er*In),Ur=ji((Y.alignTo==2?Y._size-er-Y.gap:Y.gap)*In),Ln=Y._rotate*-yx/180,Wn=w(Y._pos*In),Xi=(yr+Ur)*qe,ri=Wn+Xi;ge=ee==0?ri:0,ce=ee==1?ri:0;let bs=Y.font[0],Vs=Y.align==1?yp:Y.align==2?Y_:Ln>0?yp:Ln<0?Y_:ee==0?"center":J==3?Y_:yp,Di=Ln||ee==1?"middle":J==2?mg:eB;ps(bs,De,Vs,Di);let hi=Y.font[1]*Y.lineGap,ys=jn.map(Ni=>w(l(Ni,ft,bt,Ft))),Ys=Y._values;for(let Ni=0;Ni<Ys.length;Ni++){let xs=Ys[Ni];if(xs!=null){ee==0?ce=ys[Ni]:ge=ys[Ni],xs=""+xs;let vl=xs.indexOf(`
`)==-1?[xs]:xs.split(/\n/gm);for(let Ki=0;Ki<vl.length;Ki++){let Ib=vl[Ki];Ln?(p.save(),p.translate(ce,ge+Ki*hi),p.rotate(Ln),p.fillText(Ib,0,0),p.restore()):p.fillText(Ib,ce,ge+Ki*hi)}}}Nt.show&&vu(ys,Nt.filter(r,zt,$,ct,Gt),ee,J,Wn,yr,lr(Nt.width*In,3),Nt.stroke(r,$),Nt.dash,Nt.cap);let Ri=Y.grid;Ri.show&&vu(ys,Ri.filter(r,zt,$,ct,Gt),ee,ee==0?2:1,ee==0?Pt:Zt,ee==0?Et:Mt,lr(Ri.width*In,3),Ri.stroke(r,$),Ri.dash,Ri.cap),_t.show&&vu([Wn],[1],ee==0?1:0,ee==0?1:2,ee==1?Pt:Zt,ee==1?Et:Mt,lr(_t.width*In,3),_t.stroke(r,$),_t.dash,_t.cap)}ni("drawAxes")}function ms($){j.forEach((Y,J)=>{J>0&&(Y._paths=null,$&&(i==1?(Y.min=null,Y.max=null):Y.facets.forEach(ee=>{ee.min=null,ee.max=null})))})}let pl=!1,$a=!1,Ge=[];function wt(){$a=!1;for(let $=0;$<Ge.length;$++)ni(...Ge[$]);Ge.length=0}function Bt(){pl||(lAe(fr),pl=!0)}function on($,Y=!1){pl=!0,$a=Y,$(r),fr(),Y&&Ge.length>0&&queueMicrotask(wt)}r.batch=on;function fr(){if(Ut&&(id(),Ut=!1),yt&&(Te(),yt=!1),ei){if(jr(v,yp,st),jr(v,mg,he),jr(v,Dg,Ue),jr(v,Rg,Pe),jr(b,yp,st),jr(b,mg,he),jr(b,Dg,Ue),jr(b,Rg,Pe),jr(m,Dg,et),jr(m,Rg,Je),f.width=ji(et*In),f.height=ji(Je*In),C.forEach(({_el:$,_show:Y,_size:J,_pos:ee,side:ce})=>{if($!=null)if(Y){let ge=ce===3||ce===0?J:0,De=ce%2==1;jr($,De?"left":"top",ee-ge),jr($,De?"width":"height",J),jr($,De?"top":"left",De?he:st),jr($,De?"height":"width",De?Pe:Ue),vk($,Fd)}else ja($,Fd)}),qa=fs=Qe=en=Sn=br=ui=Yi=Ct=null,$n=1,ld(!0),st!=dt||he!=sn||Ue!=Kt||Pe!=un){ms(!1);let $=Ue/Kt,Y=Pe/un;if(le&&!Tt&&V.left>=0){V.left*=$,V.top*=Y,Qa&&_l(Qa,ji(V.left),0,Ue,Pe),vs&&_l(vs,0,ji(V.top),Ue,Pe);for(let J=0;J<Jt.length;J++){let ee=Jt[J];ee!=null&&(Ai[J]*=$,hs[J]*=Y,_l(ee,ao(Ai[J]),ao(hs[J]),Ue,Pe))}}if(Nn.show&&!qn&&Nn.left>=0&&Nn.width>0){Nn.left*=$,Nn.width*=$,Nn.top*=Y,Nn.height*=Y;for(let J in m0)jr(xu,J,Nn[J])}dt=st,sn=he,Kt=Ue,un=Pe}ni("setSize"),ei=!1}et>0&&Je>0&&(p.clearRect(0,0,f.width,f.height),ni("drawClear"),D.forEach($=>$()),ni("draw")),Nn.show&&qn&&(Au(Nn),qn=!1),le&&Tt&&(mc(null,!0,!1),Tt=!1),X.show&&X.live&&Ht&&(f0(),Ht=!1),u||(u=!0,r.status=1,ni("ready")),Us=!1,pl=!1}r.redraw=($,Y)=>{yt=Y||!1,$!==!1?Ws(O,R.min,R.max):Bt()};function gs($,Y){let J=_[$];if(J.from==null){if(vr==0){let ee=J.range(r,Y.min,Y.max,$);Y.min=ee[0],Y.max=ee[1]}if(Y.min>Y.max){let ee=Y.min;Y.min=Y.max,Y.max=ee}if(vr>1&&Y.min!=null&&Y.max!=null&&Y.max-Y.min<1e-16)return;$==O&&J.distr==2&&vr>0&&(Y.min=Wo(Y.min,e[0]),Y.max=Wo(Y.max,e[0]),Y.min==Y.max&&Y.max++),H[$]=Y,Ut=!0,Bt()}}r.setScale=gs;let fc,bu,Qa,vs,If,yu,Ms,ml,sd,u0,Bn,Un,_o=!1;const _n=V.drag;let pr=_n.x,Fr=_n.y;le&&(V.x&&(fc=to(Dxe,b)),V.y&&(bu=to(Rxe,b)),R.ori==0?(Qa=fc,vs=bu):(Qa=bu,vs=fc),Bn=V.left,Un=V.top);const Nn=r.select=vi({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),xu=Nn.show?to(Mxe,Nn.over?b:v):null;function Au($,Y){if(Nn.show){for(let J in $)Nn[J]=$[J],J in m0&&jr(xu,J,$[J]);Y!==!1&&ni("setSelect")}}r.setSelect=Au;function h0($){if(j[$].show)te&&vk(Re[$],Fd);else if(te&&ja(Re[$],Fd),le){let J=Wt?Jt[0]:Jt[$];J!=null&&_l(J,-10,-10,Ue,Pe)}}function Ws($,Y,J){gs($,{min:Y,max:J})}function Ds($,Y,J,ee){Y.focus!=null&&X2($),Y.show!=null&&j.forEach((ce,ge)=>{ge>0&&($==ge||$==null)&&(ce.show=Y.show,h0(ge),i==2?(Ws(ce.facets[0].scale,null,null),Ws(ce.facets[1].scale,null,null)):Ws(ce.scale,null,null),Bt())}),J!==!1&&ni("setSeries",$,Y),ee&&ju("setSeries",r,$,Y)}r.setSeries=Ds;function Cb($,Y){vi(S[$],Y)}function V2($,Y){$.fill=vn($.fill||null),$.dir=On($.dir,-1),Y=Y??S.length,S.splice(Y,0,$)}function Y2($){$==null?S.length=0:S.splice($,1)}r.addBand=V2,r.setBand=Cb,r.delBand=Y2;function G2($,Y){j[$].alpha=Y,le&&Jt[$]!=null&&(Jt[$].style.opacity=Y),te&&Re[$]&&(Re[$].style.opacity=Y)}let ma,gl,pc;const wu={focus:!0};function X2($){if($!=pc){let Y=$==null,J=rt.alpha!=1;j.forEach((ee,ce)=>{if(i==1||ce>0){let ge=Y||ce==0||ce==$;ee._focus=Y?null:ge,J&&G2(ce,ge?1:rt.alpha)}}),pc=$,J&&Bt()}}te&&Ke&&Ve(iB,ye,$=>{V._lock||(an($),pc!=null&&Ds(null,wu,!0,Qr.setSeries))});function Ua($,Y,J){let ee=_[Y];J&&($=$/In-(ee.ori==1?he:st));let ce=Ue;ee.ori==1&&(ce=Pe,$=ce-$),ee.dir==-1&&($=ce-$);let ge=ee._min,De=ee._max,qe=$/ce,Ye=ge+(De-ge)*qe,ct=ee.distr;return ct==3?Im(10,Ye):ct==4?Xxe(Ye,ee.asinh):ct==100?ee.bwd(Ye):Ye}function _b($,Y){let J=Ua($,O,Y);return Wo(J,e[0],Or,An)}r.valToIdx=$=>Wo($,e[0]),r.posToIdx=_b,r.posToVal=Ua,r.valToPos=($,Y,J)=>_[Y].ori==0?s($,_[Y],J?Mt:Ue,J?Zt:0):o($,_[Y],J?Et:Pe,J?Pt:0),r.setCursor=($,Y,J)=>{Bn=$.left,Un=$.top,mc(null,Y,J)};function Tb($,Y){jr(xu,yp,Nn.left=$),jr(xu,Dg,Nn.width=Y)}function kb($,Y){jr(xu,mg,Nn.top=$),jr(xu,Rg,Nn.height=Y)}let ad=R.ori==0?Tb:kb,od=R.ori==1?Tb:kb;function d0(){if(te&&X.live)for(let $=i==2?1:0;$<j.length;$++){if($==0&&pe)continue;let Y=X.values[$],J=0;for(let ee in Y)ae[$][J++].firstChild.nodeValue=Y[ee]}}function f0($,Y){if($!=null&&($.idxs?$.idxs.forEach((J,ee)=>{W[ee]=J}):eAe($.idx)||W.fill($.idx),X.idx=W[0]),te&&X.live){for(let J=0;J<j.length;J++)(J>0||i==1&&!pe)&&K2(J,W[J]);d0()}Ht=!1,Y!==!1&&ni("setLegend")}r.setLegend=f0;function K2($,Y){let J=j[$],ee=$==0&&L==2?ci:e[$],ce;pe?ce=J.values(r,$,Y)??ke:(ce=J.value(r,Y==null?null:ee[Y],$,Y),ce=ce==null?ke:{_:ce}),X.values[$]=ce}function mc($,Y,J){sd=Bn,u0=Un,[Bn,Un]=V.move(r,Bn,Un),V.left=Bn,V.top=Un,le&&(Qa&&_l(Qa,ji(Bn),0,Ue,Pe),vs&&_l(vs,0,ji(Un),Ue,Pe));let ee,ce=Or>An;ma=or,gl=null;let ge=R.ori==0?Ue:Pe,De=R.ori==1?Ue:Pe;if(Bn<0||vr==0||ce){ee=V.idx=null;for(let qe=0;qe<j.length;qe++){let Ye=Jt[qe];Ye!=null&&_l(Ye,-10,-10,Ue,Pe)}Ke&&Ds(null,wu,!0,$==null&&Qr.setSeries),X.live&&(W.fill(ee),Ht=!0)}else{let qe,Ye,ct;i==1&&(qe=R.ori==0?Bn:Un,Ye=Ua(qe,O),ee=V.idx=Wo(Ye,e[0],Or,An),ct=Q(e[0][ee],R,ge,0));let ft=-10,bt=-10,Ft=0,jn=0,zt=!0,Gt="",Nt="";for(let _t=i==2?1:0;_t<j.length;_t++){let er=j[_t],yr=W[_t],Ur=yr==null?null:i==1?e[_t][yr]:e[_t][1][yr],Ln=V.dataIdx(r,_t,ee,Ye),Wn=Ln==null?null:i==1?e[_t][Ln]:e[_t][1][Ln];if(Ht=Ht||Wn!=Ur||Ln!=yr,W[_t]=Ln,_t>0&&er.show){let Xi=Ln==null?-10:Ln==ee?ct:Q(i==1?e[0][Ln]:e[_t][0][Ln],R,ge,0),ri=Wn==null?-10:z(Wn,i==1?_[er.scale]:_[er.facets[1].scale],De,0);if(Ke&&Wn!=null){let bs=R.ori==1?Bn:Un,Vs=Ci(rt.dist(r,_t,Ln,ri,bs));if(Vs<ma){let Di=rt.bias;if(Di!=0){let hi=Ua(bs,er.scale),ys=Wn>=0?1:-1,Ys=hi>=0?1:-1;Ys==ys&&(Ys==1?Di==1?Wn>=hi:Wn<=hi:Di==1?Wn<=hi:Wn>=hi)&&(ma=Vs,gl=_t)}else ma=Vs,gl=_t}}if(Ht||Wt){let bs,Vs;R.ori==0?(bs=Xi,Vs=ri):(bs=ri,Vs=Xi);let Di,hi,ys,Ys,Ri,Ni,xs=!0,vl=nt.bbox;if(vl!=null){xs=!1;let Ki=vl(r,_t);ys=Ki.left,Ys=Ki.top,Di=Ki.width,hi=Ki.height}else ys=bs,Ys=Vs,Di=hi=nt.size(r,_t);if(Ni=nt.fill(r,_t),Ri=nt.stroke(r,_t),Wt)_t==gl&&ma<=rt.prox&&(ft=ys,bt=Ys,Ft=Di,jn=hi,zt=xs,Gt=Ni,Nt=Ri);else{let Ki=Jt[_t];Ki!=null&&(Ai[_t]=ys,hs[_t]=Ys,hB(Ki,Di,hi,xs),cB(Ki,Ni,Ri),_l(Ki,ao(ys),ao(Ys),Ue,Pe))}}}}if(Wt){let _t=rt.prox,er=pc==null?ma<=_t:ma>_t||gl!=pc;if(Ht||er){let yr=Jt[0];yr!=null&&(Ai[0]=ft,hs[0]=bt,hB(yr,Ft,jn,zt),cB(yr,Gt,Nt),_l(yr,ao(ft),ao(bt),Ue,Pe))}}}if(Nn.show&&_o)if($!=null){let[qe,Ye]=Qr.scales,[ct,ft]=Qr.match,[bt,Ft]=$.cursor.sync.scales,jn=$.cursor.drag;if(pr=jn._x,Fr=jn._y,pr||Fr){let{left:zt,top:Gt,width:Nt,height:_t}=$.select,er=$.scales[bt].ori,yr=$.posToVal,Ur,Ln,Wn,Xi,ri,bs=qe!=null&&ct(qe,bt),Vs=Ye!=null&&ft(Ye,Ft);bs&&pr?(er==0?(Ur=zt,Ln=Nt):(Ur=Gt,Ln=_t),Wn=_[qe],Xi=Q(yr(Ur,bt),Wn,ge,0),ri=Q(yr(Ur+Ln,bt),Wn,ge,0),ad(Xo(Xi,ri),Ci(ri-Xi))):ad(0,ge),Vs&&Fr?(er==1?(Ur=zt,Ln=Nt):(Ur=Gt,Ln=_t),Wn=_[Ye],Xi=z(yr(Ur,Ft),Wn,De,0),ri=z(yr(Ur+Ln,Ft),Wn,De,0),od(Xo(Xi,ri),Ci(ri-Xi))):od(0,De)}else g0()}else{let qe=Ci(sd-If),Ye=Ci(u0-yu);if(R.ori==1){let Ft=qe;qe=Ye,Ye=Ft}pr=_n.x&&qe>=_n.dist,Fr=_n.y&&Ye>=_n.dist;let ct=_n.uni;ct!=null?pr&&Fr&&(pr=qe>=ct,Fr=Ye>=ct,!pr&&!Fr&&(Ye>qe?Fr=!0:pr=!0)):_n.x&&_n.y&&(pr||Fr)&&(pr=Fr=!0);let ft,bt;pr&&(R.ori==0?(ft=Ms,bt=Bn):(ft=ml,bt=Un),ad(Xo(ft,bt),Ci(bt-ft)),Fr||od(0,De)),Fr&&(R.ori==1?(ft=Ms,bt=Bn):(ft=ml,bt=Un),od(Xo(ft,bt),Ci(bt-ft)),pr||ad(0,ge)),!pr&&!Fr&&(ad(0,0),od(0,0))}if(_n._x=pr,_n._y=Fr,$==null){if(J){if(Nb!=null){let[qe,Ye]=Qr.scales;Qr.values[0]=qe!=null?Ua(R.ori==0?Bn:Un,qe):null,Qr.values[1]=Ye!=null?Ua(R.ori==1?Bn:Un,Ye):null}ju(G_,r,Bn,Un,Ue,Pe,ee)}if(Ke){let qe=J&&Qr.setSeries,Ye=rt.prox;pc==null?ma<=Ye&&Ds(gl,wu,!0,qe):ma>Ye?Ds(null,wu,!0,qe):gl!=pc&&Ds(gl,wu,!0,qe)}}Ht&&(X.idx=ee,f0()),Y!==!1&&ni("setCursor")}let To=null;Object.defineProperty(r,"rect",{get(){return To==null&&ld(!1),To}});function ld($=!1){$?To=null:(To=b.getBoundingClientRect(),ni("syncRect",To))}function Ob($,Y,J,ee,ce,ge,De){V._lock||_o&&$!=null&&$.movementX==0&&$.movementY==0||(p0($,Y,J,ee,ce,ge,De,!1,$!=null),$!=null?mc(null,!0,!0):mc(Y,!0,!1))}function p0($,Y,J,ee,ce,ge,De,qe,Ye){if(To==null&&ld(!1),an($),$!=null)J=$.clientX-To.left,ee=$.clientY-To.top;else{if(J<0||ee<0){Bn=-10,Un=-10;return}let[ct,ft]=Qr.scales,bt=Y.cursor.sync,[Ft,jn]=bt.values,[zt,Gt]=bt.scales,[Nt,_t]=Qr.match,er=Y.axes[0].side%2==1,yr=R.ori==0?Ue:Pe,Ur=R.ori==1?Ue:Pe,Ln=er?ge:ce,Wn=er?ce:ge,Xi=er?ee:J,ri=er?J:ee;if(zt!=null?J=Nt(ct,zt)?l(Ft,_[ct],yr,0):-10:J=yr*(Xi/Ln),Gt!=null?ee=_t(ft,Gt)?l(jn,_[ft],Ur,0):-10:ee=Ur*(ri/Wn),R.ori==1){let bs=J;J=ee,ee=bs}}Ye&&(Y==null||Y.cursor.event.type==G_)&&((J<=1||J>=Ue-1)&&(J=Rd(J,Ue)),(ee<=1||ee>=Pe-1)&&(ee=Rd(ee,Pe))),qe?(If=J,yu=ee,[Ms,ml]=V.move(r,J,ee)):(Bn=J,Un=ee)}const m0={width:0,height:0,left:0,top:0};function g0(){Au(m0,!1)}let Eb,Mb,Db,Rb;function Bf($,Y,J,ee,ce,ge,De){_o=!0,pr=Fr=_n._x=_n._y=!1,p0($,Y,J,ee,ce,ge,De,!0,!1),$!=null&&(Ve(X_,mk,Su,!1),ju(nB,r,Ms,ml,Ue,Pe,null));let{left:qe,top:Ye,width:ct,height:ft}=Nn;Eb=qe,Mb=Ye,Db=ct,Rb=ft}function Su($,Y,J,ee,ce,ge,De){_o=_n._x=_n._y=!1,p0($,Y,J,ee,ce,ge,De,!1,!0);let{left:qe,top:Ye,width:ct,height:ft}=Nn,bt=ct>0||ft>0,Ft=Eb!=qe||Mb!=Ye||Db!=ct||Rb!=ft;if(bt&&Ft&&Au(Nn),_n.setScale&&bt&&Ft){let jn=qe,zt=ct,Gt=Ye,Nt=ft;if(R.ori==1&&(jn=Ye,zt=ft,Gt=qe,Nt=ct),pr&&Ws(O,Ua(jn,O),Ua(jn+zt,O)),Fr)for(let _t in _){let er=_[_t];_t!=O&&er.from==null&&er.min!=or&&Ws(_t,Ua(Gt+Nt,_t),Ua(Gt,_t))}g0()}else V.lock&&(V._lock=!V._lock,mc(Y,!0,$!=null));$!=null&&(qt(X_,mk),ju(X_,r,Bn,Un,Ue,Pe,null))}function Z2($,Y,J,ee,ce,ge,De){if(V._lock)return;an($);let qe=_o;if(_o){let Ye=!0,ct=!0,ft=10,bt,Ft;R.ori==0?(bt=pr,Ft=Fr):(bt=Fr,Ft=pr),bt&&Ft&&(Ye=Bn<=ft||Bn>=Ue-ft,ct=Un<=ft||Un>=Pe-ft),bt&&Ye&&(Bn=Bn<Ms?0:Ue),Ft&&ct&&(Un=Un<ml?0:Pe),mc(null,!0,!0),_o=!1}Bn=-10,Un=-10,W.fill(null),mc(null,!0,!0),qe&&(_o=qe)}function v0($,Y,J,ee,ce,ge,De){V._lock||(an($),fu(),g0(),$!=null&&ju(sB,r,Bn,Un,Ue,Pe,null))}function b0(){C.forEach(gwe),dr(r.width,r.height,!0)}ff(IA,Zp,b0);const gc={};gc.mousedown=Bf,gc.mousemove=Ob,gc.mouseup=Su,gc.dblclick=v0,gc.setSeries=($,Y,J,ee)=>{let ce=Qr.match[2];J=ce(r,Y,J),J!=-1&&Ds(J,ee,!0,!1)},le&&(Ve(nB,b,Bf),Ve(G_,b,Ob),Ve(rB,b,$=>{an($),ld(!1)}),Ve(iB,b,Z2),Ve(sB,b,v0),Sk.add(r),r.syncRect=ld);const cd=r.hooks=t.hooks||{};function ni($,Y,J){$a?Ge.push([$,Y,J]):$ in cd&&cd[$].forEach(ee=>{ee.call(null,r,Y,J)})}(t.plugins||[]).forEach($=>{for(let Y in $.hooks)cd[Y]=(cd[Y]||[]).concat($.hooks[Y])});const vc=($,Y,J)=>J,Qr=vi({key:null,setSeries:!1,filters:{pub:gB,sub:gB},scales:[O,j[1]?j[1].scale:null],match:[vB,vB,vc],values:[null,null]},V.sync);Qr.match.length==2&&Qr.match.push(vc),V.sync=Qr;const Nb=Qr.key,y0=KU(Nb);function ju($,Y,J,ee,ce,ge,De){Qr.filters.pub($,Y,J,ee,ce,ge,De)&&y0.pub($,Y,J,ee,ce,ge,De)}y0.sub(r);function Pb($,Y,J,ee,ce,ge,De){Qr.filters.sub($,Y,J,ee,ce,ge,De)&&gc[$](null,Y,J,ee,ce,ge,De)}r.pub=Pb;function ud(){y0.unsub(r),Sk.delete(r),Ne.clear(),bk(IA,Zp,b0),h.remove(),ye==null||ye.remove(),ni("destroy")}r.destroy=ud;function bc(){ni("init",t,e),Lr(e||t.data,!1),H[O]?gs(O,H[O]):fu(),qn=Nn.show&&(Nn.width>0||Nn.height>0),Tt=Ht=!0,dr(t.width,t.height)}return j.forEach(fa),C.forEach(rd),n?n instanceof HTMLElement?(n.appendChild(h),bc()):n(r,bc):bc(),r}Ti.assign=vi;Ti.fmtNum=X6;Ti.rangeNum=BA;Ti.rangeLog=N2;Ti.rangeAsinh=Y6;Ti.orient=Pf;Ti.pxRatio=In;Ti.join=oAe;Ti.fmtDate=Z6,Ti.tzDate=bAe;Ti.sync=KU;{Ti.addGap=ewe,Ti.clipGaps=B2;let t=Ti.paths={points:rW};t.linear=sW,t.stepped=rwe,t.bars=iwe,t.spline=awe}const vwe=Object.freeze(Object.defineProperty({__proto__:null,default:Ti},Symbol.toStringTag,{value:"Module"})),bwe=M9(vwe);var ywe=bx.exports,FB;function xwe(){return FB||(FB=1,function(t,e){(function(r,i){t.exports=i(qv(),bwe)})(ywe,(n,r)=>(()=>{var i={"./common/index.ts":(u,h,f)=>{f.r(h),f.d(h,{dataMatch:()=>v,optionsUpdateState:()=>m});var p=function(b,x){var w={};for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&x.indexOf(A)<0&&(w[A]=b[A]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var j=0,A=Object.getOwnPropertySymbols(b);j<A.length;j++)x.indexOf(A[j])<0&&Object.prototype.propertyIsEnumerable.call(b,A[j])&&(w[A[j]]=b[A[j]]);return w};Object.is||Object.defineProperty(Object,"is",{value:function(x,w){return x===w&&(x!==0||1/x===1/w)||x!==x&&w!==w}});var m=function(x,w){var A=x.width,j=x.height,C=p(x,["width","height"]),_=w.width,S=w.height,O=p(w,["width","height"]),E="keep";if((j!==S||A!==_)&&(E="update"),Object.keys(C).length!==Object.keys(O).length)return"create";for(var D=0,N=Object.keys(C);D<N.length;D++){var I=N[D];if(!Object.is(C[I],O[I])){E="create";break}}return E},v=function(x,w){return x.length!==w.length?!1:x.every(function(A,j){var C=w[j];return A.length!==C.length?!1:A.every(function(_,S){return _===C[S]})})}},react:u=>{u.exports=n},uplot:u=>{u.exports=r}},s={};function o(u){var h=s[u];if(h!==void 0)return h.exports;var f=s[u]={exports:{}};return i[u](f,f.exports,o),f.exports}o.n=u=>{var h=u&&u.__esModule?()=>u.default:()=>u;return o.d(h,{a:h}),h},o.d=(u,h)=>{for(var f in h)o.o(h,f)&&!o.o(u,f)&&Object.defineProperty(u,f,{enumerable:!0,get:h[f]})},o.o=(u,h)=>Object.prototype.hasOwnProperty.call(u,h),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var l={};return(()=>{/*!*******************************!*\
  !*** ./react/uplot-react.tsx ***!
  \*******************************/o.r(l),o.d(l,{default:()=>v});var u=o("react"),h=o.n(u),f=o("uplot"),p=o.n(f),m=o("./common/index.ts");function v(b){var x=b.options,w=b.data,A=b.target,j=b.onDelete,C=b.onCreate,_=b.resetScales,S=_===void 0?!0:_,O=b.className,E=(0,u.useRef)(null),D=(0,u.useRef)(null),N=(0,u.useRef)(x),I=(0,u.useRef)(A),R=(0,u.useRef)(w),L=(0,u.useRef)(C),Q=(0,u.useRef)(j);(0,u.useEffect)(function(){L.current=C,Q.current=j});var z=(0,u.useCallback)(function(P){var F;P&&((F=Q.current)===null||F===void 0||F.call(Q,P),P.destroy(),E.current=null)},[]),H=(0,u.useCallback)(function(){var P,F=new(p())(N.current,R.current,I.current||D.current);E.current=F,(P=L.current)===null||P===void 0||P.call(L,F)},[]);return(0,u.useEffect)(function(){return H(),function(){z(E.current)}},[H,z]),(0,u.useEffect)(function(){if(N.current!==x){var P=(0,m.optionsUpdateState)(N.current,x);N.current=x,!E.current||P==="create"?(z(E.current),H()):P==="update"&&E.current.setSize({width:x.width,height:x.height})}},[x,H,z]),(0,u.useEffect)(function(){R.current!==w&&(E.current?(0,m.dataMatch)(R.current,w)||(S?E.current.setData(w,!0):(E.current.setData(w,!1),E.current.redraw())):(R.current=w,H()),R.current=w)},[w,S,H]),(0,u.useEffect)(function(){return I.current!==A&&(I.current=A,H()),function(){return z(E.current)}},[A,H,z]),A?null:h().createElement("div",{ref:D,className:O})}})(),l=l.default,l})())}(bx)),bx.exports}var Awe=xwe();const wwe=ll(Awe),cW=t=>t===null?"scalar":D2(t.__name__||"")?`{"${Eh(t.__name__)}",${Object.entries(t).filter(([e])=>e!=="__name__").map(([e,n])=>`${$h(e)}="${Eh(n)}"`).join(", ")}}`:`${t.__name__||""}{${Object.entries(t).filter(([e])=>e!=="__name__").map(([e,n])=>`${$h(e)}="${Eh(n)}"`).join(", ")}}`,HB=(t,e)=>{const n=zB[t%zB.length];return e?n:iL(n,.4)},zB=["#008000","#008080","#800000","#800080","#808000","#808080","#0000c0","#008040","#0080c0","#800040","#8000c0","#808040","#8080c0","#00c000","#00c080","#804000","#804080","#80c000","#80c080","#0040c0","#00c040","#00c0c0","#804040","#8040c0","#80c040","#80c0c0","#408000","#408080","#c00000","#c00080","#c08000","#c08080","#4000c0","#408040","#4080c0","#c00040","#c000c0","#c08040","#c080c0","#404000","#404080","#40c000","#40c080","#c04000","#c04080","#c0c000","#c0c080","#404040","#4040c0","#40c040","#40c0c0","#c04040","#c040c0","#c0c040","#0000a0","#008020","#0080a0","#800020","#8000a0","#808020","#8080a0","#0000e0","#008060","#0080e0","#800060","#8000e0","#808060","#8080e0","#0040a0","#00c020","#00c0a0","#804020","#8040a0","#80c020","#80c0a0","#0040e0","#00c060","#00c0e0","#804060","#8040e0","#80c060","#80c0e0","#4000a0","#408020","#4080a0","#c00020","#c000a0","#c08020","#c080a0","#4000e0","#408060","#4080e0","#c00060","#c000e0","#c08060","#c080e0","#404020","#4040a0","#40c020","#40c0a0","#c04020","#c040a0","#c0c020","#c0c0a0","#404060","#4040e0","#40c060","#40c0e0","#c04060","#c040e0","#c0c060","#00a000","#00a080","#802000","#802080","#80a000","#80a080","#0020c0","#00a040","#00a0c0","#802040","#8020c0","#80a040","#80a0c0","#006000","#006080","#00e000","#00e080","#806000","#806080","#80e000","#80e080","#006040","#0060c0","#00e040","#00e0c0","#806040","#8060c0","#80e040","#80e0c0","#40a000","#40a080","#c02000","#c02080","#c0a000","#c0a080","#4020c0","#40a040","#40a0c0","#c02040","#c020c0","#c0a040","#c0a0c0","#406000","#406080","#40e000","#40e080","#c06000","#c06080","#c0e000","#c0e080","#406040","#4060c0","#40e040","#40e0c0","#c06040","#c060c0","#c0e040","#c0e0c0","#0020a0","#00a020","#00a0a0","#802020","#8020a0","#80a020","#80a0a0","#0020e0","#00a060","#00a0e0","#802060","#8020e0","#80a060","#80a0e0","#006020","#0060a0","#00e020","#00e0a0","#806020","#8060a0","#80e020","#80e0a0","#006060","#0060e0","#00e060","#00e0e0","#806060","#8060e0","#80e060","#80e0e0","#4020a0","#40a020","#40a0a0","#c02020","#c020a0","#c0a020","#c0a0a0","#4020e0","#40a060","#40a0e0","#c02060","#c020e0","#c0a060","#c0a0e0","#406020","#4060a0","#40e020","#40e0a0","#c06020","#c060a0","#c0e020","#c0e0a0","#406060","#4060e0","#40e060","#40e0e0","#c06060","#c060e0","#c0e060","#208000","#208080","#a00000","#a00080","#a08000","#a08080","#208040","#2080c0","#a00040","#a000c0","#a08040","#a080c0","#204080","#20c000","#20c080","#a04000","#a04080","#a0c000","#a0c080","#2040c0","#20c040","#20c0c0","#a04040","#a040c0","#a0c040","#a0c0c0","#608000","#608080","#e00000","#e00080","#e08000","#e08080","#6000c0","#608040","#6080c0","#e00040","#e000c0","#e08040","#e080c0","#604080","#60c000","#60c080","#e04000","#e04080","#e0c000","#e0c080","#604040","#6040c0","#60c040","#60c0c0","#e04040","#e040c0","#e0c040","#e0c0c0","#208020","#2080a0","#a00020","#a000a0","#a08020","#a080a0","#2000e0","#208060","#2080e0","#a00060","#a000e0","#a08060","#a080e0","#2040a0","#20c020","#20c0a0","#a04020","#a040a0","#a0c020","#2040e0","#20c060","#20c0e0","#a04060","#a040e0","#a0c060","#a0c0e0","#6000a0","#608020","#6080a0","#e00020","#e000a0","#e08020","#e080a0","#6000e0","#608060","#6080e0","#e00060","#e000e0","#e08060","#e080e0","#604020","#6040a0","#60c020","#60c0a0","#e04020","#e040a0","#e0c020","#e0c0a0","#604060","#6040e0","#60c060","#60c0e0","#e04060","#e040e0","#e0c060","#e0c0e0","#20a000","#20a080","#a02000","#a02080","#a0a000","#a0a080","#2020c0","#20a040","#20a0c0","#a02040","#a020c0","#a0a040","#a0a0c0","#206000","#206080","#20e000","#20e080","#a06000","#a06080","#a0e000","#a0e080","#206040","#2060c0","#20e040","#20e0c0","#a06040","#a060c0","#a0e040","#a0e0c0","#602080","#60a000","#60a080","#e02000","#e02080","#e0a000","#e0a080","#6020c0","#60a040","#60a0c0","#e02040","#e020c0","#e0a040","#e0a0c0","#606000","#606080","#60e000","#60e080","#e06000","#e06080","#e0e000","#e0e080","#606040","#6060c0","#60e040","#60e0c0","#e06040","#e060c0","#e0e040","#e0e0c0","#20a020","#20a0a0","#a02020","#a020a0","#a0a020","#a0a0a0","#2020e0","#20a060","#20a0e0","#a02060","#a020e0","#a0a060","#a0a0e0","#206020","#2060a0","#20e020","#20e0a0","#a06020","#a060a0","#a0e020","#a0e0a0","#206060","#2060e0","#20e060","#20e0e0","#a06060","#a060e0","#a0e060","#a0e0e0","#6020a0","#60a020","#60a0a0","#e02020","#e020a0","#e0a020","#e0a0a0","#602060","#6020e0","#60a060","#60a0e0","#e02060","#e020e0","#e0a060","#e0a0e0","#606020","#6060a0","#60e020","#60e0a0","#e06020","#e060a0","#e0e020","#e0e0a0","#606060","#6060e0","#60e060","#60e0e0","#e06060","#e060e0","#e0e060","#008010","#008090","#800010","#800090","#808010","#808090","#0000d0","#008050","#0080d0","#800050","#8000d0","#808050","#8080d0","#004010","#004090","#00c010","#00c090","#804010","#804090","#80c010","#80c090","#004050","#0040d0","#00c050","#00c0d0","#804050","#8040d0","#80c050","#80c0d0","#400090","#408010","#408090","#c00010","#c00090","#c08010","#c08090","#4000d0","#408050","#4080d0","#c00050","#c000d0","#c08050","#c080d0","#404010","#404090","#40c010","#40c090","#c04010","#c04090","#c0c010","#c0c090","#404050","#4040d0","#40c050","#40c0d0","#c04050","#c040d0","#c0c050","#0000b0","#008030","#0080b0","#800030","#8000b0","#808030","#8080b0","#0000f0","#008070","#0080f0","#800070","#8000f0","#808070","#8080f0","#004030","#0040b0","#00c030","#00c0b0","#804030","#8040b0","#80c030","#80c0b0","#004070","#0040f0","#00c070","#00c0f0","#804070","#8040f0","#80c070","#80c0f0","#4000b0","#408030","#4080b0","#c00030","#c000b0","#c08030","#c080b0","#400070","#4000f0","#408070","#4080f0","#c00070","#c000f0","#c08070","#c080f0","#404030","#4040b0","#40c030","#40c0b0","#c04030","#c040b0","#c0c030","#c0c0b0","#404070","#4040f0","#40c070","#40c0f0","#c04070","#c040f0","#c0c070","#c0c0f0","#002090","#00a010","#00a090","#802010","#802090","#80a010","#80a090","#0020d0","#00a050","#00a0d0","#802050","#8020d0","#80a050","#80a0d0","#006010","#006090","#00e010","#00e090","#806010","#806090","#80e010","#80e090","#006050","#0060d0","#00e050","#00e0d0","#806050","#8060d0","#80e050","#80e0d0","#402090","#40a010","#40a090","#c02010","#c02090","#c0a010","#c0a090","#402050","#4020d0","#40a050","#40a0d0","#c02050","#c020d0","#c0a050","#c0a0d0","#406010","#406090","#40e010","#40e090","#c06010","#c06090","#c0e010","#c0e090","#406050","#4060d0","#40e050","#40e0d0","#c06050","#c060d0","#c0e050","#c0e0d0","#0020b0","#00a030","#00a0b0","#802030","#8020b0","#80a030","#80a0b0","#0020f0","#00a070","#00a0f0","#802070","#8020f0","#80a070","#80a0f0","#006030","#0060b0","#00e030","#00e0b0","#806030","#8060b0","#80e030","#80e0b0","#006070","#0060f0","#00e070","#00e0f0","#806070","#8060f0","#80e070","#80e0f0","#4020b0","#40a030","#40a0b0","#c02030","#c020b0","#c0a030","#c0a0b0","#4020f0","#40a070","#40a0f0","#c02070","#c020f0","#c0a070","#c0a0f0","#406030","#4060b0","#40e030","#40e0b0","#c06030","#c060b0","#c0e030","#c0e0b0","#406070","#4060f0","#40e070","#40e0f0","#c06070","#c060f0","#c0e070","#208010","#208090","#a00010","#a00090","#a08010","#a08090","#2000d0","#208050","#2080d0","#a00050","#a000d0","#a08050","#a080d0","#204010","#204090","#20c010","#20c090","#a04010","#a04090","#a0c010","#a0c090","#204050","#2040d0","#20c050","#20c0d0","#a04050","#a040d0","#a0c050","#a0c0d0","#600090","#608010","#608090","#e00010","#e00090","#e08010","#e08090","#600050","#6000d0","#608050","#6080d0","#e00050","#e000d0","#e08050","#e080d0","#604010","#604090","#60c010","#60c090","#e04010","#e04090","#e0c010","#e0c090","#604050","#6040d0","#60c050","#60c0d0","#e04050","#e040d0","#e0c050","#e0c0d0","#2000b0","#208030","#2080b0","#a00030","#a000b0","#a08030","#a080b0","#2000f0","#208070","#2080f0","#a00070","#a000f0","#a08070","#a080f0","#204030","#2040b0","#20c030","#20c0b0","#a04030","#a040b0","#a0c030","#a0c0b0","#204070","#2040f0","#20c070","#20c0f0","#a04070","#a040f0","#a0c070","#a0c0f0","#6000b0","#608030","#6080b0","#e00030","#e000b0","#e08030","#e080b0","#600070","#6000f0","#608070","#e00070","#e000f0","#e08070","#e080f0","#604030","#6040b0","#60c030","#60c0b0","#e04030","#e040b0","#e0c030","#e0c0b0","#604070","#6040f0","#60c070","#60c0f0","#e04070","#e040f0","#e0c070","#e0c0f0","#20a010","#20a090","#a02010","#a02090","#a0a010","#a0a090","#2020d0","#20a050","#20a0d0","#a02050","#a020d0","#a0a050","#a0a0d0","#206010","#206090","#20e010","#20e090","#a06010","#a06090","#a0e010","#a0e090","#206050","#2060d0","#20e050","#20e0d0","#a06050","#a060d0","#a0e050","#a0e0d0","#602090","#60a010","#60a090","#e02010","#e02090","#e0a010","#e0a090","#602050","#6020d0","#60a050","#60a0d0","#e02050","#e020d0","#e0a050","#e0a0d0","#606010","#606090","#60e010","#60e090","#e06010","#e06090","#e0e010","#e0e090","#606050","#6060d0","#60e050","#60e0d0","#e06050","#e060d0","#e0e050","#2020b0","#20a030","#20a0b0","#a02030","#a020b0","#a0a030","#a0a0b0","#2020f0","#20a070","#20a0f0","#a02070","#a020f0","#a0a070","#a0a0f0","#206030","#2060b0","#20e030","#20e0b0","#a06030","#a060b0","#a0e030","#a0e0b0","#206070","#2060f0","#20e070","#20e0f0","#a06070","#a060f0","#a0e070","#a0e0f0","#6020b0","#60a030","#60a0b0","#e02030","#e020b0","#e0a030","#e0a0b0","#6020f0","#60a070","#60a0f0","#e02070","#e020f0","#e0a070","#e0a0f0","#606030","#6060b0","#60e030","#60e0b0","#e06030","#e060b0","#e0e030","#e0e0b0","#606070","#6060f0","#60e070","#60e0f0","#e06070","#e060f0","#e0e070"],Swe=t=>{if(t===null)return"null";const e=Math.abs(t);if(e>=1e24)return(t/1e24).toFixed(2)+"Y";if(e>=1e21)return(t/1e21).toFixed(2)+"Z";if(e>=1e18)return(t/1e18).toFixed(2)+"E";if(e>=1e15)return(t/1e15).toFixed(2)+"P";if(e>=1e12)return(t/1e12).toFixed(2)+"T";if(e>=1e9)return(t/1e9).toFixed(2)+"G";if(e>=1e6)return(t/1e6).toFixed(2)+"M";if(e>=1e3)return(t/1e3).toFixed(2)+"k";if(e>=1)return t.toFixed(2);if(e===0)return t.toFixed(2);if(e<1e-23)return(t/1e-24).toFixed(2)+"y";if(e<1e-20)return(t/1e-21).toFixed(2)+"z";if(e<1e-17)return(t/1e-18).toFixed(2)+"a";if(e<1e-14)return(t/1e-15).toFixed(2)+"f";if(e<1e-11)return(t/1e-12).toFixed(2)+"p";if(e<1e-8)return(t/1e-9).toFixed(2)+"n";if(e<1e-5)return(t/1e-6).toFixed(2)+"µ";if(e<.01)return(t/.001).toFixed(2)+"m";if(e<=1)return t.toFixed(2);throw Error("couldn't format a value, this is a bug")},xx=t=>{const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(t).replace(/[&<>"'/]/g,function(n){return e[n]})},jwe=t=>`
            <div class="labels">
              ${Object.keys(t).length===0?'<div class="no-labels">no labels</div>':""}
              ${t.__name__?`<div><strong>${xx(t.__name__)}</strong></div>`:""}
              ${Object.keys(t).filter(e=>e!=="__name__").map(e=>`<div><strong>${xx(e)}</strong>: ${xx(t[e])}</div>`).join("")}
            </div>`,Cwe=(t,e)=>{let n,r=null;const i=document.createElement("div");return i.className="u-tooltip",i.style.display="none",{hooks:{init:s=>{n=s.over,n.addEventListener("mouseenter",()=>{i.style.display="block"}),n.addEventListener("mouseleave",()=>{i.style.display="none"}),document.body.appendChild(i)},destroy:()=>{i.remove()},setSeries:(s,o,l)=>{r=o},setCursor:s=>{const{left:o,top:l,idx:u}=s.cursor;if(u==null||o===null||o===void 0||l===null||l===void 0||r===null)return;const h=s.data[0][u],f=e[r][u],p=s.series[r],m=p.labels;if(typeof p.stroke!="function")throw new Error("series.stroke is not a function");const v=p.stroke(s,r),b=n.getBoundingClientRect(),x=o+b.left,w=l+b.top;i.innerHTML=`
            <div class="date">${lf(h,t)}</div>
            <div class="series-value">
              <span class="detail-swatch" style="background-color: ${v}"></span>
              <span>${m.__name__?xx(m.__name__)+": ":" "}<strong>${f}</strong></span>
            </div>
            ${jwe(m)}
          `.trimEnd(),CL({getBoundingClientRect(){return{width:0,height:0,x,y:w,left:x,right:x,top:w,bottom:w}}},i,{placement:"right-start",middleware:[wL(5),jL(),SL()]}).then(({x:j,y:C})=>{Object.assign(i.style,{top:`${C}px`,left:`${j}px`})})}}}},_we=(t,e,n,r)=>{const i=t.axes[n];if(r>1)return i._size;let s=i.ticks.size+i.gap;const o=(e??[]).reduce((l,u)=>u.length>l.length?u:l,"");return o!=""&&(t.ctx.font=i.font[0],s+=t.ctx.measureText(o).width/devicePixelRatio),Math.ceil(s)},Twe=(t,e,n,r)=>{const i=[],s=t.series[e];if(!n&&r&&r.length){const[o,l]=s.idxs,u=t.data[0],h=t.data[e],f=Math.round(t.valToPos(u[o],"x",!0)),p=Math.round(t.valToPos(u[l],"x",!0));r[0][0]===f&&i.push(o);for(let m=0;m<r.length;m++){const v=r[m],b=r[m+1];if(b&&v[1]===b[0]){let x=t.posToIdx(v[1],!0);if(h[x]==null)for(let w=1;w<100;w++){if(h[x+w]!=null){x+=w;break}if(h[x-w]!=null){x-=w;break}}i.push(x)}}r[r.length-1][1]===p&&i.push(l)}return i.length?i:null},kwe=(t,e,n,r,i,s,o)=>({width:e-30,height:550,cursor:{focus:{prox:1e3},drag:{x:!0,setScale:!1}},tzDate:r?void 0:l=>Ti.tzDate(new Date(l*1e3),"Etc/UTC"),plugins:[Cwe(r,t)],legend:{show:!0,live:!1,isolate:!0,markers:{fill:(l,u)=>HB(u-1,s)}},drawOrder:["series","axes"],focus:{alpha:1},scales:i!==null?{y:{range:(l,u,h)=>{const f=Ti.rangeNum(i,h,.1,!0);return[i,f[1]]}}}:void 0,axes:[{space:80,labelSize:20,stroke:s?"#333":"#eee",ticks:{stroke:s?"#00000010":"#ffffff20"},grid:{show:!0,stroke:s?"#00000010":"#ffffff20",width:2,dash:[]},values:[[3600*24*365,"{YYYY}",null,null,null,null,null,null,1],[3600*24*28,"{MMM}",`
{YYYY}`,null,null,null,null,null,1],[3600*24,"{MMM} {D}",`
{YYYY}`,null,null,null,null,null,1],[3600,"{HH}:{mm}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[60,"{HH}:{mm}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[1,"{HH}:{mm}:{ss}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[.001,"{HH}:{mm}:{ss}.{fff}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1]]},{values:(l,u)=>u.map(Swe),ticks:{stroke:s?"#00000010":"#ffffff20"},grid:{show:!0,stroke:s?"#00000010":"#ffffff20",width:2,dash:[]},labelGap:8,labelSize:28,stroke:s?"#333":"#eee",size:_we}],series:[{},...n.map((l,u)=>({points:{filter:Twe},label:cW(l.metric),width:1.5,labels:l.metric,stroke:HB(u,s)}))],hooks:{setSelect:[l=>{const u=l.posToVal(l.select.left,"x"),h=Math.max(l.posToVal(l.select.left+l.select.width,"x"),u+1);o(u,h)}]}}),qB=t=>{const e=parseFloat(t);return isNaN(e)?null:e},Owe=(t,e,n,r)=>{const i=[];for(let o=e;o<=n;o+=r)i.push(o);const s=t.map(({values:o,histograms:l})=>{const u=[];let h=0,f=0;for(let p=e;p<=n;p+=r){const m=o&&o[h],v=l&&l[f];m&&o.length>h&&m[0]<p+r/100?(u.push(qB(m[1])),h++):v&&l.length>f&&v[0]<p+r/100?(u.push(qB(v[1].sum)),f++):u.push(null)}return u});return[i,...s]};function $B(t,e){const n=[];let r=[];const i=t[0].length,s=Array(i);for(let o=0;o<i;o++)s[o]=0;for(let o=1;o<t.length;o++)n.push(e(o)?t[o]:t[o].map((l,u)=>s[u]+=+(l||0)));for(let o=1;o<t.length;o++)e(o)||r.push({series:[t.findIndex((l,u)=>u>o&&!e(u)),o]});return r=r.filter(o=>o.series[1]>-1),{data:[t[0]].concat(n),bands:r}}function Ewe(t,e){const n=$B(e,r=>!1);return t.bands=n.bands,t.cursor=t.cursor||{},t.cursor.dataIdx=(r,i,s,o)=>e[i][s]==null?null:s,t.series.forEach(r=>{r.points=r.points||{},r.stroke&&(r.fill=iL(r.stroke,.6)),r.points.filter=(i,s,o,l)=>{if(o){const u=[];return e[s].forEach((h,f)=>{h!=null&&u.push(f)}),u}return null}}),t.scales=t.scales||{},t.scales.y={range:(r,i,s)=>[0,Ti.rangeNum(0,s,.1,!0)[1]]},t.hooks=t.hooks||{},t.hooks.setSeries=t.hooks.setSeries||[],t.hooks.setSeries.push((r,i,s)=>{if(s.show!=null){const o=$B(e,l=>!r.series[l].show);r.delBand(null),o.bands.forEach(l=>r.addBand(l)),r.setData(o.data)}}),{opts:t,data:n.data}}const Mwe=({data:t,range:{startTime:e,endTime:n,resolution:r},width:i,displayMode:s,yAxisMin:o,onSelectRange:l})=>{const[u,h]=M.useState(null),[f,p]=M.useState(null),{useLocalTime:m}=li(),v=KA();if(M.useEffect(()=>{if(i===0)return;const b=Owe(t,e,n,r),x=kwe(b,i,t,m,o,v==="light",l);s===Cm.Stacked?p(Ewe(x,b).data):p(b),h(x)},[i,t,s,e,n,r,m,v,l,o]),!(u===null||f===null))return a.jsxs(a.Fragment,{children:[a.jsx(wwe,{options:u,data:f,className:wU.uplotChart}),a.jsxs(ut,{fz:"xs",c:"dimmed",ml:40,mt:-25,mb:"lg",children:["Click: show single series,"," ",navigator.userAgent.includes("Mac")?"⌘":"Ctrl"," + click: hide single series"]})]})},Dwe=({expr:t,node:e,endTime:n,range:r,resolution:i,showExemplars:s,displayMode:o,yAxisMin:l,retriggerIdx:u,onSelectRange:h})=>{const{ref:f,width:p}=DG(),[m,v]=M.useState(!0),{showQueryWarnings:b,showQueryInfoNotices:x}=li(),w=e===null?t:is(e.type===vt.matrixSelector?{type:vt.vectorSelector,name:e.name,matchers:e.matchers,offset:e.offset,timestamp:e.timestamp,startOrEnd:e.startOrEnd,anchored:e.anchored,smoothed:e.smoothed}:e),A=(n!==null?n:Date.now())/1e3,j=A-r/1e3,C=ex(i,r)/1e3,{data:_,error:S,isFetching:O,isLoading:E,refetch:D}=zh({key:[M.useId()],path:"/query_range",params:{query:w,step:C.toString(),start:j.toString(),end:A.toString()},enabled:w!==""}),[N,I]=M.useState(null),R=(Q,z)=>a.jsxs(a.Fragment,{children:[b&&(Q==null?void 0:Q.map((H,P)=>a.jsx(Lt,{color:"red",title:"Query warning",icon:a.jsx(Qi,{}),children:H},P))),x&&(z==null?void 0:z.map((H,P)=>a.jsx(Lt,{color:"yellow",title:"Query notice",icon:a.jsx(Kn,{}),children:H},P)))]});if(M.useEffect(()=>{_!==void 0&&I({data:_,range:{startTime:j,endTime:A,resolution:C}})},[_]),M.useEffect(()=>{w!==""&&D()},[u,D,w,n,r,i]),M.useEffect(()=>{N!==null&&m&&v(!1)},[N,m,v]),E)return a.jsx(ve,{children:Array.from(Array(5),(Q,z)=>a.jsx(go,{height:30,mb:15},z))});if(S)return a.jsx(Lt,{color:"red",title:"Error executing query",icon:a.jsx(Qi,{}),children:S.message});if(N===null)return a.jsx(Lt,{variant:"transparent",children:"No data queried yet"});const{result:L}=N.data.data;return L.length===0?a.jsxs(En,{children:[a.jsx(Lt,{title:"Empty query result",icon:a.jsx(Kn,{}),children:"This query returned no data."}),R(N.data.warnings)]}):a.jsxs(En,{children:[e!==null&&e.type===vt.matrixSelector&&a.jsxs(Lt,{color:"orange",title:"Graphing modified expression",icon:a.jsx(Qi,{}),children:[a.jsx("strong",{children:"Note:"})," Range vector selectors can't be graphed, so graphing the equivalent instant vector selector instead."]}),R(N.data.warnings,N.data.infos),a.jsxs(ve,{pos:"relative",ref:f,className:wU.chartWrapper,children:[a.jsx(HO,{visible:O,zIndex:1e3,h:570,overlayProps:{radius:"sm",blur:.5},loaderProps:{type:"dots",color:"gray.6"}}),a.jsx(Mwe,{data:N.data.data.result,range:N.range,width:p,showExemplars:s,displayMode:o,yAxisMin:l,onSelectRange:h})]})]})},Rwe=({resolution:t,range:e,onChangeResolution:n})=>{const[r,i]=M.useState(Hn(ex(t,e))),s=o=>{const l=ME(o);t.type==="custom"&&l===t.step||(l===null?i(Hn(ex(t,e))):n({type:"custom",step:l}))};return a.jsxs(a.Fragment,{children:[a.jsx(Km,{title:"Resolution",placeholder:"Resolution",maxDropdownHeight:500,data:[{group:"Automatic resolution",items:[{label:"Low res.",value:"low"},{label:"Medium res.",value:"medium"},{label:"High res.",value:"high"}]},{group:"Fixed resolution",items:[{label:"10s",value:"10000"},{label:"30s",value:"30000"},{label:"1m",value:"60000"},{label:"5m",value:"300000"},{label:"15m",value:"900000"},{label:"1h",value:"3600000"}]},{group:"Custom resolution",items:[{label:"Enter value...",value:"custom"}]}],w:160,value:t.type==="auto"?t.density:t.type==="fixed"?t.step.toString():"custom",onChange:(o,l)=>{if(["low","medium","high"].includes(l.value)){n({type:"auto",density:l.value});return}if(l.value==="custom"){const h=ex(t,e);n({type:"custom",step:h}),i(Hn(h));return}const u=parseInt(l.value);if(!isNaN(u))n({type:"fixed",step:u});else throw new Error("Invalid resolution value")}}),t.type==="custom"&&a.jsx(tc,{placeholder:"Resolution",value:r,onChange:o=>i(o.currentTarget.value),onBlur:()=>s(r),onKeyDown:o=>o.key==="Enter"&&s(r),"aria-label":"Range",style:{width:`calc(44px + ${r.length+3}ch)`}})]})};var Ax={exports:{}},Nwe=Ax.exports,QB;function Pwe(){return QB||(QB=1,function(t,e){(function(n,r){t.exports=r()})(Nwe,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,s,o){var l,u=function(m,v,b){b===void 0&&(b={});var x=new Date(m),w=function(A,j){j===void 0&&(j={});var C=j.timeZoneName||"short",_=A+"|"+C,S=r[_];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[_]=S),S}(v,b);return w.formatToParts(x)},h=function(m,v){for(var b=u(m,v),x=[],w=0;w<b.length;w+=1){var A=b[w],j=A.type,C=A.value,_=n[j];_>=0&&(x[_]=parseInt(C,10))}var S=x[3],O=S===24?0:S,E=x[0]+"-"+x[1]+"-"+x[2]+" "+O+":"+x[4]+":"+x[5]+":000",D=+m;return(o.utc(E).valueOf()-(D-=D%1e3))/6e4},f=s.prototype;f.tz=function(m,v){m===void 0&&(m=l);var b,x=this.utcOffset(),w=this.toDate(),A=w.toLocaleString("en-US",{timeZone:m}),j=Math.round((w-new Date(A))/1e3/60),C=15*-Math.round(w.getTimezoneOffset()/15)-j;if(!Number(C))b=this.utcOffset(0,v);else if(b=o(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),v){var _=b.utcOffset();b=b.add(x-_,"minute")}return b.$x.$timezone=m,b},f.offsetName=function(m){var v=this.$x.$timezone||o.tz.guess(),b=u(this.valueOf(),v,{timeZoneName:m}).find(function(x){return x.type.toLowerCase()==="timezonename"});return b&&b.value};var p=f.startOf;f.startOf=function(m,v){if(!this.$x||!this.$x.$timezone)return p.call(this,m,v);var b=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(b,m,v).tz(this.$x.$timezone,!0)},o.tz=function(m,v,b){var x=b&&v,w=b||v||l,A=h(+o(),w);if(typeof m!="string")return o(m).tz(w);var j=function(O,E,D){var N=O-60*E*1e3,I=h(N,D);if(E===I)return[N,E];var R=h(N-=60*(I-E)*1e3,D);return I===R?[N,I]:[O-60*Math.min(I,R)*1e3,Math.max(I,R)]}(o.utc(m,x).valueOf(),A,w),C=j[0],_=j[1],S=o(C).utcOffset(_);return S.$x.$timezone=w,S},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(m){l=m}}})}(Ax)),Ax.exports}var Iwe=Pwe();const uW=ll(Iwe),Bwe="_metricName_13uqi_1",Lwe="_labelPair_13uqi_4",Fwe="_labelName_13uqi_14",Hwe="_labelValue_13uqi_18",vg={metricName:Bwe,labelPair:Lwe,labelName:Fwe,labelValue:Hwe},zwe=t=>{"clipboard"in navigator?navigator.clipboard.writeText(t).then(()=>nl.show({title:"Copied matcher!",message:`Label matcher ${t} copied to clipboard`})).catch(()=>nl.show({color:"red",title:"Failed to copy matcher!",message:"Label matcher could not be copied to clipboard."})):nl.show({color:"red",title:"Failed to copy matcher!",message:"Clipboard API is not supported in this context (most likely due to non-HTTPS origin)."})},Jp=({labels:t,format:e})=>{const n=()=>{const r=t&&D2(t.__name__||""),i=[];let s=!0;r&&(i.push(a.jsx("span",{children:a.jsxs("span",{className:vg.labelValue,children:['"',Eh(t.__name__),'"']})},"__name__")),s=!1);for(const o in t)o!=="__name__"&&(i.push(a.jsxs("span",{children:[!s&&", ",a.jsxs("span",{className:vg.labelPair,onDoubleClick:l=>zwe(l.currentTarget.innerText),title:"Double click to copy label matcher",children:[a.jsx("span",{className:vg.labelName,children:$h(o)}),"=",a.jsxs("span",{className:vg.labelValue,children:['"',Eh(t[o]),'"']})]})]},o)),s&&(s=!1));return a.jsxs("span",{children:[!r&&a.jsx("span",{className:vg.metricName,children:t?t.__name__:""}),"{",i,"}"]})};return t===null?a.jsx(a.Fragment,{children:"scalar"}):e?n():a.jsx(a.Fragment,{children:cW(t)})},qwe="_tableWrapper_n77eh_1",$we="_numberCell_n77eh_7",P1={tableWrapper:qwe,numberCell:$we};function Qwe(t,e){if(parseFloat(t[2])===0||parseFloat(t[1])===0){if(e.length>1)return Math.abs(Math.log(Math.abs(parseFloat(e[e.length-2][2])))-Math.log(Math.abs(parseFloat(e[e.length-2][1]))));throw new Error("Only one bucket in histogram ([-0, 0]). Cannot calculate defaultExpBucketWidth.")}else return Math.abs(Math.log(Math.abs(parseFloat(t[2])))-Math.log(Math.abs(parseFloat(t[1]))))}function Uwe(t){if(!t||t.length===0)return 0;for(let e=0;e<t.length;e++){const n=parseFloat(t[e][2]),r=parseFloat(t[e][1]);if(r>0)return r;if(r<0&&n>0||e===t.length-1&&n>0)return n}return 0}function Wwe(t){if(!t||t.length===0)return 0;for(let e=0;e<t.length;e++){const n=parseFloat(t[e][2]),r=parseFloat(t[e][1]),i=e>0?parseFloat(t[e-1][2]):0;if(n>=0)return e===0?r<0?r:0:i}return console.log("findmaxneg returning: ",t[t.length-1][2]),parseFloat(t[t.length-1][2])}function Vwe(t,e,n,r,i,s,o,l,u){return t==="linear"?(0-e)/(n-e)*100+"%":i===0?"0%":r===0?"100%":s===-1?o/l*100+"%":(o+.5*u)/l>0?(o+.5*u)/l*100+"%":"0%"}function Ywe(t){const e=parseFloat(t.slice(0,-1));return 5<e&&e<95}function Gwe(t){for(let e=0;e<t.length;e++){const n=parseFloat(t[e][1]),r=parseFloat(t[e][2]);if(n<=0&&r>=0)return e}return-1}const Xwe=t=>t===3||t===1?"[":"(",Kwe=t=>t===3||t===0?"]":")",hW=([t,e,n,r])=>`${Xwe(t)}${e} -> ${n}${Kwe(t)}`,Zwe="_histogramYWrapper_4ql1n_1",Jwe="_histogramYLabels_4ql1n_10",e2e="_histogramYLabel_4ql1n_10",t2e="_histogramXWrapper_4ql1n_22",n2e="_histogramXLabels_4ql1n_29",r2e="_histogramXLabel_4ql1n_29",i2e="_histogramContainer_4ql1n_40",s2e="_histogramAxes_4ql1n_46",a2e="_histogramYGrid_4ql1n_55",o2e="_histogramYTick_4ql1n_61",l2e="_histogramXGrid_4ql1n_69",c2e="_histogramXTick_4ql1n_76",u2e="_histogramBucketSlot_4ql1n_84",h2e="_histogramBucket_4ql1n_84",Ii={histogramYWrapper:Zwe,histogramYLabels:Jwe,histogramYLabel:e2e,histogramXWrapper:t2e,histogramXLabels:n2e,histogramXLabel:r2e,histogramContainer:i2e,histogramAxes:s2e,histogramYGrid:a2e,histogramYTick:o2e,histogramXGrid:l2e,histogramXTick:c2e,histogramBucketSlot:u2e,histogramBucket:h2e},d2e=({index:t,histogram:e,scale:n})=>{const{buckets:r}=e;if(!r||r.length===0)return a.jsx("div",{children:"No data"});const i=Intl.NumberFormat("en",{notation:"compact"}),s=[];for(const R of r){const L=parseFloat(R[1]),Q=parseFloat(R[2]),z=parseFloat(R[3]),H=Q-L;if(H===0){s.push(0);continue}s.push(z/H)}const o=Math.max(...s),l=r[0],u=r[r.length-1],h=parseFloat(u[2]),f=parseFloat(l[1]),p=Math.max(...r.map(R=>parseFloat(R[3]))),m=Qwe(u,r),v=h>0?h:0,b=Uwe(r),x=Wwe(r),w=parseFloat(l[1])<0?parseFloat(l[1]):0,A=w!==0?-Math.log(Math.abs(w)):0,j=x!==0?-Math.log(Math.abs(x)):0,C=b!==0?Math.log(b):0,_=v!==0?Math.log(v):0,S=j-A,O=_-C,E=S+m+O,D=Gwe(r),N=Vwe(n,f,h,b,x,D,S,E,m),I=Ywe(N);return a.jsxs("div",{className:Ii.histogramYWrapper,children:[a.jsxs("div",{className:Ii.histogramYLabels,children:[[1,.75,.5,.25].map(R=>a.jsx("div",{className:Ii.histogramYLabel,children:n==="linear"?"":i.format(p*R)},R)),a.jsx("div",{className:Ii.histogramYLabel,style:{height:0},children:"0"},0)]}),a.jsxs("div",{className:Ii.histogramXWrapper,children:[a.jsxs("div",{className:Ii.histogramContainer,children:[[0,.25,.5,.75,1].map(R=>a.jsxs(Cn.Fragment,{children:[a.jsx("div",{className:Ii.histogramYGrid,style:{bottom:R*100+"%"}}),a.jsx("div",{className:Ii.histogramYTick,style:{bottom:R*100+"%"}}),a.jsx("div",{className:Ii.histogramXGrid,style:{left:R*100+"%"}})]},R)),a.jsx("div",{className:Ii.histogramXTick,style:{left:"0%"}}),a.jsx("div",{className:Ii.histogramXTick,style:{left:N}}),a.jsx("div",{className:Ii.histogramXGrid,style:{left:N}}),a.jsx("div",{className:Ii.histogramXTick,style:{left:"100%"}}),a.jsx(f2e,{buckets:r,scale:n,rangeMin:f,rangeMax:h,index:t,fds:s,fdMax:o,countMax:p,defaultExpBucketWidth:m,minPositive:b,maxNegative:x,startPositive:C,startNegative:A,xWidthNegative:S,xWidthTotal:E}),a.jsx("div",{className:Ii.histogramAxes})]}),a.jsx("div",{className:Ii.histogramXLabels,children:a.jsx("div",{className:Ii.histogramXLabel,children:a.jsxs(Cn.Fragment,{children:[a.jsx("div",{style:{position:"absolute",left:0},children:i.format(f)}),f<0&&I&&a.jsx("div",{style:{position:"absolute",left:N},children:"0"}),a.jsx("div",{style:{position:"absolute",right:0},children:i.format(h)})]})})})]})]})},f2e=({buckets:t,scale:e,rangeMin:n,rangeMax:r,index:i,fds:s,fdMax:o,countMax:l,defaultExpBucketWidth:u,minPositive:h,maxNegative:f,startPositive:p,startNegative:m,xWidthNegative:v,xWidthTotal:b})=>a.jsx(Cn.Fragment,{children:t.map((x,w)=>{const A=parseFloat(x[1]),j=parseFloat(x[2]),C=parseFloat(x[3]),_=`bucket-${i}-${w}-${Math.ceil(parseFloat(x[3])*100)}`,S=Math.abs(Math.log(Math.abs(j))-Math.log(Math.abs(A))),O=S===0?u:S;let E="",D="",N="";switch(e){case"linear":{E=(j-A)/(r-n)*100+"%",D=(A-n)/(r-n)*100+"%",A===0&&j===0&&(D="0%",E="0%"),N=s[w]/o*100+"%";break}case"exponential":{let I=0;(h===0||f===0)&&(I=u),E=O/(b-I)*100+"%",A<0?D=-(Math.log(Math.abs(A))+m)/(b-I)*100+"%":D=(Math.log(A)-p+u+v-I)/(b-I)*100+"%",A<0&&j>0&&(D=v/b*100+"%"),A===0&&j===0&&(D="0%",E="0%"),N=C/l*100+"%";break}default:throw new Error("Invalid scale")}return a.jsx(Xr,{label:`range: ${hW(x)}`,children:a.jsx("div",{id:_,className:Ii.histogramBucketSlot,style:{left:D,width:E},children:a.jsx("div",{id:_,className:Ii.histogramBucket,style:{height:N}})})},w)})});He.extend(uW);const UB=1e3,FA=1e4,WB=(t,e)=>e&&t.length>FA?t.slice(0,FA):t,p2e=({data:t,limitResults:e,setLimitResults:n})=>{const[r,i]=M.useState("exponential"),{useLocalTime:s}=li(),{result:o,resultType:l}=t,u=o.length<=UB;return a.jsxs(En,{gap:"lg",mt:0,children:[e&&["vector","matrix"].includes(l)&&o.length>FA&&a.jsxs(Lt,{color:"orange",icon:a.jsx(Qi,{}),title:"Showing limited results",children:["Fetched ",t.result.length," metrics, only displaying first"," ",FA," for performance reasons.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>n(!1),children:"Show all results"})]}),!u&&a.jsxs(Lt,{title:"Formatting turned off",icon:a.jsx(Kn,{}),children:["Showing more than ",UB," series, turning off label formatting to improve rendering performance."]}),a.jsx(ve,{pos:"relative",className:P1.tableWrapper,children:a.jsx(re,{fz:"xs",children:a.jsx(re.Tbody,{children:l==="vector"?WB(o,e).map((h,f)=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsx(Jp,{labels:h.metric,format:u})}),a.jsxs(re.Td,{className:P1.numberCell,children:[h.value&&h.value[1],h.histogram&&a.jsxs(En,{children:[a.jsx(d2e,{histogram:h.histogram[1],index:f,scale:r}),a.jsxs(ht,{justify:"space-between",align:"center",p:10,children:[a.jsxs(ht,{align:"center",gap:"1rem",children:[a.jsxs("span",{children:[a.jsx("strong",{children:"Count:"})," ",h.histogram[1].count]}),a.jsxs("span",{children:[a.jsx("strong",{children:"Sum:"})," ",h.histogram[1].sum]})]}),a.jsxs(ht,{align:"center",gap:"1rem",children:[a.jsx("span",{children:"x-axis scale:"}),a.jsx(rb,{size:"xs",value:r,onChange:i,data:["exponential","linear"]})]})]}),m2e(h.histogram[1])]})]})]},f)):l==="matrix"?WB(o,e).map((h,f)=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsx(Jp,{labels:h.metric,format:u})}),a.jsx(re.Td,{className:P1.numberCell,children:h.values&&h.values.map((p,m)=>a.jsxs("div",{children:[p[1]," ",a.jsxs(ut,{span:!0,c:"gray.7",size:"1em",title:lf(p[0],s),children:["@ ",p[0]]})]},m))})]},f)):l==="scalar"?a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:"Scalar value"}),a.jsx(re.Td,{className:P1.numberCell,children:o[1]})]}):l==="string"?a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:"String value"}),a.jsx(re.Td,{children:o[1]})]}):a.jsx(Lt,{color:"red",title:"Invalid query response",icon:a.jsx(Qi,{}),children:"Invalid result value type"})})})})]})},m2e=t=>{var e;return a.jsx(re,{withTableBorder:!0,fz:"xs",children:a.jsxs(re.Tbody,{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[a.jsxs(re.Tr,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[a.jsx(re.Th,{children:"Bucket range"}),a.jsx(re.Th,{children:"Count"})]}),a.jsx(La,{w:"100%",h:265,children:(e=t.buckets)==null?void 0:e.map((n,r)=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{style:{textAlign:"left"},children:hW(n)}),a.jsx(re.Td,{children:n[3]})]},r))})]})})},VB=t=>a.jsx(re,{withRowBorders:!1,children:a.jsx(re.Tbody,{children:Object.entries(t).map(([e,n])=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{pl:0,py:3,c:"dimmed",children:e}),a.jsx(re.Td,{pr:0,py:3,ta:"right",children:n})]},e))})}),g2e=({numResults:t,responseTime:e,stats:n})=>a.jsx(Xr,{label:a.jsxs(ve,{p:"xs",children:[a.jsx(ut,{mb:"xs",children:"Timing stats (s):"}),VB(n.timings),a.jsx(ut,{mt:"sm",mb:"xs",children:"Sample stats:"}),VB(n.samples)]}),children:a.jsxs(ut,{size:"xs",c:"gray",children:["Load time: ",e,"ms   Result series: ",t]})});He.extend(uW);const v2e=({panelIdx:t,retriggerIdx:e,expr:n})=>{var A,j;const[r,i]=M.useState(0),[s,o]=M.useState(!0),{visualizer:l}=rc(C=>C.queryPage.panels[t]),u=cu(),{showQueryWarnings:h,showQueryInfoNotices:f}=li(),{endTime:p,range:m}=l,{data:v,error:b,isFetching:x,refetch:w}=zh({key:[M.useId()],path:"/query",params:{query:n,time:`${(p!==null?p:Date.now())/1e3}`,stats:"true"},enabled:n!=="",recordResponseTime:i});return M.useEffect(()=>{n!==""&&w()},[e,w,n,p]),M.useLayoutEffect(()=>{o(!0)},[v,x]),a.jsxs(En,{gap:"lg",mt:"sm",children:[a.jsxs(ht,{justify:"space-between",children:[a.jsx(yz,{time:p,range:m,description:"Evaluation time",onChangeTime:C=>u(Ju({idx:t,visualizer:{...l,endTime:C}}))}),!x&&v!==void 0&&a.jsx(g2e,{numResults:v.data.result.length,responseTime:r,stats:v.data.stats})]}),x?a.jsx(ve,{children:Array.from(Array(5),(C,_)=>a.jsx(go,{height:30,mb:15},_))}):b!==null?a.jsx(Lt,{color:"red",title:"Error executing query",icon:a.jsx(Qi,{}),children:b.message}):v===void 0?a.jsx(Lt,{variant:"transparent",children:"No data queried yet"}):a.jsxs(a.Fragment,{children:[v.data.result.length===0&&a.jsx(Lt,{title:"Empty query result",icon:a.jsx(Kn,{}),children:"This query returned no data."}),h&&((A=v.warnings)==null?void 0:A.map((C,_)=>a.jsx(Lt,{color:"red",title:"Query warning",icon:a.jsx(Qi,{}),children:C},_))),f&&((j=v.infos)==null?void 0:j.map((C,_)=>a.jsx(Lt,{color:"yellow",title:"Query notice",icon:a.jsx(Kn,{}),children:C},_))),a.jsx(p2e,{data:v.data,limitResults:s,setLimitResults:o})]})]})},b2e="_nodeText_1076s_1",y2e="_nodeTextSelected_1076s_10",x2e="_nodeTextError_1076s_27",A2e="_errorText_1076s_34",I1={nodeText:b2e,nodeTextSelected:y2e,nodeTextError:x2e,errorText:A2e},w2e={abs:{argTypes:[oe.vector],returnType:oe.vector},absent:{argTypes:[oe.vector],returnType:oe.vector},absent_over_time:{argTypes:[oe.matrix],returnType:oe.vector},acos:{argTypes:[oe.vector],returnType:oe.vector},acosh:{argTypes:[oe.vector],returnType:oe.vector},asin:{argTypes:[oe.vector],returnType:oe.vector},asinh:{argTypes:[oe.vector],returnType:oe.vector},atan:{argTypes:[oe.vector],returnType:oe.vector},atanh:{argTypes:[oe.vector],returnType:oe.vector},avg_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ceil:{argTypes:[oe.vector],returnType:oe.vector},changes:{argTypes:[oe.matrix],returnType:oe.vector},clamp:{argTypes:[oe.vector,oe.scalar,oe.scalar],returnType:oe.vector},clamp_max:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},clamp_min:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},cos:{argTypes:[oe.vector],returnType:oe.vector},cosh:{argTypes:[oe.vector],returnType:oe.vector},count_over_time:{argTypes:[oe.matrix],returnType:oe.vector},day_of_month:{argTypes:[oe.vector],returnType:oe.vector},day_of_week:{argTypes:[oe.vector],returnType:oe.vector},day_of_year:{argTypes:[oe.vector],returnType:oe.vector},days_in_month:{argTypes:[oe.vector],returnType:oe.vector},deg:{argTypes:[oe.vector],returnType:oe.vector},delta:{argTypes:[oe.matrix],returnType:oe.vector},deriv:{argTypes:[oe.matrix],returnType:oe.vector},double_exponential_smoothing:{argTypes:[oe.matrix,oe.scalar,oe.scalar],returnType:oe.vector},exp:{argTypes:[oe.vector],returnType:oe.vector},first_over_time:{argTypes:[oe.matrix],returnType:oe.vector},floor:{argTypes:[oe.vector],returnType:oe.vector},histogram_avg:{argTypes:[oe.vector],returnType:oe.vector},histogram_count:{argTypes:[oe.vector],returnType:oe.vector},histogram_fraction:{argTypes:[oe.scalar,oe.scalar,oe.vector],returnType:oe.vector},histogram_quantile:{argTypes:[oe.scalar,oe.vector],returnType:oe.vector},histogram_quantiles:{argTypes:[oe.vector,oe.string,oe.scalar,oe.scalar],returnType:oe.vector},histogram_stddev:{argTypes:[oe.vector],returnType:oe.vector},histogram_stdvar:{argTypes:[oe.vector],returnType:oe.vector},histogram_sum:{argTypes:[oe.vector],returnType:oe.vector},hour:{argTypes:[oe.vector],returnType:oe.vector},idelta:{argTypes:[oe.matrix],returnType:oe.vector},increase:{argTypes:[oe.matrix],returnType:oe.vector},info:{argTypes:[oe.vector,oe.vector],returnType:oe.vector},irate:{argTypes:[oe.matrix],returnType:oe.vector},label_join:{argTypes:[oe.vector,oe.string,oe.string,oe.string],returnType:oe.vector},label_replace:{argTypes:[oe.vector,oe.string,oe.string,oe.string,oe.string],returnType:oe.vector},last_over_time:{name:"last_over_time",argTypes:[oe.matrix],variadic:0,returnType:oe.vector},ln:{argTypes:[oe.vector],returnType:oe.vector},log10:{argTypes:[oe.vector],returnType:oe.vector},log2:{argTypes:[oe.vector],returnType:oe.vector},mad_over_time:{argTypes:[oe.matrix],returnType:oe.vector},max_over_time:{argTypes:[oe.matrix],returnType:oe.vector},min_over_time:{argTypes:[oe.matrix],returnType:oe.vector},minute:{argTypes:[oe.vector],returnType:oe.vector},month:{argTypes:[oe.vector],returnType:oe.vector},pi:{returnType:oe.scalar},predict_linear:{argTypes:[oe.matrix,oe.scalar],returnType:oe.vector},present_over_time:{argTypes:[oe.matrix],returnType:oe.vector},quantile_over_time:{argTypes:[oe.scalar,oe.matrix],returnType:oe.vector},rad:{argTypes:[oe.vector],returnType:oe.vector},rate:{argTypes:[oe.matrix],returnType:oe.vector},resets:{argTypes:[oe.matrix],returnType:oe.vector},round:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},scalar:{argTypes:[oe.vector],returnType:oe.scalar},sgn:{argTypes:[oe.vector],returnType:oe.vector},sin:{argTypes:[oe.vector],returnType:oe.vector},sinh:{argTypes:[oe.vector],returnType:oe.vector},sort:{argTypes:[oe.vector],returnType:oe.vector},sort_by_label:{argTypes:[oe.vector,oe.string],returnType:oe.vector},sort_by_label_desc:{argTypes:[oe.vector,oe.string],returnType:oe.vector},sort_desc:{argTypes:[oe.vector],returnType:oe.vector},sqrt:{argTypes:[oe.vector],returnType:oe.vector},stddev_over_time:{argTypes:[oe.matrix],returnType:oe.vector},stdvar_over_time:{argTypes:[oe.matrix],returnType:oe.vector},sum_over_time:{argTypes:[oe.matrix],returnType:oe.vector},tan:{argTypes:[oe.vector],returnType:oe.vector},tanh:{argTypes:[oe.vector],returnType:oe.vector},time:{returnType:oe.scalar},timestamp:{argTypes:[oe.vector],returnType:oe.vector},ts_of_first_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_last_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_max_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_min_over_time:{argTypes:[oe.matrix],returnType:oe.vector},vector:{argTypes:[oe.scalar],returnType:oe.vector},year:{argTypes:[oe.vector],returnType:oe.vector}},bg=20,t3=10,YB=10,n3={width:fe(18),height:fe(18)},S2e=t=>t.includes("error")?"error":t.includes("waiting")?"waiting":t.includes("running")?"running":"success",wx=({node:t,selectedNode:e,setSelectedNode:n,parentEl:r,reportNodeState:i,reverse:s,childIdx:o})=>{const l=ki(),[u,h]=M.useState(null),f=M.useCallback(R=>h(R),[]),[p,m]=M.useState({borderColor:"light-dark(var(--mantine-color-gray-4), var(--mantine-color-dark-3))",borderLeftStyle:"solid",borderLeftWidth:2,width:bg-7,left:-bg+7}),[v,b]=M.useState(0),[x,w]=M.useState({numSeries:0,labelExamples:{},sortedLabelCards:[]});M.useEffect(()=>{r===void 0&&n({id:l,node:t})},[r,n,l,t]),M.useEffect(()=>()=>{n(null)},[n]);const A=Z1e(t),[j,C]=M.useState(A.map(()=>"waiting")),_=M.useMemo(()=>S2e(j),[j]);let S=t;if(S.type===vt.matrixSelector){const R={...S};R.anchored=!1,R.smoothed=!1,S={type:vt.call,func:w2e.last_over_time,args:[R]}}const{data:O,error:E,isFetching:D}=zh({key:[ki()],path:"/query",params:{query:is(S)},recordResponseTime:b,enabled:_==="success"});M.useEffect(()=>{_==="error"&&i&&i(o,"error")},[_,i,o]),M.useEffect(()=>{E&&i&&i(o,"error")},[E,i,o]),M.useEffect(()=>{D&&i&&i(o,"running")},[D,i,o]);const N=M.useCallback((R,L)=>{C(Q=>{const z=[...Q];return z[R]=L,z})},[C]);M.useLayoutEffect(()=>{if(r===void 0||r===null||u===null)return;const R=r.getBoundingClientRect(),L=u.getBoundingClientRect();m(s?Q=>({...Q,top:"calc(50% - 1px)",bottom:L.bottom-R.top,borderTopLeftRadius:3,borderTopStyle:"solid",borderBottomLeftRadius:void 0}):Q=>({...Q,top:R.bottom-L.top,bottom:"calc(50% - 1px)",borderBottomLeftRadius:3,borderBottomStyle:"solid",borderTopLeftRadius:void 0}))},[r,u,s,f,m]),M.useEffect(()=>{if(!O)return;i&&i(o,"success");let R=0;const L={},{resultType:Q,result:z}=O.data;Q==="scalar"||Q==="string"?R=1:z&&z.length>0&&(R=z.length,z.forEach(F=>{Object.entries(F.metric).forEach(([U,Z])=>{U!=="__name__"&&(L[U]||(L[U]={}),L[U][Z]=(L[U][Z]||0)+1)})}));const H={},P={};Object.entries(L).forEach(([F,U])=>{H[F]=Object.keys(U).length,P[F]=Object.entries(U).sort(([,Z],[,G])=>G-Z).slice(0,YB).map(([Z,G])=>({value:Z,count:G}))}),w({numSeries:R,sortedLabelCards:Object.entries(H).sort((F,U)=>U[1]-F[1]),labelExamples:P})},[O,i,o]);const I=a.jsxs(ht,{w:"fit-content",gap:"lg",my:"sm",wrap:"nowrap",pos:"relative",align:"center",children:[r!==void 0&&a.jsx(ve,{pos:"absolute",display:"inline-block",style:p}),a.jsx(ve,{ref:f,w:"fit-content",px:10,py:4,style:{borderRadius:4,flexShrink:0},className:Ir(I1.nodeText,{[I1.nodeTextError]:E,[I1.nodeTextSelected]:(e==null?void 0:e.id)===l}),onClick:()=>{(e==null?void 0:e.id)===l?n(null):n({id:l,node:t})},children:Io(t,!1,1)}),_==="waiting"?a.jsx(ht,{c:"gray",children:a.jsx(gC,{style:n3})}):_==="running"?a.jsx(Zl,{size:14,color:"gray",type:"dots"}):_==="error"?a.jsxs(ht,{c:"orange.7",gap:5,fz:"xs",wrap:"nowrap",children:[a.jsx(gC,{style:n3})," Blocked on child query error"]}):D?a.jsx(Zl,{size:14,color:"gray"}):E?a.jsxs(ht,{gap:5,wrap:"nowrap",style:{flexShrink:0},className:I1.errorText,children:[a.jsx(gC,{style:n3}),a.jsxs(ut,{fz:"xs",children:[a.jsx("strong",{children:"Error executing query:"})," ",E.message]})]}):a.jsxs(ht,{gap:0,wrap:"nowrap",children:[a.jsxs(ut,{c:"dimmed",fz:"xs",style:{whiteSpace:"nowrap"},children:[x.numSeries," result",x.numSeries!==1&&"s","  –  ",v,"ms",x.sortedLabelCards.length>0&&a.jsx(a.Fragment,{children:"  –  "})]}),a.jsxs(ht,{gap:"xs",wrap:"nowrap",children:[x.sortedLabelCards.slice(0,t3).map(([R,L])=>a.jsx(Xr,{position:"bottom",withArrow:!0,color:"dark.6",label:a.jsx(ve,{p:"xs",children:a.jsxs(ir,{fz:"xs",children:[x.labelExamples[R].map(({value:Q,count:z})=>a.jsxs(ir.Item,{py:1,children:[a.jsx(NO,{c:"red.3",bg:"gray.8",children:ss(Q)})," ","(",z,"x)"]},Q)),L>YB&&a.jsx("li",{children:"..."})]})}),children:a.jsxs("span",{style:{cursor:"pointer",whiteSpace:"nowrap"},children:[a.jsx(ut,{component:"span",fz:"xs",className:"promql-code promql-label-name",c:"light-dark(var(--mantine-color-green-9), var(--mantine-color-green-6))",children:R}),a.jsxs(ut,{component:"span",fz:"xs",c:"dimmed",children:[": ",L]})]})},R)),x.sortedLabelCards.length>t3?a.jsxs(ut,{component:"span",c:"dimmed",fz:"xs",style:{whiteSpace:"nowrap"},children:["...",x.sortedLabelCards.length-t3," more..."]}):null]})]})]});return t.type===vt.binaryExpr?a.jsxs("div",{children:[a.jsx(ve,{ml:bg,children:a.jsx(wx,{node:A[0],selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!0,childIdx:0,reportNodeState:N})}),I,a.jsx(ve,{ml:bg,children:a.jsx(wx,{node:A[1],selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!1,childIdx:1,reportNodeState:N})})]}):a.jsxs("div",{children:[I,A.map((R,L)=>a.jsx(ve,{ml:bg,children:a.jsx(wx,{node:R,selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!1,childIdx:L,reportNodeState:N})},L))]})},j2e=({panelIdx:t,selectedNode:e,setSelectedNode:n,closeTreeView:r})=>{const{expr:i}=rc(o=>o.queryPage.panels[t]),{data:s}=yi({path:"/parse_query",params:{query:i}});return a.jsxs(Kr,{withBorder:!0,fz:"sm",style:{overflowX:"auto"},pl:"sm",children:[a.jsx(ec,{"aria-label":"Close tree view",title:"Close tree view",pos:"absolute",top:7,size:"sm",right:7,onClick:r}),a.jsx(wx,{childIdx:0,node:s.data,selectedNode:e,setSelectedNode:n,reverse:!1})]})},C2e={abs:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"abs(v instant-vector)"})," returns a vector containing all float samples in the input vector converted to their absolute value. Histogram samples in the input vector are ignored silently."]})}),absent:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"absent(v instant-vector)"})," returns an empty vector if the vector passed to it has any elements (float samples or histogram samples) and a 1-element vector with the value 1 if the vector passed to it has no elements."]}),a.jsx("p",{children:"This is useful for alerting on when no time series exist for a given metric name and label combination."}),a.jsx("pre",{children:a.jsxs("code",{children:["absent(nonexistent","{",'job="myjob"',"}",") # => ","{",'job="myjob"',"}","absent(nonexistent","{",'job="myjob",instance=~".*"',"}",") # => ","{",'job="myjob"',"}","absent(sum(nonexistent","{",'job="myjob"',"}",")) # => ","{","}"]})}),a.jsxs("p",{children:["In the first two examples, ",a.jsx("code",{children:"absent()"})," tries to be smart about deriving labels of the 1-element output vector from the input vector."]})]}),absent_over_time:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"absent_over_time(v range-vector)"})," returns an empty vector if the range vector passed to it has any elements (float samples or histogram samples) and a 1-element vector with the value 1 if the range vector passed to it has no elements."]}),a.jsx("p",{children:"This is useful for alerting on when no time series exist for a given metric name and label combination for a certain amount of time."}),a.jsx("pre",{children:a.jsxs("code",{children:["absent_over_time(nonexistent","{",'job="myjob"',"}","[1h]) # => ","{",'job="myjob"',"}","absent_over_time(nonexistent","{",'job="myjob",instance=~".*"',"}","[1h]) # => ","{",'job="myjob"',"}","absent_over_time(sum(nonexistent","{",'job="myjob"',"}",")[1h:]) # => ","{","}"]})}),a.jsxs("p",{children:["In the first two examples, ",a.jsx("code",{children:"absent_over_time()"})," tries to be smart about deriving labels of the 1-element output vector from the input vector."]})]}),acos:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),acosh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),asin:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),asinh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),atan:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),atanh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),avg_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ceil:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"ceil(v instant-vector)"})," returns a vector containing all float samples in the input vector rounded up to the nearest integer value greater than or equal to their original value. Histogram samples in the input vector are ignored silently."]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"ceil(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(±0) = ±0"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(1.49) = 2.0"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(1.78) = 2.0"})})]})]}),changes:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["For each input time series, ",a.jsx("code",{children:"changes(v range-vector)"})," returns the number of times its value has changed within the provided time range as an instant vector. A float sample followed by a histogram sample, or vice versa, counts as a change. A counter histogram sample followed by a gauge histogram sample with otherwise exactly the same values, or vice versa, does not count as a change."]})}),clamp:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"clamp(v instant-vector, min scalar, max scalar)"})," clamps the values of all float samples in"," ",a.jsx("code",{children:"v"})," to have a lower limit of ",a.jsx("code",{children:"min"})," and an upper limit of",a.jsx("code",{children:"max"}),". Histogram samples in the input vector are ignored silently."]}),a.jsx("p",{children:"Special cases:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["Return an empty vector if ",a.jsx("code",{children:"min > max"})]}),a.jsxs("li",{children:["Float samples are clamped to ",a.jsx("code",{children:"NaN"})," if ",a.jsx("code",{children:"min"})," or ",a.jsx("code",{children:"max"})," is ",a.jsx("code",{children:"NaN"})]})]})]}),clamp_max:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"clamp_max(v instant-vector, max scalar)"})," clamps the values of all float samples in ",a.jsx("code",{children:"v"})," to have an upper limit of ",a.jsx("code",{children:"max"}),". Histogram samples in the input vector are ignored silently."]})}),clamp_min:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"clamp_min(v instant-vector, min scalar)"})," clamps the values of all float samples in ",a.jsx("code",{children:"v"})," to have a lower limit of ",a.jsx("code",{children:"min"}),". Histogram samples in the input vector are ignored silently."]})}),cos:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),cosh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),count_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),day_of_month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_month(v=vector(time()) instant-vector)"})," interprets float samples in",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the month (in UTC) for each of those timestamps. Returned values are from 1 to 31. Histogram samples in the input vector are ignored silently."]})}),day_of_week:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_week(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"}),"as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the week (in UTC) for each of those timestamps. Returned values are from 0 to 6, where 0 means Sunday etc. Histogram samples in the input vector are ignored silently."]})}),day_of_year:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_year(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"}),"as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the year (in UTC) for each of those timestamps. Returned values are from 1 to 365 for non-leap years, and 1 to 366 in leap years. Histogram samples in the input vector are ignored silently."]})}),days_in_month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"days_in_month(v=vector(time()) instant-vector)"})," interprets float samples in",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the number of days in the month of each of those timestamps (in UTC). Returned values are from 28 to 31. Histogram samples in the input vector are ignored silently."]})}),deg:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),delta:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"delta(v range-vector)"})," calculates the difference between the first and last value of each time series element in a range vector ",a.jsx("code",{children:"v"}),", returning an instant vector with the given deltas and equivalent labels. The delta is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if the sample values are all integers."]}),a.jsx("p",{children:"The following example expression returns the difference in CPU temperature between now and 2 hours ago:"}),a.jsx("pre",{children:a.jsxs("code",{children:["delta(cpu_temp_celsius","{",'host="zeus"',"}","[2h])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"delta"})," acts on histogram samples by calculating a new histogram where each component (sum and count of observations, buckets) is the difference between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float samples and histogram samples within the range will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"delta"})," should only be used with gauges (for both floats and histograms)."]})]}),deriv:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"deriv(v range-vector)"})," calculates the per-second derivative of each float time series in the range vector ",a.jsx("code",{children:"v"}),", using"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Simple_linear_regression",children:"simple linear regression"}),". The range vector must have at least two float samples in order to perform the calculation. When ",a.jsx("code",{children:"+Inf"})," or"," ",a.jsx("code",{children:"-Inf"})," are found in the range vector, the slope and offset value calculated will be ",a.jsx("code",{children:"NaN"}),"."]}),a.jsxs("p",{children:[a.jsx("code",{children:"deriv"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),double_exponential_smoothing:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"double_exponential_smoothing(v range-vector, sf scalar, tf scalar)"})," produces a smoothed value for each float time series in the range in ",a.jsx("code",{children:"v"}),". The lower the smoothing factor ",a.jsx("code",{children:"sf"}),", the more importance is given to old data. The higher the trend factor ",a.jsx("code",{children:"tf"}),", the more trends in the data is considered. Both ",a.jsx("code",{children:"sf"})," and",a.jsx("code",{children:"tf"})," must be between 0 and 1. For additional details, refer to"," ",a.jsx("a",{href:"https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc433.htm",children:"NIST Engineering Statistics Handbook"}),". In Prometheus V2 this function was called ",a.jsx("code",{children:"holt_winters"}),". This caused confusion since the Holt-Winters method usually refers to triple exponential smoothing. Double exponential smoothing as implemented here is also referred to as “Holt Linear”."]}),a.jsxs("p",{children:[a.jsx("code",{children:"double_exponential_smoothing"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),exp:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"exp(v instant-vector)"})," calculates the exponential function for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples are ignored silently. Special cases are:"]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"Exp(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"Exp(NaN) = NaN"})})]})]}),first_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),floor:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"floor(v instant-vector)"})," returns a vector containing all float samples in the input vector rounded down to the nearest integer value smaller than or equal to their original value. Histogram samples in the input vector are ignored silently."]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"floor(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(±0) = ±0"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(1.49) = 1.0"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(1.78) = 1.0"})})]})]}),histogram_avg:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_avg(v instant-vector)"})," returns the arithmetic average of observed values stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_avg"})," as demonstrated below to compute the average request duration over a 5-minute window from a native histogram:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_avg(rate(http_request_duration_seconds[5m]))"})}),a.jsx("p",{children:"Which is equivalent to the following query:"}),a.jsx("pre",{children:a.jsxs("code",{children:[" ","histogram_sum(rate(http_request_duration_seconds[5m])) / histogram_count(rate(http_request_duration_seconds[5m]))"]})})]}),histogram_count:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_count(v instant-vector)"})," returns the count of observations stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_sum(v instant-vector)"})," returns the sum of observations stored in each native histogram sample."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_count"})," in the following way to calculate a rate of observations (in this case corresponding to “requests per second”) from a series of histogram samples:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_count(rate(http_request_duration_seconds[10m]))"})})]}),histogram_fraction:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_fraction(lower scalar, upper scalar, b instant-vector)"})," returns the estimated fraction of observations between the provided lower and upper values for each classic or native histogram contained in"," ",a.jsx("code",{children:"b"}),". Float samples in ",a.jsx("code",{children:"b"})," are considered the counts of observations in each bucket of one or more classic histograms, while native histogram samples in ",a.jsx("code",{children:"b"})," are treated each individually as a separate histogram. This works in the same way as for ",a.jsx("code",{children:"histogram_quantile()"}),". (See there for more details.)"]}),a.jsxs("p",{children:["If the provided lower and upper values do not coincide with bucket boundaries, the calculated fraction is an estimate, using the same interpolation method as for",a.jsx("code",{children:"histogram_quantile()"}),". (See there for more details.) Especially with classic histograms, it is easy to accidentally pick lower or upper values that are very far away from any bucket boundary, leading to large margins of error. Rather than using ",a.jsx("code",{children:"histogram_fraction()"})," with classic histograms, it is often a more robust approach to directly act on the bucket series when calculating fractions. See the",a.jsx("a",{href:"https://prometheus.io/docs/practices/histograms/#apdex-score",children:"calculation of the Apdex score"}),"as a typical example."]}),a.jsx("p",{children:"For example, the following expression calculates the fraction of HTTP requests over the last hour that took 200ms or less:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_fraction(0, 0.2, rate(http_request_duration_seconds[1h]))"})}),a.jsx("p",{children:"The error of the estimation depends on the resolution of the underlying native histogram and how closely the provided boundaries are aligned with the bucket boundaries in the histogram."}),a.jsxs("p",{children:[a.jsx("code",{children:"+Inf"})," and ",a.jsx("code",{children:"-Inf"})," are valid boundary values. For example, if the histogram in the expression above included negative observations (which shouldn’t be the case for request durations), the appropriate lower boundary to include all observations less than or equal 0.2 would be ",a.jsx("code",{children:"-Inf"})," rather than ",a.jsx("code",{children:"0"}),"."]}),a.jsx("p",{children:"Whether the provided boundaries are inclusive or exclusive is only relevant if the provided boundaries are precisely aligned with bucket boundaries in the underlying native histogram. In this case, the behavior depends on the schema definition of the histogram. (The usual standard exponential schemas all feature inclusive upper boundaries and exclusive lower boundaries for positive values, and vice versa for negative values.) Without a precise alignment of boundaries, the function uses interpolation to estimate the fraction. With the resulting uncertainty, it becomes irrelevant if the boundaries are inclusive or exclusive."}),a.jsxs("p",{children:["Special case for native histograms with standard exponential buckets:",a.jsx("code",{children:"NaN"})," observations are considered outside of any buckets in this case.",a.jsx("code",{children:"histogram_fraction(-Inf, +Inf, b)"})," effectively returns the fraction of non-",a.jsx("code",{children:"NaN"})," ","observations and may therefore be less than 1."]})]}),histogram_quantile:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_quantile(φ scalar, b instant-vector)"})," calculates the φ-quantile (0 ≤ φ ≤ 1) from a"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"classic histogram"})," or from a native histogram. (See ",a.jsx("a",{href:"https://prometheus.io/docs/practices/histograms",children:"histograms and summaries"})," for a detailed explanation of φ-quantiles and the usage of the (classic) histogram metric type in general.)"]}),a.jsxs("p",{children:["The float samples in ",a.jsx("code",{children:"b"})," are considered the counts of observations in each bucket of one or more classic histograms. Each float sample must have a label",a.jsx("code",{children:"le"})," where the label value denotes the inclusive upper bound of the bucket. (Float samples without such a label are silently ignored.) The other labels and the metric name are used to identify the buckets belonging to each classic histogram. The"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"histogram metric type"}),"automatically provides time series with the ",a.jsx("code",{children:"_bucket"})," suffix and the appropriate labels."]}),a.jsxs("p",{children:["The (native) histogram samples in ",a.jsx("code",{children:"b"})," are treated each individually as a separate histogram to calculate the quantile from."]}),a.jsxs("p",{children:["As long as no naming collisions arise, ",a.jsx("code",{children:"b"})," may contain a mix of classic and native histograms."]}),a.jsxs("p",{children:["Use the ",a.jsx("code",{children:"rate()"})," function to specify the time window for the quantile calculation."]}),a.jsxs("p",{children:["Example: A histogram metric is called ",a.jsx("code",{children:"http_request_duration_seconds"})," (and therefore the metric name for the buckets of a classic histogram is",a.jsx("code",{children:"http_request_duration_seconds_bucket"}),"). To calculate the 90th percentile of request durations over the last 10m, use the following expression in case",a.jsx("code",{children:"http_request_duration_seconds"})," is a classic histogram:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, rate(http_request_duration_seconds_bucket[10m]))"})}),a.jsx("p",{children:"For a native histogram, use the following expression instead:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, rate(http_request_duration_seconds[10m]))"})}),a.jsxs("p",{children:["The quantile is calculated for each label combination in",a.jsx("code",{children:"http_request_duration_seconds"}),". To aggregate, use the ",a.jsx("code",{children:"sum()"})," aggregator around the"," ",a.jsx("code",{children:"rate()"})," function. Since the ",a.jsx("code",{children:"le"})," label is required by",a.jsx("code",{children:"histogram_quantile()"})," to deal with classic histograms, it has to be included in the ",a.jsx("code",{children:"by"})," ","clause. The following expression aggregates the 90th percentile by ",a.jsx("code",{children:"job"})," for classic histograms:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (job, le) (rate(http_request_duration_seconds_bucket[10m])))"})}),a.jsx("p",{children:"When aggregating native histograms, the expression simplifies to:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (job) (rate(http_request_duration_seconds[10m])))"})}),a.jsxs("p",{children:["To aggregate all classic histograms, specify only the ",a.jsx("code",{children:"le"})," label:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (le) (rate(http_request_duration_seconds_bucket[10m])))"})}),a.jsxs("p",{children:["With native histograms, aggregating everything works as usual without any ",a.jsx("code",{children:"by"})," clause:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum(rate(http_request_duration_seconds[10m])))"})}),a.jsxs("p",{children:["In the (common) case that a quantile value does not coincide with a bucket boundary, the"," ",a.jsx("code",{children:"histogram_quantile()"})," function interpolates the quantile value within the bucket the quantile value falls into. For classic histograms, for native histograms with custom bucket boundaries, and for the zero bucket of other native histograms, it assumes a uniform distribution of observations within the bucket (also called"," ",a.jsx("em",{children:"linear interpolation"}),"). For the non-zero-buckets of native histograms with a standard exponential bucketing schema, the interpolation is done under the assumption that the samples within the bucket are distributed in a way that they would uniformly populate the buckets in a hypothetical histogram with higher resolution. (This is also called ",a.jsx("em",{children:"exponential interpolation"}),". See the"," ",a.jsx("a",{href:"https://prometheus.io/docs/specs/native_histograms/#interpolation-within-a-bucket",children:"native histogram specification"}),"for more details.)"]}),a.jsxs("p",{children:["If ",a.jsx("code",{children:"b"})," has 0 observations, ",a.jsx("code",{children:"NaN"})," is returned. For φ < 0, ",a.jsx("code",{children:"-Inf"})," is returned. For φ > 1, ",a.jsx("code",{children:"+Inf"})," is returned. For φ = ",a.jsx("code",{children:"NaN"}),", ",a.jsx("code",{children:"NaN"})," is returned."]}),a.jsx("p",{children:"Special cases for classic histograms:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["If ",a.jsx("code",{children:"b"})," contains fewer than two buckets, ",a.jsx("code",{children:"NaN"})," is returned."]}),a.jsxs("li",{children:["The highest bucket must have an upper bound of ",a.jsx("code",{children:"+Inf"}),". (Otherwise, ",a.jsx("code",{children:"NaN"})," is returned.)"]}),a.jsx("li",{children:"If a quantile is located in the highest bucket, the upper bound of the second highest bucket is returned."}),a.jsx("li",{children:"The lower limit of the lowest bucket is assumed to be 0 if the upper bound of that bucket is greater than 0. In that case, the usual linear interpolation is applied within that bucket. Otherwise, the upper bound of the lowest bucket is returned for quantiles located in the lowest bucket."})]}),a.jsx("p",{children:"Special cases for native histograms:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["If a native histogram with standard exponential buckets has ",a.jsx("code",{children:"NaN"}),"observations and the quantile falls into one of the existing exponential buckets, the result is skewed towards higher values due to ",a.jsx("code",{children:"NaN"}),"observations treated as ",a.jsx("code",{children:"+Inf"}),". This is flagged with an info level annotation."]}),a.jsxs("li",{children:["If a native histogram with standard exponential buckets has ",a.jsx("code",{children:"NaN"}),"observations and the quantile falls above all of the existing exponential buckets, ",a.jsx("code",{children:"NaN"})," is returned. This is flagged with an info level annotation."]}),a.jsx("li",{children:"A zero bucket with finite width is assumed to contain no negative observations if the histogram has observations in positive buckets, but none in negative buckets."}),a.jsx("li",{children:"A zero bucket with finite width is assumed to contain no positive observations if the histogram has observations in negative buckets, but none in positive buckets."})]}),a.jsxs("p",{children:["You can use ",a.jsx("code",{children:"histogram_quantile(0, v instant-vector)"})," to get the estimated minimum value stored in a histogram."]}),a.jsxs("p",{children:["You can use ",a.jsx("code",{children:"histogram_quantile(1, v instant-vector)"})," to get the estimated maximum value stored in a histogram."]}),a.jsx("p",{children:"Buckets of classic histograms are cumulative. Therefore, the following should always be the case:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"The counts in the buckets are monotonically increasing (strictly non-decreasing)."}),a.jsx("li",{children:"A lack of observations between the upper limits of two consecutive buckets results in equal counts in those two buckets."})]}),a.jsxs("p",{children:["However, floating point precision issues (e.g. small discrepancies introduced by computing of buckets with"," ",a.jsx("code",{children:"sum(rate(...))"}),") or invalid data might violate these assumptions. In that case,"," ",a.jsx("code",{children:"histogram_quantile"})," would be unable to return meaningful results. To mitigate the issue,"," ",a.jsx("code",{children:"histogram_quantile"})," assumes that tiny relative differences between consecutive buckets are happening because of floating point precision errors and ignores them. (The threshold to ignore a difference between two buckets is a trillionth (1e-12) of the sum of both buckets.) Furthermore, if there are non-monotonic bucket counts even after this adjustment, they are increased to the value of the previous buckets to enforce monotonicity. The latter is evidence for an actual issue with the input data and is therefore flagged by an info-level annotation reading ",a.jsx("code",{children:"input to histogram_quantile needed to be fixed for monotonicity"}),". If you encounter this annotation, you should find and remove the source of the invalid data."]})]}),histogram_quantiles:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"histogram_quantiles(v instant-vector, quantile_label string, φ_1 scalar, φ_2 scalar, ...)"})," ","calculates multiple (between 1 and 10) φ-quantiles (0 ≤ φ ≤ 1) from a"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"classic histogram"})," or from a native histogram. Quantile calculation works the same way as in ",a.jsx("code",{children:"histogram_quantile()"}),". The second argument (a string) specifies the label name that is used to identify different quantiles in the query result."]}),a.jsx("pre",{children:a.jsxs("code",{children:['histogram_quantiles(sum(rate(foo[1m])), "quantile", 0.9, 0.99) # => ',"{",'quantile="0.9"',"}"," 123","{",'quantile="0.99"',"}"," 128"]})})]}),histogram_stddev:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_stddev(v instant-vector)"})," returns the estimated standard deviation of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),". For this estimation, all observations in a bucket are assumed to have the value of the mean of the bucket boundaries. For the zero bucket and for buckets with custom boundaries, the arithmetic mean is used. For the usual exponential buckets, the geometric mean is used. Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_stdvar(v instant-vector)"})," returns the estimated variance of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),"."]})]}),histogram_stdvar:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_stddev(v instant-vector)"})," returns the estimated standard deviation of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),". For this estimation, all observations in a bucket are assumed to have the value of the mean of the bucket boundaries. For the zero bucket and for buckets with custom boundaries, the arithmetic mean is used. For the usual exponential buckets, the geometric mean is used. Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_stdvar(v instant-vector)"})," returns the estimated variance of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),"."]})]}),histogram_sum:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_count(v instant-vector)"})," returns the count of observations stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_sum(v instant-vector)"})," returns the sum of observations stored in each native histogram sample."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_count"})," in the following way to calculate a rate of observations (in this case corresponding to “requests per second”) from a series of histogram samples:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_count(rate(http_request_duration_seconds[10m]))"})})]}),hour:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"hour(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the hour of the day (in UTC) for each of those timestamps. Returned values are from 0 to 23. Histogram samples in the input vector are ignored silently."]})}),idelta:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"idelta(v range-vector)"})," calculates the difference between the last two samples in the range vector"," ",a.jsx("code",{children:"v"}),", returning an instant vector with the given deltas and equivalent labels. Both samples must be either float samples or histogram samples. Elements in ",a.jsx("code",{children:"v"})," where one of the last two samples is a float sample and the other is a histogram sample will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"idelta"})," should only be used with gauges (for both floats and histograms)."]})]}),increase:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"increase(v range-vector)"})," calculates the increase in the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. The increase is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if a counter increases only by integer increments."]}),a.jsx("p",{children:"The following example expression returns the number of HTTP requests as measured over the last 5 minutes, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["increase(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"increase"})," acts on histogram samples by calculating a new histogram where each component (sum and count of observations, buckets) is the increase between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float samples and histogram samples within the range, will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"increase"})," should only be used with counters (for both floats and histograms). It is syntactic sugar for ",a.jsx("code",{children:"rate(v)"})," multiplied by the number of seconds under the specified time range window, and should be used primarily for human readability. Use ",a.jsx("code",{children:"rate"})," in recording rules so that increases are tracked consistently on a per-second basis."]})]}),info:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["_The ",a.jsx("code",{children:"info"})," function is an experiment to improve UX around including labels from"," ",a.jsx("a",{href:"https://grafana.com/blog/2021/08/04/how-to-use-promql-joins-for-more-effective-queries-of-prometheus-metrics-at-scale/#info-metrics",children:"info metrics"}),". The behavior of this function may change in future versions of Prometheus, including its removal from PromQL."," ",a.jsx("code",{children:"info"})," has to be enabled via the",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"})," ",a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"._"]}),a.jsxs("p",{children:[a.jsx("code",{children:"info(v instant-vector, [data-label-selector instant-vector])"})," finds, for each time series in"," ",a.jsx("code",{children:"v"}),", all info series with matching ",a.jsx("em",{children:"identifying"})," labels (more on this later), and adds the union of their ",a.jsx("em",{children:"data"})," (i.e., non-identifying) labels to the time series. The second argument"," ",a.jsx("code",{children:"data-label-selector"})," is optional. It is not a real instant vector, but uses a subset of its syntax. It must start and end with curly braces (",a.jsxs("code",{children:["{"," ... ","}"]}),") and may only contain label matchers. The label matchers are used to constrain which info series to consider and which data labels to add to ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("p",{children:["Identifying labels of an info series are the subset of labels that uniquely identify the info series. The remaining labels are considered",a.jsx("em",{children:"data labels"})," (also called non-identifying). (Note that Prometheus’s concept of time series identity always includes ",a.jsx("em",{children:"all"})," the labels. For the sake of the ",a.jsx("code",{children:"info"}),"function, we “logically” define info series identity in a different way than in the conventional Prometheus view.) The identifying labels of an info series are used to join it to regular (non-info) series, i.e. those series that have the same labels as the identifying labels of the info series. The data labels, which are the ones added to the regular series by the ",a.jsx("code",{children:"info"})," function, effectively encode metadata key value pairs. (This implies that a change in the data labels in the conventional Prometheus view constitutes the end of one info series and the beginning of a new info series, while the “logical” view of the ",a.jsx("code",{children:"info"})," function is that the same info series continues to exist, just with different “data”.)"]}),a.jsx("p",{children:"The conventional approach of adding data labels is sometimes called a “join query”, as illustrated by the following example:"}),a.jsx("pre",{children:a.jsxs("code",{children:[" ","rate(http_server_request_duration_seconds_count[2m]) * on (job, instance) group_left (k8s_cluster_name) target_info"]})}),a.jsxs("p",{children:["The core of the query is the expression ",a.jsx("code",{children:"rate(http_server_request_duration_seconds_count[2m])"}),". But to add data labels from an info metric, the user has to use elaborate (and not very obvious) syntax to specify which info metric to use (",a.jsx("code",{children:"target_info"}),"), what the identifying labels are (",a.jsx("code",{children:"on (job, instance)"}),"), and which data labels to add (",a.jsx("code",{children:"group_left (k8s_cluster_name)"}),")."]}),a.jsxs("p",{children:["This query is not only verbose and hard to write, it might also run into an “identity crisis”: If any of the data labels of ",a.jsx("code",{children:"target_info"})," changes, Prometheus sees that as a change of series (as alluded to above, Prometheus just has no native concept of non-identifying labels). If the old ",a.jsx("code",{children:"target_info"})," ","series is not properly marked as stale (which can happen with certain ingestion paths), the query above will fail for up to 5m (the lookback delta) because it will find a conflicting match with both the old and the new version of ",a.jsx("code",{children:"target_info"}),"."]}),a.jsxs("p",{children:["The ",a.jsx("code",{children:"info"})," function not only resolves this conflict in favor of the newer series, it also simplifies the syntax because it knows about the available info series and what their identifying labels are. The example query looks like this with the ",a.jsx("code",{children:"info"})," function:"]}),a.jsx("pre",{children:a.jsxs("code",{children:["info( rate(http_server_request_duration_seconds_count[2m]),","{",'k8s_cluster_name=~".+"',"}",")"]})}),a.jsxs("p",{children:["The common case of adding ",a.jsx("em",{children:"all"})," data labels can be achieved by omitting the 2nd argument of the"," ",a.jsx("code",{children:"info"})," function entirely, simplifying the example even more:"]}),a.jsx("pre",{children:a.jsx("code",{children:"info(rate(http_server_request_duration_seconds_count[2m]))"})}),a.jsxs("p",{children:["While ",a.jsx("code",{children:"info"})," normally automatically finds all matching info series, it’s possible to restrict them by providing a ",a.jsx("code",{children:"__name__"})," label matcher, e.g.",a.jsxs("code",{children:["{",'__name__="target_info"',"}"]}),"."]}),a.jsxs("p",{children:["Note that if there are any time series in ",a.jsx("code",{children:"v"})," that match the ",a.jsx("code",{children:"data-label-selector"})," (or the default ",a.jsx("code",{children:"target_info"})," if that argument is not specified), they will be treated as info series and will be returned unchanged."]}),a.jsx("h3",{children:"Limitations"}),a.jsxs("p",{children:["In its current iteration, ",a.jsx("code",{children:"info"})," defaults to considering only info series with the name"," ",a.jsx("code",{children:"target_info"}),". It also assumes that the identifying info series labels are",a.jsx("code",{children:"instance"})," and ",a.jsx("code",{children:"job"}),". ",a.jsx("code",{children:"info"})," does support other info series names however, through",a.jsx("code",{children:"__name__"})," label matchers. E.g., one can explicitly say to consider both",a.jsx("code",{children:"target_info"})," and ",a.jsx("code",{children:"build_info"})," as follows:",a.jsxs("code",{children:["{",'__name__=~"(target|build)_info"',"}"]}),". However, the identifying labels always have to be ",a.jsx("code",{children:"instance"})," and ",a.jsx("code",{children:"job"}),"."]}),a.jsxs("p",{children:["These limitations are partially defeating the purpose of the ",a.jsx("code",{children:"info"})," function. At the current stage, this is an experiment to find out how useful the approach turns out to be in practice. A final version of the"," ",a.jsx("code",{children:"info"})," function will indeed consider all matching info series and with their appropriate identifying labels."]})]}),irate:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"irate(v range-vector)"})," calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Both samples must be either float samples or histogram samples. Elements in ",a.jsx("code",{children:"v"})," where one of the last two samples is a float sample and the other is a histogram sample will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"irate"})," should only be used with counters (for both floats and histograms)."]}),a.jsx("p",{children:"The following example expression returns the per-second rate of HTTP requests looking up to 5 minutes back for the two most recent data points, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["irate(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"irate"})," should only be used when graphing volatile, fast-moving counters. Use ",a.jsx("code",{children:"rate"})," for alerts and slow-moving counters, as brief changes in the rate can reset the ",a.jsx("code",{children:"FOR"})," clause and graphs consisting entirely of rare spikes are hard to read."]}),a.jsxs("p",{children:["Note that when combining ",a.jsx("code",{children:"irate()"})," with an",a.jsx("a",{href:"operators.md#aggregation-operators",children:"aggregation operator"})," (e.g. ",a.jsx("code",{children:"sum()"}),") or a function aggregating over time (any function ending in ",a.jsx("code",{children:"_over_time"}),"), always take an ",a.jsx("code",{children:"irate()"})," ","first, then aggregate. Otherwise ",a.jsx("code",{children:"irate()"})," cannot detect counter resets when your target restarts."]})]}),label_join:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each timeseries in ",a.jsx("code",{children:"v"}),","," ",a.jsx("code",{children:"label_join(v instant-vector, dst_label string, separator string, src_label_1 string, src_label_2 string, ...)"})," ","joins all the values of all the ",a.jsx("code",{children:"src_labels"}),"using ",a.jsx("code",{children:"separator"})," and returns the timeseries with the label ",a.jsx("code",{children:"dst_label"})," containing the joined value. There can be any number of ",a.jsx("code",{children:"src_labels"})," in this function."]}),a.jsxs("p",{children:[a.jsx("code",{children:"label_join"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["This example will return a vector with each time series having a ",a.jsx("code",{children:"foo"})," label with the value"," ",a.jsx("code",{children:"a,b,c"})," added to it:"]}),a.jsx("pre",{children:a.jsxs("code",{children:["label_join(up","{",'job="api-server",src1="a",src2="b",src3="c"',"}",', "foo", ",", "src1", "src2", "src3")']})})]}),label_replace:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each timeseries in ",a.jsx("code",{children:"v"}),","," ",a.jsx("code",{children:"label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)"}),"matches the ",a.jsx("a",{href:"./basics.md#regular-expressions",children:"regular expression"})," ",a.jsx("code",{children:"regex"})," against the value of the label ",a.jsx("code",{children:"src_label"}),". If it matches, the value of the label ",a.jsx("code",{children:"dst_label"})," in the returned timeseries will be the expansion of ",a.jsx("code",{children:"replacement"}),", together with the original labels in the input. Capturing groups in the regular expression can be referenced with ",a.jsx("code",{children:"$1"}),", ",a.jsx("code",{children:"$2"}),", etc. Named capturing groups in the regular expression can be referenced with ",a.jsx("code",{children:"$name"})," (where"," ",a.jsx("code",{children:"name"})," is the capturing group name). If the regular expression doesn’t match then the timeseries is returned unchanged."]}),a.jsxs("p",{children:[a.jsx("code",{children:"label_replace"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["This example will return timeseries with the values ",a.jsx("code",{children:"a:c"})," at label ",a.jsx("code",{children:"service"})," and"," ",a.jsx("code",{children:"a"})," at label ",a.jsx("code",{children:"foo"}),":"]}),a.jsx("pre",{children:a.jsxs("code",{children:["label_replace(up","{",'job="api-server",service="a:c"',"}",', "foo", "$1", "service", "(.*):.*")']})}),a.jsx("p",{children:"This second example has the same effect than the first example, and illustrates use of named capturing groups:"}),a.jsx("pre",{children:a.jsxs("code",{children:["label_replace(up","{",'job="api-server",service="a:c"',"}",', "foo", "$name", "service", "(?P<name>.*):(?P<version>.*)")']})})]}),last_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ln:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"ln(v instant-vector)"})," calculates the natural logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. Special cases are:"]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"ln(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(0) = -Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(x < 0) = NaN"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(NaN) = NaN"})})]})]}),log10:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"log10(v instant-vector)"})," calculates the decimal logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. The special cases are equivalent to those in"," ",a.jsx("code",{children:"ln"}),"."]})}),log2:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"log2(v instant-vector)"})," calculates the binary logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. The special cases are equivalent to those in"," ",a.jsx("code",{children:"ln"}),"."]})}),mad_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),max_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),min_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),minute:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"minute(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the minute of the hour (in UTC) for each of those timestamps. Returned values are from 0 to 59. Histogram samples in the input vector are ignored silently."]})}),month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"month(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the month of the year (in UTC) for each of those timestamps. Returned values are from 1 to 12, where 1 means January etc. Histogram samples in the input vector are ignored silently."]})}),pi:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),predict_linear:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"predict_linear(v range-vector, t scalar)"})," predicts the value of time series",a.jsx("code",{children:"t"})," seconds from now, based on the range vector ",a.jsx("code",{children:"v"}),", using"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Simple_linear_regression",children:"simple linear regression"}),". The range vector must have at least two float samples in order to perform the calculation. When ",a.jsx("code",{children:"+Inf"})," or"," ",a.jsx("code",{children:"-Inf"})," are found in the range vector, the predicted value will be ",a.jsx("code",{children:"NaN"}),"."]}),a.jsxs("p",{children:[a.jsx("code",{children:"predict_linear"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),present_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),quantile_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),rad:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),rate:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"rate(v range-vector)"})," calculates the per-second average rate of increase of the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Also, the calculation extrapolates to the ends of the time range, allowing for missed scrapes or imperfect alignment of scrape cycles with the range’s time period."]}),a.jsx("p",{children:"The following example expression returns the per-second average rate of HTTP requests over the last 5 minutes, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["rate(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"rate"})," acts on native histograms by calculating a new histogram where each component (sum and count of observations, buckets) is the rate of increase between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float and native histogram samples within the range, will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"rate"})," should only be used with counters (for both floats and histograms). It is best suited for alerting, and for graphing of slow-moving counters."]}),a.jsxs("p",{children:["Note that when combining ",a.jsx("code",{children:"rate()"})," with an aggregation operator (e.g. ",a.jsx("code",{children:"sum()"}),") or a function aggregating over time (any function ending in ",a.jsx("code",{children:"_over_time"}),"), always take a"," ",a.jsx("code",{children:"rate()"})," first, then aggregate. Otherwise ",a.jsx("code",{children:"rate()"})," cannot detect counter resets when your target restarts."]})]}),resets:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each input time series, ",a.jsx("code",{children:"resets(v range-vector)"})," returns the number of counter resets within the provided time range as an instant vector. Any decrease in the value between two consecutive float samples is interpreted as a counter reset. A reset in a native histogram is detected in a more complex way: Any decrease in any bucket, including the zero bucket, or in the count of observation constitutes a counter reset, but also the disappearance of any previously populated bucket, a decrease of the zero-bucket width, or any schema change that is not a compatible decrease of resolution."]}),a.jsxs("p",{children:[a.jsx("code",{children:"resets"})," should only be used with counters (for both floats and histograms)."]}),a.jsxs("p",{children:["A float sample followed by a histogram sample, or vice versa, counts as a reset. A counter histogram sample followed by a gauge histogram sample, or vice versa, also counts as a reset (but note that ",a.jsx("code",{children:"resets"})," ","should not be used on gauges in the first place, see above)."]})]}),round:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"round(v instant-vector, to_nearest=1 scalar)"})," rounds the sample values of all elements in"," ",a.jsx("code",{children:"v"})," to the nearest integer. Ties are resolved by rounding up. The optional ",a.jsx("code",{children:"to_nearest"})," ","argument allows specifying the nearest multiple to which the sample values should be rounded. This multiple may also be a fraction. Histogram samples in the input vector are ignored silently."]})}),scalar:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["Given an input vector that contains only one element with a float sample,",a.jsx("code",{children:"scalar(v instant-vector)"})," returns the sample value of that float sample as a scalar. If the input vector does not have exactly one element with a float sample, ",a.jsx("code",{children:"scalar"})," will return ",a.jsx("code",{children:"NaN"}),". Histogram samples in the input vector are ignored silently."]})}),sgn:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"sgn(v instant-vector)"})," returns a vector with all float sample values converted to their sign, defined as this: 1 if v is positive, -1 if v is negative and 0 if v is equal to zero. Histogram samples in the input vector are ignored silently."]})}),sin:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),sinh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),sort:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"sort(v instant-vector)"})," returns vector elements sorted by their float sample values, in ascending order. Histogram samples in the input vector are ignored silently."]}),a.jsxs("p",{children:["Please note that ",a.jsx("code",{children:"sort"})," only affects the results of instant queries, as range query results always have a fixed output ordering."]})]}),sort_by_label:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"sort_by_label(v instant-vector, label string, ...)"})," returns vector elements sorted by the values of the given labels in ascending order. In case these label values are equal, elements are sorted by their full label sets.",a.jsx("code",{children:"sort_by_label"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["Please note that ",a.jsx("code",{children:"sort_by_label"})," only affects the results of instant queries, as range query results always have a fixed output ordering."]}),a.jsxs("p",{children:[a.jsx("code",{children:"sort_by_label"})," uses"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Natural_sort_order",children:"natural sort order"}),"."]})]}),sort_by_label_desc:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:["Same as ",a.jsx("code",{children:"sort_by_label"}),", but sorts in descending order."]})]}),sort_desc:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["Same as ",a.jsx("code",{children:"sort"}),", but sorts in descending order."]})}),sqrt:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"sqrt(v instant-vector)"})," calculates the square root of all float samples in",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently."]})}),stddev_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),stdvar_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),sum_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),tan:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),tanh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),time:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"time()"})," returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is to be evaluated."]})}),timestamp:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"timestamp(v instant-vector)"})," returns the timestamp of each of the samples of the given vector as the number of seconds since January 1, 1970 UTC. It acts on float and histogram samples in the same way."]})}),ts_of_first_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_last_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_max_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_min_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),vector:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"vector(s scalar)"})," converts the scalar ",a.jsx("code",{children:"s"})," to a float sample and returns it as a single-element instant vector with no labels."]})}),year:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"year(v=vector(time()) instant-vector)"})," returns the year for each of the given times in UTC. Histogram samples in the input vector are ignored silently."]})})},_2e="_funcDoc_mrib5_1",T2e={funcDoc:_2e},k2e=(t,e)=>a.jsxs(ir,{fz:"sm",my:"md",withPadding:!0,children:[t.length>0&&a.jsxs(ir.Item,{children:["The metric name is"," ",a.jsx("span",{className:"promql-code promql-metric-name",children:t}),"."]}),e.filter(n=>n.name!=="__name__").map(n=>{switch(n.type){case fo.equal:return a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","is exactly"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),"."]});case fo.notEqual:return a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","is not"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),"."]});case fo.matchRegexp:return a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","matches the regular expression"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),"."]});case fo.matchNotRegexp:return a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","does not match the regular expression"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(n.value),'"']}),"."]});default:throw new Error("invalid matcher type")}})]}),GB=({node:t})=>{const e=t.name.replace(/(_count|_sum|_bucket|_total)$/,""),{lookbackDelta:n}=li(),{data:r}=yi({path:"/metadata",params:{metric:t.name}}),{data:i}=yi({path:"/metadata",params:{metric:e}}),s=r.data[t.name]??i.data[e];return a.jsxs(Kr,{withBorder:!0,children:[a.jsxs(ut,{fz:"lg",fw:600,mb:"md",children:[t.type===vt.vectorSelector?"Instant":"Range"," vector selector"]}),a.jsx(ut,{fz:"sm",children:s===void 0||s.length<1?a.jsx(a.Fragment,{children:"No metric metadata found."}):a.jsxs(a.Fragment,{children:[a.jsx("strong",{children:"Metric help"}),": ",s[0].help,a.jsx("br",{}),a.jsx("strong",{children:"Metric type"}),": ",s[0].type]})}),a.jsx(Zv,{my:"md"}),a.jsxs(ut,{fz:"sm",children:[t.type===vt.vectorSelector?a.jsxs(a.Fragment,{children:["This node ",t.smoothed?"smooths the value":"selects the latest"," ",t.anchored||t.smoothed?"":"non-stale ",!t.smoothed&&a.jsxs(a.Fragment,{children:["sample value within the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:n})]}),t.smoothed&&a.jsxs(a.Fragment,{children:["using ",a.jsx("code",{children:"smoothed"})," mode (linear interpolation with nearest points within"," ",a.jsx("span",{className:"promql-code promql-duration",children:n})," ","before and after execution timestamp, ignoring staleness markers)"]})]}):a.jsxs(a.Fragment,{children:["This node selects"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.range)})," ","of data going backward from the evaluation timestamp",t.anchored&&a.jsxs(a.Fragment,{children:[" ","using ",a.jsx("code",{children:"anchored"})," mode (includes first sample before or at start boundary, and last sample of the range at end boundary, ignoring staleness markers)"]}),t.smoothed&&a.jsxs(a.Fragment,{children:[" ","using ",a.jsx("code",{children:"smoothed"})," mode (applies linear interpolation at the boundaries using nearest samples before and after boundaries, ignoring staleness markers)"]})]}),t.timestamp!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to an absolute evaluation timestamp of"," ",a.jsx("span",{className:"promql-number",children:(t.timestamp/1e3).toFixed(3)})]}):t.startOrEnd!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to the ",t.startOrEnd," of the query range"]}):a.jsx(a.Fragment,{}),t.offset===0?a.jsx(a.Fragment,{}):t.offset>0?a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","into the past,"]}):a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(-t.offset)})," ","into the future,"]})," ","for any series that match all of the following criteria:"]}),k2e(t.name,t.matchers),a.jsxs(ut,{fz:"sm",children:["If a series has no values in the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:t.type===vt.vectorSelector?n:Hn(t.range)}),t.offset>0&&a.jsxs(a.Fragment,{children:[" ","(relative to the time-shifted instant"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","in the past)"]}),", the series will not be returned."]})]})},Uh=t=>{switch(t){case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(t)}},Gg=t=>{switch(t){case 1/0:return"+Inf";case-1/0:return"-Inf";default:return t.toString()}},O2e=(t,e)=>{switch(t){case"sum":return"sums over the sample values of the input series";case"min":return"takes the minimum of the sample values of the input series";case"max":return"takes the maximum of the sample values of the input series";case"avg":return"calculates the average of the sample values of the input series";case"stddev":return"calculates the population standard deviation of the sample values of the input series";case"stdvar":return"calculates the population standard variation of the sample values of the input series";case"count":return"counts the number of input series";case"group":return"groups the input series by the supplied grouping labels, while setting the sample value to 1";case"count_values":if(e===null)throw new Error("encountered count_values() node without label parameter");if(e.type!=="stringLiteral")throw new Error("encountered count_values() node without string literal label parameter");return a.jsxs(a.Fragment,{children:["outputs one time series for each unique sample value in the input series (each counting the number of occurrences of that value and indicating the original value in the ",aa([e.val])," ","label)"]});case"bottomk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["returns the bottom"," ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," series by value"]}):a.jsxs(a.Fragment,{children:["returns the bottom"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series by value"]});case"topk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["returns the top ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," ","series by value"]}):a.jsxs(a.Fragment,{children:["returns the top"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series by value"]});case"quantile":if(e===null)throw new Error("encountered quantile() node without quantile parameter");return e.type==="numberLiteral"?`calculates the ${e.val}th quantile (${Uh(e.val)*100}th percentile) over the sample values of the input series`:"calculates a quantile over the sample values of the input series";case"limitk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["limits the output to"," ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," series"]}):a.jsxs(a.Fragment,{children:["limits the output to"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series"]});case"limit_ratio":return e===null||e.type!=="numberLiteral"?"limits the output to a ratio of the input series":a.jsxs(a.Fragment,{children:["limits the output to a ratio of"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," (",Uh(e.val)*100,"%) of the input series"]});default:throw new Error(`invalid aggregation type ${t}`)}},E2e=(t,e)=>e?a.jsxs(a.Fragment,{children:["aggregating away the [",aa(t),"] label dimensions"]}):t.length===1?a.jsxs(a.Fragment,{children:["grouped by their ",aa(t)," label dimension"]}):t.length>1?a.jsxs(a.Fragment,{children:["grouped by their [",aa(t),"] label dimensions"]}):"aggregating away any label dimensions",M2e=({node:t})=>a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Aggregation"}),a.jsxs(ut,{fz:"sm",children:["This node ",O2e(t.op,t.param),","," ",E2e(t.grouping,t.without),"."]})]}),dW="filtered";var Pg=(t=>(t.multipleMatchesForOneToOneMatching="multipleMatchesForOneToOneMatching",t.multipleMatchesOnBothSides="multipleMatchesOnBothSides",t.multipleMatchesOnOneSide="multipleMatchesOnOneSide",t))(Pg||{});const XB=16777619,D2e=2166136261,R2e=55296,KB=t=>{let e=D2e;for(let n=0;n<t.length;n++){if(t[n]!==void 0)for(let r=0;r<t[n].length;r++)e^=t[n].charCodeAt(r),e*=XB;n<t.length-1&&(e^=R2e,e*=XB)}return e.toString()},N2e=(t,e)=>(e.sort(),t?n=>KB(e.map(r=>n[r])):n=>KB(Object.keys(n).filter(r=>!e.includes(r)&&r!=="__name__").map(r=>n[r]))),ZB=(t,e,n)=>{const r={};for(const i in t)n.includes(i)===e&&(e||i!=="__name__")&&(r[i]=t[i]);return r},P2e=(t,e,n)=>{const{value:r,keep:i}=HA(t,e,n);return Q6(t)?Number(i):r},HA=(t,e,n)=>{switch(t){case Xt.add:return{value:e+n,keep:!0};case Xt.sub:return{value:e-n,keep:!0};case Xt.mul:return{value:e*n,keep:!0};case Xt.div:return{value:e/n,keep:!0};case Xt.pow:return{value:Math.pow(e,n),keep:!0};case Xt.mod:return{value:e%n,keep:!0};case Xt.eql:return{value:e,keep:e===n};case Xt.neq:return{value:e,keep:e!==n};case Xt.gtr:return{value:e,keep:e>n};case Xt.lss:return{value:e,keep:e<n};case Xt.gte:return{value:e,keep:e>=n};case Xt.lte:return{value:e,keep:e<=n};case Xt.atan2:return{value:Math.atan2(e,n),keep:!0};default:throw new Error("invalid binop")}},I2e=t=>[Xt.add,Xt.sub,Xt.mul,Xt.div,Xt.pow,Xt.mod,Xt.atan2].includes(t),B2e=(t,e,n,r)=>{const i={};for(const s in t)i[s]=t[s];if(I2e(n)&&delete i.__name__,r.card===Cr.oneToOne)if(r.on)for(const s in i)r.labels.includes(s)||delete i[s];else for(const s of r.labels)delete i[s];return r.include.forEach(s=>{s in e?i[s]=e[s]:delete i[s]}),i},L2e=(t,e,n,r,i,s)=>{[r,i]=e.card===Cr.oneToMany?[i,r]:[r,i];const o={},l=N2e(e.on,e.labels),u=new Set;return i.forEach(h=>{const f=l(h.metric);if(!(f in o)){if(s!=null&&s.maxGroups&&Object.keys(o).length>=s.maxGroups){u.add(f);return}o[f]={groupLabels:ZB(h.metric,e.on,e.labels),lhs:[],lhsCount:0,rhs:[],rhsCount:0,result:[],error:null}}(!(s!=null&&s.maxSeriesPerGroup)||o[f].rhsCount<s.maxSeriesPerGroup)&&o[f].rhs.push(h),o[f].rhsCount++}),r.forEach(h=>{const f=l(h.metric);if(!(f in o)){if(s!=null&&s.maxGroups&&Object.keys(o).length>=s.maxGroups){u.add(f);return}o[f]={groupLabels:ZB(h.metric,e.on,e.labels),lhs:[],lhsCount:0,rhs:[],rhsCount:0,result:[],error:null}}(!(s!=null&&s.maxSeriesPerGroup)||o[f].lhsCount<s.maxSeriesPerGroup)&&o[f].lhs.push(h),o[f].lhsCount++}),Object.values(o).forEach(h=>{h.lhs.length===0&&e.fillValues.lhs!==null&&(h.lhs.push({metric:h.groupLabels,value:[0,Gg(e.fillValues.lhs)],filled:!0}),h.lhsCount=1),h.rhs.length===0&&e.fillValues.rhs!==null&&(h.rhs.push({metric:h.groupLabels,value:[0,Gg(e.fillValues.rhs)],filled:!0}),h.rhsCount=1)}),Object.values(o).forEach(h=>{switch(e.card){case Cr.oneToOne:h.lhs.length>1&&h.rhs.length>1?h.error={type:"multipleMatchesOnBothSides"}:(h.lhs.length>1||h.rhs.length>1)&&(h.error={type:"multipleMatchesForOneToOneMatching",dupeSide:h.lhs.length>1?"left":"right"});break;case Cr.oneToMany:case Cr.manyToOne:h.rhs.length>1&&(h.error={type:"multipleMatchesOnOneSide"});break;case Cr.manyToMany:if(!fk(t))throw new Error("unexpected many-to-many matching for non-set operator");break;default:throw new Error("unknown vector matching cardinality")}h.error||(fk(t)?(h.lhs.forEach((f,p)=>{(t===Xt.and&&h.rhs.length>0||t===Xt.unless&&h.rhs.length===0||t===Xt.or)&&h.result.push({sample:{metric:f.metric,value:f.value},manySideIdx:p})}),t===Xt.or&&h.rhs.forEach((f,p)=>{h.lhs.length===0&&h.result.push({sample:{metric:f.metric,value:f.value},manySideIdx:p})})):h.rhs.forEach(f=>{h.lhs.forEach((p,m)=>{if(!p.value||!f.value)throw new Error("native histogram support not implemented yet");const[v,b]=e.card!==Cr.oneToMany?[p.value[1],f.value[1]]:[f.value[1],p.value[1]];let{value:x,keep:w}=HA(t,Uh(v),Uh(b));const A=B2e(p.metric,f.metric,t,e);n&&(x=w?1:0,delete A.__name__),h.result.push({sample:{metric:A,value:[p.value[0],w||n?Gg(x):dW]},manySideIdx:m})})}))}),e.card===Cr.oneToMany&&Object.keys(o).forEach(h=>{[o[h].lhs,o[h].rhs]=[o[h].rhs,o[h].lhs],[o[h].lhsCount,o[h].rhsCount]=[o[h].rhsCount,o[h].lhsCount]}),{groups:o,numGroups:Object.keys(o).length+u.size}},JB=({node:t,scalar:e,vector:n,scalarLeft:r})=>n.length===0?a.jsx(Lt,{children:"One side of the binary operation produces 0 results, no matching information shown."}):a.jsxs(re,{withTableBorder:!0,withRowBorders:!0,withColumnBorders:!0,fz:"xs",children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[!r&&a.jsx(re.Th,{children:"Left labels"}),a.jsx(re.Th,{children:"Left value"}),a.jsx(re.Th,{children:"Operator"}),r&&a.jsx(re.Th,{children:"Right labels"}),a.jsx(re.Th,{children:"Right value"}),a.jsx(re.Th,{}),a.jsx(re.Th,{children:"Result"})]})}),a.jsx(re.Tbody,{children:n.map((i,s)=>{if(!i.value)throw new Error("Native histograms are not supported yet");const o=Uh(i.value[1]),l=Uh(e[1]);let{value:u,keep:h}=r?HA(t.op,l,o):HA(t.op,o,l);Q6(t.op)&&r&&(u=o),t.bool&&(u=Number(h),h=!0);const f=a.jsx(re.Td,{ta:"right",children:e[1]}),p=a.jsxs(a.Fragment,{children:[a.jsx(re.Td,{children:a.jsx(Jp,{labels:i.metric,format:!0})}),a.jsx(re.Td,{ta:"right",children:i.value[1]})]});return a.jsxs(re.Tr,{children:[r?f:p,a.jsxs(re.Td,{ta:"center",children:[t.op,t.bool&&" bool"]}),r?p:f,a.jsx(re.Td,{ta:"center",children:"="}),a.jsx(re.Td,{ta:"right",children:h?Gg(u):a.jsx(ut,{c:"dimmed",children:"dropped"})})]},s)})})]}),Nv=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2","#c7c7c7","#dbdb8d","#9edae5","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2","#c7c7c7","#dbdb8d","#9edae5","#17becf","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2"],e9=Nv.length/2+3,r3=(t,e)=>`${Nv[(t+(e||0))%Nv.length]}80`,i3=t=>a.jsx(ve,{display:"inline-block",w:12,h:12,bg:t,style:{borderRadius:2,flexShrink:0}}),F2e=(t,e,n)=>{const r={};for(const i in t)n.includes(i)===e&&(e||i!=="__name__")||(r[i]=t[i]);return r},H2e=t=>{const e=t.matching,[n,r]=e.card===Cr.oneToMany?["left","right"]:["right","left"];return a.jsxs(a.Fragment,{children:[a.jsx(ut,{size:"sm",children:Q6(t.op)?a.jsxs(a.Fragment,{children:['This node filters the series from the left-hand side based on the result of a "',a.jsx("span",{className:"promql-code promql-operator",children:t.op}),'" comparison with matching series from the right-hand side.']}):a.jsxs(a.Fragment,{children:['This node calculates the result of applying the "',a.jsx("span",{className:"promql-code promql-operator",children:t.op}),'" operator between the sample values of matching series from two sets of time series.']})}),a.jsxs(ir,{my:"md",fz:"sm",withPadding:!0,children:[(e.labels.length>0||e.on)&&(e.on?a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"on"}),"(",aa(e.labels),"):"," ",e.labels.length>0?a.jsxs(a.Fragment,{children:["series on both sides are matched on the labels"," ",aa(e.labels)]}):a.jsx(a.Fragment,{children:"all series from one side are matched to all series on the other side."})]}):a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"ignoring"}),"(",aa(e.labels),"): series on both sides are matched on all of their labels, except"," ",aa(e.labels),"."]})),e.card===Cr.oneToOne?a.jsx(ir.Item,{children:"One-to-one match. Each series from the left-hand side is allowed to match with at most one series on the right-hand side, and vice versa."}):a.jsxs(ir.Item,{children:[a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",r]}),"(",aa(e.include),") : ",e.card," match. Each series from the ",n,"-hand side is allowed to match with multiple series from the ",r,"-hand side.",e.include.length!==0&&a.jsxs(a.Fragment,{children:[" ","Any ",aa(e.include)," labels found on the"," ",n,"-hand side are propagated into the result, in addition to the match group's labels."]})]}),(e.fillValues.lhs!==null||e.fillValues.rhs!==null)&&(e.fillValues.lhs===e.fillValues.rhs?a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),") : For series on either side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),"."]}):a.jsxs(a.Fragment,{children:[e.fillValues.lhs!==null&&a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill_left"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),") : For series on the left-hand side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),"."]}),e.fillValues.rhs!==null&&a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill_right"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.rhs}),") : For series on the right-hand side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.rhs}),"."]})]})),t.bool&&a.jsxs(ir.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"bool"}),": Instead of filtering series based on the outcome of the comparison for matched series, keep all series, but return the comparison outcome as a boolean ",a.jsx("span",{className:"promql-code promql-number",children:"0"})," or"," ",a.jsx("span",{className:"promql-code promql-number",children:"1"})," sample value."]})]})]})},z2e=(t,e,n)=>{const r=a.jsxs(a.Fragment,{children:[a.jsx(ut,{size:"sm",children:a.jsx("strong",{children:"Possible fixes:"})}),a.jsxs(ir,{withPadding:!0,my:"md",fz:"sm",children:[n.type===Pg.multipleMatchesForOneToOneMatching&&a.jsxs(ir.Item,{children:[a.jsxs(ut,{size:"sm",children:[a.jsxs("strong",{children:["Allow ",n.dupeSide==="left"?"many-to-one":"one-to-many"," ","matching"]}),": If you want to allow"," ",n.dupeSide==="left"?"many-to-one":"one-to-many"," ","matching, you need to explicitly request it by adding a"," ",a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",n.dupeSide,"()"]})," ","modifier to the operator:"]}),a.jsx(ut,{size:"sm",ta:"center",my:"md",children:Io({...t,matching:{...t.matching?t.matching:{labels:[],on:!1,include:[],fillValues:{lhs:null,rhs:null}},card:n.dupeSide==="left"?Cr.manyToOne:Cr.oneToMany}},!0,1)})]}),a.jsxs(ir.Item,{children:[a.jsx("strong",{children:"Update your matching parameters:"})," Consider including more differentiating labels in your matching modifiers (via"," ",a.jsx("span",{className:"promql-code promql-keyword",children:"on()"})," /"," ",a.jsx("span",{className:"promql-code promql-keyword",children:"ignoring()"}),") to split multiple series into distinct match groups."]}),a.jsxs(ir.Item,{children:[a.jsx("strong",{children:"Aggregate the input:"})," Consider aggregating away the extra labels that create multiple series per group before applying the binary operation."]})]})]});switch(n.type){case Pg.multipleMatchesForOneToOneMatching:return a.jsxs(a.Fragment,{children:[a.jsxs(ut,{size:"sm",children:["Binary operators only allow ",a.jsx("strong",{children:"one-to-one"})," matching by default, but we found"," ",a.jsxs("strong",{children:["multiple series on the ",n.dupeSide," side"]})," for this match group."]}),r]});case Pg.multipleMatchesOnBothSides:return a.jsxs(a.Fragment,{children:[a.jsxs(ut,{size:"sm",children:["We found ",a.jsx("strong",{children:"multiple series on both sides"})," for this match group. Since ",a.jsx("strong",{children:"many-to-many matching"})," is not supported, you need to ensure that at least one of the sides only yields a single series."]}),r]});case Pg.multipleMatchesOnOneSide:{const[i,s]=t.matching.card===Cr.oneToMany?["left","right"]:["right","left"];return a.jsxs(a.Fragment,{children:[a.jsxs(ut,{size:"sm",children:["You requested"," ",a.jsxs("strong",{children:[i==="right"?"many-to-one":"one-to-many"," matching"]})," ","via"," ",a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",s,"()"]}),", but we also found"," ",a.jsxs("strong",{children:["multiple series on the ",i," side"]})," of the match group. Make sure that the ",i," side only contains a single series."]}),r]})}default:throw new Error("unknown match error")}},q2e=({node:t,lhs:e,rhs:n})=>{const[r,i]=Uv({key:"queryPage.explain.binaryOperators.showSampleValues",defaultValue:!1}),[s,o]=M.useState(100),[l,u]=M.useState(100),{matching:h}=t;if(h===null)throw new Error("missing matching parameters in vector-to-vector binop");const{groups:f,numGroups:p}=L2e(t.op,h,t.bool,e,n,{maxGroups:s,maxSeriesPerGroup:l}),m=Object.values(f).filter(v=>v.error).length;return a.jsxs(a.Fragment,{children:[a.jsx(ut,{size:"sm",children:H2e(t)}),a.jsx(ht,{my:"lg",justify:"flex-end",gap:"xl",children:a.jsx(Iw,{label:"Show sample values",checked:r,onChange:v=>i(v.currentTarget.checked)})}),p>Object.keys(f).length&&a.jsxs(Lt,{color:"yellow",mb:"md",icon:a.jsx(Qi,{}),children:["Too many match groups to display, only showing"," ",Object.keys(f).length," out of ",p," groups.",a.jsx("br",{}),a.jsx("br",{}),a.jsx(zr,{fz:"sm",onClick:()=>o(void 0),children:"Show all groups"})]}),m>0&&a.jsxs(Lt,{color:"yellow",mb:"md",icon:a.jsx(Qi,{}),children:["Found matching issues in ",m," match group",m>1?"s":"",". See below for per-group error details."]}),a.jsx(re,{fz:"xs",withRowBorders:!1,children:a.jsx(re.Tbody,{children:Object.values(f).map((v,b)=>{const{groupLabels:x,lhs:w,lhsCount:A,rhs:j,rhsCount:C,result:_,error:S}=v,O=L=>a.jsx(re.Tr,{ta:"center",children:a.jsx(re.Td,{colSpan:2,style:{backgroundColor:`${L}25`},children:a.jsx(Jp,{labels:x,format:!0})})}),E=(L,Q,z,H)=>a.jsx(ve,{style:{borderRadius:3,border:"2px solid",borderColor:Q===0?"light-dark(var(--mantine-color-gray-4), var(--mantine-color-gray-7))":z},children:a.jsx(re,{fz:"xs",withRowBorders:!1,verticalSpacing:5,children:a.jsxs(re.Tbody,{children:[Q===0?a.jsx(re.Tr,{children:a.jsx(re.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"no matching series"})}):a.jsxs(a.Fragment,{children:[O(z),L.map((P,F)=>{if(P.value===void 0)throw new Error("Native histograms are not supported yet");return a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsxs(ht,{wrap:"nowrap",gap:7,align:"center",children:[i3(r3(F,H)),a.jsx(Jp,{labels:F2e(P.metric,h.on,h.labels),format:!0}),P.filled&&a.jsx(ut,{size:"sm",c:"dimmed",children:"no match, filling in default value"})]})}),r&&a.jsx(re.Td,{ta:"right",children:P.value[1]})]},F)})]}),Q>L.length&&a.jsx(re.Tr,{children:a.jsxs(re.Td,{ta:"center",py:"md",fw:"bold",c:"gray.6",children:[Q-L.length," more series omitted   –  ",a.jsx(zr,{size:"xs",onClick:()=>u(void 0),children:"Show all series"})]})})]})})}),D=Nv[b%Nv.length],N=E(w,A,D),I=E(j,C,D,e9),R=a.jsx(ve,{style:{borderRadius:3,border:"2px solid",borderColor:_.length===0||S!==null?"light-dark(var(--mantine-color-gray-4), var(--mantine-color-gray-7))":D},children:a.jsx(re,{fz:"xs",withRowBorders:!1,verticalSpacing:5,children:a.jsx(re.Tbody,{children:S!==null?a.jsx(re.Tr,{children:a.jsx(re.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"error, result omitted"})}):_.length===0?a.jsx(re.Tr,{children:a.jsx(re.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"dropped"})}):S!==null?a.jsx(re.Tr,{children:a.jsx(re.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"error, result omitted"})}):a.jsx(a.Fragment,{children:_.map(({sample:L,manySideIdx:Q},z)=>{if(L.value===void 0)throw new Error("Native histograms are not supported yet");const H=L.value[1]===dW,[P,F]=h.card===Cr.oneToMany?[0,Q]:[Q,0];return a.jsxs(re.Tr,{children:[a.jsx(re.Td,{style:{opacity:H?.5:1},title:H?"Series has been filtered by comparison operator":void 0,children:a.jsxs(ht,{wrap:"nowrap",gap:"xs",align:"flex-start",children:[a.jsxs(ht,{wrap:"nowrap",gap:0,children:[i3(r3(P)),a.jsx("span",{style:{color:"#aaa"},children:"–"}),i3(r3(F,e9))]}),a.jsx(Jp,{labels:L.metric,format:!0})]})}),r&&a.jsx(re.Td,{ta:"right",children:H?a.jsx("span",{style:{color:"grey"},children:"filtered"}):a.jsx("span",{children:L.value[1]})})]},z)})})})})});return a.jsxs(Cn.Fragment,{children:[b!==0&&a.jsx("tr",{style:{height:30}}),a.jsx(re.Tr,{children:a.jsx(re.Td,{colSpan:5,children:S&&a.jsx(Lt,{color:"red",mb:"md",title:"Error in match group below",icon:a.jsx(Qi,{}),children:z2e(t,v,S)})})}),a.jsxs(re.Tr,{children:[a.jsx(re.Td,{valign:"middle",p:0,children:N}),a.jsxs(re.Td,{ta:"center",fw:fk(t.op)?"bold":void 0,children:[t.op,t.bool&&" bool"]}),a.jsx(re.Td,{valign:"middle",p:0,children:I}),a.jsx(re.Td,{ta:"center",children:"="}),a.jsx(re.Td,{valign:"middle",p:0,children:R})]})]},b)})})})]})},$2e=({node:t,lhs:e,rhs:n})=>{const[r,i]=[Uh(e[1]),Uh(n[1])];return a.jsxs(re,{withColumnBorders:!0,withTableBorder:!0,children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{children:"Left value"}),a.jsx(re.Th,{children:"Operator"}),a.jsx(re.Th,{children:"Right value"}),a.jsx(re.Th,{}),a.jsx(re.Th,{children:"Result"})]})}),a.jsx(re.Tbody,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Td,{className:"number-cell",children:e[1]}),a.jsxs(re.Td,{className:"op-cell",children:[t.op,t.bool&&" bool"]}),a.jsx(re.Td,{className:"number-cell",children:n[1]}),a.jsx(re.Td,{className:"op-cell",children:"="}),a.jsx(re.Td,{className:"number-cell",children:Gg(P2e(t.op,r,i))})]})})]})},Q2e=({node:t})=>{const{data:e}=yi({path:"/query",params:{query:is(t.lhs)}}),{data:n}=yi({path:"/query",params:{query:is(t.rhs)}});if(e.data.resultType!==Np(t.lhs)||n.data.resultType!==Np(t.rhs))return null;if(e.data.resultType==="scalar"&&n.data.resultType==="scalar")return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Scalar-to-scalar binary operation"}),a.jsx($2e,{node:t,lhs:e.data.result,rhs:n.data.result})]});if(e.data.resultType==="scalar"&&n.data.resultType==="vector")return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Scalar-to-vector binary operation"}),a.jsx(JB,{node:t,vector:n.data.result,scalar:e.data.result,scalarLeft:!0})]});if(e.data.resultType==="vector"&&n.data.resultType==="scalar")return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Vector-to-scalar binary operation"}),a.jsx(JB,{node:t,scalar:n.data.result,vector:e.data.result,scalarLeft:!1})]});if(e.data.resultType==="vector"&&n.data.resultType==="vector")return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Vector-to-vector binary operation"}),a.jsx(q2e,{node:t,lhs:e.data.result,rhs:n.data.result})]});throw new Error("invalid binary operator argument types")},U2e=({node:t,treeShown:e,showTree:n})=>{if(t===null)return a.jsxs(Lt,{title:"How to use the Explain view",icon:a.jsx(Kn,{}),children:["This tab can help you understand the behavior of individual components of a query.",a.jsx("br",{}),a.jsx("br",{}),"To use the Explain view,"," ",!e&&a.jsxs(a.Fragment,{children:[a.jsx(zr,{fz:"unset",onClick:n,children:"enable the query tree view"})," ","(also available via the expression input menu) and then"]})," ","select a node in the tree above."]});switch(t.type){case vt.aggregation:return a.jsx(M2e,{node:t});case vt.binaryExpr:return a.jsx(Q2e,{node:t});case vt.call:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Function call"}),a.jsxs(ut,{fz:"sm",children:["This node calls the"," ",a.jsx(zr,{fz:"inherit",href:`https://prometheus.io/docs/prometheus/latest/querying/functions/#${t.func.name}`,target:"_blank",children:a.jsxs("span",{className:"promql-code promql-keyword",children:[t.func.name,"()"]})})," ","function",t.args.length>0?" on the provided inputs":"","."]}),a.jsx(Zv,{my:"md"}),a.jsx(ut,{fz:"sm",className:T2e.funcDoc,children:C2e[t.func.name]})]});case vt.matrixSelector:return a.jsx(GB,{node:t});case vt.subquery:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Subquery"}),a.jsxs(ut,{fz:"sm",children:["This node evaluates the passed expression as a subquery over the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.range)})," ","at a query resolution"," ",t.step>0?a.jsxs(a.Fragment,{children:["of"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.step)})]}):"equal to the default rule evaluation interval",t.timestamp!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to an absolute evaluation timestamp of"," ",a.jsx("span",{className:"promql-number",children:(t.timestamp/1e3).toFixed(3)})]}):t.startOrEnd!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to the ",t.startOrEnd," of the query range"]}):a.jsx(a.Fragment,{}),t.offset===0?a.jsx(a.Fragment,{}):t.offset>0?a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","into the past"]}):a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(-t.offset)})," ","into the future"]}),"."]})]});case vt.numberLiteral:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Number literal"}),a.jsxs(ut,{fz:"sm",children:["A scalar number literal with the value"," ",a.jsx("span",{className:"promql-code promql-number",children:t.val}),"."]})]});case vt.parenExpr:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Parentheses"}),a.jsx(ut,{fz:"sm",children:"Parentheses that contain a sub-expression to be evaluated."})]});case vt.stringLiteral:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"String literal"}),a.jsxs(ut,{fz:"sm",children:["A string literal with the value"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',ss(t.val),'"']}),"."]})]});case vt.unaryExpr:return a.jsxs(Kr,{withBorder:!0,children:[a.jsx(ut,{fz:"lg",fw:600,mb:"md",children:"Unary expression"}),a.jsxs(ut,{fz:"sm",children:["A unary expression that"," ",t.op==="+"?"does not affect the expression it is applied to":"changes the sign of the expression it is applied to","."]})]});case vt.vectorSelector:return a.jsx(GB,{node:t});default:throw new Error("invalid node type")}},yg={width:"0.9rem",height:"0.9rem"},W2e=({idx:t,metricNames:e})=>{const[n,r]=M.useState(0),i=rc(f=>f.queryPage.panels[t]),s=cu(),[o,l]=M.useState(null),u=M.useMemo(()=>o!==null?is(o.node):i.expr,[o,i.expr]),h=M.useCallback((f,p)=>s(Ju({idx:t,visualizer:{...i.visualizer,range:(p-f)*1e3,endTime:p*1e3}})),[s,t,i.visualizer]);return a.jsxs(En,{gap:"lg",children:[a.jsx(yxe,{initialExpr:i.expr,metricNames:e,executeQuery:f=>{r(p=>p+1),s(Ule({idx:t,expr:f})),!e.includes(f)&&f.trim()!==""&&s(UH(f))},treeShown:i.showTree,setShowTree:f=>{s(TC({idx:t,showTree:f})),f||l(null)},duplicatePanel:f=>{s(Qle({idx:t,expr:f}))},removePanel:()=>{s($le(t))}}),i.expr.trim()!==""&&i.showTree&&a.jsx(wf,{title:"Error showing tree view",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(20),(f,p)=>a.jsx(go,{height:30,mb:15,width:"100%"},p))}),children:a.jsx(j2e,{panelIdx:t,selectedNode:o,setSelectedNode:l,closeTreeView:()=>{s(TC({idx:t,showTree:!1})),l(null)}})})},n),a.jsxs(Ma,{value:i.visualizer.activeTab,onChange:f=>s(Ju({idx:t,visualizer:{...i.visualizer,activeTab:f}})),keepMounted:!1,children:[a.jsxs(Ma.List,{children:[a.jsx(Ma.Tab,{value:"table",leftSection:a.jsx(IF,{style:yg}),children:"Table"}),a.jsx(Ma.Tab,{value:"graph",leftSection:a.jsx(Ure,{style:yg}),children:"Graph"}),a.jsx(Ma.Tab,{value:"explain",leftSection:a.jsx(Kn,{style:yg}),children:"Explain"})]}),a.jsx(Ma.Panel,{pt:"sm",value:"table",children:a.jsx(v2e,{expr:u,panelIdx:t,retriggerIdx:n})}),a.jsxs(Ma.Panel,{pt:"sm",value:"graph",children:[a.jsxs(ht,{mt:"xs",justify:"space-between",children:[a.jsxs(ht,{children:[a.jsx(cue,{range:i.visualizer.range,onChangeRange:f=>s(Ju({idx:t,visualizer:{...i.visualizer,range:f}}))}),a.jsx(yz,{time:i.visualizer.endTime,range:i.visualizer.range,description:"End time",onChangeTime:f=>s(Ju({idx:t,visualizer:{...i.visualizer,endTime:f}}))}),a.jsx(Rwe,{resolution:i.visualizer.resolution,range:i.visualizer.range,onChangeResolution:f=>{s(Ju({idx:t,visualizer:{...i.visualizer,resolution:f}}))}})]}),a.jsxs(ht,{gap:"lg",children:[a.jsx(rb,{onChange:f=>s(Ju({idx:t,visualizer:{...i.visualizer,displayMode:f}})),value:i.visualizer.displayMode,data:[{value:Cm.Lines,label:a.jsxs(ev,{children:[a.jsx(vre,{style:yg}),a.jsx(ve,{ml:10,children:"Unstacked"})]})},{value:Cm.Stacked,label:a.jsxs(ev,{children:[a.jsx(qie,{style:yg}),a.jsx(ve,{ml:10,children:"Stacked"})]})}]}),a.jsxs(Zn,{position:"bottom",withArrow:!0,shadow:"md",children:[a.jsx(Zn.Target,{children:a.jsx(Nr,{variant:"light",color:"gray",size:32,title:"Graph settings",children:a.jsx(ere,{style:iu,stroke:1.5})})}),a.jsx(Zn.Dropdown,{p:"lg",children:a.jsx(na,{size:"xs",checked:i.visualizer.yAxisMin!==null,label:"Start Y axis at 0",onChange:f=>s(Ju({idx:t,visualizer:{...i.visualizer,yAxisMin:f.currentTarget.checked?0:null}}))})})]})]})]}),a.jsx(bF,{h:"lg"}),a.jsx(Dwe,{expr:u,node:(o==null?void 0:o.node)??null,endTime:i.visualizer.endTime,range:i.visualizer.range,resolution:i.visualizer.resolution,showExemplars:i.visualizer.showExemplars,displayMode:i.visualizer.displayMode,yAxisMin:i.visualizer.yAxisMin,retriggerIdx:n,onSelectRange:h})]}),a.jsx(Ma.Panel,{pt:"sm",value:"explain",children:a.jsx(wf,{title:"Error showing explain view",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(20),(f,p)=>a.jsx(go,{height:30,mb:15,width:"100%"},p))}),children:a.jsx(U2e,{node:(o==null?void 0:o.node)??null,treeShown:i.showTree,showTree:()=>{s(TC({idx:t,showTree:!0}))}})})},o==null?void 0:o.id)})]})]})};function fW(){const t=rc(u=>u.queryPage.panels),e=cu(),[n,r]=M.useState(0);M.useEffect(()=>{const u=()=>{const h=Fle(window.location.search);h.length>0&&e(m5(h))};return u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)}},[e]),M.useEffect(()=>()=>{e(m5([Xw()]))},[e]);const{data:i,error:s}=zh({path:"/label/__name__/values"}),{data:o,error:l}=zh({path:"/query",params:{query:"time()"}});return M.useEffect(()=>{if(!o)return;if(o.data.resultType!=="scalar")throw new Error("Unexpected result type from time query");const u=new Date().getTime()/1e3,h=o.data.result[0];r(Math.abs(u-h))},[o]),a.jsxs(ve,{mt:"xs",children:[s&&a.jsxs(Lt,{mb:"sm",icon:a.jsx(Qi,{}),color:"red",title:"Error fetching metrics list",children:["Unable to fetch list of metric names: ",s.message]}),l&&a.jsx(Lt,{mb:"sm",icon:a.jsx(Qi,{}),color:"red",title:"Error fetching server time",children:l.message}),n>30&&a.jsxs(Lt,{mb:"sm",title:"Server time is out of sync",color:"red",icon:a.jsx(nre,{}),onClose:()=>r(0),children:["Detected a time difference of"," ",a.jsx("strong",{children:Hp(n*1e3)})," between your browser and the server. You may see unexpected time-shifted query results due to the time drift."]}),a.jsx(En,{gap:"xl",children:t.map((u,h)=>a.jsx(W2e,{idx:h,metricNames:(i==null?void 0:i.data)||[]},u.id))}),a.jsx(_s,{variant:"light",mt:"xl",leftSection:a.jsx(RF,{style:Mg}),onClick:()=>e(qle()),children:"Add query"})]})}const V2e="_statsBadge_w76va_1",Y2e="_labelBadge_w76va_9",G2e="_healthOk_w76va_35",X2e="_healthErr_w76va_43",K2e="_healthWarn_w76va_51",Z2e="_healthInfo_w76va_62",J2e="_healthUnknown_w76va_70",fn={statsBadge:V2e,labelBadge:Y2e,healthOk:G2e,healthErr:X2e,healthWarn:K2e,healthInfo:Z2e,healthUnknown:J2e},eSe="_panelHealthOk_p1xoy_1",tSe="_panelHealthErr_p1xoy_6",nSe="_panelHealthWarn_p1xoy_11",rSe="_panelHealthUnknown_p1xoy_16",jh={panelHealthOk:eSe,panelHealthErr:tSe,panelHealthWarn:nSe,panelHealthUnknown:rSe},iSe="_codebox_b9wnp_1",sSe="_queryButton_b9wnp_8",t9={codebox:iSe,queryButton:sSe},Hm=({labels:t,wrapper:e=ht,style:n})=>a.jsx(e,{gap:"xs",children:Object.entries(t).map(([r,i])=>a.jsxs("span",{className:fn.labelBadge,style:n,children:[$h(r),'="',Eh(i),'"']},r))}),aSe=new nQ,pW=({rule:t})=>{const e=KA(),{pathPrefix:n}=li();return a.jsxs(a.Fragment,{children:[a.jsxs(Kr,{p:"xs",className:t9.codebox,fz:"sm",shadow:"none",children:[a.jsx(P6,{basicSetup:!1,value:t.query,editable:!1,extensions:[GQ,XQ,A2(e==="light"?KQ:ZQ),aSe.asExtension(),it.lineWrapping]}),a.jsx(Xr,{label:"Query rule expression",withArrow:!0,position:"top",children:a.jsx(Nr,{pos:"absolute",top:7,right:7,variant:"light",onClick:()=>{window.open(`${n}/query?g0.expr=${encodeURIComponent(t.query)}&g0.tab=1`,"_blank")},className:t9.queryButton,children:a.jsx(Zh,{style:iu})})})]}),t.type==="alerting"&&a.jsxs(ht,{mt:"lg",gap:"xs",children:[t.duration&&a.jsxs(Hr,{variant:"light",styles:{label:{textTransform:"none"}},leftSection:a.jsx(Ore,{style:Go}),children:["for: ",Hn(t.duration*1e3)]}),t.keepFiringFor&&a.jsxs(Hr,{variant:"light",styles:{label:{textTransform:"none"}},leftSection:a.jsx(Mre,{style:Go}),children:["keep_firing_for: ",Hn(t.keepFiringFor*1e3)]})]}),t.labels&&Object.keys(t.labels).length>0&&a.jsx(ve,{mt:"lg",children:a.jsx(Hm,{labels:t.labels})}),t.type==="alerting"&&Object.keys(t.annotations).length>0&&a.jsx(re,{mt:"lg",fz:"sm",children:a.jsx(re.Tbody,{children:Object.entries(t.annotations).map(([r,i])=>a.jsxs(re.Tr,{children:[a.jsx(re.Th,{c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-4))",children:r}),a.jsx(re.Td,{children:i})]},r))})})]})};function n9({value:t,onRemove:e,...n}){return a.jsx(Wc,{fw:600,style:{textTransform:"uppercase",fontWeight:600},onRemove:e,...n,withRemoveButton:!!e,children:t})}const z2=({options:t,optionClass:e,optionCount:n,placeholder:r,values:i,onChange:s})=>{const o=pw({onDropdownClose:()=>o.resetSelectedOption(),onDropdownOpen:()=>o.updateSelectedOptionIndex("active")}),l=f=>s(i.includes(f)?i.filter(p=>p!==f):[...i,f]),u=f=>s(i.filter(p=>p!==f)),h=i.map(f=>a.jsx(n9,{value:n?`${f} (${n(f)})`:f,className:e(f),onRemove:()=>u(f)},f));return a.jsxs(ln,{store:o,onOptionSubmit:l,withinPortal:!1,children:[a.jsx(ln.DropdownTarget,{children:a.jsx(Bg,{pointer:!0,onClick:()=>o.toggleDropdown(),miw:200,leftSection:a.jsx(EF,{style:Nf}),rightSection:i.length>0?a.jsx(mO,{onClear:()=>s([])}):a.jsx(fw,{}),children:a.jsxs(Wc.Group,{children:[h.length>0?h:a.jsx(Bg.Field,{placeholder:r,mt:1}),a.jsx(ln.EventsTarget,{children:a.jsx(Bg.Field,{type:"hidden",onBlur:()=>o.closeDropdown(),onKeyDown:f=>{f.key==="Backspace"&&(f.preventDefault(),u(i[i.length-1]))}})})]})})}),a.jsx(ln.Dropdown,{children:a.jsx(ln.Options,{children:t.map(f=>a.jsx(ln.Option,{value:f,active:i.includes(f),children:a.jsxs(ht,{gap:"sm",children:[i.includes(f)?a.jsx(mw,{size:12,color:"gray"}):null,a.jsx(n9,{value:n?`${f} (${n(f)})`:f,className:e(f)})]})},f))})})]})};function Yl(t,e,n=!0){return{...t,default:e,decode:(...i)=>{const s=t.decode(...i);return s===void 0||n&&s===null?e:s}}}function mW(t,e){if(t==null)return t;if(t.length===0&&(!e||e&&t!==""))return null;const n=t instanceof Array?t[0]:t;return n==null?n:!e&&n===""?null:n}function oSe(t){return t==null||t instanceof Array?t:t===""?[]:[t]}function lSe(t){return t==null?t:String(t)}function cSe(t){const e=mW(t);return e==null?e:e===""?null:+e}function uSe(t){return t==null?t:String(t)}function hSe(t){const e=mW(t,!0);return e==null?e:String(e)}function dSe(t){return t==null,t}function fSe(t){const e=oSe(t);return e==null,e}const Wh={encode:uSe,decode:hSe},gW={encode:lSe,decode:cSe},q2={encode:dSe,decode:fSe};function pSe(t){const e=new URLSearchParams,n=Object.entries(t);for(const[r,i]of n)if(i!==void 0&&i!==null)if(Array.isArray(i))for(const s of i)e.append(r,s??"");else e.append(r,i);return e.toString()}'{}[],":'.split("").map(t=>[t,encodeURIComponent(t)]);function mSe(t,e){const n={},r=Object.keys(e);for(const i of r){const s=e[i];t[i]?n[i]=t[i].encode(e[i]):n[i]=s==null?s:String(s)}return n}function gSe(t){const e=new URLSearchParams(t),n={};for(let[r,i]of e)Object.prototype.hasOwnProperty.call(n,r)?Array.isArray(n[r])?n[r].push(i):n[r]=[n[r],i]:n[r]=i;return n}class vSe{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,n,r,i){this.paramsMap.set(e,{stringified:n,decoded:r,decode:i})}has(e,n,r){if(!this.paramsMap.has(e))return!1;const i=this.paramsMap.get(e);return i?i.stringified===n&&(r==null||i.decode===r):!1}get(e){var n;if(this.paramsMap.has(e))return(n=this.paramsMap.get(e))==null?void 0:n.decoded}registerParams(e){for(const n of e){const r=this.registeredParams.get(n)||0;this.registeredParams.set(n,r+1)}}unregisterParams(e){for(const n of e){const r=(this.registeredParams.get(n)||0)-1;r<=0?(this.registeredParams.delete(n),this.paramsMap.has(n)&&this.paramsMap.delete(n)):this.registeredParams.set(n,r)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}}const Sx=new vSe;function bSe(t,e){var n,r,i;const s={};let o=!1;const l=Object.keys(t);let u=l;if(e.includeKnownParams||e.includeKnownParams!==!1&&l.length===0){const f=Object.keys((n=e.params)!=null?n:{});u.push(...f)}for(const f of u){const p=t[f];if(p!=null&&typeof p=="object"){s[f]=p;continue}o=!0,s[f]=(i=(r=e.params)==null?void 0:r[f])!=null?i:Wh}return o?s:t}function vW(t,e,n,r){var i;if(!n||!e.length)return t;let s={...t},o=!1;for(const l of e)Object.prototype.hasOwnProperty.call(s,l)||(s[l]=(i=n[l])!=null?i:r,o=!0);return o?s:t}const ySe=Object.prototype.hasOwnProperty;function r9(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function bW(t,e,n){var r,i;if(r9(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(let l=0;l<s.length;l++){const u=(i=(r=void 0)==null?void 0:r.equals)!=null?i:r9;if(!ySe.call(e,s[l])||!u(t[s[l]],e[s[l]]))return!1}return!0}function yW(t,e,n){const r={},i=Object.keys(e);for(const s of i){const o=e[s],l=t[s];let u;if(n.has(s,l,o.decode))u=n.get(s);else{if(u=o.decode(l),o.equals&&n.has(s,l)){const h=n.get(s);o.equals(u,h)&&(u=h)}u!==void 0&&n.set(s,l,u,o.decode)}u===void 0&&o.default!==void 0&&(u=o.default),r[s]=u}return r}function xSe(){let t;function e(n,r,i){const s=yW(n,r,i);return t!=null&&bW(t,s)?t:(t=s,s)}return e}function ASe(t){let e;for(const n in t)if(t[n].urlName){const i=`${t[n].urlName}\0${n}`;e?e.push(i):e=[i]}return e?e.join(`
`):void 0}function wSe(t){if(t)return Object.fromEntries(t.split(`
`).map(e=>e.split("\0")))}function SSe(t,e){var n;let r={};for(const i in t)((n=e[i])==null?void 0:n.urlName)!=null?r[e[i].urlName]=t[i]:r[i]=t[i];return r}let i9,s9,a9,s3={};const xW=(t,e,n)=>{if(i9===e&&a9===t&&s9===n)return s3;i9=e,a9=t;const r=t(e??"");s9=n;const i=wSe(n);for(let[s,o]of Object.entries(r)){i!=null&&i[s]&&(delete r[s],s=i[s],r[s]=o);const l=s3[s];bW(o,l)&&(r[s]=l)}return s3=r,r},jSe={searchStringToObject:gSe,objectToSearchString:pSe,updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0};function AW(t,e){e==null&&(e={});const n={...t,...e};return e.params&&t.params&&(n.params={...t.params,...e.params}),n}const wW={adapter:{},options:jSe},Ck=M.createContext(wW);function CSe(){const t=M.useContext(Ck);if(t===void 0||t===wW)throw new Error("useQueryParams must be used within a QueryParamProvider");return t}function o9({children:t,adapter:e,options:n}){const{adapter:r,options:i}=M.useContext(Ck),s=M.useMemo(()=>({adapter:e??r,options:AW(i,n)}),[e,n,r,i]);return M.createElement(Ck.Provider,{value:s},t)}function _Se({children:t,adapter:e,options:n}){const r=e;return r?M.createElement(r,null,i=>M.createElement(o9,{adapter:i,options:n},t)):M.createElement(o9,{options:n},t)}function TSe(t,e){var n;for(const r in t)((n=e[r])==null?void 0:n.default)!==void 0&&t[r]!==void 0&&e[r].encode(e[r].default)===t[r]&&(t[r]=void 0)}function kSe({changes:t,updateType:e,currentSearchString:n,paramConfigMap:r,options:i}){const{searchStringToObject:s,objectToSearchString:o}=i;e==null&&(e=i.updateType);let l;const u=xW(s,n),h=vW(r,Object.keys(t),i.params);let f;if(typeof t=="function"){const m=yW(u,h,Sx);f=t(m)}else f=t;l=mSe(h,f),i.removeDefaultsFromUrl&&TSe(l,h),l=SSe(l,h);let p;return e==="push"||e==="replace"?p=o(l):p=o({...u,...l}),p!=null&&p.length&&p[0]!=="?"&&(p=`?${p}`),p??""}function OSe({searchString:t,adapter:e,navigate:n,updateType:r}){const s={...e.location,search:t};typeof r=="string"&&r.startsWith("replace")?e.replace(s):e.push(s)}const ESe=t=>t(),MSe=t=>setTimeout(()=>t(),0),B1=[];function DSe(t,{immediate:e}={}){B1.push(t);let n=e?ESe:MSe;B1.length===1&&n(()=>{const r=B1.slice();B1.length=0;const i=r[0].currentSearchString;let s;for(let o=0;o<r.length;++o){const l=o===0?r[o]:{...r[o],currentSearchString:s};s=kSe(l)}t.options.skipUpdateWhenNoChange&&s===i||OSe({searchString:s??"",adapter:r[r.length-1].adapter,navigate:!0,updateType:r[r.length-1].updateType})})}function RSe(t,e){const{adapter:n,options:r}=CSe(),[i]=M.useState(xSe),{paramConfigMap:s,options:o}=PSe(t,e),l=M.useMemo(()=>AW(r,o),[r,o]);let u=bSe(s,l);const h=xW(l.searchStringToObject,n.location.search,ASe(u));l.includeAllParams&&(u=vW(u,Object.keys(h),l.params,Wh));const f=i(h,u,Sx),p=Object.keys(u).join("\0");M.useEffect(()=>{const x=p.split("\0");return Sx.registerParams(x),()=>{Sx.unregisterParams(x)}},[p]);const m={adapter:n,paramConfigMap:u,options:l},v=M.useRef(m);v.current==null&&(v.current=m),M.useEffect(()=>{v.current.adapter=n,v.current.paramConfigMap=u,v.current.options=l},[n,u,l]);const[b]=M.useState(()=>(w,A)=>{const{adapter:j,paramConfigMap:C,options:_}=v.current;A==null&&(A=_.updateType),DSe({changes:w,updateType:A,currentSearchString:j.location.search,paramConfigMap:C,options:_,adapter:j},{immediate:!_.enableBatching})});return[f,b]}var NSe=RSe;function PSe(t,e){let n,r;return t===void 0?(n={},r=e):Array.isArray(t)?(n=Object.fromEntries(t.map(i=>[i,"inherit"])),r=e):(n=t,r=e),{paramConfigMap:n,options:r}}const po=(t,e,n)=>{const r=M.useMemo(()=>({[t]:e??"inherit"}),[t,e]),[i,s]=NSe(r,n),o=i[t],l=M.useCallback((u,h)=>s(typeof u=="function"?f=>{const p=u(f[t]);return{[t]:p}}:{[t]:u},h),[t,s]);return[o,l]};function ISe(t,e,n,r){let i=[];for(const s of e){const o=s4(t,s,n,r.concat([]));o!==null&&(Array.isArray(o)?i=i.concat(o):i.push(o))}return i.length===0?null:i.length===1?i[0]:i}function s4(t,e,n=0,r=[]){let i=e;for(let s=n;s<t.length;s++){if(i==null||typeof i!="object")return null;if(Array.isArray(i))return ISe(t,i,s,r);const o=t[s];if(typeof o=="string")if(i[o]!==void 0)r.push(o),i=i[o];else return null;else{let l=[];for(const u of Object.keys(i))if(o.test(u)){const h=s4(t,i[u],s+1,r.concat([u]));h!==null&&(Array.isArray(h)?l=l.concat(h):l.push(h))}return l}}return{path:r,value:i}}function BSe(t){return t.right!==void 0}function LSe(t){return t.keyPath!==void 0}function zA(t,e){const n={original:t.original,rendered:t.rendered,score:t.score+e.score,index:t.index};let r;return t.matched&&e.matched?r=t.matched.concat(e.matched):t.matched?r=t.matched:e.matched&&(r=e.matched),r&&(n.matched=r),n}function FSe(t,e){const n=t;for(const[r,i]of Object.entries(e)){const s=r;n[s]!==void 0?n[s]=zA(n[s],i):n[s]=i}}function HSe(t,e){const n={};for(const[r,i]of Object.entries(e)){const s=r;t[s]!==void 0&&(n[s]=zA(t[s],i))}return n}function zSe(t,e,n){return l0(t,e,(r,i)=>r===i,n)}function qSe(t,e,n){return l0(t,e,(r,i)=>r!==i,n)}function $Se(t,e,n){return l0(t,e,(r,i)=>r>i,n)}function QSe(t,e,n){return l0(t,e,(r,i)=>r>=i,n)}function USe(t,e,n){return l0(t,e,(r,i)=>r<i,n)}function WSe(t,e,n){return l0(t,e,(r,i)=>r<=i,n)}function l0(t,e,n,r){let i=t,s=e;return!r&&typeof i=="string"&&typeof s=="string"&&(i=i.toLocaleLowerCase(),s=s.toLocaleLowerCase()),n(s,i)}function l9(t,e){const n={match:"fuzzy",pattern:t,keyPath:[]};return Array.isArray(e)?n.keyPath=n.keyPath.concat(e):n.keyPath=[e],n}class wb{constructor(e){this.conf={caseSensitive:(e==null?void 0:e.caseSensitive)===void 0?!1:e.caseSensitive,excludedChars:(e==null?void 0:e.excludedChars)===void 0?[]:e.excludedChars,includeMatches:(e==null?void 0:e.includeMatches)===void 0?!1:e.includeMatches,shouldSort:(e==null?void 0:e.shouldSort)===void 0?!1:e.shouldSort,shouldRender:(e==null?void 0:e.shouldRender)===void 0?!0:e.shouldRender,escapeHTML:(e==null?void 0:e.escapeHTML)===void 0?!1:e.escapeHTML,findAllMatches:(e==null?void 0:e.findAllMatches)==null?!1:e.findAllMatches,pre:e==null?void 0:e.pre,post:e==null?void 0:e.post,indexedKeys:e==null?void 0:e.indexedKeys}}filter(e,n,r){const i=r!=null&&r.indexedKeys?r.indexedKeys:this.conf.indexedKeys;if(i===void 0)return[];const s=i.length,o=l9(e,i[0]);if(s===1)return this.filterWithQuery(o,n,r);const l={operator:"or",left:o,right:o};let u=l;for(let h=1;h<s;h++){const f=l9(e,i[h]);if(h+1<s){const p={operator:"or",left:f,right:f};u.right=p,u=p}else u.right=f}return this.filterWithQuery(l,n,r)}filterWithQuery(e,n,r){const i=(r==null?void 0:r.shouldSort)!==void 0?r.shouldSort:this.conf.shouldSort,s=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender,o=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,l=(r==null?void 0:r.findAllMatches)!==void 0?r.findAllMatches:this.conf.findAllMatches,u=[{current:e,depth:0}],h=[];for(;u.length>0;){const p=u.shift();if(!p)break;const m=p.current;if(BSe(m)){u.unshift({current:m.left,parent:m.operator,depth:p.depth+1},{current:m.right,parent:m.operator,depth:p.depth+1},{current:m.operator,parent:p.parent,depth:p.depth});continue}if(LSe(m)){let x;!l&&h.length>1&&h[h.length-1].depth===p.depth&&p.parent!==void 0&&(x={result:h[h.length-1].result,parent:p.parent}),h.push({result:this.executeQuery(m,n,x,r),depth:p.depth});continue}const v=h.pop(),b=h.pop();if(!v||!b)break;m==="or"?(FSe(v.result,b.result),h.push({result:v.result,depth:p.depth})):h.push({result:HSe(v.result,b.result),depth:p.depth})}let f=Object.values(h[0].result);for(let p=0;p<f.length;p++)f[p].rendered=s?this.render(f[p].original,f[p].matched,r):f[p].original,o||(f[p].matched=void 0);return i&&(f=f.sort((p,m)=>m.score-p.score)),f||[]}match(e,n,r){const i=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,s=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender,o=this.internalMatch(e,n,r);return o!==null&&(o.original=n,o.rendered=s?this.render(n,o.matched,r):n,i||(o.matched=void 0)),o}render(e,n,r){const i=r!=null&&r.pre?r.pre:this.conf.pre,s=r!=null&&r.post?r.post:this.conf.post;if(i===void 0&&s===void 0||n===void 0)return e;const o=JSON.parse(JSON.stringify(e)),l={};for(const u of n)this.renderingWalk(u,o,l,r);return o}renderingWalk(e,n,r,i){let s=n,o=0;const l=e.path;for(;o<l.length-1;)s[l[o]]!==void 0?s=s[l[o]]:s=s[r[l.slice(0,o).toString()]],o++;const u={pre:i!=null&&i.pre?i.pre:this.conf.pre,post:i!=null&&i.post?i.post:this.conf.post,escapeHTML:i!=null&&i.escapeHTML?i.escapeHTML:this.conf.escapeHTML};let h=l[o];if(typeof s[h]=="object"&&typeof e.value=="string"){s=s[h];const f=kP(e.value,e.intervals,u);s[f]=s[e.value],r[l.concat(e.value).toString()]=f,delete s[e.value]}else s[h]===void 0&&(h=r[l.toString()]),s[h]=kP(s[h],e.intervals,u)}executeQuery(e,n,r,i){const s={};for(let o=0;o<n.length;o++){const l=n[o];if(r){if(r.parent==="or"){if(r.result[o])continue}else if(!r.result[o])continue}const u=this.internalMatch(e,l,i);u!==null&&(u.index=o,u.original=l,s[o]=u)}return s}internalMatch(e,n,r){const i=s4(e.keyPath,n);return this.processWalkingPath(i,e,r)}processWalkingPath(e,n,r){let i=null;if(e===null)return null;if(Array.isArray(e))for(const s of e){const o=this.recursiveMatch(s.value,s.path,n,r);o!==null&&(i!=null?i=zA(o,i):i=o)}else i=this.recursiveMatch(e.value,e.path,n,r);return i}recursiveMatch(e,n,r,i){let s=null;if(typeof e=="string"||typeof e=="number")s=this.matchSingleStringOrNumber(e,n,r,i);else if(Array.isArray(e))for(const o of e){const l=this.recursiveMatch(o,n,r,i);l!==null&&(s!=null?s=zA(l,s):s=l)}else for(const o of Object.keys(e))if(s=this.matchSingleStringOrNumber(o,n,r,i),s!==null)break;return s}matchSingleStringOrNumber(e,n,r,i){const s=(i==null?void 0:i.caseSensitive)!==void 0?i.caseSensitive:this.conf.caseSensitive;let o=[];switch((i==null?void 0:i.excludedChars)!==void 0?o=i.excludedChars:this.conf.excludedChars!==void 0&&(o=this.conf.excludedChars),r.match){case"exact":return zSe(r.pattern,e,s)?{score:1/0,matched:[{path:n,value:e,intervals:typeof e=="string"?[{from:0,to:e.length-1}]:[]}]}:null;case"negative":return qSe(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"fuzzy":{if(typeof r.pattern!="string"||typeof e!="string")return null;const l=y1e(r.pattern,e,{includeMatches:!0,caseSensitive:s,excludedChars:o});return l===null?null:{score:l.score,matched:[{path:n,value:e,intervals:l.intervals?l.intervals:[]}]}}case"greater":return $Se(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"greaterEqual":return QSe(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"less":return USe(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"lessEqual":return WSe(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null}}}const VSe="_item_11v54_1",YSe={item:VSe},[GSe,a4]=Wi("Accordion component was not found in the tree");function o4({style:t,size:e=16,...n}){return a.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:fe(e),height:fe(e),display:"block"},...n,children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}o4.displayName="@mantine/core/AccordionChevron";const[XSe,SW]=Wi("Accordion.Item component was not found in the tree"),KSe="_root_1yehb_30",ZSe="_panel_1yehb_34",JSe="_content_1yehb_38",eje="_itemTitle_1yehb_43",tje="_control_1yehb_48",nje="_label_1yehb_85",rje="_chevron_1yehb_95",ije="_icon_1yehb_114",sje="_item_1yehb_43",Sb={root:KSe,panel:ZSe,content:JSe,itemTitle:eje,control:tje,"control--default":"_control--default_1yehb_70","control--contained":"_control--contained_1yehb_71",label:nje,chevron:rje,icon:ije,item:sje,"item--default":"_item--default_1yehb_138","item--contained":"_item--contained_1yehb_142","item--filled":"_item--filled_1yehb_175","item--separated":"_item--separated_1yehb_183"},l4=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,chevron:l,icon:u,onClick:h,onKeyDown:f,children:p,disabled:m,mod:v,...b}=we("AccordionControl",null,t),{value:x}=SW(),w=a4(),A=w.isItemActive(x),j=typeof w.order=="number",C=`h${w.order}`,_=a.jsxs(Rr,{...b,...w.getStyles("control",{className:r,classNames:n,style:i,styles:s,variant:w.variant}),unstyled:w.unstyled,mod:["accordion-control",{active:A,"chevron-position":w.chevronPosition,disabled:m},v],ref:e,onClick:S=>{h==null||h(S),w.onChange(x)},type:"button",disabled:m,"aria-expanded":A,"aria-controls":w.getRegionId(x),id:w.getControlId(x),onKeyDown:$A({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:w.loop,orientation:"vertical",onKeyDown:f}),children:[a.jsx(ve,{component:"span",mod:{rotate:!w.disableChevronRotation&&A,position:w.chevronPosition},...w.getStyles("chevron",{classNames:n,styles:s}),children:l||w.chevron}),a.jsx("span",{...w.getStyles("label",{classNames:n,styles:s}),children:p}),u&&a.jsx(ve,{component:"span",mod:{"chevron-position":w.chevronPosition},...w.getStyles("icon",{classNames:n,styles:s}),children:u})]});return j?a.jsx(C,{...w.getStyles("itemTitle",{classNames:n,styles:s}),children:_}):_});l4.displayName="@mantine/core/AccordionControl";l4.classes=Sb;const c4=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,value:l,mod:u,...h}=we("AccordionItem",null,t),f=a4();return a.jsx(XSe,{value:{value:l},children:a.jsx(ve,{ref:e,mod:[{active:f.isItemActive(l)},u],...f.getStyles("item",{className:r,classNames:n,styles:s,style:i,variant:f.variant}),...h})})});c4.displayName="@mantine/core/AccordionItem";c4.classes=Sb;const u4=Oe((t,e)=>{const{classNames:n,className:r,style:i,styles:s,vars:o,children:l,...u}=we("AccordionPanel",null,t),{value:h}=SW(),f=a4(),p=f.isItemActive(h),[m,v]=M.useState(p);return M.useEffect(()=>{let b;return p?v(!0):b=setTimeout(()=>v(!1),200),()=>clearTimeout(b)},[p]),a.jsx(ew,{ref:e,...f.getStyles("panel",{className:r,classNames:n,style:i,styles:s}),...u,in:p,transitionDuration:f.transitionDuration??200,role:"region",id:f.getRegionId(h),"aria-labelledby":f.getControlId(h),children:a.jsx("div",{...f.getStyles("content",{classNames:n,styles:s}),children:m&&l})})});u4.displayName="@mantine/core/AccordionPanel";u4.classes=Sb;const aje={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},oje=(t,{transitionDuration:e,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:fe(n),"--accordion-radius":r===void 0?void 0:Jn(r)}});function Tr(t){const e=we("Accordion",aje,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,multiple:h,value:f,defaultValue:p,onChange:m,id:v,loop:b,transitionDuration:x,disableChevronRotation:w,chevronPosition:A,chevronSize:j,order:C,chevron:_,variant:S,radius:O,chevronIconSize:E,attributes:D,...N}=e,I=ki(v),[R,L]=Ui({value:f,defaultValue:p,finalValue:h?[]:null,onChange:m}),Q=P=>Array.isArray(R)?R.includes(P):P===R,z=P=>{const F=Array.isArray(R)?R.includes(P)?R.filter(U=>U!==P):[...R,P]:P===R?null:P;L(F)},H=lt({name:"Accordion",classes:Sb,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:D,vars:l,varsResolver:oje});return a.jsx(GSe,{value:{isItemActive:Q,onChange:z,getControlId:jx(`${I}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:jx(`${I}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:_===null?null:_||a.jsx(o4,{size:E}),transitionDuration:x,disableChevronRotation:w,chevronPosition:A,order:C,loop:b,getStyles:H,variant:S,unstyled:o},children:a.jsx(ve,{...H("root"),id:I,...N,variant:S,"data-accordion":!0,children:u})})}const lje=t=>t;Tr.extend=lje;Tr.withProps=hL(Tr);Tr.classes=Sb;Tr.displayName="@mantine/core/Accordion";Tr.Item=c4;Tr.Panel=u4;Tr.Control=l4;Tr.Chevron=o4;const cje=new wb({shouldSort:!0,indexedKeys:["name","labels",["labels",/.*/]]}),uje=(t,e,n)=>{const r={globalCounts:{inactive:0,pending:0,firing:0,unknown:0},groups:[]};for(const i of t.groups){const s={total:0,inactive:0,pending:0,firing:0,unknown:0};for(const l of i.rules)switch(s.total++,l.state){case"inactive":r.globalCounts.inactive++,s.inactive++;break;case"firing":r.globalCounts.firing++,s.firing++;break;case"pending":r.globalCounts.pending++,s.pending++;break;case"unknown":r.globalCounts.unknown++,s.unknown++;break;default:throw new Error(`Unknown rule state: ${l.state}`)}const o=(e===""?i.rules:cje.filter(e,i.rules).map(l=>l.original)).filter(l=>n.length===0||n.includes(l.state));r.groups.push({name:i.name,file:i.file,counts:s,rules:o.map(l=>({rule:l,counts:{firing:l.alerts.filter(u=>u.state==="firing").length,pending:l.alerts.filter(u=>u.state==="pending").length}}))})}return r},hje=[];function jW(){const{data:t}=yi({path:"/rules",params:{type:"alert"}}),{showAnnotations:e}=li(),[n,r]=po("state",Yl(q2,hje)),[i,s]=po("search",Yl(Wh,"")),[o]=Qv(i.trim(),250),[l,u]=Uv({key:"alertsPage.showEmptyGroups",defaultValue:!1}),{alertGroupsPerPage:h}=li(),[f,p]=po("page",Yl(gW,1)),m=M.useMemo(()=>uje(t.data,o,n),[t,n,o]),v=M.useMemo(()=>l?m.groups:m.groups.filter(j=>j.rules.length>0),[m.groups,l]),b=Math.ceil(v.length/h),x=Math.max(1,Math.min(f,b));M.useEffect(()=>{x!==f&&p(x)},[x,f,p]);const w=M.useMemo(()=>v.slice((x-1)*h,x*h),[v,x,h]),A=M.useMemo(()=>w.map(j=>a.jsxs(Kr,{shadow:"xs",withBorder:!0,p:"md",children:[a.jsxs(ht,{mb:"sm",justify:"space-between",children:[a.jsxs(ht,{align:"baseline",children:[a.jsx(ut,{fz:"xl",fw:600,c:"var(--mantine-primary-color-filled)",children:j.name}),a.jsx(ut,{fz:"sm",c:"gray.6",children:j.file})]}),a.jsxs(ht,{children:[j.counts.firing>0&&a.jsxs(Hr,{className:fn.healthErr,children:["firing (",j.counts.firing,")"]}),j.counts.pending>0&&a.jsxs(Hr,{className:fn.healthWarn,children:["pending (",j.counts.pending,")"]}),j.counts.unknown>0&&a.jsxs(Hr,{className:fn.healthUnknown,children:["unknown (",j.counts.unknown,")"]}),j.counts.inactive>0&&a.jsxs(Hr,{className:fn.healthOk,children:["inactive (",j.counts.inactive,")"]})]})]}),j.counts.total===0?a.jsxs(Lt,{title:"No rules",icon:a.jsx(Kn,{}),children:["No rules in this group.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>u(!1),children:"Hide empty groups"})]}):j.rules.length===0?a.jsxs(Lt,{title:"No matching rules",icon:a.jsx(Kn,{}),children:["No rules in this group match your filter criteria (omitted"," ",j.counts.total," filtered rules).",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>u(!1),children:"Hide empty groups"})]}):a.jsx(Pm,{allItems:j.rules,child:({items:C})=>a.jsx(Tr,{multiple:!0,variant:"separated",classNames:YSe,children:C.map((_,S)=>a.jsxs(Tr.Item,{mt:fe(5),value:S.toString(),className:_.counts.firing>0?jh.panelHealthErr:_.counts.pending>0?jh.panelHealthWarn:_.rule.state==="unknown"?jh.panelHealthUnknown:jh.panelHealthOk,children:[a.jsx(Tr.Control,{styles:{label:{paddingBlock:fe(10)}},children:a.jsxs(ht,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(ut,{children:_.rule.name}),a.jsxs(ht,{gap:"xs",children:[_.counts.firing>0&&a.jsxs(Hr,{className:fn.healthErr,children:["firing (",_.counts.firing,")"]}),_.counts.pending>0&&a.jsxs(Hr,{className:fn.healthWarn,children:["pending (",_.counts.pending,")"]})]})]})}),a.jsxs(Tr.Panel,{children:[a.jsx(pW,{rule:_.rule}),_.rule.alerts.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(Zv,{my:"md"}),a.jsx(Pm,{allItems:_.rule.alerts,child:({items:O})=>a.jsxs(re,{mt:"lg",children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{style:{whiteSpace:"nowrap"},children:[a.jsx(re.Th,{children:"Alert labels"}),a.jsx(re.Th,{children:"State"}),a.jsx(re.Th,{children:"Active Since"}),a.jsx(re.Th,{children:"Value"})]})}),a.jsx(re.Tbody,{children:O.map((E,D)=>a.jsxs(M.Fragment,{children:[a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsx(Hm,{labels:E.labels})}),a.jsx(re.Td,{children:a.jsx(Hr,{className:E.state==="firing"?fn.healthErr:fn.healthWarn,children:E.state})}),a.jsx(re.Td,{style:{whiteSpace:"nowrap"},children:a.jsx(Xr,{label:E.activeAt,children:a.jsx(ve,{children:Kx(E.activeAt,Xx(),"")})})}),a.jsx(re.Td,{style:{whiteSpace:"nowrap"},children:isNaN(Number(E.value))?E.value:Number(E.value)})]}),e&&a.jsx(re.Tr,{children:a.jsx(re.Td,{colSpan:4,children:a.jsx(re,{mt:"md",mb:"xl",children:a.jsx(re.Tbody,{children:Object.entries(E.annotations).map(([N,I])=>a.jsxs(re.Tr,{children:[a.jsx(re.Th,{c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-4))",children:N}),a.jsx(re.Td,{children:I})]},N))})})})})]},D))})]})})]})]})]},S))})})]},`${j.file}-${j.name}`)),[w,e,u]);return a.jsxs(En,{mt:"xs",children:[a.jsxs(ht,{children:[a.jsx(z2,{options:["inactive","pending","firing","unknown"],optionClass:j=>j==="inactive"?fn.healthOk:j==="pending"?fn.healthWarn:j==="firing"?fn.healthErr:fn.healthUnknown,optionCount:j=>m.globalCounts[j],placeholder:"Filter by rule group state",values:(n==null?void 0:n.filter(j=>j!==null))||[],onChange:j=>r(j)}),a.jsx(tc,{flex:1,leftSection:a.jsx(Zh,{style:Nf}),placeholder:"Filter by rule name or labels",value:i||"",onChange:j=>s(j.currentTarget.value||null)})]}),m.groups.length===0?a.jsx(Lt,{title:"No rules found",icon:a.jsx(Kn,{}),children:"No rules found."}):!l&&m.groups.length!==v.length&&a.jsxs(Lt,{title:"Hiding groups with no matching rules",icon:a.jsx(Kn,{}),children:["Hiding ",m.groups.length-v.length," empty groups due to filters or no rules.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>u(!0),children:"Show empty groups"})]}),a.jsx(So,{total:b,value:x,onChange:p,hideWithOnePage:!0}),A]})}const dje="_item_11v54_1",fje={item:dje},pje=new wb({shouldSort:!0,indexedKeys:["name","labels",["labels",/.*/]]}),mje=(t,e,n)=>({groups:t.groups.map(i=>({...i,prefilterRulesCount:i.rules.length,rules:(e===""?i.rules:pje.filter(e,i.rules).map(s=>s.original)).filter(s=>n.length===0||n.includes(s.health))}))}),gje=t=>{switch(t){case"ok":return fn.healthOk;case"err":return fn.healthErr;case"unknown":return fn.healthUnknown;default:throw new Error("Unknown rule health state")}},vje=[];function bje(){const{data:t}=yi({path:"/rules"}),[e,n]=po("health",Yl(q2,vje)),[r,i]=po("search",Yl(Wh,"")),[s]=Qv(r.trim(),250),[o,l]=Uv({key:"alertsPage.showEmptyGroups",defaultValue:!1}),{ruleGroupsPerPage:u}=li(),[h,f]=po("page",Yl(gW,1)),p=M.useMemo(()=>mje(t.data,s,e),[t,e,s]),m=M.useMemo(()=>o?p.groups:p.groups.filter(A=>A.rules.length>0),[p.groups,o]),v=Math.ceil(m.length/u),b=Math.max(1,Math.min(h,v));M.useEffect(()=>{b!==h&&f(b)},[b,h,f]);const x=M.useMemo(()=>m.slice((b-1)*u,b*u),[m,b,u]),w=M.useMemo(()=>x.map(A=>a.jsxs(Kr,{shadow:"xs",withBorder:!0,p:"md",children:[a.jsxs(ht,{mb:"sm",justify:"space-between",children:[a.jsxs(ht,{align:"baseline",children:[a.jsx(ut,{fz:"xl",fw:600,c:"var(--mantine-primary-color-filled)",children:A.name}),a.jsx(ut,{fz:"sm",c:"gray.6",children:A.file})]}),a.jsxs(ht,{children:[a.jsx(Xr,{label:"Last group evaluation",withArrow:!0,children:a.jsxs(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(T3,{style:Go}),children:["last run ",Kx(A.lastEvaluation,Xx())]})}),a.jsx(Xr,{label:"Duration of last group evaluation",withArrow:!0,children:a.jsxs(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(_3,{style:Go}),children:["took ",Hp(parseFloat(A.evaluationTime)*1e3)]})}),a.jsx(Xr,{label:"Group evaluation interval",withArrow:!0,children:a.jsxs(Hr,{variant:"transparent",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(NF,{style:Go}),children:["every ",Hp(parseFloat(A.interval)*1e3)," "]})})]})]}),A.prefilterRulesCount===0?a.jsxs(Lt,{title:"No rules",icon:a.jsx(Kn,{}),children:["No rules in this group.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty groups"})]}):A.rules.length===0?a.jsxs(Lt,{title:"No matching rules",icon:a.jsx(Kn,{}),children:["No rules in this group match your filter criteria (omitted"," ",A.prefilterRulesCount," filtered rules).",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty groups"})]}):a.jsx(Pm,{allItems:A.rules,child:({items:j})=>a.jsx(Tr,{multiple:!0,variant:"separated",classNames:fje,children:j.map((C,_)=>a.jsxs(Tr.Item,{mt:fe(5),value:_.toString(),style:{borderLeft:C.health==="err"?"5px solid var(--mantine-color-red-4)":C.health==="unknown"?"5px solid var(--mantine-color-gray-5)":"5px solid var(--mantine-color-green-4)"},children:[a.jsx(Tr.Control,{styles:{label:{paddingBlock:fe(10)}},children:a.jsxs(ht,{justify:"space-between",mr:"lg",children:[a.jsxs(ht,{gap:"xs",wrap:"nowrap",children:[C.type==="alerting"?a.jsx(Xr,{label:"Alerting rule",withArrow:!0,children:a.jsx(cE,{style:{width:fe(15),height:fe(15)}})}):a.jsx(Xr,{label:"Recording rule",withArrow:!0,children:a.jsx(kie,{style:{width:fe(15),height:fe(15)}})}),a.jsx(ut,{children:C.name})]}),a.jsxs(ht,{gap:"xs",children:[a.jsxs(ht,{gap:"xs",wrap:"wrap",children:[a.jsx(Xr,{label:"Last rule evaluation",withArrow:!0,children:a.jsx(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(T3,{style:Go}),children:Kx(C.lastEvaluation,Xx())})}),a.jsx(Xr,{label:"Duration of last rule evaluation",withArrow:!0,children:a.jsx(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(_3,{style:Go}),children:Hp(parseFloat(C.evaluationTime)*1e3)})})]}),a.jsx(Hr,{className:gje(C.health),children:C.health})]})]})}),a.jsxs(Tr.Panel,{children:[a.jsx(pW,{rule:C}),C.lastError&&a.jsxs(Lt,{color:"red",mt:"sm",title:"Rule failed to evaluate",icon:a.jsx(Qi,{}),children:[a.jsx("strong",{children:"Error:"})," ",C.lastError]})]})]},_))})})]},`${A.file}-${A.name}`)),[x,l]);return a.jsxs(En,{mt:"xs",children:[a.jsxs(ht,{children:[a.jsx(z2,{options:["ok","unknown","err"],optionClass:A=>A==="ok"?fn.healthOk:A==="unknown"?fn.healthWarn:fn.healthErr,placeholder:"Filter by rule health",values:(e==null?void 0:e.filter(A=>A!==null))||[],onChange:A=>n(A)}),a.jsx(tc,{flex:1,leftSection:a.jsx(Zh,{style:Nf}),placeholder:"Filter by rule name or labels",value:r||"",onChange:A=>i(A.currentTarget.value||null)})]}),p.groups.length===0?a.jsx(Lt,{title:"No rules found",icon:a.jsx(Kn,{}),children:"No rules found."}):!o&&p.groups.length!==m.length&&a.jsxs(Lt,{title:"Hiding groups with no matching rules",icon:a.jsx(Kn,{}),children:["Hiding ",p.groups.length-m.length," empty groups due to filters or no rules.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!0),children:"Show empty groups"})]}),a.jsx(So,{total:v,value:b,onChange:f,hideWithOnePage:!0}),w]})}const CW="targetsPage.collapsedPools",yje={collapsedPools:Ca(CW,[]),showLimitAlert:!1},_W=Vw({name:"targetsPage",initialState:yje,reducers:{setCollapsedPools:(t,{payload:e})=>{t.collapsedPools=e},setShowLimitAlert:(t,{payload:e})=>{t.showLimitAlert=e}}}),{setCollapsedPools:h4,setShowLimitAlert:_k}=_W.actions,xje=_W.reducer,Tk=({endpoint:t,globalUrl:e})=>{let n,r="",i=!1;try{n=new URL(t)}catch{i=!0,t.indexOf("?")>-1&&(r=t.substring(t.indexOf("?"))),n=new URL("http://0.0.0.0"+r)}const{host:s,pathname:o,protocol:l,searchParams:u}=n,h=Array.from(u.entries()),f=i?t.replace(r,""):`${l}//${s}${o}`;return a.jsxs(En,{gap:0,children:[a.jsx(zr,{size:"sm",href:e,target:"_blank",children:f}),h.length>0&&a.jsx(ht,{gap:"xs",mt:"md",children:h.map(([p,m])=>a.jsx(Hr,{size:"sm",variant:"light",color:"gray",style:{textTransform:"none"},children:`${p}="${m}"`},`${p}/${m}`))})]})},Aje=({discoveredLabels:t,labels:e})=>{const[n,{toggle:r}]=Wv(!1);return a.jsxs(En,{children:[a.jsxs(ht,{wrap:"nowrap",align:"flex-start",children:[a.jsx(Hm,{labels:e}),a.jsx(Nr,{size:"xs",color:"gray",variant:"light",onClick:r,title:`${n?"Hide":"Show"} discovered (pre-relabeling) labels`,children:n?a.jsx(uE,{style:iu}):a.jsx(rv,{style:iu})})]}),a.jsx(ew,{in:n,children:n&&a.jsxs(a.Fragment,{children:[a.jsx(ut,{fw:700,size:"1em",my:"lg",c:"gray.7",children:"Discovered labels:"}),a.jsx(Hm,{labels:t,style:{color:"var(--mantine-color-blue-light-color)",backgroundColor:"var(--mantine-color-blue-light)"}})]})})]})},wje=({target:t})=>{const[e,{toggle:n}]=Wv(!1);return a.jsxs(En,{gap:"xs",children:[a.jsxs(ht,{wrap:"nowrap",align:"flex-start",children:[a.jsxs(ht,{gap:"xs",wrap:"wrap",children:[a.jsx(Xr,{label:"Last target scrape",withArrow:!0,children:a.jsx(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(T3,{style:Go}),children:Kx(t.lastScrape,Xx())})}),a.jsx(Xr,{label:"Duration of last target scrape",withArrow:!0,children:a.jsx(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(_3,{style:Go}),children:Hp(t.lastScrapeDuration*1e3)})})]}),a.jsx(Nr,{size:"xs",color:"gray",variant:"light",onClick:n,title:`${e?"Hide":"Show"} additional timing info`,children:e?a.jsx(uE,{style:iu}):a.jsx(rv,{style:iu})})]}),a.jsx(ew,{in:e,children:e&&a.jsxs(ht,{gap:"xs",wrap:"wrap",children:[a.jsx(Xr,{label:"Scrape interval",withArrow:!0,children:a.jsxs(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(NF,{style:Go}),children:["every ",t.scrapeInterval]})}),a.jsx(Xr,{label:"Scrape timeout",withArrow:!0,children:a.jsxs(Hr,{variant:"light",className:fn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(iie,{style:Go}),children:["after ",t.scrapeTimeout]})})]})})]})},Sje=t=>t.count>0&&t.downCount===t.count?jh.panelHealthErr:t.downCount>=1?jh.panelHealthWarn:t.unknownCount===t.count?jh.panelHealthUnknown:jh.panelHealthOk,jje=t=>{switch(t.toLowerCase()){case"up":return fn.healthOk;case"down":return fn.healthErr;case"unknown":return fn.healthUnknown;default:return fn.healthWarn}},Cje=new wb({shouldSort:!0,indexedKeys:["labels","scrapePool",["labels",/.*/]]}),_je=(t,e,n,r)=>{const i={};for(const o of t)i[o]={targets:[],count:0,upCount:0,downCount:0,unknownCount:0};for(const o of e){if(!i[o.scrapePool])throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");switch(i[o.scrapePool].count++,o.health.toLowerCase()){case"up":i[o.scrapePool].upCount++;break;case"down":i[o.scrapePool].downCount++;break;case"unknown":i[o.scrapePool].unknownCount++;break}}const s=(n===""?e:Cje.filter(n,e).map(o=>o.original)).filter(o=>r.length===0||r.includes(o.health));for(const o of s)i[o.scrapePool].targets.push(o);return i},Tje=M.memo(({poolNames:t,selectedPool:e,healthFilter:n,searchFilter:r})=>{const{data:{data:{activeTargets:i}}}=yi({path:"/targets",params:{state:"active",scrapePool:e===null?"":e}}),s=cu(),[o,l]=Uv({key:"targetsPage.showEmptyPools",defaultValue:!1}),{collapsedPools:u,showLimitAlert:h}=rc(v=>v.targetsPage),f=M.useMemo(()=>_je(e?[e]:t,i,r,n),[e,t,i,r,n]),p=Object.keys(f),m=o?p:p.filter(v=>f[v].targets.length!==0);return a.jsxs(En,{children:[p.length===0?a.jsx(Lt,{title:"No scrape pools found",icon:a.jsx(Kn,{}),children:"No scrape pools found."}):!o&&p.length!==m.length&&a.jsxs(Lt,{title:"Hiding pools with no matching targets",icon:a.jsx(Kn,{}),children:["Hiding ",p.length-m.length," empty pools due to filters or no targets.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!0),children:"Show empty pools"})]}),h&&a.jsxs(Lt,{title:"Found many pools, showing only one",icon:a.jsx(Kn,{}),withCloseButton:!0,onClose:()=>s(_k(!1)),children:["There are more than ",TW," scrape pools. Showing only the first one. Use the dropdown to select a different pool."]}),a.jsx(Tr,{multiple:!0,variant:"separated",value:p.filter(v=>!u.includes(v)),onChange:v=>s(h4(p.filter(b=>!v.includes(b)))),children:m.map(v=>{const b=f[v];return a.jsxs(Tr.Item,{value:v,className:Sje(b),children:[a.jsx(Tr.Control,{children:a.jsxs(ht,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(ut,{children:v}),a.jsxs(ht,{gap:"xs",children:[a.jsxs(ut,{c:"gray.6",children:[b.upCount," / ",b.count," up"]}),a.jsx(Nw,{size:25,thickness:5,sections:b.count===0?[]:[{value:b.upCount/b.count*100,color:"green.4"},{value:b.unknownCount/b.count*100,color:"gray.4"},{value:b.downCount/b.count*100,color:"red.5"}]})]})]})}),a.jsx(Tr.Panel,{children:b.count===0?a.jsxs(Lt,{title:"No targets",icon:a.jsx(Kn,{}),children:["No active targets in this scrape pool.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty pools"})]}):b.targets.length===0?a.jsxs(Lt,{title:"No matching targets",icon:a.jsx(Kn,{}),children:["No targets in this pool match your filter criteria (omitted ",b.count," filtered targets).",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty pools"})]}):a.jsx(Pm,{allItems:b.targets,child:({items:x})=>a.jsxs(re,{children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{w:"25%",children:"Endpoint"}),a.jsx(re.Th,{children:"Labels"}),a.jsx(re.Th,{w:230,children:"Last scrape"}),a.jsx(re.Th,{w:100,children:"State"})]})}),a.jsx(re.Tbody,{children:x.map((w,A)=>a.jsxs(Cn.Fragment,{children:[a.jsxs(re.Tr,{style:{borderBottom:w.lastError?"none":void 0},children:[a.jsx(re.Td,{valign:"top",children:a.jsx(Tk,{endpoint:w.scrapeUrl,globalUrl:w.globalUrl})}),a.jsx(re.Td,{valign:"top",children:a.jsx(Aje,{labels:w.labels,discoveredLabels:w.discoveredLabels})}),a.jsx(re.Td,{valign:"top",children:a.jsx(wje,{target:w})}),a.jsx(re.Td,{valign:"top",children:a.jsx(Hr,{className:jje(w.health),children:w.health})})]}),w.lastError&&a.jsx(re.Tr,{children:a.jsx(re.Td,{colSpan:5,valign:"top",children:a.jsxs(Lt,{color:"red",mb:"sm",icon:a.jsx(Qi,{}),children:[a.jsx("strong",{children:"Error scraping target:"})," ",w.lastError]})})})]},A))})]})})})]},v)})})]})}),TW=20,kje=[];function Oje(){const{data:{data:{scrapePools:t}}}=yi({path:"/scrape_pools"}),e=cu(),n="Select scrape pool",[r,i]=po("pool",Wh),[s,o]=M.useState(n),[l,u]=M.useState(!1),[h,f]=po("health",Yl(q2,kje)),[p,m]=po("search",Yl(Wh,"")),[v]=Qv(p.trim(),250),{collapsedPools:b,showLimitAlert:x}=rc(A=>A.targetsPage),w=t.length>TW&&r===void 0;return w&&(i(t[0]),e(_k(!0))),a.jsxs(a.Fragment,{children:[a.jsxs(ht,{mb:"md",mt:"xs",children:[a.jsx(Km,{placeholder:s,data:[{label:"All pools",value:""},...t],value:l?null:w&&t[0]||r||null,onChange:A=>{i(A),x&&e(_k(!1))},onDropdownOpen:()=>{o(r||n),u(!0)},onDropdownClose:()=>{o(n),u(!1)},searchable:!0}),a.jsx(z2,{options:["unknown","up","down"],optionClass:A=>A==="unknown"?fn.healthUnknown:A==="up"?fn.healthOk:fn.healthErr,placeholder:"Filter by target health",values:(h==null?void 0:h.filter(A=>A!==null))||[],onChange:A=>f(A)}),a.jsx(tc,{flex:1,leftSection:a.jsx(Zh,{style:Nf}),placeholder:"Filter by endpoint or labels",value:p||"",onChange:A=>m(A.currentTarget.value||null)}),a.jsx(Nr,{size:"input-sm",title:b.length>0?"Expand all pools":"Collapse all pools",variant:"light",onClick:()=>e(h4(b.length>0?[]:t)),children:b.length>0?a.jsx(DF,{style:PA}):a.jsx(MF,{style:PA})})]}),a.jsx(wf,{title:"Error showing target pools",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(10),(A,j)=>a.jsx(go,{height:40,mb:15,width:1e3,mx:"auto"},j))}),children:a.jsx(Tje,{poolNames:t,selectedPool:w&&t[0]||r||null,healthFilter:h,searchFilter:v})})},location.pathname)]})}const jf=({children:t,title:e,icon:n})=>a.jsxs(Kr,{shadow:"xs",withBorder:!0,p:"md",children:[e&&a.jsxs(ht,{wrap:"nowrap",align:"center",ml:"xs",mb:"sm",gap:"xs",fz:"xl",fw:600,children:[n&&a.jsx(n,{style:axe}),e]}),t]}),jb=({children:t})=>a.jsx(En,{gap:"lg",maw:1e3,mx:"auto",mt:"xs",children:t});function Eje(){const{data:t}=yi({path:"/status/buildinfo"}),{data:e}=yi({path:"/status/runtimeinfo"}),{useLocalTime:n}=li(),r={startTime:{title:"Start time",formatValue:i=>lf(new Date(i).valueOf()/1e3,n)},CWD:{title:"Working directory"},hostname:{title:"Hostname"},serverTime:{title:"Server Time",formatValue:i=>lf(new Date(i).valueOf()/1e3,n)},reloadConfigSuccess:{title:"Configuration reload",formatValue:i=>i?"Successful":"Unsuccessful"},lastConfigTime:{title:"Last successful configuration reload",formatValue:i=>lf(new Date(i).valueOf()/1e3,n)},corruptionCount:{title:"WAL corruptions"},goroutineCount:{title:"Goroutines"},storageRetention:{title:"Storage retention"}};return a.jsxs(jb,{children:[a.jsx(jf,{title:"Build information",icon:Die,children:a.jsx(re,{layout:"fixed",children:a.jsx(re.Tbody,{children:Object.entries(t.data).map(([i,s])=>a.jsxs(re.Tr,{children:[a.jsx(re.Th,{style:{textTransform:"capitalize"},children:i}),a.jsx(re.Td,{children:s})]},i))})})}),a.jsx(jf,{title:"Runtime information",icon:uie,children:a.jsx(re,{layout:"fixed",children:a.jsx(re.Tbody,{children:Object.entries(e.data).map(([i,s])=>{const{title:o=i,formatValue:l=u=>u}=r[i]||{};return a.jsxs(re.Tr,{children:[a.jsx(re.Th,{style:{textTransform:"capitalize"},children:o}),a.jsx(re.Td,{children:l(s)})]},i)})})})})]})}function Mje(){const{data:{data:{headStats:t,labelValueCountByLabelName:e,seriesCountByMetricName:n,memoryInBytesByLabelName:r,seriesCountByLabelValuePair:i}}}=yi({path:"/status/tsdb"}),{useLocalTime:s}=li(),o=v=>{const b=lf(v,s);return b==="Invalid Date"?u===0?"No datapoints yet":`Error parsing time (${v})`:b},{chunkCount:l,numSeries:u,numLabelPairs:h,minTime:f,maxTime:p}=t,m=[{name:"Number of Series",value:u},{name:"Number of Chunks",value:l},{name:"Number of Label Pairs",value:h},{name:"Current Min Time",value:`${o(f/1e3)}`},{name:"Current Max Time",value:`${o(p/1e3)}`}];return a.jsx(jb,{children:[{title:"TSDB Head Status",stats:m,formatAsCode:!1},{title:"Top 10 label names with value count",stats:e,formatAsCode:!0},{title:"Top 10 series count by metric names",stats:n,formatAsCode:!0},{title:"Top 10 label names with high memory usage",unit:"Bytes",stats:r,formatAsCode:!0},{title:"Top 10 series count by label value pairs",stats:i,formatAsCode:!0}].map(({title:v,unit:b="Count",stats:x,formatAsCode:w})=>a.jsx(jf,{title:v,children:a.jsxs(re,{layout:"fixed",children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{children:"Name"}),a.jsx(re.Th,{children:b})]})}),a.jsx(re.Tbody,{children:x.map(({name:A,value:j})=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{style:{wordBreak:"break-all"},children:w?a.jsx("code",{children:A}):A}),a.jsx(re.Td,{children:j})]},A))})]})}))})}const Dje="_th_1w9xk_1",Rje="_control_1w9xk_5",Nje="_icon_1w9xk_17",a3={th:Dje,control:Rje,icon:Nje};function c9({children:t,reversed:e,sorted:n,onSort:r}){const i=n?e?uE:rv:fie;return a.jsx(re.Th,{className:a3.th,children:a.jsx(Rr,{onClick:r,className:a3.control,children:a.jsxs(ht,{justify:"space-between",children:[a.jsx(ut,{fw:600,fz:"sm",children:t}),a.jsx(ev,{className:a3.icon,children:a.jsx(i,{style:{width:fe(16),height:fe(16)},stroke:1.5})})]})})})}function u9(t,e){const n=e.toLowerCase().trim();return t.filter(r=>Zr(t[0]).some(i=>r[i].toLowerCase().includes(n)))}function h9(t,e){const{sortBy:n}=e;return u9(n?[...t].sort((r,i)=>e.reversed?i[n].localeCompare(r[n]):r[n].localeCompare(i[n])):t,e.search)}function Pje(){const{data:t}=yi({path:"/status/flags"}),e=Object.entries(t.data).map(([v,b])=>({flag:v,value:b})),[n,r]=M.useState(""),[i,s]=M.useState(e),[o,l]=M.useState(null),[u,h]=M.useState(!1),f=v=>{const b=v===o?!u:!1;h(b),l(v),s(h9(e,{sortBy:v,reversed:b,search:n}))},p=v=>{const{value:b}=v.currentTarget;r(b),s(h9(e,{sortBy:o,reversed:u,search:b}))},m=i.map(v=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{children:a.jsxs("code",{children:["--",v.flag]})}),a.jsx(re.Td,{children:a.jsx("code",{children:v.value})})]},v.flag));return a.jsx(jb,{children:a.jsxs(jf,{children:[a.jsx(tc,{placeholder:"Filter by flag name or value",mb:"md",autoFocus:!0,leftSection:a.jsx(Zh,{style:Nf}),value:n,onChange:p}),a.jsxs(re,{horizontalSpacing:"md",verticalSpacing:"xs",miw:700,layout:"fixed",children:[a.jsx(re.Tbody,{children:a.jsxs(re.Tr,{children:[a.jsx(c9,{sorted:o==="flag",reversed:u,onSort:()=>f("flag"),children:"Flag"}),a.jsx(c9,{sorted:o==="value",reversed:u,onSort:()=>f("value"),children:"Value"})]})}),a.jsx(re.Tbody,{children:m.length>0?m:a.jsx(re.Tr,{children:a.jsx(re.Td,{colSpan:2,children:a.jsx(ut,{fw:500,ta:"center",children:"Nothing found"})})})})]})]})})}var kW={root:"m_5cb1b9c8",codeHighlight:"m_e597c321",inlineCodeHighlight:"m_dfe9c588",pre:"m_2c47c4fd",code:"m_5caae6d3",controls:"m_be7e9c9c",control:"m_d498bab7",controlTooltip:"m_4c3d814c",scrollarea:"m_f744fd40",showCodeButton:"m_c9378bc2",file:"m_5cac2e62",fileIcon:"m_b46cddfb",filesScrollarea:"m_7b14120b",files:"m_38d99e51"};const kk={getHighlighter:()=>({code:t})=>({highlightedCode:t,isHighlighted:!1})},[Ije,Bje]=Vh({adapter:kk,highlight:kk.getHighlighter(null)});function Lje({adapter:t,children:e}){const[n,r]=M.useState(null),i=M.useMemo(()=>t.getHighlighter(n),[t,n]);return M.useEffect(()=>{t.loadContext&&t.loadContext().then(r)},[t]),a.jsx(Ije,{value:{adapter:t,highlight:i},children:e})}function Fje(){const t=Bje();return(t==null?void 0:t.highlight)||kk.getHighlighter(null)}const[Hje,zje]=Wi("CodeHighlightProvider was not found in the component tree"),$2=Vi((t,e)=>{const n=we("CodeHighlightControl",null,t),{children:r,vars:i,tooltipLabel:s,...o}=n,l=zje(),u=l.getStyles("controlTooltip"),h=a.jsx(Nr,{ref:e,...l.getStyles("control"),...o,variant:"none","data-code-color-scheme":l.codeColorScheme,children:r});return s?a.jsx(Xr,{label:s,fz:"sm",position:"bottom",classNames:{tooltip:u.className},styles:{tooltip:u.style},"data-code-color-scheme":l.codeColorScheme,transitionProps:{duration:0},children:h}):h});$2.displayName="@mantine/code-highlight/CodeHighlightControl";function OW({copied:t,...e}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:t?a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M5 12l5 5l10 -10"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),a.jsx("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]})})}OW.displayName="@mantine/code-highlight/CopyIcon";function EW({code:t,copyLabel:e="Copy",copiedLabel:n="Copied"}){const r=Q9();return a.jsx($2,{onClick:()=>r.copy(t.trim()),variant:"none",tooltipLabel:r.copied?n:e,"aria-label":r.copied?n:`${e} code`,children:a.jsx(OW,{copied:r.copied})})}EW.displayName="@mantine/code-highlight/CopyCodeButton";function MW({expanded:t,style:e,...n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...n,children:t?a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M12 13v-8l-3 3m6 0l-3 -3"}),a.jsx("path",{d:"M9 17l1 0"}),a.jsx("path",{d:"M14 17l1 0"}),a.jsx("path",{d:"M19 17l1 0"}),a.jsx("path",{d:"M4 17l1 0"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M12 11v8l3 -3m-6 0l3 3"}),a.jsx("path",{d:"M9 7l1 0"}),a.jsx("path",{d:"M14 7l1 0"}),a.jsx("path",{d:"M19 7l1 0"}),a.jsx("path",{d:"M4 7l1 0"})]})})}MW.displayName="@mantine/code-highlight/ExpandIcon";function DW({expanded:t,onExpand:e,expandCodeLabel:n="Expand code",collapseCodeLabel:r="Collapse code"}){return a.jsx($2,{onClick:()=>e(!t),tooltipLabel:t?r:n,children:a.jsx(MW,{expanded:t})})}DW.displayName="@mantine/code-highlight/ExpandCodeButton";const qje={withCopyButton:!0,expandCodeLabel:"Expand code"},$je=(t,{maxCollapsedHeight:e,background:n,radius:r})=>({codeHighlight:{"--ch-max-height":fe(e),"--ch-background":n?hr(n,t):void 0,"--ch-radius":typeof r<"u"?Jn(r):void 0}}),Q2=Oe((t,e)=>{var V,te,le,be;const n=we("CodeHighlight",qje,t),{classNames:r,className:i,style:s,styles:o,unstyled:l,vars:u,code:h,copiedLabel:f,copyLabel:p,defaultExpanded:m,expanded:v,onExpandedChange:b,maxCollapsedHeight:x,withCopyButton:w,withExpandButton:A,expandCodeLabel:j,collapseCodeLabel:C,radius:_,background:S,withBorder:O,controls:E,language:D,codeColorScheme:N,__withOffset:I,__inline:R,__staticSelector:L,attributes:Q,...z}=n,H=lt({name:L||"CodeHighlight",classes:kW,props:n,className:i,style:s,classNames:r,styles:o,unstyled:l,attributes:Q,vars:u,varsResolver:$je,rootSelector:"codeHighlight"}),[P,F]=Ui({value:v,defaultValue:m,finalValue:!0,onChange:b}),U=E&&E.length>0||A||w,Z=KA(),W=Fje()({code:h.trim(),language:D,colorScheme:N??Z}),X=W.isHighlighted?{dangerouslySetInnerHTML:{__html:W.highlightedCode}}:{children:h.trim()};return R?a.jsx(ve,{component:"code",ref:e,...z,...W.codeElementProps,...H("codeHighlight",{className:Ir((V=W.codeElementProps)==null?void 0:V.className,i),style:[{...(te=W.codeElementProps)==null?void 0:te.style},s]}),"data-with-border":O||void 0,...X}):a.jsx(Hje,{value:{getStyles:H,codeColorScheme:N},children:a.jsxs(ve,{ref:e,...H("codeHighlight"),...z,dir:"ltr","data-code-color-scheme":N,"data-with-border":O||void 0,children:[U&&a.jsxs("div",{...H("controls"),"data-with-offset":I||void 0,children:[E,A&&a.jsx(DW,{expanded:P,onExpand:F,expandCodeLabel:j,collapseCodeLabel:C}),w&&a.jsx(EW,{code:h,copiedLabel:f,copyLabel:p})]}),a.jsx(La,{type:"hover",scrollbarSize:4,dir:"ltr",offsetScrollbars:!1,"data-collapsed":!P||void 0,styles:{viewport:{overscrollBehaviorInline:"none"}},...H("scrollarea"),children:a.jsx("pre",{...H("pre"),"data-with-offset":I||void 0,children:a.jsx("code",{...W.codeElementProps,...H("code",{className:(le=W.codeElementProps)==null?void 0:le.className,style:(be=W.codeElementProps)==null?void 0:be.style}),...X})})}),a.jsx(Rr,{...H("showCodeButton"),mod:{hidden:P},onClick:()=>F(!0),"data-code-color-scheme":N,children:j})]})})});Q2.displayName="@mantine/code-highlight/CodeHighlight";Q2.classes=kW;Q2.Control=$2;function Qje(t){return{getHighlighter:()=>({code:e,language:n})=>{const r=t.getLanguage(n)?n:"plaintext";return{highlightedCode:t.highlight(e.trim(),{language:r}).value,isHighlighted:!0,codeElementProps:{className:`hljs ${r}`}}}}}function Uje(){const{data:{data:{yaml:t}}}=yi({path:"/status/config"});return a.jsx(Q2,{code:t,language:"yaml",miw:"50vw",w:"fit-content",maw:"calc(100vw - 75px)",mx:"auto",mt:"xs"})}const Wje=()=>a.jsx(jb,{children:a.jsxs(jf,{title:"Prometheus Agent",icon:Aie,children:[a.jsxs(ut,{p:"md",children:["This Prometheus instance is running in ",a.jsx("strong",{children:"agent mode"}),". In this mode, Prometheus is only used to scrape discovered targets and forward the scraped metrics to remote write endpoints."]}),a.jsx(ut,{p:"md",children:"Some features are not available in this mode, such as querying and alerting."})]})}),Vje=()=>{const{colorScheme:t,setColorScheme:e}=sL(),n={style:{width:fe(20),height:fe(20),display:"block"},stroke:1.5};return a.jsx(Nr,{color:"gray",title:`Switch to ${t==="light"?"dark":t==="dark"?"browser-preferred":"light"} theme`,"aria-label":`Switch to ${t==="light"?"dark":t==="dark"?"browser-preferred":"light"} theme`,size:32,onClick:()=>e(t==="light"?"dark":t==="dark"?"auto":"light"),children:t==="light"?a.jsx(Vie,{...n}):t==="dark"?a.jsx(Qie,{...n}):a.jsx(Hie,{...n})})},Yje=()=>{const{useLocalTime:t,enableQueryHistory:e,enableAutocomplete:n,enableSyntaxHighlighting:r,enableLinter:i,showAnnotations:s,showQueryWarnings:o,showQueryInfoNotices:l,ruleGroupsPerPage:u,alertGroupsPerPage:h}=li(),f=cu();return a.jsxs(Zn,{position:"bottom",withArrow:!0,shadow:"md",children:[a.jsx(Zn.Target,{children:a.jsx(Nr,{color:"gray",title:"Settings","aria-label":"Settings",size:32,children:a.jsx(yie,{style:iu})})}),a.jsx(Zn.Dropdown,{children:a.jsxs(ht,{align:"flex-start",children:[a.jsxs(En,{children:[a.jsx(kp,{p:"md",legend:"Global settings",children:a.jsx(na,{checked:t,label:"Use local time",onChange:p=>f(no({useLocalTime:p.currentTarget.checked}))})}),a.jsx(kp,{p:"md",legend:"Query page settings",children:a.jsxs(En,{children:[a.jsx(na,{checked:e,label:"Enable query history",onChange:p=>f(no({enableQueryHistory:p.currentTarget.checked}))}),a.jsx(na,{checked:n,label:"Enable autocomplete",onChange:p=>f(no({enableAutocomplete:p.currentTarget.checked}))}),a.jsx(na,{checked:r,label:"Enable syntax highlighting",onChange:p=>f(no({enableSyntaxHighlighting:p.currentTarget.checked}))}),a.jsx(na,{checked:i,label:"Enable linter",onChange:p=>f(no({enableLinter:p.currentTarget.checked}))}),a.jsx(na,{checked:o,label:"Show query warnings",onChange:p=>f(no({showQueryWarnings:p.currentTarget.checked}))}),a.jsx(na,{checked:l,label:"Show query info notices",onChange:p=>f(no({showQueryInfoNotices:p.currentTarget.checked}))})]})})]}),a.jsxs(En,{children:[a.jsx(kp,{p:"md",legend:"Alerts page settings",children:a.jsxs(En,{children:[a.jsx(na,{checked:s,label:"Show expanded annotations",onChange:p=>f(no({showAnnotations:p.currentTarget.checked}))}),a.jsx(Bx,{min:1,allowDecimal:!1,label:"Alert groups per page",value:h,onChange:p=>{typeof p=="number"&&f(no({alertGroupsPerPage:p}))}})]})}),a.jsx(kp,{p:"md",legend:"Rules page settings",children:a.jsx(Bx,{min:1,allowDecimal:!1,label:"Rule groups per page",value:u,onChange:p=>{typeof p=="number"&&f(no({ruleGroupsPerPage:p}))}})})]})]})})]})},d9="is starting up...",Gje="is shutting down...",Xje="is not ready...",Kje=()=>{const{pathPrefix:t,agentMode:e}=li(),n=cu(),[r,i]=M.useState(0),[s,o]=M.useState(""),{data:l}=pH({queryKey:["ready",r],retry:!1,refetchOnWindowFocus:!1,gcTime:0,queryFn:async({signal:p})=>{try{const m=await fetch(`${t}/-/ready`,{cache:"no-store",credentials:"same-origin",signal:p});switch(m.status){case 200:return o(""),!0;case 503:return m.headers.get("X-Prometheus-Stopping")==="true"?o(Gje):o(d9),!1;default:throw new Error(m.statusText)}}catch{throw new Error("Unexpected error while fetching ready status")}}}),u=s===d9,{data:h,isSuccess:f}=yi({path:"/status/walreplay",key:["walreplay",r]});return M.useEffect(()=>{l&&n(no({ready:l}))},[l,n]),M.useEffect(()=>{const p=setInterval(()=>i(m=>m+1),1e3);return()=>clearInterval(p)},[]),a.jsx(Lt,{color:"yellow",title:"Prometheus "+(e&&"Agent "||"")+(s||Xje),icon:a.jsx(Qi,{}),maw:500,mx:"auto",mt:"lg",children:u&&f&&h&&a.jsxs(En,{children:[a.jsxs("strong",{children:["Replaying WAL (",h.data.current,"/",h.data.max,")"]}),a.jsx(Xm,{size:"xl",animated:!0,color:"yellow",value:(h.data.current-h.data.min+1)/(h.data.max-h.data.min+1)*100})]})})},L1=({children:t})=>{const{ready:e}=li();return e?a.jsx(a.Fragment,{children:t}):a.jsx(Kje,{})},Zje={notifications:[],isConnectionError:!1},RW=M.createContext(Zje),Jje=()=>M.useContext(RW);async function eCe(t,e){const n=t.getReader();let r;for(;!(r=await n.read()).done;)e(r.value)}function tCe(t){let e,n,r,i=!1;return function(o){e===void 0?(e=o,n=0,r=-1):e=rCe(e,o);const l=e.length;let u=0;for(;n<l;){i&&(e[n]===10&&(u=++n),i=!1);let h=-1;for(;n<l&&h===-1;++n)switch(e[n]){case 58:r===-1&&(r=n-u);break;case 13:i=!0;case 10:h=n;break}if(h===-1)break;t(e.subarray(u,h),r),u=n,r=-1}u===l?e=void 0:u!==0&&(e=e.subarray(u),n-=u)}}function nCe(t,e,n){let r=f9();const i=new TextDecoder;return function(o,l){if(o.length===0)n==null||n(r),r=f9();else if(l>0){const u=i.decode(o.subarray(0,l)),h=l+(o[l+1]===32?2:1),f=i.decode(o.subarray(h));switch(u){case"data":r.data=r.data?r.data+`
`+f:f;break;case"event":r.event=f;break;case"id":t(r.id=f);break;case"retry":const p=parseInt(f,10);isNaN(p)||e(r.retry=p);break}}}}function rCe(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function f9(){return{data:"",event:"",id:"",retry:void 0}}var iCe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Ok="text/event-stream",sCe=1e3,p9="last-event-id";function aCe(t,e){var{signal:n,headers:r,onopen:i,onmessage:s,onclose:o,onerror:l,openWhenHidden:u,fetch:h}=e,f=iCe(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((p,m)=>{const v=Object.assign({},r);v.accept||(v.accept=Ok);let b;function x(){b.abort(),document.hidden||S()}u||document.addEventListener("visibilitychange",x);let w=sCe,A=0;function j(){document.removeEventListener("visibilitychange",x),window.clearTimeout(A),b.abort()}n==null||n.addEventListener("abort",()=>{j(),p()});const C=h??window.fetch,_=i??oCe;async function S(){var O;b=new AbortController;try{const E=await C(t,Object.assign(Object.assign({},f),{headers:v,signal:b.signal}));await _(E),await eCe(E.body,tCe(nCe(D=>{D?v[p9]=D:delete v[p9]},D=>{w=D},s))),o==null||o(),j(),p()}catch(E){if(!b.signal.aborted)try{const D=(O=l==null?void 0:l(E))!==null&&O!==void 0?O:w;window.clearTimeout(A),A=window.setTimeout(S,D)}catch(D){j(),m(D)}}}S()})}function oCe(t){const e=t.headers.get("content-type");if(!(e!=null&&e.startsWith(Ok)))throw new Error(`Expected content-type to be ${Ok}, Actual: ${e}`)}const lCe=({children:t})=>{const{pathPrefix:e}=li(),[n,r]=M.useState([]),[i,s]=M.useState(!1),[o,l]=M.useState(!1),{data:u,isError:h}=zh({path:"/notifications",enabled:o,refetchInterval:1e4});return M.useEffect(()=>{u&&u.data&&r(u.data),s(h)},[u,h]),M.useEffect(()=>{const f=new AbortController;return aCe(`${e}/api/v1/notifications/live`,{signal:f.signal,async onopen(p){if(p.ok)p.status===200?(r([]),s(!1)):p.status===204&&(f.abort(),l(!0));else throw s(!0),new Error(`Unexpected response: ${p.status} ${p.statusText}`)},onmessage(p){const m=JSON.parse(p.data);r(v=>{const b=[...v.filter(x=>x.text!==m.text)];return m.active&&b.push(m),b})},onclose(){throw new Error("Server closed the connection")},onerror(){return s(!0),5e3}}),()=>{f.abort()}},[e]),a.jsx(RW.Provider,{value:{notifications:n,isConnectionError:i},children:t})},cCe=()=>{const{notifications:t,isConnectionError:e}=Jje(),{useLocalTime:n}=li();return t.length===0&&!e?null:a.jsx(IO,{color:"red",size:16,label:e?"!":t.length,children:a.jsxs(Zn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[a.jsx(Zn.Target,{children:a.jsx(Nr,{color:"gray",title:"Notifications","aria-label":"Notifications",size:32,children:a.jsx(Zre,{style:iu})})}),a.jsx(Zn.Dropdown,{children:a.jsxs(En,{gap:"xs",children:[a.jsx(ut,{fw:700,size:"xs",c:"dimmed",ta:"center",children:"Notifications"}),a.jsx(La.Autosize,{mah:200,children:e?a.jsx(Kr,{p:"xs",color:"red",children:a.jsxs(ht,{wrap:"nowrap",children:[a.jsx(nie,{color:"red",style:{width:fe(20),height:fe(20)}}),a.jsxs(En,{gap:"0",children:[a.jsx(ut,{size:"sm",fw:500,children:"Real-time notifications interrupted."}),a.jsx(ut,{size:"xs",c:"dimmed",children:"Please refresh the page or check your connection."})]})]})}):t.length===0?a.jsx(ut,{ta:"center",c:"dimmed",children:"No notifications"}):t.map((r,i)=>a.jsx(Kr,{p:"xs",children:a.jsxs(ht,{wrap:"nowrap",align:"flex-start",children:[a.jsx(Qi,{color:"red",style:{width:fe(20),height:fe(20),marginTop:fe(3)}}),a.jsxs(En,{maw:250,gap:5,children:[a.jsx(ut,{size:"sm",fw:500,children:r.text}),a.jsx(ut,{size:"xs",c:"dimmed",children:lf(new Date(r.date).valueOf()/1e3,n)})]})]})},i))})]})})]})})},uCe=({children:t})=>{var e;const{navigator:n}=M.useContext(da),r=pE(),i=(e=M.useContext(Of))==null?void 0:e.router,s=cl();return t({replace(l){r(l.search||"?",{replace:!0,state:l.state})},push(l){r(l.search||"?",{replace:!1,state:l.state})},get location(){var l,u,h;return(h=(u=(l=i==null?void 0:i.state)==null?void 0:l.location)!=null?u:n==null?void 0:n.location)!=null?h:s}})},NW="serviceDiscovery.collapsedPools",hCe={collapsedPools:Ca(NW,[]),showLimitAlert:!1},PW=Vw({name:"serviceDiscoveryPage",initialState:hCe,reducers:{setCollapsedPools:(t,{payload:e})=>{t.collapsedPools=e},setShowLimitAlert:(t,{payload:e})=>{t.showLimitAlert=e}}}),{setCollapsedPools:d4,setShowLimitAlert:Ek}=PW.actions,dCe=PW.reducer,Wd={width:Os(18),height:Os(18),verticalAlign:"middle"},fCe=(t,e)=>a.jsxs(re,{w:"60%",withTableBorder:!0,withColumnBorders:!0,bg:"light-dark(var(--mantine-color-gray-0), var(--mantine-color-gray-8))",children:[a.jsx(re.Thead,{children:a.jsx(re.Tr,{bg:"light-dark(var(--mantine-color-gray-1), var(--mantine-color-gray-7))",children:a.jsx(re.Th,{colSpan:2,children:a.jsxs(ht,{gap:"xs",children:[a.jsx(PF,{style:Wd})," Rule ",e+1]})})})}),a.jsx(re.Tbody,{children:Object.entries(t).sort(([n],[r])=>{const i=["action","source_labels","regex","modulus","replacement","target_label"],s=i.indexOf(n),o=i.indexOf(r);return s===-1&&o===-1?n.localeCompare(r):s===-1?1:o===-1?-1:s-o}).map(([n,r])=>a.jsxs(re.Tr,{children:[a.jsx(re.Th,{children:a.jsx("code",{children:n})}),a.jsx(re.Td,{children:a.jsx("code",{children:typeof r=="object"?JSON.stringify(r):String(r)})})]},n))})]}),m9=(t,e)=>t===null?a.jsx(ut,{c:"dimmed",children:"dropped"}):a.jsxs(re,{w:"50%",withTableBorder:!0,children:[a.jsx(re.Thead,{children:a.jsx(re.Tr,{bg:"light-dark(var(--mantine-color-gray-1), var(--mantine-color-gray-7))",children:a.jsx(re.Th,{colSpan:3,children:a.jsxs(ht,{gap:"xs",children:[a.jsx(jie,{style:Wd})," Labels"]})})})}),a.jsx(re.Tbody,{children:Object.entries(t).concat(e?Object.entries(e).filter(([n])=>t[n]===void 0):[]).sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>{const i=e!==null&&e[n]===void 0,s=e!==null&&!i&&e[n]!==r,o=e!==null&&!s&&e[n]!==void 0&&t[n]===void 0;return a.jsxs(re.Tr,{bg:i?"light-dark(var(--mantine-color-green-1), var(--mantine-color-green-8))":s?"light-dark(var(--mantine-color-blue-1), var(--mantine-color-blue-8))":o?"light-dark(var(--mantine-color-red-1), var(--mantine-color-red-8))":void 0,children:[a.jsx(re.Td,{w:40,children:i?a.jsx(Tre,{style:Wd}):s?a.jsx(PF,{style:Wd}):o?a.jsx(Cre,{style:Wd}):null}),a.jsx(re.Th,{children:a.jsx("code",{children:n})}),a.jsx(re.Td,{children:a.jsx("code",{children:r})})]},n)})})]}),pCe=({labels:t,pool:e})=>{const{data:n}=yi({path:"/targets/relabel_steps",params:{labels:JSON.stringify(t),scrapePool:e}});return a.jsxs(En,{align:"center",children:[m9(t,null),n.data.steps.map((r,i)=>a.jsxs(Cn.Fragment,{children:[a.jsx(_R,{style:Wd}),fCe(r.rule,i),a.jsx(_R,{style:Wd}),r.keep?m9(r.output,i===0?t:n.data.steps[i-1].output):a.jsx(ut,{c:"dimmed",children:"dropped"})]},i))]})},mCe=new wb({shouldSort:!0,indexedKeys:["labels","discoveredLabels",["discoveredLabels",/.*/],["labels",/.*/]]}),gCe=new wb({shouldSort:!0,indexedKeys:["discoveredLabels",["discoveredLabels",/.*/]]}),vCe=(t,e,n,r)=>{const{activeTargets:i,droppedTargets:s,droppedTargetCounts:o}=e,l={};for(const f of t)l[f]={targets:[],active:0,total:0,serverTotal:o[f]||0};for(const f of i){const p=l[f.scrapePool];if(!p)throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");p.active++,p.total++,p.serverTotal++}const u=r.length!==0&&!r.includes("active")?[]:n===""?i:mCe.filter(n,i).map(f=>f.original);for(const f of u)l[f.scrapePool].targets.push({discoveredLabels:f.discoveredLabels,labels:f.labels,isDropped:!1});for(const f of s){const p=l[f.scrapePool];if(!p)throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");p.total++}const h=r.length!==0&&!r.includes("dropped")?[]:n===""?s:gCe.filter(n,s).map(f=>f.original);for(const f of h)l[f.scrapePool].targets.push({discoveredLabels:f.discoveredLabels,isDropped:!0,labels:{}});return l},bCe=({poolNames:t,selectedPool:e,stateFilter:n,searchFilter:r})=>{const i=cu(),[s,o]=Uv({key:"serviceDiscoveryPage.showEmptyPools",defaultValue:!1}),[l,u]=M.useState(null),{data:{data:h}}=yi({path:"/targets",params:{scrapePool:e===null?"":e}}),{collapsedPools:f,showLimitAlert:p}=rc(w=>w.serviceDiscoveryPage),[m]=Qv(r,250),v=M.useMemo(()=>vCe(e?[e]:t,h,m,n),[e,t,h,m,n]),b=Object.keys(v),x=s?b:b.filter(w=>v[w].targets.length!==0);return a.jsxs(En,{children:[b.length===0?a.jsx(Lt,{title:"No scrape pools found",icon:a.jsx(Kn,{}),children:"No scrape pools found."}):!s&&b.length!==x.length&&a.jsxs(Lt,{title:"Hiding pools with no matching targets",icon:a.jsx(Kn,{}),children:["Hiding ",b.length-x.length," empty pools due to filters or no targets.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>o(!0),children:"Show empty pools"})]}),p&&a.jsxs(Lt,{title:"Found many pools, showing only one",icon:a.jsx(Kn,{}),withCloseButton:!0,onClose:()=>i(Ek(!1)),children:["There are more than ",IW," scrape pools. Showing only the first one. Use the dropdown to select a different pool."]}),a.jsx(Tr,{multiple:!0,variant:"separated",value:b.filter(w=>!f.includes(w)),onChange:w=>i(d4(b.filter(A=>!w.includes(A)))),children:x.map(w=>{const A=v[w];return a.jsxs(Tr.Item,{value:w,children:[a.jsx(Tr.Control,{children:a.jsxs(ht,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(ut,{children:w}),a.jsxs(ht,{gap:"xs",children:[a.jsxs(ut,{c:"gray.6",children:[A.active," / ",A.serverTotal]}),a.jsx(Nw,{size:25,thickness:5,sections:A.serverTotal===0?[]:[{value:A.active/A.serverTotal*100,color:"green.4"},{value:(A.serverTotal-A.active)/A.serverTotal*100,color:"blue.6"}]})]})]})}),a.jsxs(Tr.Panel,{children:[A.total!==A.serverTotal&&a.jsxs(Lt,{title:"Only showing partial dropped targets",icon:a.jsx(Kn,{}),color:"yellow",mb:"sm",children:[A.serverTotal-A.total," further dropped targets are not shown here because the server only kept details on a maximum of ",A.total-A.active," dropped targets (",a.jsx("code",{children:"keep_dropped_targets"})," configuration setting)."]}),A.total===0?a.jsxs(Lt,{title:"No targets",icon:a.jsx(Kn,{}),children:["No targets in this scrape pool.",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>o(!1),children:"Hide empty pools"})]}):A.targets.length===0?a.jsxs(Lt,{title:"No matching targets",icon:a.jsx(Kn,{}),children:["No targets in this pool match your filter criteria (omitted"," ",A.total," filtered targets).",a.jsx(zr,{ml:"md",fz:"1em",onClick:()=>o(!1),children:"Hide empty pools"})]}):a.jsx(Pm,{allItems:A.targets,child:({items:j})=>a.jsxs(re,{children:[a.jsx(re.Thead,{children:a.jsxs(re.Tr,{children:[a.jsx(re.Th,{w:"50%",children:"Discovered labels"}),a.jsx(re.Th,{w:"50%",children:"Target labels"})]})}),a.jsx(re.Tbody,{children:j.map((C,_)=>a.jsxs(re.Tr,{children:[a.jsx(re.Td,{py:"lg",valign:"top",children:a.jsx(Hm,{labels:C.discoveredLabels,wrapper:En})}),a.jsx(re.Td,{py:"lg",valign:C.isDropped?"middle":"top",children:a.jsxs(En,{children:[C.isDropped?a.jsx(ut,{c:"dimmed",fw:"bold",children:"dropped"}):a.jsx(Hm,{labels:C.labels,wrapper:En}),a.jsx(zr,{inherit:!0,onClick:()=>{u({labels:C.discoveredLabels,pool:w})},children:"show relabeling"})]})})]},_))})]})})]})]},w)})}),a.jsx(Ha,{size:"95%",opened:l!==null,onClose:()=>u(null),title:"Relabeling steps for target",children:a.jsx(wf,{title:"Error showing relabeling steps",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(20),(w,A)=>a.jsx(go,{height:30,mb:15,width:"100%"},A))}),children:a.jsx(pCe,{pool:(l==null?void 0:l.pool)||"",labels:(l==null?void 0:l.labels)||{}})})},location.pathname)})]})},IW=20;function yCe(){const{data:{data:{scrapePools:t}}}=yi({path:"/scrape_pools"}),e=cu(),[n,r]=po("pool",Wh),[i,s]=po("state",Yl(q2,[])),[o,l]=po("search",Yl(Wh,"")),{collapsedPools:u,showLimitAlert:h}=rc(p=>p.serviceDiscoveryPage),f=t.length>IW&&n===void 0;return f&&(r(t[0]),e(Ek(!0))),a.jsxs(a.Fragment,{children:[a.jsxs(ht,{mb:"md",mt:"xs",children:[a.jsx(Km,{placeholder:"Select scrape pool",data:[{label:"All pools",value:""},...t],value:f&&t[0]||n||null,onChange:p=>{r(p),h&&e(Ek(!1))},searchable:!0}),a.jsx(z2,{options:["active","dropped"],optionClass:p=>p==="active"?fn.healthOk:fn.healthInfo,placeholder:"Filter by state",values:(i==null?void 0:i.filter(p=>p!==null))||[],onChange:p=>s(p)}),a.jsx(tc,{flex:1,leftSection:a.jsx(Zh,{style:Nf}),placeholder:"Filter by labels",value:o||"",onChange:p=>l(p.currentTarget.value)}),a.jsx(Nr,{size:"input-sm",title:u.length>0?"Expand all pools":"Collapse all pools",variant:"light",onClick:()=>e(d4(u.length>0?[]:t)),children:u.length>0?a.jsx(DF,{style:PA}):a.jsx(MF,{style:PA})})]}),a.jsx(wf,{title:"Error showing target pools",children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(10),(p,m)=>a.jsx(go,{height:40,mb:15,width:1e3,mx:"auto"},m))}),children:a.jsx(bCe,{poolNames:t,selectedPool:f&&t[0]||n||null,stateFilter:i,searchFilter:o})})},location.pathname)]})}function xCe(){const{data:{data:{activeAlertmanagers:t,droppedAlertmanagers:e}}}=yi({path:"/alertmanagers"});return a.jsxs(jb,{children:[a.jsx(jf,{title:"Active Alertmanagers",icon:cE,children:t.length===0?a.jsx(Lt,{title:"No active alertmanagers",icon:a.jsx(Kn,{}),children:"No active alertmanagers found."}):a.jsx(re,{layout:"fixed",children:a.jsx(re.Tbody,{children:t.map(n=>a.jsx(re.Tr,{children:a.jsx(re.Td,{children:a.jsx(Tk,{endpoint:n.url,globalUrl:n.url})})},n.url))})})}),a.jsx(jf,{title:"Dropped Alertmanagers",icon:ure,children:e.length===0?a.jsx(Lt,{title:"No dropped alertmanagers",icon:a.jsx(Kn,{}),children:"No dropped alertmanagers found."}):a.jsx(re,{layout:"fixed",children:a.jsx(re.Tbody,{children:e.map(n=>a.jsx(re.Tr,{children:a.jsx(re.Td,{children:a.jsx(Tk,{endpoint:n.url,globalUrl:n.url})})},n.url))})})})]})}var o3,g9;function ACe(){if(g9)return o3;g9=1;function t(se){return se instanceof Map?se.clear=se.delete=se.set=function(){throw new Error("map is read-only")}:se instanceof Set&&(se.add=se.clear=se.delete=function(){throw new Error("set is read-only")}),Object.freeze(se),Object.getOwnPropertyNames(se).forEach(Te=>{const tt=se[Te],Dt=typeof tt;(Dt==="object"||Dt==="function")&&!Object.isFrozen(tt)&&t(tt)}),se}class e{constructor(Te){Te.data===void 0&&(Te.data={}),this.data=Te.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(se){return se.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(se,...Te){const tt=Object.create(null);for(const Dt in se)tt[Dt]=se[Dt];return Te.forEach(function(Dt){for(const Dn in Dt)tt[Dn]=Dt[Dn]}),tt}const i="</span>",s=se=>!!se.scope,o=(se,{prefix:Te})=>{if(se.startsWith("language:"))return se.replace("language:","language-");if(se.includes(".")){const tt=se.split(".");return[`${Te}${tt.shift()}`,...tt.map((Dt,Dn)=>`${Dt}${"_".repeat(Dn+1)}`)].join(" ")}return`${Te}${se}`};class l{constructor(Te,tt){this.buffer="",this.classPrefix=tt.classPrefix,Te.walk(this)}addText(Te){this.buffer+=n(Te)}openNode(Te){if(!s(Te))return;const tt=o(Te.scope,{prefix:this.classPrefix});this.span(tt)}closeNode(Te){s(Te)&&(this.buffer+=i)}value(){return this.buffer}span(Te){this.buffer+=`<span class="${Te}">`}}const u=(se={})=>{const Te={children:[]};return Object.assign(Te,se),Te};class h{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Te){this.top.children.push(Te)}openNode(Te){const tt=u({scope:Te});this.add(tt),this.stack.push(tt)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Te){return this.constructor._walk(Te,this.rootNode)}static _walk(Te,tt){return typeof tt=="string"?Te.addText(tt):tt.children&&(Te.openNode(tt),tt.children.forEach(Dt=>this._walk(Te,Dt)),Te.closeNode(tt)),Te}static _collapse(Te){typeof Te!="string"&&Te.children&&(Te.children.every(tt=>typeof tt=="string")?Te.children=[Te.children.join("")]:Te.children.forEach(tt=>{h._collapse(tt)}))}}class f extends h{constructor(Te){super(),this.options=Te}addText(Te){Te!==""&&this.add(Te)}startScope(Te){this.openNode(Te)}endScope(){this.closeNode()}__addSublanguage(Te,tt){const Dt=Te.root;tt&&(Dt.scope=`language:${tt}`),this.add(Dt)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(se){return se?typeof se=="string"?se:se.source:null}function m(se){return x("(?=",se,")")}function v(se){return x("(?:",se,")*")}function b(se){return x("(?:",se,")?")}function x(...se){return se.map(tt=>p(tt)).join("")}function w(se){const Te=se[se.length-1];return typeof Te=="object"&&Te.constructor===Object?(se.splice(se.length-1,1),Te):{}}function A(...se){return"("+(w(se).capture?"":"?:")+se.map(Dt=>p(Dt)).join("|")+")"}function j(se){return new RegExp(se.toString()+"|").exec("").length-1}function C(se,Te){const tt=se&&se.exec(Te);return tt&&tt.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(se,{joinWith:Te}){let tt=0;return se.map(Dt=>{tt+=1;const Dn=tt;let an=p(Dt),nt="";for(;an.length>0;){const rt=_.exec(an);if(!rt){nt+=an;break}nt+=an.substring(0,rt.index),an=an.substring(rt.index+rt[0].length),rt[0][0]==="\\"&&rt[1]?nt+="\\"+String(Number(rt[1])+Dn):(nt+=rt[0],rt[0]==="("&&tt++)}return nt}).map(Dt=>`(${Dt})`).join(Te)}const O=/\b\B/,E="[a-zA-Z]\\w*",D="[a-zA-Z_]\\w*",N="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",R="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Q=(se={})=>{const Te=/^#![ ]*\//;return se.binary&&(se.begin=x(Te,/.*\b/,se.binary,/\b.*/)),r({scope:"meta",begin:Te,end:/$/,relevance:0,"on:begin":(tt,Dt)=>{tt.index!==0&&Dt.ignoreMatch()}},se)},z={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},P={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},U=function(se,Te,tt={}){const Dt=r({scope:"comment",begin:se,end:Te,contains:[]},tt);Dt.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Dn=A("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Dt.contains.push({begin:x(/[ ]+/,"(",Dn,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Dt},Z=U("//","$"),G=U("/\\*","\\*/"),W=U("#","$"),X={scope:"number",begin:N,relevance:0},V={scope:"number",begin:I,relevance:0},te={scope:"number",begin:R,relevance:0},le={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},be={scope:"title",begin:E,relevance:0},ye={scope:"title",begin:D,relevance:0},Xe={begin:"\\.\\s*"+D,relevance:0};var Re=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:te,BINARY_NUMBER_RE:R,COMMENT:U,C_BLOCK_COMMENT_MODE:G,C_LINE_COMMENT_MODE:Z,C_NUMBER_MODE:V,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(se){return Object.assign(se,{"on:begin":(Te,tt)=>{tt.data._beginMatch=Te[1]},"on:end":(Te,tt)=>{tt.data._beginMatch!==Te[1]&&tt.ignoreMatch()}})},HASH_COMMENT_MODE:W,IDENT_RE:E,MATCH_NOTHING_RE:O,METHOD_GUARD:Xe,NUMBER_MODE:X,NUMBER_RE:N,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:le,RE_STARTERS_RE:L,SHEBANG:Q,TITLE_MODE:be,UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:ye});function ae(se,Te){se.input[se.index-1]==="."&&Te.ignoreMatch()}function je(se,Te){se.className!==void 0&&(se.scope=se.className,delete se.className)}function pe(se,Te){Te&&se.beginKeywords&&(se.begin="\\b("+se.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",se.__beforeBegin=ae,se.keywords=se.keywords||se.beginKeywords,delete se.beginKeywords,se.relevance===void 0&&(se.relevance=0))}function ke(se,Te){Array.isArray(se.illegal)&&(se.illegal=A(...se.illegal))}function gt(se,Te){if(se.match){if(se.begin||se.end)throw new Error("begin & end are not supported with match");se.begin=se.match,delete se.match}}function We(se,Te){se.relevance===void 0&&(se.relevance=1)}const Le=(se,Te)=>{if(!se.beforeMatch)return;if(se.starts)throw new Error("beforeMatch cannot be used with starts");const tt=Object.assign({},se);Object.keys(se).forEach(Dt=>{delete se[Dt]}),se.keywords=tt.keywords,se.begin=x(tt.beforeMatch,m(tt.begin)),se.starts={relevance:0,contains:[Object.assign(tt,{endsParent:!0})]},se.relevance=0,delete tt.beforeMatch},Fe=["of","and","for","in","not","or","if","then","parent","list","value"],Ne="keyword";function Ve(se,Te,tt=Ne){const Dt=Object.create(null);return typeof se=="string"?Dn(tt,se.split(" ")):Array.isArray(se)?Dn(tt,se):Object.keys(se).forEach(function(an){Object.assign(Dt,Ve(se[an],Te,an))}),Dt;function Dn(an,nt){Te&&(nt=nt.map(rt=>rt.toLowerCase())),nt.forEach(function(rt){const Ke=rt.split("|");Dt[Ke[0]]=[an,qt(Ke[0],Ke[1])]})}}function qt(se,Te){return Te?Number(Te):et(se)?0:1}function et(se){return Fe.includes(se.toLowerCase())}const Je={},Ue=se=>{console.error(se)},Pe=(se,...Te)=>{console.log(`WARN: ${se}`,...Te)},st=(se,Te)=>{Je[`${se}/${Te}`]||(console.log(`Deprecated as of ${se}. ${Te}`),Je[`${se}/${Te}`]=!0)},he=new Error;function dt(se,Te,{key:tt}){let Dt=0;const Dn=se[tt],an={},nt={};for(let rt=1;rt<=Te.length;rt++)nt[rt+Dt]=Dn[rt],an[rt+Dt]=!0,Dt+=j(Te[rt-1]);se[tt]=nt,se[tt]._emit=an,se[tt]._multi=!0}function sn(se){if(Array.isArray(se.begin)){if(se.skip||se.excludeBegin||se.returnBegin)throw Ue("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),he;if(typeof se.beginScope!="object"||se.beginScope===null)throw Ue("beginScope must be object"),he;dt(se,se.begin,{key:"beginScope"}),se.begin=S(se.begin,{joinWith:""})}}function Kt(se){if(Array.isArray(se.end)){if(se.skip||se.excludeEnd||se.returnEnd)throw Ue("skip, excludeEnd, returnEnd not compatible with endScope: {}"),he;if(typeof se.endScope!="object"||se.endScope===null)throw Ue("endScope must be object"),he;dt(se,se.end,{key:"endScope"}),se.end=S(se.end,{joinWith:""})}}function un(se){se.scope&&typeof se.scope=="object"&&se.scope!==null&&(se.beginScope=se.scope,delete se.scope)}function Zt(se){un(se),typeof se.beginScope=="string"&&(se.beginScope={_wrap:se.beginScope}),typeof se.endScope=="string"&&(se.endScope={_wrap:se.endScope}),sn(se),Kt(se)}function Pt(se){function Te(nt,rt){return new RegExp(p(nt),"m"+(se.case_insensitive?"i":"")+(se.unicodeRegex?"u":"")+(rt?"g":""))}class tt{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(rt,Ke){Ke.position=this.position++,this.matchIndexes[this.matchAt]=Ke,this.regexes.push([Ke,rt]),this.matchAt+=j(rt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const rt=this.regexes.map(Ke=>Ke[1]);this.matcherRe=Te(S(rt,{joinWith:"|"}),!0),this.lastIndex=0}exec(rt){this.matcherRe.lastIndex=this.lastIndex;const Ke=this.matcherRe.exec(rt);if(!Ke)return null;const Wt=Ke.findIndex((Ai,hs)=>hs>0&&Ai!==void 0),Jt=this.matchIndexes[Wt];return Ke.splice(0,Wt),Object.assign(Ke,Jt)}}class Dt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(rt){if(this.multiRegexes[rt])return this.multiRegexes[rt];const Ke=new tt;return this.rules.slice(rt).forEach(([Wt,Jt])=>Ke.addRule(Wt,Jt)),Ke.compile(),this.multiRegexes[rt]=Ke,Ke}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(rt,Ke){this.rules.push([rt,Ke]),Ke.type==="begin"&&this.count++}exec(rt){const Ke=this.getMatcher(this.regexIndex);Ke.lastIndex=this.lastIndex;let Wt=Ke.exec(rt);if(this.resumingScanAtSamePosition()&&!(Wt&&Wt.index===this.lastIndex)){const Jt=this.getMatcher(0);Jt.lastIndex=this.lastIndex+1,Wt=Jt.exec(rt)}return Wt&&(this.regexIndex+=Wt.position+1,this.regexIndex===this.count&&this.considerAll()),Wt}}function Dn(nt){const rt=new Dt;return nt.contains.forEach(Ke=>rt.addRule(Ke.begin,{rule:Ke,type:"begin"})),nt.terminatorEnd&&rt.addRule(nt.terminatorEnd,{type:"end"}),nt.illegal&&rt.addRule(nt.illegal,{type:"illegal"}),rt}function an(nt,rt){const Ke=nt;if(nt.isCompiled)return Ke;[je,gt,Zt,Le].forEach(Jt=>Jt(nt,rt)),se.compilerExtensions.forEach(Jt=>Jt(nt,rt)),nt.__beforeBegin=null,[pe,ke,We].forEach(Jt=>Jt(nt,rt)),nt.isCompiled=!0;let Wt=null;return typeof nt.keywords=="object"&&nt.keywords.$pattern&&(nt.keywords=Object.assign({},nt.keywords),Wt=nt.keywords.$pattern,delete nt.keywords.$pattern),Wt=Wt||/\w+/,nt.keywords&&(nt.keywords=Ve(nt.keywords,se.case_insensitive)),Ke.keywordPatternRe=Te(Wt,!0),rt&&(nt.begin||(nt.begin=/\B|\b/),Ke.beginRe=Te(Ke.begin),!nt.end&&!nt.endsWithParent&&(nt.end=/\B|\b/),nt.end&&(Ke.endRe=Te(Ke.end)),Ke.terminatorEnd=p(Ke.end)||"",nt.endsWithParent&&rt.terminatorEnd&&(Ke.terminatorEnd+=(nt.end?"|":"")+rt.terminatorEnd)),nt.illegal&&(Ke.illegalRe=Te(nt.illegal)),nt.contains||(nt.contains=[]),nt.contains=[].concat(...nt.contains.map(function(Jt){return Et(Jt==="self"?nt:Jt)})),nt.contains.forEach(function(Jt){an(Jt,Ke)}),nt.starts&&an(nt.starts,rt),Ke.matcher=Dn(Ke),Ke}if(se.compilerExtensions||(se.compilerExtensions=[]),se.contains&&se.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return se.classNameAliases=r(se.classNameAliases||{}),an(se)}function Mt(se){return se?se.endsWithParent||Mt(se.starts):!1}function Et(se){return se.variants&&!se.cachedVariants&&(se.cachedVariants=se.variants.map(function(Te){return r(se,{variants:null},Te)})),se.cachedVariants?se.cachedVariants:Mt(se)?r(se,{starts:se.starts?r(se.starts):null}):Object.isFrozen(se)?r(se):se}var Ut="11.11.1";class ei extends Error{constructor(Te,tt){super(Te),this.name="HTMLInjectionError",this.html=tt}}const yt=n,Tt=r,qn=Symbol("nomatch"),Ht=7,dr=function(se){const Te=Object.create(null),tt=Object.create(null),Dt=[];let Dn=!0;const an="Could not find the language '{}', did you forget to load/include a language module?",nt={disableAutodetect:!0,name:"Plain text",contains:[]};let rt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function Ke(Qe){return rt.noHighlightRe.test(Qe)}function Wt(Qe){let Ct=Qe.className+" ";Ct+=Qe.parentNode?Qe.parentNode.className:"";const en=rt.languageDetectRe.exec(Ct);if(en){const Sn=An(en[1]);return Sn||(Pe(an.replace("{}",en[1])),Pe("Falling back to no-highlight mode for this block.",Qe)),Sn?en[1]:"no-highlight"}return Ct.split(/\s+/).find(Sn=>Ke(Sn)||An(Sn))}function Jt(Qe,Ct,en){let Sn="",br="";typeof Ct=="object"?(Sn=Qe,en=Ct.ignoreIllegals,br=Ct.language):(st("10.7.0","highlight(lang, code, ...args) has been deprecated."),st("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),br=Qe,Sn=Ct),en===void 0&&(en=!0);const ui={code:Sn,language:br};qa("before:highlight",ui);const Yi=ui.result?ui.result:Ai(ui.language,ui.code,en);return Yi.code=ui.code,qa("after:highlight",Yi),Yi}function Ai(Qe,Ct,en,Sn){const br=Object.create(null);function ui(Ge,wt){return Ge.keywords[wt]}function Yi(){if(!Rt.keywords){$r.addText(Rn);return}let Ge=0;Rt.keywordPatternRe.lastIndex=0;let wt=Rt.keywordPatternRe.exec(Rn),Bt="";for(;wt;){Bt+=Rn.substring(Ge,wt.index);const on=ti.case_insensitive?wt[0].toLowerCase():wt[0],fr=ui(Rt,on);if(fr){const[gs,fc]=fr;if($r.addText(Bt),Bt="",br[on]=(br[on]||0)+1,br[on]<=Ht&&(fl+=fc),gs.startsWith("_"))Bt+=wt[0];else{const bu=ti.classNameAliases[gs]||gs;ps(wt[0],bu)}}else Bt+=wt[0];Ge=Rt.keywordPatternRe.lastIndex,wt=Rt.keywordPatternRe.exec(Rn)}Bt+=Rn.substring(Ge),$r.addText(Bt)}function $n(){if(Rn==="")return;let Ge=null;if(typeof Rt.subLanguage=="string"){if(!Te[Rt.subLanguage]){$r.addText(Rn);return}Ge=Ai(Rt.subLanguage,Rn,!0,vu[Rt.subLanguage]),vu[Rt.subLanguage]=Ge._top}else Ge=oc(Rn,Rt.subLanguage.length?Rt.subLanguage:null);Rt.relevance>0&&(fl+=Ge.relevance),$r.__addSublanguage(Ge._emitter,Ge.language)}function Qn(){Rt.subLanguage!=null?$n():Yi(),Rn=""}function ps(Ge,wt){Ge!==""&&($r.startScope(wt),$r.addText(Ge),$r.endScope())}function pu(Ge,wt){let Bt=1;const on=wt.length-1;for(;Bt<=on;){if(!Ge._emit[Bt]){Bt++;continue}const fr=ti.classNameAliases[Ge[Bt]]||Ge[Bt],gs=wt[Bt];fr?ps(gs,fr):(Rn=gs,Yi(),Rn=""),Bt++}}function cc(Ge,wt){return Ge.scope&&typeof Ge.scope=="string"&&$r.openNode(ti.classNameAliases[Ge.scope]||Ge.scope),Ge.beginScope&&(Ge.beginScope._wrap?(ps(Rn,ti.classNameAliases[Ge.beginScope._wrap]||Ge.beginScope._wrap),Rn=""):Ge.beginScope._multi&&(pu(Ge.beginScope,wt),Rn="")),Rt=Object.create(Ge,{parent:{value:Rt}}),Rt}function id(Ge,wt,Bt){let on=C(Ge.endRe,Bt);if(on){if(Ge["on:end"]){const fr=new e(Ge);Ge["on:end"](wt,fr),fr.isMatchIgnored&&(on=!1)}if(on){for(;Ge.endsParent&&Ge.parent;)Ge=Ge.parent;return Ge}}if(Ge.endsWithParent)return id(Ge.parent,wt,Bt)}function mu(Ge){return Rt.matcher.regexIndex===0?(Rn+=Ge[0],1):($a=!0,0)}function c0(Ge){const wt=Ge[0],Bt=Ge.rule,on=new e(Bt),fr=[Bt.__beforeBegin,Bt["on:begin"]];for(const gs of fr)if(gs&&(gs(Ge,on),on.isMatchIgnored))return mu(wt);return Bt.skip?Rn+=wt:(Bt.excludeBegin&&(Rn+=wt),Qn(),!Bt.returnBegin&&!Bt.excludeBegin&&(Rn=wt)),cc(Bt,Ge),Bt.returnBegin?0:wt.length}function Gi(Ge){const wt=Ge[0],Bt=Ct.substring(Ge.index),on=id(Rt,Ge,Bt);if(!on)return qn;const fr=Rt;Rt.endScope&&Rt.endScope._wrap?(Qn(),ps(wt,Rt.endScope._wrap)):Rt.endScope&&Rt.endScope._multi?(Qn(),pu(Rt.endScope,Ge)):fr.skip?Rn+=wt:(fr.returnEnd||fr.excludeEnd||(Rn+=wt),Qn(),fr.excludeEnd&&(Rn=wt));do Rt.scope&&$r.closeNode(),!Rt.skip&&!Rt.subLanguage&&(fl+=Rt.relevance),Rt=Rt.parent;while(Rt!==on.parent);return on.starts&&cc(on.starts,Ge),fr.returnEnd?0:wt.length}function gu(){const Ge=[];for(let wt=Rt;wt!==ti;wt=wt.parent)wt.scope&&Ge.unshift(wt.scope);Ge.forEach(wt=>$r.openNode(wt))}let uc={};function hc(Ge,wt){const Bt=wt&&wt[0];if(Rn+=Ge,Bt==null)return Qn(),0;if(uc.type==="begin"&&wt.type==="end"&&uc.index===wt.index&&Bt===""){if(Rn+=Ct.slice(wt.index,wt.index+1),!Dn){const on=new Error(`0 width match regex (${Qe})`);throw on.languageName=Qe,on.badRule=uc.rule,on}return 1}if(uc=wt,wt.type==="begin")return c0(wt);if(wt.type==="illegal"&&!en){const on=new Error('Illegal lexeme "'+Bt+'" for mode "'+(Rt.scope||"<unnamed>")+'"');throw on.mode=Rt,on}else if(wt.type==="end"){const on=Gi(wt);if(on!==qn)return on}if(wt.type==="illegal"&&Bt==="")return Rn+=`
`,1;if(pl>1e5&&pl>wt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Rn+=Bt,Bt.length}const ti=An(Qe);if(!ti)throw Ue(an.replace("{}",Qe)),new Error('Unknown language: "'+Qe+'"');const dc=Pt(ti);let Co="",Rt=Sn||dc;const vu={},$r=new rt.__emitter(rt);gu();let Rn="",fl=0,ms=0,pl=0,$a=!1;try{if(ti.__emitTokens)ti.__emitTokens(Ct,$r);else{for(Rt.matcher.considerAll();;){pl++,$a?$a=!1:Rt.matcher.considerAll(),Rt.matcher.lastIndex=ms;const Ge=Rt.matcher.exec(Ct);if(!Ge)break;const wt=Ct.substring(ms,Ge.index),Bt=hc(wt,Ge);ms=Ge.index+Bt}hc(Ct.substring(ms))}return $r.finalize(),Co=$r.toHTML(),{language:Qe,value:Co,relevance:fl,illegal:!1,_emitter:$r,_top:Rt}}catch(Ge){if(Ge.message&&Ge.message.includes("Illegal"))return{language:Qe,value:yt(Ct),illegal:!0,relevance:0,_illegalBy:{message:Ge.message,index:ms,context:Ct.slice(ms-100,ms+100),mode:Ge.mode,resultSoFar:Co},_emitter:$r};if(Dn)return{language:Qe,value:yt(Ct),illegal:!1,relevance:0,errorRaised:Ge,_emitter:$r,_top:Rt};throw Ge}}function hs(Qe){const Ct={value:yt(Qe),illegal:!1,relevance:0,_top:nt,_emitter:new rt.__emitter(rt)};return Ct._emitter.addText(Qe),Ct}function oc(Qe,Ct){Ct=Ct||rt.languages||Object.keys(Te);const en=hs(Qe),Sn=Ct.filter(An).filter(ci).map(Qn=>Ai(Qn,Qe,!1));Sn.unshift(en);const br=Sn.sort((Qn,ps)=>{if(Qn.relevance!==ps.relevance)return ps.relevance-Qn.relevance;if(Qn.language&&ps.language){if(An(Qn.language).supersetOf===ps.language)return 1;if(An(ps.language).supersetOf===Qn.language)return-1}return 0}),[ui,Yi]=br,$n=ui;return $n.secondBest=Yi,$n}function fa(Qe,Ct,en){const Sn=Ct&&tt[Ct]||en;Qe.classList.add("hljs"),Qe.classList.add(`language-${Sn}`)}function Br(Qe){let Ct=null;const en=Wt(Qe);if(Ke(en))return;if(qa("before:highlightElement",{el:Qe,language:en}),Qe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Qe);return}if(Qe.children.length>0&&(rt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Qe)),rt.throwUnescapedHTML))throw new ei("One of your code blocks includes unescaped HTML.",Qe.innerHTML);Ct=Qe;const Sn=Ct.textContent,br=en?Jt(Sn,{language:en,ignoreIllegals:!0}):oc(Sn);Qe.innerHTML=br.value,Qe.dataset.highlighted="yes",fa(Qe,en,br.language),Qe.result={language:br.language,re:br.relevance,relevance:br.relevance},br.secondBest&&(Qe.secondBest={language:br.secondBest.language,relevance:br.secondBest.relevance}),qa("after:highlightElement",{el:Qe,result:br,text:Sn})}function Mi(Qe){rt=Tt(rt,Qe)}const ds=()=>{lc(),st("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function rd(){lc(),st("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let dl=!1;function lc(){function Qe(){lc()}if(document.readyState==="loading"){dl||window.addEventListener("DOMContentLoaded",Qe,!1),dl=!0;return}document.querySelectorAll(rt.cssSelector).forEach(Br)}function pa(Qe,Ct){let en=null;try{en=Ct(se)}catch(Sn){if(Ue("Language definition for '{}' could not be registered.".replace("{}",Qe)),Dn)Ue(Sn);else throw Sn;en=nt}en.name||(en.name=Qe),Te[Qe]=en,en.rawDefinition=Ct.bind(null,se),en.aliases&&Qs(en.aliases,{languageName:Qe})}function vr(Qe){delete Te[Qe];for(const Ct of Object.keys(tt))tt[Ct]===Qe&&delete tt[Ct]}function Or(){return Object.keys(Te)}function An(Qe){return Qe=(Qe||"").toLowerCase(),Te[Qe]||Te[tt[Qe]]}function Qs(Qe,{languageName:Ct}){typeof Qe=="string"&&(Qe=[Qe]),Qe.forEach(en=>{tt[en.toLowerCase()]=Ct})}function ci(Qe){const Ct=An(Qe);return Ct&&!Ct.disableAutodetect}function Us(Qe){Qe["before:highlightBlock"]&&!Qe["before:highlightElement"]&&(Qe["before:highlightElement"]=Ct=>{Qe["before:highlightBlock"](Object.assign({block:Ct.el},Ct))}),Qe["after:highlightBlock"]&&!Qe["after:highlightElement"]&&(Qe["after:highlightElement"]=Ct=>{Qe["after:highlightBlock"](Object.assign({block:Ct.el},Ct))})}function Lr(Qe){Us(Qe),Dt.push(Qe)}function fu(Qe){const Ct=Dt.indexOf(Qe);Ct!==-1&&Dt.splice(Ct,1)}function qa(Qe,Ct){const en=Qe;Dt.forEach(function(Sn){Sn[en]&&Sn[en](Ct)})}function fs(Qe){return st("10.7.0","highlightBlock will be removed entirely in v12.0"),st("10.7.0","Please use highlightElement now."),Br(Qe)}Object.assign(se,{highlight:Jt,highlightAuto:oc,highlightAll:lc,highlightElement:Br,highlightBlock:fs,configure:Mi,initHighlighting:ds,initHighlightingOnLoad:rd,registerLanguage:pa,unregisterLanguage:vr,listLanguages:Or,getLanguage:An,registerAliases:Qs,autoDetection:ci,inherit:Tt,addPlugin:Lr,removePlugin:fu}),se.debugMode=function(){Dn=!1},se.safeMode=function(){Dn=!0},se.versionString=Ut,se.regex={concat:x,lookahead:m,either:A,optional:b,anyNumberOfTimes:v};for(const Qe in Re)typeof Re[Qe]=="object"&&t(Re[Qe]);return Object.assign(se,Re),se},Mn=dr({});return Mn.newInstance=()=>dr({}),o3=Mn,Mn.HighlightJS=Mn,Mn.default=Mn,o3}var wCe=ACe();const BW=ll(wCe);function SCe(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},l=t.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},b={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},m,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},b,x,s,o],A=[...w];return A.pop(),A.push(l),v.contains=A,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}BW.registerLanguage("yaml",SCe);const jCe=Qje(BW),CCe=new Wae,_Ce=[{title:"Query",path:"/query",icon:a.jsx(Zh,{style:Ls}),element:a.jsx(fW,{}),inAgentMode:!1},{title:"Alerts",path:"/alerts",icon:a.jsx(Lie,{style:Ls}),element:a.jsx(jW,{}),inAgentMode:!1}],LW=[{title:"Target health",path:"/targets",icon:a.jsx(EF,{style:Ls}),element:a.jsx(Oje,{}),inAgentMode:!0},{title:"Rule health",path:"/rules",icon:a.jsx(IF,{style:Ls}),element:a.jsx(bje,{}),inAgentMode:!1},{title:"Service discovery",path:"/service-discovery",icon:a.jsx(Rre,{style:Ls}),element:a.jsx(yCe,{}),inAgentMode:!0}],FW=[{title:"Runtime & build information",path:"/status",icon:a.jsx(Kn,{style:Ls}),element:a.jsx(Eje,{}),inAgentMode:!0},{title:"TSDB status",path:"/tsdb-status",icon:a.jsx(Bre,{style:Ls}),element:a.jsx(Mje,{}),inAgentMode:!1},{title:"Command-line flags",path:"/flags",icon:a.jsx($re,{style:Ls}),element:a.jsx(Pje,{}),inAgentMode:!0},{title:"Configuration",path:"/config",icon:a.jsx(mie,{style:Ls}),element:a.jsx(Uje,{}),inAgentMode:!0},{title:"Alertmanager discovery",path:"/alertmanager-discovery",icon:a.jsx(cE,{style:Ls}),element:a.jsx(xCe,{}),inAgentMode:!1}],v9=[...LW,...FW],TCe={colors:{"codebox-bg":["#f5f5f5","#e7e7e7","#cdcdcd","#b2b2b2","#9a9a9a","#8b8b8b","#848484","#717171","#656565","#575757"]}},F1="md";function kCe(){const[t,{toggle:e}]=Wv(),{agentMode:n,consolesLink:r,pathPrefix:i}=li(),s=a.jsxs(a.Fragment,{children:[r&&a.jsx(_s,{component:"a",href:r,className:Fy.link,leftSection:a.jsx(Fre,{style:Ls}),px:F1,children:"Consoles"}),_Ce.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(_s,{component:Ag,to:l.path,className:Fy.link,leftSection:l.icon,px:F1,children:l.title},l.path)),a.jsxs(Xn,{shadow:"md",width:240,children:[a.jsxs(RR,{children:[v9.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(Ku,{path:l.path,element:a.jsx(Xn.Target,{children:a.jsxs(_s,{component:Ag,to:l.path,className:Fy.link,leftSection:l.icon,rightSection:a.jsx(rv,{style:Ls}),px:F1,onClick:u=>u.preventDefault(),children:["Status ",a.jsx(kF,{style:Ls})," ",l.title]})})},l.path)),a.jsx(Ku,{path:"*",element:a.jsx(Xn.Target,{children:a.jsx(_s,{className:Fy.link,leftSection:a.jsx(vie,{style:Ls}),rightSection:a.jsx(rv,{style:Ls}),px:F1,children:"Status"})})})]}),a.jsxs(Xn.Dropdown,{children:[a.jsx(Xn.Label,{children:"Monitoring status"}),LW.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(Xn.Item,{component:Ag,to:l.path,leftSection:l.icon,children:l.title},l.path)),a.jsx(Xn.Divider,{}),a.jsx(Xn.Label,{children:"Server status"}),FW.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(Xn.Item,{component:Ag,to:l.path,leftSection:l.icon,children:l.title},l.path))]})]})]}),o=a.jsxs(a.Fragment,{children:[a.jsx(Vje,{}),a.jsx(cCe,{}),a.jsx(Yje,{}),a.jsx(Nr,{component:"a",href:"https://prometheus.io/docs/prometheus/latest/getting_started/",target:"_blank",color:"gray",title:"Documentation","aria-label":"Documentation",size:fe(32),children:a.jsx(mre,{style:iu})})]});return a.jsx(pae,{basename:i,children:a.jsx(_Se,{adapter:uCe,children:a.jsx(rL,{defaultColorScheme:"auto",theme:TCe,children:a.jsxs(Lje,{adapter:jCe,children:[a.jsx(du,{position:"top-right"}),a.jsx(Yae,{client:CCe,children:a.jsxs(lo,{header:{height:56},navbar:{width:300,breakpoint:"sm",collapsed:{desktop:!0,mobile:!t}},padding:"md",children:[a.jsxs(lCe,{children:[a.jsx(lo.Header,{bg:"rgb(65, 73, 81)",c:"#fff",children:a.jsxs(ht,{h:"100%",px:"md",wrap:"nowrap",children:[a.jsxs(ht,{style:{flex:1},justify:"space-between",wrap:"nowrap",children:[a.jsxs(ht,{gap:40,wrap:"nowrap",children:[a.jsx(yE,{to:"/",style:{textDecoration:"none",color:"white"},children:a.jsxs(ht,{gap:10,wrap:"nowrap",children:[a.jsx("img",{src:yY,height:30}),a.jsx(ut,{hiddenFrom:"sm",fz:20,children:"Prometheus"}),a.jsx(ut,{visibleFrom:"md",fz:20,children:"Prometheus"}),a.jsx(ut,{fz:20,children:n&&"Agent"})]})}),a.jsx(ht,{gap:12,visibleFrom:"sm",wrap:"nowrap",children:s})]}),a.jsx(ht,{visibleFrom:"xs",wrap:"nowrap",gap:"xs",children:o})]}),a.jsx(EO,{opened:t,onClick:e,hiddenFrom:"sm",size:"sm",color:"gray.2"})]})}),a.jsxs(lo.Navbar,{py:"md",px:4,bg:"rgb(65, 73, 81)",c:"#fff",children:[s,a.jsx(ht,{mt:"md",hiddenFrom:"xs",justify:"center",children:o})]})]}),a.jsx(lo.Main,{children:a.jsx(wf,{children:a.jsx(M.Suspense,{fallback:a.jsx(ve,{mt:"lg",children:Array.from(Array(10),(l,u)=>a.jsx(go,{height:40,mb:15,width:1e3,mx:"auto"},u))}),children:a.jsxs(RR,{children:[a.jsx(Ku,{path:"/",element:a.jsx($se,{to:n?"/agent":"/query",replace:!0})}),n?a.jsx(Ku,{path:"/agent",element:a.jsx(L1,{children:a.jsx(Wje,{})})}):a.jsxs(a.Fragment,{children:[a.jsx(Ku,{path:"/query",element:a.jsx(L1,{children:a.jsx(fW,{})})}),a.jsx(Ku,{path:"/alerts",element:a.jsx(L1,{children:a.jsx(jW,{})})})]}),v9.map(l=>a.jsx(Ku,{path:l.path,element:a.jsx(L1,{children:l.element})},l.path))]})})},location.pathname)})]})})]})})})})}const U2=(t,e)=>{localStorage.setItem(t,JSON.stringify(e))},HW=_le(),W2=HW.startListening.withTypes();W2({actionCreator:h4,effect:({payload:t})=>{U2(CW,t)}});W2({actionCreator:d4,effect:({payload:t})=>{U2(NW,t)}});W2({actionCreator:UH,effect:(t,{getState:e})=>{U2($H,e().queryPage.queryHistory)}});W2({actionCreator:no,effect:({payload:t})=>{Object.entries(t).forEach(([e,n])=>{switch(e){case"useLocalTime":case"enableQueryHistory":case"enableAutocomplete":case"enableSyntaxHighlighting":case"enableLinter":case"showAnnotations":case"showQueryWarnings":case"showQueryInfoNotices":case"alertGroupsPerPage":case"ruleGroupsPerPage":return U2(`settings.${e}`,n)}})}});const OCe=nle({reducer:{settings:lue,queryPage:Wle,targetsPage:xje,serviceDiscoveryPage:dCe},middleware:t=>t().prepend(HW.middleware)});vY.createRoot(document.getElementById("root")).render(a.jsx(Cn.StrictMode,{children:a.jsx(Aoe,{store:OCe,children:a.jsx(kCe,{})})}));
