@revisium/admin 0.10.0 → 0.11.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1463 +0,0 @@
1
- var aU=Object.defineProperty;var sU=(e,t,r)=>t in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lU=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var le=(e,t,r)=>sU(e,typeof t!="symbol"?t+"":t,r);var QIe=lU((rke,hC)=>{function eb(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sM={exports:{}},tb={},lM={exports:{}},yt={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Fm=Symbol.for("react.element"),uU=Symbol.for("react.portal"),cU=Symbol.for("react.fragment"),dU=Symbol.for("react.strict_mode"),fU=Symbol.for("react.profiler"),hU=Symbol.for("react.provider"),pU=Symbol.for("react.context"),mU=Symbol.for("react.forward_ref"),vU=Symbol.for("react.suspense"),gU=Symbol.for("react.memo"),yU=Symbol.for("react.lazy"),QR=Symbol.iterator;function bU(e){return e===null||typeof e!="object"?null:(e=QR&&e[QR]||e["@@iterator"],typeof e=="function"?e:null)}var uM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cM=Object.assign,dM={};function Sf(e,t,r){this.props=e,this.context=t,this.refs=dM,this.updater=r||uM}Sf.prototype.isReactComponent={};Sf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Sf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fM(){}fM.prototype=Sf.prototype;function pC(e,t,r){this.props=e,this.context=t,this.refs=dM,this.updater=r||uM}var mC=pC.prototype=new fM;mC.constructor=pC;cM(mC,Sf.prototype);mC.isPureReactComponent=!0;var YR=Array.isArray,hM=Object.prototype.hasOwnProperty,vC={current:null},pM={key:!0,ref:!0,__self:!0,__source:!0};function mM(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)hM.call(t,n)&&!pM.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Fm,type:e,key:o,ref:a,props:i,_owner:vC.current}}function wU(e,t){return{$$typeof:Fm,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gC(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm}function SU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var XR=/\/+/g;function Zw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SU(""+e.key):t.toString(36)}function $g(e,t,r,n,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Fm:case uU:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+Zw(a,0):n,YR(i)?(r="",e!=null&&(r=e.replace(XR,"$&/")+"/"),$g(i,t,r,"",function(u){return u})):i!=null&&(gC(i)&&(i=wU(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(XR,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",YR(e))for(var s=0;s<e.length;s++){o=e[s];var l=n+Zw(o,s);a+=$g(o,t,r,l,i)}else if(l=bU(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=n+Zw(o,s++),a+=$g(o,t,r,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Nv(e,t,r){if(e==null)return e;var n=[],i=0;return $g(e,n,"","",function(o){return t.call(r,o,i++)}),n}function _U(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ti={current:null},Ag={transition:null},xU={ReactCurrentDispatcher:ti,ReactCurrentBatchConfig:Ag,ReactCurrentOwner:vC};function vM(){throw Error("act(...) is not supported in production builds of React.")}yt.Children={map:Nv,forEach:function(e,t,r){Nv(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Nv(e,function(){t++}),t},toArray:function(e){return Nv(e,function(t){return t})||[]},only:function(e){if(!gC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};yt.Component=Sf;yt.Fragment=cU;yt.Profiler=fU;yt.PureComponent=pC;yt.StrictMode=dU;yt.Suspense=vU;yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xU;yt.act=vM;yt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=cM({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=vC.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)hM.call(t,l)&&!pM.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Fm,type:e.type,key:i,ref:o,props:n,_owner:a}};yt.createContext=function(e){return e={$$typeof:pU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hU,_context:e},e.Consumer=e};yt.createElement=mM;yt.createFactory=function(e){var t=mM.bind(null,e);return t.type=e,t};yt.createRef=function(){return{current:null}};yt.forwardRef=function(e){return{$$typeof:mU,render:e}};yt.isValidElement=gC;yt.lazy=function(e){return{$$typeof:yU,_payload:{_status:-1,_result:e},_init:_U}};yt.memo=function(e,t){return{$$typeof:gU,type:e,compare:t===void 0?null:t}};yt.startTransition=function(e){var t=Ag.transition;Ag.transition={};try{e()}finally{Ag.transition=t}};yt.unstable_act=vM;yt.useCallback=function(e,t){return ti.current.useCallback(e,t)};yt.useContext=function(e){return ti.current.useContext(e)};yt.useDebugValue=function(){};yt.useDeferredValue=function(e){return ti.current.useDeferredValue(e)};yt.useEffect=function(e,t){return ti.current.useEffect(e,t)};yt.useId=function(){return ti.current.useId()};yt.useImperativeHandle=function(e,t,r){return ti.current.useImperativeHandle(e,t,r)};yt.useInsertionEffect=function(e,t){return ti.current.useInsertionEffect(e,t)};yt.useLayoutEffect=function(e,t){return ti.current.useLayoutEffect(e,t)};yt.useMemo=function(e,t){return ti.current.useMemo(e,t)};yt.useReducer=function(e,t,r){return ti.current.useReducer(e,t,r)};yt.useRef=function(e){return ti.current.useRef(e)};yt.useState=function(e){return ti.current.useState(e)};yt.useSyncExternalStore=function(e,t,r){return ti.current.useSyncExternalStore(e,t,r)};yt.useTransition=function(){return ti.current.useTransition()};yt.version="18.3.1";lM.exports=yt;var S=lM.exports;const ue=nc(S),m_=eb({__proto__:null,default:ue},[S]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var PU=S,CU=Symbol.for("react.element"),EU=Symbol.for("react.fragment"),TU=Object.prototype.hasOwnProperty,OU=PU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,RU={key:!0,ref:!0,__self:!0,__source:!0};function gM(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)TU.call(t,n)&&!RU.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:CU,type:e,key:o,ref:a,props:i,_owner:OU.current}}tb.Fragment=EU;tb.jsx=gM;tb.jsxs=gM;sM.exports=tb;var y=sM.exports,yM={exports:{}},Ui={},bM={exports:{}},wM={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(W,te){var G=W.length;W.push(te);e:for(;0<G;){var A=G-1>>>1,U=W[A];if(0<i(U,te))W[A]=te,W[G]=U,G=A;else break e}}function r(W){return W.length===0?null:W[0]}function n(W){if(W.length===0)return null;var te=W[0],G=W.pop();if(G!==te){W[0]=G;e:for(var A=0,U=W.length,N=U>>>1;A<N;){var E=2*(A+1)-1,k=W[E],D=E+1,ee=W[D];if(0>i(k,G))D<U&&0>i(ee,k)?(W[A]=ee,W[D]=G,A=D):(W[A]=k,W[E]=G,A=E);else if(D<U&&0>i(ee,G))W[A]=ee,W[D]=G,A=D;else break e}}return te}function i(W,te){var G=W.sortIndex-te.sortIndex;return G!==0?G:W.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,m=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var te=r(u);te!==null;){if(te.callback===null)n(u);else if(te.startTime<=W)n(u),te.sortIndex=te.expirationTime,t(l,te);else break;te=r(u)}}function _(W){if(v=!1,b(W),!m)if(r(l)!==null)m=!0,X(P);else{var te=r(u);te!==null&&Q(_,te.startTime-W)}}function P(W,te){m=!1,v&&(v=!1,p(T),T=-1),h=!0;var G=f;try{for(b(te),d=r(l);d!==null&&(!(d.expirationTime>te)||W&&!H());){var A=d.callback;if(typeof A=="function"){d.callback=null,f=d.priorityLevel;var U=A(d.expirationTime<=te);te=e.unstable_now(),typeof U=="function"?d.callback=U:d===r(l)&&n(l),b(te)}else n(l);d=r(l)}if(d!==null)var N=!0;else{var E=r(u);E!==null&&Q(_,E.startTime-te),N=!1}return N}finally{d=null,f=G,h=!1}}var C=!1,x=null,T=-1,I=5,M=-1;function H(){return!(e.unstable_now()-M<I)}function re(){if(x!==null){var W=e.unstable_now();M=W;var te=!0;try{te=x(!0,W)}finally{te?ie():(C=!1,x=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,L=R.port2;R.port1.onmessage=re,ie=function(){L.postMessage(null)}}else ie=function(){w(re,0)};function X(W){x=W,C||(C=!0,ie())}function Q(W,te){T=w(function(){W(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,X(P))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(W){switch(f){case 1:case 2:case 3:var te=3;break;default:te=f}var G=f;f=te;try{return W()}finally{f=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,te){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var G=f;f=W;try{return te()}finally{f=G}},e.unstable_scheduleCallback=function(W,te,G){var A=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?A+G:A):G=A,W){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=G+U,W={id:c++,callback:te,priorityLevel:W,startTime:G,expirationTime:U,sortIndex:-1},G>A?(W.sortIndex=G,t(u,W),r(l)===null&&W===r(u)&&(v?(p(T),T=-1):v=!0,Q(_,G-A))):(W.sortIndex=U,t(l,W),m||h||(m=!0,X(P))),W},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(W){var te=f;return function(){var G=f;f=te;try{return W.apply(this,arguments)}finally{f=G}}}})(wM);bM.exports=wM;var IU=bM.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var kU=S,Ni=IU;function he(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var SM=new Set,Rp={};function ic(e,t){Vd(e,t),Vd(e+"Capture",t)}function Vd(e,t){for(Rp[e]=t,e=0;e<t.length;e++)SM.add(t[e])}var ss=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v_=Object.prototype.hasOwnProperty,jU=/^[: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]*$/,JR={},ZR={};function $U(e){return v_.call(ZR,e)?!0:v_.call(JR,e)?!1:jU.test(e)?ZR[e]=!0:(JR[e]=!0,!1)}function AU(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function DU(e,t,r,n){if(t===null||typeof t>"u"||AU(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ri(e,t,r,n,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kn[e]=new ri(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kn[t]=new ri(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kn[e]=new ri(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kn[e]=new ri(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kn[e]=new ri(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kn[e]=new ri(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kn[e]=new ri(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kn[e]=new ri(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kn[e]=new ri(e,5,!1,e.toLowerCase(),null,!1,!1)});var yC=/[\-:]([a-z])/g;function bC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(yC,bC);kn[t]=new ri(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(yC,bC);kn[t]=new ri(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(yC,bC);kn[t]=new ri(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kn[e]=new ri(e,1,!1,e.toLowerCase(),null,!1,!1)});kn.xlinkHref=new ri("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kn[e]=new ri(e,1,!1,e.toLowerCase(),null,!0,!0)});function wC(e,t,r,n){var i=kn.hasOwnProperty(t)?kn[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(DU(t,r,i,n)&&(r=null),n||i===null?$U(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ps=kU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fv=Symbol.for("react.element"),Hc=Symbol.for("react.portal"),Wc=Symbol.for("react.fragment"),SC=Symbol.for("react.strict_mode"),g_=Symbol.for("react.profiler"),_M=Symbol.for("react.provider"),xM=Symbol.for("react.context"),_C=Symbol.for("react.forward_ref"),y_=Symbol.for("react.suspense"),b_=Symbol.for("react.suspense_list"),xC=Symbol.for("react.memo"),zs=Symbol.for("react.lazy"),PM=Symbol.for("react.offscreen"),eI=Symbol.iterator;function eh(e){return e===null||typeof e!="object"?null:(e=eI&&e[eI]||e["@@iterator"],typeof e=="function"?e:null)}var $r=Object.assign,e1;function Rh(e){if(e1===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);e1=t&&t[1]||""}return`
34
- `+e1+e}var t1=!1;function r1(e,t){if(!e||t1)return"";t1=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),o=n.stack.split(`
36
- `),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{t1=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Rh(e):""}function MU(e){switch(e.tag){case 5:return Rh(e.type);case 16:return Rh("Lazy");case 13:return Rh("Suspense");case 19:return Rh("SuspenseList");case 0:case 2:case 15:return e=r1(e.type,!1),e;case 11:return e=r1(e.type.render,!1),e;case 1:return e=r1(e.type,!0),e;default:return""}}function w_(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wc:return"Fragment";case Hc:return"Portal";case g_:return"Profiler";case SC:return"StrictMode";case y_:return"Suspense";case b_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xM:return(e.displayName||"Context")+".Consumer";case _M:return(e._context.displayName||"Context")+".Provider";case _C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xC:return t=e.displayName||null,t!==null?t:w_(e.type)||"Memo";case zs:t=e._payload,e=e._init;try{return w_(e(t))}catch{}}return null}function NU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w_(t);case 8:return t===SC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _l(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FU(e){var t=CM(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lv(e){e._valueTracker||(e._valueTracker=FU(e))}function EM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=CM(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Ty(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S_(e,t){var r=t.checked;return $r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function tI(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=_l(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function TM(e,t){t=t.checked,t!=null&&wC(e,"checked",t,!1)}function __(e,t){TM(e,t);var r=_l(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?x_(e,t.type,r):t.hasOwnProperty("defaultValue")&&x_(e,t.type,_l(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rI(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function x_(e,t,r){(t!=="number"||Ty(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ih=Array.isArray;function xd(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+_l(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function P_(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(he(91));return $r({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function nI(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(he(92));if(Ih(r)){if(1<r.length)throw Error(he(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:_l(r)}}function OM(e,t){var r=_l(t.value),n=_l(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function iI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function RM(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function C_(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?RM(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bv,IM=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Bv=Bv||document.createElement("div"),Bv.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Bv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ip(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},LU=["Webkit","ms","Moz","O"];Object.keys(zh).forEach(function(e){LU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zh[t]=zh[e]})});function kM(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zh.hasOwnProperty(e)&&zh[e]?(""+t).trim():t+"px"}function jM(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=kM(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var BU=$r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function E_(e,t){if(t){if(BU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(he(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(he(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(he(61))}if(t.style!=null&&typeof t.style!="object")throw Error(he(62))}}function T_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 O_=null;function PC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var R_=null,Pd=null,Cd=null;function oI(e){if(e=Vm(e)){if(typeof R_!="function")throw Error(he(280));var t=e.stateNode;t&&(t=ab(t),R_(e.stateNode,e.type,t))}}function $M(e){Pd?Cd?Cd.push(e):Cd=[e]:Pd=e}function AM(){if(Pd){var e=Pd,t=Cd;if(Cd=Pd=null,oI(e),t)for(e=0;e<t.length;e++)oI(t[e])}}function DM(e,t){return e(t)}function MM(){}var n1=!1;function NM(e,t,r){if(n1)return e(t,r);n1=!0;try{return DM(e,t,r)}finally{n1=!1,(Pd!==null||Cd!==null)&&(MM(),AM())}}function kp(e,t){var r=e.stateNode;if(r===null)return null;var n=ab(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(he(231,t,typeof r));return r}var I_=!1;if(ss)try{var th={};Object.defineProperty(th,"passive",{get:function(){I_=!0}}),window.addEventListener("test",th,th),window.removeEventListener("test",th,th)}catch{I_=!1}function VU(e,t,r,n,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Uh=!1,Oy=null,Ry=!1,k_=null,zU={onError:function(e){Uh=!0,Oy=e}};function UU(e,t,r,n,i,o,a,s,l){Uh=!1,Oy=null,VU.apply(zU,arguments)}function qU(e,t,r,n,i,o,a,s,l){if(UU.apply(this,arguments),Uh){if(Uh){var u=Oy;Uh=!1,Oy=null}else throw Error(he(198));Ry||(Ry=!0,k_=u)}}function oc(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function FM(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function aI(e){if(oc(e)!==e)throw Error(he(188))}function HU(e){var t=e.alternate;if(!t){if(t=oc(e),t===null)throw Error(he(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return aI(i),e;if(o===n)return aI(i),t;o=o.sibling}throw Error(he(188))}if(r.return!==n.return)r=i,n=o;else{for(var a=!1,s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a)throw Error(he(189))}}if(r.alternate!==n)throw Error(he(190))}if(r.tag!==3)throw Error(he(188));return r.stateNode.current===r?e:t}function LM(e){return e=HU(e),e!==null?BM(e):null}function BM(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=BM(e);if(t!==null)return t;e=e.sibling}return null}var VM=Ni.unstable_scheduleCallback,sI=Ni.unstable_cancelCallback,WU=Ni.unstable_shouldYield,KU=Ni.unstable_requestPaint,Hr=Ni.unstable_now,GU=Ni.unstable_getCurrentPriorityLevel,CC=Ni.unstable_ImmediatePriority,zM=Ni.unstable_UserBlockingPriority,Iy=Ni.unstable_NormalPriority,QU=Ni.unstable_LowPriority,UM=Ni.unstable_IdlePriority,rb=null,_a=null;function YU(e){if(_a&&typeof _a.onCommitFiberRoot=="function")try{_a.onCommitFiberRoot(rb,e,void 0,(e.current.flags&128)===128)}catch{}}var Bo=Math.clz32?Math.clz32:ZU,XU=Math.log,JU=Math.LN2;function ZU(e){return e>>>=0,e===0?32:31-(XU(e)/JU|0)|0}var Vv=64,zv=4194304;function kh(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ky(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~i;s!==0?n=kh(s):(o&=a,o!==0&&(n=kh(o)))}else a=r&~i,a!==0?n=kh(a):o!==0&&(n=kh(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Bo(t),i=1<<r,n|=e[r],t&=~i;return n}function e7(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function t7(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Bo(o),s=1<<a,l=i[a];l===-1?(!(s&r)||s&n)&&(i[a]=e7(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function j_(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qM(){var e=Vv;return Vv<<=1,!(Vv&4194240)&&(Vv=64),e}function i1(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Lm(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Bo(t),e[t]=r}function r7(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Bo(r),o=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~o}}function EC(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Bo(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Yt=0;function HM(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var WM,TC,KM,GM,QM,$_=!1,Uv=[],ol=null,al=null,sl=null,jp=new Map,$p=new Map,Gs=[],n7="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 submit".split(" ");function lI(e,t){switch(e){case"focusin":case"focusout":ol=null;break;case"dragenter":case"dragleave":al=null;break;case"mouseover":case"mouseout":sl=null;break;case"pointerover":case"pointerout":jp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$p.delete(t.pointerId)}}function rh(e,t,r,n,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Vm(t),t!==null&&TC(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function i7(e,t,r,n,i){switch(t){case"focusin":return ol=rh(ol,e,t,r,n,i),!0;case"dragenter":return al=rh(al,e,t,r,n,i),!0;case"mouseover":return sl=rh(sl,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;return jp.set(o,rh(jp.get(o)||null,e,t,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,$p.set(o,rh($p.get(o)||null,e,t,r,n,i)),!0}return!1}function YM(e){var t=yu(e.target);if(t!==null){var r=oc(t);if(r!==null){if(t=r.tag,t===13){if(t=FM(r),t!==null){e.blockedOn=t,QM(e.priority,function(){KM(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=A_(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);O_=n,r.target.dispatchEvent(n),O_=null}else return t=Vm(r),t!==null&&TC(t),e.blockedOn=r,!1;t.shift()}return!0}function uI(e,t,r){Dg(e)&&r.delete(t)}function o7(){$_=!1,ol!==null&&Dg(ol)&&(ol=null),al!==null&&Dg(al)&&(al=null),sl!==null&&Dg(sl)&&(sl=null),jp.forEach(uI),$p.forEach(uI)}function nh(e,t){e.blockedOn===t&&(e.blockedOn=null,$_||($_=!0,Ni.unstable_scheduleCallback(Ni.unstable_NormalPriority,o7)))}function Ap(e){function t(i){return nh(i,e)}if(0<Uv.length){nh(Uv[0],e);for(var r=1;r<Uv.length;r++){var n=Uv[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ol!==null&&nh(ol,e),al!==null&&nh(al,e),sl!==null&&nh(sl,e),jp.forEach(t),$p.forEach(t),r=0;r<Gs.length;r++)n=Gs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Gs.length&&(r=Gs[0],r.blockedOn===null);)YM(r),r.blockedOn===null&&Gs.shift()}var Ed=Ps.ReactCurrentBatchConfig,jy=!0;function a7(e,t,r,n){var i=Yt,o=Ed.transition;Ed.transition=null;try{Yt=1,OC(e,t,r,n)}finally{Yt=i,Ed.transition=o}}function s7(e,t,r,n){var i=Yt,o=Ed.transition;Ed.transition=null;try{Yt=4,OC(e,t,r,n)}finally{Yt=i,Ed.transition=o}}function OC(e,t,r,n){if(jy){var i=A_(e,t,r,n);if(i===null)p1(e,t,n,$y,r),lI(e,n);else if(i7(i,e,t,r,n))n.stopPropagation();else if(lI(e,n),t&4&&-1<n7.indexOf(e)){for(;i!==null;){var o=Vm(i);if(o!==null&&WM(o),o=A_(e,t,r,n),o===null&&p1(e,t,n,$y,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else p1(e,t,n,null,r)}}var $y=null;function A_(e,t,r,n){if($y=null,e=PC(n),e=yu(e),e!==null)if(t=oc(e),t===null)e=null;else if(r=t.tag,r===13){if(e=FM(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $y=e,null}function XM(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(GU()){case CC:return 1;case zM:return 4;case Iy:case QU:return 16;case UM:return 536870912;default:return 16}default:return 16}}var el=null,RC=null,Mg=null;function JM(){if(Mg)return Mg;var e,t=RC,r=t.length,n,i="value"in el?el.value:el.textContent,o=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[o-n];n++);return Mg=i.slice(e,1<n?1-n:void 0)}function Ng(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qv(){return!0}function cI(){return!1}function qi(e){function t(r,n,i,o,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?qv:cI,this.isPropagationStopped=cI,this}return $r(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=qv)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=qv)},persist:function(){},isPersistent:qv}),t}var _f={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},IC=qi(_f),Bm=$r({},_f,{view:0,detail:0}),l7=qi(Bm),o1,a1,ih,nb=$r({},Bm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kC,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ih&&(ih&&e.type==="mousemove"?(o1=e.screenX-ih.screenX,a1=e.screenY-ih.screenY):a1=o1=0,ih=e),o1)},movementY:function(e){return"movementY"in e?e.movementY:a1}}),dI=qi(nb),u7=$r({},nb,{dataTransfer:0}),c7=qi(u7),d7=$r({},Bm,{relatedTarget:0}),s1=qi(d7),f7=$r({},_f,{animationName:0,elapsedTime:0,pseudoElement:0}),h7=qi(f7),p7=$r({},_f,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),m7=qi(p7),v7=$r({},_f,{data:0}),fI=qi(v7),g7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y7={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"},b7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w7(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=b7[e])?!!t[e]:!1}function kC(){return w7}var S7=$r({},Bm,{key:function(e){if(e.key){var t=g7[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ng(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y7[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kC,charCode:function(e){return e.type==="keypress"?Ng(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ng(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_7=qi(S7),x7=$r({},nb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hI=qi(x7),P7=$r({},Bm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kC}),C7=qi(P7),E7=$r({},_f,{propertyName:0,elapsedTime:0,pseudoElement:0}),T7=qi(E7),O7=$r({},nb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),R7=qi(O7),I7=[9,13,27,32],jC=ss&&"CompositionEvent"in window,qh=null;ss&&"documentMode"in document&&(qh=document.documentMode);var k7=ss&&"TextEvent"in window&&!qh,ZM=ss&&(!jC||qh&&8<qh&&11>=qh),pI=" ",mI=!1;function eN(e,t){switch(e){case"keyup":return I7.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kc=!1;function j7(e,t){switch(e){case"compositionend":return tN(t);case"keypress":return t.which!==32?null:(mI=!0,pI);case"textInput":return e=t.data,e===pI&&mI?null:e;default:return null}}function $7(e,t){if(Kc)return e==="compositionend"||!jC&&eN(e,t)?(e=JM(),Mg=RC=el=null,Kc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ZM&&t.locale!=="ko"?null:t.data;default:return null}}var A7={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 vI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A7[e.type]:t==="textarea"}function rN(e,t,r,n){$M(n),t=Ay(t,"onChange"),0<t.length&&(r=new IC("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Hh=null,Dp=null;function D7(e){hN(e,0)}function ib(e){var t=Yc(e);if(EM(t))return e}function M7(e,t){if(e==="change")return t}var nN=!1;if(ss){var l1;if(ss){var u1="oninput"in document;if(!u1){var gI=document.createElement("div");gI.setAttribute("oninput","return;"),u1=typeof gI.oninput=="function"}l1=u1}else l1=!1;nN=l1&&(!document.documentMode||9<document.documentMode)}function yI(){Hh&&(Hh.detachEvent("onpropertychange",iN),Dp=Hh=null)}function iN(e){if(e.propertyName==="value"&&ib(Dp)){var t=[];rN(t,Dp,e,PC(e)),NM(D7,t)}}function N7(e,t,r){e==="focusin"?(yI(),Hh=t,Dp=r,Hh.attachEvent("onpropertychange",iN)):e==="focusout"&&yI()}function F7(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ib(Dp)}function L7(e,t){if(e==="click")return ib(t)}function B7(e,t){if(e==="input"||e==="change")return ib(t)}function V7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qo=typeof Object.is=="function"?Object.is:V7;function Mp(e,t){if(Qo(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!v_.call(t,i)||!Qo(e[i],t[i]))return!1}return!0}function bI(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wI(e,t){var r=bI(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bI(r)}}function oN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function aN(){for(var e=window,t=Ty();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ty(e.document)}return t}function $C(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function z7(e){var t=aN(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&oN(r.ownerDocument.documentElement,r)){if(n!==null&&$C(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=wI(r,o);var a=wI(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var U7=ss&&"documentMode"in document&&11>=document.documentMode,Gc=null,D_=null,Wh=null,M_=!1;function SI(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;M_||Gc==null||Gc!==Ty(n)||(n=Gc,"selectionStart"in n&&$C(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Wh&&Mp(Wh,n)||(Wh=n,n=Ay(D_,"onSelect"),0<n.length&&(t=new IC("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Gc)))}function Hv(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Qc={animationend:Hv("Animation","AnimationEnd"),animationiteration:Hv("Animation","AnimationIteration"),animationstart:Hv("Animation","AnimationStart"),transitionend:Hv("Transition","TransitionEnd")},c1={},sN={};ss&&(sN=document.createElement("div").style,"AnimationEvent"in window||(delete Qc.animationend.animation,delete Qc.animationiteration.animation,delete Qc.animationstart.animation),"TransitionEvent"in window||delete Qc.transitionend.transition);function ob(e){if(c1[e])return c1[e];if(!Qc[e])return e;var t=Qc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in sN)return c1[e]=t[r];return e}var lN=ob("animationend"),uN=ob("animationiteration"),cN=ob("animationstart"),dN=ob("transitionend"),fN=new Map,_I="abort auxClick 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(" ");function Ml(e,t){fN.set(e,t),ic(t,[e])}for(var d1=0;d1<_I.length;d1++){var f1=_I[d1],q7=f1.toLowerCase(),H7=f1[0].toUpperCase()+f1.slice(1);Ml(q7,"on"+H7)}Ml(lN,"onAnimationEnd");Ml(uN,"onAnimationIteration");Ml(cN,"onAnimationStart");Ml("dblclick","onDoubleClick");Ml("focusin","onFocus");Ml("focusout","onBlur");Ml(dN,"onTransitionEnd");Vd("onMouseEnter",["mouseout","mouseover"]);Vd("onMouseLeave",["mouseout","mouseover"]);Vd("onPointerEnter",["pointerout","pointerover"]);Vd("onPointerLeave",["pointerout","pointerover"]);ic("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ic("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ic("onBeforeInput",["compositionend","keypress","textInput","paste"]);ic("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jh="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(" "),W7=new Set("cancel close invalid load scroll toggle".split(" ").concat(jh));function xI(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,qU(n,t,void 0,e),e.currentTarget=null}function hN(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;xI(i,s,u),o=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;xI(i,s,u),o=l}}}if(Ry)throw e=k_,Ry=!1,k_=null,e}function dr(e,t){var r=t[V_];r===void 0&&(r=t[V_]=new Set);var n=e+"__bubble";r.has(n)||(pN(t,e,2,!1),r.add(n))}function h1(e,t,r){var n=0;t&&(n|=4),pN(r,e,n,t)}var Wv="_reactListening"+Math.random().toString(36).slice(2);function Np(e){if(!e[Wv]){e[Wv]=!0,SM.forEach(function(r){r!=="selectionchange"&&(W7.has(r)||h1(r,!1,e),h1(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wv]||(t[Wv]=!0,h1("selectionchange",!1,t))}}function pN(e,t,r,n){switch(XM(t)){case 1:var i=a7;break;case 4:i=s7;break;default:i=OC}r=i.bind(null,t,r,e),i=void 0,!I_||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function p1(e,t,r,n,i){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=yu(s),a===null)return;if(l=a.tag,l===5||l===6){n=o=a;continue e}s=s.parentNode}}n=n.return}NM(function(){var u=o,c=PC(r),d=[];e:{var f=fN.get(e);if(f!==void 0){var h=IC,m=e;switch(e){case"keypress":if(Ng(r)===0)break e;case"keydown":case"keyup":h=_7;break;case"focusin":m="focus",h=s1;break;case"focusout":m="blur",h=s1;break;case"beforeblur":case"afterblur":h=s1;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=dI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=c7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=C7;break;case lN:case uN:case cN:h=h7;break;case dN:h=T7;break;case"scroll":h=l7;break;case"wheel":h=R7;break;case"copy":case"cut":case"paste":h=m7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=hI}var v=(t&4)!==0,w=!v&&e==="scroll",p=v?f!==null?f+"Capture":null:f;v=[];for(var g=u,b;g!==null;){b=g;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,p!==null&&(_=kp(g,p),_!=null&&v.push(Fp(g,_,b)))),w)break;g=g.return}0<v.length&&(f=new h(f,m,null,r,c),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==O_&&(m=r.relatedTarget||r.fromElement)&&(yu(m)||m[ls]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=r.relatedTarget||r.toElement,h=u,m=m?yu(m):null,m!==null&&(w=oc(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=dI,_="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=hI,_="onPointerLeave",p="onPointerEnter",g="pointer"),w=h==null?f:Yc(h),b=m==null?f:Yc(m),f=new v(_,g+"leave",h,r,c),f.target=w,f.relatedTarget=b,_=null,yu(c)===u&&(v=new v(p,g+"enter",m,r,c),v.target=b,v.relatedTarget=w,_=v),w=_,h&&m)t:{for(v=h,p=m,g=0,b=v;b;b=Cc(b))g++;for(b=0,_=p;_;_=Cc(_))b++;for(;0<g-b;)v=Cc(v),g--;for(;0<b-g;)p=Cc(p),b--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Cc(v),p=Cc(p)}v=null}else v=null;h!==null&&PI(d,f,h,v,!1),m!==null&&w!==null&&PI(d,w,m,v,!0)}}e:{if(f=u?Yc(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var P=M7;else if(vI(f))if(nN)P=B7;else{P=F7;var C=N7}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(P=L7);if(P&&(P=P(e,u))){rN(d,P,r,c);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&x_(f,"number",f.value)}switch(C=u?Yc(u):window,e){case"focusin":(vI(C)||C.contentEditable==="true")&&(Gc=C,D_=u,Wh=null);break;case"focusout":Wh=D_=Gc=null;break;case"mousedown":M_=!0;break;case"contextmenu":case"mouseup":case"dragend":M_=!1,SI(d,r,c);break;case"selectionchange":if(U7)break;case"keydown":case"keyup":SI(d,r,c)}var x;if(jC)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Kc?eN(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(ZM&&r.locale!=="ko"&&(Kc||T!=="onCompositionStart"?T==="onCompositionEnd"&&Kc&&(x=JM()):(el=c,RC="value"in el?el.value:el.textContent,Kc=!0)),C=Ay(u,T),0<C.length&&(T=new fI(T,e,null,r,c),d.push({event:T,listeners:C}),x?T.data=x:(x=tN(r),x!==null&&(T.data=x)))),(x=k7?j7(e,r):$7(e,r))&&(u=Ay(u,"onBeforeInput"),0<u.length&&(c=new fI("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=x))}hN(d,t)})}function Fp(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ay(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=kp(e,r),o!=null&&n.unshift(Fp(e,o,i)),o=kp(e,t),o!=null&&n.push(Fp(e,o,i))),e=e.return}return n}function Cc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function PI(e,t,r,n,i){for(var o=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=kp(r,o),l!=null&&a.unshift(Fp(r,l,s))):i||(l=kp(r,o),l!=null&&a.push(Fp(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var K7=/\r\n?/g,G7=/\u0000|\uFFFD/g;function CI(e){return(typeof e=="string"?e:""+e).replace(K7,`
38
- `).replace(G7,"")}function Kv(e,t,r){if(t=CI(t),CI(e)!==t&&r)throw Error(he(425))}function Dy(){}var N_=null,F_=null;function L_(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var B_=typeof setTimeout=="function"?setTimeout:void 0,Q7=typeof clearTimeout=="function"?clearTimeout:void 0,EI=typeof Promise=="function"?Promise:void 0,Y7=typeof queueMicrotask=="function"?queueMicrotask:typeof EI<"u"?function(e){return EI.resolve(null).then(e).catch(X7)}:B_;function X7(e){setTimeout(function(){throw e})}function m1(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Ap(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ap(t)}function ll(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function TI(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var xf=Math.random().toString(36).slice(2),ma="__reactFiber$"+xf,Lp="__reactProps$"+xf,ls="__reactContainer$"+xf,V_="__reactEvents$"+xf,J7="__reactListeners$"+xf,Z7="__reactHandles$"+xf;function yu(e){var t=e[ma];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ls]||r[ma]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=TI(e);e!==null;){if(r=e[ma])return r;e=TI(e)}return t}e=r,r=e.parentNode}return null}function Vm(e){return e=e[ma]||e[ls],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(he(33))}function ab(e){return e[Lp]||null}var z_=[],Xc=-1;function Nl(e){return{current:e}}function vr(e){0>Xc||(e.current=z_[Xc],z_[Xc]=null,Xc--)}function ar(e,t){Xc++,z_[Xc]=e.current,e.current=t}var xl={},Un=Nl(xl),fi=Nl(!1),Fu=xl;function zd(e,t){var r=e.type.contextTypes;if(!r)return xl;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function hi(e){return e=e.childContextTypes,e!=null}function My(){vr(fi),vr(Un)}function OI(e,t,r){if(Un.current!==xl)throw Error(he(168));ar(Un,t),ar(fi,r)}function mN(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(he(108,NU(e)||"Unknown",i));return $r({},r,n)}function Ny(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xl,Fu=Un.current,ar(Un,e),ar(fi,fi.current),!0}function RI(e,t,r){var n=e.stateNode;if(!n)throw Error(he(169));r?(e=mN(e,t,Fu),n.__reactInternalMemoizedMergedChildContext=e,vr(fi),vr(Un),ar(Un,e)):vr(fi),ar(fi,r)}var za=null,sb=!1,v1=!1;function vN(e){za===null?za=[e]:za.push(e)}function e9(e){sb=!0,vN(e)}function Fl(){if(!v1&&za!==null){v1=!0;var e=0,t=Yt;try{var r=za;for(Yt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}za=null,sb=!1}catch(i){throw za!==null&&(za=za.slice(e+1)),VM(CC,Fl),i}finally{Yt=t,v1=!1}}return null}var Jc=[],Zc=0,Fy=null,Ly=0,ro=[],no=0,Lu=null,Ha=1,Wa="";function ou(e,t){Jc[Zc++]=Ly,Jc[Zc++]=Fy,Fy=e,Ly=t}function gN(e,t,r){ro[no++]=Ha,ro[no++]=Wa,ro[no++]=Lu,Lu=e;var n=Ha;e=Wa;var i=32-Bo(n)-1;n&=~(1<<i),r+=1;var o=32-Bo(t)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,Ha=1<<32-Bo(t)+i|r<<i|n,Wa=o+e}else Ha=1<<o|r<<i|n,Wa=e}function AC(e){e.return!==null&&(ou(e,1),gN(e,1,0))}function DC(e){for(;e===Fy;)Fy=Jc[--Zc],Jc[Zc]=null,Ly=Jc[--Zc],Jc[Zc]=null;for(;e===Lu;)Lu=ro[--no],ro[no]=null,Wa=ro[--no],ro[no]=null,Ha=ro[--no],ro[no]=null}var ji=null,Ii=null,xr=!1,Do=null;function yN(e,t){var r=so(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function II(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ji=e,Ii=ll(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ji=e,Ii=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Lu!==null?{id:Ha,overflow:Wa}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=so(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ji=e,Ii=null,!0):!1;default:return!1}}function U_(e){return(e.mode&1)!==0&&(e.flags&128)===0}function q_(e){if(xr){var t=Ii;if(t){var r=t;if(!II(e,t)){if(U_(e))throw Error(he(418));t=ll(r.nextSibling);var n=ji;t&&II(e,t)?yN(n,r):(e.flags=e.flags&-4097|2,xr=!1,ji=e)}}else{if(U_(e))throw Error(he(418));e.flags=e.flags&-4097|2,xr=!1,ji=e}}}function kI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ji=e}function Gv(e){if(e!==ji)return!1;if(!xr)return kI(e),xr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!L_(e.type,e.memoizedProps)),t&&(t=Ii)){if(U_(e))throw bN(),Error(he(418));for(;t;)yN(e,t),t=ll(t.nextSibling)}if(kI(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(he(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ii=ll(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ii=null}}else Ii=ji?ll(e.stateNode.nextSibling):null;return!0}function bN(){for(var e=Ii;e;)e=ll(e.nextSibling)}function Ud(){Ii=ji=null,xr=!1}function MC(e){Do===null?Do=[e]:Do.push(e)}var t9=Ps.ReactCurrentBatchConfig;function oh(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(he(309));var n=r.stateNode}if(!n)throw Error(he(147,e));var i=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(he(284));if(!r._owner)throw Error(he(290,e))}return e}function Qv(e,t){throw e=Object.prototype.toString.call(t),Error(he(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function jI(e){var t=e._init;return t(e._payload)}function wN(e){function t(p,g){if(e){var b=p.deletions;b===null?(p.deletions=[g],p.flags|=16):b.push(g)}}function r(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function n(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=fl(p,g),p.index=0,p.sibling=null,p}function o(p,g,b){return p.index=b,e?(b=p.alternate,b!==null?(b=b.index,b<g?(p.flags|=2,g):b):(p.flags|=2,g)):(p.flags|=1048576,g)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,g,b,_){return g===null||g.tag!==6?(g=x1(b,p.mode,_),g.return=p,g):(g=i(g,b),g.return=p,g)}function l(p,g,b,_){var P=b.type;return P===Wc?c(p,g,b.props.children,_,b.key):g!==null&&(g.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===zs&&jI(P)===g.type)?(_=i(g,b.props),_.ref=oh(p,g,b),_.return=p,_):(_=qg(b.type,b.key,b.props,null,p.mode,_),_.ref=oh(p,g,b),_.return=p,_)}function u(p,g,b,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=P1(b,p.mode,_),g.return=p,g):(g=i(g,b.children||[]),g.return=p,g)}function c(p,g,b,_,P){return g===null||g.tag!==7?(g=Tu(b,p.mode,_,P),g.return=p,g):(g=i(g,b),g.return=p,g)}function d(p,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=x1(""+g,p.mode,b),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Fv:return b=qg(g.type,g.key,g.props,null,p.mode,b),b.ref=oh(p,null,g),b.return=p,b;case Hc:return g=P1(g,p.mode,b),g.return=p,g;case zs:var _=g._init;return d(p,_(g._payload),b)}if(Ih(g)||eh(g))return g=Tu(g,p.mode,b,null),g.return=p,g;Qv(p,g)}return null}function f(p,g,b,_){var P=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return P!==null?null:s(p,g,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Fv:return b.key===P?l(p,g,b,_):null;case Hc:return b.key===P?u(p,g,b,_):null;case zs:return P=b._init,f(p,g,P(b._payload),_)}if(Ih(b)||eh(b))return P!==null?null:c(p,g,b,_,null);Qv(p,b)}return null}function h(p,g,b,_,P){if(typeof _=="string"&&_!==""||typeof _=="number")return p=p.get(b)||null,s(g,p,""+_,P);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Fv:return p=p.get(_.key===null?b:_.key)||null,l(g,p,_,P);case Hc:return p=p.get(_.key===null?b:_.key)||null,u(g,p,_,P);case zs:var C=_._init;return h(p,g,b,C(_._payload),P)}if(Ih(_)||eh(_))return p=p.get(b)||null,c(g,p,_,P,null);Qv(g,_)}return null}function m(p,g,b,_){for(var P=null,C=null,x=g,T=g=0,I=null;x!==null&&T<b.length;T++){x.index>T?(I=x,x=null):I=x.sibling;var M=f(p,x,b[T],_);if(M===null){x===null&&(x=I);break}e&&x&&M.alternate===null&&t(p,x),g=o(M,g,T),C===null?P=M:C.sibling=M,C=M,x=I}if(T===b.length)return r(p,x),xr&&ou(p,T),P;if(x===null){for(;T<b.length;T++)x=d(p,b[T],_),x!==null&&(g=o(x,g,T),C===null?P=x:C.sibling=x,C=x);return xr&&ou(p,T),P}for(x=n(p,x);T<b.length;T++)I=h(x,p,T,b[T],_),I!==null&&(e&&I.alternate!==null&&x.delete(I.key===null?T:I.key),g=o(I,g,T),C===null?P=I:C.sibling=I,C=I);return e&&x.forEach(function(H){return t(p,H)}),xr&&ou(p,T),P}function v(p,g,b,_){var P=eh(b);if(typeof P!="function")throw Error(he(150));if(b=P.call(b),b==null)throw Error(he(151));for(var C=P=null,x=g,T=g=0,I=null,M=b.next();x!==null&&!M.done;T++,M=b.next()){x.index>T?(I=x,x=null):I=x.sibling;var H=f(p,x,M.value,_);if(H===null){x===null&&(x=I);break}e&&x&&H.alternate===null&&t(p,x),g=o(H,g,T),C===null?P=H:C.sibling=H,C=H,x=I}if(M.done)return r(p,x),xr&&ou(p,T),P;if(x===null){for(;!M.done;T++,M=b.next())M=d(p,M.value,_),M!==null&&(g=o(M,g,T),C===null?P=M:C.sibling=M,C=M);return xr&&ou(p,T),P}for(x=n(p,x);!M.done;T++,M=b.next())M=h(x,p,T,M.value,_),M!==null&&(e&&M.alternate!==null&&x.delete(M.key===null?T:M.key),g=o(M,g,T),C===null?P=M:C.sibling=M,C=M);return e&&x.forEach(function(re){return t(p,re)}),xr&&ou(p,T),P}function w(p,g,b,_){if(typeof b=="object"&&b!==null&&b.type===Wc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Fv:e:{for(var P=b.key,C=g;C!==null;){if(C.key===P){if(P=b.type,P===Wc){if(C.tag===7){r(p,C.sibling),g=i(C,b.props.children),g.return=p,p=g;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===zs&&jI(P)===C.type){r(p,C.sibling),g=i(C,b.props),g.ref=oh(p,C,b),g.return=p,p=g;break e}r(p,C);break}else t(p,C);C=C.sibling}b.type===Wc?(g=Tu(b.props.children,p.mode,_,b.key),g.return=p,p=g):(_=qg(b.type,b.key,b.props,null,p.mode,_),_.ref=oh(p,g,b),_.return=p,p=_)}return a(p);case Hc:e:{for(C=b.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){r(p,g.sibling),g=i(g,b.children||[]),g.return=p,p=g;break e}else{r(p,g);break}else t(p,g);g=g.sibling}g=P1(b,p.mode,_),g.return=p,p=g}return a(p);case zs:return C=b._init,w(p,g,C(b._payload),_)}if(Ih(b))return m(p,g,b,_);if(eh(b))return v(p,g,b,_);Qv(p,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(r(p,g.sibling),g=i(g,b),g.return=p,p=g):(r(p,g),g=x1(b,p.mode,_),g.return=p,p=g),a(p)):r(p,g)}return w}var qd=wN(!0),SN=wN(!1),By=Nl(null),Vy=null,ed=null,NC=null;function FC(){NC=ed=Vy=null}function LC(e){var t=By.current;vr(By),e._currentValue=t}function H_(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Td(e,t){Vy=e,NC=ed=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(li=!0),e.firstContext=null)}function po(e){var t=e._currentValue;if(NC!==e)if(e={context:e,memoizedValue:t,next:null},ed===null){if(Vy===null)throw Error(he(308));ed=e,Vy.dependencies={lanes:0,firstContext:e}}else ed=ed.next=e;return t}var bu=null;function BC(e){bu===null?bu=[e]:bu.push(e)}function _N(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,BC(t)):(r.next=i.next,i.next=r),t.interleaved=r,us(e,n)}function us(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Us=!1;function VC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ul(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Rt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,us(e,r)}return i=n.interleaved,i===null?(t.next=t,BC(n)):(t.next=i.next,i.next=t),n.interleaved=t,us(e,r)}function Fg(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,EC(e,r)}}function $I(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function zy(e,t,r,n){var i=e.updateQueue;Us=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,c=u=l=null,s=o;do{var f=s.lane,h=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(f=t,h=r,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=$r({},d,f);break e;case 2:Us=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Vu|=a,e.lanes=a,e.memoizedState=d}}function AI(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(he(191,i));i.call(n)}}}var zm={},xa=Nl(zm),Bp=Nl(zm),Vp=Nl(zm);function wu(e){if(e===zm)throw Error(he(174));return e}function zC(e,t){switch(ar(Vp,t),ar(Bp,e),ar(xa,zm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:C_(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=C_(t,e)}vr(xa),ar(xa,t)}function Hd(){vr(xa),vr(Bp),vr(Vp)}function PN(e){wu(Vp.current);var t=wu(xa.current),r=C_(t,e.type);t!==r&&(ar(Bp,e),ar(xa,r))}function UC(e){Bp.current===e&&(vr(xa),vr(Bp))}var Ir=Nl(0);function Uy(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var g1=[];function qC(){for(var e=0;e<g1.length;e++)g1[e]._workInProgressVersionPrimary=null;g1.length=0}var Lg=Ps.ReactCurrentDispatcher,y1=Ps.ReactCurrentBatchConfig,Bu=0,jr=null,rn=null,pn=null,qy=!1,Kh=!1,zp=0,r9=0;function Nn(){throw Error(he(321))}function HC(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Qo(e[r],t[r]))return!1;return!0}function WC(e,t,r,n,i,o){if(Bu=o,jr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Lg.current=e===null||e.memoizedState===null?a9:s9,e=r(n,i),Kh){o=0;do{if(Kh=!1,zp=0,25<=o)throw Error(he(301));o+=1,pn=rn=null,t.updateQueue=null,Lg.current=l9,e=r(n,i)}while(Kh)}if(Lg.current=Hy,t=rn!==null&&rn.next!==null,Bu=0,pn=rn=jr=null,qy=!1,t)throw Error(he(300));return e}function KC(){var e=zp!==0;return zp=0,e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?jr.memoizedState=pn=e:pn=pn.next=e,pn}function mo(){if(rn===null){var e=jr.alternate;e=e!==null?e.memoizedState:null}else e=rn.next;var t=pn===null?jr.memoizedState:pn.next;if(t!==null)pn=t,rn=e;else{if(e===null)throw Error(he(310));rn=e,e={memoizedState:rn.memoizedState,baseState:rn.baseState,baseQueue:rn.baseQueue,queue:rn.queue,next:null},pn===null?jr.memoizedState=pn=e:pn=pn.next=e}return pn}function Up(e,t){return typeof t=="function"?t(e):t}function b1(e){var t=mo(),r=t.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=e;var n=rn,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var s=a=null,l=null,u=o;do{var c=u.lane;if((Bu&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,a=n):l=l.next=d,jr.lanes|=c,Vu|=c}u=u.next}while(u!==null&&u!==o);l===null?a=n:l.next=s,Qo(n,t.memoizedState)||(li=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do o=i.lane,jr.lanes|=o,Vu|=o,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function w1(e){var t=mo(),r=t.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,o=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Qo(o,t.memoizedState)||(li=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function CN(){}function EN(e,t){var r=jr,n=mo(),i=t(),o=!Qo(n.memoizedState,i);if(o&&(n.memoizedState=i,li=!0),n=n.queue,GC(RN.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||pn!==null&&pn.memoizedState.tag&1){if(r.flags|=2048,qp(9,ON.bind(null,r,n,i,t),void 0,null),bn===null)throw Error(he(349));Bu&30||TN(r,t,i)}return i}function TN(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=jr.updateQueue,t===null?(t={lastEffect:null,stores:null},jr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ON(e,t,r,n){t.value=r,t.getSnapshot=n,IN(t)&&kN(e)}function RN(e,t,r){return r(function(){IN(t)&&kN(e)})}function IN(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Qo(e,r)}catch{return!0}}function kN(e){var t=us(e,1);t!==null&&Vo(t,e,1,-1)}function DI(e){var t=ua();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Up,lastRenderedState:e},t.queue=e,e=e.dispatch=o9.bind(null,jr,e),[t.memoizedState,e]}function qp(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=jr.updateQueue,t===null?(t={lastEffect:null,stores:null},jr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function jN(){return mo().memoizedState}function Bg(e,t,r,n){var i=ua();jr.flags|=e,i.memoizedState=qp(1|t,r,void 0,n===void 0?null:n)}function lb(e,t,r,n){var i=mo();n=n===void 0?null:n;var o=void 0;if(rn!==null){var a=rn.memoizedState;if(o=a.destroy,n!==null&&HC(n,a.deps)){i.memoizedState=qp(t,r,o,n);return}}jr.flags|=e,i.memoizedState=qp(1|t,r,o,n)}function MI(e,t){return Bg(8390656,8,e,t)}function GC(e,t){return lb(2048,8,e,t)}function $N(e,t){return lb(4,2,e,t)}function AN(e,t){return lb(4,4,e,t)}function DN(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function MN(e,t,r){return r=r!=null?r.concat([e]):null,lb(4,4,DN.bind(null,t,e),r)}function QC(){}function NN(e,t){var r=mo();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&HC(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function FN(e,t){var r=mo();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&HC(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function LN(e,t,r){return Bu&21?(Qo(r,t)||(r=qM(),jr.lanes|=r,Vu|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,li=!0),e.memoizedState=r)}function n9(e,t){var r=Yt;Yt=r!==0&&4>r?r:4,e(!0);var n=y1.transition;y1.transition={};try{e(!1),t()}finally{Yt=r,y1.transition=n}}function BN(){return mo().memoizedState}function i9(e,t,r){var n=dl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},VN(e))zN(t,r);else if(r=_N(e,t,r,n),r!==null){var i=Jn();Vo(r,e,n,i),UN(r,t,n)}}function o9(e,t,r){var n=dl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(VN(e))zN(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,Qo(s,a)){var l=t.interleaved;l===null?(i.next=i,BC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=_N(e,t,i,n),r!==null&&(i=Jn(),Vo(r,e,n,i),UN(r,t,n))}}function VN(e){var t=e.alternate;return e===jr||t!==null&&t===jr}function zN(e,t){Kh=qy=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function UN(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,EC(e,r)}}var Hy={readContext:po,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useInsertionEffect:Nn,useLayoutEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useMutableSource:Nn,useSyncExternalStore:Nn,useId:Nn,unstable_isNewReconciler:!1},a9={readContext:po,useCallback:function(e,t){return ua().memoizedState=[e,t===void 0?null:t],e},useContext:po,useEffect:MI,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Bg(4194308,4,DN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Bg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bg(4,2,e,t)},useMemo:function(e,t){var r=ua();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ua();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=i9.bind(null,jr,e),[n.memoizedState,e]},useRef:function(e){var t=ua();return e={current:e},t.memoizedState=e},useState:DI,useDebugValue:QC,useDeferredValue:function(e){return ua().memoizedState=e},useTransition:function(){var e=DI(!1),t=e[0];return e=n9.bind(null,e[1]),ua().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=jr,i=ua();if(xr){if(r===void 0)throw Error(he(407));r=r()}else{if(r=t(),bn===null)throw Error(he(349));Bu&30||TN(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,MI(RN.bind(null,n,o,e),[e]),n.flags|=2048,qp(9,ON.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=ua(),t=bn.identifierPrefix;if(xr){var r=Wa,n=Ha;r=(n&~(1<<32-Bo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=zp++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=r9++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},s9={readContext:po,useCallback:NN,useContext:po,useEffect:GC,useImperativeHandle:MN,useInsertionEffect:$N,useLayoutEffect:AN,useMemo:FN,useReducer:b1,useRef:jN,useState:function(){return b1(Up)},useDebugValue:QC,useDeferredValue:function(e){var t=mo();return LN(t,rn.memoizedState,e)},useTransition:function(){var e=b1(Up)[0],t=mo().memoizedState;return[e,t]},useMutableSource:CN,useSyncExternalStore:EN,useId:BN,unstable_isNewReconciler:!1},l9={readContext:po,useCallback:NN,useContext:po,useEffect:GC,useImperativeHandle:MN,useInsertionEffect:$N,useLayoutEffect:AN,useMemo:FN,useReducer:w1,useRef:jN,useState:function(){return w1(Up)},useDebugValue:QC,useDeferredValue:function(e){var t=mo();return rn===null?t.memoizedState=e:LN(t,rn.memoizedState,e)},useTransition:function(){var e=w1(Up)[0],t=mo().memoizedState;return[e,t]},useMutableSource:CN,useSyncExternalStore:EN,useId:BN,unstable_isNewReconciler:!1};function jo(e,t){if(e&&e.defaultProps){t=$r({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function W_(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:$r({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ub={isMounted:function(e){return(e=e._reactInternals)?oc(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Jn(),i=dl(e),o=Qa(n,i);o.payload=t,r!=null&&(o.callback=r),t=ul(e,o,i),t!==null&&(Vo(t,e,i,n),Fg(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Jn(),i=dl(e),o=Qa(n,i);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=ul(e,o,i),t!==null&&(Vo(t,e,i,n),Fg(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Jn(),n=dl(e),i=Qa(r,n);i.tag=2,t!=null&&(i.callback=t),t=ul(e,i,n),t!==null&&(Vo(t,e,n,r),Fg(t,e,n))}};function NI(e,t,r,n,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,a):t.prototype&&t.prototype.isPureReactComponent?!Mp(r,n)||!Mp(i,o):!0}function qN(e,t,r){var n=!1,i=xl,o=t.contextType;return typeof o=="object"&&o!==null?o=po(o):(i=hi(t)?Fu:Un.current,n=t.contextTypes,o=(n=n!=null)?zd(e,i):xl),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ub,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function FI(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ub.enqueueReplaceState(t,t.state,null)}function K_(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},VC(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=po(o):(o=hi(t)?Fu:Un.current,i.context=zd(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(W_(e,t,o,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ub.enqueueReplaceState(i,i.state,null),zy(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Wd(e,t){try{var r="",n=t;do r+=MU(n),n=n.return;while(n);var i=r}catch(o){i=`
39
- Error generating stack: `+o.message+`
40
- `+o.stack}return{value:e,source:t,stack:i,digest:null}}function S1(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function G_(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var u9=typeof WeakMap=="function"?WeakMap:Map;function HN(e,t,r){r=Qa(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ky||(Ky=!0,ix=n),G_(e,t)},r}function WN(e,t,r){r=Qa(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){G_(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){G_(e,t),typeof n!="function"&&(cl===null?cl=new Set([this]):cl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function LI(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new u9;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=x9.bind(null,e,t,r),t.then(e,e))}function BI(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function VI(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Qa(-1,1),t.tag=2,ul(r,t,1))),r.lanes|=1),e)}var c9=Ps.ReactCurrentOwner,li=!1;function Wn(e,t,r,n){t.child=e===null?SN(t,null,r,n):qd(t,e.child,r,n)}function zI(e,t,r,n,i){r=r.render;var o=t.ref;return Td(t,i),n=WC(e,t,r,n,o,i),r=KC(),e!==null&&!li?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cs(e,t,i)):(xr&&r&&AC(t),t.flags|=1,Wn(e,t,n,i),t.child)}function UI(e,t,r,n,i){if(e===null){var o=r.type;return typeof o=="function"&&!nE(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,KN(e,t,o,n,i)):(e=qg(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:Mp,r(a,n)&&e.ref===t.ref)return cs(e,t,i)}return t.flags|=1,e=fl(o,n),e.ref=t.ref,e.return=t,t.child=e}function KN(e,t,r,n,i){if(e!==null){var o=e.memoizedProps;if(Mp(o,n)&&e.ref===t.ref)if(li=!1,t.pendingProps=n=o,(e.lanes&i)!==0)e.flags&131072&&(li=!0);else return t.lanes=e.lanes,cs(e,t,i)}return Q_(e,t,r,n,i)}function GN(e,t,r){var n=t.pendingProps,i=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ar(rd,Ti),Ti|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ar(rd,Ti),Ti|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ar(rd,Ti),Ti|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,ar(rd,Ti),Ti|=n;return Wn(e,t,i,r),t.child}function QN(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Q_(e,t,r,n,i){var o=hi(r)?Fu:Un.current;return o=zd(t,o),Td(t,i),r=WC(e,t,r,n,o,i),n=KC(),e!==null&&!li?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cs(e,t,i)):(xr&&n&&AC(t),t.flags|=1,Wn(e,t,r,i),t.child)}function qI(e,t,r,n,i){if(hi(r)){var o=!0;Ny(t)}else o=!1;if(Td(t,i),t.stateNode===null)Vg(e,t),qN(t,r,n),K_(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=po(u):(u=hi(r)?Fu:Un.current,u=zd(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==u)&&FI(t,a,n,u),Us=!1;var f=t.memoizedState;a.state=f,zy(t,n,a,i),l=t.memoizedState,s!==n||f!==l||fi.current||Us?(typeof c=="function"&&(W_(t,r,c,n),l=t.memoizedState),(s=Us||NI(t,r,s,n,f,l,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=u,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,xN(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:jo(t.type,s),a.props=u,d=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=po(l):(l=hi(r)?Fu:Un.current,l=zd(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&FI(t,a,n,l),Us=!1,f=t.memoizedState,a.state=f,zy(t,n,a,i);var m=t.memoizedState;s!==d||f!==m||fi.current||Us?(typeof h=="function"&&(W_(t,r,h,n),m=t.memoizedState),(u=Us||NI(t,r,u,n,f,m,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),a.props=n,a.state=m,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Y_(e,t,r,n,o,i)}function Y_(e,t,r,n,i,o){QN(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&RI(t,r,!1),cs(e,t,o);n=t.stateNode,c9.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=qd(t,e.child,null,o),t.child=qd(t,null,s,o)):Wn(e,t,s,o),t.memoizedState=n.state,i&&RI(t,r,!0),t.child}function YN(e){var t=e.stateNode;t.pendingContext?OI(e,t.pendingContext,t.pendingContext!==t.context):t.context&&OI(e,t.context,!1),zC(e,t.containerInfo)}function HI(e,t,r,n,i){return Ud(),MC(i),t.flags|=256,Wn(e,t,r,n),t.child}var X_={dehydrated:null,treeContext:null,retryLane:0};function J_(e){return{baseLanes:e,cachePool:null,transitions:null}}function XN(e,t,r){var n=t.pendingProps,i=Ir.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ar(Ir,i&1),e===null)return q_(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,o?(n=t.mode,o=t.child,a={mode:"hidden",children:a},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=fb(a,n,0,null),e=Tu(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=J_(r),t.memoizedState=X_,e):YC(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return d9(e,t,a,n,s,i,r);if(o){o=n.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=fl(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=fl(s,o):(o=Tu(o,a,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,a=e.child.memoizedState,a=a===null?J_(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~r,t.memoizedState=X_,n}return o=e.child,e=o.sibling,n=fl(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function YC(e,t){return t=fb({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yv(e,t,r,n){return n!==null&&MC(n),qd(t,e.child,null,r),e=YC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d9(e,t,r,n,i,o,a){if(r)return t.flags&256?(t.flags&=-257,n=S1(Error(he(422))),Yv(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,i=t.mode,n=fb({mode:"visible",children:n.children},i,0,null),o=Tu(o,i,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&qd(t,e.child,null,a),t.child.memoizedState=J_(a),t.memoizedState=X_,o);if(!(t.mode&1))return Yv(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(he(419)),n=S1(o,n,void 0),Yv(e,t,a,n)}if(s=(a&e.childLanes)!==0,li||s){if(n=bn,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,us(e,i),Vo(n,e,i,-1))}return rE(),n=S1(Error(he(421))),Yv(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=P9.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ii=ll(i.nextSibling),ji=t,xr=!0,Do=null,e!==null&&(ro[no++]=Ha,ro[no++]=Wa,ro[no++]=Lu,Ha=e.id,Wa=e.overflow,Lu=t),t=YC(t,n.children),t.flags|=4096,t)}function WI(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),H_(e.return,t,r)}function _1(e,t,r,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function JN(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(Wn(e,t,n.children,r),n=Ir.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&WI(e,r,t);else if(e.tag===19)WI(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ar(Ir,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Uy(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),_1(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Uy(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}_1(t,!0,r,null,o);break;case"together":_1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Vu|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(he(153));if(t.child!==null){for(e=t.child,r=fl(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=fl(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function f9(e,t,r){switch(t.tag){case 3:YN(t),Ud();break;case 5:PN(t);break;case 1:hi(t.type)&&Ny(t);break;case 4:zC(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;ar(By,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ar(Ir,Ir.current&1),t.flags|=128,null):r&t.child.childLanes?XN(e,t,r):(ar(Ir,Ir.current&1),e=cs(e,t,r),e!==null?e.sibling:null);ar(Ir,Ir.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return JN(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ar(Ir,Ir.current),n)break;return null;case 22:case 23:return t.lanes=0,GN(e,t,r)}return cs(e,t,r)}var ZN,Z_,e4,t4;ZN=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Z_=function(){};e4=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,wu(xa.current);var o=null;switch(r){case"input":i=S_(e,i),n=S_(e,n),o=[];break;case"select":i=$r({},i,{value:void 0}),n=$r({},n,{value:void 0}),o=[];break;case"textarea":i=P_(e,i),n=P_(e,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Dy)}E_(r,n);var a;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Rp.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Rp.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&dr("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};t4=function(e,t,r,n){r!==n&&(t.flags|=4)};function ah(e,t){if(!xr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function h9(e,t,r){var n=t.pendingProps;switch(DC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fn(t),null;case 1:return hi(t.type)&&My(),Fn(t),null;case 3:return n=t.stateNode,Hd(),vr(fi),vr(Un),qC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Do!==null&&(sx(Do),Do=null))),Z_(e,t),Fn(t),null;case 5:UC(t);var i=wu(Vp.current);if(r=t.type,e!==null&&t.stateNode!=null)e4(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(he(166));return Fn(t),null}if(e=wu(xa.current),Gv(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[ma]=t,n[Lp]=o,e=(t.mode&1)!==0,r){case"dialog":dr("cancel",n),dr("close",n);break;case"iframe":case"object":case"embed":dr("load",n);break;case"video":case"audio":for(i=0;i<jh.length;i++)dr(jh[i],n);break;case"source":dr("error",n);break;case"img":case"image":case"link":dr("error",n),dr("load",n);break;case"details":dr("toggle",n);break;case"input":tI(n,o),dr("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},dr("invalid",n);break;case"textarea":nI(n,o),dr("invalid",n)}E_(r,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&Kv(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Kv(n.textContent,s,e),i=["children",""+s]):Rp.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&dr("scroll",n)}switch(r){case"input":Lv(n),rI(n,o,!0);break;case"textarea":Lv(n),iI(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Dy)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=RM(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[ma]=t,e[Lp]=n,ZN(e,t,!1,!1),t.stateNode=e;e:{switch(a=T_(r,n),r){case"dialog":dr("cancel",e),dr("close",e),i=n;break;case"iframe":case"object":case"embed":dr("load",e),i=n;break;case"video":case"audio":for(i=0;i<jh.length;i++)dr(jh[i],e);i=n;break;case"source":dr("error",e),i=n;break;case"img":case"image":case"link":dr("error",e),dr("load",e),i=n;break;case"details":dr("toggle",e),i=n;break;case"input":tI(e,n),i=S_(e,n),dr("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=$r({},n,{value:void 0}),dr("invalid",e);break;case"textarea":nI(e,n),i=P_(e,n),dr("invalid",e);break;default:i=n}E_(r,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?jM(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&IM(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Ip(e,l):typeof l=="number"&&Ip(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Rp.hasOwnProperty(o)?l!=null&&o==="onScroll"&&dr("scroll",e):l!=null&&wC(e,o,l,a))}switch(r){case"input":Lv(e),rI(e,n,!1);break;case"textarea":Lv(e),iI(e);break;case"option":n.value!=null&&e.setAttribute("value",""+_l(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?xd(e,!!n.multiple,o,!1):n.defaultValue!=null&&xd(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Dy)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Fn(t),null;case 6:if(e&&t.stateNode!=null)t4(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(he(166));if(r=wu(Vp.current),wu(xa.current),Gv(t)){if(n=t.stateNode,r=t.memoizedProps,n[ma]=t,(o=n.nodeValue!==r)&&(e=ji,e!==null))switch(e.tag){case 3:Kv(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Kv(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ma]=t,t.stateNode=n}return Fn(t),null;case 13:if(vr(Ir),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xr&&Ii!==null&&t.mode&1&&!(t.flags&128))bN(),Ud(),t.flags|=98560,o=!1;else if(o=Gv(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(he(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(he(317));o[ma]=t}else Ud(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fn(t),o=!1}else Do!==null&&(sx(Do),Do=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Ir.current&1?ln===0&&(ln=3):rE())),t.updateQueue!==null&&(t.flags|=4),Fn(t),null);case 4:return Hd(),Z_(e,t),e===null&&Np(t.stateNode.containerInfo),Fn(t),null;case 10:return LC(t.type._context),Fn(t),null;case 17:return hi(t.type)&&My(),Fn(t),null;case 19:if(vr(Ir),o=t.memoizedState,o===null)return Fn(t),null;if(n=(t.flags&128)!==0,a=o.rendering,a===null)if(n)ah(o,!1);else{if(ln!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Uy(e),a!==null){for(t.flags|=128,ah(o,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ar(Ir,Ir.current&1|2),t.child}e=e.sibling}o.tail!==null&&Hr()>Kd&&(t.flags|=128,n=!0,ah(o,!1),t.lanes=4194304)}else{if(!n)if(e=Uy(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ah(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!xr)return Fn(t),null}else 2*Hr()-o.renderingStartTime>Kd&&r!==1073741824&&(t.flags|=128,n=!0,ah(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Hr(),t.sibling=null,r=Ir.current,ar(Ir,n?r&1|2:r&1),t):(Fn(t),null);case 22:case 23:return tE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ti&1073741824&&(Fn(t),t.subtreeFlags&6&&(t.flags|=8192)):Fn(t),null;case 24:return null;case 25:return null}throw Error(he(156,t.tag))}function p9(e,t){switch(DC(t),t.tag){case 1:return hi(t.type)&&My(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hd(),vr(fi),vr(Un),qC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return UC(t),null;case 13:if(vr(Ir),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(he(340));Ud()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vr(Ir),null;case 4:return Hd(),null;case 10:return LC(t.type._context),null;case 22:case 23:return tE(),null;case 24:return null;default:return null}}var Xv=!1,Vn=!1,m9=typeof WeakSet=="function"?WeakSet:Set,Te=null;function td(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Nr(e,t,n)}else r.current=null}function ex(e,t,r){try{r()}catch(n){Nr(e,t,n)}}var KI=!1;function v9(e,t){if(N_=jy,e=aN(),$C(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||i!==0&&d.nodeType!==3||(s=a+i),d!==o||n!==0&&d.nodeType!==3||(l=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===i&&(s=a),f===o&&++c===n&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(F_={focusedElem:e,selectionRange:r},jy=!1,Te=t;Te!==null;)if(t=Te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Te=e;else for(;Te!==null;){t=Te;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:jo(t.type,v),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(he(163))}}catch(_){Nr(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Te=e;break}Te=t.return}return m=KI,KI=!1,m}function Gh(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&ex(t,r,o)}i=i.next}while(i!==n)}}function cb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function tx(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function r4(e){var t=e.alternate;t!==null&&(e.alternate=null,r4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ma],delete t[Lp],delete t[V_],delete t[J7],delete t[Z7])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function n4(e){return e.tag===5||e.tag===3||e.tag===4}function GI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||n4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Dy));else if(n!==4&&(e=e.child,e!==null))for(rx(e,t,r),e=e.sibling;e!==null;)rx(e,t,r),e=e.sibling}function nx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(nx(e,t,r),e=e.sibling;e!==null;)nx(e,t,r),e=e.sibling}var Cn=null,$o=!1;function ks(e,t,r){for(r=r.child;r!==null;)i4(e,t,r),r=r.sibling}function i4(e,t,r){if(_a&&typeof _a.onCommitFiberUnmount=="function")try{_a.onCommitFiberUnmount(rb,r)}catch{}switch(r.tag){case 5:Vn||td(r,t);case 6:var n=Cn,i=$o;Cn=null,ks(e,t,r),Cn=n,$o=i,Cn!==null&&($o?(e=Cn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Cn.removeChild(r.stateNode));break;case 18:Cn!==null&&($o?(e=Cn,r=r.stateNode,e.nodeType===8?m1(e.parentNode,r):e.nodeType===1&&m1(e,r),Ap(e)):m1(Cn,r.stateNode));break;case 4:n=Cn,i=$o,Cn=r.stateNode.containerInfo,$o=!0,ks(e,t,r),Cn=n,$o=i;break;case 0:case 11:case 14:case 15:if(!Vn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&ex(r,t,a),i=i.next}while(i!==n)}ks(e,t,r);break;case 1:if(!Vn&&(td(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Nr(r,t,s)}ks(e,t,r);break;case 21:ks(e,t,r);break;case 22:r.mode&1?(Vn=(n=Vn)||r.memoizedState!==null,ks(e,t,r),Vn=n):ks(e,t,r);break;default:ks(e,t,r)}}function QI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new m9),t.forEach(function(n){var i=C9.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function To(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Cn=s.stateNode,$o=!1;break e;case 3:Cn=s.stateNode.containerInfo,$o=!0;break e;case 4:Cn=s.stateNode.containerInfo,$o=!0;break e}s=s.return}if(Cn===null)throw Error(he(160));i4(o,a,i),Cn=null,$o=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Nr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)o4(t,e),t=t.sibling}function o4(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(To(t,e),aa(e),n&4){try{Gh(3,e,e.return),cb(3,e)}catch(v){Nr(e,e.return,v)}try{Gh(5,e,e.return)}catch(v){Nr(e,e.return,v)}}break;case 1:To(t,e),aa(e),n&512&&r!==null&&td(r,r.return);break;case 5:if(To(t,e),aa(e),n&512&&r!==null&&td(r,r.return),e.flags&32){var i=e.stateNode;try{Ip(i,"")}catch(v){Nr(e,e.return,v)}}if(n&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=r!==null?r.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&TM(i,o),T_(s,a);var u=T_(s,o);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];c==="style"?jM(i,d):c==="dangerouslySetInnerHTML"?IM(i,d):c==="children"?Ip(i,d):wC(i,c,d,u)}switch(s){case"input":__(i,o);break;case"textarea":OM(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?xd(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?xd(i,!!o.multiple,o.defaultValue,!0):xd(i,!!o.multiple,o.multiple?[]:"",!1))}i[Lp]=o}catch(v){Nr(e,e.return,v)}}break;case 6:if(To(t,e),aa(e),n&4){if(e.stateNode===null)throw Error(he(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){Nr(e,e.return,v)}}break;case 3:if(To(t,e),aa(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ap(t.containerInfo)}catch(v){Nr(e,e.return,v)}break;case 4:To(t,e),aa(e);break;case 13:To(t,e),aa(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ZC=Hr())),n&4&&QI(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Vn=(u=Vn)||c,To(t,e),Vn=u):To(t,e),aa(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Te=e,c=e.child;c!==null;){for(d=Te=c;Te!==null;){switch(f=Te,h=f.child,f.tag){case 0:case 11:case 14:case 15:Gh(4,f,f.return);break;case 1:td(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){Nr(n,r,v)}}break;case 5:td(f,f.return);break;case 22:if(f.memoizedState!==null){XI(d);continue}}h!==null?(h.return=f,Te=h):XI(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=kM("display",a))}catch(v){Nr(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){Nr(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:To(t,e),aa(e),n&4&&QI(e);break;case 21:break;default:To(t,e),aa(e)}}function aa(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(n4(r)){var n=r;break e}r=r.return}throw Error(he(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Ip(i,""),n.flags&=-33);var o=GI(e);nx(e,o,i);break;case 3:case 4:var a=n.stateNode.containerInfo,s=GI(e);rx(e,s,a);break;default:throw Error(he(161))}}catch(l){Nr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g9(e,t,r){Te=e,a4(e)}function a4(e,t,r){for(var n=(e.mode&1)!==0;Te!==null;){var i=Te,o=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Xv;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Vn;s=Xv;var u=Vn;if(Xv=a,(Vn=l)&&!u)for(Te=i;Te!==null;)a=Te,l=a.child,a.tag===22&&a.memoizedState!==null?JI(i):l!==null?(l.return=a,Te=l):JI(i);for(;o!==null;)Te=o,a4(o),o=o.sibling;Te=i,Xv=s,Vn=u}YI(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Te=o):YI(e)}}function YI(e){for(;Te!==null;){var t=Te;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Vn||cb(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Vn)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:jo(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&AI(t,o,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}AI(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ap(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(he(163))}Vn||t.flags&512&&tx(t)}catch(f){Nr(t,t.return,f)}}if(t===e){Te=null;break}if(r=t.sibling,r!==null){r.return=t.return,Te=r;break}Te=t.return}}function XI(e){for(;Te!==null;){var t=Te;if(t===e){Te=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Te=r;break}Te=t.return}}function JI(e){for(;Te!==null;){var t=Te;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{cb(4,t)}catch(l){Nr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){Nr(t,i,l)}}var o=t.return;try{tx(t)}catch(l){Nr(t,o,l)}break;case 5:var a=t.return;try{tx(t)}catch(l){Nr(t,a,l)}}}catch(l){Nr(t,t.return,l)}if(t===e){Te=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Te=s;break}Te=t.return}}var y9=Math.ceil,Wy=Ps.ReactCurrentDispatcher,XC=Ps.ReactCurrentOwner,fo=Ps.ReactCurrentBatchConfig,Rt=0,bn=null,Zr=null,In=0,Ti=0,rd=Nl(0),ln=0,Hp=null,Vu=0,db=0,JC=0,Qh=null,ai=null,ZC=0,Kd=1/0,Va=null,Ky=!1,ix=null,cl=null,Jv=!1,tl=null,Gy=0,Yh=0,ox=null,zg=-1,Ug=0;function Jn(){return Rt&6?Hr():zg!==-1?zg:zg=Hr()}function dl(e){return e.mode&1?Rt&2&&In!==0?In&-In:t9.transition!==null?(Ug===0&&(Ug=qM()),Ug):(e=Yt,e!==0||(e=window.event,e=e===void 0?16:XM(e.type)),e):1}function Vo(e,t,r,n){if(50<Yh)throw Yh=0,ox=null,Error(he(185));Lm(e,r,n),(!(Rt&2)||e!==bn)&&(e===bn&&(!(Rt&2)&&(db|=r),ln===4&&Qs(e,In)),pi(e,n),r===1&&Rt===0&&!(t.mode&1)&&(Kd=Hr()+500,sb&&Fl()))}function pi(e,t){var r=e.callbackNode;t7(e,t);var n=ky(e,e===bn?In:0);if(n===0)r!==null&&sI(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&sI(r),t===1)e.tag===0?e9(ZI.bind(null,e)):vN(ZI.bind(null,e)),Y7(function(){!(Rt&6)&&Fl()}),r=null;else{switch(HM(n)){case 1:r=CC;break;case 4:r=zM;break;case 16:r=Iy;break;case 536870912:r=UM;break;default:r=Iy}r=p4(r,s4.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function s4(e,t){if(zg=-1,Ug=0,Rt&6)throw Error(he(327));var r=e.callbackNode;if(Od()&&e.callbackNode!==r)return null;var n=ky(e,e===bn?In:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Qy(e,n);else{t=n;var i=Rt;Rt|=2;var o=u4();(bn!==e||In!==t)&&(Va=null,Kd=Hr()+500,Eu(e,t));do try{S9();break}catch(s){l4(e,s)}while(!0);FC(),Wy.current=o,Rt=i,Zr!==null?t=0:(bn=null,In=0,t=ln)}if(t!==0){if(t===2&&(i=j_(e),i!==0&&(n=i,t=ax(e,i))),t===1)throw r=Hp,Eu(e,0),Qs(e,n),pi(e,Hr()),r;if(t===6)Qs(e,n);else{if(i=e.current.alternate,!(n&30)&&!b9(i)&&(t=Qy(e,n),t===2&&(o=j_(e),o!==0&&(n=o,t=ax(e,o))),t===1))throw r=Hp,Eu(e,0),Qs(e,n),pi(e,Hr()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(he(345));case 2:au(e,ai,Va);break;case 3:if(Qs(e,n),(n&130023424)===n&&(t=ZC+500-Hr(),10<t)){if(ky(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Jn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=B_(au.bind(null,e,ai,Va),t);break}au(e,ai,Va);break;case 4:if(Qs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-Bo(n);o=1<<a,a=t[a],a>i&&(i=a),n&=~o}if(n=i,n=Hr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*y9(n/1960))-n,10<n){e.timeoutHandle=B_(au.bind(null,e,ai,Va),n);break}au(e,ai,Va);break;case 5:au(e,ai,Va);break;default:throw Error(he(329))}}}return pi(e,Hr()),e.callbackNode===r?s4.bind(null,e):null}function ax(e,t){var r=Qh;return e.current.memoizedState.isDehydrated&&(Eu(e,t).flags|=256),e=Qy(e,t),e!==2&&(t=ai,ai=r,t!==null&&sx(t)),e}function sx(e){ai===null?ai=e:ai.push.apply(ai,e)}function b9(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!Qo(o(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qs(e,t){for(t&=~JC,t&=~db,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Bo(t),n=1<<r;e[r]=-1,t&=~n}}function ZI(e){if(Rt&6)throw Error(he(327));Od();var t=ky(e,0);if(!(t&1))return pi(e,Hr()),null;var r=Qy(e,t);if(e.tag!==0&&r===2){var n=j_(e);n!==0&&(t=n,r=ax(e,n))}if(r===1)throw r=Hp,Eu(e,0),Qs(e,t),pi(e,Hr()),r;if(r===6)throw Error(he(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,au(e,ai,Va),pi(e,Hr()),null}function eE(e,t){var r=Rt;Rt|=1;try{return e(t)}finally{Rt=r,Rt===0&&(Kd=Hr()+500,sb&&Fl())}}function zu(e){tl!==null&&tl.tag===0&&!(Rt&6)&&Od();var t=Rt;Rt|=1;var r=fo.transition,n=Yt;try{if(fo.transition=null,Yt=1,e)return e()}finally{Yt=n,fo.transition=r,Rt=t,!(Rt&6)&&Fl()}}function tE(){Ti=rd.current,vr(rd)}function Eu(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Q7(r)),Zr!==null)for(r=Zr.return;r!==null;){var n=r;switch(DC(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&My();break;case 3:Hd(),vr(fi),vr(Un),qC();break;case 5:UC(n);break;case 4:Hd();break;case 13:vr(Ir);break;case 19:vr(Ir);break;case 10:LC(n.type._context);break;case 22:case 23:tE()}r=r.return}if(bn=e,Zr=e=fl(e.current,null),In=Ti=t,ln=0,Hp=null,JC=db=Vu=0,ai=Qh=null,bu!==null){for(t=0;t<bu.length;t++)if(r=bu[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=i,n.next=a}r.pending=n}bu=null}return e}function l4(e,t){do{var r=Zr;try{if(FC(),Lg.current=Hy,qy){for(var n=jr.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}qy=!1}if(Bu=0,pn=rn=jr=null,Kh=!1,zp=0,XC.current=null,r===null||r.return===null){ln=1,Hp=t,Zr=null;break}e:{var o=e,a=r.return,s=r,l=t;if(t=In,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=BI(a);if(h!==null){h.flags&=-257,VI(h,a,s,o,t),h.mode&1&&LI(o,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){LI(o,u,t),rE();break e}l=Error(he(426))}}else if(xr&&s.mode&1){var w=BI(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),VI(w,a,s,o,t),MC(Wd(l,s));break e}}o=l=Wd(l,s),ln!==4&&(ln=2),Qh===null?Qh=[o]:Qh.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=HN(o,l,t);$I(o,p);break e;case 1:s=l;var g=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(cl===null||!cl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=WN(o,s,t);$I(o,_);break e}}o=o.return}while(o!==null)}d4(r)}catch(P){t=P,Zr===r&&r!==null&&(Zr=r=r.return);continue}break}while(!0)}function u4(){var e=Wy.current;return Wy.current=Hy,e===null?Hy:e}function rE(){(ln===0||ln===3||ln===2)&&(ln=4),bn===null||!(Vu&268435455)&&!(db&268435455)||Qs(bn,In)}function Qy(e,t){var r=Rt;Rt|=2;var n=u4();(bn!==e||In!==t)&&(Va=null,Eu(e,t));do try{w9();break}catch(i){l4(e,i)}while(!0);if(FC(),Rt=r,Wy.current=n,Zr!==null)throw Error(he(261));return bn=null,In=0,ln}function w9(){for(;Zr!==null;)c4(Zr)}function S9(){for(;Zr!==null&&!WU();)c4(Zr)}function c4(e){var t=h4(e.alternate,e,Ti);e.memoizedProps=e.pendingProps,t===null?d4(e):Zr=t,XC.current=null}function d4(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=p9(r,t),r!==null){r.flags&=32767,Zr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ln=6,Zr=null;return}}else if(r=h9(r,t,Ti),r!==null){Zr=r;return}if(t=t.sibling,t!==null){Zr=t;return}Zr=t=e}while(t!==null);ln===0&&(ln=5)}function au(e,t,r){var n=Yt,i=fo.transition;try{fo.transition=null,Yt=1,_9(e,t,r,n)}finally{fo.transition=i,Yt=n}return null}function _9(e,t,r,n){do Od();while(tl!==null);if(Rt&6)throw Error(he(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(he(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(r7(e,o),e===bn&&(Zr=bn=null,In=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Jv||(Jv=!0,p4(Iy,function(){return Od(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=fo.transition,fo.transition=null;var a=Yt;Yt=1;var s=Rt;Rt|=4,XC.current=null,v9(e,r),o4(r,e),z7(F_),jy=!!N_,F_=N_=null,e.current=r,g9(r),KU(),Rt=s,Yt=a,fo.transition=o}else e.current=r;if(Jv&&(Jv=!1,tl=e,Gy=i),o=e.pendingLanes,o===0&&(cl=null),YU(r.stateNode),pi(e,Hr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Ky)throw Ky=!1,e=ix,ix=null,e;return Gy&1&&e.tag!==0&&Od(),o=e.pendingLanes,o&1?e===ox?Yh++:(Yh=0,ox=e):Yh=0,Fl(),null}function Od(){if(tl!==null){var e=HM(Gy),t=fo.transition,r=Yt;try{if(fo.transition=null,Yt=16>e?16:e,tl===null)var n=!1;else{if(e=tl,tl=null,Gy=0,Rt&6)throw Error(he(331));var i=Rt;for(Rt|=4,Te=e.current;Te!==null;){var o=Te,a=o.child;if(Te.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Te=u;Te!==null;){var c=Te;switch(c.tag){case 0:case 11:case 15:Gh(8,c,o)}var d=c.child;if(d!==null)d.return=c,Te=d;else for(;Te!==null;){c=Te;var f=c.sibling,h=c.return;if(r4(c),c===u){Te=null;break}if(f!==null){f.return=h,Te=f;break}Te=h}}}var m=o.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}Te=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,Te=a;else e:for(;Te!==null;){if(o=Te,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Gh(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,Te=p;break e}Te=o.return}}var g=e.current;for(Te=g;Te!==null;){a=Te;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,Te=b;else e:for(a=g;Te!==null;){if(s=Te,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:cb(9,s)}}catch(P){Nr(s,s.return,P)}if(s===a){Te=null;break e}var _=s.sibling;if(_!==null){_.return=s.return,Te=_;break e}Te=s.return}}if(Rt=i,Fl(),_a&&typeof _a.onPostCommitFiberRoot=="function")try{_a.onPostCommitFiberRoot(rb,e)}catch{}n=!0}return n}finally{Yt=r,fo.transition=t}}return!1}function ek(e,t,r){t=Wd(r,t),t=HN(e,t,1),e=ul(e,t,1),t=Jn(),e!==null&&(Lm(e,1,t),pi(e,t))}function Nr(e,t,r){if(e.tag===3)ek(e,e,r);else for(;t!==null;){if(t.tag===3){ek(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(cl===null||!cl.has(n))){e=Wd(r,e),e=WN(t,e,1),t=ul(t,e,1),e=Jn(),t!==null&&(Lm(t,1,e),pi(t,e));break}}t=t.return}}function x9(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Jn(),e.pingedLanes|=e.suspendedLanes&r,bn===e&&(In&r)===r&&(ln===4||ln===3&&(In&130023424)===In&&500>Hr()-ZC?Eu(e,0):JC|=r),pi(e,t)}function f4(e,t){t===0&&(e.mode&1?(t=zv,zv<<=1,!(zv&130023424)&&(zv=4194304)):t=1);var r=Jn();e=us(e,t),e!==null&&(Lm(e,t,r),pi(e,r))}function P9(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),f4(e,r)}function C9(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(he(314))}n!==null&&n.delete(t),f4(e,r)}var h4;h4=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||fi.current)li=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return li=!1,f9(e,t,r);li=!!(e.flags&131072)}else li=!1,xr&&t.flags&1048576&&gN(t,Ly,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Vg(e,t),e=t.pendingProps;var i=zd(t,Un.current);Td(t,r),i=WC(null,t,n,e,i,r);var o=KC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,hi(n)?(o=!0,Ny(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,VC(t),i.updater=ub,t.stateNode=i,i._reactInternals=t,K_(t,n,e,r),t=Y_(null,t,n,!0,o,r)):(t.tag=0,xr&&o&&AC(t),Wn(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Vg(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=T9(n),e=jo(n,e),i){case 0:t=Q_(null,t,n,e,r);break e;case 1:t=qI(null,t,n,e,r);break e;case 11:t=zI(null,t,n,e,r);break e;case 14:t=UI(null,t,n,jo(n.type,e),r);break e}throw Error(he(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jo(n,i),Q_(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jo(n,i),qI(e,t,n,i,r);case 3:e:{if(YN(t),e===null)throw Error(he(387));n=t.pendingProps,o=t.memoizedState,i=o.element,xN(e,t),zy(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wd(Error(he(423)),t),t=HI(e,t,n,r,i);break e}else if(n!==i){i=Wd(Error(he(424)),t),t=HI(e,t,n,r,i);break e}else for(Ii=ll(t.stateNode.containerInfo.firstChild),ji=t,xr=!0,Do=null,r=SN(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ud(),n===i){t=cs(e,t,r);break e}Wn(e,t,n,r)}t=t.child}return t;case 5:return PN(t),e===null&&q_(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,L_(n,i)?a=null:o!==null&&L_(n,o)&&(t.flags|=32),QN(e,t),Wn(e,t,a,r),t.child;case 6:return e===null&&q_(t),null;case 13:return XN(e,t,r);case 4:return zC(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qd(t,null,n,r):Wn(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jo(n,i),zI(e,t,n,i,r);case 7:return Wn(e,t,t.pendingProps,r),t.child;case 8:return Wn(e,t,t.pendingProps.children,r),t.child;case 12:return Wn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,ar(By,n._currentValue),n._currentValue=a,o!==null)if(Qo(o.value,a)){if(o.children===i.children&&!fi.current){t=cs(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Qa(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),H_(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(he(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),H_(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Wn(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Td(t,r),i=po(i),n=n(i),t.flags|=1,Wn(e,t,n,r),t.child;case 14:return n=t.type,i=jo(n,t.pendingProps),i=jo(n.type,i),UI(e,t,n,i,r);case 15:return KN(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:jo(n,i),Vg(e,t),t.tag=1,hi(n)?(e=!0,Ny(t)):e=!1,Td(t,r),qN(t,n,i),K_(t,n,i,r),Y_(null,t,n,!0,e,r);case 19:return JN(e,t,r);case 22:return GN(e,t,r)}throw Error(he(156,t.tag))};function p4(e,t){return VM(e,t)}function E9(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function so(e,t,r,n){return new E9(e,t,r,n)}function nE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T9(e){if(typeof e=="function")return nE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_C)return 11;if(e===xC)return 14}return 2}function fl(e,t){var r=e.alternate;return r===null?(r=so(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function qg(e,t,r,n,i,o){var a=2;if(n=e,typeof e=="function")nE(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wc:return Tu(r.children,i,o,t);case SC:a=8,i|=8;break;case g_:return e=so(12,r,t,i|2),e.elementType=g_,e.lanes=o,e;case y_:return e=so(13,r,t,i),e.elementType=y_,e.lanes=o,e;case b_:return e=so(19,r,t,i),e.elementType=b_,e.lanes=o,e;case PM:return fb(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _M:a=10;break e;case xM:a=9;break e;case _C:a=11;break e;case xC:a=14;break e;case zs:a=16,n=null;break e}throw Error(he(130,e==null?e:typeof e,""))}return t=so(a,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function Tu(e,t,r,n){return e=so(7,e,n,t),e.lanes=r,e}function fb(e,t,r,n){return e=so(22,e,n,t),e.elementType=PM,e.lanes=r,e.stateNode={isHidden:!1},e}function x1(e,t,r){return e=so(6,e,null,t),e.lanes=r,e}function P1(e,t,r){return t=so(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function O9(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=i1(0),this.expirationTimes=i1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=i1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function iE(e,t,r,n,i,o,a,s,l){return e=new O9(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=so(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},VC(o),e}function R9(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function m4(e){if(!e)return xl;e=e._reactInternals;e:{if(oc(e)!==e||e.tag!==1)throw Error(he(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(hi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(he(171))}if(e.tag===1){var r=e.type;if(hi(r))return mN(e,r,t)}return t}function v4(e,t,r,n,i,o,a,s,l){return e=iE(r,n,!0,e,i,o,a,s,l),e.context=m4(null),r=e.current,n=Jn(),i=dl(r),o=Qa(n,i),o.callback=t??null,ul(r,o,i),e.current.lanes=i,Lm(e,i,n),pi(e,n),e}function hb(e,t,r,n){var i=t.current,o=Jn(),a=dl(i);return r=m4(r),t.context===null?t.context=r:t.pendingContext=r,t=Qa(o,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ul(i,t,a),e!==null&&(Vo(e,i,a,o),Fg(e,i,a)),a}function Yy(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function oE(e,t){tk(e,t),(e=e.alternate)&&tk(e,t)}function I9(){return null}var g4=typeof reportError=="function"?reportError:function(e){console.error(e)};function aE(e){this._internalRoot=e}pb.prototype.render=aE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(he(409));hb(e,t,null,null)};pb.prototype.unmount=aE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zu(function(){hb(null,e,null,null)}),t[ls]=null}};function pb(e){this._internalRoot=e}pb.prototype.unstable_scheduleHydration=function(e){if(e){var t=GM();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Gs.length&&t!==0&&t<Gs[r].priority;r++);Gs.splice(r,0,e),r===0&&YM(e)}};function sE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function mb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rk(){}function k9(e,t,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var u=Yy(a);o.call(u)}}var a=v4(t,n,e,0,null,!1,!1,"",rk);return e._reactRootContainer=a,e[ls]=a.current,Np(e.nodeType===8?e.parentNode:e),zu(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=Yy(l);s.call(u)}}var l=iE(e,0,!1,null,null,!1,!1,"",rk);return e._reactRootContainer=l,e[ls]=l.current,Np(e.nodeType===8?e.parentNode:e),zu(function(){hb(t,l,r,n)}),l}function vb(e,t,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=Yy(a);s.call(l)}}hb(t,a,e,i)}else a=k9(r,t,e,i,n);return Yy(a)}WM=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=kh(t.pendingLanes);r!==0&&(EC(t,r|1),pi(t,Hr()),!(Rt&6)&&(Kd=Hr()+500,Fl()))}break;case 13:zu(function(){var n=us(e,1);if(n!==null){var i=Jn();Vo(n,e,1,i)}}),oE(e,1)}};TC=function(e){if(e.tag===13){var t=us(e,134217728);if(t!==null){var r=Jn();Vo(t,e,134217728,r)}oE(e,134217728)}};KM=function(e){if(e.tag===13){var t=dl(e),r=us(e,t);if(r!==null){var n=Jn();Vo(r,e,t,n)}oE(e,t)}};GM=function(){return Yt};QM=function(e,t){var r=Yt;try{return Yt=e,t()}finally{Yt=r}};R_=function(e,t,r){switch(t){case"input":if(__(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ab(n);if(!i)throw Error(he(90));EM(n),__(n,i)}}}break;case"textarea":OM(e,r);break;case"select":t=r.value,t!=null&&xd(e,!!r.multiple,t,!1)}};DM=eE;MM=zu;var j9={usingClientEntryPoint:!1,Events:[Vm,Yc,ab,$M,AM,eE]},sh={findFiberByHostInstance:yu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$9={bundleType:sh.bundleType,version:sh.version,rendererPackageName:sh.rendererPackageName,rendererConfig:sh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ps.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=LM(e),e===null?null:e.stateNode},findFiberByHostInstance:sh.findFiberByHostInstance||I9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zv.isDisabled&&Zv.supportsFiber)try{rb=Zv.inject($9),_a=Zv}catch{}}Ui.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j9;Ui.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sE(t))throw Error(he(200));return R9(e,t,null,r)};Ui.createRoot=function(e,t){if(!sE(e))throw Error(he(299));var r=!1,n="",i=g4;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=iE(e,1,!1,null,null,r,!1,n,i),e[ls]=t.current,Np(e.nodeType===8?e.parentNode:e),new aE(t)};Ui.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(he(188)):(e=Object.keys(e).join(","),Error(he(268,e)));return e=LM(t),e=e===null?null:e.stateNode,e};Ui.flushSync=function(e){return zu(e)};Ui.hydrate=function(e,t,r){if(!mb(t))throw Error(he(200));return vb(null,e,t,!0,r)};Ui.hydrateRoot=function(e,t,r){if(!sE(e))throw Error(he(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",a=g4;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=v4(t,null,e,1,r??null,i,!1,o,a),e[ls]=t.current,Np(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new pb(t)};Ui.render=function(e,t,r){if(!mb(t))throw Error(he(200));return vb(null,e,t,!1,r)};Ui.unmountComponentAtNode=function(e){if(!mb(e))throw Error(he(40));return e._reactRootContainer?(zu(function(){vb(null,null,e,!1,function(){e._reactRootContainer=null,e[ls]=null})}),!0):!1};Ui.unstable_batchedUpdates=eE;Ui.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!mb(r))throw Error(he(200));if(e==null||e._reactInternals===void 0)throw Error(he(38));return vb(e,t,r,!1,n)};Ui.version="18.3.1-next-f1338f8080-20240426";function y4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y4)}catch(e){console.error(e)}}y4(),yM.exports=Ui;var Pf=yM.exports;const b4=nc(Pf),A9=eb({__proto__:null,default:b4},[Pf]);var w4,nk=Pf;w4=nk.createRoot,nk.hydrateRoot;const D9={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"0889935",MODE:"production",PACKAGE_VERSION:"0.10.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/-/graphql",REACT_APP_SWAGGER_SERVER_URL:"/-/api",SSR:!1},Hg=e=>{var n;const t=D9[e];return((n=window.__env__)==null?void 0:n[e])||t};function M9(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function N9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var F9=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(N9(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=M9(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Bn="-ms-",Xy="-moz-",Mt="-webkit-",S4="comm",lE="rule",uE="decl",L9="@import",_4="@keyframes",B9="@layer",V9=Math.abs,gb=String.fromCharCode,z9=Object.assign;function U9(e,t){return Tn(e,0)^45?(((t<<2^Tn(e,0))<<2^Tn(e,1))<<2^Tn(e,2))<<2^Tn(e,3):0}function x4(e){return e.trim()}function q9(e,t){return(e=t.exec(e))?e[0]:e}function Nt(e,t,r){return e.replace(t,r)}function lx(e,t){return e.indexOf(t)}function Tn(e,t){return e.charCodeAt(t)|0}function Wp(e,t,r){return e.slice(t,r)}function fa(e){return e.length}function cE(e){return e.length}function eg(e,t){return t.push(e),e}function H9(e,t){return e.map(t).join("")}var yb=1,Gd=1,P4=0,gi=0,Xr=0,Cf="";function bb(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:yb,column:Gd,length:a,return:""}}function lh(e,t){return z9(bb("",null,null,"",null,null,0),e,{length:-e.length},t)}function W9(){return Xr}function K9(){return Xr=gi>0?Tn(Cf,--gi):0,Gd--,Xr===10&&(Gd=1,yb--),Xr}function $i(){return Xr=gi<P4?Tn(Cf,gi++):0,Gd++,Xr===10&&(Gd=1,yb++),Xr}function Pa(){return Tn(Cf,gi)}function Wg(){return gi}function Um(e,t){return Wp(Cf,e,t)}function Kp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function C4(e){return yb=Gd=1,P4=fa(Cf=e),gi=0,[]}function E4(e){return Cf="",e}function Kg(e){return x4(Um(gi-1,ux(e===91?e+2:e===40?e+1:e)))}function G9(e){for(;(Xr=Pa())&&Xr<33;)$i();return Kp(e)>2||Kp(Xr)>3?"":" "}function Q9(e,t){for(;--t&&$i()&&!(Xr<48||Xr>102||Xr>57&&Xr<65||Xr>70&&Xr<97););return Um(e,Wg()+(t<6&&Pa()==32&&$i()==32))}function ux(e){for(;$i();)switch(Xr){case e:return gi;case 34:case 39:e!==34&&e!==39&&ux(Xr);break;case 40:e===41&&ux(e);break;case 92:$i();break}return gi}function Y9(e,t){for(;$i()&&e+Xr!==57;)if(e+Xr===84&&Pa()===47)break;return"/*"+Um(t,gi-1)+"*"+gb(e===47?e:$i())}function X9(e){for(;!Kp(Pa());)$i();return Um(e,gi)}function J9(e){return E4(Gg("",null,null,null,[""],e=C4(e),0,[0],e))}function Gg(e,t,r,n,i,o,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,m=0,v=1,w=1,p=1,g=0,b="",_=i,P=o,C=n,x=b;w;)switch(m=g,g=$i()){case 40:if(m!=108&&Tn(x,d-1)==58){lx(x+=Nt(Kg(g),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:x+=Kg(g);break;case 9:case 10:case 13:case 32:x+=G9(m);break;case 92:x+=Q9(Wg()-1,7);continue;case 47:switch(Pa()){case 42:case 47:eg(Z9(Y9($i(),Wg()),t,r),l);break;default:x+="/"}break;case 123*v:s[u++]=fa(x)*p;case 125*v:case 59:case 0:switch(g){case 0:case 125:w=0;case 59+c:p==-1&&(x=Nt(x,/\f/g,"")),h>0&&fa(x)-d&&eg(h>32?ok(x+";",n,r,d-1):ok(Nt(x," ","")+";",n,r,d-2),l);break;case 59:x+=";";default:if(eg(C=ik(x,t,r,u,c,i,s,b,_=[],P=[],d),o),g===123)if(c===0)Gg(x,t,C,C,_,o,d,s,P);else switch(f===99&&Tn(x,3)===110?100:f){case 100:case 108:case 109:case 115:Gg(e,C,C,n&&eg(ik(e,C,C,0,0,i,s,b,i,_=[],d),P),i,P,d,s,n?_:P);break;default:Gg(x,C,C,C,[""],P,0,s,P)}}u=c=h=0,v=p=1,b=x="",d=a;break;case 58:d=1+fa(x),h=m;default:if(v<1){if(g==123)--v;else if(g==125&&v++==0&&K9()==125)continue}switch(x+=gb(g),g*v){case 38:p=c>0?1:(x+="\f",-1);break;case 44:s[u++]=(fa(x)-1)*p,p=1;break;case 64:Pa()===45&&(x+=Kg($i())),f=Pa(),c=d=fa(b=x+=X9(Wg())),g++;break;case 45:m===45&&fa(x)==2&&(v=0)}}return o}function ik(e,t,r,n,i,o,a,s,l,u,c){for(var d=i-1,f=i===0?o:[""],h=cE(f),m=0,v=0,w=0;m<n;++m)for(var p=0,g=Wp(e,d+1,d=V9(v=a[m])),b=e;p<h;++p)(b=x4(v>0?f[p]+" "+g:Nt(g,/&\f/g,f[p])))&&(l[w++]=b);return bb(e,t,r,i===0?lE:s,l,u,c)}function Z9(e,t,r){return bb(e,t,r,S4,gb(W9()),Wp(e,2,-2),0)}function ok(e,t,r,n){return bb(e,t,r,uE,Wp(e,0,n),Wp(e,n+1,-1),n)}function Rd(e,t){for(var r="",n=cE(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function eq(e,t,r,n){switch(e.type){case B9:if(e.children.length)break;case L9:case uE:return e.return=e.return||e.value;case S4:return"";case _4:return e.return=e.value+"{"+Rd(e.children,n)+"}";case lE:e.value=e.props.join(",")}return fa(r=Rd(e.children,n))?e.return=e.value+"{"+r+"}":""}function tq(e){var t=cE(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function rq(e){return function(t){t.root||(t=t.return)&&e(t)}}var ak=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var i=t(n);return r.set(n,i),i}};function T4(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var nq=function(t,r,n){for(var i=0,o=0;i=o,o=Pa(),i===38&&o===12&&(r[n]=1),!Kp(o);)$i();return Um(t,gi)},iq=function(t,r){var n=-1,i=44;do switch(Kp(i)){case 0:i===38&&Pa()===12&&(r[n]=1),t[n]+=nq(gi-1,r,n);break;case 2:t[n]+=Kg(i);break;case 4:if(i===44){t[++n]=Pa()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=gb(i)}while(i=$i());return t},oq=function(t,r){return E4(iq(C4(t),r))},sk=new WeakMap,aq=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!sk.get(n))&&!i){sk.set(t,!0);for(var o=[],a=oq(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},sq=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function O4(e,t){switch(U9(e,t)){case 5103:return Mt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Mt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Mt+e+Xy+e+Bn+e+e;case 6828:case 4268:return Mt+e+Bn+e+e;case 6165:return Mt+e+Bn+"flex-"+e+e;case 5187:return Mt+e+Nt(e,/(\w+).+(:[^]+)/,Mt+"box-$1$2"+Bn+"flex-$1$2")+e;case 5443:return Mt+e+Bn+"flex-item-"+Nt(e,/flex-|-self/,"")+e;case 4675:return Mt+e+Bn+"flex-line-pack"+Nt(e,/align-content|flex-|-self/,"")+e;case 5548:return Mt+e+Bn+Nt(e,"shrink","negative")+e;case 5292:return Mt+e+Bn+Nt(e,"basis","preferred-size")+e;case 6060:return Mt+"box-"+Nt(e,"-grow","")+Mt+e+Bn+Nt(e,"grow","positive")+e;case 4554:return Mt+Nt(e,/([^-])(transform)/g,"$1"+Mt+"$2")+e;case 6187:return Nt(Nt(Nt(e,/(zoom-|grab)/,Mt+"$1"),/(image-set)/,Mt+"$1"),e,"")+e;case 5495:case 3959:return Nt(e,/(image-set\([^]*)/,Mt+"$1$`$1");case 4968:return Nt(Nt(e,/(.+:)(flex-)?(.*)/,Mt+"box-pack:$3"+Bn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mt+e+e;case 4095:case 3583:case 4068:case 2532:return Nt(e,/(.+)-inline(.+)/,Mt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(fa(e)-1-t>6)switch(Tn(e,t+1)){case 109:if(Tn(e,t+4)!==45)break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+Mt+"$2-$3$1"+Xy+(Tn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~lx(e,"stretch")?O4(Nt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Tn(e,t+1)!==115)break;case 6444:switch(Tn(e,fa(e)-3-(~lx(e,"!important")&&10))){case 107:return Nt(e,":",":"+Mt)+e;case 101:return Nt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mt+(Tn(e,14)===45?"inline-":"")+"box$3$1"+Mt+"$2$3$1"+Bn+"$2box$3")+e}break;case 5936:switch(Tn(e,t+11)){case 114:return Mt+e+Bn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mt+e+Bn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mt+e+Bn+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mt+e+Bn+e+e}return e}var lq=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case uE:t.return=O4(t.value,t.length);break;case _4:return Rd([lh(t,{value:Nt(t.value,"@","@"+Mt)})],i);case lE:if(t.length)return H9(t.props,function(o){switch(q9(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rd([lh(t,{props:[Nt(o,/:(read-\w+)/,":"+Xy+"$1")]})],i);case"::placeholder":return Rd([lh(t,{props:[Nt(o,/:(plac\w+)/,":"+Mt+"input-$1")]}),lh(t,{props:[Nt(o,/:(plac\w+)/,":"+Xy+"$1")]}),lh(t,{props:[Nt(o,/:(plac\w+)/,Bn+"input-$1")]})],i)}return""})}},uq=[lq],cq=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var w=v.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||uq,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var w=v.getAttribute("data-emotion").split(" "),p=1;p<w.length;p++)o[w[p]]=!0;s.push(v)});var l,u=[aq,sq];{var c,d=[eq,rq(function(v){c.insert(v)})],f=tq(u.concat(i,d)),h=function(w){return Rd(J9(w),f)};l=function(w,p,g,b){c=g,h(w?w+"{"+p.styles+"}":p.styles),b&&(m.inserted[p.name]=!0)}}var m={key:r,sheet:new F9({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function Jy(){return Jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jy.apply(this,arguments)}var R4={exports:{}},Xt={};/** @license React v16.13.1
41
- * react-is.production.min.js
42
- *
43
- * Copyright (c) Facebook, Inc. and its affiliates.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE file in the root directory of this source tree.
47
- */var wn=typeof Symbol=="function"&&Symbol.for,dE=wn?Symbol.for("react.element"):60103,fE=wn?Symbol.for("react.portal"):60106,wb=wn?Symbol.for("react.fragment"):60107,Sb=wn?Symbol.for("react.strict_mode"):60108,_b=wn?Symbol.for("react.profiler"):60114,xb=wn?Symbol.for("react.provider"):60109,Pb=wn?Symbol.for("react.context"):60110,hE=wn?Symbol.for("react.async_mode"):60111,Cb=wn?Symbol.for("react.concurrent_mode"):60111,Eb=wn?Symbol.for("react.forward_ref"):60112,Tb=wn?Symbol.for("react.suspense"):60113,dq=wn?Symbol.for("react.suspense_list"):60120,Ob=wn?Symbol.for("react.memo"):60115,Rb=wn?Symbol.for("react.lazy"):60116,fq=wn?Symbol.for("react.block"):60121,hq=wn?Symbol.for("react.fundamental"):60117,pq=wn?Symbol.for("react.responder"):60118,mq=wn?Symbol.for("react.scope"):60119;function Hi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case dE:switch(e=e.type,e){case hE:case Cb:case wb:case _b:case Sb:case Tb:return e;default:switch(e=e&&e.$$typeof,e){case Pb:case Eb:case Rb:case Ob:case xb:return e;default:return t}}case fE:return t}}}function I4(e){return Hi(e)===Cb}Xt.AsyncMode=hE;Xt.ConcurrentMode=Cb;Xt.ContextConsumer=Pb;Xt.ContextProvider=xb;Xt.Element=dE;Xt.ForwardRef=Eb;Xt.Fragment=wb;Xt.Lazy=Rb;Xt.Memo=Ob;Xt.Portal=fE;Xt.Profiler=_b;Xt.StrictMode=Sb;Xt.Suspense=Tb;Xt.isAsyncMode=function(e){return I4(e)||Hi(e)===hE};Xt.isConcurrentMode=I4;Xt.isContextConsumer=function(e){return Hi(e)===Pb};Xt.isContextProvider=function(e){return Hi(e)===xb};Xt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===dE};Xt.isForwardRef=function(e){return Hi(e)===Eb};Xt.isFragment=function(e){return Hi(e)===wb};Xt.isLazy=function(e){return Hi(e)===Rb};Xt.isMemo=function(e){return Hi(e)===Ob};Xt.isPortal=function(e){return Hi(e)===fE};Xt.isProfiler=function(e){return Hi(e)===_b};Xt.isStrictMode=function(e){return Hi(e)===Sb};Xt.isSuspense=function(e){return Hi(e)===Tb};Xt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wb||e===Cb||e===_b||e===Sb||e===Tb||e===dq||typeof e=="object"&&e!==null&&(e.$$typeof===Rb||e.$$typeof===Ob||e.$$typeof===xb||e.$$typeof===Pb||e.$$typeof===Eb||e.$$typeof===hq||e.$$typeof===pq||e.$$typeof===mq||e.$$typeof===fq)};Xt.typeOf=Hi;R4.exports=Xt;var vq=R4.exports,k4=vq,gq={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yq={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j4={};j4[k4.ForwardRef]=gq;j4[k4.Memo]=yq;var bq=!0;function wq(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var $4=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||bq===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},A4=function(t,r,n){$4(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Sq(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _q={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xq=/[A-Z]|^ms/g,Pq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,D4=function(t){return t.charCodeAt(1)===45},lk=function(t){return t!=null&&typeof t!="boolean"},C1=T4(function(e){return D4(e)?e:e.replace(xq,"-$&").toLowerCase()}),uk=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Pq,function(n,i,o){return ha={name:i,styles:o,next:ha},i})}return _q[t]!==1&&!D4(t)&&typeof r=="number"&&r!==0?r+"px":r};function Gp(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return ha={name:r.name,styles:r.styles,next:ha},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)ha={name:n.name,styles:n.styles,next:ha},n=n.next;var i=r.styles+";";return i}return Cq(e,t,r)}case"function":{if(e!==void 0){var o=ha,a=r(e);return ha=o,Gp(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function Cq(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Gp(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object")t!=null&&t[a]!==void 0?n+=o+"{"+t[a]+"}":lk(a)&&(n+=C1(o)+":"+uk(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)lk(a[s])&&(n+=C1(o)+":"+uk(o,a[s])+";");else{var l=Gp(e,t,a);switch(o){case"animation":case"animationName":{n+=C1(o)+":"+l+";";break}default:n+=o+"{"+l+"}"}}}return n}var ck=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ha,pE=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";ha=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=Gp(n,r,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=Gp(n,r,t[s]),i&&(o+=a[s]);ck.lastIndex=0;for(var l="",u;(u=ck.exec(o))!==null;)l+="-"+u[1];var c=Sq(o)+l;return{name:c,styles:o,next:ha}},Eq=function(t){return t()},M4=m_.useInsertionEffect?m_.useInsertionEffect:!1,Tq=M4||Eq,dk=M4||S.useLayoutEffect,N4=S.createContext(typeof HTMLElement<"u"?cq({key:"css"}):null);N4.Provider;var F4=function(t){return S.forwardRef(function(r,n){var i=S.useContext(N4);return t(r,i,n)})},Qp=S.createContext({}),Oq=function(t,r){if(typeof r=="function"){var n=r(t);return n}return Jy({},t,r)},Rq=ak(function(e){return ak(function(t){return Oq(e,t)})}),Iq=function(t){var r=S.useContext(Qp);return t.theme!==r&&(r=Rq(r)(t.theme)),S.createElement(Qp.Provider,{value:r},t.children)},Ib=F4(function(e,t){var r=e.styles,n=pE([r],void 0,S.useContext(Qp)),i=S.useRef();return dk(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+n.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),dk(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(n.next!==void 0&&A4(t,n.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",n,a,!1)},[t,n.name]),null});function kq(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return pE(t)}var jq=function(){var t=kq.apply(void 0,arguments),r="animation-"+t.name;return{name:r,styles:"@keyframes "+r+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},L4=String.raw,B4=L4`
48
- :root,
49
- :host {
50
- --chakra-vh: 100vh;
51
- }
52
-
53
- @supports (height: -webkit-fill-available) {
54
- :root,
55
- :host {
56
- --chakra-vh: -webkit-fill-available;
57
- }
58
- }
59
-
60
- @supports (height: -moz-fill-available) {
61
- :root,
62
- :host {
63
- --chakra-vh: -moz-fill-available;
64
- }
65
- }
66
-
67
- @supports (height: 100dvh) {
68
- :root,
69
- :host {
70
- --chakra-vh: 100dvh;
71
- }
72
- }
73
- `,$q=()=>y.jsx(Ib,{styles:B4}),Aq=({scope:e=""})=>y.jsx(Ib,{styles:L4`
74
- html {
75
- line-height: 1.5;
76
- -webkit-text-size-adjust: 100%;
77
- font-family: system-ui, sans-serif;
78
- -webkit-font-smoothing: antialiased;
79
- text-rendering: optimizeLegibility;
80
- -moz-osx-font-smoothing: grayscale;
81
- touch-action: manipulation;
82
- }
83
-
84
- body {
85
- position: relative;
86
- min-height: 100%;
87
- margin: 0;
88
- font-feature-settings: "kern";
89
- }
90
-
91
- ${e} :where(*, *::before, *::after) {
92
- border-width: 0;
93
- border-style: solid;
94
- box-sizing: border-box;
95
- word-wrap: break-word;
96
- }
97
-
98
- main {
99
- display: block;
100
- }
101
-
102
- ${e} hr {
103
- border-top-width: 1px;
104
- box-sizing: content-box;
105
- height: 0;
106
- overflow: visible;
107
- }
108
-
109
- ${e} :where(pre, code, kbd,samp) {
110
- font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
111
- font-size: 1em;
112
- }
113
-
114
- ${e} a {
115
- background-color: transparent;
116
- color: inherit;
117
- text-decoration: inherit;
118
- }
119
-
120
- ${e} abbr[title] {
121
- border-bottom: none;
122
- text-decoration: underline;
123
- -webkit-text-decoration: underline dotted;
124
- text-decoration: underline dotted;
125
- }
126
-
127
- ${e} :where(b, strong) {
128
- font-weight: bold;
129
- }
130
-
131
- ${e} small {
132
- font-size: 80%;
133
- }
134
-
135
- ${e} :where(sub,sup) {
136
- font-size: 75%;
137
- line-height: 0;
138
- position: relative;
139
- vertical-align: baseline;
140
- }
141
-
142
- ${e} sub {
143
- bottom: -0.25em;
144
- }
145
-
146
- ${e} sup {
147
- top: -0.5em;
148
- }
149
-
150
- ${e} img {
151
- border-style: none;
152
- }
153
-
154
- ${e} :where(button, input, optgroup, select, textarea) {
155
- font-family: inherit;
156
- font-size: 100%;
157
- line-height: 1.15;
158
- margin: 0;
159
- }
160
-
161
- ${e} :where(button, input) {
162
- overflow: visible;
163
- }
164
-
165
- ${e} :where(button, select) {
166
- text-transform: none;
167
- }
168
-
169
- ${e} :where(
170
- button::-moz-focus-inner,
171
- [type="button"]::-moz-focus-inner,
172
- [type="reset"]::-moz-focus-inner,
173
- [type="submit"]::-moz-focus-inner
174
- ) {
175
- border-style: none;
176
- padding: 0;
177
- }
178
-
179
- ${e} fieldset {
180
- padding: 0.35em 0.75em 0.625em;
181
- }
182
-
183
- ${e} legend {
184
- box-sizing: border-box;
185
- color: inherit;
186
- display: table;
187
- max-width: 100%;
188
- padding: 0;
189
- white-space: normal;
190
- }
191
-
192
- ${e} progress {
193
- vertical-align: baseline;
194
- }
195
-
196
- ${e} textarea {
197
- overflow: auto;
198
- }
199
-
200
- ${e} :where([type="checkbox"], [type="radio"]) {
201
- box-sizing: border-box;
202
- padding: 0;
203
- }
204
-
205
- ${e} input[type="number"]::-webkit-inner-spin-button,
206
- ${e} input[type="number"]::-webkit-outer-spin-button {
207
- -webkit-appearance: none !important;
208
- }
209
-
210
- ${e} input[type="number"] {
211
- -moz-appearance: textfield;
212
- }
213
-
214
- ${e} input[type="search"] {
215
- -webkit-appearance: textfield;
216
- outline-offset: -2px;
217
- }
218
-
219
- ${e} input[type="search"]::-webkit-search-decoration {
220
- -webkit-appearance: none !important;
221
- }
222
-
223
- ${e} ::-webkit-file-upload-button {
224
- -webkit-appearance: button;
225
- font: inherit;
226
- }
227
-
228
- ${e} details {
229
- display: block;
230
- }
231
-
232
- ${e} summary {
233
- display: list-item;
234
- }
235
-
236
- template {
237
- display: none;
238
- }
239
-
240
- [hidden] {
241
- display: none !important;
242
- }
243
-
244
- ${e} :where(
245
- blockquote,
246
- dl,
247
- dd,
248
- h1,
249
- h2,
250
- h3,
251
- h4,
252
- h5,
253
- h6,
254
- hr,
255
- figure,
256
- p,
257
- pre
258
- ) {
259
- margin: 0;
260
- }
261
-
262
- ${e} button {
263
- background: transparent;
264
- padding: 0;
265
- }
266
-
267
- ${e} fieldset {
268
- margin: 0;
269
- padding: 0;
270
- }
271
-
272
- ${e} :where(ol, ul) {
273
- margin: 0;
274
- padding: 0;
275
- }
276
-
277
- ${e} textarea {
278
- resize: vertical;
279
- }
280
-
281
- ${e} :where(button, [role="button"]) {
282
- cursor: pointer;
283
- }
284
-
285
- ${e} button::-moz-focus-inner {
286
- border: 0 !important;
287
- }
288
-
289
- ${e} table {
290
- border-collapse: collapse;
291
- }
292
-
293
- ${e} :where(h1, h2, h3, h4, h5, h6) {
294
- font-size: inherit;
295
- font-weight: inherit;
296
- }
297
-
298
- ${e} :where(button, input, optgroup, select, textarea) {
299
- padding: 0;
300
- line-height: inherit;
301
- color: inherit;
302
- }
303
-
304
- ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
305
- display: block;
306
- }
307
-
308
- ${e} :where(img, video) {
309
- max-width: 100%;
310
- height: auto;
311
- }
312
-
313
- [data-js-focus-visible]
314
- :focus:not([data-focus-visible-added]):not(
315
- [data-focus-visible-disabled]
316
- ) {
317
- outline: none;
318
- box-shadow: none;
319
- }
320
-
321
- ${e} select::-ms-expand {
322
- display: none;
323
- }
324
-
325
- ${B4}
326
- `});function Dq(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Si(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=e,s=S.createContext(a);s.displayName=t;function l(){var u;const c=S.useContext(s);if(!c&&r){const d=new Error(o??Dq(n,i));throw d.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,d,l),d}return c}return[s.Provider,l,s]}var[Mq,Nq]=Si({strict:!1,name:"PortalManagerContext"});function V4(e){const{children:t,zIndex:r}=e;return y.jsx(Mq,{value:{zIndex:r},children:t})}V4.displayName="PortalManager";var hl=globalThis!=null&&globalThis.document?S.useLayoutEffect:S.useEffect,[z4,Fq]=Si({strict:!1,name:"PortalContext"}),mE="chakra-portal",Lq=".chakra-portal",Bq=e=>y.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Vq=e=>{const{appendToParentPortal:t,children:r}=e,[n,i]=S.useState(null),o=S.useRef(null),[,a]=S.useState({});S.useEffect(()=>a({}),[]);const s=Fq(),l=Nq();hl(()=>{if(!n)return;const c=n.ownerDocument,d=t?s??c.body:c.body;if(!d)return;o.current=c.createElement("div"),o.current.className=mE,d.appendChild(o.current),a({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[n]);const u=l!=null&&l.zIndex?y.jsx(Bq,{zIndex:l==null?void 0:l.zIndex,children:r}):r;return o.current?Pf.createPortal(y.jsx(z4,{value:o.current,children:u}),o.current):y.jsx("span",{ref:c=>{c&&i(c)}})},zq=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,i=r.current,o=i??(typeof window<"u"?document.body:void 0),a=S.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=mE),l},[i]),[,s]=S.useState({});return hl(()=>s({}),[]),hl(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Pf.createPortal(y.jsx(z4,{value:n?a:null,children:t}),a):null};function Ef(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?y.jsx(zq,{containerRef:r,...n}):y.jsx(Vq,{...n})}Ef.className=mE;Ef.selector=Lq;Ef.displayName="Portal";function kb(){const e=S.useContext(Qp);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var jb=S.createContext({});jb.displayName="ColorModeContext";function vE(){const e=S.useContext(jb);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var tg={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Uq(e={}){const{preventTransition:t=!0}=e,r={setDataset:n=>{const i=t?r.preventTransition():void 0;document.documentElement.dataset.theme=n,document.documentElement.style.colorScheme=n,i==null||i()},setClassName(n){document.body.classList.add(n?tg.dark:tg.light),document.body.classList.remove(n?tg.light:tg.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(n){var i;return((i=r.query().matches)!=null?i:n==="dark")?"dark":"light"},addListener(n){const i=r.query(),o=a=>{n(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(n)})})}}};return r}var qq="chakra-ui-color-mode";function Hq(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let r;try{r=localStorage.getItem(e)||t}catch{}return r||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var Wq=Hq(qq),fk=()=>{};function hk(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function U4(e){const{value:t,children:r,options:{useSystemColorMode:n,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=Wq}=e,s=i==="dark"?"dark":"light",[l,u]=S.useState(()=>hk(a,s)),[c,d]=S.useState(()=>hk(a)),{getSystemTheme:f,setClassName:h,setDataset:m,addListener:v}=S.useMemo(()=>Uq({preventTransition:o}),[o]),w=i==="system"&&!l?c:l,p=S.useCallback(_=>{const P=_==="system"?f():_;u(P),h(P==="dark"),m(P),a.set(P)},[a,f,h,m]);hl(()=>{i==="system"&&d(f())},[]),S.useEffect(()=>{const _=a.get();if(_){p(_);return}if(i==="system"){p("system");return}p(s)},[a,s,i,p]);const g=S.useCallback(()=>{p(w==="dark"?"light":"dark")},[w,p]);S.useEffect(()=>{if(n)return v(p)},[n,v,p]);const b=S.useMemo(()=>({colorMode:t??w,toggleColorMode:t?fk:g,setColorMode:t?fk:p,forced:t!==void 0}),[w,g,p,t]);return y.jsx(jb.Provider,{value:b,children:r})}U4.displayName="ColorModeProvider";function Kq(){const e=vE(),t=kb();return{...e,theme:t}}var It=(...e)=>e.filter(Boolean).join(" ");function zo(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function lo(e,...t){return Gq(e)?e(...t):e}var Gq=e=>typeof e=="function",wt=e=>e?"":void 0,E1=e=>e?!0:void 0;function Ft(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}function q4(...e){return function(r){e.forEach(n=>{n==null||n(r)})}}var Zy={exports:{}};Zy.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",m="[object GeneratorFunction]",v="[object Map]",w="[object Number]",p="[object Null]",g="[object Object]",b="[object Proxy]",_="[object RegExp]",P="[object Set]",C="[object String]",x="[object Undefined]",T="[object WeakMap]",I="[object ArrayBuffer]",M="[object DataView]",H="[object Float32Array]",re="[object Float64Array]",ie="[object Int8Array]",R="[object Int16Array]",L="[object Int32Array]",X="[object Uint8Array]",Q="[object Uint8ClampedArray]",W="[object Uint16Array]",te="[object Uint32Array]",G=/[\\^$.*+?()[\]{}|]/g,A=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,N={};N[H]=N[re]=N[ie]=N[R]=N[L]=N[X]=N[Q]=N[W]=N[te]=!0,N[s]=N[l]=N[I]=N[c]=N[M]=N[d]=N[f]=N[h]=N[v]=N[w]=N[g]=N[_]=N[P]=N[C]=N[T]=!1;var E=typeof Zs=="object"&&Zs&&Zs.Object===Object&&Zs,k=typeof self=="object"&&self&&self.Object===Object&&self,D=E||k||Function("return this")(),ee=t&&!t.nodeType&&t,oe=ee&&!0&&e&&!e.nodeType&&e,ve=oe&&oe.exports===ee,Se=ve&&E.process,$e=function(){try{var j=oe&&oe.require&&oe.require("util").types;return j||Se&&Se.binding&&Se.binding("util")}catch{}}(),ge=$e&&$e.isTypedArray;function st(j,z,ne){switch(ne.length){case 0:return j.call(z);case 1:return j.call(z,ne[0]);case 2:return j.call(z,ne[0],ne[1]);case 3:return j.call(z,ne[0],ne[1],ne[2])}return j.apply(z,ne)}function Vt(j,z){for(var ne=-1,je=Array(j);++ne<j;)je[ne]=z(ne);return je}function ce(j){return function(z){return j(z)}}function ye(j,z){return j==null?void 0:j[z]}function Xe(j,z){return function(ne){return j(z(ne))}}var kt=Array.prototype,zr=Function.prototype,Zt=Object.prototype,Or=D["__core-js_shared__"],jt=zr.toString,ct=Zt.hasOwnProperty,en=function(){var j=/[^.]+$/.exec(Or&&Or.keys&&Or.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),cn=Zt.toString,yr=jt.call(Object),tn=RegExp("^"+jt.call(ct).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),An=ve?D.Buffer:void 0,Ar=D.Symbol,Dn=D.Uint8Array;An&&An.allocUnsafe;var Mn=Xe(Object.getPrototypeOf,Object),Is=Object.create,ta=Zt.propertyIsEnumerable,Yl=kt.splice,xo=Ar?Ar.toStringTag:void 0,ra=function(){try{var j=Hw(Object,"defineProperty");return j({},"",{}),j}catch{}}(),Sn=An?An.isBuffer:void 0,Xl=Math.max,Jl=Date.now,Sc=Hw(D,"Map"),na=Hw(Object,"create"),Xf=function(){function j(){}return function(z){if(!tu(z))return{};if(Is)return Is(z);j.prototype=z;var ne=new j;return j.prototype=void 0,ne}}();function Gi(j){var z=-1,ne=j==null?0:j.length;for(this.clear();++z<ne;){var je=j[z];this.set(je[0],je[1])}}function ia(){this.__data__=na?na(null):{},this.size=0}function q(j){var z=this.has(j)&&delete this.__data__[j];return this.size-=z?1:0,z}function Z(j){var z=this.__data__;if(na){var ne=z[j];return ne===n?void 0:ne}return ct.call(z,j)?z[j]:void 0}function ae(j){var z=this.__data__;return na?z[j]!==void 0:ct.call(z,j)}function pe(j,z){var ne=this.__data__;return this.size+=this.has(j)?0:1,ne[j]=na&&z===void 0?n:z,this}Gi.prototype.clear=ia,Gi.prototype.delete=q,Gi.prototype.get=Z,Gi.prototype.has=ae,Gi.prototype.set=pe;function we(j){var z=-1,ne=j==null?0:j.length;for(this.clear();++z<ne;){var je=j[z];this.set(je[0],je[1])}}function et(){this.__data__=[],this.size=0}function Ne(j){var z=this.__data__,ne=ot(z,j);if(ne<0)return!1;var je=z.length-1;return ne==je?z.pop():Yl.call(z,ne,1),--this.size,!0}function Ee(j){var z=this.__data__,ne=ot(z,j);return ne<0?void 0:z[ne][1]}function tt(j){return ot(this.__data__,j)>-1}function $(j,z){var ne=this.__data__,je=ot(ne,j);return je<0?(++this.size,ne.push([j,z])):ne[je][1]=z,this}we.prototype.clear=et,we.prototype.delete=Ne,we.prototype.get=Ee,we.prototype.has=tt,we.prototype.set=$;function O(j){var z=-1,ne=j==null?0:j.length;for(this.clear();++z<ne;){var je=j[z];this.set(je[0],je[1])}}function F(){this.size=0,this.__data__={hash:new Gi,map:new(Sc||we),string:new Gi}}function B(j){var z=Dv(this,j).delete(j);return this.size-=z?1:0,z}function K(j){return Dv(this,j).get(j)}function _e(j){return Dv(this,j).has(j)}function ke(j,z){var ne=Dv(this,j),je=ne.size;return ne.set(j,z),this.size+=ne.size==je?0:1,this}O.prototype.clear=F,O.prototype.delete=B,O.prototype.get=K,O.prototype.has=_e,O.prototype.set=ke;function Ke(j){var z=this.__data__=new we(j);this.size=z.size}function Pt(){this.__data__=new we,this.size=0}function zt(j){var z=this.__data__,ne=z.delete(j);return this.size=z.size,ne}function it(j){return this.__data__.get(j)}function ht(j){return this.__data__.has(j)}function er(j,z){var ne=this.__data__;if(ne instanceof we){var je=ne.__data__;if(!Sc||je.length<r-1)return je.push([j,z]),this.size=++ne.size,this;ne=this.__data__=new O(je)}return ne.set(j,z),this.size=ne.size,this}Ke.prototype.clear=Pt,Ke.prototype.delete=zt,Ke.prototype.get=it,Ke.prototype.has=ht,Ke.prototype.set=er;function He(j,z){var ne=Gw(j),je=!ne&&Kw(j),Ct=!ne&&!je&&UR(j),nr=!ne&&!je&&!Ct&&HR(j),br=ne||je||Ct||nr,At=br?Vt(j.length,String):[],wr=At.length;for(var Eo in j)br&&(Eo=="length"||Ct&&(Eo=="offset"||Eo=="parent")||nr&&(Eo=="buffer"||Eo=="byteLength"||Eo=="byteOffset")||VR(Eo,wr))||At.push(Eo);return At}function Ot(j,z,ne){(ne!==void 0&&!Mv(j[z],ne)||ne===void 0&&!(z in j))&&cr(j,z,ne)}function Fe(j,z,ne){var je=j[z];(!(ct.call(j,z)&&Mv(je,ne))||ne===void 0&&!(z in j))&&cr(j,z,ne)}function ot(j,z){for(var ne=j.length;ne--;)if(Mv(j[ne][0],z))return ne;return-1}function cr(j,z,ne){z=="__proto__"&&ra?ra(j,z,{configurable:!0,enumerable:!0,value:ne,writable:!0}):j[z]=ne}var Ut=eu();function Ur(j){return j==null?j===void 0?x:p:xo&&xo in Object(j)?U8(j):Q8(j)}function Qi(j){return Jf(j)&&Ur(j)==s}function Po(j){if(!tu(j)||K8(j))return!1;var z=Yw(j)?tn:A;return z.test(Z8(j))}function ii(j){return Jf(j)&&qR(j.length)&&!!N[Ur(j)]}function Yi(j){if(!tu(j))return G8(j);var z=zR(j),ne=[];for(var je in j)je=="constructor"&&(z||!ct.call(j,je))||ne.push(je);return ne}function oa(j,z,ne,je,Ct){j!==z&&Ut(z,function(nr,br){if(Ct||(Ct=new Ke),tu(nr))Co(j,z,br,ne,oa,je,Ct);else{var At=je?je(Ww(j,br),nr,br+"",j,z,Ct):void 0;At===void 0&&(At=nr),Ot(j,br,At)}},WR)}function Co(j,z,ne,je,Ct,nr,br){var At=Ww(j,ne),wr=Ww(z,ne),Eo=br.get(wr);if(Eo){Ot(j,ne,Eo);return}var Ci=nr?nr(At,wr,ne+"",j,z,br):void 0,Zf=Ci===void 0;if(Zf){var Xw=Gw(wr),Jw=!Xw&&UR(wr),GR=!Xw&&!Jw&&HR(wr);Ci=wr,Xw||Jw||GR?Gw(At)?Ci=At:eU(At)?Ci=Pc(At):Jw?(Zf=!1,Ci=jv(wr)):GR?(Zf=!1,Ci=xc(wr)):Ci=[]:tU(wr)||Kw(wr)?(Ci=At,Kw(At)?Ci=rU(At):(!tu(At)||Yw(At))&&(Ci=q8(wr))):Zf=!1}Zf&&(br.set(wr,Ci),Ct(Ci,wr,je,nr,br),br.delete(wr)),Ot(j,ne,Ci)}function Zl(j,z){return X8(Y8(j,z,KR),j+"")}var kv=ra?function(j,z){return ra(j,"toString",{configurable:!0,enumerable:!1,value:iU(z),writable:!0})}:KR;function jv(j,z){return j.slice()}function _c(j){var z=new j.constructor(j.byteLength);return new Dn(z).set(new Dn(j)),z}function xc(j,z){var ne=_c(j.buffer);return new j.constructor(ne,j.byteOffset,j.length)}function Pc(j,z){var ne=-1,je=j.length;for(z||(z=Array(je));++ne<je;)z[ne]=j[ne];return z}function $v(j,z,ne,je){var Ct=!ne;ne||(ne={});for(var nr=-1,br=z.length;++nr<br;){var At=z[nr],wr=void 0;wr===void 0&&(wr=j[At]),Ct?cr(ne,At,wr):Fe(ne,At,wr)}return ne}function Av(j){return Zl(function(z,ne){var je=-1,Ct=ne.length,nr=Ct>1?ne[Ct-1]:void 0,br=Ct>2?ne[2]:void 0;for(nr=j.length>3&&typeof nr=="function"?(Ct--,nr):void 0,br&&H8(ne[0],ne[1],br)&&(nr=Ct<3?void 0:nr,Ct=1),z=Object(z);++je<Ct;){var At=ne[je];At&&j(z,At,je,nr)}return z})}function eu(j){return function(z,ne,je){for(var Ct=-1,nr=Object(z),br=je(z),At=br.length;At--;){var wr=br[++Ct];if(ne(nr[wr],wr,nr)===!1)break}return z}}function Dv(j,z){var ne=j.__data__;return W8(z)?ne[typeof z=="string"?"string":"hash"]:ne.map}function Hw(j,z){var ne=ye(j,z);return Po(ne)?ne:void 0}function U8(j){var z=ct.call(j,xo),ne=j[xo];try{j[xo]=void 0;var je=!0}catch{}var Ct=cn.call(j);return je&&(z?j[xo]=ne:delete j[xo]),Ct}function q8(j){return typeof j.constructor=="function"&&!zR(j)?Xf(Mn(j)):{}}function VR(j,z){var ne=typeof j;return z=z??a,!!z&&(ne=="number"||ne!="symbol"&&U.test(j))&&j>-1&&j%1==0&&j<z}function H8(j,z,ne){if(!tu(ne))return!1;var je=typeof z;return(je=="number"?Qw(ne)&&VR(z,ne.length):je=="string"&&z in ne)?Mv(ne[z],j):!1}function W8(j){var z=typeof j;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?j!=="__proto__":j===null}function K8(j){return!!en&&en in j}function zR(j){var z=j&&j.constructor,ne=typeof z=="function"&&z.prototype||Zt;return j===ne}function G8(j){var z=[];if(j!=null)for(var ne in Object(j))z.push(ne);return z}function Q8(j){return cn.call(j)}function Y8(j,z,ne){return z=Xl(z===void 0?j.length-1:z,0),function(){for(var je=arguments,Ct=-1,nr=Xl(je.length-z,0),br=Array(nr);++Ct<nr;)br[Ct]=je[z+Ct];Ct=-1;for(var At=Array(z+1);++Ct<z;)At[Ct]=je[Ct];return At[z]=ne(br),st(j,this,At)}}function Ww(j,z){if(!(z==="constructor"&&typeof j[z]=="function")&&z!="__proto__")return j[z]}var X8=J8(kv);function J8(j){var z=0,ne=0;return function(){var je=Jl(),Ct=o-(je-ne);if(ne=je,Ct>0){if(++z>=i)return arguments[0]}else z=0;return j.apply(void 0,arguments)}}function Z8(j){if(j!=null){try{return jt.call(j)}catch{}try{return j+""}catch{}}return""}function Mv(j,z){return j===z||j!==j&&z!==z}var Kw=Qi(function(){return arguments}())?Qi:function(j){return Jf(j)&&ct.call(j,"callee")&&!ta.call(j,"callee")},Gw=Array.isArray;function Qw(j){return j!=null&&qR(j.length)&&!Yw(j)}function eU(j){return Jf(j)&&Qw(j)}var UR=Sn||oU;function Yw(j){if(!tu(j))return!1;var z=Ur(j);return z==h||z==m||z==u||z==b}function qR(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=a}function tu(j){var z=typeof j;return j!=null&&(z=="object"||z=="function")}function Jf(j){return j!=null&&typeof j=="object"}function tU(j){if(!Jf(j)||Ur(j)!=g)return!1;var z=Mn(j);if(z===null)return!0;var ne=ct.call(z,"constructor")&&z.constructor;return typeof ne=="function"&&ne instanceof ne&&jt.call(ne)==yr}var HR=ge?ce(ge):ii;function rU(j){return $v(j,WR(j))}function WR(j){return Qw(j)?He(j):Yi(j)}var nU=Av(function(j,z,ne,je){oa(j,z,ne,je)});function iU(j){return function(){return j}}function KR(j){return j}function oU(){return!1}e.exports=nU})(Zy,Zy.exports);var Qq=Zy.exports;const ya=nc(Qq);var Yq=e=>/!(important)?$/.test(e),pk=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Xq=(e,t)=>r=>{const n=String(t),i=Yq(n),o=pk(n),a=e?`${e}.${o}`:o;let s=zo(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:t;return s=pk(s),i?`${s} !important`:s};function gE(e){const{scale:t,transform:r,compose:n}=e;return(o,a)=>{var s;const l=Xq(t,o)(a);let u=(s=r==null?void 0:r(l,a))!=null?s:l;return n&&(u=n(u,a)),u}}var rg=(...e)=>t=>e.reduce((r,n)=>n(r),t);function Xi(e,t){return r=>{const n={property:r,scale:e};return n.transform=gE({scale:e,transform:t}),n}}var Jq=({rtl:e,ltr:t})=>r=>r.direction==="rtl"?e:t;function Zq(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:Jq(t),transform:r?gE({scale:r,compose:n}):n}}var H4=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function eH(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...H4].join(" ")}function tH(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...H4].join(" ")}var rH={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},nH={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function iH(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var oH={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},cx={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},aH=new Set(Object.values(cx)),dx=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),sH=e=>e.trim();function lH(e,t){if(e==null||dx.has(e))return e;if(!(fx(e)||dx.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=a.split(",").map(sH).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in cx?cx[l]:l;u.unshift(c);const d=u.map(f=>{if(aH.has(f))return f;const h=f.indexOf(" "),[m,v]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],w=fx(v)?v:v&&v.split(" "),p=`colors.${m}`,g=p in t.__cssMap?t.__cssMap[p].varRef:m;return w?[g,...Array.isArray(w)?w:[w]].join(" "):g});return`${s}(${d.join(", ")})`}var fx=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),uH=(e,t)=>lH(e,t??{});function cH(e){return/^var\(--.+\)$/.test(e)}var dH=e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},sa=e=>t=>`${e}(${t})`,_t={filter(e){return e!=="auto"?e:rH},backdropFilter(e){return e!=="auto"?e:nH},ring(e){return iH(_t.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?eH():e==="auto-gpu"?tH():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=dH(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const r={left:"right",right:"left"};return t.direction==="rtl"?r[e]:e},degree(e){if(cH(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:uH,blur:sa("blur"),opacity:sa("opacity"),brightness:sa("brightness"),contrast:sa("contrast"),dropShadow:sa("drop-shadow"),grayscale:sa("grayscale"),hueRotate:e=>sa("hue-rotate")(_t.degree(e)),invert:sa("invert"),saturate:sa("saturate"),sepia:sa("sepia"),bgImage(e){return e==null||fx(e)||dx.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:r,divide:n}=(t=oH[e])!=null?t:{},i={flexDirection:e};return r&&(i[r]=1),n&&(i[n]=1),i}},V={borderWidths:Xi("borderWidths"),borderStyles:Xi("borderStyles"),colors:Xi("colors"),borders:Xi("borders"),gradients:Xi("gradients",_t.gradient),radii:Xi("radii",_t.px),space:Xi("space",rg(_t.vh,_t.px)),spaceT:Xi("space",rg(_t.vh,_t.px)),degreeT(e){return{property:e,transform:_t.degree}},prop(e,t,r){return{property:e,scale:t,...t&&{transform:gE({scale:t,transform:r})}}},propT(e,t){return{property:e,transform:t}},sizes:Xi("sizes",rg(_t.vh,_t.px)),sizesT:Xi("sizes",rg(_t.vh,_t.fraction)),shadows:Xi("shadows"),logical:Zq,blur:Xi("blur",_t.blur)},Qg={background:V.colors("background"),backgroundColor:V.colors("backgroundColor"),backgroundImage:V.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:_t.bgClip},bgSize:V.prop("backgroundSize"),bgPosition:V.prop("backgroundPosition"),bg:V.colors("background"),bgColor:V.colors("backgroundColor"),bgPos:V.prop("backgroundPosition"),bgRepeat:V.prop("backgroundRepeat"),bgAttachment:V.prop("backgroundAttachment"),bgGradient:V.gradients("backgroundImage"),bgClip:{transform:_t.bgClip}};Object.assign(Qg,{bgImage:Qg.backgroundImage,bgImg:Qg.backgroundImage});var Dt={border:V.borders("border"),borderWidth:V.borderWidths("borderWidth"),borderStyle:V.borderStyles("borderStyle"),borderColor:V.colors("borderColor"),borderRadius:V.radii("borderRadius"),borderTop:V.borders("borderTop"),borderBlockStart:V.borders("borderBlockStart"),borderTopLeftRadius:V.radii("borderTopLeftRadius"),borderStartStartRadius:V.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:V.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:V.radii("borderTopRightRadius"),borderStartEndRadius:V.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:V.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:V.borders("borderRight"),borderInlineEnd:V.borders("borderInlineEnd"),borderBottom:V.borders("borderBottom"),borderBlockEnd:V.borders("borderBlockEnd"),borderBottomLeftRadius:V.radii("borderBottomLeftRadius"),borderBottomRightRadius:V.radii("borderBottomRightRadius"),borderLeft:V.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:V.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:V.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:V.borders(["borderLeft","borderRight"]),borderInline:V.borders("borderInline"),borderY:V.borders(["borderTop","borderBottom"]),borderBlock:V.borders("borderBlock"),borderTopWidth:V.borderWidths("borderTopWidth"),borderBlockStartWidth:V.borderWidths("borderBlockStartWidth"),borderTopColor:V.colors("borderTopColor"),borderBlockStartColor:V.colors("borderBlockStartColor"),borderTopStyle:V.borderStyles("borderTopStyle"),borderBlockStartStyle:V.borderStyles("borderBlockStartStyle"),borderBottomWidth:V.borderWidths("borderBottomWidth"),borderBlockEndWidth:V.borderWidths("borderBlockEndWidth"),borderBottomColor:V.colors("borderBottomColor"),borderBlockEndColor:V.colors("borderBlockEndColor"),borderBottomStyle:V.borderStyles("borderBottomStyle"),borderBlockEndStyle:V.borderStyles("borderBlockEndStyle"),borderLeftWidth:V.borderWidths("borderLeftWidth"),borderInlineStartWidth:V.borderWidths("borderInlineStartWidth"),borderLeftColor:V.colors("borderLeftColor"),borderInlineStartColor:V.colors("borderInlineStartColor"),borderLeftStyle:V.borderStyles("borderLeftStyle"),borderInlineStartStyle:V.borderStyles("borderInlineStartStyle"),borderRightWidth:V.borderWidths("borderRightWidth"),borderInlineEndWidth:V.borderWidths("borderInlineEndWidth"),borderRightColor:V.colors("borderRightColor"),borderInlineEndColor:V.colors("borderInlineEndColor"),borderRightStyle:V.borderStyles("borderRightStyle"),borderInlineEndStyle:V.borderStyles("borderInlineEndStyle"),borderTopRadius:V.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:V.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:V.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:V.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Dt,{rounded:Dt.borderRadius,roundedTop:Dt.borderTopRadius,roundedTopLeft:Dt.borderTopLeftRadius,roundedTopRight:Dt.borderTopRightRadius,roundedTopStart:Dt.borderStartStartRadius,roundedTopEnd:Dt.borderStartEndRadius,roundedBottom:Dt.borderBottomRadius,roundedBottomLeft:Dt.borderBottomLeftRadius,roundedBottomRight:Dt.borderBottomRightRadius,roundedBottomStart:Dt.borderEndStartRadius,roundedBottomEnd:Dt.borderEndEndRadius,roundedLeft:Dt.borderLeftRadius,roundedRight:Dt.borderRightRadius,roundedStart:Dt.borderInlineStartRadius,roundedEnd:Dt.borderInlineEndRadius,borderStart:Dt.borderInlineStart,borderEnd:Dt.borderInlineEnd,borderTopStartRadius:Dt.borderStartStartRadius,borderTopEndRadius:Dt.borderStartEndRadius,borderBottomStartRadius:Dt.borderEndStartRadius,borderBottomEndRadius:Dt.borderEndEndRadius,borderStartRadius:Dt.borderInlineStartRadius,borderEndRadius:Dt.borderInlineEndRadius,borderStartWidth:Dt.borderInlineStartWidth,borderEndWidth:Dt.borderInlineEndWidth,borderStartColor:Dt.borderInlineStartColor,borderEndColor:Dt.borderInlineEndColor,borderStartStyle:Dt.borderInlineStartStyle,borderEndStyle:Dt.borderInlineEndStyle});var fH={color:V.colors("color"),textColor:V.colors("color"),fill:V.colors("fill"),stroke:V.colors("stroke")},hx={boxShadow:V.shadows("boxShadow"),mixBlendMode:!0,blendMode:V.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:V.prop("backgroundBlendMode"),opacity:!0};Object.assign(hx,{shadow:hx.boxShadow});var hH={filter:{transform:_t.filter},blur:V.blur("--chakra-blur"),brightness:V.propT("--chakra-brightness",_t.brightness),contrast:V.propT("--chakra-contrast",_t.contrast),hueRotate:V.propT("--chakra-hue-rotate",_t.hueRotate),invert:V.propT("--chakra-invert",_t.invert),saturate:V.propT("--chakra-saturate",_t.saturate),dropShadow:V.propT("--chakra-drop-shadow",_t.dropShadow),backdropFilter:{transform:_t.backdropFilter},backdropBlur:V.blur("--chakra-backdrop-blur"),backdropBrightness:V.propT("--chakra-backdrop-brightness",_t.brightness),backdropContrast:V.propT("--chakra-backdrop-contrast",_t.contrast),backdropHueRotate:V.propT("--chakra-backdrop-hue-rotate",_t.hueRotate),backdropInvert:V.propT("--chakra-backdrop-invert",_t.invert),backdropSaturate:V.propT("--chakra-backdrop-saturate",_t.saturate)},e0={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:_t.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:V.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:V.space("gap"),rowGap:V.space("rowGap"),columnGap:V.space("columnGap")};Object.assign(e0,{flexDir:e0.flexDirection});var W4={gridGap:V.space("gridGap"),gridColumnGap:V.space("gridColumnGap"),gridRowGap:V.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},pH={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:_t.outline},outlineOffset:!0,outlineColor:V.colors("outlineColor")},Zi={width:V.sizesT("width"),inlineSize:V.sizesT("inlineSize"),height:V.sizes("height"),blockSize:V.sizes("blockSize"),boxSize:V.sizes(["width","height"]),minWidth:V.sizes("minWidth"),minInlineSize:V.sizes("minInlineSize"),minHeight:V.sizes("minHeight"),minBlockSize:V.sizes("minBlockSize"),maxWidth:V.sizes("maxWidth"),maxInlineSize:V.sizes("maxInlineSize"),maxHeight:V.sizes("maxHeight"),maxBlockSize:V.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (min-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (max-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:V.propT("float",_t.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Zi,{w:Zi.width,h:Zi.height,minW:Zi.minWidth,maxW:Zi.maxWidth,minH:Zi.minHeight,maxH:Zi.maxHeight,overscroll:Zi.overscrollBehavior,overscrollX:Zi.overscrollBehaviorX,overscrollY:Zi.overscrollBehaviorY});var mH={listStyleType:!0,listStylePosition:!0,listStylePos:V.prop("listStylePosition"),listStyleImage:!0,listStyleImg:V.prop("listStyleImage")};function vH(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return e===void 0?r:e}var gH=e=>{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(i))return s.get(i);const l=e(n,i,o,a);return s.set(i,l),l}},yH=gH(vH),bH={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},wH={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},T1=(e,t,r)=>{const n={},i=yH(e,t,{});for(const o in i)o in r&&r[o]!=null||(n[o]=i[o]);return n},SH={srOnly:{transform(e){return e===!0?bH:e==="focusable"?wH:{}}},layerStyle:{processResult:!0,transform:(e,t,r)=>T1(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>T1(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>T1(t,e,r)}},Xh={position:!0,pos:V.prop("position"),zIndex:V.prop("zIndex","zIndices"),inset:V.spaceT("inset"),insetX:V.spaceT(["left","right"]),insetInline:V.spaceT("insetInline"),insetY:V.spaceT(["top","bottom"]),insetBlock:V.spaceT("insetBlock"),top:V.spaceT("top"),insetBlockStart:V.spaceT("insetBlockStart"),bottom:V.spaceT("bottom"),insetBlockEnd:V.spaceT("insetBlockEnd"),left:V.spaceT("left"),insetInlineStart:V.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:V.spaceT("right"),insetInlineEnd:V.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Xh,{insetStart:Xh.insetInlineStart,insetEnd:Xh.insetInlineEnd});var _H={ring:{transform:_t.ring},ringColor:V.colors("--chakra-ring-color"),ringOffset:V.prop("--chakra-ring-offset-width"),ringOffsetColor:V.colors("--chakra-ring-offset-color"),ringInset:V.prop("--chakra-ring-inset")},fr={margin:V.spaceT("margin"),marginTop:V.spaceT("marginTop"),marginBlockStart:V.spaceT("marginBlockStart"),marginRight:V.spaceT("marginRight"),marginInlineEnd:V.spaceT("marginInlineEnd"),marginBottom:V.spaceT("marginBottom"),marginBlockEnd:V.spaceT("marginBlockEnd"),marginLeft:V.spaceT("marginLeft"),marginInlineStart:V.spaceT("marginInlineStart"),marginX:V.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:V.spaceT("marginInline"),marginY:V.spaceT(["marginTop","marginBottom"]),marginBlock:V.spaceT("marginBlock"),padding:V.space("padding"),paddingTop:V.space("paddingTop"),paddingBlockStart:V.space("paddingBlockStart"),paddingRight:V.space("paddingRight"),paddingBottom:V.space("paddingBottom"),paddingBlockEnd:V.space("paddingBlockEnd"),paddingLeft:V.space("paddingLeft"),paddingInlineStart:V.space("paddingInlineStart"),paddingInlineEnd:V.space("paddingInlineEnd"),paddingX:V.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:V.space("paddingInline"),paddingY:V.space(["paddingTop","paddingBottom"]),paddingBlock:V.space("paddingBlock")};Object.assign(fr,{m:fr.margin,mt:fr.marginTop,mr:fr.marginRight,me:fr.marginInlineEnd,marginEnd:fr.marginInlineEnd,mb:fr.marginBottom,ml:fr.marginLeft,ms:fr.marginInlineStart,marginStart:fr.marginInlineStart,mx:fr.marginX,my:fr.marginY,p:fr.padding,pt:fr.paddingTop,py:fr.paddingY,px:fr.paddingX,pb:fr.paddingBottom,pl:fr.paddingLeft,ps:fr.paddingInlineStart,paddingStart:fr.paddingInlineStart,pr:fr.paddingRight,pe:fr.paddingInlineEnd,paddingEnd:fr.paddingInlineEnd});var xH={textDecorationColor:V.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:V.shadows("textShadow")},PH={clipPath:!0,transform:V.propT("transform",_t.transform),transformOrigin:!0,translateX:V.spaceT("--chakra-translate-x"),translateY:V.spaceT("--chakra-translate-y"),skewX:V.degreeT("--chakra-skew-x"),skewY:V.degreeT("--chakra-skew-y"),scaleX:V.prop("--chakra-scale-x"),scaleY:V.prop("--chakra-scale-y"),scale:V.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:V.degreeT("--chakra-rotate")},CH={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:V.prop("transitionDuration","transition.duration"),transitionProperty:V.prop("transitionProperty","transition.property"),transitionTimingFunction:V.prop("transitionTimingFunction","transition.easing")},EH={fontFamily:V.prop("fontFamily","fonts"),fontSize:V.prop("fontSize","fontSizes",_t.px),fontWeight:V.prop("fontWeight","fontWeights"),lineHeight:V.prop("lineHeight","lineHeights"),letterSpacing:V.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},TH={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:V.spaceT("scrollMargin"),scrollMarginTop:V.spaceT("scrollMarginTop"),scrollMarginBottom:V.spaceT("scrollMarginBottom"),scrollMarginLeft:V.spaceT("scrollMarginLeft"),scrollMarginRight:V.spaceT("scrollMarginRight"),scrollMarginX:V.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:V.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:V.spaceT("scrollPadding"),scrollPaddingTop:V.spaceT("scrollPaddingTop"),scrollPaddingBottom:V.spaceT("scrollPaddingBottom"),scrollPaddingLeft:V.spaceT("scrollPaddingLeft"),scrollPaddingRight:V.spaceT("scrollPaddingRight"),scrollPaddingX:V.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:V.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function K4(e){return zo(e)&&e.reference?e.reference:String(e)}var $b=(e,...t)=>t.map(K4).join(` ${e} `).replace(/calc/g,""),mk=(...e)=>`calc(${$b("+",...e)})`,vk=(...e)=>`calc(${$b("-",...e)})`,px=(...e)=>`calc(${$b("*",...e)})`,gk=(...e)=>`calc(${$b("/",...e)})`,yk=e=>{const t=K4(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:px(t,-1)},du=Object.assign(e=>({add:(...t)=>du(mk(e,...t)),subtract:(...t)=>du(vk(e,...t)),multiply:(...t)=>du(px(e,...t)),divide:(...t)=>du(gk(e,...t)),negate:()=>du(yk(e)),toString:()=>e.toString()}),{add:mk,subtract:vk,multiply:px,divide:gk,negate:yk});function OH(e,t="-"){return e.replace(/\s+/g,t)}function RH(e){const t=OH(e.toString());return kH(IH(t))}function IH(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function kH(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function jH(e,t=""){return[t,e].filter(Boolean).join("-")}function $H(e,t){return`var(${e}${t?`, ${t}`:""})`}function AH(e,t=""){return RH(`--${jH(e,t)}`)}function qe(e,t,r){const n=AH(e,r);return{variable:n,reference:$H(n,t)}}function DH(e,t){const r={};for(const n of t){if(Array.isArray(n)){const[i,o]=n;r[i]=qe(`${e}-${i}`,o);continue}r[n]=qe(`${e}-${n}`)}return r}function MH(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function NH(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}function mx(e){if(e==null)return e;const{unitless:t}=NH(e);return t||typeof e=="number"?`${e}px`:e}var G4=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,yE=e=>Object.fromEntries(Object.entries(e).sort(G4));function bk(e){const t=yE(e);return Object.assign(Object.values(t),t)}function FH(e){const t=Object.keys(yE(e));return new Set(t)}function wk(e){var t;if(!e)return e;e=(t=mx(e))!=null?t:e;const r=-.02;return typeof e=="number"?`${e+r}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+r}`)}function $h(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${mx(e)})`),t&&r.push("and",`(max-width: ${mx(t)})`),r.join(" ")}function LH(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const r=bk(e),n=Object.entries(e).sort(G4).map(([a,s],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?wk(d):void 0,{_minW:wk(s),breakpoint:a,minW:s,maxW:d,maxWQuery:$h(null,d),minWQuery:$h(s),minMaxQuery:$h(s,d)}}),i=FH(e),o=Array.from(i.values());return{keys:i,normalized:r,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>i.has(l))},asObject:yE(e),asArray:bk(e),details:n,get(a){return n.find(s=>s.breakpoint===a)},media:[null,...r.map(a=>$h(a)).slice(1)],toArrayValue(a){if(!zo(a))throw new Error("toArrayValue: value must be an object");const s=o.map(l=>{var u;return(u=a[l])!=null?u:null});for(;MH(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=o[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var _n={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},js=e=>Q4(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Ba=e=>Q4(t=>e(t,"~ &"),"[data-peer]",".peer"),Q4=(e,...t)=>t.map(e).join(", "),Ab={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:js(_n.hover),_peerHover:Ba(_n.hover),_groupFocus:js(_n.focus),_peerFocus:Ba(_n.focus),_groupFocusVisible:js(_n.focusVisible),_peerFocusVisible:Ba(_n.focusVisible),_groupActive:js(_n.active),_peerActive:Ba(_n.active),_groupDisabled:js(_n.disabled),_peerDisabled:Ba(_n.disabled),_groupInvalid:js(_n.invalid),_peerInvalid:Ba(_n.invalid),_groupChecked:js(_n.checked),_peerChecked:Ba(_n.checked),_groupFocusWithin:js(_n.focusWithin),_peerFocusWithin:Ba(_n.focusWithin),_peerPlaceholderShown:Ba(_n.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Y4=Object.keys(Ab);function Sk(e,t){return qe(String(e).replace(/\./g,"-"),void 0,t)}function BH(e,t){let r={};const n={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=Sk(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const f=i.split("."),[h,...m]=f,v=`${h}.-${m.join(".")}`,w=du.negate(s),p=du.negate(u);n[v]={value:w,var:l,varRef:p}}r[l]=s,n[i]={value:s,var:l,varRef:u};continue}const c=f=>{const m=[String(i).split(".")[0],f].join(".");if(!e[m])return f;const{reference:w}=Sk(m,t==null?void 0:t.cssVarPrefix);return w},d=zo(s)?s:{default:s};r=ya(r,Object.entries(d).reduce((f,[h,m])=>{var v,w;if(!m)return f;const p=c(`${m}`);if(h==="default")return f[l]=p,f;const g=(w=(v=Ab)==null?void 0:v[h])!=null?w:h;return f[g]={[l]:p},f},{})),n[i]={value:u,var:l,varRef:u}}return{cssVars:r,cssMap:n}}function VH(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function zH(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function UH(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function _k(e,t,r={}){const{stop:n,getKey:i}=r;function o(a,s=[]){var l;if(UH(a)||Array.isArray(a)){const u={};for(const[c,d]of Object.entries(a)){const f=(l=i==null?void 0:i(c))!=null?l:c,h=[...s,f];if(n!=null&&n(a,h))return t(a,s);u[f]=o(d,h)}return u}return t(a,s)}return o(e)}var qH=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function HH(e){return zH(e,qH)}function WH(e){return e.semanticTokens}function KH(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...i}=e;return i}var GH=e=>Y4.includes(e)||e==="default";function QH({tokens:e,semanticTokens:t}){const r={};return _k(e,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!1,value:n})}),_k(t,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!0,value:n})},{stop:n=>Object.keys(n).every(GH)}),r}function YH(e){var t;const r=KH(e),n=HH(r),i=WH(r),o=QH({tokens:n,semanticTokens:i}),a=(t=r.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=BH(o,{cssVarPrefix:a});return Object.assign(r,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:LH(r.breakpoints)}),r}var bE=ya({},Qg,Dt,fH,e0,Zi,hH,_H,pH,W4,SH,Xh,hx,fr,TH,EH,xH,PH,mH,CH);Object.assign({},fr,Zi,e0,W4,Xh);var XH=[...Object.keys(bE),...Y4],JH={...bE,...Ab},ZH=e=>e in JH,eW=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:i}=t.__breakpoints,o={};for(const a in e){let s=lo(e[a],t);if(s==null)continue;if(s=zo(s)&&r(s)?n(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const c=i==null?void 0:i[u];if(!c){o[a]=s[u];continue}o[c]=o[c]||{},s[u]!=null&&(o[c][a]=s[u])}}return o};function tW(e){const t=[];let r="",n=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(n=!0,r+=o):o===")"?(n=!1,r+=o):o===","&&!n?(t.push(r),r=""):r+=o}return r=r.trim(),r&&t.push(r),t}function rW(e){return/^var\(--.+\)$/.test(e)}var nW=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!rW(t),iW=(e,t)=>{var r,n;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=tW(t);return t=(n=(r=i(a))!=null?r:o(s))!=null?n:o(t),t};function oW(e){const{configs:t={},pseudos:r={},theme:n}=e,i=(o,a=!1)=>{var s,l,u;const c=lo(o,n),d=eW(c)(n);let f={};for(let h in d){const m=d[h];let v=lo(m,n);h in r&&(h=r[h]),nW(h,v)&&(v=iW(n,v));let w=t[h];if(w===!0&&(w={property:h}),zo(v)){f[h]=(s=f[h])!=null?s:{},f[h]=ya({},f[h],i(v,!0));continue}let p=(u=(l=w==null?void 0:w.transform)==null?void 0:l.call(w,v,n,c))!=null?u:v;p=w!=null&&w.processResult?i(p,!0):p;const g=lo(w==null?void 0:w.property,n);if(!a&&(w!=null&&w.static)){const b=lo(w.static,n);f=ya({},f,b)}if(g&&Array.isArray(g)){for(const b of g)f[b]=p;continue}if(g){g==="&"&&zo(p)?f=ya({},f,p):f[g]=p;continue}if(zo(p)){f=ya({},f,p);continue}f[h]=p}return f};return i}var X4=e=>t=>oW({theme:t,pseudos:Ab,configs:bE})(e);function lr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function aW(e,t){if(Array.isArray(e))return e;if(zo(e))return t(e);if(e!=null)return[e]}function sW(e,t){for(let r=t+1;r<e.length;r++)if(e[r]!=null)return r;return-1}function lW(e){const t=e.__breakpoints;return function(n,i,o,a){var s,l;if(!t)return;const u={},c=aW(o,t.toArrayValue);if(!c)return u;const d=c.length,f=d===1,h=!!n.parts;for(let m=0;m<d;m++){const v=t.details[m],w=t.details[sW(c,m)],p=$h(v.minW,w==null?void 0:w._minW),g=lo((s=n[i])==null?void 0:s[c[m]],a);if(g){if(h){(l=n.parts)==null||l.forEach(b=>{ya(u,{[b]:f?g[b]:{[p]:g[b]}})});continue}if(!h){f?ya(u,g):u[p]=g;continue}u[p]=g}}return u}}function uW(e){return t=>{var r;const{variant:n,size:i,theme:o}=t,a=lW(o);return ya({},lo((r=e.baseStyle)!=null?r:{},t),a(e,"sizes",i,t),a(e,"variants",n,t))}}function cW(e,t,r){var n,i,o;return(o=(i=(n=e.__cssMap)==null?void 0:n[`${t}.${r}`])==null?void 0:i.varRef)!=null?o:r}function qn(e){return VH(e,["styleConfig","size","variant","colorScheme"])}var dW={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},fW={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},hW={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},pW={property:dW,easing:fW,duration:hW},mW=pW,vW={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},gW=vW,yW={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},bW=yW,wW={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},SW=wW,_W={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},xW=_W,PW={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},CW=PW,EW={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},TW=EW,OW={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},RW=OW,IW={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},J4=IW,Z4={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},kW={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},jW={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},$W={...Z4,...kW,container:jW},eF=$W,AW={breakpoints:SW,zIndices:gW,radii:CW,blur:RW,colors:xW,...J4,sizes:eF,shadows:TW,space:Z4,borders:bW,transition:mW},{defineMultiStyleConfig:DW,definePartsStyle:Ah}=lr(["stepper","step","title","description","indicator","separator","icon","number"]),Ua=qe("stepper-indicator-size"),nd=qe("stepper-icon-size"),id=qe("stepper-title-font-size"),Dh=qe("stepper-description-font-size"),uh=qe("stepper-accent-color"),MW=Ah(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[uh.variable]:`colors.${e}.500`,_dark:{[uh.variable]:`colors.${e}.200`}},title:{fontSize:id.reference,fontWeight:"medium"},description:{fontSize:Dh.reference,color:"chakra-subtle-text"},number:{fontSize:id.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:nd.reference,height:nd.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ua.reference,height:Ua.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:uh.reference},"&[data-status=complete]":{bg:uh.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:uh.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ua.reference} - 8px)`,top:`calc(${Ua.reference} + 4px)`,insetStart:`calc(${Ua.reference} / 2 - 1px)`}}})),NW=DW({baseStyle:MW,sizes:{xs:Ah({stepper:{[Ua.variable]:"sizes.4",[nd.variable]:"sizes.3",[id.variable]:"fontSizes.xs",[Dh.variable]:"fontSizes.xs"}}),sm:Ah({stepper:{[Ua.variable]:"sizes.6",[nd.variable]:"sizes.4",[id.variable]:"fontSizes.sm",[Dh.variable]:"fontSizes.xs"}}),md:Ah({stepper:{[Ua.variable]:"sizes.8",[nd.variable]:"sizes.5",[id.variable]:"fontSizes.md",[Dh.variable]:"fontSizes.sm"}}),lg:Ah({stepper:{[Ua.variable]:"sizes.10",[nd.variable]:"sizes.6",[id.variable]:"fontSizes.lg",[Dh.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Bt(e,t={}){let r=!1;function n(){if(!r){r=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){n();for(const d of c)t[d]=l(d);return Bt(e,t)}function o(...c){for(const d of c)d in t||(t[d]=l(d));return Bt(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const h=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var FW=Bt("accordion").parts("root","container","button","panel").extend("icon"),LW=Bt("alert").parts("title","description","container").extend("icon","spinner"),BW=Bt("avatar").parts("label","badge","container").extend("excessLabel","group"),VW=Bt("breadcrumb").parts("link","item","container").extend("separator");Bt("button").parts();var zW=Bt("checkbox").parts("control","icon","container").extend("label");Bt("progress").parts("track","filledTrack").extend("label");var UW=Bt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),qW=Bt("editable").parts("preview","input","textarea"),HW=Bt("form").parts("container","requiredIndicator","helperText"),WW=Bt("formError").parts("text","icon"),KW=Bt("input").parts("addon","field","element","group"),GW=Bt("list").parts("container","item","icon"),QW=Bt("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),YW=Bt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),XW=Bt("numberinput").parts("root","field","stepperGroup","stepper");Bt("pininput").parts("field");var JW=Bt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),ZW=Bt("progress").parts("label","filledTrack","track"),eK=Bt("radio").parts("container","control","label"),tK=Bt("select").parts("field","icon"),rK=Bt("slider").parts("container","track","thumb","filledTrack","mark"),nK=Bt("stat").parts("container","label","helpText","number","icon"),iK=Bt("switch").parts("container","track","thumb","label"),oK=Bt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),aK=Bt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),sK=Bt("tag").parts("container","label","closeButton"),lK=Bt("card").parts("container","header","body","footer");Bt("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Su(e,t,r){return Math.min(Math.max(e,r),t)}class uK extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Mh=uK;function wE(e){if(typeof e!="string")throw new Mh(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=gK.test(e)?fK(e):e;const r=hK.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(Yp(s,2),16)),parseInt(Yp(a[3]||"f",2),16)/255]}const n=pK.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=mK.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=vK.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(Su(0,100,s)!==s)throw new Mh(e);if(Su(0,100,l)!==l)throw new Mh(e);return[...yK(a,s,l),Number.isNaN(u)?1:u]}throw new Mh(e)}function cK(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const xk=e=>parseInt(e.replace(/_/g,""),36),dK="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=xk(t.substring(0,3)),n=xk(t.substring(3)).toString(16);let i="";for(let o=0;o<6-n.length;o++)i+="0";return e[r]=`${i}${n}`,e},{});function fK(e){const t=e.toLowerCase().trim(),r=dK[cK(t)];if(!r)throw new Mh(e);return`#${r}`}const Yp=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),hK=new RegExp(`^#${Yp("([a-f0-9])",3)}([a-f0-9])?$`,"i"),pK=new RegExp(`^#${Yp("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),mK=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Yp(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),vK=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,gK=/^[a-z]+$/i,Pk=e=>Math.round(e*255),yK=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(Pk);const i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);const c=n-o/2,d=s+c,f=l+c,h=u+c;return[d,f,h].map(Pk)};function bK(e,t,r,n){return`rgba(${Su(0,255,e).toFixed()}, ${Su(0,255,t).toFixed()}, ${Su(0,255,r).toFixed()}, ${parseFloat(Su(0,1,n).toFixed(3))})`}function wK(e,t){const[r,n,i,o]=wE(e);return bK(r,n,i,o-t)}function SK(e){const[t,r,n,i]=wE(e);let o=a=>{const s=Su(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(r)}${o(n)}${i<1?o(Math.round(i*255)):""}`}function _K(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:i;return e===i?r:e}var xK=e=>Object.keys(e).length===0,Yn=(e,t,r)=>{const n=_K(e,`colors.${t}`,t);try{return SK(n),n}catch{return r??"#000000"}},PK=e=>{const[t,r,n]=wE(e);return(t*299+r*587+n*114)/1e3},CK=e=>t=>{const r=Yn(t,e);return PK(r)<128?"dark":"light"},EK=e=>t=>CK(e)(t)==="dark",Qd=(e,t)=>r=>{const n=Yn(r,e);return wK(n,1-t)};function Ck(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
327
- 45deg,
328
- ${t} 25%,
329
- transparent 25%,
330
- transparent 50%,
331
- ${t} 50%,
332
- ${t} 75%,
333
- transparent 75%,
334
- transparent
335
- )`,backgroundSize:`${e} ${e}`}}var TK=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function OK(e){const t=TK();return!e||xK(e)?t:e.string&&e.colors?IK(e.string,e.colors):e.string&&!e.colors?RK(e.string):e.colors&&!e.string?kK(e.colors):t}function RK(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t=t&t;let r="#";for(let n=0;n<3;n+=1){const i=t>>n*8&255;r+=`00${i.toString(16)}`.substr(-2)}return r}function IK(e,t){let r=0;if(e.length===0)return t[0];for(let n=0;n<e.length;n+=1)r=e.charCodeAt(n)+((r<<5)-r),r=r&r;return r=(r%t.length+t.length)%t.length,t[r]}function kK(e){return e[Math.floor(Math.random()*e.length)]}function Ue(e,t){return r=>r.colorMode==="dark"?t:e}function SE(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?t==="vertical"?r:n:{}}function tF(e){return zo(e)&&e.reference?e.reference:String(e)}var Db=(e,...t)=>t.map(tF).join(` ${e} `).replace(/calc/g,""),Ek=(...e)=>`calc(${Db("+",...e)})`,Tk=(...e)=>`calc(${Db("-",...e)})`,vx=(...e)=>`calc(${Db("*",...e)})`,Ok=(...e)=>`calc(${Db("/",...e)})`,Rk=e=>{const t=tF(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:vx(t,-1)},qa=Object.assign(e=>({add:(...t)=>qa(Ek(e,...t)),subtract:(...t)=>qa(Tk(e,...t)),multiply:(...t)=>qa(vx(e,...t)),divide:(...t)=>qa(Ok(e,...t)),negate:()=>qa(Rk(e)),toString:()=>e.toString()}),{add:Ek,subtract:Tk,multiply:vx,divide:Ok,negate:Rk});function jK(e){return!Number.isInteger(parseFloat(e.toString()))}function $K(e,t="-"){return e.replace(/\s+/g,t)}function rF(e){const t=$K(e.toString());return t.includes("\\.")?e:jK(e)?t.replace(".","\\."):e}function AK(e,t=""){return[t,rF(e)].filter(Boolean).join("-")}function DK(e,t){return`var(${rF(e)}${t?`, ${t}`:""})`}function MK(e,t=""){return`--${AK(e,t)}`}function un(e,t){const r=MK(e,void 0);return{variable:r,reference:DK(r,NK(void 0))}}function NK(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:FK,definePartsStyle:Yg}=lr(iK.keys),Jh=un("switch-track-width"),Ou=un("switch-track-height"),O1=un("switch-track-diff"),LK=qa.subtract(Jh,Ou),gx=un("switch-thumb-x"),ch=un("switch-bg"),BK=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Jh.reference],height:[Ou.reference],transitionProperty:"common",transitionDuration:"fast",[ch.variable]:"colors.gray.300",_dark:{[ch.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[ch.variable]:`colors.${t}.500`,_dark:{[ch.variable]:`colors.${t}.200`}},bg:ch.reference}},VK={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Ou.reference],height:[Ou.reference],_checked:{transform:`translateX(${gx.reference})`}},zK=Yg(e=>({container:{[O1.variable]:LK,[gx.variable]:O1.reference,_rtl:{[gx.variable]:qa(O1).negate().toString()}},track:BK(e),thumb:VK})),UK={sm:Yg({container:{[Jh.variable]:"1.375rem",[Ou.variable]:"sizes.3"}}),md:Yg({container:{[Jh.variable]:"1.875rem",[Ou.variable]:"sizes.4"}}),lg:Yg({container:{[Jh.variable]:"2.875rem",[Ou.variable]:"sizes.6"}})},qK=FK({baseStyle:zK,sizes:UK,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:HK,definePartsStyle:Id}=lr(oK.keys),WK=Id({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),t0={"&[data-is-numeric=true]":{textAlign:"end"}},KK=Id(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...t0},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...t0},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),GK=Id(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...t0},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...t0},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),QK={simple:KK,striped:GK,unstyled:{}},YK={sm:Id({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Id({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Id({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},XK=HK({baseStyle:WK,variants:QK,sizes:YK,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),si=qe("tabs-color"),No=qe("tabs-bg"),ng=qe("tabs-border-color"),{defineMultiStyleConfig:JK,definePartsStyle:Ca}=lr(aK.keys),ZK=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},eG=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},tG=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:r==="vertical"?"column":"row"}},rG={p:4},nG=Ca(e=>({root:ZK(e),tab:eG(e),tablist:tG(e),tabpanel:rG})),iG={sm:Ca({tab:{py:1,px:4,fontSize:"sm"}}),md:Ca({tab:{fontSize:"md",py:2,px:4}}),lg:Ca({tab:{fontSize:"lg",py:3,px:4}})},oG=Ca(e=>{const{colorScheme:t,orientation:r}=e,n=r==="vertical",i=n?"borderStart":"borderBottom",o=n?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[si.variable]:`colors.${t}.600`,_dark:{[si.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[No.variable]:"colors.gray.200",_dark:{[No.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:si.reference,bg:No.reference}}}),aG=Ca(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[ng.variable]:"transparent",_selected:{[si.variable]:`colors.${t}.600`,[ng.variable]:"colors.white",_dark:{[si.variable]:`colors.${t}.300`,[ng.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:ng.reference},color:si.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),sG=Ca(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[No.variable]:"colors.gray.50",_dark:{[No.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[No.variable]:"colors.white",[si.variable]:`colors.${t}.600`,_dark:{[No.variable]:"colors.gray.800",[si.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:si.reference,bg:No.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),lG=Ca(e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Yn(r,`${t}.700`),bg:Yn(r,`${t}.100`)}}}}),uG=Ca(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[si.variable]:"colors.gray.600",_dark:{[si.variable]:"inherit"},_selected:{[si.variable]:"colors.white",[No.variable]:`colors.${t}.600`,_dark:{[si.variable]:"colors.gray.800",[No.variable]:`colors.${t}.300`}},color:si.reference,bg:No.reference}}}),cG=Ca({}),dG={line:oG,enclosed:aG,"enclosed-colored":sG,"soft-rounded":lG,"solid-rounded":uG,unstyled:cG},fG=JK({baseStyle:nG,sizes:iG,variants:dG,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Kr=DH("badge",["bg","color","shadow"]),hG={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Kr.bg.reference,color:Kr.color.reference,boxShadow:Kr.shadow.reference},pG=e=>{const{colorScheme:t,theme:r}=e,n=Qd(`${t}.500`,.6)(r);return{[Kr.bg.variable]:`colors.${t}.500`,[Kr.color.variable]:"colors.white",_dark:{[Kr.bg.variable]:n,[Kr.color.variable]:"colors.whiteAlpha.800"}}},mG=e=>{const{colorScheme:t,theme:r}=e,n=Qd(`${t}.200`,.16)(r);return{[Kr.bg.variable]:`colors.${t}.100`,[Kr.color.variable]:`colors.${t}.800`,_dark:{[Kr.bg.variable]:n,[Kr.color.variable]:`colors.${t}.200`}}},vG=e=>{const{colorScheme:t,theme:r}=e,n=Qd(`${t}.200`,.8)(r);return{[Kr.color.variable]:`colors.${t}.500`,_dark:{[Kr.color.variable]:n},[Kr.shadow.variable]:`inset 0 0 0px 1px ${Kr.color.reference}`}},gG={solid:pG,subtle:mG,outline:vG},Zh={baseStyle:hG,variants:gG,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:yG,definePartsStyle:Ru}=lr(sK.keys),Ik=qe("tag-bg"),kk=qe("tag-color"),R1=qe("tag-shadow"),Xg=qe("tag-min-height"),Jg=qe("tag-min-width"),Zg=qe("tag-font-size"),ey=qe("tag-padding-inline"),bG={fontWeight:"medium",lineHeight:1.2,outline:0,[kk.variable]:Kr.color.reference,[Ik.variable]:Kr.bg.reference,[R1.variable]:Kr.shadow.reference,color:kk.reference,bg:Ik.reference,boxShadow:R1.reference,borderRadius:"md",minH:Xg.reference,minW:Jg.reference,fontSize:Zg.reference,px:ey.reference,_focusVisible:{[R1.variable]:"shadows.outline"}},wG={lineHeight:1.2,overflow:"visible"},SG={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},_G=Ru({container:bG,label:wG,closeButton:SG}),xG={sm:Ru({container:{[Xg.variable]:"sizes.5",[Jg.variable]:"sizes.5",[Zg.variable]:"fontSizes.xs",[ey.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ru({container:{[Xg.variable]:"sizes.6",[Jg.variable]:"sizes.6",[Zg.variable]:"fontSizes.sm",[ey.variable]:"space.2"}}),lg:Ru({container:{[Xg.variable]:"sizes.8",[Jg.variable]:"sizes.8",[Zg.variable]:"fontSizes.md",[ey.variable]:"space.3"}})},PG={subtle:Ru(e=>{var t;return{container:(t=Zh.variants)==null?void 0:t.subtle(e)}}),solid:Ru(e=>{var t;return{container:(t=Zh.variants)==null?void 0:t.solid(e)}}),outline:Ru(e=>{var t;return{container:(t=Zh.variants)==null?void 0:t.outline(e)}})},CG=yG({variants:PG,baseStyle:_G,sizes:xG,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Ka,defineMultiStyleConfig:EG}=lr(KW.keys),od=qe("input-height"),ad=qe("input-font-size"),sd=qe("input-padding"),ld=qe("input-border-radius"),TG=Ka({addon:{height:od.reference,fontSize:ad.reference,px:sd.reference,borderRadius:ld.reference},field:{width:"100%",height:od.reference,fontSize:ad.reference,px:sd.reference,borderRadius:ld.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),$s={lg:{[ad.variable]:"fontSizes.lg",[sd.variable]:"space.4",[ld.variable]:"radii.md",[od.variable]:"sizes.12"},md:{[ad.variable]:"fontSizes.md",[sd.variable]:"space.4",[ld.variable]:"radii.md",[od.variable]:"sizes.10"},sm:{[ad.variable]:"fontSizes.sm",[sd.variable]:"space.3",[ld.variable]:"radii.sm",[od.variable]:"sizes.8"},xs:{[ad.variable]:"fontSizes.xs",[sd.variable]:"space.2",[ld.variable]:"radii.sm",[od.variable]:"sizes.6"}},OG={lg:Ka({field:$s.lg,group:$s.lg}),md:Ka({field:$s.md,group:$s.md}),sm:Ka({field:$s.sm,group:$s.sm}),xs:Ka({field:$s.xs,group:$s.xs})};function _E(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:r||Ue("red.500","red.300")(e)}}var RG=Ka(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=_E(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Yn(t,n),boxShadow:`0 0 0 1px ${Yn(t,n)}`},_focusVisible:{zIndex:1,borderColor:Yn(t,r),boxShadow:`0 0 0 1px ${Yn(t,r)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),IG=Ka(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=_E(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Yn(t,n)},_focusVisible:{bg:"transparent",borderColor:Yn(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),kG=Ka(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=_E(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Yn(t,n),boxShadow:`0px 1px 0px 0px ${Yn(t,n)}`},_focusVisible:{borderColor:Yn(t,r),boxShadow:`0px 1px 0px 0px ${Yn(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),jG=Ka({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),$G={outline:RG,filled:IG,flushed:kG,unstyled:jG},Lt=EG({baseStyle:TG,sizes:OG,variants:$G,defaultProps:{size:"md",variant:"outline"}}),jk,AG={...(jk=Lt.baseStyle)==null?void 0:jk.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},$k,Ak,DG={outline:e=>{var t,r;return(r=(t=Lt.variants)==null?void 0:t.outline(e).field)!=null?r:{}},flushed:e=>{var t,r;return(r=(t=Lt.variants)==null?void 0:t.flushed(e).field)!=null?r:{}},filled:e=>{var t,r;return(r=(t=Lt.variants)==null?void 0:t.filled(e).field)!=null?r:{}},unstyled:(Ak=($k=Lt.variants)==null?void 0:$k.unstyled.field)!=null?Ak:{}},Dk,Mk,Nk,Fk,Lk,Bk,Vk,zk,MG={xs:(Mk=(Dk=Lt.sizes)==null?void 0:Dk.xs.field)!=null?Mk:{},sm:(Fk=(Nk=Lt.sizes)==null?void 0:Nk.sm.field)!=null?Fk:{},md:(Bk=(Lk=Lt.sizes)==null?void 0:Lk.md.field)!=null?Bk:{},lg:(zk=(Vk=Lt.sizes)==null?void 0:Vk.lg.field)!=null?zk:{}},NG={baseStyle:AG,sizes:MG,variants:DG,defaultProps:{size:"md",variant:"outline"}},ig=un("tooltip-bg"),I1=un("tooltip-fg"),FG=un("popper-arrow-bg"),LG={bg:ig.reference,color:I1.reference,[ig.variable]:"colors.gray.700",[I1.variable]:"colors.whiteAlpha.900",_dark:{[ig.variable]:"colors.gray.300",[I1.variable]:"colors.gray.900"},[FG.variable]:ig.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},BG={baseStyle:LG},{defineMultiStyleConfig:VG,definePartsStyle:Nh}=lr(ZW.keys),zG=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:i}=e,o=Ue(Ck(),Ck("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
336
- to right,
337
- transparent 0%,
338
- ${Yn(r,a)} 50%,
339
- transparent 100%
340
- )`;return{...!n&&i&&o,...n?{bgImage:s}:{bgColor:a}}},UG={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},qG=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),HG=e=>({transitionProperty:"common",transitionDuration:"slow",...zG(e)}),WG=Nh(e=>({label:UG,filledTrack:HG(e),track:qG(e)})),KG={xs:Nh({track:{h:"1"}}),sm:Nh({track:{h:"2"}}),md:Nh({track:{h:"3"}}),lg:Nh({track:{h:"4"}})},GG=VG({sizes:KG,baseStyle:WG,defaultProps:{size:"md",colorScheme:"blue"}}),QG=e=>typeof e=="function";function Zn(e,...t){return QG(e)?e(...t):e}var{definePartsStyle:ty,defineMultiStyleConfig:YG}=lr(zW.keys),ep=qe("checkbox-size"),XG=e=>{const{colorScheme:t}=e;return{w:ep.reference,h:ep.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},JG={_disabled:{cursor:"not-allowed"}},ZG={userSelect:"none",_disabled:{opacity:.4}},eQ={transitionProperty:"transform",transitionDuration:"normal"},tQ=ty(e=>({icon:eQ,container:JG,control:Zn(XG,e),label:ZG})),rQ={sm:ty({control:{[ep.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:ty({control:{[ep.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:ty({control:{[ep.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},r0=YG({baseStyle:tQ,sizes:rQ,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nQ,definePartsStyle:ry}=lr(eK.keys),iQ=e=>{var t;const r=(t=Zn(r0.baseStyle,e))==null?void 0:t.control;return{...r,borderRadius:"full",_checked:{...r==null?void 0:r._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},oQ=ry(e=>{var t,r,n,i;return{label:(r=(t=r0).baseStyle)==null?void 0:r.call(t,e).label,container:(i=(n=r0).baseStyle)==null?void 0:i.call(n,e).container,control:iQ(e)}}),aQ={md:ry({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:ry({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:ry({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},sQ=nQ({baseStyle:oQ,sizes:aQ,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:lQ,definePartsStyle:uQ}=lr(tK.keys),og=qe("select-bg"),Uk,cQ={...(Uk=Lt.baseStyle)==null?void 0:Uk.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:og.reference,[og.variable]:"colors.white",_dark:{[og.variable]:"colors.gray.700"},"> option, > optgroup":{bg:og.reference}},dQ={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},fQ=uQ({field:cQ,icon:dQ}),ag={paddingInlineEnd:"8"},qk,Hk,Wk,Kk,Gk,Qk,Yk,Xk,hQ={lg:{...(qk=Lt.sizes)==null?void 0:qk.lg,field:{...(Hk=Lt.sizes)==null?void 0:Hk.lg.field,...ag}},md:{...(Wk=Lt.sizes)==null?void 0:Wk.md,field:{...(Kk=Lt.sizes)==null?void 0:Kk.md.field,...ag}},sm:{...(Gk=Lt.sizes)==null?void 0:Gk.sm,field:{...(Qk=Lt.sizes)==null?void 0:Qk.sm.field,...ag}},xs:{...(Yk=Lt.sizes)==null?void 0:Yk.xs,field:{...(Xk=Lt.sizes)==null?void 0:Xk.xs.field,...ag},icon:{insetEnd:"1"}}},pQ=lQ({baseStyle:fQ,sizes:hQ,variants:Lt.variants,defaultProps:Lt.defaultProps}),k1=qe("skeleton-start-color"),j1=qe("skeleton-end-color"),mQ={[k1.variable]:"colors.gray.100",[j1.variable]:"colors.gray.400",_dark:{[k1.variable]:"colors.gray.800",[j1.variable]:"colors.gray.600"},background:k1.reference,borderColor:j1.reference,opacity:.7,borderRadius:"sm"},vQ={baseStyle:mQ},$1=qe("skip-link-bg"),gQ={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[$1.variable]:"colors.white",_dark:{[$1.variable]:"colors.gray.700"},bg:$1.reference}},yQ={baseStyle:gQ},{defineMultiStyleConfig:bQ,definePartsStyle:Mb}=lr(rK.keys),Xp=qe("slider-thumb-size"),Jp=qe("slider-track-size"),Ys=qe("slider-bg"),wQ=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...SE({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},SQ=e=>({...SE({orientation:e.orientation,horizontal:{h:Jp.reference},vertical:{w:Jp.reference}}),overflow:"hidden",borderRadius:"sm",[Ys.variable]:"colors.gray.200",_dark:{[Ys.variable]:"colors.whiteAlpha.200"},_disabled:{[Ys.variable]:"colors.gray.300",_dark:{[Ys.variable]:"colors.whiteAlpha.300"}},bg:Ys.reference}),_Q=e=>{const{orientation:t}=e;return{...SE({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Xp.reference,h:Xp.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},xQ=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Ys.variable]:`colors.${t}.500`,_dark:{[Ys.variable]:`colors.${t}.200`},bg:Ys.reference}},PQ=Mb(e=>({container:wQ(e),track:SQ(e),thumb:_Q(e),filledTrack:xQ(e)})),CQ=Mb({container:{[Xp.variable]:"sizes.4",[Jp.variable]:"sizes.1"}}),EQ=Mb({container:{[Xp.variable]:"sizes.3.5",[Jp.variable]:"sizes.1"}}),TQ=Mb({container:{[Xp.variable]:"sizes.2.5",[Jp.variable]:"sizes.0.5"}}),OQ={lg:CQ,md:EQ,sm:TQ},RQ=bQ({baseStyle:PQ,sizes:OQ,defaultProps:{size:"md",colorScheme:"blue"}}),fu=un("spinner-size"),IQ={width:[fu.reference],height:[fu.reference]},kQ={xs:{[fu.variable]:"sizes.3"},sm:{[fu.variable]:"sizes.4"},md:{[fu.variable]:"sizes.6"},lg:{[fu.variable]:"sizes.8"},xl:{[fu.variable]:"sizes.12"}},jQ={baseStyle:IQ,sizes:kQ,defaultProps:{size:"md"}},{defineMultiStyleConfig:$Q,definePartsStyle:nF}=lr(nK.keys),AQ={fontWeight:"medium"},DQ={opacity:.8,marginBottom:"2"},MQ={verticalAlign:"baseline",fontWeight:"semibold"},NQ={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},FQ=nF({container:{},label:AQ,helpText:DQ,number:MQ,icon:NQ}),LQ={md:nF({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},BQ=$Q({baseStyle:FQ,sizes:LQ,defaultProps:{size:"md"}}),A1=qe("kbd-bg"),VQ={[A1.variable]:"colors.gray.100",_dark:{[A1.variable]:"colors.whiteAlpha.100"},bg:A1.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},zQ={baseStyle:VQ},UQ={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},qQ={baseStyle:UQ},{defineMultiStyleConfig:HQ,definePartsStyle:WQ}=lr(GW.keys),KQ={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},GQ=WQ({icon:KQ}),QQ=HQ({baseStyle:GQ}),{defineMultiStyleConfig:YQ,definePartsStyle:XQ}=lr(QW.keys),da=qe("menu-bg"),D1=qe("menu-shadow"),JQ={[da.variable]:"#fff",[D1.variable]:"shadows.sm",_dark:{[da.variable]:"colors.gray.700",[D1.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:da.reference,boxShadow:D1.reference},ZQ={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[da.variable]:"colors.gray.100",_dark:{[da.variable]:"colors.whiteAlpha.100"}},_active:{[da.variable]:"colors.gray.200",_dark:{[da.variable]:"colors.whiteAlpha.200"}},_expanded:{[da.variable]:"colors.gray.100",_dark:{[da.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:da.reference},eY={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},tY={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},rY={opacity:.6},nY={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},iY={transitionProperty:"common",transitionDuration:"normal"},oY=XQ({button:iY,list:JQ,item:ZQ,groupTitle:eY,icon:tY,command:rY,divider:nY}),aY=YQ({baseStyle:oY}),{defineMultiStyleConfig:sY,definePartsStyle:yx}=lr(YW.keys),M1=qe("modal-bg"),N1=qe("modal-shadow"),lY={bg:"blackAlpha.600",zIndex:"modal"},uY=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:r==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},cY=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,[M1.variable]:"colors.white",[N1.variable]:"shadows.lg",_dark:{[M1.variable]:"colors.gray.700",[N1.variable]:"shadows.dark-lg"},bg:M1.reference,boxShadow:N1.reference}},dY={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},fY={position:"absolute",top:"2",insetEnd:"3"},hY=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},pY={px:"6",py:"4"},mY=yx(e=>({overlay:lY,dialogContainer:Zn(uY,e),dialog:Zn(cY,e),header:dY,closeButton:fY,body:Zn(hY,e),footer:pY}));function Oo(e){return yx(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var vY={xs:Oo("xs"),sm:Oo("sm"),md:Oo("md"),lg:Oo("lg"),xl:Oo("xl"),"2xl":Oo("2xl"),"3xl":Oo("3xl"),"4xl":Oo("4xl"),"5xl":Oo("5xl"),"6xl":Oo("6xl"),full:Oo("full")},gY=sY({baseStyle:mY,sizes:vY,defaultProps:{size:"md"}}),{defineMultiStyleConfig:yY,definePartsStyle:iF}=lr(XW.keys),xE=un("number-input-stepper-width"),oF=un("number-input-input-padding"),bY=qa(xE).add("0.5rem").toString(),F1=un("number-input-bg"),L1=un("number-input-color"),B1=un("number-input-border-color"),wY={[xE.variable]:"sizes.6",[oF.variable]:bY},SY=e=>{var t,r;return(r=(t=Zn(Lt.baseStyle,e))==null?void 0:t.field)!=null?r:{}},_Y={width:xE.reference},xY={borderStart:"1px solid",borderStartColor:B1.reference,color:L1.reference,bg:F1.reference,[L1.variable]:"colors.chakra-body-text",[B1.variable]:"colors.chakra-border-color",_dark:{[L1.variable]:"colors.whiteAlpha.800",[B1.variable]:"colors.whiteAlpha.300"},_active:{[F1.variable]:"colors.gray.200",_dark:{[F1.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},PY=iF(e=>{var t;return{root:wY,field:(t=Zn(SY,e))!=null?t:{},stepperGroup:_Y,stepper:xY}});function sg(e){var t,r,n;const i=(t=Lt.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(n=(r=i.field)==null?void 0:r.fontSize)!=null?n:"md",s=J4.fontSizes[a];return iF({field:{...i.field,paddingInlineEnd:oF.reference,verticalAlign:"top"},stepper:{fontSize:qa(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var CY={xs:sg("xs"),sm:sg("sm"),md:sg("md"),lg:sg("lg")},EY=yY({baseStyle:PY,sizes:CY,variants:Lt.variants,defaultProps:Lt.defaultProps}),Jk,TY={...(Jk=Lt.baseStyle)==null?void 0:Jk.field,textAlign:"center"},OY={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},Zk,ej,RY={outline:e=>{var t,r,n;return(n=(r=Zn((t=Lt.variants)==null?void 0:t.outline,e))==null?void 0:r.field)!=null?n:{}},flushed:e=>{var t,r,n;return(n=(r=Zn((t=Lt.variants)==null?void 0:t.flushed,e))==null?void 0:r.field)!=null?n:{}},filled:e=>{var t,r,n;return(n=(r=Zn((t=Lt.variants)==null?void 0:t.filled,e))==null?void 0:r.field)!=null?n:{}},unstyled:(ej=(Zk=Lt.variants)==null?void 0:Zk.unstyled.field)!=null?ej:{}},IY={baseStyle:TY,sizes:OY,variants:RY,defaultProps:Lt.defaultProps},{defineMultiStyleConfig:kY,definePartsStyle:jY}=lr(JW.keys),lg=un("popper-bg"),$Y=un("popper-arrow-bg"),tj=un("popper-arrow-shadow-color"),AY={zIndex:10},DY={[lg.variable]:"colors.white",bg:lg.reference,[$Y.variable]:lg.reference,[tj.variable]:"colors.gray.200",_dark:{[lg.variable]:"colors.gray.700",[tj.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},MY={px:3,py:2,borderBottomWidth:"1px"},NY={px:3,py:2},FY={px:3,py:2,borderTopWidth:"1px"},LY={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},BY=jY({popper:AY,content:DY,header:MY,body:NY,footer:FY,closeButton:LY}),VY=kY({baseStyle:BY}),{definePartsStyle:bx,defineMultiStyleConfig:zY}=lr(UW.keys),V1=qe("drawer-bg"),z1=qe("drawer-box-shadow");function Ec(e){return bx(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var UY={bg:"blackAlpha.600",zIndex:"modal"},qY={display:"flex",zIndex:"modal",justifyContent:"center"},HY=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[V1.variable]:"colors.white",[z1.variable]:"shadows.lg",_dark:{[V1.variable]:"colors.gray.700",[z1.variable]:"shadows.dark-lg"},bg:V1.reference,boxShadow:z1.reference}},WY={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},KY={position:"absolute",top:"2",insetEnd:"3"},GY={px:"6",py:"2",flex:"1",overflow:"auto"},QY={px:"6",py:"4"},YY=bx(e=>({overlay:UY,dialogContainer:qY,dialog:Zn(HY,e),header:WY,closeButton:KY,body:GY,footer:QY})),XY={xs:Ec("xs"),sm:Ec("md"),md:Ec("lg"),lg:Ec("2xl"),xl:Ec("4xl"),full:Ec("full")},JY=zY({baseStyle:YY,sizes:XY,defaultProps:{size:"xs"}}),{definePartsStyle:ZY,defineMultiStyleConfig:eX}=lr(qW.keys),tX={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},rX={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},nX={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},iX=ZY({preview:tX,input:rX,textarea:nX}),oX=eX({baseStyle:iX}),{definePartsStyle:aX,defineMultiStyleConfig:sX}=lr(HW.keys),kd=qe("form-control-color"),lX={marginStart:"1",[kd.variable]:"colors.red.500",_dark:{[kd.variable]:"colors.red.300"},color:kd.reference},uX={mt:"2",[kd.variable]:"colors.gray.600",_dark:{[kd.variable]:"colors.whiteAlpha.600"},color:kd.reference,lineHeight:"normal",fontSize:"sm"},cX=aX({container:{width:"100%",position:"relative"},requiredIndicator:lX,helperText:uX}),dX=sX({baseStyle:cX}),{definePartsStyle:fX,defineMultiStyleConfig:hX}=lr(WW.keys),jd=qe("form-error-color"),pX={[jd.variable]:"colors.red.500",_dark:{[jd.variable]:"colors.red.300"},color:jd.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},mX={marginEnd:"0.5em",[jd.variable]:"colors.red.500",_dark:{[jd.variable]:"colors.red.300"},color:jd.reference},vX=fX({text:pX,icon:mX}),gX=hX({baseStyle:vX}),yX={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},bX={baseStyle:yX},wX={fontFamily:"heading",fontWeight:"bold"},SX={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},_X={baseStyle:wX,sizes:SX,defaultProps:{size:"xl"}},{defineMultiStyleConfig:xX,definePartsStyle:PX}=lr(VW.keys),U1=qe("breadcrumb-link-decor"),CX={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:U1.reference,[U1.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[U1.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},EX=PX({link:CX}),TX=xX({baseStyle:EX}),OX={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},aF=e=>{const{colorScheme:t,theme:r}=e;if(t==="gray")return{color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const n=Qd(`${t}.200`,.12)(r),i=Qd(`${t}.200`,.24)(r);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,n)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},RX=e=>{const{colorScheme:t}=e,r=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Zn(aF,e)}},IX={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},kX=e=>{var t;const{colorScheme:r}=e;if(r==="gray"){const l=Ue("gray.100","whiteAlpha.200")(e);return{bg:l,color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${r}.500`,color:i="white",hoverBg:o=`${r}.600`,activeBg:a=`${r}.700`}=(t=IX[r])!=null?t:{},s=Ue(n,`${r}.200`)(e);return{bg:s,color:Ue(i,"gray.800")(e),_hover:{bg:Ue(o,`${r}.300`)(e),_disabled:{bg:s}},_active:{bg:Ue(a,`${r}.400`)(e)}}},jX=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},$X={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},AX={ghost:aF,outline:RX,solid:kX,link:jX,unstyled:$X},DX={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},MX={baseStyle:OX,variants:AX,sizes:DX,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Iu,defineMultiStyleConfig:NX}=lr(lK.keys),n0=qe("card-bg"),Ya=qe("card-padding"),sF=qe("card-shadow"),ny=qe("card-radius"),lF=qe("card-border-width","0"),uF=qe("card-border-color"),FX=Iu({container:{[n0.variable]:"colors.chakra-body-bg",backgroundColor:n0.reference,boxShadow:sF.reference,borderRadius:ny.reference,color:"chakra-body-text",borderWidth:lF.reference,borderColor:uF.reference},body:{padding:Ya.reference,flex:"1 1 0%"},header:{padding:Ya.reference},footer:{padding:Ya.reference}}),LX={sm:Iu({container:{[ny.variable]:"radii.base",[Ya.variable]:"space.3"}}),md:Iu({container:{[ny.variable]:"radii.md",[Ya.variable]:"space.5"}}),lg:Iu({container:{[ny.variable]:"radii.xl",[Ya.variable]:"space.7"}})},BX={elevated:Iu({container:{[sF.variable]:"shadows.base",_dark:{[n0.variable]:"colors.gray.700"}}}),outline:Iu({container:{[lF.variable]:"1px",[uF.variable]:"colors.chakra-border-color"}}),filled:Iu({container:{[n0.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Ya.variable]:0},header:{[Ya.variable]:0},footer:{[Ya.variable]:0}}},VX=NX({baseStyle:FX,variants:BX,sizes:LX,defaultProps:{variant:"elevated",size:"md"}}),tp=un("close-button-size"),dh=un("close-button-bg"),zX={w:[tp.reference],h:[tp.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[dh.variable]:"colors.blackAlpha.100",_dark:{[dh.variable]:"colors.whiteAlpha.100"}},_active:{[dh.variable]:"colors.blackAlpha.200",_dark:{[dh.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:dh.reference},UX={lg:{[tp.variable]:"sizes.10",fontSize:"md"},md:{[tp.variable]:"sizes.8",fontSize:"xs"},sm:{[tp.variable]:"sizes.6",fontSize:"2xs"}},qX={baseStyle:zX,sizes:UX,defaultProps:{size:"md"}},{variants:HX,defaultProps:WX}=Zh,KX={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Kr.bg.reference,color:Kr.color.reference,boxShadow:Kr.shadow.reference},GX={baseStyle:KX,variants:HX,defaultProps:WX},QX={w:"100%",mx:"auto",maxW:"prose",px:"4"},YX={baseStyle:QX},XX={opacity:.6,borderColor:"inherit"},JX={borderStyle:"solid"},ZX={borderStyle:"dashed"},eJ={solid:JX,dashed:ZX},tJ={baseStyle:XX,variants:eJ,defaultProps:{variant:"solid"}},{definePartsStyle:rJ,defineMultiStyleConfig:nJ}=lr(FW.keys),iJ={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},oJ={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},aJ={pt:"2",px:"4",pb:"5"},sJ={fontSize:"1.25em"},lJ=rJ({container:iJ,button:oJ,panel:aJ,icon:sJ}),uJ=nJ({baseStyle:lJ}),{definePartsStyle:qm,defineMultiStyleConfig:cJ}=lr(LW.keys),Ai=qe("alert-fg"),ds=qe("alert-bg"),dJ=qm({container:{bg:ds.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ai.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ai.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function PE(e){const{theme:t,colorScheme:r}=e,n=Qd(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}var fJ=qm(e=>{const{colorScheme:t}=e,r=PE(e);return{container:{[Ai.variable]:`colors.${t}.600`,[ds.variable]:r.light,_dark:{[Ai.variable]:`colors.${t}.200`,[ds.variable]:r.dark}}}}),hJ=qm(e=>{const{colorScheme:t}=e,r=PE(e);return{container:{[Ai.variable]:`colors.${t}.600`,[ds.variable]:r.light,_dark:{[Ai.variable]:`colors.${t}.200`,[ds.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ai.reference}}}),pJ=qm(e=>{const{colorScheme:t}=e,r=PE(e);return{container:{[Ai.variable]:`colors.${t}.600`,[ds.variable]:r.light,_dark:{[Ai.variable]:`colors.${t}.200`,[ds.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ai.reference}}}),mJ=qm(e=>{const{colorScheme:t}=e;return{container:{[Ai.variable]:"colors.white",[ds.variable]:`colors.${t}.600`,_dark:{[Ai.variable]:"colors.gray.900",[ds.variable]:`colors.${t}.200`},color:Ai.reference}}}),vJ={subtle:fJ,"left-accent":hJ,"top-accent":pJ,solid:mJ},gJ=cJ({baseStyle:dJ,variants:vJ,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:cF,defineMultiStyleConfig:yJ}=lr(BW.keys),$d=qe("avatar-border-color"),rp=qe("avatar-bg"),Zp=qe("avatar-font-size"),Yd=qe("avatar-size"),bJ={borderRadius:"full",border:"0.2em solid",borderColor:$d.reference,[$d.variable]:"white",_dark:{[$d.variable]:"colors.gray.800"}},wJ={bg:rp.reference,fontSize:Zp.reference,width:Yd.reference,height:Yd.reference,lineHeight:"1",[rp.variable]:"colors.gray.200",_dark:{[rp.variable]:"colors.whiteAlpha.400"}},SJ=e=>{const{name:t,theme:r}=e,n=t?OK({string:t}):"colors.gray.400",i=EK(n)(r);let o="white";return i||(o="gray.800"),{bg:rp.reference,fontSize:Zp.reference,color:o,borderColor:$d.reference,verticalAlign:"top",width:Yd.reference,height:Yd.reference,"&:not([data-loaded])":{[rp.variable]:n},[$d.variable]:"colors.white",_dark:{[$d.variable]:"colors.gray.800"}}},_J={fontSize:Zp.reference,lineHeight:"1"},xJ=cF(e=>({badge:Zn(bJ,e),excessLabel:Zn(wJ,e),container:Zn(SJ,e),label:_J}));function As(e){const t=e!=="100%"?eF[e]:void 0;return cF({container:{[Yd.variable]:t??e,[Zp.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[Yd.variable]:t??e,[Zp.variable]:`calc(${t??e} / 2.5)`}})}var PJ={"2xs":As(4),xs:As(6),sm:As(8),md:As(12),lg:As(16),xl:As(24),"2xl":As(32),full:As("100%")},CJ=yJ({baseStyle:xJ,sizes:PJ,defaultProps:{size:"md"}}),EJ={Accordion:uJ,Alert:gJ,Avatar:CJ,Badge:Zh,Breadcrumb:TX,Button:MX,Checkbox:r0,CloseButton:qX,Code:GX,Container:YX,Divider:tJ,Drawer:JY,Editable:oX,Form:dX,FormError:gX,FormLabel:bX,Heading:_X,Input:Lt,Kbd:zQ,Link:qQ,List:QQ,Menu:aY,Modal:gY,NumberInput:EY,PinInput:IY,Popover:VY,Progress:GG,Radio:sQ,Select:pQ,Skeleton:vQ,SkipLink:yQ,Slider:RQ,Spinner:jQ,Stat:BQ,Switch:qK,Table:XK,Tabs:fG,Tag:CG,Textarea:NG,Tooltip:BG,Card:VX,Stepper:NW},TJ={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},OJ={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},RJ="ltr",IJ={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},dF={semanticTokens:TJ,direction:RJ,...AW,components:EJ,styles:OJ,config:IJ};function kJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var jJ=kJ();function $J(e,t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}function AJ(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return e===void 0?r:e}var DJ=e=>{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(i))return s.get(i);const l=e(n,i,o,a);return s.set(i,l),l}},fF=DJ(AJ);function hF(e,t){const r={};return Object.keys(e).forEach(n=>{const i=e[n];t(i,n,e)&&(r[n]=i)}),r}var pF=e=>hF(e,t=>t!=null);function MJ(e){return typeof e=="function"}function mF(e,...t){return MJ(e)?e(...t):e}function NJ(...e){return function(r){e.some(n=>(n==null||n(r),r==null?void 0:r.defaultPrevented))}}var FJ=typeof Element<"u",LJ=typeof Map=="function",BJ=typeof Set=="function",VJ=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function iy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!iy(e[n],t[n]))return!1;return!0}var o;if(LJ&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!iy(n.value[1],t.get(n.value[0])))return!1;return!0}if(BJ&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(VJ&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(FJ&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!iy(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var zJ=function(t,r){try{return iy(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const UJ=nc(zJ);function vF(e,t={}){var r;const{styleConfig:n,...i}=t,{theme:o,colorMode:a}=Kq(),s=e?fF(o,`components.${e}`):void 0,l=n||s,u=ya({theme:o,colorMode:a},(r=l==null?void 0:l.defaultProps)!=null?r:{},pF($J(i,["children"]))),c=S.useRef({});if(l){const f=uW(l)(u);UJ(c.current,f)||(c.current=f)}return c.current}function Ma(e,t={}){return vF(e,t)}function ac(e,t={}){return vF(e,t)}var qJ=new Set([...XH,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),HJ=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function WJ(e){return HJ.has(e)||!qJ.has(e)}function KJ(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(n!=null)for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(i in r&&delete r[i],r[i]=n[i]);return r}function GJ(e){const t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}var QJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,YJ=T4(function(e){return QJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),XJ=YJ,JJ=function(t){return t!=="theme"},rj=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?XJ:JJ},nj=function(t,r,n){var i;if(r){var o=r.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},ZJ=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return $4(r,n,i),Tq(function(){return A4(r,n,i)}),null},eZ=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,o,a;r!==void 0&&(o=r.label,a=r.target);var s=nj(t,r,n),l=s||rj(i),u=!l("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;h<f;h++)d.push(c[h],c[0][h])}var m=F4(function(v,w,p){var g=u&&v.as||i,b="",_=[],P=v;if(v.theme==null){P={};for(var C in v)P[C]=v[C];P.theme=S.useContext(Qp)}typeof v.className=="string"?b=wq(w.registered,_,v.className):v.className!=null&&(b=v.className+" ");var x=pE(d.concat(_),w.registered,P);b+=w.key+"-"+x.name,a!==void 0&&(b+=" "+a);var T=u&&s===void 0?rj(g):l,I={};for(var M in v)u&&M==="as"||T(M)&&(I[M]=v[M]);return I.className=b,I.ref=p,S.createElement(S.Fragment,null,S.createElement(ZJ,{cache:w,serialized:x,isStringTag:typeof g=="string"}),S.createElement(g,I))});return m.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=i,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+a}}),m.withComponent=function(v,w){return e(v,Jy({},r,w,{shouldForwardProp:nj(m,w,!0)})).apply(void 0,d)},m}},tZ=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],i0=eZ.bind();tZ.forEach(function(e){i0[e]=i0(e)});var ij,rZ=(ij=i0.default)!=null?ij:i0,nZ=({baseStyle:e})=>t=>{const{theme:r,css:n,__css:i,sx:o,...a}=t,s=hF(a,(d,f)=>ZH(f)),l=mF(e,t),u=KJ({},i,l,pF(s),o),c=X4(u)(t.theme);return n?[c,n]:c};function q1(e,t){const{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=WJ);const i=nZ({baseStyle:r}),o=rZ(e,n)(i);return ue.forwardRef(function(l,u){const{colorMode:c,forced:d}=vE();return ue.createElement(o,{ref:u,"data-theme":d?c:void 0,...l})})}function iZ(){const e=new Map;return new Proxy(q1,{apply(t,r,n){return q1(...n)},get(t,r){return e.has(r)||e.set(r,q1(r)),e.get(r)}})}var Me=iZ();function gt(e){return S.forwardRef(e)}function oZ(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,i=S.createContext(void 0);i.displayName=n;function o(){var a;const s=S.useContext(i);if(!s&&t){const l=new Error(r);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}function gF(e){const{cssVarsRoot:t,theme:r,children:n}=e,i=S.useMemo(()=>YH(r),[r]);return y.jsxs(Iq,{theme:i,children:[y.jsx(aZ,{root:t}),n]})}function aZ({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return y.jsx(Ib,{styles:r=>({[t]:r.__cssVars})})}oZ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function sZ(){const{colorMode:e}=vE();return y.jsx(Ib,{styles:t=>{const r=fF(t,"styles.global"),n=mF(r,{theme:t,colorMode:e});return n?X4(n)(t):void 0}})}var yF=S.createContext({getDocument(){return document},getWindow(){return window}});yF.displayName="EnvironmentContext";function bF(e){const{children:t,environment:r,disabled:n}=e,i=S.useRef(null),o=S.useMemo(()=>r||{getDocument:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument)!=null?l:document},getWindow:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument.defaultView)!=null?l:window}},[r]),a=!n||!r;return y.jsxs(yF.Provider,{value:o,children:[t,a&&y.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}bF.displayName="EnvironmentProvider";var lZ=e=>{const{children:t,colorModeManager:r,portalZIndex:n,resetScope:i,resetCSS:o=!0,theme:a={},environment:s,cssVarsRoot:l,disableEnvironment:u,disableGlobalStyle:c}=e,d=y.jsx(bF,{environment:s,disabled:u,children:t});return y.jsx(gF,{theme:a,cssVarsRoot:l,children:y.jsxs(U4,{colorModeManager:r,options:a.config,children:[o?y.jsx(Aq,{scope:i}):y.jsx($q,{}),!c&&y.jsx(sZ,{}),n?y.jsx(V4,{zIndex:n,children:d}):d]})})},uZ=(e,t)=>e.find(r=>r.id===t);function oj(e,t){const r=wF(e,t),n=r?e[r].findIndex(i=>i.id===t):-1;return{position:r,index:n}}function wF(e,t){for(const[r,n]of Object.entries(e))if(uZ(n,t))return r}function cZ(e){const t=e.includes("right"),r=e.includes("left");let n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}}function dZ(e){const r=e==="top"||e==="bottom"?"0 auto":void 0,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:r,top:n,bottom:i,right:o,left:a}}function Uo(e,t=[]){const r=S.useRef(e);return S.useEffect(()=>{r.current=e}),S.useCallback((...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},t)}function fZ(e,t){const r=Uo(e);S.useEffect(()=>{if(t==null)return;let n=null;return n=window.setTimeout(()=>{r()},t),()=>{n&&window.clearTimeout(n)}},[t,r])}function Uu(e,t){const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return e();n.current=!0},t),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])}const SF=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Nb=S.createContext({}),Hm=S.createContext(null),Fb=typeof document<"u",CE=Fb?S.useLayoutEffect:S.useEffect,_F=S.createContext({strict:!1});function hZ(e,t,r,n){const{visualElement:i}=S.useContext(Nb),o=S.useContext(_F),a=S.useContext(Hm),s=S.useContext(SF).reducedMotion,l=S.useRef();n=n||o.renderer,!l.current&&n&&(l.current=n(e,{visualState:t,parent:i,props:r,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;S.useInsertionEffect(()=>{u&&u.update(r,a)});const c=S.useRef(!!window.HandoffAppearAnimations);return CE(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function ud(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pZ(e,t,r){return S.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):ud(r)&&(r.current=n))},[t])}function em(e){return typeof e=="string"||Array.isArray(e)}function Lb(e){return typeof e=="object"&&typeof e.start=="function"}const EE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],TE=["initial",...EE];function Bb(e){return Lb(e.animate)||TE.some(t=>em(e[t]))}function xF(e){return!!(Bb(e)||e.variants)}function mZ(e,t){if(Bb(e)){const{initial:r,animate:n}=e;return{initial:r===!1||em(r)?r:void 0,animate:em(n)?n:void 0}}return e.inherit!==!1?t:{}}function vZ(e){const{initial:t,animate:r}=mZ(e,S.useContext(Nb));return S.useMemo(()=>({initial:t,animate:r}),[aj(t),aj(r)])}function aj(e){return Array.isArray(e)?e.join(" "):e}const sj={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tm={};for(const e in sj)tm[e]={isEnabled:t=>sj[e].some(r=>!!t[r])};function gZ(e){for(const t in e)tm[t]={...tm[t],...e[t]}}const OE=S.createContext({}),PF=S.createContext({}),yZ=Symbol.for("motionComponentSymbol");function bZ({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&gZ(e);function o(s,l){let u;const c={...S.useContext(SF),...s,layoutId:wZ(s)},{isStatic:d}=c,f=vZ(s),h=n(s,d);if(!d&&Fb){f.visualElement=hZ(i,h,c,t);const m=S.useContext(PF),v=S.useContext(_F).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,v,e,m))}return S.createElement(Nb.Provider,{value:f},u&&f.visualElement?S.createElement(u,{visualElement:f.visualElement,...c}):null,r(i,s,pZ(h,f.visualElement,l),h,d,f.visualElement))}const a=S.forwardRef(o);return a[yZ]=i,a}function wZ({layoutId:e}){const t=S.useContext(OE).id;return t&&e!==void 0?t+"-"+e:e}function SZ(e){function t(n,i={}){return bZ(e(n,i))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,i)=>(r.has(i)||r.set(i,t(i)),r.get(i))})}const _Z=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function RE(e){return typeof e!="string"||e.includes("-")?!1:!!(_Z.indexOf(e)>-1||/[A-Z]/.test(e))}const o0={};function xZ(e){Object.assign(o0,e)}const Wm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],sc=new Set(Wm);function CF(e,{layout:t,layoutId:r}){return sc.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!o0[e]||e==="opacity")}const yi=e=>!!(e&&e.getVelocity),PZ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CZ=Wm.length;function EZ(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,i){let o="";for(let a=0;a<CZ;a++){const s=Wm[a];if(e[s]!==void 0){const l=PZ[s]||s;o+=`${l}(${e[s]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,n?"":o):r&&n&&(o="none"),o}const EF=e=>t=>typeof t=="string"&&t.startsWith(e),TF=EF("--"),wx=EF("var(--"),TZ=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,OZ=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Pl=(e,t,r)=>Math.min(Math.max(r,e),t),lc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},np={...lc,transform:e=>Pl(0,1,e)},ug={...lc,default:1},ip=e=>Math.round(e*1e5)/1e5,Vb=/(-)?([\d]*\.?[\d])+/g,OF=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,RZ=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Km(e){return typeof e=="string"}const Gm=e=>({test:t=>Km(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fs=Gm("deg"),Ea=Gm("%"),Ge=Gm("px"),IZ=Gm("vh"),kZ=Gm("vw"),lj={...Ea,parse:e=>Ea.parse(e)/100,transform:e=>Ea.transform(e*100)},uj={...lc,transform:Math.round},RF={borderWidth:Ge,borderTopWidth:Ge,borderRightWidth:Ge,borderBottomWidth:Ge,borderLeftWidth:Ge,borderRadius:Ge,radius:Ge,borderTopLeftRadius:Ge,borderTopRightRadius:Ge,borderBottomRightRadius:Ge,borderBottomLeftRadius:Ge,width:Ge,maxWidth:Ge,height:Ge,maxHeight:Ge,size:Ge,top:Ge,right:Ge,bottom:Ge,left:Ge,padding:Ge,paddingTop:Ge,paddingRight:Ge,paddingBottom:Ge,paddingLeft:Ge,margin:Ge,marginTop:Ge,marginRight:Ge,marginBottom:Ge,marginLeft:Ge,rotate:Fs,rotateX:Fs,rotateY:Fs,rotateZ:Fs,scale:ug,scaleX:ug,scaleY:ug,scaleZ:ug,skew:Fs,skewX:Fs,skewY:Fs,distance:Ge,translateX:Ge,translateY:Ge,translateZ:Ge,x:Ge,y:Ge,z:Ge,perspective:Ge,transformPerspective:Ge,opacity:np,originX:lj,originY:lj,originZ:Ge,zIndex:uj,fillOpacity:np,strokeOpacity:np,numOctaves:uj};function IE(e,t,r,n){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(TF(d)){o[d]=f;continue}const h=RF[d],m=OZ(f,h);if(sc.has(d)){if(l=!0,a[d]=m,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=m):i[d]=m}if(t.transform||(l||n?i.transform=EZ(e.transform,r,c,n):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=s;i.transformOrigin=`${d} ${f} ${h}`}}const kE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function IF(e,t,r){for(const n in t)!yi(t[n])&&!CF(n,r)&&(e[n]=t[n])}function jZ({transformTemplate:e},t,r){return S.useMemo(()=>{const n=kE();return IE(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function $Z(e,t,r){const n=e.style||{},i={};return IF(i,n,e),Object.assign(i,jZ(e,t,r)),e.transformValues?e.transformValues(i):i}function AZ(e,t,r){const n={},i=$Z(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const DZ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function a0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||DZ.has(e)}let kF=e=>!a0(e);function MZ(e){e&&(kF=t=>t.startsWith("on")?!a0(t):e(t))}try{MZ(require("@emotion/is-prop-valid").default)}catch{}function NZ(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(kF(i)||r===!0&&a0(i)||!t&&!a0(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function cj(e,t,r){return typeof e=="string"?e:Ge.transform(t+r*e)}function FZ(e,t,r){const n=cj(t,e.x,e.width),i=cj(r,e.y,e.height);return`${n} ${i}`}const LZ={offset:"stroke-dashoffset",array:"stroke-dasharray"},BZ={offset:"strokeDashoffset",array:"strokeDasharray"};function VZ(e,t,r=1,n=0,i=!0){e.pathLength=1;const o=i?LZ:BZ;e[o.offset]=Ge.transform(-n);const a=Ge.transform(t),s=Ge.transform(r);e[o.array]=`${a} ${s}`}function jE(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,d,f){if(IE(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:v}=e;h.transform&&(v&&(m.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=FZ(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),a!==void 0&&VZ(h,a,s,l,!1)}const jF=()=>({...kE(),attrs:{}}),$E=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zZ(e,t,r,n){const i=S.useMemo(()=>{const o=jF();return jE(o,t,{enableHardwareAcceleration:!1},$E(n),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};IF(o,e.style,e),i.style={...o,...i.style}}return i}function UZ(e=!1){return(r,n,i,{latestValues:o},a)=>{const l=(RE(r)?zZ:AZ)(n,o,a,r),c={...NZ(n,typeof r=="string",e),...l,ref:i},{children:d}=n,f=S.useMemo(()=>yi(d)?d.get():d,[d]);return S.createElement(r,{...c,children:f})}}const AE=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function $F(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const o in r)e.style.setProperty(o,r[o])}const AF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function DF(e,t,r,n){$F(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(AF.has(i)?i:AE(i),t.attrs[i])}function DE(e,t){const{style:r}=e,n={};for(const i in r)(yi(r[i])||t.style&&yi(t.style[i])||CF(i,e))&&(n[i]=r[i]);return n}function MF(e,t){const r=DE(e,t);for(const n in e)if(yi(e[n])||yi(t[n])){const i=Wm.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=e[n]}return r}function ME(e,t,r,n={},i={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),t}function NF(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const s0=e=>Array.isArray(e),qZ=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),HZ=e=>s0(e)?e[e.length-1]||0:e;function oy(e){const t=yi(e)?e.get():e;return qZ(t)?t.toValue():t}function WZ({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){const a={latestValues:KZ(n,i,o,e),renderState:t()};return r&&(a.mount=s=>r(n,s,a)),a}const FF=e=>(t,r)=>{const n=S.useContext(Nb),i=S.useContext(Hm),o=()=>WZ(e,t,n,i);return r?o():NF(o)};function KZ(e,t,r,n){const i={},o=n(e,{});for(const f in o)i[f]=oy(o[f]);let{initial:a,animate:s}=e;const l=Bb(e),u=xF(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||a===!1;const d=c?s:a;return d&&typeof d!="boolean"&&!Lb(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const m=ME(e,h);if(!m)return;const{transitionEnd:v,transition:w,...p}=m;for(const g in p){let b=p[g];if(Array.isArray(b)){const _=c?b.length-1:0;b=b[_]}b!==null&&(i[g]=b)}for(const g in v)i[g]=v[g]}),i}const Wr=e=>e;class dj{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const r=this.order.indexOf(t);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function GZ(e){let t=new dj,r=new dj,n=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:r;return u&&a.add(l),f.add(l)&&d&&i&&(n=t.order.length),l},cancel:l=>{r.remove(l),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let u=0;u<n;u++){const c=t.order[u];c(l),a.has(c)&&(s.schedule(c),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const cg=["prepare","read","update","preRender","render","postRender"],QZ=40;function YZ(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=cg.reduce((d,f)=>(d[f]=GZ(()=>r=!0),d),{}),a=d=>o[d].process(i),s=()=>{const d=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(d-i.timestamp,QZ),1),i.timestamp=d,i.isProcessing=!0,cg.forEach(a),i.isProcessing=!1,r&&t&&(n=!1,e(s))},l=()=>{r=!0,n=!0,i.isProcessing||e(s)};return{schedule:cg.reduce((d,f)=>{const h=o[f];return d[f]=(m,v=!1,w=!1)=>(r||l(),h.schedule(m,v,w)),d},{}),cancel:d=>cg.forEach(f=>o[f].cancel(d)),state:i,steps:o}}const{schedule:sr,cancel:fs,state:dn,steps:H1}=YZ(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wr,!0),XZ={useVisualState:FF({scrapeMotionValuesFromProps:MF,createRenderState:jF,onMount:(e,t,{renderState:r,latestValues:n})=>{sr.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),sr.render(()=>{jE(r,n,{enableHardwareAcceleration:!1},$E(t.tagName),e.transformTemplate),DF(t,r)})}})},JZ={useVisualState:FF({scrapeMotionValuesFromProps:DE,createRenderState:kE})};function ZZ(e,{forwardMotionProps:t=!1},r,n){return{...RE(e)?XZ:JZ,preloadedFeatures:r,useRender:UZ(t),createVisualElement:n,Component:e}}function Ga(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const LF=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function zb(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const eee=e=>t=>LF(t)&&e(t,zb(t));function Xa(e,t,r,n){return Ga(e,t,eee(r),n)}const tee=(e,t)=>r=>t(e(r)),pl=(...e)=>e.reduce(tee);function BF(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const fj=BF("dragHorizontal"),hj=BF("dragVertical");function VF(e){let t=!1;if(e==="y")t=hj();else if(e==="x")t=fj();else{const r=fj(),n=hj();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function zF(){const e=VF(!0);return e?(e(),!1):!0}class Ll{constructor(t){this.isMounted=!1,this.node=t}update(){}}function pj(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||zF())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[n]&&sr.update(()=>s[n](o,a))};return Xa(e.current,r,i,{passive:!e.getProps()[n]})}class ree extends Ll{mount(){this.unmount=pl(pj(this.node,!0),pj(this.node,!1))}unmount(){}}class nee extends Ll{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pl(Ga(this.node.current,"focus",()=>this.onFocus()),Ga(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const UF=(e,t)=>t?e===t?!0:UF(e,t.parentElement):!1;function W1(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,zb(r))}class iee extends Ll{constructor(){super(...arguments),this.removeStartListeners=Wr,this.removeEndListeners=Wr,this.removeAccessibleListeners=Wr,this.startPointerPress=(t,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),o=Xa(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();sr.update(()=>{UF(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(n.onTap||n.onPointerUp)}),a=Xa(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=pl(o,a),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||W1("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&sr.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=Ga(this.node.current,"keyup",a),W1("down",(s,l)=>{this.startPress(s,l)})},r=Ga(this.node.current,"keydown",t),n=()=>{this.isPressing&&W1("cancel",(o,a)=>this.cancelPress(o,a))},i=Ga(this.node.current,"blur",n);this.removeAccessibleListeners=pl(r,i)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&sr.update(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!zF()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&sr.update(()=>n(t,r))}mount(){const t=this.node.getProps(),r=Xa(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Ga(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pl(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Sx=new WeakMap,K1=new WeakMap,oee=e=>{const t=Sx.get(e.target);t&&t(e)},aee=e=>{e.forEach(oee)};function see({root:e,...t}){const r=e||document;K1.has(r)||K1.set(r,{});const n=K1.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(aee,{root:e,...t})),n[i]}function lee(e,t,r){const n=see(t);return Sx.set(e,r),n.observe(e),()=>{Sx.delete(e),n.unobserve(e)}}const uee={some:0,all:1};class cee extends Ll{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:uee[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return lee(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(dee(t,r))&&this.startObserver()}unmount(){}}function dee({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const fee={inView:{Feature:cee},tap:{Feature:iee},focus:{Feature:nee},hover:{Feature:ree}};function qF(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function hee(e){const t={};return e.values.forEach((r,n)=>t[n]=r.get()),t}function pee(e){const t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function Ub(e,t,r){const n=e.getProps();return ME(n,t,r!==void 0?r:n.custom,hee(e),pee(e))}const mee="framerAppearId",vee="data-"+AE(mee);let l0=Wr;const ku=e=>e*1e3,Ja=e=>e/1e3,gee={current:!1},HF=e=>Array.isArray(e)&&typeof e[0]=="number";function WF(e){return!!(!e||typeof e=="string"&&KF[e]||HF(e)||Array.isArray(e)&&e.every(WF))}const Fh=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,KF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fh([0,.65,.55,1]),circOut:Fh([.55,0,1,.45]),backIn:Fh([.31,.01,.66,-.59]),backOut:Fh([.33,1.53,.69,.99])};function GF(e){if(e)return HF(e)?Fh(e):Array.isArray(e)?e.map(GF):KF[e]}function yee(e,t,r,{delay:n=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:r};l&&(u.offset=l);const c=GF(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function bee(e,{repeat:t,repeatType:r="loop"}){const n=t&&r!=="loop"&&t%2===1?0:e.length-1;return e[n]}const QF=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,wee=1e-7,See=12;function _ee(e,t,r,n,i){let o,a,s=0;do a=t+(r-t)/2,o=QF(a,n,i)-e,o>0?r=a:t=a;while(Math.abs(o)>wee&&++s<See);return a}function Qm(e,t,r,n){if(e===t&&r===n)return Wr;const i=o=>_ee(o,0,1,e,r);return o=>o===0||o===1?o:QF(i(o),t,n)}const xee=Qm(.42,0,1,1),Pee=Qm(0,0,.58,1),YF=Qm(.42,0,.58,1),Cee=e=>Array.isArray(e)&&typeof e[0]!="number",XF=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,JF=e=>t=>1-e(1-t),ZF=e=>1-Math.sin(Math.acos(e)),NE=JF(ZF),Eee=XF(NE),eL=Qm(.33,1.53,.69,.99),FE=JF(eL),Tee=XF(FE),Oee=e=>(e*=2)<1?.5*FE(e):.5*(2-Math.pow(2,-10*(e-1))),mj={linear:Wr,easeIn:xee,easeInOut:YF,easeOut:Pee,circIn:ZF,circInOut:Eee,circOut:NE,backIn:FE,backInOut:Tee,backOut:eL,anticipate:Oee},vj=e=>{if(Array.isArray(e)){l0(e.length===4);const[t,r,n,i]=e;return Qm(t,r,n,i)}else if(typeof e=="string")return l0(mj[e]!==void 0),mj[e];return e},LE=(e,t)=>r=>!!(Km(r)&&RZ.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),tL=(e,t,r)=>n=>{if(!Km(n))return n;const[i,o,a,s]=n.match(Vb);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Ree=e=>Pl(0,255,e),G1={...lc,transform:e=>Math.round(Ree(e))},_u={test:LE("rgb","red"),parse:tL("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+G1.transform(e)+", "+G1.transform(t)+", "+G1.transform(r)+", "+ip(np.transform(n))+")"};function Iee(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const _x={test:LE("#"),parse:Iee,transform:_u.transform},cd={test:LE("hsl","hue"),parse:tL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Ea.transform(ip(t))+", "+Ea.transform(ip(r))+", "+ip(np.transform(n))+")"},Hn={test:e=>_u.test(e)||_x.test(e)||cd.test(e),parse:e=>_u.test(e)?_u.parse(e):cd.test(e)?cd.parse(e):_x.parse(e),transform:e=>Km(e)?e:e.hasOwnProperty("red")?_u.transform(e):cd.transform(e)},kr=(e,t,r)=>-r*e+r*t+e;function Q1(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function kee({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,a=0;if(!t)i=o=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;i=Q1(l,s,e+1/3),o=Q1(l,s,e),a=Q1(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}const Y1=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},jee=[_x,_u,cd],$ee=e=>jee.find(t=>t.test(e));function gj(e){const t=$ee(e);let r=t.parse(e);return t===cd&&(r=kee(r)),r}const rL=(e,t)=>{const r=gj(e),n=gj(t),i={...r};return o=>(i.red=Y1(r.red,n.red,o),i.green=Y1(r.green,n.green,o),i.blue=Y1(r.blue,n.blue,o),i.alpha=kr(r.alpha,n.alpha,o),_u.transform(i))};function Aee(e){var t,r;return isNaN(e)&&Km(e)&&(((t=e.match(Vb))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(OF))===null||r===void 0?void 0:r.length)||0)>0}const nL={regex:TZ,countKey:"Vars",token:"${v}",parse:Wr},iL={regex:OF,countKey:"Colors",token:"${c}",parse:Hn.parse},oL={regex:Vb,countKey:"Numbers",token:"${n}",parse:lc.parse};function X1(e,{regex:t,countKey:r,token:n,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+r]=o.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...o.map(i)))}function u0(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&X1(r,nL),X1(r,iL),X1(r,oL),r}function aL(e){return u0(e).values}function sL(e){const{values:t,numColors:r,numVars:n,tokenised:i}=u0(e),o=t.length;return a=>{let s=i;for(let l=0;l<o;l++)l<n?s=s.replace(nL.token,a[l]):l<n+r?s=s.replace(iL.token,Hn.transform(a[l])):s=s.replace(oL.token,ip(a[l]));return s}}const Dee=e=>typeof e=="number"?0:e;function Mee(e){const t=aL(e);return sL(e)(t.map(Dee))}const Cl={test:Aee,parse:aL,createTransformer:sL,getAnimatableNone:Mee},lL=(e,t)=>r=>`${r>0?t:e}`;function uL(e,t){return typeof e=="number"?r=>kr(e,t,r):Hn.test(e)?rL(e,t):e.startsWith("var(")?lL(e,t):dL(e,t)}const cL=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,a)=>uL(o,t[a]));return o=>{for(let a=0;a<n;a++)r[a]=i[a](o);return r}},Nee=(e,t)=>{const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=uL(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}},dL=(e,t)=>{const r=Cl.createTransformer(t),n=u0(e),i=u0(t);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?pl(cL(n.values,i.values),r):lL(e,t)},rm=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},yj=(e,t)=>r=>kr(e,t,r);function Fee(e){return typeof e=="number"?yj:typeof e=="string"?Hn.test(e)?rL:dL:Array.isArray(e)?cL:typeof e=="object"?Nee:yj}function Lee(e,t,r){const n=[],i=r||Fee(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Wr:t;s=pl(l,s)}n.push(s)}return n}function fL(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;if(l0(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Lee(t,n,i),s=a.length,l=u=>{let c=0;if(s>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const d=rm(e[c],e[c+1],u);return a[c](d)};return r?u=>l(Pl(e[0],e[o-1],u)):l}function Bee(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=rm(0,t,n);e.push(kr(r,1,i))}}function Vee(e){const t=[0];return Bee(t,e.length-1),t}function zee(e,t){return e.map(r=>r*t)}function Uee(e,t){return e.map(()=>t||YF).splice(0,e.length-1)}function c0({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=Cee(n)?n.map(vj):vj(n),o={done:!1,value:t[0]},a=zee(r&&r.length===t.length?r:Vee(t),e),s=fL(a,t,{ease:Array.isArray(i)?i:Uee(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}function hL(e,t){return t?e*(1e3/t):0}const qee=5;function pL(e,t,r){const n=Math.max(t-qee,0);return hL(r-e(n),t-n)}const J1=.001,Hee=.01,Wee=10,Kee=.05,Gee=1;function Qee({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o,a=1-t;a=Pl(Kee,Gee,a),e=Pl(Hee,Wee,Ja(e)),a<1?(i=u=>{const c=u*a,d=c*e,f=c-r,h=xx(u,a),m=Math.exp(-d);return J1-f/h*m},o=u=>{const d=u*a*e,f=d*r+r,h=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-d),v=xx(Math.pow(u,2),a);return(-i(u)+J1>0?-1:1)*((f-h)*m)/v}):(i=u=>{const c=Math.exp(-u*e),d=(u-r)*e+1;return-J1+c*d},o=u=>{const c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});const s=5/e,l=Xee(i,o,s);if(e=ku(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const Yee=12;function Xee(e,t,r){let n=r;for(let i=1;i<Yee;i++)n=n-e(n)/t(n);return n}function xx(e,t){return e*Math.sqrt(1-t*t)}const Jee=["duration","bounce"],Zee=["stiffness","damping","mass"];function bj(e,t){return t.some(r=>e[r]!==void 0)}function ete(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!bj(e,Zee)&&bj(e,Jee)){const r=Qee(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function mL({keyframes:e,restDelta:t,restSpeed:r,...n}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=ete(n),h=c?-Ja(c):0,m=l/(2*Math.sqrt(s*u)),v=o-i,w=Ja(Math.sqrt(s/u)),p=Math.abs(v)<5;r||(r=p?.01:2),t||(t=p?.005:.5);let g;if(m<1){const b=xx(w,m);g=_=>{const P=Math.exp(-m*w*_);return o-P*((h+m*w*v)/b*Math.sin(b*_)+v*Math.cos(b*_))}}else if(m===1)g=b=>o-Math.exp(-w*b)*(v+(h+w*v)*b);else{const b=w*Math.sqrt(m*m-1);g=_=>{const P=Math.exp(-m*w*_),C=Math.min(b*_,300);return o-P*((h+m*w*v)*Math.sinh(C)+b*v*Math.cosh(C))/b}}return{calculatedDuration:f&&d||null,next:b=>{const _=g(b);if(f)a.done=b>=d;else{let P=h;b!==0&&(m<1?P=pL(g,b,_):P=0);const C=Math.abs(P)<=r,x=Math.abs(o-_)<=t;a.done=C&&x}return a.value=a.done?o:_,a}}}function wj({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=T=>s!==void 0&&T<s||l!==void 0&&T>l,m=T=>s===void 0?l:l===void 0||Math.abs(s-T)<Math.abs(l-T)?s:l;let v=r*t;const w=d+v,p=a===void 0?w:a(w);p!==w&&(v=p-d);const g=T=>-v*Math.exp(-T/n),b=T=>p+g(T),_=T=>{const I=g(T),M=b(T);f.done=Math.abs(I)<=u,f.value=f.done?p:M};let P,C;const x=T=>{h(f.value)&&(P=T,C=mL({keyframes:[f.value,m(f.value)],velocity:pL(b,T,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:T=>{let I=!1;return!C&&P===void 0&&(I=!0,_(T),x(T)),P!==void 0&&T>P?C.next(T-P):(!I&&_(T),f)}}}const tte=e=>{const t=({timestamp:r})=>e(r);return{start:()=>sr.update(t,!0),stop:()=>fs(t),now:()=>dn.isProcessing?dn.timestamp:performance.now()}},Sj=2e4;function _j(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Sj;)t+=r,n=e.next(t);return t>=Sj?1/0:t}const rte={decay:wj,inertia:wj,tween:c0,keyframes:c0,spring:mL};function d0({autoplay:e=!0,delay:t=0,driver:r=tte,keyframes:n,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let h=1,m=!1,v,w;const p=()=>{w=new Promise(A=>{v=A})};p();let g;const b=rte[i]||c0;let _;b!==c0&&typeof n[0]!="number"&&(_=fL([0,100],n,{clamp:!1}),n=[0,100]);const P=b({...f,keyframes:n});let C;s==="mirror"&&(C=b({...f,keyframes:[...n].reverse(),velocity:-(f.velocity||0)}));let x="idle",T=null,I=null,M=null;P.calculatedDuration===null&&o&&(P.calculatedDuration=_j(P));const{calculatedDuration:H}=P;let re=1/0,ie=1/0;H!==null&&(re=H+a,ie=re*(o+1)-a);let R=0;const L=A=>{if(I===null)return;h>0&&(I=Math.min(I,A)),h<0&&(I=Math.min(A-ie/h,I)),T!==null?R=T:R=Math.round(A-I)*h;const U=R-t*(h>=0?1:-1),N=h>=0?U<0:U>ie;R=Math.max(U,0),x==="finished"&&T===null&&(R=ie);let E=R,k=P;if(o){const ve=R/re;let Se=Math.floor(ve),$e=ve%1;!$e&&ve>=1&&($e=1),$e===1&&Se--,Se=Math.min(Se,o+1);const ge=!!(Se%2);ge&&(s==="reverse"?($e=1-$e,a&&($e-=a/re)):s==="mirror"&&(k=C));let st=Pl(0,1,$e);R>ie&&(st=s==="reverse"&&ge?1:0),E=st*re}const D=N?{done:!1,value:n[0]}:k.next(E);_&&(D.value=_(D.value));let{done:ee}=D;!N&&H!==null&&(ee=h>=0?R>=ie:R<=0);const oe=T===null&&(x==="finished"||x==="running"&&ee);return d&&d(D.value),oe&&W(),D},X=()=>{g&&g.stop(),g=void 0},Q=()=>{x="idle",X(),v(),p(),I=M=null},W=()=>{x="finished",c&&c(),X(),v()},te=()=>{if(m)return;g||(g=r(L));const A=g.now();l&&l(),T!==null?I=A-T:(!I||x==="finished")&&(I=A),x==="finished"&&p(),M=I,T=null,x="running",g.start()};e&&te();const G={then(A,U){return w.then(A,U)},get time(){return Ja(R)},set time(A){A=ku(A),R=A,T!==null||!g||h===0?T=A:I=g.now()-A/h},get duration(){const A=P.calculatedDuration===null?_j(P):P.calculatedDuration;return Ja(A)},get speed(){return h},set speed(A){A===h||!g||(h=A,G.time=Ja(R))},get state(){return x},play:te,pause:()=>{x="paused",T=R},stop:()=>{m=!0,x!=="idle"&&(x="idle",u&&u(),Q())},cancel:()=>{M!==null&&L(M),Q()},complete:()=>{x="finished"},sample:A=>(I=0,L(A))};return G}function nte(e){let t;return()=>(t===void 0&&(t=e()),t)}const ite=nte(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ote=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),dg=10,ate=2e4,ste=(e,t)=>t.type==="spring"||e==="backgroundColor"||!WF(t.ease);function lte(e,t,{onUpdate:r,onComplete:n,...i}){if(!(ite()&&ote.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,s,l;const u=()=>{l=new Promise(g=>{s=g})};u();let{keyframes:c,duration:d=300,ease:f,times:h}=i;if(ste(t,i)){const g=d0({...i,repeat:0,delay:0});let b={done:!1,value:c[0]};const _=[];let P=0;for(;!b.done&&P<ate;)b=g.sample(P),_.push(b.value),P+=dg;h=void 0,c=_,d=P-dg,f="linear"}const m=yee(e.owner.current,t,c,{...i,duration:d,ease:f,times:h});i.syncStart&&(m.startTime=dn.isProcessing?dn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>m.cancel(),w=()=>{sr.update(v),s(),u()};return m.onfinish=()=>{e.set(bee(c,i)),n&&n(),w()},{then(g,b){return l.then(g,b)},attachTimeline(g){return m.timeline=g,m.onfinish=null,Wr},get time(){return Ja(m.currentTime||0)},set time(g){m.currentTime=ku(g)},get speed(){return m.playbackRate},set speed(g){m.playbackRate=g},get duration(){return Ja(d)},play:()=>{a||(m.play(),fs(v))},pause:()=>m.pause(),stop:()=>{if(a=!0,m.playState==="idle")return;const{currentTime:g}=m;if(g){const b=d0({...i,autoplay:!1});e.setWithVelocity(b.sample(g-dg).value,b.sample(g).value,dg)}w()},complete:()=>m.finish(),cancel:w}}function ute({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const i=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:Wr,pause:Wr,stop:Wr,then:o=>(o(),Promise.resolve()),cancel:Wr,complete:Wr});return t?d0({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const cte={type:"spring",stiffness:500,damping:25,restSpeed:10},dte=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fte={type:"keyframes",duration:.8},hte={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pte=(e,{keyframes:t})=>t.length>2?fte:sc.has(e)?e.startsWith("scale")?dte(t[1]):cte:hte,Px=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Cl.test(t)||t==="0")&&!t.startsWith("url(")),mte=new Set(["brightness","contrast","saturate","opacity"]);function vte(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Vb)||[];if(!n)return e;const i=r.replace(n,"");let o=mte.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const gte=/([a-z-]*)\(.*?\)/g,Cx={...Cl,getAnimatableNone:e=>{const t=e.match(gte);return t?t.map(vte).join(" "):e}},yte={...RF,color:Hn,backgroundColor:Hn,outlineColor:Hn,fill:Hn,stroke:Hn,borderColor:Hn,borderTopColor:Hn,borderRightColor:Hn,borderBottomColor:Hn,borderLeftColor:Hn,filter:Cx,WebkitFilter:Cx},BE=e=>yte[e];function vL(e,t){let r=BE(e);return r!==Cx&&(r=Cl),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const gL=e=>/^0[^.\s]+$/.test(e);function bte(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||gL(e)}function wte(e,t,r,n){const i=Px(t,r);let o;Array.isArray(r)?o=[...r]:o=[null,r];const a=n.from!==void 0?n.from:e.get();let s;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?a:o[u-1]),bte(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(s=o[u]);if(i&&l.length&&s)for(let u=0;u<l.length;u++){const c=l[u];o[c]=vL(t,s)}return o}function Ste({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function yL(e,t){return e[t]||e.default||e}const VE=(e,t,r,n={})=>i=>{const o=yL(n,e)||{},a=o.delay||n.delay||0;let{elapsed:s=0}=n;s=s-ku(a);const l=wte(t,e,r,o),u=l[0],c=l[l.length-1],d=Px(e,u),f=Px(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-s,onUpdate:m=>{t.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Ste(o)||(h={...h,...pte(e,h)}),h.duration&&(h.duration=ku(h.duration)),h.repeatDelay&&(h.repeatDelay=ku(h.repeatDelay)),!d||!f||gee.current||o.type===!1)return ute(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=lte(t,e,h);if(m)return m}return d0(h)};function f0(e){return!!(yi(e)&&e.add)}const bL=e=>/^\-?\d*\.?\d+$/.test(e);function zE(e,t){e.indexOf(t)===-1&&e.push(t)}function UE(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class qE{constructor(){this.subscriptions=[]}add(t){return zE(this.subscriptions,t),()=>UE(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _te=e=>!isNaN(parseFloat(e));class xte{constructor(t,r={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:a}=dn;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,sr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>sr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=_te(this.current),this.owner=r.owner}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new qE);const n=this.events[t].add(r);return t==="change"?()=>{n(),sr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?hL(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xd(e,t){return new xte(e,t)}const wL=e=>t=>t.test(e),Pte={test:e=>e==="auto",parse:e=>e},SL=[lc,Ge,Ea,Fs,kZ,IZ,Pte],fh=e=>SL.find(wL(e)),Cte=[...SL,Hn,Cl],Ete=e=>Cte.find(wL(e));function Tte(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Xd(r))}function Ote(e,t){const r=Ub(e,t);let{transitionEnd:n={},transition:i={},...o}=r?e.makeTargetAnimatable(r,!1):{};o={...o,...n};for(const a in o){const s=HZ(o[a]);Tte(e,a,s)}}function Rte(e,t,r){var n,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(n=r[l])!==null&&n!==void 0?n:e.readValue(l))!==null&&i!==void 0?i:t[l]),c!=null&&(typeof c=="string"&&(bL(c)||gL(c))?c=parseFloat(c):!Ete(c)&&Cl.test(u)&&(c=vL(l,u)),e.addValue(l,Xd(c,{owner:e})),r[l]===void 0&&(r[l]=c),c!==null&&e.setBaseTarget(l,c))}}function Ite(e,t){return t?(t[e]||t.default||t).from:void 0}function kte(e,t,r){const n={};for(const i in e){const o=Ite(i,t);if(o!==void 0)n[i]=o;else{const a=r.getValue(i);a&&(n[i]=a.get())}}return n}function jte({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function _L(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");n&&(o=n);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d),h=s[d];if(!f||h===void 0||c&&jte(c,d))continue;const m={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const w=e.getProps()[vee];w&&(m.elapsed=window.HandoffAppearAnimations(w,d,f,sr),m.syncStart=!0)}f.start(VE(d,f,h,e.shouldReduceMotion&&sc.has(d)?{type:!1}:m));const v=f.animation;f0(l)&&(l.add(d),v.then(()=>l.remove(d))),u.push(v)}return a&&Promise.all(u).then(()=>{a&&Ote(e,a)}),u}function Ex(e,t,r={}){const n=Ub(e,t,r.custom);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const o=n?()=>Promise.all(_L(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return $te(e,t,u+l,c,d,r)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(r.delay)])}function $te(e,t,r=0,n=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>s-u*n;return Array.from(e.variantChildren).sort(Ate).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(Ex(u,t,{...o,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Ate(e,t){return e.sortNodePosition(t)}function Dte(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>Ex(e,o,r));n=Promise.all(i)}else if(typeof t=="string")n=Ex(e,t,r);else{const i=typeof t=="function"?Ub(e,t,r.custom):t;n=Promise.all(_L(e,i,r))}return n.then(()=>e.notify("AnimationComplete",t))}const Mte=[...EE].reverse(),Nte=EE.length;function Fte(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Dte(e,r,n)))}function Lte(e){let t=Fte(e);const r=Vte();let n=!0;const i=(l,u)=>{const c=Ub(e,u);if(c){const{transition:d,transitionEnd:f,...h}=c;l={...l,...h,...f}}return l};function o(l){t=l(e)}function a(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],h=new Set;let m={},v=1/0;for(let p=0;p<Nte;p++){const g=Mte[p],b=r[g],_=c[g]!==void 0?c[g]:d[g],P=em(_),C=g===u?b.isActive:null;C===!1&&(v=p);let x=_===d[g]&&_!==c[g]&&P;if(x&&n&&e.manuallyAnimateOnMount&&(x=!1),b.protectedKeys={...m},!b.isActive&&C===null||!_&&!b.prevProp||Lb(_)||typeof _=="boolean")continue;const T=Bte(b.prevProp,_);let I=T||g===u&&b.isActive&&!x&&P||p>v&&P;const M=Array.isArray(_)?_:[_];let H=M.reduce(i,{});C===!1&&(H={});const{prevResolvedValues:re={}}=b,ie={...re,...H},R=L=>{I=!0,h.delete(L),b.needsAnimating[L]=!0};for(const L in ie){const X=H[L],Q=re[L];m.hasOwnProperty(L)||(X!==Q?s0(X)&&s0(Q)?!qF(X,Q)||T?R(L):b.protectedKeys[L]=!0:X!==void 0?R(L):h.add(L):X!==void 0&&h.has(L)?R(L):b.protectedKeys[L]=!0)}b.prevProp=_,b.prevResolvedValues=H,b.isActive&&(m={...m,...H}),n&&e.blockInitialAnimation&&(I=!1),I&&!x&&f.push(...M.map(L=>({animation:L,options:{type:g,...l}})))}if(h.size){const p={};h.forEach(g=>{const b=e.getBaseTarget(g);b!==void 0&&(p[g]=b)}),f.push({animation:p})}let w=!!f.length;return n&&c.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(f):Promise.resolve()}function s(l,u,c){var d;if(r[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),r[l].isActive=u;const f=a(c,l);for(const h in r)r[h].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>r}}function Bte(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qF(t,e):!1}function ru(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vte(){return{animate:ru(!0),whileInView:ru(),whileHover:ru(),whileTap:ru(),whileDrag:ru(),whileFocus:ru(),exit:ru()}}class zte extends Ll{constructor(t){super(t),t.animationState||(t.animationState=Lte(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Lb(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let Ute=0;class qte extends Ll{constructor(){super(...arguments),this.id=Ute++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});r&&!t&&o.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Hte={animation:{Feature:zte},exit:{Feature:qte}},xj=(e,t)=>Math.abs(e-t);function Wte(e,t){const r=xj(e.x,t.x),n=xj(e.y,t.y);return Math.sqrt(r**2+n**2)}class xL{constructor(t,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=eS(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=Wte(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:h}=dn;this.history.push({...f,timestamp:h});const{onStart:m,onMove:v}=this.handlers;c||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Z1(c,this.transformPagePoint),sr.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=eS(u.type==="pointercancel"?this.lastMoveEventInfo:Z1(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!LF(t))return;this.handlers=r,this.transformPagePoint=n;const i=zb(t),o=Z1(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=dn;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=r;l&&l(t,eS(o,this.history)),this.removeListeners=pl(Xa(window,"pointermove",this.handlePointerMove),Xa(window,"pointerup",this.handlePointerUp),Xa(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fs(this.updatePoint)}}function Z1(e,t){return t?{point:t(e.point)}:e}function Pj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eS({point:e},t){return{point:e,delta:Pj(e,PL(t)),offset:Pj(e,Kte(t)),velocity:Gte(t,.1)}}function Kte(e){return e[0]}function PL(e){return e[e.length-1]}function Gte(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=PL(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>ku(t)));)r--;if(!n)return{x:0,y:0};const o=Ja(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Fi(e){return e.max-e.min}function Tx(e,t=0,r=.01){return Math.abs(e-t)<=r}function Cj(e,t,r,n=.5){e.origin=n,e.originPoint=kr(t.min,t.max,e.origin),e.scale=Fi(r)/Fi(t),(Tx(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=kr(r.min,r.max,e.origin)-e.originPoint,(Tx(e.translate)||isNaN(e.translate))&&(e.translate=0)}function op(e,t,r,n){Cj(e.x,t.x,r.x,n?n.originX:void 0),Cj(e.y,t.y,r.y,n?n.originY:void 0)}function Ej(e,t,r){e.min=r.min+t.min,e.max=e.min+Fi(t)}function Qte(e,t,r){Ej(e.x,t.x,r.x),Ej(e.y,t.y,r.y)}function Tj(e,t,r){e.min=t.min-r.min,e.max=e.min+Fi(t)}function ap(e,t,r){Tj(e.x,t.x,r.x),Tj(e.y,t.y,r.y)}function Yte(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?kr(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?kr(r,e,n.max):Math.min(e,r)),e}function Oj(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Xte(e,{top:t,left:r,bottom:n,right:i}){return{x:Oj(e.x,r,i),y:Oj(e.y,t,n)}}function Rj(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function Jte(e,t){return{x:Rj(e.x,t.x),y:Rj(e.y,t.y)}}function Zte(e,t){let r=.5;const n=Fi(e),i=Fi(t);return i>n?r=rm(t.min,t.max-n,e.min):n>i&&(r=rm(e.min,e.max-i,t.min)),Pl(0,1,r)}function ere(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Ox=.35;function tre(e=Ox){return e===!1?e=0:e===!0&&(e=Ox),{x:Ij(e,"left","right"),y:Ij(e,"top","bottom")}}function Ij(e,t,r){return{min:kj(e,t),max:kj(e,r)}}function kj(e,t){return typeof e=="number"?e:e[t]||0}const jj=()=>({translate:0,scale:1,origin:0,originPoint:0}),dd=()=>({x:jj(),y:jj()}),$j=()=>({min:0,max:0}),Gr=()=>({x:$j(),y:$j()});function ca(e){return[e("x"),e("y")]}function CL({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function rre({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nre(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function tS(e){return e===void 0||e===1}function Rx({scale:e,scaleX:t,scaleY:r}){return!tS(e)||!tS(t)||!tS(r)}function su(e){return Rx(e)||EL(e)||e.z||e.rotate||e.rotateX||e.rotateY}function EL(e){return Aj(e.x)||Aj(e.y)}function Aj(e){return e&&e!=="0%"}function h0(e,t,r){const n=e-r,i=t*n;return r+i}function Dj(e,t,r,n,i){return i!==void 0&&(e=h0(e,i,n)),h0(e,r,n)+t}function Ix(e,t=0,r=1,n,i){e.min=Dj(e.min,t,r,n,i),e.max=Dj(e.max,t,r,n,i)}function TL(e,{x:t,y:r}){Ix(e.x,t.translate,t.scale,t.originPoint),Ix(e.y,r.translate,r.scale,r.originPoint)}function ire(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=r[s],a=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&fd(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,TL(e,a)),n&&su(o.latestValues)&&fd(e,o.latestValues))}t.x=Mj(t.x),t.y=Mj(t.y)}function Mj(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function qs(e,t){e.min=e.min+t,e.max=e.max+t}function Nj(e,t,[r,n,i]){const o=t[i]!==void 0?t[i]:.5,a=kr(e.min,e.max,o);Ix(e,t[r],t[n],a,t.scale)}const ore=["x","scaleX","originX"],are=["y","scaleY","originY"];function fd(e,t){Nj(e.x,t,ore),Nj(e.y,t,are)}function OL(e,t){return CL(nre(e.getBoundingClientRect(),t))}function sre(e,t,r){const n=OL(e,r),{scroll:i}=t;return i&&(qs(n.x,i.offset.x),qs(n.y,i.offset.y)),n}const lre=new WeakMap;class ure{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gr(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=l=>{this.stopAnimation(),r&&this.snapToCursor(zb(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VF(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ca(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Ea.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const p=w.layout.layoutBox[m];p&&(v=Fi(p)*(parseFloat(v)/100))}}this.originPoint[m]=v}),f&&sr.update(()=>f(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=cre(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),h&&h(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new xL(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&sr.update(()=>o(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!fg(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=Yte(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&ud(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Xte(n.layoutBox,t):this.constraints=!1,this.elastic=tre(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ca(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ere(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!ud(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=sre(n,i.root,this.visualElement.getTransformPagePoint());let a=Jte(i.layout.layoutBox,o);if(r){const s=r(rre(a));this.hasMutatedConstraints=!!s,s&&(a=CL(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ca(c=>{if(!fg(c,r,this.currentDirection))return;let d=l&&l[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:n?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return n.start(VE(t,n,0,r))}stopAnimation(){ca(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ca(r=>{const{drag:n}=this.getProps();if(!fg(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(r);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[r];o.set(t[r]-kr(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!ud(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ca(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();i[a]=Zte({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ca(a=>{if(!fg(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(kr(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;lre.set(this.visualElement,this);const t=this.visualElement.current,r=Xa(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();ud(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),n();const a=Ga(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ca(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),r(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Ox,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function fg(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function cre(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class dre extends Ll{constructor(t){super(t),this.removeGroupControls=Wr,this.removeListeners=Wr,this.controls=new ure(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wr}unmount(){this.removeGroupControls(),this.removeListeners()}}const Fj=e=>(t,r)=>{e&&sr.update(()=>e(t,r))};class fre extends Ll{constructor(){super(...arguments),this.removePointerDownListener=Wr}onPointerDown(t){this.session=new xL(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Fj(t),onStart:Fj(r),onMove:n,onEnd:(o,a)=>{delete this.session,i&&sr.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=Xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function hre(){const e=S.useContext(Hm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,i=S.useId();return S.useEffect(()=>n(i),[]),!t&&r?[!1,()=>r&&r(i)]:[!0]}function pre(){return mre(S.useContext(Hm))}function mre(e){return e===null?!0:e.isPresent}const ay={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const hh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ge.test(e))e=parseFloat(e);else return e;const r=Lj(e,t.target.x),n=Lj(e,t.target.y);return`${r}% ${n}%`}},vre={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Cl.parse(e);if(i.length>5)return n;const o=Cl.createTransformer(e),a=typeof i[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=kr(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}};class gre extends ue.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;xZ(yre),o&&(r.group&&r.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ay.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:o}=this.props,a=n.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==r||r===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||sr.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function RL(e){const[t,r]=hre(),n=S.useContext(OE);return ue.createElement(gre,{...e,layoutGroup:n,switchLayoutGroup:S.useContext(PF),isPresent:t,safeToRemove:r})}const yre={borderRadius:{...hh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hh,borderTopRightRadius:hh,borderBottomLeftRadius:hh,borderBottomRightRadius:hh,boxShadow:vre},IL=["TopLeft","TopRight","BottomLeft","BottomRight"],bre=IL.length,Bj=e=>typeof e=="string"?parseFloat(e):e,Vj=e=>typeof e=="number"||Ge.test(e);function wre(e,t,r,n,i,o){i?(e.opacity=kr(0,r.opacity!==void 0?r.opacity:1,Sre(n)),e.opacityExit=kr(t.opacity!==void 0?t.opacity:1,0,_re(n))):o&&(e.opacity=kr(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let a=0;a<bre;a++){const s=`border${IL[a]}Radius`;let l=zj(t,s),u=zj(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Vj(l)===Vj(u)?(e[s]=Math.max(kr(Bj(l),Bj(u),n),0),(Ea.test(u)||Ea.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=kr(t.rotate||0,r.rotate||0,n))}function zj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Sre=kL(0,.5,NE),_re=kL(.5,.95,Wr);function kL(e,t,r){return n=>n<e?0:n>t?1:r(rm(e,t,n))}function Uj(e,t){e.min=t.min,e.max=t.max}function Ji(e,t){Uj(e.x,t.x),Uj(e.y,t.y)}function qj(e,t,r,n,i){return e-=t,e=h0(e,1/r,n),i!==void 0&&(e=h0(e,1/i,n)),e}function xre(e,t=0,r=1,n=.5,i,o=e,a=e){if(Ea.test(t)&&(t=parseFloat(t),t=kr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=kr(o.min,o.max,n);e===o&&(s-=t),e.min=qj(e.min,t,r,s,i),e.max=qj(e.max,t,r,s,i)}function Hj(e,t,[r,n,i],o,a){xre(e,t[r],t[n],t[i],t.scale,o,a)}const Pre=["x","scaleX","originX"],Cre=["y","scaleY","originY"];function Wj(e,t,r,n){Hj(e.x,t,Pre,r?r.x:void 0,n?n.x:void 0),Hj(e.y,t,Cre,r?r.y:void 0,n?n.y:void 0)}function Kj(e){return e.translate===0&&e.scale===1}function jL(e){return Kj(e.x)&&Kj(e.y)}function Ere(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function $L(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Gj(e){return Fi(e.x)/Fi(e.y)}class Tre{constructor(){this.members=[]}add(t){zE(this.members,t),t.scheduleRender()}remove(t){if(UE(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Qj(e,t,r){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(n=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{rotate:l,rotateX:u,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),u&&(n+=`rotateX(${u}deg) `),c&&(n+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(n+=`scale(${a}, ${s})`),n||"none"}const Ore=(e,t)=>e.depth-t.depth;class Rre{constructor(){this.children=[],this.isDirty=!1}add(t){zE(this.children,t),this.isDirty=!0}remove(t){UE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ore),this.isDirty=!1,this.children.forEach(t)}}function Ire(e,t){const r=performance.now(),n=({timestamp:i})=>{const o=i-r;o>=t&&(fs(n),e(o-t))};return sr.read(n,!0),()=>fs(n)}function kre(e){window.MotionDebug&&window.MotionDebug.record(e)}function jre(e){return e instanceof SVGElement&&e.tagName!=="svg"}function $re(e,t,r){const n=yi(e)?e:Xd(e);return n.start(VE("",n,t,r)),n.animation}const Yj=["","X","Y","Z"],Xj=1e3;let Are=0;const lu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function AL({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Are++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{lu.totalNodes=lu.resolvedTargetDeltas=lu.recalculatedProjection=0,this.nodes.forEach(Nre),this.nodes.forEach(zre),this.nodes.forEach(Ure),this.nodes.forEach(Fre),kre(lu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rre)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new qE),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=jre(a),this.instance=a;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Ire(f,250),ay.hasAnimatedSinceResize&&(ay.hasAnimatedSinceResize=!1,this.nodes.forEach(Zj))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Gre,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=c.getProps(),g=!this.targetLayout||!$L(this.targetLayout,m)||h,b=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const _={...yL(v,"layout"),onPlay:w,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else f||Zj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(qre),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Jj);return}this.isUpdating||this.nodes.forEach(Bre),this.isUpdating=!1,this.nodes.forEach(Vre),this.nodes.forEach(Dre),this.nodes.forEach(Mre),this.clearAllSnapshots();const s=performance.now();dn.delta=Pl(0,1e3/60,s-dn.timestamp),dn.timestamp=s,dn.isProcessing=!0,H1.update.process(dn),H1.preRender.process(dn),H1.render.process(dn),dn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Lre),this.sharedNodes.forEach(Hre)}scheduleUpdateProjection(){sr.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){sr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:n(this.instance),offset:r(this.instance)})}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform,s=this.projectionDelta&&!jL(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;a&&(s||su(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),Qre(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Gr();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(qs(s.x,l.offset.x),qs(s.y,l.offset.y)),s}removeElementScroll(a){const s=Gr();Ji(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;if(u!==this.root&&c&&d.layoutScroll){if(c.isRoot){Ji(s,a);const{scroll:f}=this.root;f&&(qs(s.x,-f.offset.x),qs(s.y,-f.offset.y))}qs(s.x,c.offset.x),qs(s.y,c.offset.y)}}return s}applyTransform(a,s=!1){const l=Gr();Ji(l,a);for(let u=0;u<this.path.length;u++){const c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&fd(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),su(c.latestValues)&&fd(l,c.latestValues)}return su(this.latestValues)&&fd(l,this.latestValues),l}removeTransform(a){const s=Gr();Ji(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!su(u.latestValues))continue;Rx(u.latestValues)&&u.updateSnapshot();const c=Gr(),d=u.measurePageBox();Ji(c,d),Wj(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return su(this.latestValues)&&Wj(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=dn.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gr(),this.relativeTargetOrigin=Gr(),ap(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Gr(),this.targetWithTransforms=Gr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qte(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ji(this.target,this.layout.layoutBox),TL(this.target,this.targetDelta)):Ji(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gr(),this.relativeTargetOrigin=Gr(),ap(this.relativeTargetOrigin,this.target,h.target),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}lu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Rx(this.parent.latestValues)||EL(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===dn.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Ji(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ire(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox);const{target:m}=s;if(!m){this.projectionTransform&&(this.projectionDelta=dd(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=dd(),this.projectionDeltaWithTransform=dd());const v=this.projectionTransform;op(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=Qj(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==f||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),lu.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=dd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Gr(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,v=h!==m,w=this.getStack(),p=!w||w.members.length<=1,g=!!(v&&!p&&this.options.crossfade===!0&&!this.path.some(Kre));this.animationProgress=0;let b;this.mixTargetDelta=_=>{const P=_/1e3;e$(d.x,a.x,P),e$(d.y,a.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ap(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wre(this.relativeTarget,this.relativeTargetOrigin,f,P),b&&Ere(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Gr()),Ji(b,this.relativeTarget)),v&&(this.animationValues=c,wre(c,u,this.latestValues,P,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=sr.update(()=>{ay.hasAnimatedSinceResize=!0,this.currentAnimation=$re(0,Xj,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xj),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&DL(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Gr();const d=Fi(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=Fi(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Ji(s,l),fd(s,c),op(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Tre),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c<Yj.length;c++){const d="rotate"+Yj[c];l[d]&&(u[d]=l[d],a.setStaticValue(d,0))}a.render();for(const c in u)a.setStaticValue(c,u[c]);a.scheduleRender()}getProjectionStyles(a={}){var s,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=oy(a.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=oy(a.pointerEvents)||""),this.hasProjected&&!su(this.latestValues)&&(v.transform=c?c({},""):"none",this.hasProjected=!1),v}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=Qj(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:h,y:m}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in o0){if(f[v]===void 0)continue;const{correct:w,applyTo:p}=o0[v],g=u.transform==="none"?f[v]:w(f[v],d);if(p){const b=p.length;for(let _=0;_<b;_++)u[p[_]]=g}else u[v]=g}return this.options.layoutId&&(u.pointerEvents=d===this?oy(a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Jj),this.root.sharedNodes.clear()}}}function Dre(e){e.updateLayout()}function Mre(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,a=r.source!==e.layout.source;o==="size"?ca(d=>{const f=a?r.measuredBox[d]:r.layoutBox[d],h=Fi(f);f.min=n[d].min,f.max=f.min+h}):DL(o,r.layoutBox,n)&&ca(d=>{const f=a?r.measuredBox[d]:r.layoutBox[d],h=Fi(n[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=dd();op(s,n,r.layoutBox);const l=dd();a?op(l,e.applyTransform(i,!0),r.measuredBox):op(l,n,r.layoutBox);const u=!jL(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Gr();ap(m,r.layoutBox,f.layoutBox);const v=Gr();ap(v,n,h.layoutBox),$L(m,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Nre(e){lu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Fre(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Lre(e){e.clearSnapshot()}function Jj(e){e.clearMeasurements()}function Bre(e){e.isLayoutDirty=!1}function Vre(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zre(e){e.resolveTargetDelta()}function Ure(e){e.calcProjection()}function qre(e){e.resetRotation()}function Hre(e){e.removeLeadSnapshot()}function e$(e,t,r){e.translate=kr(t.translate,0,r),e.scale=kr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function t$(e,t,r,n){e.min=kr(t.min,r.min,n),e.max=kr(t.max,r.max,n)}function Wre(e,t,r,n){t$(e.x,t.x,r.x,n),t$(e.y,t.y,r.y,n)}function Kre(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gre={duration:.45,ease:[.4,0,.1,1]},r$=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),n$=r$("applewebkit/")&&!r$("chrome/")?Math.round:Wr;function i$(e){e.min=n$(e.min),e.max=n$(e.max)}function Qre(e){i$(e.x),i$(e.y)}function DL(e,t,r){return e==="position"||e==="preserve-aspect"&&!Tx(Gj(t),Gj(r),.2)}const Yre=AL({attachResizeListener:(e,t)=>Ga(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rS={current:void 0},ML=AL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rS.current){const e=new Yre({});e.mount(window),e.setOptions({layoutScroll:!0}),rS.current=e}return rS.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Xre={pan:{Feature:fre},drag:{Feature:dre,ProjectionNode:ML,MeasureLayout:RL}},Jre=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Zre(e){const t=Jre.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}function kx(e,t,r=1){const[n,i]=Zre(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const a=o.trim();return bL(a)?parseFloat(a):a}else return wx(i)?kx(i,t,r+1):i}function ene(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach(i=>{const o=i.get();if(!wx(o))return;const a=kx(o,n);a&&i.set(a)});for(const i in t){const o=t[i];if(!wx(o))continue;const a=kx(o,n);a&&(t[i]=a,r||(r={}),r[i]===void 0&&(r[i]=o))}return{target:t,transitionEnd:r}}const tne=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),NL=e=>tne.has(e),rne=e=>Object.keys(e).some(NL),o$=e=>e===lc||e===Ge,a$=(e,t)=>parseFloat(e.split(", ")[t]),s$=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return a$(i[1],t);{const o=n.match(/^matrix\((.+)\)$/);return o?a$(o[1],e):0}},nne=new Set(["x","y","z"]),ine=Wm.filter(e=>!nne.has(e));function one(e){const t=[];return ine.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Jd={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:s$(4,13),y:s$(5,14)};Jd.translateX=Jd.x;Jd.translateY=Jd.y;const ane=(e,t,r)=>{const n=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(u=>{s[u]=Jd[u](n,o)}),t.render();const l=t.measureViewportBox();return r.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=Jd[u](l,o)}),e},sne=(e,t,r={},n={})=>{t={...t},n={...n};const i=Object.keys(t).filter(NL);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=r[l],d=fh(c);const f=t[l];let h;if(s0(f)){const m=f.length,v=f[0]===null?1:0;c=f[v],d=fh(c);for(let w=v;w<m&&f[w]!==null;w++)h?l0(fh(f[w])===h):h=fh(f[w])}else h=fh(f);if(d!==h)if(o$(d)&&o$(h)){const m=u.get();typeof m=="string"&&u.set(parseFloat(m)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&h===Ge&&(t[l]=f.map(parseFloat))}else d!=null&&d.transform&&(h!=null&&h.transform)&&(c===0||f===0)?c===0?u.set(h.transform(c)):t[l]=d.transform(f):(a||(o=one(e),a=!0),s.push(l),n[l]=n[l]!==void 0?n[l]:t[l],u.jump(f))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=ane(t,e,s);return o.length&&o.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),Fb&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:n}}else return{target:t,transitionEnd:n}};function lne(e,t,r,n){return rne(t)?sne(e,t,r,n):{target:t,transitionEnd:n}}const une=(e,t,r,n)=>{const i=ene(e,t,n);return t=i.target,n=i.transitionEnd,lne(e,t,r,n)},jx={current:null},FL={current:!1};function cne(){if(FL.current=!0,!!Fb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jx.current=e.matches;e.addListener(t),t()}else jx.current=!1}function dne(e,t,r){const{willChange:n}=t;for(const i in t){const o=t[i],a=r[i];if(yi(o))e.addValue(i,o),f0(n)&&n.add(i);else if(yi(a))e.addValue(i,Xd(o,{owner:e})),f0(n)&&n.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,Xd(s!==void 0?s:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const l$=new WeakMap,LL=Object.keys(tm),fne=LL.length,u$=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hne=TE.length;class pne{constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>sr.render(this.render,!1,!0);const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=r.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=Bb(r),this.isVariantNode=xF(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(r,{});for(const d in c){const f=c[d];s[d]!==void 0&&yi(f)&&(f.set(s[d],!1),f0(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,r){return{}}mount(t){this.current=t,l$.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),FL.current||cne(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){l$.delete(this.current),this.projection&&this.projection.unmount(),fs(this.notifyUpdate),fs(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,r){const n=sc.has(t),i=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&sr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...r},n,i,o){let a,s;for(let l=0;l<fne;l++){const u=LL[l],{isEnabled:c,Feature:d,ProjectionNode:f,MeasureLayout:h}=tm[u];f&&(a=f),c(r)&&(!this.features[u]&&d&&(this.features[u]=new d(this)),h&&(s=h))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:h}=r;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||d&&ud(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return s}updateFeatures(){for(const t in this.features){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<u$.length;n++){const i=u$[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=dne(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<hne;n++){const i=TE[n],o=this.props[i];(em(o)||o===!1)&&(r[i]=o)}return r}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){r!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,r)),this.values.set(t,r),this.latestValues[t]=r.get()}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Xd(r,{owner:this}),this.addValue(t,n)),n}readValue(t){var r;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=ME(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!yi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new qE),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class BL extends pne{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:r,...n},{transformValues:i},o){let a=kte(n,t||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),a&&(a=i(a))),o){Rte(this,n,a);const s=une(this,n,a,r);r=s.transitionEnd,n=s.target}return{transition:t,transitionEnd:r,...n}}}function mne(e){return window.getComputedStyle(e)}class vne extends BL{readValueFromInstance(t,r){if(sc.has(r)){const n=BE(r);return n&&n.default||0}else{const n=mne(t),i=(TF(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return OL(t,r)}build(t,r,n,i){IE(t,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,r){return DE(t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yi(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(t,r,n,i){$F(t,r,n,i)}}class gne extends BL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(sc.has(r)){const n=BE(r);return n&&n.default||0}return r=AF.has(r)?r:AE(r),t.getAttribute(r)}measureInstanceViewportBox(){return Gr()}scrapeMotionValuesFromProps(t,r){return MF(t,r)}build(t,r,n,i){jE(t,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,r,n,i){DF(t,r,n,i)}mount(t){this.isSVGTag=$E(t.tagName),super.mount(t)}}const yne=(e,t)=>RE(e)?new gne(t,{enableHardwareAcceleration:!1}):new vne(t,{enableHardwareAcceleration:!0}),bne={layout:{ProjectionNode:ML,MeasureLayout:RL}},wne={...Hte,...fee,...Xre,...bne},qb=SZ((e,t)=>ZZ(e,t,wne,yne));function VL(){const e=S.useRef(!1);return CE(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Sne(){const e=VL(),[t,r]=S.useState(0),n=S.useCallback(()=>{e.current&&r(t+1)},[t]);return[S.useCallback(()=>sr.postRender(n),[n]),t]}class _ne extends S.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xne({children:e,isPresent:t}){const r=S.useId(),n=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0});return S.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!n.current||!o||!a)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
341
- [data-motion-pop-id="${r}"] {
342
- position: absolute !important;
343
- width: ${o}px !important;
344
- height: ${a}px !important;
345
- top: ${s}px !important;
346
- left: ${l}px !important;
347
- }
348
- `),()=>{document.head.removeChild(u)}},[t]),S.createElement(_ne,{isPresent:t,childRef:n,sizeRef:i},S.cloneElement(e,{ref:n}))}const nS=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=NF(Pne),l=S.useId(),u=S.useMemo(()=>({id:l,initial:t,isPresent:r,custom:i,onExitComplete:c=>{s.set(c,!0);for(const d of s.values())if(!d)return;n&&n()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?void 0:[r]);return S.useMemo(()=>{s.forEach((c,d)=>s.set(d,!1))},[r]),S.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),a==="popLayout"&&(e=S.createElement(xne,{isPresent:r},e)),S.createElement(Hm.Provider,{value:u},e)};function Pne(){return new Map}function Cne(e){return S.useEffect(()=>()=>e(),[])}const Bc=e=>e.key||"";function Ene(e,t){e.forEach(r=>{const n=Bc(r);t.set(n,r)})}function Tne(e){const t=[];return S.Children.forEach(e,r=>{S.isValidElement(r)&&t.push(r)}),t}const zL=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=S.useContext(OE).forceRender||Sne()[0],l=VL(),u=Tne(e);let c=u;const d=S.useRef(new Map).current,f=S.useRef(c),h=S.useRef(new Map).current,m=S.useRef(!0);if(CE(()=>{m.current=!1,Ene(u,h),f.current=c}),Cne(()=>{m.current=!0,h.clear(),d.clear()}),m.current)return S.createElement(S.Fragment,null,c.map(g=>S.createElement(nS,{key:Bc(g),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:o,mode:a},g)));c=[...c];const v=f.current.map(Bc),w=u.map(Bc),p=v.length;for(let g=0;g<p;g++){const b=v[g];w.indexOf(b)===-1&&!d.has(b)&&d.set(b,void 0)}return a==="wait"&&d.size&&(c=[]),d.forEach((g,b)=>{if(w.indexOf(b)!==-1)return;const _=h.get(b);if(!_)return;const P=v.indexOf(b);let C=g;if(!C){const x=()=>{h.delete(b),d.delete(b);const T=f.current.findIndex(I=>I.key===b);if(f.current.splice(T,1),!d.size){if(f.current=u,l.current===!1)return;s(),n&&n()}};C=S.createElement(nS,{key:Bc(_),isPresent:!1,onExitComplete:x,custom:t,presenceAffectsLayout:o,mode:a},_),d.set(b,C)}c.splice(P,0,C)}),c=c.map(g=>{const b=g.key;return d.has(b)?g:S.createElement(nS,{key:Bc(g),isPresent:!0,presenceAffectsLayout:o,mode:a},g)}),S.createElement(S.Fragment,null,d.size?c:c.map(g=>S.cloneElement(g)))};var One={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(n=1),{opacity:0,[r]:n*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},UL=S.memo(e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=One,toastSpacing:c="0.5rem"}=e,[d,f]=S.useState(s),h=pre();Uu(()=>{h||n==null||n()},[h]),Uu(()=>{f(s)},[s]);const m=()=>f(null),v=()=>f(s),w=()=>{h&&i()};S.useEffect(()=>{h&&o&&i()},[h,o,i]),fZ(w,d);const p=S.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),g=S.useMemo(()=>cZ(a),[a]);return y.jsx(qb.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:m,onHoverEnd:v,custom:{position:a},style:g,children:y.jsx(Me.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:p,children:lo(r,{id:t,onClose:w})})})});UL.displayName="ToastComponent";function Rne(e,t){var r;const n=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(r=o==null?void 0:o[t])!=null?r:n}var c$={path:y.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[y.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),y.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),y.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Tf=gt((e,t)=>{const{as:r,viewBox:n,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,c=It("chakra-icon",s),d=Ma("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...d},h={ref:t,focusable:o,className:c,__css:f},m=n??c$.viewBox;if(r&&typeof r!="string")return y.jsx(Me.svg,{as:r,...h,...u});const v=a??c$.path;return y.jsx(Me.svg,{verticalAlign:"middle",viewBox:m,...h,...u,children:v})});Tf.displayName="Icon";function uc(e){const{viewBox:t="0 0 24 24",d:r,displayName:n,defaultProps:i={}}=e,o=S.Children.toArray(e.path),a=gt((s,l)=>y.jsx(Tf,{ref:l,viewBox:t,...i,...s,children:o.length?o:y.jsx("path",{fill:"currentColor",d:r})}));return a.displayName=n,a}function Ine(e){return y.jsx(Tf,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function kne(e){return y.jsx(Tf,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function d$(e){return y.jsx(Tf,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var jne=jq({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Ym=gt((e,t)=>{const r=Ma("Spinner",e),{label:n="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=qn(e),u=It("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${jne} ${o} linear infinite`,...r};return y.jsx(Me.div,{ref:t,__css:c,className:u,...l,children:n&&y.jsx(Me.span,{srOnly:!0,children:n})})});Ym.displayName="Spinner";var[$ne,HE]=Si({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Ane,WE]=Si({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),qL={info:{icon:kne,colorScheme:"blue"},warning:{icon:d$,colorScheme:"orange"},success:{icon:Ine,colorScheme:"green"},error:{icon:d$,colorScheme:"red"},loading:{icon:Ym,colorScheme:"blue"}};function Dne(e){return qL[e].colorScheme}function Mne(e){return qL[e].icon}var HL=gt(function(t,r){const n=WE(),{status:i}=HE(),o={display:"inline",...n.description};return y.jsx(Me.div,{ref:r,"data-status":i,...t,className:It("chakra-alert__desc",t.className),__css:o})});HL.displayName="AlertDescription";function WL(e){const{status:t}=HE(),r=Mne(t),n=WE(),i=t==="loading"?n.spinner:n.icon;return y.jsx(Me.span,{display:"inherit","data-status":t,...e,className:It("chakra-alert__icon",e.className),__css:i,children:e.children||y.jsx(r,{h:"100%",w:"100%"})})}WL.displayName="AlertIcon";var KL=gt(function(t,r){const n=WE(),{status:i}=HE();return y.jsx(Me.div,{ref:r,"data-status":i,...t,className:It("chakra-alert__title",t.className),__css:n.title})});KL.displayName="AlertTitle";var GL=gt(function(t,r){var n;const{status:i="info",addRole:o=!0,...a}=qn(t),s=(n=t.colorScheme)!=null?n:Dne(i),l=ac("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return y.jsx($ne,{value:{status:i},children:y.jsx(Ane,{value:l,children:y.jsx(Me.div,{"data-status":i,role:o?"alert":void 0,ref:r,...a,className:It("chakra-alert",t.className),__css:u})})})});GL.displayName="Alert";function Nne(e){return y.jsx(Tf,{focusable:"false","aria-hidden":!0,...e,children:y.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var QL=gt(function(t,r){const n=Ma("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=qn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return y.jsx(Me.button,{type:"button","aria-label":"Close",ref:r,disabled:o,__css:{...l,...n,...a},...s,children:i||y.jsx(Nne,{width:"1em",height:"1em"})})});QL.displayName="CloseButton";var Fne={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},va=Lne(Fne);function Lne(e){let t=e;const r=new Set,n=i=>{t=i(t),r.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(r.add(i),()=>{n(()=>e),r.delete(i)}),removeToast:(i,o)=>{n(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Bne(i,o),{position:s,id:l}=a;return n(u=>{var c,d;const h=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(d=u[s])!=null?d:[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&n(a=>{const s={...a},{position:l,index:u}=oj(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:YL(o)}),s})},closeAll:({positions:i}={})=>{n(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{n(o=>{const a=wF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>!!oj(va.getState(),i).position}}var f$=0;function Bne(e,t={}){var r,n;f$+=1;const i=(r=t.id)!=null?r:f$,o=(n=t.position)!=null?n:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>va.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Vne=e=>{const{status:t,variant:r="solid",id:n,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return y.jsxs(GL,{addRole:!1,status:t,variant:r,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[y.jsx(WL,{children:u}),y.jsxs(Me.div,{flex:"1",maxWidth:"100%",children:[i&&y.jsx(KL,{id:c==null?void 0:c.title,children:i}),s&&y.jsx(HL,{id:c==null?void 0:c.description,display:"block",children:s})]}),o&&y.jsx(QL,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function YL(e={}){const{render:t,toastComponent:r=Vne}=e;return i=>typeof t=="function"?t({...i,...e}):y.jsx(r,{...i,...e})}function zne(e,t){const r=i=>{var o;return{...t,...i,position:Rne((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},n=i=>{const o=r(i),a=YL(o);return va.notify(a,o)};return n.update=(i,o)=>{va.update(i,r(o))},n.promise=(i,o)=>{const a=n({...o.loading,status:"loading",duration:null});i.then(s=>n.update(a,{status:"success",duration:5e3,...lo(o.success,s)})).catch(s=>n.update(a,{status:"error",duration:5e3,...lo(o.error,s)}))},n.closeAll=va.closeAll,n.close=va.close,n.isActive=va.isActive,n}var[Une,JIe]=Si({name:"ToastOptionsContext",strict:!1}),XL=e=>{const t=S.useSyncExternalStore(va.subscribe,va.getState,va.getState),{motionVariants:r,component:n=UL,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return y.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${s}`,id:`chakra-toast-manager-${s}`,style:dZ(s),children:y.jsx(zL,{initial:!1,children:l.map(u=>y.jsx(n,{motionVariants:r,...u},u.id))})},s)});return y.jsx(Ef,{...i,children:a})},qne={duration:5e3,variant:"solid"},Tc={theme:dF,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:qne,forced:!1};function Hne({theme:e=Tc.theme,colorMode:t=Tc.colorMode,toggleColorMode:r=Tc.toggleColorMode,setColorMode:n=Tc.setColorMode,defaultOptions:i=Tc.defaultOptions,motionVariants:o,toastSpacing:a,component:s,forced:l}=Tc){const u={colorMode:t,setColorMode:n,toggleColorMode:r,forced:l};return{ToastContainer:()=>y.jsx(gF,{theme:e,children:y.jsx(jb.Provider,{value:u,children:y.jsx(XL,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:s})})}),toast:zne(e.direction,i)}}var Wne=e=>function({children:r,theme:n=e,toastOptions:i,...o}){return y.jsxs(lZ,{theme:n,...o,children:[y.jsx(Une,{value:i==null?void 0:i.defaultOptions,children:r}),y.jsx(XL,{...i})]})},h$=Wne(dF),Kne=Object.defineProperty,Gne=(e,t,r)=>t in e?Kne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dr=(e,t,r)=>(Gne(e,typeof t!="symbol"?t+"":t,r),r);function p$(e){return e.sort((t,r)=>{const n=t.compareDocumentPosition(r);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Qne=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function m$(e,t,r){let n=e+1;return r&&n>=t&&(n=0),n}function v$(e,t,r){let n=e-1;return r&&n<0&&(n=t),n}var $x=typeof window<"u"?S.useLayoutEffect:S.useEffect,p0=e=>e,Yne=class{constructor(){Dr(this,"descendants",new Map),Dr(this,"register",e=>{if(e!=null)return Qne(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Dr(this,"unregister",e=>{this.descendants.delete(e);const t=p$(Array.from(this.descendants.keys()));this.assignIndex(t)}),Dr(this,"destroy",()=>{this.descendants.clear()}),Dr(this,"assignIndex",e=>{this.descendants.forEach(t=>{const r=e.indexOf(t.node);t.index=r,t.node.dataset.index=t.index.toString()})}),Dr(this,"count",()=>this.descendants.size),Dr(this,"enabledCount",()=>this.enabledValues().length),Dr(this,"values",()=>Array.from(this.descendants.values()).sort((t,r)=>t.index-r.index)),Dr(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Dr(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Dr(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Dr(this,"first",()=>this.item(0)),Dr(this,"firstEnabled",()=>this.enabledItem(0)),Dr(this,"last",()=>this.item(this.descendants.size-1)),Dr(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Dr(this,"indexOf",e=>{var t,r;return e&&(r=(t=this.descendants.get(e))==null?void 0:t.index)!=null?r:-1}),Dr(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Dr(this,"next",(e,t=!0)=>{const r=m$(e,this.count(),t);return this.item(r)}),Dr(this,"nextEnabled",(e,t=!0)=>{const r=this.item(e);if(!r)return;const n=this.enabledIndexOf(r.node),i=m$(n,this.enabledCount(),t);return this.enabledItem(i)}),Dr(this,"prev",(e,t=!0)=>{const r=v$(e,this.count()-1,t);return this.item(r)}),Dr(this,"prevEnabled",(e,t=!0)=>{const r=this.item(e);if(!r)return;const n=this.enabledIndexOf(r.node),i=v$(n,this.enabledCount()-1,t);return this.enabledItem(i)}),Dr(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const r=Array.from(this.descendants.keys()).concat(e),n=p$(r);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(n)})}};function Xne(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function vn(...e){return t=>{e.forEach(r=>{Xne(r,t)})}}function Jne(...e){return S.useMemo(()=>vn(...e),e)}function Zne(){const e=S.useRef(new Yne);return $x(()=>()=>e.current.destroy()),e.current}var[eie,JL]=Si({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function tie(e){const t=JL(),[r,n]=S.useState(-1),i=S.useRef(null);$x(()=>()=>{i.current&&t.unregister(i.current)},[]),$x(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);r!=a&&!Number.isNaN(a)&&n(a)});const o=p0(e?t.register(e):t.register);return{descendants:t,index:r,enabledIndex:t.enabledIndexOf(i.current),register:vn(o,i)}}function rie(){return[p0(eie),()=>p0(JL()),()=>Zne(),i=>tie(i)]}function nie(e){const{value:t,defaultValue:r,onChange:n,shouldUpdate:i=(f,h)=>f!==h}=e,o=Uo(n),a=Uo(i),[s,l]=S.useState(r),u=t!==void 0,c=u?t:s,d=Uo(f=>{const m=typeof f=="function"?f(c):f;a(c,m)&&(u||l(m),o(m))},[u,o,c,a]);return[c,d]}function Hb(e){return S.Children.toArray(e).filter(t=>S.isValidElement(t))}var[iie,KE]=Si({name:"BreadcrumbStylesContext",errorMessage:`useBreadcrumbStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Breadcrumb />" `}),GE=gt(function(t,r){const{isCurrentPage:n,as:i,className:o,href:a,...s}=t,l=KE(),u={ref:r,as:i,className:It("chakra-breadcrumb__link",o),...s};return n?y.jsx(Me.span,{"aria-current":"page",__css:l.link,...u}):y.jsx(Me.a,{__css:l.link,href:a,...u})});GE.displayName="BreadcrumbLink";var Ax=gt(function(t,r){const{spacing:n,...i}=t,o=KE(),a={mx:n,...o.separator};return y.jsx(Me.span,{ref:r,role:"presentation",...i,__css:a})});Ax.displayName="BreadcrumbSeparator";var ZL=gt(function(t,r){const{isCurrentPage:n,separator:i,isLastChild:o,spacing:a,children:s,className:l,...u}=t,d=Hb(s).map(v=>v.type===GE?S.cloneElement(v,{isCurrentPage:n}):v.type===Ax?S.cloneElement(v,{spacing:a,children:v.props.children||i}):v),h={display:"inline-flex",alignItems:"center",...KE().item},m=It("chakra-breadcrumb__list-item",l);return y.jsxs(Me.li,{ref:r,className:m,...u,__css:h,children:[d,!o&&y.jsx(Ax,{spacing:a,children:i})]})});ZL.displayName="BreadcrumbItem";var e5=gt(function(t,r){const n=ac("Breadcrumb",t),i=qn(t),{children:o,spacing:a="0.5rem",separator:s="/",className:l,listProps:u,...c}=i,d=Hb(o),f=d.length,h=d.map((v,w)=>S.cloneElement(v,{separator:s,spacing:a,isLastChild:f===w+1})),m=It("chakra-breadcrumb",l);return y.jsx(Me.nav,{ref:r,"aria-label":"breadcrumb",className:m,__css:n.container,...c,children:y.jsx(iie,{value:n,children:y.jsx(Me.ol,{className:"chakra-breadcrumb__list",...u,__css:{display:"flex",alignItems:"center",...n.list},children:h})})})});e5.displayName="Breadcrumb";var[ZIe,oie]=Si({strict:!1,name:"ButtonGroupContext"});function aie(e){const[t,r]=S.useState(!e);return{ref:S.useCallback(o=>{o&&r(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function Dx(e){const{children:t,className:r,...n}=e,i=S.isValidElement(t)?S.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=It("chakra-button__icon",r);return y.jsx(Me.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...n,className:o,children:i})}Dx.displayName="ButtonIcon";function Mx(e){const{label:t,placement:r,spacing:n="0.5rem",children:i=y.jsx(Ym,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=It("chakra-button__spinner",o),u=r==="start"?"marginEnd":"marginStart",c=S.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?n:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,n]);return y.jsx(Me.div,{className:l,...s,__css:c,children:i})}Mx.displayName="ButtonSpinner";var vo=gt((e,t)=>{const r=oie(),n=Ma("Button",{...r,...e}),{isDisabled:i=r==null?void 0:r.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:c,iconSpacing:d="0.5rem",type:f,spinner:h,spinnerPlacement:m="start",className:v,as:w,...p}=qn(e),g=S.useMemo(()=>{const C={...n==null?void 0:n._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...n,...!!r&&{_focus:C}}},[n,r]),{ref:b,type:_}=aie(w),P={rightIcon:u,leftIcon:l,iconSpacing:d,children:s};return y.jsxs(Me.button,{ref:Jne(t,b),as:w,type:f??_,"data-active":wt(a),"data-loading":wt(o),__css:g,className:It("chakra-button",v),...p,disabled:i||o,children:[o&&m==="start"&&y.jsx(Mx,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:d,children:h}),o?c||y.jsx(Me.span,{opacity:0,children:y.jsx(g$,{...P})}):y.jsx(g$,{...P}),o&&m==="end"&&y.jsx(Mx,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:d,children:h})]})});vo.displayName="Button";function g$(e){const{leftIcon:t,rightIcon:r,children:n,iconSpacing:i}=e;return y.jsxs(y.Fragment,{children:[t&&y.jsx(Dx,{marginEnd:i,children:t}),n,r&&y.jsx(Dx,{marginStart:i,children:r})]})}var Li=gt((e,t)=>{const{icon:r,children:n,isRound:i,"aria-label":o,...a}=e,s=r||n,l=S.isValidElement(s)?S.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return y.jsx(vo,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Li.displayName="IconButton";var[sie,lie]=Si({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[uie,t5]=Si({strict:!1,name:"FormControlContext"});function cie(e){const{id:t,isRequired:r,isInvalid:n,isDisabled:i,isReadOnly:o,...a}=e,s=S.useId(),l=t||`field-${s}`,u=`${l}-label`,c=`${l}-feedback`,d=`${l}-helptext`,[f,h]=S.useState(!1),[m,v]=S.useState(!1),[w,p]=S.useState(!1),g=S.useCallback((x={},T=null)=>({id:d,...x,ref:vn(T,I=>{I&&v(!0)})}),[d]),b=S.useCallback((x={},T=null)=>({...x,ref:T,"data-focus":wt(w),"data-disabled":wt(i),"data-invalid":wt(n),"data-readonly":wt(o),id:x.id!==void 0?x.id:u,htmlFor:x.htmlFor!==void 0?x.htmlFor:l}),[l,i,w,n,o,u]),_=S.useCallback((x={},T=null)=>({id:c,...x,ref:vn(T,I=>{I&&h(!0)}),"aria-live":"polite"}),[c]),P=S.useCallback((x={},T=null)=>({...x,...a,ref:T,role:"group","data-focus":wt(w),"data-disabled":wt(i),"data-invalid":wt(n),"data-readonly":wt(o)}),[a,i,w,n,o]),C=S.useCallback((x={},T=null)=>({...x,ref:T,role:"presentation","aria-hidden":!0,children:x.children||"*"}),[]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!o,isDisabled:!!i,isFocused:!!w,onFocus:()=>p(!0),onBlur:()=>p(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:m,setHasHelpText:v,id:l,labelId:u,feedbackId:c,helpTextId:d,htmlProps:a,getHelpTextProps:g,getErrorMessageProps:_,getRootProps:P,getLabelProps:b,getRequiredIndicatorProps:C}}var die=gt(function(t,r){const n=ac("Form",t),i=qn(t),{getRootProps:o,htmlProps:a,...s}=cie(i),l=It("chakra-form-control",t.className);return y.jsx(uie,{value:s,children:y.jsx(sie,{value:n,children:y.jsx(Me.div,{...o({},r),className:l,__css:n.container})})})});die.displayName="FormControl";var fie=gt(function(t,r){const n=t5(),i=lie(),o=It("chakra-form__helper-text",t.className);return y.jsx(Me.div,{...n==null?void 0:n.getHelpTextProps(t,r),__css:i.helperText,className:o})});fie.displayName="FormHelperText";function r5(e){const{isDisabled:t,isInvalid:r,isReadOnly:n,isRequired:i,...o}=n5(e);return{...o,disabled:t,readOnly:n,required:i,"aria-invalid":E1(r),"aria-required":E1(i),"aria-readonly":E1(n)}}function n5(e){var t,r,n;const i=t5(),{id:o,disabled:a,readOnly:s,required:l,isRequired:u,isInvalid:c,isReadOnly:d,isDisabled:f,onFocus:h,onBlur:m,...v}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&w.push(i.feedbackId),i!=null&&i.hasHelpText&&w.push(i.helpTextId),{...v,"aria-describedby":w.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=a??f)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(r=s??d)!=null?r:i==null?void 0:i.isReadOnly,isRequired:(n=l??u)!=null?n:i==null?void 0:i.isRequired,isInvalid:c??(i==null?void 0:i.isInvalid),onFocus:Ft(i==null?void 0:i.onFocus,h),onBlur:Ft(i==null?void 0:i.onBlur,m)}}var hie={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},pie=()=>typeof document<"u",y$=!1,Xm=null,qu=!1,Nx=!1,Fx=new Set;function QE(e,t){Fx.forEach(r=>r(e,t))}var mie=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function vie(e){return!(e.metaKey||!mie&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function b$(e){qu=!0,vie(e)&&(Xm="keyboard",QE("keyboard",e))}function Oc(e){if(Xm="pointer",e.type==="mousedown"||e.type==="pointerdown"){qu=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=t.matches(":focus-visible")}catch{}if(r)return;QE("pointer",e)}}function gie(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function yie(e){gie(e)&&(qu=!0,Xm="virtual")}function bie(e){e.target===window||e.target===document||(!qu&&!Nx&&(Xm="virtual",QE("virtual",e)),qu=!1,Nx=!1)}function wie(){qu=!1,Nx=!0}function w$(){return Xm!=="pointer"}function Sie(){if(!pie()||y$)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...r){qu=!0,e.apply(this,r)},document.addEventListener("keydown",b$,!0),document.addEventListener("keyup",b$,!0),document.addEventListener("click",yie,!0),window.addEventListener("focus",bie,!0),window.addEventListener("blur",wie,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Oc,!0),document.addEventListener("pointermove",Oc,!0),document.addEventListener("pointerup",Oc,!0)):(document.addEventListener("mousedown",Oc,!0),document.addEventListener("mousemove",Oc,!0),document.addEventListener("mouseup",Oc,!0)),y$=!0}function _ie(e){Sie(),e(w$());const t=()=>e(w$());return Fx.add(t),()=>{Fx.delete(t)}}function xie(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function Pie(e={}){const t=n5(e),{isDisabled:r,isReadOnly:n,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:c,isChecked:d,isFocusable:f,onChange:h,isIndeterminate:m,name:v,value:w,tabIndex:p=void 0,"aria-label":g,"aria-labelledby":b,"aria-invalid":_,...P}=e,C=xie(P,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),x=Uo(h),T=Uo(s),I=Uo(l),[M,H]=S.useState(!1),[re,ie]=S.useState(!1),[R,L]=S.useState(!1),[X,Q]=S.useState(!1);S.useEffect(()=>_ie(H),[]);const W=S.useRef(null),[te,G]=S.useState(!0),[A,U]=S.useState(!!c),N=d!==void 0,E=N?d:A,k=S.useCallback(ce=>{if(n||r){ce.preventDefault();return}N||U(E?ce.target.checked:m?!0:ce.target.checked),x==null||x(ce)},[n,r,E,N,m,x]);hl(()=>{W.current&&(W.current.indeterminate=!!m)},[m]),Uu(()=>{r&&ie(!1)},[r,ie]),hl(()=>{const ce=W.current;if(!(ce!=null&&ce.form))return;const ye=()=>{U(!!c)};return ce.form.addEventListener("reset",ye),()=>{var Xe;return(Xe=ce.form)==null?void 0:Xe.removeEventListener("reset",ye)}},[]);const D=r&&!f,ee=S.useCallback(ce=>{ce.key===" "&&Q(!0)},[Q]),oe=S.useCallback(ce=>{ce.key===" "&&Q(!1)},[Q]);hl(()=>{if(!W.current)return;W.current.checked!==E&&U(W.current.checked)},[W.current]);const ve=S.useCallback((ce={},ye=null)=>{const Xe=kt=>{re&&kt.preventDefault(),Q(!0)};return{...ce,ref:ye,"data-active":wt(X),"data-hover":wt(R),"data-checked":wt(E),"data-focus":wt(re),"data-focus-visible":wt(re&&M),"data-indeterminate":wt(m),"data-disabled":wt(r),"data-invalid":wt(o),"data-readonly":wt(n),"aria-hidden":!0,onMouseDown:Ft(ce.onMouseDown,Xe),onMouseUp:Ft(ce.onMouseUp,()=>Q(!1)),onMouseEnter:Ft(ce.onMouseEnter,()=>L(!0)),onMouseLeave:Ft(ce.onMouseLeave,()=>L(!1))}},[X,E,r,re,M,R,m,o,n]),Se=S.useCallback((ce={},ye=null)=>({...ce,ref:ye,"data-active":wt(X),"data-hover":wt(R),"data-checked":wt(E),"data-focus":wt(re),"data-focus-visible":wt(re&&M),"data-indeterminate":wt(m),"data-disabled":wt(r),"data-invalid":wt(o),"data-readonly":wt(n)}),[X,E,r,re,M,R,m,o,n]),$e=S.useCallback((ce={},ye=null)=>({...C,...ce,ref:vn(ye,Xe=>{Xe&&G(Xe.tagName==="LABEL")}),onClick:Ft(ce.onClick,()=>{var Xe;te||((Xe=W.current)==null||Xe.click(),requestAnimationFrame(()=>{var kt;(kt=W.current)==null||kt.focus({preventScroll:!0})}))}),"data-disabled":wt(r),"data-checked":wt(E),"data-invalid":wt(o)}),[C,r,E,o,te]),ge=S.useCallback((ce={},ye=null)=>({...ce,ref:vn(W,ye),type:"checkbox",name:v,value:w,id:a,tabIndex:p,onChange:Ft(ce.onChange,k),onBlur:Ft(ce.onBlur,T,()=>ie(!1)),onFocus:Ft(ce.onFocus,I,()=>ie(!0)),onKeyDown:Ft(ce.onKeyDown,ee),onKeyUp:Ft(ce.onKeyUp,oe),required:i,checked:E,disabled:D,readOnly:n,"aria-label":g,"aria-labelledby":b,"aria-invalid":_?!!_:o,"aria-describedby":u,"aria-disabled":r,style:hie}),[v,w,a,k,T,I,ee,oe,i,E,D,n,g,b,_,o,u,r,p]),st=S.useCallback((ce={},ye=null)=>({...ce,ref:ye,onMouseDown:Ft(ce.onMouseDown,Cie),"data-disabled":wt(r),"data-checked":wt(E),"data-invalid":wt(o)}),[E,r,o]);return{state:{isInvalid:o,isFocused:re,isChecked:E,isActive:X,isHovered:R,isIndeterminate:m,isDisabled:r,isReadOnly:n,isRequired:i},getRootProps:$e,getCheckboxProps:ve,getIndicatorProps:Se,getInputProps:ge,getLabelProps:st,htmlProps:C}}function Cie(e){e.preventDefault(),e.stopPropagation()}function Ad(e,t,r,n){const i=Uo(r);return S.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!r||!o))return o.addEventListener(t,i,n),()=>{o.removeEventListener(t,i,n)}},[t,e,n,i,r]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,n)}}function Eie(e){return"current"in e}var i5=()=>typeof window<"u";function Tie(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var Oie=e=>i5()&&e.test(navigator.vendor),Rie=e=>i5()&&e.test(Tie()),Iie=()=>Rie(/mac|iphone|ipad|ipod/i),kie=()=>Iie()&&Oie(/apple/i);function jie(e){const{ref:t,elements:r,enabled:n}=e,i=()=>{var o,a;return(a=(o=t.current)==null?void 0:o.ownerDocument)!=null?a:document};Ad(i,"pointerdown",o=>{if(!kie()||!n)return;const a=o.target,l=(r??[t]).some(u=>{const c=Eie(u)?u.current:u;return(c==null?void 0:c.contains(a))||c===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lx=function(e,t){return Lx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lx(e,t)};function Jo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Lx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Y=function(){return Y=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Y.apply(this,arguments)};function hs(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Hs(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(c){try{u(n.next(c))}catch(d){a(d)}}function l(c){try{u(n.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Ws(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function qo(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function nm(e){"@babel/helpers - typeof";return nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nm(e)}function $ie(e,t){if(nm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aie(e){var t=$ie(e,"string");return nm(t)==="symbol"?t:String(t)}function o5(e,t,r){return t=Aie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function YE(e){var t;if(!a5(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function Die(e){var t,r;return(r=(t=s5(e))==null?void 0:t.defaultView)!=null?r:window}function s5(e){return a5(e)?e.ownerDocument:document}function Mie(e){return s5(e).activeElement}function Nie(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:i}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+i+n)}function Fie(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function l5(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:YE(e)&&Nie(e)?e:l5(Fie(e))}var u5=e=>e.hasAttribute("tabindex"),Lie=e=>u5(e)&&e.tabIndex===-1;function Bie(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function c5(e){return e.parentElement&&c5(e.parentElement)?!0:e.hidden}function Vie(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function d5(e){if(!YE(e)||c5(e)||Bie(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():Vie(e)?!0:u5(e)}function zie(e){return e?YE(e)&&d5(e)&&!Lie(e):!1}var Uie=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],qie=Uie.join(),Hie=e=>e.offsetWidth>0&&e.offsetHeight>0;function Wie(e){const t=Array.from(e.querySelectorAll(qie));return t.unshift(e),t.filter(r=>d5(r)&&Hie(r))}var Kie=jJ?S.useLayoutEffect:S.useEffect;function S$(e,t=[]){const r=S.useRef(e);return Kie(()=>{r.current=e}),S.useCallback((...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},t)}function Gie(e,t){const r=S.useId();return S.useMemo(()=>e||[t,r].filter(Boolean).join("-"),[e,t,r])}function Qie(e,t){const r=e!==void 0;return[r,r&&typeof e<"u"?e:t]}function f5(e={}){const{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=S$(r),a=S$(t),[s,l]=S.useState(e.defaultIsOpen||!1),[u,c]=Qie(n,s),d=Gie(i,"disclosure"),f=S.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),h=S.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),m=S.useCallback(()=>{(c?f:h)()},[c,h,f]);return{isOpen:!!c,onOpen:h,onClose:f,onToggle:m,isControlled:u,getButtonProps:(v={})=>({...v,"aria-expanded":c,"aria-controls":d,onClick:NJ(v.onClick,m)}),getDisclosureProps:(v={})=>({...v,hidden:!c,id:d})}}var Wb=gt(function(t,r){const{htmlSize:n,...i}=t,o=ac("Input",i),a=qn(i),s=r5(a),l=It("chakra-input",t.className);return y.jsx(Me.input,{size:n,...s,__css:o.field,ref:r,className:l})});Wb.displayName="Input";Wb.id="Input";var Of=gt(function(t,r){const n=Ma("Link",t),{className:i,isExternal:o,...a}=qn(t);return y.jsx(Me.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:r,className:It("chakra-link",i),...a,__css:n})});Of.displayName="Link";function Yie(e,t){return Array.isArray(e)?e.map(r=>r===null?null:t(r)):zo(e)?Object.keys(e).reduce((r,n)=>(r[n]=t(e[n]),r),{}):e!=null?t(e):null}var Ye=gt(function(t,r){const n=Ma("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=qn(t),u=GJ({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return y.jsx(Me.p,{ref:r,className:It("chakra-text",t.className),...u,...l,__css:n})});Ye.displayName="Text";var h5=e=>y.jsx(Me.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});h5.displayName="StackItem";function Xie(e){const{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Yie(r,i=>n[i])}}var p5=gt((e,t)=>{const{isInline:r,direction:n,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:c,shouldWrapChildren:d,...f}=e,h=r?"row":n??"column",m=S.useMemo(()=>Xie({spacing:a,direction:h}),[a,h]),v=!!u,w=!d&&!v,p=S.useMemo(()=>{const b=Hb(l);return w?b:b.map((_,P)=>{const C=typeof _.key<"u"?_.key:P,x=P+1===b.length,I=d?y.jsx(h5,{children:_},C):_;if(!v)return I;const M=S.cloneElement(u,{__css:m}),H=x?null:M;return y.jsxs(S.Fragment,{children:[I,H]},C)})},[u,m,v,w,d,l]),g=It("chakra-stack",c);return y.jsx(Me.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:h,flexWrap:s,gap:v?void 0:a,className:g,...f,children:p})});p5.displayName="Stack";var im=gt((e,t)=>y.jsx(p5,{align:"center",...e,direction:"column",ref:t}));im.displayName="VStack";var m5=gt(function(t,r){const n=Ma("Heading",t),{className:i,...o}=qn(t);return y.jsx(Me.h2,{ref:r,className:It("chakra-heading",t.className),...o,__css:n})});m5.displayName="Heading";var Je=Me("div");Je.displayName="Box";var v5=gt(function(t,r){const{size:n,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return y.jsx(Je,{ref:r,boxSize:n,__css:{...a,flexShrink:0,flexGrow:0},...o})});v5.displayName="Square";var Jie=gt(function(t,r){const{size:n,...i}=t;return y.jsx(v5,{size:n,ref:r,borderRadius:"9999px",...i})});Jie.displayName="Circle";var XE=Me("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});XE.displayName="Center";var Zie={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};gt(function(t,r){const{axis:n="both",...i}=t;return y.jsx(Me.div,{ref:r,__css:Zie[n],...i,position:"absolute"})});var JE=gt(function(t,r){const n=Ma("Code",t),{className:i,...o}=qn(t);return y.jsx(Me.code,{ref:r,className:It("chakra-code",t.className),...o,__css:{display:"inline-block",...n}})});JE.displayName="Code";var de=gt(function(t,r){const{direction:n,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:n,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return y.jsx(Me.div,{ref:r,__css:d,...c})});de.displayName="Flex";function eoe(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function toe(e={}){const{timeout:t=300,preventDefault:r=()=>!0}=e,[n,i]=S.useState([]),o=S.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)},s=()=>{a(),o.current=setTimeout(()=>{i([]),o.current=null},t)};S.useEffect(()=>a,[]);function l(u){return c=>{if(c.key==="Backspace"){const d=[...n];d.pop(),i(d);return}if(eoe(c)){const d=n.concat(c.key);r(c)&&(c.preventDefault(),c.stopPropagation()),i(d),u(d.join("")),s()}}}return l}function roe(e,t,r,n){if(t==null)return n;if(!n)return e.find(a=>r(a).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(o=>r(o).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let o;return i.includes(n)?(o=i.indexOf(n)+1,o===i.length&&(o=0),i[o]):(o=e.indexOf(i[0]),e[o])}return n}function noe(){const e=S.useRef(new Map),t=e.current,r=S.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),n=S.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return S.useEffect(()=>()=>{t.forEach((i,o)=>{n(i.el,i.type,o,i.options)})},[n,t]),{add:r,remove:n}}function iS(e){const t=e.target,{tagName:r,isContentEditable:n}=t;return r!=="INPUT"&&r!=="TEXTAREA"&&n!==!0}function ioe(e={}){const{ref:t,isDisabled:r,isFocusable:n,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:c,tabIndex:d,onMouseOver:f,onMouseLeave:h,...m}=e,[v,w]=S.useState(!0),[p,g]=S.useState(!1),b=noe(),_=Q=>{Q&&Q.tagName!=="BUTTON"&&w(!1)},P=v?d:d||0,C=r&&!n,x=S.useCallback(Q=>{if(r){Q.stopPropagation(),Q.preventDefault();return}Q.currentTarget.focus(),l==null||l(Q)},[r,l]),T=S.useCallback(Q=>{p&&iS(Q)&&(Q.preventDefault(),Q.stopPropagation(),g(!1),b.remove(document,"keyup",T,!1))},[p,b]),I=S.useCallback(Q=>{if(u==null||u(Q),r||Q.defaultPrevented||Q.metaKey||!iS(Q.nativeEvent)||v)return;const W=i&&Q.key==="Enter";o&&Q.key===" "&&(Q.preventDefault(),g(!0)),W&&(Q.preventDefault(),Q.currentTarget.click()),b.add(document,"keyup",T,!1)},[r,v,u,i,o,b,T]),M=S.useCallback(Q=>{if(c==null||c(Q),r||Q.defaultPrevented||Q.metaKey||!iS(Q.nativeEvent)||v)return;o&&Q.key===" "&&(Q.preventDefault(),g(!1),Q.currentTarget.click())},[o,v,r,c]),H=S.useCallback(Q=>{Q.button===0&&(g(!1),b.remove(document,"mouseup",H,!1))},[b]),re=S.useCallback(Q=>{if(Q.button!==0)return;if(r){Q.stopPropagation(),Q.preventDefault();return}v||g(!0),Q.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",H,!1),a==null||a(Q)},[r,v,a,b,H]),ie=S.useCallback(Q=>{Q.button===0&&(v||g(!1),s==null||s(Q))},[s,v]),R=S.useCallback(Q=>{if(r){Q.preventDefault();return}f==null||f(Q)},[r,f]),L=S.useCallback(Q=>{p&&(Q.preventDefault(),g(!1)),h==null||h(Q)},[p,h]),X=vn(t,_);return v?{...m,ref:X,type:"button","aria-disabled":C?void 0:r,disabled:C,onClick:x,onMouseDown:a,onMouseUp:s,onKeyUp:c,onKeyDown:u,onMouseOver:f,onMouseLeave:h}:{...m,ref:X,role:"button","data-active":wt(p),"aria-disabled":r?"true":void 0,tabIndex:C?void 0:P,onClick:x,onMouseDown:re,onMouseUp:ie,onKeyUp:M,onKeyDown:I,onMouseOver:R,onMouseLeave:L}}function ooe(e){const t=e.current;if(!t)return!1;const r=Mie(t);return!r||t.contains(r)?!1:!!zie(r)}function g5(e,t){const{shouldFocus:r,visible:n,focusRef:i}=t,o=r&&!n;Uu(()=>{if(!o||ooe(e))return;const a=(i==null?void 0:i.current)||e.current;let s;if(a)return s=requestAnimationFrame(()=>{a.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(s)}},[o,e,i])}var aoe={preventScroll:!0,shouldFocus:!1};function soe(e,t=aoe){const{focusRef:r,preventScroll:n,shouldFocus:i,visible:o}=t,a=loe(e)?e.current:e,s=i&&o,l=S.useRef(s),u=S.useRef(o);hl(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const c=S.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(r!=null&&r.current)requestAnimationFrame(()=>{var d;(d=r.current)==null||d.focus({preventScroll:n})});else{const d=Wie(a);d.length>0&&requestAnimationFrame(()=>{d[0].focus({preventScroll:n})})}},[o,n,a,r]);Uu(()=>{c()},[c]),Ad(a,"transitionend",c)}function loe(e){return"current"in e}var Rc=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Jr={arrowShadowColor:Rc("--popper-arrow-shadow-color"),arrowSize:Rc("--popper-arrow-size","8px"),arrowSizeHalf:Rc("--popper-arrow-size-half"),arrowBg:Rc("--popper-arrow-bg"),transformOrigin:Rc("--popper-transform-origin"),arrowOffset:Rc("--popper-arrow-offset")};function uoe(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var coe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},doe=e=>coe[e],_$={scroll:!0,resize:!0};function foe(e){let t;return typeof e=="object"?t={enabled:!0,options:{..._$,...e}}:t={enabled:e,options:_$},t}var hoe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},poe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{x$(e)},effect:({state:e})=>()=>{x$(e)}},x$=e=>{e.elements.popper.style.setProperty(Jr.transformOrigin.var,doe(e.placement))},moe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{voe(e)}},voe=e=>{var t;if(!e.placement)return;const r=goe(e.placement);if((t=e.elements)!=null&&t.arrow&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:Jr.arrowSize.varRef,height:Jr.arrowSize.varRef,zIndex:-1});const n={[Jr.arrowSizeHalf.var]:`calc(${Jr.arrowSize.varRef} / 2 - 1px)`,[Jr.arrowOffset.var]:`calc(${Jr.arrowSizeHalf.varRef} * -1)`};for(const i in n)e.elements.arrow.style.setProperty(i,n[i])}},goe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Jr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Jr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Jr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Jr.arrowOffset.varRef}},yoe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{P$(e)},effect:({state:e})=>()=>{P$(e)}},P$=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=uoe(e.placement);r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:Jr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},boe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},woe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Soe(e,t="ltr"){var r,n;const i=((r=boe[e])==null?void 0:r[t])||e;return t==="ltr"?i:(n=woe[e])!=null?n:i}var mi="top",go="bottom",yo="right",vi="left",ZE="auto",Jm=[mi,go,yo,vi],Zd="start",om="end",_oe="clippingParents",y5="viewport",ph="popper",xoe="reference",C$=Jm.reduce(function(e,t){return e.concat([t+"-"+Zd,t+"-"+om])},[]),b5=[].concat(Jm,[ZE]).reduce(function(e,t){return e.concat([t,t+"-"+Zd,t+"-"+om])},[]),Poe="beforeRead",Coe="read",Eoe="afterRead",Toe="beforeMain",Ooe="main",Roe="afterMain",Ioe="beforeWrite",koe="write",joe="afterWrite",$oe=[Poe,Coe,Eoe,Toe,Ooe,Roe,Ioe,koe,joe];function ja(e){return e?(e.nodeName||"").toLowerCase():null}function Bi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Hu(e){var t=Bi(e).Element;return e instanceof t||e instanceof Element}function ho(e){var t=Bi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function eT(e){if(typeof ShadowRoot>"u")return!1;var t=Bi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Aoe(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!ho(o)||!ja(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Doe(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(l,u){return l[u]="",l},{});!ho(i)||!ja(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Moe={name:"applyStyles",enabled:!0,phase:"write",fn:Aoe,effect:Doe,requires:["computeStyles"]};function Ta(e){return e.split("-")[0]}var ju=Math.max,m0=Math.min,ef=Math.round;function Bx(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function w5(){return!/^((?!chrome|android).)*safari/i.test(Bx())}function tf(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&ho(e)&&(i=e.offsetWidth>0&&ef(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ef(n.height)/e.offsetHeight||1);var a=Hu(e)?Bi(e):window,s=a.visualViewport,l=!w5()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/i,c=(n.top+(l&&s?s.offsetTop:0))/o,d=n.width/i,f=n.height/o;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function tT(e){var t=tf(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function S5(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&eT(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ps(e){return Bi(e).getComputedStyle(e)}function Noe(e){return["table","td","th"].indexOf(ja(e))>=0}function Bl(e){return((Hu(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kb(e){return ja(e)==="html"?e:e.assignedSlot||e.parentNode||(eT(e)?e.host:null)||Bl(e)}function E$(e){return!ho(e)||ps(e).position==="fixed"?null:e.offsetParent}function Foe(e){var t=/firefox/i.test(Bx()),r=/Trident/i.test(Bx());if(r&&ho(e)){var n=ps(e);if(n.position==="fixed")return null}var i=Kb(e);for(eT(i)&&(i=i.host);ho(i)&&["html","body"].indexOf(ja(i))<0;){var o=ps(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zm(e){for(var t=Bi(e),r=E$(e);r&&Noe(r)&&ps(r).position==="static";)r=E$(r);return r&&(ja(r)==="html"||ja(r)==="body"&&ps(r).position==="static")?t:r||Foe(e)||t}function rT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sp(e,t,r){return ju(e,m0(t,r))}function Loe(e,t,r){var n=sp(e,t,r);return n>r?r:n}function _5(){return{top:0,right:0,bottom:0,left:0}}function x5(e){return Object.assign({},_5(),e)}function P5(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Boe=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,x5(typeof t!="number"?t:P5(t,Jm))};function Voe(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Ta(r.placement),l=rT(s),u=[vi,yo].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var d=Boe(i.padding,r),f=tT(o),h=l==="y"?mi:vi,m=l==="y"?go:yo,v=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],w=a[l]-r.rects.reference[l],p=Zm(o),g=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,b=v/2-w/2,_=d[h],P=g-f[c]-d[m],C=g/2-f[c]/2+b,x=sp(_,C,P),T=l;r.modifiersData[n]=(t={},t[T]=x,t.centerOffset=x-C,t)}}function zoe(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||S5(t.elements.popper,i)&&(t.elements.arrow=i))}const Uoe={name:"arrow",enabled:!0,phase:"main",fn:Voe,effect:zoe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rf(e){return e.split("-")[1]}var qoe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hoe(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:ef(r*i)/i||0,y:ef(n*i)/i||0}}function T$(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,v=m===void 0?0:m,w=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=w.x,v=w.y;var p=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=vi,_=mi,P=window;if(u){var C=Zm(r),x="clientHeight",T="clientWidth";if(C===Bi(r)&&(C=Bl(r),ps(C).position!=="static"&&s==="absolute"&&(x="scrollHeight",T="scrollWidth")),C=C,i===mi||(i===vi||i===yo)&&o===om){_=go;var I=d&&C===P&&P.visualViewport?P.visualViewport.height:C[x];v-=I-n.height,v*=l?1:-1}if(i===vi||(i===mi||i===go)&&o===om){b=yo;var M=d&&C===P&&P.visualViewport?P.visualViewport.width:C[T];h-=M-n.width,h*=l?1:-1}}var H=Object.assign({position:s},u&&qoe),re=c===!0?Hoe({x:h,y:v},Bi(r)):{x:h,y:v};if(h=re.x,v=re.y,l){var ie;return Object.assign({},H,(ie={},ie[_]=g?"0":"",ie[b]=p?"0":"",ie.transform=(P.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",ie))}return Object.assign({},H,(t={},t[_]=g?v+"px":"",t[b]=p?h+"px":"",t.transform="",t))}function Woe(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:Ta(t.placement),variation:rf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,T$(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,T$(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Koe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Woe,data:{}};var hg={passive:!0};function Goe(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,l=Bi(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",r.update,hg)}),s&&l.addEventListener("resize",r.update,hg),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",r.update,hg)}),s&&l.removeEventListener("resize",r.update,hg)}}const Qoe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Goe,data:{}};var Yoe={left:"right",right:"left",bottom:"top",top:"bottom"};function sy(e){return e.replace(/left|right|bottom|top/g,function(t){return Yoe[t]})}var Xoe={start:"end",end:"start"};function O$(e){return e.replace(/start|end/g,function(t){return Xoe[t]})}function nT(e){var t=Bi(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function iT(e){return tf(Bl(e)).left+nT(e).scrollLeft}function Joe(e,t){var r=Bi(e),n=Bl(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=w5();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+iT(e),y:l}}function Zoe(e){var t,r=Bl(e),n=nT(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ju(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ju(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+iT(e),l=-n.scrollTop;return ps(i||r).direction==="rtl"&&(s+=ju(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function oT(e){var t=ps(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function C5(e){return["html","body","#document"].indexOf(ja(e))>=0?e.ownerDocument.body:ho(e)&&oT(e)?e:C5(Kb(e))}function lp(e,t){var r;t===void 0&&(t=[]);var n=C5(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Bi(n),a=i?[o].concat(o.visualViewport||[],oT(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(lp(Kb(a)))}function Vx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eae(e,t){var r=tf(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function R$(e,t,r){return t===y5?Vx(Joe(e,r)):Hu(t)?eae(t,r):Vx(Zoe(Bl(e)))}function tae(e){var t=lp(Kb(e)),r=["absolute","fixed"].indexOf(ps(e).position)>=0,n=r&&ho(e)?Zm(e):e;return Hu(n)?t.filter(function(i){return Hu(i)&&S5(i,n)&&ja(i)!=="body"}):[]}function rae(e,t,r,n){var i=t==="clippingParents"?tae(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(l,u){var c=R$(e,u,n);return l.top=ju(c.top,l.top),l.right=m0(c.right,l.right),l.bottom=m0(c.bottom,l.bottom),l.left=ju(c.left,l.left),l},R$(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function E5(e){var t=e.reference,r=e.element,n=e.placement,i=n?Ta(n):null,o=n?rf(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case mi:l={x:a,y:t.y-r.height};break;case go:l={x:a,y:t.y+t.height};break;case yo:l={x:t.x+t.width,y:s};break;case vi:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?rT(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Zd:l[u]=l[u]-(t[c]/2-r[c]/2);break;case om:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function am(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,l=s===void 0?_oe:s,u=r.rootBoundary,c=u===void 0?y5:u,d=r.elementContext,f=d===void 0?ph:d,h=r.altBoundary,m=h===void 0?!1:h,v=r.padding,w=v===void 0?0:v,p=x5(typeof w!="number"?w:P5(w,Jm)),g=f===ph?xoe:ph,b=e.rects.popper,_=e.elements[m?g:f],P=rae(Hu(_)?_:_.contextElement||Bl(e.elements.popper),l,c,a),C=tf(e.elements.reference),x=E5({reference:C,element:b,strategy:"absolute",placement:i}),T=Vx(Object.assign({},b,x)),I=f===ph?T:C,M={top:P.top-I.top+p.top,bottom:I.bottom-P.bottom+p.bottom,left:P.left-I.left+p.left,right:I.right-P.right+p.right},H=e.modifiersData.offset;if(f===ph&&H){var re=H[i];Object.keys(M).forEach(function(ie){var R=[yo,go].indexOf(ie)>=0?1:-1,L=[mi,go].indexOf(ie)>=0?"y":"x";M[ie]+=re[L]*R})}return M}function nae(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?b5:l,c=rf(n),d=c?s?C$:C$.filter(function(m){return rf(m)===c}):Jm,f=d.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,v){return m[v]=am(e,{placement:v,boundary:i,rootBoundary:o,padding:a})[Ta(v)],m},{});return Object.keys(h).sort(function(m,v){return h[m]-h[v]})}function iae(e){if(Ta(e)===ZE)return[];var t=sy(e);return[O$(e),t,O$(t)]}function oae(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,l=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,h=r.flipVariations,m=h===void 0?!0:h,v=r.allowedAutoPlacements,w=t.options.placement,p=Ta(w),g=p===w,b=l||(g||!m?[sy(w)]:iae(w)),_=[w].concat(b).reduce(function(E,k){return E.concat(Ta(k)===ZE?nae(t,{placement:k,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:v}):k)},[]),P=t.rects.reference,C=t.rects.popper,x=new Map,T=!0,I=_[0],M=0;M<_.length;M++){var H=_[M],re=Ta(H),ie=rf(H)===Zd,R=[mi,go].indexOf(re)>=0,L=R?"width":"height",X=am(t,{placement:H,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),Q=R?ie?yo:vi:ie?go:mi;P[L]>C[L]&&(Q=sy(Q));var W=sy(Q),te=[];if(o&&te.push(X[re]<=0),s&&te.push(X[Q]<=0,X[W]<=0),te.every(function(E){return E})){I=H,T=!1;break}x.set(H,te)}if(T)for(var G=m?3:1,A=function(k){var D=_.find(function(ee){var oe=x.get(ee);if(oe)return oe.slice(0,k).every(function(ve){return ve})});if(D)return I=D,"break"},U=G;U>0;U--){var N=A(U);if(N==="break")break}t.placement!==I&&(t.modifiersData[n]._skip=!0,t.placement=I,t.reset=!0)}}const aae={name:"flip",enabled:!0,phase:"main",fn:oae,requiresIfExists:["offset"],data:{_skip:!1}};function I$(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function k$(e){return[mi,yo,go,vi].some(function(t){return e[t]>=0})}function sae(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=am(t,{elementContext:"reference"}),s=am(t,{altBoundary:!0}),l=I$(a,n),u=I$(s,i,o),c=k$(l),d=k$(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const lae={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sae};function uae(e,t,r){var n=Ta(e),i=[vi,mi].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[vi,yo].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function cae(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=b5.reduce(function(c,d){return c[d]=uae(d,t.rects,o),c},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const dae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cae};function fae(e){var t=e.state,r=e.name;t.modifiersData[r]=E5({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hae={name:"popperOffsets",enabled:!0,phase:"read",fn:fae,data:{}};function pae(e){return e==="x"?"y":"x"}function mae(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,d=r.padding,f=r.tether,h=f===void 0?!0:f,m=r.tetherOffset,v=m===void 0?0:m,w=am(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),p=Ta(t.placement),g=rf(t.placement),b=!g,_=rT(p),P=pae(_),C=t.modifiersData.popperOffsets,x=t.rects.reference,T=t.rects.popper,I=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,M=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,re={x:0,y:0};if(C){if(o){var ie,R=_==="y"?mi:vi,L=_==="y"?go:yo,X=_==="y"?"height":"width",Q=C[_],W=Q+w[R],te=Q-w[L],G=h?-T[X]/2:0,A=g===Zd?x[X]:T[X],U=g===Zd?-T[X]:-x[X],N=t.elements.arrow,E=h&&N?tT(N):{width:0,height:0},k=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_5(),D=k[R],ee=k[L],oe=sp(0,x[X],E[X]),ve=b?x[X]/2-G-oe-D-M.mainAxis:A-oe-D-M.mainAxis,Se=b?-x[X]/2+G+oe+ee+M.mainAxis:U+oe+ee+M.mainAxis,$e=t.elements.arrow&&Zm(t.elements.arrow),ge=$e?_==="y"?$e.clientTop||0:$e.clientLeft||0:0,st=(ie=H==null?void 0:H[_])!=null?ie:0,Vt=Q+ve-st-ge,ce=Q+Se-st,ye=sp(h?m0(W,Vt):W,Q,h?ju(te,ce):te);C[_]=ye,re[_]=ye-Q}if(s){var Xe,kt=_==="x"?mi:vi,zr=_==="x"?go:yo,Zt=C[P],Or=P==="y"?"height":"width",jt=Zt+w[kt],ct=Zt-w[zr],en=[mi,vi].indexOf(p)!==-1,cn=(Xe=H==null?void 0:H[P])!=null?Xe:0,yr=en?jt:Zt-x[Or]-T[Or]-cn+M.altAxis,tn=en?Zt+x[Or]+T[Or]-cn-M.altAxis:ct,An=h&&en?Loe(yr,Zt,tn):sp(h?yr:jt,Zt,h?tn:ct);C[P]=An,re[P]=An-Zt}t.modifiersData[n]=re}}const vae={name:"preventOverflow",enabled:!0,phase:"main",fn:mae,requiresIfExists:["offset"]};function gae(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yae(e){return e===Bi(e)||!ho(e)?nT(e):gae(e)}function bae(e){var t=e.getBoundingClientRect(),r=ef(t.width)/e.offsetWidth||1,n=ef(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wae(e,t,r){r===void 0&&(r=!1);var n=ho(t),i=ho(t)&&bae(t),o=Bl(t),a=tf(e,i,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((ja(t)!=="body"||oT(o))&&(s=yae(t)),ho(t)?(l=tf(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=iT(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Sae(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function _ae(e){var t=Sae(e);return $oe.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function xae(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Pae(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var j$={placement:"bottom",modifiers:[],strategy:"absolute"};function $$(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Cae(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?j$:i;return function(s,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},j$,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:c,setOptions:function(p){var g=typeof p=="function"?p(c.options):p;v(),c.options=Object.assign({},o,c.options,g),c.scrollParents={reference:Hu(s)?lp(s):s.contextElement?lp(s.contextElement):[],popper:lp(l)};var b=_ae(Pae([].concat(n,c.options.modifiers)));return c.orderedModifiers=b.filter(function(_){return _.enabled}),m(),h.update()},forceUpdate:function(){if(!f){var p=c.elements,g=p.reference,b=p.popper;if($$(g,b)){c.rects={reference:wae(g,Zm(b),c.options.strategy==="fixed"),popper:tT(b)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var _=0;_<c.orderedModifiers.length;_++){if(c.reset===!0){c.reset=!1,_=-1;continue}var P=c.orderedModifiers[_],C=P.fn,x=P.options,T=x===void 0?{}:x,I=P.name;typeof C=="function"&&(c=C({state:c,options:T,name:I,instance:h})||c)}}}},update:xae(function(){return new Promise(function(w){h.forceUpdate(),w(c)})}),destroy:function(){v(),f=!0}};if(!$$(s,l))return h;h.setOptions(u).then(function(w){!f&&u.onFirstUpdate&&u.onFirstUpdate(w)});function m(){c.orderedModifiers.forEach(function(w){var p=w.name,g=w.options,b=g===void 0?{}:g,_=w.effect;if(typeof _=="function"){var P=_({state:c,name:p,instance:h,options:b}),C=function(){};d.push(P||C)}})}function v(){d.forEach(function(w){return w()}),d=[]}return h}}var Eae=[Qoe,hae,Koe,Moe,dae,aae,vae,Uoe,lae],Tae=Cae({defaultModifiers:Eae});function aT(e={}){const{enabled:t=!0,modifiers:r,placement:n="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:c="clippingParents",preventOverflow:d=!0,matchWidth:f,direction:h="ltr"}=e,m=S.useRef(null),v=S.useRef(null),w=S.useRef(null),p=Soe(n,h),g=S.useRef(()=>{}),b=S.useCallback(()=>{var M;!t||!m.current||!v.current||((M=g.current)==null||M.call(g),w.current=Tae(m.current,v.current,{placement:p,modifiers:[yoe,moe,poe,{...hoe,enabled:!!f},{name:"eventListeners",...foe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:c}},...r??[]],strategy:i}),w.current.forceUpdate(),g.current=w.current.destroy)},[p,t,r,f,a,o,s,l,u,d,c,i]);S.useEffect(()=>()=>{var M;!m.current&&!v.current&&((M=w.current)==null||M.destroy(),w.current=null)},[]);const _=S.useCallback(M=>{m.current=M,b()},[b]),P=S.useCallback((M={},H=null)=>({...M,ref:vn(_,H)}),[_]),C=S.useCallback(M=>{v.current=M,b()},[b]),x=S.useCallback((M={},H=null)=>({...M,ref:vn(C,H),style:{...M.style,position:i,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}}),[i,C,f]),T=S.useCallback((M={},H=null)=>{const{size:re,shadowColor:ie,bg:R,style:L,...X}=M;return{...X,ref:H,"data-popper-arrow":"",style:Oae(M)}},[]),I=S.useCallback((M={},H=null)=>({...M,ref:H,"data-popper-arrow-inner":""}),[]);return{update(){var M;(M=w.current)==null||M.update()},forceUpdate(){var M;(M=w.current)==null||M.forceUpdate()},transformOrigin:Jr.transformOrigin.varRef,referenceRef:_,popperRef:C,getPopperProps:x,getArrowProps:T,getArrowInnerProps:I,getReferenceProps:P}}function Oae(e){const{size:t,shadowColor:r,bg:n,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),r&&(o["--popper-arrow-shadow-color"]=r),n&&(o["--popper-arrow-bg"]=n),o}function sT(e={}){const{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=Uo(r),a=Uo(t),[s,l]=S.useState(e.defaultIsOpen||!1),u=n!==void 0?n:s,c=n!==void 0,d=S.useId(),f=i??`disclosure-${d}`,h=S.useCallback(()=>{c||l(!1),a==null||a()},[c,a]),m=S.useCallback(()=>{c||l(!0),o==null||o()},[c,o]),v=S.useCallback(()=>{u?h():m()},[u,m,h]);function w(g={}){return{...g,"aria-expanded":u,"aria-controls":f,onClick(b){var _;(_=g.onClick)==null||_.call(g,b),v()}}}function p(g={}){return{...g,hidden:!u,id:f}}return{isOpen:u,onOpen:m,onClose:h,onToggle:v,isControlled:c,getButtonProps:w,getDisclosureProps:p}}function Rae(e){const{ref:t,handler:r,enabled:n=!0}=e,i=Uo(r),a=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;S.useEffect(()=>{if(!n)return;const s=d=>{oS(d,t)&&(a.isPointerDown=!0)},l=d=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&r&&oS(d,t)&&(a.isPointerDown=!1,i(d))},u=d=>{a.ignoreEmulatedMouseEvents=!0,r&&a.isPointerDown&&oS(d,t)&&(a.isPointerDown=!1,i(d))},c=T5(t.current);return c.addEventListener("mousedown",s,!0),c.addEventListener("mouseup",l,!0),c.addEventListener("touchstart",s,!0),c.addEventListener("touchend",u,!0),()=>{c.removeEventListener("mousedown",s,!0),c.removeEventListener("mouseup",l,!0),c.removeEventListener("touchstart",s,!0),c.removeEventListener("touchend",u,!0)}},[r,t,i,a,n])}function oS(e,t){var r;const n=e.target;return n&&!T5(n).contains(n)?!1:!((r=t.current)!=null&&r.contains(n))}function T5(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function O5(e){const{isOpen:t,ref:r}=e,[n,i]=S.useState(t),[o,a]=S.useState(!1);return S.useEffect(()=>{o||(i(t),a(!0))},[t,o,n]),Ad(()=>r.current,"animationend",()=>{i(t)}),{present:!(t?!1:!n),onComplete(){var l;const u=Die(r.current),c=new u.CustomEvent("animationend",{bubbles:!0});(l=r.current)==null||l.dispatchEvent(c)}}}function R5(e){const{wasSelected:t,enabled:r,isSelected:n,mode:i="unmount"}=e;return!!(!r||n||i==="keepMounted"&&t)}var[Iae,kae,jae,$ae]=rie(),[Aae,ev]=Si({strict:!1,name:"MenuContext"});function Dae(e,...t){const r=S.useId(),n=e||r;return S.useMemo(()=>t.map(i=>`${i}-${n}`),[n,t])}function I5(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function A$(e){return I5(e).activeElement===e}function Mae(e={}){const{id:t,closeOnSelect:r=!0,closeOnBlur:n=!0,initialFocusRef:i,autoSelect:o=!0,isLazy:a,isOpen:s,defaultIsOpen:l,onClose:u,onOpen:c,placement:d="bottom-start",lazyBehavior:f="unmount",direction:h,computePositionOnMount:m=!1,...v}=e,w=S.useRef(null),p=S.useRef(null),g=jae(),b=S.useCallback(()=>{requestAnimationFrame(()=>{var N;(N=w.current)==null||N.focus({preventScroll:!1})})},[]),_=S.useCallback(()=>{const N=setTimeout(()=>{var E;if(i)(E=i.current)==null||E.focus();else{const k=g.firstEnabled();k&&ie(k.index)}});W.current.add(N)},[g,i]),P=S.useCallback(()=>{const N=setTimeout(()=>{const E=g.lastEnabled();E&&ie(E.index)});W.current.add(N)},[g]),C=S.useCallback(()=>{c==null||c(),o?_():b()},[o,_,b,c]),{isOpen:x,onOpen:T,onClose:I,onToggle:M}=sT({isOpen:s,defaultIsOpen:l,onClose:u,onOpen:C});Rae({enabled:x&&n,ref:w,handler:N=>{var E;(E=p.current)!=null&&E.contains(N.target)||I()}});const H=aT({...v,enabled:x||m,placement:d,direction:h}),[re,ie]=S.useState(-1);Uu(()=>{x||ie(-1)},[x]),g5(w,{focusRef:p,visible:x,shouldFocus:!0});const R=O5({isOpen:x,ref:w}),[L,X]=Dae(t,"menu-button","menu-list"),Q=S.useCallback(()=>{T(),b()},[T,b]),W=S.useRef(new Set([]));S.useEffect(()=>{const N=W.current;return()=>{N.forEach(E=>clearTimeout(E)),N.clear()}},[]);const te=S.useCallback(()=>{T(),_()},[_,T]),G=S.useCallback(()=>{T(),P()},[T,P]),A=S.useCallback(()=>{var N,E;const k=I5(w.current),D=(N=w.current)==null?void 0:N.contains(k.activeElement);if(!(x&&!D))return;const oe=(E=g.item(re))==null?void 0:E.node;oe==null||oe.focus({preventScroll:!0})},[x,re,g]),U=S.useRef(null);return{openAndFocusMenu:Q,openAndFocusFirstItem:te,openAndFocusLastItem:G,onTransitionEnd:A,unstable__animationState:R,descendants:g,popper:H,buttonId:L,menuId:X,forceUpdate:H.forceUpdate,orientation:"vertical",isOpen:x,onToggle:M,onOpen:T,onClose:I,menuRef:w,buttonRef:p,focusedIndex:re,closeOnSelect:r,closeOnBlur:n,autoSelect:o,setFocusedIndex:ie,isLazy:a,lazyBehavior:f,initialFocusRef:i,rafId:U}}function Nae(e={},t=null){const r=ev(),{onToggle:n,popper:i,openAndFocusFirstItem:o,openAndFocusLastItem:a}=r,s=S.useCallback(l=>{const u=l.key,d={Enter:o,ArrowDown:o,ArrowUp:a}[u];d&&(l.preventDefault(),l.stopPropagation(),d(l))},[o,a]);return{...e,ref:vn(r.buttonRef,t,i.referenceRef),id:r.buttonId,"data-active":wt(r.isOpen),"aria-expanded":r.isOpen,"aria-haspopup":"menu","aria-controls":r.menuId,onClick:Ft(e.onClick,n),onKeyDown:Ft(e.onKeyDown,s)}}function zx(e){var t;return Uae(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function Fae(e={},t=null){const r=ev();if(!r)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>");const{focusedIndex:n,setFocusedIndex:i,menuRef:o,isOpen:a,onClose:s,menuId:l,isLazy:u,lazyBehavior:c,unstable__animationState:d}=r,f=kae(),h=toe({preventDefault:p=>p.key!==" "&&zx(p.target)}),m=S.useCallback(p=>{if(!p.currentTarget.contains(p.target))return;const g=p.key,_={Tab:C=>C.preventDefault(),Escape:s,ArrowDown:()=>{const C=f.nextEnabled(n);C&&i(C.index)},ArrowUp:()=>{const C=f.prevEnabled(n);C&&i(C.index)}}[g];if(_){p.preventDefault(),_(p);return}const P=h(C=>{const x=roe(f.values(),C,T=>{var I,M;return(M=(I=T==null?void 0:T.node)==null?void 0:I.textContent)!=null?M:""},f.item(n));if(x){const T=f.indexOf(x.node);i(T)}});zx(p.target)&&P(p)},[f,n,h,s,i]),v=S.useRef(!1);a&&(v.current=!0);const w=R5({wasSelected:v.current,enabled:u,mode:c,isSelected:d.present});return{...e,ref:vn(o,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:l,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Ft(e.onKeyDown,m)}}function Lae(e={}){const{popper:t,isOpen:r}=ev();return t.getPopperProps({...e,style:{visibility:r?"visible":"hidden",...e.style}})}function Bae(e={},t=null){const{onMouseEnter:r,onMouseMove:n,onMouseLeave:i,onClick:o,onFocus:a,isDisabled:s,isFocusable:l,closeOnSelect:u,type:c,...d}=e,f=ev(),{setFocusedIndex:h,focusedIndex:m,closeOnSelect:v,onClose:w,menuRef:p,isOpen:g,menuId:b,rafId:_}=f,P=S.useRef(null),C=`${b}-menuitem-${S.useId()}`,{index:x,register:T}=$ae({disabled:s&&!l}),I=S.useCallback(Q=>{r==null||r(Q),!s&&h(x)},[h,x,s,r]),M=S.useCallback(Q=>{n==null||n(Q),P.current&&!A$(P.current)&&I(Q)},[I,n]),H=S.useCallback(Q=>{i==null||i(Q),!s&&h(-1)},[h,s,i]),re=S.useCallback(Q=>{o==null||o(Q),zx(Q.currentTarget)&&(u??v)&&w()},[w,o,v,u]),ie=S.useCallback(Q=>{a==null||a(Q),h(x)},[h,a,x]),R=x===m,L=s&&!l;Uu(()=>{if(g)return R&&!L&&P.current?(_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{var Q;(Q=P.current)==null||Q.focus({preventScroll:!0}),_.current=null})):p.current&&!A$(p.current)&&p.current.focus({preventScroll:!0}),()=>{_.current&&cancelAnimationFrame(_.current)}},[R,L,p,g]);const X=ioe({onClick:re,onFocus:ie,onMouseEnter:I,onMouseMove:M,onMouseLeave:H,ref:vn(T,P,t),isDisabled:s,isFocusable:l});return{...d,...X,type:c??X.type,id:C,role:"menuitem",tabIndex:R?0:-1}}function Vae(e={},t=null){const{type:r="radio",isChecked:n,...i}=e;return{...Bae(i,t),role:`menuitem${r}`,"aria-checked":n}}function zae(e={}){const{children:t,type:r="radio",value:n,defaultValue:i,onChange:o,...a}=e,l=r==="radio"?"":[],[u,c]=nie({defaultValue:i??l,value:n,onChange:o}),d=S.useCallback(m=>{if(r==="radio"&&typeof u=="string"&&c(m),r==="checkbox"&&Array.isArray(u)){const v=u.includes(m)?u.filter(w=>w!==m):u.concat(m);c(v)}},[u,c,r]),h=Hb(t).map(m=>{if(m.type.id!=="MenuItemOption")return m;const v=p=>{var g,b;d(m.props.value),(b=(g=m.props).onClick)==null||b.call(g,p)},w=r==="radio"?m.props.value===u:u.includes(m.props.value);return S.cloneElement(m,{type:r,onClick:v,isChecked:w})});return{...a,children:h}}function Uae(e){var t;if(!qae(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function qae(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[Hae,tv]=Si({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Menu />" `}),k5=e=>{const{children:t}=e,r=ac("Menu",e),n=qn(e),{direction:i}=kb(),{descendants:o,...a}=Mae({...n,direction:i}),s=S.useMemo(()=>a,[a]),{isOpen:l,onClose:u,forceUpdate:c}=s;return y.jsx(Iae,{value:o,children:y.jsx(Aae,{value:s,children:y.jsx(Hae,{value:r,children:lo(t,{isOpen:l,onClose:u,forceUpdate:c})})})})};k5.displayName="Menu";var Wae=gt((e,t)=>{const{type:r,...n}=e,i=tv(),o=n.as||r?r??void 0:"button",a=S.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...i.item}),[i.item]);return y.jsx(Me.button,{ref:t,type:o,...n,__css:a})}),j5=e=>{const{className:t,children:r,...n}=e,i=tv(),o=S.Children.only(r),a=S.isValidElement(o)?S.cloneElement(o,{focusable:"false","aria-hidden":!0,className:It("chakra-menu__icon",o.props.className)}):null,s=It("chakra-menu__icon-wrapper",t);return y.jsx(Me.span,{className:s,...n,__css:i.icon,children:a})};j5.displayName="MenuIcon";var Kae={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Gae=Me(qb.div),$5=gt(function(t,r){var n,i;const{rootProps:o,motionProps:a,...s}=t,{isOpen:l,onTransitionEnd:u,unstable__animationState:c}=ev(),d=Fae(s,r),f=Lae(o),h=tv();return y.jsx(Me.div,{...f,__css:{zIndex:(i=t.zIndex)!=null?i:(n=h.list)==null?void 0:n.zIndex},children:y.jsx(Gae,{variants:Kae,initial:!1,animate:l?"enter":"exit",__css:{outline:0,...h.list},...a,className:It("chakra-menu__menu-list",d.className),...d,onUpdate:u,onAnimationComplete:q4(c.onComplete,d.onAnimationComplete)})})});$5.displayName="MenuList";var A5=gt((e,t)=>{const{title:r,children:n,className:i,...o}=e,a=It("chakra-menu__group__title",i),s=tv();return y.jsxs("div",{ref:t,className:"chakra-menu__group",role:"group",children:[r&&y.jsx(Me.p,{className:a,...o,__css:s.groupTitle,children:r}),n]})});A5.displayName="MenuGroup";var D5=e=>{const{className:t,title:r,...n}=e,i=zae(n);return y.jsx(A5,{title:r,className:It("chakra-menu__option-group",t),...i})};D5.displayName="MenuOptionGroup";var Qae=gt((e,t)=>{const r=tv();return y.jsx(Me.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...r.button}})}),lT=gt((e,t)=>{const{children:r,as:n,...i}=e,o=Nae(i,t),a=n||Qae;return y.jsx(a,{...o,className:It("chakra-menu__menu-button",e.className),children:y.jsx(Me.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});lT.displayName="MenuButton";var Yae=e=>y.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e,children:y.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),uT=gt((e,t)=>{const{icon:r,iconSpacing:n="0.75rem",...i}=e,o=Vae(i,t);return y.jsxs(Wae,{...o,className:It("chakra-menu__menuitem-option",i.className),children:[r!==null&&y.jsx(j5,{fontSize:"0.8em",marginEnd:n,opacity:e.isChecked?1:0,children:r||y.jsx(Yae,{})}),y.jsx("span",{style:{flex:1},children:o.children})]})});uT.id="MenuItemOption";uT.displayName="MenuItemOption";var[Xae,rv]=Si({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[Jae,Gb]=Si({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `});function cT(e){const t=S.Children.only(e.children),{getTriggerProps:r}=rv();return S.cloneElement(t,r(t.props,t.ref))}cT.displayName="PopoverTrigger";var Ic={click:"click",hover:"hover"};function Zae(e={}){const{closeOnBlur:t=!0,closeOnEsc:r=!0,initialFocusRef:n,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=Ic.click,openDelay:c=200,closeDelay:d=200,isLazy:f,lazyBehavior:h="unmount",computePositionOnMount:m,...v}=e,{isOpen:w,onClose:p,onOpen:g,onToggle:b}=sT(e),_=S.useRef(null),P=S.useRef(null),C=S.useRef(null),x=S.useRef(!1),T=S.useRef(!1);w&&(T.current=!0);const[I,M]=S.useState(!1),[H,re]=S.useState(!1),ie=S.useId(),R=i??ie,[L,X,Q,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(ce=>`${ce}-${R}`),{referenceRef:te,getArrowProps:G,getPopperProps:A,getArrowInnerProps:U,forceUpdate:N}=aT({...v,enabled:w||!!m}),E=O5({isOpen:w,ref:C});jie({enabled:w,ref:P}),g5(C,{focusRef:P,visible:w,shouldFocus:o&&u===Ic.click}),soe(C,{focusRef:n,visible:w,shouldFocus:a&&u===Ic.click});const k=R5({wasSelected:T.current,enabled:f,mode:h,isSelected:E.present}),D=S.useCallback((ce={},ye=null)=>{const Xe={...ce,style:{...ce.style,transformOrigin:Jr.transformOrigin.varRef,[Jr.arrowSize.var]:s?`${s}px`:void 0,[Jr.arrowShadowColor.var]:l},ref:vn(C,ye),children:k?ce.children:null,id:X,tabIndex:-1,role:"dialog",onKeyDown:Ft(ce.onKeyDown,kt=>{r&&kt.key==="Escape"&&p()}),onBlur:Ft(ce.onBlur,kt=>{const zr=D$(kt),Zt=aS(C.current,zr),Or=aS(P.current,zr);w&&t&&(!Zt&&!Or)&&p()}),"aria-labelledby":I?Q:void 0,"aria-describedby":H?W:void 0};return u===Ic.hover&&(Xe.role="tooltip",Xe.onMouseEnter=Ft(ce.onMouseEnter,()=>{x.current=!0}),Xe.onMouseLeave=Ft(ce.onMouseLeave,kt=>{kt.nativeEvent.relatedTarget!==null&&(x.current=!1,setTimeout(()=>p(),d))})),Xe},[k,X,I,Q,H,W,u,r,p,w,t,d,l,s]),ee=S.useCallback((ce={},ye=null)=>A({...ce,style:{visibility:w?"visible":"hidden",...ce.style}},ye),[w,A]),oe=S.useCallback((ce,ye=null)=>({...ce,ref:vn(ye,_,te)}),[_,te]),ve=S.useRef(),Se=S.useRef(),$e=S.useCallback(ce=>{_.current==null&&te(ce)},[te]),ge=S.useCallback((ce={},ye=null)=>{const Xe={...ce,ref:vn(P,ye,$e),id:L,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":X};return u===Ic.click&&(Xe.onClick=Ft(ce.onClick,b)),u===Ic.hover&&(Xe.onFocus=Ft(ce.onFocus,()=>{ve.current===void 0&&g()}),Xe.onBlur=Ft(ce.onBlur,kt=>{const zr=D$(kt),Zt=!aS(C.current,zr);w&&t&&Zt&&p()}),Xe.onKeyDown=Ft(ce.onKeyDown,kt=>{kt.key==="Escape"&&p()}),Xe.onMouseEnter=Ft(ce.onMouseEnter,()=>{x.current=!0,ve.current=window.setTimeout(()=>g(),c)}),Xe.onMouseLeave=Ft(ce.onMouseLeave,()=>{x.current=!1,ve.current&&(clearTimeout(ve.current),ve.current=void 0),Se.current=window.setTimeout(()=>{x.current===!1&&p()},d)})),Xe},[L,w,X,u,$e,b,g,t,p,c,d]);S.useEffect(()=>()=>{ve.current&&clearTimeout(ve.current),Se.current&&clearTimeout(Se.current)},[]);const st=S.useCallback((ce={},ye=null)=>({...ce,id:Q,ref:vn(ye,Xe=>{M(!!Xe)})}),[Q]),Vt=S.useCallback((ce={},ye=null)=>({...ce,id:W,ref:vn(ye,Xe=>{re(!!Xe)})}),[W]);return{forceUpdate:N,isOpen:w,onAnimationComplete:E.onComplete,onClose:p,getAnchorProps:oe,getArrowProps:G,getArrowInnerProps:U,getPopoverPositionerProps:ee,getPopoverProps:D,getTriggerProps:ge,getHeaderProps:st,getBodyProps:Vt}}function aS(e,t){return e===t||(e==null?void 0:e.contains(t))}function D$(e){var t;const r=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:r}function dT(e){const t=ac("Popover",e),{children:r,...n}=qn(e),i=kb(),o=Zae({...n,direction:i.direction});return y.jsx(Xae,{value:o,children:y.jsx(Jae,{value:t,children:lo(r,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}dT.displayName="Popover";var sS=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function M5(e){var t;const{bg:r,bgColor:n,backgroundColor:i,shadow:o,boxShadow:a,shadowColor:s}=e,{getArrowProps:l,getArrowInnerProps:u}=rv(),c=Gb(),d=(t=r??n)!=null?t:i,f=o??a;return y.jsx(Me.div,{...l(),className:"chakra-popover__arrow-positioner",children:y.jsx(Me.div,{className:It("chakra-popover__arrow",e.className),...u(e),__css:{"--popper-arrow-shadow-color":sS("colors",s),"--popper-arrow-bg":sS("colors",d),"--popper-arrow-shadow":sS("shadows",f),...c.arrow}})})}M5.displayName="PopoverArrow";var fT=gt(function(t,r){const{getBodyProps:n}=rv(),i=Gb();return y.jsx(Me.div,{...n(t,r),className:It("chakra-popover__body",t.className),__css:i.body})});fT.displayName="PopoverBody";function ese(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var tse={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},rse=Me(qb.section),N5=gt(function(t,r){const{variants:n=tse,...i}=t,{isOpen:o}=rv();return y.jsx(rse,{ref:r,variants:ese(n),initial:!1,animate:o?"enter":"exit",...i})});N5.displayName="PopoverTransition";var hT=gt(function(t,r){const{rootProps:n,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=rv(),u=Gb(),c={position:"relative",display:"flex",flexDirection:"column",...u.content};return y.jsx(Me.div,{...s(n),__css:u.popper,className:"chakra-popover__popper",children:y.jsx(N5,{...i,...a(o,r),onAnimationComplete:q4(l,o.onAnimationComplete),className:It("chakra-popover__content",t.className),__css:c})})});hT.displayName="PopoverContent";function F5(e){const t=Gb();return y.jsx(Me.footer,{...e,className:It("chakra-popover__footer",e.className),__css:t.footer})}F5.displayName="PopoverFooter";var L5=gt(function(t,r){const n=ac("Switch",t),{spacing:i="0.5rem",children:o,...a}=qn(t),{getIndicatorProps:s,getInputProps:l,getCheckboxProps:u,getRootProps:c,getLabelProps:d}=Pie(a),f=S.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...n.container}),[n.container]),h=S.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...n.track}),[n.track]),m=S.useMemo(()=>({userSelect:"none",marginStart:i,...n.label}),[i,n.label]);return y.jsxs(Me.label,{...c(),className:It("chakra-switch",t.className),__css:f,children:[y.jsx("input",{className:"chakra-switch__input",...l({},r)}),y.jsx(Me.span,{...u(),className:"chakra-switch__track",__css:h,children:y.jsx(Me.span,{__css:n.thumb,className:"chakra-switch__thumb",...s()})}),o&&y.jsx(Me.span,{className:"chakra-switch__label",...d(),__css:m,children:o})]})});L5.displayName="Switch";function nse(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}var ise=["h","minH","height","minHeight"],B5=gt((e,t)=>{const r=Ma("Textarea",e),{className:n,rows:i,...o}=qn(e),a=r5(o),s=i?nse(r,ise):r;return y.jsx(Me.textarea,{ref:t,rows:i,...a,className:It("chakra-textarea",n),__css:s})});B5.displayName="Textarea";var ose={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Ux=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},ly=e=>{var t,r;return((r=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:r.defaultView)||window};function ase(e={}){const{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:c,id:d,isOpen:f,defaultIsOpen:h,arrowSize:m=10,arrowShadowColor:v,arrowPadding:w,modifiers:p,isDisabled:g,gutter:b,offset:_,direction:P,...C}=e,{isOpen:x,onOpen:T,onClose:I}=sT({isOpen:f,defaultIsOpen:h,onOpen:l,onClose:u}),{referenceRef:M,getPopperProps:H,getArrowInnerProps:re,getArrowProps:ie}=aT({enabled:x,placement:c,arrowPadding:w,modifiers:p,gutter:b,offset:_,direction:P}),R=S.useId(),X=`tooltip-${d??R}`,Q=S.useRef(null),W=S.useRef(),te=S.useCallback(()=>{W.current&&(clearTimeout(W.current),W.current=void 0)},[]),G=S.useRef(),A=S.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),U=S.useCallback(()=>{A(),I()},[I,A]),N=sse(Q,U),E=S.useCallback(()=>{if(!g&&!W.current){x&&N();const ge=ly(Q);W.current=ge.setTimeout(T,t)}},[N,g,x,T,t]),k=S.useCallback(()=>{te();const ge=ly(Q);G.current=ge.setTimeout(U,r)},[r,U,te]),D=S.useCallback(()=>{x&&n&&k()},[n,k,x]),ee=S.useCallback(()=>{x&&a&&k()},[a,k,x]),oe=S.useCallback(ge=>{x&&ge.key==="Escape"&&k()},[x,k]);Ad(()=>Ux(Q),"keydown",s?oe:void 0),Ad(()=>{if(!o)return null;const ge=Q.current;if(!ge)return null;const st=l5(ge);return st.localName==="body"?ly(Q):st},"scroll",()=>{x&&o&&U()},{passive:!0,capture:!0}),S.useEffect(()=>{g&&(te(),x&&I())},[g,x,I,te]),S.useEffect(()=>()=>{te(),A()},[te,A]),Ad(()=>Q.current,"pointerleave",k);const ve=S.useCallback((ge={},st=null)=>({...ge,ref:vn(Q,st,M),onPointerEnter:Ft(ge.onPointerEnter,ce=>{ce.pointerType!=="touch"&&E()}),onClick:Ft(ge.onClick,D),onPointerDown:Ft(ge.onPointerDown,ee),onFocus:Ft(ge.onFocus,E),onBlur:Ft(ge.onBlur,k),"aria-describedby":x?X:void 0}),[E,k,ee,x,X,D,M]),Se=S.useCallback((ge={},st=null)=>H({...ge,style:{...ge.style,[Jr.arrowSize.var]:m?`${m}px`:void 0,[Jr.arrowShadowColor.var]:v}},st),[H,m,v]),$e=S.useCallback((ge={},st=null)=>{const Vt={...ge.style,position:"relative",transformOrigin:Jr.transformOrigin.varRef};return{ref:st,...C,...ge,id:X,role:"tooltip",style:Vt}},[C,X]);return{isOpen:x,show:E,hide:k,getTriggerProps:ve,getTooltipProps:$e,getTooltipPositionerProps:Se,getArrowProps:ie,getArrowInnerProps:re}}var lS="chakra-ui:close-tooltip";function sse(e,t){return S.useEffect(()=>{const r=Ux(e);return r.addEventListener(lS,t),()=>r.removeEventListener(lS,t)},[t,e]),()=>{const r=Ux(e),n=ly(e);r.dispatchEvent(new n.CustomEvent(lS))}}function lse(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function use(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}var cse=Me(qb.div),V5=gt((e,t)=>{var r,n;const i=Ma("Tooltip",e),o=qn(e),a=kb(),{children:s,label:l,shouldWrapChildren:u,"aria-label":c,hasArrow:d,bg:f,portalProps:h,background:m,backgroundColor:v,bgColor:w,motionProps:p,...g}=o,b=(n=(r=m??v)!=null?r:f)!=null?n:w;if(b){i.bg=b;const H=cW(a,"colors",b);i[Jr.arrowBg.var]=H}const _=ase({...g,direction:a.direction}),P=typeof s=="string"||u;let C;if(P)C=y.jsx(Me.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps(),children:s});else{const H=S.Children.only(s);C=S.cloneElement(H,_.getTriggerProps(H.props,H.ref))}const x=!!c,T=_.getTooltipProps({},t),I=x?lse(T,["role","id"]):T,M=use(T,["role","id"]);return l?y.jsxs(y.Fragment,{children:[C,y.jsx(zL,{children:_.isOpen&&y.jsx(Ef,{...h,children:y.jsx(Me.div,{..._.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:y.jsxs(cse,{variants:ose,initial:"exit",animate:"enter",exit:"exit",...p,...I,__css:i,children:[l,x&&y.jsx(Me.span,{srOnly:!0,...M,children:c}),d&&y.jsx(Me.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:y.jsx(Me.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):y.jsx(y.Fragment,{children:s})});V5.displayName="Tooltip";function ft(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var dse={};function pT(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:dse}var z5=Object.assign,v0=Object.getOwnPropertyDescriptor,Oa=Object.defineProperty,nv=Object.prototype,qx=[];Object.freeze(qx);var mT={};Object.freeze(mT);var fse=typeof Proxy<"u",hse=Object.toString();function U5(){fse||ft("Proxy not available")}function q5(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var hd=function(){};function Vi(e){return typeof e=="function"}function Wu(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function Qb(e){return e!==null&&typeof e=="object"}function ms(e){if(!Qb(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===hse}function H5(e){var t=e==null?void 0:e.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function iv(e,t,r){Oa(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function W5(e,t,r){Oa(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Vl(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return Qb(n)&&n[r]===!0}}function Rf(e){return e instanceof Map}function ov(e){return e instanceof Set}var K5=typeof Object.getOwnPropertySymbols<"u";function pse(e){var t=Object.keys(e);if(!K5)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return nv.propertyIsEnumerable.call(e,n)})):t}var nf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:K5?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function G5(e){return e===null?null:typeof e=="object"?""+e:e}function Za(e,t){return nv.hasOwnProperty.call(e,t)}var mse=Object.getOwnPropertyDescriptors||function(t){var r={};return nf(t).forEach(function(n){r[n]=v0(t,n)}),r};function vse(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bse(n.key),n)}}function vT(e,t,r){return t&&vse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},El.apply(this,arguments)}function Q5(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hx(e,t)}function Hx(e,t){return Hx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hx(e,t)}function uS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gse(e,t){if(e){if(typeof e=="string")return M$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M$(e,t)}}function M$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pd(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=gse(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
349
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yse(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function bse(e){var t=yse(e,"string");return typeof t=="symbol"?t:String(t)}var ba=Symbol("mobx-stored-annotations");function Ra(e){function t(r,n){if(av(n))return e.decorate_20223_(r,n);If(r,n,e)}return Object.assign(t,e)}function If(e,t,r){Za(e,ba)||iv(e,ba,El({},e[ba])),Ose(r)||(e[ba][t]=r)}function wse(e){return Za(e,ba)||iv(e,ba,El({},e[ba])),e[ba]}function av(e){return typeof e=="object"&&typeof e.kind=="string"}var Ve=Symbol("mobx administration"),sv=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=$t.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return mB(this)},t.reportChanged=function(){ui(),vB(this),ci()},t.toString=function(){return this.name_},e}(),gT=Vl("Atom",sv);function g0(e,t,r){t===void 0&&(t=hd),r===void 0&&(r=hd);var n=new sv(e);return t!==hd&&Ile(n,t),r!==hd&&PB(n,r),n}function Sse(e,t){return e===t}function _se(e,t){return CT(e,t)}function xse(e,t){return CT(e,t,1)}function Pse(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var of={identity:Sse,structural:_se,default:Pse,shallow:xse};function Ku(e,t,r){return _T(e)?e:Array.isArray(e)?xt.array(e,{name:r}):ms(e)?xt.object(e,void 0,{name:r}):Rf(e)?xt.map(e,{name:r}):ov(e)?xt.set(e,{name:r}):typeof e=="function"&&!ew(e)&&!cm(e)?H5(e)?sf(e):lm(r,e):e}function Cse(e,t,r){if(e==null||xi(e)||So(e)||_i(e)||bo(e))return e;if(Array.isArray(e))return xt.array(e,{name:r,deep:!1});if(ms(e))return xt.object(e,void 0,{name:r,deep:!1});if(Rf(e))return xt.map(e,{name:r,deep:!1});if(ov(e))return xt.set(e,{name:r,deep:!1})}function Yb(e){return e}function Ese(e,t){return CT(e,t)?t:e}var Tse="override";function Ose(e){return e.annotationType_===Tse}function lv(e,t){return{annotationType_:e,options_:t,make_:Rse,extend_:Ise,decorate_20223_:kse}}function Rse(e,t,r,n){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,r,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if(ew(r.value))return 1;var o=Y5(e,this,t,r,!1);return Oa(n,t,o),2}function Ise(e,t,r,n){var i=Y5(e,this,t,r);return e.defineProperty_(t,i,n)}function kse(e,t){var r=t.kind,n=t.name,i=t.addInitializer,o=this,a=function(u){var c,d,f,h;return Tl((c=(d=o.options_)==null?void 0:d.name)!=null?c:n.toString(),u,(f=(h=o.options_)==null?void 0:h.autoAction)!=null?f:!1)};if(r=="field"){i(function(){If(this,n,o)});return}if(r=="method"){var s;return ew(e)||(e=a(e)),(s=this.options_)!=null&&s.bound&&i(function(){var l=this,u=l[n].bind(l);u.isMobxAction=!0,l[n]=u}),e}ft("Cannot apply '"+o.annotationType_+"' to '"+String(n)+"' (kind: "+r+"):"+(`
350
- '`+o.annotationType_+"' can only be used on properties with a function value."))}function jse(e,t,r,n){t.annotationType_,n.value}function Y5(e,t,r,n,i){var o,a,s,l,u,c,d;i===void 0&&(i=be.safeDescriptors),jse(e,t,r,n);var f=n.value;if((o=t.options_)!=null&&o.bound){var h;f=f.bind((h=e.proxy_)!=null?h:e.target_)}return{value:Tl((a=(s=t.options_)==null?void 0:s.name)!=null?a:r.toString(),f,(l=(u=t.options_)==null?void 0:u.autoAction)!=null?l:!1,(c=t.options_)!=null&&c.bound?(d=e.proxy_)!=null?d:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function X5(e,t){return{annotationType_:e,options_:t,make_:$se,extend_:Ase,decorate_20223_:Dse}}function $se(e,t,r,n){var i;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!Za(e.target_,t)||!cm(e.target_[t]))&&this.extend_(e,t,r,!1)===null)return 0;if(cm(r.value))return 1;var o=J5(e,this,t,r,!1,!1);return Oa(n,t,o),2}function Ase(e,t,r,n){var i,o=J5(e,this,t,r,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,o,n)}function Dse(e,t){var r,n=t.name,i=t.addInitializer;return cm(e)||(e=sf(e)),(r=this.options_)!=null&&r.bound&&i(function(){var o=this,a=o[n].bind(o);a.isMobXFlow=!0,o[n]=a}),e}function Mse(e,t,r,n){t.annotationType_,n.value}function J5(e,t,r,n,i,o){o===void 0&&(o=be.safeDescriptors),Mse(e,t,r,n);var a=n.value;if(cm(a)||(a=sf(a)),i){var s;a=a.bind((s=e.proxy_)!=null?s:e.target_),a.isMobXFlow=!0}return{value:a,configurable:o?e.isPlainObject_:!0,enumerable:!1,writable:!o}}function yT(e,t){return{annotationType_:e,options_:t,make_:Nse,extend_:Fse,decorate_20223_:Lse}}function Nse(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Fse(e,t,r,n){return Bse(e,this,t,r),e.defineComputedProperty_(t,El({},this.options_,{get:r.get,set:r.set}),n)}function Lse(e,t){var r=this,n=t.name,i=t.addInitializer;return i(function(){var o=dc(this)[Ve],a=El({},r.options_,{get:e,context:this});a.name||(a.name="ObservableObject."+n.toString()),o.values_.set(n,new af(a))}),function(){return this[Ve].getObservablePropValue_(n)}}function Bse(e,t,r,n){t.annotationType_,n.get}function Xb(e,t){return{annotationType_:e,options_:t,make_:Vse,extend_:zse,decorate_20223_:Use}}function Vse(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function zse(e,t,r,n){var i,o;return qse(e,this),e.defineObservableProperty_(t,r.value,(i=(o=this.options_)==null?void 0:o.enhancer)!=null?i:Ku,n)}function Use(e,t){var r=this,n=t.kind,i=t.name,o=new WeakSet;function a(s,l){var u,c,d=dc(s)[Ve],f=new ml(l,(u=(c=r.options_)==null?void 0:c.enhancer)!=null?u:Ku,"ObservableObject."+i.toString(),!1);d.values_.set(i,f),o.add(s)}if(n=="accessor")return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[Ve].getObservablePropValue_(i)},set:function(l){return o.has(this)||a(this,l),this[Ve].setObservablePropValue_(i,l)},init:function(l){return o.has(this)||a(this,l),l}}}function qse(e,t,r,n){t.annotationType_}var Hse="true",Wse=Z5();function Z5(e){return{annotationType_:Hse,options_:e,make_:Kse,extend_:Gse,decorate_20223_:Qse}}function Kse(e,t,r,n){var i,o;if(r.get)return Mr.make_(e,t,r,n);if(r.set){var a=Tl(t.toString(),r.set);return n===e.target_?e.defineProperty_(t,{configurable:be.safeDescriptors?e.isPlainObject_:!0,set:a})===null?0:2:(Oa(n,t,{configurable:!0,set:a}),2)}if(n!==e.target_&&typeof r.value=="function"){var s;if(H5(r.value)){var l,u=(l=this.options_)!=null&&l.autoBind?sf.bound:sf;return u.make_(e,t,r,n)}var c=(s=this.options_)!=null&&s.autoBind?lm.bound:lm;return c.make_(e,t,r,n)}var d=((i=this.options_)==null?void 0:i.deep)===!1?xt.ref:xt;if(typeof r.value=="function"&&(o=this.options_)!=null&&o.autoBind){var f;r.value=r.value.bind((f=e.proxy_)!=null?f:e.target_)}return d.make_(e,t,r,n)}function Gse(e,t,r,n){var i,o;if(r.get)return Mr.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:be.safeDescriptors?e.isPlainObject_:!0,set:Tl(t.toString(),r.set)},n);if(typeof r.value=="function"&&(i=this.options_)!=null&&i.autoBind){var a;r.value=r.value.bind((a=e.proxy_)!=null?a:e.target_)}var s=((o=this.options_)==null?void 0:o.deep)===!1?xt.ref:xt;return s.extend_(e,t,r,n)}function Qse(e,t){ft("'"+this.annotationType_+"' cannot be used as a decorator")}var Yse="observable",Xse="observable.ref",Jse="observable.shallow",Zse="observable.struct",eB={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(eB);function pg(e){return e||eB}var Wx=Xb(Yse),ele=Xb(Xse,{enhancer:Yb}),tle=Xb(Jse,{enhancer:Cse}),rle=Xb(Zse,{enhancer:Ese}),tB=Ra(Wx);function mg(e){return e.deep===!0?Ku:e.deep===!1?Yb:ile(e.defaultDecorator)}function nle(e){var t;return e?(t=e.defaultDecorator)!=null?t:Z5(e):void 0}function ile(e){var t,r;return e&&(t=(r=e.options_)==null?void 0:r.enhancer)!=null?t:Ku}function rB(e,t,r){if(av(t))return Wx.decorate_20223_(e,t);if(Wu(t)){If(e,t,Wx);return}return _T(e)?e:ms(e)?xt.object(e,t,r):Array.isArray(e)?xt.array(e,t):Rf(e)?xt.map(e,t):ov(e)?xt.set(e,t):typeof e=="object"&&e!==null?e:xt.box(e,t)}z5(rB,tB);var ole={box:function(t,r){var n=pg(r);return new ml(t,mg(n),n.name,!0,n.equals)},array:function(t,r){var n=pg(r);return(be.useProxies===!1||n.proxy===!1?sue:Xle)(t,mg(n),n.name)},map:function(t,r){var n=pg(r);return new nw(t,mg(n),n.name)},set:function(t,r){var n=pg(r);return new LB(t,mg(n),n.name)},object:function(t,r,n){return zl(function(){return wT(be.useProxies===!1||(n==null?void 0:n.proxy)===!1?dc({},n):Gle({},n),t,r)})},ref:Ra(ele),shallow:Ra(tle),deep:tB,struct:Ra(rle)},xt=z5(rB,ole),nB="computed",ale="computed.struct",Kx=yT(nB),sle=yT(ale,{equals:of.structural}),Mr=function(t,r){if(av(r))return Kx.decorate_20223_(t,r);if(Wu(r))return If(t,r,Kx);if(ms(t))return Ra(yT(nB,t));var n=ms(r)?r:{};return n.get=t,n.name||(n.name=t.name||""),new af(n)};Object.assign(Mr,Kx);Mr.struct=Ra(sle);var N$,F$,y0=0,lle=1,ule=(N$=(F$=v0(function(){},"name"))==null?void 0:F$.configurable)!=null?N$:!1,L$={value:"action",configurable:!0,writable:!1,enumerable:!1};function Tl(e,t,r,n){r===void 0&&(r=!1);function i(){return iB(e,r,t,n||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},ule&&(L$.value=e,Oa(i,"name",L$)),i}function iB(e,t,r,n,i){var o=cle(e,t);try{return r.apply(n,i)}catch(a){throw o.error_=a,a}finally{dle(o)}}function cle(e,t,r,n){var i=!1,o=0,a=be.trackingDerivation,s=!t||!a;ui();var l=be.allowStateChanges;s&&(cc(),l=Jb(!0));var u=bT(!0),c={runAsAction_:s,prevDerivation_:a,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:i,startTime_:o,actionId_:lle++,parentActionId_:y0};return y0=c.actionId_,c}function dle(e){y0!==e.actionId_&&ft(30),y0=e.parentActionId_,e.error_!==void 0&&(be.suppressReactionErrors=!0),Zb(e.prevAllowStateChanges_),up(e.prevAllowStateReads_),ci(),e.runAsAction_&&es(e.prevDerivation_),be.suppressReactionErrors=!1}function oB(e,t){var r=Jb(e);try{return t()}finally{Zb(r)}}function Jb(e){var t=be.allowStateChanges;return be.allowStateChanges=e,t}function Zb(e){be.allowStateChanges=e}var aB;aB=Symbol.toPrimitive;var ml=function(e){Q5(t,e);function t(n,i,o,a,s){var l;return o===void 0&&(o="ObservableValue"),s===void 0&&(s=of.default),l=e.call(this,o)||this,l.enhancer=void 0,l.name_=void 0,l.equals=void 0,l.hasUnreportedChange_=!1,l.interceptors_=void 0,l.changeListeners_=void 0,l.value_=void 0,l.dehancer=void 0,l.enhancer=i,l.name_=o,l.equals=s,l.value_=i(n,void 0,o),l}var r=t.prototype;return r.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},r.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==be.UNCHANGED&&this.setNewValue_(i)},r.prepareNewValue_=function(i){if(oo(this)){var o=ao(this,{object:this,type:ka,newValue:i});if(!o)return be.UNCHANGED;i=o.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?be.UNCHANGED:i},r.setNewValue_=function(i){var o=this.value_;this.value_=i,this.reportChanged(),Ho(this)&&Wo(this,{type:ka,object:this,newValue:i,oldValue:o})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(i){return uv(this,i)},r.observe_=function(i,o){return o&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:ka,newValue:this.value_,oldValue:void 0}),cv(this,i)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return G5(this.get())},r[aB]=function(){return this.valueOf()},t}(sv),sB=Vl("ObservableValue",ml),lB;lB=Symbol.toPrimitive;var af=function(){function e(r){this.dependenciesState_=$t.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=$t.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new w0(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=b0.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,r.get||ft(31),this.derivation=r.get,this.name_=r.name||"ComputedValue",r.set&&(this.setter_=Tl("ComputedValue-setter",r.set)),this.equals_=r.equals||(r.compareStructural||r.struct?of.structural:of.default),this.scope_=r.context,this.requiresReaction_=r.requiresReaction,this.keepAlive_=!!r.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){gle(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing_&&ft(32,this.name_,this.derivation),be.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Gx(this)&&(this.warnAboutUntrackedRead_(),ui(),this.value_=this.computeValue_(!1),ci());else if(mB(this),Gx(this)){var n=be.trackingContext;this.keepAlive_&&!n&&(be.trackingContext=this),this.trackAndCompute()&&vle(this),be.trackingContext=n}var i=this.value_;if(uy(i))throw i.cause;return i},t.set=function(n){if(this.setter_){this.isRunningSetter_&&ft(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter_=!1}}else ft(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,i=this.dependenciesState_===$t.NOT_TRACKING_,o=this.computeValue_(!0),a=i||uy(n)||uy(o)||!this.equals_(n,o);return a&&(this.value_=o),a},t.computeValue_=function(n){this.isComputing_=!0;var i=Jb(!1),o;if(n)o=uB(this,this.derivation,this.scope_);else if(be.disableErrorBoundaries===!0)o=this.derivation.call(this.scope_);else try{o=this.derivation.call(this.scope_)}catch(a){o=new w0(a)}return Zb(i),this.isComputing_=!1,o},t.suspend_=function(){this.keepAlive_||(Qx(this),this.value_=void 0)},t.observe_=function(n,i){var o=this,a=!0,s=void 0;return _B(function(){var l=o.get();if(!a||i){var u=cc();n({observableKind:"computed",debugObjectName:o.name_,type:ka,object:o,newValue:l,oldValue:s}),es(u)}a=!1,s=l})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return G5(this.get())},t[lB]=function(){return this.valueOf()},e}(),Gu=Vl("ComputedValue",af),$t;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})($t||($t={}));var b0;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(b0||(b0={}));var w0=function(t){this.cause=void 0,this.cause=t};function uy(e){return e instanceof w0}function Gx(e){switch(e.dependenciesState_){case $t.UP_TO_DATE_:return!1;case $t.NOT_TRACKING_:case $t.STALE_:return!0;case $t.POSSIBLY_STALE_:{for(var t=bT(!0),r=cc(),n=e.observing_,i=n.length,o=0;o<i;o++){var a=n[o];if(Gu(a)){if(be.disableErrorBoundaries)a.get();else try{a.get()}catch{return es(r),up(t),!0}if(e.dependenciesState_===$t.STALE_)return es(r),up(t),!0}}return dB(e),es(r),up(t),!1}}}function uB(e,t,r){var n=bT(!0);dB(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++be.runId;var i=be.trackingDerivation;be.trackingDerivation=e,be.inBatch++;var o;if(be.disableErrorBoundaries===!0)o=t.call(r);else try{o=t.call(r)}catch(a){o=new w0(a)}return be.inBatch--,be.trackingDerivation=i,fle(e),up(n),o}function fle(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=$t.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=r[a];s.diffValue_===0&&(s.diffValue_=1,i!==a&&(r[i]=s),i++),s.dependenciesState_>n&&(n=s.dependenciesState_)}for(r.length=i,e.newObserving_=null,o=t.length;o--;){var l=t[o];l.diffValue_===0&&hB(l,e),l.diffValue_=0}for(;i--;){var u=r[i];u.diffValue_===1&&(u.diffValue_=0,mle(u,e))}n!==$t.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Qx(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)hB(t[r],e);e.dependenciesState_=$t.NOT_TRACKING_}function cB(e){var t=cc();try{return e()}finally{es(t)}}function cc(){var e=be.trackingDerivation;return be.trackingDerivation=null,e}function es(e){be.trackingDerivation=e}function bT(e){var t=be.allowStateReads;return be.allowStateReads=e,t}function up(e){be.allowStateReads=e}function dB(e){if(e.dependenciesState_!==$t.UP_TO_DATE_){e.dependenciesState_=$t.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=$t.UP_TO_DATE_}}var cy=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},dy=!0,fB=!1,be=function(){var e=pT();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(dy=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new cy().version&&(dy=!1),dy?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new cy):(setTimeout(function(){fB||ft(35)},1),new cy)}();function hle(){if((be.pendingReactions.length||be.inBatch||be.isRunningReactions)&&ft(36),fB=!0,dy){var e=pT();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),be=new cy}}function ple(){return be}function mle(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function hB(e,t){e.observers_.delete(t),e.observers_.size===0&&pB(e)}function pB(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,be.pendingUnobservations.push(e))}function ui(){be.inBatch++}function ci(){if(--be.inBatch===0){gB();for(var e=be.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation_=!1,r.observers_.size===0&&(r.isBeingObserved_&&(r.isBeingObserved_=!1,r.onBUO()),r instanceof af&&r.suspend_())}be.pendingUnobservations=[]}}function mB(e){var t=be.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&be.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&be.inBatch>0&&pB(e),!1)}function vB(e){e.lowestObserverState_!==$t.STALE_&&(e.lowestObserverState_=$t.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===$t.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=$t.STALE_}))}function vle(e){e.lowestObserverState_!==$t.STALE_&&(e.lowestObserverState_=$t.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===$t.POSSIBLY_STALE_?t.dependenciesState_=$t.STALE_:t.dependenciesState_===$t.UP_TO_DATE_&&(e.lowestObserverState_=$t.UP_TO_DATE_)}))}function gle(e){e.lowestObserverState_===$t.UP_TO_DATE_&&(e.lowestObserverState_=$t.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===$t.UP_TO_DATE_&&(t.dependenciesState_=$t.POSSIBLY_STALE_,t.onBecomeStale_())}))}var sm=function(){function e(r,n,i,o){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=$t.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=b0.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=o}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,be.pendingReactions.push(this),gB())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){ui(),this.isScheduled_=!1;var n=be.trackingContext;if(be.trackingContext=this,Gx(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}be.trackingContext=n,ci()}},t.track=function(n){if(!this.isDisposed_){ui(),this.isRunning_=!0;var i=be.trackingContext;be.trackingContext=this;var o=uB(this,n,void 0);be.trackingContext=i,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Qx(this),uy(o)&&this.reportExceptionInDerivation_(o.cause),ci()}},t.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(be.disableErrorBoundaries)throw n;var o="[mobx] uncaught error in '"+this+"'";be.suppressReactionErrors||console.error(o,n),be.globalReactionErrorHandlers.forEach(function(a){return a(n,i)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ui(),Qx(this),ci()))},t.getDisposer_=function(n){var i=this,o=function a(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",a)};return n==null||n.addEventListener==null||n.addEventListener("abort",o),o[Ve]=this,o},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),yle=100,Yx=function(t){return t()};function gB(){be.inBatch>0||be.isRunningReactions||Yx(ble)}function ble(){be.isRunningReactions=!0;for(var e=be.pendingReactions,t=0;e.length>0;){++t===yle&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}be.isRunningReactions=!1}var S0=Vl("Reaction",sm);function wle(e){var t=Yx;Yx=function(n){return e(function(){return t(n)})}}function cp(){return!1}function Sle(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var yB="action",_le="action.bound",bB="autoAction",xle="autoAction.bound",wB="<unnamed action>",Xx=lv(yB),Ple=lv(_le,{bound:!0}),Jx=lv(bB,{autoAction:!0}),Cle=lv(xle,{autoAction:!0,bound:!0});function SB(e){var t=function(n,i){if(Vi(n))return Tl(n.name||wB,n,e);if(Vi(i))return Tl(n,i,e);if(av(i))return(e?Jx:Xx).decorate_20223_(n,i);if(Wu(i))return If(n,i,e?Jx:Xx);if(Wu(n))return Ra(lv(e?bB:yB,{name:n,autoAction:e}))};return t}var Ht=SB(!1);Object.assign(Ht,Xx);var lm=SB(!0);Object.assign(lm,Jx);Ht.bound=Ra(Ple);lm.bound=Ra(Cle);function um(e){return iB(e.name||wB,!1,e,this,void 0)}function ew(e){return Vi(e)&&e.isMobxAction===!0}function _B(e,t){var r,n,i,o,a;t===void 0&&(t=mT);var s=(r=(n=t)==null?void 0:n.name)!=null?r:"Autorun",l=!t.scheduler&&!t.delay,u;if(l)u=new sm(s,function(){this.track(f)},t.onError,t.requiresObservable);else{var c=xB(t),d=!1;u=new sm(s,function(){d||(d=!0,c(function(){d=!1,u.isDisposed_||u.track(f)}))},t.onError,t.requiresObservable)}function f(){e(u)}return(i=t)!=null&&(o=i.signal)!=null&&o.aborted||u.schedule_(),u.getDisposer_((a=t)==null?void 0:a.signal)}var Ele=function(t){return t()};function xB(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ele}function Ia(e,t,r){var n,i,o,a;r===void 0&&(r=mT);var s=(n=r.name)!=null?n:"Reaction",l=Ht(s,r.onError?Tle(r.onError,t):t),u=!r.scheduler&&!r.delay,c=xB(r),d=!0,f=!1,h,m=r.compareStructural?of.structural:r.equals||of.default,v=new sm(s,function(){d||u?w():f||(f=!0,c(w))},r.onError,r.requiresObservable);function w(){if(f=!1,!v.isDisposed_){var p=!1,g=h;v.track(function(){var b=oB(!1,function(){return e(v)});p=d||!m(h,b),h=b}),(d&&r.fireImmediately||!d&&p)&&l(h,g,v),d=!1}}return(i=r)!=null&&(o=i.signal)!=null&&o.aborted||v.schedule_(),v.getDisposer_((a=r)==null?void 0:a.signal)}function Tle(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}var Ole="onBO",Rle="onBUO";function Ile(e,t,r){return CB(Ole,e,t,r)}function PB(e,t,r){return CB(Rle,e,t,r)}function CB(e,t,r,n){var i=Qu(t),o=Vi(n)?n:r,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var s=i[a];s&&(s.delete(o),s.size===0&&delete i[a])}}var kle="never",vg="always",jle="observed";function $le(e){e.isolateGlobalState===!0&&hle();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(be.useProxies=t===vg?!0:t===kle?!1:typeof Proxy<"u"),t==="ifavailable"&&(be.verifyProxies=!0),r!==void 0){var n=r===vg?vg:r===jle;be.enforceActions=n,be.allowStateChanges=!(n===!0||n===vg)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(be[i]=!!e[i])}),be.allowStateReads=!be.observableRequiresReaction,e.reactionScheduler&&wle(e.reactionScheduler)}function wT(e,t,r,n){var i=mse(t);return zl(function(){var o=dc(e,n)[Ve];nf(i).forEach(function(a){o.extend_(a,i[a],r&&a in r?r[a]:!0)})}),e}function Ale(e,t){return EB(Qu(e,t))}function EB(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Dle(e.observing_).map(EB)),t}function Dle(e){return Array.from(new Set(e))}var Mle=0;function TB(){this.message="FLOW_CANCELLED"}TB.prototype=Object.create(Error.prototype);var cS=X5("flow"),Nle=X5("flow.bound",{bound:!0}),sf=Object.assign(function(t,r){if(av(r))return cS.decorate_20223_(t,r);if(Wu(r))return If(t,r,cS);var n=t,i=n.name||"<unnamed flow>",o=function(){var s=this,l=arguments,u=++Mle,c=Ht(i+" - runid: "+u+" - init",n).apply(s,l),d,f=void 0,h=new Promise(function(m,v){var w=0;d=v;function p(_){f=void 0;var P;try{P=Ht(i+" - runid: "+u+" - yield "+w++,c.next).call(c,_)}catch(C){return v(C)}b(P)}function g(_){f=void 0;var P;try{P=Ht(i+" - runid: "+u+" - yield "+w++,c.throw).call(c,_)}catch(C){return v(C)}b(P)}function b(_){if(Vi(_==null?void 0:_.then)){_.then(b,v);return}return _.done?m(_.value):(f=Promise.resolve(_.value),f.then(p,g))}p(void 0)});return h.cancel=Ht(i+" - runid: "+u+" - cancel",function(){try{f&&B$(f);var m=c.return(void 0),v=Promise.resolve(m.value);v.then(hd,hd),B$(v),d(new TB)}catch(w){d(w)}}),h};return o.isMobXFlow=!0,o},cS);sf.bound=Ra(Nle);function B$(e){Vi(e.cancel)&&e.cancel()}function cm(e){return(e==null?void 0:e.isMobXFlow)===!0}function OB(e,t,r){var n;return _i(e)||So(e)||sB(e)?n=Yo(e):xi(e)&&(n=Yo(e,t)),n.dehancer=typeof t=="function"?t:r,function(){n.dehancer=void 0}}function ST(e,t,r){return Vi(r)?Lle(e,t,r):Fle(e,t)}function Fle(e,t){return Yo(e).intercept_(t)}function Lle(e,t,r){return Yo(e,t).intercept_(r)}function RB(e,t){if(t===void 0)return Gu(e);if(xi(e)===!1||!e[Ve].values_.has(t))return!1;var r=Qu(e,t);return Gu(r)}function Ble(e){return RB(e)}function dS(e,t){return RB(e,t)}function Vle(e,t){return e?xi(e)||!!e[Ve]||gT(e)||S0(e)||Gu(e):!1}function _T(e){return Vle(e)}function dm(e){if(xi(e))return e[Ve].keys_();if(_i(e)||bo(e))return Array.from(e.keys());if(So(e))return e.map(function(t,r){return r});ft(5)}function IB(e){if(xi(e))return dm(e).map(function(t){return e[t]});if(_i(e))return dm(e).map(function(t){return e.get(t)});if(bo(e))return Array.from(e.values());if(So(e))return e.slice();ft(6)}function zle(e){if(xi(e))return dm(e).map(function(t){return[t,e[t]]});if(_i(e))return dm(e).map(function(t){return[t,e.get(t)]});if(bo(e))return Array.from(e.entries());if(So(e))return e.map(function(t,r){return[r,t]});ft(7)}function kB(e,t,r){if(arguments.length===2&&!bo(e)){ui();var n=t;try{for(var i in n)kB(e,i,n[i])}finally{ci()}return}xi(e)?e[Ve].set_(t,r):_i(e)?e.set(t,r):bo(e)?e.add(t):So(e)?(typeof t!="number"&&(t=parseInt(t,10)),t<0&&ft("Invalid index: '"+t+"'"),ui(),t>=e.length&&(e.length=t+1),e[t]=r,ci()):ft(8)}function jB(e,t,r){if(xi(e))return e[Ve].defineProperty_(t,r);ft(39)}function Ule(e){if(xi(e))return e[Ve].ownKeys_();ft(38)}function tw(e,t,r,n){return Vi(r)?Hle(e,t,r,n):qle(e,t,r)}function qle(e,t,r){return Yo(e).observe_(t,r)}function Hle(e,t,r,n){return Yo(e,t).observe_(r,n)}function gg(e,t,r){return e.set(t,r),r}function Vc(e,t){if(e==null||typeof e!="object"||e instanceof Date||!_T(e))return e;if(sB(e)||Gu(e))return Vc(e.get(),t);if(t.has(e))return t.get(e);if(So(e)){var r=gg(t,e,new Array(e.length));return e.forEach(function(a,s){r[s]=Vc(a,t)}),r}if(bo(e)){var n=gg(t,e,new Set);return e.forEach(function(a){n.add(Vc(a,t))}),n}if(_i(e)){var i=gg(t,e,new Map);return e.forEach(function(a,s){i.set(s,Vc(a,t))}),i}else{var o=gg(t,e,{});return Ule(e).forEach(function(a){nv.propertyIsEnumerable.call(e,a)&&(o[a]=Vc(e[a],t))}),o}}function Zx(e,t){return Vc(e,new Map)}function Fo(e,t){t===void 0&&(t=void 0),ui();try{return e.apply(t)}finally{ci()}}function V$(e,t,r){return arguments.length===1||t&&typeof t=="object"?Wle(e,t):$B(e,t,{})}function $B(e,t,r){var n;if(typeof r.timeout=="number"){var i=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!a[Ve].isDisposed_)if(a(),r.onError)r.onError(i);else throw i},r.timeout)}r.name="When";var o=Tl("When-effect",t),a=_B(function(s){var l=oB(!1,e);l&&(s.dispose(),n&&clearTimeout(n),o())},r);return a}function Wle(e,t){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,i,o=new Promise(function(a,s){var l,u=$B(e,a,El({},t,{onError:s}));n=function(){u(),s(new Error("WHEN_CANCELLED"))},i=function(){u(),s(new Error("WHEN_ABORTED"))},t==null||(l=t.signal)==null||l.addEventListener==null||l.addEventListener("abort",i)}).finally(function(){var a;return t==null||(a=t.signal)==null||a.removeEventListener==null?void 0:a.removeEventListener("abort",i)});return o.cancel=n,o}function kc(e){return e[Ve]}var Kle={has:function(t,r){return kc(t).has_(r)},get:function(t,r){return kc(t).get_(r)},set:function(t,r,n){var i;return Wu(r)?(i=kc(t).set_(r,n,!0))!=null?i:!0:!1},deleteProperty:function(t,r){var n;return Wu(r)?(n=kc(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var i;return(i=kc(t).defineProperty_(r,n))!=null?i:!0},ownKeys:function(t){return kc(t).ownKeys_()},preventExtensions:function(t){ft(13)}};function Gle(e,t){var r,n;return U5(),e=dc(e,t),(n=(r=e[Ve]).proxy_)!=null?n:r.proxy_=new Proxy(e,Kle)}function oo(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function uv(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),q5(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function ao(e,t){var r=cc();try{for(var n=[].concat(e.interceptors_||[]),i=0,o=n.length;i<o&&(t=n[i](t),t&&!t.type&&ft(14),!!t);i++);return t}finally{es(r)}}function Ho(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function cv(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),q5(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Wo(e,t){var r=cc(),n=e.changeListeners_;if(n){n=n.slice();for(var i=0,o=n.length;i<o;i++)n[i](t);es(r)}}function rw(e,t,r){return zl(function(){var n,i=dc(e,r)[Ve];(n=t)!=null||(t=wse(e)),nf(t).forEach(function(o){return i.make_(o,t[o])})}),e}var fS=Symbol("mobx-keys");function Le(e,t,r){return ms(e)?wT(e,e,t,r):(zl(function(){var n=dc(e,r)[Ve];if(!e[fS]){var i=Object.getPrototypeOf(e),o=new Set([].concat(nf(e),nf(i)));o.delete("constructor"),o.delete(Ve),iv(i,fS,o)}e[fS].forEach(function(a){return n.make_(a,t&&a in t?t[a]:!0)})}),e)}var z$="splice",ka="update",Qle=1e4,Yle={get:function(t,r){var n=t[Ve];return r===Ve?n:r==="length"?n.getArrayLength_():typeof r=="string"&&!isNaN(r)?n.get_(parseInt(r)):Za(_0,r)?_0[r]:t[r]},set:function(t,r,n){var i=t[Ve];return r==="length"&&i.setArrayLength_(n),typeof r=="symbol"||isNaN(r)?t[r]=n:i.set_(parseInt(r),n),!0},preventExtensions:function(){ft(15)}},xT=function(){function e(r,n,i,o){r===void 0&&(r="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=o,this.atom_=new sv(r),this.enhancer_=function(a,s){return n(a,s,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return uv(this,n)},t.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),cv(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&ft("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var o=new Array(n-i),a=0;a<n-i;a++)o[a]=void 0;this.spliceWithArray_(i,0,o)}else this.spliceWithArray_(n,i-n)},t.updateArrayLength_=function(n,i){n!==this.lastKnownLength_&&ft(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&UB(n+i+1)},t.spliceWithArray_=function(n,i,o){var a=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?i=s-n:i==null?i=0:i=Math.max(0,Math.min(i,s-n)),o===void 0&&(o=qx),oo(this)){var l=ao(this,{object:this.proxy_,type:z$,index:n,removedCount:i,added:o});if(!l)return qx;i=l.removedCount,o=l.added}if(o=o.length===0?o:o.map(function(d){return a.enhancer_(d,void 0)}),this.legacyMode_){var u=o.length-i;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(n,i,o);return(i!==0||o.length!==0)&&this.notifyArraySplice_(n,o,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(n,i,o){if(o.length<Qle){var a;return(a=this.values_).splice.apply(a,[n,i].concat(o))}else{var s=this.values_.slice(n,n+i),l=this.values_.slice(n+i);this.values_.length+=o.length-i;for(var u=0;u<o.length;u++)this.values_[n+u]=o[u];for(var c=0;c<l.length;c++)this.values_[n+o.length+c]=l[c];return s}},t.notifyArrayChildUpdate_=function(n,i,o){var a=!this.owned_&&cp(),s=Ho(this),l=s||a?{observableKind:"array",object:this.proxy_,type:ka,debugObjectName:this.atom_.name_,index:n,newValue:i,oldValue:o}:null;this.atom_.reportChanged(),s&&Wo(this,l)},t.notifyArraySplice_=function(n,i,o){var a=!this.owned_&&cp(),s=Ho(this),l=s||a?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:z$,index:n,removed:o,added:i,removedCount:o.length,addedCount:i.length}:null;this.atom_.reportChanged(),s&&Wo(this,l)},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,i){var o=this.values_;if(this.legacyMode_&&n>o.length&&ft(17,n,o.length),n<o.length){this.atom_;var a=o[n];if(oo(this)){var s=ao(this,{type:ka,object:this.proxy_,index:n,newValue:i});if(!s)return;i=s.newValue}i=this.enhancer_(i,a);var l=i!==a;l&&(o[n]=i,this.notifyArrayChildUpdate_(n,i,a))}else{for(var u=new Array(n+1-o.length),c=0;c<u.length-1;c++)u[c]=void 0;u[u.length-1]=i,this.spliceWithArray_(o.length,0,u)}},e}();function Xle(e,t,r,n){return r===void 0&&(r="ObservableArray"),n===void 0&&(n=!1),U5(),zl(function(){var i=new xT(r,t,n,!1);W5(i.values_,Ve,i);var o=new Proxy(i.values_,Yle);return i.proxy_=o,e&&e.length&&i.spliceWithArray_(0,0,e),o})}var _0={clear:function(){return this.splice(0)},replace:function(t){var r=this[Ve];return r.spliceWithArray_(0,r.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];var a=this[Ve];switch(arguments.length){case 0:return[];case 1:return a.spliceWithArray_(t);case 2:return a.spliceWithArray_(t,r)}return a.spliceWithArray_(t,r,i)},spliceWithArray:function(t,r,n){return this[Ve].spliceWithArray_(t,r,n)},push:function(){for(var t=this[Ve],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[Ve].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[Ve],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return be.trackingDerivation&&ft(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){be.trackingDerivation&&ft(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var r=this[Ve],n=r.dehanceValues_(r.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};ur("at",Wi);ur("concat",Wi);ur("flat",Wi);ur("includes",Wi);ur("indexOf",Wi);ur("join",Wi);ur("lastIndexOf",Wi);ur("slice",Wi);ur("toString",Wi);ur("toLocaleString",Wi);ur("toSorted",Wi);ur("toSpliced",Wi);ur("with",Wi);ur("every",Zo);ur("filter",Zo);ur("find",Zo);ur("findIndex",Zo);ur("findLast",Zo);ur("findLastIndex",Zo);ur("flatMap",Zo);ur("forEach",Zo);ur("map",Zo);ur("some",Zo);ur("toReversed",Zo);ur("reduce",AB);ur("reduceRight",AB);function ur(e,t){typeof Array.prototype[e]=="function"&&(_0[e]=t(e))}function Wi(e){return function(){var t=this[Ve];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function Zo(e){return function(t,r){var n=this,i=this[Ve];i.atom_.reportObserved();var o=i.dehanceValues_(i.values_);return o[e](function(a,s){return t.call(r,a,s,n)})}}function AB(e){return function(){var t=this,r=this[Ve];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(o,a,s){return i(o,a,s,t)},n[e].apply(n,arguments)}}var Jle=Vl("ObservableArrayAdministration",xT);function So(e){return Qb(e)&&Jle(e[Ve])}var DB,MB,Zle={},rl="add",x0="delete";DB=Symbol.iterator;MB=Symbol.toStringTag;var nw=function(){function e(r,n,i){var o=this;n===void 0&&(n=Ku),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ve]=Zle,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=i,Vi(Map)||ft(18),zl(function(){o.keysAtom_=g0("ObservableMap.keys()"),o.data_=new Map,o.hasMap_=new Map,r&&o.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var i=this;if(!be.trackingDerivation)return this.has_(n);var o=this.hasMap_.get(n);if(!o){var a=o=new ml(this.has_(n),Yb,"ObservableMap.key?",!1);this.hasMap_.set(n,a),PB(a,function(){return i.hasMap_.delete(n)})}return o.get()},t.set=function(n,i){var o=this.has_(n);if(oo(this)){var a=ao(this,{type:o?ka:rl,object:this,newValue:i,name:n});if(!a)return this;i=a.newValue}return o?this.updateValue_(n,i):this.addValue_(n,i),this},t.delete=function(n){var i=this;if(this.keysAtom_,oo(this)){var o=ao(this,{type:x0,object:this,name:n});if(!o)return!1}if(this.has_(n)){var a=cp(),s=Ho(this),l=s||a?{observableKind:"map",debugObjectName:this.name_,type:x0,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return Fo(function(){var u;i.keysAtom_.reportChanged(),(u=i.hasMap_.get(n))==null||u.setNewValue_(!1);var c=i.data_.get(n);c.setNewValue_(void 0),i.data_.delete(n)}),s&&Wo(this,l),!0}return!1},t.updateValue_=function(n,i){var o=this.data_.get(n);if(i=o.prepareNewValue_(i),i!==be.UNCHANGED){var a=cp(),s=Ho(this),l=s||a?{observableKind:"map",debugObjectName:this.name_,type:ka,object:this,oldValue:o.value_,name:n,newValue:i}:null;o.setNewValue_(i),s&&Wo(this,l)}},t.addValue_=function(n,i){var o=this;this.keysAtom_,Fo(function(){var u,c=new ml(i,o.enhancer_,"ObservableMap.key",!1);o.data_.set(n,c),i=c.value_,(u=o.hasMap_.get(n))==null||u.setNewValue_(!0),o.keysAtom_.reportChanged()});var a=cp(),s=Ho(this),l=s||a?{observableKind:"map",debugObjectName:this.name_,type:rl,object:this,name:n,newValue:i}:null;s&&Wo(this,l)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,i=this.keys();return fm({next:function(){var a=i.next(),s=a.done,l=a.value;return{done:s,value:s?void 0:n.get(l)}}})},t.entries=function(){var n=this,i=this.keys();return fm({next:function(){var a=i.next(),s=a.done,l=a.value;return{done:s,value:s?void 0:[l,n.get(l)]}}})},t[DB]=function(){return this.entries()},t.forEach=function(n,i){for(var o=pd(this),a;!(a=o()).done;){var s=a.value,l=s[0],u=s[1];n.call(i,u,l,this)}},t.merge=function(n){var i=this;return _i(n)&&(n=new Map(n)),Fo(function(){ms(n)?pse(n).forEach(function(o){return i.set(o,n[o])}):Array.isArray(n)?n.forEach(function(o){var a=o[0],s=o[1];return i.set(a,s)}):Rf(n)?(n.constructor!==Map&&ft(19,n),n.forEach(function(o,a){return i.set(a,o)})):n!=null&&ft(20,n)}),this},t.clear=function(){var n=this;Fo(function(){cB(function(){for(var i=pd(n.keys()),o;!(o=i()).done;){var a=o.value;n.delete(a)}})})},t.replace=function(n){var i=this;return Fo(function(){for(var o=eue(n),a=new Map,s=!1,l=pd(i.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!o.has(c)){var d=i.delete(c);if(d)s=!0;else{var f=i.data_.get(c);a.set(c,f)}}}for(var h=pd(o.entries()),m;!(m=h()).done;){var v=m.value,w=v[0],p=v[1],g=i.data_.has(w);if(i.set(w,p),i.data_.has(w)){var b=i.data_.get(w);a.set(w,b),g||(s=!0)}}if(!s)if(i.data_.size!==a.size)i.keysAtom_.reportChanged();else for(var _=i.data_.keys(),P=a.keys(),C=_.next(),x=P.next();!C.done;){if(C.value!==x.value){i.keysAtom_.reportChanged();break}C=_.next(),x=P.next()}i.data_=a}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,i){return cv(this,n)},t.intercept_=function(n){return uv(this,n)},vT(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:MB,get:function(){return"Map"}}]),e}(),_i=Vl("ObservableMap",nw);function eue(e){if(Rf(e)||_i(e))return e;if(Array.isArray(e))return new Map(e);if(ms(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return ft(21,e)}var NB,FB,tue={};NB=Symbol.iterator;FB=Symbol.toStringTag;var LB=function(){function e(r,n,i){var o=this;n===void 0&&(n=Ku),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[Ve]=tue,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,Vi(Set)||ft(22),this.enhancer_=function(a,s){return n(a,s,i)},zl(function(){o.atom_=g0(o.name_),r&&o.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;Fo(function(){cB(function(){for(var i=pd(n.data_.values()),o;!(o=i()).done;){var a=o.value;n.delete(a)}})})},t.forEach=function(n,i){for(var o=pd(this),a;!(a=o()).done;){var s=a.value;n.call(i,s,s,this)}},t.add=function(n){var i=this;if(this.atom_,oo(this)){var o=ao(this,{type:rl,object:this,newValue:n});if(!o)return this}if(!this.has(n)){Fo(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var a=!1,s=Ho(this),l=s||a?{observableKind:"set",debugObjectName:this.name_,type:rl,object:this,newValue:n}:null;s&&Wo(this,l)}return this},t.delete=function(n){var i=this;if(oo(this)){var o=ao(this,{type:x0,object:this,oldValue:n});if(!o)return!1}if(this.has(n)){var a=!1,s=Ho(this),l=s||a?{observableKind:"set",debugObjectName:this.name_,type:x0,object:this,oldValue:n}:null;return Fo(function(){i.atom_.reportChanged(),i.data_.delete(n)}),s&&Wo(this,l),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,i=Array.from(this.keys()),o=Array.from(this.values());return fm({next:function(){var s=n;return n+=1,s<o.length?{value:[i[s],o[s]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,i=0,o=Array.from(this.data_.values());return fm({next:function(){return i<o.length?{value:n.dehanceValue_(o[i++]),done:!1}:{done:!0}}})},t.replace=function(n){var i=this;return bo(n)&&(n=new Set(n)),Fo(function(){Array.isArray(n)?(i.clear(),n.forEach(function(o){return i.add(o)})):ov(n)?(i.clear(),n.forEach(function(o){return i.add(o)})):n!=null&&ft("Cannot initialize set from "+n)}),this},t.observe_=function(n,i){return cv(this,n)},t.intercept_=function(n){return uv(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[NB]=function(){return this.values()},vT(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:FB,get:function(){return"Set"}}]),e}(),bo=Vl("ObservableSet",LB),U$=Object.create(null),q$="remove",BB=function(){function e(r,n,i,o){n===void 0&&(n=new Map),o===void 0&&(o=Wse),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=o,this.keysAtom_=new sv("ObservableObject.keys"),this.isPlainObject_=ms(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,i){var o=this.values_.get(n);if(o instanceof af)return o.set(i),!0;if(oo(this)){var a=ao(this,{type:ka,object:this.proxy_||this.target_,name:n,newValue:i});if(!a)return null;i=a.newValue}if(i=o.prepareNewValue_(i),i!==be.UNCHANGED){var s=Ho(this),l=!1,u=s||l?{type:ka,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:o.value_,name:n,newValue:i}:null;o.setNewValue_(i),s&&Wo(this,u)}return!0},t.get_=function(n){return be.trackingDerivation&&!Za(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,i,o){return o===void 0&&(o=!1),Za(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):o?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,o)},t.has_=function(n){if(!be.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new ml(n in this.target_,Yb,"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},t.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(n in this.target_)){var o;if((o=this.target_[ba])!=null&&o[n])return;ft(1,i.annotationType_,this.name_+"."+n.toString())}for(var a=this.target_;a&&a!==nv;){var s=v0(a,n);if(s){var l=i.make_(this,n,s,a);if(l===0)return;if(l===1)break}a=Object.getPrototypeOf(a)}W$(this,i,n)}},t.extend_=function(n,i,o,a){if(a===void 0&&(a=!1),o===!0&&(o=this.defaultAnnotation_),o===!1)return this.defineProperty_(n,i,a);var s=o.extend_(this,n,i,a);return s&&W$(this,o,n),s},t.defineProperty_=function(n,i,o){o===void 0&&(o=!1),this.keysAtom_;try{ui();var a=this.delete_(n);if(!a)return a;if(oo(this)){var s=ao(this,{object:this.proxy_||this.target_,name:n,type:rl,newValue:i.value});if(!s)return null;var l=s.newValue;i.value!==l&&(i=El({},i,{value:l}))}if(o){if(!Reflect.defineProperty(this.target_,n,i))return!1}else Oa(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{ci()}return!0},t.defineObservableProperty_=function(n,i,o,a){a===void 0&&(a=!1),this.keysAtom_;try{ui();var s=this.delete_(n);if(!s)return s;if(oo(this)){var l=ao(this,{object:this.proxy_||this.target_,name:n,type:rl,newValue:i});if(!l)return null;i=l.newValue}var u=H$(n),c={configurable:be.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,n,c))return!1}else Oa(this.target_,n,c);var d=new ml(i,o,"ObservableObject.key",!1);this.values_.set(n,d),this.notifyPropertyAddition_(n,d.value_)}finally{ci()}return!0},t.defineComputedProperty_=function(n,i,o){o===void 0&&(o=!1),this.keysAtom_;try{ui();var a=this.delete_(n);if(!a)return a;if(oo(this)){var s=ao(this,{object:this.proxy_||this.target_,name:n,type:rl,newValue:void 0});if(!s)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var l=H$(n),u={configurable:be.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(o){if(!Reflect.defineProperty(this.target_,n,u))return!1}else Oa(this.target_,n,u);this.values_.set(n,new af(i)),this.notifyPropertyAddition_(n,void 0)}finally{ci()}return!0},t.delete_=function(n,i){if(i===void 0&&(i=!1),this.keysAtom_,!Za(this.target_,n))return!0;if(oo(this)){var o=ao(this,{object:this.proxy_||this.target_,name:n,type:q$});if(!o)return null}try{var a,s;ui();var l=Ho(this),u=!1,c=this.values_.get(n),d=void 0;if(!c&&(l||u)){var f;d=(f=v0(this.target_,n))==null?void 0:f.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(c&&(this.values_.delete(n),c instanceof ml&&(d=c.value_),vB(c)),this.keysAtom_.reportChanged(),(a=this.pendingKeys_)==null||(s=a.get(n))==null||s.set(n in this.target_),l||u){var h={type:q$,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:d,name:n};l&&Wo(this,h)}}finally{ci()}return!0},t.observe_=function(n,i){return cv(this,n)},t.intercept_=function(n){return uv(this,n)},t.notifyPropertyAddition_=function(n,i){var o,a,s=Ho(this),l=!1;if(s||l){var u=s||l?{type:rl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;s&&Wo(this,u)}(o=this.pendingKeys_)==null||(a=o.get(n))==null||a.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),nf(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function dc(e,t){var r;if(Za(e,Ve))return e;var n=(r=t==null?void 0:t.name)!=null?r:"ObservableObject",i=new BB(e,new Map,String(n),nle(t));return iv(e,Ve,i),e}var rue=Vl("ObservableObjectAdministration",BB);function H$(e){return U$[e]||(U$[e]={get:function(){return this[Ve].getObservablePropValue_(e)},set:function(r){return this[Ve].setObservablePropValue_(e,r)}})}function xi(e){return Qb(e)?rue(e[Ve]):!1}function W$(e,t,r){var n;(n=e.target_[ba])==null||delete n[r]}var nue=zB(0),iue=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),hS=0,VB=function(){};function oue(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}oue(VB,Array.prototype);var PT=function(e,t,r){Q5(n,e);function n(o,a,s,l){var u;return s===void 0&&(s="ObservableArray"),l===void 0&&(l=!1),u=e.call(this)||this,zl(function(){var c=new xT(s,a,l,!0);c.proxy_=uS(u),W5(uS(u),Ve,c),o&&o.length&&u.spliceWithArray(0,0,o),iue&&Object.defineProperty(uS(u),"0",nue)}),u}var i=n.prototype;return i.concat=function(){this[Ve].atom_.reportObserved();for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),s.map(function(u){return So(u)?u.slice():u}))},i[r]=function(){var o=this,a=0;return fm({next:function(){return a<o.length?{value:o[a++],done:!1}:{done:!0,value:void 0}}})},vT(n,[{key:"length",get:function(){return this[Ve].getArrayLength_()},set:function(a){this[Ve].setArrayLength_(a)}},{key:t,get:function(){return"Array"}}]),n}(VB,Symbol.toStringTag,Symbol.iterator);Object.entries(_0).forEach(function(e){var t=e[0],r=e[1];t!=="concat"&&iv(PT.prototype,t,r)});function zB(e){return{enumerable:!1,configurable:!0,get:function(){return this[Ve].get_(e)},set:function(r){this[Ve].set_(e,r)}}}function aue(e){Oa(PT.prototype,""+e,zB(e))}function UB(e){if(e>hS){for(var t=hS;t<e+100;t++)aue(t);hS=e}}UB(1e3);function sue(e,t,r){return new PT(e,t,r)}function Qu(e,t){if(typeof e=="object"&&e!==null){if(So(e))return t!==void 0&&ft(23),e[Ve].atom_;if(bo(e))return e.atom_;if(_i(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||ft(25,t,eP(e)),r}if(xi(e)){if(!t)return ft(26);var n=e[Ve].values_.get(t);return n||ft(27,t,eP(e)),n}if(gT(e)||Gu(e)||S0(e))return e}else if(Vi(e)&&S0(e[Ve]))return e[Ve];ft(28)}function Yo(e,t){if(e||ft(29),t!==void 0)return Yo(Qu(e,t));if(gT(e)||Gu(e)||S0(e)||_i(e)||bo(e))return e;if(e[Ve])return e[Ve];ft(24,e)}function eP(e,t){var r;if(t!==void 0)r=Qu(e,t);else{if(ew(e))return e.name;xi(e)||_i(e)||bo(e)?r=Yo(e):r=Qu(e)}return r.name_}function zl(e){var t=cc(),r=Jb(!0);ui();try{return e()}finally{ci(),Zb(r),es(t)}}var K$=nv.toString;function CT(e,t,r){return r===void 0&&(r=-1),tP(e,t,r)}function tP(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var o=typeof e;if(o!=="function"&&o!=="object"&&typeof t!="object")return!1;var a=K$.call(e);if(a!==K$.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=G$(e),t=G$(t);var s=a==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Vi(l)&&l instanceof l&&Vi(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var c=n.length;c--;)if(n[c]===e)return i[c]===t;if(n.push(e),i.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!tP(e[c],t[c],r-1,n,i))return!1}else{var d=Object.keys(e),f;if(c=d.length,Object.keys(t).length!==c)return!1;for(;c--;)if(f=d[c],!(Za(t,f)&&tP(e[f],t[f],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function G$(e){return So(e)?e.slice():Rf(e)||_i(e)||ov(e)||bo(e)?Array.from(e.entries()):e}function fm(e){return e[Symbol.iterator]=lue,e}function lue(){return this}["Symbol","Map","Set"].forEach(function(e){var t=pT();typeof t[e]>"u"&&ft("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Sle,extras:{getDebugName:eP},$mobx:Ve});if(!S.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!rw)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function uue(e){e()}function cue(e){e||(e=uue),$le({reactionScheduler:e})}function due(e){return Ale(e)}var fue=1e4,hue=1e4,pue=function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=fue),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var i=Date.now();r.registrations.forEach(function(o,a){i-o.registeredAt>=n&&(r.finalize(o.value),r.registrations.delete(a))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,hue))}}),e}(),mue=typeof FinalizationRegistry<"u"?FinalizationRegistry:pue,rP=new mue(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),qB={exports:{}},HB={};/**
351
- * @license React
352
- * use-sync-external-store-shim.production.min.js
353
- *
354
- * Copyright (c) Facebook, Inc. and its affiliates.
355
- *
356
- * This source code is licensed under the MIT license found in the
357
- * LICENSE file in the root directory of this source tree.
358
- */var lf=S;function vue(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gue=typeof Object.is=="function"?Object.is:vue,yue=lf.useState,bue=lf.useEffect,wue=lf.useLayoutEffect,Sue=lf.useDebugValue;function _ue(e,t){var r=t(),n=yue({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return wue(function(){i.value=r,i.getSnapshot=t,pS(i)&&o({inst:i})},[e,r,t]),bue(function(){return pS(i)&&o({inst:i}),e(function(){pS(i)&&o({inst:i})})},[e]),Sue(r),r}function pS(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gue(e,r)}catch{return!0}}function xue(e,t){return t()}var Pue=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xue:_ue;HB.useSyncExternalStore=lf.useSyncExternalStore!==void 0?lf.useSyncExternalStore:Pue;qB.exports=HB;var Cue=qB.exports;function Q$(e){e.reaction=new sm("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function Eue(e,t){t===void 0&&(t="observed");var r=ue.useRef(null);if(!r.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(s){return rP.unregister(n),n.onStoreChange=s,n.reaction||(Q$(n),n.stateVersion=Symbol()),function(){var l;n.onStoreChange=null,(l=n.reaction)===null||l===void 0||l.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};r.current=n}var i=r.current;i.reaction||(Q$(i),rP.register(r,i,i)),ue.useDebugValue(i.reaction,due),Cue.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot);var o,a;if(i.reaction.track(function(){try{o=e()}catch(s){a=s}}),a)throw a;return o}var mS,vS,WB=typeof Symbol=="function"&&Symbol.for,Tue=(vS=(mS=Object.getOwnPropertyDescriptor(function(){},"name"))===null||mS===void 0?void 0:mS.configurable)!==null&&vS!==void 0?vS:!1,Y$=WB?Symbol.for("react.forward_ref"):typeof S.forwardRef=="function"&&S.forwardRef(function(e){return null}).$$typeof,X$=WB?Symbol.for("react.memo"):typeof S.memo=="function"&&S.memo(function(e){return null}).$$typeof;function Ze(e,t){var r;if(X$&&e.$$typeof===X$)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=void 0)!==null&&r!==void 0?r:!1,i=e,o=e.displayName||e.name;if(Y$&&e.$$typeof===Y$&&(n=!0,i=e.render,typeof i!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(s,l){return Eue(function(){return i(s,l)},o)};return a.displayName=e.displayName,Tue&&Object.defineProperty(a,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(a.contextTypes=e.contextTypes),n&&(a=S.forwardRef(a)),a=S.memo(a),Rue(e,a),a}var Oue={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Rue(e,t){Object.keys(e).forEach(function(r){Oue[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}var gS;cue(Pf.unstable_batchedUpdates);gS=rP.finalizeAllImmediately;/**
359
- * @remix-run/router v1.16.1
360
- *
361
- * Copyright (c) Remix Software Inc.
362
- *
363
- * This source code is licensed under the MIT license found in the
364
- * LICENSE.md file in the root directory of this source tree.
365
- *
366
- * @license MIT
367
- */function Sr(){return Sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sr.apply(this,arguments)}var Yr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Yr||(Yr={}));const J$="popstate";function Iue(e){e===void 0&&(e={});function t(n,i){let{pathname:o,search:a,hash:s}=n.location;return hm("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Xu(i)}return jue(t,r,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kue(){return Math.random().toString(36).substr(2,8)}function Z$(e,t){return{usr:e.state,key:e.key,idx:t}}function hm(e,t,r,n){return r===void 0&&(r=null),Sr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ul(t):t,{state:r,key:t&&t.key||n||kue()})}function Xu(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ul(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function jue(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=Yr.Pop,l=null,u=c();u==null&&(u=0,a.replaceState(Sr({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){s=Yr.Pop;let w=c(),p=w==null?null:w-u;u=w,l&&l({action:s,location:v.location,delta:p})}function f(w,p){s=Yr.Push;let g=hm(v.location,w,p);u=c()+1;let b=Z$(g,u),_=v.createHref(g);try{a.pushState(b,"",_)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(_)}o&&l&&l({action:s,location:v.location,delta:1})}function h(w,p){s=Yr.Replace;let g=hm(v.location,w,p);u=c();let b=Z$(g,u),_=v.createHref(g);a.replaceState(b,"",_),o&&l&&l({action:s,location:v.location,delta:0})}function m(w){let p=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof w=="string"?w:Xu(w);return g=g.replace(/ $/,"%20"),mt(p,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,p)}let v={get action(){return s},get location(){return e(i,a)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(J$,d),l=w,()=>{i.removeEventListener(J$,d),l=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let p=m(w);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:f,replace:h,go(w){return a.go(w)}};return v}var _r;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(_r||(_r={}));const $ue=new Set(["lazy","caseSensitive","path","id","index","children"]);function Aue(e){return e.index===!0}function nP(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,o)=>{let a=[...r,o],s=typeof i.id=="string"?i.id:a.join("-");if(mt(i.index!==!0||!i.children,"Cannot specify children on an index route"),mt(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Aue(i)){let l=Sr({},i,t(i),{id:s});return n[s]=l,l}else{let l=Sr({},i,t(i),{id:s,children:void 0});return n[s]=l,i.children&&(l.children=nP(i.children,t,a,n)),l}})}function md(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Ul(t):t,i=kf(n.pathname||"/",r);if(i==null)return null;let o=KB(e);Mue(o);let a=null;for(let s=0;a==null&&s<o.length;++s){let l=Gue(i);a=Hue(o[s],l)}return a}function Due(e,t){let{route:r,pathname:n,params:i}=e;return{id:r.id,pathname:n,params:i,data:t[r.id],handle:r.handle}}function KB(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(mt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=ts([n,l.relativePath]),c=r.concat(l);o.children&&o.children.length>0&&(mt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),KB(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Uue(u,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of GB(o.path))i(o,a,l)}),t}function GB(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=GB(n.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Mue(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:que(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Nue=/^:[\w-]+$/,Fue=3,Lue=2,Bue=1,Vue=10,zue=-2,e2=e=>e==="*";function Uue(e,t){let r=e.split("/"),n=r.length;return r.some(e2)&&(n+=zue),t&&(n+=Lue),r.filter(i=>!e2(i)).reduce((i,o)=>i+(Nue.test(o)?Fue:o===""?Bue:Vue),n)}function que(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function Hue(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let a=0;a<r.length;++a){let s=r[a],l=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",c=Wue({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u);if(!c)return null;Object.assign(n,c.params);let d=s.route;o.push({params:n,pathname:ts([i,c.pathname]),pathnameBase:Xue(ts([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=ts([i,c.pathnameBase]))}return o}function ki(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(Yu(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",i=a=>a==null?"":typeof a=="string"?a:String(a),o=r.split(/\/+/).map((a,s,l)=>{if(s===l.length-1&&a==="*")return i(t["*"]);const c=a.match(/^:([\w-]+)(\??)$/);if(c){const[,d,f]=c;let h=t[d];return mt(f==="?"||h!=null,'Missing ":'+d+'" param'),i(h)}return a.replace(/\?$/g,"")}).filter(a=>!!a);return n+o.join("/")}function Wue(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Kue(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let v=s[d]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function Kue(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Yu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Gue(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Que(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Ul(e):e;return{pathname:r?r.startsWith("/")?r:Yue(r,t):t,search:Jue(n),hash:Zue(i)}}function Yue(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function yS(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function QB(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ET(e,t){let r=QB(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function TT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Ul(e):(i=Sr({},e),mt(!i.pathname||!i.pathname.includes("?"),yS("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),yS("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),yS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let d=t.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=Que(i,s),u=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ts=e=>e.join("/").replace(/\/\/+/g,"/"),Xue=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jue=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zue=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,uf=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let i=new Headers(n.headers);return i.set("Location",t),new Response(null,Sr({},n,{headers:i}))};class OT{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function RT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const YB=["post","put","patch","delete"],ece=new Set(YB),tce=["get",...YB],rce=new Set(tce),nce=new Set([301,302,303,307,308]),ice=new Set([307,308]),bS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},oce={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},IT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ace=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),XB="remix-router-transitions";function sce(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;mt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let q=e.detectErrorBoundary;i=Z=>({hasErrorBoundary:q(Z)})}else i=ace;let o={},a=nP(e.routes,i,void 0,o),s,l=e.basename||"/",u=e.unstable_dataStrategy||dce,c=Sr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),d=null,f=new Set,h=null,m=null,v=null,w=e.hydrationData!=null,p=md(a,e.history.location,l),g=null;if(p==null){let q=eo(404,{pathname:e.history.location.pathname}),{matches:Z,route:ae}=c2(a);p=Z,g={[ae.id]:q}}let b,_=p.some(q=>q.route.lazy),P=p.some(q=>q.route.loader);if(_)b=!1;else if(!P)b=!0;else if(c.v7_partialHydration){let q=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null,ae=pe=>pe.route.loader?typeof pe.route.loader=="function"&&pe.route.loader.hydrate===!0?!1:q&&q[pe.route.id]!==void 0||Z&&Z[pe.route.id]!==void 0:!0;if(Z){let pe=p.findIndex(we=>Z[we.route.id]!==void 0);b=p.slice(0,pe+1).every(ae)}else b=p.every(ae)}else b=e.hydrationData!=null;let C,x={historyAction:e.history.action,location:e.history.location,matches:p,initialized:b,navigation:bS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||g,fetchers:new Map,blockers:new Map},T=Yr.Pop,I=!1,M,H=!1,re=new Map,ie=null,R=!1,L=!1,X=[],Q=[],W=new Map,te=0,G=-1,A=new Map,U=new Set,N=new Map,E=new Map,k=new Set,D=new Map,ee=new Map,oe=!1;function ve(){if(d=e.history.listen(q=>{let{action:Z,location:ae,delta:pe}=q;if(oe){oe=!1;return}Yu(ee.size===0||pe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let we=Xl({currentLocation:x.location,nextLocation:ae,historyAction:Z});if(we&&pe!=null){oe=!0,e.history.go(pe*-1),Sn(we,{state:"blocked",location:ae,proceed(){Sn(we,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),e.history.go(pe)},reset(){let et=new Map(x.blockers);et.set(we,mh),ge({blockers:et})}});return}return ye(Z,ae)}),r){xce(t,re);let q=()=>Pce(t,re);t.addEventListener("pagehide",q),ie=()=>t.removeEventListener("pagehide",q)}return x.initialized||ye(Yr.Pop,x.location,{initialHydration:!0}),C}function Se(){d&&d(),ie&&ie(),f.clear(),M&&M.abort(),x.fetchers.forEach((q,Z)=>Ar(Z)),x.blockers.forEach((q,Z)=>ra(Z))}function $e(q){return f.add(q),()=>f.delete(q)}function ge(q,Z){Z===void 0&&(Z={}),x=Sr({},x,q);let ae=[],pe=[];c.v7_fetcherPersist&&x.fetchers.forEach((we,et)=>{we.state==="idle"&&(k.has(et)?pe.push(et):ae.push(et))}),[...f].forEach(we=>we(x,{deletedFetchers:pe,unstable_viewTransitionOpts:Z.viewTransitionOpts,unstable_flushSync:Z.flushSync===!0})),c.v7_fetcherPersist&&(ae.forEach(we=>x.fetchers.delete(we)),pe.forEach(we=>Ar(we)))}function st(q,Z,ae){var pe,we;let{flushSync:et}=ae===void 0?{}:ae,Ne=x.actionData!=null&&x.navigation.formMethod!=null&&Ao(x.navigation.formMethod)&&x.navigation.state==="loading"&&((pe=q.state)==null?void 0:pe._isRedirect)!==!0,Ee;Z.actionData?Object.keys(Z.actionData).length>0?Ee=Z.actionData:Ee=null:Ne?Ee=x.actionData:Ee=null;let tt=Z.loaderData?l2(x.loaderData,Z.loaderData,Z.matches||[],Z.errors):x.loaderData,$=x.blockers;$.size>0&&($=new Map($),$.forEach((B,K)=>$.set(K,mh)));let O=I===!0||x.navigation.formMethod!=null&&Ao(x.navigation.formMethod)&&((we=q.state)==null?void 0:we._isRedirect)!==!0;s&&(a=s,s=void 0),R||T===Yr.Pop||(T===Yr.Push?e.history.push(q,q.state):T===Yr.Replace&&e.history.replace(q,q.state));let F;if(T===Yr.Pop){let B=re.get(x.location.pathname);B&&B.has(q.pathname)?F={currentLocation:x.location,nextLocation:q}:re.has(q.pathname)&&(F={currentLocation:q,nextLocation:x.location})}else if(H){let B=re.get(x.location.pathname);B?B.add(q.pathname):(B=new Set([q.pathname]),re.set(x.location.pathname,B)),F={currentLocation:x.location,nextLocation:q}}ge(Sr({},Z,{actionData:Ee,loaderData:tt,historyAction:T,location:q,initialized:!0,navigation:bS,revalidation:"idle",restoreScrollPosition:Gi(q,Z.matches||x.matches),preventScrollReset:O,blockers:$}),{viewTransitionOpts:F,flushSync:et===!0}),T=Yr.Pop,I=!1,H=!1,R=!1,L=!1,X=[],Q=[]}async function Vt(q,Z){if(typeof q=="number"){e.history.go(q);return}let ae=iP(x.location,x.matches,l,c.v7_prependBasename,q,c.v7_relativeSplatPath,Z==null?void 0:Z.fromRouteId,Z==null?void 0:Z.relative),{path:pe,submission:we,error:et}=t2(c.v7_normalizeFormMethod,!1,ae,Z),Ne=x.location,Ee=hm(x.location,pe,Z&&Z.state);Ee=Sr({},Ee,e.history.encodeLocation(Ee));let tt=Z&&Z.replace!=null?Z.replace:void 0,$=Yr.Push;tt===!0?$=Yr.Replace:tt===!1||we!=null&&Ao(we.formMethod)&&we.formAction===x.location.pathname+x.location.search&&($=Yr.Replace);let O=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,F=(Z&&Z.unstable_flushSync)===!0,B=Xl({currentLocation:Ne,nextLocation:Ee,historyAction:$});if(B){Sn(B,{state:"blocked",location:Ee,proceed(){Sn(B,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),Vt(q,Z)},reset(){let K=new Map(x.blockers);K.set(B,mh),ge({blockers:K})}});return}return await ye($,Ee,{submission:we,pendingError:et,preventScrollReset:O,replace:Z&&Z.replace,enableViewTransition:Z&&Z.unstable_viewTransition,flushSync:F})}function ce(){if(cn(),ge({revalidation:"loading"}),x.navigation.state!=="submitting"){if(x.navigation.state==="idle"){ye(x.historyAction,x.location,{startUninterruptedRevalidation:!0});return}ye(T||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation})}}async function ye(q,Z,ae){M&&M.abort(),M=null,T=q,R=(ae&&ae.startUninterruptedRevalidation)===!0,Xf(x.location,x.matches),I=(ae&&ae.preventScrollReset)===!0,H=(ae&&ae.enableViewTransition)===!0;let pe=s||a,we=ae&&ae.overrideNavigation,et=md(pe,Z,l),Ne=(ae&&ae.flushSync)===!0;if(!et){let B=eo(404,{pathname:Z.pathname}),{matches:K,route:_e}=c2(pe);Jl(),st(Z,{matches:K,loaderData:{},errors:{[_e.id]:B}},{flushSync:Ne});return}if(x.initialized&&!L&&gce(x.location,Z)&&!(ae&&ae.submission&&Ao(ae.submission.formMethod))){st(Z,{matches:et},{flushSync:Ne});return}M=new AbortController;let Ee=jc(e.history,Z,M.signal,ae&&ae.submission),tt;if(ae&&ae.pendingError)tt=[dp(et).route.id,{type:_r.error,error:ae.pendingError}];else if(ae&&ae.submission&&Ao(ae.submission.formMethod)){let B=await Xe(Ee,Z,ae.submission,et,{replace:ae.replace,flushSync:Ne});if(B.shortCircuited)return;tt=B.pendingActionResult,we=wS(Z,ae.submission),Ne=!1,Ee=jc(e.history,Ee.url,Ee.signal)}let{shortCircuited:$,loaderData:O,errors:F}=await kt(Ee,Z,et,we,ae&&ae.submission,ae&&ae.fetcherSubmission,ae&&ae.replace,ae&&ae.initialHydration===!0,Ne,tt);$||(M=null,st(Z,Sr({matches:et},u2(tt),{loaderData:O,errors:F})))}async function Xe(q,Z,ae,pe,we){we===void 0&&(we={}),cn();let et=Sce(Z,ae);ge({navigation:et},{flushSync:we.flushSync===!0});let Ne,Ee=aP(pe,Z);if(!Ee.route.action&&!Ee.route.lazy)Ne={type:_r.error,error:eo(405,{method:q.method,pathname:Z.pathname,routeId:Ee.route.id})};else if(Ne=(await ct("action",q,[Ee],pe))[0],q.signal.aborted)return{shortCircuited:!0};if(Pu(Ne)){let tt;return we&&we.replace!=null?tt=we.replace:tt=o2(Ne.response.headers.get("Location"),new URL(q.url),l)===x.location.pathname+x.location.search,await jt(q,Ne,{submission:ae,replace:tt}),{shortCircuited:!0}}if(xu(Ne))throw eo(400,{type:"defer-action"});if(io(Ne)){let tt=dp(pe,Ee.route.id);return(we&&we.replace)!==!0&&(T=Yr.Push),{pendingActionResult:[tt.route.id,Ne]}}return{pendingActionResult:[Ee.route.id,Ne]}}async function kt(q,Z,ae,pe,we,et,Ne,Ee,tt,$){let O=pe||wS(Z,we),F=we||et||h2(O),B=s||a,[K,_e]=r2(e.history,x,ae,F,Z,c.v7_partialHydration&&Ee===!0,c.unstable_skipActionErrorRevalidation,L,X,Q,k,N,U,B,l,$);if(Jl(Fe=>!(ae&&ae.some(ot=>ot.route.id===Fe))||K&&K.some(ot=>ot.route.id===Fe)),G=++te,K.length===0&&_e.length===0){let Fe=ta();return st(Z,Sr({matches:ae,loaderData:{},errors:$&&io($[1])?{[$[0]]:$[1].error}:null},u2($),Fe?{fetchers:new Map(x.fetchers)}:{}),{flushSync:tt}),{shortCircuited:!0}}if(!R&&(!c.v7_partialHydration||!Ee)){_e.forEach(ot=>{let cr=x.fetchers.get(ot.key),Ut=vh(void 0,cr?cr.data:void 0);x.fetchers.set(ot.key,Ut)});let Fe;$&&!io($[1])?Fe={[$[0]]:$[1].data}:x.actionData&&(Object.keys(x.actionData).length===0?Fe=null:Fe=x.actionData),ge(Sr({navigation:O},Fe!==void 0?{actionData:Fe}:{},_e.length>0?{fetchers:new Map(x.fetchers)}:{}),{flushSync:tt})}_e.forEach(Fe=>{W.has(Fe.key)&&Mn(Fe.key),Fe.controller&&W.set(Fe.key,Fe.controller)});let ke=()=>_e.forEach(Fe=>Mn(Fe.key));M&&M.signal.addEventListener("abort",ke);let{loaderResults:Ke,fetcherResults:Pt}=await en(x.matches,ae,K,_e,q);if(q.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",ke),_e.forEach(Fe=>W.delete(Fe.key));let zt=d2([...Ke,...Pt]);if(zt){if(zt.idx>=K.length){let Fe=_e[zt.idx-K.length].key;U.add(Fe)}return await jt(q,zt.result,{replace:Ne}),{shortCircuited:!0}}let{loaderData:it,errors:ht}=s2(x,ae,K,Ke,$,_e,Pt,D);D.forEach((Fe,ot)=>{Fe.subscribe(cr=>{(cr||Fe.done)&&D.delete(ot)})}),c.v7_partialHydration&&Ee&&x.errors&&Object.entries(x.errors).filter(Fe=>{let[ot]=Fe;return!K.some(cr=>cr.route.id===ot)}).forEach(Fe=>{let[ot,cr]=Fe;ht=Object.assign(ht||{},{[ot]:cr})});let er=ta(),He=Yl(G),Ot=er||He||_e.length>0;return Sr({loaderData:it,errors:ht},Ot?{fetchers:new Map(x.fetchers)}:{})}function zr(q,Z,ae,pe){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");W.has(q)&&Mn(q);let we=(pe&&pe.unstable_flushSync)===!0,et=s||a,Ne=iP(x.location,x.matches,l,c.v7_prependBasename,ae,c.v7_relativeSplatPath,Z,pe==null?void 0:pe.relative),Ee=md(et,Ne,l);if(!Ee){tn(q,Z,eo(404,{pathname:Ne}),{flushSync:we});return}let{path:tt,submission:$,error:O}=t2(c.v7_normalizeFormMethod,!0,Ne,pe);if(O){tn(q,Z,O,{flushSync:we});return}let F=aP(Ee,tt);if(I=(pe&&pe.preventScrollReset)===!0,$&&Ao($.formMethod)){Zt(q,Z,tt,F,Ee,we,$);return}N.set(q,{routeId:Z,path:tt}),Or(q,Z,tt,F,Ee,we,$)}async function Zt(q,Z,ae,pe,we,et,Ne){if(cn(),N.delete(q),!pe.route.action&&!pe.route.lazy){let Ut=eo(405,{method:Ne.formMethod,pathname:ae,routeId:Z});tn(q,Z,Ut,{flushSync:et});return}let Ee=x.fetchers.get(q);yr(q,_ce(Ne,Ee),{flushSync:et});let tt=new AbortController,$=jc(e.history,ae,tt.signal,Ne);W.set(q,tt);let O=te,B=(await ct("action",$,[pe],we))[0];if($.signal.aborted){W.get(q)===tt&&W.delete(q);return}if(c.v7_fetcherPersist&&k.has(q)){if(Pu(B)||io(B)){yr(q,Ls(void 0));return}}else{if(Pu(B))if(W.delete(q),G>O){yr(q,Ls(void 0));return}else return U.add(q),yr(q,vh(Ne)),jt($,B,{fetcherSubmission:Ne});if(io(B)){tn(q,Z,B.error);return}}if(xu(B))throw eo(400,{type:"defer-action"});let K=x.navigation.location||x.location,_e=jc(e.history,K,tt.signal),ke=s||a,Ke=x.navigation.state!=="idle"?md(ke,x.navigation.location,l):x.matches;mt(Ke,"Didn't find any matches after fetcher action");let Pt=++te;A.set(q,Pt);let zt=vh(Ne,B.data);x.fetchers.set(q,zt);let[it,ht]=r2(e.history,x,Ke,Ne,K,!1,c.unstable_skipActionErrorRevalidation,L,X,Q,k,N,U,ke,l,[pe.route.id,B]);ht.filter(Ut=>Ut.key!==q).forEach(Ut=>{let Ur=Ut.key,Qi=x.fetchers.get(Ur),Po=vh(void 0,Qi?Qi.data:void 0);x.fetchers.set(Ur,Po),W.has(Ur)&&Mn(Ur),Ut.controller&&W.set(Ur,Ut.controller)}),ge({fetchers:new Map(x.fetchers)});let er=()=>ht.forEach(Ut=>Mn(Ut.key));tt.signal.addEventListener("abort",er);let{loaderResults:He,fetcherResults:Ot}=await en(x.matches,Ke,it,ht,_e);if(tt.signal.aborted)return;tt.signal.removeEventListener("abort",er),A.delete(q),W.delete(q),ht.forEach(Ut=>W.delete(Ut.key));let Fe=d2([...He,...Ot]);if(Fe){if(Fe.idx>=it.length){let Ut=ht[Fe.idx-it.length].key;U.add(Ut)}return jt(_e,Fe.result)}let{loaderData:ot,errors:cr}=s2(x,x.matches,it,He,void 0,ht,Ot,D);if(x.fetchers.has(q)){let Ut=Ls(B.data);x.fetchers.set(q,Ut)}Yl(Pt),x.navigation.state==="loading"&&Pt>G?(mt(T,"Expected pending action"),M&&M.abort(),st(x.navigation.location,{matches:Ke,loaderData:ot,errors:cr,fetchers:new Map(x.fetchers)})):(ge({errors:cr,loaderData:l2(x.loaderData,ot,Ke,cr),fetchers:new Map(x.fetchers)}),L=!1)}async function Or(q,Z,ae,pe,we,et,Ne){let Ee=x.fetchers.get(q);yr(q,vh(Ne,Ee?Ee.data:void 0),{flushSync:et});let tt=new AbortController,$=jc(e.history,ae,tt.signal);W.set(q,tt);let O=te,B=(await ct("loader",$,[pe],we))[0];if(xu(B)&&(B=await t3(B,$.signal,!0)||B),W.get(q)===tt&&W.delete(q),!$.signal.aborted){if(k.has(q)){yr(q,Ls(void 0));return}if(Pu(B))if(G>O){yr(q,Ls(void 0));return}else{U.add(q),await jt($,B);return}if(io(B)){tn(q,Z,B.error);return}mt(!xu(B),"Unhandled fetcher deferred data"),yr(q,Ls(B.data))}}async function jt(q,Z,ae){let{submission:pe,fetcherSubmission:we,replace:et}=ae===void 0?{}:ae;Z.response.headers.has("X-Remix-Revalidate")&&(L=!0);let Ne=Z.response.headers.get("Location");mt(Ne,"Expected a Location header on the redirect Response"),Ne=o2(Ne,new URL(q.url),l);let Ee=hm(x.location,Ne,{_isRedirect:!0});if(r){let K=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))K=!0;else if(IT.test(Ne)){const _e=e.history.createURL(Ne);K=_e.origin!==t.location.origin||kf(_e.pathname,l)==null}if(K){et?t.location.replace(Ne):t.location.assign(Ne);return}}M=null;let tt=et===!0?Yr.Replace:Yr.Push,{formMethod:$,formAction:O,formEncType:F}=x.navigation;!pe&&!we&&$&&O&&F&&(pe=h2(x.navigation));let B=pe||we;if(ice.has(Z.response.status)&&B&&Ao(B.formMethod))await ye(tt,Ee,{submission:Sr({},B,{formAction:Ne}),preventScrollReset:I});else{let K=wS(Ee,pe);await ye(tt,Ee,{overrideNavigation:K,fetcherSubmission:we,preventScrollReset:I})}}async function ct(q,Z,ae,pe){try{let we=await fce(u,q,Z,ae,pe,o,i);return await Promise.all(we.map((et,Ne)=>{if(yce(et)){let Ee=et.result;return{type:_r.redirect,response:mce(Ee,Z,ae[Ne].route.id,pe,l,c.v7_relativeSplatPath)}}return pce(et)}))}catch(we){return ae.map(()=>({type:_r.error,error:we}))}}async function en(q,Z,ae,pe,we){let[et,...Ne]=await Promise.all([ae.length?ct("loader",we,ae,Z):[],...pe.map(Ee=>{if(Ee.matches&&Ee.match&&Ee.controller){let tt=jc(e.history,Ee.path,Ee.controller.signal);return ct("loader",tt,[Ee.match],Ee.matches).then($=>$[0])}else return Promise.resolve({type:_r.error,error:eo(404,{pathname:Ee.path})})})]);return await Promise.all([f2(q,ae,et,et.map(()=>we.signal),!1,x.loaderData),f2(q,pe.map(Ee=>Ee.match),Ne,pe.map(Ee=>Ee.controller?Ee.controller.signal:null),!0)]),{loaderResults:et,fetcherResults:Ne}}function cn(){L=!0,X.push(...Jl()),N.forEach((q,Z)=>{W.has(Z)&&(Q.push(Z),Mn(Z))})}function yr(q,Z,ae){ae===void 0&&(ae={}),x.fetchers.set(q,Z),ge({fetchers:new Map(x.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function tn(q,Z,ae,pe){pe===void 0&&(pe={});let we=dp(x.matches,Z);Ar(q),ge({errors:{[we.route.id]:ae},fetchers:new Map(x.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function An(q){return c.v7_fetcherPersist&&(E.set(q,(E.get(q)||0)+1),k.has(q)&&k.delete(q)),x.fetchers.get(q)||oce}function Ar(q){let Z=x.fetchers.get(q);W.has(q)&&!(Z&&Z.state==="loading"&&A.has(q))&&Mn(q),N.delete(q),A.delete(q),U.delete(q),k.delete(q),x.fetchers.delete(q)}function Dn(q){if(c.v7_fetcherPersist){let Z=(E.get(q)||0)-1;Z<=0?(E.delete(q),k.add(q)):E.set(q,Z)}else Ar(q);ge({fetchers:new Map(x.fetchers)})}function Mn(q){let Z=W.get(q);mt(Z,"Expected fetch controller: "+q),Z.abort(),W.delete(q)}function Is(q){for(let Z of q){let ae=An(Z),pe=Ls(ae.data);x.fetchers.set(Z,pe)}}function ta(){let q=[],Z=!1;for(let ae of U){let pe=x.fetchers.get(ae);mt(pe,"Expected fetcher: "+ae),pe.state==="loading"&&(U.delete(ae),q.push(ae),Z=!0)}return Is(q),Z}function Yl(q){let Z=[];for(let[ae,pe]of A)if(pe<q){let we=x.fetchers.get(ae);mt(we,"Expected fetcher: "+ae),we.state==="loading"&&(Mn(ae),A.delete(ae),Z.push(ae))}return Is(Z),Z.length>0}function xo(q,Z){let ae=x.blockers.get(q)||mh;return ee.get(q)!==Z&&ee.set(q,Z),ae}function ra(q){x.blockers.delete(q),ee.delete(q)}function Sn(q,Z){let ae=x.blockers.get(q)||mh;mt(ae.state==="unblocked"&&Z.state==="blocked"||ae.state==="blocked"&&Z.state==="blocked"||ae.state==="blocked"&&Z.state==="proceeding"||ae.state==="blocked"&&Z.state==="unblocked"||ae.state==="proceeding"&&Z.state==="unblocked","Invalid blocker state transition: "+ae.state+" -> "+Z.state);let pe=new Map(x.blockers);pe.set(q,Z),ge({blockers:pe})}function Xl(q){let{currentLocation:Z,nextLocation:ae,historyAction:pe}=q;if(ee.size===0)return;ee.size>1&&Yu(!1,"A router only supports one blocker at a time");let we=Array.from(ee.entries()),[et,Ne]=we[we.length-1],Ee=x.blockers.get(et);if(!(Ee&&Ee.state==="proceeding")&&Ne({currentLocation:Z,nextLocation:ae,historyAction:pe}))return et}function Jl(q){let Z=[];return D.forEach((ae,pe)=>{(!q||q(pe))&&(ae.cancel(),Z.push(pe),D.delete(pe))}),Z}function Sc(q,Z,ae){if(h=q,v=Z,m=ae||null,!w&&x.navigation===bS){w=!0;let pe=Gi(x.location,x.matches);pe!=null&&ge({restoreScrollPosition:pe})}return()=>{h=null,v=null,m=null}}function na(q,Z){return m&&m(q,Z.map(pe=>Due(pe,x.loaderData)))||q.key}function Xf(q,Z){if(h&&v){let ae=na(q,Z);h[ae]=v()}}function Gi(q,Z){if(h){let ae=na(q,Z),pe=h[ae];if(typeof pe=="number")return pe}return null}function ia(q){o={},s=nP(q,i,void 0,o)}return C={get basename(){return l},get future(){return c},get state(){return x},get routes(){return a},get window(){return t},initialize:ve,subscribe:$e,enableScrollRestoration:Sc,navigate:Vt,fetch:zr,revalidate:ce,createHref:q=>e.history.createHref(q),encodeLocation:q=>e.history.encodeLocation(q),getFetcher:An,deleteFetcher:Dn,dispose:Se,getBlocker:xo,deleteBlocker:ra,_internalFetchControllers:W,_internalActiveDeferreds:D,_internalSetRoutes:ia},C}function lce(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function iP(e,t,r,n,i,o,a,s){let l,u;if(a){l=[];for(let d of t)if(l.push(d),d.route.id===a){u=d;break}}else l=t,u=t[t.length-1];let c=TT(i||".",ET(l,o),kf(e.pathname,r)||e.pathname,s==="path");return i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&u&&u.route.index&&!kT(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(c.pathname=c.pathname==="/"?r:ts([r,c.pathname])),Xu(c)}function t2(e,t,r,n){if(!n||!lce(n))return{path:r};if(n.formMethod&&!wce(n.formMethod))return{path:r,error:eo(405,{method:n.formMethod})};let i=()=>({path:r,error:eo(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=ZB(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ao(a))return i();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,m)=>{let[v,w]=m;return""+h+v+"="+w+`
368
- `},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Ao(a))return i();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}mt(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=oP(n.formData),u=n.formData;else if(n.body instanceof FormData)l=oP(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=a2(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=a2(l)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ao(c.formMethod))return{path:r,submission:c};let d=Ul(r);return t&&d.search&&kT(d.search)&&l.append("index",""),d.search="?"+l,{path:Xu(d),submission:c}}function uce(e,t){let r=e;if(t){let n=e.findIndex(i=>i.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function r2(e,t,r,n,i,o,a,s,l,u,c,d,f,h,m,v){let w=v?io(v[1])?v[1].error:v[1].data:void 0,p=e.createURL(t.location),g=e.createURL(i),b=v&&io(v[1])?v[0]:void 0,_=b?uce(r,b):r,P=v?v[1].statusCode:void 0,C=a&&P&&P>=400,x=_.filter((I,M)=>{let{route:H}=I;if(H.lazy)return!0;if(H.loader==null)return!1;if(o)return typeof H.loader!="function"||H.loader.hydrate?!0:t.loaderData[H.id]===void 0&&(!t.errors||t.errors[H.id]===void 0);if(cce(t.loaderData,t.matches[M],I)||l.some(R=>R===I.route.id))return!0;let re=t.matches[M],ie=I;return n2(I,Sr({currentUrl:p,currentParams:re.params,nextUrl:g,nextParams:ie.params},n,{actionResult:w,unstable_actionStatus:P,defaultShouldRevalidate:C?!1:s||p.pathname+p.search===g.pathname+g.search||p.search!==g.search||JB(re,ie)}))}),T=[];return d.forEach((I,M)=>{if(o||!r.some(L=>L.route.id===I.routeId)||c.has(M))return;let H=md(h,I.path,m);if(!H){T.push({key:M,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let re=t.fetchers.get(M),ie=aP(H,I.path),R=!1;f.has(M)?R=!1:u.includes(M)?R=!0:re&&re.state!=="idle"&&re.data===void 0?R=s:R=n2(ie,Sr({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:r[r.length-1].params},n,{actionResult:w,unstable_actionStatus:P,defaultShouldRevalidate:C?!1:s})),R&&T.push({key:M,routeId:I.routeId,path:I.path,matches:H,match:ie,controller:new AbortController})}),[x,T]}function cce(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function JB(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function n2(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function i2(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];mt(i,"No route found in manifest");let o={};for(let a in n){let l=i[a]!==void 0&&a!=="hasErrorBoundary";Yu(!l,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!l&&!$ue.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Sr({},t(i),{lazy:void 0}))}function dce(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function fce(e,t,r,n,i,o,a,s){let l=n.reduce((d,f)=>d.add(f.route.id),new Set),u=new Set,c=await e({matches:i.map(d=>{let f=l.has(d.route.id);return Sr({},d,{shouldLoad:f,resolve:m=>(u.add(d.route.id),f?hce(t,r,d,o,a,m,s):Promise.resolve({type:_r.data,result:void 0}))})}),request:r,params:i[0].params,context:s});return i.forEach(d=>mt(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),c.filter((d,f)=>l.has(i[f].route.id))}async function hce(e,t,r,n,i,o,a){let s,l,u=c=>{let d,f=new Promise((v,w)=>d=w);l=()=>d(),t.signal.addEventListener("abort",l);let h=v=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):c({request:t,params:r.params,context:a},...v!==void 0?[v]:[]),m;return o?m=o(v=>h(v)):m=(async()=>{try{return{type:"data",result:await h()}}catch(v){return{type:"error",result:v}}})(),Promise.race([m,f])};try{let c=r.route[e];if(r.route.lazy)if(c){let d,[f]=await Promise.all([u(c).catch(h=>{d=h}),i2(r.route,i,n)]);if(d!==void 0)throw d;s=f}else if(await i2(r.route,i,n),c=r.route[e],c)s=await u(c);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw eo(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:_r.data,result:void 0};else if(c)s=await u(c);else{let d=new URL(t.url),f=d.pathname+d.search;throw eo(404,{pathname:f})}mt(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:_r.error,result:c}}finally{l&&t.signal.removeEventListener("abort",l)}return s}async function pce(e){let{result:t,type:r,status:n}=e;if(e3(t)){let a;try{let s=t.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?t.body==null?a=null:a=await t.json():a=await t.text()}catch(s){return{type:_r.error,error:s}}return r===_r.error?{type:_r.error,error:new OT(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:_r.data,data:a,statusCode:t.status,headers:t.headers}}if(r===_r.error)return{type:_r.error,error:t,statusCode:RT(t)?t.status:n};if(bce(t)){var i,o;return{type:_r.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:_r.data,data:t,statusCode:n}}function mce(e,t,r,n,i,o){let a=e.headers.get("Location");if(mt(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!IT.test(a)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);a=iP(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function o2(e,t,r){if(IT.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=kf(i.pathname,r)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function jc(e,t,r,n){let i=e.createURL(ZB(t)).toString(),o={signal:r};if(n&&Ao(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=oP(n.formData):o.body=n.formData}return new Request(i,o)}function oP(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function a2(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function vce(e,t,r,n,i,o){let a={},s=null,l,u=!1,c={},d=n&&io(n[1])?n[1].error:void 0;return r.forEach((f,h)=>{let m=t[h].route.id;if(mt(!Pu(f),"Cannot handle redirect results in processLoaderData"),io(f)){let v=f.error;d!==void 0&&(v=d,d=void 0),s=s||{};{let w=dp(e,m);s[w.route.id]==null&&(s[w.route.id]=v)}a[m]=void 0,u||(u=!0,l=RT(f.error)?f.error.status:500),f.headers&&(c[m]=f.headers)}else xu(f)?(i.set(m,f.deferredData),a[m]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!u&&(l=f.statusCode),f.headers&&(c[m]=f.headers)):(a[m]=f.data,f.statusCode&&f.statusCode!==200&&!u&&(l=f.statusCode),f.headers&&(c[m]=f.headers))}),d!==void 0&&n&&(s={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:l||200,loaderHeaders:c}}function s2(e,t,r,n,i,o,a,s){let{loaderData:l,errors:u}=vce(t,r,n,i,s);for(let c=0;c<o.length;c++){let{key:d,match:f,controller:h}=o[c];mt(a!==void 0&&a[c]!==void 0,"Did not find corresponding fetcher result");let m=a[c];if(!(h&&h.signal.aborted))if(io(m)){let v=dp(e.matches,f==null?void 0:f.route.id);u&&u[v.route.id]||(u=Sr({},u,{[v.route.id]:m.error})),e.fetchers.delete(d)}else if(Pu(m))mt(!1,"Unhandled fetcher revalidation redirect");else if(xu(m))mt(!1,"Unhandled fetcher deferred data");else{let v=Ls(m.data);e.fetchers.set(d,v)}}return{loaderData:l,errors:u}}function l2(e,t,r,n){let i=Sr({},t);for(let o of r){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),n&&n.hasOwnProperty(a))break}return i}function u2(e){return e?io(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function dp(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function c2(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eo(e,t){let{pathname:r,routeId:n,method:i,type:o}=t===void 0?{}:t,a="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&r&&n?s="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",s='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",i&&r&&n?s="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new OT(e||500,a,new Error(s),!0)}function d2(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Pu(r))return{result:r,idx:t}}}function ZB(e){let t=typeof e=="string"?Ul(e):e;return Xu(Sr({},t,{hash:""}))}function gce(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function yce(e){return e3(e.result)&&nce.has(e.result.status)}function xu(e){return e.type===_r.deferred}function io(e){return e.type===_r.error}function Pu(e){return(e&&e.type)===_r.redirect}function bce(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function e3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function wce(e){return rce.has(e.toLowerCase())}function Ao(e){return ece.has(e.toLowerCase())}async function f2(e,t,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],l=t[a];if(!l)continue;let u=e.find(d=>d.route.id===l.route.id),c=u!=null&&!JB(u,l)&&(o&&o[l.route.id])!==void 0;if(xu(s)&&(i||c)){let d=n[a];mt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await t3(s,d,i).then(f=>{f&&(r[a]=f||r[a])})}}}async function t3(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:_r.data,data:e.deferredData.unwrappedData}}catch(i){return{type:_r.error,error:i}}return{type:_r.data,data:e.deferredData.data}}}function kT(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function aP(e,t){let r=typeof t=="string"?Ul(t).search:t.search;if(e[e.length-1].route.index&&kT(r||""))return e[e.length-1];let n=QB(e);return n[n.length-1]}function h2(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:o,json:a}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function wS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Sce(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vh(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function _ce(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ls(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function xce(e,t){try{let r=e.sessionStorage.getItem(XB);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Pce(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(XB,JSON.stringify(r))}catch(n){Yu(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
369
- * React Router v6.23.1
370
- *
371
- * Copyright (c) Remix Software Inc.
372
- *
373
- * This source code is licensed under the MIT license found in the
374
- * LICENSE.md file in the root directory of this source tree.
375
- *
376
- * @license MIT
377
- */function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P0.apply(this,arguments)}const iw=S.createContext(null),r3=S.createContext(null),fc=S.createContext(null),jT=S.createContext(null),Cs=S.createContext({outlet:null,matches:[],isDataRoute:!1}),n3=S.createContext(null);function Cce(e,t){let{relative:r}=t===void 0?{}:t;dv()||mt(!1);let{basename:n,navigator:i}=S.useContext(fc),{hash:o,pathname:a,search:s}=o3(e,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:ts([n,a])),i.createHref({pathname:l,search:s,hash:o})}function dv(){return S.useContext(jT)!=null}function jf(){return dv()||mt(!1),S.useContext(jT).location}function i3(e){S.useContext(fc).static||S.useLayoutEffect(e)}function ql(){let{isDataRoute:e}=S.useContext(Cs);return e?Lce():Ece()}function Ece(){dv()||mt(!1);let e=S.useContext(iw),{basename:t,future:r,navigator:n}=S.useContext(fc),{matches:i}=S.useContext(Cs),{pathname:o}=jf(),a=JSON.stringify(ET(i,r.v7_relativeSplatPath)),s=S.useRef(!1);return i3(()=>{s.current=!0}),S.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=TT(u,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ts([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,a,o,e])}const Tce=S.createContext(null);function Oce(e){let t=S.useContext(Cs).outlet;return t&&S.createElement(Tce.Provider,{value:e},t)}function Rce(){let{matches:e}=S.useContext(Cs),t=e[e.length-1];return t?t.params:{}}function o3(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=S.useContext(fc),{matches:i}=S.useContext(Cs),{pathname:o}=jf(),a=JSON.stringify(ET(i,n.v7_relativeSplatPath));return S.useMemo(()=>TT(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function Ice(e,t,r,n){dv()||mt(!1);let{navigator:i}=S.useContext(fc),{matches:o}=S.useContext(Cs),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=jf(),c;c=u;let d=c.pathname||"/",f=d;if(l!=="/"){let v=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let h=md(e,{pathname:f});return Dce(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:ts([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:ts([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,r,n)}function kce(){let e=AT(),t=RT(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:i},r):null,null)}const jce=S.createElement(kce,null);class $ce extends S.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?S.createElement(Cs.Provider,{value:this.props.routeContext},S.createElement(n3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ace(e){let{routeContext:t,match:r,children:n}=e,i=S.useContext(iw);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(Cs.Provider,{value:t},n)}function Dce(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);c>=0||mt(!1),a=a.slice(0,Math.min(a.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,m=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||m){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let h,m=!1,v=null,w=null;r&&(h=s&&d.route.id?s[d.route.id]:void 0,v=d.route.errorElement||jce,l&&(u<0&&f===0?(m=!0,w=null):u===f&&(m=!0,w=d.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,f+1)),g=()=>{let b;return h?b=v:m?b=w:d.route.Component?b=S.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,S.createElement(Ace,{match:d,routeContext:{outlet:c,matches:p,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?S.createElement($ce,{location:r.location,revalidation:r.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var $T=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($T||{}),Ju=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ju||{});function a3(e){let t=S.useContext(iw);return t||mt(!1),t}function ow(e){let t=S.useContext(r3);return t||mt(!1),t}function Mce(e){let t=S.useContext(Cs);return t||mt(!1),t}function s3(e){let t=Mce(),r=t.matches[t.matches.length-1];return r.route.id||mt(!1),r.route.id}function Nce(){return ow(Ju.UseNavigation).navigation}function Fce(){let e=a3($T.UseRevalidator),t=ow(Ju.UseRevalidator);return S.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function _o(e){return ow(Ju.UseRouteLoaderData).loaderData[e]}function AT(){var e;let t=S.useContext(n3),r=ow(Ju.UseRouteError),n=s3(Ju.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Lce(){let{router:e}=a3($T.UseNavigateStable),t=s3(Ju.UseNavigateStable),r=S.useRef(!1);return i3(()=>{r.current=!0}),S.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,P0({fromRouteId:t},o)))},[e,t])}function C0(e){return Oce(e.context)}function Bce(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Yr.Pop,navigator:o,static:a=!1,future:s}=e;dv()&&mt(!1);let l=t.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:l,navigator:o,static:a,future:P0({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof n=="string"&&(n=Ul(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:m="default"}=n,v=S.useMemo(()=>{let w=kf(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:m},navigationType:i}},[l,c,d,f,h,m,i]);return v==null?null:S.createElement(fc.Provider,{value:u},S.createElement(jT.Provider,{children:r,value:v}))}new Promise(()=>{});function Vce(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:S.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
378
- * React Router DOM v6.23.1
379
- *
380
- * Copyright (c) Remix Software Inc.
381
- *
382
- * This source code is licensed under the MIT license found in the
383
- * LICENSE.md file in the root directory of this source tree.
384
- *
385
- * @license MIT
386
- */function pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pm.apply(this,arguments)}function zce(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Uce(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qce(e,t){return e.button===0&&(!t||t==="_self")&&!Uce(e)}function sP(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function Hce(e,t){let r=sP(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)})}),r}const Wce=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Kce="6";try{window.__reactRouterVersion=Kce}catch{}function Gce(e,t){return sce({basename:void 0,future:pm({},void 0,{v7_prependBasename:!0}),history:Iue({window:void 0}),hydrationData:Qce(),routes:e,mapRouteProperties:Vce,unstable_dataStrategy:void 0,window:void 0}).initialize()}function Qce(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=pm({},t,{errors:Yce(t.errors)})),t}function Yce(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new OT(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let o=new Error(i.message);o.stack="",r[n]=o}}else r[n]=i;return r}const Xce=S.createContext({isTransitioning:!1}),Jce=S.createContext(new Map),Zce="startTransition",p2=m_[Zce],ede="flushSync",m2=A9[ede];function tde(e){p2?p2(e):e()}function gh(e){m2?m2(e):e()}class rde{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function nde(e){let{fallbackElement:t,router:r,future:n}=e,[i,o]=S.useState(r.state),[a,s]=S.useState(),[l,u]=S.useState({isTransitioning:!1}),[c,d]=S.useState(),[f,h]=S.useState(),[m,v]=S.useState(),w=S.useRef(new Map),{v7_startTransition:p}=n||{},g=S.useCallback(x=>{p?tde(x):x()},[p]),b=S.useCallback((x,T)=>{let{deletedFetchers:I,unstable_flushSync:M,unstable_viewTransitionOpts:H}=T;I.forEach(ie=>w.current.delete(ie)),x.fetchers.forEach((ie,R)=>{ie.data!==void 0&&w.current.set(R,ie.data)});let re=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!H||re){M?gh(()=>o(x)):g(()=>o(x));return}if(M){gh(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:H.currentLocation,nextLocation:H.nextLocation})});let ie=r.window.document.startViewTransition(()=>{gh(()=>o(x))});ie.finished.finally(()=>{gh(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})})}),gh(()=>h(ie));return}f?(c&&c.resolve(),f.skipTransition(),v({state:x,currentLocation:H.currentLocation,nextLocation:H.nextLocation})):(s(x),u({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}))},[r.window,f,c,w,g]);S.useLayoutEffect(()=>r.subscribe(b),[r,b]),S.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new rde)},[l]),S.useEffect(()=>{if(c&&a&&r.window){let x=a,T=c.promise,I=r.window.document.startViewTransition(async()=>{g(()=>o(x)),await T});I.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(I)}},[g,a,c,r.window]),S.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,f,i.location,a]),S.useEffect(()=>{!l.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[l.isTransitioning,m]),S.useEffect(()=>{},[]);let _=S.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:x=>r.navigate(x),push:(x,T,I)=>r.navigate(x,{state:T,preventScrollReset:I==null?void 0:I.preventScrollReset}),replace:(x,T,I)=>r.navigate(x,{replace:!0,state:T,preventScrollReset:I==null?void 0:I.preventScrollReset})}),[r]),P=r.basename||"/",C=S.useMemo(()=>({router:r,navigator:_,static:!1,basename:P}),[r,_,P]);return S.createElement(S.Fragment,null,S.createElement(iw.Provider,{value:C},S.createElement(r3.Provider,{value:i},S.createElement(Jce.Provider,{value:w.current},S.createElement(Xce.Provider,{value:l},S.createElement(Bce,{basename:P,location:i.location,navigationType:i.historyAction,navigator:_,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?S.createElement(ide,{routes:r.routes,future:r.future,state:i}):t))))),null)}function ide(e){let{routes:t,future:r,state:n}=e;return Ice(t,void 0,n,r)}const ode=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ade=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wo=S.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=t,f=zce(t,Wce),{basename:h}=S.useContext(fc),m,v=!1;if(typeof u=="string"&&ade.test(u)&&(m=u,ode))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),P=kf(_.pathname,h);_.origin===b.origin&&P!=null?u=P+_.search+_.hash:v=!0}catch{}let w=Cce(u,{relative:i}),p=sde(u,{replace:a,state:s,target:l,preventScrollReset:c,relative:i,unstable_viewTransition:d});function g(b){n&&n(b),b.defaultPrevented||p(b)}return S.createElement("a",pm({},f,{href:m||w,onClick:v||o?n:g,ref:r,target:l}))});var v2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(v2||(v2={}));var g2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(g2||(g2={}));function sde(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=ql(),u=jf(),c=o3(e,{relative:a});return S.useCallback(d=>{if(qce(d,r)){d.preventDefault();let f=n!==void 0?n:Xu(u)===Xu(c);l(e,{replace:f,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[u,l,c,n,i,r,e,o,a,s])}function lde(e){let t=S.useRef(sP(e)),r=S.useRef(!1),n=jf(),i=S.useMemo(()=>Hce(n.search,r.current?null:t.current),[n.search]),o=ql(),a=S.useCallback((s,l)=>{const u=sP(typeof s=="function"?s(i):s);r.current=!0,o("?"+u,l)},[o,i]);return[i,a]}var SS="Invariant Violation",y2=Object.setPrototypeOf,ude=y2===void 0?function(e,t){return e.__proto__=t,e}:y2,l3=function(e){Jo(t,e);function t(r){r===void 0&&(r=SS);var n=e.call(this,typeof r=="number"?SS+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=SS,ude(n,t.prototype),n}return t}(Error);function hu(e,t){if(!e)throw new l3(t)}var u3=["debug","log","warn","error","silent"],cde=u3.indexOf("log");function yg(e){return function(){if(u3.indexOf(e)>=cde){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=yg("debug"),e.log=yg("log"),e.warn=yg("warn"),e.error=yg("error")})(hu||(hu={}));var DT="3.10.4";function Mo(e){try{return e()}catch{}}const lP=Mo(function(){return globalThis})||Mo(function(){return window})||Mo(function(){return self})||Mo(function(){return global})||Mo(function(){return Mo.constructor("return this")()});var b2=new Map;function uP(e){var t=b2.get(e)||1;return b2.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function c3(e,t){t===void 0&&(t=0);var r=uP("stringifyForDisplay");return JSON.stringify(e,function(n,i){return i===void 0?r:i},t).split(JSON.stringify(r)).join("<undefined>")}function bg(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(typeof t=="number"){var i=t;t=MT(i),t||(t=NT(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var Qe=Object.assign(function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t||hu(t,MT(r,n)||NT(r,n))},{debug:bg(hu.debug),log:bg(hu.log),warn:bg(hu.warn),error:bg(hu.error)});function ei(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new l3(MT(e,t)||NT(e,t))}var w2=Symbol.for("ApolloErrorMessageHandler_"+DT);function d3(e){return typeof e=="string"?e:c3(e,2).slice(0,1e3)}function MT(e,t){if(t===void 0&&(t=[]),!!e)return lP[w2]&&lP[w2](e,t.map(d3))}function NT(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:DT,message:e,args:t.map(d3)})))}function fy(e,t){if(!!!e)throw new Error(t)}function dde(e){return typeof e=="object"&&e!==null}function fde(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const hde=/\r\n|[\n\r]/g;function cP(e,t){let r=0,n=1;for(const i of e.body.matchAll(hde)){if(typeof i.index=="number"||fde(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function pde(e){return f3(e.source,cP(e.source,e.start))}function f3(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=t.line===1?r:0,l=t.column+s,u=`${e.name}:${a}:${l}
387
- `,c=n.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){const f=Math.floor(l/80),h=l%80,m=[];for(let v=0;v<d.length;v+=80)m.push(d.slice(v,v+80));return u+S2([[`${a} |`,m[0]],...m.slice(1,f+1).map(v=>["|",v]),["|","^".padStart(h)],["|",m[f+1]]])}return u+S2([[`${a-1} |`,c[i-1]],[`${a} |`,d],["|","^".padStart(l)],[`${a+1} |`,c[i+1]]])}function S2(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
388
- `)}function mde(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class FT extends Error{constructor(t,...r){var n,i,o;const{nodes:a,source:s,positions:l,path:u,originalError:c,extensions:d}=mde(r);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=c??void 0,this.nodes=_2(Array.isArray(a)?a:a?[a]:void 0);const f=_2((n=this.nodes)===null||n===void 0?void 0:n.map(m=>m.loc).filter(m=>m!=null));this.source=s??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=l??(f==null?void 0:f.map(m=>m.start)),this.locations=l&&s?l.map(m=>cP(s,m)):f==null?void 0:f.map(m=>cP(m.source,m.start));const h=dde(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(o=d??h)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,FT):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
389
-
390
- `+pde(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
391
-
392
- `+f3(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function _2(e){return e===void 0||e.length===0?void 0:e}function mn(e,t,r){return new FT(`Syntax Error: ${r}`,{source:e,positions:[t]})}class vde{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class h3{constructor(t,r,n,i,o,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const p3={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},gde=new Set(Object.keys(p3));function x2(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&gde.has(t)}var vd;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(vd||(vd={}));var dP;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(dP||(dP={}));var Oe;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Oe||(Oe={}));function fP(e){return e===9||e===32}function mm(e){return e>=48&&e<=57}function m3(e){return e>=97&&e<=122||e>=65&&e<=90}function v3(e){return m3(e)||e===95}function yde(e){return m3(e)||mm(e)||e===95}function bde(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var o;const s=e[a],l=wde(s);l!==s.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&l<r&&(r=l))}return e.map((a,s)=>s===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function wde(e){let t=0;for(;t<e.length&&fP(e.charCodeAt(t));)++t;return t}function Sde(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(h=>h.length===0||fP(h.charCodeAt(0))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,l=e.endsWith("\\"),u=s||l,c=!i||e.length>70||u||o||a;let d="";const f=i&&fP(e.charCodeAt(0));return(c&&!f||o)&&(d+=`
393
- `),d+=r,(c||u)&&(d+=`
394
- `),'"""'+d+'"""'}var se;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(se||(se={}));class _de{constructor(t){const r=new h3(se.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==se.EOF)do if(t.next)t=t.next;else{const r=Pde(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===se.COMMENT);return t}}function xde(e){return e===se.BANG||e===se.DOLLAR||e===se.AMP||e===se.PAREN_L||e===se.PAREN_R||e===se.SPREAD||e===se.COLON||e===se.EQUALS||e===se.AT||e===se.BRACKET_L||e===se.BRACKET_R||e===se.BRACE_L||e===se.PIPE||e===se.BRACE_R}function $f(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function aw(e,t){return g3(e.charCodeAt(t))&&y3(e.charCodeAt(t+1))}function g3(e){return e>=55296&&e<=56319}function y3(e){return e>=56320&&e<=57343}function Zu(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return se.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Qr(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new h3(t,r,n,o,a,i)}function Pde(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Cde(e,i);case 33:return Qr(e,se.BANG,i,i+1);case 36:return Qr(e,se.DOLLAR,i,i+1);case 38:return Qr(e,se.AMP,i,i+1);case 40:return Qr(e,se.PAREN_L,i,i+1);case 41:return Qr(e,se.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Qr(e,se.SPREAD,i,i+3);break;case 58:return Qr(e,se.COLON,i,i+1);case 61:return Qr(e,se.EQUALS,i,i+1);case 64:return Qr(e,se.AT,i,i+1);case 91:return Qr(e,se.BRACKET_L,i,i+1);case 93:return Qr(e,se.BRACKET_R,i,i+1);case 123:return Qr(e,se.BRACE_L,i,i+1);case 124:return Qr(e,se.PIPE,i,i+1);case 125:return Qr(e,se.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?kde(e,i):Tde(e,i)}if(mm(o)||o===45)return Ede(e,i,o);if(v3(o))return jde(e,i);throw mn(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:$f(o)||aw(r,i)?`Unexpected character: ${Zu(e,i)}.`:`Invalid character: ${Zu(e,i)}.`)}return Qr(e,se.EOF,n,n)}function Cde(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if($f(o))++i;else if(aw(r,i))i+=2;else break}return Qr(e,se.COMMENT,t,i,r.slice(t+1,i))}function Ede(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),mm(o))throw mn(e.source,i,`Invalid number, unexpected digit after 0: ${Zu(e,i)}.`)}else i=_S(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=_S(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=_S(e,i,o),o=n.charCodeAt(i)),o===46||v3(o))throw mn(e.source,i,`Invalid number, expected digit but got: ${Zu(e,i)}.`);return Qr(e,a?se.FLOAT:se.INT,t,i,n.slice(t,i))}function _S(e,t,r){if(!mm(r))throw mn(e.source,t,`Invalid number, expected digit but got: ${Zu(e,t)}.`);const n=e.source.body;let i=t+1;for(;mm(n.charCodeAt(i));)++i;return i}function Tde(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const s=r.charCodeAt(i);if(s===34)return a+=r.slice(o,i),Qr(e,se.STRING,t,i+1,a);if(s===92){a+=r.slice(o,i);const l=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?Ode(e,i):Rde(e,i):Ide(e,i);a+=l.value,i+=l.size,o=i;continue}if(s===10||s===13)break;if($f(s))++i;else if(aw(r,i))i+=2;else throw mn(e.source,i,`Invalid character within String: ${Zu(e,i)}.`)}throw mn(e.source,i,"Unterminated string.")}function Ode(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!$f(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|Lh(o),n<0)break}throw mn(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function Rde(e,t){const r=e.source.body,n=P2(r,t+2);if($f(n))return{value:String.fromCodePoint(n),size:6};if(g3(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=P2(r,t+8);if(y3(i))return{value:String.fromCodePoint(n,i),size:12}}throw mn(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function P2(e,t){return Lh(e.charCodeAt(t))<<12|Lh(e.charCodeAt(t+1))<<8|Lh(e.charCodeAt(t+2))<<4|Lh(e.charCodeAt(t+3))}function Lh(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ide(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
395
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw mn(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function kde(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const l=[];for(;o<n;){const u=r.charCodeAt(o);if(u===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){s+=r.slice(a,o),l.push(s);const c=Qr(e,se.BLOCK_STRING,t,o+3,bde(l).join(`
396
- `));return e.line+=l.length-1,e.lineStart=i,c}if(u===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){s+=r.slice(a,o),a=o+1,o+=4;continue}if(u===10||u===13){s+=r.slice(a,o),l.push(s),u===13&&r.charCodeAt(o+1)===10?o+=2:++o,s="",a=o,i=o;continue}if($f(u))++o;else if(aw(r,o))o+=2;else throw mn(e.source,o,`Invalid character within String: ${Zu(e,o)}.`)}throw mn(e.source,o,"Unterminated string.")}function jde(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(yde(o))++i;else break}return Qr(e,se.NAME,t,i,r.slice(t,i))}const $de=10,b3=2;function LT(e){return sw(e,[])}function sw(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Ade(e,t);default:return String(e)}}function Ade(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(Dde(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:sw(n,r)}else if(Array.isArray(e))return Nde(e,r);return Mde(e,r)}function Dde(e){return typeof e.toJSON=="function"}function Mde(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>b3?"["+Fde(e)+"]":"{ "+r.map(([i,o])=>i+": "+sw(o,t)).join(", ")+" }"}function Nde(e,t){if(e.length===0)return"[]";if(t.length>b3)return"[Array]";const r=Math.min($de,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(sw(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function Fde(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Lde=globalThis.process?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;if(typeof t=="object"&&t!==null){var n;const i=r.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(i===o){const a=LT(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm.
397
-
398
- Ensure that there is only one instance of "graphql" in the node_modules
399
- directory. If different versions of "graphql" are the dependencies of other
400
- relied on modules, use "resolutions" to ensure only one version is installed.
401
-
402
- https://yarnpkg.com/en/docs/selective-version-resolutions
403
-
404
- Duplicate "graphql" modules cannot be used at the same time since different
405
- versions may have different capabilities and behavior. The data from one
406
- version used in the function from another could produce confusing and
407
- spurious results.`)}}return!1};class w3{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||fy(!1,`Body must be a string. Received: ${LT(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||fy(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||fy(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Bde(e){return Lde(e,w3)}function S3(e,t){return new Vde(e,t).parseDocument()}class Vde{constructor(t,r={}){const n=Bde(t)?t:new w3(t);this._lexer=new _de(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(se.NAME);return this.node(t,{kind:Oe.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Oe.DOCUMENT,definitions:this.many(se.SOF,this.parseDefinition,se.EOF)})}parseDefinition(){if(this.peek(se.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===se.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw mn(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(se.BRACE_L))return this.node(t,{kind:Oe.OPERATION_DEFINITION,operation:vd.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(se.NAME)&&(n=this.parseName()),this.node(t,{kind:Oe.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(se.NAME);switch(t.value){case"query":return vd.QUERY;case"mutation":return vd.MUTATION;case"subscription":return vd.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(se.PAREN_L,this.parseVariableDefinition,se.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Oe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(se.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(se.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(se.DOLLAR),this.node(t,{kind:Oe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Oe.SELECTION_SET,selections:this.many(se.BRACE_L,this.parseSelection,se.BRACE_R)})}parseSelection(){return this.peek(se.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(se.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Oe.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(se.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(se.PAREN_L,r,se.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(se.COLON),this.node(r,{kind:Oe.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(se.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(se.NAME)?this.node(t,{kind:Oe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Oe.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Oe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Oe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case se.BRACKET_L:return this.parseList(t);case se.BRACE_L:return this.parseObject(t);case se.INT:return this.advanceLexer(),this.node(r,{kind:Oe.INT,value:r.value});case se.FLOAT:return this.advanceLexer(),this.node(r,{kind:Oe.FLOAT,value:r.value});case se.STRING:case se.BLOCK_STRING:return this.parseStringLiteral();case se.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Oe.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Oe.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Oe.NULL});default:return this.node(r,{kind:Oe.ENUM,value:r.value})}case se.DOLLAR:if(t)if(this.expectToken(se.DOLLAR),this._lexer.token.kind===se.NAME){const n=this._lexer.token.value;throw mn(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Oe.STRING,value:t.value,block:t.kind===se.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Oe.LIST,values:this.any(se.BRACKET_L,r,se.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Oe.OBJECT,fields:this.any(se.BRACE_L,r,se.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(se.COLON),this.node(r,{kind:Oe.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(se.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(se.AT),this.node(r,{kind:Oe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(se.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(se.BRACKET_R),r=this.node(t,{kind:Oe.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(se.BANG)?this.node(t,{kind:Oe.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Oe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(se.STRING)||this.peek(se.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(se.BRACE_L,this.parseOperationTypeDefinition,se.BRACE_R);return this.node(t,{kind:Oe.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(se.COLON);const n=this.parseNamedType();return this.node(t,{kind:Oe.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Oe.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Oe.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(se.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(se.BRACE_L,this.parseFieldDefinition,se.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(se.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Oe.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(se.PAREN_L,this.parseInputValueDef,se.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(se.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(se.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Oe.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Oe.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Oe.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(se.EQUALS)?this.delimitedMany(se.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Oe.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(se.BRACE_L,this.parseEnumValueDefinition,se.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Oe.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw mn(this._lexer.source,this._lexer.token.start,`${wg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Oe.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(se.BRACE_L,this.parseInputValueDef,se.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===se.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(se.BRACE_L,this.parseOperationTypeDefinition,se.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Oe.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Oe.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Oe.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Oe.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Oe.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Oe.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Oe.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(se.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Oe.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(se.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(dP,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new vde(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw mn(this._lexer.source,r.start,`Expected ${_3(t)}, found ${wg(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===se.NAME&&r.value===t)this.advanceLexer();else throw mn(this._lexer.source,r.start,`Expected "${t}", found ${wg(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===se.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return mn(this._lexer.source,r.start,`Unexpected ${wg(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==se.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw mn(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function wg(e){const t=e.value;return _3(e.kind)+(t!=null?` "${t}"`:"")}function _3(e){return xde(e)?`"${e}"`:e}function zde(e){return`"${e.replace(Ude,qde)}"`}const Ude=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function qde(e){return Hde[e.charCodeAt(0)]}const Hde=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],BT=Object.freeze({});function vs(e,t,r=p3){const n=new Map;for(const p of Object.values(Oe))n.set(p,Wde(t,p));let i,o=Array.isArray(e),a=[e],s=-1,l=[],u=e,c,d;const f=[],h=[];do{s++;const p=s===a.length,g=p&&l.length!==0;if(p){if(c=h.length===0?void 0:f[f.length-1],u=d,d=h.pop(),g)if(o){u=u.slice();let _=0;for(const[P,C]of l){const x=P-_;C===null?(u.splice(x,1),_++):u[x]=C}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[_,P]of l)u[_]=P}s=i.index,a=i.keys,l=i.edits,o=i.inArray,i=i.prev}else if(d){if(c=o?s:a[s],u=d[c],u==null)continue;f.push(c)}let b;if(!Array.isArray(u)){var m,v;x2(u)||fy(!1,`Invalid AST Node: ${LT(u)}.`);const _=p?(m=n.get(u.kind))===null||m===void 0?void 0:m.leave:(v=n.get(u.kind))===null||v===void 0?void 0:v.enter;if(b=_==null?void 0:_.call(t,u,c,d,f,h),b===BT)break;if(b===!1){if(!p){f.pop();continue}}else if(b!==void 0&&(l.push([c,b]),!p))if(x2(b))u=b;else{f.pop();continue}}if(b===void 0&&g&&l.push([c,u]),p)f.pop();else{var w;i={inArray:o,index:s,keys:a,edits:l,prev:i},o=Array.isArray(u),a=o?u:(w=r[u.kind])!==null&&w!==void 0?w:[],s=-1,l=[],d&&h.push(d),d=u}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function Wde(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function x3(e){return vs(e,Gde)}const Kde=80,Gde={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ie(e.definitions,`
408
-
409
- `)},OperationDefinition:{leave(e){const t=bt("(",Ie(e.variableDefinitions,", "),")"),r=Ie([e.operation,Ie([e.name,t]),Ie(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+bt(" = ",r)+bt(" ",Ie(n," "))},SelectionSet:{leave:({selections:e})=>Ro(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=bt("",e,": ")+t;let a=o+bt("(",Ie(r,", "),")");return a.length>Kde&&(a=o+bt(`(
410
- `,hy(Ie(r,`
411
- `)),`
412
- )`)),Ie([a,Ie(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+bt(" ",Ie(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>Ie(["...",bt("on ",e),Ie(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${bt("(",Ie(r,", "),")")} on ${t} ${bt("",Ie(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Sde(e):zde(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ie(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ie(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+bt("(",Ie(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>bt("",e,`
413
- `)+Ie(["schema",Ie(t," "),Ro(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>bt("",e,`
414
- `)+Ie(["scalar",t,Ie(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>bt("",e,`
415
- `)+Ie(["type",t,bt("implements ",Ie(r," & ")),Ie(n," "),Ro(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>bt("",e,`
416
- `)+t+(C2(r)?bt(`(
417
- `,hy(Ie(r,`
418
- `)),`
419
- )`):bt("(",Ie(r,", "),")"))+": "+n+bt(" ",Ie(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>bt("",e,`
420
- `)+Ie([t+": "+r,bt("= ",n),Ie(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>bt("",e,`
421
- `)+Ie(["interface",t,bt("implements ",Ie(r," & ")),Ie(n," "),Ro(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>bt("",e,`
422
- `)+Ie(["union",t,Ie(r," "),bt("= ",Ie(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>bt("",e,`
423
- `)+Ie(["enum",t,Ie(r," "),Ro(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>bt("",e,`
424
- `)+Ie([t,Ie(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>bt("",e,`
425
- `)+Ie(["input",t,Ie(r," "),Ro(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>bt("",e,`
426
- `)+"directive @"+t+(C2(r)?bt(`(
427
- `,hy(Ie(r,`
428
- `)),`
429
- )`):bt("(",Ie(r,", "),")"))+(n?" repeatable":"")+" on "+Ie(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ie(["extend schema",Ie(e," "),Ro(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Ie(["extend scalar",e,Ie(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Ie(["extend type",e,bt("implements ",Ie(t," & ")),Ie(r," "),Ro(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Ie(["extend interface",e,bt("implements ",Ie(t," & ")),Ie(r," "),Ro(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>Ie(["extend union",e,Ie(t," "),bt("= ",Ie(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>Ie(["extend enum",e,Ie(t," "),Ro(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>Ie(["extend input",e,Ie(t," "),Ro(r)]," ")}};function Ie(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function Ro(e){return bt(`{
430
- `,hy(Ie(e,`
431
- `)),`
432
- }`)}function bt(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function hy(e){return bt(" ",e.replace(/\n/g,`
433
- `))}function C2(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(`
434
- `)))!==null&&t!==void 0?t:!1}function E2(e){return e.kind===Oe.FIELD||e.kind===Oe.FRAGMENT_SPREAD||e.kind===Oe.INLINE_FRAGMENT}function fv(e,t){var r=e.directives;return!r||!r.length?!0:Xde(r).every(function(n){var i=n.directive,o=n.ifArgument,a=!1;return o.value.kind==="Variable"?(a=t&&t[o.value.name.value],Qe(a!==void 0,68,i.name.value)):a=o.value.value,i.name.value==="skip"?!a:a})}function vm(e,t,r){var n=new Set(e),i=n.size;return vs(t,{Directive:function(o){if(n.delete(o.name.value)&&(!r||!n.size))return BT}}),r?!n.size:n.size<i}function Qde(e){return e&&vm(["client","export"],e,!0)}function Yde(e){var t=e.name.value;return t==="skip"||t==="include"}function Xde(e){var t=[];return e&&e.length&&e.forEach(function(r){if(Yde(r)){var n=r.arguments,i=r.name.value;Qe(n&&n.length===1,69,i);var o=n[0];Qe(o.name&&o.name.value==="if",70,i);var a=o.value;Qe(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),71,i),t.push({directive:r,ifArgument:o})}}),t}const Jde=()=>Object.create(null),{forEach:Zde,slice:T2}=Array.prototype,{hasOwnProperty:efe}=Object.prototype;let Af=class P3{constructor(t=!0,r=Jde){this.weakness=t,this.makeData=r}lookup(){return this.lookupArray(arguments)}lookupArray(t){let r=this;return Zde.call(t,n=>r=r.getChildTrie(n)),efe.call(r,"data")?r.data:r.data=this.makeData(T2.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let r=this;for(let n=0,i=t.length;r&&n<i;++n){const o=r.mapFor(t[n],!1);r=o&&o.get(t[n])}return r&&r.data}remove(){return this.removeArray(arguments)}removeArray(t){let r;if(t.length){const n=t[0],i=this.mapFor(n,!1),o=i&&i.get(n);o&&(r=o.removeArray(T2.call(t,1)),!o.data&&!o.weak&&!(o.strong&&o.strong.size)&&i.delete(n))}else r=this.data,delete this.data;return r}getChildTrie(t){const r=this.mapFor(t,!0);let n=r.get(t);return n||r.set(t,n=new P3(this.weakness,this.makeData)),n}mapFor(t,r){return this.weakness&&tfe(t)?this.weak||(r?this.weak=new WeakMap:void 0):this.strong||(r?this.strong=new Map:void 0)}};function tfe(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var Df=typeof WeakMap=="function"&&!Mo(function(){return navigator.product=="ReactNative"&&!global.HermesInternal}),C3=typeof WeakSet=="function",VT=typeof Symbol=="function"&&typeof Symbol.for=="function",lw=VT&&Symbol.asyncIterator;Mo(function(){return window.document.createElement});Mo(function(){return navigator.userAgent.indexOf("jsdom")>=0});function Fr(e){return e!==null&&typeof e=="object"}function rfe(e,t){var r=t,n=[];e.definitions.forEach(function(o){if(o.kind==="OperationDefinition")throw ei(72,o.operation,o.name?" named '".concat(o.name.value,"'"):"");o.kind==="FragmentDefinition"&&n.push(o)}),typeof r>"u"&&(Qe(n.length===1,73,n.length),r=n[0].name.value);var i=Y(Y({},e),{definitions:qo([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)});return i}function uw(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function cw(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return Qe(n,74,r),n||null}default:return null}}function nfe(){}class hP{constructor(t=1/0,r=nfe){this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}get size(){return this.map.size}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1}}function pP(){}const ife=pP,ofe=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},afe=typeof WeakMap<"u"?WeakMap:Map,sfe=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:pP,unregister:pP}},lfe=10024;class E0{constructor(t=1/0,r=ife){this.max=t,this.dispose=r,this.map=new afe,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<lfe;i++){const o=n.next().value;if(!o)break;this.unfinalizedNodes.delete(o);const a=o.key;delete o.key,o.keyRef=new ofe(a),this.registry.register(a,o,o)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new sfe(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(t,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const r=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,r),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),r&&this.map.delete(r)}delete(t){const r=this.map.get(t);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var xS=new WeakSet;function E3(e){e.size<=(e.max||-1)||xS.has(e)||(xS.add(e),setTimeout(function(){e.clean(),xS.delete(e)},100))}var T3=function(e,t){var r=new E0(e,t);return r.set=function(n,i){var o=E0.prototype.set.call(this,n,i);return E3(this),o},r},ufe=function(e,t){var r=new hP(e,t);return r.set=function(n,i){var o=hP.prototype.set.call(this,n,i);return E3(this),o},r},cfe=Symbol.for("apollo.cacheSize"),gs=Y({},lP[cfe]),uu={};function O3(e,t){uu[e]=t}var dfe=globalThis.__DEV__!==!1?mfe:void 0,ffe=globalThis.__DEV__!==!1?vfe:void 0,hfe=globalThis.__DEV__!==!1?R3:void 0;function pfe(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var r=t[0],n=t[1];return[r,gs[r]||n]}))}function mfe(){var e,t,r,n,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:pfe(),sizes:Y({print:(e=uu.print)===null||e===void 0?void 0:e.call(uu),parser:(t=uu.parser)===null||t===void 0?void 0:t.call(uu),canonicalStringify:(r=uu.canonicalStringify)===null||r===void 0?void 0:r.call(uu),links:vP(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:k3(this.queryManager.documentTransform)}},(i=(n=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(n))}}function R3(){return{cache:{fragmentQueryDocuments:Ks(this.getFragmentDoc)}}}function vfe(){var e=this.config.fragments;return Y(Y({},R3.apply(this)),{addTypenameDocumentTransform:k3(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:Ks(this.storeReader.executeSelectionSet),executeSubSelectedArray:Ks(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:Ks(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:Ks(e==null?void 0:e.findFragmentSpreads),lookup:Ks(e==null?void 0:e.lookup),transform:Ks(e==null?void 0:e.transform)}})}function gfe(e){return!!e&&"dirtyKey"in e}function Ks(e){return gfe(e)?e.size:void 0}function I3(e){return e!=null}function k3(e){return mP(e).map(function(t){return{cache:t}})}function mP(e){return e?qo(qo([Ks(e==null?void 0:e.performWork)],mP(e==null?void 0:e.left),!0),mP(e==null?void 0:e.right),!0).filter(I3):[]}function vP(e){var t;return e?qo(qo([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],vP(e==null?void 0:e.left),!0),vP(e==null?void 0:e.right),!0).filter(I3):[]}var vl=Object.assign(function(t){return JSON.stringify(t,yfe)},{reset:function(){gd=new ufe(gs.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&O3("canonicalStringify",function(){return gd.size});var gd;vl.reset();function yfe(e,t){if(t&&typeof t=="object"){var r=Object.getPrototypeOf(t);if(r===Object.prototype||r===null){var n=Object.keys(t);if(n.every(bfe))return t;var i=JSON.stringify(n),o=gd.get(i);if(!o){n.sort();var a=JSON.stringify(n);o=gd.get(a)||n,gd.set(i,o),gd.set(a,o)}var s=Object.create(r);return o.forEach(function(l){s[l]=t[l]}),s}}return t}function bfe(e,t,r){return t===0||r[t-1]<=e}function Dd(e){return{__ref:String(e)}}function qt(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function wfe(e){return Fr(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function Sfe(e){return e.kind==="StringValue"}function _fe(e){return e.kind==="BooleanValue"}function xfe(e){return e.kind==="IntValue"}function Pfe(e){return e.kind==="FloatValue"}function Cfe(e){return e.kind==="Variable"}function Efe(e){return e.kind==="ObjectValue"}function Tfe(e){return e.kind==="ListValue"}function Ofe(e){return e.kind==="EnumValue"}function Rfe(e){return e.kind==="NullValue"}function cf(e,t,r,n){if(xfe(r)||Pfe(r))e[t.value]=Number(r.value);else if(_fe(r)||Sfe(r))e[t.value]=r.value;else if(Efe(r)){var i={};r.fields.map(function(a){return cf(i,a.name,a.value,n)}),e[t.value]=i}else if(Cfe(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(Tfe(r))e[t.value]=r.values.map(function(a){var s={};return cf(s,t,a,n),s[t.value]});else if(Ofe(r))e[t.value]=r.value;else if(Rfe(r))e[t.value]=null;else throw ei(83,t.value,r.kind)}function Ife(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(i){r[i.name.value]={},i.arguments&&i.arguments.forEach(function(o){var a=o.name,s=o.value;return cf(r[i.name.value],a,s,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(i){var o=i.name,a=i.value;return cf(n,o,a,t)})),j3(e.name.value,n,r)}var kfe=["connection","include","skip","client","rest","export","nonreactive"],yh=vl,j3=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(s){i[s]=t[s]}),"".concat(r.connection.key,"(").concat(yh(i),")")}else return r.connection.key;var o=e;if(t){var a=yh(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(s){kfe.indexOf(s)===-1&&(r[s]&&Object.keys(r[s]).length?o+="@".concat(s,"(").concat(yh(r[s]),")"):o+="@".concat(s))}),o},{setStringify:function(e){var t=yh;return yh=e,t}});function dw(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(n){var i=n.name,o=n.value;return cf(r,i,o,t)}),r}return null}function Ol(e){return e.alias?e.alias.value:e.name.value}function gP(e,t,r){for(var n,i=0,o=t.selections;i<o.length;i++){var a=o[i];if(Rl(a)){if(a.name.value==="__typename")return e[Ol(a)]}else n?n.push(a):n=[a]}if(typeof e.__typename=="string")return e.__typename;if(n)for(var s=0,l=n;s<l.length;s++){var a=l[s],u=gP(e,cw(a,r).selectionSet,r);if(typeof u=="string")return u}}function Rl(e){return e.kind==="Field"}function jfe(e){return e.kind==="InlineFragment"}function hv(e){Qe(e&&e.kind==="Document",75);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw ei(76,r.kind);return r});return Qe(t.length<=1,77,t.length),e}function pv(e){return hv(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function yP(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function fw(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function $3(e){var t=pv(e);return Qe(t&&t.operation==="query",78),t}function $fe(e){Qe(e.kind==="Document",79),Qe(e.definitions.length<=1,80);var t=e.definitions[0];return Qe(t.kind==="FragmentDefinition",81),t}function mv(e){hv(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var o=i.operation;if(o==="query"||o==="mutation"||o==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw ei(82)}function zT(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(n){n.defaultValue&&cf(t,n.variable.name,n.defaultValue)}),t}const Afe=()=>Object.create(null),{forEach:Dfe,slice:Mfe}=Array.prototype,{hasOwnProperty:Nfe}=Object.prototype;class UT{constructor(t=!0,r=Afe){this.weakness=t,this.makeData=r}lookup(...t){return this.lookupArray(t)}lookupArray(t){let r=this;return Dfe.call(t,n=>r=r.getChildTrie(n)),Nfe.call(r,"data")?r.data:r.data=this.makeData(Mfe.call(t))}peek(...t){return this.peekArray(t)}peekArray(t){let r=this;for(let n=0,i=t.length;r&&n<i;++n){const o=this.weakness&&O2(t[n])?r.weak:r.strong;r=o&&o.get(t[n])}return r&&r.data}getChildTrie(t){const r=this.weakness&&O2(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let n=r.get(t);return n||r.set(t,n=new UT(this.weakness,this.makeData)),n}}function O2(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}let xn=null;const R2={};let Ffe=1;const Lfe=()=>class{constructor(){this.id=["slot",Ffe++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=xn;t;t=t.parent)if(this.id in t.slots){const r=t.slots[this.id];if(r===R2)break;return t!==xn&&(xn.slots[this.id]=r),!0}return xn&&(xn.slots[this.id]=R2),!1}getValue(){if(this.hasValue())return xn.slots[this.id]}withValue(t,r,n,i){const o={__proto__:null,[this.id]:t},a=xn;xn={parent:a,slots:o};try{return r.apply(i,n)}finally{xn=a}}static bind(t){const r=xn;return function(){const n=xn;try{return xn=r,t.apply(this,arguments)}finally{xn=n}}}static noContext(t,r,n){if(xn){const i=xn;try{return xn=null,t.apply(n,r)}finally{xn=i}}else return t.apply(n,r)}};function I2(e){try{return e()}catch{}}const PS="@wry/context:Slot",Bfe=I2(()=>globalThis)||I2(()=>global)||Object.create(null),k2=Bfe,A3=k2[PS]||Array[PS]||function(e){try{Object.defineProperty(k2,PS,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Lfe()),hw=new A3,{hasOwnProperty:Vfe}=Object.prototype,qT=Array.from||function(e){const t=[];return e.forEach(r=>t.push(r)),t};function HT(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const gm=[],zfe=100;function df(e,t){if(!e)throw new Error(t||"assertion failure")}function D3(e,t){const r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function M3(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function N3(e){return e.slice(0)}class pw{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++pw.count}peek(){if(this.value.length===1&&!Il(this))return j2(this),this.value[0]}recompute(t){return df(!this.recomputing,"already recomputing"),j2(this),Il(this)?Ufe(this,t):M3(this.value)}setDirty(){this.dirty||(this.dirty=!0,F3(this),HT(this))}dispose(){this.setDirty(),U3(this),WT(this,(t,r)=>{t.setDirty(),q3(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=gm.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(qT(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),gm.push(this.deps),this.deps=null)}}pw.count=0;function j2(e){const t=hw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Il(e)?B3(t,e):V3(t,e),t}function Ufe(e,t){return U3(e),hw.withValue(e,qfe,[e,t]),Wfe(e,t)&&Hfe(e),M3(e.value)}function qfe(e,t){e.recomputing=!0;const{normalizeResult:r}=e;let n;r&&e.value.length===1&&(n=N3(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!D3(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function Il(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function Hfe(e){e.dirty=!1,!Il(e)&&L3(e)}function F3(e){WT(e,B3)}function L3(e){WT(e,V3)}function WT(e,t){const r=e.parents.size;if(r){const n=qT(e.parents);for(let i=0;i<r;++i)t(n[i],e)}}function B3(e,t){df(e.childValues.has(t)),df(Il(t));const r=!Il(e);if(!e.dirtyChildren)e.dirtyChildren=gm.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&F3(e)}function V3(e,t){df(e.childValues.has(t)),df(!Il(t));const r=e.childValues.get(t);r.length===0?e.childValues.set(t,N3(t.value)):D3(r,t.value)||e.setDirty(),z3(e,t),!Il(e)&&L3(e)}function z3(e,t){const r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(gm.length<zfe&&gm.push(r),e.dirtyChildren=null))}function U3(e){e.childValues.size>0&&e.childValues.forEach((t,r)=>{q3(e,r)}),e.forgetDeps(),df(e.dirtyChildren===null)}function q3(e,t){t.parents.delete(e),e.childValues.delete(t),z3(e,t)}function Wfe(e,t){if(typeof e.subscribe=="function")try{HT(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const Kfe={setDirty:!0,dispose:!0,forget:!0};function H3(e){const t=new Map;function r(n){const i=hw.getValue();if(i){let o=t.get(n);o||t.set(n,o=new Set),i.dependOn(o)}}return r.dirty=function(i,o){const a=t.get(i);if(a){const s=o&&Vfe.call(Kfe,o)?o:"setDirty";qT(a).forEach(l=>l[s]()),t.delete(i),HT(a)}},r}let $2;function Gfe(...e){return($2||($2=new UT(typeof WeakMap=="function"))).lookupArray(e)}const CS=new Set;function ym(e,{max:t=Math.pow(2,16),keyArgs:r,makeCacheKey:n=Gfe,normalizeResult:i,subscribe:o,cache:a=hP}=Object.create(null)){const s=typeof a=="function"?new a(t,f=>f.dispose()):a,l=function(){const f=n.apply(null,r?r.apply(null,arguments):arguments);if(f===void 0)return e.apply(null,arguments);let h=s.get(f);h||(s.set(f,h=new pw(e)),h.normalizeResult=i,h.subscribe=o,h.forget=()=>s.delete(f));const m=h.recompute(Array.prototype.slice.call(arguments));return s.set(f,h),CS.add(s),hw.hasValue()||(CS.forEach(v=>v.clean()),CS.clear()),m};Object.defineProperty(l,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:s});function u(f){const h=f&&s.get(f);h&&h.setDirty()}l.dirtyKey=u,l.dirty=function(){u(n.apply(null,arguments))};function c(f){const h=f&&s.get(f);if(h)return h.peek()}l.peekKey=c,l.peek=function(){return c(n.apply(null,arguments))};function d(f){return f?s.delete(f):!1}return l.forgetKey=d,l.forget=function(){return d(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(l)}function Qfe(e){return e}var W3=function(){function e(t,r){r===void 0&&(r=Object.create(null)),this.resultCache=C3?new WeakSet:new Set,this.transform=t,r.getCacheKey&&(this.getCacheKey=r.getCacheKey),this.cached=r.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(Qfe,{cache:!1})},e.split=function(t,r,n){return n===void 0&&(n=e.identity()),Object.assign(new e(function(i){var o=t(i)?r:n;return o.transformDocument(i)},{cache:!1}),{left:r,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var r=new Af(Df);this.performWork=ym(e.prototype.performWork.bind(this),{makeCacheKey:function(n){var i=t.getCacheKey(n);if(i)return Qe(Array.isArray(i),67),r.lookupArray(i)},max:gs["documentTransform.cache"],cache:E0})}},e.prototype.performWork=function(t){return hv(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var r=this.performWork(t);return this.resultCache.add(r),r},e.prototype.concat=function(t){var r=this;return Object.assign(new e(function(n){return t.transformDocument(r.transformDocument(n))},{cache:!1}),{left:this,right:t})},e}(),fp,mw=Object.assign(function(e){var t=fp.get(e);return t||(t=x3(e),fp.set(e,t)),t},{reset:function(){fp=new T3(gs.print||2e3)}});mw.reset();globalThis.__DEV__!==!1&&O3("print",function(){return fp?fp.size:0});var Lr=Array.isArray;function $a(e){return Array.isArray(e)&&e.length>0}var A2={kind:Oe.FIELD,name:{kind:Oe.NAME,value:"__typename"}};function K3(e,t){return!e||e.selectionSet.selections.every(function(r){return r.kind===Oe.FRAGMENT_SPREAD&&K3(t[r.name.value],t)})}function Yfe(e){return K3(pv(e)||$fe(e),uw(fw(e)))?null:e}function Xfe(e){var t=new Map,r=new Map;return e.forEach(function(n){n&&(n.name?t.set(n.name,n):n.test&&r.set(n.test,n))}),function(n){var i=t.get(n.name.value);return!i&&r.size&&r.forEach(function(o,a){a(n)&&(i=o)}),i}}function D2(e){var t=new Map;return function(n){n===void 0&&(n=e);var i=t.get(n);return i||t.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function G3(e,t){hv(t);for(var r=D2(""),n=D2(""),i=function(p){for(var g=0,b=void 0;g<p.length&&(b=p[g]);++g)if(!Lr(b)){if(b.kind===Oe.OPERATION_DEFINITION)return r(b.name&&b.name.value);if(b.kind===Oe.FRAGMENT_DEFINITION)return n(b.name.value)}return globalThis.__DEV__!==!1&&Qe.error(84),null},o=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===Oe.OPERATION_DEFINITION&&++o;var s=Xfe(e),l=function(p){return $a(p)&&p.map(s).some(function(g){return g&&g.remove})},u=new Map,c=!1,d={enter:function(p){if(l(p.directives))return c=!0,null}},f=vs(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(p,g,b,_,P){var C=i(P);C&&C.variables.add(p.name.value)}},FragmentSpread:{enter:function(p,g,b,_,P){if(l(p.directives))return c=!0,null;var C=i(P);C&&C.fragmentSpreads.add(p.name.value)}},FragmentDefinition:{enter:function(p,g,b,_){u.set(JSON.stringify(_),p)},leave:function(p,g,b,_){var P=u.get(JSON.stringify(_));if(p===P)return p;if(o>0&&p.selectionSet.selections.every(function(C){return C.kind===Oe.FIELD&&C.name.value==="__typename"}))return n(p.name.value).removed=!0,c=!0,null}},Directive:{leave:function(p){if(s(p))return c=!0,null}}});if(!c)return t;var h=function(p){return p.transitiveVars||(p.transitiveVars=new Set(p.variables),p.removed||p.fragmentSpreads.forEach(function(g){h(n(g)).transitiveVars.forEach(function(b){p.transitiveVars.add(b)})})),p},m=new Set;f.definitions.forEach(function(p){p.kind===Oe.OPERATION_DEFINITION?h(r(p.name&&p.name.value)).fragmentSpreads.forEach(function(g){m.add(g)}):p.kind===Oe.FRAGMENT_DEFINITION&&o===0&&!n(p.name.value).removed&&m.add(p.name.value)}),m.forEach(function(p){h(n(p)).fragmentSpreads.forEach(function(g){m.add(g)})});var v=function(p){return!!(!m.has(p)||n(p).removed)},w={enter:function(p){if(v(p.name.value))return null}};return Yfe(vs(f,{FragmentSpread:w,FragmentDefinition:w,OperationDefinition:{leave:function(p){if(p.variableDefinitions){var g=h(r(p.name&&p.name.value)).transitiveVars;if(g.size<p.variableDefinitions.length)return Y(Y({},p),{variableDefinitions:p.variableDefinitions.filter(function(b){return g.has(b.variable.name.value)})})}}}}))}var KT=Object.assign(function(e){return vs(e,{SelectionSet:{enter:function(t,r,n){if(!(n&&n.kind===Oe.OPERATION_DEFINITION)){var i=t.selections;if(i){var o=i.some(function(s){return Rl(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!o){var a=n;if(!(Rl(a)&&a.directives&&a.directives.some(function(s){return s.name.value==="export"})))return Y(Y({},t),{selections:qo(qo([],i,!0),[A2],!1)})}}}}}})},{added:function(e){return e===A2}});function Jfe(e){var t=mv(e),r=t.operation;if(r==="query")return e;var n=vs(e,{OperationDefinition:{enter:function(i){return Y(Y({},i),{operation:"query"})}}});return n}function Q3(e){hv(e);var t=G3([{test:function(r){return r.name.value==="client"},remove:!0}],e);return t}var Zfe=Object.prototype.hasOwnProperty;function M2(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return vw(e)}function vw(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new kl,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var ehe=function(e,t,r){return this.merge(e[r],t[r])},kl=function(){function e(t){t===void 0&&(t=ehe),this.reconciler=t,this.isObject=Fr,this.pastCopies=new Set}return e.prototype.merge=function(t,r){for(var n=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Fr(r)&&Fr(t)?(Object.keys(r).forEach(function(a){if(Zfe.call(t,a)){var s=t[a];if(r[a]!==s){var l=n.reconciler.apply(n,qo([t,r,a],i,!1));l!==s&&(t=n.shallowCopyForMerge(t),t[a]=l)}}else t=n.shallowCopyForMerge(t),t[a]=r[a]}),t):r},e.prototype.shallowCopyForMerge=function(t){return Fr(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=Y({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function the(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=rhe(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
435
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rhe(e,t){if(e){if(typeof e=="string")return N2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N2(e,t)}}function N2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function F2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GT(e,t,r){return t&&F2(e.prototype,t),r&&F2(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var QT=function(){return typeof Symbol=="function"},YT=function(e){return QT()&&!!Symbol[e]},XT=function(e){return YT(e)?Symbol[e]:"@@"+e};QT()&&!YT("observable")&&(Symbol.observable=Symbol("observable"));var nhe=XT("iterator"),bP=XT("observable"),Y3=XT("species");function T0(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function bh(e){var t=e.constructor;return t!==void 0&&(t=t[Y3],t===null&&(t=void 0)),t!==void 0?t:rr}function ihe(e){return e instanceof rr}function ff(e){ff.log?ff.log(e):setTimeout(function(){throw e})}function py(e){Promise.resolve().then(function(){try{e()}catch(t){ff(t)}})}function X3(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=T0(t,"unsubscribe");r&&r.call(t)}}catch(n){ff(n)}}function wP(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function ohe(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(J3(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function J3(e,t,r){e._state="running";var n=e._observer;try{var i=T0(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(wP(e),i)i.call(n,r);else throw r;break;case"complete":wP(e),i&&i.call(n);break}}catch(o){ff(o)}e._state==="closed"?X3(e):e._state==="running"&&(e._state="ready")}function ES(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],py(function(){return ohe(e)});return}J3(e,t,r)}}var ahe=function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new she(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(wP(this),X3(this))},GT(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),she=function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){ES(this._subscription,"next",n)},t.error=function(n){ES(this._subscription,"error",n)},t.complete=function(){ES(this._subscription,"complete")},GT(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),rr=function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new ahe(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(o,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function s(){l.unsubscribe(),o()}var l=i.subscribe({next:function(u){try{n(u,s)}catch(c){a(c),l.unsubscribe()}},error:a,complete:o})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=bh(this);return new o(function(a){return i.subscribe({next:function(s){try{s=n(s)}catch(l){return a.error(l)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=bh(this);return new o(function(a){return i.subscribe({next:function(s){try{if(!n(s))return}catch(l){return a.error(l)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=bh(this),a=arguments.length>1,s=!1,l=arguments[1],u=l;return new o(function(c){return i.subscribe({next:function(d){var f=!s;if(s=!0,!f||a)try{u=n(u,d)}catch(h){return c.error(h)}else u=d},error:function(d){c.error(d)},complete:function(){if(!s&&!a)return c.error(new TypeError("Cannot reduce an empty sequence"));c.next(u),c.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=bh(this);return new s(function(l){var u,c=0;function d(f){u=f.subscribe({next:function(h){l.next(h)},error:function(h){l.error(h)},complete:function(){c===o.length?(u=void 0,l.complete()):d(s.from(o[c++]))}})}return d(n),function(){u&&(u.unsubscribe(),u=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=bh(this);return new o(function(a){var s=[],l=i.subscribe({next:function(c){if(n)try{c=n(c)}catch(f){return a.error(f)}var d=o.from(c).subscribe({next:function(f){a.next(f)},error:function(f){a.error(f)},complete:function(){var f=s.indexOf(d);f>=0&&s.splice(f,1),u()}});s.push(d)},error:function(c){a.error(c)},complete:function(){u()}});function u(){l.closed&&s.length===0&&a.complete()}return function(){s.forEach(function(c){return c.unsubscribe()}),l.unsubscribe()}})},t[bP]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var o=T0(n,bP);if(o){var a=o.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return ihe(a)&&a.constructor===i?a:new i(function(s){return a.subscribe(s)})}if(YT("iterator")&&(o=T0(n,nhe),o))return new i(function(s){py(function(){if(!s.closed){for(var l=the(o.call(n)),u;!(u=l()).done;){var c=u.value;if(s.next(c),s.closed)return}s.complete()}})});if(Array.isArray(n))return new i(function(s){py(function(){if(!s.closed){for(var l=0;l<n.length;++l)if(s.next(n[l]),s.closed)return;s.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=typeof this=="function"?this:e;return new a(function(s){py(function(){if(!s.closed){for(var l=0;l<i.length;++l)if(s.next(i[l]),s.closed)return;s.complete()}})})},GT(e,null,[{key:Y3,get:function(){return this}}]),e}();QT()&&Object.defineProperty(rr,Symbol("extensions"),{value:{symbol:bP,hostReportError:ff},configurable:!0});function lhe(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var zc;typeof self<"u"?zc=self:typeof window<"u"?zc=window:typeof global<"u"?zc=global:typeof hC<"u"?zc=hC:zc=Function("return this")();lhe(zc);var L2=rr.prototype,B2="@@observable";L2[B2]||(L2[B2]=function(){return this});var uhe=Object.prototype.toString;function Z3(e){return SP(e)}function SP(e,t){switch(uhe.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,o){r[o]=SP(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=SP(e[i],t)}),n}default:return e}}function che(e){var t=new Set([e]);return t.forEach(function(r){Fr(r)&&dhe(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){Fr(r[n])&&t.add(r[n])})}),e}function dhe(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function _P(e){return globalThis.__DEV__!==!1&&che(e),e}function hp(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function TS(e,t,r){return new rr(function(n){var i={then:function(l){return new Promise(function(u){return u(l())})}};function o(l,u){return function(c){if(l){var d=function(){return n.closed?0:l(c)};i=i.then(d,d).then(function(f){return n.next(f)},function(f){return n.error(f)})}else n[u](c)}}var a={next:o(t,"next"),error:o(r,"error"),complete:function(){i.then(function(){return n.complete()})}},s=e.subscribe(a);return function(){return s.unsubscribe()}})}function eV(e){function t(r){Object.defineProperty(e,r,{value:rr})}return VT&&Symbol.species&&t(Symbol.species),t("@@species"),e}function V2(e){return e&&typeof e.then=="function"}var Uc=function(e){Jo(t,e);function t(r){var n=e.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,o){n.resolve=i,n.reject=o}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),hp(n.observers,"next",i))},error:function(i){var o=n.sub;o!==null&&(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),hp(n.observers,"error",i))},complete:function(){var i=n,o=i.sub,a=i.sources,s=a===void 0?[]:a;if(o!==null){var l=s.shift();l?V2(l)?l.then(function(u){return n.sub=u.subscribe(n.handlers)},n.handlers.error):n.sub=l.subscribe(n.handlers):(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),hp(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.complete()},n.promise.catch(function(i){}),typeof r=="function"&&(r=[new rr(r)]),V2(r)?r.then(function(i){return n.start(i)},n.handlers.error):n.start(r),n}return t.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},t.prototype.deliverLastMessage=function(r){if(this.latest){var n=this.latest[0],i=r[n];i&&i.call(r,this.latest[1]),this.sub===null&&n==="next"&&r.complete&&r.complete()}},t.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},t.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(r,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(o){return o(r,n)}))},t.prototype.beforeNext=function(r){var n=!1;this.nextResultListeners.add(function(i,o){n||(n=!0,r(i,o))})},t}(rr);eV(Uc);function Md(e){return"incremental"in e}function fhe(e){return"hasNext"in e&&"data"in e}function hhe(e){return Md(e)||fhe(e)}function phe(e){return Fr(e)&&"payload"in e}function tV(e,t){var r=e,n=new kl;return Md(t)&&$a(t.incremental)&&t.incremental.forEach(function(i){for(var o=i.data,a=i.path,s=a.length-1;s>=0;--s){var l=a[s],u=!isNaN(+l),c=u?[]:{};c[l]=o,o=c}r=n.merge(r,o)}),r}function my(e){var t=xP(e);return $a(t)}function xP(e){var t=$a(e.errors)?e.errors.slice(0):[];return Md(e)&&$a(e.incremental)&&e.incremental.forEach(function(r){r.errors&&t.push.apply(t,r.errors)}),t}function hf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){n&&Object.keys(n).forEach(function(i){var o=n[i];o!==void 0&&(r[i]=o)})}),r}function OS(e,t){return hf(e,t,t.variables&&{variables:hf(Y(Y({},e&&e.variables),t.variables))})}function RS(e){return new rr(function(t){t.error(e)})}var rV=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function mhe(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw ei(43,i)}return e}function vhe(e,t){var r=Y({},e),n=function(o){typeof o=="function"?r=Y(Y({},r),o(r)):r=Y(Y({},r),o)},i=function(){return Y({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function ghe(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?yP(t.query)||void 0:""),t}function yhe(e,t){var r=Y({},e),n=new Set(Object.keys(e));return vs(t,{Variable:function(i,o,a){a&&a.kind!=="VariableDefinition"&&n.delete(i.name.value)}}),n.forEach(function(i){delete r[i]}),r}function z2(e,t){return t?t(e):rr.of()}function wh(e){return typeof e=="function"?new Es(e):e}function Sg(e){return e.request.length<=1}var Es=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return rr.of()})},e.from=function(t){return t.length===0?e.empty():t.map(wh).reduce(function(r,n){return r.concat(n)})},e.split=function(t,r,n){var i=wh(r),o=wh(n||new e(z2)),a;return Sg(i)&&Sg(o)?a=new e(function(s){return t(s)?i.request(s)||rr.of():o.request(s)||rr.of()}):a=new e(function(s,l){return t(s)?i.request(s,l)||rr.of():o.request(s,l)||rr.of()}),Object.assign(a,{left:i,right:o})},e.execute=function(t,r){return t.request(vhe(r.context,ghe(mhe(r))))||rr.of()},e.concat=function(t,r){var n=wh(t);if(Sg(n))return globalThis.__DEV__!==!1&&Qe.warn(35,n),n;var i=wh(r),o;return Sg(i)?o=new e(function(a){return n.request(a,function(s){return i.request(s)||rr.of()})||rr.of()}):o=new e(function(a,s){return n.request(a,function(l){return i.request(l,s)||rr.of()})||rr.of()}),Object.assign(o,{left:n,right:i})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(z2)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw ei(36)},e.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),bhe=Es.from,PP=Es.execute;function whe(e){var t,r=e[Symbol.asyncIterator]();return t={next:function(){return r.next()}},t[Symbol.asyncIterator]=function(){return this},t}function She(e){var t=null,r=null,n=!1,i=[],o=[];function a(d){if(!r){if(o.length){var f=o.shift();if(Array.isArray(f)&&f[0])return f[0]({value:d,done:!1})}i.push(d)}}function s(d){r=d;var f=o.slice();f.forEach(function(h){h[1](d)}),!t||t()}function l(){n=!0;var d=o.slice();d.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",a),e.on("error",s),e.on("end",l),e.on("finish",l),e.on("close",l);function u(){return new Promise(function(d,f){if(r)return f(r);if(i.length)return d({value:i.shift(),done:!1});if(n)return d({value:void 0,done:!0});o.push([d,f])})}var c={next:function(){return u()}};return lw&&(c[Symbol.asyncIterator]=function(){return this}),c}function _he(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(n,i){e.then(function(o){n({value:o,done:!1})}).catch(i)}))}};return lw&&(r[Symbol.asyncIterator]=function(){return this}),r}function U2(e){var t={next:function(){return e.read()}};return lw&&(t[Symbol.asyncIterator]=function(){return this}),t}function xhe(e){return!!e.body}function Phe(e){return!!e.getReader}function Che(e){return!!(lw&&e[Symbol.asyncIterator])}function Ehe(e){return!!e.stream}function The(e){return!!e.arrayBuffer}function Ohe(e){return!!e.pipe}function Rhe(e){var t=e;if(xhe(e)&&(t=e.body),Che(t))return whe(t);if(Phe(t))return U2(t.getReader());if(Ehe(t))return U2(t.stream().getReader());if(The(t))return _he(t.arrayBuffer());if(Ohe(t))return She(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var JT=Symbol();function Ihe(e){return e.extensions?Array.isArray(e.extensions[JT]):!1}function khe(e){return e.hasOwnProperty("graphQLErrors")}var jhe=function(e){var t=qo(qo(qo([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(r){return Fr(r)&&r.message||"Error message not found."}).join(`
436
- `)},$c=function(e){Jo(t,e);function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,a=r.networkError,s=r.errorMessage,l=r.extraInfo,u=e.call(this,s)||this;return u.name="ApolloError",u.graphQLErrors=n||[],u.protocolErrors=i||[],u.clientErrors=o||[],u.networkError=a||null,u.message=s||jhe(u),u.extraInfo=l,u.__proto__=t.prototype,u}return t}(Error),q2=Object.prototype.hasOwnProperty;function $he(e,t){return Hs(this,void 0,void 0,function(){var r,n,i,o,a,s,l,u,c,d,f,h,m,v,w,p,g,b,_,P,C,x,T,I;return Ws(this,function(M){switch(M.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),n=(I=e.headers)===null||I===void 0?void 0:I.get("content-type"),i="boundary=",o=n!=null&&n.includes(i)?n==null?void 0:n.substring((n==null?void 0:n.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",a=`\r
437
- --`.concat(o),s="",l=Rhe(e),u=!0,M.label=1;case 1:return u?[4,l.next()]:[3,3];case 2:for(c=M.sent(),d=c.value,f=c.done,h=typeof d=="string"?d:r.decode(d),m=s.length-a.length+1,u=!f,s+=h,v=s.indexOf(a,m);v>-1;){if(w=void 0,x=[s.slice(0,v),s.slice(v+a.length)],w=x[0],s=x[1],p=w.indexOf(`\r
438
- \r
439
- `),g=Ahe(w.slice(0,p)),b=g["content-type"],b&&b.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(_=w.slice(p),_){if(P=nV(e,_),Object.keys(P).length>1||"data"in P||"incremental"in P||"errors"in P||"payload"in P)if(phe(P)){if(C={},"payload"in P){if(Object.keys(P).length===1&&P.payload===null)return[2];C=Y({},P.payload)}"errors"in P&&(C=Y(Y({},C),{extensions:Y(Y({},"extensions"in C?C.extensions:null),(T={},T[JT]=P.errors,T))})),t(C)}else t(P);else if(Object.keys(P).length===1&&"hasNext"in P&&!P.hasNext)return[2]}v=s.indexOf(a)}return[3,1];case 3:return[2]}})})}function Ahe(e){var t={};return e.split(`
440
- `).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();t[i]=o}}),t}function nV(e,t){if(e.status>=300){var r=function(){try{return JSON.parse(t)}catch{return t}};rV(e,r(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var n=i;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function Dhe(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function Mhe(e){return function(t){return t.text().then(function(r){return nV(t,r)}).then(function(r){return!Array.isArray(r)&&!q2.call(r,"data")&&!q2.call(r,"errors")&&rV(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(n){return n.operationName}):e.operationName,"'.")),r})}}var CP=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=ei(39,t,i.message);throw n.parseError=i,n}return r},Nhe={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},Fhe={accept:"*/*","content-type":"application/json"},Lhe={method:"POST"},Bhe={http:Nhe,headers:Fhe,options:Lhe},Vhe=function(e,t){return t(e)};function zhe(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(d){i=Y(Y(Y({},i),d.options),{headers:Y(Y({},i.headers),d.headers)}),d.credentials&&(i.credentials=d.credentials),o=Y(Y({},o),d.http)}),i.headers&&(i.headers=Uhe(i.headers,o.preserveHeaderCase));var a=e.operationName,s=e.extensions,l=e.variables,u=e.query,c={operationName:a,variables:l};return o.includeExtensions&&(c.extensions=s),o.includeQuery&&(c.query=t(u,mw)),{options:i,body:c}}function Uhe(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach(function(o){r[o.toLowerCase()]=e[o]}),r}var n=Object.create(null);Object.keys(Object(e)).forEach(function(o){n[o.toLowerCase()]={originalName:o,value:e[o]}});var i=Object.create(null);return Object.keys(n).forEach(function(o){i[n[o].originalName]=n[o].value}),i}var qhe=function(e){if(!e&&typeof fetch>"u")throw ei(37)},Hhe=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function Whe(e,t){var r=[],n=function(d,f){r.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=CP(t.variables,"Variables map")}catch(d){return{parseError:d}}n("variables",i)}if(t.extensions){var o=void 0;try{o=CP(t.extensions,"Extensions map")}catch(d){return{parseError:d}}n("extensions",o)}var a="",s=e,l=e.indexOf("#");l!==-1&&(a=e.substr(l),s=e.substr(0,l));var u=s.indexOf("?")===-1?"?":"&",c=s+u+r.join("&")+a;return{newURI:c}}var H2=Mo(function(){return fetch}),iV=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?Vhe:i,a=e.includeExtensions,s=e.preserveHeaderCase,l=e.useGETForQueries,u=e.includeUnusedVariables,c=u===void 0?!1:u,d=hs(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&qhe(n||H2);var f={http:{includeExtensions:a,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new Es(function(h){var m=Hhe(h,r),v=h.getContext(),w={};if(v.clientAwareness){var p=v.clientAwareness,g=p.name,b=p.version;g&&(w["apollographql-client-name"]=g),b&&(w["apollographql-client-version"]=b)}var _=Y(Y({},w),v.headers),P={http:v.http,options:v.fetchOptions,credentials:v.credentials,headers:_};if(vm(["client"],h.query)){var C=Q3(h.query);if(!C)return RS(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));h.query=C}var x=zhe(h,o,Bhe,f,P),T=x.options,I=x.body;I.variables&&!c&&(I.variables=yhe(I.variables,h.query));var M;!T.signal&&typeof AbortController<"u"&&(M=new AbortController,T.signal=M.signal);var H=function(te){return te.kind==="OperationDefinition"&&te.operation==="mutation"},re=function(te){return te.kind==="OperationDefinition"&&te.operation==="subscription"},ie=re(mv(h.query)),R=vm(["defer"],h.query);if(l&&!h.query.definitions.some(H)&&(T.method="GET"),R||ie){T.headers=T.headers||{};var L="multipart/mixed;";ie&&R&&globalThis.__DEV__!==!1&&Qe.warn(38),ie?L+="boundary=graphql;subscriptionSpec=1.0,application/json":R&&(L+="deferSpec=20220824,application/json"),T.headers.accept=L}if(T.method==="GET"){var X=Whe(m,I),Q=X.newURI,W=X.parseError;if(W)return RS(W);m=Q}else try{T.body=CP(I,"Payload")}catch(te){return RS(te)}return new rr(function(te){var G=n||Mo(function(){return fetch})||H2,A=te.next.bind(te);return G(m,T).then(function(U){var N;h.setContext({response:U});var E=(N=U.headers)===null||N===void 0?void 0:N.get("content-type");return E!==null&&/^multipart\/mixed/i.test(E)?$he(U,A):Mhe(h)(U).then(A)}).then(function(){M=void 0,te.complete()}).catch(function(U){M=void 0,Dhe(U,te)}),function(){M&&M.abort()}})})},Khe=function(e){Jo(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,iV(r).request)||this;return n.options=r,n}return t}(Es);const{toString:W2,hasOwnProperty:Ghe}=Object.prototype,K2=Function.prototype.toString,EP=new Map;function pr(e,t){try{return TP(e,t)}finally{EP.clear()}}function TP(e,t){if(e===t)return!0;const r=W2.call(e),n=W2.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Q2(e,t))return!0;const i=G2(e),o=G2(t),a=i.length;if(a!==o.length)return!1;for(let s=0;s<a;++s)if(!Ghe.call(t,i[s]))return!1;for(let s=0;s<a;++s){const l=i[s];if(!TP(e[l],t[l]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Q2(e,t))return!0;const i=e.entries(),o=r==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[s,l]=a.value;if(!t.has(s)||o&&!TP(l,t.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=K2.call(e);return i!==K2.call(t)?!1:!Xhe(i,Yhe)}}return!1}function G2(e){return Object.keys(e).filter(Qhe,e)}function Qhe(e){return this[e]!==void 0}const Yhe="{ [native code] }";function Xhe(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function Q2(e,t){let r=EP.get(e);if(r){if(r.has(t))return!0}else EP.set(e,r=new Set);return r.add(t),!1}function oV(e,t,r,n){var i=t.data,o=hs(t,["data"]),a=r.data,s=hs(r,["data"]);return pr(o,s)&&vy(mv(e).selectionSet,i,a,{fragmentMap:uw(fw(e)),variables:n})}function vy(e,t,r,n){if(t===r)return!0;var i=new Set;return e.selections.every(function(o){if(i.has(o)||(i.add(o),!fv(o,n.variables))||Y2(o))return!0;if(Rl(o)){var a=Ol(o),s=t&&t[a],l=r&&r[a],u=o.selectionSet;if(!u)return pr(s,l);var c=Array.isArray(s),d=Array.isArray(l);if(c!==d)return!1;if(c&&d){var f=s.length;if(l.length!==f)return!1;for(var h=0;h<f;++h)if(!vy(u,s[h],l[h],n))return!1;return!0}return vy(u,s,l,n)}else{var m=cw(o,n.fragmentMap);if(m)return Y2(m)?!0:vy(m.selectionSet,t,r,n)}})}function Y2(e){return!!e.directives&&e.directives.some(Jhe)}function Jhe(e){return e.name.value==="nonreactive"}var aV=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=ym(rfe,{max:gs["cache.fragmentQueryDocuments"]||1e3,cache:E0})}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(Y(Y({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.watchFragment=function(t){var r=this,n=t.fragment,i=t.fragmentName,o=t.from,a=t.optimistic,s=a===void 0?!0:a,l=this.getFragmentDoc(n,i),u={returnPartialData:!0,id:typeof o=="string"?o:this.identify(o),query:l,optimistic:s},c;return new rr(function(d){return r.watch(Y(Y({},u),{immediate:!0,callback:function(f){if(!(c&&oV(l,{data:c==null?void 0:c.result},{data:f.result}))){var h={data:f.result,complete:!!f.complete};f.missing&&(h.missing=vw(f.missing.map(function(m){return m.missing}))),c=f,d.next(h)}}}))})},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(Y(Y({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=hs(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=hs(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(Y(Y({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(Y(Y({},t),{data:o})),o)}})},e}();globalThis.__DEV__!==!1&&(aV.prototype.getMemoryInternals=hfe);var sV=function(e){Jo(t,e);function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var l=s.path.length-1;l>=0;--l)s.missing=(a={},a[s.path[l]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),fn=Object.prototype.hasOwnProperty;function Sh(e){return e==null}function lV(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Sh(n)?Sh(i)?void 0:{_id:i}:{id:n}),Sh(n)&&!Sh(i)&&(n=i),!Sh(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var uV={dataIdFromObject:lV,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Zhe(e){return hf(uV,e)}function cV(e){var t=e.canonizeResults;return t===void 0?uV.canonizeResults:t}function epe(e,t){return qt(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var dV=/^[_a-z][_0-9a-z]*/i;function jl(e){var t=e.match(dV);return t?t[0]:e}function OP(e,t,r){return Fr(t)?Lr(t)?t.every(function(n){return OP(e,n,r)}):e.selections.every(function(n){if(Rl(n)&&fv(n,r)){var i=Ol(n);return fn.call(t,i)&&(!n.selectionSet||OP(n.selectionSet,t[i],r))}return!0}):!1}function yd(e){return Fr(e)&&!qt(e)&&!Lr(e)}function tpe(){return new kl}function fV(e,t){var r=uw(fw(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var gy=Object.create(null),IS=function(){return gy},X2=Object.create(null),bm=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return _P(qt(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return qt(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return Dd(i);if(qt(i))return i;var a=n.policies.identify(i)[0];if(a){var s=Dd(a);return o&&n.merge(a,i),s}}}return e.prototype.toObject=function(){return Y({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),fn.call(this.data,t)){var n=this.data[t];if(n&&fn.call(n,r))return n[r]}if(r==="__typename"&&fn.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Bs)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),fn.call(this.data,t))return this.data[t];if(this instanceof Bs)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;qt(t)&&(t=t.__ref),qt(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(a){Qe(typeof i=="string",1);var s=new kl(npe).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);o||(l.__exists=1),Object.keys(a).forEach(function(u){if(!o||o[u]!==s[u]){l[u]=1;var c=jl(u);c!==u&&!n.policies.hasKeyArgs(s.__typename,c)&&(l[c]=1),s[u]===void 0&&!(n instanceof Bs)&&delete s[u]}}),l.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete l.__typename,Object.keys(l).forEach(function(u){return n.group.dirty(i,u)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,s=!0,l={DELETE:gy,INVALIDATE:X2,isReference:qt,toReference:this.toReference,canRead:this.canRead,readField:function(u,c){return n.policies.readField(typeof u=="string"?{fieldName:u,from:c||Dd(t)}:u,{store:n})}};if(Object.keys(i).forEach(function(u){var c=jl(u),d=i[u];if(d!==void 0){var f=typeof r=="function"?r:r[u]||r[c];if(f){var h=f===IS?gy:f(_P(d),Y(Y({},l),{fieldName:c,storeFieldName:u,storage:n.getStorage(t,u)}));if(h===X2)n.group.dirty(t,u);else if(h===gy&&(h=void 0),h!==d&&(o[u]=h,a=!0,d=h,globalThis.__DEV__!==!1)){var m=function(P){if(n.lookup(P.__ref)===void 0)return globalThis.__DEV__!==!1&&Qe.warn(2,P),!0};if(qt(h))m(h);else if(Array.isArray(h))for(var v=!1,w=void 0,p=0,g=h;p<g.length;p++){var b=g[p];if(qt(b)){if(v=!0,m(b))break}else if(typeof b=="object"&&b){var _=n.policies.identify(b)[0];_&&(w=b)}if(v&&w!==void 0){globalThis.__DEV__!==!1&&Qe.warn(3,w);break}}}}d!==void 0&&(s=!1)}}),a)return this.merge(t,o),s&&(this instanceof Bs?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,s?(i={},i[s]=IS,i):IS)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(fn.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Bs&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){fn.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&fn.call(t,o)||r.delete(o)}),t){var n=t.__META,i=hs(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Bs?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){fn.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof Bs;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!fn.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){qt(o)&&(r[o.__ref]=!0),Fr(o)&&Object.keys(o).forEach(function(a){var s=o[a];Fr(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),hV=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?H3():null,this.keyMaker=new Af(Df)},e.prototype.depend=function(t,r){if(this.d){this.d(kS(t,r));var n=jl(r);n!==r&&this.d(kS(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(kS(t,r),r==="__exists"?"forget":"setDirty")},e}();function kS(e,t){return t+"#"+e}function J2(e,t){pp(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){Jo(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,l=i.seed,u=r.call(this,o,new hV(s))||this;return u.stump=new rpe(u),u.storageTrie=new Af(Df),l&&u.replace(l),u}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(bm||(bm={}));var Bs=function(e){Jo(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(l){pr(a[l],s[l])||n.group.dirty(o,l)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(l){n.group.dirty(o,l)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return Y(Y({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return fn.call(this.data,r)?Y(Y({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(bm),rpe=function(e){Jo(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new hV(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(r,n){return this.parent.merge(r,n)},t}(Bs);function npe(e,t,r){var n=e[r],i=t[r];return pr(n,i)?n:i}function pp(e){return!!(e instanceof bm&&e.group.caching)}function ipe(e){return Fr(e)?Lr(e)?e.slice(0):Y({__proto__:Object.getPrototypeOf(e)},e):e}var Z2=function(){function e(){this.known=new(C3?WeakSet:Set),this.pool=new Af(Df),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Fr(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Fr(t)){var r=ipe(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(Fr(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),globalThis.__DEV__!==!1&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),l=[s],u=this.sortedKeys(t);l.push(u.json);var c=l.length;u.sorted.forEach(function(h){l.push(r.admit(t[h]))});var a=this.pool.lookupArray(l);if(!a.object){var d=a.object=Object.create(s);this.known.add(d),u.sorted.forEach(function(h,m){d[h]=l[c+m]}),globalThis.__DEV__!==!1&&Object.freeze(d)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}();function eA(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ope=function(){function e(t){var r=this;this.knownResults=new(Df?WeakMap:Map),this.config=hf(t,{addTypename:t.addTypename!==!1,canonizeResults:cV(t)}),this.canon=t.canon||new Z2,this.executeSelectionSet=ym(function(n){var i,o=n.context.canonizeResults,a=eA(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?Y(Y({},s),{result:r.canon.admit(s.result)}):s:(J2(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||gs["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:eA,makeCacheKey:function(n,i,o,a){if(pp(o.store))return o.store.makeCacheKey(n,qt(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=ym(function(n){return J2(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||gs["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(pp(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Z2},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,s=t.returnPartialData,l=s===void 0?!0:s,u=t.canonizeResults,c=u===void 0?this.config.canonizeResults:u,d=this.config.cache.policies;a=Y(Y({},zT($3(n))),a);var f=Dd(o),h=this.executeSelectionSet({selectionSet:mv(n).selectionSet,objectOrReference:f,enclosingRef:f,context:Y({store:r,query:n,policies:d,variables:a,varString:vl(a),canonizeResults:c},fV(n,this.config.fragments))}),m;if(h.missing&&(m=[new sV(ape(h.missing),h.missing,n,a)],!l))throw m[0];return{result:h.result,complete:!m,missing:m}},e.prototype.isFresh=function(t,r,n,i){if(pp(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(qt(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,l=a.policies,u=a.store,c=u.getFieldValue(i,"__typename"),d=[],f,h=new kl;this.config.addTypename&&typeof c=="string"&&!l.rootIdsByTypename[c]&&d.push({__typename:c});function m(b,_){var P;return b.missing&&(f=h.merge(f,(P={},P[_]=b.missing,P))),b.result}var v=new Set(n.selections);v.forEach(function(b){var _,P;if(fv(b,s))if(Rl(b)){var C=l.readField({fieldName:b.name.value,field:b,variables:a.variables,from:i},a),x=Ol(b);C===void 0?KT.added(b)||(f=h.merge(f,(_={},_[x]="Can't find field '".concat(b.name.value,"' on ").concat(qt(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),_))):Lr(C)?C.length>0&&(C=m(r.executeSubSelectedArray({field:b,array:C,enclosingRef:o,context:a}),x)):b.selectionSet?C!=null&&(C=m(r.executeSelectionSet({selectionSet:b.selectionSet,objectOrReference:C,enclosingRef:qt(C)?C:o,context:a}),x)):a.canonizeResults&&(C=r.canon.pass(C)),C!==void 0&&d.push((P={},P[x]=C,P))}else{var T=cw(b,a.lookupFragment);if(!T&&b.kind===Oe.FRAGMENT_SPREAD)throw ei(9,b.name.value);T&&l.fragmentMatches(T,c)&&T.selectionSet.selections.forEach(v.add,v)}});var w=vw(d),p={result:w,missing:f},g=a.canonizeResults?this.canon.admit(p):_P(p);return g.result&&this.knownResults.set(g.result,n),g},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,s,l=new kl;function u(c,d){var f;return c.missing&&(s=l.merge(s,(f={},f[d]=c.missing,f))),c.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(c,d){return c===null?null:Lr(c)?u(r.executeSubSelectedArray({field:n,array:c,enclosingRef:o,context:a}),d):n.selectionSet?u(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:c,enclosingRef:qt(c)?c:o,context:a}),d):(globalThis.__DEV__!==!1&&spe(a.store,n,c),c)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function ape(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function spe(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){Fr(i)&&(Qe(!qt(i),10,epe(e,i),t.name.value),Object.values(i).forEach(n.add,n))})}}var ZT=new A3,tA=new WeakMap;function mp(e){var t=tA.get(e);return t||tA.set(e,t={vars:new Set,dep:H3()}),t}function rA(e){mp(e).vars.forEach(function(t){return t.forgetCache(e)})}function lpe(e){mp(e).vars.forEach(function(t){return t.attachCache(e)})}function upe(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(l){mp(l).dep.dirty(n),cpe(l)});var a=Array.from(r);r.clear(),a.forEach(function(l){return l(e)})}}else{var s=ZT.getValue();s&&(i(s),mp(s).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),mp(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function cpe(e){e.broadcastWatches&&e.broadcastWatches()}var nA=Object.create(null);function eO(e){var t=JSON.stringify(e);return nA[t]||(nA[t]=Object.create(null))}function iA(e){var t=eO(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=tO(e,function(a){var s=Nd(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&fn.call(r,a[0])&&(s=Nd(r,a,mV)),Qe(s!==void 0,4,a.join("."),r),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function oA(e){var t=eO(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=tO(e,function(u){var c=u[0],d=c.charAt(0);if(d==="@"){if(i&&$a(i.directives)){var f=c.slice(1),h=i.directives.find(function(p){return p.name.value===f}),m=h&&dw(h,o);return m&&Nd(m,u.slice(1))}return}if(d==="$"){var v=c.slice(1);if(o&&fn.call(o,v)){var w=u.slice(0);return w[0]=v,Nd(o,w)}return}if(r)return Nd(r,u)}),l=JSON.stringify(s);return(r||l!=="{}")&&(a+=":"+l),a})}function tO(e,t){var r=new kl;return pV(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function pV(e){var t=eO(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){Lr(i)?(pV(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),Lr(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function mV(e,t){return e[t]}function Nd(e,t,r){return r=r||mV,vV(t.reduce(function n(i,o){return Lr(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function vV(e){return Fr(e)?Lr(e)?e.map(vV):tO(Object.keys(e).sort(),function(t){return Nd(e,t)}):e}function RP(e){return e.args!==void 0?e.args:e.field?dw(e.field,e.variables):null}var dpe=function(){},aA=function(e,t){return t.fieldName},sA=function(e,t,r){var n=r.mergeObjects;return n(e,t)},lA=function(e,t){return t},fpe=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=Y({dataIdFromObject:lV},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,s=Y(Y({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var f=rO(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),l,u=o&&this.getTypePolicy(o),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var d=c(Y(Y({},t),a),s);if(Lr(d))c=iA(d);else{l=d;break}}return l=l?String(l):void 0,s.keyObject?[l,s.keyObject]:[l]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,l=hs(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),fn.call(r.toBeAdded,n)?r.toBeAdded[n].push(l):r.toBeAdded[n]=[l]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function s(l,u){l.merge=typeof u=="function"?u:u===!0?sA:u===!1?lA:l.merge}s(i,r.merge),i.keyFn=o===!1?dpe:Lr(o)?iA(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(l){var u=n.getFieldPolicy(t,l,!0),c=a[l];if(typeof c=="function")u.read=c;else{var d=c.keyArgs,f=c.read,h=c.merge;u.keyFn=d===!1?aA:Lr(d)?oA(d):typeof d=="function"?d:u.keyFn,typeof f=="function"&&(u.read=f),s(u,h)}u.read&&u.merge&&(u.keyFn=u.keyFn||aA)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(Qe(!i||i===t,5,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(dV);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!fn.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(a,s){if(a.test(t)){var l=r.supertypeMap.get(s);l&&l.forEach(function(u){return i.add(u)})}})),i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),l=s.fields,u=hs(s,["fields"]);Object.assign(n,u),Object.assign(n.fields,l)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),l=[s],u=function(m){var v=o.getSupertypeSet(m,!1);v&&v.size&&l.indexOf(v)<0&&l.push(v)},c=!!(n&&this.fuzzySubtypes.size),d=!1,f=0;f<l.length;++f){var h=l[f];if(h.has(a))return s.has(a)||(d&&globalThis.__DEV__!==!1&&Qe.warn(6,r,a),s.add(a)),!0;h.forEach(u),c&&f===l.length-1&&OP(t.selectionSet,n,i)&&(c=!1,d=!0,this.fuzzySubtypes.forEach(function(m,v){var w=r.match(m);w&&w[0]===r&&u(v)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:t.field||null,variables:t.variables},l=RP(t);a;){var u=a(l,s);if(Lr(u))a=oA(u);else{o=u||n;break}}return o===void 0&&(o=t.field?Ife(t.field,t.variables):j3(n,RP(t))),o===!1?n:n===jl(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(n){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),s=jl(a),l=r.store.getFieldValue(n,a),u=this.getFieldPolicy(t.typename,s,!1),c=u&&u.read;if(c){var d=uA(this,n,t,r,r.store.getStorage(qt(n)?n.__ref:n,a));return ZT.withValue(this.cache,c,[l,d])}return l}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,s=n.typename,l=n.merge;return l===sA?gV(i.store)(t,r):l===lA?r:(i.overwrite&&(t=void 0),l(t,r,uA(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function uA(e,t,r,n,i){var o=e.getStoreFieldName(r),a=jl(o),s=r.variables||n.variables,l=n.store,u=l.toReference,c=l.canRead;return{args:RP(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:qt,toReference:u,storage:i,cache:e.cache,canRead:c,readField:function(){return e.readField(rO(arguments,t,s),n)},mergeObjects:gV(n.store)}}function rO(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=Y({},n),fn.call(a,"from")||(a.from=t)),globalThis.__DEV__!==!1&&a.from===void 0&&globalThis.__DEV__!==!1&&Qe.warn(7,c3(Array.from(e))),a.variables===void 0&&(a.variables=r),a}function gV(e){return function(r,n){if(Lr(r)||Lr(n))throw ei(8);if(Fr(r)&&Fr(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(qt(r)&&yd(n))return e.merge(r.__ref,n),r;if(yd(r)&&qt(n))return e.merge(r,n.__ref),n;if(yd(r)&&yd(n))return Y(Y({},r),n)}return n}}function jS(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:Y(Y({},e),{clientOnly:t,deferred:r})),i}var hpe=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,l=r.overwrite,u=pv(i),c=tpe();s=Y(Y({},zT(u)),s);var d=Y(Y({store:t,written:Object.create(null),merge:function(h,m){return c.merge(h,m)},variables:s,varString:vl(s)},fV(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:d});if(!qt(f))throw ei(11,o);return d.incomingById.forEach(function(h,m){var v=h.storeObject,w=h.mergeTree,p=h.fieldNodeSet,g=Dd(m);if(w&&w.map.size){var b=n.applyMerges(w,g,v,d);if(qt(b))return;v=b}if(globalThis.__DEV__!==!1&&!d.overwrite){var _=Object.create(null);p.forEach(function(x){x.selectionSet&&(_[x.name.value]=!0)});var P=function(x){return _[jl(x)]===!0},C=function(x){var T=w&&w.map.get(x);return!!(T&&T.info&&T.info.merge)};Object.keys(v).forEach(function(x){P(x)&&!C(x)&&ppe(g,v,x,d.store)})}t.merge(m,v)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,s=t.mergeTree,l=this.cache.policies,u=Object.create(null),c=n&&l.rootTypenamesById[n]||gP(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof c=="string"&&(u.__typename=c);var d=function(){var b=rO(arguments,u,a.variables);if(qt(b.from)){var _=a.incomingById.get(b.from.__ref);if(_){var P=l.readField(Y(Y({},b),{from:_.storeObject}),a);if(P!==void 0)return P}}return l.readField(b,a)},f=new Set;this.flattenFields(o,i,a,c).forEach(function(b,_){var P,C=Ol(_),x=i[C];if(f.add(_),x!==void 0){var T=l.getStoreFieldName({typename:c,fieldName:_.name.value,field:_,variables:b.variables}),I=cA(s,T),M=r.processFieldValue(x,_,_.selectionSet?jS(b,!1,!1):b,I),H=void 0;_.selectionSet&&(qt(M)||yd(M))&&(H=d("__typename",M));var re=l.getMergeFunction(c,_.name.value,H);re?I.info={field:_,typename:c,merge:re}:dA(s,T),u=b.merge(u,(P={},P[T]=M,P))}else globalThis.__DEV__!==!1&&!b.clientOnly&&!b.deferred&&!KT.added(_)&&!l.getReadFunction(c,_.name.value)&&globalThis.__DEV__!==!1&&Qe.error(12,Ol(_),i)});try{var h=l.identify(i,{typename:c,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:u,readField:d}),m=h[0],v=h[1];n=n||m,v&&(u=a.merge(u,v))}catch(b){if(!n)throw b}if(typeof n=="string"){var w=Dd(n),p=a.written[n]||(a.written[n]=[]);if(p.indexOf(o)>=0||(p.push(o),this.reader&&this.reader.isFresh(i,w,o,a)))return w;var g=a.incomingById.get(n);return g?(g.storeObject=a.merge(g.storeObject,u),g.mergeTree=IP(g.mergeTree,s),f.forEach(function(b){return g.fieldNodeSet.add(b)})):a.incomingById.set(n,{storeObject:u,mergeTree:O0(s)?void 0:s,fieldNodeSet:f}),w}return u},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?globalThis.__DEV__!==!1?Z3(t):t:Lr(t)?t.map(function(a,s){var l=o.processFieldValue(a,r,n,cA(i,s));return dA(i,s),l}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=gP(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new Af(!1);return function l(u,c){var d=s.lookup(u,c.clientOnly,c.deferred);d.visited||(d.visited=!0,u.selections.forEach(function(f){if(fv(f,n.variables)){var h=c.clientOnly,m=c.deferred;if(!(h&&m)&&$a(f.directives)&&f.directives.forEach(function(p){var g=p.name.value;if(g==="client"&&(h=!0),g==="defer"){var b=dw(p,n.variables);(!b||b.if!==!1)&&(m=!0)}}),Rl(f)){var v=o.get(f);v&&(h=h&&v.clientOnly,m=m&&v.deferred),o.set(f,jS(n,h,m))}else{var w=cw(f,n.lookupFragment);if(!w&&f.kind===Oe.FRAGMENT_SPREAD)throw ei(13,f.name.value);w&&a.fragmentMatches(w,i,r,n.variables)&&l(w.selectionSet,jS(n,h,m))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,s=this;if(t.map.size&&!qt(n)){var l=!Lr(n)&&(qt(r)||yd(r))?r:void 0,u=n;l&&!o&&(o=[qt(l)?l.__ref:l]);var c,d=function(f,h){return Lr(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var m=d(l,h),v=d(u,h);if(v!==void 0){o&&o.push(h);var w=s.applyMerges(f,m,v,i,o);w!==v&&(c=c||new Map,c.set(h,w)),o&&Qe(o.pop()===h)}}),c&&(n=Lr(u)?u.slice(0):Y({},u),c.forEach(function(f,h){n[h]=f}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),yV=[];function cA(e,t){var r=e.map;return r.has(t)||r.set(t,yV.pop()||{map:new Map}),r.get(t)}function IP(e,t){if(e===t||!t||O0(t))return e;if(!e||O0(e))return t;var r=e.info&&t.info?Y(Y({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(s,l){o.map.set(l,IP(s,t.map.get(l))),a.delete(l)}),a.forEach(function(s){o.map.set(s,IP(t.map.get(s),e.map.get(s)))})}return o}function O0(e){return!e||!(e.info||e.map.size)}function dA(e,t){var r=e.map,n=r.get(t);n&&O0(n)&&(yV.push(n),r.delete(t))}var fA=new Set;function ppe(e,t,r,n){var i=function(d){var f=n.getFieldValue(d,r);return typeof f=="object"&&f},o=i(e);if(o){var a=i(t);if(a&&!qt(o)&&!pr(o,a)&&!Object.keys(o).every(function(d){return n.getFieldValue(a,d)!==void 0})){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),l=jl(r),u="".concat(s,".").concat(l);if(!fA.has(u)){fA.add(u);var c=[];!Lr(o)&&!Lr(a)&&[o,a].forEach(function(d){var f=n.getFieldValue(d,"__typename");typeof f=="string"&&!c.includes(f)&&c.push(f)}),globalThis.__DEV__!==!1&&Qe.warn(14,l,s,c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"",u,Y({},o),Y({},a))}}}}var bV=function(e){Jo(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new W3(KT),n.assumeImmutableResults=!0,n.makeVar=upe,n.txCount=0,n.config=Zhe(r),n.addTypename=!!n.config.addTypename,n.policies=new fpe({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return t.prototype.init=function(){var r=this.data=new bm.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},t.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,o=this.config.fragments;this.storeWriter=new hpe(this,this.storeReader=new ope({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:cV(this.config),canon:r?void 0:i&&i.canon,fragments:o}),o),this.maybeBroadcastWatch=ym(function(a,s){return n.broadcastWatch(a,s)},{max:this.config.resultCacheMaxSize||gs["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(a){var s=a.optimistic?n.optimisticData:n.data;if(pp(s)){var l=a.optimistic,u=a.id,c=a.variables;return s.makeCacheKey(a.query,a.callback,vl({optimistic:l,id:u,variables:c}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},t.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},t.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},t.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(Y(Y({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(o){if(o instanceof sV)return null;throw o}},t.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(r){if(fn.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(Y(Y({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(r){var n=this;return this.watches.size||lpe(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&rA(n),n.maybeBroadcastWatch.forget(r)}},t.prototype.gc=function(r){var n;vl.reset(),mw.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},t.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},t.prototype.identify=function(r){if(qt(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){globalThis.__DEV__!==!1&&Qe.warn(n)}},t.prototype.evict=function(r){if(!r.id){if(fn.call(r,"id"))return!1;r=Y(Y({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(r){var n=this;return this.init(),vl.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),rA(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},t.prototype.batch=function(r){var n=this,i=r.update,o=r.optimistic,a=o===void 0?!0:o,s=r.removeOptimistic,l=r.onWatchUpdated,u,c=function(f){var h=n,m=h.data,v=h.optimisticData;++n.txCount,f&&(n.data=n.optimisticData=f);try{return u=i(n)}finally{--n.txCount,n.data=m,n.optimisticData=v}},d=new Set;return l&&!this.txCount&&this.broadcastWatches(Y(Y({},r),{onWatchUpdated:function(f){return d.add(f),!1}})),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,c):a===!1?c(this.data):c(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),l&&d.size?(this.broadcastWatches(Y(Y({},r),{onWatchUpdated:function(f,h){var m=l.call(this,f,h);return m!==!1&&d.delete(f),m}})),d.size&&d.forEach(function(f){return n.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(r),u},t.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},t.prototype.transformDocument=function(r){return this.addTypenameToDocument(this.addFragmentsToDocument(r))},t.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},t.prototype.addFragmentsToDocument=function(r){var n=this.config.fragments;return n?n.transform(r):r},t.prototype.addTypenameToDocument=function(r){return this.addTypename?this.addTypenameTransform.transformDocument(r):r},t.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,o=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,o,i)===!1)||(!i||!pr(i.result,o.result))&&r.callback(r.lastDiff=o,i)},t}(aV);globalThis.__DEV__!==!1&&(bV.prototype.getMemoryInternals=ffe);var tr;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(tr||(tr={}));function wm(e){return e?e<7:!1}var hA=Object.assign,mpe=Object.hasOwnProperty,kP=function(e){Jo(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=e.call(this,function(w){try{var p=w._subscription._observer;p&&!p.error&&(p.error=vpe)}catch{}var g=!a.observers.size;a.observers.add(w);var b=a.last;return b&&b.error?w.error&&w.error(b.error):b&&b.result&&w.next&&w.next(b.result),g&&a.reobserve().catch(function(){}),function(){a.observers.delete(w)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=$S(o.fetchPolicy),a.isTornDown=!1;var s=n.defaultOptions.watchQuery,l=s===void 0?{}:s,u=l.fetchPolicy,c=u===void 0?"cache-first":u,d=o.fetchPolicy,f=d===void 0?c:d,h=o.initialFetchPolicy,m=h===void 0?f==="standby"?c:f:h;a.options=Y(Y({},o),{initialFetchPolicy:m,fetchPolicy:f}),a.queryId=i.queryId||n.generateQueryId();var v=pv(a.query);return a.queryName=v&&v.name&&v.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(s){n(s),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||tr.ready,o=Y(Y({},n),{loading:wm(i),networkStatus:i}),a=this.options.fetchPolicy,s=a===void 0?"cache-first":a;if(!($S(s)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var l=this.queryInfo.getDiff();(l.complete||this.options.returnPartialData)&&(o.data=l.result),pr(o.data,{})&&(o.data=void 0),l.complete?(delete o.partial,l.complete&&o.networkStatus===tr.loading&&(s==="cache-first"||s==="cache-only")&&(o.networkStatus=tr.ready,o.loading=!1)):o.partial=!0,globalThis.__DEV__!==!1&&!l.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&SV(l.missing)}return r&&this.updateLastResult(o),o},t.prototype.isDifferentFromLastResult=function(r,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!oV(this.query,this.last.result,r,this.variables):!pr(this.last.result,r);return i||n&&!pr(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||pr(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="cache-and-network"?i.fetchPolicy=o:o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&mpe.call(r,"variables")){var a=$3(this.query),s=a.variableDefinitions;(!s||!s.some(function(l){return l.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&Qe.warn(20,r,((n=a.name)===null||n===void 0?void 0:n.value)||a)}return r&&!pr(this.options.variables,r)&&(i.variables=this.options.variables=Y(Y({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,tr.refetch)},t.prototype.fetchMore=function(r){var n=this,i=Y(Y({},r.query?r:Y(Y(Y(Y({},this.options),{query:this.options.query}),r),{variables:Y(Y({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var o=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,s=a.networkStatus;a.networkStatus=tr.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var l=new Set;return this.queryManager.fetchQuery(o,i,tr.fetchMore).then(function(u){return n.queryManager.removeQuery(o),a.networkStatus===tr.fetchMore&&(a.networkStatus=s),n.queryManager.cache.batch({update:function(c){var d=r.updateQuery;d?c.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(f){return d(f,{fetchMoreResult:u.data,variables:i.variables})}):c.writeQuery({query:i.query,variables:i.variables,data:u.data})},onWatchUpdated:function(c){l.add(c.query)}}),u}).finally(function(){l.has(n.query)||wV(n)})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,l){var u=l.variables;return a(s,{subscriptionData:o,variables:u})})},error:function(o){if(r.onError){r.onError(o);return}globalThis.__DEV__!==!1&&Qe.error(21,o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.silentSetOptions=function(r){var n=hf(this.options,r||{});hA(this.options,n)},t.prototype.setVariables=function(r){return pr(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},tr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,r,n,i)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){Qe(o,22);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){var u,c;r.pollingInfo&&(!wm(r.queryInfo.networkStatus)&&!(!((c=(u=r.options).skipPollAttempt)===null||c===void 0)&&c.call(u))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},tr.poll).then(l,l):l())},l=function(){var u=r.pollingInfo;u&&(clearTimeout(u.timeout),u.timeout=setTimeout(s,u.interval))};l()}}},t.prototype.updateLastResult=function(r,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!pr(n,this.last.variables)&&(i=void 0),this.last=Y({result:this.queryManager.assumeImmutableResults?r:Z3(r),variables:n},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(r,n){var i=this;this.isTornDown=!1;var o=n===tr.refetch||n===tr.fetchMore||n===tr.poll,a=this.options.variables,s=this.options.fetchPolicy,l=hf(this.options,r||{}),u=o?l:hA(this.options,l),c=this.transformDocument(u.query);this.lastQuery=c,o||(this.updatePolling(),r&&r.variables&&!pr(r.variables,a)&&u.fetchPolicy!=="standby"&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),n===void 0&&(n=tr.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=$S(u.fetchPolicy));var d=function(){i.concast===m&&(i.waitForOwnResult=!1)},f=u.variables&&Y({},u.variables),h=this.fetch(u,n,c),m=h.concast,v=h.fromLink,w={next:function(p){pr(i.variables,f)&&(d(),i.reportResult(p,f))},error:function(p){pr(i.variables,f)&&(d(),i.reportError(p,f))}};return!o&&(v||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=m,this.observer=w),m.addObserver(w),m},t.prototype.reobserve=function(r,n){return this.reobserveAsConcast(r,n).promise},t.prototype.resubscribeAfterError=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.last;this.resetLastResults();var o=this.subscribe.apply(this,r);return this.last=i,o},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError(),o=this.isDifferentFromLastResult(r,n);(i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),(i||o)&&hp(this.observers,"next",r)},t.prototype.reportError=function(r,n){var i=Y(Y({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:tr.error,loading:!1});this.updateLastResult(i,n),hp(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(r){return this.queryManager.transform(r)},t}(rr);eV(kP);function wV(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,o){return this.nextFetchPolicy=n,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,o):r}}):e.reobserve()}function vpe(e){globalThis.__DEV__!==!1&&Qe.error(23,e.message,e.stack)}function SV(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&Qe.debug(24,e)}function $S(e){return e==="network-only"||e==="no-cache"||e==="standby"}var _V=function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,o=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=M2(r.resolvers,n)}):this.resolvers=M2(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return Hs(this,arguments,void 0,function(r){var n=r.document,i=r.remoteResult,o=r.context,a=r.variables,s=r.onlyRunForcedResolvers,l=s===void 0?!1:s;return Ws(this,function(u){return n?[2,this.resolveDocument(n,i.data,o,a,this.fragmentMatcher,l).then(function(c){return Y(Y({},i),{data:c.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return vm(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return Q3(t)},e.prototype.prepareContext=function(t){var r=this.cache;return Y(Y({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t){return Hs(this,arguments,void 0,function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),Ws(this,function(o){return r?[2,this.resolveDocument(r,this.buildRootValueFromCache(r,n)||{},this.prepareContext(i),n).then(function(a){return Y(Y({},n),a.exportedVariables)})]:[2,Y({},n)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return vs(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return BT}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:Jfe(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r){return Hs(this,arguments,void 0,function(n,i,o,a,s,l){var u,c,d,f,h,m,v,w,p,g,b;return o===void 0&&(o={}),a===void 0&&(a={}),s===void 0&&(s=function(){return!0}),l===void 0&&(l=!1),Ws(this,function(_){return u=mv(n),c=fw(n),d=uw(c),f=this.collectSelectionsToResolve(u,d),h=u.operation,m=h?h.charAt(0).toUpperCase()+h.slice(1):"Query",v=this,w=v.cache,p=v.client,g={fragmentMap:d,context:Y(Y({},o),{cache:w,client:p}),variables:a,fragmentMatcher:s,defaultOperationType:m,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:l},b=!1,[2,this.resolveSelectionSet(u.selectionSet,b,i,g).then(function(P){return{result:P,exportedVariables:g.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return Hs(this,void 0,void 0,function(){var o,a,s,l,u,c=this;return Ws(this,function(d){return o=i.fragmentMap,a=i.context,s=i.variables,l=[n],u=function(f){return Hs(c,void 0,void 0,function(){var h,m;return Ws(this,function(v){return!r&&!i.selectionsToResolve.has(f)?[2]:fv(f,s)?Rl(f)?[2,this.resolveField(f,r,n,i).then(function(w){var p;typeof w<"u"&&l.push((p={},p[Ol(f)]=w,p))})]:(jfe(f)?h=f:(h=o[f.name.value],Qe(h,18,f.name.value)),h&&h.typeCondition&&(m=h.typeCondition.name.value,i.fragmentMatcher(n,m,a))?[2,this.resolveSelectionSet(h.selectionSet,r,n,i).then(function(w){l.push(w)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(u)).then(function(){return vw(l)})]})})},e.prototype.resolveField=function(t,r,n,i){return Hs(this,void 0,void 0,function(){var o,a,s,l,u,c,d,f,h,m=this;return Ws(this,function(v){return n?(o=i.variables,a=t.name.value,s=Ol(t),l=a!==s,u=n[s]||n[a],c=Promise.resolve(u),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=n.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(h=f[l?a:s],h&&(c=Promise.resolve(ZT.withValue(this.cache,h,[n,dw(t,o),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,c.then(function(w){var p,g;if(w===void 0&&(w=u),t.directives&&t.directives.forEach(function(_){_.name.value==="export"&&_.arguments&&_.arguments.forEach(function(P){P.name.value==="as"&&P.value.kind==="StringValue"&&(i.exportedVariables[P.value.value]=w)})}),!t.selectionSet||w==null)return w;var b=(g=(p=t.directives)===null||p===void 0?void 0:p.some(function(_){return _.name.value==="client"}))!==null&&g!==void 0?g:!1;if(Array.isArray(w))return m.resolveSubSelectedArray(t,r||b,w,i);if(t.selectionSet)return m.resolveSelectionSet(t.selectionSet,r||b,w,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return o.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var s=new Set;i.set(a,s),vs(a,{Directive:function(l,u,c,d,f){l.name.value==="client"&&f.forEach(function(h){n(h)&&E2(h)&&s.add(h)})},FragmentSpread:function(l,u,c,d,f){var h=r[l.name.value];Qe(h,19,l.name.value);var m=o(h);m.size>0&&(f.forEach(function(v){n(v)&&E2(v)&&s.add(v)}),s.add(l),m.forEach(function(v){s.add(v)}))}})}return i.get(a)}return o(t)},e}(),bd=new(Df?WeakMap:Map);function AS(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return bd.set(e,(bd.get(e)+1)%1e15),r.apply(this,arguments)})}function pA(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var DS=function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=t.cache;bd.has(n)||(bd.set(n,0),AS(n,"evict"),AS(n,"modify"),AS(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||tr.loading;return this.variables&&this.networkStatus!==tr.loading&&!pr(this.variables,t.variables)&&(r=tr.setVariables),pr(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){pA(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&pr(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r=this,n,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&(!((n=this.observableQuery)===null||n===void 0)&&n.getLastError())||(this.updateLastDiff(t),!this.dirty&&!pr(i&&i.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},e.prototype.setObservableQuery=function(t){var r=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=r.getDiff();n.fromOptimisticTransaction?t.observe():wV(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;pA(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(wm(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=Y(Y({},this.getDiffOptions(t)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!pr(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,r){var n=this.lastWrite;return!(n&&n.dmCount===bd.get(this.cache)&&pr(r,n.variables)&&pr(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var o=this,a=new kl,s=$a(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&$a(t.incremental)){var l=tV(this.getDiff().result,t);t.data=l}else if("hasNext"in t&&t.hasNext){var u=this.getDiff();t.data=a.merge(u.result,t.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(jP(t,n.errorPolicy)?this.cache.performTransaction(function(c){if(o.shouldWrite(t,n.variables))c.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:t,variables:n.variables,dmCount:bd.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){t.data=o.lastDiff.diff.result;return}var d=o.getDiffOptions(n.variables),f=c.diff(d);!o.stopped&&pr(o.variables,n.variables)&&o.updateWatch(n.variables),o.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=tr.ready},e.prototype.markError=function(t){return this.networkStatus=tr.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function jP(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!my(e);return!n&&r&&e.data&&(n=!0),n}var gpe=Object.prototype.hasOwnProperty,mA=Object.create(null),ype=function(){function e(t){var r=t.cache,n=t.link,i=t.defaultOptions,o=t.documentTransform,a=t.queryDeduplication,s=a===void 0?!1:a,l=t.onBroadcast,u=t.ssrMode,c=u===void 0?!1:u,d=t.clientAwareness,f=d===void 0?{}:d,h=t.localState,m=t.assumeImmutableResults,v=m===void 0?!!r.assumeImmutableResults:m,w=t.defaultContext,p=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new T3(gs["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Af(!1);var g=new W3(function(b){return p.cache.transformDocument(b)},{cache:!1});this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=s,this.clientAwareness=f,this.localState=h||new _V({cache:r}),this.ssrMode=c,this.assumeImmutableResults=v,this.documentTransform=o?g.concat(o).concat(g):g,this.defaultContext=w||Object.create(null),(this.onBroadcast=l)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(ei(25))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return Hs(this,arguments,void 0,function(r){var n,i,o,a,s,l,u,c=r.mutation,d=r.variables,f=r.optimisticResponse,h=r.updateQueries,m=r.refetchQueries,v=m===void 0?[]:m,w=r.awaitRefetchQueries,p=w===void 0?!1:w,g=r.update,b=r.onQueryUpdated,_=r.fetchPolicy,P=_===void 0?((l=this.defaultOptions.mutate)===null||l===void 0?void 0:l.fetchPolicy)||"network-only":_,C=r.errorPolicy,x=C===void 0?((u=this.defaultOptions.mutate)===null||u===void 0?void 0:u.errorPolicy)||"none":C,T=r.keepRootFields,I=r.context;return Ws(this,function(M){switch(M.label){case 0:return Qe(c,26),Qe(P==="network-only"||P==="no-cache",27),n=this.generateMutationId(),c=this.cache.transformForLink(this.transform(c)),i=this.getDocumentInfo(c).hasClientExports,d=this.getVariables(c,d),i?[4,this.localState.addExportedVariables(c,d,I)]:[3,2];case 1:d=M.sent(),M.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[n]={mutation:c,variables:d,loading:!0,error:null}),a=f&&this.markMutationOptimistic(f,{mutationId:n,document:c,variables:d,fetchPolicy:P,errorPolicy:x,context:I,updateQueries:h,update:g,keepRootFields:T}),this.broadcastQueries(),s=this,[2,new Promise(function(H,re){return TS(s.getObservableFromLink(c,Y(Y({},I),{optimisticResponse:a?f:void 0}),d,!1),function(ie){if(my(ie)&&x==="none")throw new $c({graphQLErrors:xP(ie)});o&&(o.loading=!1,o.error=null);var R=Y({},ie);return typeof v=="function"&&(v=v(R)),x==="ignore"&&my(R)&&delete R.errors,s.markMutationResult({mutationId:n,result:R,document:c,variables:d,fetchPolicy:P,errorPolicy:x,context:I,update:g,updateQueries:h,awaitRefetchQueries:p,refetchQueries:v,removeOptimistic:a?n:void 0,onQueryUpdated:b,keepRootFields:T})}).subscribe({next:function(ie){s.broadcastQueries(),(!("hasNext"in ie)||ie.hasNext===!1)&&H(ie)},error:function(ie){o&&(o.loading=!1,o.error=ie),a&&s.cache.removeOptimistic(n),s.broadcastQueries(),re(ie instanceof $c?ie:new $c({networkError:ie}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,o=[],a=t.fetchPolicy==="no-cache";if(!a&&jP(i,t.errorPolicy)){if(Md(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),Md(i)&&$a(i.incremental)){var s=r.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),l=void 0;s.result&&(l=tV(s.result,i)),typeof l<"u"&&(i.data=l,o.push({result:l,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var u=t.updateQueries;u&&this.queries.forEach(function(d,f){var h=d.observableQuery,m=h&&h.queryName;if(!(!m||!gpe.call(u,m))){var v=u[m],w=n.queries.get(f),p=w.document,g=w.variables,b=r.diff({query:p,variables:g,returnPartialData:!0,optimistic:!1}),_=b.result,P=b.complete;if(P&&_){var C=v(_,{mutationResult:i,queryName:p&&yP(p)||void 0,queryVariables:g});C&&o.push({result:C,dataId:"ROOT_QUERY",query:p,variables:g})}}})}if(o.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(d){a||o.forEach(function(v){return d.write(v)});var f=t.update,h=!hhe(i)||Md(i)&&!i.hasNext;if(f){if(!a){var m=d.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});m.complete&&(i=Y(Y({},i),{data:m.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}h&&f(d,i,{context:t.context,variables:t.variables})}!a&&!t.keepRootFields&&h&&d.modify({id:"ROOT_MUTATION",fields:function(v,w){var p=w.fieldName,g=w.DELETE;return p==="__typename"?v:g}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return c.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(c).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables,{IGNORE:mA}):t;return i===mA?!1:(this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(Y(Y({},r),{result:{data:i}}),o)}catch(a){globalThis.__DEV__!==!1&&Qe.error(a)}},r.mutationId),!0)},e.prototype.fetchQuery=function(t,r,n){return this.fetchConcastWithInfo(t,r,n).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var r=this.transformCache;if(!r.has(t)){var n={hasClientExports:Qde(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:vm(["nonreactive"],t),clientQuery:this.localState.clientQuery(t),serverQuery:G3([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],t),defaultVars:zT(pv(t)),asQuery:Y(Y({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?Y(Y({},i),{operation:"query"}):i})})};r.set(t,n)}return r.get(t)},e.prototype.getVariables=function(t,r){return Y(Y({},this.getDocumentInfo(t).defaultVars),r)},e.prototype.watchQuery=function(t){var r=this.transform(t.query);t=Y(Y({},t),{variables:this.getVariables(r,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var n=new DS(this),i=new kP({queryManager:this,queryInfo:n,options:t});return i.lastQuery=r,this.queries.set(i.queryId,n),n.init({document:r,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,r){var n=this;return r===void 0&&(r=this.generateQueryId()),Qe(t.query,28),Qe(t.query.kind==="Document",29),Qe(!t.returnPartialData,30),Qe(!t.pollInterval,31),this.fetchQuery(r,Y(Y({},t),{query:this.transform(t.query)})).finally(function(){return n.stopQuery(r)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(ei(32)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=tr.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){typeof a=="string"?i.set(a,!1):wfe(a)?i.set(r.transform(a),!1):Fr(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,s){var l=a.observableQuery,u=a.document;if(l){if(t==="all"){n.set(s,l);return}var c=l.queryName,d=l.options.fetchPolicy;if(d==="standby"||t==="active"&&!l.hasObservers())return;(t==="active"||c&&i.has(c)||u&&i.has(u))&&(n.set(s,l),c&&i.set(c,!0),u&&i.set(u,!0))}}),o.size&&o.forEach(function(a){var s=uP("legacyOneTimeQuery"),l=r.getQuery(s).init({document:a.query,variables:a.variables}),u=new kP({queryManager:r,queryInfo:l,options:Y(Y({},a),{fetchPolicy:"network-only"})});Qe(u.queryId===s),l.setObservableQuery(u),n.set(s,u)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(a,s){a||globalThis.__DEV__!==!1&&Qe.warn(typeof s=="string"?33:34,s)}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.fetchPolicy,o=t.errorPolicy,a=o===void 0?"none":o,s=t.variables,l=t.context,u=l===void 0?{}:l;n=this.transform(n),s=this.getVariables(n,s);var c=function(f){return r.getObservableFromLink(n,u,f).map(function(h){i!=="no-cache"&&(jP(h,a)&&r.cache.write({query:n,result:h.data,dataId:"ROOT_SUBSCRIPTION",variables:f}),r.broadcastQueries());var m=my(h),v=Ihe(h);if(m||v){var w={};if(m&&(w.graphQLErrors=h.errors),v&&(w.protocolErrors=h.extensions[JT]),a==="none"||v)throw new $c(w)}return a==="ignore"&&delete h.errors,h})};if(this.getDocumentInfo(n).hasClientExports){var d=this.localState.addExportedVariables(n,s,u).then(c);return new rr(function(f){var h=null;return d.then(function(m){return h=m.subscribe(f)},f.error),function(){return h&&h.unsubscribe()}})}return c(s)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,r,n,i){var o=this,a;i===void 0&&(i=(a=r==null?void 0:r.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var s,l=this.getDocumentInfo(t),u=l.serverQuery,c=l.clientQuery;if(u){var d=this,f=d.inFlightLinkObservables,h=d.link,m={query:u,variables:n,operationName:yP(u)||void 0,context:this.prepareContext(Y(Y({},r),{forceFetch:!i}))};if(r=m.context,i){var v=mw(u),w=vl(n),p=f.lookup(v,w);if(s=p.observable,!s){var g=new Uc([PP(h,m)]);s=p.observable=g,g.beforeNext(function(){f.remove(v,w)})}}else s=new Uc([PP(h,m)])}else s=new Uc([rr.of({data:{}})]),r=this.prepareContext(r);return c&&(s=TS(s,function(b){return o.localState.runResolvers({document:c,remoteResult:b,context:r,variables:n})})),s},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(n.query);return TS(this.getObservableFromLink(o,n.context,n.variables),function(a){var s=xP(a),l=s.length>0;if(i>=t.lastRequestId){if(l&&n.errorPolicy==="none")throw t.markError(new $c({graphQLErrors:s}));t.markResult(a,o,n,r),t.markReady()}var u={data:a.data,loading:!1,networkStatus:tr.ready};return l&&n.errorPolicy!=="ignore"&&(u.errors=s,u.networkStatus=tr.error),u},function(a){var s=khe(a)?a:new $c({networkError:a});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchConcastWithInfo=function(t,r,n,i){var o=this;n===void 0&&(n=tr.loading),i===void 0&&(i=r.query);var a=this.getVariables(i,r.variables),s=this.getQuery(t),l=this.defaultOptions.watchQuery,u=r.fetchPolicy,c=u===void 0?l&&l.fetchPolicy||"cache-first":u,d=r.errorPolicy,f=d===void 0?l&&l.errorPolicy||"none":d,h=r.returnPartialData,m=h===void 0?!1:h,v=r.notifyOnNetworkStatusChange,w=v===void 0?!1:v,p=r.context,g=p===void 0?{}:p,b=Object.assign({},r,{query:i,variables:a,fetchPolicy:c,errorPolicy:f,returnPartialData:m,notifyOnNetworkStatusChange:w,context:g}),_=function(I){b.variables=I;var M=o.fetchQueryByPolicy(s,b,n);return b.fetchPolicy!=="standby"&&M.sources.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",r),M},P=function(){return o.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(I){P(),setTimeout(function(){return C.cancel(I)})});var C,x;if(this.getDocumentInfo(b.query).hasClientExports)C=new Uc(this.localState.addExportedVariables(b.query,b.variables,b.context).then(_).then(function(I){return I.sources})),x=!0;else{var T=_(b.variables);x=T.fromLink,C=new Uc(T.sources)}return C.promise.then(P,P),{concast:C,fromLink:x}},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,o=t.optimistic,a=o===void 0?!1:o,s=t.removeOptimistic,l=s===void 0?a?uP("refetchQueries"):void 0:s,u=t.onQueryUpdated,c=new Map;i&&this.getObservableQueries(i).forEach(function(f,h){c.set(h,{oq:f,lastDiff:r.getQuery(h).getDiff()})});var d=new Map;return n&&this.cache.batch({update:n,optimistic:a&&l||!1,removeOptimistic:l,onWatchUpdated:function(f,h,m){var v=f.watcher instanceof DS&&f.watcher.observableQuery;if(v){if(u){c.delete(v.queryId);var w=u(v,h,m);return w===!0&&(w=v.refetch()),w!==!1&&d.set(v,w),w}u!==null&&c.set(v.queryId,{oq:v,lastDiff:m,diff:h})}}}),c.size&&c.forEach(function(f,h){var m=f.oq,v=f.lastDiff,w=f.diff,p;if(u){if(!w){var g=m.queryInfo;g.reset(),w=g.getDiff()}p=u(m,w,v)}(!u||p===!0)&&(p=m.refetch()),p!==!1&&d.set(m,p),h.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(h)}),l&&this.cache.removeOptimistic(l),d},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,o=r.query,a=r.variables,s=r.fetchPolicy,l=r.refetchWritePolicy,u=r.errorPolicy,c=r.returnPartialData,d=r.context,f=r.notifyOnNetworkStatusChange,h=t.networkStatus;t.init({document:o,variables:a,networkStatus:n});var m=function(){return t.getDiff()},v=function(_,P){P===void 0&&(P=t.networkStatus||tr.loading);var C=_.result;globalThis.__DEV__!==!1&&!c&&!pr(C,{})&&SV(_.missing);var x=function(T){return rr.of(Y({data:T,loading:wm(P),networkStatus:P},_.complete?null:{partial:!0}))};return C&&i.getDocumentInfo(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:C},context:d,variables:a,onlyRunForcedResolvers:!0}).then(function(T){return x(T.data||void 0)}):u==="none"&&P===tr.refetch&&Array.isArray(_.missing)?x(void 0):x(C)},w=s==="no-cache"?0:n===tr.refetch&&l!=="merge"?1:2,p=function(){return i.getResultsFromLink(t,w,{query:o,variables:a,context:d,fetchPolicy:s,errorPolicy:u})},g=f&&typeof h=="number"&&h!==n&&wm(n);switch(s){default:case"cache-first":{var b=m();return b.complete?{fromLink:!1,sources:[v(b,t.markReady())]}:c||g?{fromLink:!0,sources:[v(b),p()]}:{fromLink:!0,sources:[p()]}}case"cache-and-network":{var b=m();return b.complete||c||g?{fromLink:!0,sources:[v(b),p()]}:{fromLink:!0,sources:[p()]}}case"cache-only":return{fromLink:!1,sources:[v(m(),t.markReady())]};case"network-only":return g?{fromLink:!0,sources:[v(m()),p()]}:{fromLink:!0,sources:[p()]};case"no-cache":return g?{fromLink:!0,sources:[v(t.getDiff()),p()]}:{fromLink:!0,sources:[p()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new DS(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return Y(Y(Y({},this.defaultContext),r),{clientAwareness:this.clientAwareness})},e}(),vA=!1,xV=function(){function e(t){var r=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw ei(15);var n=t.uri,i=t.credentials,o=t.headers,a=t.cache,s=t.documentTransform,l=t.ssrMode,u=l===void 0?!1:l,c=t.ssrForceFetchDelay,d=c===void 0?0:c,f=t.connectToDevTools,h=f===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&globalThis.__DEV__!==!1:f,m=t.queryDeduplication,v=m===void 0?!0:m,w=t.defaultOptions,p=t.defaultContext,g=t.assumeImmutableResults,b=g===void 0?a.assumeImmutableResults:g,_=t.resolvers,P=t.typeDefs,C=t.fragmentMatcher,x=t.name,T=t.version,I=t.link;I||(I=n?new Khe({uri:n,credentials:i,headers:o}):Es.empty()),this.link=I,this.cache=a,this.disableNetworkFetches=u||d>0,this.queryDeduplication=v,this.defaultOptions=w||Object.create(null),this.typeDefs=P,d&&setTimeout(function(){return r.disableNetworkFetches=!1},d),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=DT,this.localState=new _V({cache:a,client:this,resolvers:_,fragmentMatcher:C}),this.queryManager=new ype({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:p,documentTransform:s,queryDeduplication:v,ssrMode:u,clientAwareness:{name:x,version:T},localState:this.localState,assumeImmutableResults:b,onBroadcast:h?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),h&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(typeof window=="object"){var t=window,r=Symbol.for("apollo.devtools");(t[r]=t[r]||[]).push(this),t.__APOLLO_CLIENT__=this}!vA&&globalThis.__DEV__!==!1&&(vA=!0,setTimeout(function(){if(typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__&&/^(https?|file):$/.test(window.location.protocol)){var n=window.navigator,i=n&&n.userAgent,o=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?o="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(o="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),o&&globalThis.__DEV__!==!1&&Qe.log("Download the Apollo DevTools for a better development experience: %s",o)}},1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=OS(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=Y(Y({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=OS(this.defaultOptions.query,t)),Qe(t.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=Y(Y({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=OS(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.watchFragment=function(t){return this.cache.watchFragment(t)},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){var r=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.writeFragment=function(t){var r=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return PP(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,s){n.push(s),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){globalThis.__DEV__!==!1&&Qe.debug(17,a)}),o},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();globalThis.__DEV__!==!1&&(xV.prototype.getMemoryInternals=dfe);var yy=new Map,$P=new Map,PV=!0,R0=!1;function CV(e){return e.replace(/[\s,]+/g," ").trim()}function bpe(e){return CV(e.source.body.substring(e.start,e.end))}function wpe(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=bpe(n.loc),a=$P.get(i);a&&!a.has(o)?PV&&console.warn("Warning: fragment with name "+i+` already exists.
441
- graphql-tag enforces all fragment names across your application to be unique; read more about
442
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||$P.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),Y(Y({},e),{definitions:r})}function Spe(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function _pe(e){var t=CV(e);if(!yy.has(t)){var r=S3(e,{experimentalFragmentVariables:R0,allowLegacyFragmentVariables:R0});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");yy.set(t,Spe(wpe(r)))}return yy.get(t)}function me(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),_pe(n)}function xpe(){yy.clear(),$P.clear()}function Ppe(){PV=!1}function Cpe(){R0=!0}function Epe(){R0=!1}var _h={gql:me,resetCaches:xpe,disableFragmentWarnings:Ppe,enableExperimentalFragmentVariables:Cpe,disableExperimentalFragmentVariables:Epe};(function(e){e.gql=_h.gql,e.resetCaches=_h.resetCaches,e.disableFragmentWarnings=_h.disableFragmentWarnings,e.enableExperimentalFragmentVariables=_h.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=_h.disableExperimentalFragmentVariables})(me||(me={}));me.default=me;var EV={exports:{}};(function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,S)})(EV);var gl=EV.exports;const Tpe=nc(gl),Ope=eb({__proto__:null,default:Tpe},[gl]);var gA=VT?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function Rpe(){Qe("createContext"in Ope,45);var e=gl.createContext[gA];return e||(Object.defineProperty(gl.createContext,gA,{value:e=gl.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var Ipe=function(e){var t=e.client,r=e.children,n=Rpe(),i=gl.useContext(n),o=gl.useMemo(function(){return Y(Y({},i),{client:t||i.client})},[i,t]);return Qe(o.client,46),gl.createElement(n.Provider,{value:o},r)};function kpe(e){return new Es(function(t,r){var n=hs(t,[]);return new rr(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return e(s,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}function TV(e){return new Es(function(t,r){return new rr(function(n){var i,o,a;try{i=r(t).subscribe({next:function(s){if(s.errors&&(a=e({graphQLErrors:s.errors,response:s,operation:t,forward:r}),a)){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(s)},error:function(s){if(a=e({operation:t,networkError:s,graphQLErrors:s&&s.result&&s.result.errors,forward:r}),a){o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(s)},complete:function(){a||n.complete.bind(n)()}})}catch(s){e({networkError:s,operation:t,forward:r}),n.error(s)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}})})}(function(e){Jo(t,e);function t(r){var n=e.call(this)||this;return n.link=TV(r),n}return t.prototype.request=function(r,n){return this.link.request(r,n)},t})(Es);const jpe={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"0889935",MODE:"production",PACKAGE_VERSION:"0.10.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/-/graphql",REACT_APP_SWAGGER_SERVER_URL:"/-/api",SSR:!1},$pe=e=>{var n;const t=(n=window.__env__)==null?void 0:n[e],r=jpe[e];return t||r},nO="/",hc="login",OV="logout",gw="signup",RV="username",IV="github",kV="google",jV="completed",Ape="confirm",yl=":organizationId",bl=":projectName",wl=":branchName",yw="-/draft",$V="-/:revisionId",vp=":tableId",AV=":rowId";var hr=(e=>(e.Organization="organization",e.Project="project",e.Branch="branch",e.DraftRevision="draftRevision",e.HeadRevision="headRevision",e.SpecificRevision="specificRevision",e.DraftTable="draftTable",e.HeadTable="headTable",e.SpecificTable="specificTable",e.DraftRow="draftRow",e.HeadRow="headRow",e.SpecificRow="specificRow",e))(hr||{});const Mf=({hideSidebar:e,sidebar:t,title:r,actions:n,children:i})=>y.jsxs(de,{minHeight:"100vh",children:[!e&&y.jsxs(de,{backgroundColor:"gray.50",borderRight:"1px solid",borderRightColor:"gray.200",flexDirection:"column",justifyContent:t?"space-between":"flex-end",padding:"1rem",width:"250px",height:"100vh",top:0,position:"sticky",children:[y.jsx(Je,{children:t}),y.jsx(Of,{color:"gray.400",alignSelf:"center",as:wo,to:`/${OV}`,children:"Logout"})]}),y.jsxs(de,{alignItems:"center",flex:1,flexDirection:"column",width:"100%",children:[(r||n)&&y.jsxs(de,{alignItems:"center",backgroundColor:"white",borderBottom:"1px solid",borderBottomColor:"gray.50",justifyContent:"space-between",maxWidth:"900px",padding:"8px",width:"100%",position:"sticky",zIndex:1,top:0,children:[r,n]}),y.jsx(de,{flex:1,flexDirection:"column",maxWidth:"900px",padding:"1rem 1rem 0rem 1rem",width:"100%",children:i})]})]});var Dpe=uc({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"}),Mpe=uc({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),Npe=uc({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),bw=uc({displayName:"DeleteIcon",path:y.jsx("g",{fill:"currentColor",children:y.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})}),Fpe=uc({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"}),DV=uc({viewBox:"0 0 14 14",path:y.jsx("g",{fill:"currentColor",children:y.jsx("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})}),Lpe=uc({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"});const rs=({height:e="2.5rem",title:t,onClick:r,isDisabled:n,isSelected:i,isLoading:o,icon:a,dataTestId:s})=>y.jsx(vo,{"data-testid":s,_hover:{color:"gray.400"},_disabled:i?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,alignSelf:"flex-start",color:"gray.300",fontWeight:"500",height:e,isDisabled:n||i,isLoading:o,variant:"ghost",onClick:r,children:y.jsxs(de,{alignItems:"center",gap:"0.5rem",children:[a,y.jsx(Ye,{children:t})]})}),Nf=e=>y.jsx(rs,{...e,icon:y.jsx(Lpe,{boxSize:3})}),vv=({height:e="2.5rem",loading:t,isDisabled:r,onClick:n,title:i,dataTestId:o})=>y.jsxs(vo,{"data-testid":o,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:e,isLoading:t,isDisabled:r,variant:"ghost",onClick:n,width:"48px",children:[y.jsx(DV,{boxSize:3,mr:i?2:0}),i]}),ww=({height:e="2.5rem",onClick:t,isDisabled:r,dataTestId:n})=>y.jsx(vo,{"data-testid":n,isDisabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:e,variant:"ghost",onClick:t,width:"48px",children:y.jsx(Mpe,{boxSize:3})});var MV={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},yA=ue.createContext&&ue.createContext(MV),Bpe=["attr","size","title"];function Vpe(e,t){if(e==null)return{};var r=zpe(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zpe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I0.apply(this,arguments)}function bA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function k0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bA(Object(r),!0).forEach(function(n){Upe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Upe(e,t,r){return t=qpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qpe(e){var t=Hpe(e,"string");return typeof t=="symbol"?t:t+""}function Hpe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NV(e){return e&&e.map((t,r)=>ue.createElement(t.tag,k0({key:r},t.attr),NV(t.child)))}function Er(e){return t=>ue.createElement(Wpe,I0({attr:k0({},e.attr)},t),NV(e.child))}function Wpe(e){var t=r=>{var{attr:n,size:i,title:o}=e,a=Vpe(e,Bpe),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),ue.createElement("svg",I0({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:l,style:k0(k0({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&ue.createElement("title",null,o),e.children)};return yA!==void 0?ue.createElement(yA.Consumer,null,r=>t(r)):t(MV)}function FV(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"},child:[]}]})(e)}function iO(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,128a28,28,0,1,1-28-28A28,28,0,0,1,156,128Z"},child:[]}]})(e)}function LV(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z"},child:[]}]})(e)}function BV(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"},child:[]}]})(e)}function wA(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"},child:[]}]})(e)}function Kpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-86.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L124,158.34V88a4,4,0,0,1,8,0v70.34l25.17-25.17A4,4,0,0,1,162.83,133.17Z"},child:[]}]})(e)}function Gpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"},child:[]}]})(e)}function Qpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"},child:[]}]})(e)}function Ype(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z"},child:[]}]})(e)}function Xpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"},child:[]}]})(e)}function Jpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"},child:[]}]})(e)}function Zpe(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M155.87,36.06a4,4,0,0,1-3.87,3,4.29,4.29,0,0,1-1-.13,92,92,0,0,0-46,0,4,4,0,0,1-2-7.74,100.09,100.09,0,0,1,50,0A4,4,0,0,1,155.87,36.06ZM56.65,57.94a100.18,100.18,0,0,0-25,43.29,4,4,0,0,0,7.71,2.14,92.06,92.06,0,0,1,23-39.82,4,4,0,1,0-5.7-5.61ZM39.36,152.62a4,4,0,0,0-7.71,2.14,100.08,100.08,0,0,0,25,43.31,4,4,0,1,0,5.71-5.61A91.91,91.91,0,0,1,39.36,152.62ZM151,217.09a92,92,0,0,1-46,0,4,4,0,0,0-2,7.75,100,100,0,0,0,50,0,4,4,0,1,0-2-7.74Zm70.58-67.25a4,4,0,0,0-4.92,2.79,92.12,92.12,0,0,1-23,39.82,4,4,0,1,0,5.7,5.61,100.18,100.18,0,0,0,25-43.29A4,4,0,0,0,221.58,149.84Zm-4.94-46.46a4,4,0,0,0,7.71-2.14,100.08,100.08,0,0,0-25-43.31,4,4,0,1,0-5.71,5.61A91.91,91.91,0,0,1,216.64,103.38Z"},child:[]}]})(e)}function SA(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"},child:[]}]})(e)}function eme(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M192.14,42.55C174.94,33.17,152.16,28,128,28S81.06,33.17,63.86,42.55C45.89,52.35,36,65.65,36,80v96c0,14.35,9.89,27.65,27.86,37.45,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c18-9.8,27.86-23.1,27.86-37.45V80C220,65.65,210.11,52.35,192.14,42.55ZM212,176c0,11.29-8.41,22.1-23.69,30.43C172.27,215.18,150.85,220,128,220s-44.27-4.82-60.31-13.57C52.41,198.1,44,187.29,44,176V149.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm0-48c0,11.29-8.41,22.1-23.69,30.43C172.27,167.18,150.85,172,128,172s-44.27-4.82-60.31-13.57C52.41,150.1,44,139.29,44,128V101.48c4.69,5.93,11.37,11.34,19.86,16,17.2,9.38,40,14.55,64.14,14.55s46.94-5.17,64.14-14.55c8.49-4.63,15.17-10,19.86-16Zm-23.69-17.57C172.27,119.18,150.85,124,128,124s-44.27-4.82-60.31-13.57C52.41,102.1,44,91.29,44,80s8.41-22.1,23.69-30.43C83.73,40.82,105.15,36,128,36s44.27,4.82,60.31,13.57C203.59,57.9,212,68.71,212,80S203.59,102.1,188.31,110.43Z"},child:[]}]})(e)}function tme(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,100a28,28,0,1,0,28,28A28,28,0,0,0,128,100Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"},child:[]}]})(e)}function rme(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"},child:[]}]})(e)}function VV(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"},child:[]}]})(e)}function nme(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z"},child:[]}]})(e)}function ime(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"},child:[]}]})(e)}function ome(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M234.83,109.17l-80-80A4,4,0,0,0,148,32V76.09c-54,2.44-120.43,53.55-127.94,119a7.87,7.87,0,0,0,4.58,8.16,8,8,0,0,0,3.41.77,7.9,7.9,0,0,0,5.79-2.55h0c11.53-12.27,53.29-51.73,114.16-53.4V192a4,4,0,0,0,6.83,2.83l80-80A4,4,0,0,0,234.83,109.17ZM156,182.33V144a4,4,0,0,0-4-4c-27.39,0-54.08,7.17-79.34,21.3A189.91,189.91,0,0,0,28,196l2.92,2.74L28,196c3.36-29.21,19.55-57.48,45.6-79.57C97.53,96.11,126.83,84,152,84a4,4,0,0,0,4-4V41.66L226.34,112Z"},child:[]}]})(e)}function ame(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M176,148h32a12,12,0,0,0,12-12V104a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H84V76H96a12,12,0,0,0,12-12V32A12,12,0,0,0,96,20H64A12,12,0,0,0,52,32V64A12,12,0,0,0,64,76H76V192a20,20,0,0,0,20,20h68v12a12,12,0,0,0,12,12h32a12,12,0,0,0,12-12V192a12,12,0,0,0-12-12H176a12,12,0,0,0-12,12v12H96a12,12,0,0,1-12-12V124h80v12A12,12,0,0,0,176,148ZM60,64V32a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4V64a4,4,0,0,1-4,4H64A4,4,0,0,1,60,64ZM172,192a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Zm0-88a4,4,0,0,1,4-4h32a4,4,0,0,1,4,4v32a4,4,0,0,1-4,4H176a4,4,0,0,1-4-4Z"},child:[]}]})(e)}function oO(e){return Er({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},child:[]}]})(e)}const ns=({value:e,placeholder:t,autoFocus:r,onChange:n,onBlur:i,onEnter:o,width:a,height:s,type:l,dataTestId:u,autoComplete:c})=>{const d=UV();return y.jsx(Wb,{autoComplete:c,"data-testid":u,borderColor:"gray.100",borderStyle:"solid",borderWidth:"1px",padding:"0 9px",placeholder:t,ref:r?d:void 0,value:e,variant:"unstyled",onChange:n,onBlur:i,width:a,height:s,type:l,onKeyDown:o?f=>{f.key==="Enter"&&o()}:void 0})},{ToastContainer:_A,toast:zV}=Hne(),sme=iV({uri:$pe("REACT_APP_GRAPHQL_SERVER_URL")}),lme=kpe(async()=>({headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})),ume=TV(({graphQLErrors:e})=>{if(e)for(const t of e)zV({status:"error",variant:"left-accent",colorScheme:"red",duration:3e3,isClosable:!0,position:"top",description:t.message})}),Kt=new xV({connectToDevTools:!0,link:bhe([lme,ume,sme]),cache:new bV({typePolicies:{TableModel:{keyFields:["versionId"]},RowModel:{keyFields:["versionId"]}}}),defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network"}}});Kt.cache;const UV=()=>S.useCallback(e=>{e&&e.focus()},[]),Ff=(e,...t)=>{const r=S.useRef(null),[n,i]=S.useState(t),o=S.useMemo(()=>n.length!==t.length||n.some((a,s)=>a!==t[s])?(i(t),t):n,[t,n]);return r.current||(r.current=We.get(e)),S.useEffect(()=>{var s;const a=r.current;return(s=a==null?void 0:a.init)==null||s.call(a,...o),()=>{var l;(l=a==null?void 0:a.dispose)==null||l.call(a)}},[o]),r.current};class cme{constructor(){le(this,"registrations",new Map)}register(t,r,n){this.registrations.set(t,{factory:r,scope:n.scope})}get(t){const r=this.registrations.get(t);if(!r)throw new Error(`No provider found for ${t.name}`);return r.scope==="singleton"?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const We=new cme;class aO{constructor(t){le(this,"values");this.values=t,Le(this,{},{autoBind:!0})}setValue(t,r){this.values[t]=r}get isValid(){return Object.values(this.values).every(t=>!!t)}}const sO=JSON,dme=e=>e.toUpperCase(),fme=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t},hme=(e,t,r)=>e.document?e:{document:e,variables:t,requestHeaders:r,signal:void 0},pme=(e,t,r)=>e.query?e:{query:e,variables:t,requestHeaders:r,signal:void 0},mme=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},xA=e=>{var n,i;let t;const r=e.definitions.filter(o=>o.kind==="OperationDefinition");return r.length===1&&(t=(i=(n=r[0])==null?void 0:n.name)==null?void 0:i.value),t},MS=e=>{if(typeof e=="string"){let r;try{const n=S3(e);r=xA(n)}catch{}return{query:e,operationName:r}}const t=xA(e);return{query:x3(e),operationName:t}};class gp extends Error{constructor(t,r){const n=`${gp.extractMessage(t)}: ${JSON.stringify({response:t,request:r})}`;super(n),Object.setPrototypeOf(this,gp.prototype),this.response=t,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gp)}static extractMessage(t){var r,n;return((n=(r=t.errors)==null?void 0:r[0])==null?void 0:n.message)??`GraphQL Error (Code: ${t.status})`}}var AP={exports:{}};(function(e,t){var r=typeof self<"u"?self:Zs,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(R){return R&&DataView.prototype.isPrototypeOf(R)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(R){return R&&u.indexOf(Object.prototype.toString.call(R))>-1};function d(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(R))throw new TypeError("Invalid character in header field name");return R.toLowerCase()}function f(R){return typeof R!="string"&&(R=String(R)),R}function h(R){var L={next:function(){var X=R.shift();return{done:X===void 0,value:X}}};return s.iterable&&(L[Symbol.iterator]=function(){return L}),L}function m(R){this.map={},R instanceof m?R.forEach(function(L,X){this.append(X,L)},this):Array.isArray(R)?R.forEach(function(L){this.append(L[0],L[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(L){this.append(L,R[L])},this)}m.prototype.append=function(R,L){R=d(R),L=f(L);var X=this.map[R];this.map[R]=X?X+", "+L:L},m.prototype.delete=function(R){delete this.map[d(R)]},m.prototype.get=function(R){return R=d(R),this.has(R)?this.map[R]:null},m.prototype.has=function(R){return this.map.hasOwnProperty(d(R))},m.prototype.set=function(R,L){this.map[d(R)]=f(L)},m.prototype.forEach=function(R,L){for(var X in this.map)this.map.hasOwnProperty(X)&&R.call(L,this.map[X],X,this)},m.prototype.keys=function(){var R=[];return this.forEach(function(L,X){R.push(X)}),h(R)},m.prototype.values=function(){var R=[];return this.forEach(function(L){R.push(L)}),h(R)},m.prototype.entries=function(){var R=[];return this.forEach(function(L,X){R.push([X,L])}),h(R)},s.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function v(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function w(R){return new Promise(function(L,X){R.onload=function(){L(R.result)},R.onerror=function(){X(R.error)}})}function p(R){var L=new FileReader,X=w(L);return L.readAsArrayBuffer(R),X}function g(R){var L=new FileReader,X=w(L);return L.readAsText(R),X}function b(R){for(var L=new Uint8Array(R),X=new Array(L.length),Q=0;Q<L.length;Q++)X[Q]=String.fromCharCode(L[Q]);return X.join("")}function _(R){if(R.slice)return R.slice(0);var L=new Uint8Array(R.byteLength);return L.set(new Uint8Array(R)),L.buffer}function P(){return this.bodyUsed=!1,this._initBody=function(R){this._bodyInit=R,R?typeof R=="string"?this._bodyText=R:s.blob&&Blob.prototype.isPrototypeOf(R)?this._bodyBlob=R:s.formData&&FormData.prototype.isPrototypeOf(R)?this._bodyFormData=R:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)?this._bodyText=R.toString():s.arrayBuffer&&s.blob&&l(R)?(this._bodyArrayBuffer=_(R.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(R)||c(R))?this._bodyArrayBuffer=_(R):this._bodyText=R=Object.prototype.toString.call(R):this._bodyText="",this.headers.get("content-type")||(typeof R=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var R=v(this);if(R)return R;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var R=v(this);if(R)return R;if(this._bodyBlob)return g(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(b(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(R){var L=R.toUpperCase();return C.indexOf(L)>-1?L:R}function T(R,L){L=L||{};var X=L.body;if(R instanceof T){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,L.headers||(this.headers=new m(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!X&&R._bodyInit!=null&&(X=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new m(L.headers)),this.method=x(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function I(R){var L=new FormData;return R.trim().split("&").forEach(function(X){if(X){var Q=X.split("="),W=Q.shift().replace(/\+/g," "),te=Q.join("=").replace(/\+/g," ");L.append(decodeURIComponent(W),decodeURIComponent(te))}}),L}function M(R){var L=new m,X=R.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(Q){var W=Q.split(":"),te=W.shift().trim();if(te){var G=W.join(":").trim();L.append(te,G)}}),L}P.call(T.prototype);function H(R,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new m(L.headers),this.url=L.url||"",this._initBody(R)}P.call(H.prototype),H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},H.error=function(){var R=new H(null,{status:0,statusText:""});return R.type="error",R};var re=[301,302,303,307,308];H.redirect=function(R,L){if(re.indexOf(L)===-1)throw new RangeError("Invalid status code");return new H(null,{status:L,headers:{location:R}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,X){this.message=L,this.name=X;var Q=Error(L);this.stack=Q.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function ie(R,L){return new Promise(function(X,Q){var W=new T(R,L);if(W.signal&&W.signal.aborted)return Q(new a.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function G(){te.abort()}te.onload=function(){var A={status:te.status,statusText:te.statusText,headers:M(te.getAllResponseHeaders()||"")};A.url="responseURL"in te?te.responseURL:A.headers.get("X-Request-URL");var U="response"in te?te.response:te.responseText;X(new H(U,A))},te.onerror=function(){Q(new TypeError("Network request failed"))},te.ontimeout=function(){Q(new TypeError("Network request failed"))},te.onabort=function(){Q(new a.DOMException("Aborted","AbortError"))},te.open(W.method,W.url,!0),W.credentials==="include"?te.withCredentials=!0:W.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&s.blob&&(te.responseType="blob"),W.headers.forEach(function(A,U){te.setRequestHeader(U,A)}),W.signal&&(W.signal.addEventListener("abort",G),te.onreadystatechange=function(){te.readyState===4&&W.signal.removeEventListener("abort",G)}),te.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return ie.polyfill=!0,o.fetch||(o.fetch=ie,o.Headers=m,o.Request=T,o.Response=H),a.Headers=m,a.Request=T,a.Response=H,a.fetch=ie,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(AP,AP.exports);var j0=AP.exports;const by=nc(j0),vme=eb({__proto__:null,default:by},[j0]),Ac=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||vme&&j0.Headers&&e instanceof j0.Headers?t=fme(e):Array.isArray(e)?e.forEach(([r,n])=>{r&&n!==void 0&&(t[r]=n)}):t=e),t},PA=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),gme=e=>{if(!Array.isArray(e.query)){const n=e,i=[`query=${encodeURIComponent(PA(n.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,r=e.query.reduce((n,i,o)=>(n.push({query:PA(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[o]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(r))}`},yme=e=>async t=>{const{url:r,query:n,variables:i,operationName:o,fetch:a,fetchOptions:s,middleware:l}=t,u={...t.headers};let c="",d;e==="POST"?(d=wme(n,i,o,s.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=gme({query:n,variables:i,operationName:o,jsonSerializer:s.jsonSerializer??sO});const f={method:e,headers:u,body:d,...s};let h=r,m=f;if(l){const v=await Promise.resolve(l({...f,url:r,operationName:o,variables:i})),{url:w,...p}=v;h=w,m=p}return c&&(h=`${h}?${c}`),await a(h,m)};class bme{constructor(t,r={}){this.url=t,this.requestConfig=r,this.rawRequest=async(...n)=>{const[i,o,a]=n,s=pme(i,o,a),{headers:l,fetch:u=by,method:c="POST",requestMiddleware:d,responseMiddleware:f,...h}=this.requestConfig,{url:m}=this;s.signal!==void 0&&(h.signal=s.signal);const{operationName:v}=MS(s.query);return NS({url:m,query:s.query,variables:s.variables,headers:{...Ac(FS(l)),...Ac(s.requestHeaders)},operationName:v,fetch:u,method:c,fetchOptions:h,middleware:d}).then(w=>(f&&f(w),w)).catch(w=>{throw f&&f(w),w})}}async request(t,...r){const[n,i]=r,o=hme(t,n,i),{headers:a,fetch:s=by,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;o.signal!==void 0&&(d.signal=o.signal);const{query:h,operationName:m}=MS(o.document);return NS({url:f,query:h,variables:o.variables,headers:{...Ac(FS(a)),...Ac(o.requestHeaders)},operationName:m,fetch:s,method:l,fetchOptions:d,middleware:u}).then(v=>(c&&c(v),v.data)).catch(v=>{throw c&&c(v),v})}batchRequests(t,r){const n=mme(t,r),{headers:i,...o}=this.requestConfig;n.signal!==void 0&&(o.signal=n.signal);const a=n.documents.map(({document:l})=>MS(l).query),s=n.documents.map(({variables:l})=>l);return NS({url:this.url,query:a,variables:s,headers:{...Ac(FS(i)),...Ac(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??by,method:this.requestConfig.method||"POST",fetchOptions:o,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,r){const{headers:n}=this.requestConfig;return n?n[t]=r:this.requestConfig.headers={[t]:r},this}setEndpoint(t){return this.url=t,this}}const NS=async e=>{const{query:t,variables:r,fetchOptions:n}=e,i=yme(dme(e.method??"post")),o=Array.isArray(e.query),a=await i(e),s=await Sme(a,n.jsonSerializer??sO),l=Array.isArray(s)?!s.some(({data:c})=>!c):!!s.data,u=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&u&&l){const{errors:c,...d}=(Array.isArray(s),s),f=n.errorPolicy==="ignore"?d:s;return{...o?{data:f}:f,headers:a.headers,status:a.status}}else{const c=typeof s=="string"?{error:s}:s;throw new gp({...c,status:a.status,headers:a.headers},{query:t,variables:r})}},wme=(e,t,r,n)=>{const i=n??sO;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:r});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const o=e.reduce((a,s,l)=>(a.push({query:s,variables:t?t[l]:void 0}),a),[]);return i.stringify(o)},Sme=async(e,t)=>{let r;return e.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(r=n)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},FS=e=>typeof e=="function"?e():e;me`
443
- fragment PageInfo on PageInfo {
444
- startCursor
445
- hasNextPage
446
- hasPreviousPage
447
- endCursor
448
- }
449
- `;const _me=me`
450
- fragment User on UserModel {
451
- id
452
- username
453
- email
454
- organizationId
455
- }
456
- `,Hl=me`
457
- fragment PageInfoMst on PageInfo {
458
- startCursor
459
- endCursor
460
- hasPreviousPage
461
- hasNextPage
462
- }
463
- `,gv=me`
464
- fragment EndpointMst on EndpointModel {
465
- id
466
- type
467
- createdAt
468
- }
469
- `,xme=me`
470
- fragment RevisionStartMst on RevisionModel {
471
- id
472
- createdAt
473
- comment
474
- child {
475
- id
476
- }
477
- childBranches {
478
- branch {
479
- id
480
- name
481
- }
482
- revision {
483
- id
484
- }
485
- }
486
- endpoints {
487
- ...EndpointMst
488
- }
489
- }
490
- ${gv}
491
- `,Sw=me`
492
- fragment RevisionMst on RevisionModel {
493
- id
494
- createdAt
495
- comment
496
- parent {
497
- id
498
- }
499
- child {
500
- id
501
- }
502
- childBranches {
503
- branch {
504
- id
505
- name
506
- }
507
- revision {
508
- id
509
- }
510
- }
511
- endpoints {
512
- ...EndpointMst
513
- }
514
- }
515
- ${gv}
516
- `,Pme=me`
517
- fragment RevisionDraftMst on RevisionModel {
518
- id
519
- createdAt
520
- comment
521
- parent {
522
- id
523
- }
524
- endpoints {
525
- ...EndpointMst
526
- }
527
- }
528
- ${gv}
529
- `,Ts=me`
530
- fragment BranchMst on BranchModel {
531
- id
532
- createdAt
533
- name
534
- touched
535
- projectId
536
- parent {
537
- branch {
538
- id
539
- name
540
- }
541
- revision {
542
- id
543
- }
544
- }
545
- start {
546
- ...RevisionStartMst
547
- }
548
- head {
549
- ...RevisionMst
550
- }
551
- draft {
552
- ...RevisionDraftMst
553
- }
554
- }
555
- ${xme}
556
- ${Sw}
557
- ${Pme}
558
- `,_w=me`
559
- fragment ProjectMst on ProjectModel {
560
- id
561
- organizationId
562
- createdAt
563
- name
564
- isPublic
565
- rootBranch {
566
- ...BranchMst
567
- }
568
- }
569
- ${Ts}
570
- `,Lf=me`
571
- fragment RowMst on RowModel {
572
- createdId
573
- id
574
- versionId
575
- createdAt
576
- updatedAt
577
- readonly
578
- data
579
- }
580
- `,Na=me`
581
- fragment TableMst on TableModel {
582
- createdId
583
- id
584
- versionId
585
- createdAt
586
- updatedAt
587
- readonly
588
- count
589
- schema
590
- }
591
- `,Cme=me`
592
- fragment BranchRevisionMst on RevisionModel {
593
- ...RevisionMst
594
- endpoints {
595
- ...EndpointMst
596
- }
597
- }
598
- ${Sw}
599
- ${gv}
600
- `,Eme=me`
601
- mutation confirmEmailCode($data: ConfirmEmailCodeInput!) {
602
- confirmEmailCode(data: $data) {
603
- accessToken
604
- }
605
- }
606
- `,Tme=me`
607
- mutation loginGithub($data: LoginGithubInput!) {
608
- loginGithub(data: $data) {
609
- accessToken
610
- }
611
- }
612
- `,Ome=me`
613
- mutation loginGoogle($data: LoginGoogleInput!) {
614
- loginGoogle(data: $data) {
615
- accessToken
616
- }
617
- }
618
- `,Rme=me`
619
- mutation login($data: LoginInput!) {
620
- login(data: $data) {
621
- accessToken
622
- }
623
- }
624
- `,Ime=me`
625
- mutation signUp($data: SignUpInput!) {
626
- signUp(data: $data)
627
- }
628
- `,kme=me`
629
- mutation setUsername($data: SetUsernameInput!) {
630
- setUsername(data: $data)
631
- }
632
- `,jme=me`
633
- query configuration {
634
- configuration {
635
- availableEmailSignUp
636
- google {
637
- available
638
- clientId
639
- }
640
- github {
641
- available
642
- clientId
643
- }
644
- }
645
- }
646
- `,$me=me`
647
- query getMe {
648
- me {
649
- ...User
650
- }
651
- }
652
- ${_me}
653
- `,Ame=me`
654
- mutation CreateBranchByRevisionIdMst($data: CreateBranchByRevisionIdInput!) {
655
- createBranchByRevisionId(data: $data) {
656
- ...BranchMst
657
- }
658
- }
659
- ${Ts}
660
- `,Dme=me`
661
- mutation CreateEndpointMst($data: CreateEndpointInput!) {
662
- createEndpoint(data: $data) {
663
- ...EndpointMst
664
- }
665
- }
666
- ${gv}
667
- `,Mme=me`
668
- mutation CreateProjectMst($data: CreateProjectInput!) {
669
- createProject(data: $data) {
670
- ...ProjectMst
671
- }
672
- }
673
- ${_w}
674
- `,Nme=me`
675
- mutation CreateRevisionMst($data: CreateRevisionInput!) {
676
- createRevision(data: $data) {
677
- ...RevisionMst
678
- branch {
679
- ...BranchMst
680
- }
681
- }
682
- }
683
- ${Sw}
684
- ${Ts}
685
- `,Fme=me`
686
- mutation CreateRowMst($data: CreateRowInput!) {
687
- createRow(data: $data) {
688
- table {
689
- ...TableMst
690
- }
691
- previousVersionTableId
692
- row {
693
- ...RowMst
694
- }
695
- }
696
- }
697
- ${Na}
698
- ${Lf}
699
- `,Lme=me`
700
- mutation CreateTableMst($data: CreateTableInput!) {
701
- createTable(data: $data) {
702
- branch {
703
- ...BranchMst
704
- }
705
- table {
706
- ...TableMst
707
- }
708
- }
709
- }
710
- ${Ts}
711
- ${Na}
712
- `,Bme=me`
713
- mutation DeleteEndpointMst($data: DeleteEndpointInput!) {
714
- deleteEndpoint(data: $data)
715
- }
716
- `,Vme=me`
717
- mutation DeleteProjectMst($data: DeleteProjectInput!) {
718
- deleteProject(data: $data)
719
- }
720
- `,zme=me`
721
- mutation DeleteRowMst($data: RemoveRowInput!) {
722
- removeRow(data: $data) {
723
- branch {
724
- ...BranchMst
725
- }
726
- table {
727
- ...TableMst
728
- }
729
- previousVersionTableId
730
- }
731
- }
732
- ${Ts}
733
- ${Na}
734
- `,Ume=me`
735
- mutation DeleteTableMst($data: RemoveTableInput!) {
736
- removeTable(data: $data) {
737
- branch {
738
- ...BranchMst
739
- }
740
- }
741
- }
742
- ${Ts}
743
- `,qme=me`
744
- mutation RenameRowMst($data: RenameRowInput!) {
745
- renameRow(data: $data) {
746
- table {
747
- ...TableMst
748
- }
749
- previousVersionTableId
750
- row {
751
- ...RowMst
752
- }
753
- previousVersionRowId
754
- }
755
- }
756
- ${Na}
757
- ${Lf}
758
- `,Hme=me`
759
- mutation RenameTableMst($data: RenameTableInput!) {
760
- renameTable(data: $data) {
761
- table {
762
- ...TableMst
763
- }
764
- previousVersionTableId
765
- }
766
- }
767
- ${Na}
768
- `,Wme=me`
769
- mutation RevertChangesMst($data: RevertChangesInput!) {
770
- revertChanges(data: $data) {
771
- ...BranchMst
772
- }
773
- }
774
- ${Ts}
775
- `,Kme=me`
776
- mutation UpdateRowMst($data: UpdateRowInput!) {
777
- updateRow(data: $data) {
778
- table {
779
- ...TableMst
780
- }
781
- previousVersionTableId
782
- row {
783
- ...RowMst
784
- }
785
- previousVersionRowId
786
- }
787
- }
788
- ${Na}
789
- ${Lf}
790
- `,Gme=me`
791
- mutation UpdateTableMst($data: UpdateTableInput!) {
792
- updateTable(data: $data) {
793
- table {
794
- ...TableMst
795
- }
796
- previousVersionTableId
797
- }
798
- }
799
- ${Na}
800
- `,Qme=me`
801
- query BranchMst($data: GetBranchInput!) {
802
- branch(data: $data) {
803
- ...BranchMst
804
- }
805
- }
806
- ${Ts}
807
- `,Yme=me`
808
- query BranchesMst($data: GetBranchesInput!) {
809
- branches(data: $data) {
810
- totalCount
811
- pageInfo {
812
- ...PageInfoMst
813
- }
814
- edges {
815
- cursor
816
- node {
817
- ...BranchMst
818
- }
819
- }
820
- }
821
- }
822
- ${Hl}
823
- ${Ts}
824
- `,Xme=me`
825
- query GetRowCountForeignKeysTo($data: GetRowCountForeignKeysByInput!) {
826
- getRowCountForeignKeysTo(data: $data)
827
- }
828
- `,Jme=me`
829
- query meProjectsMst($data: GetMeProjectsInput!) {
830
- meProjects(data: $data) {
831
- totalCount
832
- pageInfo {
833
- ...PageInfoMst
834
- }
835
- edges {
836
- cursor
837
- node {
838
- ...ProjectMst
839
- }
840
- }
841
- }
842
- }
843
- ${Hl}
844
- ${_w}
845
- `,Zme=me`
846
- query ProjectMst($data: GetProjectInput!) {
847
- project(data: $data) {
848
- ...ProjectMst
849
- }
850
- }
851
- ${_w}
852
- `,eve=me`
853
- query ProjectsMst($data: GetProjectsInput!) {
854
- projects(data: $data) {
855
- totalCount
856
- pageInfo {
857
- ...PageInfoMst
858
- }
859
- edges {
860
- cursor
861
- node {
862
- ...ProjectMst
863
- }
864
- }
865
- }
866
- }
867
- ${Hl}
868
- ${_w}
869
- `,tve=me`
870
- query RevisionMst($data: GetRevisionInput!) {
871
- revision(data: $data) {
872
- ...RevisionMst
873
- branch {
874
- id
875
- }
876
- }
877
- }
878
- ${Sw}
879
- `,rve=me`
880
- query RevisionsMst($branch: GetBranchInput!, $revisions: GetBranchRevisionsInput!) {
881
- branch(data: $branch) {
882
- id
883
- revisions(data: $revisions) {
884
- totalCount
885
- pageInfo {
886
- ...PageInfoMst
887
- }
888
- edges {
889
- cursor
890
- node {
891
- ...BranchRevisionMst
892
- }
893
- }
894
- }
895
- }
896
- }
897
- ${Hl}
898
- ${Cme}
899
- `,nve=me`
900
- query RowForeignKeysBy($data: GetRowInput!, $foreignKeyData: GetRowForeignKeysInput!) {
901
- row(data: $data) {
902
- versionId
903
- rowForeignKeysBy(data: $foreignKeyData) {
904
- totalCount
905
- pageInfo {
906
- ...PageInfoMst
907
- }
908
- edges {
909
- cursor
910
- node {
911
- ...RowMst
912
- }
913
- }
914
- }
915
- }
916
- }
917
- ${Hl}
918
- ${Lf}
919
- `,ive=me`
920
- query RowMst($data: GetRowInput!) {
921
- row(data: $data) {
922
- ...RowMst
923
- }
924
- }
925
- ${Lf}
926
- `,ove=me`
927
- query RowsMst($data: GetRowsInput!) {
928
- rows(data: $data) {
929
- totalCount
930
- pageInfo {
931
- ...PageInfoMst
932
- }
933
- edges {
934
- cursor
935
- node {
936
- ...RowMst
937
- }
938
- }
939
- }
940
- }
941
- ${Hl}
942
- ${Lf}
943
- `,ave=me`
944
- query TableForeignKeysBy($data: GetTableInput!, $foreignKeyData: GetTableForeignKeysInput!) {
945
- table(data: $data) {
946
- versionId
947
- foreignKeysBy(data: $foreignKeyData) {
948
- totalCount
949
- pageInfo {
950
- ...PageInfoMst
951
- }
952
- edges {
953
- cursor
954
- node {
955
- ...TableMst
956
- }
957
- }
958
- }
959
- }
960
- }
961
- ${Hl}
962
- ${Na}
963
- `,sve=me`
964
- query TableMst($data: GetTableInput!) {
965
- table(data: $data) {
966
- ...TableMst
967
- }
968
- }
969
- ${Na}
970
- `,lve=me`
971
- query TablesMst($data: GetTablesInput!) {
972
- tables(data: $data) {
973
- totalCount
974
- pageInfo {
975
- ...PageInfoMst
976
- }
977
- edges {
978
- cursor
979
- node {
980
- ...TableMst
981
- }
982
- }
983
- }
984
- }
985
- ${Hl}
986
- ${Na}
987
- `,uve=(e,t,r,n)=>e();function cve(e,t=uve){return{confirmEmailCode(r,n){return t(i=>e.request(Eme,r,{...n,...i}),"confirmEmailCode","mutation",r)},loginGithub(r,n){return t(i=>e.request(Tme,r,{...n,...i}),"loginGithub","mutation",r)},loginGoogle(r,n){return t(i=>e.request(Ome,r,{...n,...i}),"loginGoogle","mutation",r)},login(r,n){return t(i=>e.request(Rme,r,{...n,...i}),"login","mutation",r)},signUp(r,n){return t(i=>e.request(Ime,r,{...n,...i}),"signUp","mutation",r)},setUsername(r,n){return t(i=>e.request(kme,r,{...n,...i}),"setUsername","mutation",r)},configuration(r,n){return t(i=>e.request(jme,r,{...n,...i}),"configuration","query",r)},getMe(r,n){return t(i=>e.request($me,r,{...n,...i}),"getMe","query",r)},CreateBranchByRevisionIdMst(r,n){return t(i=>e.request(Ame,r,{...n,...i}),"CreateBranchByRevisionIdMst","mutation",r)},CreateEndpointMst(r,n){return t(i=>e.request(Dme,r,{...n,...i}),"CreateEndpointMst","mutation",r)},CreateProjectMst(r,n){return t(i=>e.request(Mme,r,{...n,...i}),"CreateProjectMst","mutation",r)},CreateRevisionMst(r,n){return t(i=>e.request(Nme,r,{...n,...i}),"CreateRevisionMst","mutation",r)},CreateRowMst(r,n){return t(i=>e.request(Fme,r,{...n,...i}),"CreateRowMst","mutation",r)},CreateTableMst(r,n){return t(i=>e.request(Lme,r,{...n,...i}),"CreateTableMst","mutation",r)},DeleteEndpointMst(r,n){return t(i=>e.request(Bme,r,{...n,...i}),"DeleteEndpointMst","mutation",r)},DeleteProjectMst(r,n){return t(i=>e.request(Vme,r,{...n,...i}),"DeleteProjectMst","mutation",r)},DeleteRowMst(r,n){return t(i=>e.request(zme,r,{...n,...i}),"DeleteRowMst","mutation",r)},DeleteTableMst(r,n){return t(i=>e.request(Ume,r,{...n,...i}),"DeleteTableMst","mutation",r)},RenameRowMst(r,n){return t(i=>e.request(qme,r,{...n,...i}),"RenameRowMst","mutation",r)},RenameTableMst(r,n){return t(i=>e.request(Hme,r,{...n,...i}),"RenameTableMst","mutation",r)},RevertChangesMst(r,n){return t(i=>e.request(Wme,r,{...n,...i}),"RevertChangesMst","mutation",r)},UpdateRowMst(r,n){return t(i=>e.request(Kme,r,{...n,...i}),"UpdateRowMst","mutation",r)},UpdateTableMst(r,n){return t(i=>e.request(Gme,r,{...n,...i}),"UpdateTableMst","mutation",r)},BranchMst(r,n){return t(i=>e.request(Qme,r,{...n,...i}),"BranchMst","query",r)},BranchesMst(r,n){return t(i=>e.request(Yme,r,{...n,...i}),"BranchesMst","query",r)},GetRowCountForeignKeysTo(r,n){return t(i=>e.request(Xme,r,{...n,...i}),"GetRowCountForeignKeysTo","query",r)},meProjectsMst(r,n){return t(i=>e.request(Jme,r,{...n,...i}),"meProjectsMst","query",r)},ProjectMst(r,n){return t(i=>e.request(Zme,r,{...n,...i}),"ProjectMst","query",r)},ProjectsMst(r,n){return t(i=>e.request(eve,r,{...n,...i}),"ProjectsMst","query",r)},RevisionMst(r,n){return t(i=>e.request(tve,r,{...n,...i}),"RevisionMst","query",r)},RevisionsMst(r,n){return t(i=>e.request(rve,r,{...n,...i}),"RevisionsMst","query",r)},RowForeignKeysBy(r,n){return t(i=>e.request(nve,r,{...n,...i}),"RowForeignKeysBy","query",r)},RowMst(r,n){return t(i=>e.request(ive,r,{...n,...i}),"RowMst","query",r)},RowsMst(r,n){return t(i=>e.request(ove,r,{...n,...i}),"RowsMst","query",r)},TableForeignKeysBy(r,n){return t(i=>e.request(ave,r,{...n,...i}),"TableForeignKeysBy","query",r)},TableMst(r,n){return t(i=>e.request(sve,r,{...n,...i}),"TableMst","query",r)},TablesMst(r,n){return t(i=>e.request(lve,r,{...n,...i}),"TablesMst","query",r)}}}const dve={BASE_URL:"/",DEV:!1,GIT_BRANCH_NAME:"HEAD",GIT_COMMIT_HASH:"0889935",MODE:"production",PACKAGE_VERSION:"0.10.0",PROD:!0,REACT_APP_ENDPOINT_HOST:"",REACT_APP_ENDPOINT_PORT:"",REACT_APP_ENDPOINT_SERVER_URL:"/endpoint",REACT_APP_GRAPHQL_SERVER_URL:"/-/graphql",REACT_APP_SWAGGER_SERVER_URL:"/-/api",SSR:!1};class DP{constructor(){}get(t){var i;const r=(i=window.__env__)==null?void 0:i[t],n=dve[t];return r||n}}We.register(DP,()=>new DP,{scope:"singleton"});class Aa{constructor(t){le(this,"graphQLClient");le(this,"client");this.environmentService=t;const r=this.environmentService.get("REACT_APP_GRAPHQL_SERVER_URL");if(!r)throw new Error("Invalid REACT_APP_GRAPHQL_SERVER_URL");this.graphQLClient=new bme(r),this.client=cve(this.graphQLClient)}setToken(t){this.graphQLClient.setHeaders(t?{Authorization:`Bearer ${t}`}:{})}}We.register(Aa,()=>{const e=We.get(DP);return new Aa(e)},{scope:"singleton"});const LS="token";class zi{constructor(t,r){le(this,"isLoaded",!1);le(this,"user",null);le(this,"token",null);this.storage=t,this.apiService=r,Le(this),this.init()}async setToken(t){this.token=t,this.apiService.setToken(this.token),this.token&&await this.fetchMe()}async init(){await this.setToken(this.loadToken()),this.signToToken(),this.setIsChecked(!0)}loadToken(){return this.storage.getItem(LS)}async fetchMe(){try{const t=await this.apiService.client.getMe();this.user=t.me}catch(t){console.error(t),um(()=>{this.token=null})}}setIsChecked(t){this.isLoaded=t}signToToken(){Ia(()=>this.token,t=>{t?this.storage.setItem(LS,t):this.storage.removeItem(LS)})}logout(){this.token=null,this.user=null,this.apiService.setToken(null)}}We.register(zi,()=>{const e=We.get(Aa);return new zi(localStorage,e)},{scope:"singleton"});class ec{constructor(t){le(this,"isLoaded",!1);le(this,"error",null);le(this,"data",null);this.apiService=t,Le(this),this.init()}get availableSignUp(){return this.availableEmailSignUp||this.availableGoogleOauth||this.availableGithubOauth}get availableEmailSignUp(){var t;return(t=this.data)==null?void 0:t.availableEmailSignUp}get availableGoogleOauth(){var t;return!!((t=this.data)!=null&&t.google.available)}get googleOauthClientId(){var t,r;if(!((t=this.data)!=null&&t.google.clientId))throw new Error("Invalid Google client id");return(r=this.data)==null?void 0:r.google.clientId}get availableGithubOauth(){var t;return!!((t=this.data)!=null&&t.github.available)}get githubOauthClientId(){var t,r;if(!((t=this.data)!=null&&t.github.clientId))throw new Error("Invalid Github client id");return(r=this.data)==null?void 0:r.github.clientId}async init(){await this.request()}async request(){try{const t=await this.apiService.client.configuration();this.setData(t.configuration)}catch(t){this.setError(t),console.error(t)}finally{this.setIsLoaded(!0)}}setData(t){this.data=t}setError(t){this.error=t}setIsLoaded(t){this.isLoaded=t}}We.register(ec,()=>{const e=We.get(Aa);return new ec(e)},{scope:"singleton"});class $0{constructor(t,r){this.authService=t,this.configurationService=r,Le(this)}get isLoaded(){return this.authService.isLoaded&&this.configurationService.isLoaded}}We.register($0,()=>{const e=We.get(zi),t=We.get(ec);return new $0(e,t)},{scope:"singleton"});var CA={},fve="warn";function hve(){return fve}var sn;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(sn||(sn={}));/*! *****************************************************************************
988
- Copyright (c) Microsoft Corporation.
989
-
990
- Permission to use, copy, modify, and/or distribute this software for any
991
- purpose with or without fee is hereby granted.
992
-
993
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
994
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
995
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
996
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
997
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
998
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
999
- PERFORMANCE OF THIS SOFTWARE.
1000
- ***************************************************************************** */var MP=function(e,t){return MP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},MP(e,t)};function gr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");MP(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var di=function(){return di=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},di.apply(this,arguments)};function pve(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function yp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function lO(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function pc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(lO(arguments[t]));return e}function qV(e){return Wt(e).type}function EA(e,t){Wt(e).applyPatches(rz(t))}function HV(e,t){t===void 0&&(t=!0);var r=Wt(e);return t?r.snapshot:r.type.getSnapshot(r,!1)}function mve(e){return Wt(e).root.storedValue}function vve(e){return Wt(e).path}function gve(e){return Wt(e).identifier}function _g(e,t){t===void 0&&(t=!0);try{var r=e();if(r==null)return;if(Cr(r))return t?yve(r)?r:void 0:r;throw Ae("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof yz)return;throw n}}function yve(e){return Wt(e).observableIsAlive}var WV=function(){function e(t,r,n,i){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:On.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=i,this.baseSetParent(r,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(t){var r=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&r!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._hookSubscribers||(this._hookSubscribers=new oz),this._hookSubscribers.register(t,r)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){this._parent=t,this._subpath=r,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.pathAtom||(this.pathAtom=g0("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Au(this._subpath):""),this.parent.getEscapedPath(t)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==On.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===On.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=g0("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.state===On.CREATED){if(this.parent){if(this.parent.state!==On.FINALIZED)return;this.fireHook(sn.afterAttach)}this.state=On.FINALIZED,t&&t()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=On.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(sn.beforeDestroy)}}),e}(),Sm=function(e){gr(t,e);function t(r,n,i,o,a){var s=e.call(this,r,n,i,o)||this;try{s.storedValue=r.createNewInstance(a)}catch(l){throw s.state=On.DEAD,l}return s.state=On.CREATED,s.finalizeCreation(),s}return Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw Ae("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.parent!==r,o=this.subpath!==n;!i&&!o||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+r+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===On.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.fireInternalHook(r)}}),t}(WV);Sm.prototype.die=Ht(Sm.prototype.die);var bve=1,wve={onError:function(e){throw e}},bi=function(e){gr(t,e);function t(r,n,i,o,a){var s=e.call(this,r,n,i,o)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++bve}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=Mr(function(){return s.getSnapshot()}),s.unbox=s.unbox.bind(s),s._initialSnapshot=a,s.identifierAttribute=r.identifierAttribute,n||(s.identifierCache=new kve),s._childNodes=r.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var l=s._initialSnapshot[s.identifierAttribute];if(l===void 0){var u=s._childNodes[s.identifierAttribute];u&&(l=u.value)}if(typeof l!="string"&&typeof l!="number")throw Ae("Instance identifier '"+s.identifierAttribute+"' for type '"+s.type.name+"' must be a string or a number");s.identifier=yv(l),s.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return Object.defineProperty(t.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applyPatches(r)}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applySnapshot(r)}}),Object.defineProperty(t.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=!0),this._observableInstanceState===0&&this.createObservableInstance(r)}}),Object.defineProperty(t.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n,i,o,a;r===void 0&&(r=!0),this._observableInstanceState=1;for(var s=[],l=this.parent;l&&l._observableInstanceState===0;)s.unshift(l),l=l.parent;try{for(var u=yp(s),c=u.next();!c.done;c=u.next()){var d=c.value;d.createObservableInstanceIfNeeded(!1)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}var f=this.type;try{this.storedValue=f.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,f.finalizeNewInstance(this,this.storedValue)}catch(v){throw this.state=On.DEAD,v}finally{this._isRunningAction=!1}if(this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=vf,this.state=On.CREATED,r){this.fireHook(sn.afterCreate),this.finalizeCreation();try{for(var h=yp(s.reverse()),m=h.next();!m.done;m=h.next()){var d=m.value;d.fireHook(sn.afterCreate),d.finalizeCreation()}}catch(v){o={error:v}}finally{try{m&&!m.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}}}),Object.defineProperty(t.prototype,"root",{get:function(){var r=this.parent;return r?r.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(sn.beforeDetach);var r=this.state;this.state=On.DETACHING;var n=this.root,i=n.environment,o=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=i,this.identifierCache=o}finally{this.state=r}}}}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r!==this.parent,o=n!==this.subpath;!i&&!o||(i?(this.environment=void 0,r.root.identifierCache.mergeCache(this),this.baseSetParent(r,n),this.fireHook(sn.afterAttach)):o&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.fireInternalHook(r);var i=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[r];typeof i=="function"&&(um?um(function(){i.apply(n.storedValue)}):i.apply(this.storedValue))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===2?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(t.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var r=this.type,n=this._childNodes,i=this._initialSnapshot;this._cachedInitialSnapshot=r.processInitialSnapshot(n,i),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(t.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(t.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=hve();if(!this.isAlive&&n!=="ignore"){var i=this._getAssertAliveError(r);switch(n){case"error":throw Ae(i);case"warn":Uve(i)}}}}),Object.defineProperty(t.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",i=r.subpath&&Au(r.subpath)||"",o=r.actionContext||QV();o&&o.type!=="action"&&o.parentActionEvent&&(o=o.parentActionEvent);var a="";if(o&&o.name!=null){var s=o&&o.context&&vve(o.context)||n;a=s+"."+o.name+"()"}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+n+"', Subpath: '"+i+"', Action: '"+a+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.assertAlive({subpath:r}),this._autoUnbox=!1;try{return this._observableInstanceState===2?this.type.getChildNode(this,r):this._childNodes[r]}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(vf),this._autoUnbox=!1;try{return this._observableInstanceState===2?this.type.getChildren(this):ez(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.type.getChildType(r)}}),Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.assertAlive(r),!this.isRunningAction()&&this.isProtected)throw Ae("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.type.removeChild(this,r)}}),Object.defineProperty(t.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.assertAlive({subpath:r.subpath||r.subpathUponDeath}),this._autoUnbox?r.value:r)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+r+n+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this.baseFinalizeCreation(function(){var n,i;try{for(var o=yp(r.getChildren()),a=o.next();!a.done;a=o.next()){var s=a.value;s.finalizeCreation()}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}r.fireInternalHook(sn.afterCreationFinalization)})}}),Object.defineProperty(t.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw Ae("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(t.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this._applyPatches=_m(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(i){if(!i.path){r.type.applySnapshot(r,i.value);return}var o=Xve(i.path),a=Ave(r,o.slice(0,-1));a.applyPatchLocally(o[o.length-1],i)})}),this._applySnapshot=_m(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==r.snapshot)return r.type.applySnapshot(r,n)}),$u(this.storedValue,"$treenode",this),$u(this.storedValue,"toJSON",$ve)}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===On.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==0&&(this.getChildren().forEach(function(r){r.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var r=this.snapshot;this._snapshotUponDeath=r,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",r)}}),Object.defineProperty(t.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEventsEmit("snapshot",r)}}),Object.defineProperty(t.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsRegister("patch",r)}}),Object.defineProperty(t.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._internalEventsHasSubscribers("patch")){var i=Bve({},r,{path:n.path.substr(this.path.length)+"/"+r.path}),o=lO(Wve(i),2),a=o[0],s=o[1];this._internalEventsEmit("patch",a,s)}this.parent&&this.parent.emitPatch(r,n)}}),Object.defineProperty(t.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsHas("dispose",r)}}),Object.defineProperty(t.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this.hasDisposer(r)){this._internalEventsRegister("dispose",r,!0);return}throw Ae("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(t.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._internalEventsHas("dispose",r))throw Ae("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",r)}}),Object.defineProperty(t.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.middlewares){var n=this.middlewares.indexOf(r);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(t.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var o={handler:r,includeHooks:n};return this.middlewares?this.middlewares.push(o):this.middlewares=[o],function(){i.removeMiddleware(o)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this.assertWritable({subpath:r}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,r,n)}}),Object.defineProperty(t.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;if(!this._hasSnapshotReaction){var n=Ia(function(){return r.snapshot},function(i){return r.emitSnapshot(i)},wve);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(t.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return!!this._internalEvents&&this._internalEvents.hasSubscribers(r)}}),Object.defineProperty(t.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){return i===void 0&&(i=!1),this._internalEvents||(this._internalEvents=new oz),this._internalEvents.register(r,n,i)}}),Object.defineProperty(t.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!!this._internalEvents&&this._internalEvents.has(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this._internalEvents&&this._internalEvents.unregister(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];this._internalEvents&&(n=this._internalEvents).emit.apply(n,pc([r],i))}}),Object.defineProperty(t.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEvents&&this._internalEvents.clear(r)}}),Object.defineProperty(t.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),t}(WV);bi.prototype.createObservableInstance=Ht(bi.prototype.createObservableInstance);bi.prototype.detach=Ht(bi.prototype.detach);bi.prototype.die=Ht(bi.prototype.die);var KV,Tt;(function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(Tt||(Tt={}));var GV="cannotDetermine",Sve=Symbol("$type"),ys=function(){function e(t){Object.defineProperty(this,KV,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=t}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return is(this,t),this.instantiate(null,"",r,t).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){throw Ae("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=ZV(t);if(n){var i=qV(t);return this.isAssignableFrom(i)?wi():Pi(r,t)}return this.isValidSnapshot(t,r)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.validate(t,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw Ae("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw Ae("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw Ae("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw Ae("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();KV=Sve;ys.prototype.create=Ht(ys.prototype.create);var pf=function(e){gr(t,e);function t(r){var n=e.call(this,r)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r===void 0&&(r=this.getDefaultSnapshot()),e.prototype.create.call(this,r,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.createObservableInstanceIfNeeded(),r.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!r.identifierAttribute||r.identifier===yv(n[r.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r.isDetaching?!1:r.snapshot===n||Cr(n)&&Wt(n)===r?!0:r.type===this&&nz(n)&&!Cr(n)&&this.isMatchingSnapshotId(r,n)?(r.applySnapshot(n),!0):!1}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.tryToReconcileNode(r,n);if(a)return r.setParent(i,o),r;if(r.die(),Cr(n)&&this.isAssignableFrom(qV(n))){var s=Wt(n);return s.setParent(i,o),s}return this.instantiate(i,o,void 0,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(ys);pf.prototype.create=Ht(pf.prototype.create);var mc=function(e){gr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r.isDetaching&&r.type===this&&r.storedValue===n)return r;var a=this.instantiate(i,o,void 0,n);return r.die(),a}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(ys);function $l(e){return typeof e=="object"&&e&&e.isType===!0}var _ve=1,bp;function QV(){return bp}function YV(){return _ve++}function NP(e,t){var r=Wt(e.context);e.type==="action"&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=bp;bp=e;try{return Pve(r,e,t)}finally{bp=i,r._isRunningAction=n}}function XV(e){if(e)return e.type==="action"?e:e.parentActionEvent}function _m(e,t,r){var n=function(){var i=YV(),o=bp,a=XV(o);return NP({type:"action",name:t,id:i,args:az(arguments),context:e,tree:mve(e),rootId:o?o.rootId:i,parentId:o?o.id:0,allParentIds:o?pc(o.allParentIds,[o.id]):[],parentEvent:o,parentActionEvent:a},r)};return n._isMSTAction=!0,n._isFlowAction=r._isFlowAction,n}var xve=function(){function e(t,r){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),r.$mst_middleware&&this.middlewares.push(r.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.middlewares[this.arrayIndex];if(t){var r=t[this.inArrayIndex++];return r||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function Pve(e,t,r){var n=new xve(e,r);if(n.isEmpty)return Ht(r).apply(null,t.args);var i=null;function o(a){var s=n.getNextMiddleware(),l=s&&s.handler;if(!l)return Ht(r).apply(null,a.args);if(!s.includeHooks&&sn[a.name])return o(a);function u(d,f){i=o(d),f&&(i=f(i))}function c(d){i=d}return l(a,u,c),i}return o(t)}function Cve(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: "+t+">"}}function JV(e){return typeof e=="function"?"<function"+(e.name?" "+e.name:"")+">":Cr(e)?"<"+e+">":"`"+Cve(e)+"`"}function Eve(e){return e.length<280?e:e.substring(0,272)+"......"+e.substring(e.length-8)}function Tve(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(s){var l=s.path;return l}).filter(function(s){return s.length>0}).join("/"),i=n.length>0?'at path "/'+n+'" ':"",o=Cr(t)?"value of type "+Wt(t).type.name+":":xm(t)?"value":"snapshot",a=r&&Cr(t)&&r.is(Wt(t).snapshot);return""+i+o+" "+JV(t)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(e.message?" ("+e.message+")":"")+(r?hge(r)||xm(t)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function uO(e,t,r){return e.concat([{path:t,type:r}])}function wi(){return mf}function Pi(e,t,r){return[{context:e,value:t,message:r}]}function xw(e){return e.reduce(function(t,r){return t.concat(r)},[])}function is(e,t){qve()&&Ove(e,t)}function Ove(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw Ae(Rve(e,t,r))}function Rve(e,t,r){if(r.length!==0)return"Error while converting "+Eve(JV(t))+" to `"+e.name+`\`:
1001
-
1002
- `+r.map(Tve).join(`
1003
- `)}var Ive=0,kve=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Ive++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:xt.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:xt.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t);this.lastCacheModificationPerId.set(t,r===void 0?1:r+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t)||0;return this.cacheId+"-"+r}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(r===void 0&&(r=!0),t.identifierAttribute){var n=t.identifier;this.cache.has(n)||this.cache.set(n,xt.array([],Pw));var i=this.cache.get(n);if(i.indexOf(t)!==-1)throw Ae("Already registered");i.push(t),r&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;IB(t.identifierCache.cache).forEach(function(n){return n.forEach(function(i){r.addNodeToCache(i)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.identifierAttribute){var r=t.identifier,n=this.cache.get(r);n&&(n.remove(t),n.length||this.cache.delete(r),this.updateLastCacheModificationPerId(t.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,n=new e,i=t.path+"/";return zle(this.cache).forEach(function(o){for(var a=lO(o,2),s=a[0],l=a[1],u=!1,c=l.length-1;c>=0;c--){var d=l[c];(d===t||d.path.indexOf(i)===0)&&(n.addNodeToCache(d,!1),l.splice(c,1),l.length||r.cache.delete(s),u=!0)}u&&r.updateLastCacheModificationPerId(s)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);return n?n.some(function(i){return t.isAssignableFrom(i.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);if(!n)return null;var i=n.filter(function(o){return t.isAssignableFrom(o.type)});switch(i.length){case 0:return null;case 1:return i[0];default:throw Ae("Cannot resolve a reference to type '"+t.name+"' with id: '"+r+"' unambigously, there are multiple candidates: "+i.map(function(o){return o.path}).join(", "))}}}),e}();function cO(e,t,r,n,i){var o=ZV(i);if(o){if(o.parent)throw Ae("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+r+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,r),o}return new bi(e,t,r,n,i)}function Wl(e,t,r,n,i){return new Sm(e,t,r,n,i)}function jve(e){return e instanceof Sm||e instanceof bi}var On;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"})(On||(On={}));function Cr(e){return!!(e&&e.$treenode)}function Wt(e){if(!Cr(e))throw Ae("Value "+e+" is no MST Node");return e.$treenode}function ZV(e){return e&&e.$treenode||null}function $ve(){return Wt(this).snapshot}function Ave(e,t,r){r===void 0&&(r=!0);var n=e;try{for(var i=0;i<t.length;i++){var o=t[i];if(o===".."){if(n=n.parent,n)continue}else{if(o===".")continue;if(n){if(n instanceof Sm){var a=n.value;Cr(a)&&(n=Wt(a))}if(n instanceof bi){var s=n.getChildType(o);if(s&&(n=n.getChildNode(o),n))continue}}}throw Ae("Could not resolve '"+o+"' in path '"+(TA(t.slice(0,i))||"/")+"' while resolving '"+TA(t)+"'")}}catch(l){if(!r)return;throw l}return n}function ez(e){if(!e)return mf;var t=Object.keys(e);if(!t.length)return mf;var r=new Array(t.length);return t.forEach(function(n,i){r[i]=e[n]}),r}var Dve=Object.toString(),mf=Object.freeze([]),vf=Object.freeze({}),Pw=ple().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(Pw);function Ae(e){return e===void 0&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function Mve(e){return e}var Nve=Number.isInteger;function Fve(e){return Number(e)===e&&e%1!==0}function Lve(e){return Number.isFinite(e)}function tz(e){return Array.isArray(e)||So(e)}function rz(e){return e?tz(e)?e:[e]:mf}function Bve(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)e[o]=i[o]}return e}function wd(e){var t;if(e===null||typeof e!="object")return!1;var r=Object.getPrototypeOf(e);return r==null?!0:((t=r.constructor)===null||t===void 0?void 0:t.toString())===Dve}function nz(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function xm(e,t){return t===void 0&&(t=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||t&&e instanceof Date}function iz(e){return typeof e!="function"}function Vve(e,t,r){xi(e)?jB(e,t,r):Object.defineProperty(e,t,r)}function $u(e,t,r){Vve(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}var zve=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this;return r===void 0&&(r=!1),r?this.handlers.unshift(t):this.handlers.push(t),function(){n.unregister(t)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.handlers.indexOf(t)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.handlers.indexOf(t);r>=0&&this.handlers.splice(r,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.handlers.slice();n.forEach(function(i){return i.apply(void 0,pc(t))})}}),e}(),oz=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.eventHandlers&&this.eventHandlers[t];return!!r&&r.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var i=this.eventHandlers[t];return i||(i=this.eventHandlers[t]=new zve),i.register(r,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];return!!n&&n.has(r)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];n&&n.unregister(r)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.eventHandlers&&delete this.eventHandlers[t]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.eventHandlers&&this.eventHandlers[t];o&&(r=o).emit.apply(r,pc(n))}}),e}();function az(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function BS(e,t){return e.indexOf(t)===0}function Uve(e){console.warn(new Error("[mobx-state-tree] "+e))}function qve(){return typeof process<"u"&&CA&&CA.ENABLE_TYPE_CHECK==="true"}function VS(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function Oi(e){return Hve(e.name,e)}function Hve(e,t){var r=function(){var i=YV(),o=QV();if(!o)throw Ae("a mst flow must always have a parent context");var a=XV(o);if(!a)throw Ae("a mst flow must always have a parent action context");var s={name:e,id:i,tree:o.tree,context:o.context,parentId:o.id,allParentIds:pc(o.allParentIds,[o.id]),rootId:o.rootId,parentEvent:o,parentActionEvent:a},l=arguments;function u(c,d,f){return c.$mst_middleware=r.$mst_middleware,NP(di(di({},s),{type:d,args:[f]}),c)}return new Promise(function(c,d){var f,h=function(){f=t.apply(null,arguments),m(void 0)};h.$mst_middleware=r.$mst_middleware,NP(di(di({},s),{type:"flow_spawn",args:az(l)}),h);function m(p){var g;try{var b=u(function(_){g=f.next(_)},"flow_resume",p);b instanceof Error&&(g=f.throw(b))}catch(_){VS(function(){u(function(P){d(_)},"flow_throw",_)});return}w(g)}function v(p){var g;try{u(function(b){g=f.throw(b)},"flow_resume_error",p)}catch(b){VS(function(){u(function(_){d(b)},"flow_throw",b)});return}w(g)}function w(p){if(p.done){VS(function(){u(function(g){c(g)},"flow_return",p.value)});return}if(!p.value||typeof p.value.then!="function")throw Ae("Only promises can be yielded to `async`, got: "+p);return p.value.then(m,v)}})};return r._isFlowAction=!0,r}function Wve(e){if(!("oldValue"in e))throw Ae("Patches without `oldValue` field cannot be inversed");return[Kve(e),Gve(e)]}function Kve(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Gve(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function Qve(e){return typeof e=="number"}function Au(e){return Qve(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Yve(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function TA(e){if(e.length===0)return"";var t=function(r){return r.map(Au).join("/")};return e[0]==="."||e[0]===".."?t(e):"/"+t(e)}function Xve(e){var t=e.split("/").map(Yve),r=e===""||e==="."||e===".."||BS(e,"/")||BS(e,"./")||BS(e,"../");if(!r)throw Ae("a json path must be either rooted, empty or relative, but got '"+e+"'");return t[0]===""&&t.shift(),t}var zS=Symbol("$preProcessorFailed"),Jve=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,i||r.name)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),o}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|Tt.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._processors.preProcessor?this._processors.preProcessor.call(null,r):r}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(r){try{return this.preProcessSnapshot(r)}catch{return zS}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,r,n.storedValue):r}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;Zve(r.type,this,"create"),r instanceof bi&&(r.hasSnapshotPostProcessor=!!this._processors.postProcessor);var i=r.getSnapshot;r.getSnapshot=function(){return n.postProcessSnapshot(i.call(r),r)},bge(this._subtype)||(r.getReconciliationType=function(){return n})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Cr(o)?o:this.preProcessSnapshot(o),s=this._subtype.instantiate(r,n,i,a);return this._fixNode(s),s}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this._subtype.reconcile(r,Cr(n)?n:this.preProcessSnapshot(n),i,o);return a!==r&&this._fixNode(a),a}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=!0);var i=this._subtype.getSnapshot(r);return n?this.postProcessSnapshot(i,r):i}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.preProcessSnapshotSafe(r);return i===zS?Pi(n,r,"Failed to preprocess value"):this._subtype.validate(i,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=$l(r)?this._subtype:Cr(r)?HV(r,!1):this.preProcessSnapshotSafe(r);return n===zS?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!(this._subtype instanceof pf))return!1;var i=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(r,i)}}),t}(ys);function Zve(e,t){for(var r,n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=yp(i),s=a.next();!s.done;s=a.next()){var l=s.value;e[l]=t[l].bind(t)}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}function ege(e,t,r){return new Jve(e,t,r)}var OA="Map.put can only be used to store complex values that have an identifier type attribute";function sz(e,t){var r,n,i=e.getSubTypes();if(i===GV)return!1;if(i){var o=rz(i);try{for(var a=yp(o),s=a.next();!s.done;s=a.next()){var l=s.value;if(!sz(l,t))return!1}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e instanceof Pm&&t.push(e),!0}var Xs;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Xs||(Xs={}));var tge=function(e){gr(t,e);function t(r,n){return e.call(this,r,xt.ref.enhancer,n)||this}return Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.get.call(this,""+r)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.has.call(this,""+r)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.delete.call(this,""+r)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return e.prototype.set.call(this,""+r,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!r)throw Ae("Map.put cannot be used to set empty values");if(Cr(r)){var n=Wt(r);if(n.identifier===null)throw Ae(OA);return this.set(n.identifier,r),r}else if(nz(r)){var i=Wt(this),o=i.type;if(o.identifierMode!==Xs.YES)throw Ae(OA);var a=o.mapIdentifierAttribute,s=r[a];if(!dO(s)){var l=this.put(o.getChildType().create(r,i.environment));return this.put(HV(l))}var u=yv(s);return this.set(u,r),this.get(u)}else throw Ae("Map.put can only be used to store complex values")}}),t}(nw),A0=function(e){gr(t,e);function t(r,n,i){i===void 0&&(i=[]);var o=e.call(this,r)||this;return Object.defineProperty(o,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Xs.UNKNOWN}),Object.defineProperty(o,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Map}),Object.defineProperty(o,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),o._determineIdentifierMode(),o.hookInitializers=i,o}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._determineIdentifierMode(),cO(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Xs.UNKNOWN){var r=[];if(sz(this._subType,r)){var n=r.reduce(function(i,o){if(!o.identifierAttribute)return i;if(i&&i!==o.identifierAttribute)throw Ae("The objects in a map should all have the same identifier attribute, expected '"+i+"', but child of type '"+o.name+"' declared attribute '"+o.identifierAttribute+"' as identifier");return o.identifierAttribute},void 0);n?(this.identifierMode=Xs.YES,this.mapIdentifierAttribute=n):this.identifierMode=Xs.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type._subType,o={};return Object.keys(n).forEach(function(a){o[a]=i.instantiate(r,a,void 0,n[a])}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new tge(r,this.name)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){OB(n,r.unbox);var i=r.type;i.hookInitializers.forEach(function(o){var a=o(n);Object.keys(a).forEach(function(s){var l=a[s],u=_m(n,s,l);$u(n,s,u)})}),ST(n,this.willChange),tw(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return IB(r.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r.storedValue.get(""+n);if(!i)throw Ae("Not a child "+n);return i}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Wt(r.object),i=r.name;n.assertWritable({subpath:i});var o=n.type,a=o._subType;switch(r.type){case"update":{var s=r.newValue,l=r.object.get(i);if(s===l)return null;is(a,s),r.newValue=a.reconcile(n.getChildNode(i),r.newValue,n,i),o.processIdentifier(i,r.newValue)}break;case"add":is(a,r.newValue),r.newValue=a.instantiate(n,i,void 0,r.newValue),o.processIdentifier(i,r.newValue);break}return r}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.identifierMode===Xs.YES&&n instanceof bi){var i=n.identifier;if(i!==r)throw Ae("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+i+"', but expected: '"+r+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return r.getChildren().forEach(function(i){n[i.subpath]=i.snapshot}),n}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Wt(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:Au(r.name),value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Au(r.name),value:r.newValue.snapshot,oldValue:void 0},n);case"delete":var i=r.oldValue.snapshot;return r.oldValue.die(),void n.emitPatch({op:"remove",path:Au(r.name),oldValue:i},n)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=r.storedValue;switch(i.op){case"add":case"replace":o.set(n,i.value);break;case"remove":o.delete(n);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){is(this,n);var i=r.storedValue,o={};if(Array.from(i.keys()).forEach(function(s){o[s]=!1}),n)for(var a in n)i.set(a,n[a]),o[""+a]=!0;Object.keys(o).forEach(function(s){o[s]===!1&&i.delete(s)})}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return wd(r)?xw(Object.keys(r).map(function(o){return i._subType.validate(r[o],uO(n,o,i._subType))})):Pi(n,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.delete(n)}}),t}(pf);A0.prototype.applySnapshot=Ht(A0.prototype.applySnapshot);function rge(e){return new A0("Map<string, "+e.name+">",e)}var D0=function(e){gr(t,e);function t(r,n,i){i===void 0&&(i=[]);var o=e.call(this,r)||this;return Object.defineProperty(o,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Array}),Object.defineProperty(o,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),o.hookInitializers=i,o}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return cO(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=[]);var i=r.type._subType,o={};return n.forEach(function(a,s){var l=""+s;o[l]=i.instantiate(r,l,void 0,a)}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=di(di({},Pw),{name:this.name});return xt.array(ez(r),n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Yo(n).dehancer=r.unbox;var i=r.type;i.hookInitializers.forEach(function(o){var a=o(n);Object.keys(a).forEach(function(s){var l=a[s],u=_m(n,s,l);$u(n,s,u)})}),ST(n,this.willChange),tw(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=Number(n);if(i<r.storedValue.length)return r.storedValue[i];throw Ae("Not a child: "+n)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Wt(r.object);n.assertWritable({subpath:""+r.index});var i=n.type._subType,o=n.getChildren();switch(r.type){case"update":{if(r.newValue===r.object[r.index])return null;var a=RA(n,i,[o[r.index]],[r.newValue],[r.index]);if(!a)return null;r.newValue=a[0]}break;case"splice":{var s=r.index,l=r.removedCount,u=r.added,c=RA(n,i,o.slice(s,s+l),u,u.map(function(f,h){return s+h}));if(!c)return null;r.added=c;for(var d=s+l;d<o.length;d++)o[d].setParent(n,""+(d+u.length-l))}break}return r}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=[];return Object.keys(r).forEach(function(i){n.push(r[i].getSnapshot())}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Wt(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:""+r.index,value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"splice":for(var i=r.removedCount-1;i>=0;i--)n.emitPatch({op:"remove",path:""+(r.index+i),oldValue:r.removed[i].snapshot},n);for(var i=0;i<r.addedCount;i++)n.emitPatch({op:"add",path:""+(r.index+i),value:n.getChildNode(""+(r.index+i)).snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=r.storedValue,a=n==="-"?o.length:Number(n);switch(i.op){case"replace":o[a]=i.value;break;case"add":o.splice(a,0,i.value);break;case"remove":o.splice(a,1);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){is(this,n);var i=r.storedValue;i.replace(n)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return tz(r)?xw(r.map(function(o,a){return i._subType.validate(o,uO(n,""+a,i._subType))})):Pi(n,r,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return mf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.splice(Number(n),1)}}),t}(pf);D0.prototype.applySnapshot=Ht(D0.prototype.applySnapshot);function nge(e){return new D0(e.name+"[]",e)}function RA(e,t,r,n,i){for(var o=!0,a=0;;a++){var s=a<=n.length-1,l=r[a],u=s?n[a]:void 0,c=""+i[a];if(jve(u)&&(u=u.storedValue),!l&&!s)break;if(!s)o=!1,r.splice(a,1),l instanceof bi&&l.createObservableInstanceIfNeeded(),l.die(),a--;else if(l)if(IA(l,u))r[a]=US(t,e,c,u,l);else{for(var f=void 0,h=a;h<r.length;h++)if(IA(r[h],u)){f=r.splice(h,1)[0];break}o=!1;var d=US(t,e,c,u,f);r.splice(a,0,d)}else{if(Cr(u)&&Wt(u).parent===e)throw Ae("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+c+"', but it lives already at '"+Wt(u).path+"'");o=!1;var d=US(t,e,c,u);r.splice(a,0,d)}}return o?null:r}function US(e,t,r,n,i){is(e,n);function o(){if(Cr(n)){var s=Wt(n);if(s.assertAlive(vf),s.parent!==null&&s.parent===t)return s.setParent(t,r),s}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}var a=o();return i&&i!==a&&(i instanceof bi&&i.createObservableInstanceIfNeeded(),i.die()),a}function IA(e,t){if(!e.isAlive)return!1;if(Cr(t)){var r=Wt(t);return r.isAlive&&r===e}if(e.snapshot===t)return!0;if(!(e instanceof bi))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&wd(t)&&n.is(t)&&n.isMatchingSnapshotId(e,t)}var kA="preProcessSnapshot",jA="postProcessSnapshot";function ige(){return Wt(this).toString()}var $A={name:"AnonymousModel",properties:{},initializers:mf};function oge(e){var t=Object.keys(e),r=new Set;return t.forEach(function(n){if(r.has(n))throw Ae(n+" is declared twice in the model. Model should not contain the same keys");r.add(n)}),t.reduce(function(n,i){if(i in sn)throw Ae("Hook '"+i+"' was defined as property. Hooks should be defined as part of the actions");var o=Object.getOwnPropertyDescriptor(e,i);if("get"in o)throw Ae("Getters are not supported as properties. Please use views instead");var a=o.value;if(a==null)throw Ae("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(xm(a))n[i]=Du(fge(a),a);else if(a instanceof A0)n[i]=Du(a,{});else if(a instanceof D0)n[i]=Du(a,[]);else if(!$l(a))throw Ae("Invalid type definition for property '"+i+"', cannot infer a type from a value like '"+a+"' ("+typeof a+")");return n},di({},e))}var Pm=function(e){gr(t,e);function t(r){var n=e.call(this,r.name||$A.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({name:i})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({properties:i})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var o=n.preProcessor;return o?n.cloneAndEnhance({preProcessor:function(a){return o(i(a))}}):n.cloneAndEnhance({preProcessor:i})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var o=n.postProcessor;return o?n.cloneAndEnhance({postProcessor:function(a){return i(o(a))}}):n.cloneAndEnhance({postProcessor:i})}}),Object.assign(n,$A,r),n.properties=oge(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=void 0;return this.forAllProps(function(n,i){if(i.flags&Tt.Identifier){if(r)throw Ae("Cannot define property '"+n+"' as object identifier, property '"+r+"' is already defined as identifier property");r=n}}),r}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new t({name:r.name||this.name,properties:Object.assign({},this.properties,r.properties),initializers:this.initializers.concat(r.initializers||[]),preProcessor:r.preProcessor||this.preProcessor,postProcessor:r.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){return n.instantiateActions(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!wd(n))throw Ae("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(i){if(i===kA)throw Ae("Cannot define action '"+kA+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(i===jA)throw Ae("Cannot define action '"+jA+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var o=n[i],a=r[i];if(i in sn&&a){var s=o;o=function(){a.apply(null,arguments),s.apply(null,arguments)}}var l=o.$mst_middleware,u=o.bind(n);u._isFlowAction=o._isFlowAction||!1,u.$mst_middleware=l;var c=_m(r,i,u);n[i]=c,$u(r,i,c)})}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;if(typeof r!="function")throw Ae("You passed an "+typeof r+" to volatile state as an argument, when function is expected");var i=function(o){return n.instantiateVolatileState(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!wd(n))throw Ae("volatile state initializer should return a plain object containing state");kB(r,n)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){var a=r(o),s=a.actions,l=a.views,u=a.state,c=pve(a,["actions","views","state"]);for(var d in c)throw Ae("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+d+"'");return u&&n.instantiateVolatileState(o,u),l&&n.instantiateViews(o,l),s&&n.instantiateActions(o,s),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(o){return n.instantiateViews(o,r(o)),o};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!wd(n))throw Ae("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(i){var o,a=Object.getOwnPropertyDescriptor(n,i);if("get"in a)jB(r,i,a),rw(r,(o={},o[i]=Mr,o));else if(typeof a.value=="function")$u(r,i,a.value);else throw Ae("A view member should either be a function or getter based property")})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Cr(o)?o:this.applySnapshotPreProcessor(o);return cO(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type,o={};return i.forAllProps(function(a,s){o[a]=s.instantiate(r,a,void 0,n[a])}),o}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=di(di({},Pw),{name:this.name});return xt.object(r,vf,n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){$u(n,"toString",ige),this.forAllProps(function(i){OB(n,i,r.unbox)}),this.initializers.reduce(function(i,o){return o(i)},n),ST(n,this.willChange),tw(n,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=Wt(n.object),o=n.name;i.assertWritable({subpath:o});var a=i.type.properties[o];return a&&(is(a,n.newValue),n.newValue=a.reconcile(i.getChildNode(o),n.newValue,i,o)),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=Wt(n.object),o=i.type.properties[n.name];if(o){var a=n.oldValue?n.oldValue.snapshot:void 0;i.emitPatch({op:"replace",path:Au(n.name),value:n.newValue.snapshot,oldValue:a},i)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=[];return this.forAllProps(function(o){i.push(n.getChildNode(r,o))}),i}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i;if(!(n in this.properties))throw Ae("Not a value property: "+n);var o=Yo(r.storedValue,n),a=(i=o.raw)===null||i===void 0?void 0:i.call(o);if(!a)throw Ae("Node not available for property "+n);return a}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var o={};return this.forAllProps(function(a,s){try{var l=Qu(r.storedValue,a);l.reportObserved()}catch{throw Ae(a+" property is declared twice")}o[a]=i.getChildNode(r,a).snapshot}),n?this.applySnapshotPostProcessor(o):o}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){if(!(i.op==="replace"||i.op==="add"))throw Ae("object does not support operation "+i.op);r.storedValue[n]=i.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){is(this,n);var i=this.applySnapshotPreProcessor(n);this.forAllProps(function(o){r.storedValue[o]=i[o]})}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.preProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.postProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.properties[r]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,o=this.applySnapshotPreProcessor(r);return wd(o)?xw(this.propertyNames.map(function(a){return i.properties[a].validate(o[a],uO(n,a,i.properties[a]))})):Pi(n,o,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.propertyNames.forEach(function(i){return r(i,n.properties[i])})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;return"{ "+this.propertyNames.map(function(n){return n+": "+r.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vf}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue[n]=void 0}}),t}(pf);Pm.prototype.applySnapshot=Ht(Pm.prototype.applySnapshot);function age(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new Pm({name:r,properties:n})}function sge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string",n=r?e[0]:"AnonymousModel";return r&&e.shift(),e.reduce(function(i,o){return i.cloneAndEnhance({name:i.name+"_"+o.name,properties:o.properties,initializers:o.initializers,preProcessor:function(a){return o.applySnapshotPreProcessor(i.applySnapshotPreProcessor(a))},postProcessor:function(a){return o.applySnapshotPostProcessor(i.applySnapshotPostProcessor(a))}})}).named(n)}function lge(e){return $l(e)&&(e.flags&Tt.Object)>0}var Os=function(e){gr(t,e);function t(r,n,i,o){o===void 0&&(o=Mve);var a=e.call(this,r)||this;return Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"checker",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(a,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:o}),a.flags=n,a}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return Wl(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.initializer(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(xm(r)&&this.checker(r))return wi();var i=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return Pi(n,r,"Value is not a "+i)}}),t}(mc),lz=new Os("string",Tt.String,function(e){return typeof e=="string"}),uz=new Os("number",Tt.Number,function(e){return typeof e=="number"}),uge=new Os("integer",Tt.Integer,function(e){return Nve(e)}),cge=new Os("float",Tt.Float,function(e){return Fve(e)}),dge=new Os("finite",Tt.Finite,function(e){return Lve(e)}),cz=new Os("boolean",Tt.Boolean,function(e){return typeof e=="boolean"}),dz=new Os("null",Tt.Null,function(e){return e===null}),fz=new Os("undefined",Tt.Undefined,function(e){return e===void 0}),hz=new Os("Date",Tt.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});hz.getSnapshot=function(e){return e.storedValue.getTime()};var pz=hz;function fge(e){switch(typeof e){case"string":return lz;case"number":return uz;case"boolean":return cz;case"object":if(e instanceof Date)return pz}throw Ae("Cannot determine primitive type from value "+e)}function hge(e){return $l(e)&&(e.flags&(Tt.String|Tt.Number|Tt.Integer|Tt.Boolean|Tt.Date))>0}var pge=function(e){gr(t,e);function t(r){var n=e.call(this,JSON.stringify(r))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Literal}),n.value=r,n}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return Wl(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return xm(r)&&r===this.value?wi():Pi(n,r,"Value is not a literal "+JSON.stringify(this.value))}}),t}(mc);function mz(e){return new pge(e)}var mge=function(e){gr(t,e);function t(r,n,i,o){var a=e.call(this,r)||this;return Object.defineProperty(a,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(a,"_message",{enumerable:!0,configurable:!0,writable:!0,value:o}),a}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|Tt.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this._subtype.validate(r,n);if(i.length>0)return i;var o=Cr(r)?Wt(r).snapshot:r;return this._predicate(o)?wi():Pi(n,r,this._message(r))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(ys);function vge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():$l(e[0])?e[0].name:null,n=e[0],i=e[1],o=e[2]?e[2]:function(a){return"Value does not respect the refinement predicate"};return new mge(r,n,i,o)}function gge(e,t){var r=typeof e=="string"?t:e,n=Cw.apply(void 0,pc(r.map(function(i){return mz(""+i)})));return typeof e=="string"&&(n.name=e),n}var yge=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,r)||this;return Object.defineProperty(o,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),i=di({eager:!0,dispatcher:void 0},i),o._dispatcher=i.dispatcher,i.eager||(o._eager=!1),o}return Object.defineProperty(t.prototype,"flags",{get:function(){var r=Tt.Union;return this._types.forEach(function(n){r|=n.flags}),r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._types.some(function(n){return n.isAssignableFrom(r)})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(r){return r.describe()}).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.determineType(o,void 0);if(!a)throw Ae("No matching type for union "+this.describe());return a.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.determineType(n,r.getReconciliationType());if(!a)throw Ae("No matching type for union "+this.describe());return a.reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._dispatcher?this._dispatcher(r):n?n.is(r)?n:this._types.filter(function(i){return i!==n}).find(function(i){return i.is(r)}):this._types.find(function(i){return i.is(r)})}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._dispatcher)return this._dispatcher(r).validate(r,n);for(var i=[],o=0,a=0;a<this._types.length;a++){var s=this._types[a],l=s.validate(r,n);if(l.length===0){if(this._eager)return wi();o++}else i.push(l)}return o===1?wi():Pi(n,r,"No type is applicable for the union").concat(xw(i))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(ys);function Cw(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=$l(e)?void 0:e,i=$l(e)?pc([e],t):t,o="("+i.map(function(a){return a.name}).join(" | ")+")";return new yge(o,i,n)}function bge(e){return(e.flags&Tt.Union)>0}var wge=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,r.name)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|Tt.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(this.optionalValues.indexOf(o)>=0){var a=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(r,n,i,a)}return this._subtype.instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this._subtype.reconcile(r,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),i,o)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&is(this,r),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.optionalValues.indexOf(r)>=0?wi():this._subtype.validate(r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(ys);function Sge(e,t){if(typeof t!="function"&&Cr(t))throw Ae("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Du(e,t,r){return Sge(e,t),new wge(e,t,r||_ge)}var _ge=[void 0],xge=Du(fz,void 0),Pge=Du(dz,null);function vz(e){return Cw(e,xge)}function Cge(e){return Cw(e,Pge)}var Ege=function(e){gr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),i}return Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Tt.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._subType){var n=void 0;try{n=this._definition()}catch(i){if(i instanceof ReferenceError)n=void 0;else throw i}if(r&&n===void 0)throw Ae("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.getSubType(!0).instantiate(r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.getSubType(!0).reconcile(r,n,i,o)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r?r.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.getSubType(!1);return i?i.validate(r,n):wi()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getSubType(!1);return n?n.isAssignableFrom(r):!1}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r||GV}}),t}(ys);function Tge(e,t){var r=typeof e=="string"?e:"late("+e.toString()+")",n=typeof e=="string"?t:e;return new Ege(r,n)}function Oge(e,t){return new Rge(e,t)}var Rge=function(e){gr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Lazy}),Object.defineProperty(i,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(i,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:xt.array()}),V$(function(){return i.pendingNodeList.length>0&&i.pendingNodeList.some(function(o){return o.isAlive&&i.options.shouldLoadPredicate(o.parent?o.parent.value:null)})},function(){i.options.loadType().then(Ht(function(o){i.loadedType=o,i.pendingNodeList.forEach(function(a){a.parent&&i.loadedType&&a.parent.applyPatches([{op:"replace",path:"/"+a.subpath,value:a.snapshot}])})}))}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy "+this.name+">"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this;if(this.loadedType)return this.loadedType.instantiate(r,n,i,o);var s=Wl(this,r,n,i,o);return this.pendingNodeList.push(s),V$(function(){return!s.isAlive},function(){return a.pendingNodeList.splice(a.pendingNodeList.indexOf(s),1)}),s}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.loadedType?this.loadedType.validate(r,n):iz(r)?wi():Pi(n,r,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return this.loadedType?(r.die(),this.loadedType.instantiate(i,o,i.environment,n)):e.prototype.reconcile.call(this,r,n,i,o)}}),t}(mc),gz=function(e){gr(t,e);function t(r){var n=e.call(this,r?"frozen("+r.name+")":"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Frozen}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){return Wl(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return iz(r)?this.subType?this.subType.validate(r,n):wi():Pi(n,r,"Value is not serializable and cannot be frozen")}}),t}(mc),AA=new gz;function Ige(e){return arguments.length===0?AA:$l(e)?new gz(e):Du(AA,e)}function kge(e){switch(e){case sn.beforeDestroy:return"destroy";case sn.beforeDetach:return"detach";default:return}}var jge=function(){function e(t,r){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),dO(t))this.identifier=t;else if(Cr(t)){var n=Wt(t);if(!n.identifierAttribute)throw Ae("Can only store references with a defined identifier attribute.");var i=n.unnormalizedIdentifier;if(i==null)throw Ae("Can only store references to tree nodes with a defined identifier.");this.identifier=i}else throw Ae("Can only store references to tree nodes or identifiers, got: '"+t+"'")}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=yv(this.identifier),n=t.root,i=n.identifierCache.getLastCacheModificationPerId(r);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==i){var o=this.targetType,a=n.identifierCache.resolve(o,r);if(!a)throw new yz("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+t.path+")");this.resolvedReference={node:a,lastCacheModification:i}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),yz=function(e){gr(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error),bz=function(e){gr(t,e);function t(r,n){var i=e.call(this,"reference("+r.name+")")||this;return Object.defineProperty(i,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Reference}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.targetType.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return dO(r)?wi():Pi(n,r,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=n.parent;if(!(!a||!a.isAlive)){var s=a.storedValue;s&&this.onInvalidated({cause:r,parent:s,invalidTarget:o?o.storedValue:void 0,invalidId:i,replaceRef:function(l){EA(n.root.storedValue,{op:"replace",value:l,path:n.path})},removeRef:function(){lge(a.type)?this.replaceRef(void 0):EA(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,o=this.getValue(r);if(o){var a=Wt(o),s=function(c,d){var f=kge(d);f&&i.fireInvalidated(f,r,n,a)},l=a.registerHook(sn.beforeDetach,s),u=a.registerHook(sn.beforeDestroy,s);return function(){l(),u()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var o=this;if(this.onInvalidated){var a;r.registerHook(sn.beforeDestroy,function(){a&&a()});var s=function(l){a&&a();var u=r.parent,c=u&&u.storedValue;if(u&&u.isAlive&&c){var d=void 0;i?d=!!i.get(n,c):d=r.root.identifierCache.has(o.targetType,yv(n)),d?a=o.addTargetNodeWatcher(r,n):l||o.fireInvalidated("invalidSnapshotReference",r,n,null)}};r.state===On.FINALIZED?s(!0):(r.isRoot||r.root.registerHook(sn.afterCreationFinalization,function(){r.parent&&r.parent.createObservableInstanceIfNeeded()}),r.registerHook(sn.afterAttach,function(){s(!1)}))}}}),t}(mc),$ge=function(e){gr(t,e);function t(r,n){return e.call(this,r,n)||this}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=r.storedValue;return n.resolvedValue}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r.storedValue;return n.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Cr(o)?gve(o):o,s=new jge(o,this.targetType),l=Wl(this,r,n,i,s);return s.node=l,this.watchTargetNodeForInvalidations(l,a,void 0),l}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r.isDetaching&&r.type===this){var a=Cr(n),s=r.storedValue;if(!a&&s.identifier===n||a&&s.resolvedValue===n)return r.setParent(i,o),r}var l=this.instantiate(i,o,void 0,n);return r.die(),l}}),t}(bz),Age=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,r,i)||this;return Object.defineProperty(o,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),o}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=this.options.get(r.storedValue,r.parent?r.parent.storedValue:null);return n}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Cr(o)?this.options.set(o,r?r.storedValue:null):o,s=Wl(this,r,n,i,a);return this.watchTargetNodeForInvalidations(s,a,this.options),s}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=Cr(n)?this.options.set(n,r?r.storedValue:null):n;if(!r.isDetaching&&r.type===this&&r.storedValue===a)return r.setParent(i,o),r;var s=this.instantiate(i,o,void 0,a);return r.die(),s}}),t}(bz);function wz(e,t){var r=t||void 0,n=t?t.onInvalidated:void 0;return r&&(r.get||r.set)?new Age(e,{get:r.get,set:r.set},n):new $ge(e,n)}function Dge(e,t){var r=wz(e,di(di({},t),{onInvalidated:function(n){t&&t.onInvalidated&&t.onInvalidated(n),n.removeRef()}}));return t&&t.acceptsUndefined===!1?r:vz(r)}var Sz=function(e){gr(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Identifier}),i}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(!r||!(r.type instanceof Pm))throw Ae("Identifier types can only be instantiated as direct child of a model type");return Wl(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){if(r.storedValue!==n)throw Ae("Tried to change identifier from '"+r.storedValue+"' to '"+n+"'. Changing identifiers is not allowed.");return r.setParent(i,o),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return typeof r!==this.validType?Pi(n,r,"Value is not a valid "+this.describe()+", expected a "+this.validType):wi()}}),t}(mc),Mge=function(e){gr(t,e);function t(){var r=e.call(this,"identifier","string")||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Identifier}),r}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Sz),Nge=function(e){gr(t,e);function t(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Sz),Fge=new Mge,Lge=new Nge;function yv(e){return""+e}function dO(e){return typeof e=="string"||typeof e=="number"}function Bge(e){return new Vge(e)}var Vge=function(e){gr(t,e);function t(r){var n=e.call(this,r.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Custom}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.options.isTargetType(r))return wi();var i=this.options.getValidationMessage(r);return i?Pi(n,r,"Invalid value for type '"+this.name+"': "+i):wi()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.options.toSnapshot(r.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=this.options.isTargetType(o)?o:this.options.fromSnapshot(o,r&&r.root.environment);return Wl(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,o){var a=!this.options.isTargetType(n);if(!r.isDetaching){var s=r.type===this&&(a?n===r.snapshot:n===r.storedValue);if(s)return r.setParent(i,o),r}var l=a?this.options.fromSnapshot(n,i.root.environment):n,u=this.instantiate(i,o,void 0,l);return r.die(),u}}),t}(mc),J={enumeration:gge,model:age,compose:sge,custom:Bge,reference:wz,safeReference:Dge,union:Cw,optional:Du,literal:mz,maybe:vz,maybeNull:Cge,refinement:vge,string:lz,boolean:cz,number:uz,integer:uge,float:cge,finite:dge,Date:pz,map:rge,array:nge,frozen:Ige,identifier:Fge,identifierNumber:Lge,late:Tge,lazy:Oge,undefined:fz,null:dz,snapshotProcessor:ege};const vc=(e,t)=>J.model(e,{totalCount:0,hasNextPage:!1,countLoaded:0,edges:J.array(J.model({cursor:J.string,node:J.reference(t)}))}).views(r=>({get startCursor(){var n;return((n=r.edges[0])==null?void 0:n.cursor)||null},get endCursor(){var n;return((n=r.edges[r.edges.length-1])==null?void 0:n.cursor)||null},get availableNextPage(){return r.hasNextPage||r.countLoaded===0}})).actions(r=>({reset(){r.totalCount=0,r.countLoaded=0,r.hasNextPage=!1,r.edges=[]},onLoad(n){r.countLoaded+=1,r.totalCount=n.totalCount,r.hasNextPage=n.hasNextPage,r.edges.push(...n.edges)},removeEdge(n){const i=r.edges.find(o=>o.cursor===n);i&&(r.totalCount-=1,r.edges.remove(i))},replaceNode(n,i){const o=r.edges.find(a=>a.cursor===n);o&&(o.node=i)}})),zge=vc("OrganizationProjectsConnection",J.late(()=>Cm)),fO=J.model("OrganizationModel",{id:J.identifier,projectsConnection:J.optional(zge,{})}),Uge=vc("ProjectBranchesConnection",J.late(()=>Em)),Cm=J.model("ProjectModel",{id:J.identifier,organization:J.reference(J.late(()=>fO)),name:J.string,isPublic:J.boolean,createdAt:J.late(()=>Al),rootBranch:J.reference(J.late(()=>Em)),branchesConnection:J.optional(Uge,{})}),Em=J.model("BranchModel",{id:J.identifier,name:J.string,createdAt:J.late(()=>Al),touched:J.boolean,start:J.reference(J.late(()=>Mu)),head:J.reference(J.late(()=>Mu)),draft:J.reference(J.late(()=>Mu)),parentBranch:J.maybe(J.model({branchName:J.string,fromRevisionId:J.string}))}).actions(e=>({updateTouched(t){e.touched=t}})),qge=vc("RevisionTablesConnection",J.late(()=>Tm)),Mu=J.model("RevisionModel",{id:J.identifier,createdAt:J.late(()=>Al),comment:"",parent:J.maybe(J.reference(J.late(()=>Mu))),isThereParent:J.optional(J.boolean,!1),child:J.maybe(J.reference(J.late(()=>Mu))),isThereChild:J.optional(J.boolean,!1),childBranches:J.array(J.model({branchName:J.string,revisionStartId:J.string})),endpoints:J.array(J.reference(J.late(()=>_z))),tablesConnection:J.optional(qge,{})}).actions(e=>({addEndpoint(t){e.endpoints.push(t)},removeEndpoint(t){const r=e.endpoints.find(n=>n.id===t);r&&e.endpoints.remove(r)},update(t){t.comment&&(e.comment=t.comment),t.parent&&(e.parent=t.parent),t.child&&(e.child=t.child),t.childBranches&&(e.childBranches=t.childBranches),t.endpoints&&(e.endpoints=[],e.endpoints.push(...t.endpoints))}})).views(e=>({getParentsDetails(t){const r=[];if(!e.isThereParent)return{isAllLoaded:!0,loadedSequence:r};let n=_g(()=>e.parent);if(!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n);for(let i=1;i<t;i++){if(!n.isThereParent)return{isAllLoaded:!0,loadedSequence:r};if(n=_g(()=>n.parent),!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n)}return{isAllLoaded:!0,loadedSequence:r}},getChildrenDetails(t){const r=[];if(!e.isThereChild)return{isAllLoaded:!0,loadedSequence:r};let n=_g(()=>e.child);if(!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n);for(let i=1;i<t;i++){if(!n.isThereChild)return{isAllLoaded:!0,loadedSequence:r};if(n=_g(()=>n.child),!n)return{isAllLoaded:!1,loadedSequence:r};r.push(n)}return{isAllLoaded:!0,loadedSequence:r}}})),_z=J.model("EndpointModel",{id:J.identifier,createdAt:J.late(()=>Al),type:J.enumeration("EndpointType",["GRAPHQL","REST_API"])}),Hge=vc("TableRowsConnection",J.late(()=>Om)),Wge=vc("foreignKeysByConnection",J.late(()=>Tm)),Tm=J.model("TableModel",{createdId:J.string,id:J.string,versionId:J.identifier,count:J.integer,readonly:J.boolean,createdAt:J.late(()=>Al),updatedAt:J.late(()=>Al),schema:J.frozen({}),rowsConnection:J.optional(Hge,{}),foreignKeysByConnection:J.optional(Wge,{})}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n}})),DA=vc("RowForeignKeysByConnection",J.late(()=>Om)),Om=J.model("RowModel",{createdId:J.string,id:J.string,versionId:J.identifier,createdAt:J.late(()=>Al),updatedAt:J.late(()=>Al),readonly:J.boolean,data:J.frozen({}),rowForeignKeysByConnection:J.map(J.optional(DA,{}))}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n},getOrCreateRowForeignKeysByConnection(t){return e.rowForeignKeysByConnection.has(t)||e.rowForeignKeysByConnection.set(t,DA.create()),e.rowForeignKeysByConnection.get(t)}})),Al=J.custom({name:"ISODate",fromSnapshot(e){return new Date(e)},toSnapshot(e){return e.toISOString()},isTargetType(e){return e instanceof Date},getValidationMessage(e){return typeof e=="string"&&!isNaN(Date.parse(e))?"":`'${e}' is not a valid ISO date string`}});J.frozen();let Br=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");J.model({startCursor:J.maybeNull(J.string),endCursor:J.maybeNull(J.string),hasNextPage:!1,hasPreviousPage:!1});const qS=J.model("RowForeignKeysByModel",{id:J.identifier,countForeignKeysBy:J.optional(J.integer,0)}).actions(e=>({update(t){for(const[r,n]of Object.entries(t))e[r]=n}})),la=e=>JSON.stringify(e),Kge=vc("MeProjectsConnection",J.late(()=>Cm)),xz=J.model({id:J.identifier,meProjectsConnection:J.optional(Kge,{}),organization:J.map(J.late(()=>fO)),project:J.map(J.late(()=>Cm)),projectByVariables:J.map(J.reference(J.late(()=>Cm))),branch:J.map(J.late(()=>Em)),branchByVariables:J.map(J.reference(J.late(()=>Em))),revision:J.map(J.late(()=>Mu)),endpoint:J.map(J.late(()=>_z)),table:J.map(J.late(()=>Tm)),tableByVariables:J.map(J.reference(J.late(()=>Tm))),row:J.map(J.late(()=>Om)),rowByVariables:J.map(J.reference(J.late(()=>Om))),rowForeignKeysBy:J.map(J.late(()=>qS)),rowForeignKeysByByVariables:J.map(J.reference(J.late(()=>qS)))}).views(e=>({getOrganization(t){return Mr(()=>e.organization.get(t)).get()},getProject(t){return Mr(()=>e.project.get(t)).get()},getProjectByVariables({organizationId:t,projectName:r}){return Mr(()=>e.projectByVariables.get(la({organizationId:t,projectName:r}))).get()},getBranch(t){return Mr(()=>e.branch.get(t)).get()},getBranchByVariables({organizationId:t,projectName:r,branchName:n}){return Mr(()=>e.branchByVariables.get(la({organizationId:t,projectName:r,branchName:n}))).get()},getRevision(t){return Mr(()=>e.revision.get(t)).get()},getEndpoint(t){return Mr(()=>e.endpoint.get(t)).get()},getTable(t){return Mr(()=>e.table.get(t)).get()},getTableByVariables({revisionId:t,tableId:r}){return Mr(()=>e.tableByVariables.get(la({revisionId:t,tableId:r}))).get()},getRow(t){return Mr(()=>e.row.get(t)).get()},getRowByVariables({revisionId:t,tableId:r,rowId:n}){return Mr(()=>e.rowByVariables.get(la({revisionId:t,tableId:r,rowId:n}))).get()},getRowForeignKeysByVariables({revisionId:t,tableId:r,rowId:n}){return Mr(()=>e.rowForeignKeysByByVariables.get(la({revisionId:t,tableId:r,rowId:n}))).get()}})).actions(e=>({addOrganization(t){const r=e.organization.get(t.id);return r||e.organization.put(t)},addProject(t){const r=e.project.get(t.id);return r||e.project.put(t)},addProjectByVariables({organizationId:t,projectName:r},n){e.projectByVariables.set(la({organizationId:t,projectName:r}),n)},addOrUpdateBranch(t){const r=e.branch.get(t.id);return r?(r.touched=t.touched,r.start=t.start,r.head=t.head,r.draft=t.draft,r):e.branch.put(t)},addBranchByVariables({organizationId:t,projectName:r,branchName:n},i){e.branchByVariables.set(la({organizationId:t,projectName:r,branchName:n}),i)},addOrUpdateRevision(t){const r=e.revision.get(t.id);return r?(r.update(t),r):e.revision.put(t)},addEndpoint(t){const r=e.endpoint.get(t.id);return r||e.endpoint.put(t)},addOrTable(t){const r=e.table.get(t.versionId);return r?(r.readonly=t.readonly,r.count=t.count,r.createdAt=t.createdAt,r.schema=t.schema,r.id=t.id,r):e.table.put(t)},addTableByVariables({revisionId:t,tableId:r},n){e.tableByVariables.set(la({revisionId:t,tableId:r}),n)},addRow(t){const r=e.row.get(t.versionId);return r?(r.update(t),r):e.row.put(t)},addRowByVariables({revisionId:t,tableId:r,rowId:n},i){e.rowByVariables.set(la({revisionId:t,tableId:r,rowId:n}),i)},createRowForeignKeysByByVariables({revisionId:t,tableId:r,rowId:n}){const i=qS.create({id:Br(),countForeignKeysBy:0});return e.rowForeignKeysBy.put(i),e.rowForeignKeysByByVariables.set(la({revisionId:t,tableId:r,rowId:n}),i.id),i}})),Pz=e=>({id:e.id,createdAt:e.createdAt,type:e.type}),Gge=e=>{var t,r,n,i;return{id:e.id,createdAt:e.createdAt,comment:e.comment,parent:(t=e.parent)==null?void 0:t.id,isThereParent:!!((r=e.parent)!=null&&r.id),child:(n=e.child)==null?void 0:n.id,isThereChild:!!((i=e.child)!=null&&i.id),childBranches:e.childBranches.map(o=>({branchName:o.branch.name,revisionStartId:o.revision.id})),endpoints:e.endpoints.map(o=>o.id)}},wp=(e,t)=>(t.endpoints.map(r=>e.addEndpoint(Pz(r))),e.addOrUpdateRevision(Gge(t))),Qge=(e,t)=>({id:e.id,name:e.name,touched:e.touched,createdAt:e.createdAt,start:e.start.id,head:e.head.id,draft:e.draft.id,parentBranch:t}),bv=(e,t)=>{wp(e,t.start),wp(e,t.head),wp(e,{...t.draft,childBranches:[]});const r=t.parent,n=r?{branchName:r.branch.name,fromRevisionId:r.revision.id}:void 0,i=Qge(t,n);return e.addOrUpdateBranch(i)},Cz=e=>({id:e.id,organization:e.organizationId,name:e.name,createdAt:e.createdAt,isPublic:e.isPublic,rootBranch:e.rootBranch.id}),Ez=(e,t)=>(e.addOrganization({id:t.organizationId}),bv(e,t.rootBranch),e.addProject(Cz(t))),Tz=e=>({startCursor:e.endCursor||null,endCursor:e.endCursor||null,hasPreviousPage:e.hasPreviousPage,hasNextPage:e.hasNextPage}),Oz=e=>({totalCount:e.totalCount,pageInfo:Tz(e.pageInfo),edges:e.edges.map(({cursor:t,node:r})=>({cursor:t,node:r.id}))}),Ew=e=>({totalCount:e.totalCount,pageInfo:Tz(e.pageInfo),edges:e.edges.map(({cursor:t,node:r})=>({cursor:t,node:r.versionId}))}),Yge=We.get(Aa);function Xge(e){return function*(r){const n=yield Yge.client.meProjectsMst({data:r}),i=Oz(n.meProjects);n.meProjects.edges.forEach(({node:o})=>{e.cache.addProjectByVariables({organizationId:o.organizationId,projectName:o.name},o.id),Ez(e.cache,o)}),r.after||e.cache.meProjectsConnection.reset(),e.cache.meProjectsConnection.onLoad({edges:i.edges,hasNextPage:i.pageInfo.hasNextPage,totalCount:i.totalCount})}}const wv=me`
1004
- fragment EndpointMst on EndpointModel {
1005
- id
1006
- type
1007
- createdAt
1008
- }
1009
- `,Tw=me`
1010
- fragment RevisionMst on RevisionModel {
1011
- id
1012
- createdAt
1013
- comment
1014
- parent {
1015
- id
1016
- }
1017
- child {
1018
- id
1019
- }
1020
- childBranches {
1021
- branch {
1022
- id
1023
- name
1024
- }
1025
- revision {
1026
- id
1027
- }
1028
- }
1029
- endpoints {
1030
- ...EndpointMst
1031
- }
1032
- }
1033
- ${wv}
1034
- `,Jge=me`
1035
- fragment RevisionStartMst on RevisionModel {
1036
- id
1037
- createdAt
1038
- comment
1039
- child {
1040
- id
1041
- }
1042
- childBranches {
1043
- branch {
1044
- id
1045
- name
1046
- }
1047
- revision {
1048
- id
1049
- }
1050
- }
1051
- endpoints {
1052
- ...EndpointMst
1053
- }
1054
- }
1055
- ${wv}
1056
- `,Zge=me`
1057
- fragment RevisionDraftMst on RevisionModel {
1058
- id
1059
- createdAt
1060
- comment
1061
- parent {
1062
- id
1063
- }
1064
- endpoints {
1065
- ...EndpointMst
1066
- }
1067
- }
1068
- ${wv}
1069
- `,Bf=me`
1070
- fragment PageInfoMst on PageInfo {
1071
- startCursor
1072
- endCursor
1073
- hasPreviousPage
1074
- hasNextPage
1075
- }
1076
- `,eye=me`
1077
- fragment BranchRevisionMst on RevisionModel {
1078
- ...RevisionMst
1079
- endpoints {
1080
- ...EndpointMst
1081
- }
1082
- }
1083
- ${Tw}
1084
- ${wv}
1085
- `,tye=me`
1086
- query RevisionsMst($branch: GetBranchInput!, $revisions: GetBranchRevisionsInput!) {
1087
- branch(data: $branch) {
1088
- id
1089
- revisions(data: $revisions) {
1090
- totalCount
1091
- pageInfo {
1092
- ...PageInfoMst
1093
- }
1094
- edges {
1095
- cursor
1096
- node {
1097
- ...BranchRevisionMst
1098
- }
1099
- }
1100
- }
1101
- }
1102
- }
1103
- ${Bf}
1104
- ${eye}
1105
- `,rye=async e=>(await Kt.query({query:tye,variables:e})).data;class nye{constructor(t){this.store=t}async execute(t){(await rye(t)).branch.revisions.edges.forEach(({node:n})=>{wp(this.store.cache,n)})}}const Fa=me`
1106
- fragment TableMst on TableModel {
1107
- createdId
1108
- id
1109
- versionId
1110
- createdAt
1111
- updatedAt
1112
- readonly
1113
- count
1114
- schema
1115
- }
1116
- `,iye=me`
1117
- query TablesMst($data: GetTablesInput!) {
1118
- tables(data: $data) {
1119
- totalCount
1120
- pageInfo {
1121
- ...PageInfoMst
1122
- }
1123
- edges {
1124
- cursor
1125
- node {
1126
- ...TableMst
1127
- }
1128
- }
1129
- }
1130
- }
1131
- ${Bf}
1132
- ${Fa}
1133
- `,oye=async e=>(await Kt.query({query:iye,variables:e})).data;class aye{constructor(t){this.store=t}async execute(t){const r=await oye({data:{...t}}),n=Ew(r.tables);r.tables.edges.forEach(({node:o})=>{this.store.cache.addOrTable(o)});const i=this.store.cache.revision.get(t.revisionId);t.after||i==null||i.tablesConnection.reset(),i==null||i.tablesConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Rs=me`
1134
- fragment BranchMst on BranchModel {
1135
- id
1136
- createdAt
1137
- name
1138
- touched
1139
- projectId
1140
- parent {
1141
- branch {
1142
- id
1143
- name
1144
- }
1145
- revision {
1146
- id
1147
- }
1148
- }
1149
- start {
1150
- ...RevisionStartMst
1151
- }
1152
- head {
1153
- ...RevisionMst
1154
- }
1155
- draft {
1156
- ...RevisionDraftMst
1157
- }
1158
- }
1159
- ${Jge}
1160
- ${Tw}
1161
- ${Zge}
1162
- `,sye=me`
1163
- query BranchMst($data: GetBranchInput!) {
1164
- branch(data: $data) {
1165
- ...BranchMst
1166
- }
1167
- }
1168
- ${Rs}
1169
- `,lye=async e=>(await Kt.query({query:sye,variables:e})).data;function uye(e){return function*(r){const{branch:n}=yield lye({data:r});return e.cache.addBranchByVariables(r,n.id),bv(e.cache,n)}}const cye=me`
1170
- query BranchesMst($data: GetBranchesInput!) {
1171
- branches(data: $data) {
1172
- totalCount
1173
- pageInfo {
1174
- ...PageInfoMst
1175
- }
1176
- edges {
1177
- cursor
1178
- node {
1179
- ...BranchMst
1180
- }
1181
- }
1182
- }
1183
- }
1184
- ${Bf}
1185
- ${Rs}
1186
- `,dye=async e=>(await Kt.query({query:cye,variables:e})).data;function fye(e){return function*(r){const n=yield dye({data:r}),i=Oz(n.branches);n.branches.edges.forEach(({node:a})=>{e.cache.addBranchByVariables({organizationId:r.organizationId,projectName:r.projectName,branchName:a.name},a.id),bv(e.cache,a)});const o=e.cache.getProjectByVariables({organizationId:r.organizationId,projectName:r.projectName});r.after||o==null||o.branchesConnection.reset(),o==null||o.branchesConnection.onLoad({edges:i.edges,hasNextPage:i.pageInfo.hasNextPage,totalCount:i.totalCount})}}const Rz=me`
1187
- fragment ProjectMst on ProjectModel {
1188
- id
1189
- organizationId
1190
- createdAt
1191
- name
1192
- isPublic
1193
- rootBranch {
1194
- ...BranchMst
1195
- }
1196
- }
1197
- ${Rs}
1198
- `,hye=me`
1199
- query ProjectMst($data: GetProjectInput!) {
1200
- project(data: $data) {
1201
- ...ProjectMst
1202
- }
1203
- }
1204
- ${Rz}
1205
- `,pye=async e=>(await Kt.query({query:hye,variables:e})).data;function mye(e){return function*(r){const{project:n}=yield pye({data:r});return e.cache.addProjectByVariables(r,n.id),Ez(e.cache,n)}}const vye=me`
1206
- query RevisionMst($data: GetRevisionInput!) {
1207
- revision(data: $data) {
1208
- ...RevisionMst
1209
- branch {
1210
- id
1211
- }
1212
- }
1213
- }
1214
- ${Tw}
1215
- `,gye=async e=>(await Kt.query({query:vye,variables:e})).data;function yye(e){return function*(r){const{revision:n}=yield gye({data:r});return wp(e.cache,n)}}const bye=J.model({cache:J.reference(xz)}).actions(e=>({queryMeProjects:Oi(Xge(e)),queryProject:Oi(mye(e)),queryBranches:Oi(fye(e)),queryBranch:Oi(uye(e)),queryRevision:Oi(yye(e))})),wye=me`
1216
- query GetRowCountForeignKeysTo($data: GetRowCountForeignKeysByInput!) {
1217
- getRowCountForeignKeysTo(data: $data)
1218
- }
1219
- `,Sye=async e=>(await Kt.query({query:wye,variables:e,context:{}})).data;class _ye{constructor(t){this.store=t}async execute(t){const{getRowCountForeignKeysTo:r}=await Sye({data:t}),n={revisionId:t.revisionId,tableId:t.tableId,rowId:t.rowId},i=this.store.cache.getRowForeignKeysByVariables(n)||this.store.cache.createRowForeignKeysByByVariables(n);return i.update({countForeignKeysBy:r}),i}}const Vf=me`
1220
- fragment RowMst on RowModel {
1221
- createdId
1222
- id
1223
- versionId
1224
- createdAt
1225
- updatedAt
1226
- readonly
1227
- data
1228
- }
1229
- `,xye=me`
1230
- query RowMst($data: GetRowInput!) {
1231
- row(data: $data) {
1232
- ...RowMst
1233
- }
1234
- }
1235
- ${Vf}
1236
- `,Pye=async e=>(await Kt.query({query:xye,variables:e,context:{}})).data,hO=e=>({createdId:e.createdId,id:e.id,versionId:e.versionId,readonly:e.readonly,createdAt:e.createdAt,updatedAt:e.updatedAt,data:e.data});class Cye{constructor(t){this.store=t}async execute(t){const{row:r}=await Pye({data:t});if(r){const n={revisionId:t.revisionId,tableId:t.tableId,rowId:t.rowId},i=this.store.cache.addRow(hO(r));return this.store.cache.addRowByVariables(n,i.versionId),i}}}const Eye=me`
1237
- query RowForeignKeysBy($data: GetRowInput!, $foreignKeyData: GetRowForeignKeysInput!) {
1238
- row(data: $data) {
1239
- versionId
1240
- rowForeignKeysBy(data: $foreignKeyData) {
1241
- totalCount
1242
- pageInfo {
1243
- ...PageInfoMst
1244
- }
1245
- edges {
1246
- cursor
1247
- node {
1248
- ...RowMst
1249
- }
1250
- }
1251
- }
1252
- }
1253
- }
1254
- ${Bf}
1255
- ${Vf}
1256
- `,Tye=async e=>(await Kt.query({query:Eye,variables:e,context:{}})).data;class Oye{constructor(t){this.store=t}async execute(t){const r=await Tye(t);if(!r.row)throw new Error("Invalid row");const n=Ew(r.row.rowForeignKeysBy);r.row.rowForeignKeysBy.edges.forEach(({node:a})=>{const s=this.store.cache.addRow(a);this.store.cache.addRowByVariables({revisionId:t.data.revisionId,tableId:t.foreignKeyData.foreignKeyTableId,rowId:s.id},s.versionId)});const i=this.store.cache.getRowByVariables({revisionId:t.data.revisionId,tableId:t.data.tableId,rowId:t.data.rowId}),o=i==null?void 0:i.getOrCreateRowForeignKeysByConnection(t.foreignKeyData.foreignKeyTableId);t.foreignKeyData.after||o==null||o.reset(),o==null||o.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Rye=me`
1257
- query TableMst($data: GetTableInput!) {
1258
- table(data: $data) {
1259
- ...TableMst
1260
- }
1261
- }
1262
- ${Fa}
1263
- `,Iye=async e=>(await Kt.query({query:Rye,variables:e,context:{}})).data,zf=e=>({createdId:e.createdId,id:e.id,versionId:e.versionId,count:e.count,readonly:e.readonly,createdAt:e.createdAt,updatedAt:e.updatedAt,schema:e.schema});class kye{constructor(t){this.store=t}async execute(t){const{table:r}=await Iye(t);if(r){const n=this.store.cache.addOrTable(zf(r));return this.store.cache.addTableByVariables({revisionId:t.data.revisionId,tableId:t.data.tableId},n.versionId),n}}}const jye=me`
1264
- query TableForeignKeysBy($data: GetTableInput!, $foreignKeyData: GetTableForeignKeysInput!) {
1265
- table(data: $data) {
1266
- versionId
1267
- foreignKeysBy(data: $foreignKeyData) {
1268
- totalCount
1269
- pageInfo {
1270
- ...PageInfoMst
1271
- }
1272
- edges {
1273
- cursor
1274
- node {
1275
- ...TableMst
1276
- }
1277
- }
1278
- }
1279
- }
1280
- }
1281
- ${Bf}
1282
- ${Fa}
1283
- `,$ye=async e=>(await Kt.query({query:jye,variables:e,context:{}})).data;class Aye{constructor(t){this.store=t}async execute(t){const r=await $ye(t);if(!r.table)throw new Error("Invalid table");const n=Ew(r.table.foreignKeysBy);r.table.foreignKeysBy.edges.forEach(({node:o})=>{this.store.cache.addOrTable(o)});const i=this.store.cache.getTableByVariables(t.data);t.foreignKeyData.after||i==null||i.foreignKeysByConnection.reset(),i==null||i.foreignKeysByConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Dye=me`
1284
- query RowsMst($data: GetRowsInput!) {
1285
- rows(data: $data) {
1286
- totalCount
1287
- pageInfo {
1288
- ...PageInfoMst
1289
- }
1290
- edges {
1291
- cursor
1292
- node {
1293
- ...RowMst
1294
- }
1295
- }
1296
- }
1297
- }
1298
- ${Bf}
1299
- ${Vf}
1300
- `,Mye=async e=>(await Kt.query({query:Dye,variables:e})).data;class Nye{constructor(t){this.store=t}async execute(t){const r=await Mye({data:{...t}}),n=Ew(r.rows);r.rows.edges.forEach(({node:o})=>{const a=this.store.cache.addRow(o);this.store.cache.addRowByVariables({revisionId:t.revisionId,tableId:t.tableId,rowId:a.id},a.versionId)});const i=this.store.cache.getTableByVariables({revisionId:t.revisionId,tableId:t.tableId});t.after||i==null||i.rowsConnection.reset(),i==null||i.rowsConnection.onLoad({edges:n.edges,hasNextPage:n.pageInfo.hasNextPage,totalCount:n.totalCount})}}const Iz=J.model({organization:J.maybeNull(J.reference(J.late(()=>fO))),project:J.maybeNull(J.reference(J.late(()=>Cm))),branch:J.maybeNull(J.reference(J.late(()=>Em))),table:J.maybeNull(J.reference(J.late(()=>Tm))),row:J.maybeNull(J.reference(J.late(()=>Om))),revision:J.maybeNull(J.reference(J.late(()=>Mu))),cache:xz,backend:bye}).views(e=>({get organizationOrThrow(){if(!e.organization)throw new Error("Not found organization");return e.organization},get projectOrThrow(){if(!e.project)throw new Error("Not found project");return e.project},get branchOrThrow(){if(!e.branch)throw new Error("Not found branch");return e.branch},get revisionOrThrow(){if(!e.revision)throw new Error("Not found revision");return e.revision},get tableOrThrow(){if(!e.table)throw new Error("Not found table");return e.table},get rowOrThrow(){if(!e.row)throw new Error("Not found row");return e.row}})).actions(e=>({selectOrganization(t){e.organization=t},selectProject(t){e.project=t},selectBranch(t){e.branch=t},selectRevision(t){e.revision=t},selectTable(t){e.table=t},selectRow(t){e.row=t}})).actions(e=>{const t=e,r={queryRevisions:new nye(t),queryTable:new kye(t),queryTableForeignKeysBy:new Aye(t),queryTables:new aye(t),queryRow:new Cye(t),queryRowForeignKeysBy:new Oye(t),queryGetRowCountForeignKeysBy:new _ye(t),queryRows:new Nye(t)};return{queryRevisions:Oi(function*(n){return yield r.queryRevisions.execute(n)}),queryTable:Oi(function*(n){return yield r.queryTable.execute(n)}),queryTableForeignKeysBy:Oi(function*(n){return yield r.queryTableForeignKeysBy.execute(n)}),queryTables:Oi(function*(n){return yield r.queryTables.execute(n)}),queryRow:Oi(function*(n){return yield r.queryRow.execute(n)}),queryRowForeignKeysBy:Oi(function*(n){return yield r.queryRowForeignKeysBy.execute(n)}),queryGetRowCountForeignKeysBy:Oi(function*(n){return yield r.queryGetRowCountForeignKeysBy.execute(n)}),queryRows:Oi(function*(n){return yield r.queryRows.execute(n)})}});let ze=Iz.create({cache:{id:"1"},backend:{cache:"1"}});const Fye=()=>{ze=Iz.create({cache:{id:"1"},backend:{cache:"1"}})},Uf=async e=>Mz(()=>ze.cache.getBranchByVariables(pO(e))),kz=async e=>Mz(()=>ze.cache.getRevision(Az(e).revisionId)),jz=e=>{const{organizationId:t}=e;if(!t)throw new Error("Not found organizationId in route params");return{organizationId:t}},$z=e=>{const{projectName:t}=e;if(!t)throw new Error("Not found projectName in route params");return{...jz(e),projectName:t}},pO=e=>{const{branchName:t}=e;if(!t)throw new Error("Not found branchName in route params");return{...$z(e),branchName:t}},Az=e=>{const{revisionId:t}=e;if(!t)throw new Error("Not found revisionId in route params");return{revisionId:t}},Dz=(e,t)=>{const{tableId:r}=e;if(!r)throw new Error("Not found tableId in route params");return{revisionId:t,tableId:r}},mO=(e,t)=>{const{rowId:r}=e;if(!r)throw new Error("Not found rowId in route params");return{...Dz(e,t),rowId:r}},Lye=e=>new Promise(t=>{const r=Ia(e,n=>{n&&(r(),t(n))})}),Mz=async e=>{const t=e();return t||Lye(e)},uo=12,Bye=async({params:e})=>{const t=pO(e),r=ze.cache.getBranchByVariables(t)||await ze.backend.queryBranch(t);return r.start.getChildrenDetails(uo).isAllLoaded||await ze.queryRevisions({branch:t,revisions:{first:uo,after:r.start.id}}),r.head.getParentsDetails(uo).isAllLoaded||await ze.queryRevisions({branch:t,revisions:{first:uo,before:r.head.id}}),r},xg=async()=>{const e=We.get(zi),t=We.get(ec);return e.user?e.user.username?!0:uf(`/${RV}`):uf(t.availableSignUp?`/${gw}`:`/${hc}`)},Vye=async()=>We.get(zi).user?uf("/"):!0,zye=async()=>{const e=We.get(zi),t=We.get(ec);return e.user||!t.availableSignUp?uf("/"):!0},HS=(...e)=>async t=>{let r;for(const n of e)if(r=await n(t),r&&typeof r=="object"&&"status"in r&&r.status===302)return r;return r},Uye=async()=>(ze.cache.meProjectsConnection.countLoaded||await ze.backend.queryMeProjects({first:100}),!0),qye=async({params:e})=>{const{organizationId:t}=jz(e);return ze.cache.getOrganization(t)||ze.cache.addOrganization({id:t})},Hye=async({params:e})=>{const t=$z(e),r=ze.cache.getProjectByVariables(t)||await ze.backend.queryProject(t);return r.branchesConnection.countLoaded||await ze.backend.queryBranches({...t,first:100}),r},Wye=async({params:e})=>{const r=(await Uf(e)).draft;return r.tablesConnection.countLoaded===0&&await ze.queryTables({revisionId:r.id,first:50}),r},Kye=async({params:e})=>{const r=(await Uf(e)).head;return r.tablesConnection.countLoaded===0&&await ze.queryTables({revisionId:r.id,first:50}),r},Gye=async({params:e})=>{const t=Az(e),r=pO(e),n=ze.cache.getRevision(t.revisionId)||await ze.backend.queryRevision(t);return n.getChildrenDetails(uo).isAllLoaded||await ze.queryRevisions({branch:r,revisions:{first:uo,after:n.id}}),n.getParentsDetails(uo).isAllLoaded||await ze.queryRevisions({branch:r,revisions:{first:uo,before:n.id}}),n.tablesConnection.countLoaded===0&&await ze.queryTables({revisionId:n.id,first:50}),n},vO=async e=>{await ze.queryTableForeignKeysBy({data:{revisionId:e.revisionId,tableId:e.tableId},foreignKeyData:{first:100}});const t=ze.cache.getTableByVariables({revisionId:e.revisionId,tableId:e.tableId});for(const r of(t==null?void 0:t.foreignKeysByConnection.edges)||[])await ze.queryRowForeignKeysBy({data:e,foreignKeyData:{first:100,foreignKeyTableId:r.node.id}})};class Ow extends Error{}const Qye=async({params:e})=>{const r=(await Uf(e)).draft,n=mO(e,r.id),i=ze.cache.getRowByVariables(n)||await ze.queryRow(n);if(!i)throw new Ow(e.rowId);return await ze.queryGetRowCountForeignKeysBy(n),await vO(n),i},Yye=async({params:e})=>{const r=(await Uf(e)).head,n=mO(e,r.id),i=ze.cache.getRowByVariables(n)||await ze.queryRow(n);if(!i)throw new Ow(e.rowId);return ze.cache.getRowForeignKeysByVariables(n)||await ze.queryGetRowCountForeignKeysBy(n),await vO(n),i},Xye=async({params:e})=>{const t=await kz(e),r=mO(e,t.id),n=ze.cache.getRowByVariables(r)||await ze.queryRow(r);if(!n)throw new Ow(e.rowId);return ze.cache.getRowForeignKeysByVariables(r)||await ze.queryGetRowCountForeignKeysBy(r),await vO(r),n};class Nz extends Error{}const gO=async(e,t)=>{const r=Dz(e,t),n=ze.cache.getTableByVariables(r)||await ze.queryTable({data:r});if(!n)throw new Nz(e.tableId);return n.rowsConnection.countLoaded||await ze.queryRows({revisionId:t,tableId:n.id,first:50}),n},Jye=async({params:e})=>{const t=await Uf(e);return gO(e,t.draft.id)},Zye=async({params:e})=>{const t=await Uf(e);return gO(e,t.head.id)},e0e=async({params:e})=>{const t=await kz(e);return gO(e,t.id)};class t0e{constructor(t){this.projectPageModel=t,Le(this)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get currentBaseLink(){return MA(this.organization.id,this.project.name,this.branch.name,this.getCurrentOptions())}get parentForTableOrRow(){const t=this.currentBaseLink,r=this.projectPageModel.routeTableId,n=this.projectPageModel.routeRowId;if(r&&n)return ki(`${t}/${vp}`,{tableId:r});if(r)return ki(`${t}`)}getCurrentOptions(){return this.projectPageModel.isDraftRevision?{isDraft:!0}:this.projectPageModel.isHeadRevision?{isHead:!0}:{id:this.revision.id}}make(t){const r=t.tableId||this.projectPageModel.routeTableId,n=t.rowId||this.projectPageModel.routeRowId,i=MA(this.organization.id,this.project.name,this.branch.name,t);return r&&n?ki(`${i}/${vp}/${AV}`,{tableId:r,rowId:n}):r?ki(`${i}/${vp}`,{tableId:r}):i}init(){}dispose(){}}const MA=(e,t,r,n)=>n.isHead?ki(`/${yl}/${bl}/${wl}`,{organizationId:e,projectName:t,branchName:r}):n.isDraft?ki(`/${yl}/${bl}/${wl}/${yw}`,{organizationId:e,projectName:t,branchName:r}):ki(`/${yl}/${bl}/${wl}/${$V}`,{organizationId:e,projectName:t,branchName:r,revisionId:n.id}),r0e=()=>_o(hr.DraftRow)||null,n0e=()=>_o(hr.HeadRow)||null,i0e=()=>_o(hr.SpecificRow)||null,o0e=()=>{const e=r0e(),t=n0e(),r=i0e();return e||t||r},a0e=()=>_o(hr.Branch)||null,s0e=()=>{const e=_o(hr.Organization);if(!e)throw new Error("Not found organization from route loader");return e},l0e=()=>{const e=_o(hr.Project);if(!e)throw new Error("Not found project from route loader");return e},u0e=()=>_o(hr.DraftRevision)||null,c0e=()=>_o(hr.HeadRevision)||null,d0e=()=>_o(hr.SpecificRevision)||null,f0e=()=>{const e=u0e(),t=c0e(),r=d0e();return e||t||r},h0e=()=>_o(hr.DraftTable)||null,p0e=()=>_o(hr.HeadTable)||null,m0e=()=>_o(hr.SpecificTable)||null,v0e=()=>{const e=h0e(),t=p0e(),r=m0e();return e||t||r};class g0e{constructor(t,r,n,i,o,a,s,l,u){this.cache=t,this.revalidateLoaders=r,this.params=n,this.organization=i,this.project=o,this.branch=a,this.revision=s,this.table=l,this.row=u,Le(this)}get branchOrThrow(){if(!this.branch)throw new Error("Not found branch from route loader");return this.branch}get revisionOrThrow(){if(!this.revision)throw new Error("Not found revision from route loader");return this.revision}get tableOrThrow(){if(!this.table)throw new Error("Not found table from route loader");return this.table}get isStartRevision(){return this.branchOrThrow.start.id===this.revisionOrThrow.id}get isHeadRevision(){return this.branchOrThrow.head.id===this.revisionOrThrow.id}get isDraftRevision(){return this.branchOrThrow.draft.id===this.revisionOrThrow.id}get isStartAndHeadSameRevision(){return this.branchOrThrow.head.id===this.branchOrThrow.start.id}get isEditableRevision(){return this.isDraftRevision||!this.branchOrThrow.touched&&this.isHeadRevision}get rowOrThrow(){if(!this.row)throw new Error("Not found row from route loader");return this.row}get rowRefsBy(){if(this.revision&&this.table&&this.row)return this.cache.getRowForeignKeysByVariables({revisionId:this.revision.id,tableId:this.table.id,rowId:this.row.id})}get routeOrganizationId(){return this.params.organizationId}get routeProjectName(){return this.params.projectName}get routeBranchName(){return this.params.branchName}get routeRevisionId(){return this.params.revisionId}get routeTableId(){return this.params.tableId}get routeRowId(){return this.params.rowId}update(t){for(const[r,n]of Object.entries(t))this[r]!==n&&(this[r]=n)}init(){}dispose(){}}const $n=()=>{const e=Fce(),t=Rce(),r=s0e(),n=l0e(),i=a0e(),o=f0e(),a=v0e(),s=o0e(),[l]=S.useState(()=>new g0e(ze.cache,e.revalidate,t,r,n,i,o,a,s));return S.useEffect(()=>(l.init(),()=>l.dispose()),[l]),S.useEffect(()=>{l.update({params:t,organization:r,project:n,branch:i,revision:o,table:a,row:s})},[l,t,r,n,i,o,a,s]),l},gc=()=>{const e=$n(),[t]=S.useState(()=>new t0e(e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};class y0e{constructor(t,r,n){le(this,"disposer",null);this.navigateFunction=t,this.linkMaker=r,this.projectPageModel=n,Le(this)}toDraftRoute(){var t;(t=this.navigateFunction)==null||t.call(this,this.linkMaker.make({isDraft:!0}))}toHeadRoute(){var t;(t=this.navigateFunction)==null||t.call(this,this.linkMaker.make({isHead:!0}))}init(){this.listenToBranch()}dispose(){var t;(t=this.disposer)==null||t.call(this),this.disposer=null}listenToBranch(){this.disposer=Ia(()=>({branch:this.branch,touched:this.branch.touched}),(t,r)=>{t.branch&&r.branch&&t.branch.id===r.branch.id&&(t.branch.touched?this.toDraftRoute():this.toHeadRoute())})}get branch(){return this.projectPageModel.branchOrThrow}}const b0e=()=>{const e=gc(),t=ql(),r=$n(),[n]=S.useState(()=>new y0e(t,e,r));return S.useEffect(()=>(n.init(),()=>n.dispose()),[n]),n},w0e=({onClick:e})=>{const[t,r]=S.useState(""),{onOpen:n,onClose:i,isOpen:o}=f5(),[a,s]=S.useState(!1),l=S.useCallback(async()=>{s(!0),await(e==null?void 0:e(t)),s(!1)},[t,e]),u=S.useCallback(c=>{r(c.currentTarget.value)},[]);return y.jsxs(dT,{isOpen:o,onOpen:n,onClose:i,children:[y.jsx(cT,{children:y.jsx(Li,{"data-testid":"create-revision-button",_hover:{backgroundColor:"gray.50"},isLoading:a,"aria-label":"",icon:y.jsx(DV,{boxSize:3}),variant:"ghost",color:"gray.300"})}),y.jsx(hT,{children:y.jsx(fT,{p:"1rem",children:y.jsxs(de,{flexDirection:"column",alignItems:"end",justifyContent:"flex-start",gap:"0.5rem",children:[y.jsx(B5,{_placeholder:{color:"gray.300"},placeholder:"Comment (optional)",onChange:u}),y.jsx("div",{children:y.jsx(rs,{onClick:l,title:"Commit"})})]})})})]})},S0e=({onClick:e})=>{const[t,r]=S.useState(!1),n=S.useCallback(async()=>{r(!0),await(e==null?void 0:e()),r(!1)},[e]);return y.jsx(Li,{"data-testid":"revert-revision-button",_hover:{backgroundColor:"gray.50"},isLoading:t,"aria-label":"",icon:y.jsx(FV,{size:"16"}),variant:"ghost",onClick:n,color:"gray.300"})},_0e=me`
1301
- mutation CreateBranchByRevisionIdMst($data: CreateBranchByRevisionIdInput!) {
1302
- createBranchByRevisionId(data: $data) {
1303
- ...BranchMst
1304
- }
1305
- }
1306
- ${Rs}
1307
- `,x0e=async e=>{const t=await Kt.mutate({mutation:_0e,variables:e});if(!t.data)throw t.errors;return t.data};class P0e{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.branchName=n}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.createBranchByRevisionIdRequest();return await Promise.all([this.refetchBranchesConnection(),this.refetchRevision()]),t}async createBranchByRevisionIdRequest(){const t=await x0e({data:{revisionId:this.revision.id,branchName:this.branchName}});return bv(this.rootStore.cache,t.createBranchByRevisionId)}async refetchBranchesConnection(){await ze.backend.queryBranches({organizationId:this.organization.id,projectName:this.project.name,first:100})}async refetchRevision(){await ze.backend.queryRevision({revisionId:this.revision.id})}}const C0e=me`
1308
- mutation CreateRevisionMst($data: CreateRevisionInput!) {
1309
- createRevision(data: $data) {
1310
- ...RevisionMst
1311
- branch {
1312
- ...BranchMst
1313
- }
1314
- }
1315
- }
1316
- ${Tw}
1317
- ${Rs}
1318
- `,E0e=async e=>{const t=await Kt.mutate({mutation:C0e,variables:e});if(!t.data)throw t.errors;return t.data};class T0e{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.comment=n}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const t=await this.createRevisionRequest();this.lockTablesAndRowsInRevision();const r=bv(this.rootStore.cache,t);return r.head.parent&&await this.queryPreviousHead(r.head.parent),!0}async createRevisionRequest(){return(await E0e({data:{organizationId:this.organization.id,projectName:this.project.name,branchName:this.branch.name,comment:this.comment}})).createRevision.branch}lockTablesAndRowsInRevision(){this.branch.draft.tablesConnection.edges.forEach(({node:r})=>{r.update({readonly:!0}),r.rowsConnection.edges.forEach(({node:n})=>{n.update({readonly:!0})})})}queryPreviousHead(t){return this.rootStore.backend.queryRevision({revisionId:t.id})}}const O0e=me`
1319
- mutation RevertChangesMst($data: RevertChangesInput!) {
1320
- revertChanges(data: $data) {
1321
- ...BranchMst
1322
- }
1323
- }
1324
- ${Rs}
1325
- `,R0e=async e=>{const t=await Kt.mutate({mutation:O0e,variables:e});if(!t.data)throw t.errors;return t.data};class I0e{constructor(t){this.projectPageModel=t}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}async execute(){return await this.revertChangesRequest(),this.resetTablesConnection(),this.branch.updateTouched(!1),!0}revertChangesRequest(){return R0e({data:{organizationId:this.organization.id,projectName:this.project.name,branchName:this.branch.name}})}resetTablesConnection(){this.branch.draft.tablesConnection.reset()}}class k0e{constructor(t,r){this.rootStore=t,this.projectPageModel=r,Le(this,{},{autoBind:!0})}get showCreateBranchCard(){if(this.revision){const t=this.branch.start.id!==this.branch.head.id,r=this.branch.touched;return(t||r)&&this.revision.id!==this.branch.draft.id}}get showActions(){if(this.revision)return this.branch.touched&&this.revision.id===this.branch.draft.id}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revision}init(){}dispose(){}async createBranchByRevisionId(t){if(!this.revision)throw new Error("Not found revision");try{await new P0e(this.rootStore,this.projectPageModel,t).execute()}catch(r){console.error(r)}}async revertChanges(){try{await new I0e(this.projectPageModel).execute()}catch(t){console.log(t)}}async createRevision(t){try{await new T0e(this.rootStore,this.projectPageModel,t).execute()}catch(r){console.error(r)}}}const j0e=()=>{const e=$n(),[t]=S.useState(()=>new k0e(ze,e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};function $0e(){var e=S.useRef(!0);return e.current?(e.current=!1,!0):e.current}var A0e=function(e,t){var r=$0e();S.useEffect(function(){if(!r)return e()},t)},NA=function(){},D0e=typeof window<"u",M0e=function(e,t){return typeof t=="boolean"?t:!e},Fz=function(e){return S.useReducer(M0e,e)},Lz=function(e){S.useEffect(e,[])},N0e=function(e,t,r){if(!D0e)return[t,NA,NA];var n=JSON.parse,i=S.useRef(function(c){try{var d=r?r.raw?String:r.serializer:JSON.stringify,f=localStorage.getItem(c);return f!==null?n(f):(t&&localStorage.setItem(c,d(t)),t)}catch{return t}}),o=S.useState(function(){return i.current(e)}),a=o[0],s=o[1];S.useLayoutEffect(function(){return s(i.current(e))},[e]);var l=S.useCallback(function(c){try{var d=typeof c=="function"?c(a):c;if(typeof d>"u")return;var f=void 0;r||(f=JSON.stringify(d)),localStorage.setItem(e,f),s(n(f))}catch{}},[e,s]),u=S.useCallback(function(){try{localStorage.removeItem(e),s(void 0)}catch{}},[e,s]);return[a,l,u]};const F0e=({onCancel:e,onAdd:t})=>{const[r,n]=S.useState(!1),i=UV(),[o,a]=S.useState(""),s=S.useCallback(async()=>{n(!0),await(t==null?void 0:t(o)),n(!1)},[o,t]),l=S.useCallback(u=>{a(u.currentTarget.value)},[]);return y.jsxs(de,{alignSelf:"flex-start",gap:"0.5rem",children:[y.jsx(Wb,{"data-testid":"create-branch-name-input",borderColor:"gray.100",borderStyle:"solid",borderWidth:"1px",padding:"0 0.5rem",placeholder:"branch-name",ref:i,variant:"unstyled",onChange:l,onKeyDown:u=>{u.key==="Enter"&&s()}}),y.jsx(ww,{dataTestId:"create-branch-close-button",onClick:e}),y.jsx(vv,{dataTestId:"create-branch-approve-button",isDisabled:!o,loading:r,onClick:s})]})},L0e=({onCreate:e})=>{const[t,r]=Fz(!1),n=S.useCallback(async i=>{await e(i),r()},[e,r]);return t?y.jsx(F0e,{onAdd:n,onCancel:r}):y.jsx(Nf,{dataTestId:"create-branch-button",title:"Branch",onClick:r})},B0e=Ze(()=>{const e=j0e();return y.jsxs(de,{gap:"0.5rem",alignItems:"center",children:[e.showActions&&y.jsxs(y.Fragment,{children:[y.jsx(w0e,{onClick:e.createRevision}),y.jsx(S0e,{onClick:e.revertChanges})]}),e.showCreateBranchCard&&y.jsx(L0e,{onCreate:e.createBranchByRevisionId})]})});class V0e{constructor(t,r){this.projectPageModel=t,this.linkMaker=r,Le(this,{},{autoBind:!0})}get breadcrumbs(){const t=[];t.push({title:this.branch.name,href:this.linkMaker.currentBaseLink,isCurrentPage:!1,dataTestId:`breadcrumb-branch-${this.branch.name}`});const r=this.projectPageModel.routeTableId;r&&t.push({title:r,href:ki(`${this.linkMaker.currentBaseLink}/${vp}`,{tableId:r}),isCurrentPage:!1,dataTestId:`breadcrumb-table-${r}`});const n=this.projectPageModel.routeRowId;n&&t.push({title:n,href:"",isCurrentPage:!1,dataTestId:`breadcrumb-row-${n}`});const i=t.slice().pop();return i&&(i.isCurrentPage=!0),t}get branchName(){return this.branch.name}get title(){return this.isDraftRevision||this.isHeadRevision?"":`[${this.revision.id.slice(0,6)}]`}get isDraftRevision(){return this.projectPageModel.isDraftRevision}get isHeadRevision(){return this.projectPageModel.isHeadRevision}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){}dispose(){}}const z0e=()=>{const e=$n(),t=gc(),[r]=S.useState(()=>new V0e(e,t));return S.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},U0e="_Root_t8kot_1",q0e="_Action_t8kot_1",H0e={Root:U0e,Action:q0e},W0e=Ze(()=>{const e=z0e();return y.jsxs(de,{alignItems:"center",gap:"4px",flex:1,height:"40px",className:H0e.Root,children:[y.jsx(e5,{spacing:"8px",separator:"/",color:"gray",fontWeight:"600",fontSize:"16px",children:e.breadcrumbs.map(t=>y.jsx(ZL,{isCurrentPage:t.isCurrentPage,children:y.jsx(GE,{"data-testid":t.dataTestId,to:t.href,as:t.isCurrentPage?void 0:wo,children:t.title})},t.href))}),e.title&&y.jsxs(Ye,{color:"gray",opacity:"0.3",fontWeight:"400",fontSize:"16px",children:["- ",e.title]})]})});var bs=(e=>(e.GRAPHQL="GRAPHQL",e.REST_API="REST_API",e))(bs||{});class K0e{constructor(t){this.projectPageModel=t,Le(this,{},{autoBind:!0})}get branchTitle(){const r=`Branch: ${this.projectPageModel.branchOrThrow.name}`;return this.projectPageModel.isHeadRevision?`${r}[head]`:this.projectPageModel.isDraftRevision?`${r}[draft]`:`${r}[${this.projectPageModel.revisionOrThrow.id.substring(0,6)}]`}get isThereEndpoint(){return!!this.projectPageModel.revisionOrThrow.endpoints.length}init(){}dispose(){}}const G0e=()=>{const e=$n(),[t]=S.useState(()=>new K0e(e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t};function Q0e(e){return Er({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12,0C5.372,0 0,5.373 0,12 0,18.628 5.372,24 12,24 18.627,24 24,18.628 24,12A12.014,12.014 0 0 0 23.527,8.657 0.6,0.6 0 0 0 22.4,9.066H22.398C22.663,10.009 22.8,10.994 22.8,12A10.73,10.73 0 0 1 19.637,19.637 10.729,10.729 0 0 1 12,22.8 10.73,10.73 0 0 1 4.363,19.637 10.728,10.728 0 0 1 1.2,12 10.73,10.73 0 0 1 4.363,4.363 10.728,10.728 0 0 1 12,1.2C14.576,1.2 17.013,2.096 18.958,3.74A1.466,1.466 0 1 0 19.82,2.9 11.953,11.953 0 0 0 12,0ZM10.56,5.88 6.36,16.782H8.99L9.677,14.934H13.646L12.927,12.892H10.314L12.014,8.201 15.038,16.781H17.669L13.47,5.88Z"},child:[]}]})(e)}function Y0e(e){return Er({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"},child:[]}]})(e)}const X0e={[bs.GRAPHQL]:"GraphQL",[bs.REST_API]:"Swagger"},Bz=e=>X0e[e],J0e=me`
1326
- mutation CreateEndpointMst($data: CreateEndpointInput!) {
1327
- createEndpoint(data: $data) {
1328
- ...EndpointMst
1329
- }
1330
- }
1331
- ${wv}
1332
- `,Z0e=async e=>{const t=await Kt.mutate({mutation:J0e,variables:e});if(!t.data)throw t.errors;return t.data};class ebe{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.endpointType=n}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.createEndpointRequest();return this.updateRevision(t),t}async createEndpointRequest(){const t=await Z0e({data:{revisionId:this.revision.id,type:this.endpointType}});return this.addEndpointToCache(t.createEndpoint)}addEndpointToCache(t){return this.rootStore.cache.addEndpoint(Pz(t))}updateRevision(t){this.revision.addEndpoint(t)}}const tbe=me`
1333
- mutation DeleteEndpointMst($data: DeleteEndpointInput!) {
1334
- deleteEndpoint(data: $data)
1335
- }
1336
- `,rbe=async e=>{const t=await Kt.mutate({mutation:tbe,variables:e});if(!t.data)throw t.errors;return t.data};class nbe{constructor(t,r){this.projectPageModel=t,this.endpointId=r}get revision(){return this.projectPageModel.revisionOrThrow}async execute(){const t=await this.deleteEndpointRequest();return this.updateRevision(),t}async deleteEndpointRequest(){return(await rbe({data:{endpointId:this.endpointId}})).deleteEndpoint}updateRevision(){this.revision.removeEndpoint(this.endpointId)}}const ibe=Hg("REACT_APP_ENDPOINT_SERVER_URL"),obe={[bs.GRAPHQL]:"graphql",[bs.REST_API]:"swagger"};class abe{constructor(t,r){this.projectPageModel=t,this.endpointType=r,Le(this,{},{autoBind:!0})}get href(){if(!this.endpoint)return;const t=`${this.baseUrl}/${this.organization.id}/${this.project.name}/${this.branch.name}`;return this.projectPageModel.isDraftRevision?`${t}/draft`:this.projectPageModel.isHeadRevision?`${t}/head`:`${t}/${this.revision.id}`}async switch(){try{return this.endpoint?await new nbe(this.projectPageModel,this.endpoint.id).execute():new ebe(ze,this.projectPageModel,this.endpointType).execute()}catch(t){console.log(t)}}init(){}dispose(){}get endpoint(){return this.revision.endpoints.find(t=>t.type===this.endpointType)}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}get baseUrl(){return`${ibe}/${obe[this.endpointType]}`}}const sbe=e=>{const t=$n(),[r]=S.useState(()=>new abe(t,e));return S.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},lbe={[bs.GRAPHQL]:y.jsx(Q0e,{size:20}),[bs.REST_API]:y.jsx(Y0e,{size:20})},FA=Ze(({type:e})=>{const t=sbe(e);return y.jsxs(de,{alignItems:"center",gap:"0.5rem",minWidth:"90px",height:"25px",children:[y.jsx(Je,{color:t.href?"gray.400":"gray.300",children:lbe[e]}),y.jsx(Ye,{width:"140px",color:"gray.400",children:Bz(e)}),y.jsxs(de,{width:"120px",gap:"0.5rem",alignItems:"center",children:[y.jsx(L5,{"data-testid":`endpoint-switch-${e}`,colorScheme:"gray",isChecked:!!t.href,onChange:t.switch}),t.href&&y.jsx(Of,{isExternal:!0,href:t.href,children:y.jsx(vo,{"data-testid":`endpoint-button-${e}`,size:"sm","aria-label":"removeRow",color:"gray.500",isDisabled:!t.href,variant:"ghost",padding:0,minWidth:"20px",minHeight:"20px",height:"20px",paddingBottom:"3px",children:y.jsx(ome,{size:"20px"})})})]})]})}),ube="_Root_t8kot_1",cbe="_Action_t8kot_1",Vz={Root:ube,Action:cbe},dbe=Ze(()=>{const{onOpen:e,onClose:t,isOpen:r}=f5(),n=G0e();return y.jsxs(dT,{trigger:"click",isOpen:r,onOpen:e,onClose:t,children:[y.jsx(cT,{children:y.jsx(Li,{"data-testid":"revision-endpoint-button",className:r?void 0:Vz.Action,"aria-label":"",icon:n.isThereEndpoint?y.jsx(nme,{size:"24"}):y.jsx(ime,{size:"24"}),opacity:.5,_hover:{opacity:1},variant:"ghost"})}),y.jsxs(hT,{maxWidth:"240px",children:[y.jsx(M5,{}),y.jsx(fT,{children:y.jsxs(de,{flexDirection:"column",gap:"1rem",children:[y.jsx(FA,{type:bs.GRAPHQL}),y.jsx(FA,{type:bs.REST_API})]})}),y.jsx(F5,{justifyContent:"center",children:y.jsx(Ye,{color:"gray.400",opacity:"0.7",fontSize:"xs",as:"samp",children:n.branchTitle})})]})]})});var nn=(e=>(e.Revision="Revision",e.Parent="Parent",e.Draft="Draft",e.Start="Start",e.Head="Head",e.Child="Child",e.PreviousPage="PreviousPage",e.NextPage="NextPage",e))(nn||{});const FP=["PreviousPage","NextPage"];class fbe{constructor(t){this.projectPageModel=t,Le(this)}async queryNextPage(t){t.getChildrenDetails(uo).isAllLoaded||await ze.queryRevisions({branch:this.branchVariables,revisions:{first:uo,after:t.id}})}async queryPreviousPage(t){t.getParentsDetails(uo).isAllLoaded||await ze.queryRevisions({branch:this.branchVariables,revisions:{first:uo,before:t.id}})}get branchVariables(){return{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.projectPageModel.branchOrThrow.name}}}var Js=(e=>(e.None="None",e.Left="Left",e.Right="Right",e))(Js||{});class hbe{constructor(t,r,n,i,o){le(this,"disposers",[]);this.cache=t,this.projectPageModel=r,this.revisionsCardItemsModel=n,this.middleRevisions=i,this.revisionsPageQueries=o,Le(this,{},{autoBind:!0}),this.updateWithDesiredCurrentRevision()}get items(){return this.revisionsCardItemsModel.items}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){this.middleRevisions.resetDefaultMaxItems(),this.disposers.push(Ia(()=>this.projectPageModel.branch,this.onSelectBranch)),this.disposers.push(Ia(()=>{var t;return(t=this.projectPageModel.branch)==null?void 0:t.head},this.onCreatedNewRevision)),this.disposers.push(Ia(()=>this.projectPageModel.revision,this.onSelectRevision))}dispose(){for(const t of this.disposers)t();this.disposers=[]}async previousPage(t){var n;const r=(n=this.cache.revision.get(t))==null?void 0:n.child;if(!r)throw new Error(`Not found revision ${t}`);await this.revisionsPageQueries.queryPreviousPage(r),this.middleRevisions.select({desiredRevision:r,priority:Js.Left})}async nextPage(t){var n;const r=(n=this.cache.revision.get(t))==null?void 0:n.parent;if(!r)throw new Error(`Not found revision ${t}`);await this.revisionsPageQueries.queryNextPage(r),this.middleRevisions.select({desiredRevision:r,priority:Js.Right})}updateWithDesiredCurrentRevision(){this.middleRevisions.select({desiredRevision:this.revision,priority:Js.None})}onSelectBranch(){this.dispose(),this.init(),this.updateWithDesiredCurrentRevision()}onCreatedNewRevision(){this.middleRevisions.increaseMaxItemsForNewRevision(),this.middleRevisions.select({desiredRevision:this.branch.head,priority:Js.None})}onSelectRevision(t){(t===this.branch.start||t===this.branch.head||t===this.branch.draft)&&this.middleRevisions.select({desiredRevision:t,priority:Js.None})}}class pbe{constructor(t){this.projectPageModel=t}get branch(){return this.projectPageModel.branchOrThrow}find({targetRevision:t,priority:r,maxItems:n}){const i=[],{rawRightPartRevisions:o,rawLeftPartRevisions:a}=this.getParts({targetRevision:t,priority:r,maxItems:n});return i.push(...a),i.push(t),i.push(...o),i}getParts({targetRevision:t,priority:r,maxItems:n}){const i=this.getLeftPartRevisions({targetRevision:t,maxLength:n+1}),o=this.getRightPartRevisions({targetRevision:t,maxLength:n+1}),a=[],s=[],l=i.slice(),u=o.slice().reverse();let c=0;for(;c<n;){const d=r===Js.Right&&u.length&&a.length>0?void 0:l.pop();if(d&&(a.unshift(d),c+=1),c>=n)break;const f=r===Js.Left&&l.length&&s.length>0?void 0:u.pop();if(f&&(s.push(f),c+=1),!l.length&&!u.length)break}return{rawLeftPartRevisions:a,rawRightPartRevisions:s}}getLeftPartRevisions({targetRevision:t,maxLength:r}){const n=[];if(t!==this.branch.start&&t.parent!==this.branch.start){let i=t.parent;for(;i&&(i!==this.branch.head&&n.push(i),i=i.parent,!(this.branch.start===i||n.length>=r)););}return n.reverse()}getRightPartRevisions({targetRevision:t,maxLength:r}){const n=[];if(t!==this.branch.head&&t!==this.branch.draft&&t.child!==this.branch.head){let i=t.child;for(;i&&(n.push(i),i=i.child,!(this.branch.head===i||n.length>=r)););}return n}}const mbe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vbe=(e,t,r)=>{let n;const i=mbe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function WS(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const gbe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ybe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bbe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wbe={date:WS({formats:gbe,defaultWidth:"full"}),time:WS({formats:ybe,defaultWidth:"full"}),dateTime:WS({formats:bbe,defaultWidth:"full"})},Sbe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_be=(e,t,r,n)=>Sbe[e];function xh(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const xbe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pbe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cbe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ebe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Tbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Obe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Rbe=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ibe={ordinalNumber:Rbe,era:xh({values:xbe,defaultWidth:"wide"}),quarter:xh({values:Pbe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:xh({values:Cbe,defaultWidth:"wide"}),day:xh({values:Ebe,defaultWidth:"wide"}),dayPeriod:xh({values:Tbe,defaultWidth:"wide",formattingValues:Obe,defaultFormattingWidth:"wide"})};function Ph(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?jbe(s,d=>d.test(a)):kbe(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function kbe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function jbe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function $be(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Abe=/^(\d+)(th|st|nd|rd)?/i,Dbe=/\d+/i,Mbe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Nbe={any:[/^b/i,/^(a|c)/i]},Fbe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Lbe={any:[/1/i,/2/i,/3/i,/4/i]},Bbe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Vbe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zbe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ube={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},qbe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Hbe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Wbe={ordinalNumber:$be({matchPattern:Abe,parsePattern:Dbe,valueCallback:e=>parseInt(e,10)}),era:Ph({matchPatterns:Mbe,defaultMatchWidth:"wide",parsePatterns:Nbe,defaultParseWidth:"any"}),quarter:Ph({matchPatterns:Fbe,defaultMatchWidth:"wide",parsePatterns:Lbe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ph({matchPatterns:Bbe,defaultMatchWidth:"wide",parsePatterns:Vbe,defaultParseWidth:"any"}),day:Ph({matchPatterns:zbe,defaultMatchWidth:"wide",parsePatterns:Ube,defaultParseWidth:"any"}),dayPeriod:Ph({matchPatterns:qbe,defaultMatchWidth:"any",parsePatterns:Hbe,defaultParseWidth:"any"})},Kbe={code:"en-US",formatDistance:vbe,formatLong:wbe,formatRelative:_be,localize:Ibe,match:Wbe,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Gbe={};function Rw(){return Gbe}const zz=6048e5,Qbe=864e5;function ea(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function LA(e){const t=ea(e);return t.setHours(0,0,0,0),t}function BA(e){const t=ea(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Ybe(e,t){const r=LA(e),n=LA(t),i=+r-BA(r),o=+n-BA(n);return Math.round((i-o)/Qbe)}function tc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Xbe(e){const t=ea(e),r=tc(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Jbe(e){const t=ea(e);return Ybe(t,Xbe(t))+1}function Rm(e,t){var s,l,u,c;const r=Rw(),n=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=ea(e),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function M0(e){return Rm(e,{weekStartsOn:1})}function Uz(e){const t=ea(e),r=t.getFullYear(),n=tc(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const i=M0(n),o=tc(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=M0(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function Zbe(e){const t=Uz(e),r=tc(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),M0(r)}function ewe(e){const t=ea(e),r=+M0(t)-+Zbe(t);return Math.round(r/zz)+1}function qz(e,t){var c,d,f,h;const r=ea(e),n=r.getFullYear(),i=Rw(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=tc(e,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);const s=Rm(a,t),l=tc(e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const u=Rm(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function twe(e,t){var s,l,u,c;const r=Rw(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=qz(e,t),o=tc(e,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),Rm(o,t)}function rwe(e,t){const r=ea(e),n=+Rm(r,t)-+twe(r,t);return Math.round(n/zz)+1}function Gt(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Ds={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Gt(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Gt(r+1,2)},d(e,t){return Gt(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Gt(e.getHours()%12||12,t.length)},H(e,t){return Gt(e.getHours(),t.length)},m(e,t){return Gt(e.getMinutes(),t.length)},s(e,t){return Gt(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return Gt(i,t.length)}},Dc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},VA={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Ds.y(e,t)},Y:function(e,t,r,n){const i=qz(e,n),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Gt(a,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):Gt(o,t.length)},R:function(e,t){const r=Uz(e);return Gt(r,t.length)},u:function(e,t){const r=e.getFullYear();return Gt(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Gt(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Gt(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Ds.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Gt(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=rwe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):Gt(i,t.length)},I:function(e,t,r){const n=ewe(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Gt(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ds.d(e,t)},D:function(e,t,r){const n=Jbe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Gt(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Gt(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Gt(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return Gt(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Dc.noon:n===0?i=Dc.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Dc.evening:n>=12?i=Dc.afternoon:n>=4?i=Dc.morning:i=Dc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Ds.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ds.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Gt(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Gt(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ds.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ds.s(e,t)},S:function(e,t){return Ds.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return UA(n);case"XXXX":case"XX":return cu(n);case"XXXXX":case"XXX":default:return cu(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return UA(n);case"xxxx":case"xx":return cu(n);case"xxxxx":case"xxx":default:return cu(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+zA(n,":");case"OOOO":default:return"GMT"+cu(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+zA(n,":");case"zzzz":default:return"GMT"+cu(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Gt(n,t.length)},T:function(e,t,r){const n=e.getTime();return Gt(n,t.length)}};function zA(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+Gt(o,2)}function UA(e,t){return e%60===0?(e>0?"-":"+")+Gt(Math.abs(e)/60,2):cu(e,t)}function cu(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Gt(Math.trunc(n/60),2),o=Gt(n%60,2);return r+i+t+o}const qA=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Hz=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},nwe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return qA(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",qA(n,t)).replace("{{time}}",Hz(i,t))},iwe={p:Hz,P:nwe},owe=/^D+$/,awe=/^Y+$/,swe=["D","DD","YY","YYYY"];function lwe(e){return owe.test(e)}function uwe(e){return awe.test(e)}function cwe(e,t,r){const n=dwe(e,t,r);if(console.warn(n),swe.includes(e))throw new RangeError(n)}function dwe(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function fwe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function hwe(e){if(!fwe(e)&&typeof e!="number")return!1;const t=ea(e);return!isNaN(Number(t))}const pwe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mwe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vwe=/^'([^]*?)'?$/,gwe=/''/g,ywe=/[a-zA-Z]/;function bwe(e,t,r){var c,d,f,h;const n=Rw(),i=n.locale??Kbe,o=n.firstWeekContainsDate??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,a=n.weekStartsOn??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=ea(e);if(!hwe(s))throw new RangeError("Invalid time value");let l=t.match(mwe).map(m=>{const v=m[0];if(v==="p"||v==="P"){const w=iwe[v];return w(m,i.formatLong)}return m}).join("").match(pwe).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const v=m[0];if(v==="'")return{isToken:!1,value:wwe(m)};if(VA[v])return{isToken:!0,value:m};if(v.match(ywe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(m=>{if(!m.isToken)return m.value;const v=m.value;(uwe(v)||lwe(v))&&cwe(v,t,String(e));const w=VA[v[0]];return w(s,v,i.localize,u)}).join("")}function wwe(e){const t=e.match(vwe);return t?t[1].replace(gwe,"'"):e}class Swe{constructor(t,r){le(this,"index",0);this.projectPageModel=t,this.childBranch=r,Le(this)}get id(){return this.childBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return nn.Child}get dataTestId(){return`revision-child-branch-${this.childBranch.branchName}`}get link(){return ki(`/${yl}/${bl}/${wl}/-/${this.childBranch.revisionStartId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.childBranch.branchName})}get tooltip(){return[`Branch: ${this.childBranch.branchName}`]}get hidden(){return!1}}class Mc{constructor(t,r,n){le(this,"index",0);this.projectPageModel=t,this.linkMaker=r,this.revision=n,Le(this)}get id(){return this.revision.id}get isThereEndpoint(){return!!this.revision.endpoints.length}get children(){return this.revision.childBranches.map(t=>new Swe(this.projectPageModel,t))}get disabled(){return this.revision.id===this.projectPageModel.revisionOrThrow.id}get icon(){return this.checkIsHeadRevision()?nn.Head:this.checkIsStartRevision()?nn.Start:this.checkIsDraftRevision()?nn.Draft:nn.Revision}get dataTestId(){return this.checkIsHeadRevision()?"revision-head":this.checkIsStartRevision()?"revision-start":this.checkIsDraftRevision()?"revision-draft":`revision_index_${this.index}`}get link(){return this.linkMaker.make(this.revisionLinkOption)}get tooltip(){if(this.checkIsDraftRevision())return["Draft revision"];const t=this.revision.comment?[this.revision.comment]:[],r=bwe(new Date(this.revision.createdAt),"dd MMM yyyy, HH:mm:ss"),n=[...t,this.revision.id,r],i=this.revision.endpoints.map(o=>`${Bz(o.type)}`);return i.length&&(n.push("".padEnd(25,"-")),n.push("Active endpoints:"),n.push(i.join(", "))),this.checkIsHeadRevision()&&n.unshift("Head revision:"),this.checkIsStartRevision()&&n.unshift("Init revision:"),n}get hidden(){return!1}get revisionLinkOption(){return this.checkIsHeadRevision()?{isHead:!0}:this.checkIsDraftRevision()?{isDraft:!0}:{id:this.revision.id}}checkIsStartRevision(){return this.projectPageModel.branchOrThrow.start.id===this.revision.id}checkIsDraftRevision(){return this.projectPageModel.branchOrThrow.draft.id===this.revision.id}checkIsHeadRevision(){return this.projectPageModel.branchOrThrow.head.id===this.revision.id}}class _we{constructor(t){le(this,"index",0);this.revision=t,Le(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return nn.NextPage}get dataTestId(){return"revision-next-page"}get link(){return""}get tooltip(){return["Next page"]}get hidden(){return!1}}class xwe{constructor(t,r){le(this,"index",0);this.projectPageModel=t,this.parentBranch=r,Le(this)}get id(){return this.parentBranch.branchName}get children(){return[]}get disabled(){return!1}get icon(){return nn.Parent}get dataTestId(){return`revision-parent-branch-${this.parentBranch.branchName}`}get link(){return ki(`/${yl}/${bl}/${wl}/-/${this.parentBranch.fromRevisionId}`,{organizationId:this.projectPageModel.organization.id,projectName:this.projectPageModel.project.name,branchName:this.parentBranch.branchName})}get tooltip(){return[`Branch: ${this.parentBranch.branchName}`]}get hidden(){return!1}}class Pwe{constructor(t){le(this,"index",0);this.revision=t,Le(this)}get id(){return this.revision.id}get children(){return[]}get disabled(){return!1}get icon(){return nn.PreviousPage}get dataTestId(){return"revision-previous-page"}get link(){return""}get tooltip(){return["Previous page"]}get hidden(){return!1}}class Cwe{constructor(t,r,n){this.projectPageModel=t,this.linkMaker=r,this.middleRevisions=n,Le(this,{},{autoBind:!0})}get items(){const t=[];this.branch.parentBranch&&t.push(this.createParentBranchItem(this.branch.parentBranch)),this.shouldAddStartRevision()&&t.push(this.createStartItem());const r=this.middleRevisions.data.slice(),n=r.shift(),i=r.pop();n&&t.push(this.createFirstMiddleItem(n));for(const o of r)t.push(this.createMiddleItem(o));return i&&t.push(this.createLastMiddleItem(i)),t.push(this.createHeadItem()),this.branch.touched&&t.push(this.createDraftItem()),t.length===1&&!this.branch.head.tablesConnection.totalCount?[]:(t.forEach((o,a)=>{o.index=a}),t)}get branch(){return this.projectPageModel.branchOrThrow}createParentBranchItem(t){return new xwe(this.projectPageModel,t)}createStartItem(){return new Mc(this.projectPageModel,this.linkMaker,this.branch.start)}createFirstMiddleItem(t){return t.parent===this.branch.start?new Mc(this.projectPageModel,this.linkMaker,t):new Pwe(t)}createMiddleItem(t){return new Mc(this.projectPageModel,this.linkMaker,t)}createLastMiddleItem(t){return t.child===this.branch.head?new Mc(this.projectPageModel,this.linkMaker,t):new _we(t)}createHeadItem(){return new Mc(this.projectPageModel,this.linkMaker,this.branch.head)}createDraftItem(){return new Mc(this.projectPageModel,this.linkMaker,this.branch.draft)}shouldAddStartRevision(){return this.branch.start!==this.branch.head}}const KS=8;class Ewe{constructor(t,r){le(this,"data",[]);le(this,"currentDefaultMaxItems",KS);this.projectPageModel=t,this.middleRevisionsFinder=r,Le(this)}get branch(){return this.projectPageModel.branchOrThrow}select({desiredRevision:t,priority:r}){this.shouldResetDefaultMaxItems(t)&&this.resetDefaultMaxItems(),this.isNoChangesForDefaultBranch()&&(this.data=[]);const n=[];if(this.shouldAddMiddleRevisions()){const i=this.middleRevisionsFinder.find({targetRevision:this.getTargetRevision(t),priority:r,maxItems:this.currentDefaultMaxItems});n.push(...i)}this.data=n}resetDefaultMaxItems(){this.currentDefaultMaxItems=KS}increaseMaxItemsForNewRevision(){this.currentDefaultMaxItems=KS+1}isNoChangesForDefaultBranch(){return!this.branch.parentBranch&&this.branch.start===this.branch.head&&!this.branch.touched}shouldAddMiddleRevisions(){return this.branch.start!==this.branch.head&&this.branch.start.child!==this.branch.head}getTargetRevision(t){return t===this.branch.start?this.branch.start.child:t===this.branch.head||t===this.branch.draft?this.branch.head.parent:t}shouldResetDefaultMaxItems(t){return t!==this.branch.head}}const Twe=()=>{const e=gc(),t=$n(),[r]=S.useState(()=>{const n=new pbe(t),i=new Ewe(t,n),o=new Cwe(t,e,i),a=new fbe(t);return new hbe(ze.cache,t,o,i,a)});return S.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},Owe=e=>{switch(e){case nn.Child:return y.jsx(Kpe,{size:"24"});case nn.Draft:return y.jsx(Zpe,{size:"24"});case nn.Start:return y.jsx(SA,{size:"24"});case nn.Head:return y.jsx(eme,{size:"24"});case nn.Revision:return y.jsx(SA,{size:"24"});case nn.Parent:return y.jsx(Gpe,{size:"24"});case nn.PreviousPage:return y.jsx(wA,{size:"24"});case nn.NextPage:return y.jsx(wA,{size:"24"})}},Wz=Ze(({data:e,onClick:t})=>{const[r,n]=S.useState(!1),i=S.useCallback(async()=>{FP.includes(e.icon)?(n(!0),await(t==null?void 0:t()),n(!1)):t==null||t()},[e.icon,t]);return y.jsx(V5,{textAlign:"center",label:y.jsx(im,{children:e.tooltip.map((o,a)=>y.jsx("span",{children:o},a))}),openDelay:750,children:y.jsxs(Je,{position:"relative",children:[y.jsx(Li,{"data-testid":e.dataTestId,isLoading:r,onClick:i,_disabled:r?{opacity:.2}:{opacity:1},_hover:e.disabled?{opacity:1}:{opacity:.4},"aria-label":"",icon:Owe(e.icon),isDisabled:e.disabled,opacity:FP.includes(e.icon)?.7:.2,variant:"ghost"}),e.isThereEndpoint&&y.jsx(Je,{position:"absolute",right:"0px",top:"0px",opacity:"0.4",children:y.jsx(tme,{})})]})})}),HA=Ze(({data:e})=>y.jsx(wo,{to:e.link,children:y.jsx(Wz,{data:e})})),WA=({data:e,onSelect:t})=>{const r=S.useCallback(async()=>{await t(e.id)},[e.id,t]);return y.jsx(Wz,{data:e,onClick:r})},Rwe=Ze(({endpointSlot:e})=>{const t=Twe();return t.items.length?y.jsxs(de,{alignItems:"flex-start",justifyContent:"space-between",paddingBottom:"1rem",children:[y.jsx(de,{flexDirection:"column",flex:1,gap:"1rem",children:y.jsx(de,{"data-testid":"revision-endpoint-widget",children:t.items.map((r,n)=>y.jsxs(ue.Fragment,{children:[y.jsxs(de,{alignItems:"center",flexDirection:"column",children:[r.icon===nn.PreviousPage&&y.jsx(WA,{data:r,onSelect:t.previousPage}),r.icon===nn.NextPage&&y.jsx(WA,{data:r,onSelect:t.nextPage}),!FP.includes(r.icon)&&y.jsx(HA,{data:r}),r.children.length?y.jsx(Qpe,{opacity:"0.15"}):null,r.children.map(i=>y.jsx(HA,{data:i},i.id))]}),n!==t.items.length-1&&y.jsx(de,{alignItems:"center",height:"40px",children:y.jsx(Ype,{opacity:"0.15"})})]},r.id))})}),y.jsx(de,{children:e})]}):null}),Iwe=()=>y.jsx(Je,{className:Vz.Root,children:y.jsx(Rwe,{endpointSlot:y.jsx(dbe,{})})});class kwe{constructor(t){this.projectPageModel=t,Le(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get organizationId(){return this.organization.id}get projectName(){return this.project.name}get items(){return this.project.branchesConnection.edges.map(({node:t})=>{var n;const r=t.name===((n=this.branch)==null?void 0:n.name);return{id:t.id,name:t.name,link:r?"":`${$we(this.organizationId,this.projectName,t.name)}${jwe(t)}`,title:`${t.name}`,isActive:r,touched:t.touched}})}init(){}dispose(){}get organization(){return this.projectPageModel.organization}get project(){return this.projectPageModel.project}get branch(){return this.projectPageModel.branch}}const jwe=e=>e.touched?ki(`/${yw}`):"",$we=(e,t,r)=>ki(`/${yl}/${bl}/${wl}`,{organizationId:e,projectName:t,branchName:r}),Awe=()=>{const e=$n(),[t]=S.useState(()=>new kwe(e));return S.useEffect(()=>(t.init(),()=>{t.dispose()}),[t]),t},Dwe=Ze(()=>{const e=Awe();return y.jsxs(im,{alignItems:"flex-start",gap:"1rem",children:[y.jsx(wo,{to:"/",children:y.jsx(vo,{variant:"link","data-testid":"sidebar-back-to-projects-button",children:y.jsx(m5,{color:"gray",size:"md",children:y.jsx("b",{children:e.projectName})})})}),y.jsxs(im,{alignItems:"flex-start",borderTop:"1px solid",borderTopColor:"gray.100",gap:"0.25rem",pb:"1rem",pt:"1rem",width:"100%",children:[y.jsx(Ye,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Branches:"}),e.items.map(t=>y.jsxs(de,{_hover:t.isActive?{}:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:t.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",width:"100%",children:[t.isActive?y.jsx(Ye,{color:"gray.500",fontWeight:"600",children:t.title}):y.jsx(vo,{minWidth:0,variant:"link",children:y.jsx(Ye,{children:y.jsx(wo,{to:t.link,"data-testid":`sidebar-branch-${t.name}`,children:t.title},t.id)})}),t.touched&&y.jsx(Ye,{color:"gray.600",children:"*"})]},t.id))]})]})});class Mwe{constructor(t,r){this.projectPageModel=t,this.linkMaker=r,Le(this)}get hasNextPage(){return this.project.branchesConnection.availableNextPage}get items(){return this.revision.tablesConnection.edges.map(({node:t})=>{var n;const r=t.id===((n=this.table)==null?void 0:n.id);return{id:t.id,versionId:t.versionId,link:r?"":`${this.linkMaker.currentBaseLink}/${t.id}`,isActive:r,touched:!t.readonly}})}get project(){return this.projectPageModel.project}get revision(){return this.projectPageModel.revisionOrThrow}get table(){return this.projectPageModel.table}init(){}dispose(){}}const Nwe=()=>{const e=$n(),t=gc(),[r]=S.useState(()=>new Mwe(e,t));return S.useEffect(()=>(r.init(),()=>{r.dispose()}),[r]),r},Fwe=Ze(()=>{const e=Nwe();return y.jsxs(im,{alignItems:"flex-start",gap:"0.25rem",width:"100%",children:[y.jsx(Ye,{color:"gray",fontSize:"sm",mb:"0.5rem",children:"Tables:"}),e.items.map(t=>y.jsxs(de,{_hover:{backgroundColor:"gray.200"},alignItems:"center",backgroundColor:t.isActive?"gray.100":void 0,borderRadius:"0.25rem",height:"32px",paddingLeft:"0.5rem",width:"100%",children:[t.isActive?y.jsx(Ye,{color:"gray.500",fontWeight:"600",children:t.id}):y.jsx(vo,{minWidth:0,variant:"link",children:y.jsx(Ye,{children:y.jsx(wo,{to:t.link,"data-testid":`sidebar-table-${t.id}`,children:t.id},t.id)})}),t.touched&&y.jsx(Ye,{color:"gray.600",children:"*"})]},t.versionId))]})}),Lwe=Ze(()=>{const e=$n();return y.jsxs(y.Fragment,{children:[y.jsx(Je,{minHeight:"120px",children:y.jsx(Dwe,{})}),e.table&&y.jsx(Je,{borderTop:"1px solid",borderTopColor:"gray.100",paddingTop:"1rem",children:y.jsx(Fwe,{})})]})}),Bwe=Ze(()=>(b0e(),y.jsx(Mf,{actions:y.jsx(B0e,{}),sidebar:y.jsx(Lwe,{}),title:y.jsx(W0e,{}),children:y.jsxs(de,{flex:1,flexDirection:"column",gap:"1rem",children:[y.jsx(Iwe,{}),y.jsx(de,{flexDirection:"column",gap:"0.5rem",flex:1,children:y.jsx(C0,{})})]})})));class LP{constructor(t,r,n){le(this,"isLoading",!1);this.authService=t,this.routerService=r,this.apiService=n,Le(this)}async confirmEmailCode(t){t?(await this.request(t),await this.routerService.navigate(nO)):console.error("Invalid code")}init(){}dispose(){}async request(t){this.setIsLoading(!0);try{const r=await this.apiService.client.confirmEmailCode({data:{code:t}});return await this.authService.setToken(r.confirmEmailCode.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(LP,()=>{const e=We.get(zi),t=We.get(xs),r=We.get(Aa);return new LP(e,t,r)},{scope:"request"});const Vwe=Ze(()=>{const[e]=lde({code:""}),t=Ff(LP);return S.useEffect(()=>{t.confirmEmailCode(e.get("code"))},[t,e]),t.isLoading?y.jsx(XE,{w:"100%",h:"100%",children:y.jsx(Ym,{})}):null}),zwe=()=>null;class BP{constructor(t,r,n){le(this,"isLoading",!1);this.routerService=t,this.apiService=r,this.authService=n,Le(this)}async login(t){t?(await this.loginRequest(t),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(t){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGithub({data:{code:t}});return await this.authService.setToken(r.loginGithub.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(BP,()=>{const e=We.get(xs),t=We.get(Aa),r=We.get(zi);return new BP(e,t,r)},{scope:"request"});const Uwe=async({request:e})=>{const n=new URL(e.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await We.get(BP).login(n),uf("/")},qwe=me`
1337
- mutation login($data: LoginInput!) {
1338
- login(data: $data) {
1339
- accessToken
1340
- }
1341
- }
1342
- `,Hwe=async e=>{const t=await Kt.mutate({mutation:qwe,variables:e});if(!t.data)throw t.errors;return t.data},Wwe=()=>`${window.location.origin}/${hc}/${IV}`,Kz=e=>{const t=Wwe();window.location.href=`https://github.com/login/oauth/authorize?client_id=${e}&redirect_uri=${t}&scope=user:email`},Gz=()=>`${window.location.origin}/${hc}/${kV}`,Qz=e=>{const t=Gz();window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?client_id=${e}&redirect_uri=${t}&response_type=code&scope=profile email`};class VP{constructor(t,r,n){le(this,"isLoading",!1);le(this,"form",new aO({emailOrUsername:"",password:""}));this.authService=t,this.configurationService=r,this.routerService=n,Le(this)}get availableSignUp(){return this.configurationService.availableSignUp}get disableSubmitButton(){return!this.form.isValid}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){Qz(this.configurationService.googleOauthClientId)}toGithubOauth(){Kz(this.configurationService.githubOauthClientId)}async submit(){await this.login()&&await this.routerService.navigate(nO)}dispose(){}init(){}async login(){this.setIsLoading(!0);try{const t=await Hwe({data:this.form.values});return await this.authService.setToken(t.login.accessToken),!0}catch(t){console.error(t)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(VP,()=>{const e=We.get(zi),t=We.get(ec),r=We.get(xs);return new VP(e,t,r)},{scope:"request"});const Kwe=Ze(()=>{const e=Ff(VP),t=S.useCallback(a=>{e.form.setValue("emailOrUsername",a.currentTarget.value)},[e.form]),r=S.useCallback(a=>{e.form.setValue("password",a.currentTarget.value)},[e.form]),n=S.useCallback(async()=>{await e.submit()},[e]),i=S.useCallback(()=>{e.toGithubOauth()},[e]),o=S.useCallback(()=>{e.toGoogleOauth()},[e]);return y.jsxs(Mf,{hideSidebar:!0,children:[e.availableSignUp&&y.jsxs(de,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[y.jsx(Ye,{color:"gray.300",children:"New to Revisium?"}),y.jsx(Of,{color:"gray.300",alignSelf:"center",as:wo,to:`/${gw}`,children:"Sign up"})]}),y.jsx(de,{alignItems:"center",justifyContent:"center",flex:1,children:y.jsxs(de,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[e.availableOauth&&y.jsxs(y.Fragment,{children:[y.jsxs(de,{flexDirection:"column",gap:"2px",children:[e.availableGithubOauth&&y.jsx(rs,{icon:y.jsx(LV,{}),onClick:i,title:"Continue with Github"}),e.availableGoogleOauth&&y.jsx(rs,{icon:y.jsx(BV,{}),onClick:o,title:"Continue with Google"})]}),y.jsxs(de,{width:"100%",alignItems:"center",gap:"16px",children:[y.jsx(Je,{backgroundColor:"gray.100",flex:1,height:"1px"}),y.jsx(Ye,{color:"gray.300",fontSize:"12px",children:"OR"}),y.jsx(Je,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),y.jsx(ns,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"username or email",value:e.form.values.emailOrUsername,onChange:t,onEnter:n}),y.jsx(ns,{dataTestId:"login-password-input",height:"40px",placeholder:"password",type:"password",value:e.form.values.password,onChange:r,onEnter:n}),y.jsx(Je,{visibility:e.disableSubmitButton?"hidden":"visible",children:y.jsx(rs,{onClick:n,isLoading:e.isLoading,title:"Login"})})]})})]})});class zP{constructor(t){this.authService=t,Le(this)}logout(){this.authService.logout(),Fye()}dispose(){}init(){}}We.register(zP,()=>{const e=We.get(zi);return new zP(e)},{scope:"request"});const Gwe=Ze(()=>{const e=Ff(zP),t=ql();return S.useEffect(()=>{e.logout(),t(`/${hc}`)},[e,t]),null}),Qwe=({onClick:e})=>y.jsx(Nf,{dataTestId:"create-project-button",title:"Project",onClick:e}),Ywe=me`
1343
- mutation CreateProjectMst($data: CreateProjectInput!) {
1344
- createProject(data: $data) {
1345
- ...ProjectMst
1346
- }
1347
- }
1348
- ${Rz}
1349
- `,Xwe=async e=>{const t=await Kt.mutate({mutation:Ywe,variables:e});if(!t.data)throw t.errors;return t.data};class Jwe{constructor(t,r,n,i,o){this.rootStore=t,this.organizationId=r,this.projectName=n,this.branchName=i,this.fromRevisionId=o}get projectVariables(){return{organizationId:this.organizationId,projectName:this.projectName,branchName:this.branchName,fromRevisionId:this.fromRevisionId}}async execute(){const t=await this.createProjectRequest();return await this.refetchProjectsConnection(),t}async createProjectRequest(){const{createProject:t}=await Xwe({data:this.projectVariables});return this.addProjectToCache(t)}addProjectToCache(t){const r=this.rootStore.cache.addProject(Cz(t));return this.rootStore.cache.addProjectByVariables(this.projectVariables,r.id),r}async refetchProjectsConnection(){await this.rootStore.backend.queryMeProjects({first:100})}}class Zwe{constructor(t,r){le(this,"projectName","");le(this,"branchName","");le(this,"fromRevisionId","");le(this,"showingSettings",!1);this.rootStore=t,this.authService=r,Le(this)}get organizationId(){var r;const t=(r=this.authService.user)==null?void 0:r.organizationId;if(!t)throw new Error("Not found organizationId");return t}setProjectName(t){this.projectName=t}setBranchName(t){this.branchName=t}setFromRevisionId(t){this.fromRevisionId=t}setShowingSettings(t){this.showingSettings=t}async create(){try{await new Jwe(this.rootStore,this.organizationId,this.projectName,this.branchName,this.fromRevisionId).execute()}catch(t){console.error(t)}}init(){}dispose(){}}const e1e=()=>{const[e]=S.useState(()=>{const t=We.get(zi);return new Zwe(ze,t)});return S.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},Yz=({onClick:e,color:t,dataTestId:r})=>{const[n,i]=S.useState(!1),o=S.useCallback(async()=>{i(!0),await(e==null?void 0:e()),i(!1)},[e]);return y.jsx(Li,{_hover:{backgroundColor:"gray.100"},"data-testid":r,"aria-label":"",color:t||"gray.400",icon:y.jsx(Dpe,{}),isLoading:n,variant:"ghost",onClick:o})},t1e=Ze(({onCancel:e,onAdd:t})=>{const r=e1e(),[n,i]=S.useState(!1),o=S.useCallback(async()=>{i(!0),await r.create(),i(!1),t==null||t()},[t,r]),a=S.useCallback(c=>{r.setProjectName(c.currentTarget.value)},[r]),s=S.useCallback(c=>{r.setBranchName(c.currentTarget.value)},[r]),l=S.useCallback(c=>{r.setFromRevisionId(c.currentTarget.value)},[r]),u=S.useCallback(()=>{r.setShowingSettings(!r.showingSettings)},[r]);return y.jsxs(de,{alignSelf:"flex-start",gap:"0.5rem",children:[y.jsx(ww,{onClick:e}),y.jsxs(de,{flexDirection:"column",gap:"0.5rem",children:[y.jsx(ns,{dataTestId:"create-project-name-input",autoFocus:!0,height:"40px",placeholder:"project name",value:r.projectName,onChange:a,onEnter:o}),r.projectName&&r.showingSettings&&y.jsxs(y.Fragment,{children:[y.jsx(ns,{dataTestId:"create-project-branch-name-input",height:"40px",placeholder:"branch name",value:r.branchName,onChange:s,onEnter:o}),y.jsx(ns,{dataTestId:"create-project-from-revision-id-input",height:"40px",placeholder:"from revisionId",value:r.fromRevisionId,onChange:l,onEnter:o})]})]}),r.projectName&&y.jsxs(y.Fragment,{children:[y.jsx(vv,{dataTestId:"create-project-approve-button",loading:n,onClick:o}),y.jsx(Yz,{dataTestId:"create-project-settings-button",color:r.showingSettings?"gray.400":"gray.200",onClick:u})]})]})}),Iw=0,Kl=1,qf=2,Xz=4;function Jz(e,t){return r=>e(t(r))}function r1e(e,t){return t(e)}function Zz(e,t){return r=>e(t,r)}function KA(e,t){return()=>e(t)}function kw(e,t){return t(e),e}function Tr(...e){return e}function n1e(e){e()}function GA(e){return()=>e}function i1e(...e){return()=>{e.map(n1e)}}function yO(e){return e!==void 0}function Hf(){}function Qt(e,t){return e(Kl,t)}function dt(e,t){e(Iw,t)}function bO(e){e(qf)}function zn(e){return e(Xz)}function Be(e,t){return Qt(e,Zz(t,Iw))}function Da(e,t){const r=e(Kl,n=>{r(),t(n)});return r}function Et(){const e=[];return(t,r)=>{switch(t){case qf:e.splice(0,e.length);return;case Kl:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)};case Iw:e.slice().forEach(n=>{n(r)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Pe(e){let t=e;const r=Et();return(n,i)=>{switch(n){case Kl:i(t);break;case Iw:t=i;break;case Xz:return t}return r(n,i)}}function o1e(e){let t,r;const n=()=>t&&t();return function(i,o){switch(i){case Kl:return o?r===o?void 0:(n(),r=o,t=Qt(e,o),t):(n(),Hf);case qf:n(),r=null;return;default:throw new Error(`unrecognized action ${i}`)}}}function Di(e){return kw(Et(),t=>Be(e,t))}function Xn(e,t){return kw(Pe(t),r=>Be(e,r))}function a1e(...e){return t=>e.reduceRight(r1e,t)}function fe(e,...t){const r=a1e(...t);return(n,i)=>{switch(n){case Kl:return Qt(e,r(i));case qf:bO(e);return}}}function e6(e,t){return e===t}function Pr(e=e6){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function nt(e){return t=>r=>{e(r)&&t(r)}}function Re(e){return t=>Jz(t,e)}function pa(e){return t=>()=>t(e)}function wa(e,t){return r=>n=>r(t=e(t,n))}function gf(e){return t=>r=>{e>0?e--:t(r)}}function nl(e){let t=null,r;return n=>i=>{t=i,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function QA(e){let t,r;return n=>i=>{t=i,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function vt(...e){const t=new Array(e.length);let r=0,n=null;const i=Math.pow(2,e.length)-1;return e.forEach((o,a)=>{const s=Math.pow(2,a);Qt(o,l=>{const u=r;r=r|s,t[a]=l,u!==i&&r===i&&n&&(n(),n=null)})}),o=>a=>{const s=()=>o([a].concat(t));r===i?s():n=s}}function YA(...e){return function(t,r){switch(t){case Kl:return i1e(...e.map(n=>Qt(n,r)));case qf:return;default:throw new Error(`unrecognized action ${t}`)}}}function at(e,t=e6){return fe(e,Pr(t))}function gn(...e){const t=Et(),r=new Array(e.length);let n=0;const i=Math.pow(2,e.length)-1;return e.forEach((o,a)=>{const s=Math.pow(2,a);Qt(o,l=>{r[a]=l,n=n|s,n===i&&dt(t,r)})}),function(o,a){switch(o){case Kl:return n===i&&a(r),Qt(t,a);case qf:return bO(t);default:throw new Error(`unrecognized action ${o}`)}}}function Jt(e,t=[],{singleton:r}={singleton:!0}){return{id:s1e(),constructor:e,dependencies:t,singleton:r}}const s1e=()=>Symbol();function l1e(e){const t=new Map,r=({id:n,constructor:i,dependencies:o,singleton:a})=>{if(a&&t.has(n))return t.get(n);const s=i(o.map(l=>r(l)));return a&&t.set(n,s),s};return r(e)}function u1e(e,t){const r={},n={};let i=0;const o=e.length;for(;i<o;)n[e[i]]=1,i+=1;for(const a in t)n.hasOwnProperty(a)||(r[a]=t[a]);return r}const Pg=typeof document<"u"?ue.useLayoutEffect:ue.useEffect;function t6(e,t,r){const n=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=ue.createContext({});function l(p,g){p.propsReady&&dt(p.propsReady,!1);for(const b of n){const _=p[t.required[b]];dt(_,g[b])}for(const b of i)if(b in g){const _=p[t.optional[b]];dt(_,g[b])}p.propsReady&&dt(p.propsReady,!0)}function u(p){return o.reduce((g,b)=>(g[b]=_=>{const P=p[t.methods[b]];dt(P,_)},g),{})}function c(p){return a.reduce((g,b)=>(g[b]=o1e(p[t.events[b]]),g),{})}const d=ue.forwardRef((p,g)=>{const{children:b,..._}=p,[P]=ue.useState(()=>kw(l1e(e),x=>l(x,_))),[C]=ue.useState(KA(c,P));return Pg(()=>{for(const x of a)x in _&&Qt(C[x],_[x]);return()=>{Object.values(C).map(bO)}},[_,C,P]),Pg(()=>{l(P,_)}),ue.useImperativeHandle(g,GA(u(P))),ue.createElement(s.Provider,{value:P},r?ue.createElement(r,u1e([...n,...i,...a],_),b):b)}),f=p=>ue.useCallback(Zz(dt,ue.useContext(s)[p]),[p]),h=p=>{const b=ue.useContext(s)[p],_=ue.useCallback(P=>Qt(b,P),[b]);return ue.useSyncExternalStore(_,()=>zn(b),()=>zn(b))},m=p=>{const b=ue.useContext(s)[p],[_,P]=ue.useState(KA(zn,b));return Pg(()=>Qt(b,C=>{C!==_&&P(GA(C))}),[b,_]),_},v=ue.version.startsWith("18")?h:m;return{Component:d,usePublisher:f,useEmitterValue:v,useEmitter:(p,g)=>{const _=ue.useContext(s)[p];Pg(()=>Qt(_,g),[g,_])}}}const c1e=typeof document<"u"?ue.useLayoutEffect:ue.useEffect,d1e=c1e;var Mi=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Mi||{});const f1e={0:"debug",1:"log",2:"warn",3:"error"},h1e=()=>typeof globalThis>"u"?window:globalThis,Gl=Jt(()=>{const e=Pe(3);return{log:Pe((r,n,i=1)=>{var o;const a=(o=h1e().VIRTUOSO_LOG_LEVEL)!=null?o:zn(e);i>=a&&console[f1e[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",r,n)}),logLevel:e}},[],{singleton:!0});function wO(e,t=!0){const r=ue.useRef(null);let n=i=>{};if(typeof ResizeObserver<"u"){const i=ue.useMemo(()=>new ResizeObserver(o=>{requestAnimationFrame(()=>{const a=o[0].target;a.offsetParent!==null&&e(a)})}),[e]);n=o=>{o&&t?(i.observe(o),r.current=o):(r.current&&i.unobserve(r.current),r.current=null)}}return{ref:r,callbackRef:n}}function yc(e,t=!0){return wO(e,t).callbackRef}function p1e(e,t,r,n,i,o,a){const s=ue.useCallback(l=>{const u=m1e(l.children,t,"offsetHeight",i);let c=l.parentElement;for(;!c.dataset.virtuosoScroller;)c=c.parentElement;const d=c.lastElementChild.dataset.viewportType==="window",f=a?a.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:c.scrollTop,h=a?a.scrollHeight:d?document.documentElement.scrollHeight:c.scrollHeight,m=a?a.offsetHeight:d?window.innerHeight:c.offsetHeight;n({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:m}),o==null||o(v1e("row-gap",getComputedStyle(l).rowGap,i)),u!==null&&e(u)},[e,t,i,o,a,n]);return wO(s,r)}function m1e(e,t,r,n){const i=e.length;if(i===0)return null;const o=[];for(let a=0;a<i;a++){const s=e.item(a);if(!s||s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),u=parseFloat(s.dataset.knownSize),c=t(s,r);if(c===0&&n("Zero-sized element, this should not happen",{child:s},Mi.ERROR),c===u)continue;const d=o[o.length-1];o.length===0||d.size!==c||d.endIndex!==l-1?o.push({startIndex:l,endIndex:l,size:c}):o[o.length-1].endIndex++}return o}function v1e(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Mi.WARN),t==="normal"?0:parseInt(t??"0",10)}function Dl(e,t){return Math.round(e.getBoundingClientRect()[t])}function r6(e,t){return Math.abs(e-t)<1.01}function n6(e,t,r,n=Hf,i){const o=ue.useRef(null),a=ue.useRef(null),s=ue.useRef(null),l=ue.useCallback(d=>{const f=d.target,h=f===window||f===document,m=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,v=h?document.documentElement.scrollHeight:f.scrollHeight,w=h?window.innerHeight:f.offsetHeight,p=()=>{e({scrollTop:Math.max(m,0),scrollHeight:v,viewportHeight:w})};d.suppressFlushSync?p():b4.flushSync(p),a.current!==null&&(m===a.current||m<=0||m===v-w)&&(a.current=null,t(!0),s.current&&(clearTimeout(s.current),s.current=null))},[e,t]);ue.useEffect(()=>{const d=i||o.current;return n(i||o.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{n(null),d.removeEventListener("scroll",l)}},[o,l,r,n,i]);function u(d){const f=o.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let m,v,w;f===window?(v=Math.max(Dl(document.documentElement,"height"),document.documentElement.scrollHeight),m=window.innerHeight,w=document.documentElement.scrollTop):(v=f.scrollHeight,m=Dl(f,"height"),w=f.scrollTop);const p=v-m;if(d.top=Math.ceil(Math.max(Math.min(p,d.top),0)),r6(m,v)||d.top===w){e({scrollTop:w,scrollHeight:v,viewportHeight:m}),h&&t(!0);return}h?(a.current=d.top,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,a.current=null,t(!0)},1e3)):a.current=null,f.scrollTo(d)}function c(d){o.current.scrollBy(d)}return{scrollerRef:o,scrollByCallback:c,scrollToCallback:u}}const ni=Jt(()=>{const e=Et(),t=Et(),r=Pe(0),n=Et(),i=Pe(0),o=Et(),a=Et(),s=Pe(0),l=Pe(0),u=Pe(0),c=Pe(0),d=Et(),f=Et(),h=Pe(!1);return Be(fe(e,Re(({scrollTop:m})=>m)),t),Be(fe(e,Re(({scrollHeight:m})=>m)),a),Be(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:o,headerHeight:s,fixedHeaderHeight:l,fixedFooterHeight:u,footerHeight:c,scrollHeight:a,smoothScrollTargetReached:n,scrollTo:d,scrollBy:f,statefulScrollTop:i,deviation:r,scrollingInProgress:h}},[],{singleton:!0}),Im={lvl:0};function i6(e,t,r,n=Im,i=Im){return{k:e,v:t,lvl:r,l:n,r:i}}function or(e){return e===Im}function Fd(){return Im}function UP(e,t){if(or(e))return Im;const{k:r,l:n,r:i}=e;if(t===r){if(or(n))return i;if(or(i))return n;{const[o,a]=o6(n);return wy(on(e,{k:o,v:a,l:a6(n)}))}}else return t<r?wy(on(e,{l:UP(n,t)})):wy(on(e,{r:UP(i,t)}))}function km(e,t){if(!or(e))return t===e.k?e.v:t<e.k?km(e.l,t):km(e.r,t)}function Xo(e,t,r="k"){if(or(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=Xo(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return Xo(e.l,t,r)}function Ri(e,t,r){return or(e)?i6(t,r,1):t===e.k?on(e,{k:t,v:r}):t<e.k?XA(on(e,{l:Ri(e.l,t,r)})):XA(on(e,{r:Ri(e.r,t,r)}))}function qP(e,t,r){if(or(e))return[];const{k:n,v:i,l:o,r:a}=e;let s=[];return n>t&&(s=s.concat(qP(o,t,r))),n>=t&&n<=r&&s.push({k:n,v:i}),n<=r&&(s=s.concat(qP(a,t,r))),s}function Cu(e){return or(e)?[]:[...Cu(e.l),{k:e.k,v:e.v},...Cu(e.r)]}function o6(e){return or(e.r)?[e.k,e.v]:o6(e.r)}function a6(e){return or(e.r)?e.l:wy(on(e,{r:a6(e.r)}))}function on(e,t){return i6(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function GS(e){return or(e)||e.lvl>e.r.lvl}function XA(e){return HP(l6(e))}function wy(e){const{l:t,r,lvl:n}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(GS(t))return l6(on(e,{lvl:n-1}));if(!or(t)&&!or(t.r))return on(t.r,{l:on(t,{r:t.r.l}),r:on(e,{l:t.r.r,lvl:n-1}),lvl:n});throw new Error("Unexpected empty nodes")}else{if(GS(e))return HP(on(e,{lvl:n-1}));if(!or(r)&&!or(r.l)){const i=r.l,o=GS(i)?r.lvl-1:r.lvl;return on(i,{l:on(e,{r:i.l,lvl:n-1}),r:HP(on(r,{l:i.r,lvl:o})),lvl:i.lvl+1})}else throw new Error("Unexpected empty nodes")}}function jw(e,t,r){if(or(e))return[];const n=Xo(e,t)[0];return g1e(qP(e,n,r))}function s6(e,t){const r=e.length;if(r===0)return[];let{index:n,value:i}=t(e[0]);const o=[];for(let a=1;a<r;a++){const{index:s,value:l}=t(e[a]);o.push({start:n,end:s-1,value:i}),n=s,i=l}return o.push({start:n,end:1/0,value:i}),o}function g1e(e){return s6(e,({k:t,v:r})=>({index:t,value:r}))}function HP(e){const{r:t,lvl:r}=e;return!or(t)&&!or(t.r)&&t.lvl===r&&t.r.lvl===r?on(t,{l:on(e,{r:t.l}),lvl:r+1}):e}function l6(e){const{l:t}=e;return!or(t)&&t.lvl===e.lvl?on(t,{r:on(e,{l:t.r})}):e}function N0(e,t,r,n=0){let i=e.length-1;for(;n<=i;){const o=Math.floor((n+i)/2),a=e[o],s=r(a,t);if(s===0)return o;if(s===-1){if(i-n<2)return o-1;i=o-1}else{if(i===n)return o;n=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function u6(e,t,r){return e[N0(e,t,r)]}function y1e(e,t,r,n){const i=N0(e,t,n),o=N0(e,r,n,i);return e.slice(i,o+1)}const SO=Jt(()=>({recalcInProgress:Pe(!1)}),[],{singleton:!0});function b1e(e){const{size:t,startIndex:r,endIndex:n}=e;return i=>i.start===r&&(i.end===n||i.end===1/0)&&i.value===t}function JA(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function w1e(e,t){let r=or(e)?0:1/0;for(const n of t){const{size:i,startIndex:o,endIndex:a}=n;if(r=Math.min(r,o),or(e)){e=Ri(e,0,i);continue}const s=jw(e,o-1,a+1);if(s.some(b1e(n)))continue;let l=!1,u=!1;for(const{start:c,end:d,value:f}of s)l?(a>=c||i===f)&&(e=UP(e,c)):(u=f!==i,l=!0),d>a&&a>=c&&f!==i&&(e=Ri(e,a+1,f));u&&(e=Ri(e,o,i))}return[e,r]}function S1e(){return{offsetTree:[],sizeTree:Fd(),groupOffsetTree:Fd(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function _O({index:e},t){return t===e?0:t<e?-1:1}function _1e({offset:e},t){return t===e?0:t<e?-1:1}function x1e(e){return{index:e.index,value:e}}function P1e(e,t,r,n=0){return n>0&&(t=Math.max(t,u6(e,n,_O).offset)),s6(y1e(e,t,r,_1e),x1e)}function WP(e,t,r,n){let i=e,o=0,a=0,s=0,l=0;if(t!==0){l=N0(i,t-1,_O),s=i[l].offset;const c=Xo(r,t-1);o=c[0],a=c[1],i.length&&i[l].size===Xo(r,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:c}of jw(r,t,1/0)){const d=u-o,f=d*a+s+d*n;i.push({offset:f,size:c,index:u}),o=u,s=f,a=c}return{offsetTree:i,lastIndex:o,lastOffset:s,lastSize:a}}function C1e(e,[t,r,n,i]){t.length>0&&n("received item sizes",t,Mi.DEBUG);const o=e.sizeTree;let a=o,s=0;if(r.length>0&&or(o)&&t.length===2){const f=t[0].size,h=t[1].size;a=r.reduce((m,v)=>Ri(Ri(m,v,f),v+1,h),a)}else[a,s]=w1e(a,t);if(a===o)return e;const{offsetTree:l,lastIndex:u,lastSize:c,lastOffset:d}=WP(e.offsetTree,s,a,i);return{sizeTree:a,offsetTree:l,lastIndex:u,lastOffset:d,lastSize:c,groupOffsetTree:r.reduce((f,h)=>Ri(f,h,jm(h,l,i)),Fd()),groupIndices:r}}function jm(e,t,r){if(t.length===0)return 0;const{offset:n,index:i,size:o}=u6(t,e,_O),a=e-i,s=o*a+(a-1)*r+n;return s>0?s+r:s}function E1e(e){return typeof e.groupIndex<"u"}function c6(e,t,r){if(E1e(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let i=d6(n,t);return i=Math.max(0,i,Math.min(r,i)),i}}function d6(e,t){if(!$w(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function $w(e){return!or(e.groupOffsetTree)}function T1e(e){return Cu(e).map(({k:t,v:r},n,i)=>{const o=i[n+1],a=o?o.k-1:1/0;return{startIndex:t,endIndex:a,size:r}})}const O1e={offsetHeight:"height",offsetWidth:"width"},La=Jt(([{log:e},{recalcInProgress:t}])=>{const r=Et(),n=Et(),i=Xn(n,0),o=Et(),a=Et(),s=Pe(0),l=Pe([]),u=Pe(void 0),c=Pe(void 0),d=Pe((P,C)=>Dl(P,O1e[C])),f=Pe(void 0),h=Pe(0),m=S1e(),v=Xn(fe(r,vt(l,e,h),wa(C1e,m),Pr()),m),w=Xn(fe(l,Pr(),wa((P,C)=>({prev:P.current,current:C}),{prev:[],current:[]}),Re(({prev:P})=>P)),[]);Be(fe(l,nt(P=>P.length>0),vt(v,h),Re(([P,C,x])=>{const T=P.reduce((I,M,H)=>Ri(I,M,jm(M,C.offsetTree,x)||H),Fd());return{...C,groupIndices:P,groupOffsetTree:T}})),v),Be(fe(n,vt(v),nt(([P,{lastIndex:C}])=>P<C),Re(([P,{lastIndex:C,lastSize:x}])=>[{startIndex:P,endIndex:C,size:x}])),r),Be(u,c);const p=Xn(fe(u,Re(P=>P===void 0)),!0);Be(fe(c,nt(P=>P!==void 0&&or(zn(v).sizeTree)),Re(P=>[{startIndex:0,endIndex:0,size:P}])),r);const g=Di(fe(r,vt(v),wa(({sizes:P},[C,x])=>({changed:x!==P,sizes:x}),{changed:!1,sizes:m}),Re(P=>P.changed)));Qt(fe(s,wa((P,C)=>({diff:P.prev-C,prev:C}),{diff:0,prev:0}),Re(P=>P.diff)),P=>{const{groupIndices:C}=zn(v);if(P>0)dt(t,!0),dt(o,P+JA(P,C));else if(P<0){const x=zn(w);x.length>0&&(P-=JA(-P,x)),dt(a,P)}}),Qt(fe(s,vt(e)),([P,C])=>{P<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Mi.ERROR)});const b=Di(o);Be(fe(o,vt(v),Re(([P,C])=>{const x=C.groupIndices.length>0,T=[],I=C.lastSize;if(x){const M=km(C.sizeTree,0);let H=0,re=0;for(;H<P;){const L=C.groupIndices[re],X=C.groupIndices.length===re+1?1/0:C.groupIndices[re+1]-L-1;T.push({startIndex:L,endIndex:L,size:M}),T.push({startIndex:L+1,endIndex:L+1+X-1,size:I}),re++,H+=X+1}const ie=Cu(C.sizeTree);return H!==P&&ie.shift(),ie.reduce((L,{k:X,v:Q})=>{let W=L.ranges;return L.prevSize!==0&&(W=[...L.ranges,{startIndex:L.prevIndex,endIndex:X+P-1,size:L.prevSize}]),{ranges:W,prevIndex:X+P,prevSize:Q}},{ranges:T,prevIndex:P,prevSize:0}).ranges}return Cu(C.sizeTree).reduce((M,{k:H,v:re})=>({ranges:[...M.ranges,{startIndex:M.prevIndex,endIndex:H+P-1,size:M.prevSize}],prevIndex:H+P,prevSize:re}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),r);const _=Di(fe(a,vt(v,h),Re(([P,{offsetTree:C},x])=>{const T=-P;return jm(T,C,x)})));return Be(fe(a,vt(v,h),Re(([P,C,x])=>{if(C.groupIndices.length>0){if(or(C.sizeTree))return C;let I=Fd();const M=zn(w);let H=0,re=0,ie=0;for(;H<-P;){ie=M[re];const L=M[re+1]-ie-1;re++,H+=L+1}if(I=Cu(C.sizeTree).reduce((L,{k:X,v:Q})=>Ri(L,Math.max(0,X+P),Q),I),H!==-P){const L=km(C.sizeTree,ie);I=Ri(I,0,L);const X=Xo(C.sizeTree,-P+1)[1];I=Ri(I,1,X)}return{...C,sizeTree:I,...WP(C.offsetTree,0,I,x)}}else{const I=Cu(C.sizeTree).reduce((M,{k:H,v:re})=>Ri(M,Math.max(0,H+P),re),Fd());return{...C,sizeTree:I,...WP(C.offsetTree,0,I,x)}}})),v),{data:f,totalCount:n,sizeRanges:r,groupIndices:l,defaultItemSize:c,fixedItemSize:u,unshiftWith:o,shiftWith:a,shiftWithOffset:_,beforeUnshiftWith:b,firstItemIndex:s,gap:h,sizes:v,listRefresh:g,statefulTotalCount:i,trackItemSizes:p,itemSize:d}},Tr(Gl,SO),{singleton:!0}),R1e=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function f6(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!R1e)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Sv=Jt(([{sizes:e,totalCount:t,listRefresh:r,gap:n},{scrollingInProgress:i,viewportHeight:o,scrollTo:a,smoothScrollTargetReached:s,headerHeight:l,footerHeight:u,fixedHeaderHeight:c,fixedFooterHeight:d},{log:f}])=>{const h=Et(),m=Et(),v=Pe(0);let w=null,p=null,g=null;function b(){w&&(w(),w=null),g&&(g(),g=null),p&&(clearTimeout(p),p=null),dt(i,!1)}return Be(fe(h,vt(e,o,t,v,l,u,f),vt(n,c,d),Re(([[_,P,C,x,T,I,M,H],re,ie,R])=>{const L=f6(_),{align:X,behavior:Q,offset:W}=L,te=x-1,G=c6(L,P,te);let A=jm(G,P.offsetTree,re)+I;X==="end"?(A+=ie+Xo(P.sizeTree,G)[1]-C+R,G===te&&(A+=M)):X==="center"?A+=(ie+Xo(P.sizeTree,G)[1]-C+R)/2:A-=T,W&&(A+=W);const U=N=>{b(),N?(H("retrying to scroll to",{location:_},Mi.DEBUG),dt(h,_)):(dt(m,!0),H("list did not change, scroll successful",{},Mi.DEBUG))};if(b(),Q==="smooth"){let N=!1;g=Qt(r,E=>{N=N||E}),w=Da(s,()=>{U(N)})}else w=Da(fe(r,I1e(150)),U);return p=setTimeout(()=>{b()},1200),dt(i,!0),H("scrolling from index to",{index:G,top:A,behavior:Q},Mi.DEBUG),{top:A,behavior:Q}})),a),{scrollToIndex:h,scrollTargetReached:m,topListHeight:v}},Tr(La,ni,Gl),{singleton:!0});function I1e(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}const $m="up",Sp="down",k1e="none",j1e={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},$1e=0,_v=Jt(([{scrollContainerState:e,scrollTop:t,viewportHeight:r,headerHeight:n,footerHeight:i,scrollBy:o}])=>{const a=Pe(!1),s=Pe(!0),l=Et(),u=Et(),c=Pe(4),d=Pe($1e),f=Xn(fe(YA(fe(at(t),gf(1),pa(!0)),fe(at(t),gf(1),pa(!1),QA(100))),Pr()),!1),h=Xn(fe(YA(fe(o,pa(!0)),fe(o,pa(!1),QA(200))),Pr()),!1);Be(fe(gn(at(t),at(d)),Re(([g,b])=>g<=b),Pr()),s),Be(fe(s,nl(50)),u);const m=Di(fe(gn(e,at(r),at(n),at(i),at(c)),wa((g,[{scrollTop:b,scrollHeight:_},P,C,x,T])=>{const I=b+P-_>-T,M={viewportHeight:P,scrollTop:b,scrollHeight:_};if(I){let re,ie;return b>g.state.scrollTop?(re="SCROLLED_DOWN",ie=g.state.scrollTop-b):(re="SIZE_DECREASED",ie=g.state.scrollTop-b||g.scrollTopDelta),{atBottom:!0,state:M,atBottomBecause:re,scrollTopDelta:ie}}let H;return M.scrollHeight>g.state.scrollHeight?H="SIZE_INCREASED":P<g.state.viewportHeight?H="VIEWPORT_HEIGHT_DECREASING":b<g.state.scrollTop?H="SCROLLING_UPWARDS":H="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:H,state:M}},j1e),Pr((g,b)=>g&&g.atBottom===b.atBottom))),v=Xn(fe(e,wa((g,{scrollTop:b,scrollHeight:_,viewportHeight:P})=>{if(r6(g.scrollHeight,_))return{scrollTop:b,scrollHeight:_,jump:0,changed:!1};{const C=_-(b+P)<1;return g.scrollTop!==b&&C?{scrollHeight:_,scrollTop:b,jump:g.scrollTop-b,changed:!0}:{scrollHeight:_,scrollTop:b,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),nt(g=>g.changed),Re(g=>g.jump)),0);Be(fe(m,Re(g=>g.atBottom)),a),Be(fe(a,nl(50)),l);const w=Pe(Sp);Be(fe(e,Re(({scrollTop:g})=>g),Pr(),wa((g,b)=>zn(h)?{direction:g.direction,prevScrollTop:b}:{direction:b<g.prevScrollTop?$m:Sp,prevScrollTop:b},{direction:Sp,prevScrollTop:0}),Re(g=>g.direction)),w),Be(fe(e,nl(50),pa(k1e)),w);const p=Pe(0);return Be(fe(f,nt(g=>!g),pa(0)),p),Be(fe(t,nl(100),vt(f),nt(([g,b])=>!!b),wa(([g,b],[_])=>[b,_],[0,0]),Re(([g,b])=>b-g)),p),{isScrolling:f,isAtTop:s,isAtBottom:a,atBottomState:m,atTopStateChange:u,atBottomStateChange:l,scrollDirection:w,atBottomThreshold:c,atTopThreshold:d,scrollVelocity:p,lastJumpDueToItemResize:v}},Tr(ni)),Ql=Jt(([{log:e}])=>{const t=Pe(!1),r=Di(fe(t,nt(n=>n),Pr()));return Qt(t,n=>{n&&zn(e)("props updated",{},Mi.DEBUG)}),{propsReady:t,didMount:r}},Tr(Gl),{singleton:!0});function xO(e,t){e==0?t():requestAnimationFrame(()=>xO(e-1,t))}function PO(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const xv=Jt(([{sizes:e,listRefresh:t,defaultItemSize:r},{scrollTop:n},{scrollToIndex:i,scrollTargetReached:o},{didMount:a}])=>{const s=Pe(!0),l=Pe(0),u=Pe(!0);return Be(fe(a,vt(l),nt(([c,d])=>!!d),pa(!1)),s),Be(fe(a,vt(l),nt(([c,d])=>!!d),pa(!1)),u),Qt(fe(gn(t,a),vt(s,e,r,u),nt(([[,c],d,{sizeTree:f},h,m])=>c&&(!or(f)||yO(h))&&!d&&!m),vt(l)),([,c])=>{Da(o,()=>{dt(u,!0)}),xO(4,()=>{Da(n,()=>{dt(s,!0)}),dt(i,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:l,initialItemFinalLocationReached:u}},Tr(La,ni,Sv,Ql),{singleton:!0});function ZA(e){return e?e==="smooth"?"smooth":"auto":!1}const A1e=(e,t)=>typeof e=="function"?ZA(e(t)):t&&ZA(e),D1e=Jt(([{totalCount:e,listRefresh:t},{isAtBottom:r,atBottomState:n},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:a,didMount:s},{log:l},{scrollingInProgress:u}])=>{const c=Pe(!1),d=Et();let f=null;function h(v){dt(i,{index:"LAST",align:"end",behavior:v})}Qt(fe(gn(fe(at(e),gf(1)),s),vt(at(c),r,o,u),Re(([[v,w],p,g,b,_])=>{let P=w&&b,C="auto";return P&&(C=A1e(p,g||_),P=P&&!!C),{totalCount:v,shouldFollow:P,followOutputBehavior:C}}),nt(({shouldFollow:v})=>v)),({totalCount:v,followOutputBehavior:w})=>{f&&(f(),f=null),f=Da(t,()=>{zn(l)("following output to ",{totalCount:v},Mi.DEBUG),h(w),f=null})});function m(v){const w=Da(n,p=>{v&&!p.atBottom&&p.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(zn(l)("scrolling to bottom due to increased size",{},Mi.DEBUG),h("auto"))});setTimeout(w,100)}return Qt(fe(gn(at(c),e,a),nt(([v,,w])=>v&&w),wa(({value:v},[,w])=>({refreshed:v===w,value:w}),{refreshed:!1,value:0}),nt(({refreshed:v})=>v),vt(c,e)),([,v])=>{zn(o)&&m(v!==!1)}),Qt(d,()=>{m(zn(c)!==!1)}),Qt(gn(at(c),n),([v,w])=>{v&&!w.atBottom&&w.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:c,autoscrollToBottom:d}},Tr(La,_v,Sv,xv,Ql,Gl,ni));function M1e(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{totalCount:0,groupIndices:[]})}const h6=Jt(([{totalCount:e,groupIndices:t,sizes:r},{scrollTop:n,headerHeight:i}])=>{const o=Et(),a=Et(),s=Di(fe(o,Re(M1e)));return Be(fe(s,Re(l=>l.totalCount)),e),Be(fe(s,Re(l=>l.groupIndices)),t),Be(fe(gn(n,r,i),nt(([l,u])=>$w(u)),Re(([l,u,c])=>Xo(u.groupOffsetTree,Math.max(l-c,0),"v")[0]),Pr(),Re(l=>[l])),a),{groupCounts:o,topItemsIndexes:a}},Tr(La,ni));function Am(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function p6(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const F0="top",L0="bottom",eD="none";function tD(e,t,r){return typeof e=="number"?r===$m&&t===F0||r===Sp&&t===L0?e:0:r===$m?t===F0?e.main:e.reverse:t===L0?e.main:e.reverse}function rD(e,t){return typeof e=="number"?e:e[t]||0}const CO=Jt(([{scrollTop:e,viewportHeight:t,deviation:r,headerHeight:n,fixedHeaderHeight:i}])=>{const o=Et(),a=Pe(0),s=Pe(0),l=Pe(0),u=Xn(fe(gn(at(e),at(t),at(n),at(o,Am),at(l),at(a),at(i),at(r),at(s)),Re(([c,d,f,[h,m],v,w,p,g,b])=>{const _=c-g,P=w+p,C=Math.max(f-_,0);let x=eD;const T=rD(b,F0),I=rD(b,L0);return h-=g,h+=f+p,m+=f+p,m-=g,h>c+P-T&&(x=$m),m<c-C+d+I&&(x=Sp),x!==eD?[Math.max(_-f-tD(v,F0,x)-T,0),_-C-p+d+tD(v,L0,x)+I]:null}),nt(c=>c!=null),Pr(Am)),[0,0]);return{listBoundary:o,overscan:l,topListHeight:a,increaseViewportBy:s,visibleRange:u}},Tr(ni),{singleton:!0});function N1e(e,t,r){if($w(t)){const n=d6(e,t);return[{index:Xo(t.groupOffsetTree,n)[0],size:0,offset:0},{index:n,size:0,offset:0,data:r&&r[0]}]}return[{index:e,size:0,offset:0,data:r&&r[0]}]}const QS={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function nD(e,t,r){if(e.length===0)return[];if(!$w(t))return e.map(u=>({...u,index:u.index+r,originalIndex:u.index}));const n=e[0].index,i=e[e.length-1].index,o=[],a=jw(t.groupOffsetTree,n,i);let s,l=0;for(const u of e){(!s||s.end<u.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let c;u.index===s.start?c={type:"group",index:l}:c={index:u.index-(l+1)+r,groupIndex:l},o.push({...c,size:u.size,offset:u.offset,originalIndex:u.index,data:u.data})}return o}function Sy(e,t,r,n,i,o){const{lastSize:a,lastOffset:s,lastIndex:l}=i;let u=0,c=0;if(e.length>0){u=e[0].offset;const v=e[e.length-1];c=v.offset+v.size}const d=r-l,f=s+d*a+(d-1)*n,h=u,m=f-c;return{items:nD(e,i,o),topItems:nD(t,i,o),topListHeight:t.reduce((v,w)=>w.size+v,0),offsetTop:u,offsetBottom:m,top:h,bottom:c,totalCount:r,firstItemIndex:o}}function m6(e,t,r,n,i,o){let a=0;if(r.groupIndices.length>0)for(const c of r.groupIndices){if(c-a>=e)break;a++}const s=e+a,l=PO(t,s),u=Array.from({length:s}).map((c,d)=>({index:d+l,size:0,offset:0,data:o[d+l]}));return Sy(u,[],s,i,r,n)}const bc=Jt(([{sizes:e,totalCount:t,data:r,firstItemIndex:n,gap:i},o,{visibleRange:a,listBoundary:s,topListHeight:l},{scrolledToInitialItem:u,initialTopMostItemIndex:c},{topListHeight:d},f,{didMount:h},{recalcInProgress:m}])=>{const v=Pe([]),w=Pe(0),p=Et();Be(o.topItemsIndexes,v);const g=Xn(fe(gn(h,m,at(a,Am),at(t),at(e),at(c),u,at(v),at(n),at(i),r),nt(([C,x,,T,,,,,,,I])=>{const M=I&&I.length!==T;return C&&!x&&!M}),Re(([,,[C,x],T,I,M,H,re,ie,R,L])=>{const X=I,{sizeTree:Q,offsetTree:W}=X,te=zn(w);if(T===0)return{...QS,totalCount:T};if(C===0&&x===0)return te===0?{...QS,totalCount:T}:m6(te,M,I,ie,R,L||[]);if(or(Q))return te>0?null:Sy(N1e(PO(M,T),X,L),[],T,R,X,ie);const G=[];if(re.length>0){const k=re[0],D=re[re.length-1];let ee=0;for(const oe of jw(Q,k,D)){const ve=oe.value,Se=Math.max(oe.start,k),$e=Math.min(oe.end,D);for(let ge=Se;ge<=$e;ge++)G.push({index:ge,size:ve,offset:ee,data:L&&L[ge]}),ee+=ve}}if(!H)return Sy([],G,T,R,X,ie);const A=re.length>0?re[re.length-1]+1:0,U=P1e(W,C,x,A);if(U.length===0)return null;const N=T-1,E=kw([],k=>{for(const D of U){const ee=D.value;let oe=ee.offset,ve=D.start;const Se=ee.size;if(ee.offset<C){ve+=Math.floor((C-ee.offset+R)/(Se+R));const ge=ve-D.start;oe+=ge*Se+ge*R}ve<A&&(oe+=(A-ve)*Se,ve=A);const $e=Math.min(D.end,N);for(let ge=ve;ge<=$e&&!(oe>=x);ge++)k.push({index:ge,size:Se,offset:oe,data:L&&L[ge]}),oe+=Se+R}});return Sy(E,G,T,R,X,ie)}),nt(C=>C!==null),Pr()),QS);Be(fe(r,nt(yO),Re(C=>C==null?void 0:C.length)),t),Be(fe(g,Re(C=>C.topListHeight)),d),Be(d,l),Be(fe(g,Re(C=>[C.top,C.bottom])),s),Be(fe(g,Re(C=>C.items)),p);const b=Di(fe(g,nt(({items:C})=>C.length>0),vt(t,r),nt(([{items:C},x])=>C[C.length-1].originalIndex===x-1),Re(([,C,x])=>[C-1,x]),Pr(Am),Re(([C])=>C))),_=Di(fe(g,nl(200),nt(({items:C,topItems:x})=>C.length>0&&C[0].originalIndex===x.length),Re(({items:C})=>C[0].index),Pr())),P=Di(fe(g,nt(({items:C})=>C.length>0),Re(({items:C})=>{let x=0,T=C.length-1;for(;C[x].type==="group"&&x<T;)x++;for(;C[T].type==="group"&&T>x;)T--;return{startIndex:C[x].index,endIndex:C[T].index}}),Pr(p6)));return{listState:g,topItemsIndexes:v,endReached:b,startReached:_,rangeChanged:P,itemsRendered:p,initialItemCount:w,...f}},Tr(La,h6,CO,xv,Sv,_v,Ql,SO),{singleton:!0}),F1e=Jt(([{sizes:e,firstItemIndex:t,data:r,gap:n},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(Be(fe(s,vt(o),nt(([,l])=>l!==0),vt(i,e,t,n,r),Re(([[,l],u,c,d,f,h=[]])=>m6(l,u,c,d,f,h))),a),{}),Tr(La,xv,bc,Ql),{singleton:!0}),v6=Jt(([{scrollVelocity:e}])=>{const t=Pe(!1),r=Et(),n=Pe(!1);return Be(fe(e,vt(n,t,r),nt(([i,o])=>!!o),Re(([i,o,a,s])=>{const{exit:l,enter:u}=o;if(a){if(l(i,s))return!1}else if(u(i,s))return!0;return a}),Pr()),t),Qt(fe(gn(t,e,r),vt(n)),([[i,o,a],s])=>i&&s&&s.change&&s.change(o,a)),{isSeeking:t,scrollSeekConfiguration:n,scrollVelocity:e,scrollSeekRangeChanged:r}},Tr(_v),{singleton:!0}),L1e=Jt(([{topItemsIndexes:e}])=>{const t=Pe(0);return Be(fe(t,nt(r=>r>0),Re(r=>Array.from({length:r}).map((n,i)=>i))),e),{topItemCount:t}},Tr(bc)),g6=Jt(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:r,fixedFooterHeight:n},{listState:i}])=>{const o=Et(),a=Xn(fe(gn(e,n,t,r,i),Re(([s,l,u,c,d])=>s+l+u+c+d.offsetBottom+d.bottom)),0);return Be(at(a),o),{totalListHeight:a,totalListHeightChanged:o}},Tr(ni,bc),{singleton:!0});function y6(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const B1e=y6(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),V1e=Jt(([{scrollBy:e,scrollTop:t,deviation:r,scrollingInProgress:n},{isScrolling:i,isAtBottom:o,scrollDirection:a,lastJumpDueToItemResize:s},{listState:l},{beforeUnshiftWith:u,shiftWithOffset:c,sizes:d,gap:f},{log:h},{recalcInProgress:m}])=>{const v=Di(fe(l,vt(s),wa(([,p,g,b],[{items:_,totalCount:P,bottom:C,offsetBottom:x},T])=>{const I=C+x;let M=0;return g===P&&p.length>0&&_.length>0&&(_[0].originalIndex===0&&p[0].originalIndex===0||(M=I-b,M!==0&&(M+=T))),[M,_,P,I]},[0,[],0,0]),nt(([p])=>p!==0),vt(t,a,n,o,h,m),nt(([,p,g,b,,,_])=>!_&&!b&&p!==0&&g===$m),Re(([[p],,,,,g])=>(g("Upward scrolling compensation",{amount:p},Mi.DEBUG),p))));function w(p){p>0?(dt(e,{top:-p,behavior:"auto"}),dt(r,0)):(dt(r,0),dt(e,{top:-p,behavior:"auto"}))}return Qt(fe(v,vt(r,i)),([p,g,b])=>{b&&B1e()?dt(r,g-p):w(-p)}),Qt(fe(gn(Xn(i,!1),r,m),nt(([p,g,b])=>!p&&!b&&g!==0),Re(([p,g])=>g),nl(1)),w),Be(fe(c,Re(p=>({top:-p}))),e),Qt(fe(u,vt(d,f),Re(([p,{lastSize:g,groupIndices:b,sizeTree:_},P])=>{function C(x){return x*(g+P)}if(b.length===0)return C(p);{let x=0;const T=km(_,0);let I=0,M=0;for(;I<p;){I++,x+=T;let H=b.length===M+1?1/0:b[M+1]-b[M]-1;I+H>p&&(x-=T,H=p-I+1),I+=H,x+=C(H),M++}return x}})),p=>{dt(r,p),requestAnimationFrame(()=>{dt(e,{top:p}),requestAnimationFrame(()=>{dt(r,0),dt(m,!1)})})}),{deviation:r}},Tr(ni,_v,bc,La,Gl,SO)),z1e=Jt(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Pe(0);return Qt(fe(e,vt(n),nt(([,i])=>i!==0),Re(([,i])=>({top:i}))),i=>{Da(fe(r,gf(1),nt(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{dt(t,i)})})}),{initialScrollTop:n}},Tr(Ql,ni,bc),{singleton:!0}),U1e=Jt(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Pe(!1),n=Xn(fe(gn(r,e,t),nt(([i])=>i),Re(([,i,o])=>Math.max(0,i-o)),nl(0),Pr()),0);return{alignToBottom:r,paddingTopAddition:n}},Tr(ni,g6),{singleton:!0}),EO=Jt(([{scrollTo:e,scrollContainerState:t}])=>{const r=Et(),n=Et(),i=Et(),o=Pe(!1),a=Pe(void 0);return Be(fe(gn(r,n),Re(([{viewportHeight:s,scrollTop:l,scrollHeight:u},{offsetTop:c}])=>({scrollTop:Math.max(0,l-c),scrollHeight:u,viewportHeight:s}))),t),Be(fe(e,vt(n),Re(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{useWindowScroll:o,customScrollParent:a,windowScrollContainerState:r,windowViewportRect:n,windowScrollTo:i}},Tr(ni)),q1e=({itemTop:e,itemBottom:t,viewportTop:r,viewportBottom:n,locationParams:{behavior:i,align:o,...a}})=>e<r?{...a,behavior:i,align:o??"start"}:t>n?{...a,behavior:i,align:o??"end"}:null,H1e=Jt(([{sizes:e,totalCount:t,gap:r},{scrollTop:n,viewportHeight:i,headerHeight:o,fixedHeaderHeight:a,fixedFooterHeight:s,scrollingInProgress:l},{scrollToIndex:u}])=>{const c=Et();return Be(fe(c,vt(e,i,t,o,a,s,n),vt(r),Re(([[d,f,h,m,v,w,p,g],b])=>{const{done:_,behavior:P,align:C,calculateViewLocation:x=q1e,...T}=d,I=c6(d,f,m-1),M=jm(I,f.offsetTree,b)+v+w,H=M+Xo(f.sizeTree,I)[1],re=g+w,ie=g+h-p,R=x({itemTop:M,itemBottom:H,viewportTop:re,viewportBottom:ie,locationParams:{behavior:P,align:C,...T}});return R?_&&Da(fe(l,nt(L=>L===!1),gf(zn(l)?1:2)),_):_&&_(),R}),nt(d=>d!==null)),u),{scrollIntoView:c}},Tr(La,ni,Sv,bc,Gl),{singleton:!0}),W1e=Jt(([{sizes:e,sizeRanges:t},{scrollTop:r},{initialTopMostItemIndex:n},{didMount:i},{useWindowScroll:o,windowScrollContainerState:a,windowViewportRect:s}])=>{const l=Et(),u=Pe(void 0),c=Pe(null),d=Pe(null);return Be(a,c),Be(s,d),Qt(fe(l,vt(e,r,o,c,d)),([f,h,m,v,w,p])=>{const g=T1e(h.sizeTree);v&&w!==null&&p!==null&&(m=w.scrollTop-p.offsetTop),f({ranges:g,scrollTop:m})}),Be(fe(u,nt(yO),Re(K1e)),n),Be(fe(i,vt(u),nt(([,f])=>f!==void 0),Pr(),Re(([,f])=>f.ranges)),t),{getState:l,restoreStateFrom:u}},Tr(La,ni,xv,Ql,EO));function K1e(e){return{offset:e.scrollTop,index:0,align:"start"}}const G1e=Jt(([e,t,r,n,i,o,a,s,l,u])=>({...e,...t,...r,...n,...i,...o,...a,...s,...l,...u}),Tr(CO,F1e,Ql,v6,g6,z1e,U1e,EO,H1e,Gl)),Q1e=Jt(([{totalCount:e,sizeRanges:t,fixedItemSize:r,defaultItemSize:n,trackItemSizes:i,itemSize:o,data:a,firstItemIndex:s,groupIndices:l,statefulTotalCount:u,gap:c,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:m},v,w,p,{listState:g,topItemsIndexes:b,..._},{scrollToIndex:P},C,{topItemCount:x},{groupCounts:T},I])=>(Be(_.rangeChanged,I.scrollSeekRangeChanged),Be(fe(I.windowViewportRect,Re(M=>M.visibleHeight)),v.viewportHeight),{totalCount:e,data:a,firstItemIndex:s,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:m,topItemsIndexes:b,topItemCount:x,groupCounts:T,fixedItemHeight:r,defaultItemHeight:n,gap:c,...p,statefulTotalCount:u,listState:g,scrollToIndex:P,trackItemSizes:i,itemSize:o,groupIndices:l,..._,...I,...v,sizes:d,...w}),Tr(La,xv,ni,W1e,D1e,bc,Sv,V1e,L1e,h6,G1e)),YS="-webkit-sticky",iD="sticky",b6=y6(()=>{if(typeof document>"u")return iD;const e=document.createElement("div");return e.style.position=YS,e.style.position===YS?YS:iD});function w6(e,t){const r=ue.useRef(null),n=ue.useCallback(s=>{if(s===null||!s.offsetParent)return;const l=s.getBoundingClientRect(),u=l.width;let c,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;c=f.height-Math.max(0,h),d=h+t.scrollTop}else c=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;r.current={offsetTop:d,visibleHeight:c,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:o}=wO(n),a=ue.useCallback(()=>{n(o.current)},[n,o]);return ue.useEffect(()=>{if(t){t.addEventListener("scroll",a);const s=new ResizeObserver(()=>{requestAnimationFrame(a)});return s.observe(t),()=>{t.removeEventListener("scroll",a),s.unobserve(t)}}else return window.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[a,t]),i}const S6=ue.createContext(void 0),_6=ue.createContext(void 0);function x6(e){return e}const Y1e=Jt(()=>{const e=Pe(l=>`Item ${l}`),t=Pe(null),r=Pe(l=>`Group ${l}`),n=Pe({}),i=Pe(x6),o=Pe("div"),a=Pe(Hf),s=(l,u=null)=>Xn(fe(n,Re(c=>c[l]),Pr()),u);return{context:t,itemContent:e,groupContent:r,components:n,computeItemKey:i,headerFooterTag:o,scrollerRef:a,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),X1e=Jt(([e,t])=>({...e,...t}),Tr(Q1e,Y1e)),J1e=({height:e})=>ue.createElement("div",{style:{height:e}}),Z1e={position:b6(),zIndex:1,overflowAnchor:"none"},eSe={overflowAnchor:"none"},oD=ue.memo(function({showTopList:t=!1}){const r=St("listState"),n=co("sizeRanges"),i=St("useWindowScroll"),o=St("customScrollParent"),a=co("windowScrollContainerState"),s=co("scrollContainerState"),l=o||i?a:s,u=St("itemContent"),c=St("context"),d=St("groupContent"),f=St("trackItemSizes"),h=St("itemSize"),m=St("log"),v=co("gap"),{callbackRef:w}=p1e(n,h,f,t?Hf:l,m,v,o),[p,g]=ue.useState(0);TO("deviation",R=>{p!==R&&g(R)});const b=St("EmptyPlaceholder"),_=St("ScrollSeekPlaceholder")||J1e,P=St("ListComponent"),C=St("ItemComponent"),x=St("GroupComponent"),T=St("computeItemKey"),I=St("isSeeking"),M=St("groupIndices").length>0,H=St("alignToBottom"),re=St("initialItemFinalLocationReached"),ie=t?{}:{boxSizing:"border-box",paddingTop:r.offsetTop,paddingBottom:r.offsetBottom,marginTop:p!==0?p:H?"auto":0,...re?{}:{visibility:"hidden"}};return!t&&r.totalCount===0&&b?ue.createElement(b,Gn(b,c)):ue.createElement(P,{...Gn(P,c),ref:w,style:ie,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?r.topItems:r.items).map(R=>{const L=R.originalIndex,X=T(L+r.firstItemIndex,R.data,c);return I?ue.createElement(_,{...Gn(_,c),key:X,index:R.index,height:R.size,type:R.type||"item",...R.type==="group"?{}:{groupIndex:R.groupIndex}}):R.type==="group"?ue.createElement(x,{...Gn(x,c),key:X,"data-index":L,"data-known-size":R.size,"data-item-index":R.index,style:Z1e},d(R.index,c)):ue.createElement(C,{...Gn(C,c),...nSe(C,R.data),key:X,"data-index":L,"data-known-size":R.size,"data-item-index":R.index,"data-item-group-index":R.groupIndex,style:eSe},M?u(R.index,R.groupIndex,R.data,c):u(R.index,R.data,c))}))}),tSe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Aw=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),rSe={width:"100%",position:b6(),top:0,zIndex:1};function Gn(e,t){if(typeof e!="string")return{context:t}}function nSe(e,t){return{item:typeof e=="string"?void 0:t}}const iSe=ue.memo(function(){const t=St("HeaderComponent"),r=co("headerHeight"),n=St("headerFooterTag"),i=yc(a=>r(Dl(a,"height"))),o=St("context");return t?ue.createElement(n,{ref:i},ue.createElement(t,Gn(t,o))):null}),oSe=ue.memo(function(){const t=St("FooterComponent"),r=co("footerHeight"),n=St("headerFooterTag"),i=yc(a=>r(Dl(a,"height"))),o=St("context");return t?ue.createElement(n,{ref:i},ue.createElement(t,Gn(t,o))):null});function P6({usePublisher:e,useEmitter:t,useEmitterValue:r}){return ue.memo(function({style:o,children:a,...s}){const l=e("scrollContainerState"),u=r("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=r("scrollerRef"),f=r("context"),{scrollerRef:h,scrollByCallback:m,scrollToCallback:v}=n6(l,c,u,d);return t("scrollTo",v),t("scrollBy",m),ue.createElement(u,{ref:h,style:{...tSe,...o},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...s,...Gn(u,f)},a)})}function C6({usePublisher:e,useEmitter:t,useEmitterValue:r}){return ue.memo(function({style:o,children:a,...s}){const l=e("windowScrollContainerState"),u=r("ScrollerComponent"),c=e("smoothScrollTargetReached"),d=r("totalListHeight"),f=r("deviation"),h=r("customScrollParent"),m=r("context"),{scrollerRef:v,scrollByCallback:w,scrollToCallback:p}=n6(l,c,u,Hf,h);return d1e(()=>(v.current=h||window,()=>{v.current=null}),[v,h]),t("windowScrollTo",p),t("scrollBy",w),ue.createElement(u,{style:{position:"relative",...o,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...s,...Gn(u,m)},a)})}const aSe=({children:e})=>{const t=ue.useContext(S6),r=co("viewportHeight"),n=co("fixedItemHeight"),i=St("alignToBottom"),o=yc(Jz(r,a=>Dl(a,"height")));return ue.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),ue.createElement("div",{style:Aw(i),ref:o,"data-viewport-type":"element"},e)},sSe=({children:e})=>{const t=ue.useContext(S6),r=co("windowViewportRect"),n=co("fixedItemHeight"),i=St("customScrollParent"),o=w6(r,i),a=St("alignToBottom");return ue.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),ue.createElement("div",{ref:o,style:Aw(a),"data-viewport-type":"window"},e)},lSe=({children:e})=>{const t=St("TopItemListComponent")||"div",r=St("headerHeight"),n={...rSe,marginTop:`${r}px`},i=St("context");return ue.createElement(t,{style:n,...Gn(t,i)},e)},uSe=ue.memo(function(t){const r=St("useWindowScroll"),n=St("topItemsIndexes").length>0,i=St("customScrollParent"),o=i||r?fSe:dSe,a=i||r?sSe:aSe;return ue.createElement(o,{...t},n&&ue.createElement(lSe,null,ue.createElement(oD,{showTopList:!0})),ue.createElement(a,null,ue.createElement(iSe,null),ue.createElement(oD,null),ue.createElement(oSe,null)))}),{Component:cSe,usePublisher:co,useEmitterValue:St,useEmitter:TO}=t6(X1e,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},uSe),dSe=P6({usePublisher:co,useEmitterValue:St,useEmitter:TO}),fSe=C6({usePublisher:co,useEmitterValue:St,useEmitter:TO}),Dw=cSe,aD={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},hSe={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:sD,ceil:lD,floor:B0,min:XS,max:_p}=Math;function pSe(e){return{...hSe,items:e}}function uD(e,t,r){return Array.from({length:t-e+1}).map((n,i)=>{const o=r===null?null:r[i+e];return{index:i+e,data:o}})}function mSe(e,t){return e&&e.column===t.column&&e.row===t.row}function Cg(e,t){return e&&e.width===t.width&&e.height===t.height}const vSe=Jt(([{overscan:e,visibleRange:t,listBoundary:r},{scrollTop:n,viewportHeight:i,scrollBy:o,scrollTo:a,smoothScrollTargetReached:s,scrollContainerState:l,footerHeight:u,headerHeight:c},d,f,{propsReady:h,didMount:m},{windowViewportRect:v,useWindowScroll:w,customScrollParent:p,windowScrollContainerState:g,windowScrollTo:b},_])=>{const P=Pe(0),C=Pe(0),x=Pe(aD),T=Pe({height:0,width:0}),I=Pe({height:0,width:0}),M=Et(),H=Et(),re=Pe(0),ie=Pe(null),R=Pe({row:0,column:0}),L=Et(),X=Et(),Q=Pe(!1),W=Pe(0),te=Pe(!0),G=Pe(!1);Qt(fe(m,vt(W),nt(([D,ee])=>!!ee)),()=>{dt(te,!1),dt(C,0)}),Qt(fe(gn(m,te,I,T,W,G),nt(([D,ee,oe,ve,,Se])=>D&&!ee&&oe.height!==0&&ve.height!==0&&!Se)),([,,,,D])=>{dt(G,!0),xO(1,()=>{dt(M,D)}),Da(fe(n),()=>{dt(r,[0,0]),dt(te,!0)})}),Be(fe(X,nt(D=>D!=null&&D.scrollTop>0),pa(0)),C),Qt(fe(m,vt(X),nt(([,D])=>D!=null)),([,D])=>{D&&(dt(T,D.viewport),dt(I,D==null?void 0:D.item),dt(R,D.gap),D.scrollTop>0&&(dt(Q,!0),Da(fe(n,gf(1)),ee=>{dt(Q,!1)}),dt(a,{top:D.scrollTop})))}),Be(fe(T,Re(({height:D})=>D)),i),Be(fe(gn(at(T,Cg),at(I,Cg),at(R,(D,ee)=>D&&D.column===ee.column&&D.row===ee.row),at(n)),Re(([D,ee,oe,ve])=>({viewport:D,item:ee,gap:oe,scrollTop:ve}))),L),Be(fe(gn(at(P),t,at(R,mSe),at(I,Cg),at(T,Cg),at(ie),at(C),at(Q),at(te),at(W)),nt(([,,,,,,,D])=>!D),Re(([D,[ee,oe],ve,Se,$e,ge,st,,Vt,ce])=>{const{row:ye,column:Xe}=ve,{height:kt,width:zr}=Se,{width:Zt}=$e;if(st===0&&(D===0||Zt===0))return aD;if(zr===0){const Dn=PO(ce,D),Mn=Dn===0?Math.max(st-1,0):Dn;return pSe(uD(Dn,Mn,ge))}const Or=E6(Zt,zr,Xe);let jt,ct;Vt?ee===0&&oe===0&&st>0?(jt=0,ct=st-1):(jt=Or*B0((ee+ye)/(kt+ye)),ct=Or*lD((oe+ye)/(kt+ye))-1,ct=XS(D-1,_p(ct,Or-1)),jt=XS(ct,_p(0,jt))):(jt=0,ct=-1);const en=uD(jt,ct,ge),{top:cn,bottom:yr}=cD($e,ve,Se,en),tn=lD(D/Or),Ar=tn*kt+(tn-1)*ye-yr;return{items:en,offsetTop:cn,offsetBottom:Ar,top:cn,bottom:yr,itemHeight:kt,itemWidth:zr}})),x),Be(fe(ie,nt(D=>D!==null),Re(D=>D.length)),P),Be(fe(gn(T,I,x,R),nt(([D,ee,{items:oe}])=>oe.length>0&&ee.height!==0&&D.height!==0),Re(([D,ee,{items:oe},ve])=>{const{top:Se,bottom:$e}=cD(D,ve,ee,oe);return[Se,$e]}),Pr(Am)),r);const A=Pe(!1);Be(fe(n,vt(A),Re(([D,ee])=>ee||D!==0)),A);const U=Di(fe(at(x),nt(({items:D})=>D.length>0),vt(P,A),nt(([{items:D},ee,oe])=>oe&&D[D.length-1].index===ee-1),Re(([,D])=>D-1),Pr())),N=Di(fe(at(x),nt(({items:D})=>D.length>0&&D[0].index===0),pa(0),Pr())),E=Di(fe(at(x),vt(Q),nt(([{items:D},ee])=>D.length>0&&!ee),Re(([{items:D}])=>({startIndex:D[0].index,endIndex:D[D.length-1].index})),Pr(p6),nl(0)));Be(E,f.scrollSeekRangeChanged),Be(fe(M,vt(T,I,P,R),Re(([D,ee,oe,ve,Se])=>{const $e=f6(D),{align:ge,behavior:st,offset:Vt}=$e;let ce=$e.index;ce==="LAST"&&(ce=ve-1),ce=_p(0,ce,XS(ve-1,ce));let ye=KP(ee,Se,oe,ce);return ge==="end"?ye=sD(ye-ee.height+oe.height):ge==="center"&&(ye=sD(ye-ee.height/2+oe.height/2)),Vt&&(ye+=Vt),{top:ye,behavior:st}})),a);const k=Xn(fe(x,Re(D=>D.offsetBottom+D.bottom)),0);return Be(fe(v,Re(D=>({width:D.visibleWidth,height:D.visibleHeight}))),T),{data:ie,totalCount:P,viewportDimensions:T,itemDimensions:I,scrollTop:n,scrollHeight:H,overscan:e,scrollBy:o,scrollTo:a,scrollToIndex:M,smoothScrollTargetReached:s,windowViewportRect:v,windowScrollTo:b,useWindowScroll:w,customScrollParent:p,windowScrollContainerState:g,deviation:re,scrollContainerState:l,footerHeight:u,headerHeight:c,initialItemCount:C,gap:R,restoreStateFrom:X,...f,initialTopMostItemIndex:W,gridState:x,totalListHeight:k,...d,startReached:N,endReached:U,rangeChanged:E,stateChanged:L,propsReady:h,stateRestoreInProgress:Q,..._}},Tr(CO,ni,_v,v6,Ql,EO,Gl));function cD(e,t,r,n){const{height:i}=r;if(i===void 0||n.length===0)return{top:0,bottom:0};const o=KP(e,t,r,n[0].index),a=KP(e,t,r,n[n.length-1].index)+i;return{top:o,bottom:a}}function KP(e,t,r,n){const i=E6(e.width,r.width,t.column),o=B0(n/i),a=o*r.height+_p(0,o-1)*t.row;return a>0?a+t.row:a}function E6(e,t,r){return _p(1,B0((e+r)/(B0(t)+r)))}const gSe=Jt(()=>{const e=Pe(u=>`Item ${u}`),t=Pe({}),r=Pe(null),n=Pe("virtuoso-grid-item"),i=Pe("virtuoso-grid-list"),o=Pe(x6),a=Pe("div"),s=Pe(Hf),l=(u,c=null)=>Xn(fe(t,Re(d=>d[u]),Pr()),c);return{context:r,itemContent:e,components:t,computeItemKey:o,itemClassName:n,listClassName:i,headerFooterTag:a,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),ySe=Jt(([e,t])=>({...e,...t}),Tr(vSe,gSe)),bSe=ue.memo(function(){const t=Rr("gridState"),r=Rr("listClassName"),n=Rr("itemClassName"),i=Rr("itemContent"),o=Rr("computeItemKey"),a=Rr("isSeeking"),s=Ko("scrollHeight"),l=Rr("ItemComponent"),u=Rr("ListComponent"),c=Rr("ScrollSeekPlaceholder"),d=Rr("context"),f=Ko("itemDimensions"),h=Ko("gap"),m=Rr("log"),v=Rr("stateRestoreInProgress"),w=yc(p=>{const g=p.parentElement.parentElement.scrollHeight;s(g);const b=p.firstChild;if(b){const{width:_,height:P}=b.getBoundingClientRect();f({width:_,height:P})}h({row:dD("row-gap",getComputedStyle(p).rowGap,m),column:dD("column-gap",getComputedStyle(p).columnGap,m)})});return v?null:ue.createElement(u,{ref:w,className:r,...Gn(u,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(p=>{const g=o(p.index,p.data,d);return a?ue.createElement(c,{key:g,...Gn(c,d),index:p.index,height:t.itemHeight,width:t.itemWidth}):ue.createElement(l,{...Gn(l,d),className:n,"data-index":p.index,key:g},i(p.index,p.data,d))}))}),wSe=ue.memo(function(){const t=Rr("HeaderComponent"),r=Ko("headerHeight"),n=Rr("headerFooterTag"),i=yc(a=>r(Dl(a,"height"))),o=Rr("context");return t?ue.createElement(n,{ref:i},ue.createElement(t,Gn(t,o))):null}),SSe=ue.memo(function(){const t=Rr("FooterComponent"),r=Ko("footerHeight"),n=Rr("headerFooterTag"),i=yc(a=>r(Dl(a,"height"))),o=Rr("context");return t?ue.createElement(n,{ref:i},ue.createElement(t,Gn(t,o))):null}),_Se=({children:e})=>{const t=ue.useContext(_6),r=Ko("itemDimensions"),n=Ko("viewportDimensions"),i=yc(o=>{n(o.getBoundingClientRect())});return ue.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),ue.createElement("div",{style:Aw(!1),ref:i},e)},xSe=({children:e})=>{const t=ue.useContext(_6),r=Ko("windowViewportRect"),n=Ko("itemDimensions"),i=Rr("customScrollParent"),o=w6(r,i);return ue.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),ue.createElement("div",{ref:o,style:Aw(!1)},e)},PSe=ue.memo(function({...t}){const r=Rr("useWindowScroll"),n=Rr("customScrollParent"),i=n||r?ESe:CSe,o=n||r?xSe:_Se;return ue.createElement(i,{...t},ue.createElement(o,null,ue.createElement(wSe,null),ue.createElement(bSe,null),ue.createElement(SSe,null)))}),{Component:tke,usePublisher:Ko,useEmitterValue:Rr,useEmitter:T6}=t6(ySe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},PSe),CSe=P6({usePublisher:Ko,useEmitterValue:Rr,useEmitter:T6}),ESe=C6({usePublisher:Ko,useEmitterValue:Rr,useEmitter:T6});function dD(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Mi.WARN),t==="normal"?0:parseInt(t??"0",10)}const TSe=me`
1350
- mutation DeleteProjectMst($data: DeleteProjectInput!) {
1351
- deleteProject(data: $data)
1352
- }
1353
- `,OSe=async e=>{const t=await Kt.mutate({mutation:TSe,variables:e});if(!t.data)throw t.errors;return t.data};class RSe{constructor(t,r,n){this.rootStore=t,this.organizationId=r,this.projectName=n}async execute(){const t=await this.deleteProjectRequest();return await this.updateProjectsConnection(),t}async deleteProjectRequest(){const{deleteProject:t}=await OSe({data:{organizationId:this.organizationId,projectName:this.projectName}});return t}async updateProjectsConnection(){const t=this.rootStore.cache.organization.get(this.organizationId),r=t==null?void 0:t.projectsConnection.edges.find(n=>n.node.name===this.projectName);t==null||t.projectsConnection.removeEdge(r==null?void 0:r.cursor)}}class ISe{constructor(t){this.rootStore=t}async delete(t,r){try{return await new RSe(this.rootStore,t,r).execute()}catch(n){return console.error(n),!1}}init(){}dispose(){}}const kSe=()=>{const[e]=S.useState(()=>new ISe(ze));return S.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},jSe=Ze(({organizationId:e,projectName:t})=>{const r=kSe(),[n,i]=S.useState(!1),o=S.useCallback(async()=>{i(!0),await r.delete(e,t),i(!1)},[r,e,t]);return y.jsx(Li,{"data-testid":`remove-project-${t}-button`,_hover:{backgroundColor:"gray.100"},"aria-label":"removeTable",color:"gray.400",icon:y.jsx(bw,{}),isLoading:n,variant:"ghost",onClick:o})});class $Se{constructor(t){this.rootStore=t,Le(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.meProjects.edges.length}get hasNextPage(){return this.meProjects.availableNextPage}get items(){return this.meProjects.edges.map(({node:t})=>({id:t.id,name:t.name,organizationId:t.organization.id,touched:t.rootBranch.touched,link:ASe(t)}))}get meProjects(){return this.rootStore.cache.meProjectsConnection}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.backend.queryMeProjects({first:100})}init(){}dispose(){}}const ASe=e=>ki(`/${yl}/${bl}/${wl}${e.rootBranch.touched?`/${yw}`:""}`,{organizationId:e.organization.id,projectName:e.name,branchName:e.rootBranch.name}),DSe=()=>{const[e]=S.useState(()=>new $Se(ze));return S.useEffect(()=>(e.init(),()=>e.dispose()),[e]),e},MSe="_Row_1lkxi_1",NSe="_RemoveRowButton_1lkxi_1",fD={Row:MSe,RemoveRowButton:NSe},FSe=Ze(()=>{const e=DSe();return y.jsx(Dw,{useWindowScroll:!0,totalCount:e.totalCount,defaultItemHeight:40,endReached:e.hasNextPage?e.tryToFetchNextPage:void 0,itemContent:t=>{const r=e.items[t];return y.jsx(Je,{height:"2.5rem",width:"100%",children:y.jsx(de,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:fD.Row,gap:"4px",paddingLeft:"1rem","data-testid":`project-${r.name}`,children:y.jsxs(de,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[y.jsxs(de,{minWidth:"150px",children:[y.jsxs(de,{gap:"4px",children:[y.jsx(Ye,{color:"gray.300",children:r.organizationId}),y.jsx(Ye,{color:"gray.300",children:"/"}),y.jsx(Ye,{_hover:{textDecoration:"underline"},children:y.jsx(wo,{to:r.link,"data-testid":`project-${r.organizationId}-${r.name}-link`,children:r.name})})]}),r.touched?"*":""]}),y.jsx(Je,{className:fD.RemoveRowButton,children:y.jsx(jSe,{organizationId:r.organizationId,projectName:r.name})})]})})},r.id)}})}),LSe=()=>{const[e,t]=Fz(!1),r=S.useCallback(()=>{t()},[t]);return y.jsx(Mf,{title:y.jsx(Je,{height:"40px"}),children:y.jsx(de,{flexDirection:"column",gap:"0.5rem",paddingBottom:"1rem",children:e?y.jsx(t1e,{onAdd:r,onCancel:t}):y.jsxs(y.Fragment,{children:[y.jsx(Qwe,{onClick:t}),y.jsx(FSe,{})]})})})};var Ce=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e))(Ce||{}),yn=(e=>(e.Tree="Tree",e.Json="Json",e.RefBy="RefBy",e))(yn||{});function BSe(e){throw new Error("[mobx-utils] "+e)}function V0(e,t){t===void 0&&(t="Illegal state"),e||BSe(t)}var O6=function(e){return e&&e!==Object.prototype&&Object.getOwnPropertyNames(e).concat(O6(Object.getPrototypeOf(e))||[])},VSe=function(e){var t=O6(e),r=t.filter(function(n,i){return t.indexOf(n)===i});return r},hD=function(e){return VSe(e).filter(function(t){return t!=="constructor"&&!~t.indexOf("__")})},GP="pending",z0="fulfilled",OO="rejected";function zSe(e){switch(this.state){case GP:return e.pending&&e.pending(this.value);case OO:return e.rejected&&e.rejected(this.value);case z0:return e.fulfilled?e.fulfilled(this.value):this.value}}function pD(e,t){if(V0(arguments.length<=2,"fromPromise expects up to two arguments"),V0(typeof e=="function"||typeof e=="object"&&e&&typeof e.then=="function","Please pass a promise or function to fromPromise"),e.isPromiseBasedObservable===!0)return e;typeof e=="function"&&(e=new Promise(e));var r=e;e.then(Ht("observableFromPromise-resolve",function(i){r.value=i,r.state=z0}),Ht("observableFromPromise-reject",function(i){r.value=i,r.state=OO})),r.isPromiseBasedObservable=!0,r.case=zSe;var n=t&&(t.state===z0||t.state===GP)?t.value:void 0;return wT(r,{value:n,state:GP},{},{deep:!1}),r}(function(e){e.reject=Ht("fromPromise.reject",function(r){var n=e(Promise.reject(r));return n.state=OO,n.value=r,n});function t(r){r===void 0&&(r=void 0);var n=e(Promise.resolve(r));return n.state=z0,n.value=r,n}e.resolve=Ht("fromPromise.resolve",t)})(pD||(pD={}));var Eg=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o};(function(){function e(t,r){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),rw(this),um(function(){n.current=r,n.subscription=t.subscribe(n)})}return Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(e.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t}}),Object.defineProperty(e.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(e.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t,this.dispose()}}),Eg([xt.ref],e.prototype,"current",void 0),Eg([Ht.bound],e.prototype,"next",null),Eg([Ht.bound],e.prototype,"complete",null),Eg([Ht.bound],e.prototype,"error",null),e})();var U0=function(){return U0=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},U0.apply(this,arguments)},Ch=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},USe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"],qSe=function(){function e(t){var r=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:xt.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:xt.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return r.localValues.has(i)}}),rw(this),V0(xi(t),"createViewModel expects an observable object");var n=hD(this);hD(t).forEach(function(i){var o;if(!n.includes(i)&&!(i===Ve||i==="__mobxDidRunLazyInitializers")){if(V0(USe.indexOf(i)===-1,"The propertyname "+i+" is reserved and cannot be used with viewModels"),dS(t,i)){var a=Yo(t,i),s=a.derivation.bind(r),l=(o=a.setter_)===null||o===void 0?void 0:o.bind(r);r.localComputedValues.set(i,Mr(s,{set:l}))}var u=Object.getOwnPropertyDescriptor(t,i),c=u?{enumerable:u.enumerable}:{};Object.defineProperty(r,i,U0(U0({},c),{configurable:!0,get:function(){return dS(t,i)?r.localComputedValues.get(i).get():r.isPropertyDirty(i)?r.localValues.get(i):r.model[i]},set:Ht(function(d){dS(t,i)?r.localComputedValues.get(i).set(d):d!==r.model[i]?r.localValues.set(i,d):r.localValues.delete(i)})}))}})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;dm(this.localValues).forEach(function(r){var n=t.localValues.get(r),i=t.model[r];So(i)?i.replace(n):_i(i)?(i.clear(),i.merge(n)):Ble(n)||(t.model[r]=n)}),this.localValues.clear()}}),Object.defineProperty(e.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(e.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.localValues.delete(t)}}),Ch([Mr],e.prototype,"isDirty",null),Ch([Mr],e.prototype,"changedValues",null),Ch([Ht.bound],e.prototype,"submit",null),Ch([Ht.bound],e.prototype,"reset",null),Ch([Ht.bound],e.prototype,"resetProperty",null),e}();function wc(e){return new qSe(e)}var HSe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(e){HSe(t,e);function t(r,n,i){var o=i===void 0?{}:i,a=o.name,s=a===void 0?"ogm"+(Math.random()*1e3|0):a,l=o.keyToName,u=l===void 0?function(f){return""+f}:l,c=e.call(this)||this;Object.defineProperty(c,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),c._keyToName=u,c._groupBy=n,c._ogmInfoKey=Symbol("ogmInfo"+s),c._base=r;for(var d=0;d<r.length;d++)c._addItem(r[d]);return c._disposeBaseObserver=tw(c._base,function(f){if(f.type==="splice")Fo(function(){for(var h=0,m=f.removed;h<m.length;h++){var v=m[h];c._removeItem(v)}for(var w=0,p=f.added;w<p.length;w++){var g=p[w];c._addItem(g)}});else if(f.type==="update")Fo(function(){c._removeItem(f.oldValue),c._addItem(f.newValue)});else throw new Error("illegal state")}),c}return Object.defineProperty(t.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var r=0;r<this._base.length;r++){var n=this._base[r],i=n[this._ogmInfoKey];i.reaction(),delete n[this._ogmInfoKey]}}}),Object.defineProperty(t.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=e.prototype.get.call(this,r);return n===void 0&&(n=xt([],{name:"GroupArray["+this._keyToName(r)+"]",deep:!1}),e.prototype.set.call(this,r,n)),n}}),Object.defineProperty(t.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=e.prototype.get.call(this,r);i.length===1?e.prototype.delete.call(this,r):(n===i.length-1||(i[n]=i[i.length-1],i[n][this._ogmInfoKey].groupArrIndex=n),i.length--)}}),Object.defineProperty(t.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=this._groupBy(r),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:Ia(function(){return n._groupBy(r)},function(s,l){var u=r[n._ogmInfoKey];n._removeFromGroupArr(u.groupByValue,u.groupArrIndex);var c=n._getGroupArr(s),d=c.length;c.push(r),u.groupByValue=s,u.groupArrIndex=d})};Object.defineProperty(r,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(r)}}),Object.defineProperty(t.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r[this._ogmInfoKey];this._removeFromGroupArr(n.groupByValue,n.groupArrIndex),n.reaction(),delete r[this._ogmInfoKey]}}),t})(nw);class _y{constructor(t,r=Br()){le(this,"type",Ce.Array);this.items=t,this.nodeId=r,Le(this)}getPlainSchema(){return Zx({type:this.type,items:this.items.getPlainSchema()})}}var ws=(e=>(e.Object="object",e.Array="array",e.String="string",e.StringForeignKey="stringForeignKey",e.Number="number",e.Boolean="boolean",e))(ws||{});class RO{constructor(t=Br()){le(this,"type",Ce.Object);le(this,"additionalProperties",!1);le(this,"required",[]);le(this,"properties",{});this.nodeId=t,Le(this)}get empty(){return Object.keys(this.properties).length===0}addPropertyWithStore(t,r){if(this.properties[t]||this.required.includes(t))throw new Error("this name already exists");return this.required.push(t),this.properties[t]=r}getPlainSchema(){return Zx({type:this.type,additionalProperties:this.additionalProperties,required:Zx(this.required).sort(),properties:Object.entries(this.properties).reduce((t,[r,n])=>(t[r]=n.getPlainSchema(),t),{})})}}class Vr{constructor(){le(this,"nodeId",Br());le(this,"type",ws.Object);le(this,"state");Le(this,{},{autoBind:!0}),this.state=wc(xt({id:"",properties:[],parent:null,connectedToParent:!1}))}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get properties(){return this.state.model.properties}get draftProperties(){return this.state.properties}get addedProperties(){return this.draftProperties.filter(t=>!t.parent&&!this.properties.find(r=>r.nodeId===t.nodeId))}get removedProperties(){return this.properties.filter(t=>{const r=!this.draftProperties.find(n=>n.nodeId===t.nodeId);return!t.draftConnectedToParent&&r})}get notChangedProperties(){return this.properties.filter(t=>this.draftProperties.find(r=>r===t))}get replacedProperties(){return this.properties.filter(t=>this.draftProperties.find(r=>r.nodeId===t.nodeId&&r!==t)).map(t=>{const r=this.draftProperties.find(n=>n.nodeId===t.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:t,currentProperty:r}})}get movedProperties(){return this.draftProperties.filter(t=>t.parent&&t.parent!==this)}get changedIdProperties(){return this.draftProperties.filter(t=>{const r=this.properties.find(n=>n.nodeId===t.nodeId);return r&&t.draftId!==r.id}).map(t=>{const r=this.properties.find(n=>n.nodeId===t.nodeId);if(!r)throw new Error("Invalid replacedProperties");return{previousProperty:r,currentProperty:t}})}getSchema(t){const r=new RO;return t!=null&&t.skipObjectProperties||this.state.properties.forEach(n=>{t!=null&&t.skipMovedBetweenParentsNodes&&n.parent!==n.draftParent||(n instanceof jn||n instanceof Vr?r.addPropertyWithStore(n.draftId,n.getSchema(t)):r.addPropertyWithStore(n.draftId,n.getSchema()))}),r}get isValid(){const t=new Set(this.state.properties.map(n=>n.draftId)).size===this.state.properties.length,r=this.state.properties.every(n=>n.isValid&&!!n.draftId);return t&&r}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.properties.some(t=>t.isDirty)}get showingCreateField(){return!!this.state.id||!!this.state.parent}get isDisabledCreateField(){var n;const t=!!this.state.id||!this.state.id&&((n=this.state.parent)==null?void 0:n.type)===ws.Array,r=this.state.properties.every(i=>!!i.draftId);return!t||!r}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}removeProperty(t){const r=this.state.properties.findIndex(n=>n.nodeId===t);r!==-1&&(this.state.properties[r].onRemoveFromParent(),this.createIfNeededNextProperties(),this.state.properties.splice(r,1),this.resetIfNeededProperties())}addProperty(t,r=null){if(t.draftParent instanceof Vr)t.draftParent.removeProperty(t.nodeId);else if(t.draftParent instanceof jn)throw new Error("Invalid parent");t.setParent(this),this.createIfNeededNextProperties();const n=this.state.properties.findIndex(o=>o===(r==null?void 0:r.beforeNode)),i=this.state.properties.findIndex(o=>o===(r==null?void 0:r.afterNode));n!==-1?this.state.properties.splice(n,0,t):i!==-1?this.state.properties.splice(i+1,0,t):this.state.properties.push(t)}getProperty(t){const r=this.properties.find(n=>n.id===t);if(!r)throw new Error("Invalid id");return r}getDraftProperty(t){const r=this.draftProperties.find(n=>n.id===t);if(!r)throw new Error("Invalid id");return r}hasProperty(t){return!!this.state.properties.find(n=>n===t)}replaceProperty(t,r){const n=this.state.properties.findIndex(i=>i.nodeId===t.nodeId);n!==-1&&(t.onRemoveFromParent(),t.parent&&(r.setId(t.id),r.setParent(t.parent),r.submitChanges()),r.setId(t.draftId),r.setNodeId(t.nodeId),r.setParent(this),this.createIfNeededNextProperties(),this.state.properties.splice(n,1,r))}submitChanges(){this.state.submit();for(const t of this.state.properties)t.submitChanges()}resetChanges(){this.state.reset();for(const t of this.state.properties)t.resetChanges()}createIfNeededNextProperties(){this.state.isPropertyDirty("properties")||(this.state.properties=this.state.properties.slice())}resetIfNeededProperties(){const t=this.state.model.properties.map(n=>n.nodeId),r=this.state.properties.map(n=>n.nodeId);if(t.length===r.length){for(let n=0;n<t.length;n++)if(t[n]!==r[n])return;this.state.resetProperty("properties")}}}class jn{constructor(t){le(this,"nodeId",Br());le(this,"type",ws.Array);le(this,"state");Le(this,{},{autoBind:!0}),t.setParent(this),t.submitChanges(),this.state=wc(xt({id:"",items:t,parent:null,connectedToParent:!1}))}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get items(){return this.state.model.items}get draftItems(){return this.state.items}getSchema(t){return this.state.items instanceof jn?new _y(this.state.items.getSchema(t)):this.state.items instanceof Vr?new _y(this.state.items.getSchema(t)):new _y(this.state.items.getSchema())}get isValid(){return this.state.items.isValid}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself||this.state.items.isDirty}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}replaceItems(t){t.draftParent instanceof Vr&&t.draftParent.removeProperty(t.nodeId),t.setNodeId(this.state.items.nodeId),t.setParent(this),this.state.items=t}submitChanges(){this.state.submit(),this.state.items.submitChanges()}resetChanges(){this.state.reset(),this.state.items.resetChanges()}}class R6{constructor(t=Br()){le(this,"type",Ce.Boolean);le(this,"default",!1);this.nodeId=t,Le(this)}getPlainSchema(){return{type:this.type,default:this.default}}}class WSe{constructor(){le(this,"nodeId",Br());le(this,"type",ws.Boolean);le(this,"state");Le(this,{},{autoBind:!0}),this.state=wc(xt({id:"",parent:null,connectedToParent:!1}))}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){return new R6}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}class I6{constructor(t=Br()){le(this,"type",Ce.Number);le(this,"default",0);this.nodeId=t,Le(this)}getPlainSchema(){return{type:this.type,default:this.default}}}class KSe{constructor(){le(this,"nodeId",Br());le(this,"type",ws.Number);le(this,"state");Le(this,{},{autoBind:!0}),this.state=wc(xt({id:"",parent:null,connectedToParent:!1}))}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}getSchema(){return new I6}get isValid(){return!0}get isDirtyItself(){return this.state.isDirty}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}class IO{constructor(t=Br()){le(this,"type",Ce.String);le(this,"default","");le(this,"foreignKey");this.nodeId=t,Le(this)}getPlainSchema(){const t={type:this.type,default:this.default};return this.foreignKey&&(t.foreignKey=this.foreignKey),t}}class Nu{constructor(){le(this,"nodeId",Br());le(this,"type",ws.String);le(this,"state");Le(this,{},{autoBind:!0}),this.state=wc(xt({id:"",foreignKey:null,parent:null,connectedToParent:!1}))}setNodeId(t){this.nodeId=t}get id(){return this.state.model.id}get draftId(){return this.state.id}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}getSchema(){var r,n;const t=new IO;return t.foreignKey=((r=this.state.foreignKey)==null?void 0:r.draftForeignKey)!==null?(n=this.state.foreignKey)==null?void 0:n.draftForeignKey:void 0,t}get isValid(){return!(this.state.foreignKey&&!this.state.foreignKey.draftForeignKey)}get isDirtyItself(){return this.state.isDirty||!!(this.state.foreignKey&&this.state.foreignKey.isDirtyItself)}get isDirty(){return this.isDirtyItself}setId(t){this.state.id=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}setForeignKey(t){this.state.foreignKey=t,t&&t.setParent(this)}submitChanges(){this.state.submit(),this.state.foreignKey&&this.state.foreignKey.submitChanges()}resetChanges(){this.state.reset(),this.state.foreignKey&&this.state.foreignKey.resetChanges()}}class GSe{constructor(){le(this,"nodeId",Br());le(this,"type",ws.StringForeignKey);le(this,"state");Le(this,{},{autoBind:!0}),this.state=wc(xt({foreignKey:null,parent:null,connectedToParent:!1}))}get parent(){return this.state.model.parent}get draftParent(){return this.state.parent}get connectedToParent(){return this.state.model.connectedToParent}get draftConnectedToParent(){return this.state.connectedToParent}setNodeId(t){this.nodeId=t}get foreignKey(){return this.state.model.foreignKey}get draftForeignKey(){return this.state.foreignKey}get isDirtyItself(){return this.state.isDirty}setForeignKey(t){this.state.foreignKey=t}setParent(t){this.state.parent=t,this.state.connectedToParent=!0}onRemoveFromParent(){this.state.connectedToParent=!1}submitChanges(){this.state.submit()}resetChanges(){this.state.reset()}}const QSe=e=>{switch(e.type){case Ce.Object:{const t=new Vr;return Object.entries(e.properties).forEach(([r,n])=>{const i=yf(n);i.setId(r),t.addProperty(i)}),t}case Ce.Array:{const t=yf(e.items);return new jn(t)}case Ce.String:{const t=new Nu;if(e.foreignKey!==void 0){const r=new GSe;r.setForeignKey(e.foreignKey),t.setForeignKey(r)}return t}case Ce.Number:return new KSe;case Ce.Boolean:return new WSe}},yf=e=>QSe(e),YSe=(e,t=!1)=>{let r="",n=e;for(;n.draftParent;)n.draftParent instanceof Vr?r=`/properties/${n===e&&t?n.id:n.draftId}${r}`:n.draftParent instanceof jn&&(r=`/items${r}`),n=n.draftParent;return r};function*q0(e,t,r){if(yield*t(e),e instanceof Vr)for(const n of e.draftProperties)yield*q0(n,t);else e instanceof jn&&(yield*q0(e.draftItems,t))}function QP(e,t,r){let n=!0;if(r||(n=t(e)),!n)return!1;if(e instanceof Vr)for(const i of e.draftProperties)QP(i,t);else e instanceof jn&&QP(e.draftItems,t)}const XSe=e=>[...q0(e,function*(t){(t instanceof Vr||t instanceof jn)&&(yield t)})],k6=(e,t)=>e.draftParent?e===t?!0:k6(e.draftParent,t):!1,mD=e=>{const t=[];let r=e.draftParent;for(;r;)t.push(r),r=r.draftParent;return t},JSe=(e,t)=>{const r=mD(t),n=mD(e),i=r.find(a=>a instanceof jn);return i?!n.find(a=>a===i):!1},Bh=(e,t)=>!(!t.draftParent||e===t||e===t.draftParent||k6(e,t)||JSe(e,t)),nu=(e,t)=>{const r=[e];let n=e,i=H0(e,t==null?void 0:t.preferDraftParent);for(;i;)r.push(i),n=i,i=H0(n,t==null?void 0:t.preferDraftParent);return r},Eh=e=>{let t="",r=e[0];for(let n=1;n<e.length;n++){const i=e[n];i instanceof Vr?t=`/properties/${j6(r,!1)}${t}`:i instanceof jn&&(t=`/items${t}`),r=i}return t},vD=(e,t)=>{let r="",n=e,i=H0(e,t==null?void 0:t.preferDraftParent);for(;i;)i instanceof Vr?r=`/properties/${n===e&&t.preferStartWithNotDraftId?n.id:j6(n,t==null?void 0:t.preferDraftId)}${r}`:i instanceof jn&&(r=`/items${r}`),n=i,i=H0(n,t==null?void 0:t.preferDraftParent);return r},H0=(e,t)=>t?e.draftParent||e.parent:e.parent||e.draftParent,j6=(e,t)=>t?e.draftId||e.id:e.id||e.draftId;class ZSe{constructor(){le(this,"stack",[]);le(this,"setIdMap",new Set)}add(t){this.stack.push({node:t,op:"add",sequence:nu(t,{preferDraftParent:!0})})}remove(t){const r=this.stack.findIndex(n=>n.node===t&&n.op==="add");this.deepRemovePatches(t),r===-1&&this.stack.push({node:t,op:"remove",sequence:nu(t,{preferDraftParent:!0})})}replace(t,r){if(this.checkIfStringDuplicationInReplace(r))return;this.stack.findIndex(i=>i.node.nodeId===r.nodeId&&i.op==="add")!==-1?(this.deepRemovePatches(t,!1),this.stack.push({node:r,op:"add",sequence:nu(r,{preferDraftParent:!0})})):(this.deepRemovePatches(t,!0),this.stack.push({node:r,op:"replace",sequence:nu(r,{preferDraftParent:!0})}))}move(t){const r=this.stack.findIndex(i=>i.node===t&&i.op==="move");r!==-1&&this.stack.splice(r,1),t.parent===t.draftParent&&t.id===t.draftId||this.stack.push({node:t,op:"move",fromSequence:nu(t,{preferDraftParent:!1}),toSequence:nu(t,{preferDraftParent:!0})})}reset(){this.stack.length=0,this.setIdMap.clear()}getPatches(t){return[...this.getStackPatches(),...this.getMoveIdPatches(t)]}setId(t){this.setIdMap.add(t.nodeId)}getMoveIdPatches(t){const r=this;return[...q0(t,function*(i){r.setIdMap.has(i.nodeId)&&i.draftParent instanceof Vr&&(yield{op:"move",from:vD(i,{preferDraftParent:!0,preferDraftId:!0,preferStartWithNotDraftId:!0}),path:vD(i,{preferDraftParent:!0,preferDraftId:!0})})})]}getStackPatches(){return this.stack.map(t=>{switch(t.op){case"add":return{op:"add",path:Eh(t.sequence),value:t.node.getSchema({skipMovedBetweenParentsNodes:!0}).getPlainSchema()};case"replace":return{op:"replace",path:Eh(t.sequence),value:t.node.getSchema({skipMovedBetweenParentsNodes:!0}).getPlainSchema()};case"remove":return{op:"remove",path:Eh(t.sequence)};case"move":return{op:"move",from:Eh(t.fromSequence),path:Eh(t.toSequence)}}})}checkIfStringDuplicationInReplace(t){return!!(t.type===ws.String&&this.stack.find(n=>n.node===t))}deepRemovePatches(t,r){QP(t,n=>{let i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");for(;i!==-1;)this.stack.splice(i,1),i=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op!=="move");const o=this.stack.findIndex(a=>a.node.nodeId===n.nodeId&&a.op==="move");return o!==-1?(this.stack.splice(o,1,{node:n,op:"remove",sequence:nu(n,{preferDraftParent:!1})}),this.deepRemovePatches(n,!0),!1):!0},r)}}class gD{constructor(t=new Vr,r=""){le(this,"viewMode",yn.Tree);le(this,"state");le(this,"history",new ZSe);Le(this,{},{autoBind:!0}),this.state=wc(xt({node:t,tableId:r}))}get node(){return this.state.node}get tableId(){return this.state.tableId}get draftTableId(){return this.state.node.draftId}get isApproveDisabled(){return!this.state.node.isValid||!this.state.node.isDirty}get isDirty(){return this.state.node.isDirty}get isDirtyItself(){return this.state.node.isDirtyItself}getPlainSchema(){return this.state.node.getSchema().getPlainSchema()}setViewMode(t){this.viewMode=t}getPatches(){return this.state.node!==this.state.model.node?[{op:"replace",path:"",value:this.state.node.getSchema().getPlainSchema()}]:[...this.history.getPatches(this.state.node)]}areThereDropTargets(t){return Mr(()=>!!XSe(this.state.node).filter(n=>Bh(n,t)).length).get()}replaceNode(t){this.state.node=t}submitChanges(){this.node.submitChanges(),this.state.tableId=this.node.id,this.state.submit(),this.history.reset()}resetChanges(){this.node.resetChanges(),this.history.reset()}setId(t,r){t.setId(r),t.parent&&this.history.setId(t)}addProperty(t,r,n=null){t.addProperty(r,n),r.parent?this.history.move(r):this.history.add(r)}removeProperty(t,r){t.removeProperty(r.nodeId),this.history.remove(r)}replaceProperty(t,r,n){t.replaceProperty(r,n),this.history.replace(r,n)}replaceItems(t,r){const n=t.draftItems;t.replaceItems(r),r.parent?this.history.move(r):this.history.replace(n,r)}setForeignKey(t,r){t.setForeignKey(r),this.history.replace(t,t)}setForeignKeyValue(t,r){t&&t.draftParent&&(t.setForeignKey(r),this.history.replace(t.draftParent,t.draftParent))}}const e_e=me`
1354
- mutation CreateTableMst($data: CreateTableInput!) {
1355
- createTable(data: $data) {
1356
- branch {
1357
- ...BranchMst
1358
- }
1359
- table {
1360
- ...TableMst
1361
- }
1362
- }
1363
- }
1364
- ${Rs}
1365
- ${Fa}
1366
- `,t_e=async e=>{const t=await Kt.mutate({mutation:e_e,variables:e});if(!t.data)throw t.errors;return t.data};class r_e{constructor(t,r,n,i){this.rootStore=t,this.branch=r,this.tableId=n,this.schema=i}async execute(){const t=await this.createTableRequest();return await this.refetchTablesConnection(),this.branch.touched||this.branch.updateTouched(!0),t}async createTableRequest(){const{createTable:t}=await t_e({data:{revisionId:this.branch.draft.id,tableId:this.tableId,schema:this.schema}});return this.addTableToCache(t.table)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(zf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:r.id},r.versionId),r}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}const n_e=me`
1367
- mutation RenameTableMst($data: RenameTableInput!) {
1368
- renameTable(data: $data) {
1369
- table {
1370
- ...TableMst
1371
- }
1372
- previousVersionTableId
1373
- }
1374
- }
1375
- ${Fa}
1376
- `,i_e=async e=>{const t=await Kt.mutate({mutation:n_e,variables:e});if(!t.data)throw t.errors;return t.data},o_e=me`
1377
- mutation UpdateTableMst($data: UpdateTableInput!) {
1378
- updateTable(data: $data) {
1379
- table {
1380
- ...TableMst
1381
- }
1382
- previousVersionTableId
1383
- }
1384
- }
1385
- ${Fa}
1386
- `,a_e=async e=>{const t=await Kt.mutate({mutation:o_e,variables:e});if(!t.data)throw t.errors;return t.data};class s_e{constructor(t,r,n){this.rootStore=t,this.branch=r,this.store=n}async execute(){const t=await this.updateTableRequest();this.resetRowsConnectionCache(),this.branch.touched||this.branch.updateTouched(!0),t&&await this.refetchTablesConnection()}async updateTableRequest(){let t=!1;if(this.store.tableId!==this.store.draftTableId){const n=await i_e({data:{revisionId:this.branch.draft.id,tableId:this.store.tableId,nextTableId:this.store.draftTableId}});this.addVersionedTableToCache(n.renameTable.table),t=!0}if(this.store.getPatches().length){const n=await a_e({data:{revisionId:this.branch.draft.id,tableId:this.store.draftTableId,patches:this.store.getPatches()}}),i=this.addVersionedTableToCache(n.updateTable.table),o=n.updateTable.previousVersionTableId;t=t||i.versionId!==o}return t}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(zf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.store.draftTableId},r.versionId),r}resetRowsConnectionCache(){const t=this.rootStore.cache.getTableByVariables({tableId:this.store.draftTableId,revisionId:this.branch.draft.id});t&&t.rowsConnection.reset()}async refetchTablesConnection(){await this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}}var En=(e=>(e.List="List",e.CreatingTable="CreatingTable",e.ConnectingForeignKeyTable="ConnectingForeignKeyTable",e.UpdatingTable="UpdatingTable",e))(En||{});class yD{constructor(t,r,n){le(this,"id",Br());this.rootStore=t,this.projectPageModel=r,this.state=n,Le(this,{},{autoBind:!0})}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyTable"&&this.state.foreignKeyNode.draftParent?YSe(this.state.foreignKeyNode.draftParent):""}get title(){return this.revision.id===this.branch.draft.id?`Branch - ${this.branch.name}[draft]`:this.revision.id===this.branch.head.id?`Branch - ${this.branch.name}`:`Branch - ${this.branch.name}[rev:${this.revision.id.slice(0,6)}]`}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyTable(t){if(this.state.type==="CreatingTable"||this.state.type==="UpdatingTable")this.state={type:"ConnectingForeignKeyTable",previousType:this.state.type,store:this.state.store,isSelectingForeignKey:this.state.isSelectingForeignKey,foreignKeyNode:t};else throw new Error("Invalid state")}toCreatingTable(){const t=this.state.type==="ConnectingForeignKeyTable"?this.state.store:new gD;this.state={type:"CreatingTable",store:t,isSelectingForeignKey:this.state.isSelectingForeignKey}}toUpdatingTableFromConnectingForeignKeyTable(){if(this.state.type!=="ConnectingForeignKeyTable")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingTable",store:t,isSelectingForeignKey:this.state.isSelectingForeignKey}}toUpdatingTableFromCreatingTable(){if(this.state.type!=="CreatingTable")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingTable",store:t,isSelectingForeignKey:!1}}toUpdatingTable(t){const r=this.rootStore.cache.getTable(t);if(!r)throw new Error(`Not found table.versionId ${t}`);const n=yf(r.schema);n.setId(r.id),n.submitChanges();const i=new gD(n,r.id);this.state={type:"UpdatingTable",store:i,isSelectingForeignKey:this.state.isSelectingForeignKey}}get branch(){return this.projectPageModel.branchOrThrow}get revision(){return this.projectPageModel.revisionOrThrow}init(){}dispose(){}async createTable(t,r){try{return await new r_e(this.rootStore,this.branch,t,r).execute(),!0}catch(n){return console.log(n),!1}}async updateTable(t){try{return await new s_e(this.rootStore,this.branch,t).execute(),!0}catch(r){return console.error(r),!1}}}class l_e{constructor(t,r){le(this,"stack");this.rootStore=t,this.projectPageModel=r,Le(this,{},{autoBind:!0}),this.stack=[this.createFirstStackItem()]}init(){}dispose(){}selectForeignKey(t,r){t.toConnectingForeignKeyTable(r),this.stack.push(new yD(this.rootStore,this.projectPageModel,{type:En.List,isSelectingForeignKey:!0}))}onSelectedForeignKey(t,r){const n=this.stack.findIndex(o=>o===t),i=this.stack[n-1];i.state.type===En.ConnectingForeignKeyTable&&(i.state.store.setForeignKeyValue(i.state.foreignKeyNode,r),i.state.previousType===En.CreatingTable?i.toCreatingTable():i.state.previousType===En.UpdatingTable&&i.toUpdatingTableFromConnectingForeignKeyTable()),this.stack.splice(n)}cancelSelectingForeignKey(t){const r=this.stack.findIndex(n=>n===t);r!==-1&&this.stack.splice(r+1),t.state.type===En.ConnectingForeignKeyTable&&(t.state.previousType===En.CreatingTable?t.toCreatingTable():t.state.previousType===En.UpdatingTable&&t.toUpdatingTableFromConnectingForeignKeyTable())}createFirstStackItem(){const t={type:En.List,isSelectingForeignKey:!1};return new yD(this.rootStore,this.projectPageModel,t)}}const u_e=()=>{const e=$n(),[t]=S.useState(()=>new l_e(ze,e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},$6=S.createContext(null),c_e=()=>{const e=S.useContext($6);if(!e)throw new Error("Invalid TableStackModelContext");return e},d_e=Ze(({onClick:e})=>{const t=$n();return y.jsx(Nf,{dataTestId:"create-table-button",isDisabled:!t.isEditableRevision,title:"Table",onClick:e})});var Ss=(e=>(e.Creating="Creating",e.Updating="Updating",e.Reading="Reading",e))(Ss||{});const A6=S.createContext(null),Pv=()=>{const e=S.useContext(A6);if(!e)throw new Error("Invalid SchemaEditorActions context");return e},f_e=({isSelected:e,onClick:t,icon:r,dataTestId:n})=>y.jsx(vo,{"data-testid":n,_disabled:e?{backgroundColor:"gray.50",cursor:"not-allowed"}:void 0,_hover:{backgroundColor:"gray.50"},isDisabled:e,alignSelf:"flex-start",variant:"ghost",onClick:t,width:"48px",children:r}),h_e=[{mode:yn.Tree,icon:y.jsx(ame,{}),dataTestId:"row-editor-mode-tree"},{mode:yn.Json,icon:y.jsx(Xpe,{}),dataTestId:"row-editor-mode-json"},{mode:yn.RefBy,icon:y.jsx(VV,{}),dataTestId:"row-editor-mode-refs"}],kO=({mode:e,onChange:t,availableRefByMode:r})=>{const n=S.useMemo(()=>h_e.filter(i=>!(i.mode===yn.RefBy&&!r)),[r]);return y.jsx(de,{gap:"4px",children:n.map(i=>y.jsx(f_e,{dataTestId:i.dataTestId,isSelected:i.mode===e,onClick:()=>{t==null||t(i.mode)},icon:i.icon},i.mode))})};var Cv={},Ev={};Object.defineProperty(Ev,"__esModule",{value:!0});Ev.bind=void 0;function p_e(e,t){var r=t.type,n=t.listener,i=t.options;return e.addEventListener(r,n,i),function(){e.removeEventListener(r,n,i)}}Ev.bind=p_e;var Mw={},Sd=Zs&&Zs.__assign||function(){return Sd=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Sd.apply(this,arguments)};Object.defineProperty(Mw,"__esModule",{value:!0});Mw.bindAll=void 0;var m_e=Ev;function bD(e){if(!(typeof e>"u"))return typeof e=="boolean"?{capture:e}:e}function v_e(e,t){if(t==null)return e;var r=Sd(Sd({},e),{options:Sd(Sd({},bD(t)),bD(e.options))});return r}function g_e(e,t,r){var n=t.map(function(i){var o=v_e(i,r);return(0,m_e.bind)(e,o)});return function(){n.forEach(function(o){return o()})}}Mw.bindAll=g_e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var t=Ev;Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return t.bind}});var r=Mw;Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})})(Cv);var xp={isSafari:!1,leavingWindow:Symbol("leaving"),enteringWindow:Symbol("entering")};function y_e(e){var t=e.dragLeave;return t.type!=="dragleave"?!1:xp.isSafari?t.hasOwnProperty(xp.leavingWindow):t.relatedTarget==null}(function(){if(typeof window>"u")return;var t=navigator,r=t.userAgent,n=r.includes("AppleWebKit")&&!r.includes("Chrome");if(!n)return;xp.isSafari=!0;function i(){return{enterCount:0,isOverWindow:!1}}var o=i();function a(){o=i()}Cv.bindAll(window,[{type:"dragstart",listener:function(){o.enterCount=0,o.isOverWindow=!0}},{type:"drop",listener:a},{type:"dragend",listener:a},{type:"dragenter",listener:function(l){!o.isOverWindow&&o.enterCount===0&&(l[xp.enteringWindow]=!0),o.isOverWindow=!0,o.enterCount++}},{type:"dragleave",listener:function(l){o.enterCount--,o.isOverWindow&&o.enterCount===0&&(l[xp.leavingWindow]=!0,o.isOverWindow=!1)}}],{capture:!0})})();function b_e(e,t){var r=t.property,n=t.rule,i=t.priority,o=i===void 0?"":i,a=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);return e.style.setProperty(r,n,o),function(){e.style.setProperty(r,a,s)}}function w_e(e){var t=e.current,r=document.elementFromPoint(t.input.clientX,t.input.clientY);return r instanceof HTMLElement?b_e(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function S_e(){var e,t=document.createElement("style");return t.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(t),(e=t.sheet)===null||e===void 0||e.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(t)}}function wD(e){var t=e.current;queueMicrotask(function(){var r=w_e({current:t}),n=S_e();function i(){o(),r==null||r(),n()}var o=Cv.bindAll(window,[{type:"pointerdown",listener:i},{type:"pointermove",listener:i},{type:"focusin",listener:i},{type:"focusout",listener:i},{type:"dragstart",listener:i}],{capture:!0})})}function jO(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var __e=function(t){var r=[],n=null,i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s,!n&&(n=requestAnimationFrame(function(){n=null,t.apply(void 0,r)}))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i},JS=__e(function(e){return e()}),Tg=function(){var e=null;function t(n){var i=requestAnimationFrame(function(){e=null,n()});e={frameId:i,fn:n}}function r(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:r}}();function x_e(e){var t=e.source,r=e.initial,n=e.dispatchEvent,i={dropTargets:[]};function o(s){n(s),i={dropTargets:s.payload.location.current.dropTargets}}var a={start:function(l){var u=l.nativeSetDragImage,c={current:r,previous:i,initial:r};o({eventName:"onGenerateDragPreview",payload:{source:t,location:c,nativeSetDragImage:u}}),Tg.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:c}})})},dragUpdate:function(l){var u=l.current;Tg.flush(),JS.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:r,previous:i,current:u}}})},drag:function(l){var u=l.current;JS(function(){Tg.flush();var c={initial:r,previous:i,current:u};o({eventName:"onDrag",payload:{source:t,location:c}})})},drop:function(l){var u=l.current,c=l.updatedExternalPayload;Tg.flush(),JS.cancel(),o({eventName:"onDrop",payload:{source:c??t,location:{current:u,previous:i,initial:r}}})}};return a}var YP=!1;function D6(){return!YP}function P_e(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function C_e(e){var t=e.current,r=e.next;if(t.length!==r.length)return!0;for(var n=0;n<t.length;n++)if(t[n].element!==r[n].element)return!0;return!1}function E_e(e){var t=e.event,r=e.dragInterface,n=e.getDropTargetsOver,i=e.dispatchEvent;if(!D6())return;YP=!0;var o=T_e({event:t,dragInterface:r,getDropTargetsOver:n}),a=o;ZS({event:t,current:o.dropTargets});var s=x_e({source:r.payload,dispatchEvent:i,initial:o});function l(m){var v=C_e({current:a.dropTargets,next:m.dropTargets});a=m,v&&s.dragUpdate({current:a})}function u(m){var v=jO(m),w=n({target:m.target,input:v,source:r.payload,current:a.dropTargets});w.length&&(m.preventDefault(),ZS({event:m,current:w})),l({dropTargets:w,input:v})}function c(m){var v=m.updatedExternalPayload;s.drop({current:a,updatedExternalPayload:v})}function d(){a.dropTargets.length&&l({dropTargets:[],input:a.input}),c({updatedExternalPayload:null}),f()}function f(){YP=!1,h()}var h=Cv.bindAll(window,[{type:"dragover",listener:function(v){u(v),s.drag({current:a})}},{type:"dragenter",listener:u},{type:"dragleave",listener:function(v){y_e({dragLeave:v})&&(l({input:a.input,dropTargets:[]}),r.startedFrom==="external"&&d())}},{type:"drop",listener:function(v){var w;v.preventDefault(),ZS({event:v,current:a.dropTargets}),c({updatedExternalPayload:r.startedFrom==="external"&&((w=r.getDropPayload)===null||w===void 0?void 0:w.call(r,v))||null}),f(),r.startedFrom==="internal"&&wD({current:a})}},{type:"dragend",listener:function(){d(),r.startedFrom==="internal"&&wD({current:a})}},{type:"pointermove",listener:function(){var m=0;return function(){if(m<20){m++;return}d()}}()},{type:"pointerdown",listener:d}],{capture:!0});s.start({nativeSetDragImage:P_e(t)})}function ZS(e){var t,r=e.event,n=e.current,i=(t=n[0])===null||t===void 0?void 0:t.dropEffect;i!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=i)}function T_e(e){var t=e.event,r=e.dragInterface,n=e.getDropTargetsOver,i=jO(t);if(r.startedFrom==="external")return{input:i,dropTargets:[]};var o=n({input:i,source:r.payload,target:t.target,current:[]});return{input:i,dropTargets:o}}var SD={canStart:D6,start:E_e},XP=new Map;function O_e(e){var t=e.typeKey,r=e.mount,n=XP.get(t);if(n)return n.usageCount++,n;var i={typeKey:t,unmount:r(),usageCount:1};return XP.set(t,i),i}function R_e(e){var t=O_e(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),XP.delete(e.typeKey))}}function JP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function I_e(e){if(Array.isArray(e))return JP(e)}function k_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j_e(e,t){if(e){if(typeof e=="string")return JP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return JP(e,t)}}function $_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1387
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A_e(e){return I_e(e)||k_e(e)||j_e(e)||$_e()}function M6(e,t){var r=t.attribute,n=t.value;return e.setAttribute(r,n),function(){return e.removeAttribute(r)}}function N6(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(i){return i()})}}function _D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_D(Object(r),!0).forEach(function(n){o5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D_e(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1388
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function D_e(e,t){if(e){if(typeof e=="string")return xD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xD(e,t)}}function xD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t_(e){return e.slice(0).reverse()}function M_e(e){var t=e.typeKey,r=e.defaultDropEffect,n=new WeakMap,i="data-drop-target-for-".concat(t),o="[".concat(i,"]");function a(h){return n.set(h.element,h),function(){return n.delete(h.element)}}function s(h){return N6(M6(h.element,{attribute:i,value:"true"}),a(h))}function l(h){var m,v,w,p,g,b=h.source,_=h.target,P=h.input,C=h.result,x=C===void 0?[]:C;if(!(_ instanceof Element))return x;var T=_.closest(o);if(T==null)return x;var I=n.get(T);if(I==null)return x;var M={input:P,source:b,element:I.element};if(I.canDrop&&!I.canDrop(M))return l({source:b,target:I.element.parentElement,input:P,result:x});var H=(m=(v=I.getData)===null||v===void 0?void 0:v.call(I,M))!==null&&m!==void 0?m:{},re=(w=(p=I.getDropEffect)===null||p===void 0?void 0:p.call(I,M))!==null&&w!==void 0?w:r,ie=!!(!((g=I.getIsSticky)===null||g===void 0)&&g.call(I,M)),R={data:H,element:I.element,dropEffect:re,sticky:ie};return l({source:b,target:I.element.parentElement,input:P,result:[].concat(A_e(x),[R])})}function u(h){var m=h.eventName,v=h.payload,w=e_(v.location.current.dropTargets),p;try{for(w.s();!(p=w.n()).done;){var g,b=p.value,_=n.get(b.element),P=Nc(Nc({},v),{},{self:b});_==null||(g=_[m])===null||g===void 0||g.call(_,P)}}catch(C){w.e(C)}finally{w.f()}}var c={onGenerateDragPreview:u,onDrag:u,onDragStart:u,onDrop:u,onDropTargetChange:function(m){var v=m.payload,w=new Set(v.location.current.dropTargets.map(function(Q){return Q.element})),p=new Set,g=e_(v.location.previous.dropTargets),b;try{for(g.s();!(b=g.n()).done;){var _,P=b.value;p.add(P.element);var C=n.get(P.element),x=w.has(P.element),T=Nc(Nc({},v),{},{self:P});if(C==null||(_=C.onDropTargetChange)===null||_===void 0||_.call(C,T),!x){var I;C==null||(I=C.onDragLeave)===null||I===void 0||I.call(C,T)}}}catch(Q){g.e(Q)}finally{g.f()}var M=e_(v.location.current.dropTargets),H;try{for(M.s();!(H=M.n()).done;){var re,ie,R=H.value;if(!p.has(R.element)){var L=Nc(Nc({},v),{},{self:R}),X=n.get(R.element);X==null||(re=X.onDropTargetChange)===null||re===void 0||re.call(X,L),X==null||(ie=X.onDragEnter)===null||ie===void 0||ie.call(X,L)}}}catch(Q){M.e(Q)}finally{M.f()}}};function d(h){c[h.eventName](h)}function f(h){var m=h.source,v=h.target,w=h.input,p=h.current,g=l({source:m,target:v,input:w});if(g.length>=p.length)return g;for(var b=t_(p),_=t_(g),P=[],C=0;C<b.length;C++){var x=b[C],T=_[C];if(T!=null){P.push(T);continue}if(!x.sticky)break;var I=P[C-1],M=b[C-1];if((I==null?void 0:I.element)===(M==null?void 0:M.element)){P.push(x);continue}break}return t_(P)}return{dropTargetForConsumers:s,getIsOver:f,dispatchEvent:d}}function N_e(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=F_e(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1389
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function F_e(e,t){if(e){if(typeof e=="string")return PD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PD(e,t)}}function PD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function L_e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CD(Object(r),!0).forEach(function(n){o5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B_e(){var e=new Set,t=null;function r(o){t&&(!o.canMonitor||o.canMonitor(t.canMonitorArgs))&&t.active.add(o)}function n(o){var a=L_e({},o);return e.add(a),r(a),function(){e.delete(a),t&&t.active.delete(a)}}function i(o){var a=o.eventName,s=o.payload;if(a==="onGenerateDragPreview"){t={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=N_e(e),u;try{for(l.s();!(u=l.n()).done;){var c=u.value;r(c)}}catch(w){l.e(w)}finally{l.f()}}if(t){for(var d=Array.from(t.active),f=0,h=d;f<h.length;f++){var m=h[f];if(t.active.has(m)){var v;(v=m[a])===null||v===void 0||v.call(m,s)}}a==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:i,monitorForConsumers:n}}function V_e(e){var t=e.typeKey,r=e.mount,n=e.dispatchEventToSource,i=e.defaultDropEffect,o=B_e(),a=M_e({typeKey:t,defaultDropEffect:i});function s(c){n==null||n(c),a.dispatchEvent(c),o.dispatchEvent(c)}function l(c){var d=c.event,f=c.dragInterface;SD.start({event:d,dragInterface:f,getDropTargetsOver:a.getIsOver,dispatchEvent:s})}function u(){function c(){var d={canStart:SD.canStart,start:l};return r(d)}return R_e({typeKey:t,mount:c})}return{registerUsage:u,dropTarget:a.dropTargetForConsumers,monitor:o.monitorForConsumers}}var W0=new WeakMap;function z_e(e){return W0.set(e.element,e),function(){W0.delete(e.element)}}var $O=V_e({typeKey:"element",defaultDropEffect:"move",mount:function(t){return Cv.bind(window,{type:"dragstart",listener:function(n){var i,o,a,s;if(t.canStart(n)){var l=n.target;if(!(l instanceof HTMLElement))return null;var u=W0.get(l);if(!u)return null;var c=jO(n),d={element:u.element,dragHandle:(i=u.dragHandle)!==null&&i!==void 0?i:null,input:c};if(u.canDrag&&!u.canDrag(d))return n.preventDefault(),null;if(u.dragHandle){var f=document.elementFromPoint(c.clientX,c.clientY);if(!u.dragHandle.contains(f))return n.preventDefault(),null}try{var h;(h=n.dataTransfer)===null||h===void 0||h.setData("application/vnd.pdnd","")}catch{}var m={element:u.element,dragHandle:(o=u.dragHandle)!==null&&o!==void 0?o:null,data:(a=(s=u.getInitialData)===null||s===void 0?void 0:s.call(u,d))!==null&&a!==void 0?a:{}},v={key:"element",startedFrom:"internal",payload:m};t.start({event:n,dragInterface:v})}}})},dispatchEventToSource:function(t){var r,n,i=t.eventName,o=t.payload;(r=W0.get(o.source.element))===null||r===void 0||(n=r[i])===null||n===void 0||n.call(r,o)}}),U_e=$O.dropTarget,q_e=$O.monitor;function H_e(e){return N6($O.registerUsage(),z_e(e),M6(e.element,{attribute:"draggable",value:"true"}))}const F6=(e,t,r)=>{const n=S.useRef(null),[i,o]=S.useState(!1),[a,s]=S.useState(!1),[l,u]=S.useState(!1);return S.useEffect(()=>{let c=null;if(t){if(!n.current)return;c=H_e({element:n.current,getInitialData:()=>({store:e})})}return()=>c==null?void 0:c()},[e,t]),S.useEffect(()=>{if(!n.current)return;let c=null;return(e instanceof Vr||e instanceof jn)&&(c=U_e({element:n.current,onDrop:d=>{const f=d.source.data.store;Bh(e,f)&&r(f),u(!1),o(!1)},onDragEnter:d=>{const f=d.source.data.store;u(Bh(e,f))},onDragLeave:()=>u(!1)})),()=>c==null?void 0:c()},[r,e]),S.useEffect(()=>q_e({onDragStart:c=>{const d=c.source.data.store;(e instanceof Vr||e instanceof jn)&&Bh(e,d)?o(Bh(e,d)):s(!0)},onDrop:()=>{o(!1),s(!1)}}),[e]),{dragAndDropRef:n,isDrop:i,isDisabledDrop:a,isDraggedOver:l}},W_e=[{id:"String",label:Ce.String,getSchema:()=>({type:Ce.String,default:""})},{id:"Number",label:Ce.Number,getSchema:()=>({type:Ce.Number,default:0})},{id:"Boolean",label:Ce.Boolean,getSchema:()=>({type:Ce.Boolean,default:!1})},{id:"Object",label:Ce.Object,getSchema:()=>({type:Ce.Object,properties:{},required:[],additionalProperties:!1})},{id:"Array",label:Ce.Array,getSchema:e=>{let t={type:Ce.String,default:""};return(e.type===Ce.Number||e.type===Ce.Boolean||e.type===Ce.String)&&(t=e),{type:Ce.Array,items:t}}}],K_e=[{id:"ForeignKeyString",label:Ce.String,getSchema:e=>{let t={type:Ce.String,default:"",foreignKey:""};return e.type===Ce.Array&&e.items.type===Ce.String&&e.items.foreignKey!==void 0&&(t=e.items),t}}],L6=[{id:Br(),label:"Types",options:W_e},{id:Br(),label:"Link to table",options:K_e}],G_e=(e,t)=>{var r;return(r=L6.flatMap(n=>n.options).find(n=>n.id===e))==null?void 0:r.getSchema(t)},B6=Ze(({currentSchema:e,menuButton:t,onSelect:r,dataTestId:n})=>{const i=S.useCallback(async o=>{if(!Array.isArray(o)){const a=G_e(o,e);a&&r(a)}},[e,r]);return y.jsxs(k5,{children:[t,y.jsx(Ef,{children:y.jsx($5,{width:"100px",children:L6.map(o=>y.jsx(D5,{value:"",title:o.label,onChange:i,children:o.options.map(a=>y.jsx(uT,{"data-testid":`${n}-menu-type-${a.id}`,value:a.id,children:a.label},a.id))},o.id))})})]})}),Q_e=["Backspace","Escape","Enter","ArrowRight","ArrowLeft","Delete"],Nw=({initValue:e,placeholder:t,autoFocus:r,onBlur:n,onChange:i,onEscape:o,onEnter:a,onFocus:s,focusIfDependencyList:l,restrict:u,prefix:c,postfix:d,dataTestId:f})=>{const h=S.useRef(null),m=S.useRef(null);S.useEffect(()=>{var _;r&&((_=h.current)==null||_.focus())},[r]),S.useLayoutEffect(()=>{if(window.getSelection()&&m.current!==null&&h.current){const P=(h.current.textContent||"").length,C=Math.min(P,m.current),x=document.createRange(),T=window.getSelection(),I=h.current.childNodes.length?h.current.childNodes[0]:h.current;x.setStart(I,C),x.collapse(!0),T&&(T.removeAllRanges(),T.addRange(x))}}),A0e(()=>{var _;if(l){(_=h.current)==null||_.focus();const P=window.getSelection();if(h.current&&P){const C=document.createRange();C.selectNodeContents(h.current),C.collapse(!1),P.removeAllRanges(),P.addRange(C)}}},[...l||[]]);const v=S.useCallback(_=>{const P=window.getSelection();P&&P.rangeCount>0&&(m.current=P.getRangeAt(0).startOffset),i==null||i(_.currentTarget.innerText)},[i]),w=S.useCallback(()=>{n==null||n(),m.current=null},[n]),p=S.useCallback(_=>{var P,C;_.key==="Enter"&&(_.preventDefault(),e&&((P=h.current)==null||P.blur(),a==null||a())),_.key==="Escape"&&(_.preventDefault(),e&&((C=h.current)==null||C.blur()),o==null||o()),u&&!Q_e.includes(_.key)&&!u.test(_.key)&&_.preventDefault()},[e,a,o,u]),g=S.useCallback(()=>{var _;(_=h.current)==null||_.focus()},[]),b=!e&&t;return y.jsxs(de,{minWidth:0,width:b?"100%":void 0,position:"relative",onClick:g,children:[!b&&c,y.jsx(Je,{"data-testid":f,autoFocus:!0,ref:h,contentEditable:!0,spellCheck:"false",dangerouslySetInnerHTML:{__html:e},outline:0,width:"100%",onBlur:w,onFocus:s,onChange:v,onInput:v,onKeyDown:p}),!b&&d,b&&y.jsx(Ye,{cursor:"text",userSelect:"none",pointerEvents:"none",whiteSpace:"nowrap",color:"gray.400",position:"absolute",children:t})]})},V6=({dataTestId:e,...t})=>y.jsx(Li,{"data-testid":e,_hover:{backgroundColor:"gray.50"},color:"gray.400",icon:y.jsx(bw,{}),variant:"ghost",...t}),z6=Ze(({store:e,typeClassName:t,isEditable:r,onBlur:n,onEnter:i,onRemove:o,onSelect:a,dataTestId:s})=>{const{root:l,mode:u}=Pv(),[c,d]=S.useState(!1),f=S.useCallback(I=>{e instanceof Vr?l.addProperty(e,I,{beforeNode:e.draftProperties[0]}):e instanceof jn&&l.replaceItems(e,I)},[l,e]),h=!!(l.areThereDropTargets(e)&&e.draftId),{dragAndDropRef:m,isDrop:v,isDraggedOver:w,isDisabledDrop:p}=F6(e,h,f),g=S.useCallback(()=>{d(!1),n==null||n(e)},[n,e]),b=S.useCallback(()=>{d(!0)},[]),_=S.useCallback(()=>{i==null||i(e)},[i,e]),P=S.useCallback(()=>{o==null||o(e)},[o,e]),C=S.useCallback(I=>{l.setId(e,I)},[l,e]),x=S.useCallback(I=>{a(e,I)},[a,e]),T=!c;return y.jsxs(de,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,children:[y.jsxs(de,{"data-testid":v&&`${s}-drop`,flex:e.draftId?0:1,ref:m,position:"relative",borderWidth:1,borderStyle:"dashed",borderColor:v?"gray.400":"#00000000",backgroundColor:w?"gray.200":void 0,color:p?"gray.300":void 0,whiteSpace:"nowrap",children:[r?y.jsxs(y.Fragment,{children:[h&&y.jsx(de,{"data-testid":`${s}-drag-button`,position:"absolute",left:"-34px",className:T?t:void 0,cursor:"grab",_hover:{backgroundColor:"gray.100"},height:"100%",alignItems:"center",justifyContent:"center",borderRadius:"4px",pl:"2px",pr:"2px",children:y.jsx(Fpe,{boxSize:"14px",color:"gray.300"})}),y.jsx(Nw,{dataTestId:s,autoFocus:!e.draftId,initValue:e.draftId,placeholder:e.draftParent?"Enter the name of the field":"Enter the name of the table",onBlur:g,onFocus:b,onChange:C,onEnter:_,focusIfDependencyList:[e.type]})]}):y.jsx(Je,{userSelect:"none",children:e.draftId}),u===Ss.Updating&&e.draftId&&e.isDirtyItself&&y.jsx(Je,{cursor:"default",children:"*"})]}),e.draftId&&y.jsx(B6,{dataTestId:s,currentSchema:e.getSchema({skipObjectProperties:!0}),onSelect:x,menuButton:y.jsx(lT,{"data-testid":`${s}-select-type-button`,as:Ye,color:"gray.300",textDecoration:"underline",cursor:"pointer",className:T?t:void 0,children:e.type})}),o&&e.draftId&&y.jsx(V6,{"data-testid":`${s}-remove-button`,height:"26px","aria-label":"remove",color:"gray.200",_hover:{color:"gray.400"},className:T?t:void 0,onClick:P})]})}),AO=({field:e,fieldClassName:t,children:r})=>y.jsxs(de,{flexDirection:"column",alignSelf:"flex-start",width:"100%",children:[y.jsxs(de,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",className:t,position:"relative",children:[y.jsx(Je,{position:"absolute",ml:"-200px",height:"100%",width:"200px"}),y.jsx(Je,{color:"gray.300",children:y.jsx(iO,{})}),e]}),r&&y.jsx(de,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]}),Y_e=Ze(({node:e,dataTestId:t})=>{const{mode:r,root:n}=Pv(),i=S.useCallback(c=>{const d=e.draftItems;d instanceof Vr?n.addProperty(d,c,{beforeNode:d.draftProperties[0]}):d instanceof jn&&n.replaceItems(d,c)},[e.draftItems,n]),{dragAndDropRef:o,isDrop:a,isDraggedOver:s,isDisabledDrop:l}=F6(e.draftItems,!0,i),u=S.useCallback(c=>{const d=yf(c);n.replaceItems(e,d),d instanceof Vr&&n.addProperty(d,new Nu)},[e,n]);return y.jsx(de,{flexDirection:"column",width:"100%",children:y.jsx(AO,{field:y.jsx(B6,{dataTestId:t,currentSchema:e.draftItems.getSchema({skipObjectProperties:!0}),onSelect:u,menuButton:y.jsx(Je,{"data-testid":a&&`${t}-drop`,ref:o,borderWidth:1,borderStyle:"dashed",borderColor:a?"gray.400":"#00000000",backgroundColor:s?"gray.200":void 0,color:l?"gray.300":void 0,children:y.jsxs(lT,{"data-testid":`${t}-select-type-button`,as:Ye,color:a?void 0:"gray.300",cursor:"pointer",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.300"},children:[e.draftItems.type,r===Ss.Updating&&e.draftItems.isDirtyItself&&y.jsx("span",{children:"*"})]})})}),children:y.jsx(DO,{dataTestId:`${t}-0`,node:e.draftItems})})})}),X_e="_Root_1ypkj_1",J_e="_Field_1ypkj_1",K0={Root:X_e,Field:J_e},Z_e=Ze(({node:e,dataTestId:t})=>{const{root:r}=Pv(),n=S.useCallback(()=>{r.addProperty(e,new Nu)},[e,r]),i=S.useCallback(l=>{l.draftId||r.removeProperty(e,l)},[e,r]),o=S.useCallback(l=>{r.removeProperty(e,l)},[e,r]),a=S.useCallback((l,u)=>{const c=yf(u);r.replaceProperty(e,l,c)},[e,r]),s=S.useCallback(l=>{l instanceof Vr?r.addProperty(l,new Nu,{beforeNode:l.draftProperties[0]}):r.addProperty(e,new Nu,{afterNode:l})},[e,r]);return y.jsxs(de,{flexDirection:"column",width:"100%",children:[e.draftProperties.map((l,u)=>y.jsx(AO,{fieldClassName:K0.Root,field:y.jsx(z6,{dataTestId:`${t}-${u}`,store:l,isEditable:!0,typeClassName:K0.Field,onSelect:a,onBlur:i,onRemove:o,onEnter:s}),children:y.jsx(DO,{dataTestId:`${t}-${u}`,node:l})},l.nodeId)),e.showingCreateField&&y.jsx(Je,{ml:"-14px",children:y.jsx(Nf,{dataTestId:`${t}-create-field-button`,title:"Field",isDisabled:e.isDisabledCreateField,onClick:n})})]})}),exe=Ze(({node:e,dataTestId:t})=>{const r=Pv(),n=S.useCallback(()=>{r.onSelectForeignKey(e)},[r,e]);return y.jsxs(de,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",children:[y.jsx(Je,{color:"gray.300",children:y.jsx(iO,{})}),y.jsx(de,{gap:"0.5rem",width:"100%",justifyContent:"flex-start",outline:0,_hover:{textDecoration:"underline",textDecorationColor:"gray.300"},onClick:n,children:y.jsx(Ye,{color:"gray.300",cursor:"pointer","data-testid":`${t}-connect-foreign-key`,children:e.draftForeignKey||"<Connect table>"})})]})}),txe=Ze(({node:e,dataTestId:t})=>e.draftForeignKey?y.jsx(de,{flexDirection:"column",width:"100%",children:y.jsx(exe,{dataTestId:`${t}-0`,node:e.draftForeignKey})}):null),DO=({node:e,dataTestId:t})=>{if(e instanceof Vr)return y.jsx(Z_e,{dataTestId:t,node:e});if(e instanceof jn)return y.jsx(Y_e,{dataTestId:t,node:e});if(e instanceof Nu)return y.jsx(txe,{dataTestId:t,node:e})},rxe=Ze(({store:e})=>{const t=Pv(),r=S.useCallback((i,o)=>{const a=yf(o);a.setId(i.draftId),e.replaceNode(a)},[e]),n=S.useCallback(i=>{i instanceof Vr&&i.addProperty(new Nu,{beforeNode:i.draftProperties[0]})},[]);return y.jsx(AO,{fieldClassName:K0.Root,field:y.jsx(z6,{dataTestId:"0",isEditable:t.mode===Ss.Creating||t.mode===Ss.Updating,store:e.node,typeClassName:K0.Field,onSelect:r,onEnter:n}),children:y.jsx(DO,{dataTestId:"0",node:e.node})})}),U6=({height:e="2.5rem",onClick:t,isDisabled:r,dataTestId:n})=>y.jsx(vo,{"data-testid":n,isDisabled:r,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",height:e,variant:"ghost",onClick:t,children:y.jsx(Jpe,{})}),nxe=({dataTestId:e,...t})=>y.jsx(Li,{"data-testid":e,_hover:{backgroundColor:"gray.100"},color:"gray.400",icon:y.jsx(Npe,{}),variant:"ghost",...t}),ixe="_JsonCard_15gzu_1",oxe="_CopyButton_15gzu_1",ED={JsonCard:ixe,CopyButton:oxe},q6=({data:e})=>{const t=JSON.stringify(e,null,3),r=S.useCallback(async()=>{const n="text/plain",i=new Blob([t],{type:n}),o=[new ClipboardItem({[n]:i})];await navigator.clipboard.write(o),zV({status:"success",variant:"subtle",icon:!1,colorScheme:"gray",duration:1500,isClosable:!0,position:"top",description:"Copied to clipboard"})},[t]);return y.jsxs(Je,{width:"100%",position:"relative",className:ED.JsonCard,children:[y.jsx(nxe,{dataTestId:"json-card-copy-button","aria-label":"",position:"absolute",top:"8px",right:"8px",className:ED.CopyButton,onClick:r}),y.jsx(JE,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"24px",width:"100%",borderRadius:"8px",children:t})]})},H6=({onClick:e,isDisabled:t,dataTestId:r})=>y.jsx(vo,{"data-testid":r,isDisabled:t,_hover:{backgroundColor:"gray.50"},alignSelf:"flex-start",color:"gray.400",height:"2.5rem",variant:"ghost",onClick:e,children:y.jsx(FV,{size:"16"})}),axe="_Root_1k7pa_1",sxe="_Actions_1k7pa_1",TD={Root:axe,Actions:sxe},OD=Ze(({store:e,mode:t,onApprove:r,onCancel:n,onSelectForeignKey:i})=>{const[o,a]=S.useState(!1),s=S.useCallback(async()=>{a(!0),await r(),a(!1)},[r]);return y.jsx(A6.Provider,{value:{onSelectForeignKey:i,mode:t,root:e},children:y.jsxs(de,{flex:1,flexDirection:"column",gap:"0.5rem",className:TD.Root,"date-testid":"schema-data-card",children:[y.jsxs(de,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[y.jsxs(Je,{children:[t===Ss.Creating?y.jsx(ww,{dataTestId:"close-create-table-button",onClick:n}):y.jsx(U6,{dataTestId:"back-to-table-list-button",onClick:n}),y.jsx(vv,{dataTestId:"schema-editor-approve-button",onClick:s,isDisabled:e.isApproveDisabled,loading:o}),t===Ss.Updating&&e.isDirty&&y.jsx(H6,{dataTestId:"schema-editor-revert-button",onClick:e.resetChanges})]}),y.jsx(Je,{className:TD.Actions,children:y.jsx(kO,{availableRefByMode:!1,mode:e.viewMode||yn.Tree,onChange:e.setViewMode})})]}),e.viewMode===yn.Tree&&y.jsx(Je,{paddingBottom:"4rem",children:y.jsx(rxe,{store:e})}),e.viewMode===yn.Json&&y.jsx(q6,{data:e.getPlainSchema()})]})})}),r_=()=>y.jsx(de,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:y.jsx(Je,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:"Select or create a table to be referenced by the above table"})}),lxe=({previousType:e,tableId:t,foreignKeyPath:r,onCancel:n})=>{const i=S.useMemo(()=>e===En.UpdatingTable?"updating":e===En.CreatingTable?"creating":"",[e]);return y.jsx(Je,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:y.jsxs(de,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[y.jsx(Ye,{textDecoration:"underline",cursor:"pointer",onClick:n,children:"Back"}),y.jsxs(Ye,{whiteSpace:"nowrap",children:["- ",i,' "',t,'" -']}),y.jsxs(Ye,{minWidth:0,dir:"rtl",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:["path: ",r]})]})})},uxe=me`
1390
- mutation DeleteTableMst($data: RemoveTableInput!) {
1391
- removeTable(data: $data) {
1392
- branch {
1393
- ...BranchMst
1394
- }
1395
- }
1396
- }
1397
- ${Rs}
1398
- `,cxe=async e=>{const t=await Kt.mutate({mutation:uxe,variables:e});if(!t.data)throw t.errors;return t.data};class dxe{constructor(t,r){this.projectPageModel=t,this.tableId=r}get branch(){return this.projectPageModel.branchOrThrow}async execute(){const t=await this.deleteTableRequest();return await this.updateTablesConnection(),this.branch.updateTouched(t),!0}async deleteTableRequest(){return(await cxe({data:{revisionId:this.branch.draft.id,tableId:this.tableId}})).removeTable.branch.touched}async updateTablesConnection(){const t=this.branch.draft,r=t.tablesConnection.edges.find(n=>n.node.id===this.tableId);t.tablesConnection.removeEdge(r==null?void 0:r.cursor)}}class fxe{constructor(t,r){this.rootStore=t,this.projectPageModel=r,Le(this,{},{autoBind:!0}),this.init()}get totalCount(){return this.items.length}get hasNextPage(){return this.revision.tablesConnection.availableNextPage}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get items(){return this.revision.tablesConnection.edges.map(({node:t})=>({id:t.id,versionId:t.versionId,readonly:t.readonly,title:t.id,count:t.count,link:""}))}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryTables({revisionId:this.revision.id,first:50,after:this.revision.tablesConnection.endCursor||void 0})}async deleteTable(t){try{return await new dxe(this.projectPageModel,t).execute()}catch(r){return console.log(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const hxe=()=>{const e=$n(),[t]=S.useState(()=>new fxe(ze,e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},pxe=({onRemove:e,dataTestId:t})=>{const[r,n]=S.useState(!1),i=S.useCallback(async()=>{n(!0),await(e==null?void 0:e()),n(!1)},[e]);return y.jsx(Li,{"data-testid":t,_hover:{backgroundColor:"gray.100"},"aria-label":"",color:"gray.400",icon:y.jsx(bw,{}),isLoading:r,variant:"ghost",onClick:i})},mxe="_Row_1lkxi_1",vxe="_RemoveRowButton_1lkxi_1",RD={Row:mxe,RemoveRowButton:vxe},gxe=({table:e,store:t,onSettings:r,onSelect:n})=>{const i=S.useCallback(async()=>{r(e.versionId)},[r,e.versionId]),o=S.useCallback(()=>t.deleteTable(e.id),[t,e.id]),a=S.useCallback(()=>{n==null||n(e.id)},[n,e.id]),s=!!n;return y.jsx(Je,{height:"2.5rem",width:"100%","data-testid":`table-${e.id}`,children:y.jsxs(de,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:RD.Row,gap:"4px",paddingLeft:"1rem",children:[y.jsxs(de,{width:"150px",children:[n?y.jsx(Ye,{textDecoration:"underline",cursor:"pointer",onClick:a,"data-testid":`table-${e.id}-select`,children:e.id}):y.jsx(wo,{to:`${e.id}`,"data-testid":`table-${e.id}-link`,children:y.jsx(Ye,{textDecoration:"underline",children:e.id})}),!e.readonly&&t.isEditableRevision&&y.jsx(Ye,{children:"*"})]}),y.jsxs(de,{alignItems:"center",flex:1,justifyContent:"space-between",minHeight:"40px",children:[y.jsxs(Ye,{color:"gray.400",fontWeight:"300",ml:"16px",children:[e.count," rows"]}),!s&&t.isEditableRevision&&y.jsxs(de,{className:RD.RemoveRowButton,children:[y.jsx(Yz,{dataTestId:`table-settings-button-${e.id}`,onClick:i}),y.jsx(pxe,{dataTestId:`remove-table-button-${e.id}`,onRemove:o})]})]})]})},e.versionId)},yxe=Ze(({onSettings:e,onSelect:t})=>{const r=hxe();return y.jsx(Dw,{useWindowScroll:!0,totalCount:r.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:r.hasNextPage?r.tryToFetchNextPage:void 0,itemContent:n=>{const i=r.items[n];if(i)return y.jsx(gxe,{table:i,store:r,onSettings:e,onSelect:t},i.versionId)}})}),bxe=Ze(()=>{const{root:e,item:t}=c_e(),r=S.useCallback(s=>{e.selectForeignKey(t,s)},[t,e]),n=S.useCallback(()=>{e.cancelSelectingForeignKey(t)},[t,e]),i=S.useCallback(async()=>{if(t.state.type===En.CreatingTable){const s=t.state.store;await t.createTable(s.draftTableId,s.getPlainSchema())&&(s.submitChanges(),t.state.isSelectingForeignKey?e.onSelectedForeignKey(t,s.draftTableId):t.toUpdatingTableFromCreatingTable())}},[t,e]),o=S.useCallback(async()=>{if(t.state.type===En.UpdatingTable){const s=t.state.store;await t.updateTable(s)&&s.submitChanges()}},[t]),a=S.useCallback(s=>{e.onSelectedForeignKey(t,s)},[t,e]);if(t.state.type===En.ConnectingForeignKeyTable){const s=t.state.store;return y.jsx(y.Fragment,{children:y.jsx(lxe,{previousType:t.state.previousType,foreignKeyPath:t.currentForeignKeyPath,onCancel:n,tableId:s.draftTableId})})}if(t.state.type===En.List)return y.jsxs(y.Fragment,{children:[t.state.isSelectingForeignKey&&y.jsx(r_,{}),y.jsx(d_e,{onClick:t.toCreatingTable}),y.jsx(Je,{paddingTop:"0.5rem",paddingBottom:"1rem",children:y.jsx(yxe,{onSettings:t.toUpdatingTable,onSelect:t.state.isSelectingForeignKey?a:void 0})})]});if(t.state.type===En.CreatingTable){const s=t.state.store;return y.jsxs(y.Fragment,{children:[t.state.isSelectingForeignKey&&y.jsx(r_,{}),y.jsx(OD,{store:s,mode:Ss.Creating,onApprove:i,onCancel:t.toList,onSelectForeignKey:r})]})}if(t.state.type===En.UpdatingTable){const s=t.state.store;return y.jsxs(y.Fragment,{children:[t.state.isSelectingForeignKey&&y.jsx(r_,{}),y.jsx(OD,{store:s,mode:Ss.Updating,onApprove:o,onCancel:t.toList,onSelectForeignKey:r})]})}return null}),n_=Ze(()=>{const e=u_e();return y.jsx(y.Fragment,{children:e.stack.map(t=>y.jsx($6.Provider,{value:{root:e,item:t},children:y.jsx(bxe,{})},t.id))})}),wxe="_Root_1k7pa_1",Sxe="_Actions_1k7pa_1",G0={Root:wxe,Actions:Sxe},_xe="row-edit-mode",xxe=({data:e})=>{const[t,r]=N0e(_xe,yn.Tree);return y.jsxs(de,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:G0.Root,flex:1,children:[y.jsxs(de,{justifyContent:"space-between",width:"100%",alignItems:"center",children:[y.jsx(de,{minHeight:"40px"}),y.jsx(Je,{className:G0.Actions,children:y.jsx(kO,{mode:t||yn.Tree,onChange:r})})]}),t===yn.Tree&&y.jsxs(de,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[y.jsx(oO,{color:"gray"}),y.jsx(Ye,{color:"gray.400",children:"Unsupported schema, use JSON mode"})]}),t===yn.Json&&y.jsx(JE,{whiteSpace:"pre-wrap",backgroundColor:"gray.50",padding:"1rem",paddingRight:"5rem",children:JSON.stringify(e,null,4)})]})};var ZP={exports:{}},W6={},Go={},bf={},Tv={},lt={},Dm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(g){if(super(),!e.IDENTIFIER.test(g))throw new Error("CodeGen: name must be a valid identifier");this.str=g}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(g){super(),this._items=typeof g=="string"?[g]:g}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const g=this._items[0];return g===""||g==='""'}get str(){var g;return(g=this._str)!==null&&g!==void 0?g:this._str=this._items.reduce((b,_)=>`${b}${_}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((b,_)=>(_ instanceof r&&(b[_.str]=(b[_.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function i(p,...g){const b=[p[0]];let _=0;for(;_<g.length;)s(b,g[_]),b.push(p[++_]);return new n(b)}e._=i;const o=new n("+");function a(p,...g){const b=[h(p[0])];let _=0;for(;_<g.length;)b.push(o),s(b,g[_]),b.push(o,h(p[++_]));return l(b),new n(b)}e.str=a;function s(p,g){g instanceof n?p.push(...g._items):g instanceof r?p.push(g):p.push(d(g))}e.addCodeArg=s;function l(p){let g=1;for(;g<p.length-1;){if(p[g]===o){const b=u(p[g-1],p[g+1]);if(b!==void 0){p.splice(g-1,3,b);continue}p[g++]="+"}g++}}function u(p,g){if(g==='""')return p;if(p==='""')return g;if(typeof p=="string")return g instanceof r||p[p.length-1]!=='"'?void 0:typeof g!="string"?`${p.slice(0,-1)}${g}"`:g[0]==='"'?p.slice(0,-1)+g.slice(1):void 0;if(typeof g=="string"&&g[0]==='"'&&!(p instanceof r))return`"${p}${g.slice(1)}`}function c(p,g){return g.emptyStr()?p:p.emptyStr()?g:a`${p}${g}`}e.strConcat=c;function d(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:h(Array.isArray(p)?p.join(","):p)}function f(p){return new n(h(p))}e.stringify=f;function h(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function m(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new n(`.${p}`):i`[${p}]`}e.getProperty=m;function v(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new n(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=v;function w(p){return new n(p.toString())}e.regexpCode=w})(Dm);var eC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Dm;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:u,parent:c}={}){this._names={},this._prefixes=u,this._parent=c}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const c=this._names[u]||this._nameGroup(u);return`${u}${c.index++}`}_nameGroup(u){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=i;class o extends t.Name{constructor(u,c){super(c),this.prefix=u}setValue(u,{property:c,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(c)}[${d}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class s extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new o(u,this._newName(u))}value(u,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(u),{prefix:h}=f,m=(d=c.key)!==null&&d!==void 0?d:c.ref;let v=this._values[h];if(v){const g=v.get(m);if(g)return g}else v=this._values[h]=new Map;v.set(m,f);const w=this._scope[h]||(this._scope[h]=[]),p=w.length;return w[p]=c.ref,f.setValue(c,{property:h,itemIndex:p}),f}getValue(u,c){const d=this._values[u];if(d)return d.get(c)}scopeRefs(u,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,c,d){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},c,d)}_reduceValues(u,c,d={},f){let h=t.nil;for(const m in u){const v=u[m];if(!v)continue;const w=d[m]=d[m]||new Map;v.forEach(p=>{if(w.has(p))return;w.set(p,n.Started);let g=c(p);if(g){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${b} ${p} = ${g};${this.opts._n}`}else if(g=f==null?void 0:f(p))h=(0,t._)`${h}${g}${this.opts._n}`;else throw new r(p);w.set(p,n.Completed)})}return h}}e.ValueScope=s})(eC);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Dm,r=eC;var n=Dm;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=eC;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(E,k){return this}}class a extends o{constructor(E,k,D){super(),this.varKind=E,this.name=k,this.rhs=D}render({es5:E,_n:k}){const D=E?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${D} ${this.name}${ee};`+k}optimizeNames(E,k){if(E[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,E,k)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(E,k,D){super(),this.lhs=E,this.rhs=k,this.sideEffects=D}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,k){if(!(this.lhs instanceof t.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=R(this.rhs,E,k),this}get names(){const E=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ie(E,this.rhs)}}class l extends s{constructor(E,k,D,ee){super(E,D,ee),this.op=k}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}class u extends o{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class c extends o{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class d extends o{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class f extends o{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code};`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,k){return this.code=R(this.code,E,k),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends o{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((k,D)=>k+D.render(E),"")}optimizeNodes(){const{nodes:E}=this;let k=E.length;for(;k--;){const D=E[k].optimizeNodes();Array.isArray(D)?E.splice(k,1,...D):D?E[k]=D:E.splice(k,1)}return E.length>0?this:void 0}optimizeNames(E,k){const{nodes:D}=this;let ee=D.length;for(;ee--;){const oe=D[ee];oe.optimizeNames(E,k)||(L(E,oe.names),D.splice(ee,1))}return D.length>0?this:void 0}get names(){return this.nodes.reduce((E,k)=>re(E,k.names),{})}}class m extends h{render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class v extends h{}class w extends m{}w.kind="else";class p extends m{constructor(E,k){super(k),this.condition=E}render(E){let k=`if(${this.condition})`+super.render(E);return this.else&&(k+="else "+this.else.render(E)),k}optimizeNodes(){super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let k=this.else;if(k){const D=k.optimizeNodes();k=this.else=Array.isArray(D)?new w(D):D}if(k)return E===!1?k instanceof p?k:k.nodes:this.nodes.length?this:new p(X(E),k instanceof p?[k]:k.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,k){var D;if(this.else=(D=this.else)===null||D===void 0?void 0:D.optimizeNames(E,k),!!(super.optimizeNames(E,k)||this.else))return this.condition=R(this.condition,E,k),this}get names(){const E=super.names;return ie(E,this.condition),this.else&&re(E,this.else.names),E}}p.kind="if";class g extends m{}g.kind="for";class b extends g{constructor(E){super(),this.iteration=E}render(E){return`for(${this.iteration})`+super.render(E)}optimizeNames(E,k){if(super.optimizeNames(E,k))return this.iteration=R(this.iteration,E,k),this}get names(){return re(super.names,this.iteration.names)}}class _ extends g{constructor(E,k,D,ee){super(),this.varKind=E,this.name=k,this.from=D,this.to=ee}render(E){const k=E.es5?r.varKinds.var:this.varKind,{name:D,from:ee,to:oe}=this;return`for(${k} ${D}=${ee}; ${D}<${oe}; ${D}++)`+super.render(E)}get names(){const E=ie(super.names,this.from);return ie(E,this.to)}}class P extends g{constructor(E,k,D,ee){super(),this.loop=E,this.varKind=k,this.name=D,this.iterable=ee}render(E){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(E)}optimizeNames(E,k){if(super.optimizeNames(E,k))return this.iterable=R(this.iterable,E,k),this}get names(){return re(super.names,this.iterable.names)}}class C extends m{constructor(E,k,D){super(),this.name=E,this.args=k,this.async=D}render(E){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(E)}}C.kind="func";class x extends h{render(E){return"return "+super.render(E)}}x.kind="return";class T extends m{render(E){let k="try"+super.render(E);return this.catch&&(k+=this.catch.render(E)),this.finally&&(k+=this.finally.render(E)),k}optimizeNodes(){var E,k;return super.optimizeNodes(),(E=this.catch)===null||E===void 0||E.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(E,k){var D,ee;return super.optimizeNames(E,k),(D=this.catch)===null||D===void 0||D.optimizeNames(E,k),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(E,k),this}get names(){const E=super.names;return this.catch&&re(E,this.catch.names),this.finally&&re(E,this.finally.names),E}}class I extends m{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.render(E)}}I.kind="catch";class M extends m{render(E){return"finally"+super.render(E)}}M.kind="finally";class H{constructor(E,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
1399
- `:""},this._extScope=E,this._scope=new r.Scope({parent:E}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(E){return this._scope.name(E)}scopeName(E){return this._extScope.name(E)}scopeValue(E,k){const D=this._extScope.value(E,k);return(this._values[D.prefix]||(this._values[D.prefix]=new Set)).add(D),D}getScopeValue(E,k){return this._extScope.getValue(E,k)}scopeRefs(E){return this._extScope.scopeRefs(E,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(E,k,D,ee){const oe=this._scope.toName(k);return D!==void 0&&ee&&(this._constants[oe.str]=D),this._leafNode(new a(E,oe,D)),oe}const(E,k,D){return this._def(r.varKinds.const,E,k,D)}let(E,k,D){return this._def(r.varKinds.let,E,k,D)}var(E,k,D){return this._def(r.varKinds.var,E,k,D)}assign(E,k,D){return this._leafNode(new s(E,k,D))}add(E,k){return this._leafNode(new l(E,e.operators.ADD,k))}code(E){return typeof E=="function"?E():E!==t.nil&&this._leafNode(new f(E)),this}object(...E){const k=["{"];for(const[D,ee]of E)k.length>1&&k.push(","),k.push(D),(D!==ee||this.opts.es5)&&(k.push(":"),(0,t.addCodeArg)(k,ee));return k.push("}"),new t._Code(k)}if(E,k,D){if(this._blockNode(new p(E)),k&&D)this.code(k).else().code(D).endIf();else if(k)this.code(k).endIf();else if(D)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(E){return this._elseNode(new p(E))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(p,w)}_for(E,k){return this._blockNode(E),k&&this.code(k).endFor(),this}for(E,k){return this._for(new b(E),k)}forRange(E,k,D,ee,oe=this.opts.es5?r.varKinds.var:r.varKinds.let){const ve=this._scope.toName(E);return this._for(new _(oe,ve,k,D),()=>ee(ve))}forOf(E,k,D,ee=r.varKinds.const){const oe=this._scope.toName(E);if(this.opts.es5){const ve=k instanceof t.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,t._)`${ve}.length`,Se=>{this.var(oe,(0,t._)`${ve}[${Se}]`),D(oe)})}return this._for(new P("of",ee,oe,k),()=>D(oe))}forIn(E,k,D,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(E,(0,t._)`Object.keys(${k})`,D);const oe=this._scope.toName(E);return this._for(new P("in",ee,oe,k),()=>D(oe))}endFor(){return this._endBlockNode(g)}label(E){return this._leafNode(new u(E))}break(E){return this._leafNode(new c(E))}return(E){const k=new x;if(this._blockNode(k),this.code(E),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(x)}try(E,k,D){if(!k&&!D)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new T;if(this._blockNode(ee),this.code(E),k){const oe=this.name("e");this._currNode=ee.catch=new I(oe),k(oe)}return D&&(this._currNode=ee.finally=new M,this.code(D)),this._endBlockNode(I,M)}throw(E){return this._leafNode(new d(E))}block(E,k){return this._blockStarts.push(this._nodes.length),E&&this.code(E).endBlock(k),this}endBlock(E){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const D=this._nodes.length-k;if(D<0||E!==void 0&&D!==E)throw new Error(`CodeGen: wrong number of nodes: ${D} vs ${E} expected`);return this._nodes.length=k,this}func(E,k=t.nil,D,ee){return this._blockNode(new C(E,k,D)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(E=1){for(;E-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(E){return this._currNode.nodes.push(E),this}_blockNode(E){this._currNode.nodes.push(E),this._nodes.push(E)}_endBlockNode(E,k){const D=this._currNode;if(D instanceof E||k&&D instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${E.kind}/${k.kind}`:E.kind}"`)}_elseNode(E){const k=this._currNode;if(!(k instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=E,this}get _root(){return this._nodes[0]}get _currNode(){const E=this._nodes;return E[E.length-1]}set _currNode(E){const k=this._nodes;k[k.length-1]=E}}e.CodeGen=H;function re(N,E){for(const k in E)N[k]=(N[k]||0)+(E[k]||0);return N}function ie(N,E){return E instanceof t._CodeOrName?re(N,E.names):N}function R(N,E,k){if(N instanceof t.Name)return D(N);if(!ee(N))return N;return new t._Code(N._items.reduce((oe,ve)=>(ve instanceof t.Name&&(ve=D(ve)),ve instanceof t._Code?oe.push(...ve._items):oe.push(ve),oe),[]));function D(oe){const ve=k[oe.str];return ve===void 0||E[oe.str]!==1?oe:(delete E[oe.str],ve)}function ee(oe){return oe instanceof t._Code&&oe._items.some(ve=>ve instanceof t.Name&&E[ve.str]===1&&k[ve.str]!==void 0)}}function L(N,E){for(const k in E)N[k]=(N[k]||0)-(E[k]||0)}function X(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,t._)`!${U(N)}`}e.not=X;const Q=A(e.operators.AND);function W(...N){return N.reduce(Q)}e.and=W;const te=A(e.operators.OR);function G(...N){return N.reduce(te)}e.or=G;function A(N){return(E,k)=>E===t.nil?k:k===t.nil?E:(0,t._)`${U(E)} ${N} ${U(k)}`}function U(N){return N instanceof t.Name?N:(0,t._)`(${N})`}})(lt);var xe={};Object.defineProperty(xe,"__esModule",{value:!0});xe.checkStrictMode=xe.getErrorPath=xe.Type=xe.useFunc=xe.setEvaluated=xe.evaluatedPropsToName=xe.mergeEvaluated=xe.eachItem=xe.unescapeJsonPointer=xe.escapeJsonPointer=xe.escapeFragment=xe.unescapeFragment=xe.schemaRefOrVal=xe.schemaHasRulesButRef=xe.schemaHasRules=xe.checkUnknownRules=xe.alwaysValidSchema=xe.toHash=void 0;const ir=lt,Pxe=Dm;function Cxe(e){const t={};for(const r of e)t[r]=!0;return t}xe.toHash=Cxe;function Exe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(K6(e,t),!G6(t,e.self.RULES.all))}xe.alwaysValidSchema=Exe;function K6(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;const i=n.RULES.keywords;for(const o in t)i[o]||X6(e,`unknown keyword: "${o}"`)}xe.checkUnknownRules=K6;function G6(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}xe.schemaHasRules=G6;function Txe(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}xe.schemaHasRulesButRef=Txe;function Oxe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ir._)`${r}`}return(0,ir._)`${e}${t}${(0,ir.getProperty)(n)}`}xe.schemaRefOrVal=Oxe;function Rxe(e){return Q6(decodeURIComponent(e))}xe.unescapeFragment=Rxe;function Ixe(e){return encodeURIComponent(MO(e))}xe.escapeFragment=Ixe;function MO(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}xe.escapeJsonPointer=MO;function Q6(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}xe.unescapeJsonPointer=Q6;function kxe(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}xe.eachItem=kxe;function ID({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{const l=a===void 0?o:a instanceof ir.Name?(o instanceof ir.Name?e(i,o,a):t(i,o,a),a):o instanceof ir.Name?(t(i,a,o),o):r(o,a);return s===ir.Name&&!(l instanceof ir.Name)?n(i,l):l}}xe.mergeEvaluated={props:ID({mergeNames:(e,t,r)=>e.if((0,ir._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,ir._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,ir._)`${r} || {}`).code((0,ir._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,ir._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,ir._)`${r} || {}`),NO(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Y6}),items:ID({mergeNames:(e,t,r)=>e.if((0,ir._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,ir._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,ir._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,ir._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Y6(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,ir._)`{}`);return t!==void 0&&NO(e,r,t),r}xe.evaluatedPropsToName=Y6;function NO(e,t,r){Object.keys(r).forEach(n=>e.assign((0,ir._)`${t}${(0,ir.getProperty)(n)}`,!0))}xe.setEvaluated=NO;const kD={};function jxe(e,t){return e.scopeValue("func",{ref:t,code:kD[t.code]||(kD[t.code]=new Pxe._Code(t.code))})}xe.useFunc=jxe;var tC;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(tC||(xe.Type=tC={}));function $xe(e,t,r){if(e instanceof ir.Name){const n=t===tC.Num;return r?n?(0,ir._)`"[" + ${e} + "]"`:(0,ir._)`"['" + ${e} + "']"`:n?(0,ir._)`"/" + ${e}`:(0,ir._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ir.getProperty)(e).toString():"/"+MO(e)}xe.getErrorPath=$xe;function X6(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}xe.checkStrictMode=X6;var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});const Ln=lt,Axe={data:new Ln.Name("data"),valCxt:new Ln.Name("valCxt"),instancePath:new Ln.Name("instancePath"),parentData:new Ln.Name("parentData"),parentDataProperty:new Ln.Name("parentDataProperty"),rootData:new Ln.Name("rootData"),dynamicAnchors:new Ln.Name("dynamicAnchors"),vErrors:new Ln.Name("vErrors"),errors:new Ln.Name("errors"),this:new Ln.Name("this"),self:new Ln.Name("self"),scope:new Ln.Name("scope"),json:new Ln.Name("json"),jsonPos:new Ln.Name("jsonPos"),jsonLen:new Ln.Name("jsonLen"),jsonPart:new Ln.Name("jsonPart")};Ki.default=Axe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=lt,r=xe,n=Ki;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:p})=>p?(0,t.str)`"${w}" keyword must be ${p} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function i(w,p=e.keywordError,g,b){const{it:_}=w,{gen:P,compositeRule:C,allErrors:x}=_,T=d(w,p,g);b??(C||x)?l(P,T):u(_,(0,t._)`[${T}]`)}e.reportError=i;function o(w,p=e.keywordError,g){const{it:b}=w,{gen:_,compositeRule:P,allErrors:C}=b,x=d(w,p,g);l(_,x),P||C||u(b,n.default.vErrors)}e.reportExtraError=o;function a(w,p){w.assign(n.default.errors,p),w.if((0,t._)`${n.default.vErrors} !== null`,()=>w.if(p,()=>w.assign((0,t._)`${n.default.vErrors}.length`,p),()=>w.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:w,keyword:p,schemaValue:g,data:b,errsCount:_,it:P}){if(_===void 0)throw new Error("ajv implementation error");const C=w.name("err");w.forRange("i",_,n.default.errors,x=>{w.const(C,(0,t._)`${n.default.vErrors}[${x}]`),w.if((0,t._)`${C}.instancePath === undefined`,()=>w.assign((0,t._)`${C}.instancePath`,(0,t.strConcat)(n.default.instancePath,P.errorPath))),w.assign((0,t._)`${C}.schemaPath`,(0,t.str)`${P.errSchemaPath}/${p}`),P.opts.verbose&&(w.assign((0,t._)`${C}.schema`,g),w.assign((0,t._)`${C}.data`,b))})}e.extendErrors=s;function l(w,p){const g=w.const("err",p);w.if((0,t._)`${n.default.vErrors} === null`,()=>w.assign(n.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${n.default.vErrors}.push(${g})`),w.code((0,t._)`${n.default.errors}++`)}function u(w,p){const{gen:g,validateName:b,schemaEnv:_}=w;_.$async?g.throw((0,t._)`new ${w.ValidationError}(${p})`):(g.assign((0,t._)`${b}.errors`,p),g.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(w,p,g){const{createErrors:b}=w.it;return b===!1?(0,t._)`{}`:f(w,p,g)}function f(w,p,g={}){const{gen:b,it:_}=w,P=[h(_,g),m(w,g)];return v(w,p,P),b.object(...P)}function h({errorPath:w},{instancePath:p}){const g=p?(0,t.str)`${w}${(0,r.getErrorPath)(p,r.Type.Str)}`:w;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,g)]}function m({keyword:w,it:{errSchemaPath:p}},{schemaPath:g,parentSchema:b}){let _=b?p:(0,t.str)`${p}/${w}`;return g&&(_=(0,t.str)`${_}${(0,r.getErrorPath)(g,r.Type.Str)}`),[c.schemaPath,_]}function v(w,{params:p,message:g},b){const{keyword:_,data:P,schemaValue:C,it:x}=w,{opts:T,propertyName:I,topSchemaRef:M,schemaPath:H}=x;b.push([c.keyword,_],[c.params,typeof p=="function"?p(w):p||(0,t._)`{}`]),T.messages&&b.push([c.message,typeof g=="function"?g(w):g]),T.verbose&&b.push([c.schema,C],[c.parentSchema,(0,t._)`${M}${H}`],[n.default.data,P]),I&&b.push([c.propertyName,I])}})(Tv);Object.defineProperty(bf,"__esModule",{value:!0});bf.boolOrEmptySchema=bf.topBoolOrEmptySchema=void 0;const Dxe=Tv,Mxe=lt,Nxe=Ki,Fxe={message:"boolean schema is false"};function Lxe(e){const{gen:t,schema:r,validateName:n}=e;r===!1?J6(e,!1):typeof r=="object"&&r.$async===!0?t.return(Nxe.default.data):(t.assign((0,Mxe._)`${n}.errors`,null),t.return(!0))}bf.topBoolOrEmptySchema=Lxe;function Bxe(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),J6(e)):r.var(t,!0)}bf.boolOrEmptySchema=Bxe;function J6(e,t){const{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Dxe.reportError)(i,Fxe,void 0,t)}var an={},rc={};Object.defineProperty(rc,"__esModule",{value:!0});rc.getRules=rc.isJSONType=void 0;const Vxe=["string","number","integer","boolean","null","object","array"],zxe=new Set(Vxe);function Uxe(e){return typeof e=="string"&&zxe.has(e)}rc.isJSONType=Uxe;function qxe(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}rc.getRules=qxe;var os={};Object.defineProperty(os,"__esModule",{value:!0});os.shouldUseRule=os.shouldUseGroup=os.schemaHasRulesForType=void 0;function Hxe({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&Z6(e,n)}os.schemaHasRulesForType=Hxe;function Z6(e,t){return t.rules.some(r=>e8(e,r))}os.shouldUseGroup=Z6;function e8(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}os.shouldUseRule=e8;Object.defineProperty(an,"__esModule",{value:!0});an.reportTypeError=an.checkDataTypes=an.checkDataType=an.coerceAndCheckDataType=an.getJSONTypes=an.getSchemaTypes=an.DataType=void 0;const Wxe=rc,Kxe=os,Gxe=Tv,ut=lt,t8=xe;var Ld;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ld||(an.DataType=Ld={}));function Qxe(e){const t=r8(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}an.getSchemaTypes=Qxe;function r8(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(Wxe.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}an.getJSONTypes=r8;function Yxe(e,t){const{gen:r,data:n,opts:i}=e,o=Xxe(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,Kxe.schemaHasRulesForType)(e,t[0]));if(a){const s=FO(t,n,i.strictNumbers,Ld.Wrong);r.if(s,()=>{o.length?Jxe(e,t,o):LO(e)})}return a}an.coerceAndCheckDataType=Yxe;const n8=new Set(["string","number","integer","boolean","null"]);function Xxe(e,t){return t?e.filter(r=>n8.has(r)||t==="array"&&r==="array"):[]}function Jxe(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,ut._)`typeof ${i}`),s=n.let("coerced",(0,ut._)`undefined`);o.coerceTypes==="array"&&n.if((0,ut._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ut._)`${i}[0]`).assign(a,(0,ut._)`typeof ${i}`).if(FO(t,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,ut._)`${s} !== undefined`);for(const u of r)(n8.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),LO(e),n.endIf(),n.if((0,ut._)`${s} !== undefined`,()=>{n.assign(i,s),Zxe(e,s)});function l(u){switch(u){case"string":n.elseIf((0,ut._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ut._)`"" + ${i}`).elseIf((0,ut._)`${i} === null`).assign(s,(0,ut._)`""`);return;case"number":n.elseIf((0,ut._)`${a} == "boolean" || ${i} === null
1400
- || (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,ut._)`+${i}`);return;case"integer":n.elseIf((0,ut._)`${a} === "boolean" || ${i} === null
1401
- || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,ut._)`+${i}`);return;case"boolean":n.elseIf((0,ut._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,ut._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,ut._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,ut._)`${a} === "string" || ${a} === "number"
1402
- || ${a} === "boolean" || ${i} === null`).assign(s,(0,ut._)`[${i}]`)}}}function Zxe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,ut._)`${t} !== undefined`,()=>e.assign((0,ut._)`${t}[${r}]`,n))}function rC(e,t,r,n=Ld.Correct){const i=n===Ld.Correct?ut.operators.EQ:ut.operators.NEQ;let o;switch(e){case"null":return(0,ut._)`${t} ${i} null`;case"array":o=(0,ut._)`Array.isArray(${t})`;break;case"object":o=(0,ut._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,ut._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,ut._)`typeof ${t} ${i} ${e}`}return n===Ld.Correct?o:(0,ut.not)(o);function a(s=ut.nil){return(0,ut.and)((0,ut._)`typeof ${t} == "number"`,s,r?(0,ut._)`isFinite(${t})`:ut.nil)}}an.checkDataType=rC;function FO(e,t,r,n){if(e.length===1)return rC(e[0],t,r,n);let i;const o=(0,t8.toHash)(e);if(o.array&&o.object){const a=(0,ut._)`typeof ${t} != "object"`;i=o.null?a:(0,ut._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=ut.nil;o.number&&delete o.integer;for(const a in o)i=(0,ut.and)(i,rC(a,t,r,n));return i}an.checkDataTypes=FO;const ePe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ut._)`{type: ${e}}`:(0,ut._)`{type: ${t}}`};function LO(e){const t=tPe(e);(0,Gxe.reportError)(t,ePe)}an.reportTypeError=LO;function tPe(e){const{gen:t,data:r,schema:n}=e,i=(0,t8.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}var Fw={};Object.defineProperty(Fw,"__esModule",{value:!0});Fw.assignDefaults=void 0;const Fc=lt,rPe=xe;function nPe(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const i in r)jD(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>jD(e,o,i.default))}Fw.assignDefaults=nPe;function jD(e,t,r){const{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;const s=(0,Fc._)`${o}${(0,Fc.getProperty)(t)}`;if(i){(0,rPe.checkStrictMode)(e,`default is ignored for: ${s}`);return}let l=(0,Fc._)`${s} === undefined`;a.useDefaults==="empty"&&(l=(0,Fc._)`${l} || ${s} === null || ${s} === ""`),n.if(l,(0,Fc._)`${s} = ${(0,Fc.stringify)(r)}`)}var Sa={},pt={};Object.defineProperty(pt,"__esModule",{value:!0});pt.validateUnion=pt.validateArray=pt.usePattern=pt.callValidateCode=pt.schemaProperties=pt.allSchemaProperties=pt.noPropertyInData=pt.propertyInData=pt.isOwnProperty=pt.hasPropFunc=pt.reportMissingProp=pt.checkMissingProp=pt.checkReportMissingProp=void 0;const mr=lt,BO=xe,Ms=Ki,iPe=xe;function oPe(e,t){const{gen:r,data:n,it:i}=e;r.if(zO(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,mr._)`${t}`},!0),e.error()})}pt.checkReportMissingProp=oPe;function aPe({gen:e,data:t,it:{opts:r}},n,i){return(0,mr.or)(...n.map(o=>(0,mr.and)(zO(e,t,o,r.ownProperties),(0,mr._)`${i} = ${o}`)))}pt.checkMissingProp=aPe;function sPe(e,t){e.setParams({missingProperty:t},!0),e.error()}pt.reportMissingProp=sPe;function i8(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,mr._)`Object.prototype.hasOwnProperty`})}pt.hasPropFunc=i8;function VO(e,t,r){return(0,mr._)`${i8(e)}.call(${t}, ${r})`}pt.isOwnProperty=VO;function lPe(e,t,r,n){const i=(0,mr._)`${t}${(0,mr.getProperty)(r)} !== undefined`;return n?(0,mr._)`${i} && ${VO(e,t,r)}`:i}pt.propertyInData=lPe;function zO(e,t,r,n){const i=(0,mr._)`${t}${(0,mr.getProperty)(r)} === undefined`;return n?(0,mr.or)(i,(0,mr.not)(VO(e,t,r))):i}pt.noPropertyInData=zO;function o8(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}pt.allSchemaProperties=o8;function uPe(e,t){return o8(t).filter(r=>!(0,BO.alwaysValidSchema)(e,t[r]))}pt.schemaProperties=uPe;function cPe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,l,u){const c=u?(0,mr._)`${e}, ${t}, ${n}${i}`:t,d=[[Ms.default.instancePath,(0,mr.strConcat)(Ms.default.instancePath,o)],[Ms.default.parentData,a.parentData],[Ms.default.parentDataProperty,a.parentDataProperty],[Ms.default.rootData,Ms.default.rootData]];a.opts.dynamicRef&&d.push([Ms.default.dynamicAnchors,Ms.default.dynamicAnchors]);const f=(0,mr._)`${c}, ${r.object(...d)}`;return l!==mr.nil?(0,mr._)`${s}.call(${l}, ${f})`:(0,mr._)`${s}(${f})`}pt.callValidateCode=cPe;const dPe=(0,mr._)`new RegExp`;function fPe({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,mr._)`${i.code==="new RegExp"?dPe:(0,iPe.useFunc)(e,i)}(${r}, ${n})`})}pt.usePattern=fPe;function hPe(e){const{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){const s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(o,!0),a(()=>t.break()),o;function a(s){const l=t.const("len",(0,mr._)`${r}.length`);t.forRange("i",0,l,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:BO.Type.Num},o),t.if((0,mr.not)(o),s)})}}pt.validateArray=hPe;function pPe(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,BO.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;const a=t.let("valid",!1),s=t.name("_valid");t.block(()=>r.forEach((l,u)=>{const c=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);t.assign(a,(0,mr._)`${a} || ${s}`),e.mergeValidEvaluated(c,s)||t.if((0,mr.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}pt.validateUnion=pPe;Object.defineProperty(Sa,"__esModule",{value:!0});Sa.validateKeywordUsage=Sa.validSchemaType=Sa.funcKeywordCode=Sa.macroKeywordCode=void 0;const Kn=lt,pu=Ki,mPe=pt,vPe=Tv;function gPe(e,t){const{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,s=t.macro.call(a.self,i,o,a),l=a8(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);const u=r.name("valid");e.subschema({schema:s,schemaPath:Kn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Sa.macroKeywordCode=gPe;function yPe(e,t){var r;const{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:l}=e;wPe(l,t);const u=!s&&t.compile?t.compile.call(l.self,o,a,l):t.validate,c=a8(n,i,u),d=n.let("valid");e.block$data(d,f),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function f(){if(t.errors===!1)v(),t.modifying&&$D(e),w(()=>e.error());else{const p=t.async?h():m();t.modifying&&$D(e),w(()=>bPe(e,p))}}function h(){const p=n.let("ruleErrs",null);return n.try(()=>v((0,Kn._)`await `),g=>n.assign(d,!1).if((0,Kn._)`${g} instanceof ${l.ValidationError}`,()=>n.assign(p,(0,Kn._)`${g}.errors`),()=>n.throw(g))),p}function m(){const p=(0,Kn._)`${c}.errors`;return n.assign(p,null),v(Kn.nil),p}function v(p=t.async?(0,Kn._)`await `:Kn.nil){const g=l.opts.passContext?pu.default.this:pu.default.self,b=!("compile"in t&&!s||t.schema===!1);n.assign(d,(0,Kn._)`${p}${(0,mPe.callValidateCode)(e,c,g,b)}`,t.modifying)}function w(p){var g;n.if((0,Kn.not)((g=t.valid)!==null&&g!==void 0?g:d),p)}}Sa.funcKeywordCode=yPe;function $D(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Kn._)`${n.parentData}[${n.parentDataProperty}]`))}function bPe(e,t){const{gen:r}=e;r.if((0,Kn._)`Array.isArray(${t})`,()=>{r.assign(pu.default.vErrors,(0,Kn._)`${pu.default.vErrors} === null ? ${t} : ${pu.default.vErrors}.concat(${t})`).assign(pu.default.errors,(0,Kn._)`${pu.default.vErrors}.length`),(0,vPe.extendErrors)(e)},()=>e.error())}function wPe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function a8(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Kn.stringify)(r)})}function SPe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Sa.validSchemaType=SPe;function _Pe({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Sa.validateKeywordUsage=_Pe;var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.extendSubschemaMode=Sl.extendSubschemaData=Sl.getSubschema=void 0;const ga=lt,s8=xe;function xPe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const s=e.schema[t];return r===void 0?{schema:s,schemaPath:(0,ga._)`${e.schemaPath}${(0,ga.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:(0,ga._)`${e.schemaPath}${(0,ga.getProperty)(t)}${(0,ga.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s8.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Sl.getSubschema=xPe;function PPe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:s}=t;if(r!==void 0){const{errorPath:u,dataPathArr:c,opts:d}=t,f=s.let("data",(0,ga._)`${t.data}${(0,ga.getProperty)(r)}`,!0);l(f),e.errorPath=(0,ga.str)`${u}${(0,s8.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ga._)`${r}`,e.dataPathArr=[...c,e.parentDataProperty]}if(i!==void 0){const u=i instanceof ga.Name?i:s.let("data",i,!0);l(u),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function l(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Sl.extendSubschemaData=PPe;function CPe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}Sl.extendSubschemaMode=CPe;var Rn={},l8=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},u8={exports:{}},il=u8.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};xy(t,n,i,e,"",e)};il.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};il.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};il.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};il.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function xy(e,t,r,n,i,o,a,s,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,a,s,l,u);for(var c in n){var d=n[c];if(Array.isArray(d)){if(c in il.arrayKeywords)for(var f=0;f<d.length;f++)xy(e,t,r,d[f],i+"/"+c+"/"+f,o,i,c,n,f)}else if(c in il.propsKeywords){if(d&&typeof d=="object")for(var h in d)xy(e,t,r,d[h],i+"/"+c+"/"+EPe(h),o,i,c,n,h)}else(c in il.keywords||e.allKeys&&!(c in il.skipKeywords))&&xy(e,t,r,d,i+"/"+c,o,i,c,n)}r(n,i,o,a,s,l,u)}}function EPe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var TPe=u8.exports;Object.defineProperty(Rn,"__esModule",{value:!0});Rn.getSchemaRefs=Rn.resolveUrl=Rn.normalizeId=Rn._getFullPath=Rn.getFullPath=Rn.inlineRef=void 0;const OPe=xe,RPe=l8,IPe=TPe,kPe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jPe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!nC(e):t?c8(e)<=t:!1}Rn.inlineRef=jPe;const $Pe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function nC(e){for(const t in e){if($Pe.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(nC)||typeof r=="object"&&nC(r))return!0}return!1}function c8(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!kPe.has(r)&&(typeof e[r]=="object"&&(0,OPe.eachItem)(e[r],n=>t+=c8(n)),t===1/0))return 1/0}return t}function d8(e,t="",r){r!==!1&&(t=Bd(t));const n=e.parse(t);return f8(e,n)}Rn.getFullPath=d8;function f8(e,t){return e.serialize(t).split("#")[0]+"#"}Rn._getFullPath=f8;const APe=/#\/?$/;function Bd(e){return e?e.replace(APe,""):""}Rn.normalizeId=Bd;function DPe(e,t,r){return r=Bd(r),e.resolve(t,r)}Rn.resolveUrl=DPe;const MPe=/^[a-z_][-a-z0-9._]*$/i;function NPe(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=Bd(e[r]||t),o={"":i},a=d8(n,i,!1),s={},l=new Set;return IPe(e,{allKeys:!0},(d,f,h,m)=>{if(m===void 0)return;const v=a+f;let w=o[m];typeof d[r]=="string"&&(w=p.call(this,d[r])),g.call(this,d.$anchor),g.call(this,d.$dynamicAnchor),o[f]=w;function p(b){const _=this.opts.uriResolver.resolve;if(b=Bd(w?_(w,b):b),l.has(b))throw c(b);l.add(b);let P=this.refs[b];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,b):b!==Bd(v)&&(b[0]==="#"?(u(d,s[b],b),s[b]=d):this.refs[b]=v),b}function g(b){if(typeof b=="string"){if(!MPe.test(b))throw new Error(`invalid anchor "${b}"`);p.call(this,`#${b}`)}}}),s;function u(d,f,h){if(f!==void 0&&!RPe(d,f))throw c(h)}function c(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Rn.getSchemaRefs=NPe;Object.defineProperty(Go,"__esModule",{value:!0});Go.getData=Go.KeywordCxt=Go.validateFunctionCode=void 0;const h8=bf,AD=an,UO=os,Q0=an,FPe=Fw,Pp=Sa,i_=Sl,De=lt,rt=Ki,LPe=Rn,as=xe,Th=Tv;function BPe(e){if(v8(e)&&(g8(e),m8(e))){UPe(e);return}p8(e,()=>(0,h8.topBoolOrEmptySchema)(e))}Go.validateFunctionCode=BPe;function p8({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,De._)`${rt.default.data}, ${rt.default.valCxt}`,n.$async,()=>{e.code((0,De._)`"use strict"; ${DD(r,i)}`),zPe(e,i),e.code(o)}):e.func(t,(0,De._)`${rt.default.data}, ${VPe(i)}`,n.$async,()=>e.code(DD(r,i)).code(o))}function VPe(e){return(0,De._)`{${rt.default.instancePath}="", ${rt.default.parentData}, ${rt.default.parentDataProperty}, ${rt.default.rootData}=${rt.default.data}${e.dynamicRef?(0,De._)`, ${rt.default.dynamicAnchors}={}`:De.nil}}={}`}function zPe(e,t){e.if(rt.default.valCxt,()=>{e.var(rt.default.instancePath,(0,De._)`${rt.default.valCxt}.${rt.default.instancePath}`),e.var(rt.default.parentData,(0,De._)`${rt.default.valCxt}.${rt.default.parentData}`),e.var(rt.default.parentDataProperty,(0,De._)`${rt.default.valCxt}.${rt.default.parentDataProperty}`),e.var(rt.default.rootData,(0,De._)`${rt.default.valCxt}.${rt.default.rootData}`),t.dynamicRef&&e.var(rt.default.dynamicAnchors,(0,De._)`${rt.default.valCxt}.${rt.default.dynamicAnchors}`)},()=>{e.var(rt.default.instancePath,(0,De._)`""`),e.var(rt.default.parentData,(0,De._)`undefined`),e.var(rt.default.parentDataProperty,(0,De._)`undefined`),e.var(rt.default.rootData,rt.default.data),t.dynamicRef&&e.var(rt.default.dynamicAnchors,(0,De._)`{}`)})}function UPe(e){const{schema:t,opts:r,gen:n}=e;p8(e,()=>{r.$comment&&t.$comment&&b8(e),GPe(e),n.let(rt.default.vErrors,null),n.let(rt.default.errors,0),r.unevaluated&&qPe(e),y8(e),XPe(e)})}function qPe(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,De._)`${r}.evaluated`),t.if((0,De._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,De._)`${e.evaluated}.props`,(0,De._)`undefined`)),t.if((0,De._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,De._)`${e.evaluated}.items`,(0,De._)`undefined`))}function DD(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,De._)`/*# sourceURL=${r} */`:De.nil}function HPe(e,t){if(v8(e)&&(g8(e),m8(e))){WPe(e,t);return}(0,h8.boolOrEmptySchema)(e,t)}function m8({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v8(e){return typeof e.schema!="boolean"}function WPe(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&b8(e),QPe(e),YPe(e);const o=n.const("_errs",rt.default.errors);y8(e,o),n.var(t,(0,De._)`${o} === ${rt.default.errors}`)}function g8(e){(0,as.checkUnknownRules)(e),KPe(e)}function y8(e,t){if(e.opts.jtd)return MD(e,[],!1,t);const r=(0,AD.getSchemaTypes)(e.schema),n=(0,AD.coerceAndCheckDataType)(e,r);MD(e,r,!n,t)}function KPe(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,as.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function GPe(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,as.checkStrictMode)(e,"default is ignored in the schema root")}function QPe(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,LPe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function YPe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function b8({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(i.$comment===!0)e.code((0,De._)`${rt.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){const a=(0,De.str)`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,De._)`${rt.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function XPe(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,De._)`${rt.default.errors} === 0`,()=>t.return(rt.default.data),()=>t.throw((0,De._)`new ${i}(${rt.default.vErrors})`)):(t.assign((0,De._)`${n}.errors`,rt.default.vErrors),o.unevaluated&&JPe(e),t.return((0,De._)`${rt.default.errors} === 0`))}function JPe({gen:e,evaluated:t,props:r,items:n}){r instanceof De.Name&&e.assign((0,De._)`${t}.props`,r),n instanceof De.Name&&e.assign((0,De._)`${t}.items`,n)}function MD(e,t,r,n){const{gen:i,schema:o,data:a,allErrors:s,opts:l,self:u}=e,{RULES:c}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,as.schemaHasRulesButRef)(o,c))){i.block(()=>_8(e,"$ref",c.all.$ref.definition));return}l.jtd||ZPe(e,t),i.block(()=>{for(const f of c.rules)d(f);d(c.post)});function d(f){(0,UO.shouldUseGroup)(o,f)&&(f.type?(i.if((0,Q0.checkDataType)(f.type,a,l.strictNumbers)),ND(e,f),t.length===1&&t[0]===f.type&&r&&(i.else(),(0,Q0.reportTypeError)(e)),i.endIf()):ND(e,f),s||i.if((0,De._)`${rt.default.errors} === ${n||0}`))}}function ND(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,FPe.assignDefaults)(e,t.type),r.block(()=>{for(const o of t.rules)(0,UO.shouldUseRule)(n,o)&&_8(e,o.keyword,o.definition,t.type)})}function ZPe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(eCe(e,t),e.opts.allowUnionTypes||tCe(e,t),rCe(e,e.dataTypes))}function eCe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{w8(e.dataTypes,r)||qO(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),iCe(e,t)}}function tCe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&qO(e,"use allowUnionTypes to allow union type keyword")}function rCe(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,UO.shouldUseRule)(e.schema,i)){const{type:o}=i.definition;o.length&&!o.some(a=>nCe(t,a))&&qO(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function nCe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function w8(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function iCe(e,t){const r=[];for(const n of e.dataTypes)w8(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function qO(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,as.checkStrictMode)(e,t,e.opts.strictTypes)}class S8{constructor(t,r,n){if((0,Pp.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,as.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",x8(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Pp.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",rt.default.errors))}result(t,r,n){this.failResult((0,De.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,De.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,De._)`${r} !== undefined && (${(0,De.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Th.reportExtraError:Th.reportError)(this,this.def.error,r)}$dataError(){(0,Th.reportError)(this,this.def.$dataError||Th.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Th.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=De.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=De.nil,r=De.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,De.or)((0,De._)`${i} === undefined`,r)),t!==De.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==De.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,De.or)(a(),s());function a(){if(n.length){if(!(r instanceof De.Name))throw new Error("ajv implementation error");const l=Array.isArray(n)?n:[n];return(0,De._)`${(0,Q0.checkDataTypes)(l,r,o.opts.strictNumbers,Q0.DataType.Wrong)}`}return De.nil}function s(){if(i.validateSchema){const l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,De._)`!${l}(${r})`}return De.nil}}subschema(t,r){const n=(0,i_.getSubschema)(this.it,t);(0,i_.extendSubschemaData)(n,this.it,t),(0,i_.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};return HPe(i,r),i}mergeEvaluated(t,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=as.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=as.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,De.Name)),!0}}Go.KeywordCxt=S8;function _8(e,t,r,n){const i=new S8(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pp.funcKeywordCode)(i,r):"macro"in r?(0,Pp.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pp.funcKeywordCode)(i,r)}const oCe=/^\/(?:[^~]|~0|~1)*$/,aCe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x8(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return rt.default.rootData;if(e[0]==="/"){if(!oCe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=rt.default.rootData}else{const u=aCe.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);const c=+u[1];if(i=u[2],i==="#"){if(c>=t)throw new Error(l("property/index",c));return n[t-c]}if(c>t)throw new Error(l("data",c));if(o=r[t-c],!i)return o}let a=o;const s=i.split("/");for(const u of s)u&&(o=(0,De._)`${o}${(0,De.getProperty)((0,as.unescapeJsonPointer)(u))}`,a=(0,De._)`${a} && ${o}`);return a;function l(u,c){return`Cannot access ${u} ${c} levels up, current level is ${t}`}}Go.getData=x8;var Ov={};Object.defineProperty(Ov,"__esModule",{value:!0});class sCe extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Ov.default=sCe;var Wf={};Object.defineProperty(Wf,"__esModule",{value:!0});const o_=Rn;class lCe extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,o_.resolveUrl)(t,r,n),this.missingSchema=(0,o_.normalizeId)((0,o_.getFullPath)(t,this.missingRef))}}Wf.default=lCe;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.resolveSchema=Qn.getCompilingSchema=Qn.resolveRef=Qn.compileSchema=Qn.SchemaEnv=void 0;const Io=lt,uCe=Ov,iu=Ki,Lo=Rn,FD=xe,cCe=Go;class Lw{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Lo.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}Qn.SchemaEnv=Lw;function HO(e){const t=P8.call(this,e);if(t)return t;const r=(0,Lo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Io.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o});let s;e.$async&&(s=a.scopeValue("Error",{ref:uCe.default,code:(0,Io._)`require("ajv/dist/runtime/validation_error").default`}));const l=a.scopeName("validate");e.validateName=l;const u={gen:a,allErrors:this.opts.allErrors,data:iu.default.data,parentData:iu.default.parentData,parentDataProperty:iu.default.parentDataProperty,dataNames:[iu.default.data],dataPathArr:[Io.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Io.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Io.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Io._)`""`,opts:this.opts,self:this};let c;try{this._compilations.add(e),(0,cCe.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();c=`${a.scopeRefs(iu.default.scope)}return ${d}`,this.opts.code.process&&(c=this.opts.code.process(c,e));const h=new Function(`${iu.default.self}`,`${iu.default.scope}`,c)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:m,items:v}=u;h.evaluated={props:m instanceof Io.Name?void 0:m,items:v instanceof Io.Name?void 0:v,dynamicProps:m instanceof Io.Name,dynamicItems:v instanceof Io.Name},h.source&&(h.source.evaluated=(0,Io.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),d}finally{this._compilations.delete(e)}}Qn.compileSchema=HO;function dCe(e,t,r){var n;r=(0,Lo.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=pCe.call(this,e,r);if(o===void 0){const a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Lw({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=fCe.call(this,o)}Qn.resolveRef=dCe;function fCe(e){return(0,Lo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:HO.call(this,e)}function P8(e){for(const t of this._compilations)if(hCe(t,e))return t}Qn.getCompilingSchema=P8;function hCe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function pCe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Bw.call(this,e,t)}function Bw(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Lo._getFullPath)(this.opts.uriResolver,r);let i=(0,Lo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return a_.call(this,r,e);const o=(0,Lo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){const s=Bw.call(this,e,a);return typeof(s==null?void 0:s.schema)!="object"?void 0:a_.call(this,r,s)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||HO.call(this,a),o===(0,Lo.normalizeId)(t)){const{schema:s}=a,{schemaId:l}=this.opts,u=s[l];return u&&(i=(0,Lo.resolveUrl)(this.opts.uriResolver,i,u)),new Lw({schema:s,schemaId:l,root:e,baseId:i})}return a_.call(this,r,a)}}Qn.resolveSchema=Bw;const mCe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function a_(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const l=r[(0,FD.unescapeFragment)(s)];if(l===void 0)return;r=l;const u=typeof r=="object"&&r[this.opts.schemaId];!mCe.has(s)&&u&&(t=(0,Lo.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,FD.schemaHasRulesButRef)(r,this.RULES)){const s=(0,Lo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Bw.call(this,n,s)}const{schemaId:a}=this.opts;if(o=o||new Lw({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}const vCe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",gCe="Meta-schema for $data reference (JSON AnySchema extension proposal)",yCe="object",bCe=["$data"],wCe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},SCe=!1,_Ce={$id:vCe,description:gCe,type:yCe,required:bCe,properties:wCe,additionalProperties:SCe};var WO={},iC={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(Zs,function(r){function n(){for(var $=arguments.length,O=Array($),F=0;F<$;F++)O[F]=arguments[F];if(O.length>1){O[0]=O[0].slice(0,-1);for(var B=O.length-1,K=1;K<B;++K)O[K]=O[K].slice(1,-1);return O[B]=O[B].slice(1),O.join("")}else return O[0]}function i($){return"(?:"+$+")"}function o($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function a($){return $.toUpperCase()}function s($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function l($,O){var F=$;if(O)for(var B in O)F[B]=O[B];return F}function u($){var O="[A-Za-z]",F="[0-9]",B=n(F,"[A-Fa-f]"),K=i(i("%[EFef]"+B+"%"+B+B+"%"+B+B)+"|"+i("%[89A-Fa-f]"+B+"%"+B+B)+"|"+i("%"+B+B)),_e="[\\:\\/\\?\\#\\[\\]\\@]",ke="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ke=n(_e,ke),Pt=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",zt=$?"[\\uE000-\\uF8FF]":"[]",it=n(O,F,"[\\-\\.\\_\\~]",Pt);i(O+n(O,F,"[\\+\\-\\.]")+"*"),i(i(K+"|"+n(it,ke,"[\\:]"))+"*");var ht=i(i("25[0-5]")+"|"+i("2[0-4]"+F)+"|"+i("1"+F+F)+"|"+i("0?[1-9]"+F)+"|0?0?"+F),er=i(ht+"\\."+ht+"\\."+ht+"\\."+ht),He=i(B+"{1,4}"),Ot=i(i(He+"\\:"+He)+"|"+er),Fe=i(i(He+"\\:")+"{6}"+Ot),ot=i("\\:\\:"+i(He+"\\:")+"{5}"+Ot),cr=i(i(He)+"?\\:\\:"+i(He+"\\:")+"{4}"+Ot),Ut=i(i(i(He+"\\:")+"{0,1}"+He)+"?\\:\\:"+i(He+"\\:")+"{3}"+Ot),Ur=i(i(i(He+"\\:")+"{0,2}"+He)+"?\\:\\:"+i(He+"\\:")+"{2}"+Ot),Qi=i(i(i(He+"\\:")+"{0,3}"+He)+"?\\:\\:"+He+"\\:"+Ot),Po=i(i(i(He+"\\:")+"{0,4}"+He)+"?\\:\\:"+Ot),ii=i(i(i(He+"\\:")+"{0,5}"+He)+"?\\:\\:"+He),Yi=i(i(i(He+"\\:")+"{0,6}"+He)+"?\\:\\:"),oa=i([Fe,ot,cr,Ut,Ur,Qi,Po,ii,Yi].join("|")),Co=i(i(it+"|"+K)+"+");i("[vV]"+B+"+\\."+n(it,ke,"[\\:]")+"+"),i(i(K+"|"+n(it,ke))+"*");var Zl=i(K+"|"+n(it,ke,"[\\:\\@]"));return i(i(K+"|"+n(it,ke,"[\\@]"))+"+"),i(i(Zl+"|"+n("[\\/\\?]",zt))+"*"),{NOT_SCHEME:new RegExp(n("[^]",O,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",it,ke),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",it,ke),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",it,ke),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",it,ke),"g"),NOT_QUERY:new RegExp(n("[^\\%]",it,ke,"[\\:\\@\\/\\?]",zt),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",it,ke,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",it,ke),"g"),UNRESERVED:new RegExp(it,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",it,Ke),"g"),PCT_ENCODED:new RegExp(K,"g"),IPV4ADDRESS:new RegExp("^("+er+")$"),IPV6ADDRESS:new RegExp("^\\[?("+oa+")"+i(i("\\%25|\\%(?!"+B+"{2})")+"("+Co+")")+"?\\]?$")}}var c=u(!1),d=u(!0),f=function(){function $(O,F){var B=[],K=!0,_e=!1,ke=void 0;try{for(var Ke=O[Symbol.iterator](),Pt;!(K=(Pt=Ke.next()).done)&&(B.push(Pt.value),!(F&&B.length===F));K=!0);}catch(zt){_e=!0,ke=zt}finally{try{!K&&Ke.return&&Ke.return()}finally{if(_e)throw ke}}return B}return function(O,F){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return $(O,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function($){if(Array.isArray($)){for(var O=0,F=Array($.length);O<$.length;O++)F[O]=$[O];return F}else return Array.from($)},m=2147483647,v=36,w=1,p=26,g=38,b=700,_=72,P=128,C="-",x=/^xn--/,T=/[^\0-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=v-w,re=Math.floor,ie=String.fromCharCode;function R($){throw new RangeError(M[$])}function L($,O){for(var F=[],B=$.length;B--;)F[B]=O($[B]);return F}function X($,O){var F=$.split("@"),B="";F.length>1&&(B=F[0]+"@",$=F[1]),$=$.replace(I,".");var K=$.split("."),_e=L(K,O).join(".");return B+_e}function Q($){for(var O=[],F=0,B=$.length;F<B;){var K=$.charCodeAt(F++);if(K>=55296&&K<=56319&&F<B){var _e=$.charCodeAt(F++);(_e&64512)==56320?O.push(((K&1023)<<10)+(_e&1023)+65536):(O.push(K),F--)}else O.push(K)}return O}var W=function(O){return String.fromCodePoint.apply(String,h(O))},te=function(O){return O-48<10?O-22:O-65<26?O-65:O-97<26?O-97:v},G=function(O,F){return O+22+75*(O<26)-((F!=0)<<5)},A=function(O,F,B){var K=0;for(O=B?re(O/b):O>>1,O+=re(O/F);O>H*p>>1;K+=v)O=re(O/H);return re(K+(H+1)*O/(O+g))},U=function(O){var F=[],B=O.length,K=0,_e=P,ke=_,Ke=O.lastIndexOf(C);Ke<0&&(Ke=0);for(var Pt=0;Pt<Ke;++Pt)O.charCodeAt(Pt)>=128&&R("not-basic"),F.push(O.charCodeAt(Pt));for(var zt=Ke>0?Ke+1:0;zt<B;){for(var it=K,ht=1,er=v;;er+=v){zt>=B&&R("invalid-input");var He=te(O.charCodeAt(zt++));(He>=v||He>re((m-K)/ht))&&R("overflow"),K+=He*ht;var Ot=er<=ke?w:er>=ke+p?p:er-ke;if(He<Ot)break;var Fe=v-Ot;ht>re(m/Fe)&&R("overflow"),ht*=Fe}var ot=F.length+1;ke=A(K-it,ot,it==0),re(K/ot)>m-_e&&R("overflow"),_e+=re(K/ot),K%=ot,F.splice(K++,0,_e)}return String.fromCodePoint.apply(String,F)},N=function(O){var F=[];O=Q(O);var B=O.length,K=P,_e=0,ke=_,Ke=!0,Pt=!1,zt=void 0;try{for(var it=O[Symbol.iterator](),ht;!(Ke=(ht=it.next()).done);Ke=!0){var er=ht.value;er<128&&F.push(ie(er))}}catch(eu){Pt=!0,zt=eu}finally{try{!Ke&&it.return&&it.return()}finally{if(Pt)throw zt}}var He=F.length,Ot=He;for(He&&F.push(C);Ot<B;){var Fe=m,ot=!0,cr=!1,Ut=void 0;try{for(var Ur=O[Symbol.iterator](),Qi;!(ot=(Qi=Ur.next()).done);ot=!0){var Po=Qi.value;Po>=K&&Po<Fe&&(Fe=Po)}}catch(eu){cr=!0,Ut=eu}finally{try{!ot&&Ur.return&&Ur.return()}finally{if(cr)throw Ut}}var ii=Ot+1;Fe-K>re((m-_e)/ii)&&R("overflow"),_e+=(Fe-K)*ii,K=Fe;var Yi=!0,oa=!1,Co=void 0;try{for(var Zl=O[Symbol.iterator](),kv;!(Yi=(kv=Zl.next()).done);Yi=!0){var jv=kv.value;if(jv<K&&++_e>m&&R("overflow"),jv==K){for(var _c=_e,xc=v;;xc+=v){var Pc=xc<=ke?w:xc>=ke+p?p:xc-ke;if(_c<Pc)break;var $v=_c-Pc,Av=v-Pc;F.push(ie(G(Pc+$v%Av,0))),_c=re($v/Av)}F.push(ie(G(_c,0))),ke=A(_e,ii,Ot==He),_e=0,++Ot}}}catch(eu){oa=!0,Co=eu}finally{try{!Yi&&Zl.return&&Zl.return()}finally{if(oa)throw Co}}++_e,++K}return F.join("")},E=function(O){return X(O,function(F){return x.test(F)?U(F.slice(4).toLowerCase()):F})},k=function(O){return X(O,function(F){return T.test(F)?"xn--"+N(F):F})},D={version:"2.1.0",ucs2:{decode:Q,encode:W},decode:U,encode:N,toASCII:k,toUnicode:E},ee={};function oe($){var O=$.charCodeAt(0),F=void 0;return O<16?F="%0"+O.toString(16).toUpperCase():O<128?F="%"+O.toString(16).toUpperCase():O<2048?F="%"+(O>>6|192).toString(16).toUpperCase()+"%"+(O&63|128).toString(16).toUpperCase():F="%"+(O>>12|224).toString(16).toUpperCase()+"%"+(O>>6&63|128).toString(16).toUpperCase()+"%"+(O&63|128).toString(16).toUpperCase(),F}function ve($){for(var O="",F=0,B=$.length;F<B;){var K=parseInt($.substr(F+1,2),16);if(K<128)O+=String.fromCharCode(K),F+=3;else if(K>=194&&K<224){if(B-F>=6){var _e=parseInt($.substr(F+4,2),16);O+=String.fromCharCode((K&31)<<6|_e&63)}else O+=$.substr(F,6);F+=6}else if(K>=224){if(B-F>=9){var ke=parseInt($.substr(F+4,2),16),Ke=parseInt($.substr(F+7,2),16);O+=String.fromCharCode((K&15)<<12|(ke&63)<<6|Ke&63)}else O+=$.substr(F,9);F+=9}else O+=$.substr(F,3),F+=3}return O}function Se($,O){function F(B){var K=ve(B);return K.match(O.UNRESERVED)?K:B}return $.scheme&&($.scheme=String($.scheme).replace(O.PCT_ENCODED,F).toLowerCase().replace(O.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(O.PCT_ENCODED,F).replace(O.NOT_USERINFO,oe).replace(O.PCT_ENCODED,a)),$.host!==void 0&&($.host=String($.host).replace(O.PCT_ENCODED,F).toLowerCase().replace(O.NOT_HOST,oe).replace(O.PCT_ENCODED,a)),$.path!==void 0&&($.path=String($.path).replace(O.PCT_ENCODED,F).replace($.scheme?O.NOT_PATH:O.NOT_PATH_NOSCHEME,oe).replace(O.PCT_ENCODED,a)),$.query!==void 0&&($.query=String($.query).replace(O.PCT_ENCODED,F).replace(O.NOT_QUERY,oe).replace(O.PCT_ENCODED,a)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(O.PCT_ENCODED,F).replace(O.NOT_FRAGMENT,oe).replace(O.PCT_ENCODED,a)),$}function $e($){return $.replace(/^0*(.*)/,"$1")||"0"}function ge($,O){var F=$.match(O.IPV4ADDRESS)||[],B=f(F,2),K=B[1];return K?K.split(".").map($e).join("."):$}function st($,O){var F=$.match(O.IPV6ADDRESS)||[],B=f(F,3),K=B[1],_e=B[2];if(K){for(var ke=K.toLowerCase().split("::").reverse(),Ke=f(ke,2),Pt=Ke[0],zt=Ke[1],it=zt?zt.split(":").map($e):[],ht=Pt.split(":").map($e),er=O.IPV4ADDRESS.test(ht[ht.length-1]),He=er?7:8,Ot=ht.length-He,Fe=Array(He),ot=0;ot<He;++ot)Fe[ot]=it[ot]||ht[Ot+ot]||"";er&&(Fe[He-1]=ge(Fe[He-1],O));var cr=Fe.reduce(function(ii,Yi,oa){if(!Yi||Yi==="0"){var Co=ii[ii.length-1];Co&&Co.index+Co.length===oa?Co.length++:ii.push({index:oa,length:1})}return ii},[]),Ut=cr.sort(function(ii,Yi){return Yi.length-ii.length})[0],Ur=void 0;if(Ut&&Ut.length>1){var Qi=Fe.slice(0,Ut.index),Po=Fe.slice(Ut.index+Ut.length);Ur=Qi.join(":")+"::"+Po.join(":")}else Ur=Fe.join(":");return _e&&(Ur+="%"+_e),Ur}else return $}var Vt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ce="".match(/(){0}/)[1]===void 0;function ye($){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F={},B=O.iri!==!1?d:c;O.reference==="suffix"&&($=(O.scheme?O.scheme+":":"")+"//"+$);var K=$.match(Vt);if(K){ce?(F.scheme=K[1],F.userinfo=K[3],F.host=K[4],F.port=parseInt(K[5],10),F.path=K[6]||"",F.query=K[7],F.fragment=K[8],isNaN(F.port)&&(F.port=K[5])):(F.scheme=K[1]||void 0,F.userinfo=$.indexOf("@")!==-1?K[3]:void 0,F.host=$.indexOf("//")!==-1?K[4]:void 0,F.port=parseInt(K[5],10),F.path=K[6]||"",F.query=$.indexOf("?")!==-1?K[7]:void 0,F.fragment=$.indexOf("#")!==-1?K[8]:void 0,isNaN(F.port)&&(F.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?K[4]:void 0)),F.host&&(F.host=st(ge(F.host,B),B)),F.scheme===void 0&&F.userinfo===void 0&&F.host===void 0&&F.port===void 0&&!F.path&&F.query===void 0?F.reference="same-document":F.scheme===void 0?F.reference="relative":F.fragment===void 0?F.reference="absolute":F.reference="uri",O.reference&&O.reference!=="suffix"&&O.reference!==F.reference&&(F.error=F.error||"URI is not a "+O.reference+" reference.");var _e=ee[(O.scheme||F.scheme||"").toLowerCase()];if(!O.unicodeSupport&&(!_e||!_e.unicodeSupport)){if(F.host&&(O.domainHost||_e&&_e.domainHost))try{F.host=D.toASCII(F.host.replace(B.PCT_ENCODED,ve).toLowerCase())}catch(ke){F.error=F.error||"Host's domain name can not be converted to ASCII via punycode: "+ke}Se(F,c)}else Se(F,B);_e&&_e.parse&&_e.parse(F,O)}else F.error=F.error||"URI can not be parsed.";return F}function Xe($,O){var F=O.iri!==!1?d:c,B=[];return $.userinfo!==void 0&&(B.push($.userinfo),B.push("@")),$.host!==void 0&&B.push(st(ge(String($.host),F),F).replace(F.IPV6ADDRESS,function(K,_e,ke){return"["+_e+(ke?"%25"+ke:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(B.push(":"),B.push(String($.port))),B.length?B.join(""):void 0}var kt=/^\.\.?\//,zr=/^\/\.(\/|$)/,Zt=/^\/\.\.(\/|$)/,Or=/^\/?(?:.|\n)*?(?=\/|$)/;function jt($){for(var O=[];$.length;)if($.match(kt))$=$.replace(kt,"");else if($.match(zr))$=$.replace(zr,"/");else if($.match(Zt))$=$.replace(Zt,"/"),O.pop();else if($==="."||$==="..")$="";else{var F=$.match(Or);if(F){var B=F[0];$=$.slice(B.length),O.push(B)}else throw new Error("Unexpected dot segment condition")}return O.join("")}function ct($){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=O.iri?d:c,B=[],K=ee[(O.scheme||$.scheme||"").toLowerCase()];if(K&&K.serialize&&K.serialize($,O),$.host&&!F.IPV6ADDRESS.test($.host)){if(O.domainHost||K&&K.domainHost)try{$.host=O.iri?D.toUnicode($.host):D.toASCII($.host.replace(F.PCT_ENCODED,ve).toLowerCase())}catch(Ke){$.error=$.error||"Host's domain name can not be converted to "+(O.iri?"Unicode":"ASCII")+" via punycode: "+Ke}}Se($,F),O.reference!=="suffix"&&$.scheme&&(B.push($.scheme),B.push(":"));var _e=Xe($,O);if(_e!==void 0&&(O.reference!=="suffix"&&B.push("//"),B.push(_e),$.path&&$.path.charAt(0)!=="/"&&B.push("/")),$.path!==void 0){var ke=$.path;!O.absolutePath&&(!K||!K.absolutePath)&&(ke=jt(ke)),_e===void 0&&(ke=ke.replace(/^\/\//,"/%2F")),B.push(ke)}return $.query!==void 0&&(B.push("?"),B.push($.query)),$.fragment!==void 0&&(B.push("#"),B.push($.fragment)),B.join("")}function en($,O){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},B=arguments[3],K={};return B||($=ye(ct($,F),F),O=ye(ct(O,F),F)),F=F||{},!F.tolerant&&O.scheme?(K.scheme=O.scheme,K.userinfo=O.userinfo,K.host=O.host,K.port=O.port,K.path=jt(O.path||""),K.query=O.query):(O.userinfo!==void 0||O.host!==void 0||O.port!==void 0?(K.userinfo=O.userinfo,K.host=O.host,K.port=O.port,K.path=jt(O.path||""),K.query=O.query):(O.path?(O.path.charAt(0)==="/"?K.path=jt(O.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?K.path="/"+O.path:$.path?K.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+O.path:K.path=O.path,K.path=jt(K.path)),K.query=O.query):(K.path=$.path,O.query!==void 0?K.query=O.query:K.query=$.query),K.userinfo=$.userinfo,K.host=$.host,K.port=$.port),K.scheme=$.scheme),K.fragment=O.fragment,K}function cn($,O,F){var B=l({scheme:"null"},F);return ct(en(ye($,B),ye(O,B),B,!0),B)}function yr($,O){return typeof $=="string"?$=ct(ye($,O),O):o($)==="object"&&($=ye(ct($,O),O)),$}function tn($,O,F){return typeof $=="string"?$=ct(ye($,F),F):o($)==="object"&&($=ct($,F)),typeof O=="string"?O=ct(ye(O,F),F):o(O)==="object"&&(O=ct(O,F)),$===O}function An($,O){return $&&$.toString().replace(!O||!O.iri?c.ESCAPE:d.ESCAPE,oe)}function Ar($,O){return $&&$.toString().replace(!O||!O.iri?c.PCT_ENCODED:d.PCT_ENCODED,ve)}var Dn={scheme:"http",domainHost:!0,parse:function(O,F){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O},serialize:function(O,F){var B=String(O.scheme).toLowerCase()==="https";return(O.port===(B?443:80)||O.port==="")&&(O.port=void 0),O.path||(O.path="/"),O}},Mn={scheme:"https",domainHost:Dn.domainHost,parse:Dn.parse,serialize:Dn.serialize};function Is($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var ta={scheme:"ws",domainHost:!0,parse:function(O,F){var B=O;return B.secure=Is(B),B.resourceName=(B.path||"/")+(B.query?"?"+B.query:""),B.path=void 0,B.query=void 0,B},serialize:function(O,F){if((O.port===(Is(O)?443:80)||O.port==="")&&(O.port=void 0),typeof O.secure=="boolean"&&(O.scheme=O.secure?"wss":"ws",O.secure=void 0),O.resourceName){var B=O.resourceName.split("?"),K=f(B,2),_e=K[0],ke=K[1];O.path=_e&&_e!=="/"?_e:void 0,O.query=ke,O.resourceName=void 0}return O.fragment=void 0,O}},Yl={scheme:"wss",domainHost:ta.domainHost,parse:ta.parse,serialize:ta.serialize},xo={},ra="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Sn="[0-9A-Fa-f]",Xl=i(i("%[EFef]"+Sn+"%"+Sn+Sn+"%"+Sn+Sn)+"|"+i("%[89A-Fa-f]"+Sn+"%"+Sn+Sn)+"|"+i("%"+Sn+Sn)),Jl="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Sc="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",na=n(Sc,'[\\"\\\\]'),Xf="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Gi=new RegExp(ra,"g"),ia=new RegExp(Xl,"g"),q=new RegExp(n("[^]",Jl,"[\\.]",'[\\"]',na),"g"),Z=new RegExp(n("[^]",ra,Xf),"g"),ae=Z;function pe($){var O=ve($);return O.match(Gi)?O:$}var we={scheme:"mailto",parse:function(O,F){var B=O,K=B.to=B.path?B.path.split(","):[];if(B.path=void 0,B.query){for(var _e=!1,ke={},Ke=B.query.split("&"),Pt=0,zt=Ke.length;Pt<zt;++Pt){var it=Ke[Pt].split("=");switch(it[0]){case"to":for(var ht=it[1].split(","),er=0,He=ht.length;er<He;++er)K.push(ht[er]);break;case"subject":B.subject=Ar(it[1],F);break;case"body":B.body=Ar(it[1],F);break;default:_e=!0,ke[Ar(it[0],F)]=Ar(it[1],F);break}}_e&&(B.headers=ke)}B.query=void 0;for(var Ot=0,Fe=K.length;Ot<Fe;++Ot){var ot=K[Ot].split("@");if(ot[0]=Ar(ot[0]),F.unicodeSupport)ot[1]=Ar(ot[1],F).toLowerCase();else try{ot[1]=D.toASCII(Ar(ot[1],F).toLowerCase())}catch(cr){B.error=B.error||"Email address's domain name can not be converted to ASCII via punycode: "+cr}K[Ot]=ot.join("@")}return B},serialize:function(O,F){var B=O,K=s(O.to);if(K){for(var _e=0,ke=K.length;_e<ke;++_e){var Ke=String(K[_e]),Pt=Ke.lastIndexOf("@"),zt=Ke.slice(0,Pt).replace(ia,pe).replace(ia,a).replace(q,oe),it=Ke.slice(Pt+1);try{it=F.iri?D.toUnicode(it):D.toASCII(Ar(it,F).toLowerCase())}catch(Ot){B.error=B.error||"Email address's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+Ot}K[_e]=zt+"@"+it}B.path=K.join(",")}var ht=O.headers=O.headers||{};O.subject&&(ht.subject=O.subject),O.body&&(ht.body=O.body);var er=[];for(var He in ht)ht[He]!==xo[He]&&er.push(He.replace(ia,pe).replace(ia,a).replace(Z,oe)+"="+ht[He].replace(ia,pe).replace(ia,a).replace(ae,oe));return er.length&&(B.query=er.join("&")),B}},et=/^([^\:]+)\:(.*)/,Ne={scheme:"urn",parse:function(O,F){var B=O.path&&O.path.match(et),K=O;if(B){var _e=F.scheme||K.scheme||"urn",ke=B[1].toLowerCase(),Ke=B[2],Pt=_e+":"+(F.nid||ke),zt=ee[Pt];K.nid=ke,K.nss=Ke,K.path=void 0,zt&&(K=zt.parse(K,F))}else K.error=K.error||"URN can not be parsed.";return K},serialize:function(O,F){var B=F.scheme||O.scheme||"urn",K=O.nid,_e=B+":"+(F.nid||K),ke=ee[_e];ke&&(O=ke.serialize(O,F));var Ke=O,Pt=O.nss;return Ke.path=(K||F.nid)+":"+Pt,Ke}},Ee=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,tt={scheme:"urn:uuid",parse:function(O,F){var B=O;return B.uuid=B.nss,B.nss=void 0,!F.tolerant&&(!B.uuid||!B.uuid.match(Ee))&&(B.error=B.error||"UUID is not valid."),B},serialize:function(O,F){var B=O;return B.nss=(O.uuid||"").toLowerCase(),B}};ee[Dn.scheme]=Dn,ee[Mn.scheme]=Mn,ee[ta.scheme]=ta,ee[Yl.scheme]=Yl,ee[we.scheme]=we,ee[Ne.scheme]=Ne,ee[tt.scheme]=tt,r.SCHEMES=ee,r.pctEncChar=oe,r.pctDecChars=ve,r.parse=ye,r.removeDotSegments=jt,r.serialize=ct,r.resolveComponents=en,r.resolve=cn,r.normalize=yr,r.equal=tn,r.escapeComponent=An,r.unescapeComponent=Ar,Object.defineProperty(r,"__esModule",{value:!0})})})(iC,iC.exports);var xCe=iC.exports;Object.defineProperty(WO,"__esModule",{value:!0});const C8=xCe;C8.code='require("ajv/dist/runtime/uri").default';WO.default=C8;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Go;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=lt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Ov,i=Wf,o=rc,a=Qn,s=lt,l=Rn,u=an,c=xe,d=_Ce,f=WO,h=(G,A)=>new RegExp(G,A);h.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function b(G){var A,U,N,E,k,D,ee,oe,ve,Se,$e,ge,st,Vt,ce,ye,Xe,kt,zr,Zt,Or,jt,ct,en,cn;const yr=G.strict,tn=(A=G.code)===null||A===void 0?void 0:A.optimize,An=tn===!0||tn===void 0?1:tn||0,Ar=(N=(U=G.code)===null||U===void 0?void 0:U.regExp)!==null&&N!==void 0?N:h,Dn=(E=G.uriResolver)!==null&&E!==void 0?E:f.default;return{strictSchema:(D=(k=G.strictSchema)!==null&&k!==void 0?k:yr)!==null&&D!==void 0?D:!0,strictNumbers:(oe=(ee=G.strictNumbers)!==null&&ee!==void 0?ee:yr)!==null&&oe!==void 0?oe:!0,strictTypes:(Se=(ve=G.strictTypes)!==null&&ve!==void 0?ve:yr)!==null&&Se!==void 0?Se:"log",strictTuples:(ge=($e=G.strictTuples)!==null&&$e!==void 0?$e:yr)!==null&&ge!==void 0?ge:"log",strictRequired:(Vt=(st=G.strictRequired)!==null&&st!==void 0?st:yr)!==null&&Vt!==void 0?Vt:!1,code:G.code?{...G.code,optimize:An,regExp:Ar}:{optimize:An,regExp:Ar},loopRequired:(ce=G.loopRequired)!==null&&ce!==void 0?ce:g,loopEnum:(ye=G.loopEnum)!==null&&ye!==void 0?ye:g,meta:(Xe=G.meta)!==null&&Xe!==void 0?Xe:!0,messages:(kt=G.messages)!==null&&kt!==void 0?kt:!0,inlineRefs:(zr=G.inlineRefs)!==null&&zr!==void 0?zr:!0,schemaId:(Zt=G.schemaId)!==null&&Zt!==void 0?Zt:"$id",addUsedSchema:(Or=G.addUsedSchema)!==null&&Or!==void 0?Or:!0,validateSchema:(jt=G.validateSchema)!==null&&jt!==void 0?jt:!0,validateFormats:(ct=G.validateFormats)!==null&&ct!==void 0?ct:!0,unicodeRegExp:(en=G.unicodeRegExp)!==null&&en!==void 0?en:!0,int32range:(cn=G.int32range)!==null&&cn!==void 0?cn:!0,uriResolver:Dn}}class _{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...b(A)};const{es5:U,lines:N}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:U,lines:N}),this.logger=re(A.logger);const E=A.validateFormats;A.validateFormats=!1,this.RULES=(0,o.getRules)(),P.call(this,w,A,"NOT SUPPORTED"),P.call(this,p,A,"DEPRECATED","warn"),this._metaOpts=M.call(this),A.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords&&I.call(this,A.keywords),typeof A.meta=="object"&&this.addMetaSchema(A.meta),x.call(this),A.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:A,meta:U,schemaId:N}=this.opts;let E=d;N==="id"&&(E={...d},E.id=E.$id,delete E.$id),U&&A&&this.addMetaSchema(E,E[N],!1)}defaultMeta(){const{meta:A,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[U]||A:void 0}validate(A,U){let N;if(typeof A=="string"){if(N=this.getSchema(A),!N)throw new Error(`no schema with key or ref "${A}"`)}else N=this.compile(A);const E=N(U);return"$async"in N||(this.errors=N.errors),E}compile(A,U){const N=this._addSchema(A,U);return N.validate||this._compileSchemaEnv(N)}compileAsync(A,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return E.call(this,A,U);async function E(Se,$e){await k.call(this,Se.$schema);const ge=this._addSchema(Se,$e);return ge.validate||D.call(this,ge)}async function k(Se){Se&&!this.getSchema(Se)&&await E.call(this,{$ref:Se},!0)}async function D(Se){try{return this._compileSchemaEnv(Se)}catch($e){if(!($e instanceof i.default))throw $e;return ee.call(this,$e),await oe.call(this,$e.missingSchema),D.call(this,Se)}}function ee({missingSchema:Se,missingRef:$e}){if(this.refs[Se])throw new Error(`AnySchema ${Se} is loaded but ${$e} cannot be resolved`)}async function oe(Se){const $e=await ve.call(this,Se);this.refs[Se]||await k.call(this,$e.$schema),this.refs[Se]||this.addSchema($e,Se,U)}async function ve(Se){const $e=this._loading[Se];if($e)return $e;try{return await(this._loading[Se]=N(Se))}finally{delete this._loading[Se]}}}addSchema(A,U,N,E=this.opts.validateSchema){if(Array.isArray(A)){for(const D of A)this.addSchema(D,void 0,N,E);return this}let k;if(typeof A=="object"){const{schemaId:D}=this.opts;if(k=A[D],k!==void 0&&typeof k!="string")throw new Error(`schema ${D} must be string`)}return U=(0,l.normalizeId)(U||k),this._checkUnique(U),this.schemas[U]=this._addSchema(A,N,U,E,!0),this}addMetaSchema(A,U,N=this.opts.validateSchema){return this.addSchema(A,U,!0,N),this}validateSchema(A,U){if(typeof A=="boolean")return!0;let N;if(N=A.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(N,A);if(!E&&U){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return E}getSchema(A){let U;for(;typeof(U=C.call(this,A))=="string";)A=U;if(U===void 0){const{schemaId:N}=this.opts,E=new a.SchemaEnv({schema:{},schemaId:N});if(U=a.resolveSchema.call(this,E,A),!U)return;this.refs[A]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=C.call(this,A);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[A],delete this.refs[A],this}case"object":{const U=A;this._cache.delete(U);let N=A[this.opts.schemaId];return N&&(N=(0,l.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(const U of A)this.addKeyword(U);return this}addKeyword(A,U){let N;if(typeof A=="string")N=A,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=N);else if(typeof A=="object"&&U===void 0){if(U=A,N=U.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(R.call(this,N,U),!U)return(0,c.eachItem)(N,k=>L.call(this,k)),this;Q.call(this,U);const E={...U,type:(0,u.getJSONTypes)(U.type),schemaType:(0,u.getJSONTypes)(U.schemaType)};return(0,c.eachItem)(N,E.type.length===0?k=>L.call(this,k,E):k=>E.type.forEach(D=>L.call(this,k,E,D))),this}getKeyword(A){const U=this.RULES.all[A];return typeof U=="object"?U.definition:!!U}removeKeyword(A){const{RULES:U}=this;delete U.keywords[A],delete U.all[A];for(const N of U.rules){const E=N.rules.findIndex(k=>k.keyword===A);E>=0&&N.rules.splice(E,1)}return this}addFormat(A,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[A]=U,this}errorsText(A=this.errors,{separator:U=", ",dataVar:N="data"}={}){return!A||A.length===0?"No errors":A.map(E=>`${N}${E.instancePath} ${E.message}`).reduce((E,k)=>E+U+k)}$dataMetaSchema(A,U){const N=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(const E of U){const k=E.split("/").slice(1);let D=A;for(const ee of k)D=D[ee];for(const ee in N){const oe=N[ee];if(typeof oe!="object")continue;const{$data:ve}=oe.definition,Se=D[ee];ve&&Se&&(D[ee]=te(Se))}}return A}_removeAllSchemas(A,U){for(const N in A){const E=A[N];(!U||U.test(N))&&(typeof E=="string"?delete A[N]:E&&!E.meta&&(this._cache.delete(E.schema),delete A[N]))}}_addSchema(A,U,N,E=this.opts.validateSchema,k=this.opts.addUsedSchema){let D;const{schemaId:ee}=this.opts;if(typeof A=="object")D=A[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof A!="boolean")throw new Error("schema must be object or boolean")}let oe=this._cache.get(A);if(oe!==void 0)return oe;N=(0,l.normalizeId)(D||N);const ve=l.getSchemaRefs.call(this,A,N);return oe=new a.SchemaEnv({schema:A,schemaId:ee,meta:U,baseId:N,localRefs:ve}),this._cache.set(oe.schema,oe),k&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=oe),E&&this.validateSchema(A,!0),oe}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw new Error(`schema with key or id "${A}" already exists`)}_compileSchemaEnv(A){if(A.meta?this._compileMetaSchema(A):a.compileSchema.call(this,A),!A.validate)throw new Error("ajv implementation error");return A.validate}_compileMetaSchema(A){const U=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,A)}finally{this.opts=U}}}_.ValidationError=n.default,_.MissingRefError=i.default,e.default=_;function P(G,A,U,N="error"){for(const E in G){const k=E;k in A&&this.logger[N](`${U}: option ${E}. ${G[k]}`)}}function C(G){return G=(0,l.normalizeId)(G),this.schemas[G]||this.refs[G]}function x(){const G=this.opts.schemas;if(G)if(Array.isArray(G))this.addSchema(G);else for(const A in G)this.addSchema(G[A],A)}function T(){for(const G in this.opts.formats){const A=this.opts.formats[G];A&&this.addFormat(G,A)}}function I(G){if(Array.isArray(G)){this.addVocabulary(G);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const A in G){const U=G[A];U.keyword||(U.keyword=A),this.addKeyword(U)}}function M(){const G={...this.opts};for(const A of m)delete G[A];return G}const H={log(){},warn(){},error(){}};function re(G){if(G===!1)return H;if(G===void 0)return console;if(G.log&&G.warn&&G.error)return G;throw new Error("logger must implement log, warn and error methods")}const ie=/^[a-z_$][a-z0-9_$:-]*$/i;function R(G,A){const{RULES:U}=this;if((0,c.eachItem)(G,N=>{if(U.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!ie.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!A&&A.$data&&!("code"in A||"validate"in A))throw new Error('$data keyword must have "code" or "validate" function')}function L(G,A,U){var N;const E=A==null?void 0:A.post;if(U&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let D=E?k.post:k.rules.find(({type:oe})=>oe===U);if(D||(D={type:U,rules:[]},k.rules.push(D)),k.keywords[G]=!0,!A)return;const ee={keyword:G,definition:{...A,type:(0,u.getJSONTypes)(A.type),schemaType:(0,u.getJSONTypes)(A.schemaType)}};A.before?X.call(this,D,ee,A.before):D.rules.push(ee),k.all[G]=ee,(N=A.implements)===null||N===void 0||N.forEach(oe=>this.addKeyword(oe))}function X(G,A,U){const N=G.rules.findIndex(E=>E.keyword===U);N>=0?G.rules.splice(N,0,A):(G.rules.push(A),this.logger.warn(`rule ${U} is not defined`))}function Q(G){let{metaSchema:A}=G;A!==void 0&&(G.$data&&this.opts.$data&&(A=te(A)),G.validateSchema=this.compile(A,!0))}const W={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function te(G){return{anyOf:[G,W]}}})(W6);var KO={},GO={},QO={};Object.defineProperty(QO,"__esModule",{value:!0});const PCe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};QO.default=PCe;var _s={};Object.defineProperty(_s,"__esModule",{value:!0});_s.callRef=_s.getValidate=void 0;const CCe=Wf,LD=pt,oi=lt,Lc=Ki,BD=Qn,Og=xe,ECe={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:l}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return d();const c=BD.resolveRef.call(l,u,i,r);if(c===void 0)throw new CCe.default(n.opts.uriResolver,i,r);if(c instanceof BD.SchemaEnv)return f(c);return h(c);function d(){if(o===u)return Py(e,a,o,o.$async);const m=t.scopeValue("root",{ref:u});return Py(e,(0,oi._)`${m}.validate`,u,u.$async)}function f(m){const v=E8(e,m);Py(e,v,m,m.$async)}function h(m){const v=t.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,oi.stringify)(m)}:{ref:m}),w=t.name("valid"),p=e.subschema({schema:m,dataTypes:[],schemaPath:oi.nil,topSchemaRef:v,errSchemaPath:r},w);e.mergeEvaluated(p),e.ok(w)}}};function E8(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,oi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}_s.getValidate=E8;function Py(e,t,r,n){const{gen:i,it:o}=e,{allErrors:a,schemaEnv:s,opts:l}=o,u=l.passContext?Lc.default.this:oi.nil;n?c():d();function c(){if(!s.$async)throw new Error("async schema referenced by sync schema");const m=i.let("valid");i.try(()=>{i.code((0,oi._)`await ${(0,LD.callValidateCode)(e,t,u)}`),h(t),a||i.assign(m,!0)},v=>{i.if((0,oi._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),f(v),a||i.assign(m,!1)}),e.ok(m)}function d(){e.result((0,LD.callValidateCode)(e,t,u),()=>h(t),()=>f(t))}function f(m){const v=(0,oi._)`${m}.errors`;i.assign(Lc.default.vErrors,(0,oi._)`${Lc.default.vErrors} === null ? ${v} : ${Lc.default.vErrors}.concat(${v})`),i.assign(Lc.default.errors,(0,oi._)`${Lc.default.vErrors}.length`)}function h(m){var v;if(!o.opts.unevaluated)return;const w=(v=r==null?void 0:r.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=Og.mergeEvaluated.props(i,w.props,o.props));else{const p=i.var("props",(0,oi._)`${m}.evaluated.props`);o.props=Og.mergeEvaluated.props(i,p,o.props,oi.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=Og.mergeEvaluated.items(i,w.items,o.items));else{const p=i.var("items",(0,oi._)`${m}.evaluated.items`);o.items=Og.mergeEvaluated.items(i,p,o.items,oi.Name)}}}_s.callRef=Py;_s.default=ECe;Object.defineProperty(GO,"__esModule",{value:!0});const TCe=QO,OCe=_s,RCe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",TCe.default,OCe.default];GO.default=RCe;var YO={},XO={};Object.defineProperty(XO,"__esModule",{value:!0});const Y0=lt,Ns=Y0.operators,X0={maximum:{okStr:"<=",ok:Ns.LTE,fail:Ns.GT},minimum:{okStr:">=",ok:Ns.GTE,fail:Ns.LT},exclusiveMaximum:{okStr:"<",ok:Ns.LT,fail:Ns.GTE},exclusiveMinimum:{okStr:">",ok:Ns.GT,fail:Ns.LTE}},ICe={message:({keyword:e,schemaCode:t})=>(0,Y0.str)`must be ${X0[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Y0._)`{comparison: ${X0[e].okStr}, limit: ${t}}`},kCe={keyword:Object.keys(X0),type:"number",schemaType:"number",$data:!0,error:ICe,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Y0._)`${r} ${X0[t].fail} ${n} || isNaN(${r})`)}};XO.default=kCe;var JO={};Object.defineProperty(JO,"__esModule",{value:!0});const Cp=lt,jCe={message:({schemaCode:e})=>(0,Cp.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Cp._)`{multipleOf: ${e}}`},$Ce={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:jCe,code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,Cp._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Cp._)`${a} !== parseInt(${a})`;e.fail$data((0,Cp._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};JO.default=$Ce;var ZO={},eR={};Object.defineProperty(eR,"__esModule",{value:!0});function T8(e){const t=e.length;let r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}eR.default=T8;T8.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(ZO,"__esModule",{value:!0});const mu=lt,ACe=xe,DCe=eR,MCe={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,mu.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,mu._)`{limit: ${e}}`},NCe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:MCe,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?mu.operators.GT:mu.operators.LT,a=i.opts.unicode===!1?(0,mu._)`${r}.length`:(0,mu._)`${(0,ACe.useFunc)(e.gen,DCe.default)}(${r})`;e.fail$data((0,mu._)`${a} ${o} ${n}`)}};ZO.default=NCe;var tR={};Object.defineProperty(tR,"__esModule",{value:!0});const FCe=pt,J0=lt,LCe={message:({schemaCode:e})=>(0,J0.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,J0._)`{pattern: ${e}}`},BCe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:LCe,code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",s=r?(0,J0._)`(new RegExp(${i}, ${a}))`:(0,FCe.usePattern)(e,n);e.fail$data((0,J0._)`!${s}.test(${t})`)}};tR.default=BCe;var rR={};Object.defineProperty(rR,"__esModule",{value:!0});const Ep=lt,VCe={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Ep.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ep._)`{limit: ${e}}`},zCe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VCe,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ep.operators.GT:Ep.operators.LT;e.fail$data((0,Ep._)`Object.keys(${r}).length ${i} ${n}`)}};rR.default=zCe;var nR={};Object.defineProperty(nR,"__esModule",{value:!0});const Oh=pt,Tp=lt,UCe=xe,qCe={message:({params:{missingProperty:e}})=>(0,Tp.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Tp._)`{missingProperty: ${e}}`},HCe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:qCe,code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:s}=a;if(!o&&r.length===0)return;const l=r.length>=s.loopRequired;if(a.allErrors?u():c(),s.strictRequired){const h=e.parentSchema.properties,{definedProperties:m}=e.it;for(const v of r)if((h==null?void 0:h[v])===void 0&&!m.has(v)){const w=a.schemaEnv.baseId+a.errSchemaPath,p=`required property "${v}" is not defined at "${w}" (strictRequired)`;(0,UCe.checkStrictMode)(a,p,a.opts.strictRequired)}}function u(){if(l||o)e.block$data(Tp.nil,d);else for(const h of r)(0,Oh.checkReportMissingProp)(e,h)}function c(){const h=t.let("missing");if(l||o){const m=t.let("valid",!0);e.block$data(m,()=>f(h,m)),e.ok(m)}else t.if((0,Oh.checkMissingProp)(e,r,h)),(0,Oh.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Oh.noPropertyInData)(t,i,h,s.ownProperties),()=>e.error())})}function f(h,m){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(m,(0,Oh.propertyInData)(t,i,h,s.ownProperties)),t.if((0,Tp.not)(m),()=>{e.error(),t.break()})},Tp.nil)}}};nR.default=HCe;var iR={};Object.defineProperty(iR,"__esModule",{value:!0});const Op=lt,WCe={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Op.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Op._)`{limit: ${e}}`},KCe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:WCe,code(e){const{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Op.operators.GT:Op.operators.LT;e.fail$data((0,Op._)`${r}.length ${i} ${n}`)}};iR.default=KCe;var oR={},Rv={};Object.defineProperty(Rv,"__esModule",{value:!0});const O8=l8;O8.code='require("ajv/dist/runtime/equal").default';Rv.default=O8;Object.defineProperty(oR,"__esModule",{value:!0});const s_=an,Pn=lt,GCe=xe,QCe=Rv,YCe={message:({params:{i:e,j:t}})=>(0,Pn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Pn._)`{i: ${e}, j: ${t}}`},XCe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:YCe,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=e;if(!n&&!i)return;const l=t.let("valid"),u=o.items?(0,s_.getSchemaTypes)(o.items):[];e.block$data(l,c,(0,Pn._)`${a} === false`),e.ok(l);function c(){const m=t.let("i",(0,Pn._)`${r}.length`),v=t.let("j");e.setParams({i:m,j:v}),t.assign(l,!0),t.if((0,Pn._)`${m} > 1`,()=>(d()?f:h)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,v){const w=t.name("item"),p=(0,s_.checkDataTypes)(u,w,s.opts.strictNumbers,s_.DataType.Wrong),g=t.const("indices",(0,Pn._)`{}`);t.for((0,Pn._)`;${m}--;`,()=>{t.let(w,(0,Pn._)`${r}[${m}]`),t.if(p,(0,Pn._)`continue`),u.length>1&&t.if((0,Pn._)`typeof ${w} == "string"`,(0,Pn._)`${w} += "_"`),t.if((0,Pn._)`typeof ${g}[${w}] == "number"`,()=>{t.assign(v,(0,Pn._)`${g}[${w}]`),e.error(),t.assign(l,!1).break()}).code((0,Pn._)`${g}[${w}] = ${m}`)})}function h(m,v){const w=(0,GCe.useFunc)(t,QCe.default),p=t.name("outer");t.label(p).for((0,Pn._)`;${m}--;`,()=>t.for((0,Pn._)`${v} = ${m}; ${v}--;`,()=>t.if((0,Pn._)`${w}(${r}[${m}], ${r}[${v}])`,()=>{e.error(),t.assign(l,!1).break(p)})))}}};oR.default=XCe;var aR={};Object.defineProperty(aR,"__esModule",{value:!0});const oC=lt,JCe=xe,ZCe=Rv,eEe={message:"must be equal to constant",params:({schemaCode:e})=>(0,oC._)`{allowedValue: ${e}}`},tEe={keyword:"const",$data:!0,error:eEe,code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,oC._)`!${(0,JCe.useFunc)(t,ZCe.default)}(${r}, ${i})`):e.fail((0,oC._)`${o} !== ${r}`)}};aR.default=tEe;var sR={};Object.defineProperty(sR,"__esModule",{value:!0});const Vh=lt,rEe=xe,nEe=Rv,iEe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Vh._)`{allowedValues: ${e}}`},oEe={keyword:"enum",schemaType:"array",$data:!0,error:iEe,code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const s=i.length>=a.opts.loopEnum;let l;const u=()=>l??(l=(0,rEe.useFunc)(t,nEe.default));let c;if(s||n)c=t.let("valid"),e.block$data(c,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const h=t.const("vSchema",o);c=(0,Vh.or)(...i.map((m,v)=>f(h,v)))}e.pass(c);function d(){t.assign(c,!1),t.forOf("v",o,h=>t.if((0,Vh._)`${u()}(${r}, ${h})`,()=>t.assign(c,!0).break()))}function f(h,m){const v=i[m];return typeof v=="object"&&v!==null?(0,Vh._)`${u()}(${r}, ${h}[${m}])`:(0,Vh._)`${r} === ${v}`}}};sR.default=oEe;Object.defineProperty(YO,"__esModule",{value:!0});const aEe=XO,sEe=JO,lEe=ZO,uEe=tR,cEe=rR,dEe=nR,fEe=iR,hEe=oR,pEe=aR,mEe=sR,vEe=[aEe.default,sEe.default,lEe.default,uEe.default,cEe.default,dEe.default,fEe.default,hEe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},pEe.default,mEe.default];YO.default=vEe;var lR={},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});Kf.validateAdditionalItems=void 0;const vu=lt,aC=xe,gEe={message:({params:{len:e}})=>(0,vu.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,vu._)`{limit: ${e}}`},yEe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:gEe,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,aC.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}R8(e,n)}};function R8(e,t){const{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;const s=r.const("len",(0,vu._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,vu._)`${s} <= ${t.length}`);else if(typeof n=="object"&&!(0,aC.alwaysValidSchema)(a,n)){const u=r.var("valid",(0,vu._)`${s} <= ${t.length}`);r.if((0,vu.not)(u),()=>l(u)),e.ok(u)}function l(u){r.forRange("i",t.length,s,c=>{e.subschema({keyword:o,dataProp:c,dataPropType:aC.Type.Num},u),a.allErrors||r.if((0,vu.not)(u),()=>r.break())})}}Kf.validateAdditionalItems=R8;Kf.default=yEe;var uR={},Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.validateTuple=void 0;const VD=lt,Cy=xe,bEe=pt,wEe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return I8(e,"additionalItems",t);r.items=!0,!(0,Cy.alwaysValidSchema)(r,t)&&e.ok((0,bEe.validateArray)(e))}};function I8(e,t,r=e.schema){const{gen:n,parentSchema:i,data:o,keyword:a,it:s}=e;c(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Cy.mergeEvaluated.items(n,r.length,s.items));const l=n.name("valid"),u=n.const("len",(0,VD._)`${o}.length`);r.forEach((d,f)=>{(0,Cy.alwaysValidSchema)(s,d)||(n.if((0,VD._)`${u} > ${f}`,()=>e.subschema({keyword:a,schemaProp:f,dataProp:f},l)),e.ok(l))});function c(d){const{opts:f,errSchemaPath:h}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(f.strictTuples&&!v){const w=`"${a}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Cy.checkStrictMode)(s,w,f.strictTuples)}}}Gf.validateTuple=I8;Gf.default=wEe;Object.defineProperty(uR,"__esModule",{value:!0});const SEe=Gf,_Ee={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,SEe.validateTuple)(e,"items")};uR.default=_Ee;var cR={};Object.defineProperty(cR,"__esModule",{value:!0});const zD=lt,xEe=xe,PEe=pt,CEe=Kf,EEe={message:({params:{len:e}})=>(0,zD.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,zD._)`{limit: ${e}}`},TEe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:EEe,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,xEe.alwaysValidSchema)(n,t)&&(i?(0,CEe.validateAdditionalItems)(e,i):e.ok((0,PEe.validateArray)(e)))}};cR.default=TEe;var dR={};Object.defineProperty(dR,"__esModule",{value:!0});const to=lt,Rg=xe,OEe={message:({params:{min:e,max:t}})=>t===void 0?(0,to.str)`must contain at least ${e} valid item(s)`:(0,to.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,to._)`{minContains: ${e}}`:(0,to._)`{minContains: ${e}, maxContains: ${t}}`},REe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:OEe,code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;let a,s;const{minContains:l,maxContains:u}=n;o.opts.next?(a=l===void 0?1:l,s=u):a=1;const c=t.const("len",(0,to._)`${i}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Rg.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Rg.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Rg.alwaysValidSchema)(o,r)){let v=(0,to._)`${c} >= ${a}`;s!==void 0&&(v=(0,to._)`${v} && ${c} <= ${s}`),e.pass(v);return}o.items=!0;const d=t.name("valid");s===void 0&&a===1?h(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,to._)`${i}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,()=>e.reset());function f(){const v=t.name("_valid"),w=t.let("count",0);h(v,()=>t.if(v,()=>m(w)))}function h(v,w){t.forRange("i",0,c,p=>{e.subschema({keyword:"contains",dataProp:p,dataPropType:Rg.Type.Num,compositeRule:!0},v),w()})}function m(v){t.code((0,to._)`${v}++`),s===void 0?t.if((0,to._)`${v} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,to._)`${v} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,to._)`${v} >= ${a}`,()=>t.assign(d,!0)))}}};dR.default=REe;var Vw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=lt,r=xe,n=pt;e.error={message:({params:{property:l,depsCount:u,deps:c}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${c} when property ${l} is present`},params:({params:{property:l,depsCount:u,deps:c,missingProperty:d}})=>(0,t._)`{property: ${l},
1403
- missingProperty: ${d},
1404
- depsCount: ${u},
1405
- deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[u,c]=o(l);a(l,u),s(l,c)}};function o({schema:l}){const u={},c={};for(const d in l){if(d==="__proto__")continue;const f=Array.isArray(l[d])?u:c;f[d]=l[d]}return[u,c]}function a(l,u=l.schema){const{gen:c,data:d,it:f}=l;if(Object.keys(u).length===0)return;const h=c.let("missing");for(const m in u){const v=u[m];if(v.length===0)continue;const w=(0,n.propertyInData)(c,d,m,f.opts.ownProperties);l.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),f.allErrors?c.if(w,()=>{for(const p of v)(0,n.checkReportMissingProp)(l,p)}):(c.if((0,t._)`${w} && (${(0,n.checkMissingProp)(l,v,h)})`),(0,n.reportMissingProp)(l,h),c.else())}}e.validatePropertyDeps=a;function s(l,u=l.schema){const{gen:c,data:d,keyword:f,it:h}=l,m=c.name("valid");for(const v in u)(0,r.alwaysValidSchema)(h,u[v])||(c.if((0,n.propertyInData)(c,d,v,h.opts.ownProperties),()=>{const w=l.subschema({keyword:f,schemaProp:v},m);l.mergeValidEvaluated(w,m)},()=>c.var(m,!0)),l.ok(m))}e.validateSchemaDeps=s,e.default=i})(Vw);var fR={};Object.defineProperty(fR,"__esModule",{value:!0});const k8=lt,IEe=xe,kEe={message:"property name must be valid",params:({params:e})=>(0,k8._)`{propertyName: ${e.propertyName}}`},jEe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:kEe,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,IEe.alwaysValidSchema)(i,r))return;const o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,k8.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};fR.default=jEe;var zw={};Object.defineProperty(zw,"__esModule",{value:!0});const Ig=pt,ko=lt,$Ee=Ki,kg=xe,AEe={message:"must NOT have additional properties",params:({params:e})=>(0,ko._)`{additionalProperty: ${e.additionalProperty}}`},DEe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:AEe,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:s,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,kg.alwaysValidSchema)(a,r))return;const u=(0,Ig.allSchemaProperties)(n.properties),c=(0,Ig.allSchemaProperties)(n.patternProperties);d(),e.ok((0,ko._)`${o} === ${$Ee.default.errors}`);function d(){t.forIn("key",i,w=>{!u.length&&!c.length?m(w):t.if(f(w),()=>m(w))})}function f(w){let p;if(u.length>8){const g=(0,kg.schemaRefOrVal)(a,n.properties,"properties");p=(0,Ig.isOwnProperty)(t,g,w)}else u.length?p=(0,ko.or)(...u.map(g=>(0,ko._)`${w} === ${g}`)):p=ko.nil;return c.length&&(p=(0,ko.or)(p,...c.map(g=>(0,ko._)`${(0,Ig.usePattern)(e,g)}.test(${w})`))),(0,ko.not)(p)}function h(w){t.code((0,ko._)`delete ${i}[${w}]`)}function m(w){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){h(w);return}if(r===!1){e.setParams({additionalProperty:w}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,kg.alwaysValidSchema)(a,r)){const p=t.name("valid");l.removeAdditional==="failing"?(v(w,p,!1),t.if((0,ko.not)(p),()=>{e.reset(),h(w)})):(v(w,p),s||t.if((0,ko.not)(p),()=>t.break()))}}function v(w,p,g){const b={keyword:"additionalProperties",dataProp:w,dataPropType:kg.Type.Str};g===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(b,p)}}};zw.default=DEe;var hR={};Object.defineProperty(hR,"__esModule",{value:!0});const MEe=Go,UD=pt,l_=xe,qD=zw,NEe={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&qD.default.code(new MEe.KeywordCxt(o,qD.default,"additionalProperties"));const a=(0,UD.allSchemaProperties)(r);for(const d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=l_.mergeEvaluated.props(t,(0,l_.toHash)(a),o.props));const s=a.filter(d=>!(0,l_.alwaysValidSchema)(o,r[d]));if(s.length===0)return;const l=t.name("valid");for(const d of s)u(d)?c(d):(t.if((0,UD.propertyInData)(t,i,d,o.opts.ownProperties)),c(d),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function c(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};hR.default=NEe;var pR={};Object.defineProperty(pR,"__esModule",{value:!0});const HD=pt,jg=lt,WD=xe,KD=xe,FEe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,s=(0,HD.allSchemaProperties)(r),l=s.filter(v=>(0,WD.alwaysValidSchema)(o,r[v]));if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;const u=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");o.props!==!0&&!(o.props instanceof jg.Name)&&(o.props=(0,KD.evaluatedPropsToName)(t,o.props));const{props:d}=o;f();function f(){for(const v of s)u&&h(v),o.allErrors?m(v):(t.var(c,!0),m(v),t.if(c))}function h(v){for(const w in u)new RegExp(v).test(w)&&(0,WD.checkStrictMode)(o,`property ${w} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){t.forIn("key",n,w=>{t.if((0,jg._)`${(0,HD.usePattern)(e,v)}.test(${w})`,()=>{const p=l.includes(v);p||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:w,dataPropType:KD.Type.Str},c),o.opts.unevaluated&&d!==!0?t.assign((0,jg._)`${d}[${w}]`,!0):!p&&!o.allErrors&&t.if((0,jg.not)(c),()=>t.break())})})}}};pR.default=FEe;var mR={};Object.defineProperty(mR,"__esModule",{value:!0});const LEe=xe,BEe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,LEe.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};mR.default=BEe;var vR={};Object.defineProperty(vR,"__esModule",{value:!0});const VEe=pt,zEe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:VEe.validateUnion,error:{message:"must match a schema in anyOf"}};vR.default=zEe;var gR={};Object.defineProperty(gR,"__esModule",{value:!0});const Ey=lt,UEe=xe,qEe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ey._)`{passingSchemas: ${e.passing}}`},HEe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:qEe,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const o=r,a=t.let("valid",!1),s=t.let("passing",null),l=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((c,d)=>{let f;(0,UEe.alwaysValidSchema)(i,c)?t.var(l,!0):f=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,Ey._)`${l} && ${a}`).assign(a,!1).assign(s,(0,Ey._)`[${s}, ${d}]`).else(),t.if(l,()=>{t.assign(a,!0),t.assign(s,d),f&&e.mergeEvaluated(f,Ey.Name)})})}}};gR.default=HEe;var yR={};Object.defineProperty(yR,"__esModule",{value:!0});const WEe=xe,KEe={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((o,a)=>{if((0,WEe.alwaysValidSchema)(n,o))return;const s=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(s)})}};yR.default=KEe;var bR={};Object.defineProperty(bR,"__esModule",{value:!0});const Z0=lt,j8=xe,GEe={message:({params:e})=>(0,Z0.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Z0._)`{failingKeyword: ${e.ifClause}}`},QEe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:GEe,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,j8.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=GD(n,"then"),o=GD(n,"else");if(!i&&!o)return;const a=t.let("valid",!0),s=t.name("_valid");if(l(),e.reset(),i&&o){const c=t.let("ifClause");e.setParams({ifClause:c}),t.if(s,u("then",c),u("else",c))}else i?t.if(s,u("then")):t.if((0,Z0.not)(s),u("else"));e.pass(a,()=>e.error(!0));function l(){const c=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(c)}function u(c,d){return()=>{const f=e.subschema({keyword:c},s);t.assign(a,s),e.mergeValidEvaluated(f,a),d?t.assign(d,(0,Z0._)`${c}`):e.setParams({ifClause:c})}}}};function GD(e,t){const r=e.schema[t];return r!==void 0&&!(0,j8.alwaysValidSchema)(e,r)}bR.default=QEe;var wR={};Object.defineProperty(wR,"__esModule",{value:!0});const YEe=xe,XEe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,YEe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};wR.default=XEe;Object.defineProperty(lR,"__esModule",{value:!0});const JEe=Kf,ZEe=uR,eTe=Gf,tTe=cR,rTe=dR,nTe=Vw,iTe=fR,oTe=zw,aTe=hR,sTe=pR,lTe=mR,uTe=vR,cTe=gR,dTe=yR,fTe=bR,hTe=wR;function pTe(e=!1){const t=[lTe.default,uTe.default,cTe.default,dTe.default,fTe.default,hTe.default,iTe.default,oTe.default,nTe.default,aTe.default,sTe.default];return e?t.push(ZEe.default,tTe.default):t.push(JEe.default,eTe.default),t.push(rTe.default),t}lR.default=pTe;var SR={},Qf={};Object.defineProperty(Qf,"__esModule",{value:!0});Qf.dynamicAnchor=void 0;const u_=lt,mTe=Ki,QD=Qn,vTe=_s,gTe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>$8(e,e.schema)};function $8(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;const i=(0,u_._)`${mTe.default.dynamicAnchors}${(0,u_.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:yTe(e);r.if((0,u_._)`!${i}`,()=>r.assign(i,o))}Qf.dynamicAnchor=$8;function yTe(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:s}=t.root,{schemaId:l}=n.opts,u=new QD.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:a,meta:s});return QD.compileSchema.call(n,u),(0,vTe.getValidate)(e,u)}Qf.default=gTe;var Yf={};Object.defineProperty(Yf,"__esModule",{value:!0});Yf.dynamicRef=void 0;const YD=lt,bTe=Ki,XD=_s,wTe={keyword:"$dynamicRef",schemaType:"string",code:e=>A8(e,e.schema)};function A8(e,t){const{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const o=t.slice(1);if(i.allErrors)a();else{const l=r.let("valid",!1);a(l),e.ok(l)}function a(l){if(i.schemaEnv.root.dynamicAnchors[o]){const u=r.let("_v",(0,YD._)`${bTe.default.dynamicAnchors}${(0,YD.getProperty)(o)}`);r.if(u,s(u,l),s(i.validateName,l))}else s(i.validateName,l)()}function s(l,u){return u?()=>r.block(()=>{(0,XD.callRef)(e,l),r.let(u,!0)}):()=>(0,XD.callRef)(e,l)}}Yf.dynamicRef=A8;Yf.default=wTe;var _R={};Object.defineProperty(_R,"__esModule",{value:!0});const STe=Qf,_Te=xe,xTe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,STe.dynamicAnchor)(e,""):(0,_Te.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};_R.default=xTe;var xR={};Object.defineProperty(xR,"__esModule",{value:!0});const PTe=Yf,CTe={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,PTe.dynamicRef)(e,e.schema)};xR.default=CTe;Object.defineProperty(SR,"__esModule",{value:!0});const ETe=Qf,TTe=Yf,OTe=_R,RTe=xR,ITe=[ETe.default,TTe.default,OTe.default,RTe.default];SR.default=ITe;var PR={},CR={};Object.defineProperty(CR,"__esModule",{value:!0});const JD=Vw,kTe={keyword:"dependentRequired",type:"object",schemaType:"object",error:JD.error,code:e=>(0,JD.validatePropertyDeps)(e)};CR.default=kTe;var ER={};Object.defineProperty(ER,"__esModule",{value:!0});const jTe=Vw,$Te={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,jTe.validateSchemaDeps)(e)};ER.default=$Te;var TR={};Object.defineProperty(TR,"__esModule",{value:!0});const ATe=xe,DTe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,ATe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};TR.default=DTe;Object.defineProperty(PR,"__esModule",{value:!0});const MTe=CR,NTe=ER,FTe=TR,LTe=[MTe.default,NTe.default,FTe.default];PR.default=LTe;var OR={},RR={};Object.defineProperty(RR,"__esModule",{value:!0});const Vs=lt,ZD=xe,BTe=Ki,VTe={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Vs._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},zTe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:VTe,code(e){const{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:a,props:s}=o;s instanceof Vs.Name?t.if((0,Vs._)`${s} !== true`,()=>t.forIn("key",n,d=>t.if(u(s,d),()=>l(d)))):s!==!0&&t.forIn("key",n,d=>s===void 0?l(d):t.if(c(s,d),()=>l(d))),o.props=!0,e.ok((0,Vs._)`${i} === ${BTe.default.errors}`);function l(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,ZD.alwaysValidSchema)(o,r)){const f=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:ZD.Type.Str},f),a||t.if((0,Vs.not)(f),()=>t.break())}}function u(d,f){return(0,Vs._)`!${d} || !${d}[${f}]`}function c(d,f){const h=[];for(const m in d)d[m]===!0&&h.push((0,Vs._)`${f} !== ${m}`);return(0,Vs.and)(...h)}}};RR.default=zTe;var IR={};Object.defineProperty(IR,"__esModule",{value:!0});const gu=lt,eM=xe,UTe={message:({params:{len:e}})=>(0,gu.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,gu._)`{limit: ${e}}`},qTe={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:UTe,code(e){const{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;const a=t.const("len",(0,gu._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,gu._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,eM.alwaysValidSchema)(i,r)){const l=t.var("valid",(0,gu._)`${a} <= ${o}`);t.if((0,gu.not)(l),()=>s(l,o)),e.ok(l)}i.items=!0;function s(l,u){t.forRange("i",u,a,c=>{e.subschema({keyword:"unevaluatedItems",dataProp:c,dataPropType:eM.Type.Num},l),i.allErrors||t.if((0,gu.not)(l),()=>t.break())})}}};IR.default=qTe;Object.defineProperty(OR,"__esModule",{value:!0});const HTe=RR,WTe=IR,KTe=[HTe.default,WTe.default];OR.default=KTe;var kR={},jR={};Object.defineProperty(jR,"__esModule",{value:!0});const qr=lt,GTe={message:({schemaCode:e})=>(0,qr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,qr._)`{format: ${e}}`},QTe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:GTe,code(e,t){const{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=e,{opts:l,errSchemaPath:u,schemaEnv:c,self:d}=s;if(!l.validateFormats)return;i?f():h();function f(){const m=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),v=r.const("fDef",(0,qr._)`${m}[${a}]`),w=r.let("fType"),p=r.let("format");r.if((0,qr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(w,(0,qr._)`${v}.type || "string"`).assign(p,(0,qr._)`${v}.validate`),()=>r.assign(w,(0,qr._)`"string"`).assign(p,v)),e.fail$data((0,qr.or)(g(),b()));function g(){return l.strictSchema===!1?qr.nil:(0,qr._)`${a} && !${p}`}function b(){const _=c.$async?(0,qr._)`(${v}.async ? await ${p}(${n}) : ${p}(${n}))`:(0,qr._)`${p}(${n})`,P=(0,qr._)`(typeof ${p} == "function" ? ${_} : ${p}.test(${n}))`;return(0,qr._)`${p} && ${p} !== true && ${w} === ${t} && !${P}`}}function h(){const m=d.formats[o];if(!m){g();return}if(m===!0)return;const[v,w,p]=b(m);v===t&&e.pass(_());function g(){if(l.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function b(P){const C=P instanceof RegExp?(0,qr.regexpCode)(P):l.code.formats?(0,qr._)`${l.code.formats}${(0,qr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:P,code:C});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,qr._)`${x}.validate`]:["string",P,x]}function _(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!c.$async)throw new Error("async format in sync schema");return(0,qr._)`await ${p}(${n})`}return typeof w=="function"?(0,qr._)`${p}(${n})`:(0,qr._)`${p}.test(${n})`}}}};jR.default=QTe;Object.defineProperty(kR,"__esModule",{value:!0});const YTe=jR,XTe=[YTe.default];kR.default=XTe;var wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.contentVocabulary=wf.metadataVocabulary=void 0;wf.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wf.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(KO,"__esModule",{value:!0});const JTe=GO,ZTe=YO,eOe=lR,tOe=SR,rOe=PR,nOe=OR,iOe=kR,tM=wf,oOe=[tOe.default,JTe.default,ZTe.default,(0,eOe.default)(!0),iOe.default,tM.metadataVocabulary,tM.contentVocabulary,rOe.default,nOe.default];KO.default=oOe;var $R={},Uw={};Object.defineProperty(Uw,"__esModule",{value:!0});Uw.DiscrError=void 0;var rM;(function(e){e.Tag="tag",e.Mapping="mapping"})(rM||(Uw.DiscrError=rM={}));Object.defineProperty($R,"__esModule",{value:!0});const qc=lt,sC=Uw,nM=Qn,aOe=Wf,sOe=xe,lOe={message:({params:{discrError:e,tagName:t}})=>e===sC.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,qc._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},uOe={keyword:"discriminator",type:"object",schemaType:"object",error:lOe,code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),u=t.const("tag",(0,qc._)`${r}${(0,qc.getProperty)(s)}`);t.if((0,qc._)`typeof ${u} == "string"`,()=>c(),()=>e.error(!1,{discrError:sC.DiscrError.Tag,tag:u,tagName:s})),e.ok(l);function c(){const h=f();t.if(!1);for(const m in h)t.elseIf((0,qc._)`${u} === ${m}`),t.assign(l,d(h[m]));t.else(),e.error(!1,{discrError:sC.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(h){const m=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:h},m);return e.mergeEvaluated(v,qc.Name),m}function f(){var h;const m={},v=p(i);let w=!0;for(let _=0;_<a.length;_++){let P=a[_];if(P!=null&&P.$ref&&!(0,sOe.schemaHasRulesButRef)(P,o.self.RULES)){const x=P.$ref;if(P=nM.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,x),P instanceof nM.SchemaEnv&&(P=P.schema),P===void 0)throw new aOe.default(o.opts.uriResolver,o.baseId,x)}const C=(h=P==null?void 0:P.properties)===null||h===void 0?void 0:h[s];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);w=w&&(v||p(P)),g(C,_)}if(!w)throw new Error(`discriminator: "${s}" must be required`);return m;function p({required:_}){return Array.isArray(_)&&_.includes(s)}function g(_,P){if(_.const)b(_.const,P);else if(_.enum)for(const C of _.enum)b(C,P);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function b(_,P){if(typeof _!="string"||_ in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[_]=P}}}};$R.default=uOe;var AR={};const cOe="https://json-schema.org/draft/2020-12/schema",dOe="https://json-schema.org/draft/2020-12/schema",fOe={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},hOe="meta",pOe="Core and Validation specifications meta-schema",mOe=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],vOe=["object","boolean"],gOe="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",yOe={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},bOe={$schema:cOe,$id:dOe,$vocabulary:fOe,$dynamicAnchor:hOe,title:pOe,allOf:mOe,type:vOe,$comment:gOe,properties:yOe},wOe="https://json-schema.org/draft/2020-12/schema",SOe="https://json-schema.org/draft/2020-12/meta/applicator",_Oe={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},xOe="meta",POe="Applicator vocabulary meta-schema",COe=["object","boolean"],EOe={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},TOe={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},OOe={$schema:wOe,$id:SOe,$vocabulary:_Oe,$dynamicAnchor:xOe,title:POe,type:COe,properties:EOe,$defs:TOe},ROe="https://json-schema.org/draft/2020-12/schema",IOe="https://json-schema.org/draft/2020-12/meta/unevaluated",kOe={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},jOe="meta",$Oe="Unevaluated applicator vocabulary meta-schema",AOe=["object","boolean"],DOe={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},MOe={$schema:ROe,$id:IOe,$vocabulary:kOe,$dynamicAnchor:jOe,title:$Oe,type:AOe,properties:DOe},NOe="https://json-schema.org/draft/2020-12/schema",FOe="https://json-schema.org/draft/2020-12/meta/content",LOe={"https://json-schema.org/draft/2020-12/vocab/content":!0},BOe="meta",VOe="Content vocabulary meta-schema",zOe=["object","boolean"],UOe={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},qOe={$schema:NOe,$id:FOe,$vocabulary:LOe,$dynamicAnchor:BOe,title:VOe,type:zOe,properties:UOe},HOe="https://json-schema.org/draft/2020-12/schema",WOe="https://json-schema.org/draft/2020-12/meta/core",KOe={"https://json-schema.org/draft/2020-12/vocab/core":!0},GOe="meta",QOe="Core vocabulary meta-schema",YOe=["object","boolean"],XOe={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},JOe={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},ZOe={$schema:HOe,$id:WOe,$vocabulary:KOe,$dynamicAnchor:GOe,title:QOe,type:YOe,properties:XOe,$defs:JOe},eRe="https://json-schema.org/draft/2020-12/schema",tRe="https://json-schema.org/draft/2020-12/meta/format-annotation",rRe={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},nRe="meta",iRe="Format vocabulary meta-schema for annotation results",oRe=["object","boolean"],aRe={format:{type:"string"}},sRe={$schema:eRe,$id:tRe,$vocabulary:rRe,$dynamicAnchor:nRe,title:iRe,type:oRe,properties:aRe},lRe="https://json-schema.org/draft/2020-12/schema",uRe="https://json-schema.org/draft/2020-12/meta/meta-data",cRe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},dRe="meta",fRe="Meta-data vocabulary meta-schema",hRe=["object","boolean"],pRe={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},mRe={$schema:lRe,$id:uRe,$vocabulary:cRe,$dynamicAnchor:dRe,title:fRe,type:hRe,properties:pRe},vRe="https://json-schema.org/draft/2020-12/schema",gRe="https://json-schema.org/draft/2020-12/meta/validation",yRe={"https://json-schema.org/draft/2020-12/vocab/validation":!0},bRe="meta",wRe="Validation vocabulary meta-schema",SRe=["object","boolean"],_Re={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},xRe={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},PRe={$schema:vRe,$id:gRe,$vocabulary:yRe,$dynamicAnchor:bRe,title:wRe,type:SRe,properties:_Re,$defs:xRe};Object.defineProperty(AR,"__esModule",{value:!0});const CRe=bOe,ERe=OOe,TRe=MOe,ORe=qOe,RRe=ZOe,IRe=sRe,kRe=mRe,jRe=PRe,$Re=["/properties"];function ARe(e){return[CRe,ERe,TRe,ORe,RRe,t(this,IRe),kRe,t(this,jRe)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,$Re):n}}AR.default=ARe;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=W6,n=KO,i=$R,o=AR,a="https://json-schema.org/draft/2020-12/schema";class s extends r.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:h,meta:m}=this.opts;m&&(o.default.call(this,h),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=s,e.exports=t=s,e.exports.Ajv2020=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=Go;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=lt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var c=Ov;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return c.default}});var d=Wf;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(ZP,ZP.exports);var DRe=ZP.exports;const MRe=nc(DRe),NRe={type:"object",properties:{type:{const:"string"},default:{type:"string"},foreignKey:{type:"string"}},additionalProperties:!1,required:["type","default"]},FRe={type:"object",properties:{type:{const:"number"},default:{type:"number"}},additionalProperties:!1,required:["type","default"]},LRe={type:"object",properties:{type:{const:"boolean"},default:{type:"boolean"}},additionalProperties:!1,required:["type","default"]},BRe={type:"object",properties:{type:{const:"object"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},additionalProperties:{const:!1},required:{$ref:"#/$defs/stringArray"}},additionalProperties:!1,required:["type","properties","additionalProperties","required"]},VRe={type:"object",properties:{type:{const:"array"},items:{oneOf:[{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}]}},additionalProperties:!1,required:["type","items"]},zRe={type:"object",$dynamicAnchor:"meta",oneOf:[{$ref:"#/$defs/objectSchema"},{$ref:"#/$defs/arraySchema"},{$ref:"#/$defs/stringSchema"},{$ref:"#/$defs/numberSchema"},{$ref:"#/$defs/booleanSchema"}],$defs:{stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]},objectSchema:BRe,stringSchema:NRe,numberSchema:FRe,booleanSchema:LRe,arraySchema:VRe}},D8=e=>new MRe().validate(zRe,e);class URe{constructor(t){this.projectPageModel=t,Le(this,{},{autoBind:!0})}get row(){return this.projectPageModel.rowOrThrow}get isValidSchema(){const t=this.projectPageModel.tableOrThrow.schema;return D8(t)}init(){}dispose(){}}const qRe=()=>{const e=$n(),[t]=S.useState(()=>new URe(e));return S.useEffect(()=>(t.init(),()=>t.dispose()),[t]),t},qw=e=>e.type===Ce.Object?HRe(e):e.type===Ce.Array?new _y(qw(e.items)):WRe(e),HRe=e=>{const t=new RO;return Object.entries(e.properties).forEach(([r,n])=>{t.addPropertyWithStore(r,qw(n))}),t},WRe=e=>{if(e.type===Ce.String){const t=new IO;return t.foreignKey=e.foreignKey,t}else{if(e.type===Ce.Number)return new I6;if(e.type===Ce.Boolean)return new R6;throw new Error("this type is not allowed")}};class M8{constructor(t){le(this,"id","");le(this,"parent",null);le(this,"nodeId",Br());le(this,"type",Ce.String);le(this,"baseValue","");le(this,"value",null);this.schema=t,Le(this)}get foreignKey(){return this.schema.foreignKey}get touched(){return this.baseValue!==this.value}get isValid(){return!(this.schema.foreignKey&&!this.value)}getPlainValue(){return this.value??this.schema.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class N8{constructor(t,r=Br(6),n=null,i){le(this,"name",new M8(new IO));le(this,"root");le(this,"overNode",null);le(this,"viewMode",yn.Tree);le(this,"scrollPosition",null);le(this,"originData",null);var o;this.originRow=n,this.projectPageModel=i,this.root=t,this.name.baseValue=r,this.name.value=r,this.originData=((o=this.originRow)==null?void 0:o.data)||null,this.reset(),Le(this,{},{autoBind:!0})}get touched(){return this.root.touched||this.name.touched}get isValid(){return this.root.isValid||this.name.isValid}get isComplexStructure(){return this.root.type===Ce.Object?Object.values(this.root.value).some(t=>t.type===Ce.Object||t.type===Ce.Array):this.root.type===Ce.Array?this.root.items.type===Ce.Object||this.root.items.type===Ce.Array:!1}get areThereForeignKeysBy(){var t,r;return!!((r=(t=this.projectPageModel)==null?void 0:t.rowRefsBy)!=null&&r.countForeignKeysBy)}setOverNode(t){this.overNode=t}setViewMode(t){this.viewMode=t}setScrollPosition(t){this.scrollPosition=t}reset(){this.originData&&(this.root.updateBaseValue(this.originData),this.name.value=this.name.baseValue)}save(){this.originData=this.root.getPlainValue(),this.root.updateBaseValue(this.originData),this.name.updateBaseValue(this.name.value)}}class KRe{constructor(t){le(this,"id","");le(this,"parent",null);le(this,"nodeId",Br());le(this,"type",Ce.Array);le(this,"baseValue",[]);le(this,"value",[]);this.schema=t,Le(this)}get touched(){return this.value!==this.baseValue?!0:this.value.some(t=>t.touched)}get isValid(){return this.value.every(t=>t.isValid)}get items(){return this.schema.items}getPlainValue(){return this.value.map(t=>t.getPlainValue())}createItem(){this.value===this.baseValue&&(this.value=this.baseValue.slice());const t=Mm(this.schema.items);return this.value.push(t),t.parent=this,t.id=(this.value.length-1).toString(),t}removeItem(t){this.value===this.baseValue&&(this.value=this.baseValue.slice());const r=this.value[t];r.parent=null,r.id="",this.value.splice(t,1)}updateBaseValue(t){this.baseValue.length=0,t.forEach((n,i)=>{const o=Mm(this.schema.items);o.parent=this,o.id=i.toString(),o.updateBaseValue(n),this.baseValue.push(o)}),this.value=this.baseValue}}class GRe{constructor(t){le(this,"id","");le(this,"parent",null);le(this,"nodeId",Br());le(this,"type",Ce.Boolean);le(this,"baseValue",null);le(this,"value",null);this.schema=t,Le(this)}get touched(){return this.baseValue!==this.value}get isValid(){return!0}getPlainValue(){return this.value??this.schema.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class QRe{constructor(t){le(this,"id","");le(this,"parent",null);le(this,"nodeId",Br());le(this,"type",Ce.Number);le(this,"baseValue",null);le(this,"value",null);this.schema=t,Le(this)}get touched(){return this.baseValue!==this.value}get isValid(){return!0}get default(){return this.schema.default}getPlainValue(){return this.value??this.default}setValue(t){this.value=t}updateBaseValue(t){this.baseValue=t,this.value=t}}class YRe{constructor(t){le(this,"id","");le(this,"parent",null);le(this,"nodeId",Br());le(this,"type",Ce.Object);le(this,"value",{});this.schema=t,Le(this),this.init()}get touched(){return Object.values(this.value).some(t=>t.touched)}get isValid(){return Object.values(this.value).every(t=>t.isValid)}getPlainValue(){return Object.entries(this.value).reduce((t,[r,n])=>(t[r]=n.getPlainValue(),t),{})}updateBaseValue(t){Object.entries(this.value).map(([r,n])=>{r in t&&n.updateBaseValue(t[r])})}init(){Object.entries(this.schema.properties).forEach(([t,r])=>{const n=Mm(r);n.parent=this,n.id=t,this.value[t]=n})}}const Mm=e=>{switch(e.type){case Ce.Object:return new YRe(e);case Ce.Array:return new KRe(e);case Ce.String:return new M8(e);case Ce.Number:return new QRe(e);case Ce.Boolean:return new GRe(e)}},F8=e=>{let t=e,r="";for(;t.parent;)t.parent.type===Ce.Object?t.type===Ce.Array?r=`${t.id}${r}`:r?r=`${t.id}.${r}`:r=t.id:t.parent.type===Ce.Array&&(r&&t.type===Ce.Array?r=`[${t.id}]${r}`:r?r=`[${t.id}].${r}`:r=`[${t.id}]`),t=t.parent;return r?`"${r}"`:""},XRe=me`
1406
- mutation CreateRowMst($data: CreateRowInput!) {
1407
- createRow(data: $data) {
1408
- table {
1409
- ...TableMst
1410
- }
1411
- previousVersionTableId
1412
- row {
1413
- ...RowMst
1414
- }
1415
- }
1416
- }
1417
- ${Fa}
1418
- ${Vf}
1419
- `,JRe=async e=>{const t=await Kt.mutate({mutation:XRe,variables:e});if(!t.data)throw t.errors;return t.data};class ZRe{constructor(t,r,n,i){this.rootStore=t,this.projectPageModel=r,this.branch=n,this.table=i}async execute(t,r){const{table:n,previousVersionTableId:i,row:o}=await this.createRowRequest(t,r),a=n.versionId!==i;return a&&this.updateTablesConnection(n),await this.refetchRowsConnection(),this.branch.touched||this.branch.updateTouched(!0),a&&this.projectPageModel.revalidateLoaders(),o}async createRowRequest(t,r){const n=await JRe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:t,data:r}});return{table:this.addVersionedTableToCache(n.createRow.table),previousVersionTableId:n.createRow.previousVersionTableId,row:this.addRowToCache(n.createRow.row)}}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(zf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addRowToCache(t){const r=this.rootStore.cache.addRow(hO(t));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}async refetchRowsConnection(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}}const eIe=me`
1420
- mutation RenameRowMst($data: RenameRowInput!) {
1421
- renameRow(data: $data) {
1422
- table {
1423
- ...TableMst
1424
- }
1425
- previousVersionTableId
1426
- row {
1427
- ...RowMst
1428
- }
1429
- previousVersionRowId
1430
- }
1431
- }
1432
- ${Fa}
1433
- ${Vf}
1434
- `,tIe=async e=>{const t=await Kt.mutate({mutation:eIe,variables:e});if(!t.data)throw t.errors;return t.data},rIe=me`
1435
- mutation UpdateRowMst($data: UpdateRowInput!) {
1436
- updateRow(data: $data) {
1437
- table {
1438
- ...TableMst
1439
- }
1440
- previousVersionTableId
1441
- row {
1442
- ...RowMst
1443
- }
1444
- previousVersionRowId
1445
- }
1446
- }
1447
- ${Fa}
1448
- ${Vf}
1449
- `,nIe=async e=>{const t=await Kt.mutate({mutation:rIe,variables:e});if(!t.data)throw t.errors;return t.data};class iIe{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.store=n}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}get row(){return this.projectPageModel.rowOrThrow}async execute(){let t=!1,r=!1;if(this.row.id!==this.store.name.value&&(await this.renameRowRequest(),t=!0,r=!0),this.store.root.touched){const{wasCreatedNewVersionTable:n,wasCreatedNewVersionRow:i}=await this.updateRowProcess();t=t||n||i}return this.branch.touched||this.branch.updateTouched(!0),r&&this.branch.draft.tablesConnection.reset(),t&&this.projectPageModel.revalidateLoaders(),!0}async updateRowProcess(){const{table:t,previousVersionTableId:r,row:n,previousVersionRowId:i}=await this.updateRowRequest(this.store.root.getPlainValue()),o=t.versionId!==r;o&&this.updateTablesConnection(t);const a=n.versionId!==i;return a&&this.updateRowsConnection(t,n),{wasCreatedNewVersionTable:o,wasCreatedNewVersionRow:a}}async renameRowRequest(){const t=await tIe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.row.id,nextRowId:this.store.name.getPlainValue()}});return{table:this.addVersionedTableToCache(t.renameRow.table),previousVersionTableId:t.renameRow.previousVersionTableId,row:this.addVersionedRowToCache(t.renameRow.row),previousVersionRowId:t.renameRow.previousVersionRowId}}async updateRowRequest(t){const r=await nIe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:this.store.name.getPlainValue(),data:t}});return{table:this.addVersionedTableToCache(r.updateRow.table),previousVersionTableId:r.updateRow.previousVersionTableId,row:this.addVersionedRowToCache(r.updateRow.row),previousVersionRowId:r.updateRow.previousVersionRowId}}addVersionedTableToCache(t){return this.addTableToCache(t)}addTableToCache(t){const r=this.rootStore.cache.addOrTable(zf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}addVersionedRowToCache(t){return this.addRowToCache(t)}addRowToCache(t){const r=this.rootStore.cache.addRow(hO(t));return this.rootStore.cache.addRowByVariables({revisionId:this.branch.draft.id,tableId:this.table.id,rowId:r.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}updateRowsConnection(t,r){const n=t.rowsConnection.edges.find(i=>i.node.id===r.id);n&&t.rowsConnection.replaceNode(n.cursor,r)}}var hn=(e=>(e.List="List",e.CreatingRow="CreatingRow",e.ConnectingForeignKeyRow="ConnectingForeignKeyRow",e.UpdatingRow="UpdatingRow",e))(hn||{});class c_{constructor(t,r,n,i){le(this,"id",Br());this.rootStore=t,this.projectPageModel=r,this.customTable=n,this.state=i,Le(this,{},{autoBind:!0})}get table(){return this.customTable||this.projectPageModel.tableOrThrow}get schema(){return this.table.schema}get branch(){return this.projectPageModel.branchOrThrow}get isEditableRevision(){return this.projectPageModel.isEditableRevision}get currentForeignKeyPath(){return this.state.type==="ConnectingForeignKeyRow"?F8(this.state.foreignKeyNode):""}async createRow(t,r){try{return await new ZRe(this.rootStore,this.projectPageModel,this.branch,this.table).execute(t,r)}catch(n){return console.error(n),null}}async updateRow(t){try{return await new iIe(this.rootStore,this.projectPageModel,t).execute()}catch(r){return console.error(r),!1}}toList(){this.state={type:"List",isSelectingForeignKey:this.state.isSelectingForeignKey}}toConnectingForeignKeyRow(t){if(this.state.type==="CreatingRow"||this.state.type==="UpdatingRow")this.state={type:"ConnectingForeignKeyRow",previousType:this.state.type,isSelectingForeignKey:this.state.isSelectingForeignKey,store:this.state.store,foreignKeyNode:t};else throw new Error("Invalid state")}toCreatingRow(){const t=this.state.type==="ConnectingForeignKeyRow"?this.state.store:new N8(Mm(qw(this.schema)));this.state={type:"CreatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:t}}toUpdatingTableFromConnectingForeignKeyRow(){if(this.state.type!=="ConnectingForeignKeyRow")throw new Error("Invalid state");const t=this.state.store;this.state={type:"UpdatingRow",isSelectingForeignKey:this.state.isSelectingForeignKey,store:t}}init(){}dispose(){}updateStore(t){this.state.type==="UpdatingRow"&&(this.state.store=t)}}class oIe{constructor(t,r,n){le(this,"stack");le(this,"disposers",[]);this.rootStore=t,this.projectPageModel=r,this.stack=[new c_(this.rootStore,this.projectPageModel,null,{type:hn.List,isSelectingForeignKey:!1})],n&&(this.stack=[new c_(this.rootStore,this.projectPageModel,null,{type:hn.UpdatingRow,isSelectingForeignKey:!1,store:this.createStore()})]),Le(this,{},{autoBind:!0})}async selectForeignKey(t,r){if(!r.foreignKey)throw new Error("Invalid foreign key");const n=await this.getFetchedTableWithRows(r.foreignKey);t.toConnectingForeignKeyRow(r),um(()=>{this.stack.push(new c_(this.rootStore,this.projectPageModel,n,{type:hn.List,isSelectingForeignKey:!0}))})}cancelSelectingForeignKey(t){const r=this.stack.findIndex(n=>n===t);r!==-1&&this.stack.splice(r+1),t.state.type===hn.ConnectingForeignKeyRow&&(t.state.previousType===hn.CreatingRow?t.toCreatingRow():t.state.previousType===hn.UpdatingRow&&t.toUpdatingTableFromConnectingForeignKeyRow())}onSelectedForeignKey(t,r){const n=this.stack.findIndex(o=>o===t),i=this.stack[n-1];i.state.type===hn.ConnectingForeignKeyRow&&(i.state.foreignKeyNode.setValue(r),i.state.previousType===hn.CreatingRow?i.toCreatingRow():i.state.previousType===hn.UpdatingRow&&i.toUpdatingTableFromConnectingForeignKeyRow()),this.stack.splice(n)}init(){this.disposers.push(Ia(()=>this.projectPageModel.row,()=>{this.stack[0].updateStore(this.createStore())}))}dispose(){this.disposers.length=0}async getFetchedTableWithRows(t){const r={revisionId:this.projectPageModel.revisionOrThrow.id,tableId:t},n=this.rootStore.cache.getTableByVariables(r)||await ze.queryTable({data:r});if(!n)throw new Error(`Not found table ${t}`);return n.rowsConnection.countLoaded||await ze.queryRows({revisionId:this.projectPageModel.revisionOrThrow.id,tableId:n.id,first:50}),n}createStore(){const t=this.projectPageModel.tableOrThrow.schema;return new N8(Mm(D8(t)?qw(t):new RO),this.projectPageModel.rowOrThrow.id,this.projectPageModel.rowOrThrow,this.projectPageModel)}}const aIe=e=>{const t=$n(),[r]=S.useState(()=>new oIe(ze,t,e));return S.useEffect(()=>(r.init(),()=>r.dispose()),[r]),r},L8=S.createContext(null),sIe=()=>{const e=S.useContext(L8);if(!e)throw new Error("Invalid RowStackModelContext");return e},lIe=Ze(({onClick:e})=>{const t=$n();return y.jsx(Nf,{dataTestId:"create-row-button",isDisabled:!t.isEditableRevision,title:"Row",onClick:e})}),uIe="_Row_1lkxi_1",cIe="_RemoveRowButton_1lkxi_1",lC={Row:uIe,RemoveRowButton:cIe},dIe=({row:e,onSelect:t})=>{const r=S.useCallback(()=>{t==null||t(e.id)},[t,e.id]);return y.jsxs(de,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:lC.Row,gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%",children:[y.jsx(de,{minWidth:"150px",children:y.jsx(Ye,{textDecoration:"underline",cursor:"pointer",onClick:r,children:e.id})}),y.jsx(de,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:y.jsx(Ye,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",children:e.data})})]},e.versionId)},fIe=({tableId:e,connection:t})=>{const r=ql(),n=gc(),i=S.useCallback(o=>{r(n.make({...n.getCurrentOptions(),tableId:e,rowId:o}),{state:{isBackToRow:!0}})},[n,r,e]);return y.jsxs(de,{flexDirection:"column",width:"100%",children:[y.jsxs(de,{minHeight:"40px",width:"100%",gap:"4px",children:[y.jsx(Ye,{children:e}),y.jsxs(Ye,{color:"gray.300",children:["(",t.totalCount,")"]})]}),y.jsx(Dw,{useWindowScroll:!0,totalCount:t.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,itemContent:o=>{const{node:a}=t.edges[o];if(a)return y.jsx(dIe,{row:{id:a.id,versionId:a.versionId,data:JSON.stringify(a.data,null,2).replaceAll("\\n","")},onSelect:i})}})]})},hIe=({row:e})=>{const t=S.useMemo(()=>[...e.rowForeignKeysByConnection.keys()].map(n=>({tableId:n,connection:e.rowForeignKeysByConnection.get(n)})).filter(n=>n.connection.totalCount),[e]);return y.jsx(de,{flexDirection:"column",width:"100%",gap:"40px",children:t.map(({tableId:r,connection:n})=>y.jsx(fIe,{tableId:r,connection:n},r))})},pIe=Ze(({store:e})=>y.jsx(de,{height:"40px",paddingBottom:"4px",alignItems:"flex-end",backgroundColor:"white",width:"100%",position:"sticky",bottom:0,justifyContent:"space-between",children:y.jsx(Ye,{color:"gray",opacity:"0.4",children:e.isComplexStructure&&e.overNode&&F8(e.overNode)})})),DR=Ze(({store:e,readonly:t,dataTestId:r})=>{const[n,i]=S.useState(e.getPlainValue().toString()),o=S.useCallback(s=>{i(s)},[]),a=S.useCallback(()=>{const s=n.toLowerCase()==="false"||n==="0"?!1:!!n;i(s.toString()),e.setValue(s)},[e,n]);return y.jsx(Je,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?e.getPlainValue().toString()??'""':y.jsx(Nw,{dataTestId:r,initValue:n,onChange:o,onBlur:a})})}),_d=({name:e,value:t,children:r,nameAndValueClassName:n,colorName:i,onOverLabel:o,onOutLabel:a})=>e===void 0&&t===void 0?y.jsx(de,{flexDirection:"column",width:"100%",children:r}):y.jsxs(de,{flexDirection:"column",flex:1,width:"100%",children:[y.jsxs(de,{gap:"4px",height:"28px",alignItems:"center",onMouseOver:o,onMouseOut:a,children:[y.jsx(Je,{color:"gray.300",children:y.jsx(iO,{})}),e?y.jsxs(de,{className:n,flex:1,children:[y.jsxs(Ye,{color:i,fontWeight:"300",children:[e,":"]}),y.jsx(de,{gap:"4px",flex:1,children:t})]}):y.jsxs(de,{className:n,children:[y.jsx(Ye,{children:t}),y.jsx(Je,{children:":"})]})]}),r&&y.jsx(Je,{ml:"7px",pl:"18px",borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"white",_hover:{borderLeftColor:"blackAlpha.200"},children:r})]}),mIe=/^[.\d]+$/,MR=Ze(({store:e,readonly:t,dataTestId:r})=>{const n=S.useCallback(i=>{const o=parseFloat(i);isNaN(o)?e.setValue(e.default):e.setValue(o)},[e]);return y.jsx(Je,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?e.getPlainValue()??'""':y.jsx(Nw,{dataTestId:r,initValue:e.getPlainValue().toString(),onChange:n,restrict:mIe})})});var Nm=(e=>(e.Creating="Creating",e.Updating="Updating",e.Reading="Reading",e))(Nm||{});const NR=S.createContext(null),FR=()=>{const e=S.useContext(NR);if(!e)throw new Error("Invalid RowEditorActions context");return e},vIe="_Field_1m0jh_1",gIe="_SelectForeignKeyButton_1m0jh_4",d_={Field:vIe,SelectForeignKeyButton:gIe},Iv=Ze(({store:e,readonly:t,dataTestId:r})=>{const n=gc(),i=ql(),[o,a]=S.useState(!1),{onSelectForeignKey:s,mode:l}=FR(),u=S.useCallback(m=>{e.setValue(m)},[e]),c=S.useCallback(async()=>{a(!0),await s(e),a(!1)},[s,e]),d=S.useCallback(async()=>{i(n.make({...n.getCurrentOptions(),tableId:e.foreignKey,rowId:e.getPlainValue()}),{state:{isBackToRow:!0}})},[n,i,e]),f=e.foreignKey&&!t,h=e.foreignKey&&l!==Nm.Creating&&e.getPlainValue();return y.jsxs(de,{className:d_.Field,children:[y.jsx(Je,{ml:"2px",pl:"4px",pr:"4px",height:"24px",minWidth:"15px",cursor:t?"not-allowed":void 0,children:t?`"${e.getPlainValue()}"`:y.jsx(Nw,{dataTestId:r,prefix:'"',postfix:'"',initValue:e.getPlainValue(),onChange:u})}),h&&y.jsx(Li,{"data-testid":`${r}-view-foreign-key`,_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:y.jsx(rme,{}),variant:"ghost",onClick:d,className:d_.SelectForeignKeyButton}),f&&y.jsx(Li,{"data-testid":`${r}-select-foreign-key`,isLoading:o,_hover:{backgroundColor:"gray.100"},"aria-label":"",height:"24px",icon:y.jsx(VV,{}),variant:"ghost",onClick:c,className:d_.SelectForeignKeyButton})]})}),LR=Ze(({store:e,readonly:t,dataTestId:r})=>{const n=Object.entries(e.value),i=FR();return y.jsx(y.Fragment,{children:n.map(([o,a],s)=>{const l=`${r}-${s}`;return y.jsxs(_d,{onOverLabel:()=>{i.onOverNode(a)},onOutLabel:()=>{i.onOverNode(null)},colorName:"gray.400",name:o,value:y.jsxs(y.Fragment,{children:[a.type===Ce.String&&y.jsx(Iv,{dataTestId:l,readonly:t,store:a}),a.type===Ce.Number&&y.jsx(MR,{dataTestId:l,readonly:t,store:a}),a.type===Ce.Boolean&&y.jsx(DR,{dataTestId:l,readonly:t,store:a})]}),children:[a.type===Ce.Object&&y.jsx(LR,{dataTestId:l,readonly:t,store:a}),a.type===Ce.Array&&y.jsx(BR,{dataTestId:l,readonly:t,store:a})]},o)})})}),yIe="_Field_l7t6h_1",bIe="_RemoveButton_l7t6h_4",iM={Field:yIe,RemoveButton:bIe},BR=Ze(({store:e,readonly:t,dataTestId:r})=>{const n=e.value,i=FR(),o=S.useCallback(()=>{e.createItem()},[e]);return y.jsxs(y.Fragment,{children:[n.map((a,s)=>{const l=`${r}-${s}`;return y.jsxs(_d,{onOverLabel:()=>{i.onOverNode(a)},onOutLabel:()=>{i.onOverNode(null)},name:`[${s}]`,colorName:"gray.400",nameAndValueClassName:iM.Field,value:y.jsxs(de,{children:[e.items.type===Ce.String&&y.jsx(Iv,{dataTestId:l,readonly:t,store:a},s),e.items.type===Ce.Number&&y.jsx(MR,{dataTestId:l,readonly:t,store:a},s),e.items.type===Ce.Boolean&&y.jsx(DR,{dataTestId:l,readonly:t,store:a},s),!t&&y.jsx(V6,{dataTestId:`${l}-remove-button`,height:"26px","aria-label":"remove",color:"gray.200",_hover:{color:"gray.400"},className:iM.RemoveButton,onClick:()=>{e.removeItem(s)}})]}),children:[e.items.type===Ce.Object&&y.jsx(LR,{dataTestId:l,readonly:t,store:a},s),e.items.type===Ce.Array&&y.jsx(BR,{dataTestId:l,readonly:t,store:a},s)]},a.nodeId)}),y.jsx(Nf,{dataTestId:`${r}-create-button`,isDisabled:t,title:"Item",onClick:o})]})}),wIe=Ze(({rootName:e,rootValue:t,isEdit:r,store:n})=>{const i="0";return y.jsx(y.Fragment,{children:y.jsx(de,{flexDirection:"column",width:"100%",flex:1,marginBottom:"8rem",children:y.jsxs(_d,{colorName:"gray.400",name:e,value:t,children:[n.root.type===Ce.Object&&y.jsx(LR,{dataTestId:i,readonly:!r,store:n.root}),n.root.type===Ce.Array&&y.jsx(BR,{dataTestId:i,readonly:!r,store:n.root}),n.root.type===Ce.String&&y.jsx(_d,{colorName:"gray.400",name:"<root value>",value:y.jsx(Iv,{dataTestId:i,readonly:!r,store:n.root})}),n.root.type===Ce.Number&&y.jsx(_d,{colorName:"gray.400",name:"<root value>",value:y.jsx(MR,{dataTestId:i,readonly:!r,store:n.root})}),n.root.type===Ce.Boolean&&y.jsx(_d,{colorName:"gray.400",name:"<root value>",value:y.jsx(DR,{dataTestId:i,readonly:!r,store:n.root})})]})})})}),B8=Ze(({store:e,rootName:t,rootValue:r,isEdit:n,actions:i})=>y.jsxs(de,{alignItems:"flex-start",flexDirection:"column",gap:"1rem",className:G0.Root,flex:1,"date-testid":"row-data-card",children:[y.jsxs(de,{justifyContent:"space-between",width:"100%",alignItems:"center",paddingBottom:"8px",children:[y.jsx(de,{minHeight:"40px",children:i}),y.jsx(Je,{className:G0.Actions,children:y.jsx(kO,{availableRefByMode:e.areThereForeignKeysBy,mode:e.viewMode||yn.Tree,onChange:e.setViewMode})})]}),e.viewMode===yn.Tree&&y.jsx(wIe,{rootValue:r,rootName:t,store:e,isEdit:n}),e.viewMode===yn.Json&&y.jsx(q6,{data:e.root.getPlainValue()}),e.viewMode===yn.RefBy&&e.originRow&&y.jsx(hIe,{row:e.originRow}),y.jsx(pIe,{store:e})]})),SIe=Ze(({store:e,onCancel:t,onAdd:r,onSelectForeignKey:n})=>{const[i,o]=S.useState(!1),a=S.useCallback(async()=>{o(!0),await r(),o(!1)},[r]);Lz(()=>{e.scrollPosition&&(window.scrollTo(0,e.scrollPosition),e.setScrollPosition(null))});const s=S.useCallback(async l=>{e.setScrollPosition(window.scrollY),await n(l)},[n,e]);return y.jsx(NR.Provider,{value:{onSelectForeignKey:s,onOverNode:e.setOverNode,mode:Nm.Creating},children:y.jsx(B8,{store:e,rootName:"<id>",rootValue:y.jsx(Iv,{dataTestId:"0",store:e.name}),actions:y.jsxs(y.Fragment,{children:[y.jsx(ww,{dataTestId:"close-create-row-button",onClick:t}),y.jsx(vv,{dataTestId:"approve-create-row-button",loading:i,onClick:a,isDisabled:!e.root.isValid})]}),isEdit:!0})})}),_Ie=Ze(({store:e,isEdit:t,onUpdate:r,onSelectForeignKey:n})=>{var f;const i=ql(),o=jf(),[a,s]=S.useState(!1),l=S.useCallback(async()=>{s(!0),await r(),s(!1)},[r]),u=S.useCallback(()=>{e.reset()},[e]),c=S.useCallback(()=>{var h;(h=o.state)!=null&&h.isBackToRow?i(-1):i("..")},[(f=o.state)==null?void 0:f.isBackToRow,i]);Lz(()=>{e.scrollPosition&&(window.scrollTo(0,e.scrollPosition),e.setScrollPosition(null))});const d=S.useCallback(async h=>{e.setScrollPosition(window.scrollY),await n(h)},[n,e]);return y.jsx(NR.Provider,{value:{onSelectForeignKey:d,onOverNode:e.setOverNode,mode:t?Nm.Updating:Nm.Reading},children:y.jsx(B8,{store:e,rootName:"<id>",rootValue:y.jsx(Iv,{dataTestId:"0",store:e.name,readonly:!t}),actions:y.jsxs(y.Fragment,{children:[y.jsx(U6,{dataTestId:"back-to-row-list-button",onClick:c}),t&&y.jsx(vv,{dataTestId:"row-editor-approve-button",isDisabled:!e.touched||!e.isValid,loading:a,onClick:l}),t&&e.touched&&y.jsx(H6,{dataTestId:"row-editor-revert-button",onClick:u})]}),isEdit:t})})}),xIe=me`
1450
- mutation DeleteRowMst($data: RemoveRowInput!) {
1451
- removeRow(data: $data) {
1452
- branch {
1453
- ...BranchMst
1454
- }
1455
- table {
1456
- ...TableMst
1457
- }
1458
- previousVersionTableId
1459
- }
1460
- }
1461
- ${Rs}
1462
- ${Fa}
1463
- `,PIe=async e=>{const t=await Kt.mutate({mutation:xIe,variables:e});if(!t.data)throw t.errors;return t.data};class CIe{constructor(t,r){this.rootStore=t,this.projectPageModel=r}get branch(){return this.projectPageModel.branchOrThrow}get table(){return this.projectPageModel.tableOrThrow}async execute(t){const{table:r,previousVersionTableId:n,isBranchTouched:i}=await this.updateRowRequest(t),o=r&&n&&r.versionId!==n,a=!r;return o&&this.updateTablesConnection(r),o?await this.refetchRowsConnectionInDraftTable():(this.updateRowsConnectionInDraftTable(t),a&&await this.refetchDraftTables()),this.branch.updateTouched(i),o&&this.projectPageModel.revalidateLoaders(),!0}async updateRowRequest(t){var n,i;const r=await PIe({data:{revisionId:this.branch.draft.id,tableId:this.table.id,rowId:t}});return{table:this.addVersionedTableToCache((n=r.removeRow)==null?void 0:n.table),previousVersionTableId:(i=r.removeRow)==null?void 0:i.previousVersionTableId,isBranchTouched:r.removeRow.branch.touched}}addVersionedTableToCache(t){return t?this.addTableToCache(t):null}addTableToCache(t){const r=this.rootStore.cache.addOrTable(zf(t));return this.rootStore.cache.addTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id},r.versionId),r}updateTablesConnection(t){const r=this.branch.draft,n=r.tablesConnection.edges.find(i=>i.node.id===t.id);n&&r.tablesConnection.replaceNode(n.cursor,t)}async refetchDraftTables(){return this.rootStore.queryTables({revisionId:this.branch.draft.id,first:50})}async refetchRowsConnectionInDraftTable(){return this.rootStore.queryRows({revisionId:this.branch.draft.id,tableId:this.table.id,first:50})}updateRowsConnectionInDraftTable(t){const r=this.rootStore.cache.getTableByVariables({revisionId:this.branch.draft.id,tableId:this.table.id}),n=r==null?void 0:r.rowsConnection.edges.find(i=>i.node.id===t);r==null||r.rowsConnection.removeEdge(n==null?void 0:n.cursor)}}class EIe{constructor(t,r,n){this.rootStore=t,this.projectPageModel=r,this.table=n,Le(this,{},{autoBind:!0})}get totalCount(){return this.items.length}get hasNextPage(){return this.table.rowsConnection.availableNextPage}get isEdit(){return this.projectPageModel.isEditableRevision}get items(){return this.table.rowsConnection.edges.map(({node:t})=>({id:t.id,versionId:t.versionId,readonly:t.readonly,title:t.id,data:JSON.stringify(t.data,null,2).replaceAll("\\n",""),link:""}))}setTable(t){this.table=t}dispose(){}tryToFetchNextPage(){this.hasNextPage&&this.rootStore.queryRows({revisionId:this.revision.id,tableId:this.table.id,first:50,after:this.table.rowsConnection.endCursor||void 0})}async deleteRow(t){try{return await new CIe(this.rootStore,this.projectPageModel).execute(t)}catch(r){return console.error(r),!1}}init(){}get revision(){return this.projectPageModel.revisionOrThrow}}const TIe=e=>{const t=$n(),[r]=S.useState(()=>new EIe(ze,t,e));return S.useEffect(()=>(r.init(),r.setTable(e),()=>r.dispose()),[r,e]),r},OIe=({rowId:e,onRemove:t,dataTestId:r})=>{const[n,i]=S.useState(!1),o=S.useCallback(async()=>{i(!0),await(t==null?void 0:t(e)),i(!1)},[e,t]);return y.jsx(Li,{"data-testid":r,"aria-label":"",color:"gray.400",icon:y.jsx(bw,{}),isLoading:n,variant:"ghost",onClick:o})},RIe=({row:e,store:t,onSelect:r})=>{const n=S.useCallback(()=>{r==null||r(e.id)},[r,e.id]),i=!!r;return y.jsxs(de,{_hover:{backgroundColor:"gray.50"},alignItems:"center",className:lC.Row,gap:"4px",paddingLeft:"1rem",minHeight:"2.5rem",width:"100%","data-testid":`row-${e.id}`,children:[y.jsxs(de,{minWidth:"150px",children:[r?y.jsx(Ye,{textDecoration:"underline",cursor:"pointer",onClick:n,"data-testid":`row-${e.id}-select`,children:e.id}):y.jsx(wo,{to:`${e.id}`,"data-testid":`row-${e.id}-link`,children:y.jsx(Ye,{color:"gray.400",textDecoration:"underline",children:e.id})}),!e.readonly&&t.isEdit&&y.jsx(Ye,{color:"gray.400",children:"*"})]}),y.jsxs(de,{alignItems:"center",justifyContent:"space-between",minHeight:"40px",width:"100%",minWidth:0,children:[y.jsx(Ye,{ml:"16px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:"gray.400",fontWeight:"300",children:e.data}),!i&&t.isEdit&&y.jsx(Je,{className:lC.RemoveRowButton,children:y.jsx(OIe,{rowId:e.id,onRemove:t.deleteRow,dataTestId:`remove-row-${e.id}`})})]})]},e.versionId)},IIe=Ze(({table:e,onSelect:t})=>{const r=TIe(e);return y.jsx(Dw,{useWindowScroll:!0,totalCount:r.totalCount,defaultItemHeight:40,increaseViewportBy:40*100,endReached:r.hasNextPage?r.tryToFetchNextPage:void 0,itemContent:n=>{const i=r.items[n];if(i)return y.jsx(RIe,{row:i,store:r,onSelect:t})}})}),f_=({tableId:e})=>y.jsx(de,{width:"100%",borderStyle:"solid",borderTopWidth:1,borderColor:"gray.100",justifyContent:"center",color:"gray.400",fontWeight:"300",pt:"0.5rem",pb:"0.5rem",children:y.jsxs(Je,{backgroundColor:"gray.50",pl:"5px",pr:"5px",borderRadius:"5px",children:['Select or create a row in "',e,'" to be referenced by the above row']})}),kIe=({previousType:e,tableId:t,rowId:r,foreignKeyPath:n,onCancel:i})=>{const o=S.useMemo(()=>e===hn.UpdatingRow?"updating":e===hn.CreatingRow?"creating":"",[e]);return y.jsx(y.Fragment,{children:y.jsx(Je,{width:"100%",borderStyle:"solid",borderLeftWidth:2,borderColor:"gray.200",pl:"1rem",mb:"1rem",children:y.jsxs(de,{gap:"4px",alignItems:"center",height:"30px",mt:"2px",mb:"2px",color:"gray.400",fontWeight:"300",children:[y.jsx(Ye,{textDecoration:"underline",cursor:"pointer",onClick:i,children:"Back"}),y.jsxs(Ye,{children:["- ",o,' "',t," - ",r,'":']}),y.jsx(Ye,{children:n})]})})})},jIe=Ze(()=>{const e=ql(),t=gc(),{root:r,item:n}=sIe(),i=S.useCallback(async u=>{await r.selectForeignKey(n,u)},[n,r]),o=S.useCallback(()=>{r.cancelSelectingForeignKey(n)},[n,r]),a=S.useCallback(u=>{r.onSelectedForeignKey(n,u)},[n,r]),s=S.useCallback(async()=>{if(n.state.type===hn.CreatingRow){const u=n.state.store,c=await n.createRow(u.name.getPlainValue(),u.root.getPlainValue());c&&(n.state.isSelectingForeignKey?r.onSelectedForeignKey(n,u.name.getPlainValue()):e(t.make({isDraft:!0,rowId:c.id})))}},[n,t,e,r]),l=S.useCallback(async()=>{if(n.state.type===hn.UpdatingRow){const u=n.state.store;await n.updateRow(u)&&(u.save(),e(t.make({isDraft:!0,rowId:u.name.getPlainValue()})))}},[n,t,e]);if(n.state.type===hn.ConnectingForeignKeyRow){const u=n.state.store;return y.jsx(y.Fragment,{children:y.jsx(kIe,{previousType:n.state.previousType,foreignKeyPath:n.currentForeignKeyPath,onCancel:o,tableId:n.table.id,rowId:u.name.getPlainValue()})})}return n.state.type===hn.List?y.jsxs(y.Fragment,{children:[n.state.isSelectingForeignKey&&y.jsx(f_,{tableId:n.table.id}),y.jsx(lIe,{onClick:n.toCreatingRow}),y.jsx(Je,{paddingTop:"0.5rem",paddingBottom:"1rem",children:y.jsx(IIe,{table:n.table,onSelect:n.state.isSelectingForeignKey?a:void 0})})]}):n.state.type===hn.CreatingRow?y.jsxs(y.Fragment,{children:[n.state.isSelectingForeignKey&&y.jsx(f_,{tableId:n.table.id}),y.jsx(SIe,{store:n.state.store,onAdd:s,onCancel:n.toList,onSelectForeignKey:i})]}):n.state.type===hn.UpdatingRow?y.jsxs(y.Fragment,{children:[n.state.isSelectingForeignKey&&y.jsx(f_,{tableId:n.table.id}),y.jsx(_Ie,{isEdit:n.isEditableRevision,store:n.state.store,onUpdate:l,onSelectForeignKey:i})]}):null}),V8=Ze(({startWithUpdating:e})=>{const t=aIe(e);return y.jsx(y.Fragment,{children:t.stack.map(r=>y.jsx(L8.Provider,{value:{root:t,item:r},children:y.jsx(jIe,{})},r.id))})}),$Ie=Ze(()=>{const e=qRe();return e.isValidSchema?y.jsx(V8,{startWithUpdating:!0}):y.jsx(xxe,{data:e.row.data})}),AIe=()=>y.jsx(Mf,{hideSidebar:!0,children:y.jsxs(de,{alignItems:"center",flexDirection:"column",justifyContent:"center",flex:1,gap:"8px",children:[y.jsx(Ye,{color:"gray.400",children:"Check your email to confirm your account"}),y.jsx(Of,{color:"gray.400",alignSelf:"center",as:wo,to:`/${hc}`,children:"Log in"})]})}),DIe=()=>null;class uC{constructor(t,r,n){le(this,"isLoading",!1);this.routerService=t,this.apiService=r,this.authService=n,Le(this)}async login(t){t?(await this.loginRequest(t),await this.routerService.navigate("/")):console.error("Invalid code")}dispose(){}init(){}async loginRequest(t){this.setIsLoading(!0);try{const r=await this.apiService.client.loginGoogle({data:{code:t,redirectUrl:Gz()}});return await this.authService.setToken(r.loginGoogle.accessToken),!0}catch(r){console.error(r)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(uC,()=>{const e=We.get(xs),t=We.get(Aa),r=We.get(zi);return new uC(e,t,r)},{scope:"request"});const MIe=async({request:e})=>{const n=new URL(e.url).searchParams.get("code");if(!n)throw new Error("Invalid code");return await We.get(uC).login(n),uf("/")};class cC{constructor(t,r,n){le(this,"isLoading",!1);le(this,"form",new aO({email:"",username:"",password:""}));this.routerService=t,this.apiService=r,this.configurationService=n,Le(this)}get disableSubmitButton(){return!this.form.isValid}get availableOauth(){return this.configurationService.availableGoogleOauth}get availableGoogleOauth(){return this.configurationService.availableGoogleOauth}get availableGithubOauth(){return this.configurationService.availableGithubOauth}toGoogleOauth(){Qz(this.configurationService.googleOauthClientId)}toGithubOauth(){Kz(this.configurationService.githubOauthClientId)}async submit(){await this.signUp(),await this.routerService.navigate(`/${gw}/${jV}`)}dispose(){}init(){}async signUp(){this.setIsLoading(!0);try{return await this.apiService.client.signUp({data:this.form.values}),!0}catch(t){console.error(t)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(cC,()=>{const e=We.get(xs),t=We.get(Aa),r=We.get(ec);return new cC(e,t,r)},{scope:"request"});const NIe=Ze(()=>{const e=Ff(cC),t=S.useCallback(s=>{e.form.setValue("username",s.currentTarget.value)},[e.form]),r=S.useCallback(s=>{e.form.setValue("email",s.currentTarget.value)},[e.form]),n=S.useCallback(s=>{e.form.setValue("password",s.currentTarget.value)},[e.form]),i=S.useCallback(async()=>{await e.submit()},[e]),o=S.useCallback(()=>{e.toGithubOauth()},[e]),a=S.useCallback(()=>{e.toGoogleOauth()},[e]);return y.jsx(y.Fragment,{children:y.jsxs(Mf,{hideSidebar:!0,children:[y.jsxs(de,{width:"100%",gap:"8px",justifyContent:"flex-end",children:[y.jsx(Ye,{color:"gray.300",children:"Already have an account?"}),y.jsx(Of,{color:"gray.300",alignSelf:"center",as:wo,to:`/${hc}`,children:"Log in"})]}),y.jsx(de,{alignItems:"center",justifyContent:"center",flex:1,children:y.jsxs(de,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[e.availableOauth&&y.jsxs(y.Fragment,{children:[y.jsxs(de,{flexDirection:"column",gap:"2px",children:[e.availableGithubOauth&&y.jsx(rs,{icon:y.jsx(LV,{}),onClick:o,title:"Continue with Github"}),e.availableGoogleOauth&&y.jsx(rs,{icon:y.jsx(BV,{}),onClick:a,title:"Continue with Google"})]}),y.jsxs(de,{width:"100%",alignItems:"center",gap:"16px",children:[y.jsx(Je,{backgroundColor:"gray.100",flex:1,height:"1px"}),y.jsx(Ye,{color:"gray.300",fontSize:"12px",children:"OR"}),y.jsx(Je,{backgroundColor:"gray.100",flex:1,height:"1px"})]})]}),y.jsx(ns,{dataTestId:"signup-username-input",autoFocus:!0,height:"40px",placeholder:"enter your username",autoComplete:"new-password",value:e.form.values.username,onChange:t}),y.jsx(ns,{dataTestId:"signup-email-input",height:"40px",placeholder:"enter your email",type:"email",autoComplete:"new-password",value:e.form.values.email,onChange:r}),y.jsx(ns,{dataTestId:"signup-password-input",height:"40px",placeholder:"create a password",type:"password",autoComplete:"new-password",value:e.form.values.password,onChange:n,onEnter:i}),y.jsx(Je,{visibility:e.disableSubmitButton?"hidden":"visible",children:y.jsx(rs,{onClick:i,isDisabled:e.disableSubmitButton,isLoading:e.isLoading,title:"Sign up"})})]})})]})})}),FIe=()=>y.jsx(V8,{});class dC{constructor(t,r,n){le(this,"isLoading",!1);le(this,"form",new aO({username:""}));this.authService=t,this.apiService=r,this.routerService=n,Le(this)}get disableSubmitButton(){return!this.form.isValid}async submit(){await this.request()&&(await this.authService.fetchMe(),await this.routerService.navigate(nO))}dispose(){}init(){}async request(){this.setIsLoading(!0);try{return await this.apiService.client.setUsername({data:{username:this.form.values.username}}),!0}catch(t){console.error(t)}finally{this.setIsLoading(!1)}}setIsLoading(t){this.isLoading=t}}We.register(dC,()=>{const e=We.get(zi),t=We.get(Aa),r=We.get(xs);return new dC(e,t,r)},{scope:"request"});const LIe=Ze(()=>{const e=Ff(dC),t=S.useCallback(n=>{e.form.setValue("username",n.currentTarget.value)},[e.form]),r=S.useCallback(async()=>{await e.submit()},[e]);return y.jsx(Mf,{hideSidebar:!0,children:y.jsx(de,{alignItems:"center",justifyContent:"center",flex:1,children:y.jsxs(de,{flexDirection:"column",width:"16rem",gap:"1rem",alignItems:"center",children:[y.jsx(ns,{dataTestId:"login-emailOrUsername-input",autoFocus:!0,height:"40px",placeholder:"set username",value:e.form.values.username,onChange:t,onEnter:r}),y.jsx(Je,{visibility:e.disableSubmitButton?"hidden":"visible",children:y.jsx(rs,{onClick:r,isLoading:e.isLoading,title:"Set username"})})]})})})}),BIe=()=>{const e=AT(),t=S.useMemo(()=>(console.error(e),"Unexpected error"),[e]);return y.jsxs(de,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",height:"100%",children:[y.jsx(oO,{color:"gray"}),y.jsx(Ye,{color:"gray.400",children:t})]})},h_=()=>{const e=AT(),t=S.useMemo(()=>e instanceof Nz?`Not found table "${e.message}" in this revision`:e instanceof Ow?`Not found row "${e.message}" in this revision`:(console.error(e),"Unexpected error"),[e]);return y.jsxs(de,{alignItems:"center",flex:1,gap:"1rem",justifyContent:"center",width:"100%",children:[y.jsx(oO,{color:"gray"}),y.jsx(Ye,{color:"gray.400",children:t})]})};function Ei(){return(Ei=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var VIe=function(){};function z8(e,t){return Math.random()*(t-e+1)+e}function oM(e,t){return Math.floor(z8(e,t))}var zIe=S.forwardRef(function(e,t){var r=e.progress,n=e.height,i=n===void 0?2:n,o=e.className,a=o===void 0?"":o,s=e.color,l=s===void 0?"red":s,u=e.background,c=u===void 0?"transparent":u,d=e.onLoaderFinished,f=e.transitionTime,h=f===void 0?300:f,m=e.loaderSpeed,v=m===void 0?500:m,w=e.waitingTime,p=w===void 0?1e3:w,g=e.shadow,b=g===void 0||g,_=e.containerStyle,P=_===void 0?{}:_,C=e.style,x=C===void 0?{}:C,T=e.shadowStyle,I=T===void 0?{}:T,M=e.containerClassName,H=M===void 0?"":M,re=S.useRef(!1),ie=S.useState(0),R=ie[0],L=ie[1],X=S.useRef({active:!1,refreshRate:1e3}),Q=S.useState(!1),W=Q[0],te=Q[1],G=S.useState({active:!1,value:20}),A=G[0],U=G[1],N={position:"fixed",top:0,left:0,height:i,background:c,zIndex:99999999999,width:"100%"},E={boxShadow:"0 0 10px "+l+", 0 0 10px "+l,width:"5%",opacity:1,position:"absolute",height:"100%",transition:"all "+v+"ms ease",transform:"rotate(3deg) translate(0px, -4px)",left:"-10rem"},k=S.useState({height:"100%",background:l,transition:"all "+v+"ms ease",width:"0%"}),D=k[0],ee=k[1],oe=S.useState(E),ve=oe[0],Se=oe[1];S.useEffect(function(){return re.current=!0,function(){re.current=!1}},[]),S.useImperativeHandle(t,function(){return{continuousStart:function(ce,ye){if(ye===void 0&&(ye=1e3),!A.active)if(W)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var Xe=ce||oM(10,20);X.current={active:!0,refreshRate:ye},L(Xe),Vt(Xe)}},staticStart:function(ce){if(!X.current.active)if(W)console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");else{var ye=ce||oM(30,50);U({active:!0,value:ye}),L(ye),Vt(ye)}},complete:function(){W?console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!"):(L(100),Vt(100))}}}),S.useEffect(function(){ee(Ei({},D,{background:l})),Se(Ei({},ve,{boxShadow:"0 0 10px "+l+", 0 0 5px "+l}))},[l]),S.useEffect(function(){if(t){if(t&&r!==void 0)return void console.warn(`react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar! Please use only props or only ref methods! Ref methods will override props if "ref" property is available.`);Vt(R),te(!1)}else r&&Vt(r),te(!0)},[r]);var $e,ge,st,Vt=function ce(ye){ye>=100?(ee(Ei({},D,{width:"100%"})),b&&Se(Ei({},ve,{left:ye-10+"%"})),setTimeout(function(){re.current&&(ee(Ei({},D,{opacity:0,width:"100%",transition:"all "+h+"ms ease-out",color:l})),setTimeout(function(){re.current&&(X.current.active&&(X.current=Ei({},X.current,{active:!1}),L(0),ce(0)),A.active&&(U(Ei({},A,{active:!1})),L(0),ce(0)),d&&d(),L(0),ce(0))},h))},p)):(ee(function(Xe){return Ei({},Xe,{width:ye+"%",opacity:1,transition:ye>0?"all "+v+"ms ease":""})}),b&&Se(Ei({},ve,{left:ye-5.5+"%",transition:ye>0?"all "+v+"ms ease":""})))};return $e=function(){var ce=z8(Math.min(10,(100-R)/5),Math.min(20,(100-R)/3));R+ce<95&&(L(R+ce),Vt(R+ce))},ge=X.current.active?X.current.refreshRate:null,st=S.useRef(VIe),S.useEffect(function(){st.current=$e}),S.useEffect(function(){},[void 0]),S.useEffect(function(){if(ge!==null&&ge!==!1){var ce=setInterval(function(){return st.current()},ge);return function(){return clearInterval(ce)}}},[ge]),S.createElement("div",{className:H,style:Ei({},N,P)},S.createElement("div",{className:a,style:Ei({},D,x)},b?S.createElement("div",{style:Ei({},ve,I)}):null))});const UIe=(e=300)=>{const t=S.useRef(null),r=Nce();return S.useEffect(()=>{const n=t.current;let i=NaN,o=!1;return r.state==="loading"&&(i=setTimeout(()=>{o=!0,n==null||n.continuousStart()},e)),()=>{o&&(n==null||n.complete()),clearTimeout(i)}},[e,r.state]),t},qIe=()=>{const e=UIe(150);return y.jsxs(y.Fragment,{children:[y.jsx(zIe,{ref:e,color:"#1fa3ff",height:1,waitingTime:500}),y.jsx(C0,{})]})},p_=({tableLoader:e,tableId:t,rowLoader:r,rowId:n})=>({path:vp,loader:e,id:t,children:[{index:!0,element:y.jsx(FIe,{})},{path:AV,loader:r,id:n,element:y.jsx($Ie,{})}]}),HIe=[{path:"/",element:y.jsx(qIe,{}),errorElement:y.jsx(BIe,{}),children:[{index:!0,element:y.jsx(LSe,{}),loader:HS(xg,Uye)},{path:RV,element:y.jsx(LIe,{})},{path:hc,loader:Vye,children:[{index:!0,element:y.jsx(Kwe,{})},{path:kV,loader:MIe,element:y.jsx(DIe,{})},{path:IV,loader:Uwe,element:y.jsx(zwe,{})}]},{path:OV,element:y.jsx(Gwe,{}),loader:xg},{path:gw,loader:zye,children:[{index:!0,element:y.jsx(NIe,{})},{path:jV,element:y.jsx(AIe,{})},{path:Ape,element:y.jsx(Vwe,{})}]},{path:yl,element:y.jsx(C0,{}),loader:HS(xg,qye),id:hr.Organization,children:[{path:bl,element:y.jsx(C0,{}),loader:HS(xg,Hye),id:hr.Project,children:[{path:wl,element:y.jsx(Bwe,{}),loader:Bye,id:hr.Branch,children:[{loader:Kye,id:hr.HeadRevision,errorElement:y.jsx(h_,{}),children:[{index:!0,element:y.jsx(n_,{})},p_({tableLoader:Zye,tableId:hr.HeadTable,rowLoader:Yye,rowId:hr.HeadRow})]},{path:yw,loader:Wye,id:hr.DraftRevision,errorElement:y.jsx(h_,{}),children:[{index:!0,element:y.jsx(n_,{})},p_({tableLoader:Jye,tableId:hr.DraftTable,rowLoader:Qye,rowId:hr.DraftRow})]},{path:$V,loader:Gye,id:hr.SpecificRevision,errorElement:y.jsx(h_,{}),children:[{index:!0,element:y.jsx(n_,{})},p_({tableLoader:e0e,tableId:hr.SpecificTable,rowLoader:Xye,rowId:hr.SpecificRow})]}]}]}]}]}];class xs{constructor(t){le(this,"_router",null);this.bootstrapService=t,this.init()}get router(){if(!this._router)throw new Error("Router not found");return this._router}navigate(...t){return this.router.navigate(...t)}init(){Ia(()=>this.bootstrapService.isLoaded,t=>{t&&(this._router=Gce(HIe))})}}We.register(xs,()=>{const e=We.get($0);return new xs(e)},{scope:"singleton"});class fC{constructor(t,r){this.bootstrapService=t,this.routerService=r,Le(this)}get isLoaded(){return this.bootstrapService.isLoaded}get router(){return this.routerService.router}async init(){}dispose(){}}We.register(fC,()=>{const e=We.get($0),t=We.get(xs);return new fC(e,t)},{scope:"request"});const WIe=({children:e})=>y.jsx(Ipe,{client:Kt,children:e}),KIe=Ze(()=>{const e=Ff(fC);return!e.isLoaded||!e.router?y.jsxs(h$,{children:[y.jsx(XE,{w:"100%",h:"100%",children:y.jsx(Ym,{})}),y.jsx(_A,{})]}):y.jsx(WIe,{children:y.jsxs(h$,{children:[y.jsx(nde,{router:e.router}),y.jsx(_A,{})]})})}),aM=document.getElementById("root");aM&&w4(aM).render(y.jsx(S.StrictMode,{children:y.jsx(KIe,{})}));const GIe=`ver: ${Hg("PACKAGE_VERSION")} - ${Hg("GIT_BRANCH_NAME")}:${Hg("GIT_COMMIT_HASH")}`;console.info(GIe)});export default QIe();