UNPKG

@accounter/client

Version:

190 lines 1.69 MB
var wH=Object.defineProperty;var _H=(e,n,t)=>n in e?wH(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var fe=(e,n,t)=>(_H(e,typeof n!="symbol"?n+"":n,t),t),VS=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)};var X=(e,n,t)=>(VS(e,n,"read from private field"),t?t.call(e):n.get(e)),Ke=(e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)},Ie=(e,n,t,i)=>(VS(e,n,"write to private field"),i?i.call(e,t):n.set(e,t),t);var gf=(e,n,t,i)=>({set _(a){Ie(e,n,a,t)},get _(){return X(e,n,i)}}),ot=(e,n,t)=>(VS(e,n,"access private method"),t);function CH(e,n){for(var t=0;t<n.length;t++){const i=n[t];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in e)){const r=Object.getOwnPropertyDescriptor(i,a);r&&Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(a){if(a.ep)return;a.ep=!0;const r=t(a);fetch(a.href,r)}})();var FF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PH(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function i(){return this instanceof i?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),t}var cR={exports:{}},xy={},uR={exports:{}},Ge={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lm=Symbol.for("react.element"),OH=Symbol.for("react.portal"),DH=Symbol.for("react.fragment"),EH=Symbol.for("react.strict_mode"),$H=Symbol.for("react.profiler"),IH=Symbol.for("react.provider"),jH=Symbol.for("react.context"),TH=Symbol.for("react.forward_ref"),AH=Symbol.for("react.suspense"),RH=Symbol.for("react.memo"),MH=Symbol.for("react.lazy"),E1=Symbol.iterator;function LH(e){return e===null||typeof e!="object"?null:(e=E1&&e[E1]||e["@@iterator"],typeof e=="function"?e:null)}var mR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fR=Object.assign,pR={};function Jd(e,n,t){this.props=e,this.context=n,this.refs=pR,this.updater=t||mR}Jd.prototype.isReactComponent={};Jd.prototype.setState=function(e,n){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,n,"setState")};Jd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hR(){}hR.prototype=Jd.prototype;function wF(e,n,t){this.props=e,this.context=n,this.refs=pR,this.updater=t||mR}var _F=wF.prototype=new hR;_F.constructor=wF;fR(_F,Jd.prototype);_F.isPureReactComponent=!0;var $1=Array.isArray,vR=Object.prototype.hasOwnProperty,CF={current:null},kR={key:!0,ref:!0,__self:!0,__source:!0};function gR(e,n,t){var i,a={},r=null,o=null;if(n!=null)for(i in n.ref!==void 0&&(o=n.ref),n.key!==void 0&&(r=""+n.key),n)vR.call(n,i)&&!kR.hasOwnProperty(i)&&(a[i]=n[i]);var l=arguments.length-2;if(l===1)a.children=t;else if(1<l){for(var s=Array(l),d=0;d<l;d++)s[d]=arguments[d+2];a.children=s}if(e&&e.defaultProps)for(i in l=e.defaultProps,l)a[i]===void 0&&(a[i]=l[i]);return{$$typeof:Lm,type:e,key:r,ref:o,props:a,_owner:CF.current}}function zH(e,n){return{$$typeof:Lm,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function PF(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm}function BH(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(t){return n[t]})}var I1=/\/+/g;function WS(e,n){return typeof e=="object"&&e!==null&&e.key!=null?BH(""+e.key):n.toString(36)}function Lp(e,n,t,i,a){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Lm:case OH:o=!0}}if(o)return o=e,a=a(o),e=i===""?"."+WS(o,0):i,$1(a)?(t="",e!=null&&(t=e.replace(I1,"$&/")+"/"),Lp(a,n,t,"",function(d){return d})):a!=null&&(PF(a)&&(a=zH(a,t+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(I1,"$&/")+"/")+e)),n.push(a)),1;if(o=0,i=i===""?".":i+":",$1(e))for(var l=0;l<e.length;l++){r=e[l];var s=i+WS(r,l);o+=Lp(r,n,t,s,a)}else if(s=LH(e),typeof s=="function")for(e=s.call(e),l=0;!(r=e.next()).done;)r=r.value,s=i+WS(r,l++),o+=Lp(r,n,t,s,a);else if(r==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return o}function yf(e,n,t){if(e==null)return e;var i=[],a=0;return Lp(e,i,"","",function(r){return n.call(t,r,a++)}),i}function VH(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ei={current:null},zp={transition:null},WH={ReactCurrentDispatcher:ei,ReactCurrentBatchConfig:zp,ReactCurrentOwner:CF};Ge.Children={map:yf,forEach:function(e,n,t){yf(e,function(){n.apply(this,arguments)},t)},count:function(e){var n=0;return yf(e,function(){n++}),n},toArray:function(e){return yf(e,function(n){return n})||[]},only:function(e){if(!PF(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ge.Component=Jd;Ge.Fragment=DH;Ge.Profiler=$H;Ge.PureComponent=wF;Ge.StrictMode=EH;Ge.Suspense=AH;Ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WH;Ge.cloneElement=function(e,n,t){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=fR({},e.props),a=e.key,r=e.ref,o=e._owner;if(n!=null){if(n.ref!==void 0&&(r=n.ref,o=CF.current),n.key!==void 0&&(a=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in n)vR.call(n,s)&&!kR.hasOwnProperty(s)&&(i[s]=n[s]===void 0&&l!==void 0?l[s]:n[s])}var s=arguments.length-2;if(s===1)i.children=t;else if(1<s){l=Array(s);for(var d=0;d<s;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:Lm,type:e.type,key:a,ref:r,props:i,_owner:o}};Ge.createContext=function(e){return e={$$typeof:jH,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:IH,_context:e},e.Consumer=e};Ge.createElement=gR;Ge.createFactory=function(e){var n=gR.bind(null,e);return n.type=e,n};Ge.createRef=function(){return{current:null}};Ge.forwardRef=function(e){return{$$typeof:TH,render:e}};Ge.isValidElement=PF;Ge.lazy=function(e){return{$$typeof:MH,_payload:{_status:-1,_result:e},_init:VH}};Ge.memo=function(e,n){return{$$typeof:RH,type:e,compare:n===void 0?null:n}};Ge.startTransition=function(e){var n=zp.transition;zp.transition={};try{e()}finally{zp.transition=n}};Ge.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ge.useCallback=function(e,n){return ei.current.useCallback(e,n)};Ge.useContext=function(e){return ei.current.useContext(e)};Ge.useDebugValue=function(){};Ge.useDeferredValue=function(e){return ei.current.useDeferredValue(e)};Ge.useEffect=function(e,n){return ei.current.useEffect(e,n)};Ge.useId=function(){return ei.current.useId()};Ge.useImperativeHandle=function(e,n,t){return ei.current.useImperativeHandle(e,n,t)};Ge.useInsertionEffect=function(e,n){return ei.current.useInsertionEffect(e,n)};Ge.useLayoutEffect=function(e,n){return ei.current.useLayoutEffect(e,n)};Ge.useMemo=function(e,n){return ei.current.useMemo(e,n)};Ge.useReducer=function(e,n,t){return ei.current.useReducer(e,n,t)};Ge.useRef=function(e){return ei.current.useRef(e)};Ge.useState=function(e){return ei.current.useState(e)};Ge.useSyncExternalStore=function(e,n,t){return ei.current.useSyncExternalStore(e,n,t)};Ge.useTransition=function(){return ei.current.useTransition()};Ge.version="18.2.0";uR.exports=Ge;var S=uR.exports;const b=Mm(S),Hu=CH({__proto__:null,default:b},[S]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var HH=S,UH=Symbol.for("react.element"),YH=Symbol.for("react.fragment"),GH=Object.prototype.hasOwnProperty,qH=HH.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KH={key:!0,ref:!0,__self:!0,__source:!0};function yR(e,n,t){var i,a={},r=null,o=null;t!==void 0&&(r=""+t),n.key!==void 0&&(r=""+n.key),n.ref!==void 0&&(o=n.ref);for(i in n)GH.call(n,i)&&!KH.hasOwnProperty(i)&&(a[i]=n[i]);if(e&&e.defaultProps)for(i in n=e.defaultProps,n)a[i]===void 0&&(a[i]=n[i]);return{$$typeof:UH,type:e,key:r,ref:o,props:a,_owner:qH.current}}xy.Fragment=YH;xy.jsx=yR;xy.jsxs=yR;cR.exports=xy;var m=cR.exports,SR={exports:{}},Li={},NR={exports:{}},bR={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function n(O,P){var A=O.length;O.push(P);e:for(;0<A;){var V=A-1>>>1,U=O[V];if(0<a(U,P))O[V]=P,O[A]=U,A=V;else break e}}function t(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var P=O[0],A=O.pop();if(A!==P){O[0]=A;e:for(var V=0,U=O.length,oe=U>>>1;V<oe;){var G=2*(V+1)-1,ne=O[G],Z=G+1,ce=O[Z];if(0>a(ne,A))Z<U&&0>a(ce,ne)?(O[V]=ce,O[Z]=A,V=Z):(O[V]=ne,O[G]=A,V=G);else if(Z<U&&0>a(ce,A))O[V]=ce,O[Z]=A,V=Z;else break e}}return P}function a(O,P){var A=O.sortIndex-P.sortIndex;return A!==0?A:O.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],d=[],c=1,u=null,f=3,p=!1,h=!1,k=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(O){for(var P=t(d);P!==null;){if(P.callback===null)i(d);else if(P.startTime<=O)i(d),P.sortIndex=P.expirationTime,n(s,P);else break;P=t(d)}}function x(O){if(k=!1,N(O),!h)if(t(s)!==null)h=!0,L(F);else{var P=t(d);P!==null&&B(x,P.startTime-O)}}function F(O,P){h=!1,k&&(k=!1,g(C),C=-1),p=!0;var A=f;try{for(N(P),u=t(s);u!==null&&(!(u.expirationTime>P)||O&&!j());){var V=u.callback;if(typeof V=="function"){u.callback=null,f=u.priorityLevel;var U=V(u.expirationTime<=P);P=e.unstable_now(),typeof U=="function"?u.callback=U:u===t(s)&&i(s),N(P)}else i(s);u=t(s)}if(u!==null)var oe=!0;else{var G=t(d);G!==null&&B(x,G.startTime-P),oe=!1}return oe}finally{u=null,f=A,p=!1}}var _=!1,w=null,C=-1,$=5,E=-1;function j(){return!(e.unstable_now()-E<$)}function D(){if(w!==null){var O=e.unstable_now();E=O;var P=!0;try{P=w(!0,O)}finally{P?M():(_=!1,w=null)}}else _=!1}var M;if(typeof v=="function")M=function(){v(D)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,I=R.port2;R.port1.onmessage=D,M=function(){I.postMessage(null)}}else M=function(){y(D,0)};function L(O){w=O,_||(_=!0,M())}function B(O,P){C=y(function(){O(e.unstable_now())},P)}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(O){O.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,L(F))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return t(s)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var A=f;f=P;try{return O()}finally{f=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,P){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var A=f;f=O;try{return P()}finally{f=A}},e.unstable_scheduleCallback=function(O,P,A){var V=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?V+A:V):A=V,O){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=A+U,O={id:c++,callback:P,priorityLevel:O,startTime:A,expirationTime:U,sortIndex:-1},A>V?(O.sortIndex=A,n(d,O),t(s)===null&&O===t(d)&&(k?(g(C),C=-1):k=!0,B(x,A-V))):(O.sortIndex=U,n(s,O),h||p||(h=!0,L(F))),O},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(O){var P=f;return function(){var A=f;f=P;try{return O.apply(this,arguments)}finally{f=A}}}})(bR);NR.exports=bR;var XH=NR.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var xR=S,Ai=XH;function le(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var FR=new Set,Uu={};function ss(e,n){Od(e,n),Od(e+"Capture",n)}function Od(e,n){for(Uu[e]=n,e=0;e<n.length;e++)FR.add(n[e])}var Ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KN=Object.prototype.hasOwnProperty,QH=/^[: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]*$/,j1={},T1={};function ZH(e){return KN.call(T1,e)?!0:KN.call(j1,e)?!1:QH.test(e)?T1[e]=!0:(j1[e]=!0,!1)}function JH(e,n,t,i){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eU(e,n,t,i){if(n===null||typeof n>"u"||JH(e,n,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ni(e,n,t,i,a,r,o){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=r,this.removeEmptyString=o}var $t={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$t[e]=new ni(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];$t[n]=new ni(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$t[e]=new ni(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$t[e]=new ni(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){$t[e]=new ni(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$t[e]=new ni(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$t[e]=new ni(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$t[e]=new ni(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$t[e]=new ni(e,5,!1,e.toLowerCase(),null,!1,!1)});var OF=/[\-:]([a-z])/g;function DF(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 n=e.replace(OF,DF);$t[n]=new ni(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(OF,DF);$t[n]=new ni(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(OF,DF);$t[n]=new ni(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$t[e]=new ni(e,1,!1,e.toLowerCase(),null,!1,!1)});$t.xlinkHref=new ni("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$t[e]=new ni(e,1,!1,e.toLowerCase(),null,!0,!0)});function EF(e,n,t,i){var a=$t.hasOwnProperty(n)?$t[n]:null;(a!==null?a.type!==0:i||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(eU(n,t,a,i)&&(t=null),i||a===null?ZH(n)&&(t===null?e.removeAttribute(n):e.setAttribute(n,""+t)):a.mustUseProperty?e[a.propertyName]=t===null?a.type===3?!1:"":t:(n=a.attributeName,i=a.attributeNamespace,t===null?e.removeAttribute(n):(a=a.type,t=a===3||a===4&&t===!0?"":""+t,i?e.setAttributeNS(i,n,t):e.setAttribute(n,t))))}var Lr=xR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Sf=Symbol.for("react.element"),Hs=Symbol.for("react.portal"),Us=Symbol.for("react.fragment"),$F=Symbol.for("react.strict_mode"),XN=Symbol.for("react.profiler"),wR=Symbol.for("react.provider"),_R=Symbol.for("react.context"),IF=Symbol.for("react.forward_ref"),QN=Symbol.for("react.suspense"),ZN=Symbol.for("react.suspense_list"),jF=Symbol.for("react.memo"),oo=Symbol.for("react.lazy"),CR=Symbol.for("react.offscreen"),A1=Symbol.iterator;function Oc(e){return e===null||typeof e!="object"?null:(e=A1&&e[A1]||e["@@iterator"],typeof e=="function"?e:null)}var Rn=Object.assign,HS;function su(e){if(HS===void 0)try{throw Error()}catch(t){var n=t.stack.trim().match(/\n( *(at )?)/);HS=n&&n[1]||""}return`
`+HS+e}var US=!1;function YS(e,n){if(!e||US)return"";US=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(d){var i=d}Reflect.construct(e,[],n)}else{try{n.call()}catch(d){i=d}e.call(n.prototype)}else{try{throw Error()}catch(d){i=d}e()}}catch(d){if(d&&i&&typeof d.stack=="string"){for(var a=d.stack.split(`
`),r=i.stack.split(`
`),o=a.length-1,l=r.length-1;1<=o&&0<=l&&a[o]!==r[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==r[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==r[l]){var s=`
`+a[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=l);break}}}finally{US=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?su(e):""}function nU(e){switch(e.tag){case 5:return su(e.type);case 16:return su("Lazy");case 13:return su("Suspense");case 19:return su("SuspenseList");case 0:case 2:case 15:return e=YS(e.type,!1),e;case 11:return e=YS(e.type.render,!1),e;case 1:return e=YS(e.type,!0),e;default:return""}}function JN(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 Us:return"Fragment";case Hs:return"Portal";case XN:return"Profiler";case $F:return"StrictMode";case QN:return"Suspense";case ZN:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _R:return(e.displayName||"Context")+".Consumer";case wR:return(e._context.displayName||"Context")+".Provider";case IF:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jF:return n=e.displayName||null,n!==null?n:JN(e.type)||"Memo";case oo:n=e._payload,e=e._init;try{return JN(e(n))}catch{}}return null}function tU(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return JN(n);case 8:return n===$F?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Vo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function PR(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function iU(e){var n=PR(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var a=t.get,r=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return a.call(this)},set:function(o){i=""+o,r.call(this,o)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Nf(e){e._valueTracker||(e._valueTracker=iU(e))}function OR(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),i="";return e&&(i=PR(e)?e.checked?"true":"false":e.value),e=i,e!==t?(n.setValue(e),!0):!1}function Eh(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 eb(e,n){var t=n.checked;return Rn({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function R1(e,n){var t=n.defaultValue==null?"":n.defaultValue,i=n.checked!=null?n.checked:n.defaultChecked;t=Vo(n.value!=null?n.value:t),e._wrapperState={initialChecked:i,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function DR(e,n){n=n.checked,n!=null&&EF(e,"checked",n,!1)}function nb(e,n){DR(e,n);var t=Vo(n.value),i=n.type;if(t!=null)i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?tb(e,n.type,t):n.hasOwnProperty("defaultValue")&&tb(e,n.type,Vo(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function M1(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type;if(!(i!=="submit"&&i!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function tb(e,n,t){(n!=="number"||Eh(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var du=Array.isArray;function rd(e,n,t,i){if(e=e.options,n){n={};for(var a=0;a<t.length;a++)n["$"+t[a]]=!0;for(t=0;t<e.length;t++)a=n.hasOwnProperty("$"+e[t].value),e[t].selected!==a&&(e[t].selected=a),a&&i&&(e[t].defaultSelected=!0)}else{for(t=""+Vo(t),n=null,a=0;a<e.length;a++){if(e[a].value===t){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}n!==null||e[a].disabled||(n=e[a])}n!==null&&(n.selected=!0)}}function ib(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(le(91));return Rn({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function L1(e,n){var t=n.value;if(t==null){if(t=n.children,n=n.defaultValue,t!=null){if(n!=null)throw Error(le(92));if(du(t)){if(1<t.length)throw Error(le(93));t=t[0]}n=t}n==null&&(n=""),t=n}e._wrapperState={initialValue:Vo(t)}}function ER(e,n){var t=Vo(n.value),i=Vo(n.defaultValue);t!=null&&(t=""+t,t!==e.value&&(e.value=t),n.defaultValue==null&&e.defaultValue!==t&&(e.defaultValue=t)),i!=null&&(e.defaultValue=""+i)}function z1(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function $R(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 ab(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?$R(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bf,IR=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,t,i,a){MSApp.execUnsafeLocalFunction(function(){return e(n,t,i,a)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(bf=bf||document.createElement("div"),bf.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=bf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Yu(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var yu={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},aU=["Webkit","ms","Moz","O"];Object.keys(yu).forEach(function(e){aU.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),yu[n]=yu[e]})});function jR(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||yu.hasOwnProperty(e)&&yu[e]?(""+n).trim():n+"px"}function TR(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var i=t.indexOf("--")===0,a=jR(t,n[t],i);t==="float"&&(t="cssFloat"),i?e.setProperty(t,a):e[t]=a}}var rU=Rn({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 rb(e,n){if(n){if(rU[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(le(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(le(61))}if(n.style!=null&&typeof n.style!="object")throw Error(le(62))}}function ob(e,n){if(e.indexOf("-")===-1)return typeof n.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 lb=null;function TF(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sb=null,od=null,ld=null;function B1(e){if(e=Vm(e)){if(typeof sb!="function")throw Error(le(280));var n=e.stateNode;n&&(n=Py(n),sb(e.stateNode,e.type,n))}}function AR(e){od?ld?ld.push(e):ld=[e]:od=e}function RR(){if(od){var e=od,n=ld;if(ld=od=null,B1(e),n)for(e=0;e<n.length;e++)B1(n[e])}}function MR(e,n){return e(n)}function LR(){}var GS=!1;function zR(e,n,t){if(GS)return e(n,t);GS=!0;try{return MR(e,n,t)}finally{GS=!1,(od!==null||ld!==null)&&(LR(),RR())}}function Gu(e,n){var t=e.stateNode;if(t===null)return null;var i=Py(t);if(i===null)return null;t=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(t&&typeof t!="function")throw Error(le(231,n,typeof t));return t}var db=!1;if(Ir)try{var Dc={};Object.defineProperty(Dc,"passive",{get:function(){db=!0}}),window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,Dc)}catch{db=!1}function oU(e,n,t,i,a,r,o,l,s){var d=Array.prototype.slice.call(arguments,3);try{n.apply(t,d)}catch(c){this.onError(c)}}var Su=!1,$h=null,Ih=!1,cb=null,lU={onError:function(e){Su=!0,$h=e}};function sU(e,n,t,i,a,r,o,l,s){Su=!1,$h=null,oU.apply(lU,arguments)}function dU(e,n,t,i,a,r,o,l,s){if(sU.apply(this,arguments),Su){if(Su){var d=$h;Su=!1,$h=null}else throw Error(le(198));Ih||(Ih=!0,cb=d)}}function ds(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(t=n.return),e=n.return;while(e)}return n.tag===3?t:null}function BR(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function V1(e){if(ds(e)!==e)throw Error(le(188))}function cU(e){var n=e.alternate;if(!n){if(n=ds(e),n===null)throw Error(le(188));return n!==e?null:e}for(var t=e,i=n;;){var a=t.return;if(a===null)break;var r=a.alternate;if(r===null){if(i=a.return,i!==null){t=i;continue}break}if(a.child===r.child){for(r=a.child;r;){if(r===t)return V1(a),e;if(r===i)return V1(a),n;r=r.sibling}throw Error(le(188))}if(t.return!==i.return)t=a,i=r;else{for(var o=!1,l=a.child;l;){if(l===t){o=!0,t=a,i=r;break}if(l===i){o=!0,i=a,t=r;break}l=l.sibling}if(!o){for(l=r.child;l;){if(l===t){o=!0,t=r,i=a;break}if(l===i){o=!0,i=r,t=a;break}l=l.sibling}if(!o)throw Error(le(189))}}if(t.alternate!==i)throw Error(le(190))}if(t.tag!==3)throw Error(le(188));return t.stateNode.current===t?e:n}function VR(e){return e=cU(e),e!==null?WR(e):null}function WR(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=WR(e);if(n!==null)return n;e=e.sibling}return null}var HR=Ai.unstable_scheduleCallback,W1=Ai.unstable_cancelCallback,uU=Ai.unstable_shouldYield,mU=Ai.unstable_requestPaint,Yn=Ai.unstable_now,fU=Ai.unstable_getCurrentPriorityLevel,AF=Ai.unstable_ImmediatePriority,UR=Ai.unstable_UserBlockingPriority,jh=Ai.unstable_NormalPriority,pU=Ai.unstable_LowPriority,YR=Ai.unstable_IdlePriority,Fy=null,tr=null;function hU(e){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(Fy,e,void 0,(e.current.flags&128)===128)}catch{}}var ba=Math.clz32?Math.clz32:gU,vU=Math.log,kU=Math.LN2;function gU(e){return e>>>=0,e===0?32:31-(vU(e)/kU|0)|0}var xf=64,Ff=4194304;function cu(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 Th(e,n){var t=e.pendingLanes;if(t===0)return 0;var i=0,a=e.suspendedLanes,r=e.pingedLanes,o=t&268435455;if(o!==0){var l=o&~a;l!==0?i=cu(l):(r&=o,r!==0&&(i=cu(r)))}else o=t&~a,o!==0?i=cu(o):r!==0&&(i=cu(r));if(i===0)return 0;if(n!==0&&n!==i&&!(n&a)&&(a=i&-i,r=n&-n,a>=r||a===16&&(r&4194240)!==0))return n;if(i&4&&(i|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=i;0<n;)t=31-ba(n),a=1<<t,i|=e[t],n&=~a;return i}function yU(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 SU(e,n){for(var t=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,r=e.pendingLanes;0<r;){var o=31-ba(r),l=1<<o,s=a[o];s===-1?(!(l&t)||l&i)&&(a[o]=yU(l,n)):s<=n&&(e.expiredLanes|=l),r&=~l}}function ub(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function GR(){var e=xf;return xf<<=1,!(xf&4194240)&&(xf=64),e}function qS(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function zm(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-ba(n),e[n]=t}function NU(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<t;){var a=31-ba(t),r=1<<a;n[a]=0,i[a]=-1,e[a]=-1,t&=~r}}function RF(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var i=31-ba(t),a=1<<i;a&n|e[i]&n&&(e[i]|=n),t&=~a}}var ln=0;function qR(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var KR,MF,XR,QR,ZR,mb=!1,wf=[],Do=null,Eo=null,$o=null,qu=new Map,Ku=new Map,uo=[],bU="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 H1(e,n){switch(e){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":Eo=null;break;case"mouseover":case"mouseout":$o=null;break;case"pointerover":case"pointerout":qu.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ku.delete(n.pointerId)}}function Ec(e,n,t,i,a,r){return e===null||e.nativeEvent!==r?(e={blockedOn:n,domEventName:t,eventSystemFlags:i,nativeEvent:r,targetContainers:[a]},n!==null&&(n=Vm(n),n!==null&&MF(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,a!==null&&n.indexOf(a)===-1&&n.push(a),e)}function xU(e,n,t,i,a){switch(n){case"focusin":return Do=Ec(Do,e,n,t,i,a),!0;case"dragenter":return Eo=Ec(Eo,e,n,t,i,a),!0;case"mouseover":return $o=Ec($o,e,n,t,i,a),!0;case"pointerover":var r=a.pointerId;return qu.set(r,Ec(qu.get(r)||null,e,n,t,i,a)),!0;case"gotpointercapture":return r=a.pointerId,Ku.set(r,Ec(Ku.get(r)||null,e,n,t,i,a)),!0}return!1}function JR(e){var n=El(e.target);if(n!==null){var t=ds(n);if(t!==null){if(n=t.tag,n===13){if(n=BR(t),n!==null){e.blockedOn=n,ZR(e.priority,function(){XR(t)});return}}else if(n===3&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bp(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var t=fb(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(t===null){t=e.nativeEvent;var i=new t.constructor(t.type,t);lb=i,t.target.dispatchEvent(i),lb=null}else return n=Vm(t),n!==null&&MF(n),e.blockedOn=t,!1;n.shift()}return!0}function U1(e,n,t){Bp(e)&&t.delete(n)}function FU(){mb=!1,Do!==null&&Bp(Do)&&(Do=null),Eo!==null&&Bp(Eo)&&(Eo=null),$o!==null&&Bp($o)&&($o=null),qu.forEach(U1),Ku.forEach(U1)}function $c(e,n){e.blockedOn===n&&(e.blockedOn=null,mb||(mb=!0,Ai.unstable_scheduleCallback(Ai.unstable_NormalPriority,FU)))}function Xu(e){function n(a){return $c(a,e)}if(0<wf.length){$c(wf[0],e);for(var t=1;t<wf.length;t++){var i=wf[t];i.blockedOn===e&&(i.blockedOn=null)}}for(Do!==null&&$c(Do,e),Eo!==null&&$c(Eo,e),$o!==null&&$c($o,e),qu.forEach(n),Ku.forEach(n),t=0;t<uo.length;t++)i=uo[t],i.blockedOn===e&&(i.blockedOn=null);for(;0<uo.length&&(t=uo[0],t.blockedOn===null);)JR(t),t.blockedOn===null&&uo.shift()}var sd=Lr.ReactCurrentBatchConfig,Ah=!0;function wU(e,n,t,i){var a=ln,r=sd.transition;sd.transition=null;try{ln=1,LF(e,n,t,i)}finally{ln=a,sd.transition=r}}function _U(e,n,t,i){var a=ln,r=sd.transition;sd.transition=null;try{ln=4,LF(e,n,t,i)}finally{ln=a,sd.transition=r}}function LF(e,n,t,i){if(Ah){var a=fb(e,n,t,i);if(a===null)a0(e,n,i,Rh,t),H1(e,i);else if(xU(a,e,n,t,i))i.stopPropagation();else if(H1(e,i),n&4&&-1<bU.indexOf(e)){for(;a!==null;){var r=Vm(a);if(r!==null&&KR(r),r=fb(e,n,t,i),r===null&&a0(e,n,i,Rh,t),r===a)break;a=r}a!==null&&i.stopPropagation()}else a0(e,n,i,null,t)}}var Rh=null;function fb(e,n,t,i){if(Rh=null,e=TF(i),e=El(e),e!==null)if(n=ds(e),n===null)e=null;else if(t=n.tag,t===13){if(e=BR(n),e!==null)return e;e=null}else if(t===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Rh=e,null}function eM(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(fU()){case AF:return 1;case UR:return 4;case jh:case pU:return 16;case YR:return 536870912;default:return 16}default:return 16}}var yo=null,zF=null,Vp=null;function nM(){if(Vp)return Vp;var e,n=zF,t=n.length,i,a="value"in yo?yo.value:yo.textContent,r=a.length;for(e=0;e<t&&n[e]===a[e];e++);var o=t-e;for(i=1;i<=o&&n[t-i]===a[r-i];i++);return Vp=a.slice(e,1<i?1-i:void 0)}function Wp(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function _f(){return!0}function Y1(){return!1}function zi(e){function n(t,i,a,r,o){this._reactName=t,this._targetInst=a,this.type=i,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(t=e[l],this[l]=t?t(r):r[l]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?_f:Y1,this.isPropagationStopped=Y1,this}return Rn(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=_f)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=_f)},persist:function(){},isPersistent:_f}),n}var ec={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},BF=zi(ec),Bm=Rn({},ec,{view:0,detail:0}),CU=zi(Bm),KS,XS,Ic,wy=Rn({},Bm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:VF,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!==Ic&&(Ic&&e.type==="mousemove"?(KS=e.screenX-Ic.screenX,XS=e.screenY-Ic.screenY):XS=KS=0,Ic=e),KS)},movementY:function(e){return"movementY"in e?e.movementY:XS}}),G1=zi(wy),PU=Rn({},wy,{dataTransfer:0}),OU=zi(PU),DU=Rn({},Bm,{relatedTarget:0}),QS=zi(DU),EU=Rn({},ec,{animationName:0,elapsedTime:0,pseudoElement:0}),$U=zi(EU),IU=Rn({},ec,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jU=zi(IU),TU=Rn({},ec,{data:0}),q1=zi(TU),AU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RU={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"},MU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LU(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=MU[e])?!!n[e]:!1}function VF(){return LU}var zU=Rn({},Bm,{key:function(e){if(e.key){var n=AU[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Wp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?RU[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:VF,charCode:function(e){return e.type==="keypress"?Wp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),BU=zi(zU),VU=Rn({},wy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),K1=zi(VU),WU=Rn({},Bm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:VF}),HU=zi(WU),UU=Rn({},ec,{propertyName:0,elapsedTime:0,pseudoElement:0}),YU=zi(UU),GU=Rn({},wy,{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}),qU=zi(GU),KU=[9,13,27,32],WF=Ir&&"CompositionEvent"in window,Nu=null;Ir&&"documentMode"in document&&(Nu=document.documentMode);var XU=Ir&&"TextEvent"in window&&!Nu,tM=Ir&&(!WF||Nu&&8<Nu&&11>=Nu),X1=" ",Q1=!1;function iM(e,n){switch(e){case"keyup":return KU.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ys=!1;function QU(e,n){switch(e){case"compositionend":return aM(n);case"keypress":return n.which!==32?null:(Q1=!0,X1);case"textInput":return e=n.data,e===X1&&Q1?null:e;default:return null}}function ZU(e,n){if(Ys)return e==="compositionend"||!WF&&iM(e,n)?(e=nM(),Vp=zF=yo=null,Ys=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return tM&&n.locale!=="ko"?null:n.data;default:return null}}var JU={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 Z1(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!JU[e.type]:n==="textarea"}function rM(e,n,t,i){AR(i),n=Mh(n,"onChange"),0<n.length&&(t=new BF("onChange","change",null,t,i),e.push({event:t,listeners:n}))}var bu=null,Qu=null;function eY(e){vM(e,0)}function _y(e){var n=Ks(e);if(OR(n))return e}function nY(e,n){if(e==="change")return n}var oM=!1;if(Ir){var ZS;if(Ir){var JS="oninput"in document;if(!JS){var J1=document.createElement("div");J1.setAttribute("oninput","return;"),JS=typeof J1.oninput=="function"}ZS=JS}else ZS=!1;oM=ZS&&(!document.documentMode||9<document.documentMode)}function eC(){bu&&(bu.detachEvent("onpropertychange",lM),Qu=bu=null)}function lM(e){if(e.propertyName==="value"&&_y(Qu)){var n=[];rM(n,Qu,e,TF(e)),zR(eY,n)}}function tY(e,n,t){e==="focusin"?(eC(),bu=n,Qu=t,bu.attachEvent("onpropertychange",lM)):e==="focusout"&&eC()}function iY(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _y(Qu)}function aY(e,n){if(e==="click")return _y(n)}function rY(e,n){if(e==="input"||e==="change")return _y(n)}function oY(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Oa=typeof Object.is=="function"?Object.is:oY;function Zu(e,n){if(Oa(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(i=0;i<t.length;i++){var a=t[i];if(!KN.call(n,a)||!Oa(e[a],n[a]))return!1}return!0}function nC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tC(e,n){var t=nC(e);e=0;for(var i;t;){if(t.nodeType===3){if(i=e+t.textContent.length,e<=n&&i>=n)return{node:t,offset:n-e};e=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=nC(t)}}function sM(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?sM(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function dM(){for(var e=window,n=Eh();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Eh(e.document)}return n}function HF(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function lY(e){var n=dM(),t=e.focusedElem,i=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&sM(t.ownerDocument.documentElement,t)){if(i!==null&&HF(t)){if(n=i.start,e=i.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var a=t.textContent.length,r=Math.min(i.start,a);i=i.end===void 0?r:Math.min(i.end,a),!e.extend&&r>i&&(a=i,i=r,r=a),a=tC(t,r);var o=tC(t,i);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(n=n.createRange(),n.setStart(a.node,a.offset),e.removeAllRanges(),r>i?(e.addRange(n),e.extend(o.node,o.offset)):(n.setEnd(o.node,o.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<n.length;t++)e=n[t],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sY=Ir&&"documentMode"in document&&11>=document.documentMode,Gs=null,pb=null,xu=null,hb=!1;function iC(e,n,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;hb||Gs==null||Gs!==Eh(i)||(i=Gs,"selectionStart"in i&&HF(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),xu&&Zu(xu,i)||(xu=i,i=Mh(pb,"onSelect"),0<i.length&&(n=new BF("onSelect","select",null,n,t),e.push({event:n,listeners:i}),n.target=Gs)))}function Cf(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var qs={animationend:Cf("Animation","AnimationEnd"),animationiteration:Cf("Animation","AnimationIteration"),animationstart:Cf("Animation","AnimationStart"),transitionend:Cf("Transition","TransitionEnd")},e0={},cM={};Ir&&(cM=document.createElement("div").style,"AnimationEvent"in window||(delete qs.animationend.animation,delete qs.animationiteration.animation,delete qs.animationstart.animation),"TransitionEvent"in window||delete qs.transitionend.transition);function Cy(e){if(e0[e])return e0[e];if(!qs[e])return e;var n=qs[e],t;for(t in n)if(n.hasOwnProperty(t)&&t in cM)return e0[e]=n[t];return e}var uM=Cy("animationend"),mM=Cy("animationiteration"),fM=Cy("animationstart"),pM=Cy("transitionend"),hM=new Map,aC="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 Xo(e,n){hM.set(e,n),ss(n,[e])}for(var n0=0;n0<aC.length;n0++){var t0=aC[n0],dY=t0.toLowerCase(),cY=t0[0].toUpperCase()+t0.slice(1);Xo(dY,"on"+cY)}Xo(uM,"onAnimationEnd");Xo(mM,"onAnimationIteration");Xo(fM,"onAnimationStart");Xo("dblclick","onDoubleClick");Xo("focusin","onFocus");Xo("focusout","onBlur");Xo(pM,"onTransitionEnd");Od("onMouseEnter",["mouseout","mouseover"]);Od("onMouseLeave",["mouseout","mouseover"]);Od("onPointerEnter",["pointerout","pointerover"]);Od("onPointerLeave",["pointerout","pointerover"]);ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="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(" "),uY=new Set("cancel close invalid load scroll toggle".split(" ").concat(uu));function rC(e,n,t){var i=e.type||"unknown-event";e.currentTarget=t,dU(i,n,void 0,e),e.currentTarget=null}function vM(e,n){n=(n&4)!==0;for(var t=0;t<e.length;t++){var i=e[t],a=i.event;i=i.listeners;e:{var r=void 0;if(n)for(var o=i.length-1;0<=o;o--){var l=i[o],s=l.instance,d=l.currentTarget;if(l=l.listener,s!==r&&a.isPropagationStopped())break e;rC(a,l,d),r=s}else for(o=0;o<i.length;o++){if(l=i[o],s=l.instance,d=l.currentTarget,l=l.listener,s!==r&&a.isPropagationStopped())break e;rC(a,l,d),r=s}}}if(Ih)throw e=cb,Ih=!1,cb=null,e}function xn(e,n){var t=n[Sb];t===void 0&&(t=n[Sb]=new Set);var i=e+"__bubble";t.has(i)||(kM(n,e,2,!1),t.add(i))}function i0(e,n,t){var i=0;n&&(i|=4),kM(t,e,i,n)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[Pf]){e[Pf]=!0,FR.forEach(function(t){t!=="selectionchange"&&(uY.has(t)||i0(t,!1,e),i0(t,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Pf]||(n[Pf]=!0,i0("selectionchange",!1,n))}}function kM(e,n,t,i){switch(eM(n)){case 1:var a=wU;break;case 4:a=_U;break;default:a=LF}t=a.bind(null,n,t,e),a=void 0,!db||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(n,t,{capture:!0,passive:a}):e.addEventListener(n,t,!0):a!==void 0?e.addEventListener(n,t,{passive:a}):e.addEventListener(n,t,!1)}function a0(e,n,t,i,a){var r=i;if(!(n&1)&&!(n&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var l=i.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=i.return;o!==null;){var s=o.tag;if((s===3||s===4)&&(s=o.stateNode.containerInfo,s===a||s.nodeType===8&&s.parentNode===a))return;o=o.return}for(;l!==null;){if(o=El(l),o===null)return;if(s=o.tag,s===5||s===6){i=r=o;continue e}l=l.parentNode}}i=i.return}zR(function(){var d=r,c=TF(t),u=[];e:{var f=hM.get(e);if(f!==void 0){var p=BF,h=e;switch(e){case"keypress":if(Wp(t)===0)break e;case"keydown":case"keyup":p=BU;break;case"focusin":h="focus",p=QS;break;case"focusout":h="blur",p=QS;break;case"beforeblur":case"afterblur":p=QS;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=G1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=OU;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=HU;break;case uM:case mM:case fM:p=$U;break;case pM:p=YU;break;case"scroll":p=CU;break;case"wheel":p=qU;break;case"copy":case"cut":case"paste":p=jU;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=K1}var k=(n&4)!==0,y=!k&&e==="scroll",g=k?f!==null?f+"Capture":null:f;k=[];for(var v=d,N;v!==null;){N=v;var x=N.stateNode;if(N.tag===5&&x!==null&&(N=x,g!==null&&(x=Gu(v,g),x!=null&&k.push(em(v,x,N)))),y)break;v=v.return}0<k.length&&(f=new p(f,h,null,t,c),u.push({event:f,listeners:k}))}}if(!(n&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&t!==lb&&(h=t.relatedTarget||t.fromElement)&&(El(h)||h[jr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=t.relatedTarget||t.toElement,p=d,h=h?El(h):null,h!==null&&(y=ds(h),h!==y||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=d),p!==h)){if(k=G1,x="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(k=K1,x="onPointerLeave",g="onPointerEnter",v="pointer"),y=p==null?f:Ks(p),N=h==null?f:Ks(h),f=new k(x,v+"leave",p,t,c),f.target=y,f.relatedTarget=N,x=null,El(c)===d&&(k=new k(g,v+"enter",h,t,c),k.target=N,k.relatedTarget=y,x=k),y=x,p&&h)n:{for(k=p,g=h,v=0,N=k;N;N=_s(N))v++;for(N=0,x=g;x;x=_s(x))N++;for(;0<v-N;)k=_s(k),v--;for(;0<N-v;)g=_s(g),N--;for(;v--;){if(k===g||g!==null&&k===g.alternate)break n;k=_s(k),g=_s(g)}k=null}else k=null;p!==null&&oC(u,f,p,k,!1),h!==null&&y!==null&&oC(u,y,h,k,!0)}}e:{if(f=d?Ks(d):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var F=nY;else if(Z1(f))if(oM)F=rY;else{F=iY;var _=tY}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(F=aY);if(F&&(F=F(e,d))){rM(u,F,t,c);break e}_&&_(e,f,d),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&tb(f,"number",f.value)}switch(_=d?Ks(d):window,e){case"focusin":(Z1(_)||_.contentEditable==="true")&&(Gs=_,pb=d,xu=null);break;case"focusout":xu=pb=Gs=null;break;case"mousedown":hb=!0;break;case"contextmenu":case"mouseup":case"dragend":hb=!1,iC(u,t,c);break;case"selectionchange":if(sY)break;case"keydown":case"keyup":iC(u,t,c)}var w;if(WF)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ys?iM(e,t)&&(C="onCompositionEnd"):e==="keydown"&&t.keyCode===229&&(C="onCompositionStart");C&&(tM&&t.locale!=="ko"&&(Ys||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ys&&(w=nM()):(yo=c,zF="value"in yo?yo.value:yo.textContent,Ys=!0)),_=Mh(d,C),0<_.length&&(C=new q1(C,e,null,t,c),u.push({event:C,listeners:_}),w?C.data=w:(w=aM(t),w!==null&&(C.data=w)))),(w=XU?QU(e,t):ZU(e,t))&&(d=Mh(d,"onBeforeInput"),0<d.length&&(c=new q1("onBeforeInput","beforeinput",null,t,c),u.push({event:c,listeners:d}),c.data=w))}vM(u,n)})}function em(e,n,t){return{instance:e,listener:n,currentTarget:t}}function Mh(e,n){for(var t=n+"Capture",i=[];e!==null;){var a=e,r=a.stateNode;a.tag===5&&r!==null&&(a=r,r=Gu(e,t),r!=null&&i.unshift(em(e,r,a)),r=Gu(e,n),r!=null&&i.push(em(e,r,a))),e=e.return}return i}function _s(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oC(e,n,t,i,a){for(var r=n._reactName,o=[];t!==null&&t!==i;){var l=t,s=l.alternate,d=l.stateNode;if(s!==null&&s===i)break;l.tag===5&&d!==null&&(l=d,a?(s=Gu(t,r),s!=null&&o.unshift(em(t,s,l))):a||(s=Gu(t,r),s!=null&&o.push(em(t,s,l)))),t=t.return}o.length!==0&&e.push({event:n,listeners:o})}var mY=/\r\n?/g,fY=/\u0000|\uFFFD/g;function lC(e){return(typeof e=="string"?e:""+e).replace(mY,`
`).replace(fY,"")}function Of(e,n,t){if(n=lC(n),lC(e)!==n&&t)throw Error(le(425))}function Lh(){}var vb=null,kb=null;function gb(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var yb=typeof setTimeout=="function"?setTimeout:void 0,pY=typeof clearTimeout=="function"?clearTimeout:void 0,sC=typeof Promise=="function"?Promise:void 0,hY=typeof queueMicrotask=="function"?queueMicrotask:typeof sC<"u"?function(e){return sC.resolve(null).then(e).catch(vY)}:yb;function vY(e){setTimeout(function(){throw e})}function r0(e,n){var t=n,i=0;do{var a=t.nextSibling;if(e.removeChild(t),a&&a.nodeType===8)if(t=a.data,t==="/$"){if(i===0){e.removeChild(a),Xu(n);return}i--}else t!=="$"&&t!=="$?"&&t!=="$!"||i++;t=a}while(t);Xu(n)}function Io(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function dC(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var t=e.data;if(t==="$"||t==="$!"||t==="$?"){if(n===0)return e;n--}else t==="/$"&&n++}e=e.previousSibling}return null}var nc=Math.random().toString(36).slice(2),Za="__reactFiber$"+nc,nm="__reactProps$"+nc,jr="__reactContainer$"+nc,Sb="__reactEvents$"+nc,kY="__reactListeners$"+nc,gY="__reactHandles$"+nc;function El(e){var n=e[Za];if(n)return n;for(var t=e.parentNode;t;){if(n=t[jr]||t[Za]){if(t=n.alternate,n.child!==null||t!==null&&t.child!==null)for(e=dC(e);e!==null;){if(t=e[Za])return t;e=dC(e)}return n}e=t,t=e.parentNode}return null}function Vm(e){return e=e[Za]||e[jr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ks(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(le(33))}function Py(e){return e[nm]||null}var Nb=[],Xs=-1;function Qo(e){return{current:e}}function _n(e){0>Xs||(e.current=Nb[Xs],Nb[Xs]=null,Xs--)}function Sn(e,n){Xs++,Nb[Xs]=e.current,e.current=n}var Wo={},Ut=Qo(Wo),ci=Qo(!1),Xl=Wo;function Dd(e,n){var t=e.type.contextTypes;if(!t)return Wo;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var a={},r;for(r in t)a[r]=n[r];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),a}function ui(e){return e=e.childContextTypes,e!=null}function zh(){_n(ci),_n(Ut)}function cC(e,n,t){if(Ut.current!==Wo)throw Error(le(168));Sn(Ut,n),Sn(ci,t)}function gM(e,n,t){var i=e.stateNode;if(n=n.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var a in i)if(!(a in n))throw Error(le(108,tU(e)||"Unknown",a));return Rn({},t,i)}function Bh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wo,Xl=Ut.current,Sn(Ut,e),Sn(ci,ci.current),!0}function uC(e,n,t){var i=e.stateNode;if(!i)throw Error(le(169));t?(e=gM(e,n,Xl),i.__reactInternalMemoizedMergedChildContext=e,_n(ci),_n(Ut),Sn(Ut,e)):_n(ci),Sn(ci,t)}var Sr=null,Oy=!1,o0=!1;function yM(e){Sr===null?Sr=[e]:Sr.push(e)}function yY(e){Oy=!0,yM(e)}function Zo(){if(!o0&&Sr!==null){o0=!0;var e=0,n=ln;try{var t=Sr;for(ln=1;e<t.length;e++){var i=t[e];do i=i(!0);while(i!==null)}Sr=null,Oy=!1}catch(a){throw Sr!==null&&(Sr=Sr.slice(e+1)),HR(AF,Zo),a}finally{ln=n,o0=!1}}return null}var Qs=[],Zs=0,Vh=null,Wh=0,Xi=[],Qi=0,Ql=null,Fr=1,wr="";function bl(e,n){Qs[Zs++]=Wh,Qs[Zs++]=Vh,Vh=e,Wh=n}function SM(e,n,t){Xi[Qi++]=Fr,Xi[Qi++]=wr,Xi[Qi++]=Ql,Ql=e;var i=Fr;e=wr;var a=32-ba(i)-1;i&=~(1<<a),t+=1;var r=32-ba(n)+a;if(30<r){var o=a-a%5;r=(i&(1<<o)-1).toString(32),i>>=o,a-=o,Fr=1<<32-ba(n)+a|t<<a|i,wr=r+e}else Fr=1<<r|t<<a|i,wr=e}function UF(e){e.return!==null&&(bl(e,1),SM(e,1,0))}function YF(e){for(;e===Vh;)Vh=Qs[--Zs],Qs[Zs]=null,Wh=Qs[--Zs],Qs[Zs]=null;for(;e===Ql;)Ql=Xi[--Qi],Xi[Qi]=null,wr=Xi[--Qi],Xi[Qi]=null,Fr=Xi[--Qi],Xi[Qi]=null}var $i=null,Pi=null,Dn=!1,ga=null;function NM(e,n){var t=Ji(5,null,null,0);t.elementType="DELETED",t.stateNode=n,t.return=e,n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)}function mC(e,n){switch(e.tag){case 5:var t=e.type;return n=n.nodeType!==1||t.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,$i=e,Pi=Io(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,$i=e,Pi=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(t=Ql!==null?{id:Fr,overflow:wr}:null,e.memoizedState={dehydrated:n,treeContext:t,retryLane:1073741824},t=Ji(18,null,null,0),t.stateNode=n,t.return=e,e.child=t,$i=e,Pi=null,!0):!1;default:return!1}}function bb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xb(e){if(Dn){var n=Pi;if(n){var t=n;if(!mC(e,n)){if(bb(e))throw Error(le(418));n=Io(t.nextSibling);var i=$i;n&&mC(e,n)?NM(i,t):(e.flags=e.flags&-4097|2,Dn=!1,$i=e)}}else{if(bb(e))throw Error(le(418));e.flags=e.flags&-4097|2,Dn=!1,$i=e}}}function fC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$i=e}function Df(e){if(e!==$i)return!1;if(!Dn)return fC(e),Dn=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!gb(e.type,e.memoizedProps)),n&&(n=Pi)){if(bb(e))throw bM(),Error(le(418));for(;n;)NM(e,n),n=Io(n.nextSibling)}if(fC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(le(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var t=e.data;if(t==="/$"){if(n===0){Pi=Io(e.nextSibling);break e}n--}else t!=="$"&&t!=="$!"&&t!=="$?"||n++}e=e.nextSibling}Pi=null}}else Pi=$i?Io(e.stateNode.nextSibling):null;return!0}function bM(){for(var e=Pi;e;)e=Io(e.nextSibling)}function Ed(){Pi=$i=null,Dn=!1}function GF(e){ga===null?ga=[e]:ga.push(e)}var SY=Lr.ReactCurrentBatchConfig;function pa(e,n){if(e&&e.defaultProps){n=Rn({},n),e=e.defaultProps;for(var t in e)n[t]===void 0&&(n[t]=e[t]);return n}return n}var Hh=Qo(null),Uh=null,Js=null,qF=null;function KF(){qF=Js=Uh=null}function XF(e){var n=Hh.current;_n(Hh),e._currentValue=n}function Fb(e,n,t){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===t)break;e=e.return}}function dd(e,n){Uh=e,qF=Js=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(si=!0),e.firstContext=null)}function na(e){var n=e._currentValue;if(qF!==e)if(e={context:e,memoizedValue:n,next:null},Js===null){if(Uh===null)throw Error(le(308));Js=e,Uh.dependencies={lanes:0,firstContext:e}}else Js=Js.next=e;return n}var $l=null;function QF(e){$l===null?$l=[e]:$l.push(e)}function xM(e,n,t,i){var a=n.interleaved;return a===null?(t.next=t,QF(n)):(t.next=a.next,a.next=t),n.interleaved=t,Tr(e,i)}function Tr(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var lo=!1;function ZF(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FM(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Dr(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function jo(e,n,t){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,Ze&2){var a=i.pending;return a===null?n.next=n:(n.next=a.next,a.next=n),i.pending=n,Tr(e,t)}return a=i.interleaved,a===null?(n.next=n,QF(i)):(n.next=a.next,a.next=n),i.interleaved=n,Tr(e,t)}function Hp(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var i=n.lanes;i&=e.pendingLanes,t|=i,n.lanes=t,RF(e,t)}}function pC(e,n){var t=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,t===i)){var a=null,r=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};r===null?a=r=o:r=r.next=o,t=t.next}while(t!==null);r===null?a=r=n:r=r.next=n}else a=r=n;t={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:r,shared:i.shared,effects:i.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Yh(e,n,t,i){var a=e.updateQueue;lo=!1;var r=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var s=l,d=s.next;s.next=null,o===null?r=d:o.next=d,o=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=d:l.next=d,c.lastBaseUpdate=s))}if(r!==null){var u=a.baseState;o=0,c=d=s=null,l=r;do{var f=l.lane,p=l.eventTime;if((i&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,k=l;switch(f=n,p=t,k.tag){case 1:if(h=k.payload,typeof h=="function"){u=h.call(p,u,f);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=k.payload,f=typeof h=="function"?h.call(p,u,f):h,f==null)break e;u=Rn({},u,f);break e;case 2:lo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(d=c=p,s=u):c=c.next=p,o|=f;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;f=l,l=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(c===null&&(s=u),a.baseState=s,a.firstBaseUpdate=d,a.lastBaseUpdate=c,n=a.shared.interleaved,n!==null){a=n;do o|=a.lane,a=a.next;while(a!==n)}else r===null&&(a.shared.lanes=0);Jl|=o,e.lanes=o,e.memoizedState=u}}function hC(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var i=e[n],a=i.callback;if(a!==null){if(i.callback=null,i=t,typeof a!="function")throw Error(le(191,a));a.call(i)}}}var wM=new xR.Component().refs;function wb(e,n,t,i){n=e.memoizedState,t=t(i,n),t=t==null?n:Rn({},n,t),e.memoizedState=t,e.lanes===0&&(e.updateQueue.baseState=t)}var Dy={isMounted:function(e){return(e=e._reactInternals)?ds(e)===e:!1},enqueueSetState:function(e,n,t){e=e._reactInternals;var i=Zt(),a=Ao(e),r=Dr(i,a);r.payload=n,t!=null&&(r.callback=t),n=jo(e,r,a),n!==null&&(xa(n,e,a,i),Hp(n,e,a))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var i=Zt(),a=Ao(e),r=Dr(i,a);r.tag=1,r.payload=n,t!=null&&(r.callback=t),n=jo(e,r,a),n!==null&&(xa(n,e,a,i),Hp(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=Zt(),i=Ao(e),a=Dr(t,i);a.tag=2,n!=null&&(a.callback=n),n=jo(e,a,i),n!==null&&(xa(n,e,i,t),Hp(n,e,i))}};function vC(e,n,t,i,a,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,r,o):n.prototype&&n.prototype.isPureReactComponent?!Zu(t,i)||!Zu(a,r):!0}function _M(e,n,t){var i=!1,a=Wo,r=n.contextType;return typeof r=="object"&&r!==null?r=na(r):(a=ui(n)?Xl:Ut.current,i=n.contextTypes,r=(i=i!=null)?Dd(e,a):Wo),n=new n(t,r),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Dy,e.stateNode=n,n._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=r),n}function kC(e,n,t,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(t,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(t,i),n.state!==e&&Dy.enqueueReplaceState(n,n.state,null)}function _b(e,n,t,i){var a=e.stateNode;a.props=t,a.state=e.memoizedState,a.refs=wM,ZF(e);var r=n.contextType;typeof r=="object"&&r!==null?a.context=na(r):(r=ui(n)?Xl:Ut.current,a.context=Dd(e,r)),a.state=e.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(wb(e,n,r,t),a.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(n=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),n!==a.state&&Dy.enqueueReplaceState(a,a.state,null),Yh(e,t,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function jc(e,n,t){if(e=t.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(le(309));var i=t.stateNode}if(!i)throw Error(le(147,e));var a=i,r=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===r?n.ref:(n=function(o){var l=a.refs;l===wM&&(l=a.refs={}),o===null?delete l[r]:l[r]=o},n._stringRef=r,n)}if(typeof e!="string")throw Error(le(284));if(!t._owner)throw Error(le(290,e))}return e}function Ef(e,n){throw e=Object.prototype.toString.call(n),Error(le(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function gC(e){var n=e._init;return n(e._payload)}function CM(e){function n(g,v){if(e){var N=g.deletions;N===null?(g.deletions=[v],g.flags|=16):N.push(v)}}function t(g,v){if(!e)return null;for(;v!==null;)n(g,v),v=v.sibling;return null}function i(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function a(g,v){return g=Ro(g,v),g.index=0,g.sibling=null,g}function r(g,v,N){return g.index=N,e?(N=g.alternate,N!==null?(N=N.index,N<v?(g.flags|=2,v):N):(g.flags|=2,v)):(g.flags|=1048576,v)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,v,N,x){return v===null||v.tag!==6?(v=f0(N,g.mode,x),v.return=g,v):(v=a(v,N),v.return=g,v)}function s(g,v,N,x){var F=N.type;return F===Us?c(g,v,N.props.children,x,N.key):v!==null&&(v.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===oo&&gC(F)===v.type)?(x=a(v,N.props),x.ref=jc(g,v,N),x.return=g,x):(x=Xp(N.type,N.key,N.props,null,g.mode,x),x.ref=jc(g,v,N),x.return=g,x)}function d(g,v,N,x){return v===null||v.tag!==4||v.stateNode.containerInfo!==N.containerInfo||v.stateNode.implementation!==N.implementation?(v=p0(N,g.mode,x),v.return=g,v):(v=a(v,N.children||[]),v.return=g,v)}function c(g,v,N,x,F){return v===null||v.tag!==7?(v=Wl(N,g.mode,x,F),v.return=g,v):(v=a(v,N),v.return=g,v)}function u(g,v,N){if(typeof v=="string"&&v!==""||typeof v=="number")return v=f0(""+v,g.mode,N),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Sf:return N=Xp(v.type,v.key,v.props,null,g.mode,N),N.ref=jc(g,null,v),N.return=g,N;case Hs:return v=p0(v,g.mode,N),v.return=g,v;case oo:var x=v._init;return u(g,x(v._payload),N)}if(du(v)||Oc(v))return v=Wl(v,g.mode,N,null),v.return=g,v;Ef(g,v)}return null}function f(g,v,N,x){var F=v!==null?v.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return F!==null?null:l(g,v,""+N,x);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Sf:return N.key===F?s(g,v,N,x):null;case Hs:return N.key===F?d(g,v,N,x):null;case oo:return F=N._init,f(g,v,F(N._payload),x)}if(du(N)||Oc(N))return F!==null?null:c(g,v,N,x,null);Ef(g,N)}return null}function p(g,v,N,x,F){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(N)||null,l(v,g,""+x,F);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Sf:return g=g.get(x.key===null?N:x.key)||null,s(v,g,x,F);case Hs:return g=g.get(x.key===null?N:x.key)||null,d(v,g,x,F);case oo:var _=x._init;return p(g,v,N,_(x._payload),F)}if(du(x)||Oc(x))return g=g.get(N)||null,c(v,g,x,F,null);Ef(v,x)}return null}function h(g,v,N,x){for(var F=null,_=null,w=v,C=v=0,$=null;w!==null&&C<N.length;C++){w.index>C?($=w,w=null):$=w.sibling;var E=f(g,w,N[C],x);if(E===null){w===null&&(w=$);break}e&&w&&E.alternate===null&&n(g,w),v=r(E,v,C),_===null?F=E:_.sibling=E,_=E,w=$}if(C===N.length)return t(g,w),Dn&&bl(g,C),F;if(w===null){for(;C<N.length;C++)w=u(g,N[C],x),w!==null&&(v=r(w,v,C),_===null?F=w:_.sibling=w,_=w);return Dn&&bl(g,C),F}for(w=i(g,w);C<N.length;C++)$=p(w,g,C,N[C],x),$!==null&&(e&&$.alternate!==null&&w.delete($.key===null?C:$.key),v=r($,v,C),_===null?F=$:_.sibling=$,_=$);return e&&w.forEach(function(j){return n(g,j)}),Dn&&bl(g,C),F}function k(g,v,N,x){var F=Oc(N);if(typeof F!="function")throw Error(le(150));if(N=F.call(N),N==null)throw Error(le(151));for(var _=F=null,w=v,C=v=0,$=null,E=N.next();w!==null&&!E.done;C++,E=N.next()){w.index>C?($=w,w=null):$=w.sibling;var j=f(g,w,E.value,x);if(j===null){w===null&&(w=$);break}e&&w&&j.alternate===null&&n(g,w),v=r(j,v,C),_===null?F=j:_.sibling=j,_=j,w=$}if(E.done)return t(g,w),Dn&&bl(g,C),F;if(w===null){for(;!E.done;C++,E=N.next())E=u(g,E.value,x),E!==null&&(v=r(E,v,C),_===null?F=E:_.sibling=E,_=E);return Dn&&bl(g,C),F}for(w=i(g,w);!E.done;C++,E=N.next())E=p(w,g,C,E.value,x),E!==null&&(e&&E.alternate!==null&&w.delete(E.key===null?C:E.key),v=r(E,v,C),_===null?F=E:_.sibling=E,_=E);return e&&w.forEach(function(D){return n(g,D)}),Dn&&bl(g,C),F}function y(g,v,N,x){if(typeof N=="object"&&N!==null&&N.type===Us&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Sf:e:{for(var F=N.key,_=v;_!==null;){if(_.key===F){if(F=N.type,F===Us){if(_.tag===7){t(g,_.sibling),v=a(_,N.props.children),v.return=g,g=v;break e}}else if(_.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===oo&&gC(F)===_.type){t(g,_.sibling),v=a(_,N.props),v.ref=jc(g,_,N),v.return=g,g=v;break e}t(g,_);break}else n(g,_);_=_.sibling}N.type===Us?(v=Wl(N.props.children,g.mode,x,N.key),v.return=g,g=v):(x=Xp(N.type,N.key,N.props,null,g.mode,x),x.ref=jc(g,v,N),x.return=g,g=x)}return o(g);case Hs:e:{for(_=N.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===N.containerInfo&&v.stateNode.implementation===N.implementation){t(g,v.sibling),v=a(v,N.children||[]),v.return=g,g=v;break e}else{t(g,v);break}else n(g,v);v=v.sibling}v=p0(N,g.mode,x),v.return=g,g=v}return o(g);case oo:return _=N._init,y(g,v,_(N._payload),x)}if(du(N))return h(g,v,N,x);if(Oc(N))return k(g,v,N,x);Ef(g,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,v!==null&&v.tag===6?(t(g,v.sibling),v=a(v,N),v.return=g,g=v):(t(g,v),v=f0(N,g.mode,x),v.return=g,g=v),o(g)):t(g,v)}return y}var $d=CM(!0),PM=CM(!1),Wm={},ir=Qo(Wm),tm=Qo(Wm),im=Qo(Wm);function Il(e){if(e===Wm)throw Error(le(174));return e}function JF(e,n){switch(Sn(im,n),Sn(tm,e),Sn(ir,Wm),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ab(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ab(n,e)}_n(ir),Sn(ir,n)}function Id(){_n(ir),_n(tm),_n(im)}function OM(e){Il(im.current);var n=Il(ir.current),t=ab(n,e.type);n!==t&&(Sn(tm,e),Sn(ir,t))}function ew(e){tm.current===e&&(_n(ir),_n(tm))}var jn=Qo(0);function Gh(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var l0=[];function nw(){for(var e=0;e<l0.length;e++)l0[e]._workInProgressVersionPrimary=null;l0.length=0}var Up=Lr.ReactCurrentDispatcher,s0=Lr.ReactCurrentBatchConfig,Zl=0,An=null,mt=null,St=null,qh=!1,Fu=!1,am=0,NY=0;function Tt(){throw Error(le(321))}function tw(e,n){if(n===null)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!Oa(e[t],n[t]))return!1;return!0}function iw(e,n,t,i,a,r){if(Zl=r,An=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Up.current=e===null||e.memoizedState===null?wY:_Y,e=t(i,a),Fu){r=0;do{if(Fu=!1,am=0,25<=r)throw Error(le(301));r+=1,St=mt=null,n.updateQueue=null,Up.current=CY,e=t(i,a)}while(Fu)}if(Up.current=Kh,n=mt!==null&&mt.next!==null,Zl=0,St=mt=An=null,qh=!1,n)throw Error(le(300));return e}function aw(){var e=am!==0;return am=0,e}function Ha(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?An.memoizedState=St=e:St=St.next=e,St}function ta(){if(mt===null){var e=An.alternate;e=e!==null?e.memoizedState:null}else e=mt.next;var n=St===null?An.memoizedState:St.next;if(n!==null)St=n,mt=e;else{if(e===null)throw Error(le(310));mt=e,e={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},St===null?An.memoizedState=St=e:St=St.next=e}return St}function rm(e,n){return typeof n=="function"?n(e):n}function d0(e){var n=ta(),t=n.queue;if(t===null)throw Error(le(311));t.lastRenderedReducer=e;var i=mt,a=i.baseQueue,r=t.pending;if(r!==null){if(a!==null){var o=a.next;a.next=r.next,r.next=o}i.baseQueue=a=r,t.pending=null}if(a!==null){r=a.next,i=i.baseState;var l=o=null,s=null,d=r;do{var c=d.lane;if((Zl&c)===c)s!==null&&(s=s.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),i=d.hasEagerState?d.eagerState:e(i,d.action);else{var u={lane:c,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};s===null?(l=s=u,o=i):s=s.next=u,An.lanes|=c,Jl|=c}d=d.next}while(d!==null&&d!==r);s===null?o=i:s.next=l,Oa(i,n.memoizedState)||(si=!0),n.memoizedState=i,n.baseState=o,n.baseQueue=s,t.lastRenderedState=i}if(e=t.interleaved,e!==null){a=e;do r=a.lane,An.lanes|=r,Jl|=r,a=a.next;while(a!==e)}else a===null&&(t.lanes=0);return[n.memoizedState,t.dispatch]}function c0(e){var n=ta(),t=n.queue;if(t===null)throw Error(le(311));t.lastRenderedReducer=e;var i=t.dispatch,a=t.pending,r=n.memoizedState;if(a!==null){t.pending=null;var o=a=a.next;do r=e(r,o.action),o=o.next;while(o!==a);Oa(r,n.memoizedState)||(si=!0),n.memoizedState=r,n.baseQueue===null&&(n.baseState=r),t.lastRenderedState=r}return[r,i]}function DM(){}function EM(e,n){var t=An,i=ta(),a=n(),r=!Oa(i.memoizedState,a);if(r&&(i.memoizedState=a,si=!0),i=i.queue,rw(jM.bind(null,t,i,e),[e]),i.getSnapshot!==n||r||St!==null&&St.memoizedState.tag&1){if(t.flags|=2048,om(9,IM.bind(null,t,i,a,n),void 0,null),bt===null)throw Error(le(349));Zl&30||$M(t,n,a)}return a}function $M(e,n,t){e.flags|=16384,e={getSnapshot:n,value:t},n=An.updateQueue,n===null?(n={lastEffect:null,stores:null},An.updateQueue=n,n.stores=[e]):(t=n.stores,t===null?n.stores=[e]:t.push(e))}function IM(e,n,t,i){n.value=t,n.getSnapshot=i,TM(n)&&AM(e)}function jM(e,n,t){return t(function(){TM(n)&&AM(e)})}function TM(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!Oa(e,t)}catch{return!0}}function AM(e){var n=Tr(e,1);n!==null&&xa(n,e,1,-1)}function yC(e){var n=Ha();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rm,lastRenderedState:e},n.queue=e,e=e.dispatch=FY.bind(null,An,e),[n.memoizedState,e]}function om(e,n,t,i){return e={tag:e,create:n,destroy:t,deps:i,next:null},n=An.updateQueue,n===null?(n={lastEffect:null,stores:null},An.updateQueue=n,n.lastEffect=e.next=e):(t=n.lastEffect,t===null?n.lastEffect=e.next=e:(i=t.next,t.next=e,e.next=i,n.lastEffect=e)),e}function RM(){return ta().memoizedState}function Yp(e,n,t,i){var a=Ha();An.flags|=e,a.memoizedState=om(1|n,t,void 0,i===void 0?null:i)}function Ey(e,n,t,i){var a=ta();i=i===void 0?null:i;var r=void 0;if(mt!==null){var o=mt.memoizedState;if(r=o.destroy,i!==null&&tw(i,o.deps)){a.memoizedState=om(n,t,r,i);return}}An.flags|=e,a.memoizedState=om(1|n,t,r,i)}function SC(e,n){return Yp(8390656,8,e,n)}function rw(e,n){return Ey(2048,8,e,n)}function MM(e,n){return Ey(4,2,e,n)}function LM(e,n){return Ey(4,4,e,n)}function zM(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function BM(e,n,t){return t=t!=null?t.concat([e]):null,Ey(4,4,zM.bind(null,n,e),t)}function ow(){}function VM(e,n){var t=ta();n=n===void 0?null:n;var i=t.memoizedState;return i!==null&&n!==null&&tw(n,i[1])?i[0]:(t.memoizedState=[e,n],e)}function WM(e,n){var t=ta();n=n===void 0?null:n;var i=t.memoizedState;return i!==null&&n!==null&&tw(n,i[1])?i[0]:(e=e(),t.memoizedState=[e,n],e)}function HM(e,n,t){return Zl&21?(Oa(t,n)||(t=GR(),An.lanes|=t,Jl|=t,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,si=!0),e.memoizedState=t)}function bY(e,n){var t=ln;ln=t!==0&&4>t?t:4,e(!0);var i=s0.transition;s0.transition={};try{e(!1),n()}finally{ln=t,s0.transition=i}}function UM(){return ta().memoizedState}function xY(e,n,t){var i=Ao(e);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},YM(e))GM(n,t);else if(t=xM(e,n,t,i),t!==null){var a=Zt();xa(t,e,i,a),qM(t,n,i)}}function FY(e,n,t){var i=Ao(e),a={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(YM(e))GM(n,a);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=n.lastRenderedReducer,r!==null))try{var o=n.lastRenderedState,l=r(o,t);if(a.hasEagerState=!0,a.eagerState=l,Oa(l,o)){var s=n.interleaved;s===null?(a.next=a,QF(n)):(a.next=s.next,s.next=a),n.interleaved=a;return}}catch{}finally{}t=xM(e,n,a,i),t!==null&&(a=Zt(),xa(t,e,i,a),qM(t,n,i))}}function YM(e){var n=e.alternate;return e===An||n!==null&&n===An}function GM(e,n){Fu=qh=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function qM(e,n,t){if(t&4194240){var i=n.lanes;i&=e.pendingLanes,t|=i,n.lanes=t,RF(e,t)}}var Kh={readContext:na,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},wY={readContext:na,useCallback:function(e,n){return Ha().memoizedState=[e,n===void 0?null:n],e},useContext:na,useEffect:SC,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Yp(4194308,4,zM.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Yp(4194308,4,e,n)},useInsertionEffect:function(e,n){return Yp(4,2,e,n)},useMemo:function(e,n){var t=Ha();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var i=Ha();return n=t!==void 0?t(n):n,i.memoizedState=i.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},i.queue=e,e=e.dispatch=xY.bind(null,An,e),[i.memoizedState,e]},useRef:function(e){var n=Ha();return e={current:e},n.memoizedState=e},useState:yC,useDebugValue:ow,useDeferredValue:function(e){return Ha().memoizedState=e},useTransition:function(){var e=yC(!1),n=e[0];return e=bY.bind(null,e[1]),Ha().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var i=An,a=Ha();if(Dn){if(t===void 0)throw Error(le(407));t=t()}else{if(t=n(),bt===null)throw Error(le(349));Zl&30||$M(i,n,t)}a.memoizedState=t;var r={value:t,getSnapshot:n};return a.queue=r,SC(jM.bind(null,i,r,e),[e]),i.flags|=2048,om(9,IM.bind(null,i,r,t,n),void 0,null),t},useId:function(){var e=Ha(),n=bt.identifierPrefix;if(Dn){var t=wr,i=Fr;t=(i&~(1<<32-ba(i)-1)).toString(32)+t,n=":"+n+"R"+t,t=am++,0<t&&(n+="H"+t.toString(32)),n+=":"}else t=NY++,n=":"+n+"r"+t.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},_Y={readContext:na,useCallback:VM,useContext:na,useEffect:rw,useImperativeHandle:BM,useInsertionEffect:MM,useLayoutEffect:LM,useMemo:WM,useReducer:d0,useRef:RM,useState:function(){return d0(rm)},useDebugValue:ow,useDeferredValue:function(e){var n=ta();return HM(n,mt.memoizedState,e)},useTransition:function(){var e=d0(rm)[0],n=ta().memoizedState;return[e,n]},useMutableSource:DM,useSyncExternalStore:EM,useId:UM,unstable_isNewReconciler:!1},CY={readContext:na,useCallback:VM,useContext:na,useEffect:rw,useImperativeHandle:BM,useInsertionEffect:MM,useLayoutEffect:LM,useMemo:WM,useReducer:c0,useRef:RM,useState:function(){return c0(rm)},useDebugValue:ow,useDeferredValue:function(e){var n=ta();return mt===null?n.memoizedState=e:HM(n,mt.memoizedState,e)},useTransition:function(){var e=c0(rm)[0],n=ta().memoizedState;return[e,n]},useMutableSource:DM,useSyncExternalStore:EM,useId:UM,unstable_isNewReconciler:!1};function jd(e,n){try{var t="",i=n;do t+=nU(i),i=i.return;while(i);var a=t}catch(r){a=`
Error generating stack: `+r.message+`
`+r.stack}return{value:e,source:n,stack:a,digest:null}}function u0(e,n,t){return{value:e,source:null,stack:t??null,digest:n??null}}function Cb(e,n){try{console.error(n.value)}catch(t){setTimeout(function(){throw t})}}var PY=typeof WeakMap=="function"?WeakMap:Map;function KM(e,n,t){t=Dr(-1,t),t.tag=3,t.payload={element:null};var i=n.value;return t.callback=function(){Qh||(Qh=!0,Rb=i),Cb(e,n)},t}function XM(e,n,t){t=Dr(-1,t),t.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=n.value;t.payload=function(){return i(a)},t.callback=function(){Cb(e,n)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(t.callback=function(){Cb(e,n),typeof i!="function"&&(To===null?To=new Set([this]):To.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""})}),t}function NC(e,n,t){var i=e.pingCache;if(i===null){i=e.pingCache=new PY;var a=new Set;i.set(n,a)}else a=i.get(n),a===void 0&&(a=new Set,i.set(n,a));a.has(t)||(a.add(t),e=VY.bind(null,e,n,t),n.then(e,e))}function bC(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function xC(e,n,t,i,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(n=Dr(-1,1),n.tag=2,jo(t,n,1))),t.lanes|=1),e)}var OY=Lr.ReactCurrentOwner,si=!1;function Kt(e,n,t,i){n.child=e===null?PM(n,null,t,i):$d(n,e.child,t,i)}function FC(e,n,t,i,a){t=t.render;var r=n.ref;return dd(n,a),i=iw(e,n,t,i,r,a),t=aw(),e!==null&&!si?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a,Ar(e,n,a)):(Dn&&t&&UF(n),n.flags|=1,Kt(e,n,i,a),n.child)}function wC(e,n,t,i,a){if(e===null){var r=t.type;return typeof r=="function"&&!pw(r)&&r.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(n.tag=15,n.type=r,QM(e,n,r,i,a)):(e=Xp(t.type,null,i,n,n.mode,a),e.ref=n.ref,e.return=n,n.child=e)}if(r=e.child,!(e.lanes&a)){var o=r.memoizedProps;if(t=t.compare,t=t!==null?t:Zu,t(o,i)&&e.ref===n.ref)return Ar(e,n,a)}return n.flags|=1,e=Ro(r,i),e.ref=n.ref,e.return=n,n.child=e}function QM(e,n,t,i,a){if(e!==null){var r=e.memoizedProps;if(Zu(r,i)&&e.ref===n.ref)if(si=!1,n.pendingProps=i=r,(e.lanes&a)!==0)e.flags&131072&&(si=!0);else return n.lanes=e.lanes,Ar(e,n,a)}return Pb(e,n,t,i,a)}function ZM(e,n,t){var i=n.pendingProps,a=i.children,r=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Sn(nd,xi),xi|=t;else{if(!(t&1073741824))return e=r!==null?r.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Sn(nd,xi),xi|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=r!==null?r.baseLanes:t,Sn(nd,xi),xi|=i}else r!==null?(i=r.baseLanes|t,n.memoizedState=null):i=t,Sn(nd,xi),xi|=i;return Kt(e,n,a,t),n.child}function JM(e,n){var t=n.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function Pb(e,n,t,i,a){var r=ui(t)?Xl:Ut.current;return r=Dd(n,r),dd(n,a),t=iw(e,n,t,i,r,a),i=aw(),e!==null&&!si?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a,Ar(e,n,a)):(Dn&&i&&UF(n),n.flags|=1,Kt(e,n,t,a),n.child)}function _C(e,n,t,i,a){if(ui(t)){var r=!0;Bh(n)}else r=!1;if(dd(n,a),n.stateNode===null)Gp(e,n),_M(n,t,i),_b(n,t,i,a),i=!0;else if(e===null){var o=n.stateNode,l=n.memoizedProps;o.props=l;var s=o.context,d=t.contextType;typeof d=="object"&&d!==null?d=na(d):(d=ui(t)?Xl:Ut.current,d=Dd(n,d));var c=t.getDerivedStateFromProps,u=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==i||s!==d)&&kC(n,o,i,d),lo=!1;var f=n.memoizedState;o.state=f,Yh(n,i,o,a),s=n.memoizedState,l!==i||f!==s||ci.current||lo?(typeof c=="function"&&(wb(n,t,c,i),s=n.memoizedState),(l=lo||vC(n,t,l,i,f,s,d))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(n.flags|=4194308)):(typeof o.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=s),o.props=i,o.state=s,o.context=d,i=l):(typeof o.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{o=n.stateNode,FM(e,n),l=n.memoizedProps,d=n.type===n.elementType?l:pa(n.type,l),o.props=d,u=n.pendingProps,f=o.context,s=t.contextType,typeof s=="object"&&s!==null?s=na(s):(s=ui(t)?Xl:Ut.current,s=Dd(n,s));var p=t.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==u||f!==s)&&kC(n,o,i,s),lo=!1,f=n.memoizedState,o.state=f,Yh(n,i,o,a);var h=n.memoizedState;l!==u||f!==h||ci.current||lo?(typeof p=="function"&&(wb(n,t,p,i),h=n.memoizedState),(d=lo||vC(n,t,d,i,f,h,s)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,h,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,h,s)),typeof o.componentDidUpdate=="function"&&(n.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(n.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=h),o.props=i,o.state=h,o.context=s,i=d):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(n.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(n.flags|=1024),i=!1)}return Ob(e,n,t,i,r,a)}function Ob(e,n,t,i,a,r){JM(e,n);var o=(n.flags&128)!==0;if(!i&&!o)return a&&uC(n,t,!1),Ar(e,n,r);i=n.stateNode,OY.current=n;var l=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return n.flags|=1,e!==null&&o?(n.child=$d(n,e.child,null,r),n.child=$d(n,null,l,r)):Kt(e,n,l,r),n.memoizedState=i.state,a&&uC(n,t,!0),n.child}function e5(e){var n=e.stateNode;n.pendingContext?cC(e,n.pendingContext,n.pendingContext!==n.context):n.context&&cC(e,n.context,!1),JF(e,n.containerInfo)}function CC(e,n,t,i,a){return Ed(),GF(a),n.flags|=256,Kt(e,n,t,i),n.child}var Db={dehydrated:null,treeContext:null,retryLane:0};function Eb(e){return{baseLanes:e,cachePool:null,transitions:null}}function n5(e,n,t){var i=n.pendingProps,a=jn.current,r=!1,o=(n.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(r=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Sn(jn,a&1),e===null)return xb(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(o=i.children,e=i.fallback,r?(i=n.mode,r=n.child,o={mode:"hidden",children:o},!(i&1)&&r!==null?(r.childLanes=0,r.pendingProps=o):r=jy(o,i,0,null),e=Wl(e,i,t,null),r.return=n,e.return=n,r.sibling=e,n.child=r,n.child.memoizedState=Eb(t),n.memoizedState=Db,e):lw(n,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return DY(e,n,o,i,l,a,t);if(r){r=i.fallback,o=n.mode,a=e.child,l=a.sibling;var s={mode:"hidden",children:i.children};return!(o&1)&&n.child!==a?(i=n.child,i.childLanes=0,i.pendingProps=s,n.deletions=null):(i=Ro(a,s),i.subtreeFlags=a.subtreeFlags&14680064),l!==null?r=Ro(l,r):(r=Wl(r,o,t,null),r.flags|=2),r.return=n,i.return=n,i.sibling=r,n.child=i,i=r,r=n.child,o=e.child.memoizedState,o=o===null?Eb(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},r.memoizedState=o,r.childLanes=e.childLanes&~t,n.memoizedState=Db,i}return r=e.child,e=r.sibling,i=Ro(r,{mode:"visible",children:i.children}),!(n.mode&1)&&(i.lanes=t),i.return=n,i.sibling=null,e!==null&&(t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=i,n.memoizedState=null,i}function lw(e,n){return n=jy({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function $f(e,n,t,i){return i!==null&&GF(i),$d(n,e.child,null,t),e=lw(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function DY(e,n,t,i,a,r,o){if(t)return n.flags&256?(n.flags&=-257,i=u0(Error(le(422))),$f(e,n,o,i)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(r=i.fallback,a=n.mode,i=jy({mode:"visible",children:i.children},a,0,null),r=Wl(r,a,o,null),r.flags|=2,i.return=n,r.return=n,i.sibling=r,n.child=i,n.mode&1&&$d(n,e.child,null,o),n.child.memoizedState=Eb(o),n.memoizedState=Db,r);if(!(n.mode&1))return $f(e,n,o,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var l=i.dgst;return i=l,r=Error(le(419)),i=u0(r,i,void 0),$f(e,n,o,i)}if(l=(o&e.childLanes)!==0,si||l){if(i=bt,i!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(i.suspendedLanes|o)?0:a,a!==0&&a!==r.retryLane&&(r.retryLane=a,Tr(e,a),xa(i,e,a,-1))}return fw(),i=u0(Error(le(421))),$f(e,n,o,i)}return a.data==="$?"?(n.flags|=128,n.child=e.child,n=WY.bind(null,e),a._reactRetry=n,null):(e=r.treeContext,Pi=Io(a.nextSibling),$i=n,Dn=!0,ga=null,e!==null&&(Xi[Qi++]=Fr,Xi[Qi++]=wr,Xi[Qi++]=Ql,Fr=e.id,wr=e.overflow,Ql=n),n=lw(n,i.children),n.flags|=4096,n)}function PC(e,n,t){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),Fb(e.return,n,t)}function m0(e,n,t,i,a){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:t,tailMode:a}:(r.isBackwards=n,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=t,r.tailMode=a)}function t5(e,n,t){var i=n.pendingProps,a=i.revealOrder,r=i.tail;if(Kt(e,n,i.children,t),i=jn.current,i&2)i=i&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&PC(e,t,n);else if(e.tag===19)PC(e,t,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Sn(jn,i),!(n.mode&1))n.memoizedState=null;else switch(a){case"forwards":for(t=n.child,a=null;t!==null;)e=t.alternate,e!==null&&Gh(e)===null&&(a=t),t=t.sibling;t=a,t===null?(a=n.child,n.child=null):(a=t.sibling,t.sibling=null),m0(n,!1,a,t,r);break;case"backwards":for(t=null,a=n.child,n.child=null;a!==null;){if(e=a.alternate,e!==null&&Gh(e)===null){n.child=a;break}e=a.sibling,a.sibling=t,t=a,a=e}m0(n,!0,t,null,r);break;case"together":m0(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Gp(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Ar(e,n,t){if(e!==null&&(n.dependencies=e.dependencies),Jl|=n.lanes,!(t&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(le(153));if(n.child!==null){for(e=n.child,t=Ro(e,e.pendingProps),n.child=t,t.return=n;e.sibling!==null;)e=e.sibling,t=t.sibling=Ro(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}function EY(e,n,t){switch(n.tag){case 3:e5(n),Ed();break;case 5:OM(n);break;case 1:ui(n.type)&&Bh(n);break;case 4:JF(n,n.stateNode.containerInfo);break;case 10:var i=n.type._context,a=n.memoizedProps.value;Sn(Hh,i._currentValue),i._currentValue=a;break;case 13:if(i=n.memoizedState,i!==null)return i.dehydrated!==null?(Sn(jn,jn.current&1),n.flags|=128,null):t&n.child.childLanes?n5(e,n,t):(Sn(jn,jn.current&1),e=Ar(e,n,t),e!==null?e.sibling:null);Sn(jn,jn.current&1);break;case 19:if(i=(t&n.childLanes)!==0,e.flags&128){if(i)return t5(e,n,t);n.flags|=128}if(a=n.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Sn(jn,jn.current),i)break;return null;case 22:case 23:return n.lanes=0,ZM(e,n,t)}return Ar(e,n,t)}var i5,$b,a5,r5;i5=function(e,n){for(var t=n.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};$b=function(){};a5=function(e,n,t,i){var a=e.memoizedProps;if(a!==i){e=n.stateNode,Il(ir.current);var r=null;switch(t){case"input":a=eb(e,a),i=eb(e,i),r=[];break;case"select":a=Rn({},a,{value:void 0}),i=Rn({},i,{value:void 0}),r=[];break;case"textarea":a=ib(e,a),i=ib(e,i),r=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Lh)}rb(t,i);var o;t=null;for(d in a)if(!i.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var l=a[d];for(o in l)l.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Uu.hasOwnProperty(d)?r||(r=[]):(r=r||[]).push(d,null));for(d in i){var s=i[d];if(l=a!=null?a[d]:void 0,i.hasOwnProperty(d)&&s!==l&&(s!=null||l!=null))if(d==="style")if(l){for(o in l)!l.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in s)s.hasOwnProperty(o)&&l[o]!==s[o]&&(t||(t={}),t[o]=s[o])}else t||(r||(r=[]),r.push(d,t)),t=s;else d==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(r=r||[]).push(d,s)):d==="children"?typeof s!="string"&&typeof s!="number"||(r=r||[]).push(d,""+s):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Uu.hasOwnProperty(d)?(s!=null&&d==="onScroll"&&xn("scroll",e),r||l===s||(r=[])):(r=r||[]).push(d,s))}t&&(r=r||[]).push("style",t);var d=r;(n.updateQueue=d)&&(n.flags|=4)}};r5=function(e,n,t,i){t!==i&&(n.flags|=4)};function Tc(e,n){if(!Dn)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;n!==null;)n.alternate!==null&&(t=n),n=n.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function At(e){var n=e.alternate!==null&&e.alternate.child===e.child,t=0,i=0;if(n)for(var a=e.child;a!==null;)t|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)t|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=t,n}function $Y(e,n,t){var i=n.pendingProps;switch(YF(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(n),null;case 1:return ui(n.type)&&zh(),At(n),null;case 3:return i=n.stateNode,Id(),_n(ci),_n(Ut),nw(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Df(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,ga!==null&&(zb(ga),ga=null))),$b(e,n),At(n),null;case 5:ew(n);var a=Il(im.current);if(t=n.type,e!==null&&n.stateNode!=null)a5(e,n,t,i,a),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!i){if(n.stateNode===null)throw Error(le(166));return At(n),null}if(e=Il(ir.current),Df(n)){i=n.stateNode,t=n.type;var r=n.memoizedProps;switch(i[Za]=n,i[nm]=r,e=(n.mode&1)!==0,t){case"dialog":xn("cancel",i),xn("close",i);break;case"iframe":case"object":case"embed":xn("load",i);break;case"video":case"audio":for(a=0;a<uu.length;a++)xn(uu[a],i);break;case"source":xn("error",i);break;case"img":case"image":case"link":xn("error",i),xn("load",i);break;case"details":xn("toggle",i);break;case"input":R1(i,r),xn("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!r.multiple},xn("invalid",i);break;case"textarea":L1(i,r),xn("invalid",i)}rb(t,r),a=null;for(var o in r)if(r.hasOwnProperty(o)){var l=r[o];o==="children"?typeof l=="string"?i.textContent!==l&&(r.suppressHydrationWarning!==!0&&Of(i.textContent,l,e),a=["children",l]):typeof l=="number"&&i.textContent!==""+l&&(r.suppressHydrationWarning!==!0&&Of(i.textContent,l,e),a=["children",""+l]):Uu.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&xn("scroll",i)}switch(t){case"input":Nf(i),M1(i,r,!0);break;case"textarea":Nf(i),z1(i);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(i.onclick=Lh)}i=a,n.updateQueue=i,i!==null&&(n.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$R(t)),e==="http://www.w3.org/1999/xhtml"?t==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(t,{is:i.is}):(e=o.createElement(t),t==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,t),e[Za]=n,e[nm]=i,i5(e,n,!1,!1),n.stateNode=e;e:{switch(o=ob(t,i),t){case"dialog":xn("cancel",e),xn("close",e),a=i;break;case"iframe":case"object":case"embed":xn("load",e),a=i;break;case"video":case"audio":for(a=0;a<uu.length;a++)xn(uu[a],e);a=i;break;case"source":xn("error",e),a=i;break;case"img":case"image":case"link":xn("error",e),xn("load",e),a=i;break;case"details":xn("toggle",e),a=i;break;case"input":R1(e,i),a=eb(e,i),xn("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=Rn({},i,{value:void 0}),xn("invalid",e);break;case"textarea":L1(e,i),a=ib(e,i),xn("invalid",e);break;default:a=i}rb(t,a),l=a;for(r in l)if(l.hasOwnProperty(r)){var s=l[r];r==="style"?TR(e,s):r==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&IR(e,s)):r==="children"?typeof s=="string"?(t!=="textarea"||s!=="")&&Yu(e,s):typeof s=="number"&&Yu(e,""+s):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(Uu.hasOwnProperty(r)?s!=null&&r==="onScroll"&&xn("scroll",e):s!=null&&EF(e,r,s,o))}switch(t){case"input":Nf(e),M1(e,i,!1);break;case"textarea":Nf(e),z1(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Vo(i.value));break;case"select":e.multiple=!!i.multiple,r=i.value,r!=null?rd(e,!!i.multiple,r,!1):i.defaultValue!=null&&rd(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Lh)}switch(t){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return At(n),null;case 6:if(e&&n.stateNode!=null)r5(e,n,e.memoizedProps,i);else{if(typeof i!="string"&&n.stateNode===null)throw Error(le(166));if(t=Il(im.current),Il(ir.current),Df(n)){if(i=n.stateNode,t=n.memoizedProps,i[Za]=n,(r=i.nodeValue!==t)&&(e=$i,e!==null))switch(e.tag){case 3:Of(i.nodeValue,t,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Of(i.nodeValue,t,(e.mode&1)!==0)}r&&(n.flags|=4)}else i=(t.nodeType===9?t:t.ownerDocument).createTextNode(i),i[Za]=n,n.stateNode=i}return At(n),null;case 13:if(_n(jn),i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Dn&&Pi!==null&&n.mode&1&&!(n.flags&128))bM(),Ed(),n.flags|=98560,r=!1;else if(r=Df(n),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(le(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(le(317));r[Za]=n}else Ed(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;At(n),r=!1}else ga!==null&&(zb(ga),ga=null),r=!0;if(!r)return n.flags&65536?n:null}return n.flags&128?(n.lanes=t,n):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(n.child.flags|=8192,n.mode&1&&(e===null||jn.current&1?pt===0&&(pt=3):fw())),n.updateQueue!==null&&(n.flags|=4),At(n),null);case 4:return Id(),$b(e,n),e===null&&Ju(n.stateNode.containerInfo),At(n),null;case 10:return XF(n.type._context),At(n),null;case 17:return ui(n.type)&&zh(),At(n),null;case 19:if(_n(jn),r=n.memoizedState,r===null)return At(n),null;if(i=(n.flags&128)!==0,o=r.rendering,o===null)if(i)Tc(r,!1);else{if(pt!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(o=Gh(e),o!==null){for(n.flags|=128,Tc(r,!1),i=o.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),n.subtreeFlags=0,i=t,t=n.child;t!==null;)r=t,e=i,r.flags&=14680066,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return Sn(jn,jn.current&1|2),n.child}e=e.sibling}r.tail!==null&&Yn()>Td&&(n.flags|=128,i=!0,Tc(r,!1),n.lanes=4194304)}else{if(!i)if(e=Gh(o),e!==null){if(n.flags|=128,i=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),Tc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!Dn)return At(n),null}else 2*Yn()-r.renderingStartTime>Td&&t!==1073741824&&(n.flags|=128,i=!0,Tc(r,!1),n.lanes=4194304);r.isBackwards?(o.sibling=n.child,n.child=o):(t=r.last,t!==null?t.sibling=o:n.child=o,r.last=o)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.renderingStartTime=Yn(),n.sibling=null,t=jn.current,Sn(jn,i?t&1|2:t&1),n):(At(n),null);case 22:case 23:return mw(),i=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(n.flags|=8192),i&&n.mode&1?xi&1073741824&&(At(n),n.subtreeFlags&6&&(n.flags|=8192)):At(n),null;case 24:return null;case 25:return null}throw Error(le(156,n.tag))}function IY(e,n){switch(YF(n),n.tag){case 1:return ui(n.type)&&zh(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Id(),_n(ci),_n(Ut),nw(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ew(n),null;case 13:if(_n(jn),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(le(340));Ed()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return _n(jn),null;case 4:return Id(),null;case 10:return XF(n.type._context),null;case 22:case 23:return mw(),null;case 24:return null;default:return null}}var If=!1,Bt=!1,jY=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ed(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){Mn(e,n,i)}else t.current=null}function Ib(e,n,t){try{t()}catch(i){Mn(e,n,i)}}var OC=!1;function TY(e,n){if(vb=Ah,e=dM(),HF(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var a=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var o=0,l=-1,s=-1,d=0,c=0,u=e,f=null;n:for(;;){for(var p;u!==t||a!==0&&u.nodeType!==3||(l=o+a),u!==r||i!==0&&u.nodeType!==3||(s=o+i),u.nodeType===3&&(o+=u.nodeValue.length),(p=u.firstChild)!==null;)f=u,u=p;for(;;){if(u===e)break n;if(f===t&&++d===a&&(l=o),f===r&&++c===i&&(s=o),(p=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=p}t=l===-1||s===-1?null:{start:l,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(kb={focusedElem:e,selectionRange:t},Ah=!1,Ne=n;Ne!==null;)if(n=Ne,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ne=e;else for(;Ne!==null;){n=Ne;try{var h=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var k=h.memoizedProps,y=h.memoizedState,g=n.stateNode,v=g.getSnapshotBeforeUpdate(n.elementType===n.type?k:pa(n.type,k),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var N=n.stateNode.containerInfo;N.nodeType===1?N.textContent="":N.nodeType===9&&N.documentElement&&N.removeChild(N.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(x){Mn(n,n.return,x)}if(e=n.sibling,e!==null){e.return=n.return,Ne=e;break}Ne=n.return}return h=OC,OC=!1,h}function wu(e,n,t){var i=n.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var r=a.destroy;a.destroy=void 0,r!==void 0&&Ib(n,t,r)}a=a.next}while(a!==i)}}function $y(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var i=t.create;t.destroy=i()}t=t.next}while(t!==n)}}function jb(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function o5(e){var n=e.alternate;n!==null&&(e.alternate=null,o5(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Za],delete n[nm],delete n[Sb],delete n[kY],delete n[gY])),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 l5(e){return e.tag===5||e.tag===3||e.tag===4}function DC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||l5(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 Tb(e,n,t){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Lh));else if(i!==4&&(e=e.child,e!==null))for(Tb(e,n,t),e=e.sibling;e!==null;)Tb(e,n,t),e=e.sibling}function Ab(e,n,t){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Ab(e,n,t),e=e.sibling;e!==null;)Ab(e,n,t),e=e.sibling}var Ct=null,ka=!1;function Qr(e,n,t){for(t=t.child;t!==null;)s5(e,n,t),t=t.sibling}function s5(e,n,t){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(Fy,t)}catch{}switch(t.tag){case 5:Bt||ed(t,n);case 6:var i=Ct,a=ka;Ct=null,Qr(e,n,t),Ct=i,ka=a,Ct!==null&&(ka?(e=Ct,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):Ct.removeChild(t.stateNode));break;case 18:Ct!==null&&(ka?(e=Ct,t=t.stateNode,e.nodeType===8?r0(e.parentNode,t):e.nodeType===1&&r0(e,t),Xu(e)):r0(Ct,t.stateNode));break;case 4:i=Ct,a=ka,Ct=t.stateNode.containerInfo,ka=!0,Qr(e,n,t),Ct=i,ka=a;break;case 0:case 11:case 14:case 15:if(!Bt&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var r=a,o=r.destroy;r=r.tag,o!==void 0&&(r&2||r&4)&&Ib(t,n,o),a=a.next}while(a!==i)}Qr(e,n,t);break;case 1:if(!Bt&&(ed(t,n),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(l){Mn(t,n,l)}Qr(e,n,t);break;case 21:Qr(e,n,t);break;case 22:t.mode&1?(Bt=(i=Bt)||t.memoizedState!==null,Qr(e,n,t),Bt=i):Qr(e,n,t);break;default:Qr(e,n,t)}}function EC(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new jY),n.forEach(function(i){var a=HY.bind(null,e,i);t.has(i)||(t.add(i),i.then(a,a))})}}function ua(e,n){var t=n.deletions;if(t!==null)for(var i=0;i<t.length;i++){var a=t[i];try{var r=e,o=n,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ct=l.stateNode,ka=!1;break e;case 3:Ct=l.stateNode.containerInfo,ka=!0;break e;case 4:Ct=l.stateNode.containerInfo,ka=!0;break e}l=l.return}if(Ct===null)throw Error(le(160));s5(r,o,a),Ct=null,ka=!1;var s=a.alternate;s!==null&&(s.return=null),a.return=null}catch(d){Mn(a,n,d)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)d5(n,e),n=n.sibling}function d5(e,n){var t=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ua(n,e),za(e),i&4){try{wu(3,e,e.return),$y(3,e)}catch(k){Mn(e,e.return,k)}try{wu(5,e,e.return)}catch(k){Mn(e,e.return,k)}}break;case 1:ua(n,e),za(e),i&512&&t!==null&&ed(t,t.return);break;case 5:if(ua(n,e),za(e),i&512&&t!==null&&ed(t,t.return),e.flags&32){var a=e.stateNode;try{Yu(a,"")}catch(k){Mn(e,e.return,k)}}if(i&4&&(a=e.stateNode,a!=null)){var r=e.memoizedProps,o=t!==null?t.memoizedProps:r,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&r.type==="radio"&&r.name!=null&&DR(a,r),ob(l,o);var d=ob(l,r);for(o=0;o<s.length;o+=2){var c=s[o],u=s[o+1];c==="style"?TR(a,u):c==="dangerouslySetInnerHTML"?IR(a,u):c==="children"?Yu(a,u):EF(a,c,u,d)}switch(l){case"input":nb(a,r);break;case"textarea":ER(a,r);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!r.multiple;var p=r.value;p!=null?rd(a,!!r.multiple,p,!1):f!==!!r.multiple&&(r.defaultValue!=null?rd(a,!!r.multiple,r.defaultValue,!0):rd(a,!!r.multiple,r.multiple?[]:"",!1))}a[nm]=r}catch(k){Mn(e,e.return,k)}}break;case 6:if(ua(n,e),za(e),i&4){if(e.stateNode===null)throw Error(le(162));a=e.stateNode,r=e.memoizedProps;try{a.nodeValue=r}catch(k){Mn(e,e.return,k)}}break;case 3:if(ua(n,e),za(e),i&4&&t!==null&&t.memoizedState.isDehydrated)try{Xu(n.containerInfo)}catch(k){Mn(e,e.return,k)}break;case 4:ua(n,e),za(e);break;case 13:ua(n,e),za(e),a=e.child,a.flags&8192&&(r=a.memoizedState!==null,a.stateNode.isHidden=r,!r||a.alternate!==null&&a.alternate.memoizedState!==null||(cw=Yn())),i&4&&EC(e);break;case 22:if(c=t!==null&&t.memoizedState!==null,e.mode&1?(Bt=(d=Bt)||c,ua(n,e),Bt=d):ua(n,e),za(e),i&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!c&&e.mode&1)for(Ne=e,c=e.child;c!==null;){for(u=Ne=c;Ne!==null;){switch(f=Ne,p=f.child,f.tag){case 0:case 11:case 14:case 15:wu(4,f,f.return);break;case 1:ed(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){i=f,t=f.return;try{n=i,h.props=n.memoizedProps,h.state=n.memoizedState,h.componentWillUnmount()}catch(k){Mn(i,t,k)}}break;case 5:ed(f,f.return);break;case 22:if(f.memoizedState!==null){IC(u);continue}}p!==null?(p.return=f,Ne=p):IC(u)}c=c.sibling}e:for(c=null,u=e;;){if(u.tag===5){if(c===null){c=u;try{a=u.stateNode,d?(r=a.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"):(l=u.stateNode,s=u.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=jR("display",o))}catch(k){Mn(e,e.return,k)}}}else if(u.tag===6){if(c===null)try{u.stateNode.nodeValue=d?"":u.memoizedProps}catch(k){Mn(e,e.return,k)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;c===u&&(c=null),u=u.return}c===u&&(c=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:ua(n,e),za(e),i&4&&EC(e);break;case 21:break;default:ua(n,e),za(e)}}function za(e){var n=e.flags;if(n&2){try{e:{for(var t=e.return;t!==null;){if(l5(t)){var i=t;break e}t=t.return}throw Error(le(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Yu(a,""),i.flags&=-33);var r=DC(e);Ab(e,r,a);break;case 3:case 4:var o=i.stateNode.containerInfo,l=DC(e);Tb(e,l,o);break;default:throw Error(le(161))}}catch(s){Mn(e,e.return,s)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function AY(e,n,t){Ne=e,c5(e)}function c5(e,n,t){for(var i=(e.mode&1)!==0;Ne!==null;){var a=Ne,r=a.child;if(a.tag===22&&i){var o=a.memoizedState!==null||If;if(!o){var l=a.alternate,s=l!==null&&l.memoizedState!==null||Bt;l=If;var d=Bt;if(If=o,(Bt=s)&&!d)for(Ne=a;Ne!==null;)o=Ne,s=o.child,o.tag===22&&o.memoizedState!==null?jC(a):s!==null?(s.return=o,Ne=s):jC(a);for(;r!==null;)Ne=r,c5(r),r=r.sibling;Ne=a,If=l,Bt=d}$C(e)}else a.subtreeFlags&8772&&r!==null?(r.return=a,Ne=r):$C(e)}}function $C(e){for(;Ne!==null;){var n=Ne;if(n.flags&8772){var t=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:Bt||$y(5,n);break;case 1:var i=n.stateNode;if(n.flags&4&&!Bt)if(t===null)i.componentDidMount();else{var a=n.elementType===n.type?t.memoizedProps:pa(n.type,t.memoizedProps);i.componentDidUpdate(a,t.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var r=n.updateQueue;r!==null&&hC(n,r,i);break;case 3:var o=n.updateQueue;if(o!==null){if(t=null,n.child!==null)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}hC(n,o,t)}break;case 5:var l=n.stateNode;if(t===null&&n.flags&4){t=l;var s=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&t.focus();break;case"img":s.src&&(t.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var d=n.alternate;if(d!==null){var c=d.memoizedState;if(c!==null){var u=c.dehydrated;u!==null&&Xu(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(le(163))}Bt||n.flags&512&&jb(n)}catch(f){Mn(n,n.return,f)}}if(n===e){Ne=null;break}if(t=n.sibling,t!==null){t.return=n.return,Ne=t;break}Ne=n.return}}function IC(e){for(;Ne!==null;){var n=Ne;if(n===e){Ne=null;break}var t=n.sibling;if(t!==null){t.return=n.return,Ne=t;break}Ne=n.return}}function jC(e){for(;Ne!==null;){var n=Ne;try{switch(n.tag){case 0:case 11:case 15:var t=n.return;try{$y(4,n)}catch(s){Mn(n,t,s)}break;case 1:var i=n.stateNode;if(typeof i.componentDidMount=="function"){var a=n.return;try{i.componentDidMount()}catch(s){Mn(n,a,s)}}var r=n.return;try{jb(n)}catch(s){Mn(n,r,s)}break;case 5:var o=n.return;try{jb(n)}catch(s){Mn(n,o,s)}}}catch(s){Mn(n,n.return,s)}if(n===e){Ne=null;break}var l=n.sibling;if(l!==null){l.return=n.return,Ne=l;break}Ne=n.return}}var RY=Math.ceil,Xh=Lr.ReactCurrentDispatcher,sw=Lr.ReactCurrentOwner,ea=Lr.ReactCurrentBatchConfig,Ze=0,bt=null,et=null,Dt=0,xi=0,nd=Qo(0),pt=0,lm=null,Jl=0,Iy=0,dw=0,_u=null,oi=null,cw=0,Td=1/0,yr=null,Qh=!1,Rb=null,To=null,jf=!1,So=null,Zh=0,Cu=0,Mb=null,qp=-1,Kp=0;function Zt(){return Ze&6?Yn():qp!==-1?qp:qp=Yn()}function Ao(e){return e.mode&1?Ze&2&&Dt!==0?Dt&-Dt:SY.transition!==null?(Kp===0&&(Kp=GR()),Kp):(e=ln,e!==0||(e=window.event,e=e===void 0?16:eM(e.type)),e):1}function xa(e,n,t,i){if(50<Cu)throw Cu=0,Mb=null,Error(le(185));zm(e,t,i),(!(Ze&2)||e!==bt)&&(e===bt&&(!(Ze&2)&&(Iy|=t),pt===4&&mo(e,Dt)),mi(e,i),t===1&&Ze===0&&!(n.mode&1)&&(Td=Yn()+500,Oy&&Zo()))}function mi(e,n){var t=e.callbackNode;SU(e,n);var i=Th(e,e===bt?Dt:0);if(i===0)t!==null&&W1(t),e.callbackNode=null,e.callbackPriority=0;else if(n=i&-i,e.callbackPriority!==n){if(t!=null&&W1(t),n===1)e.tag===0?yY(TC.bind(null,e)):yM(TC.bind(null,e)),hY(function(){!(Ze&6)&&Zo()}),t=null;else{switch(qR(i)){case 1:t=AF;break;case 4:t=UR;break;case 16:t=jh;break;case 536870912:t=YR;break;default:t=jh}t=g5(t,u5.bind(null,e))}e.callbackPriority=n,e.callbackNode=t}}function u5(e,n){if(qp=-1,Kp=0,Ze&6)throw Error(le(327));var t=e.callbackNode;if(cd()&&e.callbackNode!==t)return null;var i=Th(e,e===bt?Dt:0);if(i===0)return null;if(i&30||i&e.expiredLanes||n)n=Jh(e,i);else{n=i;var a=Ze;Ze|=2;var r=f5();(bt!==e||Dt!==n)&&(yr=null,Td=Yn()+500,Vl(e,n));do try{zY();break}catch(l){m5(e,l)}while(!0);KF(),Xh.current=r,Ze=a,et!==null?n=0:(bt=null,Dt=0,n=pt)}if(n!==0){if(n===2&&(a=ub(e),a!==0&&(i=a,n=Lb(e,a))),n===1)throw t=lm,Vl(e,0),mo(e,i),mi(e,Yn()),t;if(n===6)mo(e,i);else{if(a=e.current.alternate,!(i&30)&&!MY(a)&&(n=Jh(e,i),n===2&&(r=ub(e),r!==0&&(i=r,n=Lb(e,r))),n===1))throw t=lm,Vl(e,0),mo(e,i),mi(e,Yn()),t;switch(e.finishedWork=a,e.finishedLanes=i,n){case 0:case 1:throw Error(le(345));case 2:xl(e,oi,yr);break;case 3:if(mo(e,i),(i&130023424)===i&&(n=cw+500-Yn(),10<n)){if(Th(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Zt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=yb(xl.bind(null,e,oi,yr),n);break}xl(e,oi,yr);break;case 4:if(mo(e,i),(i&4194240)===i)break;for(n=e.eventTimes,a=-1;0<i;){var o=31-ba(i);r=1<<o,o=n[o],o>a&&(a=o),i&=~r}if(i=a,i=Yn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*RY(i/1960))-i,10<i){e.timeoutHandle=yb(xl.bind(null,e,oi,yr),i);break}xl(e,oi,yr);break;case 5:xl(e,oi,yr);break;default:throw Error(le(329))}}}return mi(e,Yn()),e.callbackNode===t?u5.bind(null,e):null}function Lb(e,n){var t=_u;return e.current.memoizedState.isDehydrated&&(Vl(e,n).flags|=256),e=Jh(e,n),e!==2&&(n=oi,oi=t,n!==null&&zb(n)),e}function zb(e){oi===null?oi=e:oi.push.apply(oi,e)}function MY(e){for(var n=e;;){if(n.flags&16384){var t=n.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var i=0;i<t.length;i++){var a=t[i],r=a.getSnapshot;a=a.value;try{if(!Oa(r(),a))return!1}catch{return!1}}}if(t=n.child,n.subtreeFlags&16384&&t!==null)t.return=n,n=t;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function mo(e,n){for(n&=~dw,n&=~Iy,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var t=31-ba(n),i=1<<t;e[t]=-1,n&=~i}}function TC(e){if(Ze&6)throw Error(le(327));cd();var n=Th(e,0);if(!(n&1))return mi(e,Yn()),null;var t=Jh(e,n);if(e.tag!==0&&t===2){var i=ub(e);i!==0&&(n=i,t=Lb(e,i))}if(t===1)throw t=lm,Vl(e,0),mo(e,n),mi(e,Yn()),t;if(t===6)throw Error(le(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,xl(e,oi,yr),mi(e,Yn()),null}function uw(e,n){var t=Ze;Ze|=1;try{return e(n)}finally{Ze=t,Ze===0&&(Td=Yn()+500,Oy&&Zo())}}function es(e){So!==null&&So.tag===0&&!(Ze&6)&&cd();var n=Ze;Ze|=1;var t=ea.transition,i=ln;try{if(ea.transition=null,ln=1,e)return e()}finally{ln=i,ea.transition=t,Ze=n,!(Ze&6)&&Zo()}}function mw(){xi=nd.current,_n(nd)}function Vl(e,n){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(t!==-1&&(e.timeoutHandle=-1,pY(t)),et!==null)for(t=et.return;t!==null;){var i=t;switch(YF(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&zh();break;case 3:Id(),_n(ci),_n(Ut),nw();break;case 5:ew(i);break;case 4:Id();break;case 13:_n(jn);break;case 19:_n(jn);break;case 10:XF(i.type._context);break;case 22:case 23:mw()}t=t.return}if(bt=e,et=e=Ro(e.current,null),Dt=xi=n,pt=0,lm=null,dw=Iy=Jl=0,oi=_u=null,$l!==null){for(n=0;n<$l.length;n++)if(t=$l[n],i=t.interleaved,i!==null){t.interleaved=null;var a=i.next,r=t.pending;if(r!==null){var o=r.next;r.next=a,i.next=o}t.pending=i}$l=null}return e}function m5(e,n){do{var t=et;try{if(KF(),Up.current=Kh,qh){for(var i=An.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}qh=!1}if(Zl=0,St=mt=An=null,Fu=!1,am=0,sw.current=null,t===null||t.return===null){pt=1,lm=n,et=null;break}e:{var r=e,o=t.return,l=t,s=n;if(n=Dt,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var d=s,c=l,u=c.tag;if(!(c.mode&1)&&(u===0||u===11||u===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 p=bC(o);if(p!==null){p.flags&=-257,xC(p,o,l,r,n),p.mode&1&&NC(r,d,n),n=p,s=d;var h=n.updateQueue;if(h===null){var k=new Set;k.add(s),n.updateQueue=k}else h.add(s);break e}else{if(!(n&1)){NC(r,d,n),fw();break e}s=Error(le(426))}}else if(Dn&&l.mode&1){var y=bC(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),xC(y,o,l,r,n),GF(jd(s,l));break e}}r=s=jd(s,l),pt!==4&&(pt=2),_u===null?_u=[r]:_u.push(r),r=o;do{switch(r.tag){case 3:r.flags|=65536,n&=-n,r.lanes|=n;var g=KM(r,s,n);pC(r,g);break e;case 1:l=s;var v=r.type,N=r.stateNode;if(!(r.flags&128)&&(typeof v.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(To===null||!To.has(N)))){r.flags|=65536,n&=-n,r.lanes|=n;var x=XM(r,l,n);pC(r,x);break e}}r=r.return}while(r!==null)}h5(t)}catch(F){n=F,et===t&&t!==null&&(et=t=t.return);continue}break}while(!0)}function f5(){var e=Xh.current;return Xh.current=Kh,e===null?Kh:e}function fw(){(pt===0||pt===3||pt===2)&&(pt=4),bt===null||!(Jl&268435455)&&!(Iy&268435455)||mo(bt,Dt)}function Jh(e,n){var t=Ze;Ze|=2;var i=f5();(bt!==e||Dt!==n)&&(yr=null,Vl(e,n));do try{LY();break}catch(a){m5(e,a)}while(!0);if(KF(),Ze=t,Xh.current=i,et!==null)throw Error(le(261));return bt=null,Dt=0,pt}function LY(){for(;et!==null;)p5(et)}function zY(){for(;et!==null&&!uU();)p5(et)}function p5(e){var n=k5(e.alternate,e,xi);e.memoizedProps=e.pendingProps,n===null?h5(e):et=n,sw.current=null}function h5(e){var n=e;do{var t=n.alternate;if(e=n.return,n.flags&32768){if(t=IY(t,n),t!==null){t.flags&=32767,et=t;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pt=6,et=null;return}}else if(t=$Y(t,n,xi),t!==null){et=t;return}if(n=n.sibling,n!==null){et=n;return}et=n=e}while(n!==null);pt===0&&(pt=5)}function xl(e,n,t){var i=ln,a=ea.transition;try{ea.transition=null,ln=1,BY(e,n,t,i)}finally{ea.transition=a,ln=i}return null}function BY(e,n,t,i){do cd();while(So!==null);if(Ze&6)throw Error(le(327));t=e.finishedWork;var a=e.finishedLanes;if(t===null)return null;if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(le(177));e.callbackNode=null,e.callbackPriority=0;var r=t.lanes|t.childLanes;if(NU(e,r),e===bt&&(et=bt=null,Dt=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||jf||(jf=!0,g5(jh,function(){return cd(),null})),r=(t.flags&15990)!==0,t.subtreeFlags&15990||r){r=ea.transition,ea.transition=null;var o=ln;ln=1;var l=Ze;Ze|=4,sw.current=null,TY(e,t),d5(t,e),lY(kb),Ah=!!vb,kb=vb=null,e.current=t,AY(t),mU(),Ze=l,ln=o,ea.transition=r}else e.current=t;if(jf&&(jf=!1,So=e,Zh=a),r=e.pendingLanes,r===0&&(To=null),hU(t.stateNode),mi(e,Yn()),n!==null)for(i=e.onRecoverableError,t=0;t<n.length;t++)a=n[t],i(a.value,{componentStack:a.stack,digest:a.digest});if(Qh)throw Qh=!1,e=Rb,Rb=null,e;return Zh&1&&e.tag!==0&&cd(),r=e.pendingLanes,r&1?e===Mb?Cu++:(Cu=0,Mb=e):Cu=0,Zo(),null}function cd(){if(So!==null){var e=qR(Zh),n=ea.transition,t=ln;try{if(ea.transition=null,ln=16>e?16:e,So===null)var i=!1;else{if(e=So,So=null,Zh=0,Ze&6)throw Error(le(331));var a=Ze;for(Ze|=4,Ne=e.current;Ne!==null;){var r=Ne,o=r.child;if(Ne.flags&16){var l=r.deletions;if(l!==null){for(var s=0;s<l.length;s++){var d=l[s];for(Ne=d;Ne!==null;){var c=Ne;switch(c.tag){case 0:case 11:case 15:wu(8,c,r)}var u=c.child;if(u!==null)u.return=c,Ne=u;else for(;Ne!==null;){c=Ne;var f=c.sibling,p=c.return;if(o5(c),c===d){Ne=null;break}if(f!==null){f.return=p,Ne=f;break}Ne=p}}}var h=r.alternate;if(h!==null){var k=h.child;if(k!==null){h.child=null;do{var y=k.sibling;k.sibling=null,k=y}while(k!==null)}}Ne=r}}if(r.subtreeFlags&2064&&o!==null)o.return=r,Ne=o;else e:for(;Ne!==null;){if(r=Ne,r.flags&2048)switch(r.tag){case 0:case 11:case 15:wu(9,r,r.return)}var g=r.sibling;if(g!==null){g.return=r.return,Ne=g;break e}Ne=r.return}}var v=e.current;for(Ne=v;Ne!==null;){o=Ne;var N=o.child;if(o.subtreeFlags&2064&&N!==null)N.return=o,Ne=N;else e:for(o=v;Ne!==null;){if(l=Ne,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:$y(9,l)}}catch(F){Mn(l,l.return,F)}if(l===o){Ne=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,Ne=x;break e}Ne=l.return}}if(Ze=a,Zo(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(Fy,e)}catch{}i=!0}return i}finally{ln=t,ea.transition=n}}return!1}function AC(e,n,t){n=jd(t,n),n=KM(e,n,1),e=jo(e,n,1),n=Zt(),e!==null&&(zm(e,1,n),mi(e,n))}function Mn(e,n,t){if(e.tag===3)AC(e,e,t);else for(;n!==null;){if(n.tag===3){AC(n,e,t);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(To===null||!To.has(i))){e=jd(t,e),e=XM(n,e,1),n=jo(n,e,1),e=Zt(),n!==null&&(zm(n,1,e),mi(n,e));break}}n=n.return}}function VY(e,n,t){var i=e.pingCache;i!==null&&i.delete(n),n=Zt(),e.pingedLanes|=e.suspendedLanes&t,bt===e&&(Dt&t)===t&&(pt===4||pt===3&&(Dt&130023424)===Dt&&500>Yn()-cw?Vl(e,0):dw|=t),mi(e,n)}function v5(e,n){n===0&&(e.mode&1?(n=Ff,Ff<<=1,!(Ff&130023424)&&(Ff=4194304)):n=1);var t=Zt();e=Tr(e,n),e!==null&&(zm(e,n,t),mi(e,t))}function WY(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),v5(e,t)}function HY(e,n){var t=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(t=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(le(314))}i!==null&&i.delete(n),v5(e,t)}var k5;k5=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||ci.current)si=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return si=!1,EY(e,n,t);si=!!(e.flags&131072)}else si=!1,Dn&&n.flags&1048576&&SM(n,Wh,n.index);switch(n.lanes=0,n.tag){case 2:var i=n.type;Gp(e,n),e=n.pendingProps;var a=Dd(n,Ut.current);dd(n,t),a=iw(null,n,i,e,a,t);var r=aw();return n.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ui(i)?(r=!0,Bh(n)):r=!1,n.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ZF(n),a.updater=Dy,n.stateNode=a,a._reactInternals=n,_b(n,i,e,t),n=Ob(null,n,i,!0,r,t)):(n.tag=0,Dn&&r&&UF(n),Kt(null,n,a,t),n=n.child),n;case 16:i=n.elementType;e:{switch(Gp(e,n),e=n.pendingProps,a=i._init,i=a(i._payload),n.type=i,a=n.tag=YY(i),e=pa(i,e),a){case 0:n=Pb(null,n,i,e,t);break e;case 1:n=_C(null,n,i,e,t);break e;case 11:n=FC(null,n,i,e,t);break e;case 14:n=wC(null,n,i,pa(i.type,e),t);break e}throw Error(le(306,i,""))}return n;case 0:return i=n.type,a=n.pendingProps,a=n.elementType===i?a:pa(i,a),Pb(e,n,i,a,t);case 1:return i=n.type,a=n.pendingProps,a=n.elementType===i?a:pa(i,a),_C(e,n,i,a,t);case 3:e:{if(e5(n),e===null)throw Error(le(387));i=n.pendingProps,r=n.memoizedState,a=r.element,FM(e,n),Yh(n,i,null,t);var o=n.memoizedState;if(i=o.element,r.isDehydrated)if(r={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=r,n.memoizedState=r,n.flags&256){a=jd(Error(le(423)),n),n=CC(e,n,i,t,a);break e}else if(i!==a){a=jd(Error(le(424)),n),n=CC(e,n,i,t,a);break e}else for(Pi=Io(n.stateNode.containerInfo.firstChild),$i=n,Dn=!0,ga=null,t=PM(n,null,i,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Ed(),i===a){n=Ar(e,n,t);break e}Kt(e,n,i,t)}n=n.child}return n;case 5:return OM(n),e===null&&xb(n),i=n.type,a=n.pendingProps,r=e!==null?e.memoizedProps:null,o=a.children,gb(i,a)?o=null:r!==null&&gb(i,r)&&(n.flags|=32),JM(e,n),Kt(e,n,o,t),n.child;case 6:return e===null&&xb(n),null;case 13:return n5(e,n,t);case 4:return JF(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=$d(n,null,i,t):Kt(e,n,i,t),n.child;case 11:return i=n.type,a=n.pendingProps,a=n.elementType===i?a:pa(i,a),FC(e,n,i,a,t);case 7:return Kt(e,n,n.pendingProps,t),n.child;case 8:return Kt(e,n,n.pendingProps.children,t),n.child;case 12:return Kt(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(i=n.type._context,a=n.pendingProps,r=n.memoizedProps,o=a.value,Sn(Hh,i._currentValue),i._currentValue=o,r!==null)if(Oa(r.value,o)){if(r.children===a.children&&!ci.current){n=Ar(e,n,t);break e}}else for(r=n.child,r!==null&&(r.return=n);r!==null;){var l=r.dependencies;if(l!==null){o=r.child;for(var s=l.firstContext;s!==null;){if(s.context===i){if(r.tag===1){s=Dr(-1,t&-t),s.tag=2;var d=r.updateQueue;if(d!==null){d=d.shared;var c=d.pending;c===null?s.next=s:(s.next=c.next,c.next=s),d.pending=s}}r.lanes|=t,s=r.alternate,s!==null&&(s.lanes|=t),Fb(r.return,t,n),l.lanes|=t;break}s=s.next}}else if(r.tag===10)o=r.type===n.type?null:r.child;else if(r.tag===18){if(o=r.return,o===null)throw Error(le(341));o.lanes|=t,l=o.alternate,l!==null&&(l.lanes|=t),Fb(o,t,n),o=r.sibling}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===n){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}Kt(e,n,a.children,t),n=n.child}return n;case 9:return a=n.type,i=n.pendingProps.children,dd(n,t),a=na(a),i=i(a),n.flags|=1,Kt(e,n,i,t),n.child;case 14:return i=n.type,a=pa(i,n.pendingProps),a=pa(i.type,a),wC(e,n,i,a,t);case 15:return QM(e,n,n.type,n.pendingProps,t);case 17:return i=n.type,a=n.pendingProps,a=n.elementType===i?a:pa(i,a),Gp(e,n),n.tag=1,ui(i)?(e=!0,Bh(n)):e=!1,dd(n,t),_M(n,i,a),_b(n,i,a,t),Ob(null,n,i,!0,e,t);case 19:return t5(e,n,t);case 22:return ZM(e,n,t)}throw Error(le(156,n.tag))};function g5(e,n){return HR(e,n)}function UY(e,n,t,i){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ji(e,n,t,i){return new UY(e,n,t,i)}function pw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YY(e){if(typeof e=="function")return pw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===IF)return 11;if(e===jF)return 14}return 2}function Ro(e,n){var t=e.alternate;return t===null?(t=Ji(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Xp(e,n,t,i,a,r){var o=2;if(i=e,typeof e=="function")pw(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Us:return Wl(t.children,a,r,n);case $F:o=8,a|=8;break;case XN:return e=Ji(12,t,n,a|2),e.elementType=XN,e.lanes=r,e;case QN:return e=Ji(13,t,n,a),e.elementType=QN,e.lanes=r,e;case ZN:return e=Ji(19,t,n,a),e.elementType=ZN,e.lanes=r,e;case CR:return jy(t,a,r,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wR:o=10;break e;case _R:o=9;break e;case IF:o=11;break e;case jF:o=14;break e;case oo:o=16,i=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return n=Ji(o,t,n,a),n.elementType=e,n.type=i,n.lanes=r,n}function Wl(e,n,t,i){return e=Ji(7,e,i,n),e.lanes=t,e}function jy(e,n,t,i){return e=Ji(22,e,i,n),e.elementType=CR,e.lanes=t,e.stateNode={isHidden:!1},e}function f0(e,n,t){return e=Ji(6,e,null,n),e.lanes=t,e}function p0(e,n,t){return n=Ji(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function GY(e,n,t,i,a){this.tag=n,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=qS(0),this.expirationTimes=qS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qS(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function hw(e,n,t,i,a,r,o,l,s){return e=new GY(e,n,t,l,s),n===1?(n=1,r===!0&&(n|=8)):n=0,r=Ji(3,null,null,n),e.current=r,r.stateNode=e,r.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},ZF(r),e}function qY(e,n,t){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hs,key:i==null?null:""+i,children:e,containerInfo:n,implementation:t}}function y5(e){if(!e)return Wo;e=e._reactInternals;e:{if(ds(e)!==e||e.tag!==1)throw Error(le(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(ui(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(le(171))}if(e.tag===1){var t=e.type;if(ui(t))return gM(e,t,n)}return n}function S5(e,n,t,i,a,r,o,l,s){return e=hw(t,i,!0,e,a,r,o,l,s),e.context=y5(null),t=e.current,i=Zt(),a=Ao(t),r=Dr(i,a),r.callback=n??null,jo(t,r,a),e.current.lanes=a,zm(e,a,i),mi(e,i),e}function Ty(e,n,t,i){var a=n.current,r=Zt(),o=Ao(a);return t=y5(t),n.context===null?n.context=t:n.pendingContext=t,n=Dr(r,o),n.payload={element:e},i=i===void 0?null:i,i!==null&&(n.callback=i),e=jo(a,n,o),e!==null&&(xa(e,a,o,r),Hp(e,a,o)),o}function ev(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 RC(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<n?t:n}}function vw(e,n){RC(e,n),(e=e.alternate)&&RC(e,n)}function KY(){return null}var N5=typeof reportError=="function"?reportError:function(e){console.error(e)};function kw(e){this._internalRoot=e}Ay.prototype.render=kw.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(le(409));Ty(e,n,null,null)};Ay.prototype.unmount=kw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;es(function(){Ty(null,e,null,null)}),n[jr]=null}};function Ay(e){this._internalRoot=e}Ay.prototype.unstable_scheduleHydration=function(e){if(e){var n=QR();e={blockedOn:null,target:e,priority:n};for(var t=0;t<uo.length&&n!==0&&n<uo[t].priority;t++);uo.splice(t,0,e),t===0&&JR(e)}};function gw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ry(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function MC(){}function XY(e,n,t,i,a){if(a){if(typeof i=="function"){var r=i;i=function(){var d=ev(o);r.call(d)}}var o=S5(n,i,e,0,null,!1,!1,"",MC);return e._reactRootContainer=o,e[jr]=o.current,Ju(e.nodeType===8?e.parentNode:e),es(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var l=i;i=function(){var d=ev(s);l.call(d)}}var s=hw(e,0,!1,null,null,!1,!1,"",MC);return e._reactRootContainer=s,e[jr]=s.current,Ju(e.nodeType===8?e.parentNode:e),es(function(){Ty(n,s,t,i)}),s}function My(e,n,t,i,a){var r=t._reactRootContainer;if(r){var o=r;if(typeof a=="function"){var l=a;a=function(){var s=ev(o);l.call(s)}}Ty(n,o,e,a)}else o=XY(t,n,e,a,i);return ev(o)}KR=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var t=cu(n.pendingLanes);t!==0&&(RF(n,t|1),mi(n,Yn()),!(Ze&6)&&(Td=Yn()+500,Zo()))}break;case 13:es(function(){var i=Tr(e,1);if(i!==null){var a=Zt();xa(i,e,1,a)}}),vw(e,1)}};MF=function(e){if(e.tag===13){var n=Tr(e,134217728);if(n!==null){var t=Zt();xa(n,e,134217728,t)}vw(e,134217728)}};XR=function(e){if(e.tag===13){var n=Ao(e),t=Tr(e,n);if(t!==null){var i=Zt();xa(t,e,n,i)}vw(e,n)}};QR=function(){return ln};ZR=function(e,n){var t=ln;try{return ln=e,n()}finally{ln=t}};sb=function(e,n,t){switch(n){case"input":if(nb(e,t),n=t.name,t.type==="radio"&&n!=null){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<t.length;n++){var i=t[n];if(i!==e&&i.form===e.form){var a=Py(i);if(!a)throw Error(le(90));OR(i),nb(i,a)}}}break;case"textarea":ER(e,t);break;case"select":n=t.value,n!=null&&rd(e,!!t.multiple,n,!1)}};MR=uw;LR=es;var QY={usingClientEntryPoint:!1,Events:[Vm,Ks,Py,AR,RR,uw]},Ac={findFiberByHostInstance:El,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ZY={bundleType:Ac.bundleType,version:Ac.version,rendererPackageName:Ac.rendererPackageName,rendererConfig:Ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=VR(e),e===null?null:e.stateNode},findFiberByHostInstance:Ac.findFiberByHostInstance||KY,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tf.isDisabled&&Tf.supportsFiber)try{Fy=Tf.inject(ZY),tr=Tf}catch{}}Li.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QY;Li.createPortal=function(e,n){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gw(n))throw Error(le(200));return qY(e,n,null,t)};Li.createRoot=function(e,n){if(!gw(e))throw Error(le(299));var t=!1,i="",a=N5;return n!=null&&(n.unstable_strictMode===!0&&(t=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),n=hw(e,1,!1,null,null,t,!1,i,a),e[jr]=n.current,Ju(e.nodeType===8?e.parentNode:e),new kw(n)};Li.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(le(188)):(e=Object.keys(e).join(","),Error(le(268,e)));return e=VR(n),e=e===null?null:e.stateNode,e};Li.flushSync=function(e){return es(e)};Li.hydrate=function(e,n,t){if(!Ry(n))throw Error(le(200));return My(null,e,n,!0,t)};Li.hydrateRoot=function(e,n,t){if(!gw(e))throw Error(le(405));var i=t!=null&&t.hydratedSources||null,a=!1,r="",o=N5;if(t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),n=S5(n,null,e,1,t??null,a,!1,r,o),e[jr]=n.current,Ju(e),i)for(e=0;e<i.length;e++)t=i[e],a=t._getVersion,a=a(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a);return new Ay(n)};Li.render=function(e,n,t){if(!Ry(n))throw Error(le(200));return My(null,e,n,!1,t)};Li.unmountComponentAtNode=function(e){if(!Ry(e))throw Error(le(40));return e._reactRootContainer?(es(function(){My(null,null,e,!1,function(){e._reactRootContainer=null,e[jr]=null})}),!0):!1};Li.unstable_batchedUpdates=uw;Li.unstable_renderSubtreeIntoContainer=function(e,n,t,i){if(!Ry(t))throw Error(le(200));if(e==null||e._reactInternals===void 0)throw Error(le(38));return My(e,n,t,!1,i)};Li.version="18.2.0-next-9e3b772b8-20220608";function b5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b5)}catch(e){console.error(e)}}b5(),SR.exports=Li;var tc=SR.exports;const h0=Mm(tc);var x5,LC=tc;x5=LC.createRoot,LC.hydrateRoot;/**
 * @remix-run/router v1.15.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},sm.apply(this,arguments)}var No;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(No||(No={}));const zC="popstate";function JY(e){e===void 0&&(e={});function n(i,a){let{pathname:r,search:o,hash:l}=i.location;return Bb("",{pathname:r,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function t(i,a){return typeof a=="string"?a:nv(a)}return nG(n,t,null,e)}function Vn(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function F5(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function eG(){return Math.random().toString(36).substr(2,8)}function BC(e,n){return{usr:e.state,key:e.key,idx:n}}function Bb(e,n,t,i){return t===void 0&&(t=null),sm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ic(n):n,{state:t,key:n&&n.key||i||eG()})}function nv(e){let{pathname:n="/",search:t="",hash:i=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ic(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let i=e.indexOf("?");i>=0&&(n.search=e.substr(i),e=e.substr(0,i)),e&&(n.pathname=e)}return n}function nG(e,n,t,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:r=!1}=i,o=a.history,l=No.Pop,s=null,d=c();d==null&&(d=0,o.replaceState(sm({},o.state,{idx:d}),""));function c(){return(o.state||{idx:null}).idx}function u(){l=No.Pop;let y=c(),g=y==null?null:y-d;d=y,s&&s({action:l,location:k.location,delta:g})}function f(y,g){l=No.Push;let v=Bb(k.location,y,g);t&&t(v,y),d=c()+1;let N=BC(v,d),x=k.createHref(v);try{o.pushState(N,"",x)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;a.location.assign(x)}r&&s&&s({action:l,location:k.location,delta:1})}function p(y,g){l=No.Replace;let v=Bb(k.location,y,g);t&&t(v,y),d=c();let N=BC(v,d),x=k.createHref(v);o.replaceState(N,"",x),r&&s&&s({action:l,location:k.location,delta:0})}function h(y){let g=a.location.origin!=="null"?a.location.origin:a.location.href,v=typeof y=="string"?y:nv(y);return v=v.replace(/ $/,"%20"),Vn(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let k={get action(){return l},get location(){return e(a,o)},listen(y){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(zC,u),s=y,()=>{a.removeEventListener(zC,u),s=null}},createHref(y){return n(a,y)},createURL:h,encodeLocation(y){let g=h(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(y){return o.go(y)}};return k}var VC;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(VC||(VC={}));function tG(e,n,t){t===void 0&&(t="/");let i=typeof n=="string"?ic(n):n,a=yw(i.pathname||"/",t);if(a==null)return null;let r=w5(e);iG(r);let o=null;for(let l=0;o==null&&l<r.length;++l){let s=pG(a);o=mG(r[l],s)}return o}function w5(e,n,t,i){n===void 0&&(n=[]),t===void 0&&(t=[]),i===void 0&&(i="");let a=(r,o,l)=>{let s={relativePath:l===void 0?r.path||"":l,caseSensitive:r.caseSensitive===!0,childrenIndex:o,route:r};s.relativePath.startsWith("/")&&(Vn(s.relativePath.startsWith(i),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(i.length));let d=Mo([i,s.relativePath]),c=t.concat(s);r.children&&r.children.length>0&&(Vn(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),w5(r.children,n,c,d)),!(r.path==null&&!r.index)&&n.push({path:d,score:cG(d,r.index),routesMeta:c})};return e.forEach((r,o)=>{var l;if(r.path===""||!((l=r.path)!=null&&l.includes("?")))a(r,o);else for(let s of _5(r.path))a(r,o,s)}),n}function _5(e){let n=e.split("/");if(n.length===0)return[];let[t,...i]=n,a=t.endsWith("?"),r=t.replace(/\?$/,"");if(i.length===0)return a?[r,""]:[r];let o=_5(i.join("/")),l=[];return l.push(...o.map(s=>s===""?r:[r,s].join("/"))),a&&l.push(...o),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function iG(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:uG(n.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const aG=/^:[\w-]+$/,rG=3,oG=2,lG=1,sG=10,dG=-2,WC=e=>e==="*";function cG(e,n){let t=e.split("/"),i=t.length;return t.some(WC)&&(i+=dG),n&&(i+=oG),t.filter(a=>!WC(a)).reduce((a,r)=>a+(aG.test(r)?rG:r===""?lG:sG),i)}function uG(e,n){return e.length===n.length&&e.slice(0,-1).every((i,a)=>i===n[a])?e[e.length-1]-n[n.length-1]:0}function mG(e,n){let{routesMeta:t}=e,i={},a="/",r=[];for(let o=0;o<t.length;++o){let l=t[o],s=o===t.length-1,d=a==="/"?n:n.slice(a.length)||"/",c=C5({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},d);if(!c)return null;Object.assign(i,c.params);let u=l.route;r.push({params:i,pathname:Mo([a,c.pathname]),pathnameBase:gG(Mo([a,c.pathnameBase])),route:u}),c.pathnameBase!=="/"&&(a=Mo([a,c.pathnameBase]))}return r}function C5(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,i]=fG(e.path,e.caseSensitive,e.end),a=n.match(t);if(!a)return null;let r=a[0],o=r.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:i.reduce((d,c,u)=>{let{paramName:f,isOptional:p}=c;if(f==="*"){let k=l[u]||"";o=r.slice(0,r.length-k.length).replace(/(.)\/+$/,"$1")}const h=l[u];return p&&!h?d[f]=void 0:d[f]=(h||"").replace(/%2F/g,"/"),d},{}),pathname:r,pathnameBase:o,pattern:e}}function fG(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),F5(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 i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,s)=>(i.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,n?void 0:"i"),i]}function pG(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return F5(!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 ("+n+").")),e}}function yw(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,i=e.charAt(t);return i&&i!=="/"?null:e.slice(t)||"/"}function hG(e,n){n===void 0&&(n="/");let{pathname:t,search:i="",hash:a=""}=typeof e=="string"?ic(e):e;return{pathname:t?t.startsWith("/")?t:vG(t,n):n,search:yG(i),hash:SG(a)}}function vG(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?t.length>1&&t.pop():a!=="."&&t.push(a)}),t.length>1?t.join("/"):"/"}function v0(e,n,t,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(i)+"].  Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function kG(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Sw(e,n){let t=kG(e);return n?t.map((i,a)=>a===e.length-1?i.pathname:i.pathnameBase):t.map(i=>i.pathnameBase)}function Nw(e,n,t,i){i===void 0&&(i=!1);let a;typeof e=="string"?a=ic(e):(a=sm({},e),Vn(!a.pathname||!a.pathname.includes("?"),v0("?","pathname","search",a)),Vn(!a.pathname||!a.pathname.includes("#"),v0("#","pathname","hash",a)),Vn(!a.search||!a.search.includes("#"),v0("#","search","hash",a)));let r=e===""||a.pathname==="",o=r?"/":a.pathname,l;if(o==null)l=t;else{let u=n.length-1;if(!i&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;a.pathname=f.join("/")}l=u>=0?n[u]:"/"}let s=hG(a,l),d=o&&o!=="/"&&o.endsWith("/"),c=(r||o===".")&&t.endsWith("/");return!s.pathname.endsWith("/")&&(d||c)&&(s.pathname+="/"),s}const Mo=e=>e.join("/").replace(/\/\/+/g,"/"),gG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SG=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function NG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const P5=["post","put","patch","delete"];new Set(P5);const bG=["get",...P5];new Set(bG);/**
 * React Router v6.22.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function dm(){return dm=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},dm.apply(this,arguments)}const bw=S.createContext(null),xG=S.createContext(null),Jo=S.createContext(null),Ly=S.createContext(null),el=S.createContext({outlet:null,matches:[],isDataRoute:!1}),O5=S.createContext(null);function FG(e,n){let{relative:t}=n===void 0?{}:n;cs()||Vn(!1);let{basename:i,navigator:a}=S.useContext(Jo),{hash:r,pathname:o,search:l}=xw(e,{relative:t}),s=o;return i!=="/"&&(s=o==="/"?i:Mo([i,o])),a.createHref({pathname:s,search:l,hash:r})}function cs(){return S.useContext(Ly)!=null}function nl(){return cs()||Vn(!1),S.useContext(Ly).location}function wG(e){cs()||Vn(!1);let{pathname:n}=nl();return S.useMemo(()=>C5(e,n),[n,e])}function D5(e){S.useContext(Jo).static||S.useLayoutEffect(e)}function ac(){let{isDataRoute:e}=S.useContext(el);return e?MG():_G()}function _G(){cs()||Vn(!1);let e=S.useContext(bw),{basename:n,future:t,navigator:i}=S.useContext(Jo),{matches:a}=S.useContext(el),{pathname:r}=nl(),o=JSON.stringify(Sw(a,t.v7_relativeSplatPath)),l=S.useRef(!1);return D5(()=>{l.current=!0}),S.useCallback(function(d,c){if(c===void 0&&(c={}),!l.current)return;if(typeof d=="number"){i.go(d);return}let u=Nw(d,JSON.parse(o),r,c.relative==="path");e==null&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Mo([n,u.pathname])),(c.replace?i.replace:i.push)(u,c.state,c)},[n,i,o,r,e])}function xw(e,n){let{relative:t}=n===void 0?{}:n,{future:i}=S.useContext(Jo),{matches:a}=S.useContext(el),{pathname:r}=nl(),o=JSON.stringify(Sw(a,i.v7_relativeSplatPath));return S.useMemo(()=>Nw(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function CG(e,n){return PG(e,n)}function PG(e,n,t,i){cs()||Vn(!1);let{navigator:a}=S.useContext(Jo),{matches:r}=S.useContext(el),o=r[r.length-1],l=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let d=nl(),c;if(n){var u;let y=typeof n=="string"?ic(n):n;s==="/"||(u=y.pathname)!=null&&u.startsWith(s)||Vn(!1),c=y}else c=d;let f=c.pathname||"/",p=f;if(s!=="/"){let y=s.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let h=tG(e,{pathname:p}),k=IG(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Mo([s,a.encodeLocation?a.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Mo([s,a.encodeLocation?a.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),r,t,i);return n&&k?S.createElement(Ly.Provider,{value:{location:dm({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:No.Pop}},k):k}function OG(){let e=RG(),n=NG(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,a={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"}},n),t?S.createElement("pre",{style:a},t):null,null)}const DG=S.createElement(OG,null);class EG extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error!==void 0?S.createElement(el.Provider,{value:this.props.routeContext},S.createElement(O5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $G(e){let{routeContext:n,match:t,children:i}=e,a=S.useContext(bw);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(el.Provider,{value:n},i)}function IG(e,n,t,i){var a;if(n===void 0&&(n=[]),t===void 0&&(t=null),i===void 0&&(i=null),e==null){var r;if((r=t)!=null&&r.errors)e=t.matches;else return null}let o=e,l=(a=t)==null?void 0:a.errors;if(l!=null){let c=o.findIndex(u=>u.route.id&&(l==null?void 0:l[u.route.id]));c>=0||Vn(!1),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,d=-1;if(t&&i&&i.v7_partialHydration)for(let c=0;c<o.length;c++){let u=o[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(d=c),u.route.id){let{loaderData:f,errors:p}=t,h=u.route.loader&&f[u.route.id]===void 0&&(!p||p[u.route.id]===void 0);if(u.route.lazy||h){s=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((c,u,f)=>{let p,h=!1,k=null,y=null;t&&(p=l&&u.route.id?l[u.route.id]:void 0,k=u.route.errorElement||DG,s&&(d<0&&f===0?(LG("route-fallback",!1),h=!0,y=null):d===f&&(h=!0,y=u.route.hydrateFallbackElement||null)));let g=n.concat(o.slice(0,f+1)),v=()=>{let N;return p?N=k:h?N=y:u.route.Component?N=S.createElement(u.route.Component,null):u.route.element?N=u.route.element:N=c,S.createElement($G,{match:u,routeContext:{outlet:c,matches:g,isDataRoute:t!=null},children:N})};return t&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?S.createElement(EG,{location:t.location,revalidation:t.revalidation,component:k,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var E5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(E5||{}),tv=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}(tv||{});function jG(e){let n=S.useContext(bw);return n||Vn(!1),n}function TG(e){let n=S.useContext(xG);return n||Vn(!1),n}function AG(e){let n=S.useContext(el);return n||Vn(!1),n}function $5(e){let n=AG(),t=n.matches[n.matches.length-1];return t.route.id||Vn(!1),t.route.id}function RG(){var e;let n=S.useContext(O5),t=TG(tv.UseRouteError),i=$5(tv.UseRouteError);return n!==void 0?n:(e=t.errors)==null?void 0:e[i]}function MG(){let{router:e}=jG(E5.UseNavigateStable),n=$5(tv.UseNavigateStable),t=S.useRef(!1);return D5(()=>{t.current=!0}),S.useCallback(function(a,r){r===void 0&&(r={}),t.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,dm({fromRouteId:n},r)))},[e,n])}const HC={};function LG(e,n,t){!n&&!HC[e]&&(HC[e]=!0)}function zG(e){let{to:n,replace:t,state:i,relative:a}=e;cs()||Vn(!1);let{future:r,static:o}=S.useContext(Jo),{matches:l}=S.useContext(el),{pathname:s}=nl(),d=ac(),c=Nw(n,Sw(l,r.v7_relativeSplatPath),s,a==="path"),u=JSON.stringify(c);return S.useEffect(()=>d(JSON.parse(u),{replace:t,state:i,relative:a}),[d,u,a,t,i]),null}function ri(e){Vn(!1)}function BG(e){let{basename:n="/",children:t=null,location:i,navigationType:a=No.Pop,navigator:r,static:o=!1,future:l}=e;cs()&&Vn(!1);let s=n.replace(/^\/*/,"/"),d=S.useMemo(()=>({basename:s,navigator:r,static:o,future:dm({v7_relativeSplatPath:!1},l)}),[s,l,r,o]);typeof i=="string"&&(i=ic(i));let{pathname:c="/",search:u="",hash:f="",state:p=null,key:h="default"}=i,k=S.useMemo(()=>{let y=yw(c,s);return y==null?null:{location:{pathname:y,search:u,hash:f,state:p,key:h},navigationType:a}},[s,c,u,f,p,h,a]);return k==null?null:S.createElement(Jo.Provider,{value:d},S.createElement(Ly.Provider,{children:t,value:k}))}function I5(e){let{children:n,location:t}=e;return CG(Vb(n),t)}new Promise(()=>{});function Vb(e,n){n===void 0&&(n=[]);let t=[];return S.Children.forEach(e,(i,a)=>{if(!S.isValidElement(i))return;let r=[...n,a];if(i.type===S.Fragment){t.push.apply(t,Vb(i.props.children,r));return}i.type!==ri&&Vn(!1),!i.props.index||!i.props.children||Vn(!1);let o={id:i.props.id||r.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=Vb(i.props.children,r)),t.push(o)}),t}/**
 * React Router DOM v6.22.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Wb(){return Wb=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wb.apply(this,arguments)}function VG(e,n){if(e==null)return{};var t={},i=Object.keys(e),a,r;for(r=0;r<i.length;r++)a=i[r],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}function WG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HG(e,n){return e.button===0&&(!n||n==="_self")&&!WG(e)}const UG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],YG="6";try{window.__reactRouterVersion=YG}catch{}const GG="startTransition",UC=Hu[GG];function qG(e){let{basename:n,children:t,future:i,window:a}=e,r=S.useRef();r.current==null&&(r.current=JY({window:a,v5Compat:!0}));let o=r.current,[l,s]=S.useState({action:o.action,location:o.location}),{v7_startTransition:d}=i||{},c=S.useCallback(u=>{d&&UC?UC(()=>s(u)):s(u)},[s,d]);return S.useLayoutEffect(()=>o.listen(c),[o,c]),S.createElement(BG,{basename:n,children:t,location:l.location,navigationType:l.action,navigator:o,future:i})}const KG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,j5=S.forwardRef(function(n,t){let{onClick:i,relative:a,reloadDocument:r,replace:o,state:l,target:s,to:d,preventScrollReset:c,unstable_viewTransition:u}=n,f=VG(n,UG),{basename:p}=S.useContext(Jo),h,k=!1;if(typeof d=="string"&&XG.test(d)&&(h=d,KG))try{let N=new URL(window.location.href),x=d.startsWith("//")?new URL(N.protocol+d):new URL(d),F=yw(x.pathname,p);x.origin===N.origin&&F!=null?d=F+x.search+x.hash:k=!0}catch{}let y=FG(d,{relative:a}),g=QG(d,{replace:o,state:l,target:s,preventScrollReset:c,relative:a,unstable_viewTransition:u});function v(N){i&&i(N),N.defaultPrevented||g(N)}return S.createElement("a",Wb({},f,{href:h||y,onClick:k||r?i:v,ref:t,target:s}))});var YC;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(YC||(YC={}));var GC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(GC||(GC={}));function QG(e,n){let{target:t,replace:i,state:a,preventScrollReset:r,relative:o,unstable_viewTransition:l}=n===void 0?{}:n,s=ac(),d=nl(),c=xw(e,{relative:o});return S.useCallback(u=>{if(HG(u,t)){u.preventDefault();let f=i!==void 0?i:nv(d)===nv(c);s(e,{replace:f,state:a,preventScrollReset:r,relative:o,unstable_viewTransition:l})}},[d,s,c,i,a,t,e,r,o,l])}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Me.apply(this,arguments)}function ZG(e,n){if(e==null)return{};var t={},i=Object.keys(e),a,r;for(r=0;r<i.length;r++)a=i[r],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}function Ve(e,n){if(e==null)return{};var t=ZG(e,n),i,a;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)i=r[a],!(n.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}var JG=["size","color"];function eq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,JG);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-big-right-lines",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M12 9v-3.586a1 1 0 0 1 1.707 -.707l6.586 6.586a1 1 0 0 1 0 1.414l-6.586 6.586a1 1 0 0 1 -1.707 -.707v-3.586h-3v-6h3z"}),b.createElement("path",{d:"M3 9v6"}),b.createElement("path",{d:"M6 9v6"}))}var nq=["size","color"];function T5(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,nq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-join-2",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M3 7h1.948c1.913 0 3.705 .933 4.802 2.5a5.861 5.861 0 0 0 4.802 2.5h6.448"}),b.createElement("path",{d:"M3 17h1.95a5.854 5.854 0 0 0 4.798 -2.5a5.854 5.854 0 0 1 4.798 -2.5h5.454"}),b.createElement("path",{d:"M18 15l3 -3l-3 -3"}))}var tq=["size","color"];function qC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,tq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-barcode",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 7v-1a2 2 0 0 1 2 -2h2"}),b.createElement("path",{d:"M4 17v1a2 2 0 0 0 2 2h2"}),b.createElement("path",{d:"M16 4h2a2 2 0 0 1 2 2v1"}),b.createElement("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-1"}),b.createElement("rect",{x:"5",y:"11",width:"1",height:"2"}),b.createElement("line",{x1:"10",y1:"11",x2:"10",y2:"13"}),b.createElement("rect",{x:"14",y:"11",width:"1",height:"2"}),b.createElement("line",{x1:"19",y1:"11",x2:"19",y2:"13"}))}var iq=["size","color"];function KC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,iq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-bookmark",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M9 4h6a2 2 0 0 1 2 2v14l-5 -3l-5 3v-14a2 2 0 0 1 2 -2"}))}var aq=["size","color"];function XC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,aq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-calendar-event",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),b.createElement("line",{x1:"16",y1:"3",x2:"16",y2:"7"}),b.createElement("line",{x1:"8",y1:"3",x2:"8",y2:"7"}),b.createElement("line",{x1:"4",y1:"11",x2:"20",y2:"11"}),b.createElement("rect",{x:"8",y:"15",width:"2",height:"2"}))}var rq=["size","color"];function oq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,rq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-check",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M5 12l5 5l10 -10"}))}var lq=["size","color"];function Hb(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,lq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-coin",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("circle",{cx:"12",cy:"12",r:"9"}),b.createElement("path",{d:"M14.8 9a2 2 0 0 0 -1.8 -1h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1 -1.8 -1"}),b.createElement("path",{d:"M12 7v10"}))}var sq=["size","color"];function us(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,sq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-copy",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"}),b.createElement("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"}))}var dq=["size","color"];function cq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,dq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-edit",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"}),b.createElement("path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"}),b.createElement("path",{d:"M16 5l3 3"}))}var uq=["size","color"];function mq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,uq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-file-download",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),b.createElement("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}),b.createElement("path",{d:"M12 17v-6"}),b.createElement("path",{d:"M9.5 14.5l2.5 2.5l2.5 -2.5"}))}var fq=["size","color"];function QC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,fq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-file-unknown",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),b.createElement("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}),b.createElement("path",{d:"M12 17v.01"}),b.createElement("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"}))}var pq=["size","color"];function hq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,pq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-file-upload",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),b.createElement("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}),b.createElement("path",{d:"M12 11v6"}),b.createElement("path",{d:"M9.5 13.5l2.5 -2.5l2.5 2.5"}))}var vq=["size","color"];function ZC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,vq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-file",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),b.createElement("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}))}var kq=["size","color"];function rc(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,kq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-filter",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M5.5 5h13a1 1 0 0 1 .5 1.5l-5 5.5l0 7l-4 -3l0 -4l-5 -5.5a1 1 0 0 1 .5 -1.5"}))}var gq=["size","color"];function yq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,gq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-gift",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("rect",{x:"3",y:"8",width:"18",height:"4",rx:"1"}),b.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"21"}),b.createElement("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),b.createElement("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"}))}var Sq=["size","color"];function ja(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Sq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-layout-navbar-collapse",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),b.createElement("path",{d:"M4 9h16"}),b.createElement("path",{d:"M10 16l2 -2l2 2"}))}var Nq=["size","color"];function Ta(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Nq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-layout-navbar-expand",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),b.createElement("path",{d:"M4 9h16"}),b.createElement("path",{d:"M10 14l2 2l2 -2"}))}var bq=["size","color"];function xq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,bq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-logout",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),b.createElement("path",{d:"M7 12h14l-3 -3m0 6l3 -3"}))}var Fq=["size","color"];function A5(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Fq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-photo",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("line",{x1:"15",y1:"8",x2:"15.01",y2:"8"}),b.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3"}),b.createElement("path",{d:"M4 15l4 -4a3 5 0 0 1 3 0l5 5"}),b.createElement("path",{d:"M14 14l1 -1a3 5 0 0 1 3 0l2 2"}))}var wq=["size","color"];function _q(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,wq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-plane",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M16 10h4a2 2 0 0 1 0 4h-4l-4 7h-3l2 -7h-4l-2 2h-3l2 -4l-2 -4h3l2 2h4l-2 -7h3z"}))}var Cq=["size","color"];function Fw(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Cq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-playlist-add",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M19 8h-14"}),b.createElement("path",{d:"M5 12h9"}),b.createElement("path",{d:"M11 16h-6"}),b.createElement("path",{d:"M15 16h6"}),b.createElement("path",{d:"M18 13v6"}))}var Pq=["size","color"];function R5(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Pq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-plug-connected-x",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M20 16l-4 4"}),b.createElement("path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"}),b.createElement("path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"}),b.createElement("path",{d:"M3 21l2.5 -2.5"}),b.createElement("path",{d:"M18.5 5.5l2.5 -2.5"}),b.createElement("path",{d:"M10 11l-2 2"}),b.createElement("path",{d:"M13 14l-2 2"}),b.createElement("path",{d:"M16 16l4 4"}))}var Oq=["size","color"];function Dq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Oq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-plus",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),b.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))}var Eq=["size","color"];function $q(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Eq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-receipt-tax",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("line",{x1:"9",y1:"14",x2:"15",y2:"8"}),b.createElement("circle",{cx:"9.5",cy:"8.5",r:".5",fill:"currentColor"}),b.createElement("circle",{cx:"14.5",cy:"13.5",r:".5",fill:"currentColor"}),b.createElement("path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2"}))}var Iq=["size","color"];function jq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Iq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-refresh-dot",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),b.createElement("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"}),b.createElement("circle",{cx:"12",cy:"12",r:"1"}))}var Tq=["size","color"];function Aq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Tq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-report",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697"}),b.createElement("path",{d:"M18 14v4h4"}),b.createElement("path",{d:"M18 11v-4a2 2 0 0 0 -2 -2h-2"}),b.createElement("rect",{x:"8",y:"3",width:"6",height:"4",rx:"2"}),b.createElement("circle",{cx:"18",cy:"18",r:"4"}),b.createElement("path",{d:"M8 11h4"}),b.createElement("path",{d:"M8 15h3"}))}var Rq=["size","color"];function Mq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Rq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-row-insert-top",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z"}),b.createElement("path",{d:"M12 9v-4"}),b.createElement("line",{x1:"10",y1:"7",x2:"14",y2:"7"}))}var Lq=["size","color"];function zq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Lq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-search",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("circle",{cx:"10",cy:"10",r:"7"}),b.createElement("line",{x1:"21",y1:"21",x2:"15",y2:"15"}))}var Bq=["size","color"];function JC(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Bq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-square-check",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),b.createElement("path",{d:"M9 12l2 2l4 -4"}))}var Vq=["size","color"];function eP(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Vq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-square-x",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),b.createElement("path",{d:"M10 10l4 4m0 -4l-4 4"}))}var Wq=["size","color"];function Hq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Wq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-transfer-in",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 18v3h16v-14l-8 -4l-8 4v3"}),b.createElement("path",{d:"M4 14h9"}),b.createElement("path",{d:"M10 11l3 3l-3 3"}))}var Uq=["size","color"];function Yq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Uq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-transform",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M5 13v.875c0 3.383 2.686 6.125 6 6.125"}),b.createElement("circle",{cx:"6",cy:"6",r:"3"}),b.createElement("circle",{cx:"18",cy:"18",r:"3"}),b.createElement("path",{d:"M16 9l2 2l2 -2"}),b.createElement("path",{d:"M18 10v-.875c0 -3.383 -2.686 -6.125 -6 -6.125"}),b.createElement("path",{d:"M3 15l2 -2l2 2"}))}var Gq=["size","color"];function M5(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Gq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-trash-x",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M4 7h16"}),b.createElement("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),b.createElement("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),b.createElement("path",{d:"M10 12l4 4m0 -4l-4 4"}))}var qq=["size","color"];function L5(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,qq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-trash",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),b.createElement("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),b.createElement("line",{x1:"14",y1:"11",x2:"14",y2:"17"}),b.createElement("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),b.createElement("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}))}var Kq=["size","color"];function Xq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Kq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-wallet",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M17 8v-3a1 1 0 0 0 -1 -1h-10a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1 -1 1h-12a2 2 0 0 1 -2 -2v-12"}),b.createElement("path",{d:"M20 12v4h-4a2 2 0 0 1 0 -4h4"}))}var Qq=["size","color"];function Zq(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Qq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-world-upload",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M21 12a9 9 0 1 0 -9 9"}),b.createElement("path",{d:"M3.6 9h16.8"}),b.createElement("path",{d:"M3.6 15h8.4"}),b.createElement("path",{d:"M11.578 3a17 17 0 0 0 0 18"}),b.createElement("path",{d:"M12.5 3c1.719 2.755 2.5 5.876 2.5 9"}),b.createElement("path",{d:"M18 21v-7m3 3l-3 -3l-3 3"}))}var Jq=["size","color"];function eK(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,Jq);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-zoom-in-area",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M15 13v4"}),b.createElement("path",{d:"M13 15h4"}),b.createElement("circle",{cx:"15",cy:"15",r:"5"}),b.createElement("path",{d:"M22 22l-3 -3"}),b.createElement("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),b.createElement("path",{d:"M3 11v-1"}),b.createElement("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),b.createElement("path",{d:"M10 3h1"}),b.createElement("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"}))}var nK=["size","color"];function tK(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,nK);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-zoom-in",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("circle",{cx:"10",cy:"10",r:"7"}),b.createElement("line",{x1:"7",y1:"10",x2:"13",y2:"10"}),b.createElement("line",{x1:"10",y1:"7",x2:"10",y2:"13"}),b.createElement("line",{x1:"21",y1:"21",x2:"15",y2:"15"}))}var iK=["size","color"];function aK(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,iK);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-zoom-out-area",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("path",{d:"M13 15h4"}),b.createElement("circle",{cx:"15",cy:"15",r:"5"}),b.createElement("path",{d:"M22 22l-3 -3"}),b.createElement("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),b.createElement("path",{d:"M3 11v-1"}),b.createElement("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),b.createElement("path",{d:"M10 3h1"}),b.createElement("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"}))}var rK=["size","color"];function oK(e){var n=e.size,t=n===void 0?24:n,i=e.color,a=i===void 0?"currentColor":i,r=Ve(e,rK);return b.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-zoom-out",width:t,height:t,viewBox:"0 0 24 24",stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),b.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.createElement("circle",{cx:"10",cy:"10",r:"7"}),b.createElement("line",{x1:"7",y1:"10",x2:"13",y2:"10"}),b.createElement("line",{x1:"21",y1:"21",x2:"15",y2:"15"}))}var lK={NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType"};let Ub=class extends Error{constructor(n,t,i,a,r,o,l){super(n),this.name="GraphQLError",this.message=n,r&&(this.path=r),t&&(this.nodes=Array.isArray(t)?t:[t]),i&&(this.source=i),a&&(this.positions=a),o&&(this.originalError=o);var s=l;if(!s&&o){var d=o.extensions;d&&typeof d=="object"&&(s=d)}this.extensions=s||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}};var Fn,ze;function nt(e){return new Ub(`Syntax Error: Unexpected token at ${ze} in ${e}`)}function _i(e){if(e.lastIndex=ze,e.test(Fn))return Fn.slice(ze,ze=e.lastIndex)}var Af=/ +(?=[^\s])/y;function sK(e){for(var n=e.split(`
`),t="",i=0,a=0,r=n.length-1,o=0;o<n.length;o++)Af.lastIndex=0,Af.test(n[o])&&(o&&(!i||Af.lastIndex<i)&&(i=Af.lastIndex),a=a||o,r=o);for(var l=a;l<=r;l++)l!==a&&(t+=`
`),t+=n[l].slice(i).replace(/\\"""/g,'"""');return t}function We(){for(var e=0|Fn.charCodeAt(ze++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|Fn.charCodeAt(ze++))if(e===35)for(;(e=Fn.charCodeAt(ze++))!==10&&e!==13;);ze--}var z5=/[_A-Za-z]\w*/y;function or(){var e;if(e=_i(z5))return{kind:"Name",value:e}}var dK=/(?:null|true|false)/y,B5=/\$[_A-Za-z]\w*/y,cK=/-?\d+/y,uK=/(?:\.\d+)?[eE][+-]?\d+|\.\d+/y,mK=/\\/g,fK=/"""(?:"""|(?:[\s\S]*?[^\\])""")/y,pK=/"(?:"|[^\r\n]*?[^\\]")/y;function iv(e){var n,t;if(t=_i(dK))n=t==="null"?{kind:"NullValue"}:{kind:"BooleanValue",value:t==="true"};else if(!e&&(t=_i(B5)))n={kind:"Variable",name:{kind:"Name",value:t.slice(1)}};else if(t=_i(cK)){var i=t;(t=_i(uK))?n={kind:"FloatValue",value:i+t}:n={kind:"IntValue",value:i}}else if(t=_i(z5))n={kind:"EnumValue",value:t};else if(t=_i(fK))n={kind:"StringValue",value:sK(t.slice(3,-3)),block:!0};else if(t=_i(pK))n={kind:"StringValue",value:mK.test(t)?JSON.parse(t):t.slice(1,-1),block:!1};else if(n=function(r){var o;if(Fn.charCodeAt(ze)===91){ze++,We();for(var l=[];o=iv(r);)l.push(o);if(Fn.charCodeAt(ze++)!==93)throw nt("ListValue");return We(),{kind:"ListValue",values:l}}}(e)||function(r){if(Fn.charCodeAt(ze)===123){ze++,We();for(var o=[],l;l=or();){if(We(),Fn.charCodeAt(ze++)!==58)throw nt("ObjectField");We();var s=iv(r);if(!s)throw nt("ObjectField");o.push({kind:"ObjectField",name:l,value:s})}if(Fn.charCodeAt(ze++)!==125)throw nt("ObjectValue");return We(),{kind:"ObjectValue",fields:o}}}(e))return n;return We(),n}function V5(e){var n=[];if(We(),Fn.charCodeAt(ze)===40){ze++,We();for(var t;t=or();){if(We(),Fn.charCodeAt(ze++)!==58)throw nt("Argument");We();var i=iv(e);if(!i)throw nt("Argument");n.push({kind:"Argument",name:t,value:i})}if(!n.length||Fn.charCodeAt(ze++)!==41)throw nt("Argument");We()}return n}function Ad(e){var n=[];for(We();Fn.charCodeAt(ze)===64;){ze++;var t=or();if(!t)throw nt("Directive");We(),n.push({kind:"Directive",name:t,arguments:V5(e)})}return n}function hK(){var e=or();if(e){We();var n;if(Fn.charCodeAt(ze)===58){if(ze++,We(),n=e,!(e=or()))throw nt("Field");We()}return{kind:"Field",alias:n,name:e,arguments:V5(!1),directives:Ad(!1),selectionSet:zy()}}}function W5(){var e;if(We(),Fn.charCodeAt(ze)===91){ze++,We();var n=W5();if(!n||Fn.charCodeAt(ze++)!==93)throw nt("ListType");e={kind:"ListType",type:n}}else if(e=or())e={kind:"NamedType",name:e};else throw nt("NamedType");return We(),Fn.charCodeAt(ze)===33?(ze++,We(),{kind:"NonNullType",type:e}):e}var vK=/on/y;function H5(){if(_i(vK)){We();var e=or();if(!e)throw nt("NamedType");return We(),{kind:"NamedType",name:e}}}var kK=/\.\.\./y;function gK(){if(_i(kK)){We();var e=ze,n;if((n=or())&&n.value!=="on")return{kind:"FragmentSpread",name:n,directives:Ad(!1)};ze=e;var t=H5(),i=Ad(!1),a=zy();if(!a)throw nt("InlineFragment");return{kind:"InlineFragment",typeCondition:t,directives:i,selectionSet:a}}}function zy(){var e;if(We(),Fn.charCodeAt(ze)===123){ze++,We();for(var n=[];e=gK()||hK();)n.push(e);if(!n.length||Fn.charCodeAt(ze++)!==125)throw nt("SelectionSet");return We(),{kind:"SelectionSet",selections:n}}}var yK=/fragment/y;function SK(){if(_i(yK)){We();var e=or();if(!e)throw nt("FragmentDefinition");We();var n=H5();if(!n)throw nt("FragmentDefinition");var t=Ad(!1),i=zy();if(!i)throw nt("FragmentDefinition");return{kind:"FragmentDefinition",name:e,typeCondition:n,directives:t,selectionSet:i}}}var NK=/(?:query|mutation|subscription)/y;function bK(){var e,n,t=[],i=[];(e=_i(NK))&&(We(),n=or(),t=function(){var o,l=[];if(We(),Fn.charCodeAt(ze)===40){for(ze++,We();o=_i(B5);){if(We(),Fn.charCodeAt(ze++)!==58)throw nt("VariableDefinition");var s=W5(),d=void 0;if(Fn.charCodeAt(ze)===61&&(ze++,We(),!(d=iv(!0))))throw nt("VariableDefinition");We(),l.push({kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:o.slice(1)}},type:s,defaultValue:d,directives:Ad(!0)})}if(Fn.charCodeAt(ze++)!==41)throw nt("VariableDefinition");We()}return l}(),i=Ad(!1));var a=zy();if(a)return{kind:"OperationDefinition",operation:e||"query",name:n,variableDefinitions:t,directives:i,selectionSet:a}}function xK(e,n){return Fn=typeof e.body=="string"?e.body:e,ze=0,function(){var i;We();for(var a=[];i=SK()||bK();)a.push(i);return{kind:"Document",definitions:a}}()}function FK(e){return JSON.stringify(e)}function wK(e){return`"""
`+e.replace(/"""/g,'\\"""')+`
"""`}var Wi=e=>!(!e||!e.length),Mt={OperationDefinition(e){if(e.operation==="query"&&!e.name&&!Wi(e.variableDefinitions)&&!Wi(e.directives))return Mt.SelectionSet(e.selectionSet);var n=e.operation;return e.name&&(n+=" "+e.name.value),Wi(e.variableDefinitions)&&(e.name||(n+=" "),n+="("+e.variableDefinitions.map(Mt.VariableDefinition).join(", ")+")"),Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),n+" "+Mt.SelectionSet(e.selectionSet)},VariableDefinition(e){var n=Mt.Variable(e.variable)+": "+Ui(e.type);return e.defaultValue&&(n+=" = "+Ui(e.defaultValue)),Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),n},Field(e){var n=(e.alias?e.alias.value+": ":"")+e.name.value;if(Wi(e.arguments)){var t=e.arguments.map(Mt.Argument),i=n+"("+t.join(", ")+")";n=i.length>80?n+`(
  `+t.join(`
`).replace(/\n/g,`
  `)+`
)`:i}return Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),e.selectionSet?n+" "+Mt.SelectionSet(e.selectionSet):n},StringValue:e=>e.block?wK(e.value):FK(e.value),BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+e.values.map(Ui).join(", ")+"]",ObjectValue:e=>"{"+e.fields.map(Mt.ObjectField).join(", ")+"}",ObjectField:e=>e.name.value+": "+Ui(e.value),Document:e=>Wi(e.definitions)?e.definitions.map(Ui).join(`

`):"",SelectionSet:e=>`{
  `+e.selections.map(Ui).join(`
`).replace(/\n/g,`
  `)+`
}`,Argument:e=>e.name.value+": "+Ui(e.value),FragmentSpread(e){var n="..."+e.name.value;return Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),n},InlineFragment(e){var n="...";return e.typeCondition&&(n+=" on "+e.typeCondition.name.value),Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),n+" "+Ui(e.selectionSet)},FragmentDefinition(e){var n="fragment "+e.name.value;return n+=" on "+e.typeCondition.name.value,Wi(e.directives)&&(n+=" "+e.directives.map(Mt.Directive).join(" ")),n+" "+Ui(e.selectionSet)},Directive(e){var n="@"+e.name.value;return Wi(e.arguments)&&(n+="("+e.arguments.map(Mt.Argument).join(", ")+")"),n},NamedType:e=>e.name.value,ListType:e=>"["+Ui(e.type)+"]",NonNullType:e=>Ui(e.type)+"!"};function Ui(e){return Mt[e.kind]?Mt[e.kind](e):""}var ww=()=>{},Ii=ww;function Aa(e){return{tag:0,0:e}}function Hm(e){return{tag:1,0:e}}var nP=()=>typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator",_K=e=>e;function di(e){return n=>t=>{var i=Ii;n(a=>{a===0?t(0):a.tag===0?(i=a[0],t(a)):e(a[0])?t(a):i(0)})}}function Yb(e){return n=>t=>n(i=>{i===0||i.tag===0?t(i):t(Hm(e(i[0])))})}function av(e){return n=>t=>{var i=[],a=Ii,r=!1,o=!1;n(l=>{o||(l===0?(o=!0,i.length||t(0)):l.tag===0?a=l[0]:(r=!1,function(d){var c=Ii;d(u=>{if(u===0){if(i.length){var f=i.indexOf(c);f>-1&&(i=i.slice()).splice(f,1),i.length||(o?t(0):r||(r=!0,a(0)))}}else u.tag===0?(i.push(c=u[0]),c(0)):i.length&&(t(u),c(0))})}(e(l[0])),r||(r=!0,a(0))))}),t(Aa(l=>{if(l===1){o||(o=!0,a(1));for(var s=0,d=i,c=i.length;s<c;s++)d[s](1);i.length=0}else{!o&&!r?(r=!0,a(0)):r=!1;for(var u=0,f=i,p=i.length;u<p;u++)f[u](0)}}))}}function CK(e){return av(_K)(e)}function cm(e){return CK(DK(e))}function _w(e){return n=>t=>{var i=!1;n(a=>{if(!i)if(a===0)i=!0,t(0),e();else if(a.tag===0){var r=a[0];t(Aa(o=>{o===1?(i=!0,r(1),e()):r(o)}))}else t(a)})}}function rv(e){return n=>t=>{var i=!1;n(a=>{if(!i)if(a===0)i=!0,t(0);else if(a.tag===0){var r=a[0];t(Aa(o=>{o===1&&(i=!0),r(o)}))}else e(a[0]),t(a)})}}function Gb(e){return n=>t=>n(i=>{i===0?t(0):i.tag===0?(t(i),e()):t(i)})}function um(e){var n=[],t=Ii,i=!1;return a=>{n.push(a),n.length===1&&e(r=>{if(r===0){for(var o=0,l=n,s=n.length;o<s;o++)l[o](0);n.length=0}else if(r.tag===0)t=r[0];else{i=!1;for(var d=0,c=n,u=n.length;d<u;d++)c[d](r)}}),a(Aa(r=>{if(r===1){var o=n.indexOf(a);o>-1&&(n=n.slice()).splice(o,1),n.length||t(1)}else i||(i=!0,t(0))}))}}function tP(e){return n=>t=>{var i=Ii,a=Ii,r=!1,o=!1,l=!1,s=!1;n(d=>{s||(d===0?(s=!0,l||t(0)):d.tag===0?i=d[0]:(l&&(a(1),a=Ii),r?r=!1:(r=!0,i(0)),function(u){l=!0,u(f=>{l&&(f===0?(l=!1,s?t(0):r||(r=!0,i(0))):f.tag===0?(o=!1,(a=f[0])(0)):(t(f),o?o=!1:a(0)))})}(e(d[0]))))}),t(Aa(d=>{d===1?(s||(s=!0,i(1)),l&&(l=!1,a(1))):(!s&&!r&&(r=!0,i(0)),l&&!o&&(o=!0,a(0)))}))}}function By(e){return n=>t=>{var i=Ii,a=!1,r=0;n(o=>{a||(o===0?(a=!0,t(0)):o.tag===0?e<=0?(a=!0,t(0),o[0](1)):i=o[0]:r++<e?(t(o),!a&&r>=e&&(a=!0,t(0),i(1))):t(o))}),t(Aa(o=>{o===1&&!a?(a=!0,i(1)):o===0&&!a&&r<e&&i(0)}))}}function U5(e){return n=>t=>{var i=Ii,a=Ii,r=!1;n(o=>{r||(o===0?(r=!0,a(1),t(0)):o.tag===0?(i=o[0],e(l=>{l===0||(l.tag===0?(a=l[0])(0):(r=!0,a(1),i(1),t(0)))})):t(o))}),t(Aa(o=>{o===1&&!r?(r=!0,i(1),a(1)):r||i(0)}))}}function Y5(e,n){return t=>i=>{var a=Ii,r=!1;t(o=>{r||(o===0?(r=!0,i(0)):o.tag===0?(a=o[0],i(o)):e(o[0])?i(o):(r=!0,n&&i(o),i(0),a(1)))})}}function PK(e){return n=>e()(n)}function G5(e){return n=>{var t=e[nP()]&&e[nP()]()||e,i=!1,a=!1,r=!1,o;n(Aa(async l=>{if(l===1)i=!0,t.return&&t.return();else if(a)r=!0;else{for(r=a=!0;r&&!i;)if((o=await t.next()).done)i=!0,t.return&&await t.return(),n(0);else try{r=!1,n(Hm(o.value))}catch(s){if(t.throw)(i=!!(await t.throw(s)).done)&&n(0);else throw s}a=!1}}))}}function OK(e){return e[Symbol.asyncIterator]?G5(e):n=>{var t=e[Symbol.iterator](),i=!1,a=!1,r=!1,o;n(Aa(l=>{if(l===1)i=!0,t.return&&t.return();else if(a)r=!0;else{for(r=a=!0;r&&!i;)if((o=t.next()).done)i=!0,t.return&&t.return(),n(0);else try{r=!1,n(Hm(o.value))}catch(s){if(t.throw)(i=!!t.throw(s).done)&&n(0);else throw s}a=!1}}))}}var DK=OK;function Pu(e){return n=>{var t=!1;n(Aa(i=>{i===1?t=!0:t||(t=!0,n(Hm(e)),n(0))}))}}function q5(e){return n=>{var t=!1,i=e({next(a){t||n(Hm(a))},complete(){t||(t=!0,n(0))}});n(Aa(a=>{a===1&&!t&&(t=!0,i())}))}}function qb(){var e,n;return{source:um(q5(t=>(e=t.next,n=t.complete,ww))),next(t){e&&e(t)},complete(){n&&n()}}}function iP(e){return q5(n=>(e.then(t=>{Promise.resolve(t).then(()=>{n.next(t),n.complete()})}),ww))}function Rd(e){return n=>{var t=Ii,i=!1;return n(a=>{a===0?i=!0:a.tag===0?(t=a[0])(0):i||(e(a[0]),t(0))}),{unsubscribe(){i||(i=!0,t(1))}}}}function EK(e){Rd(n=>{})(e)}function Cw(e){return new Promise(n=>{var t=Ii,i;e(a=>{a===0?Promise.resolve(i).then(n):a.tag===0?(t=a[0])(0):(i=a[0],t(0))})})}var $K=e=>e&&e.message&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&e.message?new Ub(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new Ub(e);class Pw extends Error{constructor(n){var t=(n.graphQLErrors||[]).map($K),i=((a,r)=>{var o="";if(a)return`[Network] ${a.message}`;if(r)for(var l of r)o&&(o+=`
`),o+=`[GraphQL] ${l.message}`;return o})(n.networkError,t);super(i),this.name="CombinedError",this.message=i,this.graphQLErrors=t,this.networkError=n.networkError,this.response=n.response}toString(){return this.message}}var Kb=(e,n)=>{for(var t=0|(n||5381),i=0,a=0|e.length;i<a;i++)t=(t<<5)+t+e.charCodeAt(i);return t},Hl=new Set,aP=new WeakMap,zs=e=>{if(e===null||Hl.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return zs(e.toJSON());if(Array.isArray(e)){var n="[";for(var t of e)n.length>1&&(n+=","),n+=zs(t)||"null";return n+="]"}else if(lv!==Md&&e instanceof lv||sv!==Md&&e instanceof sv)return"null";var i=Object.keys(e).sort();if(!i.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var a=aP.get(e)||Math.random().toString(36).slice(2);return aP.set(e,a),zs({__key:a})}Hl.add(e);var r="{";for(var o of i){var l=zs(e[o]);l&&(r.length>1&&(r+=","),r+=zs(o)+":"+l)}return Hl.delete(e),r+="}"},Xb=(e,n,t)=>{if(!(t==null||typeof t!="object"||t.toJSON||Hl.has(t)))if(Array.isArray(t))for(var i=0,a=t.length;i<a;i++)Xb(e,`${n}.${i}`,t[i]);else if(t instanceof lv||t instanceof sv)e.set(n,t);else{Hl.add(t);for(var r of Object.keys(t))Xb(e,`${n}.${r}`,t[r])}},ov=e=>(Hl.clear(),zs(e));class Md{}var lv=typeof File<"u"?File:Md,sv=typeof Blob<"u"?Blob:Md,IK=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,jK=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,TK=(e,n)=>n%2==0?e.replace(jK,`
`):e,rP=e=>e.split(IK).map(TK).join("").trim(),oP=new Map,Qp=new Map,Ow=e=>{var n;return typeof e=="string"?n=rP(e):e.loc&&Qp.get(e.__key)===e?n=e.loc.source.body:(n=oP.get(e)||rP(Ui(e)),oP.set(e,n)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:n.length,source:{body:n,name:"gql",locationOffset:{line:1,column:1}}}),n},lP=e=>{var n=Kb(Ow(e));if(e.definitions){var t=K5(e);t&&(n=Kb(`
# ${t}`,n))}return n},AK=e=>{var n,t;return typeof e=="string"?(n=lP(e),t=Qp.get(n)||xK(e)):(n=e.__key||lP(e),t=Qp.get(n)||e),t.loc||Ow(t),t.__key=n,Qp.set(n,t),t},ud=(e,n,t)=>{var i=n||{},a=AK(e),r=ov(i),o=a.__key;return r!=="{}"&&(o=Kb(r,o)),{key:o,query:a,variables:i,extensions:t}},K5=e=>{for(var n of e.definitions)if(n.kind===lK.OPERATION_DEFINITION)return n.name?n.name.value:void 0},sP=(e,n,t)=>{if(!("data"in n||"errors"in n&&Array.isArray(n.errors)))throw new Error("No Content");var i=e.kind==="subscription";return{operation:e,data:n.data,error:Array.isArray(n.errors)?new Pw({graphQLErrors:n.errors,response:t}):void 0,extensions:n.extensions?{...n.extensions}:void 0,hasNext:n.hasNext==null?i:n.hasNext,stale:!1}},Qb=(e,n)=>{if(typeof e=="object"&&e!=null&&(!e.constructor||e.constructor===Object||Array.isArray(e))){e=Array.isArray(e)?[...e]:{...e};for(var t of Object.keys(n))e[t]=Qb(e[t],n[t]);return e}return n},RK=(e,n,t,i)=>{var a=e.error?e.error.graphQLErrors:[],r=!!e.extensions||!!n.extensions,o={...e.extensions,...n.extensions},l=n.incremental;"path"in n&&(l=[n]);var s={data:e.data};if(l){var d=function(u){Array.isArray(u.errors)&&a.push(...u.errors),u.extensions&&(Object.assign(o,u.extensions),r=!0);var f="data",p=s,h=[];if(u.path)h=u.path;else if(i){var k=i.find(F=>F.id===u.id);u.subPath?h=[...k.path,...u.subPath]:h=k.path}for(var y=0,g=h.length;y<g;f=h[y++])p=p[f]=Array.isArray(p[f])?[...p[f]]:{...p[f]};if(u.items)for(var v=+f>=0?f:0,N=0,x=u.items.length;N<x;N++)p[v+N]=Qb(p[v+N],u.items[N]);else u.data!==void 0&&(p[f]=Qb(p[f],u.data))};for(var c of l)d(c)}else s.data=n.data||e.data,a=n.errors||a;return{operation:e.operation,data:s.data,error:a.length?new Pw({graphQLErrors:a,response:t}):void 0,extensions:r?o:void 0,hasNext:n.hasNext!=null?n.hasNext:e.hasNext,stale:!1}},X5=(e,n,t)=>({operation:e,data:void 0,error:new Pw({networkError:n,response:t}),extensions:void 0,hasNext:!1,stale:!1});function MK(e){return{query:e.extensions&&e.extensions.persistedQuery&&!e.extensions.persistedQuery.miss?void 0:Ow(e.query),operationName:K5(e.query),variables:e.variables||void 0,extensions:e.extensions}}var LK=(e,n)=>{var t=e.kind==="query"&&e.context.preferGetMethod;if(!t||!n)return e.context.url;var i=new URL(e.context.url);for(var a in n){var r=n[a];r&&i.searchParams.set(a,typeof r=="object"?ov(r):r)}var o=i.toString();return o.length>2047&&t!=="force"?(e.context.preferGetMethod=!1,e.context.url):o},zK=(e,n)=>{if(n&&!(e.kind==="query"&&e.context.preferGetMethod)){var t=ov(n),i=(l=>{var s=new Map;return(lv!==Md||sv!==Md)&&(Hl.clear(),Xb(s,"variables",l)),s})(n.variables);if(i.size){var a=new FormData;a.append("operations",t),a.append("map",ov({...[...i.keys()].map(l=>[l])}));var r=0;for(var o of i.values())a.append(""+r++,o);return a}return t}},BK=(e,n)=>{var t={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},i=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(i.headers)for(var a in i.headers)t[a.toLowerCase()]=i.headers[a];var r=zK(e,n);return typeof r=="string"&&!t["content-type"]&&(t["content-type"]="application/json"),{...i,method:r?"POST":"GET",body:r,headers:t}},VK=typeof TextDecoder<"u"?new TextDecoder:null,WK=/boundary="?([^=";]+)"?/i,HK=/data: ?([^\n]+)/,dP=e=>e.constructor.name==="Buffer"?e.toString():VK.decode(e);async function*cP(e){if(e.body[Symbol.asyncIterator])for await(var n of e.body)yield dP(n);else{var t=e.body.getReader(),i;try{for(;!(i=await t.read()).done;)yield dP(i.value)}finally{t.cancel()}}}async function*uP(e,n){var t="",i;for await(var a of e)for(t+=a;(i=t.indexOf(n))>-1;)yield t.slice(0,i),t=t.slice(i+n.length)}async function*UK(e,n,t){var i=!0,a=null,r;try{yield await Promise.resolve();var o=(r=await(e.context.fetch||fetch)(n,t)).headers.get("Content-Type")||"",l;/multipart\/mixed/i.test(o)?l=async function*(u,f){var p=u.match(WK),h="--"+(p?p[1]:"-"),k=!0,y;for await(var g of uP(cP(f),`\r
`+h)){if(k){k=!1;var v=g.indexOf(h);if(v>-1)g=g.slice(v+h.length);else continue}try{yield y=JSON.parse(g.slice(g.indexOf(`\r
\r
`)+4))}catch(N){if(!y)throw N}if(y&&y.hasNext===!1)break}y&&y.hasNext!==!1&&(yield{hasNext:!1})}(o,r):/text\/event-stream/i.test(o)?l=async function*(u){var f;for await(var p of uP(cP(u),`

`)){var h=p.match(HK);if(h){var k=h[1];try{yield f=JSON.parse(k)}catch(y){if(!f)throw y}if(f&&f.hasNext===!1)break}}f&&f.hasNext!==!1&&(yield{hasNext:!1})}(r):/text\//i.test(o)?l=async function*(u){var f=await u.text();try{var p=JSON.parse(f);yield p}catch{throw new Error(f)}}(r):l=async function*(u){yield JSON.parse(await u.text())}(r);var s;for await(var d of l)d.pending&&!a?s=d.pending:d.pending&&(s=[...s,...d.pending]),a=a?RK(a,d,r,s):sP(e,d,r),i=!1,yield a,i=!0;a||(yield a=sP(e,{},r))}catch(c){if(!i)throw c;yield X5(e,r&&(r.status<200||r.status>=300)&&r.statusText?new Error(r.statusText):c,r)}}function YK(e,n,t){var i;return typeof AbortController<"u"&&(t.signal=(i=new AbortController).signal),_w(()=>{i&&i.abort()})(di(a=>!!a)(G5(UK(e,n,t))))}var Zb=(e,n)=>{if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(a=>Zb(a));if(e&&typeof e=="object"&&(n||"__typename"in e)){var t={};for(var i in e)i==="__typename"?Object.defineProperty(t,"__typename",{enumerable:!1,value:e.__typename}):t[i]=Zb(e[i]);return t}else return e};function mP(e){var n=t=>e(t);return n.toPromise=()=>Cw(By(1)(di(t=>!t.stale&&!t.hasNext)(n))),n.then=(t,i)=>n.toPromise().then(t,i),n.subscribe=t=>Rd(t)(n),n}function dv(e,n,t){return{...n,kind:e,context:n.context?{...n.context,...t}:t||n.context}}var GK=()=>{},qK=({forward:e,dispatchDebug:n})=>t=>{var i=av(r=>{var o=MK(r),l=LK(r,o),s=BK(r,o),d=U5(di(c=>c.kind==="teardown"&&c.key===r.key)(t))(YK(r,l,s));return d})(di(r=>r.kind!=="teardown"&&(r.kind!=="subscription"||!!r.context.fetchSubscriptions))(t)),a=e(di(r=>r.kind==="teardown"||r.kind==="subscription"&&!r.context.fetchSubscriptions)(t));return cm([i,a])},KK=e=>({client:n,forward:t,dispatchDebug:i})=>e.reduceRight((a,r)=>r({client:n,forward(o){return um(a(um(o)))},dispatchDebug(o){}}),t),XK=({onOperation:e,onResult:n,onError:t})=>({forward:i})=>a=>av(r=>{t&&r.error&&t(r.error,r.operation);var o=n&&n(r)||r;return"then"in o?iP(o):Pu(o)})(i(av(r=>{var o=e&&e(r)||r;return"then"in o?iP(o):Pu(o)})(a))),QK=({dispatchDebug:e})=>n=>di(t=>!1)(n),ZK=function e(n){var t=0,i=new Map,a=new Map,r=new Set,o=[],l={url:n.url,fetchSubscriptions:n.fetchSubscriptions,fetchOptions:n.fetchOptions,fetch:n.fetch,preferGetMethod:n.preferGetMethod,requestPolicy:n.requestPolicy||"cache-first"},s=qb();function d(v){(v.kind==="mutation"||v.kind==="teardown"||!r.has(v.key))&&(v.kind==="teardown"?r.delete(v.key):v.kind!=="mutation"&&r.add(v.key),s.next(v))}var c=!1;function u(v){if(v&&d(v),!c){for(c=!0;c&&(v=o.shift());)d(v);c=!1}}var f=v=>{var N=U5(di(x=>x.kind==="teardown"&&x.key===v.key)(s.source))(di(x=>x.operation.kind===v.kind&&x.operation.key===v.key&&(!x.operation.context._instance||x.operation.context._instance===v.context._instance))(g));return n.maskTypename&&(N=Yb(x=>({...x,data:Zb(x.data,!0)}))(N)),v.kind!=="query"?N=Y5(x=>!!x.hasNext,!0)(N):N=tP(x=>{var F=Pu(x);return x.stale||x.hasNext?F:cm([F,Yb(()=>(x.stale=!0,x))(By(1)(di(_=>_.key===v.key)(s.source)))])})(N),v.kind!=="mutation"?N=_w(()=>{r.delete(v.key),i.delete(v.key),a.delete(v.key),c=!1;for(var x=o.length-1;x>=0;x--)o[x].key===v.key&&o.splice(x,1);d(dv("teardown",v,v.context))})(rv(x=>{if(x.stale){for(var F of o)if(F.key===x.operation.key){r.delete(F.key);break}}else x.hasNext||r.delete(v.key);i.set(v.key,x)})(N)):N=Gb(()=>{d(v)})(N),um(N)},p=this instanceof e?this:Object.create(e.prototype),h=Object.assign(p,{suspense:!!n.suspense,operations$:s.source,reexecuteOperation(v){if(v.kind==="teardown")u(v);else if(v.kind==="mutation"||a.has(v.key)){for(var N=!1,x=0;x<o.length;x++)N=N||o[x].key===v.key;N||r.delete(v.key),o.push(v),Promise.resolve().then(u)}},createRequestOperation(v,N,x){return x||(x={}),dv(v,N,{_instance:v==="mutation"?t=t+1|0:void 0,...l,...x,requestPolicy:x.requestPolicy||l.requestPolicy,suspense:x.suspense||x.suspense!==!1&&h.suspense})},executeRequestOperation(v){return v.kind==="mutation"?mP(f(v)):mP(PK(()=>{var N=a.get(v.key);N||a.set(v.key,N=f(v)),N=Gb(()=>{u(v)})(N);var x=i.get(v.key);return v.kind==="query"&&x&&(x.stale||x.hasNext)?tP(Pu)(cm([N,di(F=>F===i.get(v.key))(Pu(x))])):N}))},executeQuery(v,N){var x=h.createRequestOperation("query",v,N);return h.executeRequestOperation(x)},executeSubscription(v,N){var x=h.createRequestOperation("subscription",v,N);return h.executeRequestOperation(x)},executeMutation(v,N){var x=h.createRequestOperation("mutation",v,N);return h.executeRequestOperation(x)},readQuery(v,N,x){var F=null;return Rd(_=>{F=_})(h.query(v,N,x)).unsubscribe(),F},query:(v,N,x)=>h.executeQuery(ud(v,N),x),subscription:(v,N,x)=>h.executeSubscription(ud(v,N),x),mutation:(v,N,x)=>h.executeMutation(ud(v,N),x)}),k=GK,y=KK(n.exchanges),g=um(y({client:h,dispatchDebug:k,forward:QK({dispatchDebug:k})})(s.source));return EK(g),h},JK=ZK,Q5={},Vy=S.createContext(Q5),eX=Vy.Provider;Vy.Consumer;Vy.displayName="UrqlContext";var Z5=()=>{var e=S.useContext(Vy);if(e===Q5&&!1)var n;return e},Jb={fetching:!1,stale:!1,error:void 0,data:void 0,extensions:void 0,operation:void 0},nX=(e,n)=>e===n||!(!e||!n||e.key!==n.key),k0=(e,n)=>{var t={...e,...n,data:n.data!==void 0||n.error?n.data:e.data,fetching:!!n.fetching,stale:!!n.stale};return((i,a)=>{for(var r in i)if(!(r in a))return!0;for(var o in a)if(o==="operation"?!nX(i[o],a[o]):i[o]!==a[o])return!0;return!1})(e,t)?t:e},tX=(e,n)=>{for(var t=0,i=n.length;t<i;t++)if(e[t]!==n[t])return!0;return!1};function cv(e,n){e(n)}function at(e){var n=S.useRef(!0),t=Z5(),[i,a]=S.useState(Jb),r=S.useCallback((o,l)=>(cv(a,{...Jb,fetching:!0}),Cw(By(1)(di(s=>!s.hasNext)(rv(s=>{n.current&&cv(a,{fetching:!1,stale:s.stale,data:s.data,error:s.error,extensions:s.extensions,operation:s.operation})})(t.executeMutation(ud(e,o),l||{})))))),[t,e,a]);return S.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),[i,r]}function iX(e,n){var t=S.useRef(void 0);return S.useMemo(()=>{var i=ud(e,n);return t.current!==void 0&&t.current.key===i.key?t.current:(t.current=i,i)},[e,n])}var aX=e=>{if(!e._react){var n=new Set,t=new Map;e.operations$&&Rd(i=>{i.kind==="teardown"&&n.has(i.key)&&(n.delete(i.key),t.delete(i.key))})(e.operations$),e._react={get:i=>t.get(i),set(i,a){n.delete(i),t.set(i,a)},dispose(i){n.add(i)}}}return e._react},rX=(e,n)=>n&&n.suspense!==void 0?!!n.suspense:e.suspense;function Be(e){var n=Z5(),t=aX(n),i=rX(n,e.context),a=iX(e.query,e.variables),r=S.useMemo(()=>{if(e.pause)return null;var f=n.executeQuery(a,{requestPolicy:e.requestPolicy,...e.context});return i?rv(p=>{t.set(a.key,p)})(f):f},[t,n,a,i,e.pause,e.requestPolicy,e.context]),o=S.useCallback((f,p)=>{if(!f)return{fetching:!1};var h=t.get(a.key);if(h){if(p&&h!=null&&"then"in h)throw h}else{var k,y=Rd(v=>{h=v,k&&k(h)})(Y5(()=>p&&!k||!h)(f));if(h==null&&p){var g=new Promise(v=>{k=v});throw t.set(a.key,g),g}else y.unsubscribe()}return h||{fetching:!0}},[t,a]),l=[n,a,e.requestPolicy,e.context,e.pause],[s,d]=S.useState(()=>[r,k0(Jb,o(r,i)),l]),c=s[1];r!==s[0]&&tX(s[2],l)&&d([r,c=k0(s[1],o(r,i)),l]),S.useEffect(()=>{var f=s[0],p=s[2][1],h=!1,k=g=>{h=!0,cv(d,v=>{var N=k0(v[1],g);return v[1]!==N?[v[0],N,v[2]]:v})};if(f){var y=Rd(k)(_w(()=>{k({fetching:!1})})(f));return h||k({fetching:!0}),()=>{t.dispose(p.key),y.unsubscribe()}}else k({fetching:!1})},[t,s[0],s[2][1]]);var u=S.useCallback(f=>{var p={requestPolicy:e.requestPolicy,...e.context,...f};cv(d,h=>[i?rv(k=>{t.set(a.key,k)})(n.executeQuery(a,p)):n.executeQuery(a,p),h[1],l])},[n,t,a,i,e.requestPolicy,e.context,e.pause]);return[c,u]}var Ja=function(){return Ja=Object.assign||function(n){for(var t,i=1,a=arguments.length;i<a;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Ja.apply(this,arguments)};function J5(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)n.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]]);return t}function oc(e,n,t,i){function a(r){return r instanceof t?r:new t(function(o){o(r)})}return new(t||(t=Promise))(function(r,o){function l(c){try{d(i.next(c))}catch(u){o(u)}}function s(c){try{d(i.throw(c))}catch(u){o(u)}}function d(c){c.done?r(c.value):a(c.value).then(l,s)}d((i=i.apply(e,n||[])).next())})}function lc(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(d){return function(c){return s([d,c])}}function s(d){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,d[0]&&(t=0)),t;)try{if(i=1,a&&(r=d[0]&2?a.return:d[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,d[1])).done)return r;switch(a=0,r&&(d=[d[0]&2,r.value]),d[0]){case 0:case 1:r=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,a=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!r||d[1]>r[0]&&d[1]<r[3])){t.label=d[1];break}if(d[0]===6&&t.label<r[1]){t.label=r[1],r=d;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(d);break}r[2]&&t.ops.pop(),t.trys.pop();continue}d=n.call(e,t)}catch(c){d=[6,c],a=0}finally{i=r=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function fP(e,n){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var i=t.call(e),a,r=[],o;try{for(;(n===void 0||n-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return r}function ex(e,n,t){if(t||arguments.length===2)for(var i=0,a=n.length,r;i<a;i++)(r||!(i in n))&&(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}var Zp="right-scroll-bar-position",Jp="width-before-scroll-bar",oX="with-scroll-bars-hidden",lX="--removed-body-scroll-bar-size";function g0(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function sX(e,n){var t=S.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(i){var a=t.value;a!==i&&(t.value=i,t.callback(i,a))}}}})[0];return t.callback=n,t.facade}var pP=new WeakMap;function dX(e,n){var t=sX(n||null,function(i){return e.forEach(function(a){return g0(a,i)})});return S.useLayoutEffect(function(){var i=pP.get(t);if(i){var a=new Set(i),r=new Set(e),o=t.current;a.forEach(function(l){r.has(l)||g0(l,null)}),r.forEach(function(l){a.has(l)||g0(l,o)})}pP.set(t,e)},[e]),t}function cX(e){return e}function uX(e,n){n===void 0&&(n=cX);var t=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(r){var o=n(r,i);return t.push(o),function(){t=t.filter(function(l){return l!==o})}},assignSyncMedium:function(r){for(i=!0;t.length;){var o=t;t=[],o.forEach(r)}t={push:function(l){return r(l)},filter:function(){return t}}},assignMedium:function(r){i=!0;var o=[];if(t.length){var l=t;t=[],l.forEach(r),o=t}var s=function(){var c=o;o=[],c.forEach(r)},d=function(){return Promise.resolve().then(s)};d(),t={push:function(c){o.push(c),d()},filter:function(c){return o=o.filter(c),t}}}};return a}function mX(e){e===void 0&&(e={});var n=uX(null);return n.options=Ja({async:!0,ssr:!1},e),n}var eL=function(e){var n=e.sideCar,t=J5(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return S.createElement(i,Ja({},t))};eL.isSideCarExport=!0;function fX(e,n){return e.useMedium(n),eL}var nL=mX(),y0=function(){},Wy=S.forwardRef(function(e,n){var t=S.useRef(null),i=S.useState({onScrollCapture:y0,onWheelCapture:y0,onTouchMoveCapture:y0}),a=i[0],r=i[1],o=e.forwardProps,l=e.children,s=e.className,d=e.removeScrollBar,c=e.enabled,u=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,k=e.allowPinchZoom,y=e.as,g=y===void 0?"div":y,v=e.gapMode,N=J5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,F=dX([t,n]),_=Ja(Ja({},N),a);return S.createElement(S.Fragment,null,c&&S.createElement(x,{sideCar:nL,removeScrollBar:d,shards:u,noIsolation:p,inert:h,setCallbacks:r,allowPinchZoom:!!k,lockRef:t,gapMode:v}),o?S.cloneElement(S.Children.only(l),Ja(Ja({},_),{ref:F})):S.createElement(g,Ja({},_,{className:s,ref:F}),l))});Wy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wy.classNames={fullWidth:Jp,zeroRight:Zp};var pX=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hX(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=pX();return n&&e.setAttribute("nonce",n),e}function vX(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function kX(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var gX=function(){var e=0,n=null;return{add:function(t){e==0&&(n=hX())&&(vX(n,t),kX(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},yX=function(){var e=gX();return function(n,t){S.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},tL=function(){var e=yX(),n=function(t){var i=t.styles,a=t.dynamic;return e(i,a),null};return n},SX={left:0,top:0,right:0,gap:0},S0=function(e){return parseInt(e||"",10)||0},NX=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[S0(t),S0(i),S0(a)]},bX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SX;var n=NX(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},xX=tL(),FX=function(e,n,t,i){var a=e.left,r=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),`
  .`.concat(oX,` {
   overflow: hidden `).concat(i,`;
   padding-right: `).concat(l,"px ").concat(i,`;
  }
  body {
    overflow: hidden `).concat(i,`;
    overscroll-behavior: contain;
    `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(r,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(i,`;
    `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Zp,` {
    right: `).concat(l,"px ").concat(i,`;
  }
  
  .`).concat(Jp,` {
    margin-right: `).concat(l,"px ").concat(i,`;
  }
  
  .`).concat(Zp," .").concat(Zp,` {
    right: 0 `).concat(i,`;
  }
  
  .`).concat(Jp," .").concat(Jp,` {
    margin-right: 0 `).concat(i,`;
  }
  
  body {
    `).concat(lX,": ").concat(l,`px;
  }
`)},wX=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,a=i===void 0?"margin":i,r=S.useMemo(function(){return bX(a)},[a]);return S.createElement(xX,{styles:FX(r,!n,a,t?"":"!important")})},nx=!1;if(typeof window<"u")try{var Rf=Object.defineProperty({},"passive",{get:function(){return nx=!0,!0}});window.addEventListener("test",Rf,Rf),window.removeEventListener("test",Rf,Rf)}catch{nx=!1}var Cs=nx?{passive:!1}:!1,_X=function(e){return e.tagName==="TEXTAREA"},iL=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!_X(e)&&t[n]==="visible")},CX=function(e){return iL(e,"overflowY")},PX=function(e){return iL(e,"overflowX")},hP=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var a=aL(e,i);if(a){var r=rL(e,i),o=r[1],l=r[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},OX=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},DX=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},aL=function(e,n){return e==="v"?CX(n):PX(n)},rL=function(e,n){return e==="v"?OX(n):DX(n)},EX=function(e,n){return e==="h"&&n==="rtl"?-1:1},$X=function(e,n,t,i,a){var r=EX(e,window.getComputedStyle(n).direction),o=r*i,l=t.target,s=n.contains(l),d=!1,c=o>0,u=0,f=0;do{var p=rL(e,l),h=p[0],k=p[1],y=p[2],g=k-y-r*h;(h||g)&&aL(e,l)&&(u+=g,f+=h),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!s&&l!==document.body||s&&(n.contains(l)||n===l));return(c&&(a&&Math.abs(u)<1||!a&&o>u)||!c&&(a&&Math.abs(f)<1||!a&&-o>f))&&(d=!0),d},Mf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vP=function(e){return[e.deltaX,e.deltaY]},kP=function(e){return e&&"current"in e?e.current:e},IX=function(e,n){return e[0]===n[0]&&e[1]===n[1]},jX=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},TX=0,Ps=[];function AX(e){var n=S.useRef([]),t=S.useRef([0,0]),i=S.useRef(),a=S.useState(TX++)[0],r=S.useState(tL)[0],o=S.useRef(e);S.useEffect(function(){o.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=ex([e.lockRef.current],(e.shards||[]).map(kP),!0).filter(Boolean);return k.forEach(function(y){return y.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=S.useCallback(function(k,y){if("touches"in k&&k.touches.length===2)return!o.current.allowPinchZoom;var g=Mf(k),v=t.current,N="deltaX"in k?k.deltaX:v[0]-g[0],x="deltaY"in k?k.deltaY:v[1]-g[1],F,_=k.target,w=Math.abs(N)>Math.abs(x)?"h":"v";if("touches"in k&&w==="h"&&_.type==="range")return!1;var C=hP(w,_);if(!C)return!0;if(C?F=w:(F=w==="v"?"h":"v",C=hP(w,_)),!C)return!1;if(!i.current&&"changedTouches"in k&&(N||x)&&(i.current=F),!F)return!0;var $=i.current||F;return $X($,y,k,$==="h"?N:x,!0)},[]),s=S.useCallback(function(k){var y=k;if(!(!Ps.length||Ps[Ps.length-1]!==r)){var g="deltaY"in y?vP(y):Mf(y),v=n.current.filter(function(F){return F.name===y.type&&(F.target===y.target||y.target===F.shadowParent)&&IX(F.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var N=(o.current.shards||[]).map(kP).filter(Boolean).filter(function(F){return F.contains(y.target)}),x=N.length>0?l(y,N[0]):!o.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),d=S.useCallback(function(k,y,g,v){var N={name:k,delta:y,target:g,should:v,shadowParent:RX(g)};n.current.push(N),setTimeout(function(){n.current=n.current.filter(function(x){return x!==N})},1)},[]),c=S.useCallback(function(k){t.current=Mf(k),i.current=void 0},[]),u=S.useCallback(function(k){d(k.type,vP(k),k.target,l(k,e.lockRef.current))},[]),f=S.useCallback(function(k){d(k.type,Mf(k),k.target,l(k,e.lockRef.current))},[]);S.useEffect(function(){return Ps.push(r),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",s,Cs),document.addEventListener("touchmove",s,Cs),document.addEventListener("touchstart",c,Cs),function(){Ps=Ps.filter(function(k){return k!==r}),document.removeEventListener("wheel",s,Cs),document.removeEventListener("touchmove",s,Cs),document.removeEventListener("touchstart",c,Cs)}},[]);var p=e.removeScrollBar,h=e.inert;return S.createElement(S.Fragment,null,h?S.createElement(r,{styles:jX(a)}):null,p?S.createElement(wX,{gapMode:e.gapMode}):null)}function RX(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const MX=fX(nL,AX);var oL=S.forwardRef(function(e,n){return S.createElement(Wy,Ja({},e,{ref:n,sideCar:MX}))});oL.classNames=Wy.classNames;const LX=oL;function uv(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function zX(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function BX(e,n,t){for(let i=e+1;i<n.length;i+=1)if(!n[i].disabled)return i;if(t){for(let i=0;i<n.length;i+=1)if(!n[i].disabled)return i}return e}function VX(e,n,t){return uv(e,t)===uv(n,t)}function lL({parentSelector:e,siblingSelector:n,onKeyDown:t,loop:i=!0,activateOnFocus:a=!1,dir:r="rtl",orientation:o}){return l=>{var s;t==null||t(l);const d=Array.from(((s=uv(l.currentTarget,e))==null?void 0:s.querySelectorAll(n))||[]).filter(k=>VX(l.currentTarget,k,e)),c=d.findIndex(k=>l.currentTarget===k),u=BX(c,d,i),f=zX(c,d,i),p=r==="rtl"?f:u,h=r==="rtl"?u:f;switch(l.key){case"ArrowRight":{o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),d[p].focus(),a&&d[p].click());break}case"ArrowLeft":{o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),d[h].focus(),a&&d[h].click());break}case"ArrowUp":{o==="vertical"&&(l.stopPropagation(),l.preventDefault(),d[f].focus(),a&&d[f].click());break}case"ArrowDown":{o==="vertical"&&(l.stopPropagation(),l.preventDefault(),d[u].focus(),a&&d[u].click());break}case"Home":{l.stopPropagation(),l.preventDefault(),!d[0].disabled&&d[0].focus();break}case"End":{l.stopPropagation(),l.preventDefault();const k=d.length-1;!d[k].disabled&&d[k].focus();break}}}}function WX(e,n,t){var i;return t?Array.from(((i=uv(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(a=>a===t):null}function Ra(e){const n=S.createContext(null);return[({children:a,value:r})=>b.createElement(n.Provider,{value:r},a),()=>{const a=S.useContext(n);if(a===null)throw new Error(e);return a}]}function sL(e){return Array.isArray(e)?e:[e]}function gP(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}const HX=()=>{};function UX(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||HX:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Oi(e,n){return t=>{e==null||e(t),n==null||n(t)}}function YX(){const[e,n]=S.useState(-1);return[e,{setHovered:n,resetHovered:()=>n(-1)}]}function dL({data:e}){const n=[],t=[],i=e.reduce((a,r,o)=>(r.group?a[r.group]?a[r.group].push(o):a[r.group]=[o]:t.push(o),a),{});return Object.keys(i).forEach(a=>{n.push(...i[a].map(r=>e[r]))}),n.push(...t.map(a=>e[a])),n}function GX(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}const qX=typeof window<"u"?S.useLayoutEffect:S.useEffect;function KX(e){function n(i){const a=Object.keys(i).reduce((r,o)=>(r[`${e}:${o}`]=l=>i[o](l.detail),r),{});qX(()=>(Object.keys(a).forEach(r=>{window.removeEventListener(r,a[r]),window.addEventListener(r,a[r])}),()=>Object.keys(a).forEach(r=>{window.removeEventListener(r,a[r])})),[a])}function t(i){return(...a)=>GX(`${e}:${String(i)}`,a[0])}return[n,t]}function sc(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==b.Fragment:!1}function cL(e){var n,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(t=cL(e[n]))&&(i&&(i+=" "),i+=t);else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function uL(){for(var e=0,n,t,i="";e<arguments.length;)(n=arguments[e++])&&(t=cL(n))&&(i&&(i+=" "),i+=t);return i}const XX={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function QX(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var ZX=Object.defineProperty,yP=Object.getOwnPropertySymbols,JX=Object.prototype.hasOwnProperty,eQ=Object.prototype.propertyIsEnumerable,SP=(e,n,t)=>n in e?ZX(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,NP=(e,n)=>{for(var t in n||(n={}))JX.call(n,t)&&SP(e,t,n[t]);if(yP)for(var t of yP(n))eQ.call(n,t)&&SP(e,t,n[t]);return e};function nQ(e){return n=>({WebkitTapHighlightColor:"transparent",[n||"&:focus"]:NP({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[n?n.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:NP({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Um(e){return n=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[n||e.colorScheme]}function Dw(e){const n=Um(e);return(t,i,a=!0,r=!0)=>{if(typeof t=="string"&&t.includes(".")){const[l,s]=t.split("."),d=parseInt(s,10);if(l in e.colors&&d>=0&&d<10)return e.colors[l][typeof i=="number"&&!r?i:d]}const o=typeof i=="number"?i:n();return t in e.colors?e.colors[t][o]:a?e.colors[e.primaryColor][o]:t}}function mL(e){let n="";for(let t=1;t<e.length-1;t+=1)n+=`${e[t]} ${t/(e.length-1)*100}%, `;return`${e[0]} 0%, ${n}${e[e.length-1]} 100%`}function tQ(e,...n){return`linear-gradient(${e}deg, ${mL(n)})`}function iQ(...e){return`radial-gradient(circle, ${mL(e)})`}function fL(e){const n=Dw(e),t=Um(e);return i=>{const a={from:(i==null?void 0:i.from)||e.defaultGradient.from,to:(i==null?void 0:i.to)||e.defaultGradient.to,deg:(i==null?void 0:i.deg)||e.defaultGradient.deg};return`linear-gradient(${a.deg}deg, ${n(a.from,t(),!1)} 0%, ${n(a.to,t(),!1)} 100%)`}}function pL(e){return n=>{if(typeof n=="number")return`${n/16}${e}`;if(typeof n=="string"){const t=n.replace("px","");if(!Number.isNaN(Number(t)))return`${Number(t)/16}${e}`}return n}}const T=pL("rem"),dc=pL("em");function q({size:e,sizes:n,units:t}){return e in n?n[e]:typeof e=="number"?t==="em"?dc(e):T(e):e||n.md}function Da(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function aQ(e){return n=>`@media (min-width: ${dc(Da(q({size:n,sizes:e.breakpoints})))})`}function rQ(e){return n=>`@media (max-width: ${dc(Da(q({size:n,sizes:e.breakpoints}))-1)})`}function oQ(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function lQ(e){let n=e.replace("#","");if(n.length===3){const o=n.split("");n=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}const t=parseInt(n,16),i=t>>16&255,a=t>>8&255,r=t&255;return{r:i,g:a,b:r,a:1}}function sQ(e){const[n,t,i,a]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:n,g:t,b:i,a:a||1}}function Ew(e){return oQ(e)?lQ(e):e.startsWith("rgb")?sQ(e):{r:0,g:0,b:0,a:1}}function Bs(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r:t,g:i,b:a}=Ew(e);return`rgba(${t}, ${i}, ${a}, ${n})`}function dQ(e=0){return{position:"absolute",top:T(e),right:T(e),left:T(e),bottom:T(e)}}function cQ(e,n){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:t,g:i,b:a,a:r}=Ew(e),o=1-n,l=s=>Math.round(s*o);return`rgba(${l(t)}, ${l(i)}, ${l(a)}, ${r})`}function uQ(e,n){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:t,g:i,b:a,a:r}=Ew(e),o=l=>Math.round(l+(255-l)*n);return`rgba(${o(t)}, ${o(i)}, ${o(a)}, ${r})`}function mQ(e){return n=>{if(typeof n=="number")return T(n);const t=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[n]||n||t}}function fQ(e,n){if(typeof e=="string"&&e.includes(".")){const[t,i]=e.split("."),a=parseInt(i,10);if(t in n.colors&&a>=0&&a<10)return{isSplittedColor:!0,key:t,shade:a}}return{isSplittedColor:!1}}function pQ(e){const n=Dw(e),t=Um(e),i=fL(e);return({variant:a,color:r,gradient:o,primaryFallback:l})=>{const s=fQ(r,e);switch(a){case"light":return{border:"transparent",background:Bs(n(r,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1),color:r==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:n(r,e.colorScheme==="dark"?2:t("light")),hover:Bs(n(r,e.colorScheme==="dark"?7:1,l,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:r==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:n(r,e.colorScheme==="dark"?2:t("light")),hover:Bs(n(r,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:n(r,e.colorScheme==="dark"?5:t("light")),background:"transparent",color:n(r,e.colorScheme==="dark"?5:t("light")),hover:e.colorScheme==="dark"?Bs(n(r,5,l,!1),.05):Bs(n(r,0,l,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:n(r,t()),hover:null};case"transparent":return{border:"transparent",color:r==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:n(r,e.colorScheme==="dark"?2:t("light")),background:"transparent",hover:null};case"gradient":return{background:i(o),color:e.white,border:"transparent",hover:null};default:{const d=t(),c=s.isSplittedColor?s.shade:d,u=s.isSplittedColor?s.key:r;return{border:"transparent",background:n(u,c,l),color:e.white,hover:n(u,c===9?8:c+1)}}}}}function hQ(e){return n=>{const t=Um(e)(n);return e.colors[e.primaryColor][t]}}function vQ(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function kQ(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function gQ(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const lt={fontStyles:QX,themeColor:Dw,focusStyles:nQ,linearGradient:tQ,radialGradient:iQ,smallerThan:rQ,largerThan:aQ,rgba:Bs,cover:dQ,darken:cQ,lighten:uQ,radius:mQ,variant:pQ,primaryShade:Um,hover:vQ,gradient:fL,primaryColor:hQ,placeholderStyles:kQ,dimmed:gQ};var yQ=Object.defineProperty,SQ=Object.defineProperties,NQ=Object.getOwnPropertyDescriptors,bP=Object.getOwnPropertySymbols,bQ=Object.prototype.hasOwnProperty,xQ=Object.prototype.propertyIsEnumerable,xP=(e,n,t)=>n in e?yQ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,FQ=(e,n)=>{for(var t in n||(n={}))bQ.call(n,t)&&xP(e,t,n[t]);if(bP)for(var t of bP(n))xQ.call(n,t)&&xP(e,t,n[t]);return e},wQ=(e,n)=>SQ(e,NQ(n));function hL(e){return wQ(FQ({},e),{fn:{fontStyles:lt.fontStyles(e),themeColor:lt.themeColor(e),focusStyles:lt.focusStyles(e),largerThan:lt.largerThan(e),smallerThan:lt.smallerThan(e),radialGradient:lt.radialGradient,linearGradient:lt.linearGradient,gradient:lt.gradient(e),rgba:lt.rgba,cover:lt.cover,lighten:lt.lighten,darken:lt.darken,primaryShade:lt.primaryShade(e),radius:lt.radius(e),variant:lt.variant(e),hover:lt.hover,primaryColor:lt.primaryColor(e),placeholderStyles:lt.placeholderStyles(e),dimmed:lt.dimmed(e)}})}const vL=["xs","sm","md","lg","xl"],_Q={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:XX,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},$w=hL(_Q);function CQ(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function PQ(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var OQ=function(){function e(t){var i=this;this._insertTag=function(a){var r;i.tags.length===0?i.insertionPoint?r=i.insertionPoint.nextSibling:i.prepend?r=i.container.firstChild:r=i.before:r=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(a,r),i.tags.push(a)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(i){i.forEach(this._insertTag)},n.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(PQ(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var r=CQ(a);try{r.insertRule(i,r.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(i));this.ctr++},n.flush=function(){this.tags.forEach(function(i){return i.parentNode&&i.parentNode.removeChild(i)}),this.tags=[],this.ctr=0},e}(),Rt="-ms-",mv="-moz-",tn="-webkit-",kL="comm",Iw="rule",jw="decl",DQ="@import",gL="@keyframes",EQ="@layer",$Q=Math.abs,Hy=String.fromCharCode,IQ=Object.assign;function jQ(e,n){return Pt(e,0)^45?(((n<<2^Pt(e,0))<<2^Pt(e,1))<<2^Pt(e,2))<<2^Pt(e,3):0}function yL(e){return e.trim()}function TQ(e,n){return(e=n.exec(e))?e[0]:e}function an(e,n,t){return e.replace(n,t)}function tx(e,n){return e.indexOf(n)}function Pt(e,n){return e.charCodeAt(n)|0}function mm(e,n,t){return e.slice(n,t)}function Ka(e){return e.length}function Tw(e){return e.length}function Lf(e,n){return n.push(e),e}function AQ(e,n){return e.map(n).join("")}var Uy=1,Ld=1,SL=0,pi=0,Jn=0,cc="";function Yy(e,n,t,i,a,r,o){return{value:e,root:n,parent:t,type:i,props:a,children:r,line:Uy,column:Ld,length:o,return:""}}function Rc(e,n){return IQ(Yy("",null,null,"",null,null,0),e,{length:-e.length},n)}function RQ(){return Jn}function MQ(){return Jn=pi>0?Pt(cc,--pi):0,Ld--,Jn===10&&(Ld=1,Uy--),Jn}function ji(){return Jn=pi<SL?Pt(cc,pi++):0,Ld++,Jn===10&&(Ld=1,Uy++),Jn}function ar(){return Pt(cc,pi)}function eh(){return pi}function Ym(e,n){return mm(cc,e,n)}function fm(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 NL(e){return Uy=Ld=1,SL=Ka(cc=e),pi=0,[]}function bL(e){return cc="",e}function nh(e){return yL(Ym(pi-1,ix(e===91?e+2:e===40?e+1:e)))}function LQ(e){for(;(Jn=ar())&&Jn<33;)ji();return fm(e)>2||fm(Jn)>3?"":" "}function zQ(e,n){for(;--n&&ji()&&!(Jn<48||Jn>102||Jn>57&&Jn<65||Jn>70&&Jn<97););return Ym(e,eh()+(n<6&&ar()==32&&ji()==32))}function ix(e){for(;ji();)switch(Jn){case e:return pi;case 34:case 39:e!==34&&e!==39&&ix(Jn);break;case 40:e===41&&ix(e);break;case 92:ji();break}return pi}function BQ(e,n){for(;ji()&&e+Jn!==57;)if(e+Jn===84&&ar()===47)break;return"/*"+Ym(n,pi-1)+"*"+Hy(e===47?e:ji())}function VQ(e){for(;!fm(ar());)ji();return Ym(e,pi)}function WQ(e){return bL(th("",null,null,null,[""],e=NL(e),0,[0],e))}function th(e,n,t,i,a,r,o,l,s){for(var d=0,c=0,u=o,f=0,p=0,h=0,k=1,y=1,g=1,v=0,N="",x=a,F=r,_=i,w=N;y;)switch(h=v,v=ji()){case 40:if(h!=108&&Pt(w,u-1)==58){tx(w+=an(nh(v),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:w+=nh(v);break;case 9:case 10:case 13:case 32:w+=LQ(h);break;case 92:w+=zQ(eh()-1,7);continue;case 47:switch(ar()){case 42:case 47:Lf(HQ(BQ(ji(),eh()),n,t),s);break;default:w+="/"}break;case 123*k:l[d++]=Ka(w)*g;case 125*k:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+c:g==-1&&(w=an(w,/\f/g,"")),p>0&&Ka(w)-u&&Lf(p>32?wP(w+";",i,t,u-1):wP(an(w," ","")+";",i,t,u-2),s);break;case 59:w+=";";default:if(Lf(_=FP(w,n,t,d,c,a,l,N,x=[],F=[],u),r),v===123)if(c===0)th(w,n,_,_,x,r,u,l,F);else switch(f===99&&Pt(w,3)===110?100:f){case 100:case 108:case 109:case 115:th(e,_,_,i&&Lf(FP(e,_,_,0,0,a,l,N,a,x=[],u),F),a,F,u,l,i?x:F);break;default:th(w,_,_,_,[""],F,0,l,F)}}d=c=p=0,k=g=1,N=w="",u=o;break;case 58:u=1+Ka(w),p=h;default:if(k<1){if(v==123)--k;else if(v==125&&k++==0&&MQ()==125)continue}switch(w+=Hy(v),v*k){case 38:g=c>0?1:(w+="\f",-1);break;case 44:l[d++]=(Ka(w)-1)*g,g=1;break;case 64:ar()===45&&(w+=nh(ji())),f=ar(),c=u=Ka(N=w+=VQ(eh())),v++;break;case 45:h===45&&Ka(w)==2&&(k=0)}}return r}function FP(e,n,t,i,a,r,o,l,s,d,c){for(var u=a-1,f=a===0?r:[""],p=Tw(f),h=0,k=0,y=0;h<i;++h)for(var g=0,v=mm(e,u+1,u=$Q(k=o[h])),N=e;g<p;++g)(N=yL(k>0?f[g]+" "+v:an(v,/&\f/g,f[g])))&&(s[y++]=N);return Yy(e,n,t,a===0?Iw:l,s,d,c)}function HQ(e,n,t){return Yy(e,n,t,kL,Hy(RQ()),mm(e,2,-2),0)}function wP(e,n,t,i){return Yy(e,n,t,jw,mm(e,0,i),mm(e,i+1,-1),i)}function md(e,n){for(var t="",i=Tw(e),a=0;a<i;a++)t+=n(e[a],a,e,n)||"";return t}function UQ(e,n,t,i){switch(e.type){case EQ:if(e.children.length)break;case DQ:case jw:return e.return=e.return||e.value;case kL:return"";case gL:return e.return=e.value+"{"+md(e.children,i)+"}";case Iw:e.value=e.props.join(",")}return Ka(t=md(e.children,i))?e.return=e.value+"{"+t+"}":""}function YQ(e){var n=Tw(e);return function(t,i,a,r){for(var o="",l=0;l<n;l++)o+=e[l](t,i,a,r)||"";return o}}function GQ(e){return function(n){n.root||(n=n.return)&&e(n)}}var _P=function(n){var t=new WeakMap;return function(i){if(t.has(i))return t.get(i);var a=n(i);return t.set(i,a),a}};function qQ(e){var n=Object.create(null);return function(t){return n[t]===void 0&&(n[t]=e(t)),n[t]}}var KQ=function(n,t,i){for(var a=0,r=0;a=r,r=ar(),a===38&&r===12&&(t[i]=1),!fm(r);)ji();return Ym(n,pi)},XQ=function(n,t){var i=-1,a=44;do switch(fm(a)){case 0:a===38&&ar()===12&&(t[i]=1),n[i]+=KQ(pi-1,t,i);break;case 2:n[i]+=nh(a);break;case 4:if(a===44){n[++i]=ar()===58?"&\f":"",t[i]=n[i].length;break}default:n[i]+=Hy(a)}while(a=ji());return n},QQ=function(n,t){return bL(XQ(NL(n),t))},CP=new WeakMap,ZQ=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var t=n.value,i=n.parent,a=n.column===i.column&&n.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(n.props.length===1&&t.charCodeAt(0)!==58&&!CP.get(i))&&!a){CP.set(n,!0);for(var r=[],o=QQ(t,r),l=i.props,s=0,d=0;s<o.length;s++)for(var c=0;c<l.length;c++,d++)n.props[d]=r[s]?o[s].replace(/&\f/g,l[c]):l[c]+" "+o[s]}}},JQ=function(n){if(n.type==="decl"){var t=n.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(n.return="",n.value="")}};function xL(e,n){switch(jQ(e,n)){case 5103:return tn+"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 tn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return tn+e+mv+e+Rt+e+e;case 6828:case 4268:return tn+e+Rt+e+e;case 6165:return tn+e+Rt+"flex-"+e+e;case 5187:return tn+e+an(e,/(\w+).+(:[^]+)/,tn+"box-$1$2"+Rt+"flex-$1$2")+e;case 5443:return tn+e+Rt+"flex-item-"+an(e,/flex-|-self/,"")+e;case 4675:return tn+e+Rt+"flex-line-pack"+an(e,/align-content|flex-|-self/,"")+e;case 5548:return tn+e+Rt+an(e,"shrink","negative")+e;case 5292:return tn+e+Rt+an(e,"basis","preferred-size")+e;case 6060:return tn+"box-"+an(e,"-grow","")+tn+e+Rt+an(e,"grow","positive")+e;case 4554:return tn+an(e,/([^-])(transform)/g,"$1"+tn+"$2")+e;case 6187:return an(an(an(e,/(zoom-|grab)/,tn+"$1"),/(image-set)/,tn+"$1"),e,"")+e;case 5495:case 3959:return an(e,/(image-set\([^]*)/,tn+"$1$`$1");case 4968:return an(an(e,/(.+:)(flex-)?(.*)/,tn+"box-pack:$3"+Rt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+tn+e+e;case 4095:case 3583:case 4068:case 2532:return an(e,/(.+)-inline(.+)/,tn+"$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(Ka(e)-1-n>6)switch(Pt(e,n+1)){case 109:if(Pt(e,n+4)!==45)break;case 102:return an(e,/(.+:)(.+)-([^]+)/,"$1"+tn+"$2-$3$1"+mv+(Pt(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~tx(e,"stretch")?xL(an(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Pt(e,n+1)!==115)break;case 6444:switch(Pt(e,Ka(e)-3-(~tx(e,"!important")&&10))){case 107:return an(e,":",":"+tn)+e;case 101:return an(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tn+(Pt(e,14)===45?"inline-":"")+"box$3$1"+tn+"$2$3$1"+Rt+"$2box$3")+e}break;case 5936:switch(Pt(e,n+11)){case 114:return tn+e+Rt+an(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return tn+e+Rt+an(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return tn+e+Rt+an(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return tn+e+Rt+e+e}return e}var eZ=function(n,t,i,a){if(n.length>-1&&!n.return)switch(n.type){case jw:n.return=xL(n.value,n.length);break;case gL:return md([Rc(n,{value:an(n.value,"@","@"+tn)})],a);case Iw:if(n.length)return AQ(n.props,function(r){switch(TQ(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return md([Rc(n,{props:[an(r,/:(read-\w+)/,":"+mv+"$1")]})],a);case"::placeholder":return md([Rc(n,{props:[an(r,/:(plac\w+)/,":"+tn+"input-$1")]}),Rc(n,{props:[an(r,/:(plac\w+)/,":"+mv+"$1")]}),Rc(n,{props:[an(r,/:(plac\w+)/,Rt+"input-$1")]})],a)}return""})}},nZ=[eZ],FL=function(n){var t=n.key;if(t==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(k){var y=k.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(k),k.setAttribute("data-s",""))})}var a=n.stylisPlugins||nZ,r={},o,l=[];o=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(k){for(var y=k.getAttribute("data-emotion").split(" "),g=1;g<y.length;g++)r[y[g]]=!0;l.push(k)});var s,d=[ZQ,JQ];{var c,u=[UQ,GQ(function(k){c.insert(k)})],f=YQ(d.concat(a,u)),p=function(y){return md(WQ(y),f)};s=function(y,g,v,N){c=v,p(y?y+"{"+g.styles+"}":g.styles),N&&(h.inserted[g.name]=!0)}}var h={key:t,sheet:new OQ({key:t,container:o,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:r,registered:{},insert:s};return h.sheet.hydrate(l),h};function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cn.apply(this,arguments)}var wL={exports:{}},sn={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var xt=typeof Symbol=="function"&&Symbol.for,Aw=xt?Symbol.for("react.element"):60103,Rw=xt?Symbol.for("react.portal"):60106,Gy=xt?Symbol.for("react.fragment"):60107,qy=xt?Symbol.for("react.strict_mode"):60108,Ky=xt?Symbol.for("react.profiler"):60114,Xy=xt?Symbol.for("react.provider"):60109,Qy=xt?Symbol.for("react.context"):60110,Mw=xt?Symbol.for("react.async_mode"):60111,Zy=xt?Symbol.for("react.concurrent_mode"):60111,Jy=xt?Symbol.for("react.forward_ref"):60112,eS=xt?Symbol.for("react.suspense"):60113,tZ=xt?Symbol.for("react.suspense_list"):60120,nS=xt?Symbol.for("react.memo"):60115,tS=xt?Symbol.for("react.lazy"):60116,iZ=xt?Symbol.for("react.block"):60121,aZ=xt?Symbol.for("react.fundamental"):60117,rZ=xt?Symbol.for("react.responder"):60118,oZ=xt?Symbol.for("react.scope"):60119;function Bi(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case Aw:switch(e=e.type,e){case Mw:case Zy:case Gy:case Ky:case qy:case eS:return e;default:switch(e=e&&e.$$typeof,e){case Qy:case Jy:case tS:case nS:case Xy:return e;default:return n}}case Rw:return n}}}function _L(e){return Bi(e)===Zy}sn.AsyncMode=Mw;sn.ConcurrentMode=Zy;sn.ContextConsumer=Qy;sn.ContextProvider=Xy;sn.Element=Aw;sn.ForwardRef=Jy;sn.Fragment=Gy;sn.Lazy=tS;sn.Memo=nS;sn.Portal=Rw;sn.Profiler=Ky;sn.StrictMode=qy;sn.Suspense=eS;sn.isAsyncMode=function(e){return _L(e)||Bi(e)===Mw};sn.isConcurrentMode=_L;sn.isContextConsumer=function(e){return Bi(e)===Qy};sn.isContextProvider=function(e){return Bi(e)===Xy};sn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Aw};sn.isForwardRef=function(e){return Bi(e)===Jy};sn.isFragment=function(e){return Bi(e)===Gy};sn.isLazy=function(e){return Bi(e)===tS};sn.isMemo=function(e){return Bi(e)===nS};sn.isPortal=function(e){return Bi(e)===Rw};sn.isProfiler=function(e){return Bi(e)===Ky};sn.isStrictMode=function(e){return Bi(e)===qy};sn.isSuspense=function(e){return Bi(e)===eS};sn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gy||e===Zy||e===Ky||e===qy||e===eS||e===tZ||typeof e=="object"&&e!==null&&(e.$$typeof===tS||e.$$typeof===nS||e.$$typeof===Xy||e.$$typeof===Qy||e.$$typeof===Jy||e.$$typeof===aZ||e.$$typeof===rZ||e.$$typeof===oZ||e.$$typeof===iZ)};sn.typeOf=Bi;wL.exports=sn;var lZ=wL.exports,CL=lZ,sZ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},dZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},PL={};PL[CL.ForwardRef]=sZ;PL[CL.Memo]=dZ;var cZ=!0;function uZ(e,n,t){var i="";return t.split(" ").forEach(function(a){e[a]!==void 0?n.push(e[a]+";"):i+=a+" "}),i}var mZ=function(n,t,i){var a=n.key+"-"+t.name;(i===!1||cZ===!1)&&n.registered[a]===void 0&&(n.registered[a]=t.styles)},OL=function(n,t,i){mZ(n,t,i);var a=n.key+"-"+t.name;if(n.inserted[t.name]===void 0){var r=t;do n.insert(t===r?"."+a:"",r,n.sheet,!0),r=r.next;while(r!==void 0)}};function fZ(e){for(var n=0,t,i=0,a=e.length;a>=4;++i,a-=4)t=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(t&65535)*1540483477+((t>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(e.charCodeAt(i+2)&255)<<16;case 2:n^=(e.charCodeAt(i+1)&255)<<8;case 1:n^=e.charCodeAt(i)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var pZ={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},hZ=/[A-Z]|^ms/g,vZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DL=function(n){return n.charCodeAt(1)===45},PP=function(n){return n!=null&&typeof n!="boolean"},N0=qQ(function(e){return DL(e)?e:e.replace(hZ,"-$&").toLowerCase()}),OP=function(n,t){switch(n){case"animation":case"animationName":if(typeof t=="string")return t.replace(vZ,function(i,a,r){return Xa={name:a,styles:r,next:Xa},a})}return pZ[n]!==1&&!DL(n)&&typeof t=="number"&&t!==0?t+"px":t};function pm(e,n,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Xa={name:t.name,styles:t.styles,next:Xa},t.name;if(t.styles!==void 0){var i=t.next;if(i!==void 0)for(;i!==void 0;)Xa={name:i.name,styles:i.styles,next:Xa},i=i.next;var a=t.styles+";";return a}return kZ(e,n,t)}case"function":{if(e!==void 0){var r=Xa,o=t(e);return Xa=r,pm(e,n,o)}break}}if(n==null)return t;var l=n[t];return l!==void 0?l:t}function kZ(e,n,t){var i="";if(Array.isArray(t))for(var a=0;a<t.length;a++)i+=pm(e,n,t[a])+";";else for(var r in t){var o=t[r];if(typeof o!="object")n!=null&&n[o]!==void 0?i+=r+"{"+n[o]+"}":PP(o)&&(i+=N0(r)+":"+OP(r,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(n==null||n[o[0]]===void 0))for(var l=0;l<o.length;l++)PP(o[l])&&(i+=N0(r)+":"+OP(r,o[l])+";");else{var s=pm(e,n,o);switch(r){case"animation":case"animationName":{i+=N0(r)+":"+s+";";break}default:i+=r+"{"+s+"}"}}}return i}var DP=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Xa,Lw=function(n,t,i){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,r="";Xa=void 0;var o=n[0];o==null||o.raw===void 0?(a=!1,r+=pm(i,t,o)):r+=o[0];for(var l=1;l<n.length;l++)r+=pm(i,t,n[l]),a&&(r+=o[l]);DP.lastIndex=0;for(var s="",d;(d=DP.exec(r))!==null;)s+="-"+d[1];var c=fZ(r)+s;return{name:c,styles:r,next:Xa}},gZ=Hu.useInsertionEffect?Hu.useInsertionEffect:!1,EP=gZ||S.useLayoutEffect,EL=S.createContext(typeof HTMLElement<"u"?FL({key:"css"}):null);EL.Provider;var yZ=function(n){return S.forwardRef(function(t,i){var a=S.useContext(EL);return n(t,a,i)})},ax=S.createContext({}),SZ=function(n,t){if(typeof t=="function"){var i=t(n);return i}return Cn({},n,t)},NZ=_P(function(e){return _P(function(n){return SZ(e,n)})}),bZ=function(n){var t=S.useContext(ax);return n.theme!==t&&(t=NZ(t)(n.theme)),S.createElement(ax.Provider,{value:t},n.children)},iS=yZ(function(e,n){var t=e.styles,i=Lw([t],void 0,S.useContext(ax)),a=S.useRef();return EP(function(){var r=n.key+"-global",o=new n.sheet.constructor({key:r,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),l=!1,s=document.querySelector('style[data-emotion="'+r+" "+i.name+'"]');return n.sheet.tags.length&&(o.before=n.sheet.tags[0]),s!==null&&(l=!0,s.setAttribute("data-emotion",r),o.hydrate([s])),a.current=[o,l],function(){o.flush()}},[n]),EP(function(){var r=a.current,o=r[0],l=r[1];if(l){r[1]=!1;return}if(i.next!==void 0&&OL(n,i.next,!0),o.tags.length){var s=o.tags[o.tags.length-1].nextElementSibling;o.before=s,o.flush()}n.insert("",i,o,!1)},[n,i.name]),null});function xZ(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return Lw(n)}var FZ=function(){var n=xZ.apply(void 0,arguments),t="animation-"+n.name;return{name:t,styles:"@keyframes "+t+"{"+n.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},wZ=Object.defineProperty,_Z=Object.defineProperties,CZ=Object.getOwnPropertyDescriptors,$P=Object.getOwnPropertySymbols,PZ=Object.prototype.hasOwnProperty,OZ=Object.prototype.propertyIsEnumerable,IP=(e,n,t)=>n in e?wZ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,DZ=(e,n)=>{for(var t in n||(n={}))PZ.call(n,t)&&IP(e,t,n[t]);if($P)for(var t of $P(n))OZ.call(n,t)&&IP(e,t,n[t]);return e},EZ=(e,n)=>_Z(e,CZ(n));function $Z({theme:e}){return b.createElement(iS,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:EZ(DZ({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Mc(e,n,t,i=T){Object.keys(n).forEach(a=>{e[`--mantine-${t}-${a}`]=i(n[a])})}function IZ({theme:e}){const n={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};Mc(n,e.shadows,"shadow"),Mc(n,e.fontSizes,"font-size"),Mc(n,e.radius,"radius"),Mc(n,e.spacing,"spacing"),Mc(n,e.breakpoints,"breakpoints",dc),Object.keys(e.colors).forEach(i=>{e.colors[i].forEach((a,r)=>{n[`--mantine-color-${i}-${r}`]=a})});const t=e.headings.sizes;return Object.keys(t).forEach(i=>{n[`--mantine-${i}-font-size`]=t[i].fontSize,n[`--mantine-${i}-line-height`]=`${t[i].lineHeight}`}),b.createElement(iS,{styles:{":root":n}})}var jZ=Object.defineProperty,TZ=Object.defineProperties,AZ=Object.getOwnPropertyDescriptors,jP=Object.getOwnPropertySymbols,RZ=Object.prototype.hasOwnProperty,MZ=Object.prototype.propertyIsEnumerable,TP=(e,n,t)=>n in e?jZ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ba=(e,n)=>{for(var t in n||(n={}))RZ.call(n,t)&&TP(e,t,n[t]);if(jP)for(var t of jP(n))MZ.call(n,t)&&TP(e,t,n[t]);return e},b0=(e,n)=>TZ(e,AZ(n));function LZ(e,n){var t;if(!n)return e;const i=Object.keys(e).reduce((a,r)=>{if(r==="headings"&&n.headings){const o=n.headings.sizes?Object.keys(e.headings.sizes).reduce((l,s)=>(l[s]=Ba(Ba({},e.headings.sizes[s]),n.headings.sizes[s]),l),{}):e.headings.sizes;return b0(Ba({},a),{headings:b0(Ba(Ba({},e.headings),n.headings),{sizes:o})})}if(r==="breakpoints"&&n.breakpoints){const o=Ba(Ba({},e.breakpoints),n.breakpoints);return b0(Ba({},a),{breakpoints:Object.fromEntries(Object.entries(o).sort((l,s)=>Da(l[1])-Da(s[1])))})}return a[r]=typeof n[r]=="object"?Ba(Ba({},e[r]),n[r]):typeof n[r]=="number"||typeof n[r]=="boolean"||typeof n[r]=="function"?n[r]:n[r]||e[r],a},{});if(n!=null&&n.fontFamily&&!((t=n==null?void 0:n.headings)!=null&&t.fontFamily)&&(i.headings.fontFamily=n.fontFamily),!(i.primaryColor in i.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return i}function zZ(e,n){return hL(LZ(e,n))}function $L(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}const BZ={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${T(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function VZ(){return b.createElement(iS,{styles:BZ})}var WZ=Object.defineProperty,AP=Object.getOwnPropertySymbols,HZ=Object.prototype.hasOwnProperty,UZ=Object.prototype.propertyIsEnumerable,RP=(e,n,t)=>n in e?WZ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ou=(e,n)=>{for(var t in n||(n={}))HZ.call(n,t)&&RP(e,t,n[t]);if(AP)for(var t of AP(n))UZ.call(n,t)&&RP(e,t,n[t]);return e};const fv=S.createContext({theme:$w});function vi(){var e;return((e=S.useContext(fv))==null?void 0:e.theme)||$w}function YZ(e){const n=vi(),t=i=>{var a,r,o,l;return{styles:((a=n.components[i])==null?void 0:a.styles)||{},classNames:((r=n.components[i])==null?void 0:r.classNames)||{},variants:(o=n.components[i])==null?void 0:o.variants,sizes:(l=n.components[i])==null?void 0:l.sizes}};return Array.isArray(e)?e.map(t):[t(e)]}function IL(){var e;return(e=S.useContext(fv))==null?void 0:e.emotionCache}function ae(e,n,t){var i;const a=vi(),r=(i=a.components[e])==null?void 0:i.defaultProps,o=typeof r=="function"?r(a):r;return Ou(Ou(Ou({},n),o),$L(t))}function jL({theme:e,emotionCache:n,withNormalizeCSS:t=!1,withGlobalStyles:i=!1,withCSSVariables:a=!1,inherit:r=!1,children:o}){const l=S.useContext(fv),s=zZ($w,r?Ou(Ou({},l.theme),e):e);return b.createElement(bZ,{theme:s},b.createElement(fv.Provider,{value:{theme:s,emotionCache:n}},t&&b.createElement(VZ,null),i&&b.createElement($Z,{theme:s}),a&&b.createElement(IZ,{theme:s}),typeof s.globalStyles=="function"&&b.createElement(iS,{styles:s.globalStyles(s)}),o))}jL.displayName="@mantine/core/MantineProvider";const GZ={app:100,modal:200,popover:300,overlay:400,max:9999};function Ma(e){return GZ[e]}function qZ(e,n){const t=S.useRef();return(!t.current||n.length!==t.current.prevDeps.length||t.current.prevDeps.map((i,a)=>i===n[a]).indexOf(!1)>=0)&&(t.current={v:e(),prevDeps:[...n]}),t.current.v}const KZ=FL({key:"mantine",prepend:!0});function XZ(){return IL()||KZ}var QZ=Object.defineProperty,MP=Object.getOwnPropertySymbols,ZZ=Object.prototype.hasOwnProperty,JZ=Object.prototype.propertyIsEnumerable,LP=(e,n,t)=>n in e?QZ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,eJ=(e,n)=>{for(var t in n||(n={}))ZZ.call(n,t)&&LP(e,t,n[t]);if(MP)for(var t of MP(n))JZ.call(n,t)&&LP(e,t,n[t]);return e};const x0="ref";function nJ(e){let n;if(e.length!==1)return{args:e,ref:n};const[t]=e;if(!(t instanceof Object))return{args:e,ref:n};if(!(x0 in t))return{args:e,ref:n};n=t[x0];const i=eJ({},t);return delete i[x0],{args:[i],ref:n}}const{cssFactory:tJ}=(()=>{function e(t,i,a){const r=[],o=uZ(t,r,a);return r.length<2?a:o+i(r)}function n(t){const{cache:i}=t,a=(...o)=>{const{ref:l,args:s}=nJ(o),d=Lw(s,i.registered);return OL(i,d,!1),`${i.key}-${d.name}${l===void 0?"":` ${l}`}`};return{css:a,cx:(...o)=>e(i.registered,a,uL(o))}}return{cssFactory:n}})();function TL(){const e=XZ();return qZ(()=>tJ({cache:e}),[e])}function iJ({cx:e,classes:n,context:t,classNames:i,name:a,cache:r}){const o=t.reduce((l,s)=>(Object.keys(s.classNames).forEach(d=>{typeof l[d]!="string"?l[d]=`${s.classNames[d]}`:l[d]=`${l[d]} ${s.classNames[d]}`}),l),{});return Object.keys(n).reduce((l,s)=>(l[s]=e(n[s],o[s],i!=null&&i[s],Array.isArray(a)?a.filter(Boolean).map(d=>`${(r==null?void 0:r.key)||"mantine"}-${d}-${s}`).join(" "):a?`${(r==null?void 0:r.key)||"mantine"}-${a}-${s}`:null),l),{})}var aJ=Object.defineProperty,zP=Object.getOwnPropertySymbols,rJ=Object.prototype.hasOwnProperty,oJ=Object.prototype.propertyIsEnumerable,BP=(e,n,t)=>n in e?aJ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,F0=(e,n)=>{for(var t in n||(n={}))rJ.call(n,t)&&BP(e,t,n[t]);if(zP)for(var t of zP(n))oJ.call(n,t)&&BP(e,t,n[t]);return e};function rx(e,n){return n&&Object.keys(n).forEach(t=>{e[t]?e[t]=F0(F0({},e[t]),n[t]):e[t]=F0({},n[t])}),e}function VP(e,n,t,i){const a=r=>typeof r=="function"?r(n,t||{},i):r||{};return Array.isArray(e)?e.map(r=>a(r.styles)).reduce((r,o)=>rx(r,o),{}):a(e)}function lJ({ctx:e,theme:n,params:t,variant:i,size:a}){return e.reduce((r,o)=>(o.variants&&i in o.variants&&rx(r,o.variants[i](n,t,{variant:i,size:a})),o.sizes&&a in o.sizes&&rx(r,o.sizes[a](n,t,{variant:i,size:a})),r),{})}function me(e){const n=typeof e=="function"?e:()=>e;function t(i,a){const r=vi(),o=YZ(a==null?void 0:a.name),l=IL(),s={variant:a==null?void 0:a.variant,size:a==null?void 0:a.size},{css:d,cx:c}=TL(),u=n(r,i,s),f=VP(a==null?void 0:a.styles,r,i,s),p=VP(o,r,i,s),h=lJ({ctx:o,theme:r,params:i,variant:a==null?void 0:a.variant,size:a==null?void 0:a.size}),k=Object.fromEntries(Object.keys(u).map(y=>{const g=c({[d(u[y])]:!(a!=null&&a.unstyled)},d(h[y]),d(p[y]),d(f[y]));return[y,g]}));return{classes:iJ({cx:c,classes:k,context:o,classNames:a==null?void 0:a.classNames,name:a==null?void 0:a.name,cache:l}),cx:c,theme:r}}return t}function Du(e){return`___ref-${e||""}`}var sJ=Object.defineProperty,dJ=Object.defineProperties,cJ=Object.getOwnPropertyDescriptors,WP=Object.getOwnPropertySymbols,uJ=Object.prototype.hasOwnProperty,mJ=Object.prototype.propertyIsEnumerable,HP=(e,n,t)=>n in e?sJ(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Lc=(e,n)=>{for(var t in n||(n={}))uJ.call(n,t)&&HP(e,t,n[t]);if(WP)for(var t of WP(n))mJ.call(n,t)&&HP(e,t,n[t]);return e},zc=(e,n)=>dJ(e,cJ(n));const Bc={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${T(10)})`},transitionProperty:"transform, opacity"},zf={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${T(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${T(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${T(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${T(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:zc(Lc({},Bc),{common:{transformOrigin:"center center"}}),"pop-bottom-left":zc(Lc({},Bc),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":zc(Lc({},Bc),{common:{transformOrigin:"bottom right"}}),"pop-top-left":zc(Lc({},Bc),{common:{transformOrigin:"top left"}}),"pop-top-right":zc(Lc({},Bc),{common:{transformOrigin:"top right"}})},UP=["mousedown","touchstart"];function fJ(e,n,t){const i=S.useRef();return S.useEffect(()=>{const a=r=>{const{target:o}=r??{};if(Array.isArray(t)){const l=(o==null?void 0:o.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(o)&&o.tagName!=="HTML";t.every(d=>!!d&&!r.composedPath().includes(d))&&!l&&e()}else i.current&&!i.current.contains(o)&&e()};return(n||UP).forEach(r=>document.addEventListener(r,a)),()=>{(n||UP).forEach(r=>document.removeEventListener(r,a))}},[i,e,t]),i}function pJ(e,n){try{return e.addEventListener("change",n),()=>e.removeEventListener("change",n)}catch{return e.addListener(n),()=>e.removeListener(n)}}function hJ(e,n){return typeof n=="boolean"?n:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function vJ(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,a]=S.useState(t?n:hJ(e,n)),r=S.useRef();return S.useEffect(()=>{if("matchMedia"in window)return r.current=window.matchMedia(e),a(r.current.matches),pJ(r.current,o=>a(o.matches))},[e]),i}function Eu(e,n,t){return Math.min(Math.max(e,n),t)}const zw=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Et(e,n){const t=S.useRef(!1);S.useEffect(()=>()=>{t.current=!1},[]),S.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function AL({opened:e,shouldReturnFocus:n=!0}){const t=S.useRef(),i=()=>{var a;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((a=t.current)==null||a.focus({preventScroll:!0}))};return Et(()=>{let a=-1;const r=o=>{o.key==="Tab"&&window.clearTimeout(a)};return document.addEventListener("keydown",r),e?t.current=document.activeElement:n&&(a=window.setTimeout(i,10)),()=>{window.clearTimeout(a),document.removeEventListener("keydown",r)}},[e,n]),i}const kJ=/input|select|textarea|button|object/,RL="a, input, select, textarea, button, object, [tabindex]";function gJ(e){return e.style.display==="none"}function yJ(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let t=e;for(;t&&!(t===document.body||t.nodeType===11);){if(gJ(t))return!1;t=t.parentNode}return!0}function ML(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function ox(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(ML(e));return(kJ.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&yJ(e)}function LL(e){const n=ML(e);return(Number.isNaN(n)||n>=0)&&ox(e)}function SJ(e){return Array.from(e.querySelectorAll(RL)).filter(LL)}function NJ(e,n){const t=SJ(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],a=e.getRootNode();if(!(i===a.activeElement||e===a.activeElement))return;n.preventDefault();const o=t[n.shiftKey?t.length-1:0];o&&o.focus()}function aS(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function bJ(e,n="body > :not(script)"){const t=aS(),i=Array.from(document.querySelectorAll(n)).map(a=>{var r;if((r=a==null?void 0:a.shadowRoot)!=null&&r.contains(e)||a.contains(e))return;const o=a.getAttribute("aria-hidden"),l=a.getAttribute("data-hidden"),s=a.getAttribute("data-focus-id");return a.setAttribute("data-focus-id",t),o===null||o==="false"?a.setAttribute("aria-hidden","true"):!l&&!s&&a.setAttribute("data-hidden",o),{node:a,ariaHidden:l||null}});return()=>{i.forEach(a=>{!a||t!==a.node.getAttribute("data-focus-id")||(a.ariaHidden===null?a.node.removeAttribute("aria-hidden"):a.node.setAttribute("aria-hidden",a.ariaHidden),a.node.removeAttribute("data-focus-id"),a.node.removeAttribute("data-hidden"))})}}function xJ(e=!0){const n=S.useRef(),t=S.useRef(null),i=r=>{let o=r.querySelector("[data-autofocus]");if(!o){const l=Array.from(r.querySelectorAll(RL));o=l.find(LL)||l.find(ox)||null,!o&&ox(r)&&(o=r)}o&&o.focus({preventScroll:!0})},a=S.useCallback(r=>{if(e){if(r===null){t.current&&(t.current(),t.current=null);return}t.current=bJ(r),n.current!==r&&(r?(setTimeout(()=>{r.getRootNode()&&i(r)}),n.current=r):n.current=null)}},[e]);return S.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>i(n.current));const r=o=>{o.key==="Tab"&&n.current&&NJ(n.current,o)};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r),t.current&&t.current()}},[e]),a}const FJ=e=>(e+1)%1e6;function wJ(){const[,e]=S.useReducer(FJ,0);return e}const _J=b.useId||(()=>{});function CJ(){const e=_J();return e?`mantine-${e.replace(/:/g,"")}`:""}function zr(e){const n=CJ(),[t,i]=S.useState(n);return zw(()=>{i(aS())},[]),typeof e=="string"?e:typeof window>"u"?n:t}function lx(e,n,t){S.useEffect(()=>(window.addEventListener(e,n,t),()=>window.removeEventListener(e,n,t)),[e,n])}function rS(e,n){typeof e=="function"?e(n):typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function zL(...e){return n=>{e.forEach(t=>rS(t,n))}}function Br(...e){return S.useCallback(zL(...e),e)}function vt({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[a,r]=S.useState(n!==void 0?n:t),o=l=>{r(l),i==null||i(l)};return e!==void 0?[e,i,!0]:[a,o,!1]}function Zr(e,n){const t=n-e+1;return Array.from({length:t},(i,a)=>a+e)}const Bf="dots";function PJ({total:e,siblings:n=1,boundaries:t=1,page:i,initialPage:a=1,onChange:r}){const o=Math.max(Math.trunc(e),0),[l,s]=vt({value:i,onChange:r,defaultValue:a,finalValue:a}),d=k=>{k<=0?s(1):k>o?s(o):s(k)},c=()=>d(l+1),u=()=>d(l-1),f=()=>d(1),p=()=>d(o);return{range:S.useMemo(()=>{if(n*2+3+t*2>=o)return Zr(1,o);const y=Math.max(l-n,t),g=Math.min(l+n,o-t),v=y>t+2,N=g<o-(t+1);if(!v&&N){const x=n*2+t+2;return[...Zr(1,x),Bf,...Zr(o-(t-1),o)]}if(v&&!N){const x=t+1+2*n;return[...Zr(1,t),Bf,...Zr(o-x,o)]}return[...Zr(1,t),Bf,...Zr(y,g),Bf,...Zr(o-t+1,o)]},[o,n,l]),active:l,setPage:d,next:c,previous:u,first:f,last:p}}function OJ({initialValues:e=[],limit:n}){const[{state:t,queue:i},a]=S.useState({state:e.slice(0,n),queue:e.slice(n)});return{state:t,queue:i,add:(...s)=>a(d=>{const c=[...d.state,...d.queue,...s];return{state:c.slice(0,n),queue:c.slice(n)}}),update:s=>a(d=>{const c=s([...d.state,...d.queue]);return{state:c.slice(0,n),queue:c.slice(n)}}),cleanQueue:()=>a(s=>({state:s.state,queue:[]}))}}function Gm(e,n){return vJ("(prefers-reduced-motion: reduce)",e,n)}const DJ=e=>e<.5?2*e*e:-1+(4-2*e)*e,EJ=({axis:e,target:n,parent:t,alignment:i,offset:a,isList:r})=>{if(!n||!t&&typeof document>"u")return 0;const o=!!t,s=(t||document.body).getBoundingClientRect(),d=n.getBoundingClientRect(),c=u=>d[u]-s[u];if(e==="y"){const u=c("top");if(u===0)return 0;if(i==="start"){const p=u-a;return p<=d.height*(r?0:1)||!r?p:0}const f=o?s.height:window.innerHeight;if(i==="end"){const p=u+a-f+d.height;return p>=-d.height*(r?0:1)||!r?p:0}return i==="center"?u-f/2+d.height/2:0}if(e==="x"){const u=c("left");if(u===0)return 0;if(i==="start"){const p=u-a;return p<=d.width||!r?p:0}const f=o?s.width:window.innerWidth;if(i==="end"){const p=u+a-f+d.width;return p>=-d.width||!r?p:0}return i==="center"?u-f/2+d.width/2:0}return 0},$J=({axis:e,parent:n})=>{if(!n&&typeof document>"u")return 0;const t=e==="y"?"scrollTop":"scrollLeft";if(n)return n[t];const{body:i,documentElement:a}=document;return i[t]+a[t]},IJ=({axis:e,parent:n,distance:t})=>{if(!n&&typeof document>"u")return;const i=e==="y"?"scrollTop":"scrollLeft";if(n)n[i]=t;else{const{body:a,documentElement:r}=document;a[i]=t,r[i]=t}};function BL({duration:e=1250,axis:n="y",onScrollFinish:t,easing:i=DJ,offset:a=0,cancelable:r=!0,isList:o=!1}={}){const l=S.useRef(0),s=S.useRef(0),d=S.useRef(!1),c=S.useRef(null),u=S.useRef(null),f=Gm(),p=()=>{l.current&&cancelAnimationFrame(l.current)},h=S.useCallback(({alignment:y="start"}={})=>{var g;d.current=!1,l.current&&p();const v=(g=$J({parent:c.current,axis:n}))!=null?g:0,N=EJ({parent:c.current,target:u.current,axis:n,alignment:y,offset:a,isList:o})-(c.current?0:v);function x(){s.current===0&&(s.current=performance.now());const _=performance.now()-s.current,w=f||e===0?1:_/e,C=v+N*i(w);IJ({parent:c.current,axis:n,distance:C}),!d.current&&w<1?l.current=requestAnimationFrame(x):(typeof t=="function"&&t(),s.current=0,l.current=0,p())}x()},[n,e,i,o,a,t,f]),k=()=>{r&&(d.current=!0)};return lx("wheel",k,{passive:!0}),lx("touchmove",k,{passive:!0}),S.useEffect(()=>p,[]),{scrollableRef:c,targetRef:u,scrollIntoView:h,cancel:p}}function YP(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,n=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,t=/(Win32)|(Win64)|(Windows)|(WinCE)/i,i=/(iPhone)|(iPad)|(iPod)/i;return n.test(e)?"macos":i.test(e)?"ios":t.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function jJ(e={getValueInEffect:!0}){const[n,t]=S.useState(e.getValueInEffect?"undetermined":YP());return zw(()=>{e.getValueInEffect&&t(YP)},[]),n}function tl(e=!1,n){const{onOpen:t,onClose:i}=n||{},[a,r]=S.useState(e),o=S.useCallback(()=>{r(d=>d||(t==null||t(),!0))},[t]),l=S.useCallback(()=>{r(d=>d&&(i==null||i(),!1))},[i]),s=S.useCallback(()=>{a?l():o()},[l,o,a]);return[a,{open:o,close:l,toggle:s}]}function GP(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}const pv={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[TJ,hv]=Ra(pv.context);function AJ({children:e,multiple:n,value:t,defaultValue:i,onChange:a,id:r,loop:o,transitionDuration:l,disableChevronRotation:s,chevronPosition:d,chevronSize:c,order:u,chevron:f,variant:p,radius:h,classNames:k,styles:y,unstyled:g}){const v=zr(r),[N,x]=vt({value:t,defaultValue:i,finalValue:n?[]:null,onChange:a}),F=w=>Array.isArray(N)?N.includes(w):w===N,_=w=>{const C=Array.isArray(N)?N.includes(w)?N.filter($=>$!==w):[...N,w]:w===N?null:w;x(C)};return b.createElement(TJ,{value:{isItemActive:F,onChange:_,getControlId:gP(`${v}-control`,pv.value),getRegionId:gP(`${v}-panel`,pv.value),transitionDuration:l,disableChevronRotation:s,chevronPosition:d,chevronSize:c,order:u,chevron:f,loop:o,variant:p,radius:h,classNames:k,styles:y,unstyled:g}},e)}const[RJ,VL]=Ra(pv.itemContext);function MJ(e,n,{radius:t}){const i=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3],a=e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],r=e.fn.radius(t);return n==="default"?{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderBottom:`${T(1)} solid ${i}`}:n==="contained"?{border:`${T(1)} solid ${i}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:a},"&:first-of-type":{borderTopRightRadius:r,borderTopLeftRadius:r,"& > [data-accordion-control]":{borderTopRightRadius:r,borderTopLeftRadius:r}},"&:last-of-type":{borderBottomRightRadius:r,borderBottomLeftRadius:r,"& > [data-accordion-control]":{borderBottomRightRadius:r,borderBottomLeftRadius:r}},"& + &":{borderTop:0}}:n==="filled"?{borderRadius:r,"&[data-active]":{backgroundColor:a}}:n==="separated"?{borderRadius:r,backgroundColor:a,border:`${T(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:e.spacing.md},"&[data-active]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderColor:i}}:{}}var LJ=me((e,n,{variant:t})=>({item:MJ(e,t,n)}));const zJ=LJ;var qP=Object.getOwnPropertySymbols,BJ=Object.prototype.hasOwnProperty,VJ=Object.prototype.propertyIsEnumerable,WJ=(e,n)=>{var t={};for(var i in e)BJ.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&qP)for(var i of qP(e))n.indexOf(i)<0&&VJ.call(e,i)&&(t[i]=e[i]);return t};function il(e){const n=e,{m:t,mx:i,my:a,mt:r,mb:o,ml:l,mr:s,p:d,px:c,py:u,pt:f,pb:p,pl:h,pr:k,bg:y,c:g,opacity:v,ff:N,fz:x,fw:F,lts:_,ta:w,lh:C,fs:$,tt:E,td:j,w:D,miw:M,maw:R,h:I,mih:L,mah:B,bgsz:O,bgp:P,bgr:A,bga:V,pos:U,top:oe,left:G,bottom:ne,right:Z,inset:ce,display:ie}=n,ve=WJ(n,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:$L({m:t,mx:i,my:a,mt:r,mb:o,ml:l,mr:s,p:d,px:c,py:u,pt:f,pb:p,pl:h,pr:k,bg:y,c:g,opacity:v,ff:N,fz:x,fw:F,lts:_,ta:w,lh:C,fs:$,tt:E,td:j,w:D,miw:M,maw:R,h:I,mih:L,mah:B,bgsz:O,bgp:P,bgr:A,bga:V,pos:U,top:oe,left:G,bottom:ne,right:Z,inset:ce,display:ie}),rest:ve}}function HJ(e,n){const t=Object.keys(e).filter(i=>i!=="base").sort((i,a)=>Da(q({size:i,sizes:n.breakpoints}))-Da(q({size:a,sizes:n.breakpoints})));return"base"in e?["base",...t]:t}function UJ({value:e,theme:n,getValue:t,property:i}){if(e==null)return;if(typeof e=="object")return HJ(e,n).reduce((o,l)=>{if(l==="base"&&e.base!==void 0){const d=t(e.base,n);return Array.isArray(i)?(i.forEach(c=>{o[c]=d}),o):(o[i]=d,o)}const s=t(e[l],n);return Array.isArray(i)?(o[n.fn.largerThan(l)]={},i.forEach(d=>{o[n.fn.largerThan(l)][d]=s}),o):(o[n.fn.largerThan(l)]={[i]:s},o)},{});const a=t(e,n);return Array.isArray(i)?i.reduce((r,o)=>(r[o]=a,r),{}):{[i]:a}}function YJ(e,n){return e==="dimmed"?n.colorScheme==="dark"?n.colors.dark[2]:n.colors.gray[6]:n.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function GJ(e){return T(e)}function qJ(e){return e}function KJ(e,n){return q({size:e,sizes:n.fontSizes})}const XJ=["-xs","-sm","-md","-lg","-xl"];function QJ(e,n){return XJ.includes(e)?`calc(${q({size:e.replace("-",""),sizes:n.spacing})} * -1)`:q({size:e,sizes:n.spacing})}const ZJ={identity:qJ,color:YJ,size:GJ,fontSize:KJ,spacing:QJ},JJ={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var eee=Object.defineProperty,KP=Object.getOwnPropertySymbols,nee=Object.prototype.hasOwnProperty,tee=Object.prototype.propertyIsEnumerable,XP=(e,n,t)=>n in e?eee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,QP=(e,n)=>{for(var t in n||(n={}))nee.call(n,t)&&XP(e,t,n[t]);if(KP)for(var t of KP(n))tee.call(n,t)&&XP(e,t,n[t]);return e};function ZP(e,n,t=JJ){return Object.keys(t).reduce((a,r)=>(r in e&&e[r]!==void 0&&a.push(UJ({value:e[r],getValue:ZJ[t[r].type],property:t[r].property,theme:n})),a),[]).reduce((a,r)=>(Object.keys(r).forEach(o=>{typeof r[o]=="object"&&r[o]!==null&&o in a?a[o]=QP(QP({},a[o]),r[o]):a[o]=r[o]}),a),{})}function JP(e,n){return typeof e=="function"?e(n):e}function iee(e,n,t){const i=vi(),{css:a,cx:r}=TL();return Array.isArray(e)?r(t,a(ZP(n,i)),e.map(o=>a(JP(o,i)))):r(t,a(JP(e,i)),a(ZP(n,i)))}var aee=Object.defineProperty,vv=Object.getOwnPropertySymbols,WL=Object.prototype.hasOwnProperty,HL=Object.prototype.propertyIsEnumerable,eO=(e,n,t)=>n in e?aee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ree=(e,n)=>{for(var t in n||(n={}))WL.call(n,t)&&eO(e,t,n[t]);if(vv)for(var t of vv(n))HL.call(n,t)&&eO(e,t,n[t]);return e},oee=(e,n)=>{var t={};for(var i in e)WL.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&vv)for(var i of vv(e))n.indexOf(i)<0&&HL.call(e,i)&&(t[i]=e[i]);return t};const UL=S.forwardRef((e,n)=>{var t=e,{className:i,component:a,style:r,sx:o}=t,l=oee(t,["className","component","style","sx"]);const{systemStyles:s,rest:d}=il(l),c=a||"div";return b.createElement(c,ree({ref:n,className:iee(o,s,i),style:r},d))});UL.displayName="@mantine/core/Box";const xe=UL;var lee=Object.defineProperty,kv=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,GL=Object.prototype.propertyIsEnumerable,nO=(e,n,t)=>n in e?lee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,see=(e,n)=>{for(var t in n||(n={}))YL.call(n,t)&&nO(e,t,n[t]);if(kv)for(var t of kv(n))GL.call(n,t)&&nO(e,t,n[t]);return e},dee=(e,n)=>{var t={};for(var i in e)YL.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&kv)for(var i of kv(e))n.indexOf(i)<0&&GL.call(e,i)&&(t[i]=e[i]);return t};const cee={},qL=S.forwardRef((e,n)=>{const t=ae("AccordionItem",cee,e),{children:i,className:a,value:r}=t,o=dee(t,["children","className","value"]),l=hv(),{classes:s,cx:d}=zJ({radius:l.radius},{name:"Accordion",classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant});return b.createElement(RJ,{value:{value:r}},b.createElement(xe,see({ref:n,className:d(s.item,a),"data-active":l.isItemActive(r)||void 0},o),i))});qL.displayName="@mantine/core/AccordionItem";var uee=Object.defineProperty,mee=Object.defineProperties,fee=Object.getOwnPropertyDescriptors,tO=Object.getOwnPropertySymbols,pee=Object.prototype.hasOwnProperty,hee=Object.prototype.propertyIsEnumerable,iO=(e,n,t)=>n in e?uee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Vf=(e,n)=>{for(var t in n||(n={}))pee.call(n,t)&&iO(e,t,n[t]);if(tO)for(var t of tO(n))hee.call(n,t)&&iO(e,t,n[t]);return e},vee=(e,n)=>mee(e,fee(n));function kee(e,n){return n==="default"||n==="contained"?e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}):{}}var gee=me((e,{transitionDuration:n,chevronPosition:t,chevronSize:i},{variant:a})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:t==="left"?0:e.spacing.sm,marginLeft:t==="left"?e.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${n}ms ease`,marginRight:t==="right"?0:e.spacing.sm,marginLeft:t==="right"?e.spacing.lg:0,width:T(i),minWidth:T(i),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.md,paddingBottom:e.spacing.md},itemTitle:{margin:0,padding:0},control:vee(Vf(Vf(Vf({},e.fn.focusStyles()),e.fn.fontStyles()),kee(e,a)),{width:"100%",display:"flex",alignItems:"center",flexDirection:t==="right"?"row-reverse":"row",paddingRight:e.spacing.md,paddingLeft:t==="right"?`calc(${e.spacing.md} + ${T(4)})`:e.spacing.xs,textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:disabled":Vf({opacity:.4,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))})}));const yee=gee;var See=Object.defineProperty,Nee=Object.defineProperties,bee=Object.getOwnPropertyDescriptors,aO=Object.getOwnPropertySymbols,xee=Object.prototype.hasOwnProperty,Fee=Object.prototype.propertyIsEnumerable,rO=(e,n,t)=>n in e?See(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,oO=(e,n)=>{for(var t in n||(n={}))xee.call(n,t)&&rO(e,t,n[t]);if(aO)for(var t of aO(n))Fee.call(n,t)&&rO(e,t,n[t]);return e},wee=(e,n)=>Nee(e,bee(n)),_ee=me(e=>({root:wee(oO(oO({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})})),Cee=Object.defineProperty,gv=Object.getOwnPropertySymbols,KL=Object.prototype.hasOwnProperty,XL=Object.prototype.propertyIsEnumerable,lO=(e,n,t)=>n in e?Cee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Pee=(e,n)=>{for(var t in n||(n={}))KL.call(n,t)&&lO(e,t,n[t]);if(gv)for(var t of gv(n))XL.call(n,t)&&lO(e,t,n[t]);return e},Oee=(e,n)=>{var t={};for(var i in e)KL.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&gv)for(var i of gv(e))n.indexOf(i)<0&&XL.call(e,i)&&(t[i]=e[i]);return t};const QL=S.forwardRef((e,n)=>{const t=ae("UnstyledButton",{},e),{className:i,component:a="button",unstyled:r,variant:o}=t,l=Oee(t,["className","component","unstyled","variant"]),{classes:s,cx:d}=_ee(null,{name:"UnstyledButton",unstyled:r,variant:o});return b.createElement(xe,Pee({component:a,ref:n,className:d(s.root,i),type:a==="button"?"button":void 0},l))});QL.displayName="@mantine/core/UnstyledButton";const fi=QL;var Dee=Object.defineProperty,Eee=Object.defineProperties,$ee=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,ZL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,sO=(e,n,t)=>n in e?Dee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Iee=(e,n)=>{for(var t in n||(n={}))ZL.call(n,t)&&sO(e,t,n[t]);if(yv)for(var t of yv(n))JL.call(n,t)&&sO(e,t,n[t]);return e},jee=(e,n)=>Eee(e,$ee(n)),Tee=(e,n)=>{var t={};for(var i in e)ZL.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&yv)for(var i of yv(e))n.indexOf(i)<0&&JL.call(e,i)&&(t[i]=e[i]);return t};const Aee={},e3=S.forwardRef((e,n)=>{const t=ae("AccordionControl",Aee,e),{disabled:i,onKeyDown:a,onClick:r,chevron:o,children:l,className:s,icon:d}=t,c=Tee(t,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),u=hv(),{value:f}=VL(),{classes:p,cx:h}=yee({transitionDuration:u.transitionDuration,chevronPosition:u.chevronPosition,chevronSize:u.chevronSize,radius:u.radius},{name:"Accordion",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),k=u.isItemActive(f),y=typeof u.order=="number",g=`h${u.order}`,v=b.createElement(fi,jee(Iee({},c),{ref:n,"data-accordion-control":!0,disabled:i,className:h(p.control,s),onClick:N=>{r==null||r(N),u.onChange(f)},type:"button","data-active":k||void 0,"aria-expanded":k,"aria-controls":u.getRegionId(f),id:u.getControlId(f),unstyled:u.unstyled,onKeyDown:lL({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:u.loop,orientation:"vertical",onKeyDown:a})}),b.createElement("span",{className:p.chevron,"data-rotate":!u.disableChevronRotation&&k||void 0},o||u.chevron),b.createElement("span",{className:p.label},l),d&&b.createElement("span",{className:p.icon},d));return y?b.createElement(g,{className:p.itemTitle},v):v});e3.displayName="@mantine/core/AccordionControl";var Ree=Object.defineProperty,Mee=Object.defineProperties,Lee=Object.getOwnPropertyDescriptors,dO=Object.getOwnPropertySymbols,zee=Object.prototype.hasOwnProperty,Bee=Object.prototype.propertyIsEnumerable,cO=(e,n,t)=>n in e?Ree(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Vee=(e,n)=>{for(var t in n||(n={}))zee.call(n,t)&&cO(e,t,n[t]);if(dO)for(var t of dO(n))Bee.call(n,t)&&cO(e,t,n[t]);return e},Wee=(e,n)=>Mee(e,Lee(n)),Hee=me((e,n)=>({panel:Wee(Vee({},e.fn.fontStyles()),{wordBreak:"break-word",lineHeight:e.lineHeight}),content:{padding:e.spacing.md,paddingTop:`calc(${e.spacing.xs} / 2)`}}));const Uee=Hee;var Yee=Object.defineProperty,Gee=Object.defineProperties,qee=Object.getOwnPropertyDescriptors,Sv=Object.getOwnPropertySymbols,n3=Object.prototype.hasOwnProperty,t3=Object.prototype.propertyIsEnumerable,uO=(e,n,t)=>n in e?Yee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,pl=(e,n)=>{for(var t in n||(n={}))n3.call(n,t)&&uO(e,t,n[t]);if(Sv)for(var t of Sv(n))t3.call(n,t)&&uO(e,t,n[t]);return e},w0=(e,n)=>Gee(e,qee(n)),Kee=(e,n)=>{var t={};for(var i in e)n3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Sv)for(var i of Sv(e))n.indexOf(i)<0&&t3.call(e,i)&&(t[i]=e[i]);return t};function Xee(e){if(!e||typeof e=="string")return 0;const n=e/36;return Math.round((4+15*n**.25+n/5)*10)}function _0(e){return e!=null&&e.current?e.current.scrollHeight:"auto"}const Wf=typeof window<"u"&&window.requestAnimationFrame;function Qee({transitionDuration:e,transitionTimingFunction:n="ease",onTransitionEnd:t=()=>{},opened:i}){const a=S.useRef(null),r=0,o={display:"none",height:0,overflow:"hidden"},[l,s]=S.useState(i?{}:o),d=h=>{tc.flushSync(()=>s(h))},c=h=>{d(k=>pl(pl({},k),h))};function u(h){return{transition:`height ${e||Xee(h)}ms ${n}`}}Et(()=>{Wf(i?()=>{c({willChange:"height",display:"block",overflow:"hidden"}),Wf(()=>{const h=_0(a);c(w0(pl({},u(h)),{height:h}))})}:()=>{const h=_0(a);c(w0(pl({},u(h)),{willChange:"height",height:h})),Wf(()=>c({height:r,overflow:"hidden"}))})},[i]);const f=h=>{if(!(h.target!==a.current||h.propertyName!=="height"))if(i){const k=_0(a);k===l.height?d({}):c({height:k}),t()}else l.height===r&&(d(o),t())};function p(h={}){var k=h,{style:y={},refKey:g="ref"}=k,v=Kee(k,["style","refKey"]);const N=v[g];return w0(pl({"aria-hidden":!i},v),{[g]:zL(a,N),onTransitionEnd:f,style:pl(pl({boxSizing:"border-box"},y),l)})}return p}var Zee=Object.defineProperty,Nv=Object.getOwnPropertySymbols,i3=Object.prototype.hasOwnProperty,a3=Object.prototype.propertyIsEnumerable,mO=(e,n,t)=>n in e?Zee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Hf=(e,n)=>{for(var t in n||(n={}))i3.call(n,t)&&mO(e,t,n[t]);if(Nv)for(var t of Nv(n))a3.call(n,t)&&mO(e,t,n[t]);return e},Jee=(e,n)=>{var t={};for(var i in e)i3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Nv)for(var i of Nv(e))n.indexOf(i)<0&&a3.call(e,i)&&(t[i]=e[i]);return t};const ene={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},oS=S.forwardRef((e,n)=>{const t=ae("Collapse",ene,e),{children:i,in:a,transitionDuration:r,transitionTimingFunction:o,style:l,onTransitionEnd:s,animateOpacity:d}=t,c=Jee(t,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),u=vi(),f=Gm(),h=(u.respectReducedMotion?f:!1)?0:r,{systemStyles:k,rest:y}=il(c),g=Qee({opened:a,transitionDuration:h,transitionTimingFunction:o,onTransitionEnd:s});return h===0?a?b.createElement(xe,Hf({},y),i):null:b.createElement(xe,Hf({},g(Hf(Hf({style:l,ref:n},y),k))),b.createElement("div",{style:{opacity:a||!d?1:0,transition:d?`opacity ${h}ms ${o}`:"none"}},i))});oS.displayName="@mantine/core/Collapse";var nne=Object.defineProperty,tne=Object.defineProperties,ine=Object.getOwnPropertyDescriptors,bv=Object.getOwnPropertySymbols,r3=Object.prototype.hasOwnProperty,o3=Object.prototype.propertyIsEnumerable,fO=(e,n,t)=>n in e?nne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ane=(e,n)=>{for(var t in n||(n={}))r3.call(n,t)&&fO(e,t,n[t]);if(bv)for(var t of bv(n))o3.call(n,t)&&fO(e,t,n[t]);return e},rne=(e,n)=>tne(e,ine(n)),one=(e,n)=>{var t={};for(var i in e)r3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&bv)for(var i of bv(e))n.indexOf(i)<0&&o3.call(e,i)&&(t[i]=e[i]);return t};const lne={};function l3(e){const n=ae("AccordionPanel",lne,e),{children:t,className:i}=n,a=one(n,["children","className"]),r=hv(),{value:o}=VL(),{classNames:l,styles:s,unstyled:d}=hv(),{classes:c,cx:u}=Uee({radius:r.radius},{name:"Accordion",classNames:l,styles:s,unstyled:d,variant:r.variant});return b.createElement(oS,rne(ane({},a),{className:u(c.panel,i),in:r.isItemActive(o),transitionDuration:r.transitionDuration,role:"region",id:r.getRegionId(o),"aria-labelledby":r.getControlId(o)}),b.createElement("div",{className:c.content},t))}l3.displayName="@mantine/core/AccordionPanel";var sne=Object.defineProperty,xv=Object.getOwnPropertySymbols,s3=Object.prototype.hasOwnProperty,d3=Object.prototype.propertyIsEnumerable,pO=(e,n,t)=>n in e?sne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,hO=(e,n)=>{for(var t in n||(n={}))s3.call(n,t)&&pO(e,t,n[t]);if(xv)for(var t of xv(n))d3.call(n,t)&&pO(e,t,n[t]);return e},dne=(e,n)=>{var t={};for(var i in e)s3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&xv)for(var i of xv(e))n.indexOf(i)<0&&d3.call(e,i)&&(t[i]=e[i]);return t};function hm(e){const n=e,{style:t}=n,i=dne(n,["style"]);return b.createElement("svg",hO({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:hO({width:T(16),height:T(16)},t)},i),b.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var cne=Object.defineProperty,une=Object.defineProperties,mne=Object.getOwnPropertyDescriptors,Fv=Object.getOwnPropertySymbols,c3=Object.prototype.hasOwnProperty,u3=Object.prototype.propertyIsEnumerable,vO=(e,n,t)=>n in e?cne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,fne=(e,n)=>{for(var t in n||(n={}))c3.call(n,t)&&vO(e,t,n[t]);if(Fv)for(var t of Fv(n))u3.call(n,t)&&vO(e,t,n[t]);return e},pne=(e,n)=>une(e,mne(n)),hne=(e,n)=>{var t={};for(var i in e)c3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Fv)for(var i of Fv(e))n.indexOf(i)<0&&u3.call(e,i)&&(t[i]=e[i]);return t};const vne={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:b.createElement(hm,null)};function Zn(e){const n=ae("Accordion",vne,e),{id:t,loop:i,children:a,multiple:r,value:o,defaultValue:l,onChange:s,transitionDuration:d,disableChevronRotation:c,chevronPosition:u,chevronSize:f,order:p,chevron:h,classNames:k,styles:y,unstyled:g,variant:v,radius:N}=n,x=hne(n,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return b.createElement(AJ,{id:t,multiple:r,value:o,defaultValue:l,onChange:s,loop:i,transitionDuration:d,disableChevronRotation:c,chevronPosition:u,chevronSize:f,order:p,chevron:h,variant:v,radius:N,classNames:k,styles:y,unstyled:g},b.createElement(xe,pne(fne({},x),{"data-accordion":!0}),a))}Zn.Item=qL;Zn.Control=e3;Zn.Panel=l3;Zn.displayName="@mantine/core/Accordion";var kne=Object.defineProperty,gne=Object.defineProperties,yne=Object.getOwnPropertyDescriptors,kO=Object.getOwnPropertySymbols,Sne=Object.prototype.hasOwnProperty,Nne=Object.prototype.propertyIsEnumerable,gO=(e,n,t)=>n in e?kne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,sx=(e,n)=>{for(var t in n||(n={}))Sne.call(n,t)&&gO(e,t,n[t]);if(kO)for(var t of kO(n))Nne.call(n,t)&&gO(e,t,n[t]);return e},yO=(e,n)=>gne(e,yne(n));const bne=["subtle","filled","outline","light","default","transparent","gradient"],Uf={xs:T(18),sm:T(22),md:T(28),lg:T(34),xl:T(44)};function xne({variant:e,theme:n,color:t,gradient:i}){const a=n.fn.variant({color:t,variant:e,gradient:i});return e==="gradient"?{border:0,backgroundImage:a.background,color:a.color,"&:hover":n.fn.hover({backgroundSize:"200%"})}:bne.includes(e)?sx({border:`${T(1)} solid ${a.border}`,backgroundColor:a.background,color:a.color},n.fn.hover({backgroundColor:a.hover})):null}var Fne=me((e,{radius:n,color:t,gradient:i},{variant:a,size:r})=>({root:yO(sx({position:"relative",borderRadius:e.fn.radius(n),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:q({size:r,sizes:Uf}),minHeight:q({size:r,sizes:Uf}),width:q({size:r,sizes:Uf}),minWidth:q({size:r,sizes:Uf})},xne({variant:a,theme:e,color:t,gradient:i})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:a==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:a==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":yO(sx({content:'""'},e.fn.cover(T(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(n),cursor:"not-allowed"})}})})),wne=Object.defineProperty,wv=Object.getOwnPropertySymbols,m3=Object.prototype.hasOwnProperty,f3=Object.prototype.propertyIsEnumerable,SO=(e,n,t)=>n in e?wne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,NO=(e,n)=>{for(var t in n||(n={}))m3.call(n,t)&&SO(e,t,n[t]);if(wv)for(var t of wv(n))f3.call(n,t)&&SO(e,t,n[t]);return e},bO=(e,n)=>{var t={};for(var i in e)m3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&wv)for(var i of wv(e))n.indexOf(i)<0&&f3.call(e,i)&&(t[i]=e[i]);return t};function _ne(e){var n=e,{size:t,color:i}=n,a=bO(n,["size","color"]);const r=a,{style:o}=r,l=bO(r,["style"]);return b.createElement("svg",NO({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:i,style:NO({width:t},o)},l),b.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},b.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},b.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},b.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},b.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},b.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Cne=Object.defineProperty,_v=Object.getOwnPropertySymbols,p3=Object.prototype.hasOwnProperty,h3=Object.prototype.propertyIsEnumerable,xO=(e,n,t)=>n in e?Cne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,FO=(e,n)=>{for(var t in n||(n={}))p3.call(n,t)&&xO(e,t,n[t]);if(_v)for(var t of _v(n))h3.call(n,t)&&xO(e,t,n[t]);return e},wO=(e,n)=>{var t={};for(var i in e)p3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&_v)for(var i of _v(e))n.indexOf(i)<0&&h3.call(e,i)&&(t[i]=e[i]);return t};function Pne(e){var n=e,{size:t,color:i}=n,a=wO(n,["size","color"]);const r=a,{style:o}=r,l=wO(r,["style"]);return b.createElement("svg",FO({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:i,style:FO({width:t,height:t},o)},l),b.createElement("g",{fill:"none",fillRule:"evenodd"},b.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},b.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),b.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},b.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var One=Object.defineProperty,Cv=Object.getOwnPropertySymbols,v3=Object.prototype.hasOwnProperty,k3=Object.prototype.propertyIsEnumerable,_O=(e,n,t)=>n in e?One(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,CO=(e,n)=>{for(var t in n||(n={}))v3.call(n,t)&&_O(e,t,n[t]);if(Cv)for(var t of Cv(n))k3.call(n,t)&&_O(e,t,n[t]);return e},PO=(e,n)=>{var t={};for(var i in e)v3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Cv)for(var i of Cv(e))n.indexOf(i)<0&&k3.call(e,i)&&(t[i]=e[i]);return t};function Dne(e){var n=e,{size:t,color:i}=n,a=PO(n,["size","color"]);const r=a,{style:o}=r,l=PO(r,["style"]);return b.createElement("svg",CO({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:i,style:CO({width:t},o)},l),b.createElement("circle",{cx:"15",cy:"15",r:"15"},b.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},b.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),b.createElement("circle",{cx:"105",cy:"15",r:"15"},b.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Ene=Object.defineProperty,Pv=Object.getOwnPropertySymbols,g3=Object.prototype.hasOwnProperty,y3=Object.prototype.propertyIsEnumerable,OO=(e,n,t)=>n in e?Ene(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$ne=(e,n)=>{for(var t in n||(n={}))g3.call(n,t)&&OO(e,t,n[t]);if(Pv)for(var t of Pv(n))y3.call(n,t)&&OO(e,t,n[t]);return e},Ine=(e,n)=>{var t={};for(var i in e)g3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Pv)for(var i of Pv(e))n.indexOf(i)<0&&y3.call(e,i)&&(t[i]=e[i]);return t};const C0={bars:_ne,oval:Pne,dots:Dne},jne={xs:T(18),sm:T(22),md:T(36),lg:T(44),xl:T(58)},Tne={size:"md"};function ti(e){const n=ae("Loader",Tne,e),{size:t,color:i,variant:a}=n,r=Ine(n,["size","color","variant"]),o=vi(),l=a in C0?a:o.loader;return b.createElement(xe,$ne({role:"presentation",component:C0[l]||C0.bars,size:q({size:t,sizes:jne}),color:o.fn.variant({variant:"filled",primaryFallback:!1,color:i||o.primaryColor}).background},r))}ti.displayName="@mantine/core/Loader";var Ane=Object.defineProperty,Ov=Object.getOwnPropertySymbols,S3=Object.prototype.hasOwnProperty,N3=Object.prototype.propertyIsEnumerable,DO=(e,n,t)=>n in e?Ane(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,EO=(e,n)=>{for(var t in n||(n={}))S3.call(n,t)&&DO(e,t,n[t]);if(Ov)for(var t of Ov(n))N3.call(n,t)&&DO(e,t,n[t]);return e},Rne=(e,n)=>{var t={};for(var i in e)S3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ov)for(var i of Ov(e))n.indexOf(i)<0&&N3.call(e,i)&&(t[i]=e[i]);return t};const Mne={color:"gray",size:"md",variant:"subtle"},b3=S.forwardRef((e,n)=>{const t=ae("ActionIcon",Mne,e),{className:i,color:a,children:r,radius:o,size:l,variant:s,gradient:d,disabled:c,loaderProps:u,loading:f,unstyled:p,__staticSelector:h}=t,k=Rne(t,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:y,cx:g,theme:v}=Fne({radius:o,color:a,gradient:d},{name:["ActionIcon",h],unstyled:p,size:l,variant:s}),N=b.createElement(ti,EO({color:v.fn.variant({color:a,variant:s}).color,size:"100%","data-action-icon-loader":!0},u));return b.createElement(fi,EO({className:g(y.root,i),ref:n,disabled:c,"data-disabled":c||void 0,"data-loading":f||void 0,unstyled:p},k),f?N:r)});b3.displayName="@mantine/core/ActionIcon";const Pe=b3;var Lne=Object.defineProperty,zne=Object.defineProperties,Bne=Object.getOwnPropertyDescriptors,Dv=Object.getOwnPropertySymbols,x3=Object.prototype.hasOwnProperty,F3=Object.prototype.propertyIsEnumerable,$O=(e,n,t)=>n in e?Lne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Vne=(e,n)=>{for(var t in n||(n={}))x3.call(n,t)&&$O(e,t,n[t]);if(Dv)for(var t of Dv(n))F3.call(n,t)&&$O(e,t,n[t]);return e},Wne=(e,n)=>zne(e,Bne(n)),Hne=(e,n)=>{var t={};for(var i in e)x3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Dv)for(var i of Dv(e))n.indexOf(i)<0&&F3.call(e,i)&&(t[i]=e[i]);return t};function Bw(e){const n=ae("Portal",{},e),{children:t,target:i,className:a,innerRef:r}=n,o=Hne(n,["children","target","className","innerRef"]),l=vi(),[s,d]=S.useState(!1),c=S.useRef();return zw(()=>(d(!0),c.current=i?typeof i=="string"?document.querySelector(i):i:document.createElement("div"),i||document.body.appendChild(c.current),()=>{!i&&document.body.removeChild(c.current)}),[i]),s?tc.createPortal(b.createElement("div",Wne(Vne({className:a,dir:l.dir},o),{ref:r}),t),c.current):null}Bw.displayName="@mantine/core/Portal";var Une=Object.defineProperty,Ev=Object.getOwnPropertySymbols,w3=Object.prototype.hasOwnProperty,_3=Object.prototype.propertyIsEnumerable,IO=(e,n,t)=>n in e?Une(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Yne=(e,n)=>{for(var t in n||(n={}))w3.call(n,t)&&IO(e,t,n[t]);if(Ev)for(var t of Ev(n))_3.call(n,t)&&IO(e,t,n[t]);return e},Gne=(e,n)=>{var t={};for(var i in e)w3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ev)for(var i of Ev(e))n.indexOf(i)<0&&_3.call(e,i)&&(t[i]=e[i]);return t};function uc(e){var n=e,{withinPortal:t=!0,children:i}=n,a=Gne(n,["withinPortal","children"]);return t?b.createElement(Bw,Yne({},a),i):b.createElement(b.Fragment,null,i)}uc.displayName="@mantine/core/OptionalPortal";var qne=Object.defineProperty,$v=Object.getOwnPropertySymbols,C3=Object.prototype.hasOwnProperty,P3=Object.prototype.propertyIsEnumerable,jO=(e,n,t)=>n in e?qne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,TO=(e,n)=>{for(var t in n||(n={}))C3.call(n,t)&&jO(e,t,n[t]);if($v)for(var t of $v(n))P3.call(n,t)&&jO(e,t,n[t]);return e},Kne=(e,n)=>{var t={};for(var i in e)C3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&$v)for(var i of $v(e))n.indexOf(i)<0&&P3.call(e,i)&&(t[i]=e[i]);return t};function O3(e){const n=e,{width:t,height:i,style:a}=n,r=Kne(n,["width","height","style"]);return b.createElement("svg",TO({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:TO({width:t,height:i},a)},r),b.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}O3.displayName="@mantine/core/CloseIcon";var Xne=Object.defineProperty,Iv=Object.getOwnPropertySymbols,D3=Object.prototype.hasOwnProperty,E3=Object.prototype.propertyIsEnumerable,AO=(e,n,t)=>n in e?Xne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qne=(e,n)=>{for(var t in n||(n={}))D3.call(n,t)&&AO(e,t,n[t]);if(Iv)for(var t of Iv(n))E3.call(n,t)&&AO(e,t,n[t]);return e},Zne=(e,n)=>{var t={};for(var i in e)D3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Iv)for(var i of Iv(e))n.indexOf(i)<0&&E3.call(e,i)&&(t[i]=e[i]);return t};const Jne={xs:T(12),sm:T(16),md:T(20),lg:T(28),xl:T(34)},ete={size:"sm"},$3=S.forwardRef((e,n)=>{const t=ae("CloseButton",ete,e),{iconSize:i,size:a,children:r}=t,o=Zne(t,["iconSize","size","children"]),l=T(i||Jne[a]);return b.createElement(Pe,Qne({ref:n,__staticSelector:"CloseButton",size:a},o),r||b.createElement(O3,{width:l,height:l}))});$3.displayName="@mantine/core/CloseButton";const ms=$3;var nte=Object.defineProperty,tte=Object.defineProperties,ite=Object.getOwnPropertyDescriptors,RO=Object.getOwnPropertySymbols,ate=Object.prototype.hasOwnProperty,rte=Object.prototype.propertyIsEnumerable,MO=(e,n,t)=>n in e?nte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Yf=(e,n)=>{for(var t in n||(n={}))ate.call(n,t)&&MO(e,t,n[t]);if(RO)for(var t of RO(n))rte.call(n,t)&&MO(e,t,n[t]);return e},ote=(e,n)=>tte(e,ite(n));function lte({underline:e,strikethrough:n}){const t=[];return e&&t.push("underline"),n&&t.push("line-through"),t.length>0?t.join(" "):"none"}function ste({theme:e,color:n}){return n==="dimmed"?e.fn.dimmed():typeof n=="string"&&(n in e.colors||n.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:n}).background:n||"inherit"}function dte(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function cte({theme:e,truncate:n}){return n==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:n?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var ute=me((e,{color:n,lineClamp:t,truncate:i,inline:a,inherit:r,underline:o,gradient:l,weight:s,transform:d,align:c,strikethrough:u,italic:f},{size:p})=>{const h=e.fn.variant({variant:"gradient",gradient:l});return{root:ote(Yf(Yf(Yf(Yf({},e.fn.fontStyles()),e.fn.focusStyles()),dte(t)),cte({theme:e,truncate:i})),{color:ste({color:n,theme:e}),fontFamily:r?"inherit":e.fontFamily,fontSize:r||p===void 0?"inherit":q({size:p,sizes:e.fontSizes}),lineHeight:r?"inherit":a?1:e.lineHeight,textDecoration:lte({underline:o,strikethrough:u}),WebkitTapHighlightColor:"transparent",fontWeight:r?"inherit":s,textTransform:d,textAlign:c,fontStyle:f?"italic":void 0}),gradient:{backgroundImage:h.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}}),mte=Object.defineProperty,jv=Object.getOwnPropertySymbols,I3=Object.prototype.hasOwnProperty,j3=Object.prototype.propertyIsEnumerable,LO=(e,n,t)=>n in e?mte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,fte=(e,n)=>{for(var t in n||(n={}))I3.call(n,t)&&LO(e,t,n[t]);if(jv)for(var t of jv(n))j3.call(n,t)&&LO(e,t,n[t]);return e},pte=(e,n)=>{var t={};for(var i in e)I3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&jv)for(var i of jv(e))n.indexOf(i)<0&&j3.call(e,i)&&(t[i]=e[i]);return t};const hte={variant:"text"},T3=S.forwardRef((e,n)=>{const t=ae("Text",hte,e),{className:i,size:a,weight:r,transform:o,color:l,align:s,variant:d,lineClamp:c,truncate:u,gradient:f,inline:p,inherit:h,underline:k,strikethrough:y,italic:g,classNames:v,styles:N,unstyled:x,span:F,__staticSelector:_}=t,w=pte(t,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:C,cx:$}=ute({color:l,lineClamp:c,truncate:u,inline:p,inherit:h,underline:k,strikethrough:y,italic:g,weight:r,transform:o,align:s,gradient:f},{unstyled:x,name:_||"Text",variant:d,size:a});return b.createElement(xe,fte({ref:n,className:$(C.root,{[C.gradient]:d==="gradient"},i),component:F?"span":"div"},w))});T3.displayName="@mantine/core/Text";const Ri=T3,Gf={xs:T(1),sm:T(2),md:T(3),lg:T(4),xl:T(5)};function qf(e,n){const t=e.fn.variant({variant:"outline",color:n}).border;return typeof n=="string"&&(n in e.colors||n.split(".")[0]in e.colors)?t:n===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:n}var vte=me((e,{color:n},{size:t,variant:i})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:T(1),borderTop:`${q({size:t,sizes:Gf})} ${i} ${qf(e,n)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${q({size:t,sizes:Gf})} ${i} ${qf(e,n)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:n==="dark"?e.colors.dark[1]:e.fn.themeColor(n,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:T(q({size:t,sizes:Gf})),borderTopColor:qf(e,n),borderTopStyle:i,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:T(q({size:t,sizes:Gf})),borderLeftColor:qf(e,n),borderLeftStyle:i}})),kte=Object.defineProperty,gte=Object.defineProperties,yte=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,A3=Object.prototype.hasOwnProperty,R3=Object.prototype.propertyIsEnumerable,zO=(e,n,t)=>n in e?kte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,BO=(e,n)=>{for(var t in n||(n={}))A3.call(n,t)&&zO(e,t,n[t]);if(Tv)for(var t of Tv(n))R3.call(n,t)&&zO(e,t,n[t]);return e},Ste=(e,n)=>gte(e,yte(n)),Nte=(e,n)=>{var t={};for(var i in e)A3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Tv)for(var i of Tv(e))n.indexOf(i)<0&&R3.call(e,i)&&(t[i]=e[i]);return t};const bte={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},dx=S.forwardRef((e,n)=>{const t=ae("Divider",bte,e),{className:i,color:a,orientation:r,size:o,label:l,labelPosition:s,labelProps:d,variant:c,styles:u,classNames:f,unstyled:p}=t,h=Nte(t,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:k,cx:y}=vte({color:a},{classNames:f,styles:u,unstyled:p,name:"Divider",variant:c,size:o}),g=r==="vertical",v=r==="horizontal",N=!!l&&v,x=!(d!=null&&d.color);return b.createElement(xe,BO({ref:n,className:y(k.root,{[k.vertical]:g,[k.horizontal]:v,[k.withLabel]:N},i),role:"separator"},h),N&&b.createElement(Ri,Ste(BO({},d),{size:(d==null?void 0:d.size)||"xs",mt:T(2),className:y(k.label,k[s],{[k.labelDefaultStyles]:x})}),l))});dx.displayName="@mantine/core/Divider";var xte=Object.defineProperty,Fte=Object.defineProperties,wte=Object.getOwnPropertyDescriptors,VO=Object.getOwnPropertySymbols,_te=Object.prototype.hasOwnProperty,Cte=Object.prototype.propertyIsEnumerable,WO=(e,n,t)=>n in e?xte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,HO=(e,n)=>{for(var t in n||(n={}))_te.call(n,t)&&WO(e,t,n[t]);if(VO)for(var t of VO(n))Cte.call(n,t)&&WO(e,t,n[t]);return e},Pte=(e,n)=>Fte(e,wte(n)),Ote=me((e,n,{size:t})=>({item:Pte(HO({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${q({size:t,sizes:e.spacing})} / 1.5) ${q({size:t,sizes:e.spacing})}`,cursor:"pointer",fontSize:q({size:t,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":HO({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${q({size:t,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${q({size:t,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${q({size:t,sizes:e.spacing})} / 1.5) ${q({size:t,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}})),Dte=Object.defineProperty,UO=Object.getOwnPropertySymbols,Ete=Object.prototype.hasOwnProperty,$te=Object.prototype.propertyIsEnumerable,YO=(e,n,t)=>n in e?Dte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ite=(e,n)=>{for(var t in n||(n={}))Ete.call(n,t)&&YO(e,t,n[t]);if(UO)for(var t of UO(n))$te.call(n,t)&&YO(e,t,n[t]);return e};function Vw({data:e,hovered:n,classNames:t,styles:i,isItemSelected:a,uuid:r,__staticSelector:o,onItemHover:l,onItemSelect:s,itemsRefs:d,itemComponent:c,size:u,nothingFound:f,creatable:p,createLabel:h,unstyled:k,variant:y}){const{classes:g}=Ote(null,{classNames:t,styles:i,unstyled:k,name:o,variant:y,size:u}),v=[],N=[];let x=null;const F=(w,C)=>{const $=typeof a=="function"?a(w.value):!1;return b.createElement(c,Ite({key:w.value,className:g.item,"data-disabled":w.disabled||void 0,"data-hovered":!w.disabled&&n===C||void 0,"data-selected":!w.disabled&&$||void 0,selected:$,onMouseEnter:()=>l(C),id:`${r}-${C}`,role:"option",tabIndex:-1,"aria-selected":n===C,ref:E=>{d&&d.current&&(d.current[w.value]=E)},onMouseDown:w.disabled?null:E=>{E.preventDefault(),s(w)},disabled:w.disabled,variant:y},w))};let _=null;if(e.forEach((w,C)=>{w.creatable?x=C:w.group?(_!==w.group&&(_=w.group,N.push(b.createElement("div",{className:g.separator,key:`__mantine-divider-${C}`},b.createElement(dx,{classNames:{label:g.separatorLabel},label:w.group})))),N.push(F(w,C))):v.push(F(w,C))}),p){const w=e[x];v.push(b.createElement("div",{key:aS(),className:g.item,"data-hovered":n===x||void 0,onMouseEnter:()=>l(x),onMouseDown:C=>{C.preventDefault(),s(w)},tabIndex:-1,ref:C=>{d&&d.current&&(d.current[w.value]=C)}},h))}return N.length>0&&v.length>0&&v.unshift(b.createElement("div",{className:g.separator,key:"empty-group-separator"},b.createElement(dx,null))),N.length>0||v.length>0?b.createElement(b.Fragment,null,N,v):b.createElement(Ri,{size:u,unstyled:k,className:g.nothingFound},f)}Vw.displayName="@mantine/core/SelectItems";var jte=Object.defineProperty,Av=Object.getOwnPropertySymbols,M3=Object.prototype.hasOwnProperty,L3=Object.prototype.propertyIsEnumerable,GO=(e,n,t)=>n in e?jte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Tte=(e,n)=>{for(var t in n||(n={}))M3.call(n,t)&&GO(e,t,n[t]);if(Av)for(var t of Av(n))L3.call(n,t)&&GO(e,t,n[t]);return e},Ate=(e,n)=>{var t={};for(var i in e)M3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Av)for(var i of Av(e))n.indexOf(i)<0&&L3.call(e,i)&&(t[i]=e[i]);return t};const Ww=S.forwardRef((e,n)=>{var t=e,{label:i,value:a}=t,r=Ate(t,["label","value"]);return b.createElement("div",Tte({ref:n},r),i||a)});Ww.displayName="@mantine/core/DefaultItem";function Rte(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function z3(...e){return n=>e.forEach(t=>Rte(t,n))}function fs(...e){return S.useCallback(z3(...e),e)}const B3=S.forwardRef((e,n)=>{const{children:t,...i}=e,a=S.Children.toArray(t),r=a.find(Lte);if(r){const o=r.props.children,l=a.map(s=>s===r?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:s);return S.createElement(cx,Cn({},i,{ref:n}),S.isValidElement(o)?S.cloneElement(o,void 0,l):null)}return S.createElement(cx,Cn({},i,{ref:n}),t)});B3.displayName="Slot";const cx=S.forwardRef((e,n)=>{const{children:t,...i}=e;return S.isValidElement(t)?S.cloneElement(t,{...zte(i,t.props),ref:z3(n,t.ref)}):S.Children.count(t)>1?S.Children.only(null):null});cx.displayName="SlotClone";const Mte=({children:e})=>S.createElement(S.Fragment,null,e);function Lte(e){return S.isValidElement(e)&&e.type===Mte}function zte(e,n){const t={...n};for(const i in n){const a=e[i],r=n[i];/^on[A-Z]/.test(i)?a&&r?t[i]=(...l)=>{r(...l),a(...l)}:a&&(t[i]=a):i==="style"?t[i]={...a,...r}:i==="className"&&(t[i]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Bte=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],qm=Bte.reduce((e,n)=>{const t=S.forwardRef((i,a)=>{const{asChild:r,...o}=i,l=r?B3:n;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(l,Cn({},o,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),ux=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function Vte(e,n){return S.useReducer((t,i)=>{const a=n[t][i];return a??t},e)}const Km=e=>{const{present:n,children:t}=e,i=Wte(n),a=typeof t=="function"?t({present:i.isPresent}):S.Children.only(t),r=fs(i.ref,a.ref);return typeof t=="function"||i.isPresent?S.cloneElement(a,{ref:r}):null};Km.displayName="Presence";function Wte(e){const[n,t]=S.useState(),i=S.useRef({}),a=S.useRef(e),r=S.useRef("none"),o=e?"mounted":"unmounted",[l,s]=Vte(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const d=Kf(i.current);r.current=l==="mounted"?d:"none"},[l]),ux(()=>{const d=i.current,c=a.current;if(c!==e){const f=r.current,p=Kf(d);e?s("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?s("UNMOUNT"):s(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,s]),ux(()=>{if(n){const d=u=>{const p=Kf(i.current).includes(u.animationName);u.target===n&&p&&tc.flushSync(()=>s("ANIMATION_END"))},c=u=>{u.target===n&&(r.current=Kf(i.current))};return n.addEventListener("animationstart",c),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{n.removeEventListener("animationstart",c),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[n,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:S.useCallback(d=>{d&&(i.current=getComputedStyle(d)),t(d)},[])}}function Kf(e){return(e==null?void 0:e.animationName)||"none"}function Hte(e,n=[]){let t=[];function i(r,o){const l=S.createContext(o),s=t.length;t=[...t,o];function d(u){const{scope:f,children:p,...h}=u,k=(f==null?void 0:f[e][s])||l,y=S.useMemo(()=>h,Object.values(h));return S.createElement(k.Provider,{value:y},p)}function c(u,f){const p=(f==null?void 0:f[e][s])||l,h=S.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,c]}const a=()=>{const r=t.map(o=>S.createContext(o));return function(l){const s=(l==null?void 0:l[e])||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:s}}),[l,s])}};return a.scopeName=e,[i,Ute(a,...n)]}function Ute(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const i=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const o=i.reduce((l,{useScope:s,scopeName:d})=>{const u=s(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return t.scopeName=n.scopeName,t}function Ol(e){const n=S.useRef(e);return S.useEffect(()=>{n.current=e}),S.useMemo(()=>(...t)=>{var i;return(i=n.current)===null||i===void 0?void 0:i.call(n,...t)},[])}const Yte=S.createContext(void 0);function Gte(e){const n=S.useContext(Yte);return e||n||"ltr"}function qte(e,[n,t]){return Math.min(t,Math.max(n,e))}function Ul(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function Kte(e,n){return S.useReducer((t,i)=>{const a=n[t][i];return a??t},e)}const V3="ScrollArea",[W3,CRe]=Hte(V3),[Xte,aa]=W3(V3),Qte=S.forwardRef((e,n)=>{const{__scopeScrollArea:t,type:i="hover",dir:a,scrollHideDelay:r=600,...o}=e,[l,s]=S.useState(null),[d,c]=S.useState(null),[u,f]=S.useState(null),[p,h]=S.useState(null),[k,y]=S.useState(null),[g,v]=S.useState(0),[N,x]=S.useState(0),[F,_]=S.useState(!1),[w,C]=S.useState(!1),$=fs(n,j=>s(j)),E=Gte(a);return S.createElement(Xte,{scope:t,type:i,dir:E,scrollHideDelay:r,scrollArea:l,viewport:d,onViewportChange:c,content:u,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:F,onScrollbarXEnabledChange:_,scrollbarY:k,onScrollbarYChange:y,scrollbarYEnabled:w,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:x},S.createElement(qm.div,Cn({dir:E},o,{ref:$,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})))}),Zte="ScrollAreaViewport",Jte=S.forwardRef((e,n)=>{const{__scopeScrollArea:t,children:i,...a}=e,r=aa(Zte,t),o=S.useRef(null),l=fs(n,o,r.onViewportChange);return S.createElement(S.Fragment,null,S.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),S.createElement(qm.div,Cn({"data-radix-scroll-area-viewport":""},a,{ref:l,style:{overflowX:r.scrollbarXEnabled?"scroll":"hidden",overflowY:r.scrollbarYEnabled?"scroll":"hidden",...e.style}}),S.createElement("div",{ref:r.onContentChange,style:{minWidth:"100%",display:"table"}},i)))}),Vr="ScrollAreaScrollbar",eie=S.forwardRef((e,n)=>{const{forceMount:t,...i}=e,a=aa(Vr,e.__scopeScrollArea),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return S.useEffect(()=>(l?r(!0):o(!0),()=>{l?r(!1):o(!1)}),[l,r,o]),a.type==="hover"?S.createElement(nie,Cn({},i,{ref:n,forceMount:t})):a.type==="scroll"?S.createElement(tie,Cn({},i,{ref:n,forceMount:t})):a.type==="auto"?S.createElement(H3,Cn({},i,{ref:n,forceMount:t})):a.type==="always"?S.createElement(Hw,Cn({},i,{ref:n})):null}),nie=S.forwardRef((e,n)=>{const{forceMount:t,...i}=e,a=aa(Vr,e.__scopeScrollArea),[r,o]=S.useState(!1);return S.useEffect(()=>{const l=a.scrollArea;let s=0;if(l){const d=()=>{window.clearTimeout(s),o(!0)},c=()=>{s=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",c)}}},[a.scrollArea,a.scrollHideDelay]),S.createElement(Km,{present:t||r},S.createElement(H3,Cn({"data-state":r?"visible":"hidden"},i,{ref:n})))}),tie=S.forwardRef((e,n)=>{const{forceMount:t,...i}=e,a=aa(Vr,e.__scopeScrollArea),r=e.orientation==="horizontal",o=sS(()=>s("SCROLL_END"),100),[l,s]=Kte("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>s("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,a.scrollHideDelay,s]),S.useEffect(()=>{const d=a.viewport,c=r?"scrollLeft":"scrollTop";if(d){let u=d[c];const f=()=>{const p=d[c];u!==p&&(s("SCROLL"),o()),u=p};return d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,r,s,o]),S.createElement(Km,{present:t||l!=="hidden"},S.createElement(Hw,Cn({"data-state":l==="hidden"?"hidden":"visible"},i,{ref:n,onPointerEnter:Ul(e.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:Ul(e.onPointerLeave,()=>s("POINTER_LEAVE"))})))}),H3=S.forwardRef((e,n)=>{const t=aa(Vr,e.__scopeScrollArea),{forceMount:i,...a}=e,[r,o]=S.useState(!1),l=e.orientation==="horizontal",s=sS(()=>{if(t.viewport){const d=t.viewport.offsetWidth<t.viewport.scrollWidth,c=t.viewport.offsetHeight<t.viewport.scrollHeight;o(l?d:c)}},10);return zd(t.viewport,s),zd(t.content,s),S.createElement(Km,{present:i||r},S.createElement(Hw,Cn({"data-state":r?"visible":"hidden"},a,{ref:n})))}),Hw=S.forwardRef((e,n)=>{const{orientation:t="vertical",...i}=e,a=aa(Vr,e.__scopeScrollArea),r=S.useRef(null),o=S.useRef(0),[l,s]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=q3(l.viewport,l.content),c={...i,sizes:l,onSizesChange:s,hasThumb:d>0&&d<1,onThumbChange:f=>r.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function u(f,p){return cie(f,o.current,l,p)}return t==="horizontal"?S.createElement(iie,Cn({},c,{ref:n,onThumbPositionChange:()=>{if(a.viewport&&r.current){const f=a.viewport.scrollLeft,p=qO(f,l,a.dir);r.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=u(f,a.dir))}})):t==="vertical"?S.createElement(aie,Cn({},c,{ref:n,onThumbPositionChange:()=>{if(a.viewport&&r.current){const f=a.viewport.scrollTop,p=qO(f,l);r.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=u(f))}})):null}),iie=S.forwardRef((e,n)=>{const{sizes:t,onSizesChange:i,...a}=e,r=aa(Vr,e.__scopeScrollArea),[o,l]=S.useState(),s=S.useRef(null),d=fs(n,s,r.onScrollbarXChange);return S.useEffect(()=>{s.current&&l(getComputedStyle(s.current))},[s]),S.createElement(Y3,Cn({"data-orientation":"horizontal"},a,{ref:d,sizes:t,style:{bottom:0,left:r.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:r.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lS(t)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,u)=>{if(r.viewport){const f=r.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),X3(f,u)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&o&&i({content:r.viewport.scrollWidth,viewport:r.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:Rv(o.paddingLeft),paddingEnd:Rv(o.paddingRight)}})}}))}),aie=S.forwardRef((e,n)=>{const{sizes:t,onSizesChange:i,...a}=e,r=aa(Vr,e.__scopeScrollArea),[o,l]=S.useState(),s=S.useRef(null),d=fs(n,s,r.onScrollbarYChange);return S.useEffect(()=>{s.current&&l(getComputedStyle(s.current))},[s]),S.createElement(Y3,Cn({"data-orientation":"vertical"},a,{ref:d,sizes:t,style:{top:0,right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lS(t)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,u)=>{if(r.viewport){const f=r.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),X3(f,u)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&o&&i({content:r.viewport.scrollHeight,viewport:r.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:Rv(o.paddingTop),paddingEnd:Rv(o.paddingBottom)}})}}))}),[rie,U3]=W3(Vr),Y3=S.forwardRef((e,n)=>{const{__scopeScrollArea:t,sizes:i,hasThumb:a,onThumbChange:r,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:s,onDragScroll:d,onWheelScroll:c,onResize:u,...f}=e,p=aa(Vr,t),[h,k]=S.useState(null),y=fs(n,$=>k($)),g=S.useRef(null),v=S.useRef(""),N=p.viewport,x=i.content-i.viewport,F=Ol(c),_=Ol(s),w=sS(u,10);function C($){if(g.current){const E=$.clientX-g.current.left,j=$.clientY-g.current.top;d({x:E,y:j})}}return S.useEffect(()=>{const $=E=>{const j=E.target;(h==null?void 0:h.contains(j))&&F(E,x)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[N,h,x,F]),S.useEffect(_,[i,_]),zd(h,w),zd(p.content,w),S.createElement(rie,{scope:t,scrollbar:h,hasThumb:a,onThumbChange:Ol(r),onThumbPointerUp:Ol(o),onThumbPositionChange:_,onThumbPointerDown:Ol(l)},S.createElement(qm.div,Cn({},f,{ref:y,style:{position:"absolute",...f.style},onPointerDown:Ul(e.onPointerDown,$=>{$.button===0&&($.target.setPointerCapture($.pointerId),g.current=h.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C($))}),onPointerMove:Ul(e.onPointerMove,C),onPointerUp:Ul(e.onPointerUp,$=>{const E=$.target;E.hasPointerCapture($.pointerId)&&E.releasePointerCapture($.pointerId),document.body.style.webkitUserSelect=v.current,g.current=null})})))}),mx="ScrollAreaThumb",oie=S.forwardRef((e,n)=>{const{forceMount:t,...i}=e,a=U3(mx,e.__scopeScrollArea);return S.createElement(Km,{present:t||a.hasThumb},S.createElement(lie,Cn({ref:n},i)))}),lie=S.forwardRef((e,n)=>{const{__scopeScrollArea:t,style:i,...a}=e,r=aa(mx,t),o=U3(mx,t),{onThumbPositionChange:l}=o,s=fs(n,u=>o.onThumbChange(u)),d=S.useRef(),c=sS(()=>{d.current&&(d.current(),d.current=void 0)},100);return S.useEffect(()=>{const u=r.viewport;if(u){const f=()=>{if(c(),!d.current){const p=uie(u,l);d.current=p,l()}};return l(),u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[r.viewport,c,l]),S.createElement(qm.div,Cn({"data-state":o.hasThumb?"visible":"hidden"},a,{ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Ul(e.onPointerDownCapture,u=>{const p=u.target.getBoundingClientRect(),h=u.clientX-p.left,k=u.clientY-p.top;o.onThumbPointerDown({x:h,y:k})}),onPointerUp:Ul(e.onPointerUp,o.onThumbPointerUp)}))}),G3="ScrollAreaCorner",sie=S.forwardRef((e,n)=>{const t=aa(G3,e.__scopeScrollArea),i=!!(t.scrollbarX&&t.scrollbarY);return t.type!=="scroll"&&i?S.createElement(die,Cn({},e,{ref:n})):null}),die=S.forwardRef((e,n)=>{const{__scopeScrollArea:t,...i}=e,a=aa(G3,t),[r,o]=S.useState(0),[l,s]=S.useState(0),d=!!(r&&l);return zd(a.scrollbarX,()=>{var c;const u=((c=a.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;a.onCornerHeightChange(u),s(u)}),zd(a.scrollbarY,()=>{var c;const u=((c=a.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;a.onCornerWidthChange(u),o(u)}),d?S.createElement(qm.div,Cn({},i,{ref:n,style:{width:r,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Rv(e){return e?parseInt(e,10):0}function q3(e,n){const t=e/n;return isNaN(t)?0:t}function lS(e){const n=q3(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function cie(e,n,t,i="ltr"){const a=lS(t),r=a/2,o=n||r,l=a-o,s=t.scrollbar.paddingStart+o,d=t.scrollbar.size-t.scrollbar.paddingEnd-l,c=t.content-t.viewport,u=i==="ltr"?[0,c]:[c*-1,0];return K3([s,d],u)(e)}function qO(e,n,t="ltr"){const i=lS(n),a=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,r=n.scrollbar.size-a,o=n.content-n.viewport,l=r-i,s=t==="ltr"?[0,o]:[o*-1,0],d=qte(e,s);return K3([0,o],[0,l])(d)}function K3(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function X3(e,n){return e>0&&e<n}const uie=(e,n=()=>{})=>{let t={left:e.scrollLeft,top:e.scrollTop},i=0;return function a(){const r={left:e.scrollLeft,top:e.scrollTop},o=t.left!==r.left,l=t.top!==r.top;(o||l)&&n(),t=r,i=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(i)};function sS(e,n){const t=Ol(e),i=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(i.current),[]),S.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(t,n)},[t,n])}function zd(e,n){const t=Ol(n);ux(()=>{let i=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return a.observe(e),()=>{window.cancelAnimationFrame(i),a.unobserve(e)}}},[e,t])}const mie=Qte,fie=Jte,KO=eie,XO=oie,pie=sie;var hie=me((e,{scrollbarSize:n,offsetScrollbars:t,scrollbarHovered:i,hidden:a})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:t?T(n):void 0,paddingBottom:t?T(n):void 0},scrollbar:{display:a?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${T(n)}  / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Du("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:T(n)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:T(n)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Du("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:T(n),position:"relative",transition:"background-color 150ms ease",display:a?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:T(44),minHeight:T(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:i?1:0,display:a?"none":void 0}})),vie=Object.defineProperty,kie=Object.defineProperties,gie=Object.getOwnPropertyDescriptors,Mv=Object.getOwnPropertySymbols,Q3=Object.prototype.hasOwnProperty,Z3=Object.prototype.propertyIsEnumerable,QO=(e,n,t)=>n in e?vie(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,fx=(e,n)=>{for(var t in n||(n={}))Q3.call(n,t)&&QO(e,t,n[t]);if(Mv)for(var t of Mv(n))Z3.call(n,t)&&QO(e,t,n[t]);return e},J3=(e,n)=>kie(e,gie(n)),e4=(e,n)=>{var t={};for(var i in e)Q3.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Mv)for(var i of Mv(e))n.indexOf(i)<0&&Z3.call(e,i)&&(t[i]=e[i]);return t};const n4={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},dS=S.forwardRef((e,n)=>{const t=ae("ScrollArea",n4,e),{children:i,className:a,classNames:r,styles:o,scrollbarSize:l,scrollHideDelay:s,type:d,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:p,unstyled:h,variant:k,viewportProps:y}=t,g=e4(t,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[v,N]=S.useState(!1),x=vi(),{classes:F,cx:_}=hie({scrollbarSize:l,offsetScrollbars:u,scrollbarHovered:v,hidden:d==="never"},{name:"ScrollArea",classNames:r,styles:o,unstyled:h,variant:k});return b.createElement(mie,{type:d==="never"?"always":d,scrollHideDelay:s,dir:c||x.dir,ref:n,asChild:!0},b.createElement(xe,fx({className:_(F.root,a)},g),b.createElement(fie,J3(fx({},y),{className:F.viewport,ref:f,onScroll:typeof p=="function"?({currentTarget:w})=>p({x:w.scrollLeft,y:w.scrollTop}):void 0}),i),b.createElement(KO,{orientation:"horizontal",className:F.scrollbar,forceMount:!0,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},b.createElement(XO,{className:F.thumb})),b.createElement(KO,{orientation:"vertical",className:F.scrollbar,forceMount:!0,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},b.createElement(XO,{className:F.thumb})),b.createElement(pie,{className:F.corner})))}),t4=S.forwardRef((e,n)=>{const t=ae("ScrollAreaAutosize",n4,e),{children:i,classNames:a,styles:r,scrollbarSize:o,scrollHideDelay:l,type:s,dir:d,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:f,unstyled:p,sx:h,variant:k,viewportProps:y}=t,g=e4(t,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return b.createElement(xe,J3(fx({},g),{ref:n,sx:[{display:"flex"},...sL(h)]}),b.createElement(xe,{sx:{display:"flex",flexDirection:"column",flex:1}},b.createElement(dS,{classNames:a,styles:r,scrollHideDelay:l,scrollbarSize:o,type:s,dir:d,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:f,unstyled:p,variant:k,viewportProps:y},i)))});t4.displayName="@mantine/core/ScrollAreaAutosize";dS.displayName="@mantine/core/ScrollArea";dS.Autosize=t4;const yie=dS;var Sie=Object.defineProperty,Nie=Object.defineProperties,bie=Object.getOwnPropertyDescriptors,Lv=Object.getOwnPropertySymbols,i4=Object.prototype.hasOwnProperty,a4=Object.prototype.propertyIsEnumerable,ZO=(e,n,t)=>n in e?Sie(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,JO=(e,n)=>{for(var t in n||(n={}))i4.call(n,t)&&ZO(e,t,n[t]);if(Lv)for(var t of Lv(n))a4.call(n,t)&&ZO(e,t,n[t]);return e},xie=(e,n)=>Nie(e,bie(n)),Fie=(e,n)=>{var t={};for(var i in e)i4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Lv)for(var i of Lv(e))n.indexOf(i)<0&&a4.call(e,i)&&(t[i]=e[i]);return t};const cS=S.forwardRef((e,n)=>{var t=e,{style:i}=t,a=Fie(t,["style"]);return b.createElement(yie,xie(JO({},a),{style:JO({width:"100%"},i),viewportProps:{tabIndex:-1},viewportRef:n}),a.children)});cS.displayName="@mantine/core/SelectScrollArea";var wie=me(()=>({dropdown:{},itemsWrapper:{padding:T(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const Ea=Math.min,Vt=Math.max,zv=Math.round,Xf=Math.floor,Ho=e=>({x:e,y:e}),_ie={left:"right",right:"left",bottom:"top",top:"bottom"},Cie={start:"end",end:"start"};function px(e,n,t){return Vt(e,Ea(n,t))}function Rr(e,n){return typeof e=="function"?e(n):e}function $a(e){return e.split("-")[0]}function mc(e){return e.split("-")[1]}function Uw(e){return e==="x"?"y":"x"}function Yw(e){return e==="y"?"height":"width"}function ps(e){return["top","bottom"].includes($a(e))?"y":"x"}function Gw(e){return Uw(ps(e))}function Pie(e,n,t){t===void 0&&(t=!1);const i=mc(e),a=Gw(e),r=Yw(a);let o=a==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(o=Bv(o)),[o,Bv(o)]}function Oie(e){const n=Bv(e);return[hx(e),n,hx(n)]}function hx(e){return e.replace(/start|end/g,n=>Cie[n])}function Die(e,n,t){const i=["left","right"],a=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return t?n?a:i:n?i:a;case"left":case"right":return n?r:o;default:return[]}}function Eie(e,n,t,i){const a=mc(e);let r=Die($a(e),t==="start",i);return a&&(r=r.map(o=>o+"-"+a),n&&(r=r.concat(r.map(hx)))),r}function Bv(e){return e.replace(/left|right|bottom|top/g,n=>_ie[n])}function $ie(e){return{top:0,right:0,bottom:0,left:0,...e}}function qw(e){return typeof e!="number"?$ie(e):{top:e,right:e,bottom:e,left:e}}function Bd(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function eD(e,n,t){let{reference:i,floating:a}=e;const r=ps(n),o=Gw(n),l=Yw(o),s=$a(n),d=r==="y",c=i.x+i.width/2-a.width/2,u=i.y+i.height/2-a.height/2,f=i[l]/2-a[l]/2;let p;switch(s){case"top":p={x:c,y:i.y-a.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-a.width,y:u};break;default:p={x:i.x,y:i.y}}switch(mc(n)){case"start":p[o]-=f*(t&&d?-1:1);break;case"end":p[o]+=f*(t&&d?-1:1);break}return p}const Iie=async(e,n,t)=>{const{placement:i="bottom",strategy:a="absolute",middleware:r=[],platform:o}=t,l=r.filter(Boolean),s=await(o.isRTL==null?void 0:o.isRTL(n));let d=await o.getElementRects({reference:e,floating:n,strategy:a}),{x:c,y:u}=eD(d,i,s),f=i,p={},h=0;for(let k=0;k<l.length;k++){const{name:y,fn:g}=l[k],{x:v,y:N,data:x,reset:F}=await g({x:c,y:u,initialPlacement:i,placement:f,strategy:a,middlewareData:p,rects:d,platform:o,elements:{reference:e,floating:n}});c=v??c,u=N??u,p={...p,[y]:{...p[y],...x}},F&&h<=50&&(h++,typeof F=="object"&&(F.placement&&(f=F.placement),F.rects&&(d=F.rects===!0?await o.getElementRects({reference:e,floating:n,strategy:a}):F.rects),{x:c,y:u}=eD(d,f,s)),k=-1)}return{x:c,y:u,placement:f,strategy:a,middlewareData:p}};async function Kw(e,n){var t;n===void 0&&(n={});const{x:i,y:a,platform:r,rects:o,elements:l,strategy:s}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Rr(n,e),h=qw(p),y=l[f?u==="floating"?"reference":"floating":u],g=Bd(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(y)))==null||t?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:d,rootBoundary:c,strategy:s})),v=u==="floating"?{...o.floating,x:i,y:a}:o.reference,N=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),x=await(r.isElement==null?void 0:r.isElement(N))?await(r.getScale==null?void 0:r.getScale(N))||{x:1,y:1}:{x:1,y:1},F=Bd(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:N,strategy:s}):v);return{top:(g.top-F.top+h.top)/x.y,bottom:(F.bottom-g.bottom+h.bottom)/x.y,left:(g.left-F.left+h.left)/x.x,right:(F.right-g.right+h.right)/x.x}}const jie=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:a,rects:r,platform:o,elements:l,middlewareData:s}=n,{element:d,padding:c=0}=Rr(e,n)||{};if(d==null)return{};const u=qw(c),f={x:t,y:i},p=Gw(a),h=Yw(p),k=await o.getDimensions(d),y=p==="y",g=y?"top":"left",v=y?"bottom":"right",N=y?"clientHeight":"clientWidth",x=r.reference[h]+r.reference[p]-f[p]-r.floating[h],F=f[p]-r.reference[p],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let w=_?_[N]:0;(!w||!await(o.isElement==null?void 0:o.isElement(_)))&&(w=l.floating[N]||r.floating[h]);const C=x/2-F/2,$=w/2-k[h]/2-1,E=Ea(u[g],$),j=Ea(u[v],$),D=E,M=w-k[h]-j,R=w/2-k[h]/2+C,I=px(D,R,M),L=!s.arrow&&mc(a)!=null&&R!==I&&r.reference[h]/2-(R<D?E:j)-k[h]/2<0,B=L?R<D?R-D:R-M:0;return{[p]:f[p]+B,data:{[p]:I,centerOffset:R-I-B,...L&&{alignmentOffset:B}},reset:L}}}),Tie=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,i;const{placement:a,middlewareData:r,rects:o,initialPlacement:l,platform:s,elements:d}=n,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:k=!0,...y}=Rr(e,n);if((t=r.arrow)!=null&&t.alignmentOffset)return{};const g=$a(a),v=$a(l)===l,N=await(s.isRTL==null?void 0:s.isRTL(d.floating)),x=f||(v||!k?[Bv(l)]:Oie(l));!f&&h!=="none"&&x.push(...Eie(l,k,h,N));const F=[l,...x],_=await Kw(n,y),w=[];let C=((i=r.flip)==null?void 0:i.overflows)||[];if(c&&w.push(_[g]),u){const D=Pie(a,o,N);w.push(_[D[0]],_[D[1]])}if(C=[...C,{placement:a,overflows:w}],!w.every(D=>D<=0)){var $,E;const D=((($=r.flip)==null?void 0:$.index)||0)+1,M=F[D];if(M)return{data:{index:D,overflows:C},reset:{placement:M}};let R=(E=C.filter(I=>I.overflows[0]<=0).sort((I,L)=>I.overflows[1]-L.overflows[1])[0])==null?void 0:E.placement;if(!R)switch(p){case"bestFit":{var j;const I=(j=C.map(L=>[L.placement,L.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((L,B)=>L[1]-B[1])[0])==null?void 0:j[0];I&&(R=I);break}case"initialPlacement":R=l;break}if(a!==R)return{reset:{placement:R}}}return{}}}};function r4(e){const n=Ea(...e.map(r=>r.left)),t=Ea(...e.map(r=>r.top)),i=Vt(...e.map(r=>r.right)),a=Vt(...e.map(r=>r.bottom));return{x:n,y:t,width:i-n,height:a-t}}function Aie(e){const n=e.slice().sort((a,r)=>a.y-r.y),t=[];let i=null;for(let a=0;a<n.length;a++){const r=n[a];!i||r.y-i.y>i.height/2?t.push([r]):t[t.length-1].push(r),i=r}return t.map(a=>Bd(r4(a)))}const Rie=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:a,platform:r,strategy:o}=n,{padding:l=2,x:s,y:d}=Rr(e,n),c=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(i.reference))||[]),u=Aie(c),f=Bd(r4(c)),p=qw(l);function h(){if(u.length===2&&u[0].left>u[1].right&&s!=null&&d!=null)return u.find(y=>s>y.left-p.left&&s<y.right+p.right&&d>y.top-p.top&&d<y.bottom+p.bottom)||f;if(u.length>=2){if(ps(t)==="y"){const E=u[0],j=u[u.length-1],D=$a(t)==="top",M=E.top,R=j.bottom,I=D?E.left:j.left,L=D?E.right:j.right,B=L-I,O=R-M;return{top:M,bottom:R,left:I,right:L,width:B,height:O,x:I,y:M}}const y=$a(t)==="left",g=Vt(...u.map(E=>E.right)),v=Ea(...u.map(E=>E.left)),N=u.filter(E=>y?E.left===v:E.right===g),x=N[0].top,F=N[N.length-1].bottom,_=v,w=g,C=w-_,$=F-x;return{top:x,bottom:F,left:_,right:w,width:C,height:$,x:_,y:x}}return f}const k=await r.getElementRects({reference:{getBoundingClientRect:h},floating:i.floating,strategy:o});return a.reference.x!==k.reference.x||a.reference.y!==k.reference.y||a.reference.width!==k.reference.width||a.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};async function Mie(e,n){const{placement:t,platform:i,elements:a}=e,r=await(i.isRTL==null?void 0:i.isRTL(a.floating)),o=$a(t),l=mc(t),s=ps(t)==="y",d=["left","top"].includes(o)?-1:1,c=r&&s?-1:1,u=Rr(n,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),s?{x:p*c,y:f*d}:{x:f*d,y:p*c}}const o4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:a,y:r,placement:o,middlewareData:l}=n,s=await Mie(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:o}}}}},Lie=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:a}=n,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...s}=Rr(e,n),d={x:t,y:i},c=await Kw(n,s),u=ps($a(a)),f=Uw(u);let p=d[f],h=d[u];if(r){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=p+c[y],N=p-c[g];p=px(v,p,N)}if(o){const y=u==="y"?"top":"left",g=u==="y"?"bottom":"right",v=h+c[y],N=h-c[g];h=px(v,h,N)}const k=l.fn({...n,[f]:p,[u]:h});return{...k,data:{x:k.x-t,y:k.y-i}}}}},zie=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:a,rects:r,middlewareData:o}=n,{offset:l=0,mainAxis:s=!0,crossAxis:d=!0}=Rr(e,n),c={x:t,y:i},u=ps(a),f=Uw(u);let p=c[f],h=c[u];const k=Rr(l,n),y=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(s){const N=f==="y"?"height":"width",x=r.reference[f]-r.floating[N]+y.mainAxis,F=r.reference[f]+r.reference[N]-y.mainAxis;p<x?p=x:p>F&&(p=F)}if(d){var g,v;const N=f==="y"?"width":"height",x=["top","left"].includes($a(a)),F=r.reference[u]-r.floating[N]+(x&&((g=o.offset)==null?void 0:g[u])||0)+(x?0:y.crossAxis),_=r.reference[u]+r.reference[N]+(x?0:((v=o.offset)==null?void 0:v[u])||0)-(x?y.crossAxis:0);h<F?h=F:h>_&&(h=_)}return{[f]:p,[u]:h}}}},Bie=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:t,rects:i,platform:a,elements:r}=n,{apply:o=()=>{},...l}=Rr(e,n),s=await Kw(n,l),d=$a(t),c=mc(t),u=ps(t)==="y",{width:f,height:p}=i.floating;let h,k;d==="top"||d==="bottom"?(h=d,k=c===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(k=d,h=c==="end"?"top":"bottom");const y=p-s[h],g=f-s[k],v=!n.middlewareData.shift;let N=y,x=g;if(u){const _=f-s.left-s.right;x=c||v?Ea(g,_):_}else{const _=p-s.top-s.bottom;N=c||v?Ea(y,_):_}if(v&&!c){const _=Vt(s.left,0),w=Vt(s.right,0),C=Vt(s.top,0),$=Vt(s.bottom,0);u?x=f-2*(_!==0||w!==0?_+w:Vt(s.left,s.right)):N=p-2*(C!==0||$!==0?C+$:Vt(s.top,s.bottom))}await o({...n,availableWidth:x,availableHeight:N});const F=await a.getDimensions(r.floating);return f!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function Uo(e){return l4(e)?(e.nodeName||"").toLowerCase():"#document"}function Ti(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Wr(e){var n;return(n=(l4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function l4(e){return e instanceof Node||e instanceof Ti(e).Node}function Mr(e){return e instanceof Element||e instanceof Ti(e).Element}function lr(e){return e instanceof HTMLElement||e instanceof Ti(e).HTMLElement}function nD(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ti(e).ShadowRoot}function Xm(e){const{overflow:n,overflowX:t,overflowY:i,display:a}=ia(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&!["inline","contents"].includes(a)}function Vie(e){return["table","td","th"].includes(Uo(e))}function Xw(e){const n=Qw(),t=ia(e);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function s4(e){let n=Vd(e);for(;lr(n)&&!uS(n);){if(Xw(n))return n;n=Vd(n)}return null}function Qw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function uS(e){return["html","body","#document"].includes(Uo(e))}function ia(e){return Ti(e).getComputedStyle(e)}function mS(e){return Mr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vd(e){if(Uo(e)==="html")return e;const n=e.assignedSlot||e.parentNode||nD(e)&&e.host||Wr(e);return nD(n)?n.host:n}function d4(e){const n=Vd(e);return uS(n)?e.ownerDocument?e.ownerDocument.body:e.body:lr(n)&&Xm(n)?n:d4(n)}function Er(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const a=d4(e),r=a===((i=e.ownerDocument)==null?void 0:i.body),o=Ti(a);return r?n.concat(o,o.visualViewport||[],Xm(a)?a:[],o.frameElement&&t?Er(o.frameElement):[]):n.concat(a,Er(a,[],t))}function c4(e){const n=ia(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const a=lr(e),r=a?e.offsetWidth:t,o=a?e.offsetHeight:i,l=zv(t)!==r||zv(i)!==o;return l&&(t=r,i=o),{width:t,height:i,$:l}}function Zw(e){return Mr(e)?e:e.contextElement}function fd(e){const n=Zw(e);if(!lr(n))return Ho(1);const t=n.getBoundingClientRect(),{width:i,height:a,$:r}=c4(n);let o=(r?zv(t.width):t.width)/i,l=(r?zv(t.height):t.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Wie=Ho(0);function u4(e){const n=Ti(e);return!Qw()||!n.visualViewport?Wie:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Hie(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Ti(e)?!1:n}function ns(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const a=e.getBoundingClientRect(),r=Zw(e);let o=Ho(1);n&&(i?Mr(i)&&(o=fd(i)):o=fd(e));const l=Hie(r,t,i)?u4(r):Ho(0);let s=(a.left+l.x)/o.x,d=(a.top+l.y)/o.y,c=a.width/o.x,u=a.height/o.y;if(r){const f=Ti(r),p=i&&Mr(i)?Ti(i):i;let h=f.frameElement;for(;h&&i&&p!==f;){const k=fd(h),y=h.getBoundingClientRect(),g=ia(h),v=y.left+(h.clientLeft+parseFloat(g.paddingLeft))*k.x,N=y.top+(h.clientTop+parseFloat(g.paddingTop))*k.y;s*=k.x,d*=k.y,c*=k.x,u*=k.y,s+=v,d+=N,h=Ti(h).frameElement}}return Bd({width:c,height:u,x:s,y:d})}const Uie=[":popover-open",":modal"];function m4(e){let n=!1,t=0,i=0;function a(r){try{n=n||e.matches(r)}catch{}}if(Uie.forEach(r=>{a(r)}),n){const r=s4(e);if(r){const o=r.getBoundingClientRect();t=o.x,i=o.y}}return[n,t,i]}function Yie(e){let{elements:n,rect:t,offsetParent:i,strategy:a}=e;const r=Wr(i),[o]=n?m4(n.floating):[!1];if(i===r||o)return t;let l={scrollLeft:0,scrollTop:0},s=Ho(1);const d=Ho(0),c=lr(i);if((c||!c&&a!=="fixed")&&((Uo(i)!=="body"||Xm(r))&&(l=mS(i)),lr(i))){const u=ns(i);s=fd(i),d.x=u.x+i.clientLeft,d.y=u.y+i.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+d.x,y:t.y*s.y-l.scrollTop*s.y+d.y}}function Gie(e){return Array.from(e.getClientRects())}function f4(e){return ns(Wr(e)).left+mS(e).scrollLeft}function qie(e){const n=Wr(e),t=mS(e),i=e.ownerDocument.body,a=Vt(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),r=Vt(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+f4(e);const l=-t.scrollTop;return ia(i).direction==="rtl"&&(o+=Vt(n.clientWidth,i.clientWidth)-a),{width:a,height:r,x:o,y:l}}function Kie(e,n){const t=Ti(e),i=Wr(e),a=t.visualViewport;let r=i.clientWidth,o=i.clientHeight,l=0,s=0;if(a){r=a.width,o=a.height;const d=Qw();(!d||d&&n==="fixed")&&(l=a.offsetLeft,s=a.offsetTop)}return{width:r,height:o,x:l,y:s}}function Xie(e,n){const t=ns(e,!0,n==="fixed"),i=t.top+e.clientTop,a=t.left+e.clientLeft,r=lr(e)?fd(e):Ho(1),o=e.clientWidth*r.x,l=e.clientHeight*r.y,s=a*r.x,d=i*r.y;return{width:o,height:l,x:s,y:d}}function tD(e,n,t){let i;if(n==="viewport")i=Kie(e,t);else if(n==="document")i=qie(Wr(e));else if(Mr(n))i=Xie(n,t);else{const a=u4(e);i={...n,x:n.x-a.x,y:n.y-a.y}}return Bd(i)}function p4(e,n){const t=Vd(e);return t===n||!Mr(t)||uS(t)?!1:ia(t).position==="fixed"||p4(t,n)}function Qie(e,n){const t=n.get(e);if(t)return t;let i=Er(e,[],!1).filter(l=>Mr(l)&&Uo(l)!=="body"),a=null;const r=ia(e).position==="fixed";let o=r?Vd(e):e;for(;Mr(o)&&!uS(o);){const l=ia(o),s=Xw(o);!s&&l.position==="fixed"&&(a=null),(r?!s&&!a:!s&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Xm(o)&&!s&&p4(e,o))?i=i.filter(c=>c!==o):a=l,o=Vd(o)}return n.set(e,i),i}function Zie(e){let{element:n,boundary:t,rootBoundary:i,strategy:a}=e;const o=[...t==="clippingAncestors"?Qie(n,this._c):[].concat(t),i],l=o[0],s=o.reduce((d,c)=>{const u=tD(n,c,a);return d.top=Vt(u.top,d.top),d.right=Ea(u.right,d.right),d.bottom=Ea(u.bottom,d.bottom),d.left=Vt(u.left,d.left),d},tD(n,l,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Jie(e){const{width:n,height:t}=c4(e);return{width:n,height:t}}function eae(e,n,t,i){const a=lr(n),r=Wr(n),o=t==="fixed",l=ns(e,!0,o,n);let s={scrollLeft:0,scrollTop:0};const d=Ho(0);if(a||!a&&!o)if((Uo(n)!=="body"||Xm(r))&&(s=mS(n)),a){const k=ns(n,!0,o,n);d.x=k.x+n.clientLeft,d.y=k.y+n.clientTop}else r&&(d.x=f4(r));let c=l.left+s.scrollLeft-d.x,u=l.top+s.scrollTop-d.y;const[f,p,h]=m4(i);return f&&(c+=p,u+=h,a&&(c+=n.clientLeft,u+=n.clientTop)),{x:c,y:u,width:l.width,height:l.height}}function iD(e,n){return!lr(e)||ia(e).position==="fixed"?null:n?n(e):e.offsetParent}function h4(e,n){const t=Ti(e);if(!lr(e))return t;let i=iD(e,n);for(;i&&Vie(i)&&ia(i).position==="static";)i=iD(i,n);return i&&(Uo(i)==="html"||Uo(i)==="body"&&ia(i).position==="static"&&!Xw(i))?t:i||s4(e)||t}const nae=async function(e){const n=this.getOffsetParent||h4,t=this.getDimensions;return{reference:eae(e.reference,await n(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await t(e.floating)}}};function tae(e){return ia(e).direction==="rtl"}const iae={convertOffsetParentRelativeRectToViewportRelativeRect:Yie,getDocumentElement:Wr,getClippingRect:Zie,getOffsetParent:h4,getElementRects:nae,getClientRects:Gie,getDimensions:Jie,getScale:fd,isElement:Mr,isRTL:tae};function aae(e,n){let t=null,i;const a=Wr(e);function r(){var l;clearTimeout(i),(l=t)==null||l.disconnect(),t=null}function o(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),r();const{left:d,top:c,width:u,height:f}=e.getBoundingClientRect();if(l||n(),!u||!f)return;const p=Xf(c),h=Xf(a.clientWidth-(d+u)),k=Xf(a.clientHeight-(c+f)),y=Xf(d),v={rootMargin:-p+"px "+-h+"px "+-k+"px "+-y+"px",threshold:Vt(0,Ea(1,s))||1};let N=!0;function x(F){const _=F[0].intersectionRatio;if(_!==s){if(!N)return o();_?o(!1,_):i=setTimeout(()=>{o(!1,1e-7)},100)}N=!1}try{t=new IntersectionObserver(x,{...v,root:a.ownerDocument})}catch{t=new IntersectionObserver(x,v)}t.observe(e)}return o(!0),r}function rae(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=i,d=Zw(e),c=a||r?[...d?Er(d):[],...Er(n)]:[];c.forEach(g=>{a&&g.addEventListener("scroll",t,{passive:!0}),r&&g.addEventListener("resize",t)});const u=d&&l?aae(d,t):null;let f=-1,p=null;o&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===d&&p&&(p.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var N;(N=p)==null||N.observe(n)})),t()}),d&&!s&&p.observe(d),p.observe(n));let h,k=s?ns(e):null;s&&y();function y(){const g=ns(e);k&&(g.x!==k.x||g.y!==k.y||g.width!==k.width||g.height!==k.height)&&t(),k=g,h=requestAnimationFrame(y)}return t(),()=>{var g;c.forEach(v=>{a&&v.removeEventListener("scroll",t),r&&v.removeEventListener("resize",t)}),u==null||u(),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const Jw=Lie,v4=Tie,oae=Bie,aD=jie,k4=Rie,lae=zie,sae=(e,n,t)=>{const i=new Map,a={platform:iae,...t},r={...a.platform,_c:i};return Iie(e,n,{...a,platform:r})},g4=e=>{const{element:n,padding:t}=e;function i(a){return Object.prototype.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){return i(n)?n.current!=null?aD({element:n.current,padding:t}).fn(a):{}:n?aD({element:n,padding:t}).fn(a):{}}}};var ih=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Vv(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,a;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!=n.length)return!1;for(i=t;i--!==0;)if(!Vv(e[i],n[i]))return!1;return!0}if(a=Object.keys(e),t=a.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=t;i--!==0;){const r=a[i];if(!(r==="_owner"&&e.$$typeof)&&!Vv(e[r],n[r]))return!1}return!0}return e!==e&&n!==n}function rD(e){const n=S.useRef(e);return ih(()=>{n.current=e}),n}function dae(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:a,whileElementsMounted:r,open:o}=e,[l,s]=S.useState({x:null,y:null,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[d,c]=S.useState(i);Vv(d,i)||c(i);const u=S.useRef(null),f=S.useRef(null),p=S.useRef(l),h=rD(r),k=rD(a),[y,g]=S.useState(null),[v,N]=S.useState(null),x=S.useCallback(E=>{u.current!==E&&(u.current=E,g(E))},[]),F=S.useCallback(E=>{f.current!==E&&(f.current=E,N(E))},[]),_=S.useCallback(()=>{if(!u.current||!f.current)return;const E={placement:n,strategy:t,middleware:d};k.current&&(E.platform=k.current),sae(u.current,f.current,E).then(j=>{const D={...j,isPositioned:!0};w.current&&!Vv(p.current,D)&&(p.current=D,tc.flushSync(()=>{s(D)}))})},[d,n,t,k]);ih(()=>{o===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,s(E=>({...E,isPositioned:!1})))},[o]);const w=S.useRef(!1);ih(()=>(w.current=!0,()=>{w.current=!1}),[]),ih(()=>{if(y&&v){if(h.current)return h.current(y,v,_);_()}},[y,v,_,h]);const C=S.useMemo(()=>({reference:u,floating:f,setReference:x,setFloating:F}),[x,F]),$=S.useMemo(()=>({reference:y,floating:v}),[y,v]);return S.useMemo(()=>({...l,update:_,refs:C,elements:$,reference:x,floating:F}),[l,_,C,$,x,F])}var Wd=typeof document<"u"?S.useLayoutEffect:S.useEffect;let P0=!1,cae=0;const oD=()=>"floating-ui-"+cae++;function uae(){const[e,n]=S.useState(()=>P0?oD():void 0);return Wd(()=>{e==null&&n(oD())},[]),S.useEffect(()=>{P0||(P0=!0)},[]),e}const mae=Hu.useId,lD=mae||uae;function fae(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(a=>a(t))},on(n,t){e.set(n,[...e.get(n)||[],t])},off(n,t){e.set(n,(e.get(n)||[]).filter(i=>i!==t))}}}const pae=S.createContext(null),hae=S.createContext(null),y4=()=>{var e;return((e=S.useContext(pae))==null?void 0:e.id)||null},e_=()=>S.useContext(hae);function bo(e){return(e==null?void 0:e.ownerDocument)||document}function vae(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kae(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function n_(e){return bo(e).defaultView||window}function er(e){return e?e instanceof n_(e).Element:!1}function S4(e){return e?e instanceof n_(e).HTMLElement:!1}function gae(e){if(typeof ShadowRoot>"u")return!1;const n=n_(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}function yae(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const n=/Android/i;return(n.test(vae())||n.test(kae()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Sae(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function N4(e,n){const t=["mouse","pen"];return n||t.push("",void 0),t.includes(e)}function sD(e){const n=S.useRef(e);return Wd(()=>{n.current=e}),n}const dD="data-floating-ui-safe-polygon";function ah(e,n,t){return t&&!N4(t)?0:typeof e=="number"?e:e==null?void 0:e[n]}const Nae=function(e,n){let{enabled:t=!0,delay:i=0,handleClose:a=null,mouseOnly:r=!1,restMs:o=0,move:l=!0}=n===void 0?{}:n;const{open:s,onOpenChange:d,dataRef:c,events:u,elements:{domReference:f,floating:p},refs:h}=e,k=e_(),y=y4(),g=sD(a),v=sD(i),N=S.useRef(),x=S.useRef(),F=S.useRef(),_=S.useRef(),w=S.useRef(!0),C=S.useRef(!1),$=S.useRef(()=>{}),E=S.useCallback(()=>{var R;const I=(R=c.current.openEvent)==null?void 0:R.type;return(I==null?void 0:I.includes("mouse"))&&I!=="mousedown"},[c]);S.useEffect(()=>{if(!t)return;function R(){clearTimeout(x.current),clearTimeout(_.current),w.current=!0}return u.on("dismiss",R),()=>{u.off("dismiss",R)}},[t,u]),S.useEffect(()=>{if(!t||!g.current||!s)return;function R(){E()&&d(!1)}const I=bo(p).documentElement;return I.addEventListener("mouseleave",R),()=>{I.removeEventListener("mouseleave",R)}},[p,s,d,t,g,c,E]);const j=S.useCallback(function(R){R===void 0&&(R=!0);const I=ah(v.current,"close",N.current);I&&!F.current?(clearTimeout(x.current),x.current=setTimeout(()=>d(!1),I)):R&&(clearTimeout(x.current),d(!1))},[v,d]),D=S.useCallback(()=>{$.current(),F.current=void 0},[]),M=S.useCallback(()=>{if(C.current){const R=bo(h.floating.current).body;R.style.pointerEvents="",R.removeAttribute(dD),C.current=!1}},[h]);return S.useEffect(()=>{if(!t)return;function R(){return c.current.openEvent?["click","mousedown"].includes(c.current.openEvent.type):!1}function I(O){if(clearTimeout(x.current),w.current=!1,r&&!N4(N.current)||o>0&&ah(v.current,"open")===0)return;c.current.openEvent=O;const P=ah(v.current,"open",N.current);P?x.current=setTimeout(()=>{d(!0)},P):d(!0)}function L(O){if(R())return;$.current();const P=bo(p);if(clearTimeout(_.current),g.current){s||clearTimeout(x.current),F.current=g.current({...e,tree:k,x:O.clientX,y:O.clientY,onClose(){M(),D(),j()}});const A=F.current;P.addEventListener("mousemove",A),$.current=()=>{P.removeEventListener("mousemove",A)};return}j()}function B(O){R()||g.current==null||g.current({...e,tree:k,x:O.clientX,y:O.clientY,onClose(){M(),D(),j()}})(O)}if(er(f)){const O=f;return s&&O.addEventListener("mouseleave",B),p==null||p.addEventListener("mouseleave",B),l&&O.addEventListener("mousemove",I,{once:!0}),O.addEventListener("mouseenter",I),O.addEventListener("mouseleave",L),()=>{s&&O.removeEventListener("mouseleave",B),p==null||p.removeEventListener("mouseleave",B),l&&O.removeEventListener("mousemove",I),O.removeEventListener("mouseenter",I),O.removeEventListener("mouseleave",L)}}},[f,p,t,e,r,o,l,j,D,M,d,s,k,v,g,c]),Wd(()=>{var R;if(t&&s&&(R=g.current)!=null&&R.__options.blockPointerEvents&&E()){const B=bo(p).body;if(B.setAttribute(dD,""),B.style.pointerEvents="none",C.current=!0,er(f)&&p){var I,L;const O=f,P=k==null||(I=k.nodesRef.current.find(A=>A.id===y))==null||(L=I.context)==null?void 0:L.elements.floating;return P&&(P.style.pointerEvents=""),O.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{O.style.pointerEvents="",p.style.pointerEvents=""}}}},[t,s,y,p,f,k,g,c,E]),Wd(()=>{s||(N.current=void 0,D(),M())},[s,D,M]),S.useEffect(()=>()=>{D(),clearTimeout(x.current),clearTimeout(_.current),M()},[t,D,M]),S.useMemo(()=>{if(!t)return{};function R(I){N.current=I.pointerType}return{reference:{onPointerDown:R,onPointerEnter:R,onMouseMove(){s||o===0||(clearTimeout(_.current),_.current=setTimeout(()=>{w.current||d(!0)},o))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(){u.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),j(!1)}}}},[u,t,o,s,d,j])},b4=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),x4=()=>S.useContext(b4),bae=e=>{let{children:n,delay:t,timeoutMs:i=0}=e;const[a,r]=S.useReducer((s,d)=>({...s,...d}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=S.useRef(null),l=S.useCallback(s=>{r({currentId:s})},[]);return Wd(()=>{a.currentId?o.current===null?o.current=a.currentId:r({isInstantPhase:!0}):(r({isInstantPhase:!1}),o.current=null)},[a.currentId]),S.createElement(b4.Provider,{value:S.useMemo(()=>({...a,setState:r,setCurrentId:l}),[a,r,l])},n)},xae=(e,n)=>{let{open:t,onOpenChange:i}=e,{id:a}=n;const{currentId:r,setCurrentId:o,initialDelay:l,setState:s,timeoutMs:d}=x4();S.useEffect(()=>{r&&(s({delay:{open:1,close:ah(l,"close")}}),r!==a&&i(!1))},[a,i,s,r,l]),S.useEffect(()=>{function c(){i(!1),s({delay:l,currentId:null})}if(!t&&r===a)if(d){const u=window.setTimeout(c,d);return()=>{clearTimeout(u)}}else c()},[t,s,r,a,i,l,d]),S.useEffect(()=>{t&&o(a)},[t,o,a])};function Fae(e){let n=e.activeElement;for(;((t=n)==null||(i=t.shadowRoot)==null?void 0:i.activeElement)!=null;){var t,i;n=n.shadowRoot.activeElement}return n}function cD(e,n){if(!e||!n)return!1;const t=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(t&&gae(t)){let i=n;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function O0(e,n){let t=e.filter(a=>{var r;return a.parentId===n&&((r=a.context)==null?void 0:r.open)})||[],i=t;for(;i.length;)i=e.filter(a=>{var r;return(r=i)==null?void 0:r.some(o=>{var l;return a.parentId===o.id&&((l=a.context)==null?void 0:l.open)})})||[],t=t.concat(i);return t}function wae(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _ae=Hu.useInsertionEffect,Cae=_ae||(e=>e());function F4(e){const n=S.useRef(()=>{});return Cae(()=>{n.current=e}),S.useCallback(function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return n.current==null?void 0:n.current(...i)},[])}function rh(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}const Pae={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Oae={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Dae=function(e){var n,t;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(n=e.escapeKey)!=null?n:!0,outsidePressBubbles:typeof e=="boolean"?e:(t=e.outsidePress)!=null?t:!0}},Eae=function(e,n){let{open:t,onOpenChange:i,events:a,nodeId:r,elements:{reference:o,domReference:l,floating:s},dataRef:d}=e,{enabled:c=!0,escapeKey:u=!0,outsidePress:f=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:k="pointerdown",ancestorScroll:y=!1,bubbles:g=!0}=n===void 0?{}:n;const v=e_(),N=y4()!=null,x=F4(typeof f=="function"?f:()=>!1),F=typeof f=="function"?x:f,_=S.useRef(!1),{escapeKeyBubbles:w,outsidePressBubbles:C}=Dae(g);return S.useEffect(()=>{if(!t||!c)return;d.current.__escapeKeyBubbles=w,d.current.__outsidePressBubbles=C;function $(R){if(R.key==="Escape"){const I=v?O0(v.nodesRef.current,r):[];if(I.length>0){let L=!0;if(I.forEach(B=>{var O;if((O=B.context)!=null&&O.open&&!B.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}a.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),i(!1)}}function E(R){const I=_.current;if(_.current=!1,I||typeof F=="function"&&!F(R))return;const L=wae(R);if(S4(L)&&s){const P=s.ownerDocument.defaultView||window,A=L.scrollWidth>L.clientWidth,V=L.scrollHeight>L.clientHeight;let U=V&&R.offsetX>L.clientWidth;if(V&&P.getComputedStyle(L).direction==="rtl"&&(U=R.offsetX<=L.offsetWidth-L.clientWidth),U||A&&R.offsetY>L.clientHeight)return}const B=v&&O0(v.nodesRef.current,r).some(P=>{var A;return rh(R,(A=P.context)==null?void 0:A.elements.floating)});if(rh(R,s)||rh(R,l)||B)return;const O=v?O0(v.nodesRef.current,r):[];if(O.length>0){let P=!0;if(O.forEach(A=>{var V;if((V=A.context)!=null&&V.open&&!A.context.dataRef.current.__outsidePressBubbles){P=!1;return}}),!P)return}a.emit("dismiss",{type:"outsidePress",data:{returnFocus:N?{preventScroll:!0}:yae(R)||Sae(R)}}),i(!1)}function j(){i(!1)}const D=bo(s);u&&D.addEventListener("keydown",$),F&&D.addEventListener(p,E);let M=[];return y&&(er(l)&&(M=Er(l)),er(s)&&(M=M.concat(Er(s))),!er(o)&&o&&o.contextElement&&(M=M.concat(Er(o.contextElement)))),M=M.filter(R=>{var I;return R!==((I=D.defaultView)==null?void 0:I.visualViewport)}),M.forEach(R=>{R.addEventListener("scroll",j,{passive:!0})}),()=>{u&&D.removeEventListener("keydown",$),F&&D.removeEventListener(p,E),M.forEach(R=>{R.removeEventListener("scroll",j)})}},[d,s,l,o,u,F,p,a,v,r,t,i,y,c,w,C,N]),S.useEffect(()=>{_.current=!1},[F,p]),S.useMemo(()=>c?{reference:{[Pae[k]]:()=>{h&&(a.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),i(!1))}},floating:{[Oae[p]]:()=>{_.current=!0}}}:{},[c,a,h,p,k,i])},$ae=function(e,n){let{open:t,onOpenChange:i,dataRef:a,events:r,refs:o,elements:{floating:l,domReference:s}}=e,{enabled:d=!0,keyboardOnly:c=!0}=n===void 0?{}:n;const u=S.useRef(""),f=S.useRef(!1),p=S.useRef();return S.useEffect(()=>{if(!d)return;const k=bo(l).defaultView||window;function y(){!t&&S4(s)&&s===Fae(bo(s))&&(f.current=!0)}return k.addEventListener("blur",y),()=>{k.removeEventListener("blur",y)}},[l,s,t,d]),S.useEffect(()=>{if(!d)return;function h(k){(k.type==="referencePress"||k.type==="escapeKey")&&(f.current=!0)}return r.on("dismiss",h),()=>{r.off("dismiss",h)}},[r,d]),S.useEffect(()=>()=>{clearTimeout(p.current)},[]),S.useMemo(()=>d?{reference:{onPointerDown(h){let{pointerType:k}=h;u.current=k,f.current=!!(k&&c)},onMouseLeave(){f.current=!1},onFocus(h){var k;f.current||h.type==="focus"&&((k=a.current.openEvent)==null?void 0:k.type)==="mousedown"&&a.current.openEvent&&rh(a.current.openEvent,s)||(a.current.openEvent=h.nativeEvent,i(!0))},onBlur(h){f.current=!1;const k=h.relatedTarget,y=er(k)&&k.hasAttribute("data-floating-ui-focus-guard")&&k.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{cD(o.floating.current,k)||cD(s,k)||y||i(!1)})}}}:{},[d,c,s,o,a,i])},Iae=function(e,n){let{open:t}=e,{enabled:i=!0,role:a="dialog"}=n===void 0?{}:n;const r=lD(),o=lD();return S.useMemo(()=>{const l={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":t?r:void 0},floating:l}:{reference:{"aria-expanded":t?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":t?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...l,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,t,r,o])};function t_(e){e===void 0&&(e={});const{open:n=!1,onOpenChange:t,nodeId:i}=e,a=dae(e),r=e_(),o=S.useRef(null),l=S.useRef({}),s=S.useState(()=>fae())[0],[d,c]=S.useState(null),u=S.useCallback(g=>{const v=er(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;a.refs.setReference(v)},[a.refs]),f=S.useCallback(g=>{(er(g)||g===null)&&(o.current=g,c(g)),(er(a.refs.reference.current)||a.refs.reference.current===null||g!==null&&!er(g))&&a.refs.setReference(g)},[a.refs]),p=S.useMemo(()=>({...a.refs,setReference:f,setPositionReference:u,domReference:o}),[a.refs,f,u]),h=S.useMemo(()=>({...a.elements,domReference:d}),[a.elements,d]),k=F4(t),y=S.useMemo(()=>({...a,refs:p,elements:h,dataRef:l,nodeId:i,events:s,open:n,onOpenChange:k}),[a,i,s,n,k,p,h]);return Wd(()=>{const g=r==null?void 0:r.nodesRef.current.find(v=>v.id===i);g&&(g.context=y)}),S.useMemo(()=>({...a,context:y,refs:p,reference:f,positionReference:u}),[a,p,y,f,u])}function D0(e,n,t){const i=new Map;return{...t==="floating"&&{tabIndex:-1},...e,...n.map(a=>a?a[t]:null).concat(e).reduce((a,r)=>(r&&Object.entries(r).forEach(o=>{let[l,s]=o;if(l.indexOf("on")===0){if(i.has(l)||i.set(l,[]),typeof s=="function"){var d;(d=i.get(l))==null||d.push(s),a[l]=function(){for(var c,u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];(c=i.get(l))==null||c.forEach(h=>h(...f))}}}else a[l]=s}),a),{})}}const jae=function(e){e===void 0&&(e=[]);const n=e,t=S.useCallback(r=>D0(r,e,"reference"),n),i=S.useCallback(r=>D0(r,e,"floating"),n),a=S.useCallback(r=>D0(r,e,"item"),e.map(r=>r==null?void 0:r.item));return S.useMemo(()=>({getReferenceProps:t,getFloatingProps:i,getItemProps:a}),[t,i,a])};function w4({opened:e,floating:n,position:t,positionDependencies:i}){const[a,r]=S.useState(0);S.useEffect(()=>{if(n.refs.reference.current&&n.refs.floating.current)return rae(n.refs.reference.current,n.refs.floating.current,n.update)},[n.refs.reference.current,n.refs.floating.current,e,a,t]),Et(()=>{n.update()},i),Et(()=>{r(o=>o+1)},[e])}function Tae(e){const n=[o4(e.offset)];return e.middlewares.shift&&n.push(Jw({limiter:lae()})),e.middlewares.flip&&n.push(v4()),e.middlewares.inline&&n.push(k4()),n.push(g4({element:e.arrowRef,padding:e.arrowOffset})),n}function Aae(e){const[n,t]=vt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),i=()=>{var o;(o=e.onClose)==null||o.call(e),t(!1)},a=()=>{var o,l;n?((o=e.onClose)==null||o.call(e),t(!1)):((l=e.onOpen)==null||l.call(e),t(!0))},r=t_({placement:e.position,middleware:[...Tae(e),...e.width==="target"?[oae({apply({rects:o}){var l,s;Object.assign((s=(l=r.refs.floating.current)==null?void 0:l.style)!=null?s:{},{width:`${o.reference.width}px`})}})]:[]]});return w4({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:r}),Et(()=>{var o;(o=e.onPositionChange)==null||o.call(e,r.placement)},[r.placement]),Et(()=>{var o,l;e.opened?(l=e.onOpen)==null||l.call(e):(o=e.onClose)==null||o.call(e)},[e.opened]),{floating:r,controlled:typeof e.opened=="boolean",opened:n,onClose:i,onToggle:a}}const _4={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[Rae,C4]=Ra(_4.context);var Mae=Object.defineProperty,Lae=Object.defineProperties,zae=Object.getOwnPropertyDescriptors,Wv=Object.getOwnPropertySymbols,P4=Object.prototype.hasOwnProperty,O4=Object.prototype.propertyIsEnumerable,uD=(e,n,t)=>n in e?Mae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qf=(e,n)=>{for(var t in n||(n={}))P4.call(n,t)&&uD(e,t,n[t]);if(Wv)for(var t of Wv(n))O4.call(n,t)&&uD(e,t,n[t]);return e},Bae=(e,n)=>Lae(e,zae(n)),Vae=(e,n)=>{var t={};for(var i in e)P4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Wv)for(var i of Wv(e))n.indexOf(i)<0&&O4.call(e,i)&&(t[i]=e[i]);return t};const Wae={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},D4=S.forwardRef((e,n)=>{const t=ae("PopoverTarget",Wae,e),{children:i,refProp:a,popupType:r,shouldOverrideDefaultTargetId:o}=t,l=Vae(t,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!sc(i))throw new Error(_4.children);const s=l,d=C4(),c=Br(d.reference,i.ref,n),u=d.withRoles?{"aria-haspopup":r,"aria-expanded":d.opened,"aria-controls":d.getDropdownId(),id:o?d.getTargetId():i.props.id}:{};return S.cloneElement(i,Qf(Bae(Qf(Qf(Qf({},s),u),d.targetProps),{className:uL(d.targetProps.className,s.className,i.props.className),[a]:c}),d.controlled?null:{onClick:d.onToggle}))});D4.displayName="@mantine/core/PopoverTarget";var Hae=me((e,{radius:n,shadow:t})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[t]||t||"none",borderRadius:e.fn.radius(n),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const Uae=Hae;var Yae=Object.defineProperty,mD=Object.getOwnPropertySymbols,Gae=Object.prototype.hasOwnProperty,qae=Object.prototype.propertyIsEnumerable,fD=(e,n,t)=>n in e?Yae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Os=(e,n)=>{for(var t in n||(n={}))Gae.call(n,t)&&fD(e,t,n[t]);if(mD)for(var t of mD(n))qae.call(n,t)&&fD(e,t,n[t]);return e};const pD={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Kae({transition:e,state:n,duration:t,timingFunction:i}){const a={transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in zf?Os(Os(Os({transitionProperty:zf[e].transitionProperty},a),zf[e].common),zf[e][pD[n]]):null:Os(Os(Os({transitionProperty:e.transitionProperty},a),e.common),e[pD[n]])}function Xae({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:a,onExit:r,onEntered:o,onExited:l}){const s=vi(),d=Gm(),c=s.respectReducedMotion?d:!1,[u,f]=S.useState(c?0:e),[p,h]=S.useState(i?"entered":"exited"),k=S.useRef(-1),y=g=>{const v=g?a:r,N=g?o:l;h(g?"pre-entering":"pre-exiting"),window.clearTimeout(k.current);const x=c?0:g?e:n;if(f(x),x===0)typeof v=="function"&&v(),typeof N=="function"&&N(),h(g?"entered":"exited");else{const F=window.setTimeout(()=>{typeof v=="function"&&v(),h(g?"entering":"exiting")},10);k.current=window.setTimeout(()=>{window.clearTimeout(F),typeof N=="function"&&N(),h(g?"entered":"exited")},x)}};return Et(()=>{y(i)},[i]),S.useEffect(()=>()=>window.clearTimeout(k.current),[]),{transitionDuration:u,transitionStatus:p,transitionTimingFunction:t||s.transitionTimingFunction}}function fc({keepMounted:e,transition:n,duration:t=250,exitDuration:i=t,mounted:a,children:r,timingFunction:o,onExit:l,onEntered:s,onEnter:d,onExited:c}){const{transitionDuration:u,transitionStatus:f,transitionTimingFunction:p}=Xae({mounted:a,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:s,onEnter:d,onExited:c});return u===0?a?b.createElement(b.Fragment,null,r({})):e?r({display:"none"}):null:f==="exited"?e?r({display:"none"}):null:b.createElement(b.Fragment,null,r(Kae({transition:n,duration:u,state:f,timingFunction:p})))}fc.displayName="@mantine/core/Transition";function i_({children:e,active:n=!0,refProp:t="ref"}){const i=xJ(n),a=Br(i,e==null?void 0:e.ref);return sc(e)?S.cloneElement(e,{[t]:a}):e}i_.displayName="@mantine/core/FocusTrap";var Qae=Object.defineProperty,Zae=Object.defineProperties,Jae=Object.getOwnPropertyDescriptors,hD=Object.getOwnPropertySymbols,ere=Object.prototype.hasOwnProperty,nre=Object.prototype.propertyIsEnumerable,vD=(e,n,t)=>n in e?Qae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Jr=(e,n)=>{for(var t in n||(n={}))ere.call(n,t)&&vD(e,t,n[t]);if(hD)for(var t of hD(n))nre.call(n,t)&&vD(e,t,n[t]);return e},Zf=(e,n)=>Zae(e,Jae(n));function kD(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function gD(e,n,t,i,a){return e==="center"||i==="center"?{left:n}:e==="end"?{[a==="ltr"?"right":"left"]:t}:e==="start"?{[a==="ltr"?"left":"right"]:t}:{}}const tre={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function ire({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:a,arrowX:r,arrowY:o,dir:l}){const[s,d="center"]=e.split("-"),c={width:T(n),height:T(n),transform:"rotate(45deg)",position:"absolute",[tre[s]]:T(i)},u=T(-n/2);return s==="left"?Zf(Jr(Jr({},c),kD(d,o,t,a)),{right:u,borderLeftColor:"transparent",borderBottomColor:"transparent"}):s==="right"?Zf(Jr(Jr({},c),kD(d,o,t,a)),{left:u,borderRightColor:"transparent",borderTopColor:"transparent"}):s==="top"?Zf(Jr(Jr({},c),gD(d,r,t,a,l)),{bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent"}):s==="bottom"?Zf(Jr(Jr({},c),gD(d,r,t,a,l)),{top:u,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var are=Object.defineProperty,rre=Object.defineProperties,ore=Object.getOwnPropertyDescriptors,Hv=Object.getOwnPropertySymbols,E4=Object.prototype.hasOwnProperty,$4=Object.prototype.propertyIsEnumerable,yD=(e,n,t)=>n in e?are(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,lre=(e,n)=>{for(var t in n||(n={}))E4.call(n,t)&&yD(e,t,n[t]);if(Hv)for(var t of Hv(n))$4.call(n,t)&&yD(e,t,n[t]);return e},sre=(e,n)=>rre(e,ore(n)),dre=(e,n)=>{var t={};for(var i in e)E4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Hv)for(var i of Hv(e))n.indexOf(i)<0&&$4.call(e,i)&&(t[i]=e[i]);return t};const a_=S.forwardRef((e,n)=>{var t=e,{position:i,arrowSize:a,arrowOffset:r,arrowRadius:o,arrowPosition:l,visible:s,arrowX:d,arrowY:c}=t,u=dre(t,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const f=vi();return s?b.createElement("div",sre(lre({},u),{ref:n,style:ire({position:i,arrowSize:a,arrowOffset:r,arrowRadius:o,arrowPosition:l,dir:f.dir,arrowX:d,arrowY:c})})):null});a_.displayName="@mantine/core/FloatingArrow";var cre=Object.defineProperty,ure=Object.defineProperties,mre=Object.getOwnPropertyDescriptors,Uv=Object.getOwnPropertySymbols,I4=Object.prototype.hasOwnProperty,j4=Object.prototype.propertyIsEnumerable,SD=(e,n,t)=>n in e?cre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ds=(e,n)=>{for(var t in n||(n={}))I4.call(n,t)&&SD(e,t,n[t]);if(Uv)for(var t of Uv(n))j4.call(n,t)&&SD(e,t,n[t]);return e},Jf=(e,n)=>ure(e,mre(n)),fre=(e,n)=>{var t={};for(var i in e)I4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Uv)for(var i of Uv(e))n.indexOf(i)<0&&j4.call(e,i)&&(t[i]=e[i]);return t};const pre={};function T4(e){var n;const t=ae("PopoverDropdown",pre,e),{style:i,className:a,children:r,onKeyDownCapture:o}=t,l=fre(t,["style","className","children","onKeyDownCapture"]),s=C4(),{classes:d,cx:c}=Uae({radius:s.radius,shadow:s.shadow},{name:s.__staticSelector,classNames:s.classNames,styles:s.styles,unstyled:s.unstyled,variant:s.variant}),u=AL({opened:s.opened,shouldReturnFocus:s.returnFocus}),f=s.withRoles?{"aria-labelledby":s.getTargetId(),id:s.getDropdownId(),role:"dialog"}:{};return s.disabled?null:b.createElement(uc,Jf(Ds({},s.portalProps),{withinPortal:s.withinPortal}),b.createElement(fc,Jf(Ds({mounted:s.opened},s.transitionProps),{transition:s.transitionProps.transition||"fade",duration:(n=s.transitionProps.duration)!=null?n:150,keepMounted:s.keepMounted,exitDuration:typeof s.transitionProps.exitDuration=="number"?s.transitionProps.exitDuration:s.transitionProps.duration}),p=>{var h,k;return b.createElement(i_,{active:s.trapFocus},b.createElement(xe,Ds(Jf(Ds({},f),{tabIndex:-1,ref:s.floating,style:Jf(Ds(Ds({},i),p),{zIndex:s.zIndex,top:(h=s.y)!=null?h:0,left:(k=s.x)!=null?k:0,width:s.width==="target"?void 0:T(s.width)}),className:c(d.dropdown,a),onKeyDownCapture:UX(s.onClose,{active:s.closeOnEscape,onTrigger:u,onKeyDown:o}),"data-position":s.placement}),l),r,b.createElement(a_,{ref:s.arrowRef,arrowX:s.arrowX,arrowY:s.arrowY,visible:s.withArrow,position:s.placement,arrowSize:s.arrowSize,arrowRadius:s.arrowRadius,arrowOffset:s.arrowOffset,arrowPosition:s.arrowPosition,className:d.arrow})))}))}T4.displayName="@mantine/core/PopoverDropdown";function A4(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),a=t==="right"?"left":"right";return i===void 0?a:`${a}-${i}`}return n}var ND=Object.getOwnPropertySymbols,hre=Object.prototype.hasOwnProperty,vre=Object.prototype.propertyIsEnumerable,kre=(e,n)=>{var t={};for(var i in e)hre.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ND)for(var i of ND(e))n.indexOf(i)<0&&vre.call(e,i)&&(t[i]=e[i]);return t};const gre={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ma("popover"),__staticSelector:"Popover",width:"max-content"};function Jt(e){var n,t,i,a,r,o;const l=S.useRef(null),s=ae("Popover",gre,e),{children:d,position:c,offset:u,onPositionChange:f,positionDependencies:p,opened:h,transitionProps:k,width:y,middlewares:g,withArrow:v,arrowSize:N,arrowOffset:x,arrowRadius:F,arrowPosition:_,unstyled:w,classNames:C,styles:$,closeOnClickOutside:E,withinPortal:j,portalProps:D,closeOnEscape:M,clickOutsideEvents:R,trapFocus:I,onClose:L,onOpen:B,onChange:O,zIndex:P,radius:A,shadow:V,id:U,defaultOpened:oe,__staticSelector:G,withRoles:ne,disabled:Z,returnFocus:ce,variant:ie,keepMounted:ve}=s,he=kre(s,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[ge,K]=S.useState(null),[de,be]=S.useState(null),Ee=zr(U),Qe=vi(),$e=Aae({middlewares:g,width:y,position:A4(Qe.dir,c),offset:typeof u=="number"?u+(v?N/2:0):u,arrowRef:l,arrowOffset:x,onPositionChange:f,positionDependencies:p,opened:h,defaultOpened:oe,onChange:O,onOpen:B,onClose:L});fJ(()=>$e.opened&&E&&$e.onClose(),R,[ge,de]);const z=S.useCallback(W=>{K(W),$e.floating.reference(W)},[$e.floating.reference]),H=S.useCallback(W=>{be(W),$e.floating.floating(W)},[$e.floating.floating]);return b.createElement(Rae,{value:{returnFocus:ce,disabled:Z,controlled:$e.controlled,reference:z,floating:H,x:$e.floating.x,y:$e.floating.y,arrowX:(i=(t=(n=$e.floating)==null?void 0:n.middlewareData)==null?void 0:t.arrow)==null?void 0:i.x,arrowY:(o=(r=(a=$e.floating)==null?void 0:a.middlewareData)==null?void 0:r.arrow)==null?void 0:o.y,opened:$e.opened,arrowRef:l,transitionProps:k,width:y,withArrow:v,arrowSize:N,arrowOffset:x,arrowRadius:F,arrowPosition:_,placement:$e.floating.placement,trapFocus:I,withinPortal:j,portalProps:D,zIndex:P,radius:A,shadow:V,closeOnEscape:M,onClose:$e.onClose,onToggle:$e.onToggle,getTargetId:()=>`${Ee}-target`,getDropdownId:()=>`${Ee}-dropdown`,withRoles:ne,targetProps:he,__staticSelector:G,classNames:C,styles:$,unstyled:w,variant:ie,keepMounted:ve}},d)}Jt.Target=D4;Jt.Dropdown=T4;Jt.displayName="@mantine/core/Popover";var yre=Object.defineProperty,Yv=Object.getOwnPropertySymbols,R4=Object.prototype.hasOwnProperty,M4=Object.prototype.propertyIsEnumerable,bD=(e,n,t)=>n in e?yre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Sre=(e,n)=>{for(var t in n||(n={}))R4.call(n,t)&&bD(e,t,n[t]);if(Yv)for(var t of Yv(n))M4.call(n,t)&&bD(e,t,n[t]);return e},Nre=(e,n)=>{var t={};for(var i in e)R4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Yv)for(var i of Yv(e))n.indexOf(i)<0&&M4.call(e,i)&&(t[i]=e[i]);return t};function bre(e){var n=e,{children:t,component:i="div",maxHeight:a=220,direction:r="column",id:o,innerRef:l,__staticSelector:s,styles:d,classNames:c,unstyled:u}=n,f=Nre(n,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:p}=wie(null,{name:s,styles:d,classNames:c,unstyled:u});return b.createElement(Jt.Dropdown,Sre({p:0,onMouseDown:h=>h.preventDefault()},f),b.createElement("div",{style:{maxHeight:T(a),display:"flex"}},b.createElement(xe,{component:i||"div",id:`${o}-items`,"aria-labelledby":`${o}-label`,role:"listbox",onMouseDown:h=>h.preventDefault(),style:{flex:1,overflowY:i!==cS?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:l},b.createElement("div",{className:p.itemsWrapper,style:{flexDirection:r}},t))))}function Lo({opened:e,transitionProps:n={transition:"fade",duration:0},shadow:t,withinPortal:i,portalProps:a,children:r,__staticSelector:o,onDirectionChange:l,switchDirectionOnFlip:s,zIndex:d,dropdownPosition:c,positionDependencies:u=[],classNames:f,styles:p,unstyled:h,readOnly:k,variant:y}){return b.createElement(Jt,{unstyled:h,classNames:f,styles:p,width:"target",withRoles:!1,opened:e,middlewares:{flip:c==="flip",shift:!1},position:c==="flip"?"bottom":c,positionDependencies:u,zIndex:d,__staticSelector:o,withinPortal:i,portalProps:a,transitionProps:n,shadow:t,disabled:k,onPositionChange:g=>s&&(l==null?void 0:l(g==="top"?"column-reverse":"column")),variant:y},r)}Lo.Target=Jt.Target;Lo.Dropdown=bre;var xre=Object.defineProperty,Fre=Object.defineProperties,wre=Object.getOwnPropertyDescriptors,Gv=Object.getOwnPropertySymbols,L4=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable,xD=(e,n,t)=>n in e?xre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ep=(e,n)=>{for(var t in n||(n={}))L4.call(n,t)&&xD(e,t,n[t]);if(Gv)for(var t of Gv(n))z4.call(n,t)&&xD(e,t,n[t]);return e},_re=(e,n)=>Fre(e,wre(n)),Cre=(e,n)=>{var t={};for(var i in e)L4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Gv)for(var i of Gv(e))n.indexOf(i)<0&&z4.call(e,i)&&(t[i]=e[i]);return t};function Qm(e,n,t){const i=ae(e,n,t),{label:a,description:r,error:o,required:l,classNames:s,styles:d,className:c,unstyled:u,__staticSelector:f,sx:p,errorProps:h,labelProps:k,descriptionProps:y,wrapperProps:g,id:v,size:N,style:x,inputContainer:F,inputWrapperOrder:_,withAsterisk:w,variant:C}=i,$=Cre(i,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),E=zr(v),{systemStyles:j,rest:D}=il($),M=ep({label:a,description:r,error:o,required:l,classNames:s,className:c,__staticSelector:f,sx:p,errorProps:h,labelProps:k,descriptionProps:y,unstyled:u,styles:d,id:E,size:N,style:x,inputContainer:F,inputWrapperOrder:_,withAsterisk:w,variant:C},g);return _re(ep({},D),{classNames:s,styles:d,unstyled:u,wrapperProps:ep(ep({},M),j),inputProps:{required:l,classNames:s,styles:d,unstyled:u,id:E,size:N,__staticSelector:f,error:o,variant:C}})}var Pre=me((e,n,{size:t})=>({label:{display:"inline-block",fontSize:q({size:t,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}})),Ore=Object.defineProperty,qv=Object.getOwnPropertySymbols,B4=Object.prototype.hasOwnProperty,V4=Object.prototype.propertyIsEnumerable,FD=(e,n,t)=>n in e?Ore(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Dre=(e,n)=>{for(var t in n||(n={}))B4.call(n,t)&&FD(e,t,n[t]);if(qv)for(var t of qv(n))V4.call(n,t)&&FD(e,t,n[t]);return e},Ere=(e,n)=>{var t={};for(var i in e)B4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&qv)for(var i of qv(e))n.indexOf(i)<0&&V4.call(e,i)&&(t[i]=e[i]);return t};const $re={labelElement:"label",size:"sm"},r_=S.forwardRef((e,n)=>{const t=ae("InputLabel",$re,e),{labelElement:i,children:a,required:r,size:o,classNames:l,styles:s,unstyled:d,className:c,htmlFor:u,__staticSelector:f,variant:p,onMouseDown:h}=t,k=Ere(t,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:y,cx:g}=Pre(null,{name:["InputWrapper",f],classNames:l,styles:s,unstyled:d,variant:p,size:o});return b.createElement(xe,Dre({component:i,ref:n,className:g(y.label,c),htmlFor:i==="label"?u:void 0,onMouseDown:v=>{h==null||h(v),!v.defaultPrevented&&v.detail>1&&v.preventDefault()}},k),a,r&&b.createElement("span",{className:y.required,"aria-hidden":!0}," *"))});r_.displayName="@mantine/core/InputLabel";var Ire=me((e,n,{size:t})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${q({size:t,sizes:e.fontSizes})} - ${T(2)})`,lineHeight:1.2,display:"block"}})),jre=Object.defineProperty,Kv=Object.getOwnPropertySymbols,W4=Object.prototype.hasOwnProperty,H4=Object.prototype.propertyIsEnumerable,wD=(e,n,t)=>n in e?jre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Tre=(e,n)=>{for(var t in n||(n={}))W4.call(n,t)&&wD(e,t,n[t]);if(Kv)for(var t of Kv(n))H4.call(n,t)&&wD(e,t,n[t]);return e},Are=(e,n)=>{var t={};for(var i in e)W4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Kv)for(var i of Kv(e))n.indexOf(i)<0&&H4.call(e,i)&&(t[i]=e[i]);return t};const Rre={size:"sm"},o_=S.forwardRef((e,n)=>{const t=ae("InputError",Rre,e),{children:i,className:a,classNames:r,styles:o,unstyled:l,size:s,__staticSelector:d,variant:c}=t,u=Are(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:p}=Ire(null,{name:["InputWrapper",d],classNames:r,styles:o,unstyled:l,variant:c,size:s});return b.createElement(Ri,Tre({className:p(f.error,a),ref:n},u),i)});o_.displayName="@mantine/core/InputError";var Mre=me((e,n,{size:t})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${q({size:t,sizes:e.fontSizes})} - ${T(2)})`,lineHeight:1.2,display:"block"}})),Lre=Object.defineProperty,Xv=Object.getOwnPropertySymbols,U4=Object.prototype.hasOwnProperty,Y4=Object.prototype.propertyIsEnumerable,_D=(e,n,t)=>n in e?Lre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,zre=(e,n)=>{for(var t in n||(n={}))U4.call(n,t)&&_D(e,t,n[t]);if(Xv)for(var t of Xv(n))Y4.call(n,t)&&_D(e,t,n[t]);return e},Bre=(e,n)=>{var t={};for(var i in e)U4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Xv)for(var i of Xv(e))n.indexOf(i)<0&&Y4.call(e,i)&&(t[i]=e[i]);return t};const Vre={size:"sm"},l_=S.forwardRef((e,n)=>{const t=ae("InputDescription",Vre,e),{children:i,className:a,classNames:r,styles:o,unstyled:l,size:s,__staticSelector:d,variant:c}=t,u=Bre(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:p}=Mre(null,{name:["InputWrapper",d],classNames:r,styles:o,unstyled:l,variant:c,size:s});return b.createElement(Ri,zre({color:"dimmed",className:p(f.description,a),ref:n,unstyled:l},u),i)});l_.displayName="@mantine/core/InputDescription";const G4=S.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),Wre=G4.Provider,Hre=()=>S.useContext(G4);function Ure(e,{hasDescription:n,hasError:t}){const i=e.findIndex(s=>s==="input"),a=e[i-1],r=e[i+1];return{offsetBottom:n&&r==="description"||t&&r==="error",offsetTop:n&&a==="description"||t&&a==="error"}}var Yre=Object.defineProperty,Gre=Object.defineProperties,qre=Object.getOwnPropertyDescriptors,CD=Object.getOwnPropertySymbols,Kre=Object.prototype.hasOwnProperty,Xre=Object.prototype.propertyIsEnumerable,PD=(e,n,t)=>n in e?Yre(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qre=(e,n)=>{for(var t in n||(n={}))Kre.call(n,t)&&PD(e,t,n[t]);if(CD)for(var t of CD(n))Xre.call(n,t)&&PD(e,t,n[t]);return e},Zre=(e,n)=>Gre(e,qre(n)),Jre=me(e=>({root:Zre(Qre({},e.fn.fontStyles()),{lineHeight:e.lineHeight})})),eoe=Object.defineProperty,noe=Object.defineProperties,toe=Object.getOwnPropertyDescriptors,Qv=Object.getOwnPropertySymbols,q4=Object.prototype.hasOwnProperty,K4=Object.prototype.propertyIsEnumerable,OD=(e,n,t)=>n in e?eoe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,eo=(e,n)=>{for(var t in n||(n={}))q4.call(n,t)&&OD(e,t,n[t]);if(Qv)for(var t of Qv(n))K4.call(n,t)&&OD(e,t,n[t]);return e},DD=(e,n)=>noe(e,toe(n)),ioe=(e,n)=>{var t={};for(var i in e)q4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Qv)for(var i of Qv(e))n.indexOf(i)<0&&K4.call(e,i)&&(t[i]=e[i]);return t};const aoe={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},X4=S.forwardRef((e,n)=>{const t=ae("InputWrapper",aoe,e),{className:i,label:a,children:r,required:o,id:l,error:s,description:d,labelElement:c,labelProps:u,descriptionProps:f,errorProps:p,classNames:h,styles:k,size:y,inputContainer:g,__staticSelector:v,unstyled:N,inputWrapperOrder:x,withAsterisk:F,variant:_}=t,w=ioe(t,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:C,cx:$}=Jre(null,{classNames:h,styles:k,name:["InputWrapper",v],unstyled:N,variant:_,size:y}),E={classNames:h,styles:k,unstyled:N,size:y,variant:_,__staticSelector:v},j=typeof F=="boolean"?F:o,D=l?`${l}-error`:p==null?void 0:p.id,M=l?`${l}-description`:f==null?void 0:f.id,I=`${!!s&&typeof s!="boolean"?D:""} ${d?M:""}`,L=I.trim().length>0?I.trim():void 0,B=a&&b.createElement(r_,eo(eo({key:"label",labelElement:c,id:l?`${l}-label`:void 0,htmlFor:l,required:j},E),u),a),O=d&&b.createElement(l_,DD(eo(eo({key:"description"},f),E),{size:(f==null?void 0:f.size)||E.size,id:(f==null?void 0:f.id)||M}),d),P=b.createElement(S.Fragment,{key:"input"},g(r)),A=typeof s!="boolean"&&s&&b.createElement(o_,DD(eo(eo({},p),E),{size:(p==null?void 0:p.size)||E.size,key:"error",id:(p==null?void 0:p.id)||D}),s),V=x.map(U=>{switch(U){case"label":return B;case"input":return P;case"description":return O;case"error":return A;default:return null}});return b.createElement(Wre,{value:eo({describedBy:L},Ure(x,{hasDescription:!!O,hasError:!!A}))},b.createElement(xe,eo({className:$(C.root,i),ref:n},w),V))});X4.displayName="@mantine/core/InputWrapper";var roe=Object.defineProperty,Zv=Object.getOwnPropertySymbols,Q4=Object.prototype.hasOwnProperty,Z4=Object.prototype.propertyIsEnumerable,ED=(e,n,t)=>n in e?roe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ooe=(e,n)=>{for(var t in n||(n={}))Q4.call(n,t)&&ED(e,t,n[t]);if(Zv)for(var t of Zv(n))Z4.call(n,t)&&ED(e,t,n[t]);return e},loe=(e,n)=>{var t={};for(var i in e)Q4.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Zv)for(var i of Zv(e))n.indexOf(i)<0&&Z4.call(e,i)&&(t[i]=e[i]);return t};const soe={},J4=S.forwardRef((e,n)=>{const t=ae("InputPlaceholder",soe,e),{sx:i}=t,a=loe(t,["sx"]);return b.createElement(xe,ooe({component:"span",sx:[r=>r.fn.placeholderStyles(),...sL(i)],ref:n},a))});J4.displayName="@mantine/core/InputPlaceholder";var doe=Object.defineProperty,coe=Object.defineProperties,uoe=Object.getOwnPropertyDescriptors,$D=Object.getOwnPropertySymbols,moe=Object.prototype.hasOwnProperty,foe=Object.prototype.propertyIsEnumerable,ID=(e,n,t)=>n in e?doe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,np=(e,n)=>{for(var t in n||(n={}))moe.call(n,t)&&ID(e,t,n[t]);if($D)for(var t of $D(n))foe.call(n,t)&&ID(e,t,n[t]);return e},E0=(e,n)=>coe(e,uoe(n));const Un={xs:T(30),sm:T(36),md:T(42),lg:T(50),xl:T(60)},poe=["default","filled","unstyled"];function hoe({theme:e,variant:n}){return poe.includes(n)?n==="default"?{border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:n==="filled"?{border:`${T(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:T(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var voe=me((e,{multiline:n,radius:t,invalid:i,rightSectionWidth:a,withRightSection:r,iconWidth:o,offsetBottom:l,offsetTop:s,pointer:d},{variant:c,size:u})=>{const f=e.fn.variant({variant:"filled",color:"red"}).background,p=c==="default"||c==="filled"?{minHeight:q({size:u,sizes:Un}),paddingLeft:`calc(${q({size:u,sizes:Un})}  / 3)`,paddingRight:r?a||q({size:u,sizes:Un}):`calc(${q({size:u,sizes:Un})}  / 3)`,borderRadius:e.fn.radius(t)}:c==="unstyled"&&r?{paddingRight:a||q({size:u,sizes:Un})}:null;return{wrapper:{position:"relative",marginTop:s?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:l?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:E0(np(np(E0(np({},e.fn.fontStyles()),{height:n?c==="unstyled"?void 0:"auto":q({size:u,sizes:Un}),WebkitTapHighlightColor:"transparent",lineHeight:n?e.lineHeight:`calc(${q({size:u,sizes:Un})} - ${T(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:q({size:u,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:d?"pointer":void 0}),hoe({theme:e,variant:c})),p),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:f,borderColor:f,"&::placeholder":{opacity:1,color:f}},"&[data-with-icon]":{paddingLeft:typeof o=="number"?T(o):q({size:u,sizes:Un})},"&::placeholder":E0(np({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:o?T(o):q({size:u,sizes:Un}),color:i?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:a||q({size:u,sizes:Un})}}});const koe=voe;var goe=Object.defineProperty,yoe=Object.defineProperties,Soe=Object.getOwnPropertyDescriptors,Jv=Object.getOwnPropertySymbols,ez=Object.prototype.hasOwnProperty,nz=Object.prototype.propertyIsEnumerable,jD=(e,n,t)=>n in e?goe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,tp=(e,n)=>{for(var t in n||(n={}))ez.call(n,t)&&jD(e,t,n[t]);if(Jv)for(var t of Jv(n))nz.call(n,t)&&jD(e,t,n[t]);return e},TD=(e,n)=>yoe(e,Soe(n)),Noe=(e,n)=>{var t={};for(var i in e)ez.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Jv)for(var i of Jv(e))n.indexOf(i)<0&&nz.call(e,i)&&(t[i]=e[i]);return t};const boe={size:"sm",variant:"default"},hs=S.forwardRef((e,n)=>{const t=ae("Input",boe,e),{className:i,error:a,required:r,disabled:o,variant:l,icon:s,style:d,rightSectionWidth:c,iconWidth:u,rightSection:f,rightSectionProps:p,radius:h,size:k,wrapperProps:y,classNames:g,styles:v,__staticSelector:N,multiline:x,sx:F,unstyled:_,pointer:w}=t,C=Noe(t,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:$,offsetTop:E,describedBy:j}=Hre(),{classes:D,cx:M}=koe({radius:h,multiline:x,invalid:!!a,rightSectionWidth:c?T(c):void 0,iconWidth:u,withRightSection:!!f,offsetBottom:$,offsetTop:E,pointer:w},{classNames:g,styles:v,name:["Input",N],unstyled:_,variant:l,size:k}),{systemStyles:R,rest:I}=il(C);return b.createElement(xe,tp(tp({className:M(D.wrapper,i),sx:F,style:d},R),y),s&&b.createElement("div",{className:D.icon},s),b.createElement(xe,TD(tp({component:"input"},I),{ref:n,required:r,"aria-invalid":!!a,"aria-describedby":j,disabled:o,"data-disabled":o||void 0,"data-with-icon":!!s||void 0,"data-invalid":!!a||void 0,className:D.input})),f&&b.createElement("div",TD(tp({},p),{className:D.rightSection}),f))});hs.displayName="@mantine/core/Input";hs.Wrapper=X4;hs.Label=r_;hs.Description=l_;hs.Error=o_;hs.Placeholder=J4;const it=hs;var xoe=Object.defineProperty,Foe=Object.defineProperties,woe=Object.getOwnPropertyDescriptors,AD=Object.getOwnPropertySymbols,_oe=Object.prototype.hasOwnProperty,Coe=Object.prototype.propertyIsEnumerable,RD=(e,n,t)=>n in e?xoe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$0=(e,n)=>{for(var t in n||(n={}))_oe.call(n,t)&&RD(e,t,n[t]);if(AD)for(var t of AD(n))Coe.call(n,t)&&RD(e,t,n[t]);return e},Poe=(e,n)=>Foe(e,woe(n));const Ooe=["light","filled","outline","dot","gradient"],I0={xs:{fontSize:T(9),height:T(16)},sm:{fontSize:T(10),height:T(18)},md:{fontSize:T(11),height:T(20)},lg:{fontSize:T(13),height:T(26)},xl:{fontSize:T(16),height:T(32)}},Doe={xs:T(4),sm:T(4),md:T(6),lg:T(8),xl:T(10)};function Eoe({theme:e,variant:n,color:t,size:i,gradient:a}){if(!Ooe.includes(n))return null;if(n==="dot"){const o=q({size:i,sizes:Doe});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${q({size:i,sizes:e.spacing})} / 1.5 - ${o} / 2)`,"&::before":{content:'""',display:"block",width:o,height:o,borderRadius:o,backgroundColor:e.fn.themeColor(t,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:o}}}const r=e.fn.variant({color:t,variant:n,gradient:a});return{background:r.background,color:r.color,border:`${T(n==="gradient"?0:1)} solid ${r.border}`}}var $oe=me((e,{color:n,radius:t,gradient:i,fullWidth:a},{variant:r,size:o})=>{const{fontSize:l,height:s}=o in I0?I0[o]:I0.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:$0(Poe($0($0({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:l,height:s,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${s} - ${T(2)})`,textDecoration:"none",padding:`0 calc(${q({size:o,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:a?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:a?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(t),fontWeight:700,letterSpacing:T(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Eoe({theme:e,variant:r,color:n,size:o,gradient:i}))}}),Ioe=Object.defineProperty,ek=Object.getOwnPropertySymbols,tz=Object.prototype.hasOwnProperty,iz=Object.prototype.propertyIsEnumerable,MD=(e,n,t)=>n in e?Ioe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,joe=(e,n)=>{for(var t in n||(n={}))tz.call(n,t)&&MD(e,t,n[t]);if(ek)for(var t of ek(n))iz.call(n,t)&&MD(e,t,n[t]);return e},Toe=(e,n)=>{var t={};for(var i in e)tz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ek)for(var i of ek(e))n.indexOf(i)<0&&iz.call(e,i)&&(t[i]=e[i]);return t};const Aoe={variant:"light",size:"md",radius:"xl"},az=S.forwardRef((e,n)=>{const t=ae("Badge",Aoe,e),{className:i,color:a,variant:r,fullWidth:o,children:l,size:s,leftSection:d,rightSection:c,radius:u,gradient:f,classNames:p,styles:h,unstyled:k}=t,y=Toe(t,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:g,cx:v}=$oe({fullWidth:o,color:a,radius:u,gradient:f},{classNames:p,styles:h,name:"Badge",unstyled:k,variant:r,size:s});return b.createElement(xe,joe({className:v(g.root,i),ref:n},y),d&&b.createElement("span",{className:g.leftSection},d),b.createElement("span",{className:g.inner},l),c&&b.createElement("span",{className:g.rightSection},c))});az.displayName="@mantine/core/Badge";const nk=az,Roe={xs:T(12),sm:T(18),md:T(24),lg:T(34),xl:T(42)};var Moe=me((e,{color:n,transitionDuration:t},{size:i})=>{const a=q({size:i,sizes:Roe}),r=n||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${a} + ${e.spacing.xs})`,height:`calc(${a} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:a,height:`calc(${a} / 12)`,backgroundColor:r,outline:`${T(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${a} / 3) * -1)`},"&::after":{top:`calc(${a} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${a} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${a} / 3)) rotate(-45deg)`}}}}}),Loe=Object.defineProperty,tk=Object.getOwnPropertySymbols,rz=Object.prototype.hasOwnProperty,oz=Object.prototype.propertyIsEnumerable,LD=(e,n,t)=>n in e?Loe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,zoe=(e,n)=>{for(var t in n||(n={}))rz.call(n,t)&&LD(e,t,n[t]);if(tk)for(var t of tk(n))oz.call(n,t)&&LD(e,t,n[t]);return e},Boe=(e,n)=>{var t={};for(var i in e)rz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&tk)for(var i of tk(e))n.indexOf(i)<0&&oz.call(e,i)&&(t[i]=e[i]);return t};const Voe={size:"md",transitionDuration:300},lz=S.forwardRef((e,n)=>{const t=ae("Burger",Voe,e),{className:i,opened:a,color:r,size:o,classNames:l,styles:s,transitionDuration:d,variant:c}=t,u=Boe(t,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:f,cx:p}=Moe({color:r,transitionDuration:d},{classNames:l,styles:s,name:"Burger",variant:c,size:o});return b.createElement(fi,zoe({className:p(f.root,i),ref:n},u),b.createElement("div",{"data-opened":a||void 0,className:f.burger}))});lz.displayName="@mantine/core/Burger";var Woe=me((e,{orientation:n,buttonBorderWidth:t})=>({root:{display:"flex",flexDirection:n==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[n==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[n==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${T(t)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[n==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[n==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${T(t)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[n==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${T(t)} / 2)`,[n==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${T(t)} / 2)`},"& + [data-button]":{[n==="vertical"?"marginTop":"marginLeft"]:`calc(${t} * -1)`,"@media (min-resolution: 192dpi)":{[n==="vertical"?"marginTop":"marginLeft"]:0}}}}})),Hoe=Object.defineProperty,ik=Object.getOwnPropertySymbols,sz=Object.prototype.hasOwnProperty,dz=Object.prototype.propertyIsEnumerable,zD=(e,n,t)=>n in e?Hoe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Uoe=(e,n)=>{for(var t in n||(n={}))sz.call(n,t)&&zD(e,t,n[t]);if(ik)for(var t of ik(n))dz.call(n,t)&&zD(e,t,n[t]);return e},Yoe=(e,n)=>{var t={};for(var i in e)sz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ik)for(var i of ik(e))n.indexOf(i)<0&&dz.call(e,i)&&(t[i]=e[i]);return t};const Goe={orientation:"horizontal",buttonBorderWidth:1},cz=S.forwardRef((e,n)=>{const t=ae("ButtonGroup",Goe,e),{className:i,orientation:a,buttonBorderWidth:r,unstyled:o}=t,l=Yoe(t,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:d}=Woe({orientation:a,buttonBorderWidth:r},{name:"ButtonGroup",unstyled:o});return b.createElement(xe,Uoe({className:d(s.root,i),ref:n},l))});cz.displayName="@mantine/core/ButtonGroup";var qoe=Object.defineProperty,Koe=Object.defineProperties,Xoe=Object.getOwnPropertyDescriptors,BD=Object.getOwnPropertySymbols,Qoe=Object.prototype.hasOwnProperty,Zoe=Object.prototype.propertyIsEnumerable,VD=(e,n,t)=>n in e?qoe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Nr=(e,n)=>{for(var t in n||(n={}))Qoe.call(n,t)&&VD(e,t,n[t]);if(BD)for(var t of BD(n))Zoe.call(n,t)&&VD(e,t,n[t]);return e},oh=(e,n)=>Koe(e,Xoe(n));const Joe=["filled","outline","light","white","default","subtle","gradient"],vx={xs:{height:Un.xs,paddingLeft:T(14),paddingRight:T(14)},sm:{height:Un.sm,paddingLeft:T(18),paddingRight:T(18)},md:{height:Un.md,paddingLeft:T(22),paddingRight:T(22)},lg:{height:Un.lg,paddingLeft:T(26),paddingRight:T(26)},xl:{height:Un.xl,paddingLeft:T(32),paddingRight:T(32)},"compact-xs":{height:T(22),paddingLeft:T(7),paddingRight:T(7)},"compact-sm":{height:T(26),paddingLeft:T(8),paddingRight:T(8)},"compact-md":{height:T(30),paddingLeft:T(10),paddingRight:T(10)},"compact-lg":{height:T(34),paddingLeft:T(12),paddingRight:T(12)},"compact-xl":{height:T(40),paddingLeft:T(14),paddingRight:T(14)}};function ele({compact:e,size:n,withLeftIcon:t,withRightIcon:i}){if(e)return vx[`compact-${n}`];const a=vx[n];return a?oh(Nr({},a),{paddingLeft:t?`calc(${a.paddingLeft}  / 1.5)`:a.paddingLeft,paddingRight:i?`calc(${a.paddingRight}  / 1.5)`:a.paddingRight}):{}}const nle=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function tle({variant:e,theme:n,color:t,gradient:i}){if(!Joe.includes(e))return null;const a=n.fn.variant({color:t,variant:e,gradient:i});return e==="gradient"?Nr({border:0,backgroundImage:a.background,color:a.color},n.fn.hover({backgroundSize:"200%"})):Nr({border:`${T(1)} solid ${a.border}`,backgroundColor:a.background,color:a.color},n.fn.hover({backgroundColor:a.hover}))}var ile=me((e,{radius:n,fullWidth:t,compact:i,withLeftIcon:a,withRightIcon:r,color:o,gradient:l},{variant:s,size:d})=>({root:oh(Nr(oh(Nr(Nr(Nr(Nr({},ele({compact:i,size:d,withLeftIcon:a,withRightIcon:r})),e.fn.fontStyles()),e.fn.focusStyles()),nle(t)),{borderRadius:e.fn.radius(n),fontWeight:600,position:"relative",lineHeight:1,fontSize:q({size:d,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),tle({variant:s,theme:e,color:o,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":oh(Nr({content:'""'},e.fn.cover(T(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(n),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}})),ale=Object.defineProperty,ak=Object.getOwnPropertySymbols,uz=Object.prototype.hasOwnProperty,mz=Object.prototype.propertyIsEnumerable,WD=(e,n,t)=>n in e?ale(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,HD=(e,n)=>{for(var t in n||(n={}))uz.call(n,t)&&WD(e,t,n[t]);if(ak)for(var t of ak(n))mz.call(n,t)&&WD(e,t,n[t]);return e},rle=(e,n)=>{var t={};for(var i in e)uz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ak)for(var i of ak(e))n.indexOf(i)<0&&mz.call(e,i)&&(t[i]=e[i]);return t};const ole={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},s_=S.forwardRef((e,n)=>{const t=ae("Button",ole,e),{className:i,size:a,color:r,type:o,disabled:l,children:s,leftIcon:d,rightIcon:c,fullWidth:u,variant:f,radius:p,uppercase:h,compact:k,loading:y,loaderPosition:g,loaderProps:v,gradient:N,classNames:x,styles:F,unstyled:_}=t,w=rle(t,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:C,cx:$,theme:E}=ile({radius:p,color:r,fullWidth:u,compact:k,gradient:N,withLeftIcon:!!d,withRightIcon:!!c},{name:"Button",unstyled:_,classNames:x,styles:F,variant:f,size:a}),j=E.fn.variant({color:r,variant:f}),D=b.createElement(ti,HD({color:j.color,size:`calc(${q({size:a,sizes:vx}).height} / 2)`},v));return b.createElement(fi,HD({className:$(C.root,i),type:o,disabled:l,"data-button":!0,"data-disabled":l||void 0,"data-loading":y||void 0,ref:n,unstyled:_},w),b.createElement("div",{className:C.inner},(d||y&&g==="left")&&b.createElement("span",{className:$(C.icon,C.leftIcon)},y&&g==="left"?D:d),y&&g==="center"&&b.createElement("span",{className:C.centerLoader},D),b.createElement("span",{className:C.label,style:{textTransform:h?"uppercase":void 0}},s),(c||y&&g==="right")&&b.createElement("span",{className:$(C.icon,C.rightIcon)},y&&g==="right"?D:c)))});s_.displayName="@mantine/core/Button";s_.Group=cz;const lle=s_;var sle=me((e,{radius:n,shadow:t})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(n),boxShadow:e.shadows[t]||t||"none","&[data-with-border]":{border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}})),dle=Object.defineProperty,rk=Object.getOwnPropertySymbols,fz=Object.prototype.hasOwnProperty,pz=Object.prototype.propertyIsEnumerable,UD=(e,n,t)=>n in e?dle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,cle=(e,n)=>{for(var t in n||(n={}))fz.call(n,t)&&UD(e,t,n[t]);if(rk)for(var t of rk(n))pz.call(n,t)&&UD(e,t,n[t]);return e},ule=(e,n)=>{var t={};for(var i in e)fz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&rk)for(var i of rk(e))n.indexOf(i)<0&&pz.call(e,i)&&(t[i]=e[i]);return t};const mle={},hz=S.forwardRef((e,n)=>{const t=ae("Paper",mle,e),{className:i,children:a,radius:r,withBorder:o,shadow:l,unstyled:s,variant:d}=t,c=ule(t,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:u,cx:f}=sle({radius:r,shadow:l},{name:"Paper",unstyled:s,variant:d});return b.createElement(xe,cle({className:f(u.root,i),"data-with-border":o||void 0,ref:n},c),a)});hz.displayName="@mantine/core/Paper";const vs=hz,vz=S.createContext({padding:0}),fle=vz.Provider,ple=()=>S.useContext(vz).padding;var hle=me((e,{padding:n,withBorder:t,inheritPadding:i})=>{const a=q({size:n,sizes:e.spacing}),r=`calc(-1 * ${a})`,o=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{cardSection:{display:"block",marginLeft:r,marginRight:r,paddingLeft:i?a:void 0,paddingRight:i?a:void 0,borderTop:t?`${T(1)} solid ${o}`:void 0,borderBottom:t?`${T(1)} solid ${o}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:r,borderTop:0,borderBottom:t?`${T(1)} solid ${o}`:void 0},"&[data-last]":{marginBottom:r,borderBottom:0}}}});const vle=hle;var kle=Object.defineProperty,ok=Object.getOwnPropertySymbols,kz=Object.prototype.hasOwnProperty,gz=Object.prototype.propertyIsEnumerable,YD=(e,n,t)=>n in e?kle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,gle=(e,n)=>{for(var t in n||(n={}))kz.call(n,t)&&YD(e,t,n[t]);if(ok)for(var t of ok(n))gz.call(n,t)&&YD(e,t,n[t]);return e},yle=(e,n)=>{var t={};for(var i in e)kz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ok)for(var i of ok(e))n.indexOf(i)<0&&gz.call(e,i)&&(t[i]=e[i]);return t};const Sle={withBorder:!1,inheritPadding:!1},yz=S.forwardRef((e,n)=>{const t=ae("CardSection",Sle,e),{className:i,withBorder:a,inheritPadding:r,unstyled:o,variant:l}=t,s=yle(t,["className","withBorder","inheritPadding","unstyled","variant"]),{classes:d,cx:c}=vle({padding:ple(),withBorder:a,inheritPadding:r},{name:"Card",unstyled:o,variant:l});return b.createElement(xe,gle({className:c(d.cardSection,i),ref:n},s))});yz.displayName="@mantine/core/CardSection";const Sz=yz;var Nle=me(e=>({root:{position:"relative",overflow:"hidden",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}})),ble=Object.defineProperty,lk=Object.getOwnPropertySymbols,Nz=Object.prototype.hasOwnProperty,bz=Object.prototype.propertyIsEnumerable,GD=(e,n,t)=>n in e?ble(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,xle=(e,n)=>{for(var t in n||(n={}))Nz.call(n,t)&&GD(e,t,n[t]);if(lk)for(var t of lk(n))bz.call(n,t)&&GD(e,t,n[t]);return e},Fle=(e,n)=>{var t={};for(var i in e)Nz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&lk)for(var i of lk(e))n.indexOf(i)<0&&bz.call(e,i)&&(t[i]=e[i]);return t};const wle={padding:"md"},d_=S.forwardRef((e,n)=>{const t=ae("Card",wle,e),{className:i,padding:a,radius:r,children:o,unstyled:l,variant:s}=t,d=Fle(t,["className","padding","radius","children","unstyled","variant"]),{classes:c,cx:u}=Nle(null,{name:"Card",unstyled:l,variant:s}),f=S.Children.toArray(o),p=f.map((h,k)=>typeof h=="object"&&h&&"type"in h&&h.type===Sz?S.cloneElement(h,{variant:s,padding:a,"data-first":k===0||void 0,"data-last":k===f.length-1||void 0}):h);return b.createElement(fle,{value:{padding:a}},b.createElement(vs,xle({className:u(c.root,i),radius:r,p:a,ref:n},d),p))});d_.Section=Sz;d_.displayName="@mantine/core/Card";const kx=d_,xz=S.createContext(null),_le=xz.Provider,Cle=()=>S.useContext(xz);var Ple=Object.defineProperty,sk=Object.getOwnPropertySymbols,Fz=Object.prototype.hasOwnProperty,wz=Object.prototype.propertyIsEnumerable,qD=(e,n,t)=>n in e?Ple(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,KD=(e,n)=>{for(var t in n||(n={}))Fz.call(n,t)&&qD(e,t,n[t]);if(sk)for(var t of sk(n))wz.call(n,t)&&qD(e,t,n[t]);return e},Ole=(e,n)=>{var t={};for(var i in e)Fz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&sk)for(var i of sk(e))n.indexOf(i)<0&&wz.call(e,i)&&(t[i]=e[i]);return t};const Dle={size:"sm"},_z=S.forwardRef((e,n)=>{const t=ae("CheckboxGroup",Dle,e),{children:i,value:a,defaultValue:r,onChange:o,size:l,wrapperProps:s}=t,d=Ole(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,u]=vt({value:a,defaultValue:r,finalValue:[],onChange:o}),f=p=>{const h=p.currentTarget.value;u(c.includes(h)?c.filter(k=>k!==h):[...c,h])};return b.createElement(_le,{value:{value:c,onChange:f,size:l}},b.createElement(it.Wrapper,KD(KD({labelElement:"div",size:l,__staticSelector:"CheckboxGroup",ref:n},s),d),i))});_z.displayName="@mantine/core/CheckboxGroup";var Ele=Object.defineProperty,dk=Object.getOwnPropertySymbols,Cz=Object.prototype.hasOwnProperty,Pz=Object.prototype.propertyIsEnumerable,XD=(e,n,t)=>n in e?Ele(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ck=(e,n)=>{for(var t in n||(n={}))Cz.call(n,t)&&XD(e,t,n[t]);if(dk)for(var t of dk(n))Pz.call(n,t)&&XD(e,t,n[t]);return e},Oz=(e,n)=>{var t={};for(var i in e)Cz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&dk)for(var i of dk(e))n.indexOf(i)<0&&Pz.call(e,i)&&(t[i]=e[i]);return t};function $le(e){const n=e,{width:t,height:i,style:a}=n,r=Oz(n,["width","height","style"]);return b.createElement("svg",ck({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:ck({width:t,height:i},a)},r),b.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Ile(e){var n=e,{indeterminate:t}=n,i=Oz(n,["indeterminate"]);return t?b.createElement("svg",ck({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},i),b.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):b.createElement($le,ck({},i))}var jle=Object.defineProperty,Tle=Object.defineProperties,Ale=Object.getOwnPropertyDescriptors,QD=Object.getOwnPropertySymbols,Rle=Object.prototype.hasOwnProperty,Mle=Object.prototype.propertyIsEnumerable,ZD=(e,n,t)=>n in e?jle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,JD=(e,n)=>{for(var t in n||(n={}))Rle.call(n,t)&&ZD(e,t,n[t]);if(QD)for(var t of QD(n))Mle.call(n,t)&&ZD(e,t,n[t]);return e},eE=(e,n)=>Tle(e,Ale(n));const Lle={xs:T(16),sm:T(20),md:T(24),lg:T(30),xl:T(36)};var zle=me((e,{radius:n,color:t,transitionDuration:i,labelPosition:a,error:r,indeterminate:o},{size:l})=>{const s=q({size:l,sizes:Lle}),d=e.fn.variant({variant:"filled",color:t});return{icon:eE(JD({},e.fn.cover()),{ref:Du("icon"),color:o?"inherit":e.white,transform:o?"none":`translateY(${T(5)}) scale(0.5)`,opacity:o?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${i}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:s,height:s,order:a==="left"?2:1},input:eE(JD({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(1)} solid ${r?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:s,height:s,borderRadius:e.fn.radius(n),padding:0,display:"block",margin:0,transition:`border-color ${i}ms ease, background-color ${i}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:d.background,borderColor:d.background,[`& + .${Du("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Du("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Ble=zle;var Vle=Object.defineProperty,Wle=Object.defineProperties,Hle=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,Ule=Object.prototype.hasOwnProperty,Yle=Object.prototype.propertyIsEnumerable,tE=(e,n,t)=>n in e?Vle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Gle=(e,n)=>{for(var t in n||(n={}))Ule.call(n,t)&&tE(e,t,n[t]);if(nE)for(var t of nE(n))Yle.call(n,t)&&tE(e,t,n[t]);return e},qle=(e,n)=>Wle(e,Hle(n));const j0={xs:T(16),sm:T(20),md:T(24),lg:T(30),xl:T(36)};var Kle=me((e,{labelPosition:n},{size:t})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:qle(Gle({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:t in j0?q({size:t,sizes:e.fontSizes}):void 0,lineHeight:t in j0?q({size:t,sizes:j0}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:n==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[n==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[n==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[n==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}})),Xle=Object.defineProperty,uk=Object.getOwnPropertySymbols,Dz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,iE=(e,n,t)=>n in e?Xle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qle=(e,n)=>{for(var t in n||(n={}))Dz.call(n,t)&&iE(e,t,n[t]);if(uk)for(var t of uk(n))Ez.call(n,t)&&iE(e,t,n[t]);return e},Zle=(e,n)=>{var t={};for(var i in e)Dz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&uk)for(var i of uk(e))n.indexOf(i)<0&&Ez.call(e,i)&&(t[i]=e[i]);return t};const c_=S.forwardRef((e,n)=>{var t=e,{__staticSelector:i,className:a,classNames:r,styles:o,unstyled:l,children:s,label:d,description:c,id:u,disabled:f,error:p,size:h,labelPosition:k,variant:y}=t,g=Zle(t,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:v,cx:N}=Kle({labelPosition:k},{name:i,styles:o,classNames:r,unstyled:l,variant:y,size:h});return b.createElement(xe,Qle({className:N(v.root,a),ref:n},g),b.createElement("div",{className:N(v.body)},s,b.createElement("div",{className:v.labelWrapper},d!=null&&b.createElement("label",{className:v.label,"data-disabled":f||void 0,htmlFor:u},d),c&&b.createElement(it.Description,{className:v.description},c),p&&p!=="boolean"&&b.createElement(it.Error,{className:v.error},p))))});c_.displayName="@mantine/core/InlineInput";var Jle=Object.defineProperty,mk=Object.getOwnPropertySymbols,$z=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,aE=(e,n,t)=>n in e?Jle(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ip=(e,n)=>{for(var t in n||(n={}))$z.call(n,t)&&aE(e,t,n[t]);if(mk)for(var t of mk(n))Iz.call(n,t)&&aE(e,t,n[t]);return e},ese=(e,n)=>{var t={};for(var i in e)$z.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&mk)for(var i of mk(e))n.indexOf(i)<0&&Iz.call(e,i)&&(t[i]=e[i]);return t};const nse={size:"sm",transitionDuration:100,icon:Ile,labelPosition:"right"},u_=S.forwardRef((e,n)=>{const t=ae("Checkbox",nse,e),{className:i,style:a,sx:r,checked:o,disabled:l,color:s,label:d,indeterminate:c,id:u,size:f,radius:p,wrapperProps:h,children:k,classNames:y,styles:g,transitionDuration:v,icon:N,unstyled:x,labelPosition:F,description:_,error:w,variant:C}=t,$=ese(t,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),E=Cle(),j=zr(u),{systemStyles:D,rest:M}=il($),{classes:R}=Ble({radius:p,color:s,transitionDuration:v,labelPosition:F,error:!!w,indeterminate:c},{name:"Checkbox",classNames:y,styles:g,unstyled:x,variant:C,size:(E==null?void 0:E.size)||f}),I=E?{checked:E.value.includes(M.value),onChange:E.onChange}:{};return b.createElement(c_,ip(ip({className:i,sx:r,style:a,id:j,size:(E==null?void 0:E.size)||f,labelPosition:F,label:d,description:_,error:w,disabled:l,__staticSelector:"Checkbox",classNames:y,styles:g,unstyled:x,"data-checked":I.checked||void 0,variant:C},D),h),b.createElement("div",{className:R.inner},b.createElement("input",ip(ip({id:j,ref:n,type:"checkbox",className:R.input,checked:o,disabled:l},M),I)),b.createElement(N,{indeterminate:c,className:R.icon})))});u_.displayName="@mantine/core/Checkbox";u_.Group=_z;const[tse,ise]=Ra("Drawer component was not found in tree"),rE={xs:T(320),sm:T(380),md:T(440),lg:T(620),xl:T(780)};var ase=me((e,{position:n},{size:t})=>({header:{zIndex:1e3},content:{flex:n==="right"||n==="left"?`0 0 ${q({size:t,sizes:rE})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:n==="right"||n==="left"?"100%":q({size:t,sizes:rE}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:n==="right"?"flex-end":"flex-start",alignItems:n==="bottom"?"flex-end":"flex-start"}}));const[rse,pc]=Ra("ModalBase component was not found in tree");var ose=me(()=>({close:{marginLeft:"auto",marginRight:0}}));const lse=ose;var sse=Object.defineProperty,fk=Object.getOwnPropertySymbols,jz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,oE=(e,n,t)=>n in e?sse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,dse=(e,n)=>{for(var t in n||(n={}))jz.call(n,t)&&oE(e,t,n[t]);if(fk)for(var t of fk(n))Tz.call(n,t)&&oE(e,t,n[t]);return e},cse=(e,n)=>{var t={};for(var i in e)jz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&fk)for(var i of fk(e))n.indexOf(i)<0&&Tz.call(e,i)&&(t[i]=e[i]);return t};const use={size:"sm"},mse=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}CloseButton`,use,e),{className:a}=i,r=cse(i,["className"]),{classes:o,cx:l}=lse(null,t.stylesApi);return b.createElement(ms,dse({className:l(o.close,a),ref:n,onClick:t.onClose},r))});var fse=me(()=>({overlay:{}}));const pse=fse;var hse=Object.defineProperty,vse=Object.defineProperties,kse=Object.getOwnPropertyDescriptors,lE=Object.getOwnPropertySymbols,gse=Object.prototype.hasOwnProperty,yse=Object.prototype.propertyIsEnumerable,sE=(e,n,t)=>n in e?hse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Sse=(e,n)=>{for(var t in n||(n={}))gse.call(n,t)&&sE(e,t,n[t]);if(lE)for(var t of lE(n))yse.call(n,t)&&sE(e,t,n[t]);return e},Nse=(e,n)=>vse(e,kse(n)),bse=me((e,{color:n,opacity:t,blur:i,radius:a,gradient:r,fixed:o,zIndex:l})=>({root:Nse(Sse({},e.fn.cover(0)),{position:o?"fixed":"absolute",backgroundColor:r?void 0:e.fn.rgba(n,t),backgroundImage:r,backdropFilter:i?`blur(${T(i)})`:void 0,borderRadius:e.fn.radius(a),zIndex:l,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})})),xse=Object.defineProperty,pk=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Rz=Object.prototype.propertyIsEnumerable,dE=(e,n,t)=>n in e?xse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Fse=(e,n)=>{for(var t in n||(n={}))Az.call(n,t)&&dE(e,t,n[t]);if(pk)for(var t of pk(n))Rz.call(n,t)&&dE(e,t,n[t]);return e},wse=(e,n)=>{var t={};for(var i in e)Az.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&pk)for(var i of pk(e))n.indexOf(i)<0&&Rz.call(e,i)&&(t[i]=e[i]);return t};const _se={opacity:.6,color:"#000",zIndex:Ma("modal"),radius:0},Mz=S.forwardRef((e,n)=>{const t=ae("Overlay",_se,e),{variant:i,opacity:a,color:r,blur:o,gradient:l,zIndex:s,radius:d,children:c,className:u,classNames:f,styles:p,unstyled:h,center:k,fixed:y}=t,g=wse(t,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:v,cx:N}=bse({color:r,opacity:a,blur:o,radius:d,gradient:l,fixed:y,zIndex:s},{name:"Overlay",classNames:f,styles:p,unstyled:h,variant:i});return b.createElement(xe,Fse({ref:n,className:N(v.root,u),"data-center":k||void 0},g),c)});Mz.displayName="@mantine/core/Overlay";const Lz=Mz;var Cse=Object.defineProperty,Pse=Object.defineProperties,Ose=Object.getOwnPropertyDescriptors,hk=Object.getOwnPropertySymbols,zz=Object.prototype.hasOwnProperty,Bz=Object.prototype.propertyIsEnumerable,cE=(e,n,t)=>n in e?Cse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Vc=(e,n)=>{for(var t in n||(n={}))zz.call(n,t)&&cE(e,t,n[t]);if(hk)for(var t of hk(n))Bz.call(n,t)&&cE(e,t,n[t]);return e},Dse=(e,n)=>Pse(e,Ose(n)),Ese=(e,n)=>{var t={};for(var i in e)zz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&hk)for(var i of hk(e))n.indexOf(i)<0&&Bz.call(e,i)&&(t[i]=e[i]);return t};const $se={},Ise=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}Overlay`,$se,e),{onClick:a,transitionProps:r,style:o,className:l}=i,s=Ese(i,["onClick","transitionProps","style","className"]),{classes:d,cx:c}=pse(null,t.stylesApi),u=f=>{a==null||a(f),t.closeOnClickOutside&&t.onClose()};return b.createElement(fc,Dse(Vc(Vc({mounted:t.opened},t.transitionProps),r),{transition:"fade"}),f=>b.createElement(Lz,Vc({ref:n,onClick:u,fixed:!0,style:Vc(Vc({},o),f),className:c(d.overlay,l),zIndex:t.zIndex},s)))});var jse=me((e,{zIndex:n})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:n,pointerEvents:"none"},content:{pointerEvents:"all"}}));const Tse=jse;var Ase=Object.defineProperty,vk=Object.getOwnPropertySymbols,Vz=Object.prototype.hasOwnProperty,Wz=Object.prototype.propertyIsEnumerable,uE=(e,n,t)=>n in e?Ase(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Wc=(e,n)=>{for(var t in n||(n={}))Vz.call(n,t)&&uE(e,t,n[t]);if(vk)for(var t of vk(n))Wz.call(n,t)&&uE(e,t,n[t]);return e},Rse=(e,n)=>{var t={};for(var i in e)Vz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&vk)for(var i of vk(e))n.indexOf(i)<0&&Wz.call(e,i)&&(t[i]=e[i]);return t};const Mse={},Lse=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}Content`,Mse,e),{className:a,transitionProps:r,style:o,onKeyDown:l}=i,s=Rse(i,["className","transitionProps","style","onKeyDown"]),{classes:d,cx:c}=Tse({zIndex:t.zIndex},t.stylesApi),u=f=>{var p;((p=f.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&f.key==="Escape"&&t.closeOnEscape&&t.onClose(),l==null||l(f)};return b.createElement(fc,Wc(Wc({mounted:t.opened,transition:"pop"},t.transitionProps),r),f=>b.createElement("div",{className:c(d.inner)},b.createElement(i_,{active:t.opened&&t.trapFocus},b.createElement(vs,Wc({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":t.bodyMounted?t.getBodyId():void 0,"aria-labelledby":t.titleMounted?t.getTitleId():void 0,onKeyDown:u,ref:n,className:c(d.content,a),style:Wc(Wc({},o),f),shadow:t.shadow},s),s.children))))});var zse=me((e,{padding:n})=>{const t=q({size:n,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:t,paddingRight:`calc(${t} - ${T(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const Bse=zse;var Vse=Object.defineProperty,kk=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Uz=Object.prototype.propertyIsEnumerable,mE=(e,n,t)=>n in e?Vse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Wse=(e,n)=>{for(var t in n||(n={}))Hz.call(n,t)&&mE(e,t,n[t]);if(kk)for(var t of kk(n))Uz.call(n,t)&&mE(e,t,n[t]);return e},Hse=(e,n)=>{var t={};for(var i in e)Hz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&kk)for(var i of kk(e))n.indexOf(i)<0&&Uz.call(e,i)&&(t[i]=e[i]);return t};const Use={},Yse=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}Header`,Use,e),{className:a}=i,r=Hse(i,["className"]),{classes:o,cx:l}=Bse({padding:t.padding},t.stylesApi);return b.createElement(xe,Wse({ref:n,className:l(o.header,a)},r))});var Gse=me(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const qse=Gse;var Kse=Object.defineProperty,gk=Object.getOwnPropertySymbols,Yz=Object.prototype.hasOwnProperty,Gz=Object.prototype.propertyIsEnumerable,fE=(e,n,t)=>n in e?Kse(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Xse=(e,n)=>{for(var t in n||(n={}))Yz.call(n,t)&&fE(e,t,n[t]);if(gk)for(var t of gk(n))Gz.call(n,t)&&fE(e,t,n[t]);return e},Qse=(e,n)=>{var t={};for(var i in e)Yz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&gk)for(var i of gk(e))n.indexOf(i)<0&&Gz.call(e,i)&&(t[i]=e[i]);return t};const Zse={},Jse=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}Title`,Zse,e),{className:a}=i,r=Qse(i,["className"]),{classes:o,cx:l}=qse(null,t.stylesApi);return S.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),b.createElement(xe,Xse({component:"h2",id:t.getTitleId(),className:l(o.title,a),ref:n},r))});var ede=me((e,{padding:n})=>({body:{padding:q({size:n,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const nde=ede;var tde=Object.defineProperty,yk=Object.getOwnPropertySymbols,qz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,pE=(e,n,t)=>n in e?tde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ide=(e,n)=>{for(var t in n||(n={}))qz.call(n,t)&&pE(e,t,n[t]);if(yk)for(var t of yk(n))Kz.call(n,t)&&pE(e,t,n[t]);return e},ade=(e,n)=>{var t={};for(var i in e)qz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&yk)for(var i of yk(e))n.indexOf(i)<0&&Kz.call(e,i)&&(t[i]=e[i]);return t};const rde={},ode=S.forwardRef((e,n)=>{const t=pc(),i=ae(`${t.__staticSelector}Body`,rde,e),{className:a}=i,r=ade(i,["className"]),{classes:o,cx:l}=nde({padding:t.padding},t.stylesApi);return S.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),b.createElement(xe,ide({id:t.getBodyId(),className:l(o.body,a),ref:n},r))});function lde({children:e}){return b.createElement(b.Fragment,null,e)}function sde({opened:e,transitionDuration:n}){const[t,i]=S.useState(e),a=S.useRef(),o=Gm()?0:n;return S.useEffect(()=>(e?(i(!0),window.clearTimeout(a.current)):o===0?i(!1):a.current=window.setTimeout(()=>i(!1),o),()=>window.clearTimeout(a.current)),[e,o]),t}var dde=me(()=>({root:{}})),cde=Object.defineProperty,ude=Object.defineProperties,mde=Object.getOwnPropertyDescriptors,Sk=Object.getOwnPropertySymbols,Xz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,hE=(e,n,t)=>n in e?cde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,T0=(e,n)=>{for(var t in n||(n={}))Xz.call(n,t)&&hE(e,t,n[t]);if(Sk)for(var t of Sk(n))Qz.call(n,t)&&hE(e,t,n[t]);return e},vE=(e,n)=>ude(e,mde(n)),fde=(e,n)=>{var t={};for(var i in e)Xz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Sk)for(var i of Sk(e))n.indexOf(i)<0&&Qz.call(e,i)&&(t[i]=e[i]);return t};const Zm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ma("modal"),padding:"md",size:"md",shadow:"xl"};function Xe(e){const n=ae("ModalBase",Zm,e),{opened:t,onClose:i,children:a,closeOnClickOutside:r,__staticSelector:o,transitionProps:l,withinPortal:s,portalProps:d,keepMounted:c,target:u,zIndex:f,lockScroll:p,trapFocus:h,closeOnEscape:k,returnFocus:y,padding:g,shadow:v,id:N,size:x,variant:F,classNames:_,unstyled:w,styles:C,className:$}=n,E=fde(n,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:j,cx:D}=dde(null,{name:o,classNames:_,styles:C,unstyled:w,variant:F,size:x}),M=zr(N),[R,I]=S.useState(!1),[L,B]=S.useState(!1),O=typeof(l==null?void 0:l.duration)=="number"?l==null?void 0:l.duration:200,P=sde({opened:t,transitionDuration:O});return lx("keydown",A=>{!h&&A.key==="Escape"&&k&&i()}),AL({opened:t,shouldReturnFocus:h&&y}),b.createElement(uc,vE(T0({},d),{withinPortal:s,target:u}),b.createElement(rse,{value:{__staticSelector:o,opened:t,onClose:i,closeOnClickOutside:r,transitionProps:vE(T0({},l),{duration:O,keepMounted:c}),zIndex:f,padding:g,id:M,getTitleId:()=>`${M}-title`,getBodyId:()=>`${M}-body`,titleMounted:R,bodyMounted:L,setTitleMounted:I,setBodyMounted:B,trapFocus:h,closeOnEscape:k,shadow:v,stylesApi:{name:o,size:x,variant:F,classNames:_,styles:C,unstyled:w}}},b.createElement(LX,{enabled:P&&p},b.createElement(xe,T0({className:D(j.root,$)},E),a))))}Xe.CloseButton=mse;Xe.Overlay=Ise;Xe.Content=Lse;Xe.Header=Yse;Xe.Title=Jse;Xe.Body=ode;Xe.NativeScrollArea=lde;var pde=Object.defineProperty,hde=Object.defineProperties,vde=Object.getOwnPropertyDescriptors,Nk=Object.getOwnPropertySymbols,Zz=Object.prototype.hasOwnProperty,Jz=Object.prototype.propertyIsEnumerable,kE=(e,n,t)=>n in e?pde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,lh=(e,n)=>{for(var t in n||(n={}))Zz.call(n,t)&&kE(e,t,n[t]);if(Nk)for(var t of Nk(n))Jz.call(n,t)&&kE(e,t,n[t]);return e},e6=(e,n)=>hde(e,vde(n)),kde=(e,n)=>{var t={};for(var i in e)Zz.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Nk)for(var i of Nk(e))n.indexOf(i)<0&&Jz.call(e,i)&&(t[i]=e[i]);return t};const gde={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},yde={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Sde=e6(lh({},Zm),{position:"left"});function n6(e){const n=ae("DrawerRoot",Sde,e),{classNames:t,variant:i,size:a,scrollAreaComponent:r,position:o,transitionProps:l}=n,s=kde(n,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:d,cx:c,theme:u}=ase({position:o},{name:"Drawer",variant:i,size:a}),f=(u.dir==="rtl"?yde:gde)[o];return b.createElement(tse,{value:{scrollAreaComponent:r}},b.createElement(Xe,lh({__staticSelector:"Drawer",size:a,variant:i,transitionProps:lh({transition:f,duration:200},l),classNames:e6(lh({},t),{content:c(d.content,t==null?void 0:t.content),inner:c(d.inner,t==null?void 0:t.inner)})},s)))}var Nde=Object.defineProperty,bk=Object.getOwnPropertySymbols,t6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,gE=(e,n,t)=>n in e?Nde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,bde=(e,n)=>{for(var t in n||(n={}))t6.call(n,t)&&gE(e,t,n[t]);if(bk)for(var t of bk(n))i6.call(n,t)&&gE(e,t,n[t]);return e},xde=(e,n)=>{var t={};for(var i in e)t6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&bk)for(var i of bk(e))n.indexOf(i)<0&&i6.call(e,i)&&(t[i]=e[i]);return t};const Fde={shadow:"xl"},a6=S.forwardRef((e,n)=>{const t=ae("ModalContent",Fde,e),{children:i,scrollAreaComponent:a}=t,r=xde(t,["children","scrollAreaComponent"]),o=ise(),l=a||o.scrollAreaComponent||Xe.NativeScrollArea;return b.createElement(Xe.Content,bde({ref:n,radius:0},r),b.createElement(l,{style:{height:"100vh"}},i))});var wde=Object.defineProperty,_de=Object.defineProperties,Cde=Object.getOwnPropertyDescriptors,xk=Object.getOwnPropertySymbols,r6=Object.prototype.hasOwnProperty,o6=Object.prototype.propertyIsEnumerable,yE=(e,n,t)=>n in e?wde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,sh=(e,n)=>{for(var t in n||(n={}))r6.call(n,t)&&yE(e,t,n[t]);if(xk)for(var t of xk(n))o6.call(n,t)&&yE(e,t,n[t]);return e},Pde=(e,n)=>_de(e,Cde(n)),Ode=(e,n)=>{var t={};for(var i in e)r6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&xk)for(var i of xk(e))n.indexOf(i)<0&&o6.call(e,i)&&(t[i]=e[i]);return t};const Dde=Pde(sh({},Zm),{withOverlay:!0,withCloseButton:!0});function La(e){const n=ae("Drawer",Dde,e),{title:t,withOverlay:i,overlayProps:a,withCloseButton:r,closeButtonProps:o,children:l}=n,s=Ode(n,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),d=!!t||r;return b.createElement(n6,sh({},s),i&&b.createElement(Xe.Overlay,sh({},a)),b.createElement(a6,null,d&&b.createElement(Xe.Header,null,t&&b.createElement(Xe.Title,null,t),r&&b.createElement(Xe.CloseButton,sh({},o))),b.createElement(Xe.Body,null,l)))}La.Root=n6;La.CloseButton=Xe.CloseButton;La.Overlay=Xe.Overlay;La.Content=a6;La.Header=Xe.Header;La.Title=Xe.Title;La.Body=Xe.Body;La.NativeScrollArea=Xe.NativeScrollArea;var Ede=Object.defineProperty,Fk=Object.getOwnPropertySymbols,l6=Object.prototype.hasOwnProperty,s6=Object.prototype.propertyIsEnumerable,SE=(e,n,t)=>n in e?Ede(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,NE=(e,n)=>{for(var t in n||(n={}))l6.call(n,t)&&SE(e,t,n[t]);if(Fk)for(var t of Fk(n))s6.call(n,t)&&SE(e,t,n[t]);return e},$de=(e,n)=>{var t={};for(var i in e)l6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Fk)for(var i of Fk(e))n.indexOf(i)<0&&s6.call(e,i)&&(t[i]=e[i]);return t};const Ide={multiple:!1},d6=S.forwardRef((e,n)=>{const t=ae("FileButton",Ide,e),{onChange:i,children:a,multiple:r,accept:o,name:l,form:s,resetRef:d,disabled:c,capture:u,inputProps:f}=t,p=$de(t,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),h=S.useRef(),k=()=>{!c&&h.current.click()},y=v=>{i(r?Array.from(v.currentTarget.files):v.currentTarget.files[0]||null)};return rS(d,()=>{h.current.value=""}),b.createElement(b.Fragment,null,a(NE({onClick:k},p)),b.createElement("input",NE({style:{display:"none"},type:"file",accept:o,multiple:r,onChange:y,ref:Br(n,h),name:l,form:s,capture:u},f)))});d6.displayName="@mantine/core/FileButton";var jde=me(()=>({placeholder:{},input:{cursor:"pointer"}})),Tde=Object.defineProperty,Ade=Object.defineProperties,Rde=Object.getOwnPropertyDescriptors,wk=Object.getOwnPropertySymbols,c6=Object.prototype.hasOwnProperty,u6=Object.prototype.propertyIsEnumerable,bE=(e,n,t)=>n in e?Tde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Es=(e,n)=>{for(var t in n||(n={}))c6.call(n,t)&&bE(e,t,n[t]);if(wk)for(var t of wk(n))u6.call(n,t)&&bE(e,t,n[t]);return e},ap=(e,n)=>Ade(e,Rde(n)),Mde=(e,n)=>{var t={};for(var i in e)c6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&wk)for(var i of wk(e))n.indexOf(i)<0&&u6.call(e,i)&&(t[i]=e[i]);return t};const Lde=({value:e})=>b.createElement(Ri,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},Array.isArray(e)?e.map(n=>n.name).join(", "):e==null?void 0:e.name),zde={size:"sm",valueComponent:Lde},m6=S.forwardRef((e,n)=>{const t=Qm("FileInput",zde,e),{inputProps:i,wrapperProps:a,placeholder:r,value:o,defaultValue:l,onChange:s,multiple:d,accept:c,name:u,form:f,classNames:p,styles:h,unstyled:k,valueComponent:y,rightSection:g,clearable:v,clearButtonProps:N,readOnly:x,capture:F,fileInputProps:_}=t,w=Mde(t,["inputProps","wrapperProps","placeholder","value","defaultValue","onChange","multiple","accept","name","form","classNames","styles","unstyled","valueComponent","rightSection","clearable","clearButtonProps","readOnly","capture","fileInputProps"]),C=S.useRef(),{classes:$,cx:E}=jde(null,{name:"FileInput",classNames:p,styles:h,unstyled:k}),[j,D]=vt({value:o,defaultValue:l,onChange:s,finalValue:d?[]:null}),M=Array.isArray(j)?j.length!==0:j!==null,R=g||(v&&M&&!x?b.createElement(ms,ap(Es({},N),{variant:"transparent",onClick:()=>D(d?[]:null),size:i.size,unstyled:k})):null);return S.useEffect(()=>{(Array.isArray(j)&&j.length===0||j===null)&&C.current()},[j]),b.createElement(it.Wrapper,ap(Es({},a),{__staticSelector:"FileInput"}),b.createElement(d6,{onChange:D,multiple:d,accept:c,name:u,form:f,resetRef:C,disabled:x,capture:F,inputProps:_},I=>b.createElement(it,ap(Es(Es(Es({multiline:!0},I),i),w),{component:"button",type:"button",ref:n,__staticSelector:"FileInput",rightSection:R,classNames:ap(Es({},p),{input:E($.input,p==null?void 0:p.input)})}),M?b.createElement(y,{value:j}):b.createElement(it.Placeholder,{className:$.placeholder},r))))});m6.displayName="@mantine/core/FileInput";const Bde=m6,[Vde,Wde]=Ra("Grid component was not found in tree");var Hde=Object.defineProperty,xE=Object.getOwnPropertySymbols,Ude=Object.prototype.hasOwnProperty,Yde=Object.prototype.propertyIsEnumerable,FE=(e,n,t)=>n in e?Hde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Gde=(e,n)=>{for(var t in n||(n={}))Ude.call(n,t)&&FE(e,t,n[t]);if(xE)for(var t of xE(n))Yde.call(n,t)&&FE(e,t,n[t]);return e};const m_=(e,n)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(n/e)}%`:void 0,f6=(e,n,t)=>t||e==="auto"||e==="content"?"unset":m_(e,n),p6=(e,n)=>{if(e)return e==="auto"||n?1:0},h6=(e,n)=>e===0?0:e?`${100/(n/e)}%`:void 0,v6=(e,n)=>typeof e<"u"?`calc(${q({size:e,sizes:n.spacing})} / 2)`:void 0;function qde({sizes:e,offsets:n,orders:t,theme:i,columns:a,gutters:r,grow:o}){return vL.reduce((l,s)=>(l[`@media (min-width: ${dc(i.breakpoints[s])})`]={order:t[s],flexBasis:m_(e[s],a),padding:v6(r[s],i),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:f6(e[s],a,o),marginLeft:h6(n[s],a),flexGrow:p6(e[s],o)},l),{})}var Kde=me((e,{gutter:n,gutterXs:t,gutterSm:i,gutterMd:a,gutterLg:r,gutterXl:o,grow:l,offset:s,offsetXs:d,offsetSm:c,offsetMd:u,offsetLg:f,offsetXl:p,columns:h,span:k,xs:y,sm:g,md:v,lg:N,xl:x,order:F,orderXs:_,orderSm:w,orderMd:C,orderLg:$,orderXl:E})=>({col:Gde({boxSizing:"border-box",flexGrow:p6(k,l),order:F,padding:v6(n,e),marginLeft:h6(s,h),flexBasis:m_(k,h),flexShrink:0,width:k==="content"?"auto":void 0,maxWidth:f6(k,h,l)},qde({sizes:{xs:y,sm:g,md:v,lg:N,xl:x},offsets:{xs:d,sm:c,md:u,lg:f,xl:p},orders:{xs:_,sm:w,md:C,lg:$,xl:E},gutters:{xs:t,sm:i,md:a,lg:r,xl:o},theme:e,columns:h,grow:l}))}));const Xde=Kde;var Qde=Object.defineProperty,_k=Object.getOwnPropertySymbols,k6=Object.prototype.hasOwnProperty,g6=Object.prototype.propertyIsEnumerable,wE=(e,n,t)=>n in e?Qde(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Zde=(e,n)=>{for(var t in n||(n={}))k6.call(n,t)&&wE(e,t,n[t]);if(_k)for(var t of _k(n))g6.call(n,t)&&wE(e,t,n[t]);return e},Jde=(e,n)=>{var t={};for(var i in e)k6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&_k)for(var i of _k(e))n.indexOf(i)<0&&g6.call(e,i)&&(t[i]=e[i]);return t};const ece={};function nce(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const y6=S.forwardRef((e,n)=>{const t=ae("GridCol",ece,e),{children:i,span:a,offset:r,offsetXs:o,offsetSm:l,offsetMd:s,offsetLg:d,offsetXl:c,xs:u,sm:f,md:p,lg:h,xl:k,order:y,orderXs:g,orderSm:v,orderMd:N,orderLg:x,orderXl:F,className:_,unstyled:w,variant:C}=t,$=Jde(t,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),E=Wde(),j=a||E.columns,{classes:D,cx:M}=Xde({gutter:E.gutter,gutterXs:E.gutterXs,gutterSm:E.gutterSm,gutterMd:E.gutterMd,gutterLg:E.gutterLg,gutterXl:E.gutterXl,offset:r,offsetXs:o,offsetSm:l,offsetMd:s,offsetLg:d,offsetXl:c,xs:u,sm:f,md:p,lg:h,xl:k,order:y,orderXs:g,orderSm:v,orderMd:N,orderLg:x,orderXl:F,grow:E.grow,columns:E.columns,span:j},{unstyled:w,name:"Grid",variant:C});return!nce(j)||j>E.columns?null:b.createElement(xe,Zde({className:M(D.col,_),ref:n},$),i)});y6.displayName="@mantine/core/Col";var tce=Object.defineProperty,_E=Object.getOwnPropertySymbols,ice=Object.prototype.hasOwnProperty,ace=Object.prototype.propertyIsEnumerable,CE=(e,n,t)=>n in e?tce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,rce=(e,n)=>{for(var t in n||(n={}))ice.call(n,t)&&CE(e,t,n[t]);if(_E)for(var t of _E(n))ace.call(n,t)&&CE(e,t,n[t]);return e};function oce(e,n){return vL.reduce((t,i)=>(typeof e[i]<"u"&&(t[`@media (min-width: ${n.breakpoints[i]})`]={margin:`calc(-${q({size:e[i],sizes:n.spacing})} / 2)`}),t),{})}var lce=me((e,{justify:n,align:t,gutter:i,gutterXs:a,gutterSm:r,gutterMd:o,gutterLg:l,gutterXl:s})=>({root:rce({margin:`calc(-${q({size:i,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:n,alignItems:t},oce({xs:a,sm:r,md:o,lg:l,xl:s},e))})),sce=Object.defineProperty,Ck=Object.getOwnPropertySymbols,S6=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable,PE=(e,n,t)=>n in e?sce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,dce=(e,n)=>{for(var t in n||(n={}))S6.call(n,t)&&PE(e,t,n[t]);if(Ck)for(var t of Ck(n))N6.call(n,t)&&PE(e,t,n[t]);return e},cce=(e,n)=>{var t={};for(var i in e)S6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ck)for(var i of Ck(e))n.indexOf(i)<0&&N6.call(e,i)&&(t[i]=e[i]);return t};const uce={gutter:"md",justify:"flex-start",align:"stretch",columns:12},$u=S.forwardRef((e,n)=>{const t=ae("Grid",uce,e),{gutter:i,gutterXs:a,gutterSm:r,gutterMd:o,gutterLg:l,gutterXl:s,children:d,grow:c,justify:u,align:f,columns:p,className:h,unstyled:k,variant:y}=t,g=cce(t,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:v,cx:N}=lce({gutter:i,justify:u,align:f,gutterXs:a,gutterSm:r,gutterMd:o,gutterLg:l,gutterXl:s},{unstyled:k,name:"Grid",variant:y});return b.createElement(Vde,{value:{gutter:i,gutterXs:a,gutterSm:r,gutterMd:o,gutterLg:l,gutterXl:s,grow:c,columns:p}},b.createElement(xe,dce({className:N(v.root,h),ref:n},g),d))});$u.Col=y6;$u.displayName="@mantine/core/Grid";function mce(e){return S.Children.toArray(e).filter(Boolean)}const fce={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var pce=me((e,{spacing:n,position:t,noWrap:i,grow:a,align:r,count:o})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:r||"center",flexWrap:i?"nowrap":"wrap",justifyContent:fce[t],gap:q({size:n,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:a?`calc(${100/o}% - (${T(q({size:n,sizes:e.spacing}))} - ${q({size:n,sizes:e.spacing})} / ${o}))`:void 0,flexGrow:a?1:0}}}));const hce=pce;var vce=Object.defineProperty,Pk=Object.getOwnPropertySymbols,b6=Object.prototype.hasOwnProperty,x6=Object.prototype.propertyIsEnumerable,OE=(e,n,t)=>n in e?vce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,kce=(e,n)=>{for(var t in n||(n={}))b6.call(n,t)&&OE(e,t,n[t]);if(Pk)for(var t of Pk(n))x6.call(n,t)&&OE(e,t,n[t]);return e},gce=(e,n)=>{var t={};for(var i in e)b6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Pk)for(var i of Pk(e))n.indexOf(i)<0&&x6.call(e,i)&&(t[i]=e[i]);return t};const yce={position:"left",spacing:"md"},Ok=S.forwardRef((e,n)=>{const t=ae("Group",yce,e),{className:i,position:a,align:r,children:o,noWrap:l,grow:s,spacing:d,unstyled:c,variant:u}=t,f=gce(t,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),p=mce(o),{classes:h,cx:k}=hce({align:r,grow:s,noWrap:l,spacing:d,position:a,count:p.length},{unstyled:c,name:"Group",variant:u});return b.createElement(xe,kce({className:k(h.root,i),ref:n},f),p)});Ok.displayName="@mantine/core/Group";var Sce=me((e,{color:n})=>({root:{backgroundColor:e.fn.themeColor(n,e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"}})),Nce=Object.defineProperty,Dk=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,w6=Object.prototype.propertyIsEnumerable,DE=(e,n,t)=>n in e?Nce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,bce=(e,n)=>{for(var t in n||(n={}))F6.call(n,t)&&DE(e,t,n[t]);if(Dk)for(var t of Dk(n))w6.call(n,t)&&DE(e,t,n[t]);return e},xce=(e,n)=>{var t={};for(var i in e)F6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Dk)for(var i of Dk(e))n.indexOf(i)<0&&w6.call(e,i)&&(t[i]=e[i]);return t};const Fce={color:"yellow"},Fi=S.forwardRef((e,n)=>{const t=ae("Mark",Fce,e),{color:i,className:a,unstyled:r,variant:o}=t,l=xce(t,["color","className","unstyled","variant"]),{classes:s,cx:d}=Sce({color:i},{unstyled:r,name:"Mark",variant:o});return b.createElement(xe,bce({component:"mark",ref:n,className:d(s.root,a)},l))});Fi.displayName="@mantine/core/Mark";function wce({open:e,close:n,openDelay:t,closeDelay:i}){const a=S.useRef(-1),r=S.useRef(-1),o=()=>{window.clearTimeout(a.current),window.clearTimeout(r.current)},l=()=>{o(),t===0?e():a.current=window.setTimeout(e,t)},s=()=>{o(),i===0?n():r.current=window.setTimeout(n,i)};return S.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:s}}var _ce=Object.defineProperty,Ek=Object.getOwnPropertySymbols,_6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,EE=(e,n,t)=>n in e?_ce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$E=(e,n)=>{for(var t in n||(n={}))_6.call(n,t)&&EE(e,t,n[t]);if(Ek)for(var t of Ek(n))C6.call(n,t)&&EE(e,t,n[t]);return e},Cce=(e,n)=>{var t={};for(var i in e)_6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ek)for(var i of Ek(e))n.indexOf(i)<0&&C6.call(e,i)&&(t[i]=e[i]);return t};function Pce(e){const n=e,{width:t,height:i,style:a}=n,r=Cce(n,["width","height","style"]);return b.createElement("svg",$E({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:$E({width:t,height:i},a)},r),b.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Oce=Object.defineProperty,Dce=Object.defineProperties,Ece=Object.getOwnPropertyDescriptors,IE=Object.getOwnPropertySymbols,$ce=Object.prototype.hasOwnProperty,Ice=Object.prototype.propertyIsEnumerable,jE=(e,n,t)=>n in e?Oce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,TE=(e,n)=>{for(var t in n||(n={}))$ce.call(n,t)&&jE(e,t,n[t]);if(IE)for(var t of IE(n))Ice.call(n,t)&&jE(e,t,n[t]);return e},AE=(e,n)=>Dce(e,Ece(n)),jce=me((e,{radius:n})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:AE(TE({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(n)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:AE(TE({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(n)})})),Tce=Object.defineProperty,Ace=Object.defineProperties,Rce=Object.getOwnPropertyDescriptors,$k=Object.getOwnPropertySymbols,P6=Object.prototype.hasOwnProperty,O6=Object.prototype.propertyIsEnumerable,RE=(e,n,t)=>n in e?Tce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Hc=(e,n)=>{for(var t in n||(n={}))P6.call(n,t)&&RE(e,t,n[t]);if($k)for(var t of $k(n))O6.call(n,t)&&RE(e,t,n[t]);return e},Mce=(e,n)=>Ace(e,Rce(n)),Lce=(e,n)=>{var t={};for(var i in e)P6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&$k)for(var i of $k(e))n.indexOf(i)<0&&O6.call(e,i)&&(t[i]=e[i]);return t};const zce={fit:"cover",width:"100%",height:"auto",radius:0},hc=S.forwardRef((e,n)=>{const t=ae("Image",zce,e),{className:i,alt:a,src:r,fit:o,width:l,height:s,radius:d,imageProps:c,withPlaceholder:u,placeholder:f,imageRef:p,classNames:h,styles:k,caption:y,unstyled:g,style:v,variant:N}=t,x=Lce(t,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:F,cx:_}=jce({radius:d},{classNames:h,styles:k,unstyled:g,name:"Image",variant:N}),[w,C]=S.useState(!r),$=u&&w;return Et(()=>{C(!r)},[r]),b.createElement(xe,Hc({className:_(F.root,i),style:Hc({width:T(l)},v),ref:n},x),b.createElement("figure",{className:F.figure},b.createElement("div",{className:F.imageWrapper},b.createElement("img",Mce(Hc({src:r,alt:a,ref:p},c),{className:_(F.image,c==null?void 0:c.className),onError:E=>{C(!0),typeof(c==null?void 0:c.onError)=="function"&&c.onError(E)},style:Hc(Hc({objectFit:o,width:T(l),height:T(s)},$&&{overflow:"hidden"}),c==null?void 0:c.style)})),$&&b.createElement("div",{className:F.placeholder,title:a},f||b.createElement("div",null,b.createElement(Pce,{width:T(40),height:T(40)})))),!!y&&b.createElement(Ri,{component:"figcaption",size:"sm",align:"center",className:F.caption},y)))});hc.displayName="@mantine/core/Image";var Bce=Object.defineProperty,Vce=Object.defineProperties,Wce=Object.getOwnPropertyDescriptors,ME=Object.getOwnPropertySymbols,Hce=Object.prototype.hasOwnProperty,Uce=Object.prototype.propertyIsEnumerable,LE=(e,n,t)=>n in e?Bce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,zE=(e,n)=>{for(var t in n||(n={}))Hce.call(n,t)&&LE(e,t,n[t]);if(ME)for(var t of ME(n))Uce.call(n,t)&&LE(e,t,n[t]);return e},BE=(e,n)=>Vce(e,Wce(n));const Yce=e=>FZ({from:{boxShadow:`0 0 ${T(.5)} 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 ${T(.5)} ${T(4.4)} ${e}`,opacity:0}});function VE(e,n=0){const t={},[i,a]=e.split("-");let r="",o="";return i==="top"&&(t.top=n,o="-50%"),i==="middle"&&(t.top="50%",o="-50%"),i==="bottom"&&(t.bottom=n,o="50%"),a==="start"&&(t.left=n,r="-50%"),a==="center"&&(t.left="50%",r="-50%"),a==="end"&&(t.right=n,r="50%"),t.transform=`translate(${r}, ${o})`,t}var Gce=me((e,{radius:n,color:t,position:i,offset:a,inline:r,withBorder:o,withLabel:l,zIndex:s},{size:d})=>{const{background:c}=e.fn.variant({variant:"filled",primaryFallback:!1,color:t||e.primaryColor}),u=T(d);return{root:{position:"relative",display:r?"inline-block":"block"},indicator:BE(zE({},VE(i,a)),{zIndex:s,position:"absolute",[l?"minWidth":"width"]:u,height:u,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:l?`calc(${e.spacing.xs} / 2)`:0,paddingRight:l?`calc(${e.spacing.xs} / 2)`:0,borderRadius:e.fn.radius(n),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:t||e.primaryColor}).background,border:o?`${T(2)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${Yce(c)} 1000ms linear infinite`},common:BE(zE({},VE(i,a)),{position:"absolute",[l?"minWidth":"width"]:u,height:u,borderRadius:e.fn.radius(n)})}}),qce=Object.defineProperty,Ik=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,E6=Object.prototype.propertyIsEnumerable,WE=(e,n,t)=>n in e?qce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Kce=(e,n)=>{for(var t in n||(n={}))D6.call(n,t)&&WE(e,t,n[t]);if(Ik)for(var t of Ik(n))E6.call(n,t)&&WE(e,t,n[t]);return e},Xce=(e,n)=>{var t={};for(var i in e)D6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ik)for(var i of Ik(e))n.indexOf(i)<0&&E6.call(e,i)&&(t[i]=e[i]);return t};const Qce={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:Ma("app")},Kn=S.forwardRef((e,n)=>{const t=ae("Indicator",Qce,e),{children:i,position:a,offset:r,size:o,radius:l,inline:s,withBorder:d,className:c,color:u,styles:f,label:p,classNames:h,disabled:k,zIndex:y,unstyled:g,processing:v,variant:N}=t,x=Xce(t,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:F,cx:_}=Gce({position:a,offset:r,radius:l,inline:s,color:u,withBorder:d,zIndex:y,withLabel:!!p},{name:"Indicator",classNames:h,styles:f,unstyled:g,variant:N,size:o});return b.createElement(xe,Kce({ref:n,className:_(F.root,c)},x),!k&&b.createElement(b.Fragment,null,b.createElement("div",{className:_(F.indicator,F.common)},p),v&&b.createElement("div",{className:_(F.processing,F.common)})),i)});Kn.displayName="@mantine/core/Indicator";function $6(e,n){if(e==null)return{};var t={},i=Object.keys(e),a,r;for(r=0;r<i.length;r++)a=i[r],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}var Zce=Object.defineProperty,Jce=Object.defineProperties,eue=Object.getOwnPropertyDescriptors,HE=Object.getOwnPropertySymbols,nue=Object.prototype.hasOwnProperty,tue=Object.prototype.propertyIsEnumerable,UE=(e,n,t)=>n in e?Zce(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,iue=(e,n)=>{for(var t in n||(n={}))nue.call(n,t)&&UE(e,t,n[t]);if(HE)for(var t of HE(n))tue.call(n,t)&&UE(e,t,n[t]);return e},aue=(e,n)=>Jce(e,eue(n)),rue=me(e=>({root:aue(iue({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})})),oue=Object.defineProperty,lue=Object.defineProperties,sue=Object.getOwnPropertyDescriptors,jk=Object.getOwnPropertySymbols,I6=Object.prototype.hasOwnProperty,j6=Object.prototype.propertyIsEnumerable,YE=(e,n,t)=>n in e?oue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,rp=(e,n)=>{for(var t in n||(n={}))I6.call(n,t)&&YE(e,t,n[t]);if(jk)for(var t of jk(n))j6.call(n,t)&&YE(e,t,n[t]);return e},due=(e,n)=>lue(e,sue(n)),cue=(e,n)=>{var t={};for(var i in e)I6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&jk)for(var i of jk(e))n.indexOf(i)<0&&j6.call(e,i)&&(t[i]=e[i]);return t};const uue={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:Ma("overlay")},T6=S.forwardRef((e,n)=>{const t=ae("LoadingOverlay",uue,e),{className:i,visible:a,loaderProps:r,overlayOpacity:o,overlayColor:l,transitionDuration:s,exitTransitionDuration:d,zIndex:c,style:u,loader:f,radius:p,overlayBlur:h,unstyled:k,variant:y,keepMounted:g}=t,v=cue(t,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:N,cx:x,theme:F}=rue(null,{name:"LoadingOverlay",unstyled:k,variant:y}),_=`calc(${c} + 1)`;return b.createElement(fc,{keepMounted:g,duration:s,exitDuration:d,mounted:a,transition:"fade"},w=>b.createElement(xe,rp({className:x(N.root,i),style:due(rp(rp({},w),u),{zIndex:c}),ref:n},v),f?b.createElement("div",{style:{zIndex:_}},f):b.createElement(ti,rp({style:{zIndex:_}},r)),b.createElement(Lz,{opacity:o,zIndex:c,radius:p,blur:h,unstyled:k,color:l||(F.colorScheme==="dark"?F.colors.dark[5]:F.white)})))});T6.displayName="@mantine/core/LoadingOverlay";const A6={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[mue,Jm]=Ra(A6.context);var fue=me(e=>({divider:{marginTop:T(4),marginBottom:T(4),borderTop:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}})),pue=Object.defineProperty,Tk=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty,M6=Object.prototype.propertyIsEnumerable,GE=(e,n,t)=>n in e?pue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,hue=(e,n)=>{for(var t in n||(n={}))R6.call(n,t)&&GE(e,t,n[t]);if(Tk)for(var t of Tk(n))M6.call(n,t)&&GE(e,t,n[t]);return e},vue=(e,n)=>{var t={};for(var i in e)R6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Tk)for(var i of Tk(e))n.indexOf(i)<0&&M6.call(e,i)&&(t[i]=e[i]);return t};const kue={},L6=S.forwardRef((e,n)=>{const t=ae("MenuDivider",kue,e),{children:i,className:a}=t,r=vue(t,["children","className"]),{classNames:o,styles:l,unstyled:s,variant:d}=Jm(),{classes:c,cx:u}=fue(null,{name:"Menu",classNames:o,styles:l,unstyled:s,variant:d});return b.createElement(xe,hue({className:u(c.divider,a),ref:n},r))});L6.displayName="@mantine/core/MenuDivider";var gue=Object.defineProperty,Ak=Object.getOwnPropertySymbols,z6=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable,qE=(e,n,t)=>n in e?gue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,yue=(e,n)=>{for(var t in n||(n={}))z6.call(n,t)&&qE(e,t,n[t]);if(Ak)for(var t of Ak(n))B6.call(n,t)&&qE(e,t,n[t]);return e},Sue=(e,n)=>{var t={};for(var i in e)z6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ak)for(var i of Ak(e))n.indexOf(i)<0&&B6.call(e,i)&&(t[i]=e[i]);return t};const Nue={};function V6(e){const n=ae("MenuDropdown",Nue,e),{children:t,onMouseEnter:i,onMouseLeave:a}=n,r=Sue(n,["children","onMouseEnter","onMouseLeave"]),o=S.useRef(),l=Jm(),s=u=>{var f;(u.key==="ArrowUp"||u.key==="ArrowDown")&&(u.preventDefault(),(f=o.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||f.focus())},d=Oi(i,()=>l.trigger==="hover"&&l.openDropdown()),c=Oi(a,()=>l.trigger==="hover"&&l.closeDropdown());return b.createElement(Jt.Dropdown,yue({onMouseEnter:d,onMouseLeave:c,role:"menu","aria-orientation":"vertical"},r),b.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:s,ref:o,style:{outline:0}},t))}V6.displayName="@mantine/core/MenuDropdown";var bue=Object.defineProperty,xue=Object.defineProperties,Fue=Object.getOwnPropertyDescriptors,KE=Object.getOwnPropertySymbols,wue=Object.prototype.hasOwnProperty,_ue=Object.prototype.propertyIsEnumerable,XE=(e,n,t)=>n in e?bue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Cue=(e,n)=>{for(var t in n||(n={}))wue.call(n,t)&&XE(e,t,n[t]);if(KE)for(var t of KE(n))_ue.call(n,t)&&XE(e,t,n[t]);return e},Pue=(e,n)=>xue(e,Fue(n)),Oue=me((e,{color:n,radius:t})=>({item:Pue(Cue({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(t),color:n?e.fn.variant({variant:"filled",primaryFallback:!1,color:n}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:n?e.fn.variant({variant:"light",color:n}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const Due=Oue;var Eue=Object.defineProperty,$ue=Object.defineProperties,Iue=Object.getOwnPropertyDescriptors,Rk=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,H6=Object.prototype.propertyIsEnumerable,QE=(e,n,t)=>n in e?Eue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jue=(e,n)=>{for(var t in n||(n={}))W6.call(n,t)&&QE(e,t,n[t]);if(Rk)for(var t of Rk(n))H6.call(n,t)&&QE(e,t,n[t]);return e},Tue=(e,n)=>$ue(e,Iue(n)),Aue=(e,n)=>{var t={};for(var i in e)W6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Rk)for(var i of Rk(e))n.indexOf(i)<0&&H6.call(e,i)&&(t[i]=e[i]);return t};const Rue={},U6=S.forwardRef((e,n)=>{const t=ae("MenuItem",Rue,e),{children:i,className:a,color:r,closeMenuOnClick:o,icon:l,rightSection:s}=t,d=Aue(t,["children","className","color","closeMenuOnClick","icon","rightSection"]),c=Jm(),{classes:u,cx:f,theme:p}=Due({radius:c.radius,color:r},{name:"Menu",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),h=S.useRef(),k=c.getItemIndex(h.current),y=d,g=Oi(y.onMouseLeave,()=>c.setHovered(-1)),v=Oi(y.onMouseEnter,()=>c.setHovered(c.getItemIndex(h.current))),N=Oi(y.onClick,()=>{typeof o=="boolean"?o&&c.closeDropdownImmediately():c.closeOnItemClick&&c.closeDropdownImmediately()}),x=Oi(y.onFocus,()=>c.setHovered(c.getItemIndex(h.current)));return b.createElement(xe,Tue(jue({component:"button",type:"button"},d),{tabIndex:-1,onFocus:x,className:f(u.item,a),ref:Br(h,n),role:"menuitem","data-menu-item":!0,"data-hovered":c.hovered===k?!0:void 0,onMouseEnter:v,onMouseLeave:g,onClick:N,onKeyDown:lL({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:c.loop,dir:p.dir,orientation:"vertical",onKeyDown:y.onKeydown})}),l&&b.createElement("div",{className:u.itemIcon},l),i&&b.createElement("div",{className:u.itemLabel},i),s&&b.createElement("div",{className:u.itemRightSection},s))});U6.displayName="@mantine/core/MenuItem";const Mue=U6;var Lue=me(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}})),zue=Object.defineProperty,Mk=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,ZE=(e,n,t)=>n in e?zue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Bue=(e,n)=>{for(var t in n||(n={}))Y6.call(n,t)&&ZE(e,t,n[t]);if(Mk)for(var t of Mk(n))G6.call(n,t)&&ZE(e,t,n[t]);return e},Vue=(e,n)=>{var t={};for(var i in e)Y6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Mk)for(var i of Mk(e))n.indexOf(i)<0&&G6.call(e,i)&&(t[i]=e[i]);return t};const Wue={},q6=S.forwardRef((e,n)=>{const t=ae("MenuLabel",Wue,e),{children:i,className:a}=t,r=Vue(t,["children","className"]),{classNames:o,styles:l,unstyled:s,variant:d}=Jm(),{classes:c,cx:u}=Lue(null,{name:"Menu",classNames:o,styles:l,unstyled:s,variant:d});return b.createElement(Ri,Bue({className:u(c.label,a),ref:n},r),i)});q6.displayName="@mantine/core/MenuLabel";var Hue=Object.defineProperty,Lk=Object.getOwnPropertySymbols,K6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,JE=(e,n,t)=>n in e?Hue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Uue=(e,n)=>{for(var t in n||(n={}))K6.call(n,t)&&JE(e,t,n[t]);if(Lk)for(var t of Lk(n))X6.call(n,t)&&JE(e,t,n[t]);return e},Yue=(e,n)=>{var t={};for(var i in e)K6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Lk)for(var i of Lk(e))n.indexOf(i)<0&&X6.call(e,i)&&(t[i]=e[i]);return t};const Gue={refProp:"ref"},Q6=S.forwardRef((e,n)=>{const t=ae("MenuTarget",Gue,e),{children:i,refProp:a}=t,r=Yue(t,["children","refProp"]);if(!sc(i))throw new Error(A6.children);const o=Jm(),l=Oi(i.props.onClick,()=>o.trigger==="click"&&o.toggleDropdown()),s=Oi(i.props.onMouseEnter,()=>o.trigger==="hover"&&o.openDropdown()),d=Oi(i.props.onMouseLeave,()=>o.trigger==="hover"&&o.closeDropdown());return b.createElement(Jt.Target,Uue({refProp:a,popupType:"menu",ref:n},r),S.cloneElement(i,{onClick:l,onMouseEnter:s,onMouseLeave:d,"data-expanded":o.opened?!0:void 0}))});Q6.displayName="@mantine/core/MenuTarget";var que=me({dropdown:{padding:T(4)}}),Kue=Object.defineProperty,Xue=Object.defineProperties,Que=Object.getOwnPropertyDescriptors,zk=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,J6=Object.prototype.propertyIsEnumerable,e2=(e,n,t)=>n in e?Kue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,n2=(e,n)=>{for(var t in n||(n={}))Z6.call(n,t)&&e2(e,t,n[t]);if(zk)for(var t of zk(n))J6.call(n,t)&&e2(e,t,n[t]);return e},t2=(e,n)=>Xue(e,Que(n)),Zue=(e,n)=>{var t={};for(var i in e)Z6.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&zk)for(var i of zk(e))n.indexOf(i)<0&&J6.call(e,i)&&(t[i]=e[i]);return t};const Jue={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function zt(e){const n=ae("Menu",Jue,e),{children:t,onOpen:i,onClose:a,opened:r,defaultOpened:o,onChange:l,closeOnItemClick:s,loop:d,closeOnEscape:c,trigger:u,openDelay:f,closeDelay:p,classNames:h,styles:k,unstyled:y,radius:g,variant:v}=n,N=Zue(n,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:x,cx:F}=que(),[_,{setHovered:w,resetHovered:C}]=YX(),[$,E]=vt({value:r,defaultValue:o,finalValue:!1,onChange:l}),j=()=>{E(!1),$&&(a==null||a())},D=()=>{E(!0),!$&&(i==null||i())},M=()=>$?j():D(),{openDropdown:R,closeDropdown:I}=wce({open:D,close:j,closeDelay:p,openDelay:f}),L=B=>WX("[data-menu-item]","[data-menu-dropdown]",B);return Et(()=>{C()},[$]),b.createElement(mue,{value:{opened:$,toggleDropdown:M,getItemIndex:L,hovered:_,setHovered:w,closeOnItemClick:s,closeDropdown:u==="click"?j:I,openDropdown:u==="click"?D:R,closeDropdownImmediately:j,loop:d,trigger:u,radius:g,classNames:h,styles:k,unstyled:y,variant:v}},b.createElement(Jt,t2(n2({},N),{radius:g,opened:$,onChange:M,defaultOpened:o,trapFocus:u==="click",closeOnEscape:c&&u==="click",__staticSelector:"Menu",classNames:t2(n2({},h),{dropdown:F(x.dropdown,h==null?void 0:h.dropdown)}),styles:k,unstyled:y,variant:v}),t))}zt.displayName="@mantine/core/Menu";zt.Item=Mue;zt.Label=q6;zt.Dropdown=V6;zt.Target=Q6;zt.Divider=L6;const[eme,nme]=Ra("Modal component was not found in tree"),tme={xs:T(320),sm:T(380),md:T(440),lg:T(620),xl:T(780)};var ime=me((e,{yOffset:n,xOffset:t,centered:i,fullScreen:a},{size:r})=>({content:{flex:a?"0 0 100%":`0 0 ${q({size:r,sizes:tme})}`,maxWidth:"100%",maxHeight:a?void 0:`calc(100dvh - (${T(n)} * 2))`,height:a?"100vh":void 0,borderRadius:a?0:void 0,overflowY:"auto"},inner:{paddingTop:a?0:n,paddingBottom:a?0:n,paddingLeft:a?0:t,paddingRight:a?0:t,display:"flex",justifyContent:"center",alignItems:i?"center":"flex-start"}})),ame=Object.defineProperty,rme=Object.defineProperties,ome=Object.getOwnPropertyDescriptors,Bk=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,n8=Object.prototype.propertyIsEnumerable,i2=(e,n,t)=>n in e?ame(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,gx=(e,n)=>{for(var t in n||(n={}))e8.call(n,t)&&i2(e,t,n[t]);if(Bk)for(var t of Bk(n))n8.call(n,t)&&i2(e,t,n[t]);return e},t8=(e,n)=>rme(e,ome(n)),lme=(e,n)=>{var t={};for(var i in e)e8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Bk)for(var i of Bk(e))n.indexOf(i)<0&&n8.call(e,i)&&(t[i]=e[i]);return t};const sme=t8(gx({},Zm),{yOffset:"5dvh",xOffset:"5vw"});function i8(e){const n=ae("ModalRoot",sme,e),{classNames:t,variant:i,size:a,yOffset:r,xOffset:o,scrollAreaComponent:l,radius:s,centered:d,fullScreen:c}=n,u=lme(n,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:f,cx:p}=ime({yOffset:r,xOffset:o,centered:d,fullScreen:c},{name:"Modal",variant:i,size:a});return b.createElement(eme,{value:{yOffset:r,scrollAreaComponent:l,radius:s}},b.createElement(Xe,gx({__staticSelector:"Modal",size:a,variant:i,classNames:t8(gx({},t),{content:p(f.content,t==null?void 0:t.content),inner:p(f.inner,t==null?void 0:t.inner)})},u)))}var dme=Object.defineProperty,Vk=Object.getOwnPropertySymbols,a8=Object.prototype.hasOwnProperty,r8=Object.prototype.propertyIsEnumerable,a2=(e,n,t)=>n in e?dme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,cme=(e,n)=>{for(var t in n||(n={}))a8.call(n,t)&&a2(e,t,n[t]);if(Vk)for(var t of Vk(n))r8.call(n,t)&&a2(e,t,n[t]);return e},ume=(e,n)=>{var t={};for(var i in e)a8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Vk)for(var i of Vk(e))n.indexOf(i)<0&&r8.call(e,i)&&(t[i]=e[i]);return t};const mme={shadow:"xl"},o8=S.forwardRef((e,n)=>{const t=ae("ModalContent",mme,e),{children:i,scrollAreaComponent:a}=t,r=ume(t,["children","scrollAreaComponent"]),o=nme(),l=a||o.scrollAreaComponent||Xe.NativeScrollArea;return b.createElement(Xe.Content,cme({ref:n,radius:o.radius},r),b.createElement(l,{style:{maxHeight:`calc(100dvh - (${T(o.yOffset)} * 2))`}},i))});var fme=Object.defineProperty,pme=Object.defineProperties,hme=Object.getOwnPropertyDescriptors,Wk=Object.getOwnPropertySymbols,l8=Object.prototype.hasOwnProperty,s8=Object.prototype.propertyIsEnumerable,r2=(e,n,t)=>n in e?fme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,dh=(e,n)=>{for(var t in n||(n={}))l8.call(n,t)&&r2(e,t,n[t]);if(Wk)for(var t of Wk(n))s8.call(n,t)&&r2(e,t,n[t]);return e},vme=(e,n)=>pme(e,hme(n)),kme=(e,n)=>{var t={};for(var i in e)l8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Wk)for(var i of Wk(e))n.indexOf(i)<0&&s8.call(e,i)&&(t[i]=e[i]);return t};const gme=vme(dh({},Zm),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ht(e){const n=ae("Modal",gme,e),{title:t,withOverlay:i,overlayProps:a,withCloseButton:r,closeButtonProps:o,children:l}=n,s=kme(n,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),d=!!t||r;return b.createElement(i8,dh({},s),i&&b.createElement(Xe.Overlay,dh({},a)),b.createElement(o8,null,d&&b.createElement(Xe.Header,null,t&&b.createElement(Xe.Title,null,t),r&&b.createElement(Xe.CloseButton,dh({},o))),b.createElement(Xe.Body,null,l)))}Ht.Root=i8;Ht.CloseButton=Xe.CloseButton;Ht.Overlay=Xe.Overlay;Ht.Content=o8;Ht.Header=Xe.Header;Ht.Title=Xe.Title;Ht.Body=Xe.Body;Ht.NativeScrollArea=Xe.NativeScrollArea;const d8={xs:T(16),sm:T(22),md:T(26),lg:T(30),xl:T(36)},yme={xs:T(10),sm:T(12),md:T(14),lg:T(16),xl:T(18)};var Sme=me((e,{disabled:n,radius:t,readOnly:i},{size:a,variant:r})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:n?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:r==="filled"?e.white:e.colors.gray[1],color:n?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:q({size:a,sizes:d8}),paddingLeft:`calc(${q({size:a,sizes:e.spacing})} / 1.5)`,paddingRight:n||i?q({size:a,sizes:e.spacing}):0,fontWeight:500,fontSize:q({size:a,sizes:yme}),borderRadius:q({size:t,sizes:e.radius}),cursor:n?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${T(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${q({size:a,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),Nme=Object.defineProperty,Hk=Object.getOwnPropertySymbols,c8=Object.prototype.hasOwnProperty,u8=Object.prototype.propertyIsEnumerable,o2=(e,n,t)=>n in e?Nme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,bme=(e,n)=>{for(var t in n||(n={}))c8.call(n,t)&&o2(e,t,n[t]);if(Hk)for(var t of Hk(n))u8.call(n,t)&&o2(e,t,n[t]);return e},xme=(e,n)=>{var t={};for(var i in e)c8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Hk)for(var i of Hk(e))n.indexOf(i)<0&&u8.call(e,i)&&(t[i]=e[i]);return t};const Fme={xs:16,sm:22,md:24,lg:26,xl:30};function m8(e){var n=e,{label:t,classNames:i,styles:a,className:r,onRemove:o,disabled:l,readOnly:s,size:d,radius:c="sm",variant:u,unstyled:f}=n,p=xme(n,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:h,cx:k}=Sme({disabled:l,readOnly:s,radius:c},{name:"MultiSelect",classNames:i,styles:a,unstyled:f,size:d,variant:u});return b.createElement("div",bme({className:k(h.defaultValue,r)},p),b.createElement("span",{className:h.defaultValueLabel},t),!l&&!s&&b.createElement(ms,{"aria-hidden":!0,onMouseDown:o,size:Fme[d],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:h.defaultValueRemove,tabIndex:-1,unstyled:f}))}m8.displayName="@mantine/core/MultiSelect/DefaultValue";function wme({data:e,searchable:n,limit:t,searchValue:i,filter:a,value:r,disableSelectedItemFiltering:o}){if(!n&&r.length===0)return e;if(!n){const s=[];for(let d=0;d<e.length;d+=1)(o||!r.some(c=>c===e[d].value&&!e[d].disabled))&&s.push(e[d]);return s}const l=[];for(let s=0;s<e.length&&(a(i,!o&&r.some(d=>d===e[s].value&&!e[s].disabled),e[s])&&l.push(e[s]),!(l.length>=t));s+=1);return l}var _me=Object.defineProperty,Uk=Object.getOwnPropertySymbols,f8=Object.prototype.hasOwnProperty,p8=Object.prototype.propertyIsEnumerable,l2=(e,n,t)=>n in e?_me(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,s2=(e,n)=>{for(var t in n||(n={}))f8.call(n,t)&&l2(e,t,n[t]);if(Uk)for(var t of Uk(n))p8.call(n,t)&&l2(e,t,n[t]);return e},Cme=(e,n)=>{var t={};for(var i in e)f8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Uk)for(var i of Uk(e))n.indexOf(i)<0&&p8.call(e,i)&&(t[i]=e[i]);return t};const Pme={xs:T(14),sm:T(18),md:T(20),lg:T(24),xl:T(28)};function Ome(e){var n=e,{size:t,error:i,style:a}=n,r=Cme(n,["size","error","style"]);const o=vi(),l=q({size:t,sizes:Pme});return b.createElement("svg",s2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:s2({color:i?o.colors.red[6]:o.colors.gray[6],width:l,height:l},a),"data-chevron":!0},r),b.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Dme=Object.defineProperty,Eme=Object.defineProperties,$me=Object.getOwnPropertyDescriptors,d2=Object.getOwnPropertySymbols,Ime=Object.prototype.hasOwnProperty,jme=Object.prototype.propertyIsEnumerable,c2=(e,n,t)=>n in e?Dme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Tme=(e,n)=>{for(var t in n||(n={}))Ime.call(n,t)&&c2(e,t,n[t]);if(d2)for(var t of d2(n))jme.call(n,t)&&c2(e,t,n[t]);return e},Ame=(e,n)=>Eme(e,$me(n));function h8({shouldClear:e,clearButtonProps:n,onClear:t,size:i,error:a}){return e?b.createElement(ms,Ame(Tme({},n),{variant:"transparent",onClick:t,size:i,onMouseDown:r=>r.preventDefault()})):b.createElement(Ome,{error:a,size:i})}h8.displayName="@mantine/core/SelectRightSection";var Rme=Object.defineProperty,Mme=Object.defineProperties,Lme=Object.getOwnPropertyDescriptors,Yk=Object.getOwnPropertySymbols,v8=Object.prototype.hasOwnProperty,k8=Object.prototype.propertyIsEnumerable,u2=(e,n,t)=>n in e?Rme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,A0=(e,n)=>{for(var t in n||(n={}))v8.call(n,t)&&u2(e,t,n[t]);if(Yk)for(var t of Yk(n))k8.call(n,t)&&u2(e,t,n[t]);return e},m2=(e,n)=>Mme(e,Lme(n)),zme=(e,n)=>{var t={};for(var i in e)v8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Yk)for(var i of Yk(e))n.indexOf(i)<0&&k8.call(e,i)&&(t[i]=e[i]);return t};function g8(e){var n=e,{styles:t,rightSection:i,rightSectionWidth:a,theme:r}=n,o=zme(n,["styles","rightSection","rightSectionWidth","theme"]);if(i)return{rightSection:i,rightSectionWidth:a,styles:t};const l=typeof t=="function"?t(r):t;return{rightSection:!o.readOnly&&!(o.disabled&&o.shouldClear)&&b.createElement(h8,A0({},o)),styles:m2(A0({},l),{rightSection:m2(A0({},l==null?void 0:l.rightSection),{pointerEvents:o.shouldClear?void 0:"none"})})}}var Bme=Object.defineProperty,Vme=Object.defineProperties,Wme=Object.getOwnPropertyDescriptors,f2=Object.getOwnPropertySymbols,Hme=Object.prototype.hasOwnProperty,Ume=Object.prototype.propertyIsEnumerable,p2=(e,n,t)=>n in e?Bme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Yme=(e,n)=>{for(var t in n||(n={}))Hme.call(n,t)&&p2(e,t,n[t]);if(f2)for(var t of f2(n))Ume.call(n,t)&&p2(e,t,n[t]);return e},Gme=(e,n)=>Vme(e,Wme(n)),qme=me((e,{invalid:n},{size:t})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${q({size:t,sizes:Un})} - ${T(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:q({size:t,sizes:Un})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${T(2)}) calc(${e.spacing.xs} / 2)`},searchInput:Gme(Yme({},e.fn.fontStyles()),{flex:1,minWidth:T(60),backgroundColor:"transparent",border:0,outline:0,fontSize:q({size:t,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:q({size:t,sizes:d8}),"&::placeholder":{opacity:1,color:n?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}})),Kme=Object.defineProperty,Xme=Object.defineProperties,Qme=Object.getOwnPropertyDescriptors,Gk=Object.getOwnPropertySymbols,y8=Object.prototype.hasOwnProperty,S8=Object.prototype.propertyIsEnumerable,h2=(e,n,t)=>n in e?Kme(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$s=(e,n)=>{for(var t in n||(n={}))y8.call(n,t)&&h2(e,t,n[t]);if(Gk)for(var t of Gk(n))S8.call(n,t)&&h2(e,t,n[t]);return e},v2=(e,n)=>Xme(e,Qme(n)),Zme=(e,n)=>{var t={};for(var i in e)y8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Gk)for(var i of Gk(e))n.indexOf(i)<0&&S8.call(e,i)&&(t[i]=e[i]);return t};function Jme(e,n,t){return n?!1:t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function efe(e,n){return!!e&&!n.some(t=>t.value.toLowerCase()===e.toLowerCase())}function k2(e,n){if(!Array.isArray(e))return;if(n.length===0)return[];const t=n.map(i=>typeof i=="object"?i.value:i);return e.filter(i=>t.includes(i))}const nfe={size:"sm",valueComponent:m8,itemComponent:Ww,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:Jme,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:efe,switchDirectionOnFlip:!1,zIndex:Ma("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},$r=S.forwardRef((e,n)=>{const t=ae("MultiSelect",nfe,e),{className:i,style:a,required:r,label:o,description:l,size:s,error:d,classNames:c,styles:u,wrapperProps:f,value:p,defaultValue:h,data:k,onChange:y,valueComponent:g,itemComponent:v,id:N,transitionProps:x,maxDropdownHeight:F,shadow:_,nothingFound:w,onFocus:C,onBlur:$,searchable:E,placeholder:j,filter:D,limit:M,clearSearchOnChange:R,clearable:I,clearSearchOnBlur:L,variant:B,onSearchChange:O,searchValue:P,disabled:A,initiallyOpened:V,radius:U,icon:oe,rightSection:G,rightSectionWidth:ne,creatable:Z,getCreateLabel:ce,shouldCreate:ie,onCreate:ve,sx:he,dropdownComponent:ge,onDropdownClose:K,onDropdownOpen:de,maxSelectedValues:be,withinPortal:Ee,portalProps:Qe,switchDirectionOnFlip:$e,zIndex:z,selectOnBlur:H,name:W,dropdownPosition:ee,errorProps:J,labelProps:Q,descriptionProps:Y,form:se,positionDependencies:Ce,onKeyDown:Ae,unstyled:Te,inputContainer:cn,inputWrapperOrder:nn,readOnly:un,withAsterisk:$n,clearButtonProps:qe,hoverOnSearchChange:ke,disableSelectedItemFiltering:_e}=t,Ft=Zme(t,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Nn,cx:vn,theme:It}=qme({invalid:!!d},{name:"MultiSelect",classNames:c,styles:u,unstyled:Te,size:s,variant:B}),{systemStyles:mn,rest:Xn}=il(Ft),gi=S.useRef(),Cc=S.useRef({}),ii=zr(N),[jt,Wn]=S.useState(V),[Qn,da]=S.useState(-1),[Kr,yi]=S.useState("column"),[Si,cl]=vt({value:P,defaultValue:"",finalValue:void 0,onChange:O}),[xs,ff]=S.useState(!1),{scrollIntoView:Fs,targetRef:pf,scrollableRef:BS}=BL({duration:0,offset:5,cancelable:!1,isList:!0}),hf=Z&&typeof ce=="function";let Fe=null;const fn=k.map(Oe=>typeof Oe=="string"?{label:Oe,value:Oe}:Oe),wt=dL({data:fn}),[He,ws]=vt({value:k2(p,k),defaultValue:k2(h,k),finalValue:[],onChange:y}),ca=S.useRef(!!be&&be<He.length),O1=Oe=>{if(!un){const kn=He.filter(Vi=>Vi!==Oe);ws(kn),be&&kn.length<be&&(ca.current=!1)}},gH=Oe=>{cl(Oe.currentTarget.value),!A&&!ca.current&&E&&Wn(!0)},yH=Oe=>{typeof C=="function"&&C(Oe),!A&&!ca.current&&E&&Wn(!0)},_t=wme({data:wt,searchable:E,searchValue:Si,limit:M,filter:D,value:He,disableSelectedItemFiltering:_e});hf&&ie(Si,wt)&&(Fe=ce(Si),_t.push({label:Si,value:Si,creatable:!0}));const ul=Math.min(Qn,_t.length-1),D1=(Oe,kn,Vi)=>{let Xr=Oe;for(;Vi(Xr);)if(Xr=kn(Xr),!_t[Xr].disabled)return Xr;return Oe};Et(()=>{da(ke&&Si?0:-1)},[Si,ke]),Et(()=>{!A&&He.length>k.length&&Wn(!1),be&&He.length<be&&(ca.current=!1),be&&He.length>=be&&(ca.current=!0,Wn(!1))},[He]);const vf=Oe=>{if(!un)if(R&&cl(""),He.includes(Oe.value))O1(Oe.value);else{if(Oe.creatable&&typeof ve=="function"){const kn=ve(Oe.value);typeof kn<"u"&&kn!==null&&ws(typeof kn=="string"?[...He,kn]:[...He,kn.value])}else ws([...He,Oe.value]);He.length===be-1&&(ca.current=!0,Wn(!1)),_t.length===1&&Wn(!1)}},SH=Oe=>{typeof $=="function"&&$(Oe),H&&_t[ul]&&jt&&vf(_t[ul]),L&&cl(""),Wn(!1)},NH=Oe=>{if(xs||(Ae==null||Ae(Oe),un)||Oe.key!=="Backspace"&&be&&ca.current)return;const kn=Kr==="column",Vi=()=>{da(ml=>{var ur;const Pc=D1(ml,fl=>fl+1,fl=>fl<_t.length-1);return jt&&(pf.current=Cc.current[(ur=_t[Pc])==null?void 0:ur.value],Fs({alignment:kn?"end":"start"})),Pc})},Xr=()=>{da(ml=>{var ur;const Pc=D1(ml,fl=>fl-1,fl=>fl>0);return jt&&(pf.current=Cc.current[(ur=_t[Pc])==null?void 0:ur.value],Fs({alignment:kn?"start":"end"})),Pc})};switch(Oe.key){case"ArrowUp":{Oe.preventDefault(),Wn(!0),kn?Xr():Vi();break}case"ArrowDown":{Oe.preventDefault(),Wn(!0),kn?Vi():Xr();break}case"Enter":{Oe.preventDefault(),_t[ul]&&jt?vf(_t[ul]):Wn(!0);break}case" ":{E||(Oe.preventDefault(),_t[ul]&&jt?vf(_t[ul]):Wn(!0));break}case"Backspace":{He.length>0&&Si.length===0&&(ws(He.slice(0,-1)),Wn(!0),be&&(ca.current=!1));break}case"Home":{if(!E){Oe.preventDefault(),jt||Wn(!0);const ml=_t.findIndex(ur=>!ur.disabled);da(ml),Fs({alignment:kn?"end":"start"})}break}case"End":{if(!E){Oe.preventDefault(),jt||Wn(!0);const ml=_t.map(ur=>!!ur.disabled).lastIndexOf(!1);da(ml),Fs({alignment:kn?"end":"start"})}break}case"Escape":Wn(!1)}},bH=He.map(Oe=>{let kn=wt.find(Vi=>Vi.value===Oe&&!Vi.disabled);return!kn&&hf&&(kn={value:Oe,label:Oe}),kn}).filter(Oe=>!!Oe).map((Oe,kn)=>b.createElement(g,v2($s({},Oe),{variant:B,disabled:A,className:Nn.value,readOnly:un,onRemove:Vi=>{Vi.preventDefault(),Vi.stopPropagation(),O1(Oe.value)},key:Oe.value,size:s,styles:u,classNames:c,radius:U,index:kn}))),xH=Oe=>He.includes(Oe),FH=()=>{var Oe;cl(""),ws([]),(Oe=gi.current)==null||Oe.focus(),be&&(ca.current=!1)},kf=!un&&(_t.length>0?jt:jt&&!!w);return Et(()=>{const Oe=kf?de:K;typeof Oe=="function"&&Oe()},[kf]),b.createElement(it.Wrapper,$s($s({required:r,id:ii,label:o,error:d,description:l,size:s,className:i,style:a,classNames:c,styles:u,__staticSelector:"MultiSelect",sx:he,errorProps:J,descriptionProps:Y,labelProps:Q,inputContainer:cn,inputWrapperOrder:nn,unstyled:Te,withAsterisk:$n,variant:B},mn),f),b.createElement(Lo,{opened:kf,transitionProps:x,shadow:"sm",withinPortal:Ee,portalProps:Qe,__staticSelector:"MultiSelect",onDirectionChange:yi,switchDirectionOnFlip:$e,zIndex:z,dropdownPosition:ee,positionDependencies:[...Ce,Si],classNames:c,styles:u,unstyled:Te,variant:B},b.createElement(Lo.Target,null,b.createElement("div",{className:Nn.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":jt&&kf?`${ii}-items`:null,"aria-controls":ii,"aria-expanded":jt,onMouseLeave:()=>da(-1),tabIndex:-1},b.createElement("input",{type:"hidden",name:W,value:He.join(","),form:se,disabled:A}),b.createElement(it,$s({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:A,error:d,required:r,radius:U,icon:oe,unstyled:Te,onMouseDown:Oe=>{var kn;Oe.preventDefault(),!A&&!ca.current&&Wn(!jt),(kn=gi.current)==null||kn.focus()},classNames:v2($s({},c),{input:vn({[Nn.input]:!E},c==null?void 0:c.input)})},g8({theme:It,rightSection:G,rightSectionWidth:ne,styles:u,size:s,shouldClear:I&&He.length>0,onClear:FH,error:d,disabled:A,clearButtonProps:qe,readOnly:un})),b.createElement("div",{className:Nn.values,"data-clearable":I||void 0},bH,b.createElement("input",$s({ref:Br(n,gi),type:"search",id:ii,className:vn(Nn.searchInput,{[Nn.searchInputPointer]:!E,[Nn.searchInputInputHidden]:!jt&&He.length>0||!E&&He.length>0,[Nn.searchInputEmpty]:He.length===0}),onKeyDown:NH,value:Si,onChange:gH,onFocus:yH,onBlur:SH,readOnly:!E||ca.current||un,placeholder:He.length===0?j:void 0,disabled:A,"data-mantine-stop-propagation":jt,autoComplete:"off",onCompositionStart:()=>ff(!0),onCompositionEnd:()=>ff(!1)},Xn)))))),b.createElement(Lo.Dropdown,{component:ge||cS,maxHeight:F,direction:Kr,id:ii,innerRef:BS,__staticSelector:"MultiSelect",classNames:c,styles:u},b.createElement(Vw,{data:_t,hovered:ul,classNames:c,styles:u,uuid:ii,__staticSelector:"MultiSelect",onItemHover:da,onItemSelect:vf,itemsRefs:Cc,itemComponent:v,size:s,nothingFound:w,isItemSelected:xH,creatable:Z&&!!Fe,createLabel:Fe,unstyled:Te,variant:B}))))});$r.displayName="@mantine/core/MultiSelect";var tfe=Object.defineProperty,ife=Object.defineProperties,afe=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,rfe=Object.prototype.hasOwnProperty,ofe=Object.prototype.propertyIsEnumerable,y2=(e,n,t)=>n in e?tfe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,yx=(e,n)=>{for(var t in n||(n={}))rfe.call(n,t)&&y2(e,t,n[t]);if(g2)for(var t of g2(n))ofe.call(n,t)&&y2(e,t,n[t]);return e},lfe=(e,n)=>ife(e,afe(n));const sfe=["filled","light","subtle"];function dfe({theme:e,variant:n,color:t}){if(!sfe.includes(n))return null;const i=e.fn.variant({variant:n,color:t});return{"&[data-active]":yx({backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover}))}}var cfe=me((e,{noWrap:n,childrenOffset:t,alignIcon:i,color:a},{variant:r})=>({root:lfe(yx(yx({display:"flex",alignItems:"center",width:"100%",padding:`${T(8)} ${e.spacing.sm}`,userSelect:"none"},dfe({theme:e,variant:r,color:a})),e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})),{"&[data-disabled]":{opacity:.4,pointerEvents:"none"}}),icon:{marginRight:e.spacing.sm,display:"flex",justifyContent:"center",alignItems:"center",alignSelf:i==="center"?"center":"flex-start",paddingTop:i==="center"?void 0:T(4)},rightSection:{marginLeft:e.spacing.sm,display:"flex",justifyContent:"center",alignItems:"center",transition:`transform 150ms ${e.transitionTimingFunction}`,"&[data-rotate]":{transform:"rotate(90deg)"}},body:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:n?"nowrap":void 0},label:{},description:{display:"block","&[data-active]":{color:"inherit"}},children:{paddingLeft:q({size:t,sizes:e.spacing})}})),ufe=Object.defineProperty,qk=Object.getOwnPropertySymbols,N8=Object.prototype.hasOwnProperty,b8=Object.prototype.propertyIsEnumerable,S2=(e,n,t)=>n in e?ufe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,mfe=(e,n)=>{for(var t in n||(n={}))N8.call(n,t)&&S2(e,t,n[t]);if(qk)for(var t of qk(n))b8.call(n,t)&&S2(e,t,n[t]);return e},ffe=(e,n)=>{var t={};for(var i in e)N8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&qk)for(var i of qk(e))n.indexOf(i)<0&&b8.call(e,i)&&(t[i]=e[i]);return t};const pfe={variant:"light",childrenOffset:"lg"},x8=S.forwardRef((e,n)=>{const t=ae("NavLink",pfe,e),{label:i,description:a,icon:r,rightSection:o,className:l,classNames:s,styles:d,unstyled:c,active:u,color:f,variant:p,noWrap:h,children:k,opened:y,defaultOpened:g,onChange:v,disableRightSectionRotation:N,childrenOffset:x,disabled:F,onClick:_}=t,w=ffe(t,["label","description","icon","rightSection","className","classNames","styles","unstyled","active","color","variant","noWrap","children","opened","defaultOpened","onChange","disableRightSectionRotation","childrenOffset","disabled","onClick"]),{classes:C,cx:$}=cfe({color:f,noWrap:h,childrenOffset:x,alignIcon:a?"top":"center"},{name:"NavLink",classNames:s,styles:d,unstyled:c,variant:p}),[E,j]=vt({value:y,defaultValue:g,finalValue:!1,onChange:v}),D=!!k,M=R=>{D?(R.preventDefault(),_==null||_(R),j(!E)):_==null||_(R)};return b.createElement(b.Fragment,null,b.createElement(fi,mfe({ref:n,className:$(C.root,l),"data-active":u||void 0,onClick:M,unstyled:c,"data-expanded":E||void 0,"data-disabled":F||void 0,disabled:F},w),r&&b.createElement("span",{className:C.icon},r),b.createElement("span",{className:C.body},b.createElement(Ri,{component:"span",size:"sm",className:C.label},i),b.createElement(Ri,{component:"span",color:"dimmed",size:"xs","data-active":u||void 0,className:C.description},a)),(D||o)&&b.createElement("span",{className:C.rightSection,"data-rotate":E&&!N||void 0},D?o||b.createElement(hm,{width:T(14),height:T(14),style:{transform:"rotate(-90deg)"}}):o)),b.createElement(oS,{in:E},b.createElement("div",{className:C.children},k)))});x8.displayName="@mantine/core/NavLink";const Hd=x8;var hfe=me((e,{color:n,radius:t,withTitle:i})=>{const a=e.fn.radius(t),r=e.fn.variant({variant:"filled",color:n});return{closeButton:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:e.spacing.md,width:T(28),height:T(28),borderRadius:T(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:r.background,color:e.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:T(22),paddingRight:e.spacing.xs,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:T(6),top:a,bottom:a,left:T(4),borderRadius:a,backgroundColor:r.background},"&[data-with-icon]":{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:e.spacing.xs},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:T(2),overflow:"hidden",textOverflow:"ellipsis",color:e.colorScheme==="dark"?e.white:e.colors.gray[9]},description:{color:i?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}}),vfe=Object.defineProperty,kfe=Object.defineProperties,gfe=Object.getOwnPropertyDescriptors,Kk=Object.getOwnPropertySymbols,F8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,N2=(e,n,t)=>n in e?vfe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,b2=(e,n)=>{for(var t in n||(n={}))F8.call(n,t)&&N2(e,t,n[t]);if(Kk)for(var t of Kk(n))w8.call(n,t)&&N2(e,t,n[t]);return e},yfe=(e,n)=>kfe(e,gfe(n)),Sfe=(e,n)=>{var t={};for(var i in e)F8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Kk)for(var i of Kk(e))n.indexOf(i)<0&&w8.call(e,i)&&(t[i]=e[i]);return t};const Nfe={withCloseButton:!0},_8=S.forwardRef((e,n)=>{const t=ae("Notification",Nfe,e),{className:i,color:a,radius:r,loading:o,withCloseButton:l,withBorder:s,title:d,icon:c,children:u,onClose:f,closeButtonProps:p,classNames:h,styles:k,unstyled:y,variant:g}=t,v=Sfe(t,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:N,cx:x}=hfe({color:a,radius:r,withTitle:!!d},{name:"Notification",classNames:h,styles:k,unstyled:y,variant:g});return b.createElement(xe,b2({className:x(N.root,i),"data-with-icon":!!c||o||void 0,"data-with-border":s||void 0,role:"alert",ref:n},v),c&&!o&&b.createElement("div",{className:N.icon},c),o&&b.createElement(ti,{size:28,color:a,className:N.loader}),b.createElement("div",{className:N.body},d&&b.createElement(Ri,{className:N.title,size:"sm",weight:500},d),b.createElement(Ri,{color:"dimmed",className:N.description,size:"sm"},u)),l&&b.createElement(ms,yfe(b2({iconSize:16,color:"gray"},p),{onClick:f,className:N.closeButton})))});_8.displayName="@mantine/core/Notification";const bfe=(e,n,t)=>Number.isInteger(e)&&e>=0&&n===0?"numeric":!Number.isInteger(e)&&e>=0&&n!==0?"decimal":Number.isInteger(e)&&e<0&&n===0||!Number.isInteger(e)&&e<0&&n!==0?t==="ios"?"text":"decimal":"numeric";function x2({direction:e,size:n}){return b.createElement("svg",{style:{width:T(n),height:T(n),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const C8={xs:T(20),sm:T(24),md:T(30),lg:T(34),xl:T(36)};var xfe=me((e,{radius:n},{size:t})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${T(2)})`,margin:T(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(n),borderBottomRightRadius:e.fn.radius(n)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:q({size:t,sizes:C8}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:T(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}})),Ffe=Object.defineProperty,wfe=Object.defineProperties,_fe=Object.getOwnPropertyDescriptors,Xk=Object.getOwnPropertySymbols,P8=Object.prototype.hasOwnProperty,O8=Object.prototype.propertyIsEnumerable,F2=(e,n,t)=>n in e?Ffe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,R0=(e,n)=>{for(var t in n||(n={}))P8.call(n,t)&&F2(e,t,n[t]);if(Xk)for(var t of Xk(n))O8.call(n,t)&&F2(e,t,n[t]);return e},Cfe=(e,n)=>wfe(e,_fe(n)),Pfe=(e,n)=>{var t={};for(var i in e)P8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Xk)for(var i of Xk(e))n.indexOf(i)<0&&O8.call(e,i)&&(t[i]=e[i]);return t};const Ofe={type:"text",size:"sm",__staticSelector:"TextInput"},Ud=S.forwardRef((e,n)=>{const t=Qm("TextInput",Ofe,e),{inputProps:i,wrapperProps:a}=t,r=Pfe(t,["inputProps","wrapperProps"]);return b.createElement(it.Wrapper,R0({},a),b.createElement(it,Cfe(R0(R0({},i),r),{ref:n})))});Ud.displayName="@mantine/core/TextInput";var Dfe=Object.defineProperty,Efe=Object.defineProperties,$fe=Object.getOwnPropertyDescriptors,Qk=Object.getOwnPropertySymbols,D8=Object.prototype.hasOwnProperty,E8=Object.prototype.propertyIsEnumerable,w2=(e,n,t)=>n in e?Dfe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ife=(e,n)=>{for(var t in n||(n={}))D8.call(n,t)&&w2(e,t,n[t]);if(Qk)for(var t of Qk(n))E8.call(n,t)&&w2(e,t,n[t]);return e},jfe=(e,n)=>Efe(e,$fe(n)),Tfe=(e,n)=>{var t={};for(var i in e)D8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Qk)for(var i of Qk(e))n.indexOf(i)<0&&E8.call(e,i)&&(t[i]=e[i]);return t};const Afe=e=>e||"",Rfe=e=>{if(e==="-")return e;let n=e;n[0]==="."&&(n=`0${e}`);const t=parseFloat(n);return Number.isNaN(t)?"":e},_2={xs:T(10),sm:T(14),md:T(16),lg:T(18),xl:T(20)},Mfe={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Afe,parser:Rfe,type:"text"},fa=S.forwardRef((e,n)=>{const t=ae("NumberInput",Mfe,e),{readOnly:i,disabled:a,value:r,onChange:o,decimalSeparator:l,thousandsSeparator:s,min:d,max:c,startValue:u,step:f,stepHoldInterval:p,stepHoldDelay:h,onFocus:k,onBlur:y,onKeyDown:g,onKeyUp:v,hideControls:N,radius:x,variant:F,precision:_,removeTrailingZeros:w,defaultValue:C,noClampOnBlur:$,handlersRef:E,classNames:j,styles:D,size:M,rightSection:R,rightSectionWidth:I,formatter:L,parser:B,inputMode:O,unstyled:P,type:A}=t,V=Tfe(t,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:U,cx:oe}=xfe({radius:x},{classNames:j,styles:D,unstyled:P,name:"NumberInput",variant:F,size:M}),G=ke=>{if(ke==="")return"";let _e=ke.toFixed(_);return w&&_>0&&(_e=_e.replace(new RegExp(`[0]{0,${_}}$`),""),_e.endsWith(".")&&(_e=_e.slice(0,-1))),_e},ne=ke=>{let _e=ke;return l&&(_e=_e.replace(".",l)),L(_e)},Z=ke=>{let _e=ke;return l&&(_e=_e.replaceAll(s,"").replace(l,".")),B(_e)},ce=ke=>ne(G(ke)),[ie,ve]=S.useState(typeof r=="number"?r:typeof C=="number"?C:""),[he,ge]=S.useState(()=>ce(ie)),K=S.useRef(),[de,be]=S.useState(!1),Ee=(ke,_e)=>{if(!de||_e){const Ft=ce(ke);Ft!==he&&ge(Ft)}ke!==ie&&ve(ke)},Qe=typeof d=="number"?d:-1/0,$e=typeof c=="number"?c:1/0,z=S.useRef();z.current=()=>{var ke;let _e;ie===""?_e=(ke=u??d)!=null?ke:0:_e=parseFloat(G(Eu(ie+f,Qe,$e))),Ee(_e,!0),o==null||o(_e)};const H=S.useRef();H.current=()=>{var ke;let _e;ie===""?_e=(ke=u??d)!=null?ke:0:_e=parseFloat(G(Eu(ie-f,Qe,$e))),Ee(_e,!0),o==null||o(_e)},rS(E,{increment:z.current,decrement:H.current}),S.useEffect(()=>{de||Ee(r===void 0?ie:r,!0)},[r,de]);const W=h!==void 0&&p!==void 0,ee=S.useRef(null),J=S.useRef(0),Q=()=>{ee.current&&window.clearTimeout(ee.current),ee.current=null,J.current=0},Y=ke=>{ke?z.current():H.current(),J.current+=1},se=ke=>{if(Y(ke),W){const _e=typeof p=="number"?p:p(J.current);ee.current=window.setTimeout(()=>se(ke),_e)}},Ce=(ke,_e)=>{ke.preventDefault(),K.current.focus(),Y(_e),W&&(ee.current=window.setTimeout(()=>se(_e),h))};S.useEffect(()=>(Q(),Q),[]);const Ae=b.createElement("div",{className:U.rightSection},b.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie>=c,className:oe(U.control,U.controlUp),onPointerDown:ke=>{Ce(ke,!0)},onPointerUp:Q,onPointerLeave:Q},b.createElement(x2,{size:q({size:M,sizes:_2}),direction:"up"})),b.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie<=d,className:oe(U.control,U.controlDown),onPointerDown:ke=>{Ce(ke,!1)},onPointerUp:Q,onPointerLeave:Q},b.createElement(x2,{size:q({size:M,sizes:_2}),direction:"down"}))),Te=ke=>{let _e=ke;(_e[0]===`${l}`||_e[0]===".")&&(_e=`0${_e}`);const Ft=parseFloat(G(parseFloat(Z(_e)))),Nn=$?Ft:Eu(Ft,Qe,$e),vn=Number.isNaN(Nn)?"":Nn,It=ie!==vn;ge(ke),Ee(vn),It&&(o==null||o(vn))},cn=ke=>{ke.nativeEvent.isComposing||Te(ke.target.value)},nn=ke=>{be(!0),k==null||k(ke)},un=ke=>{be(!1),y==null||y(ke)},$n=ke=>{if(typeof g=="function"&&g(ke),ke.repeat&&W&&(ke.key==="ArrowUp"||ke.key==="ArrowDown")){ke.preventDefault();return}i||(ke.key==="ArrowUp"?Ce(ke,!0):ke.key==="ArrowDown"&&Ce(ke,!1))},qe=ke=>{typeof v=="function"&&v(ke),(ke.key==="ArrowUp"||ke.key==="ArrowDown")&&Q()};return b.createElement(Ud,jfe(Ife({},V),{type:A,variant:F,value:he,disabled:a,readOnly:i,ref:Br(K,n),onChange:cn,onFocus:nn,onBlur:un,onKeyDown:$n,onKeyUp:qe,rightSection:R||(a||i||N||F==="unstyled"?null:Ae),rightSectionWidth:I??`calc(${q({size:M,sizes:C8})} + ${T(1)})`,radius:x,max:c,min:d,step:f,size:M,styles:D,classNames:j,inputMode:O||bfe(f,_,jJ()),__staticSelector:"NumberInput",unstyled:P}))});fa.displayName="@mantine/core/NumberInput";const[Lfe,fS]=Ra("Pagination.Root component was not found in tree"),zfe={siblings:1,boundaries:1};function $8(e){const{total:n,value:t,defaultValue:i,onChange:a,disabled:r,children:o,siblings:l,boundaries:s,color:d,radius:c,onNextPage:u,onPreviousPage:f,onFirstPage:p,onLastPage:h,getItemProps:k,classNames:y,styles:g,unstyled:v,variant:N,size:x}=ae("PaginationRoot",zfe,e),{range:F,setPage:_,next:w,previous:C,active:$,first:E,last:j}=PJ({page:t,initialPage:i,onChange:a,total:n,siblings:l,boundaries:s}),D=Oi(u,w),M=Oi(f,C),R=Oi(p,E),I=Oi(h,j);return b.createElement(Lfe,{value:{total:n,range:F,active:$,disabled:r,color:d,radius:c,getItemProps:k,onChange:_,onNext:D,onPrevious:M,onFirst:R,onLast:I,stylesApi:{name:"Pagination",classNames:y,styles:g,unstyled:v,variant:N,size:x}}},o)}const vm={xs:T(22),sm:T(26),md:T(32),lg:T(38),xl:T(44)};var Bfe=me((e,{color:n,radius:t,withPadding:i},{size:a})=>{const r=e.fn.variant({color:n,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,height:q({size:a,sizes:vm}),minWidth:q({size:a,sizes:vm}),padding:i?`0 calc(${q({size:a,sizes:e.spacing})} / 2)`:void 0,fontSize:q({size:a,sizes:e.fontSizes}),borderRadius:e.fn.radius(t),lineHeight:1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,"&:not([data-disabled])":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]}),"&:active:not([data-disabled])":e.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:r.color,backgroundColor:r.background,"&:not([data-disabled])":e.fn.hover({backgroundColor:r.hover})}}}});const Vfe=Bfe;var Wfe=Object.defineProperty,Hfe=Object.defineProperties,Ufe=Object.getOwnPropertyDescriptors,Zk=Object.getOwnPropertySymbols,I8=Object.prototype.hasOwnProperty,j8=Object.prototype.propertyIsEnumerable,C2=(e,n,t)=>n in e?Wfe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Yfe=(e,n)=>{for(var t in n||(n={}))I8.call(n,t)&&C2(e,t,n[t]);if(Zk)for(var t of Zk(n))j8.call(n,t)&&C2(e,t,n[t]);return e},Gfe=(e,n)=>Hfe(e,Ufe(n)),qfe=(e,n)=>{var t={};for(var i in e)I8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Zk)for(var i of Zk(e))n.indexOf(i)<0&&j8.call(e,i)&&(t[i]=e[i]);return t};const Kfe={withPadding:!0},pS=S.forwardRef((e,n)=>{const t=ae("PaginationControl",Kfe,e),{active:i,className:a,disabled:r,withPadding:o}=t,l=qfe(t,["active","className","disabled","withPadding"]),s=fS(),{classes:d,cx:c}=Vfe({color:s.color,radius:s.radius,withPadding:o},s.stylesApi);return b.createElement(fi,Gfe(Yfe({},l),{disabled:r,"data-active":i||void 0,"data-disabled":r||void 0,ref:n,className:c(d.control,a)}))});pS.displayName="@mantine/core/PaginationControl";var Xfe=Object.defineProperty,Qfe=Object.defineProperties,Zfe=Object.getOwnPropertyDescriptors,Jk=Object.getOwnPropertySymbols,T8=Object.prototype.hasOwnProperty,A8=Object.prototype.propertyIsEnumerable,P2=(e,n,t)=>n in e?Xfe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ts=(e,n)=>{for(var t in n||(n={}))T8.call(n,t)&&P2(e,t,n[t]);if(Jk)for(var t of Jk(n))A8.call(n,t)&&P2(e,t,n[t]);return e},ef=(e,n)=>Qfe(e,Zfe(n)),Jfe=(e,n)=>{var t={};for(var i in e)T8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Jk)for(var i of Jk(e))n.indexOf(i)<0&&A8.call(e,i)&&(t[i]=e[i]);return t};function R8(e){return`calc(${q({size:e,sizes:vm})} / 2)`}function nf(e){var n=e,{size:t,style:i,children:a,path:r}=n,o=Jfe(n,["size","style","children","path"]);return b.createElement("svg",ts({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:ts({width:t,height:t},i)},o),b.createElement("path",{d:r,fill:"currentColor"}))}const epe=e=>b.createElement(nf,ef(ts({},e),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),npe=e=>b.createElement(nf,ef(ts({},e),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),tpe=e=>b.createElement(nf,ef(ts({},e),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),ipe=e=>b.createElement(nf,ef(ts({},e),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),ape=e=>b.createElement(nf,ef(ts({},e),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var rpe=me((e,n,{size:t})=>({dots:{height:q({size:t,sizes:vm}),minWidth:q({size:t,sizes:vm}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const ope=rpe;var lpe=Object.defineProperty,eg=Object.getOwnPropertySymbols,M8=Object.prototype.hasOwnProperty,L8=Object.prototype.propertyIsEnumerable,O2=(e,n,t)=>n in e?lpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,spe=(e,n)=>{for(var t in n||(n={}))M8.call(n,t)&&O2(e,t,n[t]);if(eg)for(var t of eg(n))L8.call(n,t)&&O2(e,t,n[t]);return e},dpe=(e,n)=>{var t={};for(var i in e)M8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&eg)for(var i of eg(e))n.indexOf(i)<0&&L8.call(e,i)&&(t[i]=e[i]);return t};const cpe={icon:ape},f_=S.forwardRef((e,n)=>{const t=ae("PaginationDots",cpe,e),{className:i,icon:a}=t,r=dpe(t,["className","icon"]),o=fS(),{classes:l,cx:s}=ope(null,o.stylesApi);return b.createElement(xe,spe({ref:n,className:s(l.dots,i)},r),b.createElement(a,{size:R8(o.stylesApi.size)}))});f_.displayName="@mantine/core/PaginationDots";var upe=Object.defineProperty,D2=Object.getOwnPropertySymbols,mpe=Object.prototype.hasOwnProperty,fpe=Object.prototype.propertyIsEnumerable,E2=(e,n,t)=>n in e?upe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ppe=(e,n)=>{for(var t in n||(n={}))mpe.call(n,t)&&E2(e,t,n[t]);if(D2)for(var t of D2(n))fpe.call(n,t)&&E2(e,t,n[t]);return e};function p_({dotsIcon:e}){const n=fS(),t=n.range.map((i,a)=>{var r;return i==="dots"?b.createElement(f_,{icon:e,key:a}):b.createElement(pS,ppe({key:a,active:i===n.active,"aria-current":i===n.active?"page":void 0,onClick:()=>n.onChange(i),disabled:n.disabled},(r=n.getItemProps)==null?void 0:r.call(n,i)),i)});return b.createElement(b.Fragment,null,t)}p_.displayName="@mantine/core/PaginationItems";var hpe=me(e=>({icon:{transform:e.dir==="rtl"?"rotate(180deg)":"unset"}})),vpe=Object.defineProperty,ng=Object.getOwnPropertySymbols,z8=Object.prototype.hasOwnProperty,B8=Object.prototype.propertyIsEnumerable,$2=(e,n,t)=>n in e?vpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,kpe=(e,n)=>{for(var t in n||(n={}))z8.call(n,t)&&$2(e,t,n[t]);if(ng)for(var t of ng(n))B8.call(n,t)&&$2(e,t,n[t]);return e},gpe=(e,n)=>{var t={};for(var i in e)z8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ng)for(var i of ng(e))n.indexOf(i)<0&&B8.call(e,i)&&(t[i]=e[i]);return t};function hS({icon:e,name:n,action:t,type:i}){const a={icon:e},r=S.forwardRef((o,l)=>{const s=ae(n,a,o),{icon:d}=s,c=gpe(s,["icon"]),{classes:u}=hpe(),f=fS(),p=i==="next"?f.active===f.total:f.active===1;return b.createElement(pS,kpe({disabled:f.disabled||p,ref:l,onClick:f[t],withPadding:!1},c),b.createElement(d,{className:u.icon,size:R8(f.stylesApi.size)}))});return r.displayName=`@mantine/core/${n}`,r}const V8=hS({icon:epe,name:"PaginationNext",action:"onNext",type:"next"}),W8=hS({icon:npe,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),H8=hS({icon:tpe,name:"PaginationFirst",action:"onFirst",type:"previous"}),U8=hS({icon:ipe,name:"PaginationLast",action:"onLast",type:"next"});var ype=Object.defineProperty,tg=Object.getOwnPropertySymbols,Y8=Object.prototype.hasOwnProperty,G8=Object.prototype.propertyIsEnumerable,I2=(e,n,t)=>n in e?ype(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Uc=(e,n)=>{for(var t in n||(n={}))Y8.call(n,t)&&I2(e,t,n[t]);if(tg)for(var t of tg(n))G8.call(n,t)&&I2(e,t,n[t]);return e},Spe=(e,n)=>{var t={};for(var i in e)Y8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&tg)for(var i of tg(e))n.indexOf(i)<0&&G8.call(e,i)&&(t[i]=e[i]);return t};const Npe={withControls:!0,siblings:1,boundaries:1};function ra(e){const n=ae("Pagination",Npe,e),{withEdges:t,withControls:i,classNames:a,styles:r,unstyled:o,variant:l,size:s,total:d,value:c,defaultValue:u,onChange:f,disabled:p,siblings:h,boundaries:k,color:y,radius:g,onNextPage:v,onPreviousPage:N,onFirstPage:x,onLastPage:F,getItemProps:_,getControlProps:w,spacing:C,nextIcon:$,previousIcon:E,lastIcon:j,firstIcon:D,dotsIcon:M}=n,R=Spe(n,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),I=vi();return d<=0?null:b.createElement($8,{classNames:a,styles:r,unstyled:o,variant:l,size:s,total:d,value:c,defaultValue:u,onChange:f,disabled:p,siblings:h,boundaries:k,color:y,radius:g,onNextPage:v,onPreviousPage:N,onFirstPage:x,onLastPage:F,getItemProps:_},b.createElement(Ok,Uc({spacing:C??`calc(${q({size:s,sizes:I.spacing})} / 2)`},R),t&&b.createElement(H8,Uc({icon:D},w==null?void 0:w("first"))),i&&b.createElement(W8,Uc({icon:E},w==null?void 0:w("previous"))),b.createElement(p_,{dotsIcon:M}),i&&b.createElement(V8,Uc({icon:$},w==null?void 0:w("next"))),t&&b.createElement(U8,Uc({icon:j},w==null?void 0:w("last")))))}ra.displayName="@mantine/core/Pagination";ra.Root=$8;ra.Items=p_;ra.Control=pS;ra.Dots=f_;ra.Next=V8;ra.Previous=W8;ra.Last=U8;ra.First=H8;const bpe=({reveal:e,size:n})=>b.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},b.createElement("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}));var xpe=Object.defineProperty,Fpe=Object.defineProperties,wpe=Object.getOwnPropertyDescriptors,j2=Object.getOwnPropertySymbols,_pe=Object.prototype.hasOwnProperty,Cpe=Object.prototype.propertyIsEnumerable,T2=(e,n,t)=>n in e?xpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,M0=(e,n)=>{for(var t in n||(n={}))_pe.call(n,t)&&T2(e,t,n[t]);if(j2)for(var t of j2(n))Cpe.call(n,t)&&T2(e,t,n[t]);return e},A2=(e,n)=>Fpe(e,wpe(n)),Ppe=me((e,{rightSectionWidth:n},{size:t})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:A2(M0(M0({},e.fn.fontStyles()),e.fn.cover(0)),{backgroundColor:"transparent",border:`${T(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${T(n)})`,paddingLeft:`calc(${q({size:t,sizes:Un})}  / 3)`,fontSize:q({size:t,sizes:e.fontSizes}),height:`calc(${q({size:t,sizes:Un})} - ${T(2)})`,lineHeight:`calc(${q({size:t,sizes:Un})} - ${T(4)})`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"&::placeholder":A2(M0({},e.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:e.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:e.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:q({size:t,sizes:Un})}})})),Ope=Object.defineProperty,Dpe=Object.defineProperties,Epe=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,q8=Object.prototype.hasOwnProperty,K8=Object.prototype.propertyIsEnumerable,R2=(e,n,t)=>n in e?Ope(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,op=(e,n)=>{for(var t in n||(n={}))q8.call(n,t)&&R2(e,t,n[t]);if(ig)for(var t of ig(n))K8.call(n,t)&&R2(e,t,n[t]);return e},$pe=(e,n)=>Dpe(e,Epe(n)),Ipe=(e,n)=>{var t={};for(var i in e)q8.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ig)for(var i of ig(e))n.indexOf(i)<0&&K8.call(e,i)&&(t[i]=e[i]);return t};const jpe={xs:T(22),sm:T(26),md:T(28),lg:T(32),xl:T(40)},Tpe={xs:T(12),sm:T(15),md:T(17),lg:T(19),xl:T(21)},Ape={xs:T(28),sm:T(32),md:T(34),lg:T(44),xl:T(54)},Rpe={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:bpe,__staticSelector:"PasswordInput"},X8=S.forwardRef((e,n)=>{const t=ae("PasswordInput",Rpe,e),{radius:i,disabled:a,size:r,toggleTabIndex:o,className:l,id:s,label:d,error:c,required:u,style:f,icon:p,description:h,wrapperProps:k,classNames:y,styles:g,variant:v,visibilityToggleIcon:N,__staticSelector:x,sx:F,labelProps:_,descriptionProps:w,errorProps:C,unstyled:$,visibilityToggleLabel:E,withAsterisk:j,inputContainer:D,iconWidth:M,inputWrapperOrder:R,visible:I,defaultVisible:L,onVisibilityChange:B}=t,O=Ipe(t,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),P=q({size:r,sizes:Ape}),{classes:A}=Ppe({rightSectionWidth:P},{name:"PasswordInput",classNames:y,styles:g,unstyled:$,size:r,variant:v}),V=zr(s),{systemStyles:U,rest:oe}=il(O),[G,ne]=vt({value:I,defaultValue:L,finalValue:!1,onChange:B}),Z=()=>ne(!G),ce=b.createElement(Pe,{className:A.visibilityToggle,tabIndex:o,radius:i,size:q({size:r,sizes:jpe}),"aria-hidden":!E,"aria-label":E,unstyled:$,onMouseDown:ie=>{ie.preventDefault(),Z()},onKeyDown:ie=>{ie.key===" "&&(ie.preventDefault(),Z())}},b.createElement(N,{reveal:G,size:q({size:r,sizes:Tpe})}));return b.createElement(it.Wrapper,op(op({required:u,id:V,label:d,error:c,description:h,size:r,className:l,style:f,classNames:y,styles:g,__staticSelector:x,sx:F,errorProps:C,descriptionProps:w,labelProps:_,unstyled:$,withAsterisk:j,inputWrapperOrder:R,inputContainer:D,variant:v},U),k),b.createElement(it,{component:"div",error:c,icon:p,size:r,classNames:$pe(op({},y),{input:A.input}),styles:g,radius:i,disabled:a,__staticSelector:x,rightSectionWidth:P,rightSection:!a&&ce,variant:v,unstyled:$,iconWidth:M},b.createElement("input",op({type:G?"text":"password",required:u,"data-invalid":!!c||void 0,"data-with-icon":!!p||void 0,className:A.innerInput,disabled:a,id:V,ref:n,autoComplete:"off"},oe))))});X8.displayName="@mantine/core/PasswordInput";const Q8=S.createContext(!1),Mpe=Q8.Provider,Lpe=()=>S.useContext(Q8);function Z8({children:e,openDelay:n=0,closeDelay:t=0}){return b.createElement(Mpe,{value:!0},b.createElement(bae,{delay:{open:n,close:t}},e))}Z8.displayName="@mantine/core/TooltipGroup";var zpe=Object.defineProperty,Bpe=Object.defineProperties,Vpe=Object.getOwnPropertyDescriptors,M2=Object.getOwnPropertySymbols,Wpe=Object.prototype.hasOwnProperty,Hpe=Object.prototype.propertyIsEnumerable,L2=(e,n,t)=>n in e?zpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,z2=(e,n)=>{for(var t in n||(n={}))Wpe.call(n,t)&&L2(e,t,n[t]);if(M2)for(var t of M2(n))Hpe.call(n,t)&&L2(e,t,n[t]);return e},Upe=(e,n)=>Bpe(e,Vpe(n));function Ype(e,n){if(!n)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const t=e.fn.variant({variant:"filled",color:n,primaryFallback:!1});return{backgroundColor:t.background,color:t.color}}var J8=me((e,{color:n,radius:t,width:i,multiline:a})=>({tooltip:Upe(z2(z2({},e.fn.fontStyles()),Ype(e,n)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(t),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:a?"unset":"nowrap",pointerEvents:"none",width:i}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const eB={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function Gpe({offset:e,position:n}){const[t,i]=S.useState(!1),a=S.useRef(),{x:r,y:o,reference:l,floating:s,refs:d,update:c,placement:u}=t_({placement:n,middleware:[Jw({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=u.includes("right")?e:n.includes("left")?e*-1:0,p=u.includes("bottom")?e:n.includes("top")?e*-1:0,h=S.useCallback(({clientX:k,clientY:y})=>{l({getBoundingClientRect(){return{width:0,height:0,x:k,y,left:k+f,top:y+p,right:k,bottom:y}}})},[l]);return S.useEffect(()=>{if(d.floating.current){const k=a.current;k.addEventListener("mousemove",h);const y=Er(d.floating.current);return y.forEach(g=>{g.addEventListener("scroll",c)}),()=>{k.removeEventListener("mousemove",h),y.forEach(g=>{g.removeEventListener("scroll",c)})}}},[l,d.floating.current,c,h,t]),{handleMouseMove:h,x:r,y:o,opened:t,setOpened:i,boundaryRef:a,floating:s}}var qpe=Object.defineProperty,Kpe=Object.defineProperties,Xpe=Object.getOwnPropertyDescriptors,ag=Object.getOwnPropertySymbols,nB=Object.prototype.hasOwnProperty,tB=Object.prototype.propertyIsEnumerable,B2=(e,n,t)=>n in e?qpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,lp=(e,n)=>{for(var t in n||(n={}))nB.call(n,t)&&B2(e,t,n[t]);if(ag)for(var t of ag(n))tB.call(n,t)&&B2(e,t,n[t]);return e},sp=(e,n)=>Kpe(e,Xpe(n)),Qpe=(e,n)=>{var t={};for(var i in e)nB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ag)for(var i of ag(e))n.indexOf(i)<0&&tB.call(e,i)&&(t[i]=e[i]);return t};const Zpe={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ma("popover")};function iB(e){var n;const t=ae("TooltipFloating",Zpe,e),{children:i,refProp:a,withinPortal:r,portalProps:o,style:l,className:s,classNames:d,styles:c,unstyled:u,radius:f,color:p,label:h,offset:k,position:y,multiline:g,width:v,zIndex:N,disabled:x,variant:F}=t,_=Qpe(t,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:w,x:C,y:$,opened:E,boundaryRef:j,floating:D,setOpened:M}=Gpe({offset:k,position:y}),{classes:R,cx:I}=J8({radius:f,color:p,multiline:g,width:v},{name:"TooltipFloating",classNames:d,styles:c,unstyled:u,variant:F});if(!sc(i))throw new Error(eB.children);const L=Br(j,i.ref),B=P=>{var A,V;(V=(A=i.props).onMouseEnter)==null||V.call(A,P),w(P),M(!0)},O=P=>{var A,V;(V=(A=i.props).onMouseLeave)==null||V.call(A,P),M(!1)};return b.createElement(b.Fragment,null,b.createElement(uc,sp(lp({},o),{withinPortal:r}),b.createElement(xe,sp(lp({},_),{ref:D,className:I(R.tooltip,s),style:sp(lp({},l),{zIndex:N,display:!x&&E?"block":"none",top:$??"",left:(n=Math.round(C))!=null?n:""})}),h)),S.cloneElement(i,sp(lp({},i.props),{[a]:L,onMouseEnter:B,onMouseLeave:O})))}iB.displayName="@mantine/core/TooltipFloating";function Jpe(e){const[n,t]=S.useState(!1),a=typeof e.opened=="boolean"?e.opened:n,r=Lpe(),o=zr(),{delay:l,currentId:s,setCurrentId:d}=x4(),c=S.useCallback(C=>{t(C),C&&d(o)},[d,o]),{x:u,y:f,reference:p,floating:h,context:k,refs:y,update:g,placement:v,middlewareData:{arrow:{x:N,y:x}={}}}=t_({placement:e.position,open:a,onOpenChange:c,middleware:[o4(e.offset),Jw({padding:8}),v4(),g4({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[k4()]:[]]}),{getReferenceProps:F,getFloatingProps:_}=jae([Nae(k,{enabled:e.events.hover,delay:r?l:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),$ae(k,{enabled:e.events.focus,keyboardOnly:!0}),Iae(k,{role:"tooltip"}),Eae(k,{enabled:typeof e.opened===void 0}),xae(k,{id:o})]);return w4({opened:a,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:y,update:g}}),Et(()=>{var C;(C=e.onPositionChange)==null||C.call(e,v)},[v]),{x:u,y:f,arrowX:N,arrowY:x,reference:p,floating:h,getFloatingProps:_,getReferenceProps:F,isGroupPhase:a&&s&&s!==o,opened:a,placement:v}}var ehe=Object.defineProperty,nhe=Object.defineProperties,the=Object.getOwnPropertyDescriptors,rg=Object.getOwnPropertySymbols,aB=Object.prototype.hasOwnProperty,rB=Object.prototype.propertyIsEnumerable,V2=(e,n,t)=>n in e?ehe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,hl=(e,n)=>{for(var t in n||(n={}))aB.call(n,t)&&V2(e,t,n[t]);if(rg)for(var t of rg(n))rB.call(n,t)&&V2(e,t,n[t]);return e},L0=(e,n)=>nhe(e,the(n)),ihe=(e,n)=>{var t={};for(var i in e)aB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&rg)for(var i of rg(e))n.indexOf(i)<0&&rB.call(e,i)&&(t[i]=e[i]);return t};const ahe={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Ma("popover"),positionDependencies:[]},vS=S.forwardRef((e,n)=>{var t;const i=S.useRef(null),a=ae("Tooltip",ahe,e),{children:r,position:o,refProp:l,label:s,openDelay:d,closeDelay:c,onPositionChange:u,opened:f,withinPortal:p,portalProps:h,radius:k,color:y,classNames:g,styles:v,unstyled:N,style:x,className:F,withArrow:_,arrowSize:w,arrowOffset:C,arrowRadius:$,arrowPosition:E,offset:j,transitionProps:D,multiline:M,width:R,events:I,zIndex:L,disabled:B,positionDependencies:O,onClick:P,onMouseEnter:A,onMouseLeave:V,inline:U,variant:oe,keepMounted:G}=a,ne=ihe(a,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:Z,cx:ce,theme:ie}=J8({radius:k,color:y,width:R,multiline:M},{name:"Tooltip",classNames:g,styles:v,unstyled:N,variant:oe}),ve=Jpe({position:A4(ie.dir,o),closeDelay:c,openDelay:d,onPositionChange:u,opened:f,events:I,arrowRef:i,arrowOffset:C,offset:j+(_?w/2:0),positionDependencies:[...O,r],inline:U});if(!sc(r))throw new Error(eB.children);const he=Br(ve.reference,r.ref,n);return b.createElement(b.Fragment,null,b.createElement(uc,L0(hl({},h),{withinPortal:p}),b.createElement(fc,L0(hl({keepMounted:G,mounted:!B&&ve.opened},D),{transition:D.transition||"fade",duration:ve.isGroupPhase?10:(t=D.duration)!=null?t:100}),ge=>{var K,de;return b.createElement(xe,hl(hl({},ne),ve.getFloatingProps({ref:ve.floating,className:Z.tooltip,style:L0(hl(hl({},x),ge),{zIndex:L,top:(K=ve.y)!=null?K:0,left:(de=ve.x)!=null?de:0})})),s,b.createElement(a_,{ref:i,arrowX:ve.arrowX,arrowY:ve.arrowY,visible:_,position:ve.placement,arrowSize:w,arrowOffset:C,arrowRadius:$,arrowPosition:E,className:Z.arrow}))})),S.cloneElement(r,ve.getReferenceProps(hl({onClick:P,onMouseEnter:A,onMouseLeave:V,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[l]:he,className:ce(F,r.props.className)},r.props))))});vS.Group=Z8;vS.Floating=iB;vS.displayName="@mantine/core/Tooltip";const tt=vS;function rhe({data:e,searchable:n,limit:t,searchValue:i,filter:a,value:r,filterDataOnExactSearchMatch:o}){if(!n)return e;const l=r!=null&&e.find(d=>d.value===r)||null;if(l&&!o&&(l==null?void 0:l.label)===i){if(t){if(t>=e.length)return e;const d=e.indexOf(l),c=d+t,u=c-e.length;return u>0?e.slice(d-u):e.slice(d,c)}return e}const s=[];for(let d=0;d<e.length&&(a(i,e[d])&&s.push(e[d]),!(s.length>=t));d+=1);return s}var ohe=me(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}})),lhe=Object.defineProperty,she=Object.defineProperties,dhe=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,oB=Object.prototype.hasOwnProperty,lB=Object.prototype.propertyIsEnumerable,W2=(e,n,t)=>n in e?lhe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Yc=(e,n)=>{for(var t in n||(n={}))oB.call(n,t)&&W2(e,t,n[t]);if(og)for(var t of og(n))lB.call(n,t)&&W2(e,t,n[t]);return e},z0=(e,n)=>she(e,dhe(n)),che=(e,n)=>{var t={};for(var i in e)oB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&og)for(var i of og(e))n.indexOf(i)<0&&lB.call(e,i)&&(t[i]=e[i]);return t};function uhe(e,n){return n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function mhe(e,n){return!!e&&!n.some(t=>t.label.toLowerCase()===e.toLowerCase())}const fhe={required:!1,size:"sm",shadow:"sm",itemComponent:Ww,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:uhe,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:mhe,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ma("popover"),positionDependencies:[],dropdownPosition:"flip"},Gn=S.forwardRef((e,n)=>{const t=Qm("Select",fhe,e),{inputProps:i,wrapperProps:a,shadow:r,data:o,value:l,defaultValue:s,onChange:d,itemComponent:c,onKeyDown:u,onBlur:f,onFocus:p,transitionProps:h,initiallyOpened:k,unstyled:y,classNames:g,styles:v,filter:N,maxDropdownHeight:x,searchable:F,clearable:_,nothingFound:w,limit:C,disabled:$,onSearchChange:E,searchValue:j,rightSection:D,rightSectionWidth:M,creatable:R,getCreateLabel:I,shouldCreate:L,selectOnBlur:B,onCreate:O,dropdownComponent:P,onDropdownClose:A,onDropdownOpen:V,withinPortal:U,portalProps:oe,switchDirectionOnFlip:G,zIndex:ne,name:Z,dropdownPosition:ce,allowDeselect:ie,placeholder:ve,filterDataOnExactSearchMatch:he,form:ge,positionDependencies:K,readOnly:de,clearButtonProps:be,hoverOnSearchChange:Ee}=t,Qe=che(t,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:$e,cx:z,theme:H}=ohe(),[W,ee]=S.useState(k),[J,Q]=S.useState(-1),Y=S.useRef(),se=S.useRef({}),[Ce,Ae]=S.useState("column"),Te=Ce==="column",{scrollIntoView:cn,targetRef:nn,scrollableRef:un}=BL({duration:0,offset:5,cancelable:!1,isList:!0}),$n=ie===void 0?_:ie,qe=Fe=>{if(W!==Fe){ee(Fe);const fn=Fe?V:A;typeof fn=="function"&&fn()}},ke=R&&typeof I=="function";let _e=null;const Ft=o.map(Fe=>typeof Fe=="string"?{label:Fe,value:Fe}:Fe),Nn=dL({data:Ft}),[vn,It,mn]=vt({value:l,defaultValue:s,finalValue:null,onChange:d}),Xn=Nn.find(Fe=>Fe.value===vn),[gi,Cc]=vt({value:j,defaultValue:(Xn==null?void 0:Xn.label)||"",finalValue:void 0,onChange:E}),ii=Fe=>{Cc(Fe),F&&typeof E=="function"&&E(Fe)},jt=()=>{var Fe;de||(It(null),mn||ii(""),(Fe=Y.current)==null||Fe.focus())};S.useEffect(()=>{const Fe=Nn.find(fn=>fn.value===vn);Fe?ii(Fe.label):(!ke||!vn)&&ii("")},[vn]),S.useEffect(()=>{Xn&&(!F||!W)&&ii(Xn.label)},[Xn==null?void 0:Xn.label]);const Wn=Fe=>{if(!de)if($n&&(Xn==null?void 0:Xn.value)===Fe.value)It(null),qe(!1);else{if(Fe.creatable&&typeof O=="function"){const fn=O(Fe.value);typeof fn<"u"&&fn!==null&&It(typeof fn=="string"?fn:fn.value)}else It(Fe.value);mn||ii(Fe.label),Q(-1),qe(!1),Y.current.focus()}},Qn=rhe({data:Nn,searchable:F,limit:C,searchValue:gi,filter:N,filterDataOnExactSearchMatch:he,value:vn});ke&&L(gi,Qn)&&(_e=I(gi),Qn.push({label:gi,value:gi,creatable:!0}));const da=(Fe,fn,wt)=>{let He=Fe;for(;wt(He);)if(He=fn(He),!Qn[He].disabled)return He;return Fe};Et(()=>{Q(Ee&&gi?0:-1)},[gi,Ee]);const Kr=vn?Qn.findIndex(Fe=>Fe.value===vn):0,yi=!de&&(Qn.length>0?W:W&&!!w),Si=()=>{Q(Fe=>{var fn;const wt=da(Fe,He=>He-1,He=>He>0);return nn.current=se.current[(fn=Qn[wt])==null?void 0:fn.value],yi&&cn({alignment:Te?"start":"end"}),wt})},cl=()=>{Q(Fe=>{var fn;const wt=da(Fe,He=>He+1,He=>He<Qn.length-1);return nn.current=se.current[(fn=Qn[wt])==null?void 0:fn.value],yi&&cn({alignment:Te?"end":"start"}),wt})},xs=()=>window.setTimeout(()=>{var Fe;nn.current=se.current[(Fe=Qn[Kr])==null?void 0:Fe.value],cn({alignment:Te?"end":"start"})},50);Et(()=>{yi&&xs()},[yi]);const ff=Fe=>{switch(typeof u=="function"&&u(Fe),Fe.key){case"ArrowUp":{Fe.preventDefault(),W?Te?Si():cl():(Q(Kr),qe(!0),xs());break}case"ArrowDown":{Fe.preventDefault(),W?Te?cl():Si():(Q(Kr),qe(!0),xs());break}case"Home":{if(!F){Fe.preventDefault(),W||qe(!0);const fn=Qn.findIndex(wt=>!wt.disabled);Q(fn),yi&&cn({alignment:Te?"end":"start"})}break}case"End":{if(!F){Fe.preventDefault(),W||qe(!0);const fn=Qn.map(wt=>!!wt.disabled).lastIndexOf(!1);Q(fn),yi&&cn({alignment:Te?"end":"start"})}break}case"Escape":{Fe.preventDefault(),qe(!1),Q(-1);break}case" ":{F||(Fe.preventDefault(),Qn[J]&&W?Wn(Qn[J]):(qe(!0),Q(Kr),xs()));break}case"Enter":F||Fe.preventDefault(),Qn[J]&&W&&(Fe.preventDefault(),Wn(Qn[J]))}},Fs=Fe=>{typeof f=="function"&&f(Fe);const fn=Nn.find(wt=>wt.value===vn);B&&Qn[J]&&W&&Wn(Qn[J]),ii((fn==null?void 0:fn.label)||""),qe(!1)},pf=Fe=>{typeof p=="function"&&p(Fe),F&&qe(!0)},BS=Fe=>{de||(ii(Fe.currentTarget.value),_&&Fe.currentTarget.value===""&&It(null),Q(-1),qe(!0))},hf=()=>{de||(qe(!W),vn&&!W&&Q(Kr))};return b.createElement(it.Wrapper,z0(Yc({},a),{__staticSelector:"Select"}),b.createElement(Lo,{opened:yi,transitionProps:h,shadow:r,withinPortal:U,portalProps:oe,__staticSelector:"Select",onDirectionChange:Ae,switchDirectionOnFlip:G,zIndex:ne,dropdownPosition:ce,positionDependencies:[...K,gi],classNames:g,styles:v,unstyled:y,variant:i.variant},b.createElement(Lo.Target,null,b.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":yi?`${i.id}-items`:null,"aria-controls":i.id,"aria-expanded":yi,onMouseLeave:()=>Q(-1),tabIndex:-1},b.createElement("input",{type:"hidden",name:Z,value:vn||"",form:ge,disabled:$}),b.createElement(it,Yc(z0(Yc(Yc({autoComplete:"off",type:"search"},i),Qe),{ref:Br(n,Y),onKeyDown:ff,__staticSelector:"Select",value:gi,placeholder:ve,onChange:BS,"aria-autocomplete":"list","aria-controls":yi?`${i.id}-items`:null,"aria-activedescendant":J>=0?`${i.id}-${J}`:null,onMouseDown:hf,onBlur:Fs,onFocus:pf,readOnly:!F||de,disabled:$,"data-mantine-stop-propagation":yi,name:null,classNames:z0(Yc({},g),{input:z({[$e.input]:!F},g==null?void 0:g.input)})}),g8({theme:H,rightSection:D,rightSectionWidth:M,styles:v,size:i.size,shouldClear:_&&!!Xn,onClear:jt,error:a.error,clearButtonProps:be,disabled:$,readOnly:de}))))),b.createElement(Lo.Dropdown,{component:P||cS,maxHeight:x,direction:Ce,id:i.id,innerRef:un,__staticSelector:"Select",classNames:g,styles:v},b.createElement(Vw,{data:Qn,hovered:J,classNames:g,styles:v,isItemSelected:Fe=>Fe===vn,uuid:i.id,__staticSelector:"Select",onItemHover:Q,onItemSelect:Wn,itemsRefs:se,itemComponent:c,size:i.size,nothingFound:w,creatable:ke&&!!_e,createLabel:_e,"aria-label":a.label,unstyled:y,variant:i.variant}))))});Gn.displayName="@mantine/core/Select";function h_(e,n){if(n.length===0)return n;const t="maxWidth"in n[0]?"maxWidth":"minWidth",i=[...n].sort((a,r)=>Da(q({size:r[t],sizes:e.breakpoints}))-Da(q({size:a[t],sizes:e.breakpoints})));return t==="minWidth"?i.reverse():i}var phe=Object.defineProperty,H2=Object.getOwnPropertySymbols,hhe=Object.prototype.hasOwnProperty,vhe=Object.prototype.propertyIsEnumerable,U2=(e,n,t)=>n in e?phe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,khe=(e,n)=>{for(var t in n||(n={}))hhe.call(n,t)&&U2(e,t,n[t]);if(H2)for(var t of H2(n))vhe.call(n,t)&&U2(e,t,n[t]);return e},ghe=me((e,{spacing:n,breakpoints:t,cols:i,verticalSpacing:a})=>{const r=a!=null,o=h_(e,t).reduce((l,s)=>{var d,c;const u="maxWidth"in s?"max-width":"min-width",f=q({size:u==="max-width"?s.maxWidth:s.minWidth,sizes:e.breakpoints,units:"em"}),p=Da(f)-(u==="max-width"?1:0);return l[`@media (${u}: ${dc(p)})`]={gridTemplateColumns:`repeat(${s.cols}, minmax(0, 1fr))`,gap:`${q({size:(d=s.verticalSpacing)!=null?d:r?a:n,sizes:e.spacing})} ${q({size:(c=s.spacing)!=null?c:n,sizes:e.spacing})}`},l},{});return{root:khe({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${i}, minmax(0, 1fr))`,gap:`${q({size:r?a:n,sizes:e.spacing})} ${q({size:n,sizes:e.spacing})}`},o)}}),yhe=Object.defineProperty,lg=Object.getOwnPropertySymbols,sB=Object.prototype.hasOwnProperty,dB=Object.prototype.propertyIsEnumerable,Y2=(e,n,t)=>n in e?yhe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,She=(e,n)=>{for(var t in n||(n={}))sB.call(n,t)&&Y2(e,t,n[t]);if(lg)for(var t of lg(n))dB.call(n,t)&&Y2(e,t,n[t]);return e},Nhe=(e,n)=>{var t={};for(var i in e)sB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&lg)for(var i of lg(e))n.indexOf(i)<0&&dB.call(e,i)&&(t[i]=e[i]);return t};const bhe={breakpoints:[],cols:1,spacing:"md"},kS=S.forwardRef((e,n)=>{const t=ae("SimpleGrid",bhe,e),{className:i,breakpoints:a,cols:r,spacing:o,verticalSpacing:l,children:s,unstyled:d,variant:c}=t,u=Nhe(t,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:f,cx:p}=ghe({breakpoints:a,cols:r,spacing:o,verticalSpacing:l},{name:"SimpleGrid",unstyled:d,variant:c});return b.createElement(xe,She({className:p(f.root,i),ref:n},u),s)});kS.displayName="@mantine/core/SimpleGrid";const cB=S.createContext(null),xhe=cB.Provider,Fhe=()=>S.useContext(cB);var whe=Object.defineProperty,sg=Object.getOwnPropertySymbols,uB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,G2=(e,n,t)=>n in e?whe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,q2=(e,n)=>{for(var t in n||(n={}))uB.call(n,t)&&G2(e,t,n[t]);if(sg)for(var t of sg(n))mB.call(n,t)&&G2(e,t,n[t]);return e},_he=(e,n)=>{var t={};for(var i in e)uB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&sg)for(var i of sg(e))n.indexOf(i)<0&&mB.call(e,i)&&(t[i]=e[i]);return t};const Che={size:"sm"},fB=S.forwardRef((e,n)=>{const t=ae("SwitchGroup",Che,e),{children:i,value:a,defaultValue:r,onChange:o,size:l,wrapperProps:s}=t,d=_he(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,u]=vt({value:a,defaultValue:r,finalValue:[],onChange:o}),f=p=>{const h=p.currentTarget.value;u(c.includes(h)?c.filter(k=>k!==h):[...c,h])};return b.createElement(xhe,{value:{value:c,onChange:f,size:l}},b.createElement(it.Wrapper,q2(q2({labelElement:"div",size:l,__staticSelector:"SwitchGroup",ref:n},s),d),i))});fB.displayName="@mantine/core/SwitchGroup";var Phe=Object.defineProperty,Ohe=Object.defineProperties,Dhe=Object.getOwnPropertyDescriptors,K2=Object.getOwnPropertySymbols,Ehe=Object.prototype.hasOwnProperty,$he=Object.prototype.propertyIsEnumerable,X2=(e,n,t)=>n in e?Phe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ihe=(e,n)=>{for(var t in n||(n={}))Ehe.call(n,t)&&X2(e,t,n[t]);if(K2)for(var t of K2(n))$he.call(n,t)&&X2(e,t,n[t]);return e},jhe=(e,n)=>Ohe(e,Dhe(n));const The={xs:T(16),sm:T(20),md:T(24),lg:T(30),xl:T(36)},Ahe={xs:T(32),sm:T(38),md:T(46),lg:T(56),xl:T(72)},Rhe={xs:T(12),sm:T(14),md:T(18),lg:T(22),xl:T(28)},Mhe={xs:T(5),sm:T(6),md:T(7),lg:T(9),xl:T(11)},Lhe={xs:T(4),sm:T(5),md:T(6),lg:T(8),xl:T(10)};var zhe=me((e,{radius:n,color:t,labelPosition:i,error:a},{size:r})=>{const o=q({size:r,sizes:Rhe}),l=q({size:n,sizes:e.radius}),s=e.fn.variant({variant:"filled",color:t}),d=q({size:r,sizes:Ahe}),c=T(r==="xs"?1:2),u=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:jhe(Ihe({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:l,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${T(1)} solid ${a?u:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:q({size:r,sizes:The}),minWidth:d,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:q({size:r,sizes:Mhe}),fontWeight:600,order:i==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:s.background,borderColor:s.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:l,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:o,width:o,border:`${T(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:c,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${o} - ${c})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${d} - ${o})`,paddingInline:q({size:r,sizes:Lhe}),marginLeft:`calc(${o} + ${c})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${o} + ${c})`}}}}),Bhe=Object.defineProperty,Vhe=Object.defineProperties,Whe=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,pB=Object.prototype.hasOwnProperty,hB=Object.prototype.propertyIsEnumerable,Q2=(e,n,t)=>n in e?Bhe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,B0=(e,n)=>{for(var t in n||(n={}))pB.call(n,t)&&Q2(e,t,n[t]);if(dg)for(var t of dg(n))hB.call(n,t)&&Q2(e,t,n[t]);return e},Hhe=(e,n)=>Vhe(e,Whe(n)),Uhe=(e,n)=>{var t={};for(var i in e)pB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&dg)for(var i of dg(e))n.indexOf(i)<0&&hB.call(e,i)&&(t[i]=e[i]);return t};const Yhe={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Di=S.forwardRef((e,n)=>{var t;const i=ae("Switch",Yhe,e),{className:a,color:r,label:o,offLabel:l,onLabel:s,id:d,style:c,size:u,radius:f,wrapperProps:p,children:h,unstyled:k,styles:y,classNames:g,thumbIcon:v,sx:N,checked:x,defaultChecked:F,onChange:_,labelPosition:w,description:C,error:$,disabled:E,variant:j}=i,D=Uhe(i,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),M=Fhe(),R=(M==null?void 0:M.size)||u,{classes:I,cx:L}=zhe({color:r,radius:f,labelPosition:w,error:!!$},{name:"Switch",classNames:g,styles:y,unstyled:k,size:R,variant:j}),{systemStyles:B,rest:O}=il(D),P=zr(d),A=M?{checked:M.value.includes(O.value),onChange:M.onChange}:{},[V,U]=vt({value:(t=A.checked)!=null?t:x,defaultValue:F,finalValue:!1});return b.createElement(c_,B0(B0({className:L(a,I.root),sx:N,style:c,id:P,size:(M==null?void 0:M.size)||u,labelPosition:w,label:o,description:C,error:$,disabled:E,__staticSelector:"Switch",classNames:g,styles:y,unstyled:k,"data-checked":A.checked||void 0,variant:j},B),p),b.createElement("input",Hhe(B0({},O),{disabled:E,checked:V,onChange:oe=>{M?A.onChange(oe):_==null||_(oe),U(oe.currentTarget.checked)},id:P,ref:n,type:"checkbox",className:I.input})),b.createElement("label",{htmlFor:P,className:I.track},b.createElement("div",{className:I.thumb},v),b.createElement("div",{className:I.trackLabel},V?s:l)))});Di.displayName="@mantine/core/Switch";Di.Group=fB;var Ghe=Object.defineProperty,qhe=Object.defineProperties,Khe=Object.getOwnPropertyDescriptors,Z2=Object.getOwnPropertySymbols,Xhe=Object.prototype.hasOwnProperty,Qhe=Object.prototype.propertyIsEnumerable,J2=(e,n,t)=>n in e?Ghe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Zhe=(e,n)=>{for(var t in n||(n={}))Xhe.call(n,t)&&J2(e,t,n[t]);if(Z2)for(var t of Z2(n))Qhe.call(n,t)&&J2(e,t,n[t]);return e},Jhe=(e,n)=>qhe(e,Khe(n)),eve=me((e,{captionSide:n,horizontalSpacing:t,verticalSpacing:i,fontSize:a,withBorder:r,withColumnBorders:o})=>{const l=`${T(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:Jhe(Zhe({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:n,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:r?l:void 0,"& > caption":{marginTop:n==="top"?0:e.spacing.xs,marginBottom:n==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:q({size:a,sizes:e.fontSizes}),padding:`${q({size:i,sizes:e.spacing})} ${q({size:t,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:l},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:l},"& > tbody > tr > td":{padding:`${q({size:i,sizes:e.spacing})} ${q({size:t,sizes:e.spacing})}`,borderTop:l,fontSize:q({size:a,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:o?l:"none","&:last-of-type":{borderRight:"none",borderLeft:o?l:"none"}},"& > tbody > tr > th":{borderRight:o?l:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}}),nve=Object.defineProperty,tve=Object.defineProperties,ive=Object.getOwnPropertyDescriptors,cg=Object.getOwnPropertySymbols,vB=Object.prototype.hasOwnProperty,kB=Object.prototype.propertyIsEnumerable,e$=(e,n,t)=>n in e?nve(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ave=(e,n)=>{for(var t in n||(n={}))vB.call(n,t)&&e$(e,t,n[t]);if(cg)for(var t of cg(n))kB.call(n,t)&&e$(e,t,n[t]);return e},rve=(e,n)=>tve(e,ive(n)),ove=(e,n)=>{var t={};for(var i in e)vB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&cg)for(var i of cg(e))n.indexOf(i)<0&&kB.call(e,i)&&(t[i]=e[i]);return t};const lve={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},al=S.forwardRef((e,n)=>{const t=ae("Table",lve,e),{className:i,children:a,striped:r,highlightOnHover:o,captionSide:l,horizontalSpacing:s,verticalSpacing:d,fontSize:c,unstyled:u,withBorder:f,withColumnBorders:p,variant:h}=t,k=ove(t,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:y,cx:g}=eve({captionSide:l,verticalSpacing:d,horizontalSpacing:s,fontSize:c,withBorder:f,withColumnBorders:p},{unstyled:u,name:"Table",variant:h});return b.createElement(xe,rve(ave({},k),{component:"table",ref:n,className:g(y.root,i),"data-striped":r||void 0,"data-hover":o||void 0}),a)});al.displayName="@mantine/core/Table";var sve=Object.defineProperty,dve=Object.defineProperties,cve=Object.getOwnPropertyDescriptors,n$=Object.getOwnPropertySymbols,uve=Object.prototype.hasOwnProperty,mve=Object.prototype.propertyIsEnumerable,t$=(e,n,t)=>n in e?sve(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,i$=(e,n)=>{for(var t in n||(n={}))uve.call(n,t)&&t$(e,t,n[t]);if(n$)for(var t of n$(n))mve.call(n,t)&&t$(e,t,n[t]);return e},fve=(e,n)=>dve(e,cve(n));const pve={xs:T(16),sm:T(20),md:T(26),lg:T(32),xl:T(40)},hve=["filled","light","gradient","outline","default"];function vve({theme:e,variant:n,color:t,gradient:i}){if(!hve.includes(n))return null;const a=e.fn.variant({variant:n,color:t||e.primaryColor,gradient:i,primaryFallback:!1});return{backgroundColor:a.background,color:a.color,backgroundImage:n==="gradient"?a.background:void 0,border:`${T(n==="gradient"?0:1)} solid ${a.border}`}}var kve=me((e,{color:n,radius:t,gradient:i},{variant:a,size:r})=>{const o=q({size:r,sizes:pve});return{root:i$(fve(i$({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:o,height:o,minWidth:o,minHeight:o,borderRadius:e.fn.radius(t)}),vve({theme:e,variant:a,gradient:i,color:n}))}}),gve=Object.defineProperty,ug=Object.getOwnPropertySymbols,gB=Object.prototype.hasOwnProperty,yB=Object.prototype.propertyIsEnumerable,a$=(e,n,t)=>n in e?gve(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,yve=(e,n)=>{for(var t in n||(n={}))gB.call(n,t)&&a$(e,t,n[t]);if(ug)for(var t of ug(n))yB.call(n,t)&&a$(e,t,n[t]);return e},Sve=(e,n)=>{var t={};for(var i in e)gB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&ug)for(var i of ug(e))n.indexOf(i)<0&&yB.call(e,i)&&(t[i]=e[i]);return t};const Nve={size:"md",variant:"filled"},SB=S.forwardRef((e,n)=>{const t=ae("ThemeIcon",Nve,e),{className:i,size:a,radius:r,variant:o,color:l,children:s,gradient:d,unstyled:c}=t,u=Sve(t,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:f,cx:p}=kve({variant:o,radius:r,color:l,gradient:d},{name:"ThemeIcon",unstyled:c,variant:o,size:a});return b.createElement(xe,yve({className:p(f.root,i),ref:n},u),s)});SB.displayName="@mantine/core/ThemeIcon";var zo=(e=>(e.All="ALL",e.Expense="EXPENSE",e.Income="INCOME",e))(zo||{}),pd=(e=>(e.AbsAmount="ABS_AMOUNT",e.Amount="AMOUNT",e.Date="DATE",e))(pd||{}),Hn=(e=>(e.Eth="ETH",e.Eur="EUR",e.Gbp="GBP",e.Grt="GRT",e.Ils="ILS",e.Usd="USD",e.Usdc="USDC",e))(Hn||{}),Ki=(e=>(e.CreditInvoice="CREDIT_INVOICE",e.Invoice="INVOICE",e.InvoiceReceipt="INVOICE_RECEIPT",e.Proforma="PROFORMA",e.Receipt="RECEIPT",e.Unprocessed="UNPROCESSED",e))(Ki||{}),Yo=(e=>(e.Counterparty="COUNTERPARTY",e.Description="DESCRIPTION",e.Documents="DOCUMENTS",e.Tags="TAGS",e.TaxCategory="TAX_CATEGORY",e.Transactions="TRANSACTIONS",e.Vat="VAT",e))(Yo||{});const bve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsGalleryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}}]}}]}}]}}]},xve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}}]},Fve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}}]},wve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]},_ve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}}]}}]},Cve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentSerialFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}}]}}]},Pve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableCreditorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},Ove={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableDebtorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},Dve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentFilesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}}]}}]},V0={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableVatFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentSerialFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableCreditorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableDebtorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentFilesFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentSerialFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableCreditorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableDebtorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentFilesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}}]}}]},Eve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableDocumentsRowFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentSerialFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableCreditorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableDebtorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentFilesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableVatFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentSerialFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableCreditorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableDebtorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentFilesFields"}}]}}]},$ve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ConversionChargeInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConversionCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConversionCharge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eventRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"from"}},{kind:"Field",name:{kind:"Name",value:"to"}},{kind:"Field",name:{kind:"Name",value:"rate"}}]}},{kind:"Field",name:{kind:"Name",value:"officialRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"from"}},{kind:"Field",name:{kind:"Name",value:"to"}},{kind:"Field",name:{kind:"Name",value:"rate"}}]}}]}}]}}]},Ive={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableSalariesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalaryCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalaryCharge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecords"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]}}]}}]},r$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creditAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]},o$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"invoiceDate"}},{kind:"Field",name:{kind:"Name",value:"valueDate"}}]}}]},l$={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableLedgerRecordsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"reference1"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creditAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"invoiceDate"}},{kind:"Field",name:{kind:"Name",value:"valueDate"}}]}}]},jve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableLedgerRecordsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableLedgerRecordsRowFields"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"matches"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableLedgerRecordsRowFields"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creditAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"invoiceDate"}},{kind:"Field",name:{kind:"Name",value:"valueDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableLedgerRecordsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"reference1"}}]}}]},Tve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEventDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}}]}}]},Ave={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDebitDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}}]}}]},Rve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"cryptoExchangeRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rate"}}]}}]}}]},Mve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAccountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}}]}}]}}]},Lve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}}]}}]},zve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableSourceIDFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"referenceKey"}}]}}]},Bve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},Vve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TableTransactionsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableEventDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableDebitDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableAccountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableSourceIDFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableEntityFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEventDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDebitDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"cryptoExchangeRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rate"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAccountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableSourceIDFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"referenceKey"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},Wve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]},Hve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesHebrewNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"hebrewName"}}]}}]},Uve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllBusinessesNameFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllBusinessesHebrewNameFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesHebrewNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"hebrewName"}}]}}]},Yve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ChargeToMatchDocumentsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}}]}}]}}]},Gve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsToMatchFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]},qve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}}]},Kve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]},Xve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}}]},Qve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}}]},Zve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}}]},Jve={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]},eke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}}]},nke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}}]},tke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},ike={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}}]},ake={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]},rke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}}]},W0={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}}]},oke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}}]},lke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportBusinessTripsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTrips"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}}]},ske={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}}]},dke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportExpensesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"roundedLocalVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}}]},cke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportExpensesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"expenses"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportExpensesRowFields"}},{kind:"Field",name:{kind:"Name",value:"roundedLocalVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportExpensesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"roundedLocalVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]},uke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportIncomeRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}}]},mke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportIncomeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"income"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportIncomeRowFields"}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportIncomeRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]},fke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportMiscTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"differentMonthDoc"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}}]},pke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportMissingInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}}]},hke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordEmployeeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},vke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]},kke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFundsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}}]}}]},gke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]},yke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"taken"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}}]},Ske={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordEmployeeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFundsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordEmployeeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFundsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"taken"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}}]},Nke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesMonthFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordEmployeeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFundsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"taken"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordEmployeeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFundsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"}}]}}]},bke={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesMonthFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordEmployeeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFundsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"taken"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordEmployeeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFundsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesMonthFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFields"}}]}}]},xke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ChargeForRow"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargesByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}}]},Fke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchCharge"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargesByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsGalleryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableDocumentsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableLedgerRecordsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableTransactionsFields"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConversionCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ConversionChargeInfo"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalaryCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TableSalariesFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentSerialFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableCreditorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableDebtorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentFilesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableVatFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentSerialFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableCreditorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableDebtorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentFilesFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"creditAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAccount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"creditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyCreditAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount1"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localCurrencyDebitAmount2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"invoiceDate"}},{kind:"Field",name:{kind:"Name",value:"valueDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableLedgerRecordsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsAccountDetailsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"LedgerRecordsGeneralDateFields"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"reference1"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEventDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDebitDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"cryptoExchangeRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rate"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableAccountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableSourceIDFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"referenceKey"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TransactionsTableEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsGalleryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentType"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalDocuments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableDocumentsRowFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableLedgerRecordsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableLedgerRecordsRowFields"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"matches"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableLedgerRecordsRowFields"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableTransactionsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableEventDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableDebitDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableAccountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableSourceIDFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TransactionsTableEntityFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ConversionChargeInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConversionCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConversionCharge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eventRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"from"}},{kind:"Field",name:{kind:"Name",value:"to"}},{kind:"Field",name:{kind:"Name",value:"rate"}}]}},{kind:"Field",name:{kind:"Name",value:"officialRate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"from"}},{kind:"Field",name:{kind:"Name",value:"to"}},{kind:"Field",name:{kind:"Name",value:"rate"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableSalariesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalaryCharge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalaryCharge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecords"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}}]}}]}}]},wke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DocumentTableRow"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"documentId"},value:{kind:"Variable",name:{kind:"Name",value:"documentId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"TableDocumentsRowFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentSerialFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableCreditorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsTableDebtorFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isIncome"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentFilesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"TableDocumentsRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableVatFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentSerialFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableCreditorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsTableDebtorFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentFilesFields"}}]}}]},_ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllCharges"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"ChargeFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allCharges"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalPages"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}}]},Cke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"BusinessTransactionsInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactionsFromLedgerRecords"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsFromLedgerRecordsSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"eurAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gbpAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"usdAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"invoiceDate"}},{kind:"Field",name:{kind:"Name",value:"reference1"}},{kind:"Field",name:{kind:"Name",value:"reference2"}},{kind:"Field",name:{kind:"Name",value:"details"}},{kind:"Field",name:{kind:"Name",value:"counterAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Pke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"BusinessTransactionsSummery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactionsSumFromLedgerRecords"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsSumFromLedgerRecordsSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactionsSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"eurSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"gbpSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"usdSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Oke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllBusinessesForScreen"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allBusinesses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AllBusinessesRowFields"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalPages"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesHebrewNameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"hebrewName"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllBusinessesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllBusinessesNameFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllBusinessesHebrewNameFields"}}]}}]},Dke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IncomeChargesChart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"ChargeFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allCharges"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"eventExchangeRates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eur"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gbp"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"usd"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"Field",name:{kind:"Name",value:"debitExchangeRates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eur"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gbp"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"usd"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"date"}}]}}]}}]}}]}}]}}]},Eke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DocumentsToChargeMatcher"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DocumentsFilters"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentsByFilters"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"DocumentsToMatchFields"}}]}},{kind:"Field",name:{kind:"Name",value:"chargesByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIds"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"ChargeToMatchDocumentsFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"DocumentsToMatchFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Document"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ChargeToMatchDocumentsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}}]}}]}}]},$ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchBusiness"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"governmentId"}},{kind:"Field",name:{kind:"Name",value:"hebrewName"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"phoneNumber"}},{kind:"Field",name:{kind:"Name",value:"sortCode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"website"}}]}}]}}]}}]},Ike={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EditDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"documentId"},value:{kind:"Variable",name:{kind:"Name",value:"documentId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"documentType"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},jke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EditTransaction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"transactionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transactionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"transactionIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CardFinancialAccount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"fourDigits"}},{kind:"Field",name:{kind:"Name",value:"number"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankFinancialAccount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accountNumber"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"eventDate"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}},{kind:"Field",name:{kind:"Name",value:"isFee"}}]}}]}}]},NB={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UploadDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileScalar"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeId"}},type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uploadDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}},{kind:"Argument",name:{kind:"Name",value:"chargeId"},value:{kind:"Variable",name:{kind:"Name",value:"chargeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UploadDocumentSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Tke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllBusinessTrips"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allBusinessTrips"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},bB={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllEmployeesByEmployer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"employerId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"employeesByEmployerId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"employerId"},value:{kind:"Variable",name:{kind:"Name",value:"employerId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Hr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllFinancialEntities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allFinancialEntities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},Ake={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllPensionFunds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allPensionFunds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Rke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllSortCodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allSortCodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},xB={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllTaxCategories"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategories"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Mke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllTrainingFunds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allTrainingFunds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Lke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchMultipleCharges"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargesByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIds"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"invoicesCount"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"conversion"}},{kind:"Field",name:{kind:"Name",value:"property"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}}]}}]}}]},zke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EditCharge"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargesByIDs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"property"}},{kind:"Field",name:{kind:"Name",value:"conversion"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"yearOfRelevance"}}]}}]}}]},Bke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EditSalaryRecord"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"month"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimelessDate"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"employeeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecordsByDates"},arguments:[{kind:"Argument",name:{kind:"Name",value:"fromDate"},value:{kind:"Variable",name:{kind:"Name",value:"month"}}},{kind:"Argument",name:{kind:"Name",value:"toDate"},value:{kind:"Variable",name:{kind:"Name",value:"month"}}},{kind:"Argument",name:{kind:"Name",value:"employeeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"employeeIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"employer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}}]}}]},Vke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Documents"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documents"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"transactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"eventDate"}},{kind:"Field",name:{kind:"Name",value:"sourceDescription"}},{kind:"Field",name:{kind:"Name",value:"effectiveDate"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Unprocessed"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Proforma"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Receipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Invoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvoiceReceipt"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreditInvoice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"file"}},{kind:"Field",name:{kind:"Name",value:"creditor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"debtor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"serialNumber"}},{kind:"Field",name:{kind:"Name",value:"date"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}}]}}]}}]}}]},Wke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TrialBalanceReport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactionsSumFromLedgerRecords"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BusinessTransactionsSumFromLedgerRecordsSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTransactionsSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"sortCode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"eurSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"gbpSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"usdSum"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"credit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"debit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"total"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Hke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VatMonthlyReport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"VatReportFilter"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vatReport"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportIncomeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportExpensesFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportMissingInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportMiscTableFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportBusinessTripsFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"chargeAccountantReviewed"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportIncomeRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportExpensesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportRecord"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportAccountantApprovalFields"}},{kind:"Field",name:{kind:"Name",value:"business"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"vatNumber"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"documentSerial"}},{kind:"Field",name:{kind:"Name",value:"documentDate"}},{kind:"Field",name:{kind:"Name",value:"chargeDate"}},{kind:"Field",name:{kind:"Name",value:"chargeId"}},{kind:"Field",name:{kind:"Name",value:"amount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"vatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"localVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"roundedLocalVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"accountantApproval"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesAmountFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesBusinessTripFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessTrip"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"start"}},{kind:"Field",name:{kind:"Name",value:"end"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minEventDate"}},{kind:"Field",name:{kind:"Name",value:"minDebitDate"}},{kind:"Field",name:{kind:"Name",value:"minDocumentsDate"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesDescriptionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userDescription"}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesEntityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"counterparty"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ledger"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"balance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isBalanced"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LedgerValidation"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isValid"}},{kind:"Field",name:{kind:"Name",value:"differences"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesMoreInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}},{kind:"Field",name:{kind:"Name",value:"isSalary"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreLedgerInfoFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTagsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}},{kind:"Field",name:{kind:"Name",value:"missingInfoSuggestions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTaxCategoryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"taxCategory"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesVatFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"vat"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"totalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}},{kind:"Field",name:{kind:"Name",value:"currency"}}]}},{kind:"Field",name:{kind:"Name",value:"validationData"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesRowFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transactionsCount"}},{kind:"Field",name:{kind:"Name",value:"documentsCount"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAccountantApprovalFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesAmountFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesBusinessTripFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDateFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesDescriptionFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesEntityFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesMoreInfoFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTagsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTaxCategoryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTypeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesVatFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AllChargesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Charge"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesRowFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportIncomeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"income"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportIncomeRowFields"}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportExpensesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"expenses"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VatReportExpensesRowFields"}},{kind:"Field",name:{kind:"Name",value:"roundedLocalVatAfterDeduction"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"taxReducedLocalAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportMissingInfoFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"missingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportMiscTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"differentMonthDoc"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VatReportBusinessTripsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VatReportResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"businessTrips"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"AllChargesTableFields"}}]}}]}}]},Uke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratePCN"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fromDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimelessDate"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"toDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimelessDate"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"financialEntityId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pcnFile"},arguments:[{kind:"Argument",name:{kind:"Name",value:"fromDate"},value:{kind:"Variable",name:{kind:"Name",value:"fromDate"}}},{kind:"Argument",name:{kind:"Name",value:"toDate"},value:{kind:"Variable",name:{kind:"Name",value:"toDate"}}},{kind:"Argument",name:{kind:"Name",value:"financialEntityId"},value:{kind:"Variable",name:{kind:"Name",value:"financialEntityId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reportContent"}},{kind:"Field",name:{kind:"Name",value:"fileName"}}]}}]}}]},Yke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SalaryScreenRecords"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fromDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimelessDate"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"toDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimelessDate"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"employeeIDs"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecordsByDates"},arguments:[{kind:"Argument",name:{kind:"Name",value:"fromDate"},value:{kind:"Variable",name:{kind:"Name",value:"fromDate"}}},{kind:"Argument",name:{kind:"Name",value:"toDate"},value:{kind:"Variable",name:{kind:"Name",value:"toDate"}}},{kind:"Argument",name:{kind:"Name",value:"employeeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"employeeIDs"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesTableFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordEmployeeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"baseAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"directAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"globalAdditionalHoursAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}}]}},{kind:"Field",name:{kind:"Name",value:"bonus"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"gift"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationTakeout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFundsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"pensionEmployerPercentage"}},{kind:"Field",name:{kind:"Name",value:"compensationsAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"compensationsPercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFund"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployeePercentage"}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"trainingFundEmployerPercentage"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"healthInsuranceAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployeeAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"socialSecurityEmployerAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"incomeTaxAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}},{kind:"Field",name:{kind:"Name",value:"notionalExpense"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formatted"}},{kind:"Field",name:{kind:"Name",value:"raw"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"vacationDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"added"}},{kind:"Field",name:{kind:"Name",value:"taken"}},{kind:"Field",name:{kind:"Name",value:"balance"}}]}},{kind:"Field",name:{kind:"Name",value:"workDays"}},{kind:"Field",name:{kind:"Name",value:"sicknessDays"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"balance"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesRecordFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordEmployeeFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordMainSalaryFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFundsFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordInsurancesAndTaxesFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordWorkFrameFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesMonthFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesRecordFields"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SalariesTableFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Salary"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"SalariesMonthFields"}}]}}]},v_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllTags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allTags"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Gke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"tag"}}}]}]}}]},qke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"FlagForeignFeeTransactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"flagForeignFeeTransactions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}}]}}]}}]},Kke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MergeChargesByTransactionReference"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mergeChargesByTransactionReference"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}}]}}]}}]},Xke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCharge"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCharge"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeId"},value:{kind:"Variable",name:{kind:"Name",value:"chargeId"}}}]}]}}]},Qke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"documentId"},value:{kind:"Variable",name:{kind:"Name",value:"documentId"}}}]}]}}]},Zke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"tag"}}}]}]}}]},Jke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"FetchIncomeDocuments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fetchIncomeDocuments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerId"},value:{kind:"Variable",name:{kind:"Name",value:"ownerId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},ege={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"InsertBusinessTrip"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"InsertBusinessTripInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"insertBusinessTrip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},nge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"InsertDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"record"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"InsertDocumentInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"insertDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"record"},value:{kind:"Variable",name:{kind:"Name",value:"record"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InsertDocumentSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},tge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"InsertSalaryRecord"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"salaryRecords"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SalaryRecordInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"insertSalaryRecords"},arguments:[{kind:"Argument",name:{kind:"Name",value:"salaryRecords"},value:{kind:"Variable",name:{kind:"Name",value:"salaryRecords"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InsertSalaryRecordsSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecords"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ige={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MergeCharges"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseChargeID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeIdsToMerge"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NamedType",name:{kind:"Name",value:"UpdateChargeInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mergeCharges"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseChargeID"},value:{kind:"Variable",name:{kind:"Name",value:"baseChargeID"}}},{kind:"Argument",name:{kind:"Name",value:"chargeIdsToMerge"},value:{kind:"Variable",name:{kind:"Name",value:"chargeIdsToMerge"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MergeChargeSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},age={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RegenerateLedger"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"regenerateLedgerRecords"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeId"},value:{kind:"Variable",name:{kind:"Name",value:"chargeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ledger"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},rge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ToggleChargeAccountantApproval"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"approved"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"toggleChargeAccountantApproval"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeId"},value:{kind:"Variable",name:{kind:"Name",value:"chargeId"}}},{kind:"Argument",name:{kind:"Name",value:"approved"},value:{kind:"Variable",name:{kind:"Name",value:"approved"}}}]}]}}]},oge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateBusiness"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"businessId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBusinessInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBusiness"},arguments:[{kind:"Argument",name:{kind:"Name",value:"businessId"},value:{kind:"Variable",name:{kind:"Name",value:"businessId"}}},{kind:"Argument",name:{kind:"Name",value:"ownerId"},value:{kind:"Variable",name:{kind:"Name",value:"ownerId"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LtdFinancialEntity"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},lge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCharge"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"chargeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateChargeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCharge"},arguments:[{kind:"Argument",name:{kind:"Name",value:"chargeId"},value:{kind:"Variable",name:{kind:"Name",value:"chargeId"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdateChargeSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"charge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},sge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateDocumentFieldsInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"documentId"},value:{kind:"Variable",name:{kind:"Name",value:"documentId"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdateDocumentSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"document"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]},dge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSalaryRecord"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"salaryRecord"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SalaryRecordEditInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSalaryRecord"},arguments:[{kind:"Argument",name:{kind:"Name",value:"salaryRecord"},value:{kind:"Variable",name:{kind:"Name",value:"salaryRecord"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdateSalaryRecordSuccessfulResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salaryRecord"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"employee"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},cge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTransaction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"transactionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fields"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateTransactionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTransaction"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transactionId"},value:{kind:"Variable",name:{kind:"Name",value:"transactionId"}}},{kind:"Argument",name:{kind:"Name",value:"fields"},value:{kind:"Variable",name:{kind:"Name",value:"fields"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Transaction"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CommonError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]};function kt(){const{search:e}=nl(),n=S.useMemo(()=>new URLSearchParams(e),[e]),t=S.useCallback(()=>{if(window.history.pushState){const i=n.keys().next().done?"":`?${n.toString()}`,a=window.location.protocol+"//"+window.location.host+window.location.pathname+i;window.history.pushState({path:a},"",a)}},[n]);return{query:n,queryString:()=>n.toString(),get:i=>n==null?void 0:n.get(i),set:(i,a)=>{a==null?n.delete(i):n.set(i,a),t()}}}const dr=S.createContext({filtersContext:null,setFiltersContext:()=>{}});function uge(){try{const e=JSON.parse(localStorage.getItem("user"));if(e!=null&&e.authdata)return`Basic ${e.authdata}`}catch{}return null}const is={login:mge,logout:fge,authToken:uge,isLoggedIn:pge,currentUser:hge};async function mge(e,n){if(e&&n){const t=btoa(`${e}:${n}`),i={username:e,authdata:t};return localStorage.setItem("user",JSON.stringify(i)),i}throw new Error("Username or password is incorrect")}function fge(){localStorage.removeItem("user")}function pge(){return!!localStorage.getItem("user")}function hge(){try{return JSON.parse(localStorage.getItem("user"))}catch{}return null}const vge="6a20aa69-57ff-446e-8d6a-1e96d095e988",Ur=S.createContext({userContext:null,setUserContext:()=>{}});function kge({children:e}){const[n,t]=S.useState(null),i=is.currentUser();return S.useEffect(()=>{const a=i?{...i,ownerId:vge}:null;t(a)},[JSON.stringify(i)]),m.jsx(Ur.Provider,{value:{userContext:n,setUserContext:t},children:e})}function gge(e){const[n,t]=S.useState(!1),i=e.moreInfo?e.moreInfo(e.item):null;return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{children:[e.columns.map((a,r)=>a.disabled?null:m.jsx("td",{style:a.style,children:a.value(e.item,e.rowContext?e.rowContext(e.item):void 0)},String(r))),e.moreInfo&&m.jsx("td",{children:i===null?m.jsx("p",{children:"No Data Related"}):m.jsx(gS,{title:"More Info",onClick:()=>t(!n)})})]}),(e.isShowAll||n)&&i!==null&&m.jsx("tr",{children:m.jsx("td",{colSpan:12,children:m.jsx(vs,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:i})})})]})}function mg(e){const[n,t]=S.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-row justify-end w-full",children:[e.pagination&&m.jsx(ra,{className:"flex-auto",...e.pagination}),e.showButton===!0?m.jsx("button",{className:"inline-flex text-white bg-indigo-500 border-0 py-1.5 px-3 focus:outline-none hover:bg-indigo-600 rounded text-sm",type:"button",onClick:()=>{t(i=>!i)},children:n?"Hide All":"Show All"}):null]}),m.jsxs(al,{striped:e.striped,highlightOnHover:e.highlightOnHover,children:[m.jsx("thead",{style:e.stickyHeader?{position:"sticky",top:0,zIndex:20}:{},children:m.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.columns.map((i,a)=>i.disabled?null:m.jsx("th",{children:i.title},String(a))),e.moreInfo&&m.jsx("th",{children:"More Info"})]})}),m.jsx("tbody",{children:e.items.map((i,a)=>m.jsx(gge,{columns:e.columns,item:i,moreInfo:e.moreInfo,isShowAll:n,rowContext:e.rowContext},a))})]})]})}const gS=({title:e,herf:n,style:t,target:i,rel:a,type:r="button",onClick:o,...l})=>m.jsx("button",{style:t,type:r,onClick:o,className:"cursor: pointer text-align: center flex ml-auto text-white bg-indigo-500 border-0 py-1.5 px-3 focus:outline-none hover:bg-indigo-600 rounded;",...l,children:m.jsx("a",{rel:a,target:i,href:n,type:r,children:e})}),yge=({title:e,url:n,style:t,target:i,textLabel:a,rel:r,type:o="button",onClick:l})=>m.jsxs("div",{children:[m.jsx("label",{className:"text-sm font-medium text-gray-700",children:a}),m.jsx("div",{children:m.jsx("button",{style:t,type:o,onClick:l,className:"bg-gray-100 border focus:ring-2 focus:ring-indigo-200 focus:bg-transparent hover:bg-indigo-500 hover:text-white text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out sm:text-sm rounded-md",children:m.jsx("a",{rel:r,target:i,href:n,type:o,children:e})})})]});function vc(e){return m.jsx(Pe,{color:"green",...e,children:m.jsx(oq,{size:20})})}function Sx(e,n){return Sx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},Sx(e,n)}function FB(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Sx(e,n)}var wB={exports:{}},Sge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Nge=Sge,bge=Nge;function _B(){}function CB(){}CB.resetWarningCache=_B;var xge=function(){function e(i,a,r,o,l,s){if(s!==bge){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:CB,resetWarningCache:_B};return t.PropTypes=t,t};wB.exports=xge();var Fge=wB.exports;const pn=Mm(Fge),s$={disabled:!1},fg=b.createContext(null);var mu="unmounted",Fl="exited",wl="entering",Vs="entered",Nx="exiting",Yr=function(e){FB(n,e);function n(i,a){var r;r=e.call(this,i,a)||this;var o=a,l=o&&!o.isMounting?i.enter:i.appear,s;return r.appearStatus=null,i.in?l?(s=Fl,r.appearStatus=wl):s=Vs:i.unmountOnExit||i.mountOnEnter?s=mu:s=Fl,r.state={status:s},r.nextCallback=null,r}n.getDerivedStateFromProps=function(a,r){var o=a.in;return o&&r.status===mu?{status:Fl}:null};var t=n.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(a){var r=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==wl&&o!==Vs&&(r=wl):(o===wl||o===Vs)&&(r=Nx)}this.updateStatus(!1,r)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var a=this.props.timeout,r,o,l;return r=o=l=a,a!=null&&typeof a!="number"&&(r=a.exit,o=a.enter,l=a.appear!==void 0?a.appear:o),{exit:r,enter:o,appear:l}},t.updateStatus=function(a,r){a===void 0&&(a=!1),r!==null?(this.cancelNextCallback(),r===wl?this.performEnter(a):this.performExit()):this.props.unmountOnExit&&this.state.status===Fl&&this.setState({status:mu})},t.performEnter=function(a){var r=this,o=this.props.enter,l=this.context?this.context.isMounting:a,s=this.props.nodeRef?[l]:[h0.findDOMNode(this),l],d=s[0],c=s[1],u=this.getTimeouts(),f=l?u.appear:u.enter;if(!a&&!o||s$.disabled){this.safeSetState({status:Vs},function(){r.props.onEntered(d)});return}this.props.onEnter(d,c),this.safeSetState({status:wl},function(){r.props.onEntering(d,c),r.onTransitionEnd(f,function(){r.safeSetState({status:Vs},function(){r.props.onEntered(d,c)})})})},t.performExit=function(){var a=this,r=this.props.exit,o=this.getTimeouts(),l=this.props.nodeRef?void 0:h0.findDOMNode(this);if(!r||s$.disabled){this.safeSetState({status:Fl},function(){a.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Nx},function(){a.props.onExiting(l),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:Fl},function(){a.props.onExited(l)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(a,r){r=this.setNextCallback(r),this.setState(a,r)},t.setNextCallback=function(a){var r=this,o=!0;return this.nextCallback=function(l){o&&(o=!1,r.nextCallback=null,a(l))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},t.onTransitionEnd=function(a,r){this.setNextCallback(r);var o=this.props.nodeRef?this.props.nodeRef.current:h0.findDOMNode(this),l=a==null&&!this.props.addEndListener;if(!o||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=s[0],c=s[1];this.props.addEndListener(d,c)}a!=null&&setTimeout(this.nextCallback,a)},t.render=function(){var a=this.state.status;if(a===mu)return null;var r=this.props,o=r.children;r.in,r.mountOnEnter,r.unmountOnExit,r.appear,r.enter,r.exit,r.timeout,r.addEndListener,r.onEnter,r.onEntering,r.onEntered,r.onExit,r.onExiting,r.onExited,r.nodeRef;var l=$6(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b.createElement(fg.Provider,{value:null},typeof o=="function"?o(a,l):b.cloneElement(b.Children.only(o),l))},n}(b.Component);Yr.contextType=fg;Yr.propTypes={};function Is(){}Yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Is,onEntering:Is,onEntered:Is,onExit:Is,onExiting:Is,onExited:Is};Yr.UNMOUNTED=mu;Yr.EXITED=Fl;Yr.ENTERING=wl;Yr.ENTERED=Vs;Yr.EXITING=Nx;const wge=Yr;function _ge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k_(e,n){var t=function(r){return n&&S.isValidElement(r)?n(r):r},i=Object.create(null);return e&&S.Children.map(e,function(a){return a}).forEach(function(a){i[a.key]=t(a)}),i}function Cge(e,n){e=e||{},n=n||{};function t(c){return c in n?n[c]:e[c]}var i=Object.create(null),a=[];for(var r in e)r in n?a.length&&(i[r]=a,a=[]):a.push(r);var o,l={};for(var s in n){if(i[s])for(o=0;o<i[s].length;o++){var d=i[s][o];l[i[s][o]]=t(d)}l[s]=t(s)}for(o=0;o<a.length;o++)l[a[o]]=t(a[o]);return l}function jl(e,n,t){return t[n]!=null?t[n]:e.props[n]}function Pge(e,n){return k_(e.children,function(t){return S.cloneElement(t,{onExited:n.bind(null,t),in:!0,appear:jl(t,"appear",e),enter:jl(t,"enter",e),exit:jl(t,"exit",e)})})}function Oge(e,n,t){var i=k_(e.children),a=Cge(n,i);return Object.keys(a).forEach(function(r){var o=a[r];if(S.isValidElement(o)){var l=r in n,s=r in i,d=n[r],c=S.isValidElement(d)&&!d.props.in;s&&(!l||c)?a[r]=S.cloneElement(o,{onExited:t.bind(null,o),in:!0,exit:jl(o,"exit",e),enter:jl(o,"enter",e)}):!s&&l&&!c?a[r]=S.cloneElement(o,{in:!1}):s&&l&&S.isValidElement(d)&&(a[r]=S.cloneElement(o,{onExited:t.bind(null,o),in:d.props.in,exit:jl(o,"exit",e),enter:jl(o,"enter",e)}))}}),a}var Dge=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},Ege={component:"div",childFactory:function(n){return n}},g_=function(e){FB(n,e);function n(i,a){var r;r=e.call(this,i,a)||this;var o=r.handleExited.bind(_ge(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}var t=n.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(a,r){var o=r.children,l=r.handleExited,s=r.firstRender;return{children:s?Pge(a,l):Oge(a,o,l),firstRender:!1}},t.handleExited=function(a,r){var o=k_(this.props.children);a.key in o||(a.props.onExited&&a.props.onExited(r),this.mounted&&this.setState(function(l){var s=Cn({},l.children);return delete s[a.key],{children:s}}))},t.render=function(){var a=this.props,r=a.component,o=a.childFactory,l=$6(a,["component","childFactory"]),s=this.state.contextValue,d=Dge(this.state.children).map(o);return delete l.appear,delete l.enter,delete l.exit,r===null?b.createElement(fg.Provider,{value:s},d):b.createElement(fg.Provider,{value:s},b.createElement(r,l,d))},n}(b.Component);g_.propTypes={};g_.defaultProps=Ege;const $ge=g_,[Ige,tf]=KX("mantine-notifications"),re=tf("show"),jge=tf("hide"),Tge=tf("clean"),Age=tf("cleanQueue"),Rge=tf("update"),af={show:re,hide:jge,clean:Tge,cleanQueue:Age,update:Rge};function Mge([e,n],t){const i={};return e==="top"&&(i.top=t),e==="bottom"&&(i.bottom=t),n==="left"&&(i.left=t),n==="right"&&(i.right=t),n==="center"&&(i.left="50%",i.transform="translateX(-50%)"),i}var Lge=Object.defineProperty,d$=Object.getOwnPropertySymbols,zge=Object.prototype.hasOwnProperty,Bge=Object.prototype.propertyIsEnumerable,c$=(e,n,t)=>n in e?Lge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,u$=(e,n)=>{for(var t in n||(n={}))zge.call(n,t)&&c$(e,t,n[t]);if(d$)for(var t of d$(n))Bge.call(n,t)&&c$(e,t,n[t]);return e};const m$={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Vge={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Wge({state:e,maxHeight:n,positioning:t,transitionDuration:i}){const[a,r]=t,o=r==="center"?`${a}-center`:r,l={opacity:0,maxHeight:n,transform:m$[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},s={opacity:1,transform:Vge[o]},d={opacity:0,maxHeight:0,transform:m$[o]},c={entering:s,entered:s,exiting:d,exited:d};return u$(u$({},l),c[e])}function Hge(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}var Uge=Object.defineProperty,Yge=Object.defineProperties,Gge=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,OB=Object.prototype.propertyIsEnumerable,f$=(e,n,t)=>n in e?Uge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,p$=(e,n)=>{for(var t in n||(n={}))PB.call(n,t)&&f$(e,t,n[t]);if(pg)for(var t of pg(n))OB.call(n,t)&&f$(e,t,n[t]);return e},qge=(e,n)=>Yge(e,Gge(n)),h$=(e,n)=>{var t={};for(var i in e)PB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&pg)for(var i of pg(e))n.indexOf(i)<0&&OB.call(e,i)&&(t[i]=e[i]);return t};function DB(e){var n=e,{notification:t,autoClose:i,onHide:a,innerRef:r}=n,o=h$(n,["notification","autoClose","onHide","innerRef"]);const l=t,{autoClose:s,message:d}=l,c=h$(l,["autoClose","message"]),u=Hge(i,s),f=S.useRef(),p=()=>{a(t.id),window.clearTimeout(f.current)},h=()=>{clearTimeout(f.current)},k=()=>{typeof u=="number"&&(f.current=window.setTimeout(p,u))};return S.useEffect(()=>{typeof t.onOpen=="function"&&t.onOpen(t)},[]),S.useEffect(()=>(k(),h),[i,t.autoClose]),b.createElement(_8,qge(p$(p$({},c),o),{onClose:p,onMouseEnter:h,onMouseLeave:k,ref:r}),d)}DB.displayName="@mantine/notifications/NotificationContainer";var Kge=me((e,{zIndex:n})=>({notifications:{width:`calc(100% - ${e.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:n},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}})),Xge=Object.defineProperty,Qge=Object.defineProperties,Zge=Object.getOwnPropertyDescriptors,v$=Object.getOwnPropertySymbols,Jge=Object.prototype.hasOwnProperty,eye=Object.prototype.propertyIsEnumerable,k$=(e,n,t)=>n in e?Xge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,nye=(e,n)=>{for(var t in n||(n={}))Jge.call(n,t)&&k$(e,t,n[t]);if(v$)for(var t of v$(n))eye.call(n,t)&&k$(e,t,n[t]);return e},tye=(e,n)=>Qge(e,Zge(n));function iye({limit:e}){const{state:n,queue:t,update:i,cleanQueue:a}=OJ({initialValues:[],limit:e});return{notifications:n,queue:t,showNotification:d=>{const c=d.id||aS();return i(u=>d.id&&u.some(f=>f.id===d.id)?u:[...u,tye(nye({},d),{id:c})]),c},updateNotification:d=>i(c=>{const u=c.findIndex(p=>p.id===d.id);if(u===-1)return c;const f=[...c];return f[u]=d,f}),hideNotification:d=>i(c=>c.filter(u=>u.id===d?(typeof u.onClose=="function"&&u.onClose(u),!1):!0)),cleanQueue:a,clean:()=>i(()=>[])}}var aye=Object.defineProperty,hg=Object.getOwnPropertySymbols,EB=Object.prototype.hasOwnProperty,$B=Object.prototype.propertyIsEnumerable,g$=(e,n,t)=>n in e?aye(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,H0=(e,n)=>{for(var t in n||(n={}))EB.call(n,t)&&g$(e,t,n[t]);if(hg)for(var t of hg(n))$B.call(n,t)&&g$(e,t,n[t]);return e},rye=(e,n)=>{var t={};for(var i in e)EB.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&hg)for(var i of hg(e))n.indexOf(i)<0&&$B.call(e,i)&&(t[i]=e[i]);return t};const oye=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],ks=e=>{var n=e,{className:t,position:i="bottom-right",autoClose:a=4e3,transitionDuration:r=250,containerWidth:o=T(440),notificationMaxHeight:l=T(200),limit:s=5,zIndex:d=Ma("overlay"),style:c,children:u,target:f}=n,p=rye(n,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const h=wJ(),k=S.useRef({}),y=S.useRef(0),{notifications:g,showNotification:v,updateNotification:N,hideNotification:x,clean:F,cleanQueue:_}=iye({limit:s}),{classes:w,cx:C,theme:$}=Kge({zIndex:d}),E=Gm(),D=($.respectReducedMotion?E:!1)?1:r,M=(oye.includes(i)?i:"bottom-right").split("-");Et(()=>{g.length>y.current&&setTimeout(()=>h(),0),y.current=g.length},[g]),Ige({show:v,hide:x,update:N,clean:F,cleanQueue:_});const R=g.map(I=>b.createElement(wge,{key:I.id,timeout:D,onEnter:()=>k.current[I.id].offsetHeight,nodeRef:{current:k.current[I.id]}},L=>b.createElement(DB,{innerRef:B=>{k.current[I.id]=B},notification:I,onHide:x,className:w.notification,autoClose:a,sx:[H0({},Wge({state:L,positioning:M,transitionDuration:D,maxHeight:l})),...Array.isArray(I.sx)?I.sx:[I.sx]]})));return b.createElement(Bw,{target:f},b.createElement(xe,H0({className:C(w.notifications,t),style:c,sx:H0({maxWidth:o},Mge(M,$.spacing.md))},p),b.createElement($ge,null,R)))};ks.displayName="@mantine/notifications/Notifications";ks.show=af.show;ks.hide=af.hide;ks.update=af.update;ks.clean=af.clean;ks.cleanQueue=af.cleanQueue;const lye=()=>{const[{fetching:e},n]=at(qke),[{fetching:t},i]=at(Kke);return{fetching:e||t,executeJobs:()=>new Promise((a,r)=>n({}).then(o=>{var l,s;if(o.error)return console.error(`Error flagging foreign fee transactions: ${o.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(o.error.message);if(!((l=o.data)!=null&&l.flagForeignFeeTransactions))return console.error("Error flagging foreign fee transactions"),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r("No data returned");if(!o.data.flagForeignFeeTransactions.success)return console.error("Error flagging foreign fee transactions"+o.data.flagForeignFeeTransactions.errors?`:
`+((s=o.data.flagForeignFeeTransactions.errors)==null?void 0:s.join(`
`)):void 0),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(o.data.flagForeignFeeTransactions.errors);re({title:"Fees flagged!",message:"Foreign fee transactions were successfully tagged"}),i({}).then(d=>{var c,u;return d.error?(console.error(`Error auto-merging charges: ${d.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(d.error.message)):(c=d.data)!=null&&c.mergeChargesByTransactionReference?d.data.mergeChargesByTransactionReference.success?(re({title:"Charges merged!",message:"Charges successfully auto-merged"}),a()):(console.error("Error auto-merging charges"+d.data.mergeChargesByTransactionReference.errors?`:
`+((u=d.data.mergeChargesByTransactionReference.errors)==null?void 0:u.join(`
`)):void 0),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(d.data.mergeChargesByTransactionReference.errors)):(console.error("Error auto-merging charges"),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r("No data returned"))})}))}};function gs({labels:e={cancel:"Cancel",confirm:"Confirm"},title:n,onConfirm:t,children:i,...a}){return m.jsx(Ht,{closeOnEscape:!0,withCloseButton:!1,...a,children:m.jsx("div",{className:"flex flex-wrap -mx-4 -mb-10 text-center",children:m.jsxs("div",{className:"mb-10 px-4",children:[n&&m.jsx("h3",{className:"title-font text-2xl font-medium text-gray-900 mt-6 mb-3",children:n}),i,m.jsxs("div",{className:"flex mx-auto flex-row justify-evenly",children:[m.jsx("button",{onClick:a.onClose,className:"flex mt-6 text-white bg-red-500 border-0 py-2 px-5 focus:outline-none hover:bg-red-600 rounded",children:e.cancel}),m.jsx("button",{onClick:t,className:"flex mt-6 text-white bg-indigo-500 border-0 py-2 px-5 focus:outline-none hover:bg-indigo-600 rounded",children:e.confirm})]})]})})})}function sye(){const[e,{close:n,open:t}]=tl(!1),{fetching:i,executeJobs:a}=lye(),r=S.useCallback(()=>{a().then(()=>{n()})},[a,n]);return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:e,onClose:n,onConfirm:r,title:"Are you sure you want to manually execute corn jobs?"}),m.jsx(tt,{label:"Execute corn jobs",children:m.jsx(Pe,{loading:i,size:30,onClick:t,children:m.jsx(eq,{size:20})})})]})}const dye=()=>{const[{fetching:e},n]=at(Xke);return{fetching:e,deleteCharge:t=>new Promise((i,a)=>{n(t).then(r=>{if(r.error)return console.error(`Error deleting charge ID [${t.chargeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message);if(!r.data)return console.error(`Error deleting charge ID [${t.chargeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned");if(r.data.deleteCharge===!1)return console.error(`Error deleting charge ID [${t.chargeId}]: Received 'false' from server`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("Received 'false' from server");re({title:"Deletion Success!",message:"Charge was deleted successfully! 🎉"}),i(r.data.deleteCharge)})})}},cye=()=>{const[{fetching:e},n]=at(Qke);return{fetching:e,deleteDocument:t=>new Promise((i,a)=>{n(t).then(r=>{if(r.error)return console.error(`Error deleting document ID [${t.documentId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message);if(!r.data)return console.error(`Error deleting document ID [${t.documentId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned");if(r.data.deleteDocument===!1)return console.error(`Error deleting document ID [${t.documentId}]: Received 'false' from server`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("Received 'false' from server");re({title:"Deletion Success!",message:"Document was deleted successfully! 🎉"}),i(r.data.deleteDocument)})})}};function uye({documentId:e}){const[n,t]=S.useState(!1),{deleteDocument:i}=cye();function a(){i({documentId:e}),t(!1)}return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:n,onClose:()=>t(!1),onConfirm:a,title:"Are you sure you want to delete this document?"}),m.jsx(Pe,{color:"red",onClick:()=>t(!0),children:m.jsx(L5,{size:20})})]})}function yS(e){return m.jsx(tt,{disabled:!e.tooltip,label:e.tooltip,children:m.jsx(Pe,{...e,children:m.jsx(cq,{size:20})})})}var rf=e=>e.type==="checkbox",td=e=>e instanceof Date,Xt=e=>e==null;const IB=e=>typeof e=="object";var rt=e=>!Xt(e)&&!Array.isArray(e)&&IB(e)&&!td(e),jB=e=>rt(e)&&e.target?rf(e.target)?e.target.checked:e.target.value:e,mye=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TB=(e,n)=>e.has(mye(n)),fye=e=>{const n=e.constructor&&e.constructor.prototype;return rt(n)&&n.hasOwnProperty("isPrototypeOf")},y_=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){let n;const t=Array.isArray(e);if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set(e);else if(!(y_&&(e instanceof Blob||e instanceof FileList))&&(t||rt(e)))if(n=t?[]:{},!t&&!fye(e))n=e;else for(const i in e)e.hasOwnProperty(i)&&(n[i]=ut(e[i]));else return e;return n}var kc=e=>Array.isArray(e)?e.filter(Boolean):[],yn=e=>e===void 0,pe=(e,n,t)=>{if(!n||!rt(e))return t;const i=kc(n.split(/[,[\].]+?/)).reduce((a,r)=>Xt(a)?a:a[r],e);return yn(i)||i===e?yn(e[n])?t:e[n]:i},ya=e=>typeof e=="boolean";const vg={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Zi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pye=b.createContext(null),SS=()=>b.useContext(pye);var AB=(e,n,t,i=!0)=>{const a={defaultValues:n._defaultValues};for(const r in e)Object.defineProperty(a,r,{get:()=>{const o=r;return n._proxyFormState[o]!==Zi.all&&(n._proxyFormState[o]=!i||Zi.all),t&&(t[o]=!0),e[o]}});return a},wi=e=>rt(e)&&!Object.keys(e).length,RB=(e,n,t,i)=>{t(e);const{name:a,...r}=e;return wi(r)||Object.keys(r).length>=Object.keys(n).length||Object.keys(r).find(o=>n[o]===(!i||Zi.all))},Ei=e=>Array.isArray(e)?e:[e],MB=(e,n,t)=>!e||!n||e===n||Ei(e).some(i=>i&&(t?i===n:i.startsWith(n)||n.startsWith(i)));function NS(e){const n=b.useRef(e);n.current=e,b.useEffect(()=>{const t=!e.disabled&&n.current.subject&&n.current.subject.subscribe({next:n.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function hye(e){const n=SS(),{control:t=n.control,disabled:i,name:a,exact:r}=e||{},[o,l]=b.useState(t._formState),s=b.useRef(!0),d=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=b.useRef(a);return c.current=a,NS({disabled:i,next:u=>s.current&&MB(c.current,u.name,r)&&RB(u,d.current,t._updateFormState)&&l({...t._formState,...u}),subject:t._subjects.state}),b.useEffect(()=>(s.current=!0,d.current.isValid&&t._updateValid(!0),()=>{s.current=!1}),[t]),AB(o,t,d.current,!1)}var nr=e=>typeof e=="string",LB=(e,n,t,i,a)=>nr(e)?(i&&n.watch.add(e),pe(t,e,a)):Array.isArray(e)?e.map(r=>(i&&n.watch.add(r),pe(t,r))):(i&&(n.watchAll=!0),t);function vye(e){const n=SS(),{control:t=n.control,name:i,defaultValue:a,disabled:r,exact:o}=e||{},l=b.useRef(i);l.current=i,NS({disabled:r,subject:t._subjects.values,next:c=>{MB(l.current,c.name,o)&&d(ut(LB(l.current,t._names,c.values||t._formValues,!1,a)))}});const[s,d]=b.useState(t._getWatch(i,a));return b.useEffect(()=>t._removeUnmounted()),s}var S_=e=>/^\w*$/.test(e),zB=e=>kc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dn=(e,n,t)=>{let i=-1;const a=S_(n)?[n]:zB(n),r=a.length,o=r-1;for(;++i<r;){const l=a[i];let s=t;if(i!==o){const d=e[l];s=rt(d)||Array.isArray(d)?d:isNaN(+a[i+1])?{}:[]}e[l]=s,e=e[l]}return e};function kye(e){const n=SS(),{name:t,disabled:i,control:a=n.control,shouldUnregister:r}=e,o=TB(a._names.array,t),l=vye({control:a,name:t,defaultValue:pe(a._formValues,t,pe(a._defaultValues,t,e.defaultValue)),exact:!0}),s=hye({control:a,name:t}),d=b.useRef(a.register(t,{...e.rules,value:l,...ya(e.disabled)?{disabled:e.disabled}:{}}));return b.useEffect(()=>{const c=a._options.shouldUnregister||r,u=(f,p)=>{const h=pe(a._fields,f);h&&(h._f.mount=p)};if(u(t,!0),c){const f=ut(pe(a._options.defaultValues,t));dn(a._defaultValues,t,f),yn(pe(a._formValues,t))&&dn(a._formValues,t,f)}return()=>{(o?c&&!a._state.action:c)?a.unregister(t):u(t,!1)}},[t,a,o,r]),b.useEffect(()=>{pe(a._fields,t)&&a._updateDisabledField({disabled:i,fields:a._fields,name:t,value:pe(a._fields,t)._f.value})},[i,t,a]),{field:{name:t,value:l,...ya(i)||s.disabled?{disabled:s.disabled||i}:{},onChange:b.useCallback(c=>d.current.onChange({target:{value:jB(c),name:t},type:vg.CHANGE}),[t]),onBlur:b.useCallback(()=>d.current.onBlur({target:{value:pe(a._formValues,t),name:t},type:vg.BLUR}),[t,a]),ref:c=>{const u=pe(a._fields,t);u&&c&&(u._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:f=>c.setCustomValidity(f),reportValidity:()=>c.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(s.errors,t)},isDirty:{enumerable:!0,get:()=>!!pe(s.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!pe(s.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!pe(s.validatingFields,t)},error:{enumerable:!0,get:()=>pe(s.errors,t)}})}}const ue=e=>e.render(kye(e));var gye=(e,n,t,i,a)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[i]:a||!0}}:{},no=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const t=(Math.random()*16+e)%16|0;return(n=="x"?t:t&3|8).toString(16)})},U0=(e,n,t={})=>t.shouldFocus||yn(t.shouldFocus)?t.focusName||`${e}.${yn(t.focusIndex)?n:t.focusIndex}.`:"",Iu=e=>({isOnSubmit:!e||e===Zi.onSubmit,isOnBlur:e===Zi.onBlur,isOnChange:e===Zi.onChange,isOnAll:e===Zi.all,isOnTouch:e===Zi.onTouched}),bx=(e,n,t)=>!t&&(n.watchAll||n.watch.has(e)||[...n.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const hd=(e,n,t,i)=>{for(const a of t||Object.keys(e)){const r=pe(e,a);if(r){const{_f:o,...l}=r;if(o){if(o.refs&&o.refs[0]&&n(o.refs[0],a)&&!i)break;if(o.ref&&n(o.ref,o.name)&&!i)break;hd(l,n)}else rt(l)&&hd(l,n)}}};var BB=(e,n,t)=>{const i=kc(pe(e,t));return dn(i,"root",n[t]),dn(e,t,i),e},N_=e=>e.type==="file",xo=e=>typeof e=="function",kg=e=>{if(!y_)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},ch=e=>nr(e),b_=e=>e.type==="radio",gg=e=>e instanceof RegExp;const y$={value:!1,isValid:!1},S$={value:!0,isValid:!0};var VB=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!yn(e[0].attributes.value)?yn(e[0].value)||e[0].value===""?S$:{value:e[0].value,isValid:!0}:S$:y$}return y$};const N$={isValid:!1,value:null};var WB=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,N$):N$;function b$(e,n,t="validate"){if(ch(e)||Array.isArray(e)&&e.every(ch)||ya(e)&&!e)return{type:t,message:ch(e)?e:"",ref:n}}var js=e=>rt(e)&&!gg(e)?e:{value:e,message:""},xx=async(e,n,t,i,a)=>{const{ref:r,refs:o,required:l,maxLength:s,minLength:d,min:c,max:u,pattern:f,validate:p,name:h,valueAsNumber:k,mount:y,disabled:g}=e._f,v=pe(n,h);if(!y||g)return{};const N=o?o[0]:r,x=D=>{i&&N.reportValidity&&(N.setCustomValidity(ya(D)?"":D||""),N.reportValidity())},F={},_=b_(r),w=rf(r),C=_||w,$=(k||N_(r))&&yn(r.value)&&yn(v)||kg(r)&&r.value===""||v===""||Array.isArray(v)&&!v.length,E=gye.bind(null,h,t,F),j=(D,M,R,I=mr.maxLength,L=mr.minLength)=>{const B=D?M:R;F[h]={type:D?I:L,message:B,ref:r,...E(D?I:L,B)}};if(a?!Array.isArray(v)||!v.length:l&&(!C&&($||Xt(v))||ya(v)&&!v||w&&!VB(o).isValid||_&&!WB(o).isValid)){const{value:D,message:M}=ch(l)?{value:!!l,message:l}:js(l);if(D&&(F[h]={type:mr.required,message:M,ref:N,...E(mr.required,M)},!t))return x(M),F}if(!$&&(!Xt(c)||!Xt(u))){let D,M;const R=js(u),I=js(c);if(!Xt(v)&&!isNaN(v)){const L=r.valueAsNumber||v&&+v;Xt(R.value)||(D=L>R.value),Xt(I.value)||(M=L<I.value)}else{const L=r.valueAsDate||new Date(v),B=A=>new Date(new Date().toDateString()+" "+A),O=r.type=="time",P=r.type=="week";nr(R.value)&&v&&(D=O?B(v)>B(R.value):P?v>R.value:L>new Date(R.value)),nr(I.value)&&v&&(M=O?B(v)<B(I.value):P?v<I.value:L<new Date(I.value))}if((D||M)&&(j(!!D,R.message,I.message,mr.max,mr.min),!t))return x(F[h].message),F}if((s||d)&&!$&&(nr(v)||a&&Array.isArray(v))){const D=js(s),M=js(d),R=!Xt(D.value)&&v.length>+D.value,I=!Xt(M.value)&&v.length<+M.value;if((R||I)&&(j(R,D.message,M.message),!t))return x(F[h].message),F}if(f&&!$&&nr(v)){const{value:D,message:M}=js(f);if(gg(D)&&!v.match(D)&&(F[h]={type:mr.pattern,message:M,ref:r,...E(mr.pattern,M)},!t))return x(M),F}if(p){if(xo(p)){const D=await p(v,n),M=b$(D,N);if(M&&(F[h]={...M,...E(mr.validate,M.message)},!t))return x(M.message),F}else if(rt(p)){let D={};for(const M in p){if(!wi(D)&&!t)break;const R=b$(await p[M](v,n),N,M);R&&(D={...R,...E(M,R.message)},x(R.message),t&&(F[h]=D))}if(!wi(D)&&(F[h]={ref:N,...D},!t))return F}}return x(!0),F},Y0=(e,n)=>[...e,...Ei(n)],G0=e=>Array.isArray(e)?e.map(()=>{}):void 0;function q0(e,n,t){return[...e.slice(0,n),...Ei(t),...e.slice(n)]}var K0=(e,n,t)=>Array.isArray(e)?(yn(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(n,1)[0]),e):[],X0=(e,n)=>[...Ei(n),...Ei(e)];function yye(e,n){let t=0;const i=[...e];for(const a of n)i.splice(a-t,1),t++;return kc(i).length?i:[]}var Q0=(e,n)=>yn(n)?[]:yye(e,Ei(n).sort((t,i)=>t-i)),Z0=(e,n,t)=>{[e[n],e[t]]=[e[t],e[n]]};function Sye(e,n){const t=n.slice(0,-1).length;let i=0;for(;i<t;)e=yn(e)?i++:e[n[i++]];return e}function Nye(e){for(const n in e)if(e.hasOwnProperty(n)&&!yn(e[n]))return!1;return!0}function dt(e,n){const t=Array.isArray(n)?n:S_(n)?[n]:zB(n),i=t.length===1?e:Sye(e,t),a=t.length-1,r=t[a];return i&&delete i[r],a!==0&&(rt(i)&&wi(i)||Array.isArray(i)&&Nye(i))&&dt(e,t.slice(0,-1)),e}var x$=(e,n,t)=>(e[n]=t,e);function bye(e){const n=SS(),{control:t=n.control,name:i,keyName:a="id",shouldUnregister:r}=e,[o,l]=b.useState(t._getFieldArray(i)),s=b.useRef(t._getFieldArray(i).map(no)),d=b.useRef(o),c=b.useRef(i),u=b.useRef(!1);c.current=i,d.current=o,t._names.array.add(i),e.rules&&t.register(i,e.rules),NS({next:({values:F,name:_})=>{if(_===c.current||!_){const w=pe(F,c.current);Array.isArray(w)&&(l(w),s.current=w.map(no))}},subject:t._subjects.array});const f=b.useCallback(F=>{u.current=!0,t._updateFieldArray(i,F)},[t,i]),p=(F,_)=>{const w=Ei(ut(F)),C=Y0(t._getFieldArray(i),w);t._names.focus=U0(i,C.length-1,_),s.current=Y0(s.current,w.map(no)),f(C),l(C),t._updateFieldArray(i,C,Y0,{argA:G0(F)})},h=(F,_)=>{const w=Ei(ut(F)),C=X0(t._getFieldArray(i),w);t._names.focus=U0(i,0,_),s.current=X0(s.current,w.map(no)),f(C),l(C),t._updateFieldArray(i,C,X0,{argA:G0(F)})},k=F=>{const _=Q0(t._getFieldArray(i),F);s.current=Q0(s.current,F),f(_),l(_),t._updateFieldArray(i,_,Q0,{argA:F})},y=(F,_,w)=>{const C=Ei(ut(_)),$=q0(t._getFieldArray(i),F,C);t._names.focus=U0(i,F,w),s.current=q0(s.current,F,C.map(no)),f($),l($),t._updateFieldArray(i,$,q0,{argA:F,argB:G0(_)})},g=(F,_)=>{const w=t._getFieldArray(i);Z0(w,F,_),Z0(s.current,F,_),f(w),l(w),t._updateFieldArray(i,w,Z0,{argA:F,argB:_},!1)},v=(F,_)=>{const w=t._getFieldArray(i);K0(w,F,_),K0(s.current,F,_),f(w),l(w),t._updateFieldArray(i,w,K0,{argA:F,argB:_},!1)},N=(F,_)=>{const w=ut(_),C=x$(t._getFieldArray(i),F,w);s.current=[...C].map(($,E)=>!$||E===F?no():s.current[E]),f(C),l([...C]),t._updateFieldArray(i,C,x$,{argA:F,argB:w},!0,!1)},x=F=>{const _=Ei(ut(F));s.current=_.map(no),f([..._]),l([..._]),t._updateFieldArray(i,[..._],w=>w,{},!0,!1)};return b.useEffect(()=>{if(t._state.action=!1,bx(i,t._names)&&t._subjects.state.next({...t._formState}),u.current&&(!Iu(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([i]).then(F=>{const _=pe(F.errors,i),w=pe(t._formState.errors,i);(w?!_&&w.type||_&&(w.type!==_.type||w.message!==_.message):_&&_.type)&&(_?dn(t._formState.errors,i,_):dt(t._formState.errors,i),t._subjects.state.next({errors:t._formState.errors}))});else{const F=pe(t._fields,i);F&&F._f&&!(Iu(t._options.reValidateMode).isOnSubmit&&Iu(t._options.mode).isOnSubmit)&&xx(F,t._formValues,t._options.criteriaMode===Zi.all,t._options.shouldUseNativeValidation,!0).then(_=>!wi(_)&&t._subjects.state.next({errors:BB(t._formState.errors,_,i)}))}t._subjects.values.next({name:i,values:{...t._formValues}}),t._names.focus&&hd(t._fields,(F,_)=>{if(t._names.focus&&_.startsWith(t._names.focus)&&F.focus)return F.focus(),1}),t._names.focus="",t._updateValid(),u.current=!1},[o,i,t]),b.useEffect(()=>(!pe(t._formValues,i)&&t._updateFieldArray(i),()=>{(t._options.shouldUnregister||r)&&t.unregister(i)}),[i,t,a,r]),{swap:b.useCallback(g,[f,i,t]),move:b.useCallback(v,[f,i,t]),prepend:b.useCallback(h,[f,i,t]),append:b.useCallback(p,[f,i,t]),remove:b.useCallback(k,[f,i,t]),insert:b.useCallback(y,[f,i,t]),update:b.useCallback(N,[f,i,t]),replace:b.useCallback(x,[f,i,t]),fields:b.useMemo(()=>o.map((F,_)=>({...F,[a]:s.current[_]||no()})),[o,a])}}var J0=()=>{let e=[];return{get observers(){return e},next:a=>{for(const r of e)r.next&&r.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(r=>r!==a)}}),unsubscribe:()=>{e=[]}}},yg=e=>Xt(e)||!IB(e);function Tl(e,n){if(yg(e)||yg(n))return e===n;if(td(e)&&td(n))return e.getTime()===n.getTime();const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;for(const a of t){const r=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const o=n[a];if(td(r)&&td(o)||rt(r)&&rt(o)||Array.isArray(r)&&Array.isArray(o)?!Tl(r,o):r!==o)return!1}}return!0}var HB=e=>e.type==="select-multiple",xye=e=>b_(e)||rf(e),eN=e=>kg(e)&&e.isConnected,Fye=e=>rt(e)&&Object.values(e).some(n=>n),UB=e=>{for(const n in e)if(xo(e[n]))return!0;return!1};function Sg(e,n={}){const t=Array.isArray(e);if(rt(e)||t)for(const i in e)Array.isArray(e[i])||rt(e[i])&&!UB(e[i])?(n[i]=Array.isArray(e[i])?[]:{},Sg(e[i],n[i])):Xt(e[i])||(n[i]=!0);return n}function YB(e,n,t){const i=Array.isArray(e);if(rt(e)||i)for(const a in e)Array.isArray(e[a])||rt(e[a])&&!UB(e[a])?yn(n)||yg(t[a])?t[a]=Array.isArray(e[a])?Sg(e[a],[]):{...Sg(e[a])}:YB(e[a],Xt(n)?{}:n[a],t[a]):t[a]=!Tl(e[a],n[a]);return t}var dp=(e,n)=>YB(e,n,Sg(n)),GB=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:i})=>yn(e)?e:n?e===""?NaN:e&&+e:t&&nr(e)?new Date(e):i?i(e):e;function nN(e){const n=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):n.disabled))return N_(n)?n.files:b_(n)?WB(e.refs).value:HB(n)?[...n.selectedOptions].map(({value:t})=>t):rf(n)?VB(e.refs).value:GB(yn(n.value)?e.ref.value:n.value,e)}var wye=(e,n,t,i)=>{const a={};for(const r of e){const o=pe(n,r);o&&dn(a,r,o._f)}return{criteriaMode:t,names:[...e],fields:a,shouldUseNativeValidation:i}},Gc=e=>yn(e)?e:gg(e)?e.source:rt(e)?gg(e.value)?e.value.source:e.value:e,_ye=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function F$(e,n,t){const i=pe(e,t);if(i||S_(t))return{error:i,name:t};const a=t.split(".");for(;a.length;){const r=a.join("."),o=pe(n,r),l=pe(e,r);if(o&&!Array.isArray(o)&&t!==r)return{name:t};if(l&&l.type)return{name:r,error:l};a.pop()}return{name:t}}var Cye=(e,n,t,i,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(n||e):(t?i.isOnBlur:a.isOnBlur)?!e:(t?i.isOnChange:a.isOnChange)?e:!0,Pye=(e,n)=>!kc(pe(e,n)).length&&dt(e,n);const Oye={mode:Zi.onSubmit,reValidateMode:Zi.onChange,shouldFocusError:!0};function Dye(e={}){let n={...Oye,...e},t={submitCount:0,isDirty:!1,isLoading:xo(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},a=rt(n.defaultValues)||rt(n.values)?ut(n.defaultValues||n.values)||{}:{},r=n.shouldUnregister?{}:ut(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},s,d=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:J0(),array:J0(),state:J0()},f=Iu(n.mode),p=Iu(n.reValidateMode),h=n.criteriaMode===Zi.all,k=z=>H=>{clearTimeout(d),d=setTimeout(z,H)},y=async z=>{if(c.isValid||z){const H=n.resolver?wi((await C()).errors):await E(i,!0);H!==t.isValid&&u.state.next({isValid:H})}},g=(z,H)=>{(c.isValidating||c.validatingFields)&&(H.forEach(W=>{dn(t.validatingFields,W,z)}),t.isValidating=Fye(t.validatingFields),u.state.next({validatingFields:t.validatingFields,isValidating:t.isValidating}))},v=(z,H=[],W,ee,J=!0,Q=!0)=>{if(ee&&W){if(o.action=!0,Q&&Array.isArray(pe(i,z))){const Y=W(pe(i,z),ee.argA,ee.argB);J&&dn(i,z,Y)}if(Q&&Array.isArray(pe(t.errors,z))){const Y=W(pe(t.errors,z),ee.argA,ee.argB);J&&dn(t.errors,z,Y),Pye(t.errors,z)}if(c.touchedFields&&Q&&Array.isArray(pe(t.touchedFields,z))){const Y=W(pe(t.touchedFields,z),ee.argA,ee.argB);J&&dn(t.touchedFields,z,Y)}c.dirtyFields&&(t.dirtyFields=dp(a,r)),u.state.next({name:z,isDirty:D(z,H),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else dn(r,z,H)},N=(z,H)=>{dn(t.errors,z,H),u.state.next({errors:t.errors})},x=z=>{t.errors=z,u.state.next({errors:t.errors,isValid:!1})},F=(z,H,W,ee)=>{const J=pe(i,z);if(J){const Q=pe(r,z,yn(W)?pe(a,z):W);yn(Q)||ee&&ee.defaultChecked||H?dn(r,z,H?Q:nN(J._f)):I(z,Q),o.mount&&y()}},_=(z,H,W,ee,J)=>{let Q=!1,Y=!1;const se={name:z},Ce=!!(pe(i,z)&&pe(i,z)._f.disabled);if(!W||ee){c.isDirty&&(Y=t.isDirty,t.isDirty=se.isDirty=D(),Q=Y!==se.isDirty);const Ae=Ce||Tl(pe(a,z),H);Y=!!(!Ce&&pe(t.dirtyFields,z)),Ae||Ce?dt(t.dirtyFields,z):dn(t.dirtyFields,z,!0),se.dirtyFields=t.dirtyFields,Q=Q||c.dirtyFields&&Y!==!Ae}if(W){const Ae=pe(t.touchedFields,z);Ae||(dn(t.touchedFields,z,W),se.touchedFields=t.touchedFields,Q=Q||c.touchedFields&&Ae!==W)}return Q&&J&&u.state.next(se),Q?se:{}},w=(z,H,W,ee)=>{const J=pe(t.errors,z),Q=c.isValid&&ya(H)&&t.isValid!==H;if(e.delayError&&W?(s=k(()=>N(z,W)),s(e.delayError)):(clearTimeout(d),s=null,W?dn(t.errors,z,W):dt(t.errors,z)),(W?!Tl(J,W):J)||!wi(ee)||Q){const Y={...ee,...Q&&ya(H)?{isValid:H}:{},errors:t.errors,name:z};t={...t,...Y},u.state.next(Y)}g(!1,Object.keys(t.validatingFields).filter(Y=>Y===z))},C=async z=>n.resolver(r,n.context,wye(z||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),$=async z=>{const{errors:H}=await C(z);if(z)for(const W of z){const ee=pe(H,W);ee?dn(t.errors,W,ee):dt(t.errors,W)}else t.errors=H;return H},E=async(z,H,W={valid:!0})=>{for(const ee in z){const J=z[ee];if(J){const{_f:Q,...Y}=J;if(Q){const se=l.array.has(Q.name),Ce=await xx(J,r,h,n.shouldUseNativeValidation&&!H,se);if(Ce[Q.name]&&(W.valid=!1,H))break;!H&&(pe(Ce,Q.name)?se?BB(t.errors,Ce,Q.name):dn(t.errors,Q.name,Ce[Q.name]):dt(t.errors,Q.name))}Y&&await E(Y,H,W)}}return W.valid},j=()=>{for(const z of l.unMount){const H=pe(i,z);H&&(H._f.refs?H._f.refs.every(W=>!eN(W)):!eN(H._f.ref))&&Z(z)}l.unMount=new Set},D=(z,H)=>(z&&H&&dn(r,z,H),!Tl(V(),a)),M=(z,H,W)=>LB(z,l,{...o.mount?r:yn(H)?a:nr(z)?{[z]:H}:H},W,H),R=z=>kc(pe(o.mount?r:a,z,e.shouldUnregister?pe(a,z,[]):[])),I=(z,H,W={})=>{const ee=pe(i,z);let J=H;if(ee){const Q=ee._f;Q&&(!Q.disabled&&dn(r,z,GB(H,Q)),J=kg(Q.ref)&&Xt(H)?"":H,HB(Q.ref)?[...Q.ref.options].forEach(Y=>Y.selected=J.includes(Y.value)):Q.refs?rf(Q.ref)?Q.refs.length>1?Q.refs.forEach(Y=>(!Y.defaultChecked||!Y.disabled)&&(Y.checked=Array.isArray(J)?!!J.find(se=>se===Y.value):J===Y.value)):Q.refs[0]&&(Q.refs[0].checked=!!J):Q.refs.forEach(Y=>Y.checked=Y.value===J):N_(Q.ref)?Q.ref.value="":(Q.ref.value=J,Q.ref.type||u.values.next({name:z,values:{...r}})))}(W.shouldDirty||W.shouldTouch)&&_(z,J,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&A(z)},L=(z,H,W)=>{for(const ee in H){const J=H[ee],Q=`${z}.${ee}`,Y=pe(i,Q);(l.array.has(z)||!yg(J)||Y&&!Y._f)&&!td(J)?L(Q,J,W):I(Q,J,W)}},B=(z,H,W={})=>{const ee=pe(i,z),J=l.array.has(z),Q=ut(H);dn(r,z,Q),J?(u.array.next({name:z,values:{...r}}),(c.isDirty||c.dirtyFields)&&W.shouldDirty&&u.state.next({name:z,dirtyFields:dp(a,r),isDirty:D(z,Q)})):ee&&!ee._f&&!Xt(Q)?L(z,Q,W):I(z,Q,W),bx(z,l)&&u.state.next({...t}),u.values.next({name:o.mount?z:void 0,values:{...r}})},O=async z=>{const H=z.target;let W=H.name,ee=!0;const J=pe(i,W),Q=()=>H.type?nN(J._f):jB(z),Y=se=>{ee=Number.isNaN(se)||se===pe(r,W,se)};if(J){let se,Ce;const Ae=Q(),Te=z.type===vg.BLUR||z.type===vg.FOCUS_OUT,cn=!_ye(J._f)&&!n.resolver&&!pe(t.errors,W)&&!J._f.deps||Cye(Te,pe(t.touchedFields,W),t.isSubmitted,p,f),nn=bx(W,l,Te);dn(r,W,Ae),Te?(J._f.onBlur&&J._f.onBlur(z),s&&s(0)):J._f.onChange&&J._f.onChange(z);const un=_(W,Ae,Te,!1),$n=!wi(un)||nn;if(!Te&&u.values.next({name:W,type:z.type,values:{...r}}),cn)return c.isValid&&y(),$n&&u.state.next({name:W,...nn?{}:un});if(!Te&&nn&&u.state.next({...t}),g(!0,[W]),n.resolver){const{errors:qe}=await C([W]);if(Y(Ae),ee){const ke=F$(t.errors,i,W),_e=F$(qe,i,ke.name||W);se=_e.error,W=_e.name,Ce=wi(qe)}}else se=(await xx(J,r,h,n.shouldUseNativeValidation))[W],Y(Ae),ee&&(se?Ce=!1:c.isValid&&(Ce=await E(i,!0)));ee&&(J._f.deps&&A(J._f.deps),w(W,Ce,se,un))}},P=(z,H)=>{if(pe(t.errors,H)&&z.focus)return z.focus(),1},A=async(z,H={})=>{let W,ee;const J=Ei(z);if(g(!0,J),n.resolver){const Q=await $(yn(z)?z:J);W=wi(Q),ee=z?!J.some(Y=>pe(Q,Y)):W}else z?(ee=(await Promise.all(J.map(async Q=>{const Y=pe(i,Q);return await E(Y&&Y._f?{[Q]:Y}:Y)}))).every(Boolean),!(!ee&&!t.isValid)&&y()):ee=W=await E(i);return u.state.next({...!nr(z)||c.isValid&&W!==t.isValid?{}:{name:z},...n.resolver||!z?{isValid:W}:{},errors:t.errors,isValidating:!1}),H.shouldFocus&&!ee&&hd(i,P,z?J:l.mount),ee},V=z=>{const H={...a,...o.mount?r:{}};return yn(z)?H:nr(z)?pe(H,z):z.map(W=>pe(H,W))},U=(z,H)=>({invalid:!!pe((H||t).errors,z),isDirty:!!pe((H||t).dirtyFields,z),isTouched:!!pe((H||t).touchedFields,z),isValidating:!!pe((H||t).validatingFields,z),error:pe((H||t).errors,z)}),oe=z=>{z&&Ei(z).forEach(H=>dt(t.errors,H)),u.state.next({errors:z?t.errors:{}})},G=(z,H,W)=>{const ee=(pe(i,z,{_f:{}})._f||{}).ref;dn(t.errors,z,{...H,ref:ee}),u.state.next({name:z,errors:t.errors,isValid:!1}),W&&W.shouldFocus&&ee&&ee.focus&&ee.focus()},ne=(z,H)=>xo(z)?u.values.subscribe({next:W=>z(M(void 0,H),W)}):M(z,H,!0),Z=(z,H={})=>{for(const W of z?Ei(z):l.mount)l.mount.delete(W),l.array.delete(W),H.keepValue||(dt(i,W),dt(r,W)),!H.keepError&&dt(t.errors,W),!H.keepDirty&&dt(t.dirtyFields,W),!H.keepTouched&&dt(t.touchedFields,W),!H.keepIsValidating&&dt(t.validatingFields,W),!n.shouldUnregister&&!H.keepDefaultValue&&dt(a,W);u.values.next({values:{...r}}),u.state.next({...t,...H.keepDirty?{isDirty:D()}:{}}),!H.keepIsValid&&y()},ce=({disabled:z,name:H,field:W,fields:ee,value:J})=>{if(ya(z)){const Q=z?void 0:yn(J)?nN(W?W._f:pe(ee,H)._f):J;dn(r,H,Q),_(H,Q,!1,!1,!0)}},ie=(z,H={})=>{let W=pe(i,z);const ee=ya(H.disabled);return dn(i,z,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:z}},name:z,mount:!0,...H}}),l.mount.add(z),W?ce({field:W,disabled:H.disabled,name:z,value:H.value}):F(z,!0,H.value),{...ee?{disabled:H.disabled}:{},...n.progressive?{required:!!H.required,min:Gc(H.min),max:Gc(H.max),minLength:Gc(H.minLength),maxLength:Gc(H.maxLength),pattern:Gc(H.pattern)}:{},name:z,onChange:O,onBlur:O,ref:J=>{if(J){ie(z,H),W=pe(i,z);const Q=yn(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,Y=xye(Q),se=W._f.refs||[];if(Y?se.find(Ce=>Ce===Q):Q===W._f.ref)return;dn(i,z,{_f:{...W._f,...Y?{refs:[...se.filter(eN),Q,...Array.isArray(pe(a,z))?[{}]:[]],ref:{type:Q.type,name:z}}:{ref:Q}}}),F(z,!1,void 0,Q)}else W=pe(i,z,{}),W._f&&(W._f.mount=!1),(n.shouldUnregister||H.shouldUnregister)&&!(TB(l.array,z)&&o.action)&&l.unMount.add(z)}}},ve=()=>n.shouldFocusError&&hd(i,P,l.mount),he=z=>{ya(z)&&(u.state.next({disabled:z}),hd(i,(H,W)=>{let ee=z;const J=pe(i,W);J&&ya(J._f.disabled)&&(ee||(ee=J._f.disabled)),H.disabled=ee},0,!1))},ge=(z,H)=>async W=>{let ee;W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let J=ut(r);if(u.state.next({isSubmitting:!0}),n.resolver){const{errors:Q,values:Y}=await C();t.errors=Q,J=Y}else await E(i);if(dt(t.errors,"root"),wi(t.errors)){u.state.next({errors:{}});try{await z(J,W)}catch(Q){ee=Q}}else H&&await H({...t.errors},W),ve(),setTimeout(ve);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wi(t.errors)&&!ee,submitCount:t.submitCount+1,errors:t.errors}),ee)throw ee},K=(z,H={})=>{pe(i,z)&&(yn(H.defaultValue)?B(z,ut(pe(a,z))):(B(z,H.defaultValue),dn(a,z,ut(H.defaultValue))),H.keepTouched||dt(t.touchedFields,z),H.keepDirty||(dt(t.dirtyFields,z),t.isDirty=H.defaultValue?D(z,ut(pe(a,z))):D()),H.keepError||(dt(t.errors,z),c.isValid&&y()),u.state.next({...t}))},de=(z,H={})=>{const W=z?ut(z):a,ee=ut(W),J=wi(z),Q=J?a:ee;if(H.keepDefaultValues||(a=W),!H.keepValues){if(H.keepDirtyValues)for(const Y of l.mount)pe(t.dirtyFields,Y)?dn(Q,Y,pe(r,Y)):B(Y,pe(Q,Y));else{if(y_&&yn(z))for(const Y of l.mount){const se=pe(i,Y);if(se&&se._f){const Ce=Array.isArray(se._f.refs)?se._f.refs[0]:se._f.ref;if(kg(Ce)){const Ae=Ce.closest("form");if(Ae){Ae.reset();break}}}}i={}}r=e.shouldUnregister?H.keepDefaultValues?ut(a):{}:ut(Q),u.array.next({values:{...Q}}),u.values.next({values:{...Q}})}l={mount:H.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!H.keepIsValid||!!H.keepDirtyValues,o.watch=!!e.shouldUnregister,u.state.next({submitCount:H.keepSubmitCount?t.submitCount:0,isDirty:J?!1:H.keepDirty?t.isDirty:!!(H.keepDefaultValues&&!Tl(z,a)),isSubmitted:H.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:J?[]:H.keepDirtyValues?H.keepDefaultValues&&r?dp(a,r):t.dirtyFields:H.keepDefaultValues&&z?dp(a,z):{},touchedFields:H.keepTouched?t.touchedFields:{},errors:H.keepErrors?t.errors:{},isSubmitSuccessful:H.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},be=(z,H)=>de(xo(z)?z(r):z,H);return{control:{register:ie,unregister:Z,getFieldState:U,handleSubmit:ge,setError:G,_executeSchema:C,_getWatch:M,_getDirty:D,_updateValid:y,_removeUnmounted:j,_updateFieldArray:v,_updateDisabledField:ce,_getFieldArray:R,_reset:de,_resetDefaultValues:()=>xo(n.defaultValues)&&n.defaultValues().then(z=>{be(z,n.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:z=>{t={...t,...z}},_disableForm:he,_subjects:u,_proxyFormState:c,_setErrors:x,get _fields(){return i},get _formValues(){return r},get _state(){return o},set _state(z){o=z},get _defaultValues(){return a},get _names(){return l},set _names(z){l=z},get _formState(){return t},set _formState(z){t=z},get _options(){return n},set _options(z){n={...n,...z}}},trigger:A,register:ie,handleSubmit:ge,watch:ne,setValue:B,getValues:V,reset:be,resetField:K,clearErrors:oe,unregister:Z,setError:G,setFocus:(z,H={})=>{const W=pe(i,z),ee=W&&W._f;if(ee){const J=ee.refs?ee.refs[0]:ee.ref;J.focus&&(J.focus(),H.shouldSelect&&J.select())}},getFieldState:U}}function ki(e={}){const n=b.useRef(),t=b.useRef(),[i,a]=b.useState({isDirty:!1,isValidating:!1,isLoading:xo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:xo(e.defaultValues)?void 0:e.defaultValues});n.current||(n.current={...Dye(e),formState:i});const r=n.current.control;return r._options=e,NS({subject:r._subjects.state,next:o=>{RB(o,r._proxyFormState,r._updateFormState,!0)&&a({...r._formState})}}),b.useEffect(()=>r._disableForm(e.disabled),[r,e.disabled]),b.useEffect(()=>{if(r._proxyFormState.isDirty){const o=r._getDirty();o!==i.isDirty&&r._subjects.state.next({isDirty:o})}},[r,i.isDirty]),b.useEffect(()=>{e.values&&!Tl(e.values,t.current)?(r._reset(e.values,r._options.resetOptions),t.current=e.values,a(o=>({...o}))):r._resetDefaultValues()},[e.values,r]),b.useEffect(()=>{e.errors&&r._setErrors(e.errors)},[e.errors,r]),b.useEffect(()=>{r._state.mount||(r._updateValid(),r._state.mount=!0),r._state.watch&&(r._state.watch=!1,r._subjects.state.next({...r._formState})),r._removeUnmounted()}),b.useEffect(()=>{e.shouldUnregister&&r._subjects.values.next({values:r._getWatch()})},[e.shouldUnregister,r]),n.current.formState=AB(i,r),n.current}const Eye=()=>{const[{fetching:e},n]=at(Jke);return{fetching:e,fetchIncomeDocuments:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error fetching documents owned by [${t.ownerId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?(re({title:"Update Success!",message:r.data.fetchIncomeDocuments.length>0?"New documents fetched! 🎉":"No new documents found"}),i(r.data.fetchIncomeDocuments)):(console.error(`Error fetching documents owned by [${t.ownerId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function $ye(){const[e,n]=S.useState(!1),[t,{close:i,open:a}]=tl(!1);return m.jsxs(m.Fragment,{children:[m.jsx(Pe,{loading:e,size:30,onClick:a,children:m.jsx(mq,{size:20})}),t&&m.jsx(Iye,{opened:t,close:i,setIsLoading:n})]})}function Iye({opened:e,close:n,setIsLoading:t}){const[i,a]=S.useState([]),[{data:r,fetching:o,error:l}]=Be({query:Hr}),{control:s,handleSubmit:d}=ki({defaultValues:{ownerId:"6a20aa69-57ff-446e-8d6a-1e96d095e988"}});S.useEffect(()=>{var p;(p=r==null?void 0:r.allFinancialEntities)!=null&&p.nodes.length&&a(r.allFinancialEntities.nodes.map(h=>({value:h.id,label:h.name})).sort((h,k)=>h.label>k.label?1:-1))},[r,a]),S.useEffect(()=>{l&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[l]);const{fetchIncomeDocuments:c,fetching:u}=Eye();S.useEffect(()=>{t(o||u)},[o,u,t]);const f=p=>{c(p),n()};return m.jsxs(Ht,{opened:e,onClose:n,size:"auto",centered:!0,children:[m.jsx(Ht.Title,{children:"Fetch Income Documents"}),m.jsxs(Ht.Body,{children:[o?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:d(f),children:[m.jsx(ue,{name:"ownerId",control:s,render:({field:p,fieldState:h})=>{var k;return m.jsx(Gn,{...p,data:i,value:p.value,disabled:o,label:"Owner:",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(k=h.error)==null?void 0:k.message})}}),m.jsx("div",{className:"flex justify-center mt-5 gap-3",children:m.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Fetch"})})]})]})]})}function qB(e){return m.jsx(tt,{disabled:!e.tooltip,label:e.tooltip,children:m.jsx(Pe,{...e,children:m.jsx(Mq,{size:20})})})}function jye(){const[e,{close:n,open:t}]=tl(!1),i=ac(),a=S.useCallback(()=>{i("/login"),n()},[i,n]);return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:e,onClose:n,onConfirm:a,title:"Are you sure you want to logout?"}),m.jsx(tt,{label:"Logout",children:m.jsx(Pe,{size:30,onClick:t,children:m.jsx(xq,{size:20})})})]})}const Tye=()=>{const[{fetching:e},n]=at(age);return{fetching:e,regenerateLedgerRecords:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error regenerating ledger for charge ID [${t.chargeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.regenerateLedgerRecords.__typename==="CommonError"?(console.error(`Error regenerating ledger for charge ID [${t.chargeId}]: ${r.data.regenerateLedgerRecords.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.regenerateLedgerRecords.message)):(re({title:"Regenerate Success!",message:"Ledger records were regenerated"}),i(r.data.regenerateLedgerRecords)):(console.error(`Error regenerating ledger for charge ID [${t.chargeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function Aye({chargeId:e,...n}){const[t,i]=S.useState(!1),{regenerateLedgerRecords:a}=Tye();function r(){a({chargeId:e}),i(!1)}return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:t,onClose:()=>i(!1),onConfirm:r,title:"Are you sure you want to regenerate ledger records?"}),m.jsx(tt,{label:"Regenerate Ledger",children:m.jsx(Pe,{onClick:()=>i(!0),...n,children:m.jsx(jq,{size:20})})})]})}function x_(e){const{toggleExpansion:n,isExpanded:t,onClickAction:i}=e;return m.jsx(tt,{label:"Expand info",children:m.jsx(Pe,{variant:"default",onClick:()=>{n(a=>(i&&i(a),!a))},size:30,children:t?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})})}function F_(e){const{mergeSelected:n,toggleMergeSelected:t}=e,[i,a]=S.useState(n?"filled":"subtle"),[r,o]=S.useState(n?"blue":"gray");return S.useEffect(()=>{a(n?"filled":"subtle"),o(n?"blue":"gray")},[n]),m.jsx(tt,{label:"Select for merge",children:m.jsx(Pe,{onClick:()=>t(),variant:i,color:r,className:n?"bg-blue-500":void 0,children:m.jsx(T5,{size:20,color:r})})})}const ys=e=>{const n=()=>{console.log("clipboard successfully set")},t=()=>{console.log("clipboard failed")};navigator.clipboard.writeText(e).then(n,t)},Ia=/^((?:1[6-9]|[2]\d)\d{2})(-)(?:((?:0[13578]|1[02])(-31))|(?:(?:0[1,3-9]|1[0-2])(-)(?:29|30)))$|^(?:(?:(?:1[6-9]|[2]\d)(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(-02-29)$|^(?:(?:1[6-9]|[2-9]\d)\d{2})(-)(?:(?:0[1-9])|(?:1[0-2]))(-)(?:0[1-9]|1\d|2[0-8])$/,Rye=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,bS="00000000-0000-0000-0000-000000000000";function cp(e){let n="₪";return e==="USD"?n="$":e==="EUR"?n="€":e==="GBP"?n="£":e==="GRT"?n="GRT":e==="USDC"?n="USDC":e==="ETH"&&(n="ETH"),n}function oa(e){const n=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&n==="[object Date]"?new e.constructor(+e):typeof e=="number"||n==="[object Number]"||typeof e=="string"||n==="[object String]"?new Date(e):new Date(NaN)}function as(e,n){return e instanceof Date?new e.constructor(n):new Date(n)}const KB=6048e5,Mye=864e5;let Lye={};function xS(){return Lye}function km(e,n){var l,s,d,c;const t=xS(),i=(n==null?void 0:n.weekStartsOn)??((s=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:s.weekStartsOn)??t.weekStartsOn??((c=(d=t.locale)==null?void 0:d.options)==null?void 0:c.weekStartsOn)??0,a=oa(e),r=a.getDay(),o=(r<i?7:0)+r-i;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Ng(e){return km(e,{weekStartsOn:1})}function XB(e){const n=oa(e),t=n.getFullYear(),i=as(e,0);i.setFullYear(t+1,0,4),i.setHours(0,0,0,0);const a=Ng(i),r=as(e,0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);const o=Ng(r);return n.getTime()>=a.getTime()?t+1:n.getTime()>=o.getTime()?t:t-1}function w$(e){const n=oa(e);return n.setHours(0,0,0,0),n}function _$(e){const n=oa(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function zye(e,n){const t=w$(e),i=w$(n),a=+t-_$(t),r=+i-_$(i);return Math.round((a-r)/Mye)}function Bye(e){const n=XB(e),t=as(e,0);return t.setFullYear(n,0,4),t.setHours(0,0,0,0),Ng(t)}function Vye(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wye(e){if(!Vye(e)&&typeof e!="number")return!1;const n=oa(e);return!isNaN(Number(n))}function QB(e){const n=oa(e),t=as(e,0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}const Hye={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"}},Uye=(e,n,t)=>{let i;const a=Hye[e];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+i:i+" ago":i};function tN(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const Yye={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gye={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qye={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Kye={date:tN({formats:Yye,defaultWidth:"full"}),time:tN({formats:Gye,defaultWidth:"full"}),dateTime:tN({formats:qye,defaultWidth:"full"})},Xye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qye=(e,n,t,i)=>Xye[e];function qc(e){return(n,t)=>{const i=t!=null&&t.context?String(t.context):"standalone";let a;if(i==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[l]||e.values[o]}const r=e.argumentCallback?e.argumentCallback(n):n;return a[r]}}const Zye={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jye={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eSe={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"]},nSe={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"]},tSe={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"}},iSe={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"}},aSe=(e,n)=>{const t=Number(e),i=t%100;if(i>20||i<10)switch(i%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},rSe={ordinalNumber:aSe,era:qc({values:Zye,defaultWidth:"wide"}),quarter:qc({values:Jye,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qc({values:eSe,defaultWidth:"wide"}),day:qc({values:nSe,defaultWidth:"wide"}),dayPeriod:qc({values:tSe,defaultWidth:"wide",formattingValues:iSe,defaultFormattingWidth:"wide"})};function Kc(e){return(n,t={})=>{const i=t.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],r=n.match(a);if(!r)return null;const o=r[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?lSe(l,u=>u.test(o)):oSe(l,u=>u.test(o));let d;d=e.valueCallback?e.valueCallback(s):s,d=t.valueCallback?t.valueCallback(d):d;const c=n.slice(o.length);return{value:d,rest:c}}}function oSe(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function lSe(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function sSe(e){return(n,t={})=>{const i=n.match(e.matchPattern);if(!i)return null;const a=i[0],r=n.match(e.parsePattern);if(!r)return null;let o=e.valueCallback?e.valueCallback(r[0]):r[0];o=t.valueCallback?t.valueCallback(o):o;const l=n.slice(a.length);return{value:o,rest:l}}}const dSe=/^(\d+)(th|st|nd|rd)?/i,cSe=/\d+/i,uSe={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},mSe={any:[/^b/i,/^(a|c)/i]},fSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pSe={any:[/1/i,/2/i,/3/i,/4/i]},hSe={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},vSe={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]},kSe={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},gSe={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]},ySe={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},SSe={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}},NSe={ordinalNumber:sSe({matchPattern:dSe,parsePattern:cSe,valueCallback:e=>parseInt(e,10)}),era:Kc({matchPatterns:uSe,defaultMatchWidth:"wide",parsePatterns:mSe,defaultParseWidth:"any"}),quarter:Kc({matchPatterns:fSe,defaultMatchWidth:"wide",parsePatterns:pSe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Kc({matchPatterns:hSe,defaultMatchWidth:"wide",parsePatterns:vSe,defaultParseWidth:"any"}),day:Kc({matchPatterns:kSe,defaultMatchWidth:"wide",parsePatterns:gSe,defaultParseWidth:"any"}),dayPeriod:Kc({matchPatterns:ySe,defaultMatchWidth:"any",parsePatterns:SSe,defaultParseWidth:"any"})},bSe={code:"en-US",formatDistance:Uye,formatLong:Kye,formatRelative:Qye,localize:rSe,match:NSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function xSe(e){const n=oa(e);return zye(n,QB(n))+1}function FSe(e){const n=oa(e),t=+Ng(n)-+Bye(n);return Math.round(t/KB)+1}function ZB(e,n){var c,u,f,p;const t=oa(e),i=t.getFullYear(),a=xS(),r=(n==null?void 0:n.firstWeekContainsDate)??((u=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(f=a.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=as(e,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const l=km(o,n),s=as(e,0);s.setFullYear(i,0,r),s.setHours(0,0,0,0);const d=km(s,n);return t.getTime()>=l.getTime()?i+1:t.getTime()>=d.getTime()?i:i-1}function wSe(e,n){var l,s,d,c;const t=xS(),i=(n==null?void 0:n.firstWeekContainsDate)??((s=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:s.firstWeekContainsDate)??t.firstWeekContainsDate??((c=(d=t.locale)==null?void 0:d.options)==null?void 0:c.firstWeekContainsDate)??1,a=ZB(e,n),r=as(e,0);return r.setFullYear(a,0,i),r.setHours(0,0,0,0),km(r,n)}function _Se(e,n){const t=oa(e),i=+km(t,n)-+wSe(t,n);return Math.round(i/KB)+1}function rn(e,n){const t=e<0?"-":"",i=Math.abs(e).toString().padStart(n,"0");return t+i}const to={y(e,n){const t=e.getFullYear(),i=t>0?t:1-t;return rn(n==="yy"?i%100:i,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):rn(t+1,2)},d(e,n){return rn(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return rn(e.getHours()%12||12,n.length)},H(e,n){return rn(e.getHours(),n.length)},m(e,n){return rn(e.getMinutes(),n.length)},s(e,n){return rn(e.getSeconds(),n.length)},S(e,n){const t=n.length,i=e.getMilliseconds(),a=Math.trunc(i*Math.pow(10,t-3));return rn(a,n.length)}},Ts={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},C$={G:function(e,n,t){const i=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(i,{width:"abbreviated"});case"GGGGG":return t.era(i,{width:"narrow"});case"GGGG":default:return t.era(i,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const i=e.getFullYear(),a=i>0?i:1-i;return t.ordinalNumber(a,{unit:"year"})}return to.y(e,n)},Y:function(e,n,t,i){const a=ZB(e,i),r=a>0?a:1-a;if(n==="YY"){const o=r%100;return rn(o,2)}return n==="Yo"?t.ordinalNumber(r,{unit:"year"}):rn(r,n.length)},R:function(e,n){const t=XB(e);return rn(t,n.length)},u:function(e,n){const t=e.getFullYear();return rn(t,n.length)},Q:function(e,n,t){const i=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return rn(i,2);case"Qo":return t.ordinalNumber(i,{unit:"quarter"});case"QQQ":return t.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,n,t){const i=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return rn(i,2);case"qo":return t.ordinalNumber(i,{unit:"quarter"});case"qqq":return t.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,n,t){const i=e.getMonth();switch(n){case"M":case"MM":return to.M(e,n);case"Mo":return t.ordinalNumber(i+1,{unit:"month"});case"MMM":return t.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(i,{width:"wide",context:"formatting"})}},L:function(e,n,t){const i=e.getMonth();switch(n){case"L":return String(i+1);case"LL":return rn(i+1,2);case"Lo":return t.ordinalNumber(i+1,{unit:"month"});case"LLL":return t.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(i,{width:"wide",context:"standalone"})}},w:function(e,n,t,i){const a=_Se(e,i);return n==="wo"?t.ordinalNumber(a,{unit:"week"}):rn(a,n.length)},I:function(e,n,t){const i=FSe(e);return n==="Io"?t.ordinalNumber(i,{unit:"week"}):rn(i,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):to.d(e,n)},D:function(e,n,t){const i=xSe(e);return n==="Do"?t.ordinalNumber(i,{unit:"dayOfYear"}):rn(i,n.length)},E:function(e,n,t){const i=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(i,{width:"short",context:"formatting"});case"EEEE":default:return t.day(i,{width:"wide",context:"formatting"})}},e:function(e,n,t,i){const a=e.getDay(),r=(a-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(r);case"ee":return rn(r,2);case"eo":return t.ordinalNumber(r,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(e,n,t,i){const a=e.getDay(),r=(a-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(r);case"cc":return rn(r,n.length);case"co":return t.ordinalNumber(r,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(e,n,t){const i=e.getDay(),a=i===0?7:i;switch(n){case"i":return String(a);case"ii":return rn(a,n.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(i,{width:"short",context:"formatting"});case"iiii":default:return t.day(i,{width:"wide",context:"formatting"})}},a:function(e,n,t){const a=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,n,t){const i=e.getHours();let a;switch(i===12?a=Ts.noon:i===0?a=Ts.midnight:a=i/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,n,t){const i=e.getHours();let a;switch(i>=17?a=Ts.evening:i>=12?a=Ts.afternoon:i>=4?a=Ts.morning:a=Ts.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let i=e.getHours()%12;return i===0&&(i=12),t.ordinalNumber(i,{unit:"hour"})}return to.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):to.H(e,n)},K:function(e,n,t){const i=e.getHours()%12;return n==="Ko"?t.ordinalNumber(i,{unit:"hour"}):rn(i,n.length)},k:function(e,n,t){let i=e.getHours();return i===0&&(i=24),n==="ko"?t.ordinalNumber(i,{unit:"hour"}):rn(i,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):to.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):to.s(e,n)},S:function(e,n){return to.S(e,n)},X:function(e,n,t){const i=e.getTimezoneOffset();if(i===0)return"Z";switch(n){case"X":return O$(i);case"XXXX":case"XX":return _l(i);case"XXXXX":case"XXX":default:return _l(i,":")}},x:function(e,n,t){const i=e.getTimezoneOffset();switch(n){case"x":return O$(i);case"xxxx":case"xx":return _l(i);case"xxxxx":case"xxx":default:return _l(i,":")}},O:function(e,n,t){const i=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+P$(i,":");case"OOOO":default:return"GMT"+_l(i,":")}},z:function(e,n,t){const i=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+P$(i,":");case"zzzz":default:return"GMT"+_l(i,":")}},t:function(e,n,t){const i=Math.trunc(e.getTime()/1e3);return rn(i,n.length)},T:function(e,n,t){const i=e.getTime();return rn(i,n.length)}};function P$(e,n=""){const t=e>0?"-":"+",i=Math.abs(e),a=Math.trunc(i/60),r=i%60;return r===0?t+String(a):t+String(a)+n+rn(r,2)}function O$(e,n){return e%60===0?(e>0?"-":"+")+rn(Math.abs(e)/60,2):_l(e,n)}function _l(e,n=""){const t=e>0?"-":"+",i=Math.abs(e),a=rn(Math.trunc(i/60),2),r=rn(i%60,2);return t+a+n+r}const D$=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},JB=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},CSe=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],i=t[1],a=t[2];if(!a)return D$(e,n);let r;switch(i){case"P":r=n.dateTime({width:"short"});break;case"PP":r=n.dateTime({width:"medium"});break;case"PPP":r=n.dateTime({width:"long"});break;case"PPPP":default:r=n.dateTime({width:"full"});break}return r.replace("{{date}}",D$(i,n)).replace("{{time}}",JB(a,n))},PSe={p:JB,P:CSe},OSe=/^D+$/,DSe=/^Y+$/,ESe=["D","DD","YY","YYYY"];function $Se(e){return OSe.test(e)}function ISe(e){return DSe.test(e)}function jSe(e,n,t){const i=TSe(e,n,t);if(console.warn(i),ESe.includes(e))throw new RangeError(i)}function TSe(e,n,t){const i=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${i} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ASe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,MSe=/^'([^]*?)'?$/,LSe=/''/g,zSe=/[a-zA-Z]/;function en(e,n,t){var c,u,f,p,h,k,y,g;const i=xS(),a=(t==null?void 0:t.locale)??i.locale??bSe,r=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(f=i.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=(t==null?void 0:t.weekStartsOn)??((k=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:k.weekStartsOn)??i.weekStartsOn??((g=(y=i.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??0,l=oa(e);if(!Wye(l))throw new RangeError("Invalid time value");let s=n.match(RSe).map(v=>{const N=v[0];if(N==="p"||N==="P"){const x=PSe[N];return x(v,a.formatLong)}return v}).join("").match(ASe).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const N=v[0];if(N==="'")return{isToken:!1,value:BSe(v)};if(C$[N])return{isToken:!0,value:v};if(N.match(zSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return{isToken:!1,value:v}});a.localize.preprocessor&&(s=a.localize.preprocessor(l,s));const d={firstWeekContainsDate:r,weekStartsOn:o,locale:a};return s.map(v=>{if(!v.isToken)return v.value;const N=v.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&ISe(N)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&$Se(N))&&jSe(N,n,String(e));const x=C$[N[0]];return x(l,N,a.localize,d)}).join("")}function BSe(e){const n=e.match(MSe);return n?n[1].replace(LSe,"'"):e}function eV(e){const n=oa(e),t=n.getMonth();return n.setFullYear(n.getFullYear(),t+1,0),n.setHours(0,0,0,0),n}const iN=e=>{const n=e.length,t=e.reduce((i,a)=>i+a)/n;return Math.sqrt(e.map(i=>Math.pow(i-t,2)).reduce((i,a)=>i+a)/n)},E$=(e,n)=>{if(!e||!n)return 0;let t=0;const i=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase(),a=n.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();for(let r=0;r<i.length;r++){let o=0;for(let l=0;l<a.length;l++)i[r+l]===a[l]?o+=1:(o>t&&(t=o),o=0);o>t&&(t=o),o=0}return t},VSe=(e,n)=>{var l,s,d,c;const t={providerIdents:{},dateDiffs:{},amountDiffs:{}};for(const u of n){const f=new Date(e.transactions[0].eventDate).getTime()-new Date(u.date).getTime();t.dateDiffs[e.id]=Math.abs(f);const p=(((l=e.totalAmount)==null?void 0:l.raw)??0)-u.amount.raw;t.amountDiffs[e.id]=Math.abs(p);const h=E$(((s=u.creditor)==null?void 0:s.name)??"",((d=e.counterparty)==null?void 0:d.name)??""),k=E$(((c=u.creditor)==null?void 0:c.name)??"",e.transactions[0].sourceDescription);t.providerIdents[e.id]=h>k?h:k}const i=iN(Object.values(t.providerIdents)),a=iN(Object.values(t.dateDiffs)),r=iN(Object.values(t.amountDiffs)),o=[];for(const u of n){let f=0;f=(a?Math.abs((t.dateDiffs[e.id]-Math.min(...Object.values(t.dateDiffs)))/a):0)+(r?Math.abs((t.amountDiffs[e.id]-Math.min(...Object.values(t.amountDiffs)))/r):0)+(i?(Math.max(...Object.values(t.providerIdents))-Math.abs(t.providerIdents[e.id]))/i:0),o.push({score:f,document:u})}return o.sort((u,f)=>u.score>f.score?1:u.score<f.score?-1:0),o};function WSe(e){return(e==null?void 0:e.__typename)==="Invoice"}function HSe(e){return(e==null?void 0:e.__typename)==="Receipt"}function USe(e){return(e==null?void 0:e.__typename)==="InvoiceReceipt"}function YSe(e){return(e==null?void 0:e.__typename)==="CreditInvoice"}function GSe(e){return(e==null?void 0:e.__typename)==="Proforma"}function nV(e){if(typeof e=="boolean"&&e===!0)return!0;if(typeof e=="object"){for(const n in e)if(nV(e[n]))return!0}return!1}function gc(e,n){if(!n)return;if(n===!0)return e;if(typeof n=="object"&&!nV(n))return;const t=Object.entries(n).filter(([a,r])=>!!r).map(([a,r])=>a);return Object.fromEntries(t.filter(a=>a in e).map(a=>{const r=n[a]===!0?e[a]:gc(e[a],n[a]);if(["localCurrencyAmount","originalAmount","withholdingTax","vat","tags","amount"].includes(a)&&r){const o=e[a];return delete o.formatted,[a,o]}return[a,r]}))}function Fa(e){return Object.values(e??{}).filter(t=>t!==void 0&&(typeof t!="object"||(Array.isArray(t)?t.length>0:!Fa(t)))).length===0}function qSe(e,n){let t=e.definitions;return t&&(t=e.definitions.filter(i=>{if(i.kind==="FragmentDefinition"){if(n.has(i.name.value))return!1;n.add(i.name.value)}return!0})),{...e,definitions:t}}function tV(e){return qSe(e,new Set)}const Tn=(e,n=2)=>{const t=e.toFixed(n).split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},yc=()=>{const[{fetching:e},n]=at(sge);return{fetching:e,updateDocument:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error updating document ID [${t.documentId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.updateDocument.__typename==="CommonError"?(console.error(`Error updating document ID [${t.documentId}]: ${r.data.updateDocument.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.updateDocument.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.updateDocument)):(console.error(`Error updating document ID [${t.documentId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function KSe({documentId:e}){const[n,t]=S.useState(!1),{updateDocument:i}=yc();function a(){i({documentId:e,fields:{chargeId:bS}}),t(!1)}return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:n,onClose:()=>t(!1),onConfirm:a,title:"Are you sure you want to unlink this document from the charge?"}),m.jsx(Pe,{onClick:()=>t(!0),children:m.jsx(R5,{size:20})})]})}const w_=()=>{const[{fetching:e},n]=at(cge);return{fetching:e,updateTransaction:t=>new Promise((i,a)=>n(t).then(r=>"error"in r&&r.error?(console.error(`Error updating transaction ID [${t.transactionId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.updateTransaction.__typename==="CommonError"?(console.error(`Error updating transaction ID [${t.transactionId}]: ${r.data.updateTransaction.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.updateTransaction.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.updateTransaction)):(console.error(`Error updating transaction ID [${t.transactionId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function XSe({transactionId:e}){const[n,t]=S.useState(!1),{updateTransaction:i}=w_();function a(){i({transactionId:e,fields:{chargeId:bS}}),t(!1)}return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:n,onClose:()=>t(!1),onConfirm:a,title:"Are you sure you want to unlink this transaction from the charge?"}),m.jsx(Pe,{onClick:()=>t(!0),children:m.jsx(R5,{size:20})})]})}const QSe=()=>{const[{fetching:e},n]=at(oge);return{fetching:e,updateBusiness:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error updating business ID [${t.businessId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.updateBusiness.__typename==="CommonError"?(console.error(`Error updating business ID [${t.businessId}]: ${r.data.updateBusiness.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.updateBusiness.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.updateBusiness)):(console.error(`Error updating business ID [${t.businessId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function ZSe({businessID:e,updateBusiness:n}){var $,E,j;const[t,i]=S.useState([]),[a,r]=S.useState([]),[o,l]=S.useState(void 0),{userContext:s}=S.useContext(Ur),{updateBusiness:d,fetching:c}=QSe(),[{data:u,fetching:f},p]=Be({query:$ke,variables:{id:e}});S.useEffect(()=>{u&&u.business.__typename==="LtdFinancialEntity"&&l(u.business)},[u]);const[{data:h,fetching:k,error:y}]=Be({query:xB});S.useEffect(()=>{y&&re({title:"Error!",message:"Oh no!, we have an error fetching tax categories! 🤥"})},[y]),S.useEffect(()=>{h!=null&&h.taxCategories.length&&r(h.taxCategories.map(D=>({value:D.id,label:D.name})).sort((D,M)=>D.label>M.label?1:-1))},[h,r]);const[{data:g,fetching:v,error:N}]=Be({query:Rke});S.useEffect(()=>{N&&re({title:"Error!",message:"Oh no!, we have an error fetching sort codes! 🤥"})},[N]),S.useEffect(()=>{if(g!=null&&g.allSortCodes.length){const D=g.allSortCodes.filter(M=>!!M.name).map(M=>({value:M.id.toString(),label:`${M.id}: ${M.name}`})).sort((M,R)=>M.label>R.label?1:-1);i(D)}},[g,i]),S.useEffect(()=>{var D;((D=u==null?void 0:u.business)==null?void 0:D.__typename)==="LtdFinancialEntity"&&n(u==null?void 0:u.business)},[u,n]);const x=ki({defaultValues:{...o,sortCode:($=o==null?void 0:o.sortCode)==null?void 0:$.id}}),{control:F,handleSubmit:_,formState:{dirtyFields:w}}=x,C=D=>{if(!o)return;const M=gc(D,w);M&&Object.keys(M).length>0&&(M.sortCode&&(M.sortCode=parseInt(M.sortCode.toString())),d({businessId:o.id,ownerId:s==null?void 0:s.ownerId,fields:M}).then(()=>p()))};return m.jsxs("div",{className:"flex flex-col gap-5",children:[f&&m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!f&&o&&m.jsx("div",{className:"flex flex-row gap-5",children:m.jsxs("form",{onSubmit:_(C),children:[m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Edit Business:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["ID: ",e,m.jsx(Pe,{variant:"default",onClick:()=>ys(e),size:30,children:m.jsx(us,{size:20})})]})]}),m.jsx("div",{className:"flex-row px-10 h-max justify-start block",children:m.jsxs(Nc,{cols:3,children:[m.jsx(ue,{name:"name",control:F,defaultValue:o.name,rules:{required:"Required",minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Name"})}}),m.jsx(ue,{name:"hebrewName",control:F,defaultValue:o.hebrewName,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Hebrew Name"})}}),m.jsx(ue,{name:"governmentId",control:F,defaultValue:o.governmentId,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Government ID"})}}),m.jsx(ue,{name:"email",control:F,defaultValue:o.email,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Email"})}}),m.jsx(ue,{name:"address",control:F,defaultValue:o.address,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Address"})}}),m.jsx(ue,{name:"phoneNumber",control:F,defaultValue:o.phoneNumber,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Phone Number"})}}),m.jsx(ue,{name:"website",control:F,defaultValue:o.website,rules:{minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:D,...M},fieldState:R})=>{var I;return m.jsx(Ln,{...M,value:D??void 0,error:(I=R.error)==null?void 0:I.message,label:"Website URL"})}}),m.jsx(ue,{name:"sortCode",control:F,rules:{required:"Required",minLength:{value:2,message:"Minimum 2 characters"}},defaultValue:(E=o.sortCode)==null?void 0:E.id,render:({field:D,fieldState:M})=>{var R,I;return m.jsx(Gn,{...D,data:t,value:(R=D.value)==null?void 0:R.toString(),disabled:v,label:"Sort Code",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(I=M.error)==null?void 0:I.message})}}),m.jsx(ue,{name:"taxCategory",control:F,defaultValue:(j=o.taxCategory)==null?void 0:j.id,render:({field:D,fieldState:M})=>{var R;return m.jsx(Gn,{...D,data:a,value:D.value,disabled:k,label:"Tax Category",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(R=M.error)==null?void 0:R.message})}})]})}),m.jsx("div",{className:"mt-10 mb-5 flex justify-center gap-5",children:m.jsx("button",{type:"submit",onClick:()=>_(C),className:"mt-8 text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:c||Object.keys(w).length===0,children:"Update"})})]})}),!f&&!o&&m.jsx("p",{children:"Error fetching extended information for this business"})]})}var JSe=Object.defineProperty,e0e=Object.defineProperties,n0e=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,iV=Object.prototype.hasOwnProperty,aV=Object.prototype.propertyIsEnumerable,$$=(e,n,t)=>n in e?JSe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,I$=(e,n)=>{for(var t in n||(n={}))iV.call(n,t)&&$$(e,t,n[t]);if(bg)for(var t of bg(n))aV.call(n,t)&&$$(e,t,n[t]);return e},j$=(e,n)=>e0e(e,n0e(n)),t0e=(e,n)=>{var t={};for(var i in e)iV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&bg)for(var i of bg(e))n.indexOf(i)<0&&aV.call(e,i)&&(t[i]=e[i]);return t};function Fx(e){var n=e,{direction:t,style:i}=n,a=t0e(n,["direction","style"]);const r=vi();return b.createElement(hm,j$(I$({},a),{style:j$(I$({},i),{transform:t==="next"&&r.dir==="ltr"||t==="previous"&&r.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}Fx.displayName="@mantine/dates/Chevron";var i0e=Object.defineProperty,a0e=Object.defineProperties,r0e=Object.getOwnPropertyDescriptors,T$=Object.getOwnPropertySymbols,o0e=Object.prototype.hasOwnProperty,l0e=Object.prototype.propertyIsEnumerable,A$=(e,n,t)=>n in e?i0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,up=(e,n)=>{for(var t in n||(n={}))o0e.call(n,t)&&A$(e,t,n[t]);if(T$)for(var t of T$(n))l0e.call(n,t)&&A$(e,t,n[t]);return e},R$=(e,n)=>a0e(e,r0e(n));const gm={xs:T(30),sm:T(36),md:T(42),lg:T(48),xl:T(54)};var s0e=me((e,{radius:n,isStatic:t},{size:i})=>{const a=e.fn.variant({variant:"filled"}),r=e.fn.variant({variant:"light"});return{day:R$(up({width:q({size:i,sizes:gm}),height:q({size:i,sizes:gm}),fontSize:q({size:i,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:t?void 0:"none",cursor:t?"default":"pointer",borderRadius:e.fn.radius(n)},t?null:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":t?void 0:e.activeStyles,"&[data-disabled]":R$(up({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":up({backgroundColor:r.background,borderRadius:0},t?null:e.fn.hover({backgroundColor:r.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":up({color:a.color,backgroundColor:a.background},t?null:e.fn.hover({backgroundColor:a.hover})),"&[data-hidden]":{display:"none"}})}});const d0e=s0e;var c0e=Object.defineProperty,u0e=Object.defineProperties,m0e=Object.getOwnPropertyDescriptors,M$=Object.getOwnPropertySymbols,f0e=Object.prototype.hasOwnProperty,p0e=Object.prototype.propertyIsEnumerable,L$=(e,n,t)=>n in e?c0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,mp=(e,n)=>{for(var t in n||(n={}))f0e.call(n,t)&&L$(e,t,n[t]);if(M$)for(var t of M$(n))p0e.call(n,t)&&L$(e,t,n[t]);return e},fp=(e,n)=>u0e(e,m0e(n)),h0e=me((e,n,{size:t})=>{const i=q({size:t,sizes:gm});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${i} * 7 + ${T(7)})`},calendarHeaderControl:fp(mp({width:i,height:i,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":fp(mp({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:fp(mp({height:i,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:q({size:t,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":fp(mp({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),v0e=Object.defineProperty,xg=Object.getOwnPropertySymbols,rV=Object.prototype.hasOwnProperty,oV=Object.prototype.propertyIsEnumerable,z$=(e,n,t)=>n in e?v0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,k0e=(e,n)=>{for(var t in n||(n={}))rV.call(n,t)&&z$(e,t,n[t]);if(xg)for(var t of xg(n))oV.call(n,t)&&z$(e,t,n[t]);return e},g0e=(e,n)=>{var t={};for(var i in e)rV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&xg)for(var i of xg(e))n.indexOf(i)<0&&oV.call(e,i)&&(t[i]=e[i]);return t};const y0e={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},FS=S.forwardRef((e,n)=>{const t=ae("CalendarHeader",y0e,e),{className:i,nextIcon:a,previousIcon:r,nextLabel:o,previousLabel:l,onNext:s,onPrevious:d,onLevelClick:c,label:u,classNames:f,styles:p,unstyled:h,nextDisabled:k,previousDisabled:y,hasNextLevel:g,levelControlAriaLabel:v,withNext:N,withPrevious:x,__staticSelector:F,__preventFocus:_,__stopPropagation:w,size:C,variant:$}=t,E=g0e(t,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:j,cx:D}=h0e(null,{name:["CalendarHeader",F],classNames:f,styles:p,unstyled:h,size:C,variant:$}),M=_?R=>R.preventDefault():void 0;return b.createElement(xe,k0e({className:D(j.calendarHeader,i),ref:n},E),x&&b.createElement(fi,{className:j.calendarHeaderControl,"data-previous":!0,"aria-label":l,onClick:d,unstyled:h,onMouseDown:M,disabled:y,"data-disabled":y||void 0,tabIndex:_?-1:0,"data-mantine-stop-propagation":w||void 0},r||b.createElement(Fx,{className:j.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),b.createElement(fi,{component:g?"button":"div",className:j.calendarHeaderLevel,onClick:g?c:void 0,unstyled:h,onMouseDown:g?M:void 0,disabled:!g,"data-static":!g||void 0,"aria-label":v,tabIndex:_||!g?-1:0,"data-mantine-stop-propagation":w||void 0},u),N&&b.createElement(fi,{className:j.calendarHeaderControl,"data-next":!0,"aria-label":o,onClick:s,unstyled:h,onMouseDown:M,disabled:k,"data-disabled":k||void 0,tabIndex:_?-1:0,"data-mantine-stop-propagation":w||void 0},a||b.createElement(Fx,{className:j.calendarHeaderControlIcon,direction:"next","data-next":!0})))});FS.displayName="@mantine/dates/CalendarHeader";var lV={exports:{}};(function(e,n){(function(t,i){e.exports=i()})(FF,function(){var t=1e3,i=6e4,a=36e5,r="millisecond",o="second",l="minute",s="hour",d="day",c="week",u="month",f="quarter",p="year",h="date",k="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var I=["th","st","nd","rd"],L=R%100;return"["+R+(I[(L-20)%10]||I[L]||I[0])+"]"}},N=function(R,I,L){var B=String(R);return!B||B.length>=I?R:""+Array(I+1-B.length).join(L)+R},x={s:N,z:function(R){var I=-R.utcOffset(),L=Math.abs(I),B=Math.floor(L/60),O=L%60;return(I<=0?"+":"-")+N(B,2,"0")+":"+N(O,2,"0")},m:function R(I,L){if(I.date()<L.date())return-R(L,I);var B=12*(L.year()-I.year())+(L.month()-I.month()),O=I.clone().add(B,u),P=L-O<0,A=I.clone().add(B+(P?-1:1),u);return+(-(B+(L-O)/(P?O-A:A-O))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:p,w:c,d,D:h,h:s,m:l,s:o,ms:r,Q:f}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},F="en",_={};_[F]=v;var w="$isDayjsObject",C=function(R){return R instanceof D||!(!R||!R[w])},$=function R(I,L,B){var O;if(!I)return F;if(typeof I=="string"){var P=I.toLowerCase();_[P]&&(O=P),L&&(_[P]=L,O=P);var A=I.split("-");if(!O&&A.length>1)return R(A[0])}else{var V=I.name;_[V]=I,O=V}return!B&&O&&(F=O),O||!B&&F},E=function(R,I){if(C(R))return R.clone();var L=typeof I=="object"?I:{};return L.date=R,L.args=arguments,new D(L)},j=x;j.l=$,j.i=C,j.w=function(R,I){return E(R,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var D=function(){function R(L){this.$L=$(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[w]=!0}var I=R.prototype;return I.parse=function(L){this.$d=function(B){var O=B.date,P=B.utc;if(O===null)return new Date(NaN);if(j.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var A=O.match(y);if(A){var V=A[2]-1||0,U=(A[7]||"0").substring(0,3);return P?new Date(Date.UTC(A[1],V,A[3]||1,A[4]||0,A[5]||0,A[6]||0,U)):new Date(A[1],V,A[3]||1,A[4]||0,A[5]||0,A[6]||0,U)}}return new Date(O)}(L),this.init()},I.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},I.$utils=function(){return j},I.isValid=function(){return this.$d.toString()!==k},I.isSame=function(L,B){var O=E(L);return this.startOf(B)<=O&&O<=this.endOf(B)},I.isAfter=function(L,B){return E(L)<this.startOf(B)},I.isBefore=function(L,B){return this.endOf(B)<E(L)},I.$g=function(L,B,O){return j.u(L)?this[B]:this.set(O,L)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(L,B){var O=this,P=!!j.u(B)||B,A=j.p(L),V=function(ve,he){var ge=j.w(O.$u?Date.UTC(O.$y,he,ve):new Date(O.$y,he,ve),O);return P?ge:ge.endOf(d)},U=function(ve,he){return j.w(O.toDate()[ve].apply(O.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(he)),O)},oe=this.$W,G=this.$M,ne=this.$D,Z="set"+(this.$u?"UTC":"");switch(A){case p:return P?V(1,0):V(31,11);case u:return P?V(1,G):V(0,G+1);case c:var ce=this.$locale().weekStart||0,ie=(oe<ce?oe+7:oe)-ce;return V(P?ne-ie:ne+(6-ie),G);case d:case h:return U(Z+"Hours",0);case s:return U(Z+"Minutes",1);case l:return U(Z+"Seconds",2);case o:return U(Z+"Milliseconds",3);default:return this.clone()}},I.endOf=function(L){return this.startOf(L,!1)},I.$set=function(L,B){var O,P=j.p(L),A="set"+(this.$u?"UTC":""),V=(O={},O[d]=A+"Date",O[h]=A+"Date",O[u]=A+"Month",O[p]=A+"FullYear",O[s]=A+"Hours",O[l]=A+"Minutes",O[o]=A+"Seconds",O[r]=A+"Milliseconds",O)[P],U=P===d?this.$D+(B-this.$W):B;if(P===u||P===p){var oe=this.clone().set(h,1);oe.$d[V](U),oe.init(),this.$d=oe.set(h,Math.min(this.$D,oe.daysInMonth())).$d}else V&&this.$d[V](U);return this.init(),this},I.set=function(L,B){return this.clone().$set(L,B)},I.get=function(L){return this[j.p(L)]()},I.add=function(L,B){var O,P=this;L=Number(L);var A=j.p(B),V=function(G){var ne=E(P);return j.w(ne.date(ne.date()+Math.round(G*L)),P)};if(A===u)return this.set(u,this.$M+L);if(A===p)return this.set(p,this.$y+L);if(A===d)return V(1);if(A===c)return V(7);var U=(O={},O[l]=i,O[s]=a,O[o]=t,O)[A]||1,oe=this.$d.getTime()+L*U;return j.w(oe,this)},I.subtract=function(L,B){return this.add(-1*L,B)},I.format=function(L){var B=this,O=this.$locale();if(!this.isValid())return O.invalidDate||k;var P=L||"YYYY-MM-DDTHH:mm:ssZ",A=j.z(this),V=this.$H,U=this.$m,oe=this.$M,G=O.weekdays,ne=O.months,Z=O.meridiem,ce=function(he,ge,K,de){return he&&(he[ge]||he(B,P))||K[ge].slice(0,de)},ie=function(he){return j.s(V%12||12,he,"0")},ve=Z||function(he,ge,K){var de=he<12?"AM":"PM";return K?de.toLowerCase():de};return P.replace(g,function(he,ge){return ge||function(K){switch(K){case"YY":return String(B.$y).slice(-2);case"YYYY":return j.s(B.$y,4,"0");case"M":return oe+1;case"MM":return j.s(oe+1,2,"0");case"MMM":return ce(O.monthsShort,oe,ne,3);case"MMMM":return ce(ne,oe);case"D":return B.$D;case"DD":return j.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ce(O.weekdaysMin,B.$W,G,2);case"ddd":return ce(O.weekdaysShort,B.$W,G,3);case"dddd":return G[B.$W];case"H":return String(V);case"HH":return j.s(V,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return ve(V,U,!0);case"A":return ve(V,U,!1);case"m":return String(U);case"mm":return j.s(U,2,"0");case"s":return String(B.$s);case"ss":return j.s(B.$s,2,"0");case"SSS":return j.s(B.$ms,3,"0");case"Z":return A}return null}(he)||A.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(L,B,O){var P,A=this,V=j.p(B),U=E(L),oe=(U.utcOffset()-this.utcOffset())*i,G=this-U,ne=function(){return j.m(A,U)};switch(V){case p:P=ne()/12;break;case u:P=ne();break;case f:P=ne()/3;break;case c:P=(G-oe)/6048e5;break;case d:P=(G-oe)/864e5;break;case s:P=G/a;break;case l:P=G/i;break;case o:P=G/t;break;default:P=G}return O?P:j.a(P)},I.daysInMonth=function(){return this.endOf(u).$D},I.$locale=function(){return _[this.$L]},I.locale=function(L,B){if(!L)return this.$L;var O=this.clone(),P=$(L,B,!0);return P&&(O.$L=P),O},I.clone=function(){return j.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},R}(),M=D.prototype;return E.prototype=M,[["$ms",r],["$s",o],["$m",l],["$H",s],["$W",d],["$M",u],["$y",p],["$D",h]].forEach(function(R){M[R[1]]=function(I){return this.$g(I,R[0],R[1])}}),E.extend=function(R,I){return R.$i||(R(I,D,E),R.$i=!0),E},E.locale=$,E.isDayjs=C,E.unix=function(R){return E(1e3*R)},E.en=_[F],E.Ls=_,E.p={},E})})(lV);var S0e=lV.exports;const ye=Mm(S0e);function aN(e,n){return e?e==="month"?0:e==="year"?1:2:n}function N0e(e){return e===0?"month":e===1?"year":"decade"}function Xc(e,n,t){return N0e(Eu(aN(e,0),aN(n,0),aN(t,2)))}var b0e=me(()=>({calendar:{}})),x0e=me((e,n,{size:t})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:q({size:t,sizes:e.spacing})}}})),F0e=me(e=>({monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const w0e={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},_0e=S.createContext(w0e);var C0e=Object.defineProperty,P0e=Object.defineProperties,O0e=Object.getOwnPropertyDescriptors,B$=Object.getOwnPropertySymbols,D0e=Object.prototype.hasOwnProperty,E0e=Object.prototype.propertyIsEnumerable,V$=(e,n,t)=>n in e?C0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$0e=(e,n)=>{for(var t in n||(n={}))D0e.call(n,t)&&V$(e,t,n[t]);if(B$)for(var t of B$(n))E0e.call(n,t)&&V$(e,t,n[t]);return e},I0e=(e,n)=>P0e(e,O0e(n));function Gr(){const e=S.useContext(_0e),n=S.useCallback(r=>r||e.locale,[e.locale]),t=S.useCallback(r=>typeof r=="number"?r:e.firstDayOfWeek,[e.firstDayOfWeek]),i=S.useCallback(r=>Array.isArray(r)?r:e.weekendDays,[e.weekendDays]),a=S.useCallback(r=>typeof r=="string"?r:e.labelSeparator,[e.labelSeparator]);return I0e($0e({},e),{getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:a})}function j0e(e,n=1){const t=new Date(e);for(;t.getDay()!==n;)t.setDate(t.getDate()-1);return t}function T0e(e,n=1){const t=new Date(e),i=n===0?6:n-1;for(;t.getDay()!==i;)t.setDate(t.getDate()+1);return t}function A0e(e,n=1){const t=e.getMonth(),i=new Date(e.getFullYear(),t,1),a=new Date(e.getFullYear(),e.getMonth()+1,0),r=T0e(a,n),o=j0e(i,n),l=[];for(;o<=r;){const s=[];for(let d=0;d<7;d+=1)s.push(new Date(o)),o.setDate(o.getDate()+1);l.push(s)}return l}function sV(e,n){return e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()}function dV(e,n){return n instanceof Date?ye(e).isBefore(ye(n).add(1,"day"),"day"):!0}function cV(e,n){return n instanceof Date?ye(e).isAfter(ye(n).subtract(1,"day"),"day"):!0}var R0e=Object.defineProperty,M0e=Object.defineProperties,L0e=Object.getOwnPropertyDescriptors,W$=Object.getOwnPropertySymbols,z0e=Object.prototype.hasOwnProperty,B0e=Object.prototype.propertyIsEnumerable,H$=(e,n,t)=>n in e?R0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,V0e=(e,n)=>{for(var t in n||(n={}))z0e.call(n,t)&&H$(e,t,n[t]);if(W$)for(var t of W$(n))B0e.call(n,t)&&H$(e,t,n[t]);return e},W0e=(e,n)=>M0e(e,L0e(n)),H0e=me(e=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:T(.5)}},month:W0e(V0e({},e.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));function U0e(e,n,t,i,a,r,o){const l=e.flat().filter(c=>{var u;return dV(c,t)&&cV(c,n)&&!(a!=null&&a(c))&&!((u=i==null?void 0:i(c))!=null&&u.disabled)&&(!r||sV(c,o))}),s=l.find(c=>{var u;return(u=i==null?void 0:i(c))==null?void 0:u.selected});if(s)return s;const d=l.find(c=>ye().isSame(c,"date"));return d||l[0]}var Y0e=Object.defineProperty,Fg=Object.getOwnPropertySymbols,uV=Object.prototype.hasOwnProperty,mV=Object.prototype.propertyIsEnumerable,U$=(e,n,t)=>n in e?Y0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,G0e=(e,n)=>{for(var t in n||(n={}))uV.call(n,t)&&U$(e,t,n[t]);if(Fg)for(var t of Fg(n))mV.call(n,t)&&U$(e,t,n[t]);return e},q0e=(e,n)=>{var t={};for(var i in e)uV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Fg)for(var i of Fg(e))n.indexOf(i)<0&&mV.call(e,i)&&(t[i]=e[i]);return t};const K0e={tabIndex:0,size:"sm"},fV=S.forwardRef((e,n)=>{const t=ae("Day",K0e,e),{className:i,date:a,radius:r,disabled:o,styles:l,classNames:s,unstyled:d,__staticSelector:c,weekend:u,outside:f,selected:p,renderDay:h,inRange:k,firstInRange:y,lastInRange:g,hidden:v,static:N,variant:x,size:F}=t,_=q0e(t,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:w,cx:C}=d0e({radius:r,isStatic:N},{name:["Day",c],classNames:s,styles:l,unstyled:d,variant:x,size:F});return b.createElement(fi,G0e({component:N?"div":"button",ref:n,className:C(w.day,i),disabled:o,"data-today":ye(a).isSame(new Date,"day")||void 0,"data-hidden":v||void 0,"data-disabled":o||void 0,"data-weekend":!o&&!f&&u||void 0,"data-outside":!o&&f||void 0,"data-selected":!o&&p||void 0,"data-in-range":k&&!o||void 0,"data-first-in-range":y&&!o||void 0,"data-last-in-range":g&&!o||void 0,unstyled:d},_),(h==null?void 0:h(a))||a.getDate())});fV.displayName="@mantine/dates/Day";function X0e({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=ye().day(t),a=[];for(let r=0;r<7;r+=1)typeof n=="string"?a.push(ye(i).add(r,"days").locale(e).format(n)):a.push(n(ye(i).add(r,"days").toDate()));return a}var Q0e=me((e,n,{size:t})=>({weekdaysRow:{},weekday:{color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:q({size:t,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${q({size:t,sizes:e.spacing})} / 2)`}})),Z0e=Object.defineProperty,wg=Object.getOwnPropertySymbols,pV=Object.prototype.hasOwnProperty,hV=Object.prototype.propertyIsEnumerable,Y$=(e,n,t)=>n in e?Z0e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,J0e=(e,n)=>{for(var t in n||(n={}))pV.call(n,t)&&Y$(e,t,n[t]);if(wg)for(var t of wg(n))hV.call(n,t)&&Y$(e,t,n[t]);return e},eNe=(e,n)=>{var t={};for(var i in e)pV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&wg)for(var i of wg(e))n.indexOf(i)<0&&hV.call(e,i)&&(t[i]=e[i]);return t};const nNe={weekdayFormat:"dd",cellComponent:"th",size:"sm"},vV=S.forwardRef((e,n)=>{const t=ae("WeekdaysRow",nNe,e),{className:i,locale:a,firstDayOfWeek:r,weekdayFormat:o,cellComponent:l,__staticSelector:s,classNames:d,styles:c,unstyled:u,variant:f,size:p}=t,h=eNe(t,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),k=Gr(),{classes:y,cx:g}=Q0e(null,{name:["WeekdaysRow",s],classNames:d,styles:c,unstyled:u,variant:f,size:p}),v=X0e({locale:k.getLocale(a),format:o,firstDayOfWeek:k.getFirstDayOfWeek(r)}).map((N,x)=>b.createElement(l,{key:x,className:y.weekday},N));return b.createElement(xe,J0e({component:"tr",ref:n,className:g(y.weekdaysRow,i)},h),v)});vV.displayName="@mantine/dates/WeekdaysRow";var tNe=Object.defineProperty,iNe=Object.defineProperties,aNe=Object.getOwnPropertyDescriptors,_g=Object.getOwnPropertySymbols,kV=Object.prototype.hasOwnProperty,gV=Object.prototype.propertyIsEnumerable,G$=(e,n,t)=>n in e?tNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,pp=(e,n)=>{for(var t in n||(n={}))kV.call(n,t)&&G$(e,t,n[t]);if(_g)for(var t of _g(n))gV.call(n,t)&&G$(e,t,n[t]);return e},rN=(e,n)=>iNe(e,aNe(n)),rNe=(e,n)=>{var t={};for(var i in e)kV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&_g)for(var i of _g(e))n.indexOf(i)<0&&gV.call(e,i)&&(t[i]=e[i]);return t};const oNe={size:"sm",withCellSpacing:!0},yV=S.forwardRef((e,n)=>{const t=ae("Month",oNe,e),{className:i,classNames:a,styles:r,unstyled:o,__staticSelector:l,locale:s,firstDayOfWeek:d,weekdayFormat:c,month:u,weekendDays:f,getDayProps:p,excludeDate:h,minDate:k,maxDate:y,renderDay:g,hideOutsideDates:v,hideWeekdays:N,getDayAriaLabel:x,static:F,__getDayRef:_,__onDayKeyDown:w,__onDayClick:C,__onDayMouseEnter:$,__preventFocus:E,__stopPropagation:j,withCellSpacing:D,size:M,variant:R}=t,I=rNe(t,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),L=Gr(),{classes:B,cx:O}=H0e(null,{name:["Month",l],classNames:a,styles:r,unstyled:o,variant:R,size:M}),P={__staticSelector:l||"Month",classNames:a,styles:r,unstyled:o,variant:R,size:M},A=A0e(u,L.getFirstDayOfWeek(d)),V=U0e(A,k,y,p,h,v,u),U=A.map((oe,G)=>{const ne=oe.map((Z,ce)=>{const ie=!sV(Z,u),ve=(x==null?void 0:x(Z))||ye(Z).locale(s||L.locale).format("D MMMM YYYY"),he=p==null?void 0:p(Z),ge=ye(Z).isSame(V,"date");return b.createElement("td",{key:Z.toString(),className:B.monthCell,"data-with-spacing":D||void 0},b.createElement(fV,rN(pp(rN(pp({},P),{"data-mantine-stop-propagation":j||void 0,renderDay:g,date:Z,weekend:L.getWeekendDays(f).includes(Z.getDay()),outside:ie,hidden:v?ie:!1,"aria-label":ve,static:F,disabled:(h==null?void 0:h(Z))||!dV(Z,y)||!cV(Z,k),ref:K=>_==null?void 0:_(G,ce,K)}),he),{onKeyDown:K=>{var de;(de=he==null?void 0:he.onKeyDown)==null||de.call(he,K),w==null||w(K,{rowIndex:G,cellIndex:ce,date:Z})},onMouseEnter:K=>{var de;(de=he==null?void 0:he.onMouseEnter)==null||de.call(he,K),$==null||$(K,Z)},onClick:K=>{var de;(de=he==null?void 0:he.onClick)==null||de.call(he,K),C==null||C(K,Z)},onMouseDown:K=>{var de;(de=he==null?void 0:he.onMouseDown)==null||de.call(he,K),E&&K.preventDefault()},tabIndex:E||!ge?-1:0})))});return b.createElement("tr",{key:G,className:B.monthRow},ne)});return b.createElement(xe,pp({component:"table",className:O(B.month,i),ref:n},I),!N&&b.createElement("thead",{className:B.monthThead},b.createElement(vV,rN(pp({},P),{locale:s,firstDayOfWeek:d,weekdayFormat:c}))),b.createElement("tbody",{className:B.monthTbody},U))});yV.displayName="@mantine/dates/Month";var lNe=Object.defineProperty,Cg=Object.getOwnPropertySymbols,SV=Object.prototype.hasOwnProperty,NV=Object.prototype.propertyIsEnumerable,q$=(e,n,t)=>n in e?lNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,oN=(e,n)=>{for(var t in n||(n={}))SV.call(n,t)&&q$(e,t,n[t]);if(Cg)for(var t of Cg(n))NV.call(n,t)&&q$(e,t,n[t]);return e},sNe=(e,n)=>{var t={};for(var i in e)SV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Cg)for(var i of Cg(e))n.indexOf(i)<0&&NV.call(e,i)&&(t[i]=e[i]);return t};const dNe={monthLabelFormat:"MMMM YYYY"},bV=S.forwardRef((e,n)=>{const t=ae("MonthLevel",dNe,e),{month:i,locale:a,firstDayOfWeek:r,weekdayFormat:o,weekendDays:l,getDayProps:s,excludeDate:d,minDate:c,maxDate:u,renderDay:f,hideOutsideDates:p,hideWeekdays:h,getDayAriaLabel:k,__getDayRef:y,__onDayKeyDown:g,__onDayClick:v,__onDayMouseEnter:N,withCellSpacing:x,__preventFocus:F,__stopPropagation:_,nextIcon:w,previousIcon:C,nextLabel:$,previousLabel:E,onNext:j,onPrevious:D,onLevelClick:M,nextDisabled:R,previousDisabled:I,hasNextLevel:L,levelControlAriaLabel:B,withNext:O,withPrevious:P,className:A,monthLabelFormat:V,classNames:U,styles:oe,unstyled:G,__staticSelector:ne,size:Z,variant:ce,static:ie}=t,ve=sNe(t,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:he,cx:ge}=F0e(null,{name:["MonthLevel",ne],classNames:U,styles:oe,unstyled:G,variant:ce,size:Z}),K=Gr(),de={__staticSelector:ne||"MonthLevel",classNames:U,styles:oe,unstyled:G,variant:ce,size:Z},be=typeof R=="boolean"?R:u?!ye(i).endOf("month").isBefore(u):!1,Ee=typeof I=="boolean"?I:c?!ye(i).startOf("month").isAfter(c):!1;return b.createElement(xe,oN({className:ge(he.monthLevel,A),"data-month-level":!0,ref:n},ve),b.createElement(FS,oN({label:typeof V=="function"?V(i):ye(i).locale(a||K.locale).format(V),className:he.calendarHeader,__preventFocus:F,__stopPropagation:_,nextIcon:w,previousIcon:C,nextLabel:$,previousLabel:E,onNext:j,onPrevious:D,onLevelClick:M,nextDisabled:be,previousDisabled:Ee,hasNextLevel:L,levelControlAriaLabel:B,withNext:O,withPrevious:P},de)),b.createElement(yV,oN({month:i,locale:a,firstDayOfWeek:r,weekdayFormat:o,weekendDays:l,getDayProps:s,excludeDate:d,minDate:c,maxDate:u,renderDay:f,hideOutsideDates:p,hideWeekdays:h,getDayAriaLabel:k,__getDayRef:y,__onDayKeyDown:g,__onDayClick:v,__onDayMouseEnter:N,__preventFocus:F,__stopPropagation:_,static:ie,withCellSpacing:x},de)))});bV.displayName="@mantine/dates/MonthLevel";function cNe({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:a}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=a[n-1][a[n-1].length-1]-1?a[n-1].length-1:a[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===a[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===a[n].length-2&&i>=a[n][a[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:a[n-1].length-1,cellIndex:a[n-1][a[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:a[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===a[n].length-1&&i===a[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===a[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function xV({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:a,size:r}){var o,l;const s=cNe({direction:n,size:r,rowIndex:i,cellIndex:a,levelIndex:t});if(!s)return;const d=(l=(o=e.current[s.levelIndex])==null?void 0:o[s.rowIndex])==null?void 0:l[s.cellIndex];d&&(d.disabled||d.getAttribute("data-hidden")||d.getAttribute("data-outside")?xV({controlsRef:e,direction:n,levelIndex:s.levelIndex,cellIndex:s.cellIndex,rowIndex:s.rowIndex,size:r}):d.focus())}function uNe(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function mNe(e){return e.current.map(n=>n.map(t=>t.length))}function __({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:a}){const r=uNe(a.key);if(r){a.preventDefault();const o=mNe(e);xV({controlsRef:e,direction:r,levelIndex:n,rowIndex:t,cellIndex:i,size:o})}}var fNe=Object.defineProperty,Pg=Object.getOwnPropertySymbols,FV=Object.prototype.hasOwnProperty,wV=Object.prototype.propertyIsEnumerable,K$=(e,n,t)=>n in e?fNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,pNe=(e,n)=>{for(var t in n||(n={}))FV.call(n,t)&&K$(e,t,n[t]);if(Pg)for(var t of Pg(n))wV.call(n,t)&&K$(e,t,n[t]);return e},hNe=(e,n)=>{var t={};for(var i in e)FV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Pg)for(var i of Pg(e))n.indexOf(i)<0&&wV.call(e,i)&&(t[i]=e[i]);return t};const vNe={numberOfColumns:1},_V=S.forwardRef((e,n)=>{const t=ae("MonthLevelGroup",vNe,e),{month:i,locale:a,firstDayOfWeek:r,weekdayFormat:o,weekendDays:l,getDayProps:s,excludeDate:d,minDate:c,maxDate:u,renderDay:f,hideOutsideDates:p,hideWeekdays:h,getDayAriaLabel:k,__onDayClick:y,__onDayMouseEnter:g,withCellSpacing:v,__preventFocus:N,nextIcon:x,previousIcon:F,nextLabel:_,previousLabel:w,onNext:C,onPrevious:$,onLevelClick:E,nextDisabled:j,previousDisabled:D,hasNextLevel:M,className:R,classNames:I,styles:L,unstyled:B,numberOfColumns:O,levelControlAriaLabel:P,monthLabelFormat:A,__staticSelector:V,__stopPropagation:U,size:oe,variant:G,static:ne}=t,Z=hNe(t,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:ce,cx:ie}=x0e(null,{name:["MonthLevelGroup",V],classNames:I,styles:L,unstyled:B,variant:G,size:oe}),ve=S.useRef([]),he=Array(O).fill(0).map((ge,K)=>{const de=ye(i).add(K,"months").toDate();return b.createElement(bV,{key:K,month:de,withNext:K===O-1,withPrevious:K===0,monthLabelFormat:A,__stopPropagation:U,__onDayClick:y,__onDayMouseEnter:g,__onDayKeyDown:(be,Ee)=>__({levelIndex:K,rowIndex:Ee.rowIndex,cellIndex:Ee.cellIndex,event:be,controlsRef:ve}),__getDayRef:(be,Ee,Qe)=>{Array.isArray(ve.current[K])||(ve.current[K]=[]),Array.isArray(ve.current[K][be])||(ve.current[K][be]=[]),ve.current[K][be][Ee]=Qe},levelControlAriaLabel:typeof P=="function"?P(de):P,locale:a,firstDayOfWeek:r,weekdayFormat:o,weekendDays:l,getDayProps:s,excludeDate:d,minDate:c,maxDate:u,renderDay:f,hideOutsideDates:p,hideWeekdays:h,getDayAriaLabel:k,__preventFocus:N,nextIcon:x,previousIcon:F,nextLabel:_,previousLabel:w,onNext:C,onPrevious:$,onLevelClick:E,nextDisabled:j,previousDisabled:D,hasNextLevel:M,classNames:I,styles:L,unstyled:B,__staticSelector:V||"MonthLevelGroup",size:oe,variant:G,static:ne,withCellSpacing:v})});return b.createElement(xe,pNe({className:ie(ce.monthLevelGroup,R),ref:n},Z),he)});_V.displayName="@mantine/dates/MonthLevelGroup";var kNe=me((e,n,{size:t})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:q({size:t,sizes:e.spacing})}}})),gNe=me(e=>({yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));function yNe(e){const n=ye(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let a=0;a<4;a+=1)for(let r=0;r<3;r+=1)t[a].push(ye(n).add(i,"months").toDate()),i+=1;return t}function CV(e,n,t){return!n&&!t?!1:!!(n&&ye(e).isBefore(n,"month")||t&&ye(e).isAfter(t,"month"))}var SNe=me(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:T(.5)}},monthsListRow:{}}));function NNe(e,n,t,i){const a=e.flat().filter(l=>{var s;return!CV(l,n,t)&&!((s=i==null?void 0:i(l))!=null&&s.disabled)}),r=a.find(l=>{var s;return(s=i==null?void 0:i(l))==null?void 0:s.selected});if(r)return r;const o=a.find(l=>ye().isSame(l,"month"));return o||a[0]}var bNe=Object.defineProperty,xNe=Object.defineProperties,FNe=Object.getOwnPropertyDescriptors,X$=Object.getOwnPropertySymbols,wNe=Object.prototype.hasOwnProperty,_Ne=Object.prototype.propertyIsEnumerable,Q$=(e,n,t)=>n in e?bNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,hp=(e,n)=>{for(var t in n||(n={}))wNe.call(n,t)&&Q$(e,t,n[t]);if(X$)for(var t of X$(n))_Ne.call(n,t)&&Q$(e,t,n[t]);return e},Z$=(e,n)=>xNe(e,FNe(n)),CNe=me((e,n,{size:t})=>{const i=e.fn.variant({variant:"filled"}),a=e.fn.variant({variant:"light"});return{pickerControl:Z$(hp({fontSize:q({size:t,sizes:e.fontSizes}),height:q({size:t,sizes:gm}),width:`calc((${q({size:t,sizes:gm})} * 7) / 3 + ${T(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":hp({backgroundColor:a.background,borderRadius:0},e.fn.hover({backgroundColor:a.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":hp({color:i.color,backgroundColor:i.background},e.fn.hover({backgroundColor:i.hover})),"&[data-disabled]":Z$(hp({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}),PNe=Object.defineProperty,Og=Object.getOwnPropertySymbols,PV=Object.prototype.hasOwnProperty,OV=Object.prototype.propertyIsEnumerable,J$=(e,n,t)=>n in e?PNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ONe=(e,n)=>{for(var t in n||(n={}))PV.call(n,t)&&J$(e,t,n[t]);if(Og)for(var t of Og(n))OV.call(n,t)&&J$(e,t,n[t]);return e},DNe=(e,n)=>{var t={};for(var i in e)PV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Og)for(var i of Og(e))n.indexOf(i)<0&&OV.call(e,i)&&(t[i]=e[i]);return t};const ENe={size:"sm"},C_=S.forwardRef((e,n)=>{const t=ae("PickerControl",ENe,e),{className:i,children:a,disabled:r,selected:o,classNames:l,styles:s,unstyled:d,firstInRange:c,lastInRange:u,inRange:f,__staticSelector:p,size:h,variant:k}=t,y=DNe(t,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:g,cx:v}=CNe(null,{name:["PickerControl",p],classNames:l,styles:s,unstyled:d,variant:k,size:h});return b.createElement(fi,ONe({className:v(g.pickerControl,i),ref:n,unstyled:d,"data-picker-control":!0,"data-selected":o&&!r||void 0,"data-disabled":r||void 0,"data-in-range":f&&!r&&!o||void 0,"data-first-in-range":c&&!r||void 0,"data-last-in-range":u&&!r||void 0,disabled:r},y),a)});C_.displayName="@mantine/dates/PickerControl";var $Ne=Object.defineProperty,INe=Object.defineProperties,jNe=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,DV=Object.prototype.hasOwnProperty,EV=Object.prototype.propertyIsEnumerable,eI=(e,n,t)=>n in e?$Ne(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,nI=(e,n)=>{for(var t in n||(n={}))DV.call(n,t)&&eI(e,t,n[t]);if(Dg)for(var t of Dg(n))EV.call(n,t)&&eI(e,t,n[t]);return e},TNe=(e,n)=>INe(e,jNe(n)),ANe=(e,n)=>{var t={};for(var i in e)DV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Dg)for(var i of Dg(e))n.indexOf(i)<0&&EV.call(e,i)&&(t[i]=e[i]);return t};const RNe={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},$V=S.forwardRef((e,n)=>{const t=ae("MonthsList",RNe,e),{year:i,className:a,monthsListFormat:r,locale:o,minDate:l,maxDate:s,getMonthControlProps:d,classNames:c,styles:u,unstyled:f,__staticSelector:p,__getControlRef:h,__onControlKeyDown:k,__onControlClick:y,__onControlMouseEnter:g,__preventFocus:v,size:N,variant:x,__stopPropagation:F,withCellSpacing:_}=t,w=ANe(t,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:C,cx:$}=SNe(null,{name:["MonthsList",p],classNames:c,styles:u,unstyled:f,variant:x,size:N}),E=Gr(),j=yNe(i),D=NNe(j,l,s,d),M=j.map((R,I)=>{const L=R.map((B,O)=>{const P=d==null?void 0:d(B),A=ye(B).isSame(D,"month");return b.createElement("td",{key:O,className:C.monthsListCell,"data-with-spacing":_||void 0},b.createElement(C_,TNe(nI({variant:x,size:N,classNames:c,styles:u,unstyled:f,__staticSelector:p||"MonthsList","data-mantine-stop-propagation":F||void 0,disabled:CV(B,l,s),ref:V=>h==null?void 0:h(I,O,V)},P),{onKeyDown:V=>{var U;(U=P==null?void 0:P.onKeyDown)==null||U.call(P,V),k==null||k(V,{rowIndex:I,cellIndex:O,date:B})},onClick:V=>{var U;(U=P==null?void 0:P.onClick)==null||U.call(P,V),y==null||y(V,B)},onMouseEnter:V=>{var U;(U=P==null?void 0:P.onMouseEnter)==null||U.call(P,V),g==null||g(V,B)},onMouseDown:V=>{var U;(U=P==null?void 0:P.onMouseDown)==null||U.call(P,V),v&&V.preventDefault()},tabIndex:v||!A?-1:0}),ye(B).locale(E.getLocale(o)).format(r)))});return b.createElement("tr",{key:I,className:C.monthsListRow},L)});return b.createElement(xe,nI({component:"table",ref:n,className:$(C.monthsList,a)},w),b.createElement("tbody",null,M))});$V.displayName="@mantine/dates/MonthsList";var MNe=Object.defineProperty,Eg=Object.getOwnPropertySymbols,IV=Object.prototype.hasOwnProperty,jV=Object.prototype.propertyIsEnumerable,tI=(e,n,t)=>n in e?MNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,lN=(e,n)=>{for(var t in n||(n={}))IV.call(n,t)&&tI(e,t,n[t]);if(Eg)for(var t of Eg(n))jV.call(n,t)&&tI(e,t,n[t]);return e},LNe=(e,n)=>{var t={};for(var i in e)IV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Eg)for(var i of Eg(e))n.indexOf(i)<0&&jV.call(e,i)&&(t[i]=e[i]);return t};const zNe={yearLabelFormat:"YYYY",size:"sm"},TV=S.forwardRef((e,n)=>{const t=ae("YearLevel",zNe,e),{year:i,locale:a,minDate:r,maxDate:o,monthsListFormat:l,getMonthControlProps:s,__getControlRef:d,__onControlKeyDown:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:h,nextIcon:k,previousIcon:y,nextLabel:g,previousLabel:v,onNext:N,onPrevious:x,onLevelClick:F,nextDisabled:_,previousDisabled:w,hasNextLevel:C,levelControlAriaLabel:$,withNext:E,withPrevious:j,className:D,yearLabelFormat:M,classNames:R,styles:I,unstyled:L,__staticSelector:B,__stopPropagation:O,size:P,variant:A}=t,V=LNe(t,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:U,cx:oe}=gNe(null,{name:["YearLevel",B],classNames:R,styles:I,unstyled:L,size:P,variant:A}),G=Gr(),ne={__staticSelector:B||"YearLevel",classNames:R,styles:I,unstyled:L,size:P,variant:A},Z=typeof _=="boolean"?_:o?!ye(i).endOf("year").isBefore(o):!1,ce=typeof w=="boolean"?w:r?!ye(i).startOf("year").isAfter(r):!1;return b.createElement(xe,lN({className:oe(U.yearLevel,D),"data-year-level":!0,ref:n},V),b.createElement(FS,lN({label:typeof M=="function"?M(i):ye(i).locale(a||G.locale).format(M),className:U.calendarHeader,__preventFocus:h,__stopPropagation:O,nextIcon:k,previousIcon:y,nextLabel:g,previousLabel:v,onNext:N,onPrevious:x,onLevelClick:F,nextDisabled:Z,previousDisabled:ce,hasNextLevel:C,levelControlAriaLabel:$,withNext:E,withPrevious:j},ne)),b.createElement($V,lN({year:i,locale:a,minDate:r,maxDate:o,monthsListFormat:l,getMonthControlProps:s,__getControlRef:d,__onControlKeyDown:c,__onControlClick:u,__onControlMouseEnter:f,__preventFocus:h,__stopPropagation:O,withCellSpacing:p},ne)))});TV.displayName="@mantine/dates/YearLevel";var BNe=Object.defineProperty,$g=Object.getOwnPropertySymbols,AV=Object.prototype.hasOwnProperty,RV=Object.prototype.propertyIsEnumerable,iI=(e,n,t)=>n in e?BNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,VNe=(e,n)=>{for(var t in n||(n={}))AV.call(n,t)&&iI(e,t,n[t]);if($g)for(var t of $g(n))RV.call(n,t)&&iI(e,t,n[t]);return e},WNe=(e,n)=>{var t={};for(var i in e)AV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&$g)for(var i of $g(e))n.indexOf(i)<0&&RV.call(e,i)&&(t[i]=e[i]);return t};const HNe={numberOfColumns:1,size:"sm"},MV=S.forwardRef((e,n)=>{const t=ae("YearLevelGroup",HNe,e),{year:i,locale:a,minDate:r,maxDate:o,monthsListFormat:l,getMonthControlProps:s,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:u,__preventFocus:f,nextIcon:p,previousIcon:h,nextLabel:k,previousLabel:y,onNext:g,onPrevious:v,onLevelClick:N,nextDisabled:x,previousDisabled:F,hasNextLevel:_,className:w,classNames:C,styles:$,unstyled:E,__staticSelector:j,__stopPropagation:D,numberOfColumns:M,levelControlAriaLabel:R,yearLabelFormat:I,variant:L,size:B}=t,O=WNe(t,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:P,cx:A}=kNe(null,{name:["YearLevelGroup",j],styles:$,classNames:C,unstyled:E,variant:L,size:B}),V=S.useRef([]),U=Array(M).fill(0).map((oe,G)=>{const ne=ye(i).add(G,"years").toDate();return b.createElement(TV,{key:G,variant:L,size:B,monthsListFormat:l,year:ne,withNext:G===M-1,withPrevious:G===0,yearLabelFormat:I,__stopPropagation:D,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(Z,ce)=>__({levelIndex:G,rowIndex:ce.rowIndex,cellIndex:ce.cellIndex,event:Z,controlsRef:V}),__getControlRef:(Z,ce,ie)=>{Array.isArray(V.current[G])||(V.current[G]=[]),Array.isArray(V.current[G][Z])||(V.current[G][Z]=[]),V.current[G][Z][ce]=ie},levelControlAriaLabel:typeof R=="function"?R(ne):R,locale:a,minDate:r,maxDate:o,__preventFocus:f,nextIcon:p,previousIcon:h,nextLabel:k,previousLabel:y,onNext:g,onPrevious:v,onLevelClick:N,nextDisabled:x,previousDisabled:F,hasNextLevel:_,getMonthControlProps:s,classNames:C,styles:$,unstyled:E,__staticSelector:j||"YearLevelGroup",withCellSpacing:u})});return b.createElement(xe,VNe({className:A(P.yearLevelGroup,w),ref:n},O),U)});MV.displayName="@mantine/dates/YearLevelGroup";var UNe=me(e=>({decadeLevelGroup:{display:"flex",gap:e.spacing.md}}));function LV(e){const n=e.getFullYear(),t=n-n%10;let i=0;const a=[[],[],[],[]];for(let r=0;r<4;r+=1){const o=r===3?1:3;for(let l=0;l<o;l+=1)a[r].push(new Date(t+i,0)),i+=1}return a}function YNe(e){const n=LV(e);return[n[0][0],n[3][0]]}var GNe=me(e=>({decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));function zV(e,n,t){return!n&&!t?!1:!!(n&&ye(e).isBefore(n,"year")||t&&ye(e).isAfter(t,"year"))}var qNe=me(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:T(.5)}},yearsListRow:{}}));function KNe(e,n,t,i){const a=e.flat().filter(l=>{var s;return!zV(l,n,t)&&!((s=i==null?void 0:i(l))!=null&&s.disabled)}),r=a.find(l=>{var s;return(s=i==null?void 0:i(l))==null?void 0:s.selected});if(r)return r;const o=a.find(l=>ye().isSame(l,"year"));return o||a[0]}var XNe=Object.defineProperty,QNe=Object.defineProperties,ZNe=Object.getOwnPropertyDescriptors,Ig=Object.getOwnPropertySymbols,BV=Object.prototype.hasOwnProperty,VV=Object.prototype.propertyIsEnumerable,aI=(e,n,t)=>n in e?XNe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,rI=(e,n)=>{for(var t in n||(n={}))BV.call(n,t)&&aI(e,t,n[t]);if(Ig)for(var t of Ig(n))VV.call(n,t)&&aI(e,t,n[t]);return e},JNe=(e,n)=>QNe(e,ZNe(n)),ebe=(e,n)=>{var t={};for(var i in e)BV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ig)for(var i of Ig(e))n.indexOf(i)<0&&VV.call(e,i)&&(t[i]=e[i]);return t};const nbe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},WV=S.forwardRef((e,n)=>{const t=ae("YearsList",nbe,e),{decade:i,className:a,yearsListFormat:r,locale:o,minDate:l,maxDate:s,getYearControlProps:d,classNames:c,styles:u,unstyled:f,__staticSelector:p,__getControlRef:h,__onControlKeyDown:k,__onControlClick:y,__onControlMouseEnter:g,__preventFocus:v,__stopPropagation:N,size:x,variant:F,withCellSpacing:_}=t,w=ebe(t,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:C,cx:$}=qNe(null,{name:["YearsList",p],classNames:c,styles:u,unstyled:f,variant:F,size:x}),E=Gr(),j=LV(i),D=KNe(j,l,s,d),M=j.map((R,I)=>{const L=R.map((B,O)=>{const P=d==null?void 0:d(B),A=ye(B).isSame(D,"year");return b.createElement("td",{key:O,className:C.yearsListCell,"data-with-spacing":_||void 0},b.createElement(C_,JNe(rI({size:x,variant:F,classNames:c,styles:u,unstyled:f,__staticSelector:p||"YearsList","data-mantine-stop-propagation":N||void 0,disabled:zV(B,l,s),ref:V=>h==null?void 0:h(I,O,V)},P),{onKeyDown:V=>{var U;(U=P==null?void 0:P.onKeyDown)==null||U.call(P,V),k==null||k(V,{rowIndex:I,cellIndex:O,date:B})},onClick:V=>{var U;(U=P==null?void 0:P.onClick)==null||U.call(P,V),y==null||y(V,B)},onMouseEnter:V=>{var U;(U=P==null?void 0:P.onMouseEnter)==null||U.call(P,V),g==null||g(V,B)},onMouseDown:V=>{var U;(U=P==null?void 0:P.onMouseDown)==null||U.call(P,V),v&&V.preventDefault()},tabIndex:v||!A?-1:0}),ye(B).locale(E.getLocale(o)).format(r)))});return b.createElement("tr",{key:I,className:C.yearsListRow},L)});return b.createElement(xe,rI({component:"table",ref:n,className:$(C.yearsList,a)},w),b.createElement("tbody",null,M))});WV.displayName="@mantine/dates/YearsList";var tbe=Object.defineProperty,jg=Object.getOwnPropertySymbols,HV=Object.prototype.hasOwnProperty,UV=Object.prototype.propertyIsEnumerable,oI=(e,n,t)=>n in e?tbe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,sN=(e,n)=>{for(var t in n||(n={}))HV.call(n,t)&&oI(e,t,n[t]);if(jg)for(var t of jg(n))UV.call(n,t)&&oI(e,t,n[t]);return e},ibe=(e,n)=>{var t={};for(var i in e)HV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&jg)for(var i of jg(e))n.indexOf(i)<0&&UV.call(e,i)&&(t[i]=e[i]);return t};const abe={decadeLabelFormat:"YYYY"},YV=S.forwardRef((e,n)=>{const t=ae("DecadeLevel",abe,e),{decade:i,locale:a,minDate:r,maxDate:o,yearsListFormat:l,getYearControlProps:s,__getControlRef:d,__onControlKeyDown:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:h,nextIcon:k,previousIcon:y,nextLabel:g,previousLabel:v,onNext:N,onPrevious:x,nextDisabled:F,previousDisabled:_,levelControlAriaLabel:w,withNext:C,withPrevious:$,className:E,decadeLabelFormat:j,classNames:D,styles:M,unstyled:R,__staticSelector:I,__stopPropagation:L,variant:B,size:O}=t,P=ibe(t,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:A,cx:V}=GNe(null,{name:["DecadeLevel",I],classNames:D,styles:M,unstyled:R,variant:B,size:O}),U=Gr(),[oe,G]=YNe(i),ne={__staticSelector:I||"DecadeLevel",classNames:D,styles:M,unstyled:R,variant:B,size:O},Z=typeof F=="boolean"?F:o?!ye(G).endOf("year").isBefore(o):!1,ce=typeof _=="boolean"?_:r?!ye(oe).startOf("year").isAfter(r):!1,ie=(ve,he)=>ye(ve).locale(a||U.locale).format(he);return b.createElement(xe,sN({className:V(A.decadeLevel,E),"data-decade-level":!0,ref:n},P),b.createElement(FS,sN({label:typeof j=="function"?j(oe,G):`${ie(oe,j)} – ${ie(G,j)}`,className:A.calendarHeader,__preventFocus:h,__stopPropagation:L,nextIcon:k,previousIcon:y,nextLabel:g,previousLabel:v,onNext:N,onPrevious:x,nextDisabled:Z,previousDisabled:ce,hasNextLevel:!1,levelControlAriaLabel:w,withNext:C,withPrevious:$},ne)),b.createElement(WV,sN({decade:i,locale:a,minDate:r,maxDate:o,yearsListFormat:l,getYearControlProps:s,__getControlRef:d,__onControlKeyDown:c,__onControlClick:u,__onControlMouseEnter:f,__preventFocus:h,__stopPropagation:L,withCellSpacing:p},ne)))});YV.displayName="@mantine/dates/DecadeLevel";var rbe=Object.defineProperty,Tg=Object.getOwnPropertySymbols,GV=Object.prototype.hasOwnProperty,qV=Object.prototype.propertyIsEnumerable,lI=(e,n,t)=>n in e?rbe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,obe=(e,n)=>{for(var t in n||(n={}))GV.call(n,t)&&lI(e,t,n[t]);if(Tg)for(var t of Tg(n))qV.call(n,t)&&lI(e,t,n[t]);return e},lbe=(e,n)=>{var t={};for(var i in e)GV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Tg)for(var i of Tg(e))n.indexOf(i)<0&&qV.call(e,i)&&(t[i]=e[i]);return t};const sbe={numberOfColumns:1},KV=S.forwardRef((e,n)=>{const t=ae("DecadeLevelGroup",sbe,e),{decade:i,locale:a,minDate:r,maxDate:o,yearsListFormat:l,getYearControlProps:s,__onControlClick:d,__onControlMouseEnter:c,withCellSpacing:u,__preventFocus:f,nextIcon:p,previousIcon:h,nextLabel:k,previousLabel:y,onNext:g,onPrevious:v,nextDisabled:N,previousDisabled:x,className:F,classNames:_,styles:w,unstyled:C,__staticSelector:$,__stopPropagation:E,numberOfColumns:j,levelControlAriaLabel:D,decadeLabelFormat:M,variant:R,size:I}=t,L=lbe(t,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:B,cx:O}=UNe(null,{name:["DecadeLevelGroup",$],styles:w,classNames:_,unstyled:C,variant:R,size:I}),P=S.useRef([]),A=Array(j).fill(0).map((V,U)=>{const oe=ye(i).add(U*10,"years").toDate();return b.createElement(YV,{key:U,variant:R,size:I,yearsListFormat:l,decade:oe,withNext:U===j-1,withPrevious:U===0,decadeLabelFormat:M,__onControlClick:d,__onControlMouseEnter:c,__onControlKeyDown:(G,ne)=>__({levelIndex:U,rowIndex:ne.rowIndex,cellIndex:ne.cellIndex,event:G,controlsRef:P}),__getControlRef:(G,ne,Z)=>{Array.isArray(P.current[U])||(P.current[U]=[]),Array.isArray(P.current[U][G])||(P.current[U][G]=[]),P.current[U][G][ne]=Z},levelControlAriaLabel:typeof D=="function"?D(oe):D,locale:a,minDate:r,maxDate:o,__preventFocus:f,__stopPropagation:E,nextIcon:p,previousIcon:h,nextLabel:k,previousLabel:y,onNext:g,onPrevious:v,nextDisabled:N,previousDisabled:x,getYearControlProps:s,__staticSelector:$||"DecadeLevelGroup",classNames:_,styles:w,unstyled:C,withCellSpacing:u})});return b.createElement(xe,obe({className:O(B.decadeLevelGroup,F),ref:n},L),A)});KV.displayName="@mantine/dates/DecadeLevelGroup";var dbe=Object.defineProperty,Ag=Object.getOwnPropertySymbols,XV=Object.prototype.hasOwnProperty,QV=Object.prototype.propertyIsEnumerable,sI=(e,n,t)=>n in e?dbe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,vp=(e,n)=>{for(var t in n||(n={}))XV.call(n,t)&&sI(e,t,n[t]);if(Ag)for(var t of Ag(n))QV.call(n,t)&&sI(e,t,n[t]);return e},cbe=(e,n)=>{var t={};for(var i in e)XV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ag)for(var i of Ag(e))n.indexOf(i)<0&&QV.call(e,i)&&(t[i]=e[i]);return t};const ube={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},wS=S.forwardRef((e,n)=>{const t=ae("Calendar",ube,e),{maxLevel:i,minLevel:a,defaultLevel:r,level:o,onLevelChange:l,date:s,defaultDate:d,onDateChange:c,numberOfColumns:u,columnsToScroll:f,ariaLabels:p,onYearSelect:h,onMonthSelect:k,onYearMouseEnter:y,onMonthMouseEnter:g,__updateDateOnYearSelect:v,__updateDateOnMonthSelect:N,firstDayOfWeek:x,weekdayFormat:F,weekendDays:_,getDayProps:w,excludeDate:C,renderDay:$,hideOutsideDates:E,hideWeekdays:j,getDayAriaLabel:D,monthLabelFormat:M,nextIcon:R,previousIcon:I,__onDayClick:L,__onDayMouseEnter:B,withCellSpacing:O,monthsListFormat:P,getMonthControlProps:A,yearLabelFormat:V,yearsListFormat:U,getYearControlProps:oe,decadeLabelFormat:G,minDate:ne,maxDate:Z,locale:ce,className:ie,classNames:ve,styles:he,__staticSelector:ge,unstyled:K,variant:de,size:be,__preventFocus:Ee,__stopPropagation:Qe,onNextDecade:$e,onPreviousDecade:z,onNextYear:H,onPreviousYear:W,onNextMonth:ee,onPreviousMonth:J,static:Q}=t,Y=cbe(t,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:se,cx:Ce}=b0e(null,{name:["Calendar",ge],classNames:ve,styles:he,unstyled:K,variant:de,size:be}),[Ae,Te]=vt({value:o?Xc(o,a,i):void 0,defaultValue:r?Xc(r,a,i):void 0,finalValue:Xc(void 0,a,i),onChange:l}),[cn,nn]=vt({value:s,defaultValue:d,finalValue:null,onChange:c}),un={__staticSelector:ge||"Calendar",styles:he,classNames:ve,unstyled:K,variant:de,size:be},$n=f||u||1,qe=cn||new Date,ke=()=>{const mn=ye(qe).add($n,"month").toDate();ee==null||ee(mn),nn(mn)},_e=()=>{const mn=ye(qe).subtract($n,"month").toDate();J==null||J(mn),nn(mn)},Ft=()=>{const mn=ye(qe).add($n,"year").toDate();H==null||H(mn),nn(mn)},Nn=()=>{const mn=ye(qe).subtract($n,"year").toDate();W==null||W(mn),nn(mn)},vn=()=>{const mn=ye(qe).add(10*$n,"year").toDate();$e==null||$e(mn),nn(mn)},It=()=>{const mn=ye(qe).subtract(10*$n,"year").toDate();z==null||z(mn),nn(mn)};return b.createElement(xe,vp({className:Ce(se.calendar,ie),ref:n},Y),Ae==="month"&&b.createElement(_V,vp({month:qe,minDate:ne,maxDate:Z,firstDayOfWeek:x,weekdayFormat:F,weekendDays:_,getDayProps:w,excludeDate:C,renderDay:$,hideOutsideDates:E,hideWeekdays:j,getDayAriaLabel:D,onNext:ke,onPrevious:_e,hasNextLevel:i!=="month",onLevelClick:()=>Te("year"),numberOfColumns:u,locale:ce,levelControlAriaLabel:p==null?void 0:p.monthLevelControl,nextLabel:p==null?void 0:p.nextMonth,nextIcon:R,previousLabel:p==null?void 0:p.previousMonth,previousIcon:I,monthLabelFormat:M,__onDayClick:L,__onDayMouseEnter:B,__preventFocus:Ee,__stopPropagation:Qe,static:Q,withCellSpacing:O},un)),Ae==="year"&&b.createElement(MV,vp({year:qe,numberOfColumns:u,minDate:ne,maxDate:Z,monthsListFormat:P,getMonthControlProps:A,locale:ce,onNext:Ft,onPrevious:Nn,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Te("decade"),levelControlAriaLabel:p==null?void 0:p.yearLevelControl,nextLabel:p==null?void 0:p.nextYear,nextIcon:R,previousLabel:p==null?void 0:p.previousYear,previousIcon:I,yearLabelFormat:V,__onControlMouseEnter:g,__onControlClick:(mn,Xn)=>{N&&nn(Xn),Te(Xc("month",a,i)),k==null||k(Xn)},__preventFocus:Ee,__stopPropagation:Qe,withCellSpacing:O},un)),Ae==="decade"&&b.createElement(KV,vp({decade:qe,minDate:ne,maxDate:Z,yearsListFormat:U,getYearControlProps:oe,locale:ce,onNext:vn,onPrevious:It,numberOfColumns:u,nextLabel:p==null?void 0:p.nextDecade,nextIcon:R,previousLabel:p==null?void 0:p.previousDecade,previousIcon:I,decadeLabelFormat:G,__onControlMouseEnter:y,__onControlClick:(mn,Xn)=>{v&&nn(Xn),Te(Xc("year",a,i)),h==null||h(Xn)},__preventFocus:Ee,__stopPropagation:Qe,withCellSpacing:O},un)))});wS.displayName="@mantine/dates/Calendar";var dI=Object.getOwnPropertySymbols,mbe=Object.prototype.hasOwnProperty,fbe=Object.prototype.propertyIsEnumerable,pbe=(e,n)=>{var t={};for(var i in e)mbe.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&dI)for(var i of dI(e))n.indexOf(i)<0&&fbe.call(e,i)&&(t[i]=e[i]);return t};function ZV(e){const n=e,{maxLevel:t,minLevel:i,defaultLevel:a,level:r,onLevelChange:o,nextIcon:l,previousIcon:s,date:d,defaultDate:c,onDateChange:u,numberOfColumns:f,columnsToScroll:p,ariaLabels:h,onYearSelect:k,onMonthSelect:y,onYearMouseEnter:g,onMonthMouseEnter:v,onNextMonth:N,onPreviousMonth:x,onNextYear:F,onPreviousYear:_,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,__updateDateOnYearSelect:E,__updateDateOnMonthSelect:j,firstDayOfWeek:D,weekdayFormat:M,weekendDays:R,getDayProps:I,excludeDate:L,renderDay:B,hideOutsideDates:O,hideWeekdays:P,getDayAriaLabel:A,monthLabelFormat:V,monthsListFormat:U,getMonthControlProps:oe,yearLabelFormat:G,yearsListFormat:ne,getYearControlProps:Z,decadeLabelFormat:ce,allowSingleDateInRange:ie,allowDeselect:ve,minDate:he,maxDate:ge,locale:K}=n,de=pbe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:t,minLevel:i,defaultLevel:a,level:r,onLevelChange:o,nextIcon:l,previousIcon:s,date:d,defaultDate:c,onDateChange:u,numberOfColumns:f,columnsToScroll:p,ariaLabels:h,onYearSelect:k,onMonthSelect:y,onYearMouseEnter:g,onMonthMouseEnter:v,onNextMonth:N,onPreviousMonth:x,onNextYear:F,onPreviousYear:_,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,__updateDateOnYearSelect:E,__updateDateOnMonthSelect:j,firstDayOfWeek:D,weekdayFormat:M,weekendDays:R,getDayProps:I,excludeDate:L,renderDay:B,hideOutsideDates:O,hideWeekdays:P,getDayAriaLabel:A,monthLabelFormat:V,monthsListFormat:U,getMonthControlProps:oe,yearLabelFormat:G,yearsListFormat:ne,getYearControlProps:Z,decadeLabelFormat:ce,allowSingleDateInRange:ie,allowDeselect:ve,minDate:he,maxDate:ge,locale:K},others:de}}function hbe({date:e,maxDate:n,minDate:t}){return!(e==null||Number.isNaN(e.getTime())||n&&ye(e).isAfter(n,"date")||t&&ye(e).isBefore(t,"date"))}function vbe(e){const n=new Date(e);return Number.isNaN(n.getTime())||!e?null:n}function kbe(e,n){if(n==="range"&&Array.isArray(e)){const[t,i]=e;return t?i?`${t.toISOString()} – ${i.toISOString()}`:`${t.toISOString()} –`:""}return n==="multiple"&&Array.isArray(e)?e.map(t=>t.toISOString()).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function P_({value:e,type:n,name:t,form:i}){return b.createElement("input",{type:"hidden",value:kbe(e,n),name:t,form:i})}P_.displayName="@mantine/dates/HiddenDatesInput";function gbe(e,n){if(!e||!n)return n;const t=e.getHours(),i=e.getMinutes(),a=e.getSeconds(),r=e.getMilliseconds(),o=new Date(n);return o.setHours(t),o.setMinutes(i),o.setSeconds(a),o.setMilliseconds(r),o}var ybe=Object.defineProperty,Sbe=Object.defineProperties,Nbe=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,JV=Object.prototype.hasOwnProperty,e7=Object.prototype.propertyIsEnumerable,cI=(e,n,t)=>n in e?ybe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,vl=(e,n)=>{for(var t in n||(n={}))JV.call(n,t)&&cI(e,t,n[t]);if(Rg)for(var t of Rg(n))e7.call(n,t)&&cI(e,t,n[t]);return e},kp=(e,n)=>Sbe(e,Nbe(n)),bbe=(e,n)=>{var t={};for(var i in e)JV.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Rg)for(var i of Rg(e))n.indexOf(i)<0&&e7.call(e,i)&&(t[i]=e[i]);return t};const xbe={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0,size:"sm"},wx=S.forwardRef((e,n)=>{const t=Qm("DateInput",xbe,e),{inputProps:i,wrapperProps:a,value:r,defaultValue:o,onChange:l,clearable:s,clearButtonProps:d,popoverProps:c,getDayProps:u,locale:f,valueFormat:p,dateParser:h,minDate:k,maxDate:y,fixOnBlur:g,onFocus:v,onBlur:N,onClick:x,readOnly:F,name:_,form:w,rightSection:C,unstyled:$,classNames:E,styles:j,allowDeselect:D,preserveTime:M,date:R,defaultDate:I,onDateChange:L}=t,B=bbe(t,["inputProps","wrapperProps","value","defaultValue","onChange","clearable","clearButtonProps","popoverProps","getDayProps","locale","valueFormat","dateParser","minDate","maxDate","fixOnBlur","onFocus","onBlur","onClick","readOnly","name","form","rightSection","unstyled","classNames","styles","allowDeselect","preserveTime","date","defaultDate","onDateChange"]),{calendarProps:O,others:P}=ZV(B),A=Gr(),U=h||(W=>{const ee=ye(W,p,A.getLocale(f)).toDate();return Number.isNaN(ee.getTime())?vbe(W):ee}),oe=D!==void 0?D:s,G=W=>W?ye(W).locale(A.getLocale(f)).format(p):"",[ne,Z,ce]=vt({value:r,defaultValue:o,finalValue:null,onChange:l}),[ie,ve]=vt({value:R,defaultValue:o||I,finalValue:null,onChange:L});S.useEffect(()=>{ce&&ve(r)},[ce,r]);const[he,ge]=S.useState(G(ne));S.useEffect(()=>{ge(G(ne))},[A.getLocale(f)]);const[K,de]=S.useState(!1),be=W=>{const ee=W.currentTarget.value;if(ge(ee),ee.trim()===""&&s)Z(null);else{const J=U(ee);hbe({date:J,minDate:k,maxDate:y})&&(Z(J),ve(J))}},Ee=W=>{N==null||N(W),de(!1),g&&ge(G(ne))},Qe=W=>{v==null||v(W),de(!0)},$e=W=>{x==null||x(W),de(!0)},z=W=>kp(vl({},u==null?void 0:u(W)),{selected:ye(ne).isSame(W,"day"),onClick:()=>{const ee=M?gbe(ne,W):W,J=s&&oe&&ye(ne).isSame(W,"day")?null:ee;Z(J),!ce&&ge(G(J)),de(!1)}}),H=C||(s&&ne&&!F?b.createElement(ms,vl({variant:"transparent",onMouseDown:W=>W.preventDefault(),tabIndex:-1,onClick:()=>{Z(null),!ce&&ge(""),de(!1)},unstyled:$},d)):null);return Et(()=>{r!==void 0&&!K&&ge(G(r))},[r]),b.createElement(b.Fragment,null,b.createElement(it.Wrapper,kp(vl({},a),{__staticSelector:"DateInput"}),b.createElement(Jt,vl({opened:K,trapFocus:!1,position:"bottom-start",disabled:F,withRoles:!1},c),b.createElement(Jt.Target,null,b.createElement(it,kp(vl(vl({"data-dates-input":!0,"data-read-only":F||void 0,autoComplete:"off",ref:n,value:he,onChange:be,onBlur:Ee,onFocus:Qe,onClick:$e,readOnly:F,rightSection:H},i),P),{__staticSelector:"DateInput"}))),b.createElement(Jt.Dropdown,{onMouseDown:W=>W.preventDefault(),"data-dates-dropdown":!0},b.createElement(wS,kp(vl({__staticSelector:"DateInput"},O),{classNames:E,styles:j,unstyled:$,__preventFocus:!0,minDate:k,maxDate:y,locale:f,getDayProps:z,size:i.size,date:ie,onDateChange:ve}))))),b.createElement(P_,{name:_,form:w,value:ne,type:"default"}))});wx.displayName="@mantine/dates/DateInput";const uI=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function n7({type:e,value:n,defaultValue:t,onChange:i}){const a=S.useRef(e),[r,o]=vt({value:n,defaultValue:t,onChange:i,finalValue:uI(e)});let l=r;return a.current!==e&&(a.current=e,n===void 0&&(l=t!==void 0?t:uI(e),o(l))),[l,o]}function mI(e,n){const t=[...n].sort((i,a)=>i.getTime()-a.getTime());return ye(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&ye(t[1]).endOf("day").add(1,"ms").isAfter(e)}function t7({type:e,level:n,value:t,defaultValue:i,onChange:a,allowSingleDateInRange:r,allowDeselect:o,onMouseLeave:l}){const[s,d]=n7({type:e,value:t,defaultValue:i,onChange:a}),[c,u]=S.useState(e==="range"&&s[0]&&!s[1]?s[0]:null),[f,p]=S.useState(null),h=F=>{if(e==="range"){if(c instanceof Date&&!s[1]){if(ye(F).isSame(c,n)&&!r){u(null),p(null),d([null,null]);return}const _=[F,c];_.sort((w,C)=>w.getTime()-C.getTime()),d(_),p(null),u(null);return}if(s[0]&&!s[1]&&ye(F).isSame(s[0],n)&&!r){u(null),p(null),d([null,null]);return}d([F,null]),p(null),u(F);return}if(e==="multiple"){s.some(_=>ye(_).isSame(F,n))?d(s.filter(_=>!ye(_).isSame(F,n))):d([...s,F]);return}s&&o&&ye(F).isSame(s,n)?d(null):d(F)},k=F=>c instanceof Date&&f instanceof Date?mI(F,[f,c]):s[0]instanceof Date&&s[1]instanceof Date?mI(F,s):!1,y=e==="range"?F=>{l==null||l(F),p(null)}:l,g=F=>s[0]instanceof Date&&ye(F).isSame(s[0],n)?!(f&&ye(f).isBefore(s[0])):!1,v=F=>s[1]instanceof Date?ye(F).isSame(s[1],n):!(s[0]instanceof Date)||!f?!1:ye(f).isBefore(s[0])&&ye(F).isSame(s[0],n);return{onDateChange:h,onRootMouseLeave:y,onHoveredDateChange:e==="range"&&c?p:()=>{},getControlProps:F=>{if(e==="range")return{selected:s.some(w=>w&&ye(w).isSame(F,n)),inRange:k(F),firstInRange:g(F),lastInRange:v(F),"data-autofocus":!!s[0]&&ye(s[0]).isSame(F,n)||void 0};if(e==="multiple")return{selected:s.some(w=>w&&ye(w).isSame(F,n)),"data-autofocus":!!s[0]&&ye(s[0]).isSame(F,n)||void 0};const _=ye(s).isSame(F,n);return{selected:_,"data-autofocus":_||void 0}},_value:s,setValue:d}}function Fbe({type:e,date:n,locale:t,format:i,labelSeparator:a}){const r=o=>ye(o).locale(t).format(i);return e==="default"?n===null?"":r(n):e==="multiple"?n.map(r).join(", "):e==="range"?n[0]&&n[1]?`${r(n[0])} ${a} ${r(n[1])}`:n[0]?`${r(n[0])} ${a} `:"":""}function wbe({type:e,value:n,defaultValue:t,onChange:i,locale:a,format:r,closeOnChange:o,sortDates:l,labelSeparator:s}){const d=Gr(),[c,u]=tl(!1),[f,p]=n7({type:e,value:n,defaultValue:t,onChange:i}),h=Fbe({type:e,date:f,locale:d.getLocale(a),format:r,labelSeparator:d.getLabelSeparator(s)}),k=v=>{o&&(e==="default"&&u.close(),e==="range"&&v[0]&&v[1]&&u.close()),p(l&&e==="multiple"?[...v].sort((N,x)=>N.getTime()-x.getTime()):v)},y=()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),g=e==="range"?!!f[0]:e==="multiple"?f.length>0:f!==null;return{_value:f,setValue:k,onClear:y,shouldClear:g,formattedValue:h,dropdownOpened:c,dropdownHandlers:u}}function fI({minDate:e,maxDate:n}){const t=new Date;return!e&&!n?t:ye(t).isBefore(e)?e:ye(t).isAfter(n)?n:t}var _be=me(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}}));const Cbe=_be;var Pbe=Object.defineProperty,Obe=Object.defineProperties,Dbe=Object.getOwnPropertyDescriptors,Mg=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,a7=Object.prototype.propertyIsEnumerable,pI=(e,n,t)=>n in e?Pbe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,kl=(e,n)=>{for(var t in n||(n={}))i7.call(n,t)&&pI(e,t,n[t]);if(Mg)for(var t of Mg(n))a7.call(n,t)&&pI(e,t,n[t]);return e},hI=(e,n)=>Obe(e,Dbe(n)),Ebe=(e,n)=>{var t={};for(var i in e)i7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Mg)for(var i of Mg(e))n.indexOf(i)<0&&a7.call(e,i)&&(t[i]=e[i]);return t};const $be={},r7=S.forwardRef((e,n)=>{const t=Qm("PickerInputBase",$be,e),{inputProps:i,wrapperProps:a,placeholder:r,classNames:o,styles:l,unstyled:s,popoverProps:d,modalProps:c,dropdownType:u,children:f,formattedValue:p,dropdownHandlers:h,dropdownOpened:k,onClick:y,clearable:g,onClear:v,clearButtonProps:N,rightSection:x,shouldClear:F,readOnly:_,disabled:w,value:C,name:$,form:E,type:j}=t,D=Ebe(t,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:M,cx:R}=Cbe(null,{name:i.__staticSelector,classNames:o,styles:l,unstyled:s,variant:i.variant,size:i.size}),I=x||(g&&F&&!_&&!w?b.createElement(ms,kl({variant:"transparent",onClick:v,unstyled:s,size:i.size},N)):null),L=()=>{j==="range"&&C[0]&&!C[1]&&v(),h.close()},B=a.label;return b.createElement(b.Fragment,null,u==="modal"&&!_&&b.createElement(Ht,kl({opened:k,onClose:L,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:s},c),f),b.createElement(it.Wrapper,kl({},a),b.createElement(Jt,kl({position:"bottom-start",opened:k,onClose:L,disabled:u==="modal"||_,trapFocus:!0,returnFocus:!0,unstyled:s},d),b.createElement(Jt.Target,{shouldOverrideDefaultTargetId:!B},b.createElement(it,kl(hI(kl({"aria-label":p,"data-dates-input":!0,"data-read-only":_||void 0,disabled:w,component:"button",type:"button",multiline:!0,onClick:O=>{y==null||y(O),h.toggle()},rightSection:I},i),{ref:n,classNames:hI(kl({},o),{input:R(M.input,o==null?void 0:o.input)})}),D),p||b.createElement(it.Placeholder,{className:M.placeholder,sx:{color:i.error?"inherit":void 0}},r))),b.createElement(Jt.Dropdown,{"data-dates-dropdown":!0},f))),b.createElement(P_,{value:C,name:$,form:E,type:j}))});r7.displayName="@mantine/dates/PickerInputBase";var Ibe=Object.defineProperty,Lg=Object.getOwnPropertySymbols,o7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,vI=(e,n,t)=>n in e?Ibe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,dN=(e,n)=>{for(var t in n||(n={}))o7.call(n,t)&&vI(e,t,n[t]);if(Lg)for(var t of Lg(n))l7.call(n,t)&&vI(e,t,n[t]);return e},jbe=(e,n)=>{var t={};for(var i in e)o7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Lg)for(var i of Lg(e))n.indexOf(i)<0&&l7.call(e,i)&&(t[i]=e[i]);return t};const Tbe={type:"default"},_S=S.forwardRef((e,n)=>{const t=ae("MonthPicker",Tbe,e),{type:i,defaultValue:a,value:r,onChange:o,__staticSelector:l,getMonthControlProps:s,allowSingleDateInRange:d,allowDeselect:c,onMouseLeave:u,onMonthSelect:f}=t,p=jbe(t,["type","defaultValue","value","onChange","__staticSelector","getMonthControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onMonthSelect"]),{onDateChange:h,onRootMouseLeave:k,onHoveredDateChange:y,getControlProps:g}=t7({type:i,level:"month",allowDeselect:c,allowSingleDateInRange:d,value:r,defaultValue:a,onChange:o,onMouseLeave:u});return b.createElement(wS,dN({ref:n,minLevel:"year",__updateDateOnMonthSelect:!1,__staticSelector:l||"MonthPicker",onMouseLeave:k,onMonthMouseEnter:(v,N)=>y(N),onMonthSelect:v=>{h(v),f==null||f(v)},getMonthControlProps:v=>dN(dN({},g(v)),s==null?void 0:s(v))},p))});_S.displayName="@mantine/dates/MonthPicker";var Abe=Object.defineProperty,zg=Object.getOwnPropertySymbols,s7=Object.prototype.hasOwnProperty,d7=Object.prototype.propertyIsEnumerable,kI=(e,n,t)=>n in e?Abe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,cN=(e,n)=>{for(var t in n||(n={}))s7.call(n,t)&&kI(e,t,n[t]);if(zg)for(var t of zg(n))d7.call(n,t)&&kI(e,t,n[t]);return e},Rbe=(e,n)=>{var t={};for(var i in e)s7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&zg)for(var i of zg(e))n.indexOf(i)<0&&d7.call(e,i)&&(t[i]=e[i]);return t};const Mbe={type:"default"},c7=S.forwardRef((e,n)=>{const t=ae("YearPicker",Mbe,e),{type:i,defaultValue:a,value:r,onChange:o,__staticSelector:l,getYearControlProps:s,allowSingleDateInRange:d,allowDeselect:c,onMouseLeave:u,onYearSelect:f}=t,p=Rbe(t,["type","defaultValue","value","onChange","__staticSelector","getYearControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onYearSelect"]),{onDateChange:h,onRootMouseLeave:k,onHoveredDateChange:y,getControlProps:g}=t7({type:i,level:"year",allowDeselect:c,allowSingleDateInRange:d,value:r,defaultValue:a,onChange:o,onMouseLeave:u});return b.createElement(wS,cN({ref:n,minLevel:"decade",__updateDateOnYearSelect:!1,__staticSelector:l||"YearPicker",onMouseLeave:k,onYearMouseEnter:(v,N)=>y(N),onYearSelect:v=>{h(v),f==null||f(v)},getYearControlProps:v=>cN(cN({},g(v)),s==null?void 0:s(v))},p))});c7.displayName="@mantine/dates/YearPicker";var Lbe=Object.defineProperty,zbe=Object.defineProperties,Bbe=Object.getOwnPropertyDescriptors,Bg=Object.getOwnPropertySymbols,u7=Object.prototype.hasOwnProperty,m7=Object.prototype.propertyIsEnumerable,gI=(e,n,t)=>n in e?Lbe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,yI=(e,n)=>{for(var t in n||(n={}))u7.call(n,t)&&gI(e,t,n[t]);if(Bg)for(var t of Bg(n))m7.call(n,t)&&gI(e,t,n[t]);return e},Vbe=(e,n)=>zbe(e,Bbe(n)),Wbe=(e,n)=>{var t={};for(var i in e)u7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Bg)for(var i of Bg(e))n.indexOf(i)<0&&m7.call(e,i)&&(t[i]=e[i]);return t};const Hbe={type:"default",valueFormat:"YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},f7=S.forwardRef((e,n)=>{const t=ae("YearPickerInput",Hbe,e),{type:i,value:a,defaultValue:r,onChange:o,valueFormat:l,labelSeparator:s,locale:d,classNames:c,styles:u,unstyled:f,closeOnChange:p,size:h,variant:k,dropdownType:y,sortDates:g,minDate:v,maxDate:N}=t,x=Wbe(t,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:F,others:_}=ZV(x),{_value:w,setValue:C,formattedValue:$,dropdownHandlers:E,dropdownOpened:j,onClear:D,shouldClear:M}=wbe({type:i,value:a,defaultValue:r,onChange:o,locale:d,format:l,labelSeparator:s,closeOnChange:p,sortDates:g});return b.createElement(r7,yI({formattedValue:$,dropdownOpened:j,dropdownHandlers:E,classNames:c,styles:u,unstyled:f,__staticSelector:"YearPickerInput",ref:n,onClear:D,shouldClear:M,value:w,type:i,size:h,variant:k,dropdownType:y},_),b.createElement(c7,Vbe(yI({},F),{size:h,variant:k,type:i,value:w,defaultDate:Array.isArray(w)?w[0]||fI({maxDate:N,minDate:v}):w||fI({maxDate:N,minDate:v}),onChange:C,locale:d,classNames:c,styles:u,unstyled:f,__staticSelector:"YearPickerInput",__stopPropagation:y==="popover",minDate:v,maxDate:N})))});f7.displayName="@mantine/dates/YearPickerInput";const O_=()=>{const[{fetching:e},n]=at(lge);return{fetching:e,updateCharge:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error updating charge ID [${t.chargeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.updateCharge.__typename==="CommonError"?(console.error(`Error updating charge ID [${t.chargeId}]: ${r.data.updateCharge.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.updateCharge.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.updateCharge.charge)):(console.error(`Error updating charge ID [${t.chargeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}},Ube=({charge:e,onDone:n})=>{var L,B,O;const{yearOfRelevance:t,...i}=e,{updateCharge:a,fetching:r}=O_(),[o,l]=S.useState(t?new Date(t):null),[{data:s,fetching:d,error:c}]=Be({query:Hr}),[u,f]=S.useState([]),[p,h]=S.useState([]),[k,y]=S.useState([]),g=ki({defaultValues:i}),{control:v,handleSubmit:N,formState:{dirtyFields:x},setValue:F}=g,_=P=>{if(!i)return;const A=gc(P,x);n(),A&&Object.keys(A).length>0&&a({chargeId:i.id,fields:A})};S.useEffect(()=>{c&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[c]),S.useEffect(()=>{var P;(P=s==null?void 0:s.allFinancialEntities)!=null&&P.nodes.length&&f(s.allFinancialEntities.nodes.map(A=>({value:A.id,label:A.name})).sort((A,V)=>A.label>V.label?1:-1))},[s,f]);const[{data:w,fetching:C,error:$}]=Be({query:xB});S.useEffect(()=>{$&&re({title:"Error!",message:"Oh no!, we have an error fetching tax categories! 🤥"})},[$]),S.useEffect(()=>{w!=null&&w.taxCategories.length&&h(w.taxCategories.map(P=>({value:P.id,label:P.name})).sort((P,A)=>P.label>A.label?1:-1))},[w,h]);const[{data:E,fetching:j,error:D},M]=Be({query:Tke}),R=S.useCallback(()=>{M()},[M]);S.useEffect(()=>{D&&re({title:"Error!",message:"Oh no!, we have an error fetching business trips! 🤥"})},[D]),S.useEffect(()=>{E!=null&&E.allBusinessTrips.length&&y([...E.allBusinessTrips.map(P=>({value:P.id,label:P.name})).sort((P,A)=>P.label>A.label?1:-1),{value:bS,label:"None"}])},[E,y]);function I(P){l(P),F("yearOfRelevance",en(P,"yyyy-MM-dd"),{shouldDirty:!0,shouldTouch:!0})}return m.jsxs("form",{onSubmit:N(_),children:[m.jsx("div",{className:"flex-row px-10 h-max justify-start block",children:m.jsxs(Nc,{cols:3,children:[m.jsx(ue,{name:"userDescription",control:v,defaultValue:i.userDescription,rules:{required:"Required",minLength:{value:2,message:"Must be at least 2 characters"}},render:({field:{value:P,...A},fieldState:V})=>{var U;return m.jsx(Ln,{...A,value:P??void 0,error:(U=V.error)==null?void 0:U.message,label:"Description"})}}),m.jsx(ue,{name:"ownerId",control:v,defaultValue:(L=i.owner)==null?void 0:L.id,rules:{required:"Required",minLength:{value:2,message:"Minimum 2 characters"}},render:({field:P,fieldState:A})=>{var V;return m.jsx(Gn,{...P,data:u,value:P.value,disabled:d,label:"Owner",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(V=A.error)==null?void 0:V.message})}}),m.jsx(ue,{name:"defaultTaxCategoryID",control:v,defaultValue:(B=i.taxCategory)==null?void 0:B.id,render:({field:P,fieldState:A})=>{var V;return m.jsx(Gn,{...P,data:p,value:P.value,disabled:C,label:"Tax Category Override",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(V=A.error)==null?void 0:V.message})}}),m.jsx(ue,{name:"businessTripID",control:v,defaultValue:(O=i.businessTrip)==null?void 0:O.id,render:({field:P,fieldState:A})=>{var V;return m.jsx(Gn,{...P,data:k,value:P.value,disabled:j,label:"Business Trip",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(V=A.error)==null?void 0:V.message,rightSection:m.jsx(RFe,{onDone:R})})}}),m.jsx(OFe,{formManager:g}),m.jsx(ue,{name:"isProperty",control:v,defaultValue:i.property,render:({field:{value:P,...A}})=>m.jsx(Di,{...A,checked:P===!0,label:"Is Property"})}),m.jsx(ue,{name:"isConversion",control:v,defaultValue:i.conversion,render:({field:{value:P,...A}})=>m.jsx(Di,{...A,checked:P===!0,label:"Is Conversion"})}),m.jsx(f7,{label:"Year of relevance",value:o,onChange:I})]})}),m.jsxs("div",{className:"mt-10 mb-5 flex justify-center gap-5",children:[m.jsx("button",{type:"submit",onClick:()=>N(_),className:"mt-8 text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:r||Object.keys(x).length===0,children:"Accept"}),m.jsx("button",{type:"button",className:"mt-8 text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:n,children:"Cancel"})]})]})},p7=({document:e,control:n,watch:t,defaultCurrency:i})=>{var p,h,k,y;const[a,r]=S.useState(!1),[o,l]=S.useState([]),[{data:s,fetching:d,error:c}]=Be({query:Hr}),u=WSe(e)||HSe(e)||USe(e)||GSe(e)||YSe(e),f=t("documentType");return S.useEffect(()=>{r(!!f&&(f===Ki.Invoice||f===Ki.Receipt||f===Ki.InvoiceReceipt||f===Ki.Proforma||f===Ki.CreditInvoice))},[f]),S.useEffect(()=>{c&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥",color:"red"})},[c]),S.useEffect(()=>{var g;(g=s==null?void 0:s.allFinancialEntities)!=null&&g.nodes.length&&l(s.allFinancialEntities.nodes.map(v=>({value:v.id,label:v.name})).sort((v,N)=>v.label>N.label?1:-1))},[s,l]),m.jsxs(m.Fragment,{children:[m.jsx(ue,{name:"documentType",control:n,rules:{required:"Required"},defaultValue:(e==null?void 0:e.documentType)??Ki.Unprocessed,render:({field:g,fieldState:v})=>{var N;return m.jsx(PFe,{...g,selectionEnum:Ki,error:(N=v.error)==null?void 0:N.message,label:"Type"})}}),a&&m.jsxs(m.Fragment,{children:[m.jsx(ue,{name:"date",control:n,defaultValue:u?e==null?void 0:e.date:void 0,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:g,fieldState:v})=>{var N;return m.jsx(Ln,{...g,value:g.value??void 0,error:(N=v.error)==null?void 0:N.message,isDirty:v.isDirty,label:"Date"})}}),m.jsx(ue,{name:"serialNumber",control:n,defaultValue:u?e==null?void 0:e.serialNumber:void 0,render:({field:g,fieldState:v})=>{var N;return m.jsx(Ln,{...g,value:!g||g.value==="Missing"?"":g.value,error:(N=v.error)==null?void 0:N.message,isDirty:v.isDirty,label:"Serial Number"})}}),m.jsx(ue,{name:"debtorId",control:n,defaultValue:u?(p=e==null?void 0:e.debtor)==null?void 0:p.id:void 0,render:({field:g,fieldState:v})=>{var N;return m.jsx(Gn,{...g,data:o,value:g.value,disabled:d,label:"Debtor",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(N=v.error)==null?void 0:N.message})}}),m.jsx(ue,{name:"creditorId",control:n,defaultValue:u?(h=e==null?void 0:e.creditor)==null?void 0:h.id:void 0,render:({field:g,fieldState:v})=>{var N;return m.jsx(Gn,{...g,data:o,value:g.value,disabled:d,label:"Creditor",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(N=v.error)==null?void 0:N.message})}}),m.jsx(ue,{name:"vat.raw",control:n,defaultValue:u?(k=e==null?void 0:e.vat)==null?void 0:k.raw:void 0,render:({field:g,fieldState:v})=>{var N;return m.jsx(ue,{name:"vat.currency",control:n,defaultValue:u?((N=e==null?void 0:e.amount)==null?void 0:N.currency)??Hn.Ils:i,render:({field:x,fieldState:F})=>{var _,w;return m.jsx(st,{...g,error:((_=v.error)==null?void 0:_.message)||((w=F.error)==null?void 0:w.message),label:"VAT",currencyCodeProps:{...x,label:"Currency",disabled:!0}})}})}}),m.jsx(ue,{name:"amount.raw",control:n,defaultValue:u?(y=e==null?void 0:e.amount)==null?void 0:y.raw:void 0,render:({field:g,fieldState:v})=>{var N;return m.jsx(ue,{name:"amount.currency",control:n,defaultValue:u?((N=e==null?void 0:e.amount)==null?void 0:N.currency)??Hn.Ils:i,render:({field:x,fieldState:F})=>{var _,w;return m.jsx(st,{...g,error:((_=v.error)==null?void 0:_.message)||((w=F.error)==null?void 0:w.message),label:"Amount",currencyCodeProps:{...x,label:"Currency"}})}})}})]}),m.jsx(ue,{name:"image",control:n,defaultValue:e==null?void 0:e.image,render:({field:g,fieldState:v})=>{var N,x;return m.jsx(Ln,{...g,value:(N=g.value)==null?void 0:N.toString(),error:(x=v.error)==null?void 0:x.message,isDirty:v.isDirty,label:"Image URL"})}}),m.jsx(ue,{name:"file",control:n,defaultValue:e==null?void 0:e.file,render:({field:g,fieldState:v})=>{var N,x;return m.jsx("div",{className:"flex flex-row",children:m.jsx(Ln,{className:"grow",...g,value:(N=g.value)==null?void 0:N.toString(),error:(x=v.error)==null?void 0:x.message,isDirty:v.isDirty,label:"File URL"})})}})]})},Ybe=({documentId:e,onDone:n})=>{var y,g;const[{data:t,fetching:i}]=Be({query:Ike,variables:{documentId:e}}),a=t==null?void 0:t.documentById,{control:r,handleSubmit:o,formState:{dirtyFields:l},setValue:s,watch:d}=ki({defaultValues:{...a}}),[c,u]=S.useState(!1),{updateDocument:f,fetching:p}=yc(),h=v=>{if(!a)return;const N=gc(v,l);n&&n(),N&&Object.keys(N).length>0&&f({documentId:e,fields:N})},k=d("amount.currency");return S.useEffect(()=>{s("vat.currency",k)},[s,k]),m.jsxs("div",{className:"flex flex-row",children:[i&&m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!i&&a&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 w-4/5 h-max justify-items-center",children:m.jsxs("form",{onSubmit:o(h),children:[m.jsxs(Nc,{cols:4,children:[m.jsx(p7,{document:a,watch:d,control:r}),m.jsx(yge,{target:"_blank",textLabel:"File",url:(y=a==null?void 0:a.file)==null?void 0:y.toString(),title:"Open Link"})]}),m.jsx("div",{className:"flex justify-center mt-5",children:m.jsx("button",{type:"submit",className:"inline-flex cursor-pointer justify-center py-2 px-4 w-2/12  border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",disabled:p||Object.keys(l).length===0,children:"Save"})})]})}),m.jsx("div",{className:" w-1/5 h-max flex flex-col ",children:m.jsx("div",{className:"flex justify-center",children:m.jsx(hc,{onClick:()=>u(!!a.image),src:(g=a==null?void 0:a.image)==null?void 0:g.toString(),className:" cursor-pointer bg-gray-300 p-5 mr-5 max-h-fit max-w-fit"})})}),a.image&&m.jsx(La,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:c,onClose:()=>u(!1),size:"30%",children:m.jsx("div",{className:"m-2",children:m.jsx(k7,{src:a.image.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})]})},Gbe=({transactionID:e,onDone:n})=>{var g,v;const[{data:t,fetching:i}]=Be({query:jke,variables:{transactionIDs:[e]}}),a=(g=t==null?void 0:t.transactionsByIDs)==null?void 0:g[0],r=ki({defaultValues:{...a}}),[o,l]=S.useState([]),{control:s,handleSubmit:d,formState:{dirtyFields:c}}=r,{updateTransaction:u,fetching:f}=w_(),p=N=>{if(!a)return;const x=gc(N,c);n&&n(),x&&Object.keys(x).length>0&&u({transactionId:a.id,fields:x})},[{data:h,fetching:k,error:y}]=Be({query:Hr});return S.useEffect(()=>{y&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥",color:"red"})},[y]),S.useEffect(()=>{var N;(N=h==null?void 0:h.allFinancialEntities)!=null&&N.nodes.length&&l(h.allFinancialEntities.nodes.map(x=>({value:x.id,label:x.name})).sort((x,F)=>x.label>F.label?1:-1))},[h,l]),m.jsxs(m.Fragment,{children:[i&&m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!i&&a&&m.jsxs("form",{onSubmit:d(p),children:[m.jsx("div",{className:"flex-row px-10 h-max justify-start block",children:m.jsxs(Nc,{cols:3,children:[m.jsx(ue,{name:"counterpartyId",control:s,defaultValue:(v=a.counterparty)==null?void 0:v.id,rules:{required:"Required",minLength:{value:2,message:"Minimum 2 characters"}},render:({field:N,fieldState:x})=>{var F;return m.jsx(Gn,{...N,data:o,value:N.value,disabled:k,label:"Counterparty",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(F=x.error)==null?void 0:F.message})}}),m.jsx(ue,{name:"isFee",control:s,defaultValue:a.isFee,render:({field:{value:N,...x}})=>m.jsx(Di,{...x,checked:N===!0,label:"Is Fee"})})]})}),m.jsxs("div",{className:"mt-10 mb-5 flex justify-center gap-5",children:[m.jsx("button",{type:"submit",onClick:()=>d(p),className:"mt-8 text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:f||Object.keys(c).length===0,children:"Accept"}),m.jsx("button",{type:"button",className:"mt-8 text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:n,children:"Cancel"})]})]})]})},qbe=()=>{const[{fetching:e},n]=at(ege);return{fetching:e,insertBusinessTrip:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error inserting business trip: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?(re({title:"Insert Success!",message:"Your business trip was added! 🎉"}),i(r.data.insertBusinessTrip)):(console.error("Error inserting business trip: No data returned"),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}},Kbe=({control:e})=>m.jsxs(m.Fragment,{children:[m.jsx(ue,{name:"name",control:e,rules:{required:"Required"},render:({field:n,fieldState:t})=>{var i;return m.jsx(Ln,{...n,error:(i=t.error)==null?void 0:i.message,isDirty:t.isDirty,label:"Name"})}}),m.jsx(ue,{name:"fromDate",control:e,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:{value:n,...t}})=>{const i=n?new Date(n):void 0;return m.jsx(wx,{...t,onChange:a=>{const r=a?typeof a=="string"?a:en(a,"yyyy-MM-dd"):void 0;r!==n&&t.onChange(r)},value:i,label:"Start Date",placeholder:"Start Date"})}}),m.jsx(ue,{name:"toDate",control:e,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:{value:n,...t}})=>{const i=n?new Date(n):void 0;return m.jsx(wx,{...t,onChange:a=>{const r=a?typeof a=="string"?a:en(a,"yyyy-MM-dd"):void 0;r!==n&&t.onChange(r)},value:i,label:"End Date",placeholder:"End Date",popoverProps:{position:"bottom-start",onPositionChange:a=>{console.log("pos:",a)}}})}}),m.jsx(ue,{name:"destination",control:e,render:({field:n,fieldState:t})=>{var i;return m.jsx(Ln,{...n,value:n.value??void 0,error:(i=t.error)==null?void 0:i.message,isDirty:t.isDirty,label:"Destination"})}}),m.jsx(ue,{name:"tripPurpose",control:e,render:({field:n,fieldState:t})=>{var i;return m.jsx(Ln,{...n,value:n.value??void 0,error:(i=t.error)==null?void 0:i.message,isDirty:t.isDirty,label:"Trip Purpose"})}})]}),Xbe=({onDone:e})=>{const[n,t]=S.useState(!1),{control:i,handleSubmit:a,formState:{dirtyFields:r}}=ki(),{insertBusinessTrip:o,fetching:l}=qbe(),s=S.useCallback(async c=>{t(!0),await o({fields:c}),e(),t(!1)},[o,e]),d=c=>{var u,f;if(((u=c.fromDate)==null?void 0:u.trim())===""&&(c.fromDate=void 0),((f=c.toDate)==null?void 0:f.trim())===""&&(c.fromDate=void 0),c&&Object.keys(c).length>0){if(!c.name){re({title:"Error!",message:"Couldn't figure out the currency of the business"});return}s(c)}};return n?m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}):m.jsx("form",{children:m.jsxs("div",{className:"px-5 flex flex-col gap-5",children:[m.jsx(Kbe,{control:i}),m.jsx("div",{className:"flex justify-right gap-5 mt-5",children:m.jsx("button",{type:"button",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:l||Object.keys(r).length===0,onClick:a(d),children:"Accept"})})]})})},Qbe=()=>{const[{fetching:e},n]=at(nge);return{fetching:e,insertDocument:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error inserting document to charge ID [${t.record.chargeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.insertDocument.__typename==="CommonError"?(console.error(`Error inserting document to charge ID [${t.record.chargeId}]: ${r.data.insertDocument.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.insertDocument.message)):(re({title:"Insert Success!",message:"Your document was added! 🎉"}),i(r.data.insertDocument)):(console.error(`Error inserting document to charge ID [${t.record.chargeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}},Zbe=({chargeId:e,closeModal:n})=>{const{control:t,handleSubmit:i,formState:{dirtyFields:a},setValue:r,watch:o}=ki(),{insertDocument:l,fetching:s}=Qbe(),d=u=>{var f;if(u&&Object.keys(u).length>0){if(u.vat){if(!((f=u.amount)!=null&&f.currency)){re({title:"Error!",message:"Couldn't figure out the currency of the document"});return}u.vat.currency=u.amount.currency}u.documentType??(u.documentType=Ki.Unprocessed),l({record:{...u,chargeId:e}}),n&&n()}},c=o("amount.currency");return S.useEffect(()=>{r("vat.currency",c)},[r,c]),m.jsx("div",{className:" px-5 w-max h-max justify-items-center",children:m.jsxs("form",{onSubmit:i(d),children:[m.jsx(Nc,{cols:5,children:m.jsx(p7,{control:t,watch:o,defaultCurrency:Hn.Ils})}),m.jsxs("div",{className:"flex justify-center gap-5 mt-5",children:[m.jsx("button",{type:"submit",className:" text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:s||Object.keys(a).length===0,children:"Accept"}),m.jsx("button",{type:"button",className:" text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:n,children:"Cancel"})]})]})})},h7=({isNewInsert:e=!0,defaultValues:n,month:t,onDone:i,isModifying:a})=>{const[{data:r,fetching:o,error:l}]=Be({query:Hr}),[{data:s,fetching:d,error:c}]=Be({query:Ake}),{userContext:u}=S.useContext(Ur),[{data:f,fetching:p,error:h}]=Be({query:Mke}),[{data:k,fetching:y,error:g}]=Be({query:bB,variables:{employerId:u==null?void 0:u.ownerId}}),[v,N]=S.useState([]),[x,F]=S.useState([]),[_,w]=S.useState([]),[C,$]=S.useState([]),E=(n==null?void 0:n.month)??t,j=ki({defaultValues:{...n,month:E}}),{control:D,handleSubmit:M,formState:{dirtyFields:R},setValue:I}=j;S.useEffect(()=>{l&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[l]),S.useEffect(()=>{c&&re({title:"Error!",message:"Oh no!, we have an error fetching pension funds! 🤥"})},[c]),S.useEffect(()=>{h&&re({title:"Error!",message:"Oh no!, we have an error fetching training funds! 🤥"})},[h]),S.useEffect(()=>{g&&re({title:"Error!",message:"Oh no!, we have an error employees! 🤥"})},[g]),S.useEffect(()=>{var O;(O=r==null?void 0:r.allFinancialEntities)!=null&&O.nodes.length&&N(r.allFinancialEntities.nodes.map(P=>({value:P.id,label:P.name})).sort((P,A)=>P.label>A.label?1:-1))},[r,N]),S.useEffect(()=>{var O;(O=s==null?void 0:s.allPensionFunds)!=null&&O.length&&F(s.allPensionFunds.map(P=>({value:P.id,label:P.name})).sort((P,A)=>P.label>A.label?1:-1))},[s,w]),S.useEffect(()=>{var O;(O=f==null?void 0:f.allTrainingFunds)!=null&&O.length&&w(f.allTrainingFunds.map(P=>({value:P.id,label:P.name})).sort((P,A)=>P.label>A.label?1:-1))},[f,w]),S.useEffect(()=>{k!=null&&k.employeesByEmployerId.length&&$(k.employeesByEmployerId.filter(O=>!O.name.toLocaleLowerCase().includes("batched")).map(O=>({value:O.id,label:O.name})).sort((O,P)=>O.label>P.label?1:-1))},[k,w]),S.useEffect(()=>{n!=null&&n.employer||I("employer",u==null?void 0:u.ownerId,{shouldDirty:!0,shouldTouch:!0})},[I,n==null?void 0:n.employer,u==null?void 0:u.ownerId]);const L=O=>{console.log("data",O);const P=gc(O,R);if(console.log("dataToUpdate",P),e&&(!(P!=null&&P.directPaymentAmount)||!(P!=null&&P.employeeId)||!(P!=null&&P.employer)||!(P!=null&&P.month))){console.log("insert missing data");return}if(P&&Object.keys(P).length>0){if(!e){if(!n)return;P.employeeId??(P.employeeId=n.employeeId),P.month??(P.month=n.month)}i(P)}else console.log("no data to update"),i()};function B(O){I("month",en(O,"yyyy-MM-dd"),{shouldDirty:!0,shouldTouch:!0})}return m.jsxs("form",{onSubmit:M(L),children:[m.jsx("div",{className:"flex-row px-10 h-max justify-start block",children:m.jsxs(Nc,{cols:4,children:[m.jsxs("div",{className:"flex-column h-max justify-start block",children:[m.jsx(_S,{defaultDate:E?new Date(E):void 0,defaultValue:E?new Date(E):void 0,onChange:B}),m.jsx(ue,{name:"employer",control:D,defaultValue:n==null?void 0:n.employer,rules:{required:"Required"},render:({field:O,fieldState:P})=>{var A;return m.jsx(Gn,{...O,data:v,value:O.value,disabled:o,label:"Employer",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(A=P.error)==null?void 0:A.message})}}),m.jsx(ue,{name:"chargeId",control:D,defaultValue:n==null?void 0:n.chargeId,rules:{pattern:{value:Rye,message:"Invalid UUID"}},render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(Ln,{...P,value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Charge ID"})}}),m.jsx(ue,{name:"employeeId",control:D,defaultValue:n==null?void 0:n.employeeId,rules:{required:"Required"},render:({field:O,fieldState:P})=>{var A;return m.jsx(Gn,{...O,data:C,value:O.value,disabled:y,label:"Employee",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(A=P.error)==null?void 0:A.message})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"baseSalary",control:D,defaultValue:n==null?void 0:n.baseSalary,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Base Salary",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"globalAdditionalHours",control:D,defaultValue:n==null?void 0:n.globalAdditionalHours,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Global Additional Hours",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"bonus",control:D,defaultValue:n==null?void 0:n.bonus,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Bonus",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"gift",control:D,defaultValue:n==null?void 0:n.gift,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Gift",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"recovery",control:D,defaultValue:n==null?void 0:n.recovery,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Recovery",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency"}})}}),m.jsx(ue,{name:"vacationTakeout",control:D,defaultValue:n==null?void 0:n.vacationTakeout,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Vacation Takeout",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"directPaymentAmount",control:D,defaultValue:n==null?void 0:n.directPaymentAmount,rules:{required:"Required"},render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Direct Payment",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"pensionFundId",control:D,defaultValue:n==null?void 0:n.pensionFundId,render:({field:O,fieldState:P})=>{var A;return m.jsx(Gn,{...O,data:x,value:O.value,disabled:d,label:"Pension Fund",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(A=P.error)==null?void 0:A.message})}}),m.jsx(ue,{name:"pensionEmployeeAmount",control:D,defaultValue:n==null?void 0:n.pensionEmployeeAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Pension Employee Amount",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"pensionEmployeePercentage",control:D,defaultValue:n==null?void 0:n.pensionEmployeePercentage,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,rightSection:"%",value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Pension Employee Percentage"})}}),m.jsx(ue,{name:"pensionEmployerAmount",control:D,defaultValue:n==null?void 0:n.pensionEmployerAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Pension Employer Amount",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"pensionEmployerPercentage",control:D,defaultValue:n==null?void 0:n.pensionEmployerPercentage,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,rightSection:"%",value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Pension Employer Percentage"})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"compensationsEmployerAmount",control:D,defaultValue:n==null?void 0:n.compensationsEmployerAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Compensations Amount",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"compensationsEmployerPercentage",control:D,defaultValue:n==null?void 0:n.compensationsEmployerPercentage,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,rightSection:"%",value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Compensations Percentage"})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"trainingFundId",control:D,defaultValue:n==null?void 0:n.trainingFundId,render:({field:O,fieldState:P})=>{var A;return m.jsx(Gn,{...O,data:_,value:O.value,disabled:p,label:"Training Fund",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(A=P.error)==null?void 0:A.message})}}),m.jsx(ue,{name:"trainingFundEmployeeAmount",control:D,defaultValue:n==null?void 0:n.trainingFundEmployeeAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Training Employee Amount",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"trainingFundEmployeePercentage",control:D,defaultValue:n==null?void 0:n.trainingFundEmployeePercentage,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,rightSection:"%",value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Training Employee Percentage"})}}),m.jsx(ue,{name:"trainingFundEmployerAmount",control:D,defaultValue:n==null?void 0:n.trainingFundEmployerAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Training Employer Amount",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"trainingFundEmployerPercentage",control:D,defaultValue:n==null?void 0:n.trainingFundEmployerPercentage,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,rightSection:"%",value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Training Employer Percentage"})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"socialSecurityAmountEmployee",control:D,defaultValue:n==null?void 0:n.socialSecurityAmountEmployee,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Social Security - Employee",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"socialSecurityAmountEmployer",control:D,defaultValue:n==null?void 0:n.socialSecurityAmountEmployer,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Social Security - Employer",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"healthPaymentAmount",control:D,defaultValue:n==null?void 0:n.healthPaymentAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Health Insurance",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"taxAmount",control:D,defaultValue:n==null?void 0:n.taxAmount,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,label:"Income Tax",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}}),m.jsx(ue,{name:"zkufot",control:D,defaultValue:n==null?void 0:n.zkufot,render:({field:O,fieldState:P})=>{var A;return m.jsx(st,{...O,value:O.value??void 0,error:(A=P.error)==null?void 0:A.message,precision:0,label:"Notional Expense",removeTrailingZeros:!0,currencyCodeProps:{value:"ILS",label:"Currency",disabled:!0}})}})]}),m.jsxs("div",{className:"flex-row px-10 h-max justify-start block",children:[m.jsx(ue,{name:"workDays",control:D,defaultValue:n==null?void 0:n.workDays,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Work Days"})}}),m.jsx(ue,{name:"addedVacationDays",control:D,defaultValue:n==null?void 0:n.addedVacationDays,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Added Vacation Days"})}}),m.jsx(ue,{name:"vacationDaysBalance",control:D,defaultValue:n==null?void 0:n.vacationDaysBalance,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Vacation Days Balance"})}}),m.jsx(ue,{name:"sicknessDaysBalance",control:D,defaultValue:n==null?void 0:n.sicknessDaysBalance,render:({field:{value:O,...P},fieldState:A})=>{var V;return m.jsx(fa,{...P,hideControls:!0,precision:2,removeTrailingZeros:!0,value:O??void 0,error:(V=A.error)==null?void 0:V.message,label:"Sickness Days Balance"})}})]})]})}),m.jsxs("div",{className:"mt-10 mb-5 flex justify-center gap-5",children:[m.jsx("button",{type:"submit",onClick:()=>M(L),className:"mt-8 text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:a||Object.keys(R).length===0,children:"Accept"}),m.jsx("button",{type:"button",className:"mt-8 text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:()=>i(),children:"Cancel"})]})]})},Jbe=({chargeId:e,closeModal:n})=>{const[t,i]=at(NB),[a,r]=S.useState(null),o=S.useCallback(async()=>{a&&i({file:a,chargeId:e}).then(l=>{var s,d,c;l.error||((s=l.data)==null?void 0:s.uploadDocument.__typename)==="CommonError"?(re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),console.error(`Error uploading document: ${((d=l.error)==null?void 0:d.message)||((c=l.data)==null?void 0:c.uploadDocument).message}`)):l.data&&(re({title:"Upload Success!",message:"Hey there, you add new document!"}),n&&n())}).catch(l=>{re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),console.error(`Error uploading document: ${l==null?void 0:l.message}`)})},[i,n,a,e]);return m.jsxs("div",{className:"px-5 w-max h-max justify-items-center",children:[m.jsx(Bde,{icon:t.fetching&&m.jsx(ti,{}),value:a,onChange:r,clearable:!0,label:"File Upload"}),m.jsxs("div",{className:"flex justify-center gap-5 mt-5",children:[m.jsx("button",{type:"submit",className:" text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",disabled:t.fetching||!a,onClick:o,children:"Accept"}),m.jsx("button",{type:"button",className:" text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:n,children:"Cancel"})]})]})},v7=({name:e,...n})=>m.jsx(hc,{src:`/icons/${e}.svg`,...n});function k7({src:e,width:n,height:t,magnifierHeight:i=100,magnifierWidth:a=100,zoomLevel:r=1.5}){const[o,l]=S.useState({x:0,y:0}),[s,d]=S.useState({height:0,width:0}),[c,u]=S.useState(r),[f,p]=S.useState({width:a,height:i}),[h,k]=S.useState(!1);return m.jsxs("div",{style:{position:"relative",height:t,width:n},children:[m.jsx("img",{src:e,style:{height:t,width:n},onMouseEnter:y=>{const g=y.currentTarget,{width:v,height:N}=g.getBoundingClientRect();d({width:v,height:N}),k(!0)},onMouseMove:y=>{const g=y.currentTarget,{top:v,left:N}=g.getBoundingClientRect(),x=y.pageX-N-window.pageXOffset,F=y.pageY-v-window.pageYOffset;l({x,y:F})},onMouseLeave:()=>{k(!1)},alt:"img"}),m.jsx("div",{style:{display:h?"":"none",position:"absolute",pointerEvents:"none",height:`${f.height}px`,width:`${f.width}px`,top:`${o.y-f.height/2}px`,left:`${o.x-f.width/2}px`,opacity:"1",border:"1px solid lightgray",backgroundColor:"white",backgroundImage:`url('${e}')`,backgroundRepeat:"no-repeat",backgroundSize:`${s.width*c}px ${s.height*c}px`,backgroundPositionX:`${-o.x*c+f.width/2}px`,backgroundPositionY:`${-o.y*c+f.height/2}px`}}),m.jsxs("div",{className:"absolute top-10 right-10 flex flex-row gap-1",children:[m.jsx(tt,{label:"Increase zoom",children:m.jsx(Pe,{variant:"transparent",onClick:()=>u(y=>y*1.2),children:m.jsx(tK,{size:18})})}),m.jsx(tt,{label:"Decrease zoom",children:m.jsx(Pe,{variant:"transparent",onClick:()=>u(y=>y/1.2),children:m.jsx(oK,{size:18})})}),m.jsx(tt,{label:"Expand zoom area",children:m.jsx(Pe,{variant:"transparent",onClick:()=>p(y=>({width:y.width*1.2,height:y.height*1.2})),children:m.jsx(eK,{size:18})})}),m.jsx(tt,{label:"Reduce zoom area",children:m.jsx(Pe,{variant:"transparent",onClick:()=>p(y=>({width:y.width/1.2,height:y.height/1.2})),children:m.jsx(aK,{size:18})})})]})]})}S.forwardRef(function({label:n,...t}){return m.jsxs("div",{className:"bottom-0 mt-6",children:[n&&m.jsx("label",{htmlFor:"currency",className:"sr-only",children:n}),m.jsx("select",{className:"bg-gray-100 border focus:ring-2 focus:ring-indigo-200 focus:bg-transparent focus:border-indigo-500 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out sm:text-sm rounded-md",...t,children:Object.keys(Hn).map(i=>m.jsx("option",{value:Hn[i],children:Hn[i]},i))})]})});const st=S.forwardRef(function({currencyCodeProps:{error:n,...t},error:i,...a}){return m.jsxs("div",{className:"w-full flex flex-row ",children:[m.jsx(fa,{className:"w-full",...a,hideControls:!0,precision:a.precision??2,error:i||n}),m.jsx(Gn,{className:"w-1/2",...t,data:Object.keys(Hn).map(r=>Hn[r])})]})});var exe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function of(e,n){var t=nxe(e);if(typeof t.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof n=="string"?n:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function nxe(e){var n=e.name,t=n&&n.lastIndexOf(".")!==-1;if(t&&!e.type){var i=n.split(".").pop().toLowerCase(),a=exe.get(i);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var txe=[".DS_Store","Thumbs.db"];function ixe(e){return oc(this,void 0,void 0,function(){return lc(this,function(n){return Vg(e)&&axe(e.dataTransfer)?[2,sxe(e.dataTransfer,e.type)]:rxe(e)?[2,oxe(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,lxe(e)]:[2,[]]})})}function axe(e){return Vg(e)}function rxe(e){return Vg(e)&&Vg(e.target)}function Vg(e){return typeof e=="object"&&e!==null}function oxe(e){return _x(e.target.files).map(function(n){return of(n)})}function lxe(e){return oc(this,void 0,void 0,function(){var n;return lc(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return n=t.sent(),[2,n.map(function(i){return of(i)})]}})})}function sxe(e,n){return oc(this,void 0,void 0,function(){var t,i;return lc(this,function(a){switch(a.label){case 0:return e.items?(t=_x(e.items).filter(function(r){return r.kind==="file"}),n!=="drop"?[2,t]:[4,Promise.all(t.map(dxe))]):[3,2];case 1:return i=a.sent(),[2,SI(g7(i))];case 2:return[2,SI(_x(e.files).map(function(r){return of(r)}))]}})})}function SI(e){return e.filter(function(n){return txe.indexOf(n.name)===-1})}function _x(e){if(e===null)return[];for(var n=[],t=0;t<e.length;t++){var i=e[t];n.push(i)}return n}function dxe(e){if(typeof e.webkitGetAsEntry!="function")return NI(e);var n=e.webkitGetAsEntry();return n&&n.isDirectory?y7(n):NI(e)}function g7(e){return e.reduce(function(n,t){return ex(ex([],fP(n),!1),fP(Array.isArray(t)?g7(t):[t]),!1)},[])}function NI(e){var n=e.getAsFile();if(!n)return Promise.reject("".concat(e," is not a File"));var t=of(n);return Promise.resolve(t)}function cxe(e){return oc(this,void 0,void 0,function(){return lc(this,function(n){return[2,e.isDirectory?y7(e):uxe(e)]})})}function y7(e){var n=e.createReader();return new Promise(function(t,i){var a=[];function r(){var o=this;n.readEntries(function(l){return oc(o,void 0,void 0,function(){var s,d,c;return lc(this,function(u){switch(u.label){case 0:if(l.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(a)];case 2:return s=u.sent(),t(s),[3,4];case 3:return d=u.sent(),i(d),[3,4];case 4:return[3,6];case 5:c=Promise.all(l.map(cxe)),a.push(c),r(),u.label=6;case 6:return[2]}})})},function(l){i(l)})}r()})}function uxe(e){return oc(this,void 0,void 0,function(){return lc(this,function(n){return[2,new Promise(function(t,i){e.file(function(a){var r=of(a,e.fullPath);t(r)},function(a){i(a)})})]})})}var mxe=function(e,n){if(e&&n){var t=Array.isArray(n)?n:n.split(","),i=e.name||"",a=(e.type||"").toLowerCase(),r=a.replace(/\/.*$/,"");return t.some(function(o){var l=o.trim().toLowerCase();return l.charAt(0)==="."?i.toLowerCase().endsWith(l):l.endsWith("/*")?r===l.replace(/\/.*$/,""):a===l})}return!0};function bI(e){return hxe(e)||pxe(e)||N7(e)||fxe()}function fxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hxe(e){if(Array.isArray(e))return Cx(e)}function xI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,i)}return t}function FI(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?xI(Object(t),!0).forEach(function(i){S7(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xI(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function S7(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ym(e,n){return gxe(e)||kxe(e,n)||N7(e,n)||vxe()}function vxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N7(e,n){if(e){if(typeof e=="string")return Cx(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Cx(e,n)}}function Cx(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function kxe(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i=[],a=!0,r=!1,o,l;try{for(t=t.call(e);!(a=(o=t.next()).done)&&(i.push(o.value),!(n&&i.length===n));a=!0);}catch(s){r=!0,l=s}finally{try{!a&&t.return!=null&&t.return()}finally{if(r)throw l}}return i}}function gxe(e){if(Array.isArray(e))return e}var yxe="file-invalid-type",Sxe="file-too-large",Nxe="file-too-small",bxe="too-many-files",xxe=function(n){n=Array.isArray(n)&&n.length===1?n[0]:n;var t=Array.isArray(n)?"one of ".concat(n.join(", ")):n;return{code:yxe,message:"File type must be ".concat(t)}},wI=function(n){return{code:Sxe,message:"File is larger than ".concat(n," ").concat(n===1?"byte":"bytes")}},_I=function(n){return{code:Nxe,message:"File is smaller than ".concat(n," ").concat(n===1?"byte":"bytes")}},Fxe={code:bxe,message:"Too many files"};function b7(e,n){var t=e.type==="application/x-moz-file"||mxe(e,n);return[t,t?null:xxe(n)]}function x7(e,n,t){if(Dl(e.size))if(Dl(n)&&Dl(t)){if(e.size>t)return[!1,wI(t)];if(e.size<n)return[!1,_I(n)]}else{if(Dl(n)&&e.size<n)return[!1,_I(n)];if(Dl(t)&&e.size>t)return[!1,wI(t)]}return[!0,null]}function Dl(e){return e!=null}function wxe(e){var n=e.files,t=e.accept,i=e.minSize,a=e.maxSize,r=e.multiple,o=e.maxFiles,l=e.validator;return!r&&n.length>1||r&&o>=1&&n.length>o?!1:n.every(function(s){var d=b7(s,t),c=ym(d,1),u=c[0],f=x7(s,i,a),p=ym(f,1),h=p[0],k=l?l(s):null;return u&&h&&!k})}function Wg(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function gp(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(n){return n==="Files"||n==="application/x-moz-file"}):!!e.target&&!!e.target.files}function CI(e){e.preventDefault()}function _xe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cxe(e){return e.indexOf("Edge/")!==-1}function Pxe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return _xe(e)||Cxe(e)}function Va(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(i){for(var a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];return n.some(function(l){return!Wg(i)&&l&&l.apply(void 0,[i].concat(r)),Wg(i)})}}function Oxe(){return"showOpenFilePicker"in window}function Dxe(e){if(Dl(e)){var n=Object.entries(e).filter(function(t){var i=ym(t,2),a=i[0],r=i[1],o=!0;return F7(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(r)||!r.every(w7))&&(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(t,i){var a=ym(i,2),r=a[0],o=a[1];return FI(FI({},t),{},S7({},r,o))},{});return[{description:"Files",accept:n}]}return e}function Exe(e){if(Dl(e))return Object.entries(e).reduce(function(n,t){var i=ym(t,2),a=i[0],r=i[1];return[].concat(bI(n),[a],bI(r))},[]).filter(function(n){return F7(n)||w7(n)}).join(",")}function $xe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Ixe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function F7(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function w7(e){return/^.*\.[\w]+$/.test(e)}var jxe=["children"],Txe=["open"],Axe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Rxe=["refKey","onChange","onClick"];function Mxe(e){return Bxe(e)||zxe(e)||_7(e)||Lxe()}function Lxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bxe(e){if(Array.isArray(e))return Px(e)}function uN(e,n){return Hxe(e)||Wxe(e,n)||_7(e,n)||Vxe()}function Vxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _7(e,n){if(e){if(typeof e=="string")return Px(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Px(e,n)}}function Px(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Wxe(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i=[],a=!0,r=!1,o,l;try{for(t=t.call(e);!(a=(o=t.next()).done)&&(i.push(o.value),!(n&&i.length===n));a=!0);}catch(s){r=!0,l=s}finally{try{!a&&t.return!=null&&t.return()}finally{if(r)throw l}}return i}}function Hxe(e){if(Array.isArray(e))return e}function PI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,i)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?PI(Object(t),!0).forEach(function(i){Ox(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PI(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Ox(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Hg(e,n){if(e==null)return{};var t=Uxe(e,n),i,a;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)i=r[a],!(n.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Uxe(e,n){if(e==null)return{};var t={},i=Object.keys(e),a,r;for(r=0;r<i.length;r++)a=i[r],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}var D_=S.forwardRef(function(e,n){var t=e.children,i=Hg(e,jxe),a=P7(i),r=a.open,o=Hg(a,Txe);return S.useImperativeHandle(n,function(){return{open:r}},[r]),b.createElement(S.Fragment,null,t(In(In({},o),{},{open:r})))});D_.displayName="Dropzone";var C7={disabled:!1,getFilesFromEvent:ixe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};D_.defaultProps=C7;D_.propTypes={children:pn.func,accept:pn.objectOf(pn.arrayOf(pn.string)),multiple:pn.bool,preventDropOnDocument:pn.bool,noClick:pn.bool,noKeyboard:pn.bool,noDrag:pn.bool,noDragEventsBubbling:pn.bool,minSize:pn.number,maxSize:pn.number,maxFiles:pn.number,disabled:pn.bool,getFilesFromEvent:pn.func,onFileDialogCancel:pn.func,onFileDialogOpen:pn.func,useFsAccessApi:pn.bool,autoFocus:pn.bool,onDragEnter:pn.func,onDragLeave:pn.func,onDragOver:pn.func,onDrop:pn.func,onDropAccepted:pn.func,onDropRejected:pn.func,onError:pn.func,validator:pn.func};var Dx={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function P7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=In(In({},C7),e),t=n.accept,i=n.disabled,a=n.getFilesFromEvent,r=n.maxSize,o=n.minSize,l=n.multiple,s=n.maxFiles,d=n.onDragEnter,c=n.onDragLeave,u=n.onDragOver,f=n.onDrop,p=n.onDropAccepted,h=n.onDropRejected,k=n.onFileDialogCancel,y=n.onFileDialogOpen,g=n.useFsAccessApi,v=n.autoFocus,N=n.preventDropOnDocument,x=n.noClick,F=n.noKeyboard,_=n.noDrag,w=n.noDragEventsBubbling,C=n.onError,$=n.validator,E=S.useMemo(function(){return Exe(t)},[t]),j=S.useMemo(function(){return Dxe(t)},[t]),D=S.useMemo(function(){return typeof y=="function"?y:OI},[y]),M=S.useMemo(function(){return typeof k=="function"?k:OI},[k]),R=S.useRef(null),I=S.useRef(null),L=S.useReducer(Yxe,Dx),B=uN(L,2),O=B[0],P=B[1],A=O.isFocused,V=O.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&g&&Oxe()),oe=function(){!U.current&&V&&setTimeout(function(){if(I.current){var se=I.current.files;se.length||(P({type:"closeDialog"}),M())}},300)};S.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[I,V,M,U]);var G=S.useRef([]),ne=function(se){R.current&&R.current.contains(se.target)||(se.preventDefault(),G.current=[])};S.useEffect(function(){return N&&(document.addEventListener("dragover",CI,!1),document.addEventListener("drop",ne,!1)),function(){N&&(document.removeEventListener("dragover",CI),document.removeEventListener("drop",ne))}},[R,N]),S.useEffect(function(){return!i&&v&&R.current&&R.current.focus(),function(){}},[R,v,i]);var Z=S.useCallback(function(Y){C?C(Y):console.error(Y)},[C]),ce=S.useCallback(function(Y){Y.preventDefault(),Y.persist(),W(Y),G.current=[].concat(Mxe(G.current),[Y.target]),gp(Y)&&Promise.resolve(a(Y)).then(function(se){if(!(Wg(Y)&&!w)){var Ce=se.length,Ae=Ce>0&&wxe({files:se,accept:E,minSize:o,maxSize:r,multiple:l,maxFiles:s,validator:$}),Te=Ce>0&&!Ae;P({isDragAccept:Ae,isDragReject:Te,isDragActive:!0,type:"setDraggedFiles"}),d&&d(Y)}}).catch(function(se){return Z(se)})},[a,d,Z,w,E,o,r,l,s,$]),ie=S.useCallback(function(Y){Y.preventDefault(),Y.persist(),W(Y);var se=gp(Y);if(se&&Y.dataTransfer)try{Y.dataTransfer.dropEffect="copy"}catch{}return se&&u&&u(Y),!1},[u,w]),ve=S.useCallback(function(Y){Y.preventDefault(),Y.persist(),W(Y);var se=G.current.filter(function(Ae){return R.current&&R.current.contains(Ae)}),Ce=se.indexOf(Y.target);Ce!==-1&&se.splice(Ce,1),G.current=se,!(se.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),gp(Y)&&c&&c(Y))},[R,c,w]),he=S.useCallback(function(Y,se){var Ce=[],Ae=[];Y.forEach(function(Te){var cn=b7(Te,E),nn=uN(cn,2),un=nn[0],$n=nn[1],qe=x7(Te,o,r),ke=uN(qe,2),_e=ke[0],Ft=ke[1],Nn=$?$(Te):null;if(un&&_e&&!Nn)Ce.push(Te);else{var vn=[$n,Ft];Nn&&(vn=vn.concat(Nn)),Ae.push({file:Te,errors:vn.filter(function(It){return It})})}}),(!l&&Ce.length>1||l&&s>=1&&Ce.length>s)&&(Ce.forEach(function(Te){Ae.push({file:Te,errors:[Fxe]})}),Ce.splice(0)),P({acceptedFiles:Ce,fileRejections:Ae,type:"setFiles"}),f&&f(Ce,Ae,se),Ae.length>0&&h&&h(Ae,se),Ce.length>0&&p&&p(Ce,se)},[P,l,E,o,r,s,f,p,h,$]),ge=S.useCallback(function(Y){Y.preventDefault(),Y.persist(),W(Y),G.current=[],gp(Y)&&Promise.resolve(a(Y)).then(function(se){Wg(Y)&&!w||he(se,Y)}).catch(function(se){return Z(se)}),P({type:"reset"})},[a,he,Z,w]),K=S.useCallback(function(){if(U.current){P({type:"openDialog"}),D();var Y={multiple:l,types:j};window.showOpenFilePicker(Y).then(function(se){return a(se)}).then(function(se){he(se,null),P({type:"closeDialog"})}).catch(function(se){$xe(se)?(M(se),P({type:"closeDialog"})):Ixe(se)?(U.current=!1,I.current?(I.current.value=null,I.current.click()):Z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Z(se)});return}I.current&&(P({type:"openDialog"}),D(),I.current.value=null,I.current.click())},[P,D,M,g,he,Z,j,l]),de=S.useCallback(function(Y){!R.current||!R.current.isEqualNode(Y.target)||(Y.key===" "||Y.key==="Enter"||Y.keyCode===32||Y.keyCode===13)&&(Y.preventDefault(),K())},[R,K]),be=S.useCallback(function(){P({type:"focus"})},[]),Ee=S.useCallback(function(){P({type:"blur"})},[]),Qe=S.useCallback(function(){x||(Pxe()?setTimeout(K,0):K())},[x,K]),$e=function(se){return i?null:se},z=function(se){return F?null:$e(se)},H=function(se){return _?null:$e(se)},W=function(se){w&&se.stopPropagation()},ee=S.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Y.refKey,Ce=se===void 0?"ref":se,Ae=Y.role,Te=Y.onKeyDown,cn=Y.onFocus,nn=Y.onBlur,un=Y.onClick,$n=Y.onDragEnter,qe=Y.onDragOver,ke=Y.onDragLeave,_e=Y.onDrop,Ft=Hg(Y,Axe);return In(In(Ox({onKeyDown:z(Va(Te,de)),onFocus:z(Va(cn,be)),onBlur:z(Va(nn,Ee)),onClick:$e(Va(un,Qe)),onDragEnter:H(Va($n,ce)),onDragOver:H(Va(qe,ie)),onDragLeave:H(Va(ke,ve)),onDrop:H(Va(_e,ge)),role:typeof Ae=="string"&&Ae!==""?Ae:"presentation"},Ce,R),!i&&!F?{tabIndex:0}:{}),Ft)}},[R,de,be,Ee,Qe,ce,ie,ve,ge,F,_,i]),J=S.useCallback(function(Y){Y.stopPropagation()},[]),Q=S.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=Y.refKey,Ce=se===void 0?"ref":se,Ae=Y.onChange,Te=Y.onClick,cn=Hg(Y,Rxe),nn=Ox({accept:E,multiple:l,type:"file",style:{display:"none"},onChange:$e(Va(Ae,ge)),onClick:$e(Va(Te,J)),tabIndex:-1},Ce,I);return In(In({},nn),cn)}},[I,t,l,ge,i]);return In(In({},O),{},{isFocused:A&&!i,getRootProps:ee,getInputProps:Q,rootRef:R,inputRef:I,open:$e(K)})}function Yxe(e,n){switch(n.type){case"focus":return In(In({},e),{},{isFocused:!0});case"blur":return In(In({},e),{},{isFocused:!1});case"openDialog":return In(In({},Dx),{},{isFileDialogActive:!0});case"closeDialog":return In(In({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return In(In({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return In(In({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections});case"reset":return In({},Dx);default:return e}}function OI(){}const[Gxe,qxe]=Ra("Dropzone component was not found in tree");var DI=Object.getOwnPropertySymbols,Kxe=Object.prototype.hasOwnProperty,Xxe=Object.prototype.propertyIsEnumerable,Qxe=(e,n)=>{var t={};for(var i in e)Kxe.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&DI)for(var i of DI(e))n.indexOf(i)<0&&Xxe.call(e,i)&&(t[i]=e[i]);return t};function E_(e){const n=t=>{const i=ae(`Dropzone${GP(e)}`,{},t),{children:a}=i,r=Qxe(i,["children"]),o=qxe(),l=sc(a)?a:b.createElement("span",null,a);return o[e]?S.cloneElement(l,r):null};return n.displayName=`@mantine/dropzone/${GP(e)}`,n}const Zxe=E_("accept"),Jxe=E_("reject"),eFe=E_("idle");var nFe=Object.defineProperty,tFe=Object.defineProperties,iFe=Object.getOwnPropertyDescriptors,EI=Object.getOwnPropertySymbols,aFe=Object.prototype.hasOwnProperty,rFe=Object.prototype.propertyIsEnumerable,$I=(e,n,t)=>n in e?nFe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,II=(e,n)=>{for(var t in n||(n={}))aFe.call(n,t)&&$I(e,t,n[t]);if(EI)for(var t of EI(n))rFe.call(n,t)&&$I(e,t,n[t]);return e},oFe=(e,n)=>tFe(e,iFe(n)),lFe=me((e,{padding:n,radius:t})=>{const i=e.fn.variant({color:"red",variant:"light"}),a=e.fn.variant({color:e.primaryColor,variant:"light"});return{root:oFe(II(II({},e.fn.fontStyles()),e.fn.focusStyles()),{boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${T(2)} dashed ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,padding:q({size:n,sizes:e.spacing}),borderRadius:e.fn.radius(t),cursor:"pointer",userSelect:"none",transition:"background-color 150ms ease",position:"relative","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&[data-loading]":{cursor:"default","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}},"&[data-accept]":{backgroundColor:e.colorScheme==="dark"?a.background:e.colors[e.primaryColor][0],borderColor:e.colorScheme==="dark"?a.border:e.colors[e.primaryColor][4],"&:hover":{backgroundColor:e.colorScheme==="dark"?a.background:e.colors[e.primaryColor][0]}},"&[data-reject]":{backgroundColor:e.colorScheme==="dark"?i.background:e.colors.red[0],borderColor:e.colorScheme==="dark"?i.border:e.colors.red[4],"&:hover":{backgroundColor:e.colorScheme==="dark"?i.background:e.colors.red[0]}}}),inner:{pointerEvents:"none",userSelect:"none"}}}),sFe=Object.defineProperty,dFe=Object.defineProperties,cFe=Object.getOwnPropertyDescriptors,Ug=Object.getOwnPropertySymbols,O7=Object.prototype.hasOwnProperty,D7=Object.prototype.propertyIsEnumerable,jI=(e,n,t)=>n in e?sFe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Qc=(e,n)=>{for(var t in n||(n={}))O7.call(n,t)&&jI(e,t,n[t]);if(Ug)for(var t of Ug(n))D7.call(n,t)&&jI(e,t,n[t]);return e},mN=(e,n)=>dFe(e,cFe(n)),uFe=(e,n)=>{var t={};for(var i in e)O7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Ug)for(var i of Ug(e))n.indexOf(i)<0&&D7.call(e,i)&&(t[i]=e[i]);return t};const mFe={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function Sc(e){const n=ae("Dropzone",mFe,e),{className:t,padding:i,radius:a,disabled:r,classNames:o,styles:l,loading:s,multiple:d,maxSize:c,accept:u,children:f,onDropAny:p,onDrop:h,onReject:k,openRef:y,name:g,unstyled:v,maxFiles:N,autoFocus:x,activateOnClick:F,activateOnDrag:_,dragEventsBubbling:w,activateOnKeyboard:C,onDragEnter:$,onDragLeave:E,onDragOver:j,onFileDialogCancel:D,onFileDialogOpen:M,preventDropOnDocument:R,useFsAccessApi:I,getFilesFromEvent:L,validator:B,variant:O}=n,P=uFe(n,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","unstyled","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator","variant"]),{classes:A,cx:V}=lFe({radius:a,padding:i},{name:"Dropzone",classNames:o,styles:l,unstyled:v,variant:O}),{getRootProps:U,getInputProps:oe,isDragAccept:G,isDragReject:ne,open:Z}=P7(Qc({onDrop:p,onDropAccepted:h,onDropRejected:k,disabled:r||s,accept:Array.isArray(u)?u.reduce((ie,ve)=>mN(Qc({},ie),{[ve]:[]}),{}):u,multiple:d,maxSize:c,maxFiles:N,autoFocus:x,noClick:!F,noDrag:!_,noDragEventsBubbling:!w,noKeyboard:!C,onDragEnter:$,onDragLeave:E,onDragOver:j,onFileDialogCancel:D,onFileDialogOpen:M,preventDropOnDocument:R,useFsAccessApi:I,validator:B},L?{getFilesFromEvent:L}:null));rS(y,Z);const ce=!G&&!ne;return b.createElement(Gxe,{value:{accept:G,reject:ne,idle:ce}},b.createElement(xe,mN(Qc(Qc({},P),U()),{"data-accept":G||void 0,"data-reject":ne||void 0,"data-idle":ce||void 0,"data-loading":s||void 0,className:V(A.root,t)}),b.createElement(T6,{visible:s,radius:a,unstyled:v}),b.createElement("input",mN(Qc({},oe()),{name:g})),b.createElement("div",{className:A.inner},f)))}Sc.displayName="@mantine/dropzone/Dropzone";Sc.Accept=Zxe;Sc.Reject=Jxe;Sc.Idle=eFe;const E7=Sc;var fFe=Object.defineProperty,pFe=Object.defineProperties,hFe=Object.getOwnPropertyDescriptors,TI=Object.getOwnPropertySymbols,vFe=Object.prototype.hasOwnProperty,kFe=Object.prototype.propertyIsEnumerable,AI=(e,n,t)=>n in e?fFe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,gFe=(e,n)=>{for(var t in n||(n={}))vFe.call(n,t)&&AI(e,t,n[t]);if(TI)for(var t of TI(n))kFe.call(n,t)&&AI(e,t,n[t]);return e},yFe=(e,n)=>pFe(e,hFe(n)),SFe=me(e=>({wrapper:yFe(gFe({},e.fn.cover(0)),{position:"fixed",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,display:"flex",padding:e.spacing.xs,transition:"opacity 100ms ease"}),dropzone:{flex:1}})),NFe=Object.defineProperty,bFe=Object.defineProperties,xFe=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,$7=Object.prototype.hasOwnProperty,I7=Object.prototype.propertyIsEnumerable,RI=(e,n,t)=>n in e?NFe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,fN=(e,n)=>{for(var t in n||(n={}))$7.call(n,t)&&RI(e,t,n[t]);if(Yg)for(var t of Yg(n))I7.call(n,t)&&RI(e,t,n[t]);return e},pN=(e,n)=>bFe(e,xFe(n)),FFe=(e,n)=>{var t={};for(var i in e)$7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Yg)for(var i of Yg(e))n.indexOf(i)<0&&I7.call(e,i)&&(t[i]=e[i]);return t};const wFe={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:Ma("max"),withinPortal:!0};function j7(e){const n=ae("DropzoneFullScreen",wFe,e),{classNames:t,styles:i,sx:a,className:r,style:o,unstyled:l,active:s,onDrop:d,onReject:c,zIndex:u,withinPortal:f,portalProps:p}=n,h=FFe(n,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal","portalProps"]),[k,y]=b.useState(0),[g,{open:v,close:N}]=tl(!1),{classes:x,cx:F}=SFe(null,{name:"DropzoneFullScreen",classNames:t,styles:i,unstyled:l}),_=C=>{C.dataTransfer.types.includes("Files")&&(y($=>$+1),v())},w=()=>{y(C=>C-1)};return S.useEffect(()=>{k===0&&N()},[k]),S.useEffect(()=>{if(s)return document.addEventListener("dragenter",_,!1),document.addEventListener("dragleave",w,!1),()=>{document.removeEventListener("dragenter",_,!1),document.removeEventListener("dragleave",w,!1)}},[s]),b.createElement(uc,pN(fN({},p),{withinPortal:f}),b.createElement(xe,{className:F(x.wrapper,r),sx:a,style:pN(fN({},o),{opacity:g?1:0,pointerEvents:g?"all":"none",zIndex:u})},b.createElement(Sc,pN(fN({},h),{classNames:t,styles:i,unstyled:l,className:x.dropzone,onDrop:C=>{d==null||d(C),N()},onReject:C=>{c==null||c(C),N()}}))))}j7.displayName="@mantine/dropzone/DropzoneFullScreen";E7.FullScreen=j7;const _Fe=E7,CFe=({children:e,chargeId:n})=>{const[t,i]=at(NB);function a(o){re({title:"Error!",message:o??"Oh no!, we have an error! 🤥"})}const r=S.useCallback(async o=>{i({file:o,chargeId:n}).then(l=>{var s,d,c;l.error||((s=l.data)==null?void 0:s.uploadDocument.__typename)==="CommonError"?(a(),console.error(`Error uploading document: ${((d=l.error)==null?void 0:d.message)||((c=l.data)==null?void 0:c.uploadDocument).message}`)):l.data&&(re({title:"Upload Success!",message:"Hey there, you add new document!"}),console.log(l.data.uploadDocument))}).catch(l=>{re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),console.error(`Error uploading document: ${l==null?void 0:l.message}`)})},[i,n]);return m.jsx(_Fe,{onDrop:o=>r(o[0]),onReject:o=>a(`Rejected Files:
${o.map(l=>`"${l.file.name}": ${l.errors}`).join(`
`)}`),activateOnClick:!1,activateOnKeyboard:!1,radius:0,padding:0,className:"border-0 cursor-default w-full h-full z-1",maxFiles:1,loading:t.fetching,children:e})},T7=S.forwardRef(function({type:n="text",label:t,error:i,onChange:a,showControls:r=!1,rightPadding:o="pr-2",precision:l,children:s,isDirty:d,className:c,...u}){function f(p){let h=Number(p.target.value);if(Number.isNaN(h))a(null);else{if(l){const k=Math.pow(10,l);h=Math.round((h+Number.EPSILON)*k)/k}a(h)}}return m.jsxs("div",{className:c,children:[t&&m.jsx("label",{htmlFor:u.name,className:"text-sm font-medium text-gray-700",children:t}),m.jsxs("div",{children:[!r&&n==="number"&&m.jsx("style",{children:`/* Chrome, Safari, Edge, Opera */
              input::-webkit-outer-spin-button,
              input::-webkit-inner-spin-button {
                -webkit-appearance: none;
                margin: 0;
              }
  
              /* Firefox */
              input[type=number] {
                -moz-appearance: textfield;
              }
            `}),m.jsx("input",{type:n,...u,onChange:n==="number"?f:a,className:`w-full bg-gray-100 rounded border border-${i?"red":d?"green":"gray"}-300 focus:ring-2 focus:ring-indigo-200 focus:bg-transparent focus:border-indigo-500 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out  ${o} sm:text-sm rounded-md`}),s]}),i&&m.jsx("p",{className:"text-red-500 text-xs italic",children:i})]})});S.forwardRef(function(n){return m.jsx(T7,{...n,type:"number",step:"any"})});const PFe=S.forwardRef(function({selectionEnum:n,label:t,error:i,...a},r){return m.jsxs("div",{children:[t&&m.jsx("label",{htmlFor:a.name,className:"text-sm font-medium text-gray-700",children:t}),m.jsx("div",{children:m.jsx("select",{ref:r,className:`w-full bg-gray-100 border border-${i?"red":"gray"}-300 focus:ring-2 focus:ring-indigo-200 focus:bg-transparent focus:border-indigo-500 text-base outline-none text-gray-700 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out block sm:text-sm rounded-md`,...a,children:Object.keys(n).map(o=>m.jsx("option",{value:n[o],children:n[o]},o))})}),i&&m.jsx("p",{className:"text-red-500 text-xs italic",children:i})]})});function OFe({formManager:e}){const[{data:n,fetching:t}]=Be({query:v_}),i=(n==null?void 0:n.allTags.map(s=>s.name))??[],{control:a}=e,{fields:r,append:o,remove:l}=bye({control:a,name:"tags",keyName:"name"});return m.jsx("div",{children:m.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[r==null?void 0:r.map((s,d)=>m.jsxs("div",{className:" flex items-center gap-2 text-gray-600 mb-2",children:[m.jsx("div",{className:"w-full mt-1 relative rounded-md shadow-sm",children:m.jsx(ue,{control:a,name:`tags.${d}.name`,rules:{required:"Required",minLength:{value:2,message:"Minimum 2 characters"}},render:({field:c,fieldState:u})=>{var f;return m.jsx(Gn,{className:"w-full",...c,data:i,value:c.value,disabled:t,label:"Tag",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(f=u.error)==null?void 0:f.message})}})}),m.jsx(Pe,{children:m.jsx(M5,{size:20,onClick:()=>l(d)})})]},s.name)),m.jsx(Pe,{children:m.jsx(Fw,{size:20,onClick:()=>o({name:""})})})]})})}const Ln=S.forwardRef(function(n){return m.jsx(T7,{...n,type:"text"})}),$_=({items:e,style:n})=>m.jsx("ul",{className:"text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg",style:n,children:e.map((t,i)=>m.jsx("li",{className:`w-full px-4 py-2 ${i===e.length-1?"rounded-b-lg":"border-b"} ${i===0?"rounded-t-lg":""} border-gray-200`,style:t&&typeof t=="object"&&"style"in t?t.style:{},children:t&&typeof t=="object"&&"content"in t?t.content:t},i))}),Mi=()=>m.jsxs("div",{className:"flex flex-col justify-center items-center content-center h-screen",children:[m.jsx(v7,{name:"logo",className:"max-w-xs"}),m.jsx(ti,{className:"flex self-center",color:"dark",size:"xl",variant:"dots"})]}),DFe=()=>{const[{fetching:e},n]=at(ige);return{fetching:e,mergeCharges:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error merging into charge ID [${t.baseChargeID}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.mergeCharges.__typename==="CommonError"?(console.error(`Error merging into charge ID [${t.baseChargeID}]: ${r.data.mergeCharges.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.mergeCharges.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.mergeCharges.charge)):(console.error(`Error merging into charge ID [${t.baseChargeID}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function EFe({chargeIds:e,onDone:n,resetMerge:t}){const{mergeCharges:i,fetching:a}=DFe(),r=Array.from(new Set(e)),[{data:o,fetching:l}]=Be({query:Lke,variables:{chargeIds:r}}),[s,d]=S.useState(o==null?void 0:o.chargesByIDs[0]),[c,u]=S.useState(void 0),[f,p]=S.useState(void 0),[h,k]=S.useState(void 0),[y,g]=S.useState(void 0),[v,N]=S.useState(void 0),x=(o==null?void 0:o.chargesByIDs.length)!==r.length&&"Some charges were not Found"||void 0,F=(o==null?void 0:o.chargesByIDs)||[],_=S.useCallback(async()=>{if(!s){re({message:"No main charge selected",color:"red"});return}if(r.length<2){re({message:"At least 2 charges are required to execute a merge",color:"red"});return}let w;return c&&c.value!==s.userDescription&&(w??(w={}),w={...w,userDescription:c.value}),f&&f.value!==s.owner.id&&(w??(w={}),w={...w,ownerId:f.value}),y&&y.value!==s.conversion&&(w??(w={}),w={...w,isConversion:y.value}),h&&h.value!==s.property&&(w??(w={}),w={...w,isProperty:h.value}),v&&v.value!==s.tags.map(C=>C.name).join(",")&&(w??(w={}),w={...w,tags:v.value.split(",").filter(C=>C!=="").map(C=>({name:C}))}),await i({baseChargeID:s.id,chargeIdsToMerge:r.filter(C=>C!==s.id),fields:w}),t(),n()},[s,r,i,c,f,y,h,v,n]);return m.jsxs(m.Fragment,{children:[l&&m.jsx("div",{className:"flex flex-col text-center w-full mb-1",children:m.jsx(Mi,{})}),!l&&x&&m.jsx("div",{className:"flex flex-col text-center w-full mb-1",children:m.jsx("h3",{className:"sm:text-2xl text-xl font-medium title-font mb-6 text-gray-900",children:x})}),!l&&!x&&m.jsxs(m.Fragment,{children:[m.jsxs("table",{children:[m.jsxs("tr",{children:[m.jsx("th",{children:"Main"}),F.map(w=>m.jsx("td",{children:m.jsx("div",{className:"flex items-center justify-center mx-2 px-2 py-2 border-2 border-b-0 rounded-t-xl",children:m.jsx(u_,{checked:w.id===(s==null?void 0:s.id),size:"xl",onClick:()=>{d(w),u({id:w.id,value:w.userDescription??""}),p({id:w.id,value:w.owner.id}),k({id:w.id,value:w.property??!1}),g({id:w.id,value:w.conversion??!1}),N({id:w.id,value:(w.tags.map(C=>C.name)??[]).join(",")})}})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Description"}),F.map(w=>m.jsx("td",{children:m.jsx("button",{className:"w-full px-2",disabled:!w.userDescription||(c==null?void 0:c.value)===w.userDescription,onClick:()=>u({id:w.id,value:w.userDescription??""}),children:m.jsx("div",{className:"flex items-center justify-center px-2 py-2 border-x-2",style:(c==null?void 0:c.id)===w.id?{background:"#228be633"}:{},children:w.userDescription})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Owner"}),F.map(w=>m.jsx("td",{children:m.jsx("button",{className:"w-full px-2",disabled:(f==null?void 0:f.value)===w.owner.id,onClick:()=>p({id:w.id,value:w.owner.id}),children:m.jsx("div",{className:"flex items-center justify-center px-2 py-2 border-x-2",style:(f==null?void 0:f.id)===w.id?{background:"#228be633"}:{},children:w.owner.name})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Is Property"}),F.map(w=>m.jsx("td",{children:m.jsx("button",{className:"w-full px-2",disabled:w.property==null||w.property===(h==null?void 0:h.value),onClick:()=>{k({id:w.id,value:w.property??!1})},children:m.jsx("div",{className:"flex items-center justify-center px-2 py-2 border-x-2",style:(h==null?void 0:h.id)===w.id?{background:"#228be633"}:{},children:w.property?m.jsx(JC,{size:20,color:"green"}):m.jsx(eP,{size:20,color:"red"})})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Is Conversion"}),F.map(w=>m.jsx("td",{children:m.jsx("button",{className:"w-full px-2",disabled:w.conversion==null||w.conversion===(y==null?void 0:y.value),onClick:()=>{g({id:w.id,value:w.conversion??!1})},children:m.jsx("div",{className:"flex items-center justify-center px-2 py-2 border-x-2",style:(y==null?void 0:y.id)===w.id?{background:"#228be633"}:{},children:w.conversion?m.jsx(JC,{size:20,color:"green"}):m.jsx(eP,{size:20,color:"red"})})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Tags"}),F.map(w=>m.jsx("td",{children:m.jsx("button",{className:"w-full px-2",disabled:w.tags==null||w.tags.map(C=>C.name).join(",")===(v==null?void 0:v.value),onClick:()=>{N({id:w.id,value:(w.tags.map(C=>C.name)??[]).join(",")})},children:m.jsx("div",{className:"flex items-center justify-center px-2 py-2 border-x-2",style:(y==null?void 0:y.id)===w.id?{background:"#228be633"}:{},children:m.jsx($_,{items:w.tags.map(C=>C.name)})})})},w.id))]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Transactions"}),F.map(w=>{var C;return m.jsx("td",{children:m.jsx("div",{className:"flex items-center justify-center mx-2 px-2 py-2 border-x-2",children:((C=w.metadata)==null?void 0:C.transactionsCount)??0})},w.id)})]}),m.jsxs("tr",{children:[m.jsx("th",{children:"Invoices"}),F.map(w=>{var C;return m.jsx("td",{children:m.jsx("div",{className:"flex items-center justify-center mx-2 px-2 py-2 border-2 border-t-0 rounded-b-xl",children:((C=w.metadata)==null?void 0:C.invoicesCount)??0})},w.id)})]})]}),m.jsxs("div",{className:"flex justify-center gap-5 mt-5",children:[m.jsx("button",{type:"button",className:" text-white bg-blue-500 border-0 py-2 px-8 focus:outline-none hover:bg-blue-600 rounded text-lg",disabled:l||a,onClick:_,children:"Accept"}),m.jsx("button",{type:"button",className:" text-white bg-red-500 border-0 py-2 px-8 focus:outline-none hover:bg-red-600 rounded text-lg",onClick:n,children:"Cancel"}),m.jsx("button",{type:"button",className:" text-white bg-red-500 border-0 py-2 px-8 focus:outline-none hover:bg-red-600 rounded text-lg",onClick:()=>{t(),n()},children:"Reset Merge"})]})]})]})}function A7(e){const[n,{close:t,open:i}]=tl(!1),{chargeIDs:a,resetMerge:r}=e,o=new Set(a),l=o.size>=1,[s,d]=S.useState(l?"filled":"default"),[c,u]=S.useState(l?"blue":"gray");return S.useEffect(()=>{d(l?"filled":"default"),u(l?"blue":"gray")},[l]),m.jsxs(m.Fragment,{children:[m.jsx(Pe,{onClick:()=>{l&&i()},disabled:!l,variant:s,color:c,className:l?"bg-blue-500":void 0,size:30,children:m.jsx(T5,{size:20,color:c})}),m.jsx(Ht,{opened:n,onClose:t,size:"auto",centered:!0,children:m.jsx(EFe,{chargeIds:Array.from(o),onDone:t,resetMerge:r})})]})}const rl=({children:e,position:n,title:t,withOverlay:i=!1,withCloseButton:a=!0,lockScroll:r=!1,opened:o=!1,onClose:l=()=>{},padding:s,modalSize:d})=>m.jsx(La,{className:"overflow-y-auto outline outline-2 outline-indigo-300",lockScroll:r,withCloseButton:a,withOverlay:i,position:n,opened:o,onClose:l,title:t,padding:s,size:d,children:e}),R7=({chargeId:e,onDone:n})=>e?m.jsx($Fe,{chargeId:e,onDone:n}):null,$Fe=({chargeId:e,onDone:n})=>{var r;const[{data:t,fetching:i}]=Be({query:zke,variables:{chargeIDs:[e]}}),a=(r=t==null?void 0:t.chargesByIDs)==null?void 0:r[0];return m.jsx(rl,{modalSize:"fit-content",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Edit Charge:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["ID: ",e,m.jsx(Pe,{variant:"default",onClick:()=>ys(e),size:30,children:m.jsx(us,{size:20})})]})]}),opened:!!e,onClose:n,children:i||!a?m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}):m.jsx(Ube,{charge:a,onDone:n})})},M7=({onDone:e,documentId:n})=>n?m.jsx(rl,{modalSize:"fit-content",position:"bottom",opened:!!n,onClose:e,title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-5",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Edit Document"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["ID: ",n,m.jsx(tt,{label:"Copy ID",children:m.jsx(Pe,{variant:"default",onClick:()=>ys(n),size:30,children:m.jsx(us,{size:20})})}),m.jsx(KSe,{documentId:n}),m.jsx(uye,{documentId:n})]})]}),children:m.jsx(Ybe,{documentId:n,onDone:e})}):null,IFe=()=>{const[{fetching:e},n]=at(dge);return{fetching:e,updateSalaryRecord:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error updating salary record [${t.salaryRecord.month}] employee [${t.salaryRecord.employeeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?r.data.updateSalaryRecord.__typename==="CommonError"?(console.error(`Error updating salary record [${t.salaryRecord.month}] employee [${t.salaryRecord.employeeId}]: ${r.data.updateSalaryRecord.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.data.updateSalaryRecord.message)):(re({title:"Update Success!",message:"Hey there, your update is awesome!"}),i(r.data.updateSalaryRecord.salaryRecord)):(console.error(`Error updating salary record [${t.salaryRecord.month}] employee [${t.salaryRecord.employeeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}},jFe=({recordVariables:e,onDone:n})=>e?m.jsx(TFe,{recordVariables:e,onDone:n}):null,TFe=({recordVariables:e,onDone:n})=>{var d,c,u,f,p,h,k,y,g,v,N,x,F,_,w,C,$,E,j,D,M,R,I,L,B,O;const{updateSalaryRecord:t,fetching:i}=IFe(),[{data:a,fetching:r}]=Be({query:Bke,variables:{employeeIDs:[e.employeeId],month:en(new Date(e.month),"yyyy-MM-dd")}}),o=(d=a==null?void 0:a.salaryRecordsByDates)==null?void 0:d[0],l=S.useCallback(P=>{n(),P&&t({salaryRecord:P})},[n,t]);if(!o)return m.jsx(m.Fragment,{});const s={addedVacationDays:(c=o==null?void 0:o.vacationDays)==null?void 0:c.added,baseSalary:(u=o==null?void 0:o.baseAmount)==null?void 0:u.raw,bonus:(f=o==null?void 0:o.bonus)==null?void 0:f.raw,chargeId:(p=o==null?void 0:o.charge)==null?void 0:p.id,compensationsEmployerAmount:(h=o==null?void 0:o.compensationsAmount)==null?void 0:h.raw,compensationsEmployerPercentage:o==null?void 0:o.compensationsPercentage,directPaymentAmount:(k=o==null?void 0:o.directAmount)==null?void 0:k.raw,employer:(y=o==null?void 0:o.employer)==null?void 0:y.id,employeeId:(g=o==null?void 0:o.employee)==null?void 0:g.id,gift:(v=o==null?void 0:o.gift)==null?void 0:v.raw,globalAdditionalHours:(N=o==null?void 0:o.globalAdditionalHoursAmount)==null?void 0:N.raw,healthPaymentAmount:(x=o==null?void 0:o.healthInsuranceAmount)==null?void 0:x.raw,month:o==null?void 0:o.month,pensionEmployeeAmount:(F=o==null?void 0:o.pensionEmployeeAmount)==null?void 0:F.raw,pensionEmployeePercentage:o==null?void 0:o.pensionEmployeePercentage,pensionEmployerAmount:(_=o==null?void 0:o.pensionEmployerAmount)==null?void 0:_.raw,pensionEmployerPercentage:o==null?void 0:o.pensionEmployerPercentage,pensionFundId:(w=o==null?void 0:o.pensionFund)==null?void 0:w.id,recovery:(C=o==null?void 0:o.recovery)==null?void 0:C.raw,sicknessDaysBalance:($=o==null?void 0:o.sicknessDays)==null?void 0:$.balance,socialSecurityAmountEmployee:(E=o==null?void 0:o.socialSecurityEmployeeAmount)==null?void 0:E.raw,socialSecurityAmountEmployer:(j=o==null?void 0:o.socialSecurityEmployerAmount)==null?void 0:j.raw,taxAmount:(D=o==null?void 0:o.incomeTaxAmount)==null?void 0:D.raw,trainingFundEmployeeAmount:(M=o==null?void 0:o.trainingFundEmployeeAmount)==null?void 0:M.raw,trainingFundEmployeePercentage:o==null?void 0:o.trainingFundEmployeePercentage,trainingFundEmployerAmount:(R=o==null?void 0:o.trainingFundEmployerAmount)==null?void 0:R.raw,trainingFundEmployerPercentage:o==null?void 0:o.trainingFundEmployerPercentage,trainingFundId:(I=o==null?void 0:o.trainingFund)==null?void 0:I.id,vacationDaysBalance:(L=o==null?void 0:o.vacationDays)==null?void 0:L.balance,vacationTakeout:(B=o==null?void 0:o.vacationTakeout)==null?void 0:B.raw,workDays:o==null?void 0:o.workDays,zkufot:(O=o==null?void 0:o.notionalExpense)==null?void 0:O.raw};return m.jsx(rl,{modalSize:"fit-content",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Edit Salary Record:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["month: ",e.month," employeeId: ",e.employeeId]})]}),opened:!!e,onClose:n,children:r||!o?m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}):m.jsx(h7,{isNewInsert:!1,defaultValues:s,onDone:l,isModifying:i})})},AFe=({setEditTransaction:e,transactionID:n})=>n?m.jsx(rl,{modalSize:"fit-content",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Edit Transaction:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["ID: ",n,m.jsx(Pe,{variant:"default",onClick:()=>ys(n),size:30,children:m.jsx(us,{size:20})}),m.jsx(XSe,{transactionId:n})]})]}),opened:!!n,onClose:()=>e(void 0),children:m.jsx(Gbe,{transactionID:n,onDone:()=>e(void 0)})}):null,RFe=({onDone:e})=>{const[n,{open:t,close:i}]=tl(!1);function a(){i(),e&&e()}return m.jsxs(m.Fragment,{children:[m.jsx(Pe,{onClick:t,children:m.jsx(Zq,{size:20})}),m.jsx(Ht,{centered:!0,opened:n,onClose:i,title:"Insert Business Trip",children:m.jsx(Xbe,{onDone:a})})]})},L7=({insertDocument:e,setInsertDocument:n})=>m.jsx(rl,{modalSize:"40%",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Insert Document:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["Charge ID: ",e,m.jsx(Pe,{variant:"default",onClick:()=>ys(e),size:30,children:m.jsx(us,{size:20})})]})]}),opened:!!e,onClose:()=>n(void 0),children:m.jsx(Zbe,{chargeId:e,closeModal:()=>n(void 0)})});function MFe(e){return typeof e=="object"&&e!==null}function LFe(e,n){if(!!!e)throw new Error(n??"Unexpected invariant triggered.")}const zFe=/\r\n|[\n\r]/g;function Ex(e,n){let t=0,i=1;for(const a of e.body.matchAll(zFe)){if(typeof a.index=="number"||LFe(!1),a.index>=n)break;t=a.index+a[0].length,i+=1}return{line:i,column:n+1-t}}function BFe(e){return z7(e.source,Ex(e.source,e.start))}function z7(e,n){const t=e.locationOffset.column-1,i="".padStart(t)+e.body,a=n.line-1,r=e.locationOffset.line-1,o=n.line+r,l=n.line===1?t:0,s=n.column+l,d=`${e.name}:${o}:${s}
`,c=i.split(/\r\n|[\n\r]/g),u=c[a];if(u.length>120){const f=Math.floor(s/80),p=s%80,h=[];for(let k=0;k<u.length;k+=80)h.push(u.slice(k,k+80));return d+MI([[`${o} |`,h[0]],...h.slice(1,f+1).map(k=>["|",k]),["|","^".padStart(p)],["|",h[f+1]]])}return d+MI([[`${o-1} |`,c[a-1]],[`${o} |`,u],["|","^".padStart(s)],[`${o+1} |`,c[a+1]]])}function MI(e){const n=e.filter(([i,a])=>a!==void 0),t=Math.max(...n.map(([i])=>i.length));return n.map(([i,a])=>i.padStart(t)+(a?" "+a:"")).join(`
`)}function VFe(e){const n=e[0];return n==null||"kind"in n||"length"in n?{nodes:n,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:n}class Gg extends Error{constructor(n,...t){var i,a,r;const{nodes:o,source:l,positions:s,path:d,originalError:c,extensions:u}=VFe(t);super(n),this.name="GraphQLError",this.path=d??void 0,this.originalError=c??void 0,this.nodes=LI(Array.isArray(o)?o:o?[o]:void 0);const f=LI((i=this.nodes)===null||i===void 0?void 0:i.map(h=>h.loc).filter(h=>h!=null));this.source=l??(f==null||(a=f[0])===null||a===void 0?void 0:a.source),this.positions=s??(f==null?void 0:f.map(h=>h.start)),this.locations=s&&l?s.map(h=>Ex(l,h)):f==null?void 0:f.map(h=>Ex(h.source,h.start));const p=MFe(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(r=u??p)!==null&&r!==void 0?r: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,Gg):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let n=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(n+=`

`+BFe(t.loc));else if(this.source&&this.locations)for(const t of this.locations)n+=`

`+z7(this.source,t);return n}toJSON(){const n={message:this.message};return this.locations!=null&&(n.locations=this.locations),this.path!=null&&(n.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(n.extensions=this.extensions),n}}function LI(e){return e===void 0||e.length===0?void 0:e}const WFe=()=>{const[{fetching:e},n]=at(tge);return{fetching:e,insertSalaryRecord:t=>{if(!t.salaryRecords||Array.isArray(t.salaryRecords)&&t.salaryRecords.length===0)throw new Gg("No salary records to insert");const i=Array.isArray(t.salaryRecords)?t.salaryRecords[0]:t.salaryRecords;if(!(i!=null&&i.directPaymentAmount)||!(i!=null&&i.employeeId)||!(i!=null&&i.employer)||!(i!=null&&i.month))throw new Gg("Missing required salary record fields");return new Promise((a,r)=>n(t).then(o=>o.error?(console.error(`Error updating salary record [${i.month}] employee [${i.employeeId}]: ${o.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(o.error.message)):o.data?o.data.insertSalaryRecords.__typename==="CommonError"?(console.error(`Error updating salary record [${i.month}] employee [${i.employeeId}]: ${o.data.insertSalaryRecords.message}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r(o.data.insertSalaryRecords.message)):(re({title:"Insert Success!",message:"Hey there, your insert is awesome!"}),a(o.data.insertSalaryRecords.salaryRecords[0])):(console.error(`Error updating salary record [${i.month}] employee [${i.employeeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),r("No data returned"))))}}},HFe=({insertSalaryRecordParams:e,setInsertSalaryRecord:n})=>{const{insertSalaryRecord:t,fetching:i}=WFe(),a=S.useCallback(r=>{console.log("salaryRecord",r),r&&t({salaryRecords:[r]}),n(void 0)},[n,t]);return m.jsx(rl,{modalSize:"40%",position:"bottom",title:m.jsx("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Insert Salary Record:"})}),opened:!!e,onClose:()=>n(void 0),children:m.jsx(h7,{isNewInsert:!0,onDone:a,isModifying:i,month:e.month})})};function Se(e,n){return n}function UFe({charge:e,documents:n,toggleDocument:t,selectedDocuments:i}){var l,s,d;const[a,r]=S.useState(!1),o=VSe(e,n);return m.jsxs("div",{className:`relative p-2 space-y-3 overflow-hidden lg:space-y-0 lg:grid lg:grid-cols-${o.length>2?"4":String(o.length+1)} lg:gap-x-3 rounded-xl`,children:[m.jsx("div",{className:"relative flex flex-col p-5 bg-white",children:m.jsxs("div",{className:"flex-1",children:[m.jsx("h3",{className:"text-l font-semibold text-neutral-600",children:"Charge"}),m.jsx("p",{className:"flex items-baseline mt-4 text-neutral-600",children:m.jsx("span",{className:"text-5xl font-extrabold tracking-tight",children:(l=e.totalAmount)==null?void 0:l.formatted})}),m.jsx("p",{className:"mt-6 text-gray-500",children:(s=e.counterparty)==null?void 0:s.name}),m.jsxs("ul",{className:"pt-6 mt-6 space-y-6 border-t",children:[m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-blue-600 rounded-xl p-0.5",children:m.jsx(QC,{color:"white"})}),m.jsx("span",{className:"ml-3 text-neutral-600",children:"Charge"})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-blue-600 rounded-xl p-0.5",children:m.jsx(qC,{color:"white"})}),m.jsx("span",{className:"ml-3 text-neutral-600"})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-blue-600 rounded-xl p-0.5",children:m.jsx(XC,{color:"white"})}),m.jsx("span",{className:"ml-3 text-neutral-600",children:en(new Date(e.transactions[0].eventDate),"yyyy-MM-dd")})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-blue-600 rounded-xl p-0.5",children:m.jsx(Hb,{color:"white"})}),m.jsx("span",{className:"ml-3 text-neutral-600",children:(d=e.totalAmount)==null?void 0:d.formatted})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-blue-600 rounded-xl p-0.5",children:m.jsx(KC,{color:"white"})}),m.jsx("span",{className:"ml-3 text-neutral-600",children:e.transactions[0].sourceDescription})]}),a?m.jsxs(m.Fragment,{children:[m.jsx("li",{}),m.jsx("li",{children:m.jsxs("button",{onClick:()=>r(!1),className:"inline-flex items-center mt-4 font-semibold text-blue-600 lg:mb-0 hover:text-neutral-600",title:"read less",children:[" ","« Less Info"," "]})})]}):m.jsx("li",{children:m.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center mt-4 font-semibold text-blue-600 lg:mb-0 hover:text-neutral-600",title:"read more",children:[" ","More Info »"," "]})})]})]})}),o.map(({document:c})=>{var u,f,p,h;return m.jsxs("div",{className:"relative flex flex-col p-5 bg-blue-600 rounded-2xl",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx("h3",{className:"text-xl font-semibold text-white",children:c.documentType}),m.jsx("p",{className:"flex items-baseline mt-4 text-white",children:m.jsx("span",{className:"text-5xl font-extrabold tracking-tight",children:(u=c.amount)==null?void 0:u.formatted})}),m.jsx("p",{className:"mt-6 text-gray-300",children:(f=c.creditor)==null?void 0:f.name}),m.jsxs("ul",{className:"pt-6 mt-6 space-y-6 border-t",children:[m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-white rounded-xl p-0.5",children:m.jsx(QC,{color:"blue"})}),m.jsx("span",{className:"ml-3 text-white",children:c.documentType})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-white rounded-xl p-0.5",children:m.jsx(qC,{color:"blue"})}),m.jsx("span",{className:"ml-3 text-white",children:c.serialNumber})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-white rounded-xl p-0.5",children:m.jsx(XC,{color:"blue"})}),m.jsx("span",{className:"ml-3 text-white",children:c.date})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-white rounded-xl p-0.5",children:m.jsx(Hb,{color:"blue"})}),m.jsx("span",{className:"ml-3 text-white",children:(p=c.amount)==null?void 0:p.formatted})]}),m.jsxs("li",{className:"flex",children:[m.jsx("div",{className:"inline-flex items-center w-6 h-6 bg-white rounded-xl p-0.5",children:m.jsx(KC,{color:"blue"})}),m.jsx("span",{className:"ml-3 text-white",children:(h=c.creditor)==null?void 0:h.name})]}),a?m.jsxs(m.Fragment,{children:[m.jsx("li",{}),m.jsx("li",{children:m.jsxs("button",{onClick:()=>r(!1),className:"inline-flex items-center mt-4 font-semibold text-white lg:mb-0 hover:text-neutral-300",title:"read less",children:[" ","« Less Info"," "]})})]}):m.jsx("li",{children:m.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center mt-4 font-semibold text-white lg:mb-0 hover:text-neutral-300",title:"read more",children:[" ","More Info »"," "]})})]})]}),m.jsx("div",{className:"z-50 mt-6 rounded-lg",children:m.jsx("button",{onClick:()=>{t(c.id)},className:"w-full items-center block px-10 py-3.5 text-base font-medium text-center text-blue-600 transition duration-500 ease-in-out transform border-2 border-white shadow-md rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 bg-white",style:i.includes(c.id)?{backgroundColor:"lightGreen"}:{},children:"Match"})})]},c.id)})]})}function YFe({documents:e,toggleDocument:n,selectedDocuments:t}){const[i,a]=S.useState(null);return m.jsxs(m.Fragment,{children:[i&&m.jsx(ol,{modalSize:"45%",content:m.jsx(hc,{src:i}),opened:!!i,onClose:()=>a(null)}),m.jsx(mg,{stickyHeader:!0,items:e,columns:[{title:"Type",value:r=>r.__typename},{title:"Image",value:r=>{var o;return r.image?m.jsx("button",{onClick:()=>{var l;return a(((l=r.image)==null?void 0:l.toString())??null)},children:m.jsx("img",{alt:"missing img",src:(o=r.image)==null?void 0:o.toString(),height:80,width:80})}):"No image"}},{title:"File",value:r=>{var o;return r.file&&m.jsx(gS,{target:"_blank",rel:"noreferrer",herf:(o=r.file)==null?void 0:o.toString(),title:"Open Link"})}},{title:"Date",value:r=>"date"in r?r.date:null},{title:"Serial Number",value:r=>"serialNumber"in r?r.serialNumber:null},{title:"Amount",value:r=>{var o;return((o=r.amount)==null?void 0:o.formatted)??null}},{title:"Provider",value:r=>{var o;return((o=r.creditor)==null?void 0:o.name)??null}},{title:"Match",value:r=>m.jsx("button",{onClick:()=>{n(r.id)},className:"w-full items-center block px-10 py-3.5 text-base font-medium text-center text-blue-600 transition duration-500 ease-in-out transform border-2 border-white shadow-md rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 bg-white",style:t.includes(r.id)?{backgroundColor:"lightGreen"}:{},children:"Match"})}]})]})}function GFe({chargeProps:e,documentsProps:n,onDone:t}){const i=Se(Yve,e),a=S.useMemo(()=>(n==null?void 0:n.documentsByFilters.map(h=>Se(Gve,h)))??[],[n]),[r,o]=S.useState([]),{updateDocument:l}=yc(),s=S.useMemo(()=>a.filter(h=>{var k;return!(h.charge||h.__typename==="Unprocessed"||((k=h.amount)==null?void 0:k.raw)==null||!h.date)}).sort((h,k)=>h.date??(k.date??"")>""?1:h.date??(k.date??"")<""?-1:0),[a]),d=S.useMemo(()=>s.filter(h=>{var x;if(h.charge||((x=h.amount)==null?void 0:x.raw)==null||!h.date)return!1;const k=Math.abs(i.totalAmount.raw),y=Math.abs(h.amount.raw),g=new Date(i.transactions[0].eventDate).getTime(),v=new Date(h.date).getTime(),N=y>3e3?30:0;return y>=Math.floor(k)&&y<=Math.ceil(k+N)&&Math.abs(v-g)<5184e6}),[s,i]),[c,u]=S.useState(d.length>0);if(s.length===0)return m.jsx("p",{children:"No matches found"});function f(h){r.includes(h)?o(r.filter(k=>k!==h)):o([...r,h])}const p=()=>{r.map(h=>l({documentId:h,fields:{chargeId:i.id}})),t()};return m.jsxs("div",{className:"relative items-center w-full mx-auto md:px-5 lg:px-2 max-w-8xl",children:[m.jsxs("div",{className:"flex flex-row justify-end",children:[d.length>0&&m.jsx(Di,{checked:c,onChange:()=>u(!c),label:"Filter Suggestions"}),m.jsx(gS,{title:"Accept",disabled:r.length===0,onClick:p})]}),m.jsx("div",{children:c?m.jsx(UFe,{charge:i,documents:d,toggleDocument:f,selectedDocuments:r}):m.jsx(YFe,{charge:i,documents:s,toggleDocument:f,selectedDocuments:r})})]})}function qFe({chargeId:e,ownerId:n,onDone:t}){var o,l;const[{data:i,fetching:a}]=Be({query:Eke,variables:{chargeIds:[e],filters:{unmatched:!0,ownerIDs:n?[n]:void 0}}}),r=(i==null?void 0:i.documentsByFilters.length)===0&&"No Document Found"||(!(i!=null&&i.chargesByIDs)||i.chargesByIDs.length===0)&&"Charge was not found"||((o=i==null?void 0:i.chargesByIDs[0].totalAmount)==null?void 0:o.raw)==null&&"Charge is missing amount"||!((l=i==null?void 0:i.chargesByIDs[0].transactions[0])!=null&&l.eventDate)&&"Charge is missing date"||void 0;return m.jsx("div",{className:"text-gray-600 body-font",children:m.jsxs("div",{className:"container px-2 py-5 mx-auto",children:[a&&m.jsx("div",{className:"flex flex-col text-center w-full mb-1",children:m.jsx(Mi,{})}),r&&m.jsx("div",{className:"flex flex-col text-center w-full mb-1",children:m.jsx("h3",{className:"sm:text-2xl text-xl font-medium title-font mb-6 text-gray-900",children:r})}),!r&&m.jsx("div",{className:"flex flex-col gap-3",children:m.jsx(GFe,{chargeProps:i.chargesByIDs[0],documentsProps:i,onDone:t})})]})})}const B7=({chargeId:e,ownerId:n,setMatchDocuments:t})=>m.jsx(rl,{modalSize:"80%",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-5",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Match Documents:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["Charge ID: ",e,m.jsx(Pe,{variant:"default",onClick:()=>ys(e),size:30,children:m.jsx(us,{size:20})})]})]}),opened:!!e,onClose:()=>t(),children:m.jsx(qFe,{chargeId:e,ownerId:n,onDone:()=>t()})}),ol=({content:e,title:n,opened:t=!1,onClose:i=()=>{},modalSize:a})=>m.jsx(Ht,{size:a,opened:t,onClose:i,title:n,children:e}),V7=({uploadDocument:e,setUploadDocument:n})=>m.jsx(rl,{modalSize:"40%",position:"bottom",title:m.jsxs("div",{className:"flex flex-row mx-3 pt-3 sm:text-1xl gap-10",children:[m.jsx("h1",{className:"sm:text-2xl font-small text-gray-900",children:"Upload Document:"}),m.jsxs("div",{className:"flex flex-row gap-2",children:["Charge ID: ",e,m.jsx(Pe,{variant:"default",onClick:()=>ys(e),size:30,children:m.jsx(us,{size:20})})]})]}),opened:!!e,onClose:()=>n(void 0),children:m.jsx(Jbe,{chargeId:e,closeModal:()=>n(void 0)})}),Nc=({cols:e,spacing:n,children:t})=>m.jsx(kS,{cols:e,spacing:n,breakpoints:[{maxWidth:980,cols:3,spacing:"md"},{maxWidth:900,cols:2,spacing:"sm"},{maxWidth:755,cols:2,spacing:"sm"},{maxWidth:600,cols:1,spacing:"sm"}],children:t}),KFe=({children:e})=>e?m.jsx("footer",{className:"text-gray-600 body-font sticky bottom-0 bg-gray-200 justify-center flex",children:m.jsx("div",{className:"px-5 py-8 mx-auto flex items-center sm:flex-row flex-col",children:e})}):m.jsx(m.Fragment,{}),W7=()=>{const[{fetching:e},n]=at(rge);return{fetching:e,toggleChargeAccountantApproval:t=>new Promise((i,a)=>n(t).then(r=>r.error?(console.error(`Error toggling accountant approval to ledger record ID [${t.chargeId}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):r.data?(re({title:"Toggle Success!",message:"Accountant approval was updated! 🎉"}),i(r.data.toggleChargeAccountantApproval)):(console.error(`Error toggling accountant approval to ledger record ID [${t.chargeId}]: No data returned`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))))}};function XFe({data:e}){const n=Se(qve,e),[t,i]=S.useState(n.accountantApproval),{toggleChargeAccountantApproval:a}=W7();function r(o){i(o),a({chargeId:n.id,approved:o})}return m.jsx("td",{children:m.jsx(Di,{color:"green",checked:t,onChange:o=>r(o.currentTarget.checked)})})}const QFe=({data:e})=>{var t,i;const n=Se(Kve,e);return m.jsx("td",{children:m.jsx("div",{style:{color:Number((t=n.totalAmount)==null?void 0:t.raw)>0?"green":"red",whiteSpace:"nowrap"},children:(i=n.totalAmount)==null?void 0:i.formatted})})},ZFe=({data:e})=>{const{businessTrip:n}=Se(Xve,e);return m.jsx("td",{children:n==null?void 0:n.name})},JFe=({data:e})=>{var u;const{get:n}=kt(),{counterparty:t,validationData:i,__typename:a}=Se(Jve,e),o=S.useMemo(()=>{switch(a){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":return!1;default:return!0}},[a])&&((u=i==null?void 0:i.missingInfo)==null?void 0:u.includes(Yo.Counterparty)),{name:l="Missing",id:s}=t||{},d=n("chargesFilters"),c=S.useCallback(f=>{const p=d?JSON.parse(decodeURIComponent(d)):{},h={fromDate:p.fromDate?`%252C%2522fromDate%2522%253A%2522${p.fromDate}%2522`:"",toDate:p.toDate?`%252C%2522toDate%2522%253A%2522${p.toDate}%2522`:"",ownerIds:p.byOwners&&p.byOwners.length>0?`%2522${p.byOwners.join("%2522%252C%2522")}%2522`:""};return`/business-transactions?transactionsFilters=%257B%2522ownerIds%2522%253A%255B${h.ownerIds}%255D%252C%2522businessIDs%2522%253A%255B%2522${encodeURIComponent(f)}%2522%255D${h.fromDate}${h.toDate}%257D`},[d]);return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:m.jsxs(Kn,{inline:!0,size:12,disabled:!o,color:"red",zIndex:"auto",children:[!o&&s&&m.jsx("a",{href:c(s),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:l,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),o&&l]})})})},ewe=({data:e})=>{const n=Se(Qve,e),{minDebitDate:t,minEventDate:i,minDocumentsDate:a}=n,r=t||i||a;return m.jsx("td",{children:m.jsx("div",{children:r&&en(new Date(a||t||i),"dd/MM/yy")})})},nwe=({data:e})=>{var c,u,f,p,h;const n=Se(Zve,e),t=(u=(c=n==null?void 0:n.validationData)==null?void 0:c.missingInfo)==null?void 0:u.includes(Yo.Description),i=t&&!!((p=(f=n.missingInfoSuggestions)==null?void 0:f.description)!=null&&p.trim().length),{userDescription:a,id:r}=n;let o=a==null?void 0:a.trim();o||(o=((h=n.missingInfoSuggestions)==null?void 0:h.description)??"Missing");const{updateCharge:l,fetching:s}=O_(),d=S.useCallback(k=>{k!==void 0&&l({chargeId:r,fields:{userDescription:k}})},[r,l]);return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-wrap",children:[m.jsx("div",{className:"flex flex-col justify-center",children:m.jsx(Kn,{inline:!0,size:12,disabled:!t,color:"red",zIndex:"auto",children:m.jsx("p",{style:i?{backgroundColor:"rgb(236, 207, 57)"}:{},children:o})})}),i&&m.jsx(vc,{onClick:()=>d(n.missingInfoSuggestions.description),disabled:s})]})})},twe=({data:e})=>{var d,c;const n=Se(nke,e),{metadata:t,validationData:i,id:a,__typename:r}=n,o=S.useMemo(()=>{switch(r){case"BusinessTripCharge":case"ConversionCharge":case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":return!1;default:return!0}},[r]),l=(d=i==null?void 0:i.missingInfo)==null?void 0:d.includes(Yo.Transactions),s=o&&((c=i==null?void 0:i.missingInfo)==null?void 0:c.includes(Yo.Documents));return m.jsx("td",{children:m.jsx(CFe,{chargeId:a,children:m.jsx($_,{items:[{style:t!=null&&t.transactionsCount?{}:{backgroundColor:"rgb(236, 207, 57)"},content:m.jsx(Kn,{inline:!0,size:12,disabled:!l,color:"red",zIndex:"auto",children:m.jsxs("div",{className:"whitespace-nowrap",children:["Transactions: ",(t==null?void 0:t.transactionsCount)??0]})},"transactions")},{style:{},content:m.jsx(iwe,{data:n})},{content:m.jsx(Kn,{inline:!0,size:12,disabled:!s,color:"red",zIndex:"auto",children:m.jsxs("div",{className:"whitespace-nowrap",children:["Documents: ",(t==null?void 0:t.documentsCount)??0]})},"ledger"),style:t!=null&&t.documentsCount||!o?{}:{backgroundColor:"rgb(236, 207, 57)"}}]})})})},iwe=({data:e})=>{var l,s,d,c;const{ledger:n}=Se(eke,e),t=((l=n==null?void 0:n.validate)==null?void 0:l.differences)!==void 0,i=!n||n.records.length===0,a=!i&&(n==null?void 0:n.balance)&&!(n!=null&&n.balance.isBalanced),r=(s=n==null?void 0:n.validate)==null?void 0:s.isValid,o=i?0:n==null?void 0:n.records.length;return m.jsx(Kn,{inline:!0,size:12,processing:!t,disabled:!i&&!a&&r,color:(c=(d=n==null?void 0:n.validate)==null?void 0:d.differences)!=null&&c.length?"orange":"red",zIndex:"auto",children:m.jsxs("div",{className:"whitespace-nowrap",children:["Ledger Records: ",i?"Error":o]})},"ledger")},awe=({data:e})=>{var f,p;const{tags:n,id:t,validationData:i,missingInfoSuggestions:a}=Se(tke,e),{updateCharge:r,fetching:o}=O_(),[l,s]=S.useState(n??[]),d=(f=i==null?void 0:i.missingInfo)==null?void 0:f.includes(Yo.Tags),c=d&&!!((p=a==null?void 0:a.tags)!=null&&p.length);(l==null?void 0:l.length)===0&&c&&s(a==null?void 0:a.tags);const u=S.useCallback(h=>{r({chargeId:t,fields:{tags:h}})},[t,r]);return m.jsxs("td",{children:[m.jsx(Kn,{inline:!0,size:12,disabled:!d,color:"red",zIndex:"auto",children:m.jsx($_,{items:l.map(h=>h.name),style:c?{backgroundColor:"rgb(236, 207, 57)"}:{}})}),c&&m.jsx(vc,{onClick:()=>u(a.tags),disabled:o})]})},rwe=({data:e})=>{var o;const{validationData:n,taxCategory:t,__typename:i}=Se(ike,e);if(!S.useMemo(()=>{switch(i){case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":return!1;default:return!0}},[i]))return m.jsx("td",{});const r=(o=n==null?void 0:n.missingInfo)==null?void 0:o.includes(Yo.TaxCategory);return m.jsx("td",{children:m.jsx(Kn,{inline:!0,size:12,disabled:!r,color:"red",zIndex:"auto",children:(t==null?void 0:t.name)??"N/A"})})},owe=({data:e})=>{const n=Se(ake,e),{__typename:t}=n,i=S.useMemo(()=>{switch(t){case"CommonCharge":return{text:"Common",icon:m.jsx(Hb,{})};case"BusinessTripCharge":return{text:"Business Trip",icon:m.jsx(_q,{})};case"DividendCharge":return{text:"Dividend",icon:m.jsx(yq,{})};case"ConversionCharge":return{text:"Conversion",icon:m.jsx(Yq,{})};case"SalaryCharge":return{text:"Salary",icon:m.jsx(Xq,{})};case"InternalTransferCharge":return{text:"Internal Transfer",icon:m.jsx(Hq,{})};case"MonthlyVatCharge":return{text:"Monthly VAT",icon:m.jsx($q,{})}}},[t]);return m.jsxs("td",{children:[m.jsx("div",{children:i.text}),m.jsx(SB,{radius:"xl",size:"xl",children:i.icon})]})},lwe=({data:e})=>{var c;const{vat:n,totalAmount:t,validationData:i,__typename:a}=Se(rke,e);if(!S.useMemo(()=>{switch(a){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":return!1;default:return!0}},[a]))return m.jsx("td",{});const o=(c=i==null?void 0:i.missingInfo)==null?void 0:c.includes(Yo.Vat),l=!n&&(t==null?void 0:t.currency)===Hn.Ils,s=((n==null?void 0:n.raw)??0)>0&&((t==null?void 0:t.raw)??0)<0||((n==null?void 0:n.raw)??0)<0&&((t==null?void 0:t.raw)??0)>0,d=l||s;return m.jsx("td",{children:m.jsx("div",{style:{color:d?"red":"green",whiteSpace:"nowrap"},children:m.jsx(Kn,{inline:!0,size:12,disabled:!o,color:"red",zIndex:"auto",children:n?n.formatted:d?"Missing":null})})})};function swe(e){return Object.prototype.toString.call(e)==="[object Object]"}function zI(e){return swe(e)||Array.isArray(e)}function dwe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function I_(e,n){const t=Object.keys(e),i=Object.keys(n);if(t.length!==i.length)return!1;const a=JSON.stringify(Object.keys(e.breakpoints||{})),r=JSON.stringify(Object.keys(n.breakpoints||{}));return a!==r?!1:t.every(o=>{const l=e[o],s=n[o];return typeof l=="function"?`${l}`==`${s}`:!zI(l)||!zI(s)?l===s:I_(l,s)})}function BI(e){return e.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function cwe(e,n){if(e.length!==n.length)return!1;const t=BI(e),i=BI(n);return t.every((a,r)=>{const o=i[r];return I_(a,o)})}function j_(e){return typeof e=="number"}function $x(e){return typeof e=="string"}function T_(e){return typeof e=="boolean"}function VI(e){return Object.prototype.toString.call(e)==="[object Object]"}function En(e){return Math.abs(e)}function A_(e){return Math.sign(e)}function ju(e,n){return En(e-n)}function uwe(e,n){if(e===0||n===0||En(e)<=En(n))return 0;const t=ju(En(e),En(n));return En(t/e)}function Sm(e){return Nm(e).map(Number)}function wa(e){return e[lf(e)]}function lf(e){return Math.max(0,e.length-1)}function R_(e,n){return n===lf(e)}function WI(e,n=0){return Array.from(Array(e),(t,i)=>n+i)}function Nm(e){return Object.keys(e)}function H7(e,n){return[e,n].reduce((t,i)=>(Nm(i).forEach(a=>{const r=t[a],o=i[a],l=VI(r)&&VI(o);t[a]=l?H7(r,o):o}),t),{})}function U7(e,n){return typeof n.MouseEvent<"u"&&e instanceof n.MouseEvent}function mwe(e,n){const t={start:i,center:a,end:r};function i(){return 0}function a(s){return r(s)/2}function r(s){return n-s}function o(s,d){return $x(e)?t[e](s):e(n,s,d)}return{measure:o}}function bm(){let e=[];function n(a,r,o,l={passive:!0}){let s;if("addEventListener"in a)a.addEventListener(r,o,l),s=()=>a.removeEventListener(r,o,l);else{const d=a;d.addListener(o),s=()=>d.removeListener(o)}return e.push(s),i}function t(){e=e.filter(a=>a())}const i={add:n,clear:t};return i}function fwe(e,n,t,i){const a=bm(),r=1e3/60;let o=null,l=0,s=0;function d(){a.add(e,"visibilitychange",()=>{e.hidden&&h()})}function c(){p(),a.clear()}function u(y){if(!s)return;o||(o=y);const g=y-o;for(o=y,l+=g;l>=r;)t(),l-=r;const v=En(l/r);i(v),s&&n.requestAnimationFrame(u)}function f(){s||(s=n.requestAnimationFrame(u))}function p(){n.cancelAnimationFrame(s),o=null,l=0,s=0}function h(){o=null,l=0}return{init:d,destroy:c,start:f,stop:p,update:t,render:i}}function pwe(e,n){const t=e==="y"?"y":"x",i=e==="y"?"x":"y",a=l(),r=s();function o(c){const{width:u,height:f}=c;return t==="x"?u:f}function l(){return t==="y"?"top":n==="rtl"?"right":"left"}function s(){return t==="y"?"bottom":n==="rtl"?"left":"right"}return{scroll:t,cross:i,startEdge:a,endEdge:r,measureSize:o}}function rs(e=0,n=0){const t=En(e-n);function i(d){return d<e}function a(d){return d>n}function r(d){return i(d)||a(d)}function o(d){return r(d)?i(d)?e:n:d}function l(d){return t?d-t*Math.ceil((d-n)/t):d}return{length:t,max:n,min:e,constrain:o,reachedAny:r,reachedMax:a,reachedMin:i,removeOffset:l}}function Y7(e,n,t){const{constrain:i}=rs(0,e),a=e+1;let r=o(n);function o(f){return t?En((a+f)%a):i(f)}function l(){return r}function s(f){return r=o(f),u}function d(f){return c().set(l()+f)}function c(){return Y7(e,l(),t)}const u={get:l,set:s,add:d,clone:c};return u}function hwe(e){const n=e==="rtl"?-1:1;function t(a){return a*n}return{apply:t}}function vwe(e,n,t,i,a,r,o,l,s,d,c,u,f,p,h,k,y,g,v,N){const{cross:x}=e,F=["INPUT","SELECT","TEXTAREA"],_={passive:!1},w=bm(),C=bm(),$=rs(50,225).constrain(h.measure(20)),E={mouse:300,touch:400},j={mouse:500,touch:600},D=k?43:25;let M=!1,R=0,I=0,L=!1,B=!1,O=!1,P=!1;function A(K){if(!N)return;function de(Ee){(T_(N)||N(K,Ee))&&Z(Ee)}const be=t;w.add(be,"dragstart",Ee=>Ee.preventDefault(),_).add(be,"touchmove",()=>{},_).add(be,"touchend",()=>{}).add(be,"touchstart",de).add(be,"mousedown",de).add(be,"touchcancel",ie).add(be,"contextmenu",ie).add(be,"click",ve,!0)}function V(){w.clear(),C.clear()}function U(){const K=P?i:t;C.add(K,"touchmove",ce,_).add(K,"touchend",ie).add(K,"mousemove",ce,_).add(K,"mouseup",ie)}function oe(K){const de=K.nodeName||"";return F.includes(de)}function G(){return(k?j:E)[P?"mouse":"touch"]}function ne(K,de){const be=f.add(A_(K)*-1),Ee=u.byDistance(K,!k).distance;return k||En(K)<$?Ee:g&&de?Ee*.5:u.byIndex(be.get(),0).distance}function Z(K){const de=U7(K,a);P=de,!(de&&K.button!==0)&&(oe(K.target)||(O=k&&de&&!K.buttons&&M,M=ju(r.get(),l.get())>=2,L=!0,o.pointerDown(K),c.useFriction(0).useDuration(0),r.set(l),U(),R=o.readPoint(K),I=o.readPoint(K,x),p.emit("pointerDown")))}function ce(K){const de=o.readPoint(K),be=o.readPoint(K,x),Ee=ju(de,R),Qe=ju(be,I);if(!B&&!P&&(!K.cancelable||(B=Ee>Qe,!B)))return ie(K);const $e=o.pointerMove(K);Ee>y&&(O=!0),c.useFriction(.3).useDuration(1),s.start(),r.add(n.apply($e)),K.preventDefault()}function ie(K){const be=u.byDistance(0,!1).index!==f.get(),Ee=o.pointerUp(K)*G(),Qe=ne(n.apply(Ee),be),$e=uwe(Ee,Qe),z=D-10*$e,H=v+$e/50;B=!1,L=!1,C.clear(),c.useDuration(z).useFriction(H),d.distance(Qe,!k),P=!1,p.emit("pointerUp")}function ve(K){O&&(K.stopPropagation(),K.preventDefault())}function he(){return L}return{init:A,pointerDown:he,destroy:V}}function kwe(e,n){let i,a;function r(u){return u.timeStamp}function o(u,f){const h=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(U7(u,n)?u:u.touches[0])[h]}function l(u){return i=u,a=u,o(u)}function s(u){const f=o(u)-o(a),p=r(u)-r(i)>170;return a=u,p&&(i=u),f}function d(u){if(!i||!a)return 0;const f=o(a)-o(i),p=r(u)-r(i),h=r(u)-r(a)>170,k=f/p;return p&&!h&&En(k)>.1?k:0}return{pointerDown:l,pointerMove:s,pointerUp:d,readPoint:o}}function gwe(){function e(t){const{offsetTop:i,offsetLeft:a,offsetWidth:r,offsetHeight:o}=t;return{top:i,right:a+r,bottom:i+o,left:a,width:r,height:o}}return{measure:e}}function ywe(e){function n(i){return e*(i/100)}return{measure:n}}function Swe(e,n,t,i,a,r,o){let l,s,d=[],c=!1;function u(k){return a.measureSize(o.measure(k))}function f(k){if(!r)return;s=u(e),d=i.map(u);function y(v){for(const N of v){const x=N.target===e,F=i.indexOf(N.target),_=x?s:d[F],w=u(x?e:i[F]);if(En(w-_)>=.5){t.requestAnimationFrame(()=>{k.reInit(),n.emit("resize")});break}}}l=new ResizeObserver(v=>{c||(T_(r)||r(k,v))&&y(v)}),[e].concat(i).forEach(v=>l.observe(v))}function p(){l&&l.disconnect(),c=!0}return{init:f,destroy:p}}function Nwe(e,n,t,i,a){let r=0,o=0,l=i,s=a,d=e.get(),c=0;function u(){const F=t.get()-e.get(),_=!l;let w=0;return _?(r=0,e.set(t),w=F):(r+=F/l,r*=s,d+=r,e.add(r),w=d-c),o=A_(w),c=d,x}function f(){const F=t.get()-n.get();return En(F)<.001}function p(){return l}function h(){return o}function k(){return r}function y(){return v(i)}function g(){return N(a)}function v(F){return l=F,x}function N(F){return s=F,x}const x={direction:h,duration:p,velocity:k,seek:u,settled:f,useBaseFriction:g,useBaseDuration:y,useFriction:N,useDuration:v};return x}function bwe(e,n,t,i,a){const r=a.measure(10),o=a.measure(50),l=rs(.1,.99);let s=!1;function d(){return!(s||!e.reachedAny(t.get())||!e.reachedAny(n.get()))}function c(p){if(!d())return;const h=e.reachedMin(n.get())?"min":"max",k=En(e[h]-n.get()),y=t.get()-n.get(),g=l.constrain(k/o);t.subtract(y*g),!p&&En(y)<r&&(t.set(e.constrain(t.get())),i.useDuration(25).useBaseFriction())}function u(p){s=!p}return{constrain:c,toggleActive:u}}function xwe(e,n,t,i,a){const r=rs(-n+e,0),o=u(),l=c(),s=f();function d(h,k){return ju(h,k)<1}function c(){const h=o[0],k=wa(o),y=o.lastIndexOf(h),g=o.indexOf(k)+1;return rs(y,g)}function u(){return t.map((h,k)=>{const{min:y,max:g}=r,v=r.constrain(h),N=!k,x=R_(t,k);return N?g:x||d(y,v)?y:d(g,v)?g:v}).map(h=>parseFloat(h.toFixed(3)))}function f(){if(n<=e+a)return[r.max];if(i==="keepSnaps")return o;const{min:h,max:k}=l;return o.slice(h,k)}return{snapsContained:s,scrollContainLimit:l}}function Fwe(e,n,t){const i=n[0],a=t?i-e:wa(n);return{limit:rs(a,i)}}function wwe(e,n,t,i){const r=n.min+.1,o=n.max+.1,{reachedMin:l,reachedMax:s}=rs(r,o);function d(f){return f===1?s(t.get()):f===-1?l(t.get()):!1}function c(f){if(!d(f))return;const p=e*(f*-1);i.forEach(h=>h.add(p))}return{loop:c}}function _we(e){const{max:n,length:t}=e;function i(r){const o=r-n;return t?o/-t:0}return{get:i}}function Cwe(e,n,t,i,a){const{startEdge:r,endEdge:o}=e,{groupSlides:l}=a,s=u().map(n.measure),d=f(),c=p();function u(){return l(i).map(k=>wa(k)[o]-k[0][r]).map(En)}function f(){return i.map(k=>t[r]-k[r]).map(k=>-En(k))}function p(){return l(d).map(k=>k[0]).map((k,y)=>k+s[y])}return{snaps:d,snapsAligned:c}}function Pwe(e,n,t,i,a,r){const{groupSlides:o}=a,{min:l,max:s}=i,d=c();function c(){const f=o(r),p=!e||n==="keepSnaps";return t.length===1?[r]:p?f:f.slice(l,s).map((h,k,y)=>{const g=!k,v=R_(y,k);if(g){const N=wa(y[0])+1;return WI(N)}if(v){const N=lf(r)-wa(y)[0]+1;return WI(N,wa(y)[0])}return h})}return{slideRegistry:d}}function Owe(e,n,t,i,a){const{reachedAny:r,removeOffset:o,constrain:l}=i;function s(h){return h.concat().sort((k,y)=>En(k)-En(y))[0]}function d(h){const k=e?o(h):l(h),y=n.map(v=>v-k).map(v=>c(v,0)).map((v,N)=>({diff:v,index:N})).sort((v,N)=>En(v.diff)-En(N.diff)),{index:g}=y[0];return{index:g,distance:k}}function c(h,k){const y=[h,h+t,h-t];if(!e)return y[0];if(!k)return s(y);const g=y.filter(v=>A_(v)===k);return g.length?s(g):wa(y)-t}function u(h,k){const y=n[h]-a.get(),g=c(y,k);return{index:h,distance:g}}function f(h,k){const y=a.get()+h,{index:g,distance:v}=d(y),N=!e&&r(y);if(!k||N)return{index:g,distance:h};const x=n[g]-v,F=h+c(x,0);return{index:g,distance:F}}return{byDistance:f,byIndex:u,shortcut:c}}function Dwe(e,n,t,i,a,r,o){function l(u){const f=u.distance,p=u.index!==n.get();r.add(f),f&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(t.set(n.get()),n.set(u.index),o.emit("select"))}function s(u,f){const p=a.byDistance(u,f);l(p)}function d(u,f){const p=n.clone().set(u),h=a.byIndex(p.get(),f);l(h)}return{distance:s,index:d}}function Ewe(e,n,t,i,a,r){let o=0;function l(){r.add(document,"keydown",s,!1),n.forEach(d)}function s(u){u.code==="Tab"&&(o=new Date().getTime())}function d(u){const f=()=>{if(new Date().getTime()-o>10)return;e.scrollLeft=0;const k=n.indexOf(u),y=t.findIndex(g=>g.includes(k));j_(y)&&(a.useDuration(0),i.index(y,0))};r.add(u,"focus",f,{passive:!0,capture:!0})}return{init:l}}function uh(e){let n=e;function t(){return n}function i(s){n=o(s)}function a(s){n+=o(s)}function r(s){n-=o(s)}function o(s){return j_(s)?s:s.get()}return{get:t,set:i,add:a,subtract:r}}function G7(e,n,t){const i=e.scroll==="x"?o:l,a=t.style;let r=!1;function o(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function s(f){r||(a.transform=i(n.apply(f)))}function d(f){r=!f}function c(){r||(a.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:s,toggleActive:d}}function $we(e,n,t,i,a,r,o,l,s,d){const u=Sm(r),f=Sm(r).reverse(),p=v().concat(N());function h(C,$){return C.reduce((E,j)=>E-r[j],$)}function k(C,$){return C.reduce((E,j)=>h(E,$)>0?E.concat([j]):E,[])}function y(C){return o.map(($,E)=>({start:$-a[E]+.5+C,end:$+t-.5+C}))}function g(C,$,E){const j=y($);return C.map(D=>{const M=E?0:-i,R=E?i:0,I=E?"end":"start",L=j[D][I];return{index:D,loopPoint:L,slideLocation:uh(-1),translate:G7(e,n,d[D]),target:()=>s.get()>L?M:R}})}function v(){const C=l[0],$=k(f,C);return g($,i,!1)}function N(){const C=t-l[0]-1,$=k(u,C);return g($,-i,!0)}function x(){return p.every(({index:C})=>{const $=u.filter(E=>E!==C);return h($,t)<=.1})}function F(){p.forEach(C=>{const{target:$,translate:E,slideLocation:j}=C,D=$();D!==j.get()&&(E.to(D),j.set(D))})}function _(){p.forEach(C=>C.translate.clear())}return{canLoop:x,clear:_,loop:F,loopPoints:p}}function Iwe(e,n,t){let i,a=!1;function r(s){if(!t)return;function d(c){for(const u of c)if(u.type==="childList"){s.reInit(),n.emit("slidesChanged");break}}i=new MutationObserver(c=>{a||(T_(t)||t(s,c))&&d(c)}),i.observe(e,{childList:!0})}function o(){i&&i.disconnect(),a=!0}return{init:r,destroy:o}}function jwe(e,n,t,i){const a={};let r=null,o=null,l,s=!1;function d(){l=new IntersectionObserver(h=>{s||(h.forEach(k=>{const y=n.indexOf(k.target);a[y]=k}),r=null,o=null,t.emit("slidesInView"))},{root:e.parentElement,threshold:i}),n.forEach(h=>l.observe(h))}function c(){l&&l.disconnect(),s=!0}function u(h){return Nm(a).reduce((k,y)=>{const g=parseInt(y),{isIntersecting:v}=a[g];return(h&&v||!h&&!v)&&k.push(g),k},[])}function f(h=!0){if(h&&r)return r;if(!h&&o)return o;const k=u(h);return h&&(r=k),h||(o=k),k}return{init:d,destroy:c,get:f}}function Twe(e,n,t,i,a,r){const{measureSize:o,startEdge:l,endEdge:s}=e,d=t[0]&&a,c=h(),u=k(),f=t.map(o),p=y();function h(){if(!d)return 0;const v=t[0];return En(n[l]-v[l])}function k(){if(!d)return 0;const v=r.getComputedStyle(wa(i));return parseFloat(v.getPropertyValue(`margin-${s}`))}function y(){return t.map((v,N,x)=>{const F=!N,_=R_(x,N);return F?f[N]+c:_?f[N]+u:x[N+1][l]-v[l]}).map(En)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:u}}function Awe(e,n,t,i,a,r,o,l,s,d){const{startEdge:c,endEdge:u}=e,f=j_(i);function p(g,v){return Sm(g).filter(N=>N%v===0).map(N=>g.slice(N,N+v))}function h(g){return g.length?Sm(g).reduce((v,N)=>{const x=wa(v)||0,F=x===0,_=N===lf(g),w=r[c]-o[x][c],C=r[c]-o[N][u],$=!a&&F?n.apply(l):0,E=!a&&_?n.apply(s):0;return En(C-E-(w+$))>t+d&&v.push(N),_&&v.push(g.length),v},[]).map((v,N,x)=>{const F=Math.max(x[N-1]||0);return g.slice(F,v)}):[]}function k(g){return f?p(g,i):h(g)}return{groupSlides:k}}function Rwe(e,n,t,i,a,r,o){const{align:l,axis:s,direction:d,startIndex:c,loop:u,duration:f,dragFree:p,dragThreshold:h,inViewThreshold:k,slidesToScroll:y,skipSnaps:g,containScroll:v,watchResize:N,watchSlides:x,watchDrag:F}=r,_=2,w=gwe(),C=w.measure(n),$=t.map(w.measure),E=hwe(d),j=pwe(s,d),D=j.measureSize(C),M=ywe(D),R=mwe(l,D),I=!u&&!!v,L=u||!!v,{slideSizes:B,slideSizesWithGaps:O,startGap:P,endGap:A}=Twe(j,C,$,t,L,a),V=Awe(j,E,D,y,u,C,$,P,A,_),{snaps:U,snapsAligned:oe}=Cwe(j,R,C,$,V),G=-wa(U)+wa(O),{snapsContained:ne,scrollContainLimit:Z}=xwe(D,G,oe,v,_),ce=I?ne:oe,{limit:ie}=Fwe(G,ce,u),ve=Y7(lf(ce),c,u),he=ve.clone(),ge=Sm(t),K=({dragHandler:cn,scrollBody:nn,scrollBounds:un,options:{loop:$n}})=>{$n||un.constrain(cn.pointerDown()),nn.seek()},de=({scrollBody:cn,translate:nn,location:un,offsetLocation:$n,scrollLooper:qe,slideLooper:ke,dragHandler:_e,animation:Ft,eventHandler:Nn,options:{loop:vn}},It)=>{const mn=cn.velocity(),Xn=cn.settled();Xn&&!_e.pointerDown()&&(Ft.stop(),Nn.emit("settle")),Xn||Nn.emit("scroll"),$n.set(un.get()-mn+mn*It),vn&&(qe.loop(cn.direction()),ke.loop()),nn.to($n.get())},be=fwe(i,a,()=>K(Te),cn=>de(Te,cn)),Ee=.68,Qe=ce[ve.get()],$e=uh(Qe),z=uh(Qe),H=uh(Qe),W=Nwe($e,z,H,f,Ee),ee=Owe(u,ce,G,ie,H),J=Dwe(be,ve,he,W,ee,H,o),Q=_we(ie),Y=bm(),se=jwe(n,t,o,k),{slideRegistry:Ce}=Pwe(I,v,ce,Z,V,ge),Ae=Ewe(e,t,Ce,J,W,Y),Te={ownerDocument:i,ownerWindow:a,eventHandler:o,containerRect:C,slideRects:$,animation:be,axis:j,direction:E,dragHandler:vwe(j,E,e,i,a,H,kwe(j,a),$e,be,J,W,ee,ve,o,M,p,h,g,Ee,F),eventStore:Y,percentOfView:M,index:ve,indexPrevious:he,limit:ie,location:$e,offsetLocation:z,options:r,resizeHandler:Swe(n,o,a,t,j,N,w),scrollBody:W,scrollBounds:bwe(ie,z,H,W,M),scrollLooper:wwe(G,ie,z,[$e,z,H]),scrollProgress:Q,scrollSnapList:ce.map(Q.get),scrollSnaps:ce,scrollTarget:ee,scrollTo:J,slideLooper:$we(j,E,D,G,B,O,U,ce,z,t),slideFocus:Ae,slidesHandler:Iwe(n,o,x),slidesInView:se,slideIndexes:ge,slideRegistry:Ce,slidesToScroll:V,target:H,translate:G7(j,E,n)};return Te}function Mwe(){const e={};let n;function t(s){n=s}function i(s){return e[s]||[]}function a(s){return i(s).forEach(d=>d(n,s)),l}function r(s,d){return e[s]=i(s).concat([d]),l}function o(s,d){return e[s]=i(s).filter(c=>c!==d),l}const l={init:t,emit:a,off:o,on:r};return l}const Lwe={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function zwe(e){function n(r,o){return H7(r,o||{})}function t(r){const o=r.breakpoints||{},l=Nm(o).filter(s=>e.matchMedia(s).matches).map(s=>o[s]).reduce((s,d)=>n(s,d),{});return n(r,l)}function i(r){return r.map(o=>Nm(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:n,optionsAtMedia:t,optionsMediaQueries:i}}function Bwe(e){let n=[];function t(r,o){return n=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),n.forEach(l=>l.init(r,e)),o.reduce((l,s)=>Object.assign(l,{[s.name]:s}),{})}function i(){n=n.filter(r=>r.destroy())}return{init:t,destroy:i}}function qg(e,n,t){const i=e.ownerDocument,a=i.defaultView,r=zwe(a),o=Bwe(r),l=bm(),s=Mwe(),{mergeOptions:d,optionsAtMedia:c,optionsMediaQueries:u}=r,{on:f,off:p,emit:h}=s,k=j;let y=!1,g,v=d(Lwe,qg.globalOptions),N=d(v),x=[],F,_,w;function C(){const{container:ge,slides:K}=N;_=($x(ge)?e.querySelector(ge):ge)||e.children[0];const be=$x(K)?_.querySelectorAll(K):K;w=[].slice.call(be||_.children)}function $(ge){const K=Rwe(e,_,w,i,a,ge,s);if(ge.loop&&!K.slideLooper.canLoop()){const de=Object.assign({},ge,{loop:!1});return $(de)}return K}function E(ge,K){y||(v=d(v,ge),N=c(v),x=K||x,C(),g=$(N),u([v,...x.map(({options:de})=>de)]).forEach(de=>l.add(de,"change",j)),N.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(),g.eventHandler.init(he),g.resizeHandler.init(he),g.slidesHandler.init(he),g.options.loop&&g.slideLooper.loop(),_.offsetParent&&w.length&&g.dragHandler.init(he),F=o.init(he,x)))}function j(ge,K){const de=V();D(),E(d({startIndex:de},ge),K),s.emit("reInit")}function D(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),o.destroy(),l.clear()}function M(){y||(y=!0,l.clear(),D(),s.emit("destroy"))}function R(ge,K,de){!N.active||y||(g.scrollBody.useBaseFriction().useDuration(K===!0?0:N.duration),g.scrollTo.index(ge,de||0))}function I(ge){const K=g.index.add(1).get();R(K,ge,-1)}function L(ge){const K=g.index.add(-1).get();R(K,ge,1)}function B(){return g.index.add(1).get()!==V()}function O(){return g.index.add(-1).get()!==V()}function P(){return g.scrollSnapList}function A(){return g.scrollProgress.get(g.location.get())}function V(){return g.index.get()}function U(){return g.indexPrevious.get()}function oe(){return g.slidesInView.get()}function G(){return g.slidesInView.get(!1)}function ne(){return F}function Z(){return g}function ce(){return e}function ie(){return _}function ve(){return w}const he={canScrollNext:B,canScrollPrev:O,containerNode:ie,internalEngine:Z,destroy:M,off:p,on:f,emit:h,plugins:ne,previousScrollSnap:U,reInit:k,rootNode:ce,scrollNext:I,scrollPrev:L,scrollProgress:A,scrollSnapList:P,scrollTo:R,selectedScrollSnap:V,slideNodes:ve,slidesInView:oe,slidesNotInView:G};return E(n,t),setTimeout(()=>s.emit("init"),0),he}qg.globalOptions=void 0;function M_(e={},n=[]){const t=S.useRef(e),i=S.useRef(n),[a,r]=S.useState(),[o,l]=S.useState(),s=S.useCallback(()=>{a&&a.reInit(t.current,i.current)},[a]);return S.useEffect(()=>{if(dwe()&&o){qg.globalOptions=M_.globalOptions;const d=qg(o,t.current,i.current);return r(d),()=>d.destroy()}else r(void 0)},[o,r]),S.useEffect(()=>{I_(t.current,e)||(t.current=e,s())},[e,s]),S.useEffect(()=>{cwe(i.current,n)||(i.current=n,s())},[n,s]),[l,a]}M_.globalOptions=void 0;const Vwe={context:"[@mantine/carousel] Carousel.Slide was rendered outside of Carousel context"},[Wwe,Hwe]=Ra(Vwe.context);var Uwe=Object.defineProperty,Ywe=Object.defineProperties,Gwe=Object.getOwnPropertyDescriptors,HI=Object.getOwnPropertySymbols,qwe=Object.prototype.hasOwnProperty,Kwe=Object.prototype.propertyIsEnumerable,UI=(e,n,t)=>n in e?Uwe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,hN=(e,n)=>{for(var t in n||(n={}))qwe.call(n,t)&&UI(e,t,n[t]);if(HI)for(var t of HI(n))Kwe.call(n,t)&&UI(e,t,n[t]);return e},Xwe=(e,n)=>Ywe(e,Gwe(n)),Qwe=me((e,{controlSize:n,controlsOffset:t,orientation:i,height:a,includeGapInSize:r,breakpoints:o=[],slideGap:l})=>{const s=i==="horizontal",d=f=>{if(!r)return{};const p=q({size:f,sizes:e.spacing});return{[i==="horizontal"?"marginRight":"marginBottom"]:`calc(${p} * -1)`}},u=o.some(f=>typeof f.slideGap<"u"||typeof f.slideSize<"u")?h_(e,o).reduce((f,p)=>{const h="maxWidth"in p?"max-width":"min-width",k=q({size:h==="max-width"?p.maxWidth:p.minWidth,sizes:e.breakpoints}),y=typeof p.slideGap>"u"?void 0:T(p.slideGap),g=Da(k)-(h==="max-width"?1:0);return f[`@media (${h}: ${T(g)})`]=d(y),f},{}):null;return{root:{position:"relative"},viewport:{height:T(a),overflow:"hidden"},container:hN(hN({display:"flex",flexDirection:s?"row":"column",height:T(a)},d(l)),u),controls:{position:"absolute",zIndex:1,left:s?0:`calc(50% - ${T(n)} / 2)`,right:s?0:void 0,top:s?`calc(50% - ${T(n)} / 2)`:0,bottom:s?void 0:0,display:"flex",flexDirection:s?"row":"column",alignItems:"center",justifyContent:"space-between",paddingLeft:s?q({size:t,sizes:e.spacing}):void 0,paddingRight:s?q({size:t,sizes:e.spacing}):void 0,paddingTop:s?void 0:q({size:t,sizes:e.spacing}),paddingBottom:s?void 0:q({size:t,sizes:e.spacing}),pointerEvents:"none"},control:Xwe(hN({display:"flex",justifyContent:"center",alignItems:"center",minWidth:T(n),minHeight:T(n),borderRadius:T(n),pointerEvents:"all",backgroundColor:e.white,color:e.black,boxShadow:e.shadows.md,opacity:e.colorScheme==="dark"?.65:.85,border:`${T(1)} solid ${e.colors.gray[3]}`,transition:`opacity 150ms ${e.transitionTimingFunction}`},e.fn.hover({opacity:1})),{"&:active":e.activeStyles}),indicators:{position:"absolute",bottom:s?e.spacing.md:0,top:s?void 0:0,left:s?0:void 0,right:s?0:e.spacing.md,display:"flex",flexDirection:s?"row":"column",justifyContent:"center",gap:T(8),pointerEvents:"none"},indicator:{pointerEvents:"all",width:T(s?25:5),height:T(s?5:25),borderRadius:e.radius.xl,backgroundColor:e.white,boxShadow:e.shadows.sm,opacity:.6,transition:`opacity 150ms ${e.transitionTimingFunction}`,"&[data-active]":{opacity:1}}}}),Zwe=Object.defineProperty,YI=Object.getOwnPropertySymbols,Jwe=Object.prototype.hasOwnProperty,e_e=Object.prototype.propertyIsEnumerable,GI=(e,n,t)=>n in e?Zwe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,vN=(e,n)=>{for(var t in n||(n={}))Jwe.call(n,t)&&GI(e,t,n[t]);if(YI)for(var t of YI(n))e_e.call(n,t)&&GI(e,t,n[t]);return e},n_e=me((e,{size:n,gap:t,orientation:i,includeGapInSize:a,breakpoints:r=[]})=>{const o=(d,c)=>{const u=q({size:d,sizes:e.spacing}),f=T(c),p=a?{[i==="horizontal"?"paddingRight":"paddingBottom"]:u}:{[i==="horizontal"?"marginRight":"marginBottom"]:u};return vN({flex:`0 0 ${f}`},p)},s=r.some(d=>typeof d.slideGap<"u"||typeof d.slideSize<"u")?h_(e,r).reduce((d,c)=>{const u="maxWidth"in c?"max-width":"min-width",f=q({size:u==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints}),p=typeof c.slideGap>"u"?t:c.slideGap,h=Da(f)-(u==="max-width"?1:0);return d[`@media (${u}: ${T(h)})`]=o(p,c.slideSize),d},{}):null;return{slide:vN(vN({position:"relative"},o(t,n)),s)}});const t_e=n_e;var i_e=Object.defineProperty,Kg=Object.getOwnPropertySymbols,q7=Object.prototype.hasOwnProperty,K7=Object.prototype.propertyIsEnumerable,qI=(e,n,t)=>n in e?i_e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,a_e=(e,n)=>{for(var t in n||(n={}))q7.call(n,t)&&qI(e,t,n[t]);if(Kg)for(var t of Kg(n))K7.call(n,t)&&qI(e,t,n[t]);return e},r_e=(e,n)=>{var t={};for(var i in e)q7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Kg)for(var i of Kg(e))n.indexOf(i)<0&&K7.call(e,i)&&(t[i]=e[i]);return t};const X7=S.forwardRef((e,n)=>{var t=e,{children:i,className:a,size:r,gap:o}=t,l=r_e(t,["children","className","size","gap"]);const s=Hwe(),{classes:d,cx:c}=t_e({gap:typeof o>"u"?s.slideGap:o,size:typeof r>"u"?s.slideSize:r,orientation:s.orientation,includeGapInSize:s.includeGapInSize,breakpoints:s.breakpoints},{name:"Carousel",classNames:s.classNames,styles:s.styles,unstyled:s.unstyled,variant:s.variant});return b.createElement(xe,a_e({className:c(d.slide,a),ref:n},l),i)});X7.displayName="@mantine/carousel/CarouselSlide";function KI({dir:e,orientation:n,direction:t}){return t==="previous"?n==="horizontal"?90*(e==="ltr"?1:-1):-180:n==="horizontal"?90*(e==="ltr"?-1:1):0}var o_e=Object.defineProperty,Xg=Object.getOwnPropertySymbols,Q7=Object.prototype.hasOwnProperty,Z7=Object.prototype.propertyIsEnumerable,XI=(e,n,t)=>n in e?o_e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,l_e=(e,n)=>{for(var t in n||(n={}))Q7.call(n,t)&&XI(e,t,n[t]);if(Xg)for(var t of Xg(n))Z7.call(n,t)&&XI(e,t,n[t]);return e},s_e=(e,n)=>{var t={};for(var i in e)Q7.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&Xg)for(var i of Xg(e))n.indexOf(i)<0&&Z7.call(e,i)&&(t[i]=e[i]);return t};const d_e={controlSize:26,controlsOffset:"sm",slideSize:"100%",slideGap:0,orientation:"horizontal",align:"center",slidesToScroll:1,includeGapInSize:!0,draggable:!0,dragFree:!1,loop:!1,speed:10,initialSlide:0,inViewThreshold:0,withControls:!0,withIndicators:!1,skipSnaps:!1,containScroll:"",withKeyboardEvents:!0},L_=S.forwardRef((e,n)=>{const t=ae("Carousel",d_e,e),{children:i,className:a,getEmblaApi:r,onNextSlide:o,onPreviousSlide:l,onSlideChange:s,nextControlLabel:d,previousControlLabel:c,controlSize:u,controlsOffset:f,classNames:p,styles:h,unstyled:k,slideSize:y,slideGap:g,orientation:v,height:N,align:x,slidesToScroll:F,includeGapInSize:_,draggable:w,dragFree:C,loop:$,speed:E,initialSlide:j,inViewThreshold:D,withControls:M,withIndicators:R,plugins:I,nextControlIcon:L,previousControlIcon:B,breakpoints:O,skipSnaps:P,containScroll:A,withKeyboardEvents:V,variant:U}=t,oe=s_e(t,["children","className","getEmblaApi","onNextSlide","onPreviousSlide","onSlideChange","nextControlLabel","previousControlLabel","controlSize","controlsOffset","classNames","styles","unstyled","slideSize","slideGap","orientation","height","align","slidesToScroll","includeGapInSize","draggable","dragFree","loop","speed","initialSlide","inViewThreshold","withControls","withIndicators","plugins","nextControlIcon","previousControlIcon","breakpoints","skipSnaps","containScroll","withKeyboardEvents","variant"]),{classes:G,cx:ne,theme:Z}=Qwe({controlSize:u,controlsOffset:f,orientation:v,height:N,includeGapInSize:_,breakpoints:O,slideGap:g},{name:"Carousel",classNames:p,styles:h,unstyled:k,variant:U}),[ce,ie]=M_({axis:v==="horizontal"?"x":"y",direction:v==="horizontal"?Z.dir:void 0,startIndex:j,loop:$,align:x,slidesToScroll:F,draggable:w,dragFree:C,speed:E,inViewThreshold:D,skipSnaps:P,containScroll:A},I),[ve,he]=S.useState(0),[ge,K]=S.useState(0),de=S.useCallback(ee=>ie&&ie.scrollTo(ee),[ie]),be=S.useCallback(()=>{if(!ie)return;const ee=ie.selectedScrollSnap();he(ee),s==null||s(ee)},[ie,he]),Ee=S.useCallback(()=>{ie==null||ie.scrollPrev(),l==null||l()},[ie]),Qe=S.useCallback(()=>{ie==null||ie.scrollNext(),o==null||o()},[ie]),$e=S.useCallback(ee=>{V&&(ee.key==="ArrowRight"&&(ee.preventDefault(),Qe()),ee.key==="ArrowLeft"&&(ee.preventDefault(),Ee()))},[ie]);S.useEffect(()=>{if(ie)return r==null||r(ie),be(),K(ie.scrollSnapList().length),ie.on("select",be),()=>{ie.off("select",be)}},[ie,F]),S.useEffect(()=>{ie&&(ie.reInit(),K(ie.scrollSnapList().length),he(ee=>Eu(ee,0,S.Children.toArray(i).length-1)))},[S.Children.toArray(i).length,F]);const z=(ie==null?void 0:ie.canScrollPrev())||!1,H=(ie==null?void 0:ie.canScrollNext())||!1,W=Array(ge).fill(0).map((ee,J)=>b.createElement(fi,{key:J,"data-active":J===ve||void 0,className:G.indicator,"aria-hidden":!0,tabIndex:-1,onClick:()=>de(J)}));return b.createElement(Wwe,{value:{slideGap:g,slideSize:y,embla:ie,orientation:v,includeGapInSize:_,breakpoints:O,classNames:p,styles:h,unstyled:k,variant:U}},b.createElement(xe,l_e({className:ne(G.root,a),ref:n,onKeyDownCapture:$e},oe),b.createElement("div",{className:G.viewport,ref:ce},b.createElement("div",{className:G.container},i)),R&&b.createElement("div",{className:G.indicators},W),M&&b.createElement("div",{className:G.controls},b.createElement(fi,{onClick:Ee,className:G.control,"aria-label":c,"data-inactive":!z||void 0,tabIndex:z?0:-1},typeof B<"u"?B:b.createElement(hm,{style:{transform:`rotate(${KI({dir:Z.dir,orientation:v,direction:"previous"})}deg)`}})),b.createElement(fi,{onClick:Qe,className:G.control,"aria-label":d,"data-inactive":!H||void 0,tabIndex:H?0:-1},typeof L<"u"?L:b.createElement(hm,{style:{transform:`rotate(${KI({dir:Z.dir,orientation:v,direction:"next"})}deg)`}})))))});L_.Slide=X7;L_.displayName="@mantine/carousel/Carousel";const QI=L_,c_e=({chargeProps:e})=>{const{additionalDocuments:n}=Se(bve,e),[t,i]=S.useState(void 0);return m.jsx("div",{className:"container mx-auto text-gray-600 body-font",children:(n==null?void 0:n.length)>0?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"flex flex-wrap",children:m.jsx(QI,{sx:{maxWidth:320},mx:"auto",align:"center",withControls:n.length>1,slideGap:0,withIndicators:!0,className:"[&>*>.mantine-Carousel-indicator]:bg-gray-500",children:n.map(a=>{var r;return m.jsx(QI.Slide,{children:m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("h2",{className:"text-gray-900 text-base font-medium",children:"documentType"in a?a.documentType:"Unprocessed"}),m.jsx("button",{className:"mx-10",onClick:()=>i(a.id),children:m.jsx("div",{className:"flex rounded-lg h-full bg-gray-100 p-2 m-2 flex-col",children:m.jsx(hc,{src:(r=a.image)==null?void 0:r.toString(),withPlaceholder:!0})})})]})},a.id)})})}),m.jsx(M7,{documentId:t,onDone:()=>i(void 0)})]}):m.jsx(nk,{color:"red",children:"No Documents Related"})})},u_e=({data:e})=>{const n=Se(Fve,e),t="date"in n?n.date:void 0,i=t?en(new Date(t),"dd/MM/yy"):"Missing Data";return m.jsx("td",{children:m.jsx(Kn,{inline:!0,size:12,disabled:!!t,color:"red",zIndex:"auto",children:m.jsx("div",{children:i})})})},m_e=({data:e,refetchDocument:n})=>{var c;const t=Se(xve,e),i="amount"in t?t.amount:void 0,a="missingInfoSuggestions"in t?(c=t.missingInfoSuggestions)==null?void 0:c.amount:void 0,r=!i&&!!a,o=i??a,{updateDocument:l,fetching:s}=yc(),d=S.useCallback(u=>{u!==void 0&&l({documentId:t.id,fields:{amount:{raw:u.raw,currency:u.currency}}}).then(n)},[t.id,l,n]);return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-wrap",children:[m.jsx("div",{className:"flex flex-col justify-center",children:m.jsx(Kn,{inline:!0,size:12,disabled:(o==null?void 0:o.formatted)!=null,color:"red",zIndex:"auto",children:m.jsx("p",{style:{color:Number(o==null?void 0:o.raw)>0?"green":"red",whiteSpace:"nowrap",backgroundColor:r?"rgb(236, 207, 57)":void 0},children:o==null?void 0:o.formatted})})}),r&&m.jsx(vc,{onClick:()=>d(a),disabled:s})]})})},f_e=({data:e})=>{const n=Se(wve,e),t="vat"in n?n.vat:void 0;return m.jsx("td",{children:m.jsx(Kn,{inline:!0,size:12,disabled:(t==null?void 0:t.formatted)!=null,color:"red",zIndex:"auto",children:m.jsx("div",{style:{color:Number(t==null?void 0:t.raw)>0?"green":"red",whiteSpace:"nowrap"},children:t==null?void 0:t.formatted})})})},J7=(e,n)=>{const t=n?JSON.parse(decodeURIComponent(n)):{},i={fromDate:t.fromDate?`%252C%2522fromDate%2522%253A%2522${t.fromDate}%2522`:"",toDate:t.toDate?`%252C%2522toDate%2522%253A%2522${t.toDate}%2522`:"",ownerIds:t.byOwners&&t.byOwners.length>0?`%2522${t.byOwners.join("%2522%252C%2522")}%2522`:""};return`/business-transactions?transactionsFilters=%257B%2522ownerIds%2522%253A%255B${i.ownerIds}%255D%252C%2522businessIDs%2522%253A%255B%2522${encodeURIComponent(e)}%2522%255D${i.fromDate}${i.toDate}%257D`},p_e=({data:e,refetchDocument:n})=>{const{get:t}=kt(),i=Se(Pve,e),a="creditor"in i?i.creditor:void 0,r=!(a!=null&&a.id)||[Ki.Unprocessed].includes(i.documentType),o=t("chargesFilters"),l=S.useCallback(y=>J7(y,o),[o]),s=S.useMemo(()=>{var v,N;if(a||!("missingInfoSuggestions"in i)||!i.missingInfoSuggestions)return;const y=i.missingInfoSuggestions.owner,g=i.missingInfoSuggestions.counterparty;if(((v=i.missingInfoSuggestions)==null?void 0:v.isIncome)==null){if((N=i.debtor)!=null&&N.id){const x=i.debtor.id;if((y==null?void 0:y.id)===x&&g)return g;if((g==null?void 0:g.id)===x&&y)return y}}else{if(i.missingInfoSuggestions.isIncome&&y)return y;if(!i.missingInfoSuggestions.isIncome&&g)return g}},[i,a]),d=!a&&!!s,c=a??s,{updateDocument:u,fetching:f}=yc(),p=S.useCallback(y=>{y!==void 0&&u({documentId:i.id,fields:{creditorId:y}}).then(n)},[i.id,u,n]),{name:h="Missing",id:k}=c||{};return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-wrap",children:[m.jsx("div",{className:"flex flex-col justify-center",children:m.jsxs(Kn,{inline:!0,size:12,disabled:!r,color:"red",zIndex:"auto",children:[!r&&m.jsx("a",{href:l(k),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:h,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),r&&m.jsx("p",{style:{backgroundColor:"rgb(236, 207, 57)"},children:h})]})}),d&&m.jsx(vc,{onClick:()=>p(s.id),disabled:f})]})})},h_e=({data:e,refetchDocument:n})=>{const{get:t}=kt(),i=Se(Ove,e),a="debtor"in i?i.debtor:void 0,r=!(a!=null&&a.id)||[Ki.Unprocessed].includes(i.documentType),o=t("chargesFilters"),l=S.useCallback(y=>J7(y,o),[o]),s=S.useMemo(()=>{var v,N;if(a||!("missingInfoSuggestions"in i)||!i.missingInfoSuggestions)return;const y=i.missingInfoSuggestions.owner,g=i.missingInfoSuggestions.counterparty;if(((v=i.missingInfoSuggestions)==null?void 0:v.isIncome)==null){if((N=i.creditor)!=null&&N.id){const x=i.creditor.id;if((y==null?void 0:y.id)===x&&g)return g;if((g==null?void 0:g.id)===x&&y)return y}}else{if(i.missingInfoSuggestions.isIncome&&g)return g;if(!i.missingInfoSuggestions.isIncome&&y)return y}},[i,a]),d=!a&&!!s,c=a??s,{updateDocument:u,fetching:f}=yc(),p=S.useCallback(y=>{y!==void 0&&u({documentId:i.id,fields:{debtorId:y}}).then(n)},[i.id,u,n]),{name:h="Missing",id:k}=c||{};return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-wrap",children:[m.jsx("div",{className:"flex flex-col justify-center",children:m.jsxs(Kn,{inline:!0,size:12,disabled:!r,color:"red",zIndex:"auto",children:[!r&&m.jsx("a",{href:l(k),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:h,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),r&&m.jsx("p",{style:{backgroundColor:"rgb(236, 207, 57)"},children:h})]})}),d&&m.jsx(vc,{onClick:()=>p(s.id),disabled:f})]})})},v_e=({data:e})=>{const{documentType:n}=Se(_ve,e),t=!n||n===Ki.Unprocessed,i=n??"Missing";return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:m.jsx("div",{className:"flex flex-col justify-center",children:m.jsx(Kn,{inline:!0,size:12,disabled:!t,color:"red",zIndex:"auto",children:m.jsx("p",{children:i})})})})})},k_e=({data:e})=>{const n=Se(Cve,e),t="serialNumber"in n?n.serialNumber:void 0;return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:m.jsx("div",{className:"flex flex-col justify-center",children:m.jsx(Kn,{inline:!0,size:12,disabled:!!t,color:"red",zIndex:"auto",children:m.jsx("p",{children:t})})})})})},g_e=({data:e})=>{const{image:n,file:t}=Se(Dve,e),[i,a]=S.useState(!1);return m.jsxs("td",{children:[m.jsx("div",{className:"flex flex-wrap",children:m.jsx("div",{className:"flex flex-col justify-center",children:m.jsxs(kS,{cols:1,children:[m.jsx(tt,{disabled:!n,label:"Open Image",children:m.jsx(Kn,{inline:!0,size:12,disabled:!!n,color:"red",zIndex:"auto",children:m.jsx(Pe,{disabled:!n,onClick:()=>a(!!n),children:m.jsx(A5,{size:20})})})}),m.jsx(tt,{disabled:!t,label:"Open File",children:m.jsx(Kn,{inline:!0,size:12,disabled:!!t,color:"red",zIndex:"auto",children:t?m.jsx("a",{href:typeof t=="string"?t:t.href,target:"_blank",rel:"noreferrer",children:m.jsx(Pe,{children:m.jsx(ZC,{size:20})})}):m.jsx(Pe,{disabled:!0,children:m.jsx(ZC,{size:20})})})})]})})}),n&&m.jsx(La,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:i,onClose:()=>a(!1),size:"30%",children:m.jsx("div",{className:"m-2",children:m.jsx(k7,{src:n.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})},y_e=({documentData:e,editDocument:n})=>{const[t,i]=S.useState(Se(V0,e)),[{data:a},r]=Be({query:wke,pause:!0,variables:{documentId:t.id}}),o=S.useCallback(()=>{r()},[r]);return S.useEffect(()=>{const l=a==null?void 0:a.documentById;l&&i(Se(V0,l))},[a]),S.useEffect(()=>{i(Se(V0,e))},[e]),m.jsxs("tr",{children:[m.jsx(u_e,{data:t}),m.jsx(m_e,{data:t,refetchDocument:()=>o()}),m.jsx(f_e,{data:t}),m.jsx(v_e,{data:t}),m.jsx(k_e,{data:t}),m.jsx(p_e,{data:t,refetchDocument:()=>o()}),m.jsx(h_e,{data:t,refetchDocument:()=>o()}),m.jsx(g_e,{data:t}),m.jsx("td",{children:m.jsx(yS,{onClick:n,tooltip:"Edit Document"})})]},t.id)},S_e=({documentsProps:e})=>{const{additionalDocuments:n}=Se(Eve,e),[t,i]=S.useState(void 0);return m.jsxs(m.Fragment,{children:[m.jsxs("table",{className:"w-full h-full",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"VAT"}),m.jsx("th",{children:"Type"}),m.jsx("th",{children:"Serial"}),m.jsx("th",{children:"Creditor"}),m.jsx("th",{children:"Debtor"}),m.jsx("th",{children:"files"}),m.jsx("th",{children:"Edit"})]})}),m.jsx("tbody",{children:n==null?void 0:n.map(a=>m.jsx(y_e,{documentData:a,editDocument:()=>i(a.id)},a.id))})]}),m.jsx(M7,{documentId:t,onDone:()=>i(void 0)})]})},N_e=({chargeProps:e})=>{const{eventRate:n,officialRate:t}=Se($ve,e);return m.jsxs($u,{justify:"center",children:[t&&m.jsx($u.Col,{span:"content",children:m.jsx(kx,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:m.jsxs(Ok,{position:"apart",children:[m.jsx(Ri,{weight:500,children:"Official Conversion Rate"}),m.jsx(nk,{color:"green",variant:"light",children:`${Number(t.rate)} ${cp(t.from)} => ${cp(t.to)}`})]})})}),n&&m.jsx($u.Col,{span:"content",children:m.jsx(kx,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:m.jsxs(Ok,{position:"apart",children:[m.jsx(Ri,{weight:500,children:"Bank Conversion Rate"}),m.jsx(nk,{color:"green",variant:"light",children:`${Number(n.rate)} ${cp(n.from)} => ${cp(n.to)}`})]})})})]})},b_e=({salaryRecordsProps:e})=>{const{salaryRecords:n}=Se(Ive,e);return m.jsxs("table",{className:"w-full h-full",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Employee"}),m.jsx("th",{children:"Direct Salary"}),m.jsx("th",{children:"Base Salary"}),m.jsx("th",{children:"Pension"}),m.jsx("th",{children:"Training Fund"}),m.jsx("th",{children:"Social Security"}),m.jsx("th",{children:"Tax"})]})}),m.jsx("tbody",{children:n==null?void 0:n.map(t=>{var i,a,r,o,l,s,d,c,u,f,p,h,k,y;return m.jsxs("tr",{children:[m.jsx("td",{children:m.jsx("div",{children:((i=t.employee)==null?void 0:i.name)??"Missing"})}),m.jsx("td",{children:m.jsx("div",{children:t.directAmount.formatted})}),m.jsx("td",{children:m.jsx("div",{children:(a=t.baseAmount)==null?void 0:a.formatted})}),m.jsxs("td",{children:[m.jsx("div",{children:(r=t.pensionFund)==null?void 0:r.name}),m.jsxs("div",{children:["Employee: ",(o=t.pensionEmployeeAmount)==null?void 0:o.formatted]}),m.jsxs("div",{children:["Employer: ",(l=t.pensionEmployerAmount)==null?void 0:l.formatted]}),m.jsxs("div",{children:["Compensation: ",(s=t.compensationsAmount)==null?void 0:s.formatted]})]}),m.jsxs("td",{children:[m.jsx("div",{children:(d=t.trainingFund)==null?void 0:d.name}),m.jsxs("div",{children:["Employee: ",(c=t.trainingFundEmployeeAmount)==null?void 0:c.formatted]}),m.jsxs("div",{children:["Employer: ",(u=t.trainingFundEmployerAmount)==null?void 0:u.formatted]})]}),m.jsxs("td",{children:[m.jsxs("div",{children:["Employee: ",(f=t.socialSecurityEmployeeAmount)==null?void 0:f.formatted]}),m.jsxs("div",{children:["Employer: ",(p=t.socialSecurityEmployerAmount)==null?void 0:p.formatted]}),m.jsxs("div",{children:["Health: ",(h=t.healthInsuranceAmount)==null?void 0:h.formatted]})]}),m.jsx("td",{children:m.jsx("div",{children:(k=t.incomeTaxAmount)==null?void 0:k.formatted})})]},`${(y=t.employee)==null?void 0:y.name}-${t.baseAmount}`)})})]})},yp=({data:e,diff:n,cred:t,first:i})=>{const{get:a}=kt(),{creditAccount1:r,creditAccount2:o,debitAccount1:l,debitAccount2:s,creditAmount1:d,creditAmount2:c,debitAmount1:u,debitAmount2:f,localCurrencyCreditAmount1:p,localCurrencyCreditAmount2:h,localCurrencyDebitAmount1:k,localCurrencyDebitAmount2:y}=Se(r$,e),g=t?i?r:o:i?l:s,v=t?i?p:h:i?k:y,N=t?i?d:c:i?u:f,x=N!=null&&N.currency!=="ILS",F=a("chargesFilters"),_=S.useCallback(G=>{const ne=F?JSON.parse(decodeURIComponent(F)):{},Z={fromDate:ne.fromDate?`%252C%2522fromDate%2522%253A%2522${ne.fromDate}%2522`:"",toDate:ne.toDate?`%252C%2522toDate%2522%253A%2522${ne.toDate}%2522`:"",financialEntityIds:ne.byOwners&&ne.byOwners.length>0?`%2522${ne.byOwners.join("%2522%252C%2522")}%2522`:""};return`/business-transactions?transactionsFilters=%257B%2522ownerIds%2522%253A%255B${Z.financialEntityIds}%255D%252C%2522businessIDs%2522%253A%255B%2522${encodeURIComponent(G)}%2522%255D${Z.fromDate}${Z.toDate}%257D`},[F]),{creditAccount1:w,creditAccount2:C,debitAccount1:$,debitAccount2:E,creditAmount1:j,creditAmount2:D,debitAmount1:M,debitAmount2:R,localCurrencyCreditAmount1:I,localCurrencyCreditAmount2:L,localCurrencyDebitAmount1:B,localCurrencyDebitAmount2:O}=Se(r$,n)??{},P=t?i?w:C:i?$:E,A=t?i?I:L:i?B:O,V=t?i?j:D:i?M:R,U=N!=null&&N.currency!=="ILS",oe=(P==null?void 0:P.id)!==(g==null?void 0:g.id)||(A==null?void 0:A.formatted)!==(v==null?void 0:v.formatted)||(V==null?void 0:V.formatted)!==(N==null?void 0:N.formatted);return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col",children:[g&&m.jsxs(m.Fragment,{children:[m.jsx("a",{href:_(g==null?void 0:g.id),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:g==null?void 0:g.name,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),x&&m.jsx("p",{children:N.formatted}),v!=null&&m.jsx("p",{children:v.formatted})]}),oe&&(P==null?void 0:P.name)&&m.jsxs("div",{className:"border-2 border-red-500 rounded-md",children:[m.jsx("a",{href:_(P==null?void 0:P.id),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:P==null?void 0:P.name,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),U&&m.jsx("p",{children:V==null?void 0:V.formatted}),A!=null&&m.jsx("p",{children:A==null?void 0:A.formatted})]})]})})},ZI=({data:e,diff:n,type:t})=>{const{invoiceDate:i,valueDate:a}=Se(o$,e),r=t===1?i:a,o=r?en(new Date(r),"dd/MM/yy"):void 0,{invoiceDate:l,valueDate:s}=Se(o$,n)??{},d=t===1?l:s,c=d?en(new Date(d),"dd/MM/yy"):void 0;return m.jsxs("td",{children:[o??"Missing Data",d&&r!==d&&m.jsx("div",{className:"flex flex-col border-2 border-red-500 rounded-md",children:c})]})},JI=({ledgerRecordProps:e,diffs:n,matchingStatus:t})=>{const i=Se(l$,e),a=Se(l$,n);return t==="Diff"&&!a&&(t="Deleted"),m.jsxs("tr",{children:[m.jsx(ZI,{data:i,diff:a,type:1}),m.jsx(ZI,{data:i,diff:a,type:2}),m.jsx(yp,{data:i,diff:a,cred:!1,first:!0}),m.jsx(yp,{data:i,diff:a,cred:!0,first:!0}),m.jsx(yp,{data:i,diff:a,cred:!1,first:!1}),m.jsx(yp,{data:i,diff:a,cred:!0,first:!1}),m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col",children:[i.description,(a==null?void 0:a.description)&&(a==null?void 0:a.description)!==i.description&&m.jsx("div",{className:"border-2 border-red-500 rounded-md",children:a==null?void 0:a.description})]})}),m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col",children:[i.reference1,(a==null?void 0:a.reference1)&&(a==null?void 0:a.reference1)!==i.reference1&&m.jsx("div",{className:"border-2 border-red-500 rounded-md",children:a==null?void 0:a.reference1})]})}),m.jsx("td",{children:!!t&&m.jsx(nk,{variant:"filled",color:t==="Deleted"?"red":"green",children:t})})]},i.id)},x_e=({ledgerRecordsProps:e})=>{var t,i,a;const{ledger:n}=Se(jve,e);return m.jsxs("table",{className:"w-full h-full",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Invoice Date"}),m.jsx("th",{children:"Value Date"}),m.jsx("th",{children:"Debit Account1"}),m.jsx("th",{children:"Credit Account1"}),m.jsx("th",{children:"Debit Account2"}),m.jsx("th",{children:"Credit Account2"}),m.jsx("th",{children:"Details"}),m.jsx("th",{children:"Ref1"}),m.jsx("th",{})]})}),m.jsxs("tbody",{children:[(t=n==null?void 0:n.records)==null?void 0:t.map(r=>{var o,l,s,d;return m.jsx(JI,{ledgerRecordProps:r,matchingStatus:(l=(o=n.validate)==null?void 0:o.matches)!=null&&l.some(c=>c===r.id)?void 0:"Diff",diffs:(d=(s=n.validate)==null?void 0:s.differences)==null?void 0:d.find(c=>c.id===r.id)},r.id)}),(a=(i=n==null?void 0:n.validate)==null?void 0:i.differences)==null?void 0:a.filter(r=>r.id===bS).map(r=>m.jsx(JI,{ledgerRecordProps:r,matchingStatus:"New"},r.id)),m.jsx("tr",{children:m.jsx("td",{colSpan:8})})]})]})},F_e=({data:e})=>{const n=Se(Ave,e),t="effectiveDate"in n?n.effectiveDate:void 0;return m.jsx("td",{children:m.jsx("div",{children:t&&en(new Date(t),"dd/MM/yy")})})},w_e=({data:e})=>{const n=Se(Tve,e),t="eventDate"in n?n.eventDate:void 0;return m.jsx("td",{children:m.jsx("div",{children:t&&en(new Date(t),"dd/MM/yy")})})},__e=({data:e})=>{const n=Se(Rve,e),t="amount"in n?n.amount:void 0;return m.jsx("td",{children:m.jsxs("div",{style:{color:Number(t==null?void 0:t.raw)>0?"green":"red",whiteSpace:"nowrap"},children:[t==null?void 0:t.formatted,m.jsx("br",{}),n.cryptoExchangeRate&&m.jsxs("span",{style:{color:"gray",marginLeft:"0.5rem"},children:[`(Rate: ${n.cryptoExchangeRate.rate})`,m.jsx("br",{}),t!=null&&t.raw?`${Tn(t.raw*n.cryptoExchangeRate.rate)}$`:null]})]})})},C_e=({data:e})=>{const n=Se(Mve,e),{account:t}=n,i=t.type,a=t.name;return m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col gap-2 items-center",children:[m.jsx("p",{children:i}),m.jsx("p",{children:a})]})})},P_e=({data:e})=>{const n=Se(Lve,e),t="sourceDescription"in n?n.sourceDescription:"Missing";return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:m.jsx("div",{className:"flex flex-col justify-center",children:t})})})},O_e=({data:e})=>{const n=Se(zve,e);return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:m.jsx("div",{className:"flex flex-col justify-center",children:n.referenceKey})})})};function D_e({data:e}){var y,g;const{get:n}=kt(),{counterparty:t,missingInfoSuggestions:i,id:a}=Se(Bve,e),r=!!(i!=null&&i.business),o=r?(y=i==null?void 0:i.business)==null?void 0:y.name:"Missing",l=r?(g=i==null?void 0:i.business)==null?void 0:g.id:null,s=(t==null?void 0:t.name)??o,d=(t==null?void 0:t.id)??l,{updateTransaction:c,fetching:u}=w_(),f=S.useCallback(v=>{c({transactionId:a,fields:{counterpartyId:v}})},[a,c]),p=n("chargesFilters"),h=S.useCallback(v=>{const N=p?JSON.parse(decodeURIComponent(p)):{},x={fromDate:N.fromDate?`%252C%2522fromDate%2522%253A%2522${N.fromDate}%2522`:"",toDate:N.toDate?`%252C%2522toDate%2522%253A%2522${N.toDate}%2522`:"",financialEntityIds:N.byOwners&&N.byOwners.length>0?`%2522${N.byOwners.join("%2522%252C%2522")}%2522`:""};return`/business-transactions?transactionsFilters=%257B%2522ownerIds%2522%253A%255B${x.financialEntityIds}%255D%252C%2522businessIDs%2522%253A%255B%2522${encodeURIComponent(v)}%2522%255D${x.fromDate}${x.toDate}%257D`},[p]),k=m.jsx("p",{style:r?{backgroundColor:"rgb(236, 207, 57)"}:{},children:s});return m.jsx("td",{children:m.jsx("div",{className:"flex flex-wrap",children:d&&m.jsxs(m.Fragment,{children:[m.jsx("a",{href:h(d),target:"_blank",rel:"noreferrer",children:m.jsx(Hd,{label:k,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),r&&m.jsx(vc,{onClick:()=>f(i.business.id),disabled:u})]})})})}const E_e=({transactionsProps:e})=>{const{transactions:n}=Se(Vve,e),[t,i]=S.useState(void 0);return m.jsxs(m.Fragment,{children:[m.jsxs("table",{className:"w-full h-full",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Event Date"}),m.jsx("th",{children:"Debit Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Account"}),m.jsx("th",{children:"Description"}),m.jsx("th",{children:"Reference#"}),m.jsx("th",{children:"Counterparty"}),m.jsx("th",{children:"Edit"})]})}),m.jsx("tbody",{children:n==null?void 0:n.map(a=>m.jsxs("tr",{children:[m.jsx(w_e,{data:a}),m.jsx(F_e,{data:a}),m.jsx(__e,{data:a}),m.jsx(C_e,{data:a}),m.jsx(P_e,{data:a}),m.jsx(O_e,{data:a}),m.jsx(D_e,{data:a}),m.jsx("td",{children:m.jsx(yS,{onClick:()=>i(a.id)})})]},a.id))})]}),m.jsx(AFe,{transactionID:t,setEditTransaction:i})]})};function z_({chargeID:e}){var u,f,p,h,k;const[n,{toggle:t}]=tl(!1),[{data:i,fetching:a}]=Be({query:Fke,variables:{chargeIDs:[e]}}),r=(u=i==null?void 0:i.chargesByIDs)==null?void 0:u[0],o=!!((f=r==null?void 0:r.ledger)!=null&&f.records&&r.ledger.records.length>0),l=!!((p=r==null?void 0:r.metadata)!=null&&p.transactionsCount),s=!!((h=r==null?void 0:r.metadata)!=null&&h.documentsCount),d=(((k=r==null?void 0:r.tags)==null?void 0:k.map(y=>y.name))??[]).includes("salary"),c=()=>{const y=[];return l&&y.push("transactions"),s&&y.push("documents"),o&&y.push("ledger"),d&&y.push("salaries"),y};return m.jsxs("div",{className:"flex flex-col gap-5",children:[a&&m.jsx(ti,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),!a&&r&&m.jsxs("div",{className:"flex flex-row gap-5",children:[m.jsxs(Zn,{className:"w-full",multiple:!0,defaultValue:c(),chevron:m.jsx(Dq,{size:"1rem"}),styles:{chevron:{"&[data-rotate]":{transform:"rotate(45deg)"}}},children:[r.__typename==="ConversionCharge"&&m.jsxs(Zn.Item,{value:"conversion",children:[m.jsx(Zn.Control,{disabled:!l,children:"Conversion Info"}),m.jsx(Zn.Panel,{children:m.jsx(N_e,{chargeProps:r})})]}),m.jsxs(Zn.Item,{value:"transactions",children:[m.jsx(Zn.Control,{disabled:!l,children:"Transactions"}),m.jsx(Zn.Panel,{children:m.jsx(E_e,{transactionsProps:r})})]}),m.jsxs(Zn.Item,{value:"documents",children:[m.jsxs("div",{className:"flex flex-row items-center pl-2 justify-between w-full",children:[s&&m.jsx(tt,{label:"Documents Gallery",children:m.jsx(Pe,{onClick:t,variant:"outline",children:m.jsx(A5,{size:20})})}),m.jsx(Zn.Control,{disabled:!s,children:"Documents"})]}),m.jsx(Zn.Panel,{children:m.jsx(S_e,{documentsProps:r})})]}),r.__typename==="SalaryCharge"&&m.jsxs(Zn.Item,{value:"salaries",children:[m.jsx(Zn.Control,{disabled:!d,children:"Salaries"}),m.jsx(Zn.Panel,{children:m.jsx(b_e,{salaryRecordsProps:r})})]}),m.jsxs(Zn.Item,{value:"ledger",children:[m.jsxs("div",{className:"flex flex-row items-center pl-2 justify-between w-full",children:[m.jsx(Aye,{chargeId:r.id,variant:"outline"}),m.jsx(Zn.Control,{disabled:!o,children:"Ledger Records"})]}),m.jsx(Zn.Panel,{children:m.jsx(x_e,{ledgerRecordsProps:r})})]})]}),m.jsx(xe,{maw:"1/6",children:m.jsx(oS,{in:n,transitionDuration:500,transitionTimingFunction:"linear",children:m.jsx(c_e,{chargeProps:r})})})]}),!a&&!r&&m.jsx("p",{children:"Error fetching extended information for this charge"})]})}function $_e({chargeId:e,setInsertDocument:n,setMatchDocuments:t,setUploadDocument:i}){const{deleteCharge:a}=dye(),[r,o]=S.useState(!1),[l,s]=S.useState(!1);function d(){a({chargeId:e}),s(!1)}function c(){o(!1)}return m.jsxs(m.Fragment,{children:[m.jsx(gs,{opened:l,onClose:()=>s(!1),onConfirm:d,title:"Are you sure you want to delete this charge?"}),m.jsxs(zt,{shadow:"md",width:200,opened:r,children:[m.jsx(zt.Target,{children:m.jsx(lz,{opened:r,onClick:()=>o(u=>!u)})}),m.jsxs(zt.Dropdown,{children:[m.jsx(zt.Label,{children:"Charge"}),m.jsx(zt.Item,{icon:m.jsx(L5,{size:14}),onClick:()=>{s(!0),c()},children:"Delete Charge"}),m.jsx(zt.Divider,{}),m.jsx(zt.Label,{children:"Documents"}),m.jsx(zt.Item,{icon:m.jsx(Fw,{size:14}),onClick:()=>{n(),c()},children:"Insert Document"}),m.jsx(zt.Item,{icon:m.jsx(hq,{size:14}),onClick:()=>{i(),c()},children:"Upload Document"}),m.jsx(zt.Item,{icon:m.jsx(zq,{size:14}),onClick:()=>{t(),c()},children:"Match Document"})]})]})]})}const I_e=({setEditCharge:e,setInsertDocument:n,setMatchDocuments:t,setUploadDocument:i,toggleMergeCharge:a,isSelectedForMerge:r,data:o,isAllOpened:l})=>{var y,g;const[s,d]=S.useState(!1),[c,u]=S.useState(Se(W0,o)),[{data:f},p]=Be({query:xke,pause:!0,variables:{chargeIDs:[o.id]}}),h=S.useCallback(()=>{p()},[p]);S.useEffect(()=>{var N;const v=(N=f==null?void 0:f.chargesByIDs)==null?void 0:N[0];v&&u(Se(W0,v))},[f]),S.useEffect(()=>{u(Se(W0,o))},[o]),S.useEffect(()=>{d(l)},[l]);const k=!!((y=c.metadata)!=null&&y.documentsCount||(g=c.metadata)!=null&&g.transactionsCount);return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{children:[m.jsx(owe,{data:c}),m.jsx(ewe,{data:c}),m.jsx(QFe,{data:c}),m.jsx(lwe,{data:c}),m.jsx(JFe,{data:c}),m.jsx(nwe,{data:c}),m.jsx(awe,{data:c}),m.jsx(rwe,{data:c}),m.jsx(ZFe,{data:c}),m.jsx(twe,{data:c}),m.jsx(XFe,{data:c}),m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(yS,{onClick:e}),a&&m.jsx(F_,{toggleMergeSelected:()=>a(),mergeSelected:r})]})}),m.jsx("td",{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx($_e,{chargeId:c.id,setInsertDocument:n,setMatchDocuments:t,setUploadDocument:i}),k&&m.jsx(x_,{toggleExpansion:d,isExpanded:s,onClickAction:v=>{v&&h()}})]})})]}),k&&s&&m.jsx("tr",{children:m.jsx("td",{colSpan:13,children:m.jsx(vs,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:m.jsx(z_,{chargeID:c.id})})})})]})},CS=({setEditChargeId:e,setInsertDocument:n,setMatchDocuments:t,setUploadDocument:i,toggleMergeCharge:a,mergeSelectedCharges:r,data:o,isAllOpened:l})=>{const s=(o==null?void 0:o.map(d=>Se(oke,d)))??[];return m.jsxs(al,{striped:!0,highlightOnHover:!0,children:[m.jsx("thead",{className:"sticky top-0 z-20",children:m.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[m.jsx("th",{children:"Type"}),m.jsx("th",{children:"Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Vat"}),m.jsx("th",{children:"Counterparty"}),m.jsx("th",{children:"Description"}),m.jsx("th",{children:"Tags"}),m.jsx("th",{children:"Tax Category"}),m.jsx("th",{children:"Business Trip"}),m.jsx("th",{children:"More Info"}),m.jsx("th",{children:"Accountant Approval"}),m.jsx("th",{children:"Edit"}),m.jsx("th",{children:"More Info"})]})}),m.jsx("tbody",{children:s==null?void 0:s.map(d=>m.jsx(I_e,{data:d,setEditCharge:()=>e(d.id),setInsertDocument:()=>n(d.id),setMatchDocuments:()=>t({id:d.id,ownerId:d.owner.id}),setUploadDocument:()=>i(d.id),toggleMergeCharge:a?()=>a(d.id):void 0,isSelectedForMerge:(r==null?void 0:r.includes(d.id))??!1,isAllOpened:l},d.id))})]})};var ej=Object.prototype.toString,e9=function(n){var t=ej.call(n),i=t==="[object Arguments]";return i||(i=t!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&ej.call(n.callee)==="[object Function]"),i},kN,nj;function j_e(){if(nj)return kN;nj=1;var e;if(!Object.keys){var n=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=e9,a=Object.prototype.propertyIsEnumerable,r=!a.call({toString:null},"toString"),o=a.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(f){var p=f.constructor;return p&&p.prototype===f},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!d["$"+f]&&n.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{s(window[f])}catch{return!0}}catch{return!0}return!1}(),u=function(f){if(typeof window>"u"||!c)return s(f);try{return s(f)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",k=t.call(p)==="[object Function]",y=i(p),g=h&&t.call(p)==="[object String]",v=[];if(!h&&!k&&!y)throw new TypeError("Object.keys called on a non-object");var N=o&&k;if(g&&p.length>0&&!n.call(p,0))for(var x=0;x<p.length;++x)v.push(String(x));if(y&&p.length>0)for(var F=0;F<p.length;++F)v.push(String(F));else for(var _ in p)!(N&&_==="prototype")&&n.call(p,_)&&v.push(String(_));if(r)for(var w=u(p),C=0;C<l.length;++C)!(w&&l[C]==="constructor")&&n.call(p,l[C])&&v.push(l[C]);return v}}return kN=e,kN}var T_e=Array.prototype.slice,A_e=e9,tj=Object.keys,mh=tj?function(n){return tj(n)}:j_e(),ij=Object.keys;mh.shim=function(){if(Object.keys){var n=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);n||(Object.keys=function(i){return A_e(i)?ij(T_e.call(i)):ij(i)})}else Object.keys=mh;return Object.keys||mh};var B_=mh,PS=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[t]=a;for(t in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var r=Object.getOwnPropertySymbols(n);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(n,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(n,t);if(o.value!==a||o.enumerable!==!0)return!1}return!0},aj=typeof Symbol<"u"&&Symbol,R_e=PS,V_=function(){return typeof aj!="function"||typeof Symbol!="function"||typeof aj("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:R_e()},rj={foo:{}},M_e=Object,L_e=function(){return{__proto__:rj}.foo===rj.foo&&!({__proto__:null}instanceof M_e)},z_e="Function.prototype.bind called on incompatible ",B_e=Object.prototype.toString,V_e=Math.max,W_e="[object Function]",oj=function(n,t){for(var i=[],a=0;a<n.length;a+=1)i[a]=n[a];for(var r=0;r<t.length;r+=1)i[r+n.length]=t[r];return i},H_e=function(n,t){for(var i=[],a=t||0,r=0;a<n.length;a+=1,r+=1)i[r]=n[a];return i},U_e=function(e,n){for(var t="",i=0;i<e.length;i+=1)t+=e[i],i+1<e.length&&(t+=n);return t},Y_e=function(n){var t=this;if(typeof t!="function"||B_e.apply(t)!==W_e)throw new TypeError(z_e+t);for(var i=H_e(arguments,1),a,r=function(){if(this instanceof a){var c=t.apply(this,oj(i,arguments));return Object(c)===c?c:this}return t.apply(n,oj(i,arguments))},o=V_e(0,t.length-i.length),l=[],s=0;s<o;s++)l[s]="$"+s;if(a=Function("binder","return function ("+U_e(l,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,a.prototype=new d,d.prototype=null}return a},G_e=Y_e,W_=Function.prototype.bind||G_e,q_e=Function.prototype.call,K_e=Object.prototype.hasOwnProperty,X_e=W_,n9=X_e.call(q_e,K_e),Ue,Yd=SyntaxError,t9=Function,vd=TypeError,gN=function(e){try{return t9('"use strict"; return ('+e+").constructor;")()}catch{}},Yl=Object.getOwnPropertyDescriptor;if(Yl)try{Yl({},"")}catch{Yl=null}var yN=function(){throw new vd},Q_e=Yl?function(){try{return arguments.callee,yN}catch{try{return Yl(arguments,"callee").get}catch{return yN}}}():yN,As=V_(),Z_e=L_e(),yt=Object.getPrototypeOf||(Z_e?function(e){return e.__proto__}:null),Ws={},J_e=typeof Uint8Array>"u"||!yt?Ue:yt(Uint8Array),Gl={"%AggregateError%":typeof AggregateError>"u"?Ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ue:ArrayBuffer,"%ArrayIteratorPrototype%":As&&yt?yt([][Symbol.iterator]()):Ue,"%AsyncFromSyncIteratorPrototype%":Ue,"%AsyncFunction%":Ws,"%AsyncGenerator%":Ws,"%AsyncGeneratorFunction%":Ws,"%AsyncIteratorPrototype%":Ws,"%Atomics%":typeof Atomics>"u"?Ue:Atomics,"%BigInt%":typeof BigInt>"u"?Ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ue:FinalizationRegistry,"%Function%":t9,"%GeneratorFunction%":Ws,"%Int8Array%":typeof Int8Array>"u"?Ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":As&&yt?yt(yt([][Symbol.iterator]())):Ue,"%JSON%":typeof JSON=="object"?JSON:Ue,"%Map%":typeof Map>"u"?Ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!As||!yt?Ue:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ue:Promise,"%Proxy%":typeof Proxy>"u"?Ue:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!As||!yt?Ue:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":As&&yt?yt(""[Symbol.iterator]()):Ue,"%Symbol%":As?Symbol:Ue,"%SyntaxError%":Yd,"%ThrowTypeError%":Q_e,"%TypedArray%":J_e,"%TypeError%":vd,"%Uint8Array%":typeof Uint8Array>"u"?Ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ue:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ue:WeakSet};if(yt)try{null.error}catch(e){var e1e=yt(yt(e));Gl["%Error.prototype%"]=e1e}var n1e=function e(n){var t;if(n==="%AsyncFunction%")t=gN("async function () {}");else if(n==="%GeneratorFunction%")t=gN("function* () {}");else if(n==="%AsyncGeneratorFunction%")t=gN("async function* () {}");else if(n==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(n==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&yt&&(t=yt(a.prototype))}return Gl[n]=t,t},lj={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},sf=W_,Qg=n9,t1e=sf.call(Function.call,Array.prototype.concat),i1e=sf.call(Function.apply,Array.prototype.splice),sj=sf.call(Function.call,String.prototype.replace),Zg=sf.call(Function.call,String.prototype.slice),a1e=sf.call(Function.call,RegExp.prototype.exec),r1e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,o1e=/\\(\\)?/g,l1e=function(n){var t=Zg(n,0,1),i=Zg(n,-1);if(t==="%"&&i!=="%")throw new Yd("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Yd("invalid intrinsic syntax, expected opening `%`");var a=[];return sj(n,r1e,function(r,o,l,s){a[a.length]=l?sj(s,o1e,"$1"):o||r}),a},s1e=function(n,t){var i=n,a;if(Qg(lj,i)&&(a=lj[i],i="%"+a[0]+"%"),Qg(Gl,i)){var r=Gl[i];if(r===Ws&&(r=n1e(i)),typeof r>"u"&&!t)throw new vd("intrinsic "+n+" exists, but is not available. Please file an issue!");return{alias:a,name:i,value:r}}throw new Yd("intrinsic "+n+" does not exist!")},la=function(n,t){if(typeof n!="string"||n.length===0)throw new vd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new vd('"allowMissing" argument must be a boolean');if(a1e(/^%?[^%]*%?$/,n)===null)throw new Yd("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=l1e(n),a=i.length>0?i[0]:"",r=s1e("%"+a+"%",t),o=r.name,l=r.value,s=!1,d=r.alias;d&&(a=d[0],i1e(i,t1e([0,1],d)));for(var c=1,u=!0;c<i.length;c+=1){var f=i[c],p=Zg(f,0,1),h=Zg(f,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new Yd("property names with quotes must have matching quotes");if((f==="constructor"||!u)&&(s=!0),a+="."+f,o="%"+a+"%",Qg(Gl,o))l=Gl[o];else if(l!=null){if(!(f in l)){if(!t)throw new vd("base intrinsic for "+n+" exists, but the property is not available.");return}if(Yl&&c+1>=i.length){var k=Yl(l,f);u=!!k,u&&"get"in k&&!("originalValue"in k.get)?l=k.get:l=l[f]}else u=Qg(l,f),l=l[f];u&&!s&&(Gl[o]=l)}}return l},d1e=la,Ix=d1e("%Object.defineProperty%",!0),jx=function(){if(Ix)try{return Ix({},"a",{value:1}),!0}catch{return!1}return!1};jx.hasArrayLengthDefineBug=function(){if(!jx())return null;try{return Ix([],"length",{value:1}).length!==1}catch{return!0}};var OS=jx,c1e=la,fh=c1e("%Object.getOwnPropertyDescriptor%",!0);if(fh)try{fh([],"length")}catch{fh=null}var H_=fh,u1e=OS(),U_=la,Tu=u1e&&U_("%Object.defineProperty%",!0);if(Tu)try{Tu({},"a",{value:1})}catch{Tu=!1}var m1e=U_("%SyntaxError%"),Rs=U_("%TypeError%"),dj=H_,Y_=function(n,t,i){if(!n||typeof n!="object"&&typeof n!="function")throw new Rs("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Rs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Rs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Rs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Rs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Rs("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!dj&&dj(n,t);if(Tu)Tu(n,t,{configurable:o===null&&s?s.configurable:!o,enumerable:a===null&&s?s.enumerable:!a,value:i,writable:r===null&&s?s.writable:!r});else if(l||!a&&!r&&!o)n[t]=i;else throw new m1e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},f1e=B_,p1e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",h1e=Object.prototype.toString,v1e=Array.prototype.concat,cj=Y_,k1e=function(e){return typeof e=="function"&&h1e.call(e)==="[object Function]"},i9=OS(),g1e=function(e,n,t,i){if(n in e){if(i===!0){if(e[n]===t)return}else if(!k1e(i)||!i())return}i9?cj(e,n,t,!0):cj(e,n,t)},a9=function(e,n){var t=arguments.length>2?arguments[2]:{},i=f1e(n);p1e&&(i=v1e.call(i,Object.getOwnPropertySymbols(n)));for(var a=0;a<i.length;a+=1)g1e(e,i[a],n[i[a]],t[i[a]])};a9.supportsDescriptors=!!i9;var Ss=a9,r9={exports:{}},o9=la,uj=Y_,y1e=OS(),mj=H_,fj=o9("%TypeError%"),S1e=o9("%Math.floor%"),N1e=function(n,t){if(typeof n!="function")throw new fj("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||S1e(t)!==t)throw new fj("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],a=!0,r=!0;if("length"in n&&mj){var o=mj(n,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(r=!1)}return(a||r||!i)&&(y1e?uj(n,"length",t,!0,!0):uj(n,"length",t)),n};(function(e){var n=W_,t=la,i=N1e,a=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||n.call(o,r),s=t("%Object.defineProperty%",!0),d=t("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){if(typeof f!="function")throw new a("a function is required");var p=l(n,o,arguments);return i(p,1+d(0,f.length-(arguments.length-1)),!0)};var c=function(){return l(n,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(r9);var bc=r9.exports,l9=la,s9=bc,b1e=s9(l9("String.prototype.indexOf")),sa=function(n,t){var i=l9(n,!!t);return typeof i=="function"&&b1e(n,".prototype.")>-1?s9(i):i},x1e=B_,d9=PS(),c9=sa,pj=Object,F1e=c9("Array.prototype.push"),hj=c9("Object.prototype.propertyIsEnumerable"),w1e=d9?Object.getOwnPropertySymbols:null,u9=function(n,t){if(n==null)throw new TypeError("target must be an object");var i=pj(n);if(arguments.length===1)return i;for(var a=1;a<arguments.length;++a){var r=pj(arguments[a]),o=x1e(r),l=d9&&(Object.getOwnPropertySymbols||w1e);if(l)for(var s=l(r),d=0;d<s.length;++d){var c=s[d];hj(r,c)&&F1e(o,c)}for(var u=0;u<o.length;++u){var f=o[u];if(hj(r,f)){var p=r[f];i[f]=p}}}return i},SN=u9,_1e=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",n=e.split(""),t={},i=0;i<n.length;++i)t[n[i]]=n[i];var a=Object.assign({},t),r="";for(var o in a)r+=o;return e!==r},C1e=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},m9=function(){return!Object.assign||_1e()||C1e()?SN:Object.assign},P1e=Ss,O1e=m9,D1e=function(){var n=O1e();return P1e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},E1e=Ss,$1e=bc,I1e=u9,f9=m9,j1e=D1e,T1e=$1e.apply(f9()),p9=function(n,t){return T1e(Object,arguments)};E1e(p9,{getPolyfill:f9,implementation:I1e,shim:j1e});var A1e=p9,xm=function(){return typeof(function(){}).name=="string"},Au=Object.getOwnPropertyDescriptor;if(Au)try{Au([],"length")}catch{Au=null}xm.functionsHaveConfigurableNames=function(){if(!xm()||!Au)return!1;var n=Au(function(){},"name");return!!n&&!!n.configurable};var R1e=Function.prototype.bind;xm.boundFunctionsHaveNames=function(){return xm()&&typeof R1e=="function"&&(function(){}).bind().name!==""};var M1e=xm,vj=Y_,L1e=OS(),z1e=M1e.functionsHaveConfigurableNames(),B1e=TypeError,V1e=function(n,t){if(typeof n!="function")throw new B1e("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return(!i||z1e)&&(L1e?vj(n,"name",t,!0,!0):vj(n,"name",t)),n},W1e=V1e,H1e=Object,U1e=TypeError,h9=W1e(function(){if(this!=null&&this!==H1e(this))throw new U1e("RegExp.prototype.flags getter called on non-object");var n="";return this.hasIndices&&(n+="d"),this.global&&(n+="g"),this.ignoreCase&&(n+="i"),this.multiline&&(n+="m"),this.dotAll&&(n+="s"),this.unicode&&(n+="u"),this.unicodeSets&&(n+="v"),this.sticky&&(n+="y"),n},"get flags",!0),Y1e=h9,G1e=Ss.supportsDescriptors,q1e=Object.getOwnPropertyDescriptor,v9=function(){if(G1e&&/a/mig.flags==="gim"){var n=q1e(RegExp.prototype,"flags");if(n&&typeof n.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var t="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(i,"sticky",{get:function(){t+="y"}}),t==="dy")return n.get}}return Y1e},K1e=Ss.supportsDescriptors,X1e=v9,Q1e=Object.getOwnPropertyDescriptor,Z1e=Object.defineProperty,J1e=TypeError,kj=Object.getPrototypeOf,eCe=/a/,nCe=function(){if(!K1e||!kj)throw new J1e("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var n=X1e(),t=kj(eCe),i=Q1e(t,"flags");return(!i||i.get!==n)&&Z1e(t,"flags",{configurable:!0,enumerable:!1,get:n}),n},tCe=Ss,iCe=bc,aCe=h9,k9=v9,rCe=nCe,g9=iCe(k9());tCe(g9,{getPolyfill:k9,implementation:aCe,shim:rCe});var oCe=g9,ph={exports:{}},lCe=PS,Ns=function(){return lCe()&&!!Symbol.toStringTag},sCe=Ns(),dCe=sa,Tx=dCe("Object.prototype.toString"),DS=function(n){return sCe&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:Tx(n)==="[object Arguments]"},y9=function(n){return DS(n)?!0:n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&Tx(n)!=="[object Array]"&&Tx(n.callee)==="[object Function]"},cCe=function(){return DS(arguments)}();DS.isLegacyArguments=y9;var S9=cCe?DS:y9;const uCe={},mCe=Object.freeze(Object.defineProperty({__proto__:null,default:uCe},Symbol.toStringTag,{value:"Module"})),fCe=PH(mCe);var G_=typeof Map=="function"&&Map.prototype,NN=Object.getOwnPropertyDescriptor&&G_?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Jg=G_&&NN&&typeof NN.get=="function"?NN.get:null,gj=G_&&Map.prototype.forEach,q_=typeof Set=="function"&&Set.prototype,bN=Object.getOwnPropertyDescriptor&&q_?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ey=q_&&bN&&typeof bN.get=="function"?bN.get:null,yj=q_&&Set.prototype.forEach,pCe=typeof WeakMap=="function"&&WeakMap.prototype,Ru=pCe?WeakMap.prototype.has:null,hCe=typeof WeakSet=="function"&&WeakSet.prototype,Mu=hCe?WeakSet.prototype.has:null,vCe=typeof WeakRef=="function"&&WeakRef.prototype,Sj=vCe?WeakRef.prototype.deref:null,kCe=Boolean.prototype.valueOf,gCe=Object.prototype.toString,yCe=Function.prototype.toString,SCe=String.prototype.match,K_=String.prototype.slice,Fo=String.prototype.replace,NCe=String.prototype.toUpperCase,Nj=String.prototype.toLowerCase,N9=RegExp.prototype.test,bj=Array.prototype.concat,Qa=Array.prototype.join,bCe=Array.prototype.slice,xj=Math.floor,Ax=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xN=Object.getOwnPropertySymbols,Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Yt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gd||!0)?Symbol.toStringTag:null,b9=Object.prototype.propertyIsEnumerable,Fj=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function wj(e,n){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||N9.call(/e/,n))return n;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var i=e<0?-xj(-e):xj(e);if(i!==e){var a=String(i),r=K_.call(n,a.length+1);return Fo.call(a,t,"$&_")+"."+Fo.call(Fo.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fo.call(n,t,"$&_")}var Mx=fCe,_j=Mx.custom,Cj=F9(_j)?_j:null,xCe=function e(n,t,i,a){var r=t||{};if(so(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(so(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=so(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(so(r,"indent")&&r.indent!==null&&r.indent!=="	"&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(so(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=r.numericSeparator;if(typeof n>"u")return"undefined";if(n===null)return"null";if(typeof n=="boolean")return n?"true":"false";if(typeof n=="string")return _9(n,r);if(typeof n=="number"){if(n===0)return 1/0/n>0?"0":"-0";var s=String(n);return l?wj(n,s):s}if(typeof n=="bigint"){var d=String(n)+"n";return l?wj(n,d):d}var c=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof n=="object")return Lx(n)?"[Array]":"[Object]";var u=BCe(r,i);if(typeof a>"u")a=[];else if(w9(a,n)>=0)return"[Circular]";function f(M,R,I){if(R&&(a=bCe.call(a),a.push(R)),I){var L={depth:r.depth};return so(r,"quoteStyle")&&(L.quoteStyle=r.quoteStyle),e(M,L,i+1,a)}return e(M,r,i+1,a)}if(typeof n=="function"&&!Pj(n)){var p=$Ce(n),h=Sp(n,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+Qa.call(h,", ")+" }":"")}if(F9(n)){var k=Gd?Fo.call(String(n),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rx.call(n);return typeof n=="object"&&!Gd?Zc(k):k}if(MCe(n)){for(var y="<"+Nj.call(String(n.nodeName)),g=n.attributes||[],v=0;v<g.length;v++)y+=" "+g[v].name+"="+x9(FCe(g[v].value),"double",r);return y+=">",n.childNodes&&n.childNodes.length&&(y+="..."),y+="</"+Nj.call(String(n.nodeName))+">",y}if(Lx(n)){if(n.length===0)return"[]";var N=Sp(n,f);return u&&!zCe(N)?"["+zx(N,u)+"]":"[ "+Qa.call(N,", ")+" ]"}if(_Ce(n)){var x=Sp(n,f);return!("cause"in Error.prototype)&&"cause"in n&&!b9.call(n,"cause")?"{ ["+String(n)+"] "+Qa.call(bj.call("[cause]: "+f(n.cause),x),", ")+" }":x.length===0?"["+String(n)+"]":"{ ["+String(n)+"] "+Qa.call(x,", ")+" }"}if(typeof n=="object"&&o){if(Cj&&typeof n[Cj]=="function"&&Mx)return Mx(n,{depth:c-i});if(o!=="symbol"&&typeof n.inspect=="function")return n.inspect()}if(ICe(n)){var F=[];return gj&&gj.call(n,function(M,R){F.push(f(R,n,!0)+" => "+f(M,n))}),Oj("Map",Jg.call(n),F,u)}if(ACe(n)){var _=[];return yj&&yj.call(n,function(M){_.push(f(M,n))}),Oj("Set",ey.call(n),_,u)}if(jCe(n))return FN("WeakMap");if(RCe(n))return FN("WeakSet");if(TCe(n))return FN("WeakRef");if(PCe(n))return Zc(f(Number(n)));if(DCe(n))return Zc(f(Ax.call(n)));if(OCe(n))return Zc(kCe.call(n));if(CCe(n))return Zc(f(String(n)));if(!wCe(n)&&!Pj(n)){var w=Sp(n,f),C=Fj?Fj(n)===Object.prototype:n instanceof Object||n.constructor===Object,$=n instanceof Object?"":"null prototype",E=!C&&Yt&&Object(n)===n&&Yt in n?K_.call(ll(n),8,-1):$?"Object":"",j=C||typeof n.constructor!="function"?"":n.constructor.name?n.constructor.name+" ":"",D=j+(E||$?"["+Qa.call(bj.call([],E||[],$||[]),": ")+"] ":"");return w.length===0?D+"{}":u?D+"{"+zx(w,u)+"}":D+"{ "+Qa.call(w,", ")+" }"}return String(n)};function x9(e,n,t){var i=(t.quoteStyle||n)==="double"?'"':"'";return i+e+i}function FCe(e){return Fo.call(String(e),/"/g,"&quot;")}function Lx(e){return ll(e)==="[object Array]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function wCe(e){return ll(e)==="[object Date]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function Pj(e){return ll(e)==="[object RegExp]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function _Ce(e){return ll(e)==="[object Error]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function CCe(e){return ll(e)==="[object String]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function PCe(e){return ll(e)==="[object Number]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function OCe(e){return ll(e)==="[object Boolean]"&&(!Yt||!(typeof e=="object"&&Yt in e))}function F9(e){if(Gd)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Rx)return!1;try{return Rx.call(e),!0}catch{}return!1}function DCe(e){if(!e||typeof e!="object"||!Ax)return!1;try{return Ax.call(e),!0}catch{}return!1}var ECe=Object.prototype.hasOwnProperty||function(e){return e in this};function so(e,n){return ECe.call(e,n)}function ll(e){return gCe.call(e)}function $Ce(e){if(e.name)return e.name;var n=SCe.call(yCe.call(e),/^function\s*([\w$]+)/);return n?n[1]:null}function w9(e,n){if(e.indexOf)return e.indexOf(n);for(var t=0,i=e.length;t<i;t++)if(e[t]===n)return t;return-1}function ICe(e){if(!Jg||!e||typeof e!="object")return!1;try{Jg.call(e);try{ey.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function jCe(e){if(!Ru||!e||typeof e!="object")return!1;try{Ru.call(e,Ru);try{Mu.call(e,Mu)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function TCe(e){if(!Sj||!e||typeof e!="object")return!1;try{return Sj.call(e),!0}catch{}return!1}function ACe(e){if(!ey||!e||typeof e!="object")return!1;try{ey.call(e);try{Jg.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function RCe(e){if(!Mu||!e||typeof e!="object")return!1;try{Mu.call(e,Mu);try{Ru.call(e,Ru)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function MCe(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function _9(e,n){if(e.length>n.maxStringLength){var t=e.length-n.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return _9(K_.call(e,0,n.maxStringLength),n)+i}var a=Fo.call(Fo.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,LCe);return x9(a,"single",n)}function LCe(e){var n=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[n];return t?"\\"+t:"\\x"+(n<16?"0":"")+NCe.call(n.toString(16))}function Zc(e){return"Object("+e+")"}function FN(e){return e+" { ? }"}function Oj(e,n,t,i){var a=i?zx(t,i):Qa.call(t,", ");return e+" ("+n+") {"+a+"}"}function zCe(e){for(var n=0;n<e.length;n++)if(w9(e[n],`
`)>=0)return!1;return!0}function BCe(e,n){var t;if(e.indent==="	")t="	";else if(typeof e.indent=="number"&&e.indent>0)t=Qa.call(Array(e.indent+1)," ");else return null;return{base:t,prev:Qa.call(Array(n+1),t)}}function zx(e,n){if(e.length===0)return"";var t=`
`+n.prev+n.base;return t+Qa.call(e,","+t)+`
`+n.prev}function Sp(e,n){var t=Lx(e),i=[];if(t){i.length=e.length;for(var a=0;a<e.length;a++)i[a]=so(e,a)?n(e[a],e):""}var r=typeof xN=="function"?xN(e):[],o;if(Gd){o={};for(var l=0;l<r.length;l++)o["$"+r[l]]=r[l]}for(var s in e)so(e,s)&&(t&&String(Number(s))===s&&s<e.length||Gd&&o["$"+s]instanceof Symbol||(N9.call(/[^\w$]/,s)?i.push(n(s,e)+": "+n(e[s],e)):i.push(s+": "+n(e[s],e))));if(typeof xN=="function")for(var d=0;d<r.length;d++)b9.call(e,r[d])&&i.push("["+n(r[d])+"]: "+n(e[r[d]],e));return i}var X_=la,xc=sa,VCe=xCe,WCe=X_("%TypeError%"),Np=X_("%WeakMap%",!0),bp=X_("%Map%",!0),HCe=xc("WeakMap.prototype.get",!0),UCe=xc("WeakMap.prototype.set",!0),YCe=xc("WeakMap.prototype.has",!0),GCe=xc("Map.prototype.get",!0),qCe=xc("Map.prototype.set",!0),KCe=xc("Map.prototype.has",!0),Q_=function(e,n){for(var t=e,i;(i=t.next)!==null;t=i)if(i.key===n)return t.next=i.next,i.next=e.next,e.next=i,i},XCe=function(e,n){var t=Q_(e,n);return t&&t.value},QCe=function(e,n,t){var i=Q_(e,n);i?i.value=t:e.next={key:n,next:e.next,value:t}},ZCe=function(e,n){return!!Q_(e,n)},C9=function(){var n,t,i,a={assert:function(r){if(!a.has(r))throw new WCe("Side channel does not contain "+VCe(r))},get:function(r){if(Np&&r&&(typeof r=="object"||typeof r=="function")){if(n)return HCe(n,r)}else if(bp){if(t)return GCe(t,r)}else if(i)return XCe(i,r)},has:function(r){if(Np&&r&&(typeof r=="object"||typeof r=="function")){if(n)return YCe(n,r)}else if(bp){if(t)return KCe(t,r)}else if(i)return ZCe(i,r);return!1},set:function(r,o){Np&&r&&(typeof r=="object"||typeof r=="function")?(n||(n=new Np),UCe(n,r,o)):bp?(t||(t=new bp),qCe(t,r,o)):(i||(i={key:{},next:null}),QCe(i,r,o))}};return a},JCe=la,ePe=n9,Jc=C9(),fr=JCe("%TypeError%"),Z_={assert:function(e,n){if(!e||typeof e!="object"&&typeof e!="function")throw new fr("`O` is not an object");if(typeof n!="string")throw new fr("`slot` must be a string");if(Jc.assert(e),!Z_.has(e,n))throw new fr("`"+n+"` is not present on `O`")},get:function(e,n){if(!e||typeof e!="object"&&typeof e!="function")throw new fr("`O` is not an object");if(typeof n!="string")throw new fr("`slot` must be a string");var t=Jc.get(e);return t&&t["$"+n]},has:function(e,n){if(!e||typeof e!="object"&&typeof e!="function")throw new fr("`O` is not an object");if(typeof n!="string")throw new fr("`slot` must be a string");var t=Jc.get(e);return!!t&&ePe(t,"$"+n)},set:function(e,n,t){if(!e||typeof e!="object"&&typeof e!="function")throw new fr("`O` is not an object");if(typeof n!="string")throw new fr("`slot` must be a string");var i=Jc.get(e);i||(i={},Jc.set(e,i)),i["$"+n]=t}};Object.freeze&&Object.freeze(Z_);var nPe=Z_,eu=nPe,tPe=SyntaxError,Dj=typeof StopIteration=="object"?StopIteration:null,iPe=function(n){if(!Dj)throw new tPe("this environment lacks StopIteration");eu.set(n,"[[Done]]",!1);var t={next:function(){var a=eu.get(this,"[[Iterator]]"),r=eu.get(a,"[[Done]]");try{return{done:r,value:r?void 0:a.next()}}catch(o){if(eu.set(a,"[[Done]]",!0),o!==Dj)throw o;return{done:!0,value:void 0}}}};return eu.set(t,"[[Iterator]]",n),t},aPe={}.toString,P9=Array.isArray||function(e){return aPe.call(e)=="[object Array]"},rPe=String.prototype.valueOf,oPe=function(n){try{return rPe.call(n),!0}catch{return!1}},lPe=Object.prototype.toString,sPe="[object String]",dPe=Ns(),O9=function(n){return typeof n=="string"?!0:typeof n!="object"?!1:dPe?oPe(n):lPe.call(n)===sPe},J_=typeof Map=="function"&&Map.prototype?Map:null,cPe=typeof Set=="function"&&Set.prototype?Set:null,ny;J_||(ny=function(n){return!1});var D9=J_?Map.prototype.has:null,Ej=cPe?Set.prototype.has:null;!ny&&!D9&&(ny=function(n){return!1});var E9=ny||function(n){if(!n||typeof n!="object")return!1;try{if(D9.call(n),Ej)try{Ej.call(n)}catch{return!0}return n instanceof J_}catch{}return!1},uPe=typeof Map=="function"&&Map.prototype?Map:null,e1=typeof Set=="function"&&Set.prototype?Set:null,ty;e1||(ty=function(n){return!1});var $j=uPe?Map.prototype.has:null,$9=e1?Set.prototype.has:null;!ty&&!$9&&(ty=function(n){return!1});var I9=ty||function(n){if(!n||typeof n!="object")return!1;try{if($9.call(n),$j)try{$j.call(n)}catch{return!0}return n instanceof e1}catch{}return!1},Ij=S9,jj=iPe;if(V_()||PS()){var wN=Symbol.iterator;ph.exports=function(n){if(n!=null&&typeof n[wN]<"u")return n[wN]();if(Ij(n))return Array.prototype[wN].call(n)}}else{var mPe=P9,fPe=O9,Tj=la,pPe=Tj("%Map%",!0),hPe=Tj("%Set%",!0),ma=sa,Aj=ma("Array.prototype.push"),Rj=ma("String.prototype.charCodeAt"),vPe=ma("String.prototype.slice"),kPe=function(n,t){var i=n.length;if(t+1>=i)return t+1;var a=Rj(n,t);if(a<55296||a>56319)return t+1;var r=Rj(n,t+1);return r<56320||r>57343?t+1:t+2},_N=function(n){var t=0;return{next:function(){var a=t>=n.length,r;return a||(r=n[t],t+=1),{done:a,value:r}}}},Mj=function(n,t){if(mPe(n)||Ij(n))return _N(n);if(fPe(n)){var i=0;return{next:function(){var r=kPe(n,i),o=vPe(n,i,r);return i=r,{done:r>n.length,value:o}}}}if(t&&typeof n["_es6-shim iterator_"]<"u")return n["_es6-shim iterator_"]()};if(!pPe&&!hPe)ph.exports=function(n){if(n!=null)return Mj(n,!0)};else{var gPe=E9,yPe=I9,Lj=ma("Map.prototype.forEach",!0),zj=ma("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Bj=ma("Map.prototype.iterator",!0),Vj=ma("Set.prototype.iterator",!0);var Wj=ma("Map.prototype.@@iterator",!0)||ma("Map.prototype._es6-shim iterator_",!0),Hj=ma("Set.prototype.@@iterator",!0)||ma("Set.prototype._es6-shim iterator_",!0),SPe=function(n){if(gPe(n)){if(Bj)return jj(Bj(n));if(Wj)return Wj(n);if(Lj){var t=[];return Lj(n,function(a,r){Aj(t,[r,a])}),_N(t)}}if(yPe(n)){if(Vj)return jj(Vj(n));if(Hj)return Hj(n);if(zj){var i=[];return zj(n,function(a){Aj(i,a)}),_N(i)}}};ph.exports=function(n){return SPe(n)||Mj(n)}}}var NPe=ph.exports,Uj=function(e){return e!==e},j9=function(n,t){return n===0&&t===0?1/n===1/t:!!(n===t||Uj(n)&&Uj(t))},bPe=j9,T9=function(){return typeof Object.is=="function"?Object.is:bPe},xPe=T9,FPe=Ss,wPe=function(){var n=xPe();return FPe(Object,{is:n},{is:function(){return Object.is!==n}}),n},_Pe=Ss,CPe=bc,PPe=j9,A9=T9,OPe=wPe,R9=CPe(A9(),Object);_Pe(R9,{getPolyfill:A9,implementation:PPe,shim:OPe});var DPe=R9,M9=Function.prototype.toString,id=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Bx,hh;if(typeof id=="function"&&typeof Object.defineProperty=="function")try{Bx=Object.defineProperty({},"length",{get:function(){throw hh}}),hh={},id(function(){throw 42},null,Bx)}catch(e){e!==hh&&(id=null)}else id=null;var EPe=/^\s*class\b/,Vx=function(n){try{var t=M9.call(n);return EPe.test(t)}catch{return!1}},CN=function(n){try{return Vx(n)?!1:(M9.call(n),!0)}catch{return!1}},vh=Object.prototype.toString,$Pe="[object Object]",IPe="[object Function]",jPe="[object GeneratorFunction]",TPe="[object HTMLAllCollection]",APe="[object HTML document.all class]",RPe="[object HTMLCollection]",MPe=typeof Symbol=="function"&&!!Symbol.toStringTag,LPe=!(0 in[,]),Wx=function(){return!1};if(typeof document=="object"){var zPe=document.all;vh.call(zPe)===vh.call(document.all)&&(Wx=function(n){if((LPe||!n)&&(typeof n>"u"||typeof n=="object"))try{var t=vh.call(n);return(t===TPe||t===APe||t===RPe||t===$Pe)&&n("")==null}catch{}return!1})}var BPe=id?function(n){if(Wx(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;try{id(n,null,Bx)}catch(t){if(t!==hh)return!1}return!Vx(n)&&CN(n)}:function(n){if(Wx(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;if(MPe)return CN(n);if(Vx(n))return!1;var t=vh.call(n);return t!==IPe&&t!==jPe&&!/^\[object HTML/.test(t)?!1:CN(n)},VPe=BPe,WPe=Object.prototype.toString,L9=Object.prototype.hasOwnProperty,HPe=function(n,t,i){for(var a=0,r=n.length;a<r;a++)L9.call(n,a)&&(i==null?t(n[a],a,n):t.call(i,n[a],a,n))},UPe=function(n,t,i){for(var a=0,r=n.length;a<r;a++)i==null?t(n.charAt(a),a,n):t.call(i,n.charAt(a),a,n)},YPe=function(n,t,i){for(var a in n)L9.call(n,a)&&(i==null?t(n[a],a,n):t.call(i,n[a],a,n))},GPe=function(n,t,i){if(!VPe(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=i),WPe.call(n)==="[object Array]"?HPe(n,t,a):typeof n=="string"?UPe(n,t,a):YPe(n,t,a)},qPe=GPe,PN=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],KPe=typeof globalThis>"u"?FF:globalThis,XPe=function(){for(var n=[],t=0;t<PN.length;t++)typeof KPe[PN[t]]=="function"&&(n[n.length]=PN[t]);return n},iy=qPe,QPe=XPe,Yj=bc,n1=sa,kh=H_,ZPe=n1("Object.prototype.toString"),z9=Ns(),Gj=typeof globalThis>"u"?FF:globalThis,Hx=QPe(),t1=n1("String.prototype.slice"),ON=Object.getPrototypeOf,JPe=n1("Array.prototype.indexOf",!0)||function(n,t){for(var i=0;i<n.length;i+=1)if(n[i]===t)return i;return-1},ay={__proto__:null};z9&&kh&&ON?iy(Hx,function(e){var n=new Gj[e];if(Symbol.toStringTag in n){var t=ON(n),i=kh(t,Symbol.toStringTag);if(!i){var a=ON(t);i=kh(a,Symbol.toStringTag)}ay["$"+e]=Yj(i.get)}}):iy(Hx,function(e){var n=new Gj[e],t=n.slice||n.set;t&&(ay["$"+e]=Yj(t))});var eOe=function(n){var t=!1;return iy(ay,function(i,a){if(!t)try{"$"+i(n)===a&&(t=t1(a,1))}catch{}}),t},nOe=function(n){var t=!1;return iy(ay,function(i,a){if(!t)try{i(n),t=t1(a,1)}catch{}}),t},B9=function(n){if(!n||typeof n!="object")return!1;if(!z9){var t=t1(ZPe(n),8,-1);return JPe(Hx,t)>-1?t:t!=="Object"?!1:nOe(n)}return kh?eOe(n):null},tOe=B9,iOe=function(n){return!!tOe(n)},aOe=bc,rOe=sa,V9=la,oOe=iOe,qj=V9("ArrayBuffer",!0),Kj=V9("Float32Array",!0),gh=rOe("ArrayBuffer.prototype.byteLength",!0),Xj=qj&&!gh&&new qj().slice,Qj=Xj&&aOe(Xj),W9=gh||Qj?function(n){if(!n||typeof n!="object")return!1;try{return gh?gh(n):Qj(n,0),!0}catch{return!1}}:Kj?function(n){try{return new Kj(n).buffer===n&&!oOe(n)}catch(t){return typeof n=="object"&&t.name==="RangeError"}}:function(n){return!1},lOe=Date.prototype.getDay,sOe=function(n){try{return lOe.call(n),!0}catch{return!1}},dOe=Object.prototype.toString,cOe="[object Date]",uOe=Ns(),mOe=function(n){return typeof n!="object"||n===null?!1:uOe?sOe(n):dOe.call(n)===cOe},Ux=sa,H9=Ns(),U9,Y9,Yx,Gx;if(H9){U9=Ux("Object.prototype.hasOwnProperty"),Y9=Ux("RegExp.prototype.exec"),Yx={};var DN=function(){throw Yx};Gx={toString:DN,valueOf:DN},typeof Symbol.toPrimitive=="symbol"&&(Gx[Symbol.toPrimitive]=DN)}var fOe=Ux("Object.prototype.toString"),pOe=Object.getOwnPropertyDescriptor,hOe="[object RegExp]",vOe=H9?function(n){if(!n||typeof n!="object")return!1;var t=pOe(n,"lastIndex"),i=t&&U9(t,"value");if(!i)return!1;try{Y9(n,Gx)}catch(a){return a===Yx}}:function(n){return!n||typeof n!="object"&&typeof n!="function"?!1:fOe(n)===hOe},kOe=sa,Zj=kOe("SharedArrayBuffer.prototype.byteLength",!0),gOe=Zj?function(n){if(!n||typeof n!="object")return!1;try{return Zj(n),!0}catch{return!1}}:function(n){return!1},yOe=Number.prototype.toString,SOe=function(n){try{return yOe.call(n),!0}catch{return!1}},NOe=Object.prototype.toString,bOe="[object Number]",xOe=Ns(),FOe=function(n){return typeof n=="number"?!0:typeof n!="object"?!1:xOe?SOe(n):NOe.call(n)===bOe},G9=sa,wOe=G9("Boolean.prototype.toString"),_Oe=G9("Object.prototype.toString"),COe=function(n){try{return wOe(n),!0}catch{return!1}},POe="[object Boolean]",OOe=Ns(),DOe=function(n){return typeof n=="boolean"?!0:n===null||typeof n!="object"?!1:OOe&&Symbol.toStringTag in n?COe(n):_Oe(n)===POe},qx={exports:{}},EOe=Object.prototype.toString,$Oe=V_();if($Oe){var IOe=Symbol.prototype.toString,jOe=/^Symbol\(.*\)$/,TOe=function(n){return typeof n.valueOf()!="symbol"?!1:jOe.test(IOe.call(n))};qx.exports=function(n){if(typeof n=="symbol")return!0;if(EOe.call(n)!=="[object Symbol]")return!1;try{return TOe(n)}catch{return!1}}}else qx.exports=function(n){return!1};var AOe=qx.exports,Kx={exports:{}},Jj=typeof BigInt<"u"&&BigInt,ROe=function(){return typeof Jj=="function"&&typeof BigInt=="function"&&typeof Jj(42)=="bigint"&&typeof BigInt(42)=="bigint"},MOe=ROe();if(MOe){var LOe=BigInt.prototype.valueOf,zOe=function(n){try{return LOe.call(n),!0}catch{}return!1};Kx.exports=function(n){return n===null||typeof n>"u"||typeof n=="boolean"||typeof n=="string"||typeof n=="number"||typeof n=="symbol"||typeof n=="function"?!1:typeof n=="bigint"?!0:zOe(n)}}else Kx.exports=function(n){return!1};var BOe=Kx.exports,VOe=O9,WOe=FOe,HOe=DOe,UOe=AOe,YOe=BOe,GOe=function(n){if(n==null||typeof n!="object"&&typeof n!="function")return null;if(VOe(n))return"String";if(WOe(n))return"Number";if(HOe(n))return"Boolean";if(UOe(n))return"Symbol";if(YOe(n))return"BigInt"},ry=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,eT=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,oy;ry||(oy=function(n){return!1});var Xx=ry?ry.prototype.has:null,EN=eT?eT.prototype.has:null;!oy&&!Xx&&(oy=function(n){return!1});var qOe=oy||function(n){if(!n||typeof n!="object")return!1;try{if(Xx.call(n,Xx),EN)try{EN.call(n,EN)}catch{return!0}return n instanceof ry}catch{}return!1},Qx={exports:{}},KOe=la,q9=sa,XOe=KOe("%WeakSet%",!0),$N=q9("WeakSet.prototype.has",!0);if($N){var IN=q9("WeakMap.prototype.has",!0);Qx.exports=function(n){if(!n||typeof n!="object")return!1;try{if($N(n,$N),IN)try{IN(n,IN)}catch{return!0}return n instanceof XOe}catch{}return!1}}else Qx.exports=function(n){return!1};var QOe=Qx.exports,ZOe=E9,JOe=I9,eDe=qOe,nDe=QOe,tDe=function(n){if(n&&typeof n=="object"){if(ZOe(n))return"Map";if(JOe(n))return"Set";if(eDe(n))return"WeakMap";if(nDe(n))return"WeakSet"}return!1},iDe=sa,nT=iDe("ArrayBuffer.prototype.byteLength",!0),aDe=W9,rDe=function(n){return aDe(n)?nT?nT(n):n.byteLength:NaN},K9=A1e,cr=sa,tT=oCe,oDe=la,qd=NPe,lDe=C9,iT=DPe,aT=S9,rT=P9,oT=W9,lT=mOe,sT=vOe,dT=gOe,cT=B_,uT=GOe,mT=tDe,fT=B9,pT=rDe,hT=cr("SharedArrayBuffer.prototype.byteLength",!0),vT=cr("Date.prototype.getTime"),jN=Object.getPrototypeOf,kT=cr("Object.prototype.toString"),ly=oDe("%Set%",!0),Zx=cr("Map.prototype.has",!0),sy=cr("Map.prototype.get",!0),gT=cr("Map.prototype.size",!0),dy=cr("Set.prototype.add",!0),X9=cr("Set.prototype.delete",!0),cy=cr("Set.prototype.has",!0),yh=cr("Set.prototype.size",!0);function yT(e,n,t,i){for(var a=qd(e),r;(r=a.next())&&!r.done;)if(_a(n,r.value,t,i))return X9(e,r.value),!0;return!1}function Q9(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function sDe(e,n,t,i,a,r){var o=Q9(t);if(o!=null)return o;var l=sy(n,o),s=K9({},a,{strict:!1});return typeof l>"u"&&!Zx(n,o)||!_a(i,l,s,r)?!1:!Zx(e,o)&&_a(i,l,s,r)}function dDe(e,n,t){var i=Q9(t);return i??(cy(n,i)&&!cy(e,i))}function ST(e,n,t,i,a,r){for(var o=qd(e),l,s;(l=o.next())&&!l.done;)if(s=l.value,_a(t,s,a,r)&&_a(i,sy(n,s),a,r))return X9(e,s),!0;return!1}function _a(e,n,t,i){var a=t||{};if(a.strict?iT(e,n):e===n)return!0;var r=uT(e),o=uT(n);if(r!==o)return!1;if(!e||!n||typeof e!="object"&&typeof n!="object")return a.strict?iT(e,n):e==n;var l=i.has(e),s=i.has(n),d;if(l&&s){if(i.get(e)===i.get(n))return!0}else d={};return l||i.set(e,d),s||i.set(n,d),mDe(e,n,a,i)}function NT(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function cDe(e,n,t,i){if(yh(e)!==yh(n))return!1;for(var a=qd(e),r=qd(n),o,l,s;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object")s||(s=new ly),dy(s,o.value);else if(!cy(n,o.value)){if(t.strict||!dDe(e,n,o.value))return!1;s||(s=new ly),dy(s,o.value)}if(s){for(;(l=r.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!yT(s,l.value,t.strict,i))return!1}else if(!t.strict&&!cy(e,l.value)&&!yT(s,l.value,t.strict,i))return!1;return yh(s)===0}return!0}function uDe(e,n,t,i){if(gT(e)!==gT(n))return!1;for(var a=qd(e),r=qd(n),o,l,s,d,c,u;(o=a.next())&&!o.done;)if(d=o.value[0],c=o.value[1],d&&typeof d=="object")s||(s=new ly),dy(s,d);else if(u=sy(n,d),typeof u>"u"&&!Zx(n,d)||!_a(c,u,t,i)){if(t.strict||!sDe(e,n,d,c,t,i))return!1;s||(s=new ly),dy(s,d)}if(s){for(;(l=r.next())&&!l.done;)if(d=l.value[0],u=l.value[1],d&&typeof d=="object"){if(!ST(s,e,d,u,t,i))return!1}else if(!t.strict&&(!e.has(d)||!_a(sy(e,d),u,t,i))&&!ST(s,e,d,u,K9({},t,{strict:!1}),i))return!1;return yh(s)===0}return!0}function mDe(e,n,t,i){var a,r;if(typeof e!=typeof n||e==null||n==null||kT(e)!==kT(n)||aT(e)!==aT(n))return!1;var o=rT(e),l=rT(n);if(o!==l)return!1;var s=e instanceof Error,d=n instanceof Error;if(s!==d||(s||d)&&(e.name!==n.name||e.message!==n.message))return!1;var c=sT(e),u=sT(n);if(c!==u||(c||u)&&(e.source!==n.source||tT(e)!==tT(n)))return!1;var f=lT(e),p=lT(n);if(f!==p||(f||p)&&vT(e)!==vT(n)||t.strict&&jN&&jN(e)!==jN(n))return!1;var h=fT(e),k=fT(n);if(h!==k)return!1;if(h||k){if(e.length!==n.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}var y=NT(e),g=NT(n);if(y!==g)return!1;if(y||g){if(e.length!==n.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}var v=oT(e),N=oT(n);if(v!==N)return!1;if(v||N)return pT(e)!==pT(n)?!1:typeof Uint8Array=="function"&&_a(new Uint8Array(e),new Uint8Array(n),t,i);var x=dT(e),F=dT(n);if(x!==F)return!1;if(x||F)return hT(e)!==hT(n)?!1:typeof Uint8Array=="function"&&_a(new Uint8Array(e),new Uint8Array(n),t,i);if(typeof e!=typeof n)return!1;var _=cT(e),w=cT(n);if(_.length!==w.length)return!1;for(_.sort(),w.sort(),a=_.length-1;a>=0;a--)if(_[a]!=w[a])return!1;for(a=_.length-1;a>=0;a--)if(r=_[a],!_a(e[r],n[r],t,i))return!1;var C=mT(e),$=mT(n);return C!==$?!1:C==="Set"||$==="Set"?cDe(e,n,t,i):C==="Map"?uDe(e,n,t,i):!0}var fDe=function(n,t,i){return _a(n,t,i,lDe())};const Fc=Mm(fDe),pDe=[{value:pd.AbsAmount,label:"Abs Amount"},{value:pd.Amount,label:"Amount"},{value:pd.Date,label:"Date"}],Z9=[{label:"All",value:zo.All},{label:"Income",value:zo.Income},{label:"Expense",value:zo.Expense}];function hDe({filter:e,setFilter:n,closeModal:t}){var C,$,E;const{control:i,handleSubmit:a,watch:r,setValue:o}=ki({defaultValues:{...e}}),[l,s]=S.useState(((C=e.sortBy)==null?void 0:C.asc)??!1),[d,c]=S.useState(!!(($=e.sortBy)!=null&&$.field)),[u,f]=S.useState([]),[p,h]=S.useState([]),[{data:k,fetching:y,error:g}]=Be({query:Hr}),[{data:v,fetching:N,error:x}]=Be({query:v_}),F=r("sortBy.field");S.useEffect(()=>{F&&!d?c(!0):!F&&d&&c(!1)},[F,d]),S.useEffect(()=>{g&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[g]),S.useEffect(()=>{x&&re({title:"Error!",message:"Oh no!, we have an error fetching tags! 🤥"})},[x]);const _=j=>{var D;l!=null&&((D=j.sortBy)!=null&&D.field)&&(j.sortBy.asc=l),n(j),t()};function w(){n({}),s(!1),t()}return S.useEffect(()=>{var j;(j=k==null?void 0:k.allFinancialEntities)!=null&&j.nodes.length&&f(k.allFinancialEntities.nodes.map(D=>({value:D.id,label:D.name})).sort((D,M)=>D.label>M.label?1:-1))},[k,f]),S.useEffect(()=>{v!=null&&v.allTags.length&&h(v.allTags.map(j=>({value:j.name,label:j.name})).sort((j,D)=>j.label>D.label?1:-1))},[v,h]),m.jsxs(m.Fragment,{children:[y?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:a(_),children:[m.jsxs(kS,{cols:2,children:[m.jsx(ue,{name:"byOwners",control:i,defaultValue:e.byOwners,render:({field:j,fieldState:D})=>{var M;return m.jsx($r,{...j,data:u,value:j.value??[],disabled:y,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(M=D.error)==null?void 0:M.message})}}),m.jsx(ue,{name:"byBusinesses",control:i,defaultValue:e.byBusinesses,render:({field:j,fieldState:D})=>{var M;return m.jsx($r,{...j,data:u,value:j.value??[],disabled:y,label:"Main Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(M=D.error)==null?void 0:M.message})}}),m.jsx(ue,{name:"byTags",control:i,defaultValue:e.byTags,render:({field:j,fieldState:D})=>{var M;return m.jsx($r,{...j,data:p,value:j.value??[],disabled:N,label:"Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(M=D.error)==null?void 0:M.message})}}),m.jsx(ue,{name:"fromAnyDate",control:i,defaultValue:e.fromDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:j,fieldState:D})=>{var M;return m.jsx(Ln,{...j,value:j.value||"",error:(M=D.error)==null?void 0:M.message,label:"From Date"})}}),m.jsx(ue,{name:"toAnyDate",control:i,defaultValue:e.toDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:j,fieldState:D})=>{var M;return m.jsx(Ln,{...j,value:j.value||"",error:(M=D.error)==null?void 0:M.message,label:"To Date"})}}),m.jsx(ue,{name:"chargesType",control:i,defaultValue:e.chargesType,render:({field:j,fieldState:D})=>{var M;return m.jsx(Gn,{...j,data:Z9,value:j.value??zo.All,disabled:y,label:"Charge Type",placeholder:"Filter income/expense",maxDropdownHeight:160,error:(M=D.error)==null?void 0:M.message})}}),m.jsx(ue,{name:"sortBy.field",control:i,defaultValue:((E=e.sortBy)==null?void 0:E.field)??pd.Date,render:({field:j,fieldState:D})=>{var M,R;return m.jsx(Gn,{...j,data:pDe,label:"Field to sort by",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(M=D.error)==null?void 0:M.message,rightSectionProps:{style:{width:"3.5rem"}},rightSection:m.jsx(Di,{defaultChecked:((R=e.sortBy)==null?void 0:R.asc)??!1,checked:l??!1,disabled:!d,onChange:I=>s(I.currentTarget.checked),color:"gray",onLabel:m.jsx("p",{children:"ASC"}),offLabel:m.jsx("p",{children:"DESC"})})})}}),m.jsx(ue,{name:"accountantApproval",control:i,defaultValue:e.accountantApproval,render:({field:j,fieldState:D})=>{var M;return m.jsx(Gn,{...j,value:[!0,"TRUE"].includes(j.value)?"TRUE":[!1,"FALSE"].includes(j.value)?"FALSE":"NULL",onChange:R=>o("accountantApproval",R==="TRUE"?!0:R==="FALSE"?!1:void 0),data:[{label:"Approved",value:"TRUE"},{label:"Not Approved",value:"FALSE"},{label:"All",value:"NULL"}],disabled:y,label:"Accountant Reviewed",placeholder:"All",maxDropdownHeight:160,error:(M=D.error)==null?void 0:M.message})}}),m.jsxs("div",{className:"flex flex-col gap-2 mt-4",children:[m.jsx("span",{children:"Missing Information:"}),m.jsx(Di,{defaultChecked:e.withoutInvoice??!1,onChange:j=>o("withoutInvoice",j.currentTarget.checked),label:"Without Invoices"}),m.jsx(Di,{defaultChecked:e.withoutDocuments??!1,onChange:j=>o("withoutDocuments",j.currentTarget.checked),label:"Without Documents"}),m.jsx(Di,{defaultChecked:e.unbalanced??!1,onChange:j=>o("unbalanced",j.currentTarget.checked),label:"Unbalanced businesses"})]})]}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",disabled:y||N,className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:w,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})]})}function vDe({filter:e,setFilter:n,activePage:t,setPage:i,totalPages:a=1}){const[r,o]=S.useState(!1),[l,s]=S.useState(!Fa(e)),{get:d,set:c}=kt();S.useEffect(()=>{const f=t>1?t.toFixed(0):null,p=d("page");f!==p&&c("page",f)},[t,d,c]),S.useEffect(()=>{const f=Fa(e)?null:encodeURIComponent(JSON.stringify(e)),p=d("chargesFilters");f!==p&&(c("chargesFilters",f),c("page"),i(1))},[e,d,c,i]);const u=S.useCallback(f=>{Fc(f,e)||(n(f),s(!Fa(f)))},[e,n]);return m.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[m.jsx(ol,{opened:r,onClose:()=>o(!1),content:m.jsx(hDe,{filter:e,setFilter:u,closeModal:()=>o(!1)}),modalSize:"xl"}),a>1&&m.jsx(ra,{className:"flex-auto",value:t,onChange:i,total:a}),m.jsx(Kn,{inline:!0,size:16,disabled:!l,children:m.jsx(Pe,{variant:"default",onClick:()=>o(!0),size:30,children:m.jsx(rc,{size:20})})})]})}const bT=()=>{var w;const{setFiltersContext:e}=S.useContext(dr),[n,t]=S.useState(void 0),[i,a]=S.useState(void 0),[r,o]=S.useState(void 0),[l,s]=S.useState(void 0),[d,c]=S.useState(!1),[u,f]=S.useState([]),{get:p}=kt(),{userContext:h}=S.useContext(Ur),[k,y]=S.useState(p("page")?Number(p("page")):1),[g,v]=S.useState(p("chargesFilters")?JSON.parse(decodeURIComponent(p("chargesFilters"))):{byOwners:[h==null?void 0:h.ownerId],sortBy:{field:pd.Date,asc:!1}}),N=S.useCallback(C=>{u.includes(C)?f(u.filter($=>$!==C)):f([...u,C])},[u]),[{data:x,fetching:F}]=Be({query:_ke,variables:{filters:g,page:k,limit:100}});function _(){f([])}return S.useEffect(()=>{var C;e(m.jsxs("div",{className:"flex flex-row gap-x-5",children:[m.jsx(vDe,{filter:g,setFilter:v,activePage:k,setPage:y,totalPages:(C=x==null?void 0:x.allCharges)==null?void 0:C.pageInfo.totalPages}),m.jsx(tt,{label:"Expand all accounts",children:m.jsx(Pe,{variant:"default",onClick:()=>c($=>!$),size:30,children:d?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})}),m.jsx(A7,{chargeIDs:u,resetMerge:_})]}))},[x,F,g,k,d,e,y,v,c,u]),m.jsxs(m.Fragment,{children:[F?m.jsx(Mi,{}):m.jsx(CS,{setEditChargeId:t,setInsertDocument:a,setMatchDocuments:o,setUploadDocument:s,toggleMergeCharge:N,mergeSelectedCharges:u,data:(w=x==null?void 0:x.allCharges)==null?void 0:w.nodes,isAllOpened:d}),m.jsx(R7,{chargeId:n,onDone:()=>t(void 0)}),i&&m.jsx(L7,{insertDocument:i,setInsertDocument:a}),l&&m.jsx(V7,{uploadDocument:l,setUploadDocument:s}),r&&m.jsx(B7,{chargeId:r.id,ownerId:r.ownerId,setMatchDocuments:()=>o(void 0)})]})};function J9({businessID:e,filter:n}){var f,p,h,k,y,g;const{fromDate:t,ownerIds:i,toDate:a}=n??{},[{data:r,fetching:o}]=Be({query:Cke,variables:{filters:{fromDate:t,ownerIds:i,toDate:a,businessIDs:[e]}}}),l=(r==null?void 0:r.businessTransactionsFromLedgerRecords.__typename)==="CommonError"?[]:(r==null?void 0:r.businessTransactionsFromLedgerRecords.businessTransactions)??[],s=[];for(let v=0;v<l.length;v++)s.push({...l[v],ilsBalance:v===0?l[v].amount.raw:(s[v-1].ilsBalance??0)+l[v].amount.raw,eurBalance:v===0?((f=l[v].eurAmount)==null?void 0:f.raw)??0:(s[v-1].eurBalance??0)+(((p=l[v].eurAmount)==null?void 0:p.raw)??0),gbpBalance:v===0?((h=l[v].gbpAmount)==null?void 0:h.raw)??0:(s[v-1].gbpBalance??0)+(((k=l[v].gbpAmount)==null?void 0:k.raw)??0),usdBalance:v===0?((y=l[v].usdAmount)==null?void 0:y.raw)??0:(s[v-1].usdBalance??0)+(((g=l[v].usdAmount)==null?void 0:g.raw)??0)});const d=l.some(v=>v.eurAmount),c=l.some(v=>v.usdAmount),u=l.some(v=>v.gbpAmount);return m.jsx("div",{className:"flex flex-row gap-5",children:o?m.jsx(Mi,{}):m.jsxs(al,{striped:!0,highlightOnHover:!0,children:[m.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:m.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[m.jsx("th",{children:"Business Name"}),m.jsx("th",{children:"Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Amount Balance"}),d&&m.jsx("th",{children:"EUR Amount"}),d&&m.jsx("th",{children:"EUR Balance"}),c&&m.jsx("th",{children:"USD Amount"}),c&&m.jsx("th",{children:"USD Balance"}),u&&m.jsx("th",{children:"GBP Amount"}),u&&m.jsx("th",{children:"GBP Balance"}),m.jsx("th",{children:"Reference1"}),m.jsx("th",{children:"Reference2"}),m.jsx("th",{children:"Details"}),m.jsx("th",{children:"Counter Account"})]})}),m.jsx("tbody",{children:s.map((v,N)=>{var x,F,_,w,C,$,E;return m.jsxs("tr",{children:[m.jsx("td",{children:v.business.name}),m.jsx("td",{children:v.invoiceDate?en(new Date(v.invoiceDate),"dd/MM/yy"):null}),m.jsx("td",{style:{whiteSpace:"nowrap"},children:v.amount.raw&&v.amount.raw!==0?m.jsx(Fi,{color:v.amount.raw>0?"green":"red",children:v.amount.formatted}):v.amount.formatted}),m.jsx("td",{children:v.ilsBalance===0?`${Tn(v.ilsBalance)} ILS`:m.jsx(Fi,{color:v.ilsBalance>0?"green":"red",children:`${v.ilsBalance.toFixed(2)} ILS`})}),d&&m.jsx("td",{style:{whiteSpace:"nowrap"},children:(x=v.eurAmount)!=null&&x.raw&&v.eurAmount.raw!==0?m.jsx(Fi,{color:v.eurAmount.raw>0?"green":"red",children:v.eurAmount.formatted}):(F=v.eurAmount)==null?void 0:F.formatted}),d&&m.jsx("td",{children:v.eurBalance===0?`${Tn(v.eurBalance)} EUR`:m.jsx(Fi,{color:v.eurBalance>0?"green":"red",children:`${v.eurBalance.toFixed(2)} EUR`})}),c&&m.jsx("td",{style:{whiteSpace:"nowrap"},children:(_=v.usdAmount)!=null&&_.raw&&v.usdAmount.raw!==0?m.jsx(Fi,{color:v.usdAmount.raw>0?"green":"red",children:v.usdAmount.formatted}):(w=v.usdAmount)==null?void 0:w.formatted}),c&&m.jsx("td",{children:v.usdBalance===0?`${Tn(v.usdBalance)} USD`:m.jsx(Fi,{color:v.usdBalance>0?"green":"red",children:`${v.usdBalance.toFixed(2)} USD`})}),u&&m.jsx("td",{style:{whiteSpace:"nowrap"},children:(C=v.gbpAmount)!=null&&C.raw&&v.gbpAmount.raw!==0?m.jsx(Fi,{color:v.gbpAmount.raw>0?"green":"red",children:v.gbpAmount.formatted}):($=v.gbpAmount)==null?void 0:$.formatted}),u&&m.jsx("td",{children:v.gbpBalance===0?`${Tn(v.gbpBalance)} GBP`:m.jsx(Fi,{color:v.gbpBalance>0?"green":"red",children:`${v.gbpBalance.toFixed(2)} GBP`})}),m.jsx("td",{children:v.reference1}),m.jsx("td",{children:v.reference2}),m.jsx("td",{children:v.details}),m.jsx("td",{children:(E=v.counterAccount)==null?void 0:E.name})]},N)})})]})})}function kDe({filter:e,setFilter:n,closeModal:t}){const{control:i,handleSubmit:a}=ki({defaultValues:{...e}}),[{data:r,fetching:o,error:l}]=Be({query:Hr}),{userContext:s}=S.useContext(Ur);S.useEffect(()=>{l&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[l]);const d=S.useMemo(()=>{var f;return((f=r==null?void 0:r.allFinancialEntities)==null?void 0:f.nodes.map(p=>({value:p.id,label:p.name})).sort((p,h)=>p.label>h.label?1:-1))??[]},[r]),c=f=>{n(f),t()};function u(){n({}),t()}return m.jsxs(m.Fragment,{children:[o?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:a(c),children:[m.jsx(ue,{name:"ownerIds",control:i,defaultValue:e.ownerIds,render:({field:f,fieldState:p})=>{var h;return m.jsx($r,{...f,data:d,value:f.value??[s==null?void 0:s.ownerId],disabled:o,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(h=p.error)==null?void 0:h.message})}}),m.jsx(ue,{name:"businessIDs",control:i,defaultValue:e.businessIDs,render:({field:f,fieldState:p})=>{var h;return m.jsx($r,{...f,data:d,value:f.value??void 0,disabled:o,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(h=p.error)==null?void 0:h.message})}}),m.jsx(ue,{name:"fromDate",control:i,defaultValue:e.fromDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:p})=>{var h;return m.jsx(Ln,{...f,value:!f.value||f.value==="Missing"?void 0:f.value,error:(h=p.error)==null?void 0:h.message,label:"From Date"})}}),m.jsx(ue,{name:"toDate",control:i,defaultValue:e.toDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:p})=>{var h;return m.jsx(Ln,{...f,value:!f.value||f.value==="Missing"?void 0:f.value,error:(h=p.error)==null?void 0:h.message,label:"To Date"})}}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:u,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})]})}function gDe({filter:e,setFilter:n}){const[t,i]=S.useState(!1),[a,r]=S.useState(!Fa(e)),{get:o,set:l}=kt();function s(c){return Object.entries(c??{}).filter(([f,p])=>p!==void 0&&Array.isArray(p)&&p.length>0).length>0}function d(c){var u,f;((u=c.fromDate)==null?void 0:u.trim())===""&&(c.fromDate=void 0),((f=c.toDate)==null?void 0:f.trim())===""&&(c.toDate=void 0),Fc(c,e)||(n(c),r(s(c)))}return S.useEffect(()=>{const c=Fa(e)?null:encodeURIComponent(JSON.stringify(e)),u=o("transactionsFilters");c!==u&&l("transactionsFilters",c)},[e,o,l]),m.jsxs(m.Fragment,{children:[m.jsx(ol,{opened:t,onClose:()=>i(!1),content:m.jsx(kDe,{filter:e,setFilter:d,closeModal:()=>i(!1)})}),m.jsx(Kn,{inline:!0,size:16,disabled:!a,children:m.jsx(Pe,{variant:"default",onClick:()=>i(!0),size:30,children:m.jsx(rc,{size:20})})})]})}const yDe=()=>{const{get:e}=kt(),{setFiltersContext:n}=S.useContext(dr),[t,i]=S.useState(e("transactionsFilters")?JSON.parse(decodeURIComponent(e("transactionsFilters"))):{}),[{data:a,fetching:r}]=Be({query:Pke,variables:{filters:t}});S.useEffect(()=>{n(m.jsx(gDe,{filter:t,setFilter:i}))},[a,t,n,i]);const o=S.useMemo(()=>(a==null?void 0:a.businessTransactionsSumFromLedgerRecords.__typename)==="CommonError"?[]:a!=null&&a.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?a.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((l,s)=>l.business.name.localeCompare(s.business.name)):[],[a==null?void 0:a.businessTransactionsSumFromLedgerRecords]);return r?m.jsx(Mi,{}):m.jsx(mg,{showButton:!0,moreInfo:l=>m.jsx(J9,{businessID:l.business.id,filter:t}),striped:!0,highlightOnHover:!0,stickyHeader:!0,items:o,columns:[{title:"Business Name",value:l=>l.business.name},{title:"Debit",value:l=>l.debit.formatted,style:{whiteSpace:"nowrap"}},{title:"Credit",value:l=>l.credit.formatted,style:{whiteSpace:"nowrap"}},{title:"Total",value:l=>l.total.raw&&(l.total.raw<-1e-4||l.total.raw>1e-4)?m.jsx(Fi,{color:l.total.raw>0?"green":"red",children:l.total.formatted}):l.total.formatted,style:{whiteSpace:"nowrap"}},{title:"EUR Debit",value:l=>{var s,d;return(d=(s=l.eurSum)==null?void 0:s.debit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"EUR Credit",value:l=>{var s,d;return(d=(s=l.eurSum)==null?void 0:s.credit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"EUR Total",value:l=>{var s,d,c,u;return(d=(s=l.eurSum)==null?void 0:s.total)!=null&&d.raw&&(l.eurSum.total.raw<-1e-4||l.eurSum.total.raw>1e-4)?m.jsx(Fi,{color:l.eurSum.total.raw>0?"green":"red",children:l.eurSum.total.formatted}):(u=(c=l.eurSum)==null?void 0:c.total)==null?void 0:u.formatted},style:{whiteSpace:"nowrap"}},{title:"USD Debit",value:l=>{var s,d;return(d=(s=l.usdSum)==null?void 0:s.debit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"USD Credit",value:l=>{var s,d;return(d=(s=l.usdSum)==null?void 0:s.credit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"USD Total",value:l=>{var s,d,c,u;return(d=(s=l.usdSum)==null?void 0:s.total)!=null&&d.raw&&(l.usdSum.total.raw<-1e-4||l.usdSum.total.raw>1e-4)?m.jsx(Fi,{color:l.usdSum.total.raw>0?"green":"red",children:l.usdSum.total.formatted}):(u=(c=l.usdSum)==null?void 0:c.total)==null?void 0:u.formatted},style:{whiteSpace:"nowrap"}},{title:"GBP Debit",value:l=>{var s,d;return(d=(s=l.gbpSum)==null?void 0:s.debit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"GBP Credit",value:l=>{var s,d;return(d=(s=l.gbpSum)==null?void 0:s.credit)==null?void 0:d.formatted},style:{whiteSpace:"nowrap"}},{title:"GBP Total",value:l=>{var s,d,c,u;return(d=(s=l.gbpSum)==null?void 0:s.total)!=null&&d.raw&&(l.gbpSum.total.raw<-1e-4||l.gbpSum.total.raw>1e-4)?m.jsx(Fi,{color:l.gbpSum.total.raw>0?"green":"red",children:l.gbpSum.total.formatted}):(u=(c=l.gbpSum)==null?void 0:c.total)==null?void 0:u.formatted},style:{whiteSpace:"nowrap"}}]})},SDe=({data:e})=>{const n=Se(Hve,e);return m.jsx("td",{children:m.jsx("div",{style:{whiteSpace:"nowrap"},children:n.hebrewName})})},NDe=({data:e})=>{const n=Se(Wve,e);return m.jsx("td",{children:m.jsx("div",{style:{whiteSpace:"nowrap"},children:n.name})})},bDe=({data:e,isAllOpened:n})=>{const[t,i]=S.useState(!1),[a,r]=S.useState(Se(Uve,e));return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{children:[m.jsx(NDe,{data:a}),m.jsx(SDe,{data:a}),m.jsx("td",{children:m.jsx("div",{className:"flex flex-col gap-2",children:m.jsx(Pe,{variant:"default",onClick:()=>{i(o=>!o)},size:30,children:n||t?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})})})]}),(n||t)&&m.jsx("tr",{children:m.jsx("td",{colSpan:12,children:m.jsx(vs,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:m.jsx(ZSe,{businessID:a.id,updateBusiness:r})})})})]})};function xDe({activePage:e,setPage:n,totalPages:t=1}){const{get:i,set:a}=kt();return S.useEffect(()=>{const r=e>1?e.toFixed(0):null,o=i("page");r!==o&&r!=="1"&&a("page",r)},[e,i,a]),m.jsx("div",{className:"flex flex-row gap-5 items-center",children:m.jsx(ra,{className:"flex-auto",value:e,onChange:n,total:t})})}const FDe=()=>{var d;const{get:e}=kt(),[n,t]=S.useState(!1),[i,a]=S.useState(e("page")?Number(e("page")):1),{setFiltersContext:r}=S.useContext(dr),[{data:o,fetching:l}]=Be({query:Oke,variables:{page:i,limit:100}});S.useEffect(()=>{var c;r(m.jsxs("div",{className:"flex flex-row gap-x-5",children:[m.jsx(xDe,{activePage:i,setPage:a,totalPages:(c=o==null?void 0:o.allBusinesses)==null?void 0:c.pageInfo.totalPages}),m.jsx(tt,{label:"Expand all businesses",children:m.jsx(Pe,{variant:"default",onClick:()=>t(u=>!u),size:30,children:n?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})})]}))},[o,i,n,r,a,t]);const s=((d=o==null?void 0:o.allBusinesses)==null?void 0:d.nodes.filter(c=>c.__typename==="LtdFinancialEntity").sort((c,u)=>c.name.toLowerCase()>u.name.toLowerCase()?1:-1))??[];return l?m.jsx(Mi,{}):m.jsxs(al,{striped:!0,highlightOnHover:!0,children:[m.jsx("thead",{className:"sticky top-0 z-20",children:m.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Hebrew Name"}),m.jsx("th",{children:"More Info"})]})}),m.jsx("tbody",{children:s.map(c=>m.jsx(bDe,{data:c,isAllOpened:n},c.id))})]})};/*!
 *  decimal.js v10.4.3
 *  An arbitrary-precision Decimal type for JavaScript.
 *  https://github.com/MikeMcl/decimal.js
 *  Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
 *  MIT Licence
 */var ad=9e15,sl=1e9,Jx="0123456789abcdef",uy="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",my="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",eF={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ad,maxE:ad,crypto:!1},eW,_r,je=!0,ES="[DecimalError] ",Go=ES+"Invalid argument: ",nW=ES+"Precision limit exceeded",tW=ES+"crypto unavailable",iW="[object Decimal]",Gt=Math.floor,ft=Math.pow,wDe=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_De=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,CDe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,aW=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ca=1e7,De=7,PDe=9007199254740991,ODe=uy.length-1,nF=my.length-1,te={toStringTag:iW};te.absoluteValue=te.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),we(e)};te.ceil=function(){return we(new this.constructor(this),this.e+1,2)};te.clampedTo=te.clamp=function(e,n){var t,i=this,a=i.constructor;if(e=new a(e),n=new a(n),!e.s||!n.s)return new a(NaN);if(e.gt(n))throw Error(Go+n);return t=i.cmp(e),t<0?e:i.cmp(n)>0?n:new a(i)};te.comparedTo=te.cmp=function(e){var n,t,i,a,r=this,o=r.d,l=(e=new r.constructor(e)).d,s=r.s,d=e.s;if(!o||!l)return!s||!d?NaN:s!==d?s:o===l?0:!o^s<0?1:-1;if(!o[0]||!l[0])return o[0]?s:l[0]?-d:0;if(s!==d)return s;if(r.e!==e.e)return r.e>e.e^s<0?1:-1;for(i=o.length,a=l.length,n=0,t=i<a?i:a;n<t;++n)if(o[n]!==l[n])return o[n]>l[n]^s<0?1:-1;return i===a?0:i>a^s<0?1:-1};te.cosine=te.cos=function(){var e,n,t=this,i=t.constructor;return t.d?t.d[0]?(e=i.precision,n=i.rounding,i.precision=e+Math.max(t.e,t.sd())+De,i.rounding=1,t=DDe(i,dW(i,t)),i.precision=e,i.rounding=n,we(_r==2||_r==3?t.neg():t,e,n,!0)):new i(1):new i(NaN)};te.cubeRoot=te.cbrt=function(){var e,n,t,i,a,r,o,l,s,d,c=this,u=c.constructor;if(!c.isFinite()||c.isZero())return new u(c);for(je=!1,r=c.s*ft(c.s*c,1/3),!r||Math.abs(r)==1/0?(t=Ot(c.d),e=c.e,(r=(e-t.length+1)%3)&&(t+=r==1||r==-2?"0":"00"),r=ft(t,1/3),e=Gt((e+1)/3)-(e%3==(e<0?-1:2)),r==1/0?t="5e"+e:(t=r.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),i=new u(t),i.s=c.s):i=new u(r.toString()),o=(e=u.precision)+3;;)if(l=i,s=l.times(l).times(l),d=s.plus(c),i=hn(d.plus(c).times(l),d.plus(s),o+2,1),Ot(l.d).slice(0,o)===(t=Ot(i.d)).slice(0,o))if(t=t.slice(o-3,o+1),t=="9999"||!a&&t=="4999"){if(!a&&(we(l,e+1,0),l.times(l).times(l).eq(c))){i=l;break}o+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(we(i,e+1,1),n=!i.times(i).times(i).eq(c));break}return je=!0,we(i,e,u.rounding,n)};te.decimalPlaces=te.dp=function(){var e,n=this.d,t=NaN;if(n){if(e=n.length-1,t=(e-Gt(this.e/De))*De,e=n[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};te.dividedBy=te.div=function(e){return hn(this,new this.constructor(e))};te.dividedToIntegerBy=te.divToInt=function(e){var n=this,t=n.constructor;return we(hn(n,new t(e),0,1,1),t.precision,t.rounding)};te.equals=te.eq=function(e){return this.cmp(e)===0};te.floor=function(){return we(new this.constructor(this),this.e+1,3)};te.greaterThan=te.gt=function(e){return this.cmp(e)>0};te.greaterThanOrEqualTo=te.gte=function(e){var n=this.cmp(e);return n==1||n===0};te.hyperbolicCosine=te.cosh=function(){var e,n,t,i,a,r=this,o=r.constructor,l=new o(1);if(!r.isFinite())return new o(r.s?1/0:NaN);if(r.isZero())return l;t=o.precision,i=o.rounding,o.precision=t+Math.max(r.e,r.sd())+4,o.rounding=1,a=r.d.length,a<32?(e=Math.ceil(a/3),n=(1/IS(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),r=Kd(o,1,r.times(n),new o(1),!0);for(var s,d=e,c=new o(8);d--;)s=r.times(r),r=l.minus(s.times(c.minus(s.times(c))));return we(r,o.precision=t,o.rounding=i,!0)};te.hyperbolicSine=te.sinh=function(){var e,n,t,i,a=this,r=a.constructor;if(!a.isFinite()||a.isZero())return new r(a);if(n=r.precision,t=r.rounding,r.precision=n+Math.max(a.e,a.sd())+4,r.rounding=1,i=a.d.length,i<3)a=Kd(r,2,a,a,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,a=a.times(1/IS(5,e)),a=Kd(r,2,a,a,!0);for(var o,l=new r(5),s=new r(16),d=new r(20);e--;)o=a.times(a),a=a.times(l.plus(o.times(s.times(o).plus(d))))}return r.precision=n,r.rounding=t,we(a,n,t,!0)};te.hyperbolicTangent=te.tanh=function(){var e,n,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(e=i.precision,n=i.rounding,i.precision=e+7,i.rounding=1,hn(t.sinh(),t.cosh(),i.precision=e,i.rounding=n)):new i(t.s)};te.inverseCosine=te.acos=function(){var e,n=this,t=n.constructor,i=n.abs().cmp(1),a=t.precision,r=t.rounding;return i!==-1?i===0?n.isNeg()?Sa(t,a,r):new t(0):new t(NaN):n.isZero()?Sa(t,a+4,r).times(.5):(t.precision=a+6,t.rounding=1,n=n.asin(),e=Sa(t,a+4,r).times(.5),t.precision=a,t.rounding=r,e.minus(n))};te.inverseHyperbolicCosine=te.acosh=function(){var e,n,t=this,i=t.constructor;return t.lte(1)?new i(t.eq(1)?0:NaN):t.isFinite()?(e=i.precision,n=i.rounding,i.precision=e+Math.max(Math.abs(t.e),t.sd())+4,i.rounding=1,je=!1,t=t.times(t).minus(1).sqrt().plus(t),je=!0,i.precision=e,i.rounding=n,t.ln()):new i(t)};te.inverseHyperbolicSine=te.asinh=function(){var e,n,t=this,i=t.constructor;return!t.isFinite()||t.isZero()?new i(t):(e=i.precision,n=i.rounding,i.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,i.rounding=1,je=!1,t=t.times(t).plus(1).sqrt().plus(t),je=!0,i.precision=e,i.rounding=n,t.ln())};te.inverseHyperbolicTangent=te.atanh=function(){var e,n,t,i,a=this,r=a.constructor;return a.isFinite()?a.e>=0?new r(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=r.precision,n=r.rounding,i=a.sd(),Math.max(i,e)<2*-a.e-1?we(new r(a),e,n,!0):(r.precision=t=i-a.e,a=hn(a.plus(1),new r(1).minus(a),t+e,1),r.precision=e+4,r.rounding=1,a=a.ln(),r.precision=e,r.rounding=n,a.times(.5))):new r(NaN)};te.inverseSine=te.asin=function(){var e,n,t,i,a=this,r=a.constructor;return a.isZero()?new r(a):(n=a.abs().cmp(1),t=r.precision,i=r.rounding,n!==-1?n===0?(e=Sa(r,t+4,i).times(.5),e.s=a.s,e):new r(NaN):(r.precision=t+6,r.rounding=1,a=a.div(new r(1).minus(a.times(a)).sqrt().plus(1)).atan(),r.precision=t,r.rounding=i,a.times(2)))};te.inverseTangent=te.atan=function(){var e,n,t,i,a,r,o,l,s,d=this,c=d.constructor,u=c.precision,f=c.rounding;if(d.isFinite()){if(d.isZero())return new c(d);if(d.abs().eq(1)&&u+4<=nF)return o=Sa(c,u+4,f).times(.25),o.s=d.s,o}else{if(!d.s)return new c(NaN);if(u+4<=nF)return o=Sa(c,u+4,f).times(.5),o.s=d.s,o}for(c.precision=l=u+10,c.rounding=1,t=Math.min(28,l/De+2|0),e=t;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(je=!1,n=Math.ceil(l/De),i=1,s=d.times(d),o=new c(d),a=d;e!==-1;)if(a=a.times(s),r=o.minus(a.div(i+=2)),a=a.times(s),o=r.plus(a.div(i+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===r.d[e]&&e--;);return t&&(o=o.times(2<<t-1)),je=!0,we(o,c.precision=u,c.rounding=f,!0)};te.isFinite=function(){return!!this.d};te.isInteger=te.isInt=function(){return!!this.d&&Gt(this.e/De)>this.d.length-2};te.isNaN=function(){return!this.s};te.isNegative=te.isNeg=function(){return this.s<0};te.isPositive=te.isPos=function(){return this.s>0};te.isZero=function(){return!!this.d&&this.d[0]===0};te.lessThan=te.lt=function(e){return this.cmp(e)<0};te.lessThanOrEqualTo=te.lte=function(e){return this.cmp(e)<1};te.logarithm=te.log=function(e){var n,t,i,a,r,o,l,s,d=this,c=d.constructor,u=c.precision,f=c.rounding,p=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(t=d.d,d.s<0||!t||!t[0]||d.eq(1))return new c(t&&!t[0]?-1/0:d.s!=1?NaN:t?0:1/0);if(n)if(t.length>1)r=!0;else{for(a=t[0];a%10===0;)a/=10;r=a!==1}if(je=!1,l=u+p,o=wo(d,l),i=n?fy(c,l+10):wo(e,l),s=hn(o,i,l,1),Fm(s.d,a=u,f))do if(l+=10,o=wo(d,l),i=n?fy(c,l+10):wo(e,l),s=hn(o,i,l,1),!r){+Ot(s.d).slice(a+1,a+15)+1==1e14&&(s=we(s,u+1,0));break}while(Fm(s.d,a+=10,f));return je=!0,we(s,u,f)};te.minus=te.sub=function(e){var n,t,i,a,r,o,l,s,d,c,u,f,p=this,h=p.constructor;if(e=new h(e),!p.d||!e.d)return!p.s||!e.s?e=new h(NaN):p.d?e.s=-e.s:e=new h(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(d=p.d,f=e.d,l=h.precision,s=h.rounding,!d[0]||!f[0]){if(f[0])e.s=-e.s;else if(d[0])e=new h(p);else return new h(s===3?-0:0);return je?we(e,l,s):e}if(t=Gt(e.e/De),c=Gt(p.e/De),d=d.slice(),r=c-t,r){for(u=r<0,u?(n=d,r=-r,o=f.length):(n=f,t=c,o=d.length),i=Math.max(Math.ceil(l/De),o)+2,r>i&&(r=i,n.length=1),n.reverse(),i=r;i--;)n.push(0);n.reverse()}else{for(i=d.length,o=f.length,u=i<o,u&&(o=i),i=0;i<o;i++)if(d[i]!=f[i]){u=d[i]<f[i];break}r=0}for(u&&(n=d,d=f,f=n,e.s=-e.s),o=d.length,i=f.length-o;i>0;--i)d[o++]=0;for(i=f.length;i>r;){if(d[--i]<f[i]){for(a=i;a&&d[--a]===0;)d[a]=Ca-1;--d[a],d[i]+=Ca}d[i]-=f[i]}for(;d[--o]===0;)d.pop();for(;d[0]===0;d.shift())--t;return d[0]?(e.d=d,e.e=$S(d,t),je?we(e,l,s):e):new h(s===3?-0:0)};te.modulo=te.mod=function(e){var n,t=this,i=t.constructor;return e=new i(e),!t.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||t.d&&!t.d[0]?we(new i(t),i.precision,i.rounding):(je=!1,i.modulo==9?(n=hn(t,e.abs(),0,3,1),n.s*=e.s):n=hn(t,e,0,i.modulo,1),n=n.times(e),je=!0,t.minus(n))};te.naturalExponential=te.exp=function(){return tF(this)};te.naturalLogarithm=te.ln=function(){return wo(this)};te.negated=te.neg=function(){var e=new this.constructor(this);return e.s=-e.s,we(e)};te.plus=te.add=function(e){var n,t,i,a,r,o,l,s,d,c,u=this,f=u.constructor;if(e=new f(e),!u.d||!e.d)return!u.s||!e.s?e=new f(NaN):u.d||(e=new f(e.d||u.s===e.s?u:NaN)),e;if(u.s!=e.s)return e.s=-e.s,u.minus(e);if(d=u.d,c=e.d,l=f.precision,s=f.rounding,!d[0]||!c[0])return c[0]||(e=new f(u)),je?we(e,l,s):e;if(r=Gt(u.e/De),i=Gt(e.e/De),d=d.slice(),a=r-i,a){for(a<0?(t=d,a=-a,o=c.length):(t=c,i=r,o=d.length),r=Math.ceil(l/De),o=r>o?r+1:o+1,a>o&&(a=o,t.length=1),t.reverse();a--;)t.push(0);t.reverse()}for(o=d.length,a=c.length,o-a<0&&(a=o,t=c,c=d,d=t),n=0;a;)n=(d[--a]=d[a]+c[a]+n)/Ca|0,d[a]%=Ca;for(n&&(d.unshift(n),++i),o=d.length;d[--o]==0;)d.pop();return e.d=d,e.e=$S(d,i),je?we(e,l,s):e};te.precision=te.sd=function(e){var n,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Go+e);return t.d?(n=rW(t.d),e&&t.e+1>n&&(n=t.e+1)):n=NaN,n};te.round=function(){var e=this,n=e.constructor;return we(new n(e),e.e+1,n.rounding)};te.sine=te.sin=function(){var e,n,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(e=i.precision,n=i.rounding,i.precision=e+Math.max(t.e,t.sd())+De,i.rounding=1,t=$De(i,dW(i,t)),i.precision=e,i.rounding=n,we(_r>2?t.neg():t,e,n,!0)):new i(NaN)};te.squareRoot=te.sqrt=function(){var e,n,t,i,a,r,o=this,l=o.d,s=o.e,d=o.s,c=o.constructor;if(d!==1||!l||!l[0])return new c(!d||d<0&&(!l||l[0])?NaN:l?o:1/0);for(je=!1,d=Math.sqrt(+o),d==0||d==1/0?(n=Ot(l),(n.length+s)%2==0&&(n+="0"),d=Math.sqrt(n),s=Gt((s+1)/2)-(s<0||s%2),d==1/0?n="5e"+s:(n=d.toExponential(),n=n.slice(0,n.indexOf("e")+1)+s),i=new c(n)):i=new c(d.toString()),t=(s=c.precision)+3;;)if(r=i,i=r.plus(hn(o,r,t+2,1)).times(.5),Ot(r.d).slice(0,t)===(n=Ot(i.d)).slice(0,t))if(n=n.slice(t-3,t+1),n=="9999"||!a&&n=="4999"){if(!a&&(we(r,s+1,0),r.times(r).eq(o))){i=r;break}t+=4,a=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(we(i,s+1,1),e=!i.times(i).eq(o));break}return je=!0,we(i,s,c.rounding,e)};te.tangent=te.tan=function(){var e,n,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(e=i.precision,n=i.rounding,i.precision=e+10,i.rounding=1,t=t.sin(),t.s=1,t=hn(t,new i(1).minus(t.times(t)).sqrt(),e+10,0),i.precision=e,i.rounding=n,we(_r==2||_r==4?t.neg():t,e,n,!0)):new i(NaN)};te.times=te.mul=function(e){var n,t,i,a,r,o,l,s,d,c=this,u=c.constructor,f=c.d,p=(e=new u(e)).d;if(e.s*=c.s,!f||!f[0]||!p||!p[0])return new u(!e.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?e.s/0:e.s*0);for(t=Gt(c.e/De)+Gt(e.e/De),s=f.length,d=p.length,s<d&&(r=f,f=p,p=r,o=s,s=d,d=o),r=[],o=s+d,i=o;i--;)r.push(0);for(i=d;--i>=0;){for(n=0,a=s+i;a>i;)l=r[a]+p[i]*f[a-i-1]+n,r[a--]=l%Ca|0,n=l/Ca|0;r[a]=(r[a]+n)%Ca|0}for(;!r[--o];)r.pop();return n?++t:r.shift(),e.d=r,e.e=$S(r,t),je?we(e,u.precision,u.rounding):e};te.toBinary=function(e,n){return i1(this,2,e,n)};te.toDecimalPlaces=te.toDP=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(hi(e,0,sl),n===void 0?n=i.rounding:hi(n,0,8),we(t,e+t.e+1,n))};te.toExponential=function(e,n){var t,i=this,a=i.constructor;return e===void 0?t=sr(i,!0):(hi(e,0,sl),n===void 0?n=a.rounding:hi(n,0,8),i=we(new a(i),e+1,n),t=sr(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};te.toFixed=function(e,n){var t,i,a=this,r=a.constructor;return e===void 0?t=sr(a):(hi(e,0,sl),n===void 0?n=r.rounding:hi(n,0,8),i=we(new r(a),e+a.e+1,n),t=sr(i,!1,e+i.e+1)),a.isNeg()&&!a.isZero()?"-"+t:t};te.toFraction=function(e){var n,t,i,a,r,o,l,s,d,c,u,f,p=this,h=p.d,k=p.constructor;if(!h)return new k(p);if(d=t=new k(1),i=s=new k(0),n=new k(i),r=n.e=rW(h)-p.e-1,o=r%De,n.d[0]=ft(10,o<0?De+o:o),e==null)e=r>0?n:d;else{if(l=new k(e),!l.isInt()||l.lt(d))throw Error(Go+l);e=l.gt(n)?r>0?n:d:l}for(je=!1,l=new k(Ot(h)),c=k.precision,k.precision=r=h.length*De*2;u=hn(l,n,0,1,1),a=t.plus(u.times(i)),a.cmp(e)!=1;)t=i,i=a,a=d,d=s.plus(u.times(a)),s=a,a=n,n=l.minus(u.times(a)),l=a;return a=hn(e.minus(t),i,0,1,1),s=s.plus(a.times(d)),t=t.plus(a.times(i)),s.s=d.s=p.s,f=hn(d,i,r,1).minus(p).abs().cmp(hn(s,t,r,1).minus(p).abs())<1?[d,i]:[s,t],k.precision=c,je=!0,f};te.toHexadecimal=te.toHex=function(e,n){return i1(this,16,e,n)};te.toNearest=function(e,n){var t=this,i=t.constructor;if(t=new i(t),e==null){if(!t.d)return t;e=new i(1),n=i.rounding}else{if(e=new i(e),n===void 0?n=i.rounding:hi(n,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(je=!1,t=hn(t,e,0,n,1).times(e),je=!0,we(t)):(e.s=t.s,t=e),t};te.toNumber=function(){return+this};te.toOctal=function(e,n){return i1(this,8,e,n)};te.toPower=te.pow=function(e){var n,t,i,a,r,o,l=this,s=l.constructor,d=+(e=new s(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new s(ft(+l,d));if(l=new s(l),l.eq(1))return l;if(i=s.precision,r=s.rounding,e.eq(1))return we(l,i,r);if(n=Gt(e.e/De),n>=e.d.length-1&&(t=d<0?-d:d)<=PDe)return a=oW(s,l,t,i),e.s<0?new s(1).div(a):we(a,i,r);if(o=l.s,o<0){if(n<e.d.length-1)return new s(NaN);if(e.d[n]&1||(o=1),l.e==0&&l.d[0]==1&&l.d.length==1)return l.s=o,l}return t=ft(+l,d),n=t==0||!isFinite(t)?Gt(d*(Math.log("0."+Ot(l.d))/Math.LN10+l.e+1)):new s(t+"").e,n>s.maxE+1||n<s.minE-1?new s(n>0?o/0:0):(je=!1,s.rounding=l.s=1,t=Math.min(12,(n+"").length),a=tF(e.times(wo(l,i+t)),i),a.d&&(a=we(a,i+5,1),Fm(a.d,i,r)&&(n=i+10,a=we(tF(e.times(wo(l,n+t)),n),n+5,1),+Ot(a.d).slice(i+1,i+15)+1==1e14&&(a=we(a,i+1,0)))),a.s=o,je=!0,s.rounding=r,we(a,i,r))};te.toPrecision=function(e,n){var t,i=this,a=i.constructor;return e===void 0?t=sr(i,i.e<=a.toExpNeg||i.e>=a.toExpPos):(hi(e,1,sl),n===void 0?n=a.rounding:hi(n,0,8),i=we(new a(i),e,n),t=sr(i,e<=i.e||i.e<=a.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+t:t};te.toSignificantDigits=te.toSD=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(hi(e,1,sl),n===void 0?n=i.rounding:hi(n,0,8)),we(new i(t),e,n)};te.toString=function(){var e=this,n=e.constructor,t=sr(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};te.truncated=te.trunc=function(){return we(new this.constructor(this),this.e+1,1)};te.valueOf=te.toJSON=function(){var e=this,n=e.constructor,t=sr(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+t:t};function Ot(e){var n,t,i,a=e.length-1,r="",o=e[0];if(a>0){for(r+=o,n=1;n<a;n++)i=e[n]+"",t=De-i.length,t&&(r+=co(t)),r+=i;o=e[n],i=o+"",t=De-i.length,t&&(r+=co(t))}else if(o===0)return"0";for(;o%10===0;)o/=10;return r+o}function hi(e,n,t){if(e!==~~e||e<n||e>t)throw Error(Go+e)}function Fm(e,n,t,i){var a,r,o,l;for(r=e[0];r>=10;r/=10)--n;return--n<0?(n+=De,a=0):(a=Math.ceil((n+1)/De),n%=De),r=ft(10,De-n),l=e[a]%r|0,i==null?n<3?(n==0?l=l/100|0:n==1&&(l=l/10|0),o=t<4&&l==99999||t>3&&l==49999||l==5e4||l==0):o=(t<4&&l+1==r||t>3&&l+1==r/2)&&(e[a+1]/r/100|0)==ft(10,n-2)-1||(l==r/2||l==0)&&(e[a+1]/r/100|0)==0:n<4?(n==0?l=l/1e3|0:n==1?l=l/100|0:n==2&&(l=l/10|0),o=(i||t<4)&&l==9999||!i&&t>3&&l==4999):o=((i||t<4)&&l+1==r||!i&&t>3&&l+1==r/2)&&(e[a+1]/r/1e3|0)==ft(10,n-3)-1,o}function Sh(e,n,t){for(var i,a=[0],r,o=0,l=e.length;o<l;){for(r=a.length;r--;)a[r]*=n;for(a[0]+=Jx.indexOf(e.charAt(o++)),i=0;i<a.length;i++)a[i]>t-1&&(a[i+1]===void 0&&(a[i+1]=0),a[i+1]+=a[i]/t|0,a[i]%=t)}return a.reverse()}function DDe(e,n){var t,i,a;if(n.isZero())return n;i=n.d.length,i<32?(t=Math.ceil(i/3),a=(1/IS(4,t)).toString()):(t=16,a="2.3283064365386962890625e-10"),e.precision+=t,n=Kd(e,1,n.times(a),new e(1));for(var r=t;r--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=t,n}var hn=function(){function e(i,a,r){var o,l=0,s=i.length;for(i=i.slice();s--;)o=i[s]*a+l,i[s]=o%r|0,l=o/r|0;return l&&i.unshift(l),i}function n(i,a,r,o){var l,s;if(r!=o)s=r>o?1:-1;else for(l=s=0;l<r;l++)if(i[l]!=a[l]){s=i[l]>a[l]?1:-1;break}return s}function t(i,a,r,o){for(var l=0;r--;)i[r]-=l,l=i[r]<a[r]?1:0,i[r]=l*o+i[r]-a[r];for(;!i[0]&&i.length>1;)i.shift()}return function(i,a,r,o,l,s){var d,c,u,f,p,h,k,y,g,v,N,x,F,_,w,C,$,E,j,D,M=i.constructor,R=i.s==a.s?1:-1,I=i.d,L=a.d;if(!I||!I[0]||!L||!L[0])return new M(!i.s||!a.s||(I?L&&I[0]==L[0]:!L)?NaN:I&&I[0]==0||!L?R*0:R/0);for(s?(p=1,c=i.e-a.e):(s=Ca,p=De,c=Gt(i.e/p)-Gt(a.e/p)),j=L.length,$=I.length,g=new M(R),v=g.d=[],u=0;L[u]==(I[u]||0);u++);if(L[u]>(I[u]||0)&&c--,r==null?(_=r=M.precision,o=M.rounding):l?_=r+(i.e-a.e)+1:_=r,_<0)v.push(1),h=!0;else{if(_=_/p+2|0,u=0,j==1){for(f=0,L=L[0],_++;(u<$||f)&&_--;u++)w=f*s+(I[u]||0),v[u]=w/L|0,f=w%L|0;h=f||u<$}else{for(f=s/(L[0]+1)|0,f>1&&(L=e(L,f,s),I=e(I,f,s),j=L.length,$=I.length),C=j,N=I.slice(0,j),x=N.length;x<j;)N[x++]=0;D=L.slice(),D.unshift(0),E=L[0],L[1]>=s/2&&++E;do f=0,d=n(L,N,j,x),d<0?(F=N[0],j!=x&&(F=F*s+(N[1]||0)),f=F/E|0,f>1?(f>=s&&(f=s-1),k=e(L,f,s),y=k.length,x=N.length,d=n(k,N,y,x),d==1&&(f--,t(k,j<y?D:L,y,s))):(f==0&&(d=f=1),k=L.slice()),y=k.length,y<x&&k.unshift(0),t(N,k,x,s),d==-1&&(x=N.length,d=n(L,N,j,x),d<1&&(f++,t(N,j<x?D:L,x,s))),x=N.length):d===0&&(f++,N=[0]),v[u++]=f,d&&N[0]?N[x++]=I[C]||0:(N=[I[C]],x=1);while((C++<$||N[0]!==void 0)&&_--);h=N[0]!==void 0}v[0]||v.shift()}if(p==1)g.e=c,eW=h;else{for(u=1,f=v[0];f>=10;f/=10)u++;g.e=u+c*p-1,we(g,l?r+g.e+1:r,o,h)}return g}}();function we(e,n,t,i){var a,r,o,l,s,d,c,u,f,p=e.constructor;e:if(n!=null){if(u=e.d,!u)return e;for(a=1,l=u[0];l>=10;l/=10)a++;if(r=n-a,r<0)r+=De,o=n,c=u[f=0],s=c/ft(10,a-o-1)%10|0;else if(f=Math.ceil((r+1)/De),l=u.length,f>=l)if(i){for(;l++<=f;)u.push(0);c=s=0,a=1,r%=De,o=r-De+1}else break e;else{for(c=l=u[f],a=1;l>=10;l/=10)a++;r%=De,o=r-De+a,s=o<0?0:c/ft(10,a-o-1)%10|0}if(i=i||n<0||u[f+1]!==void 0||(o<0?c:c%ft(10,a-o-1)),d=t<4?(s||i)&&(t==0||t==(e.s<0?3:2)):s>5||s==5&&(t==4||i||t==6&&(r>0?o>0?c/ft(10,a-o):0:u[f-1])%10&1||t==(e.s<0?8:7)),n<1||!u[0])return u.length=0,d?(n-=e.e+1,u[0]=ft(10,(De-n%De)%De),e.e=-n||0):u[0]=e.e=0,e;if(r==0?(u.length=f,l=1,f--):(u.length=f+1,l=ft(10,De-r),u[f]=o>0?(c/ft(10,a-o)%ft(10,o)|0)*l:0),d)for(;;)if(f==0){for(r=1,o=u[0];o>=10;o/=10)r++;for(o=u[0]+=l,l=1;o>=10;o/=10)l++;r!=l&&(e.e++,u[0]==Ca&&(u[0]=1));break}else{if(u[f]+=l,u[f]!=Ca)break;u[f--]=0,l=1}for(r=u.length;u[--r]===0;)u.pop()}return je&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function sr(e,n,t){if(!e.isFinite())return sW(e);var i,a=e.e,r=Ot(e.d),o=r.length;return n?(t&&(i=t-o)>0?r=r.charAt(0)+"."+r.slice(1)+co(i):o>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(e.e<0?"e":"e+")+e.e):a<0?(r="0."+co(-a-1)+r,t&&(i=t-o)>0&&(r+=co(i))):a>=o?(r+=co(a+1-o),t&&(i=t-a-1)>0&&(r=r+"."+co(i))):((i=a+1)<o&&(r=r.slice(0,i)+"."+r.slice(i)),t&&(i=t-o)>0&&(a+1===o&&(r+="."),r+=co(i))),r}function $S(e,n){var t=e[0];for(n*=De;t>=10;t/=10)n++;return n}function fy(e,n,t){if(n>ODe)throw je=!0,t&&(e.precision=t),Error(nW);return we(new e(uy),n,1,!0)}function Sa(e,n,t){if(n>nF)throw Error(nW);return we(new e(my),n,t,!0)}function rW(e){var n=e.length-1,t=n*De+1;if(n=e[n],n){for(;n%10==0;n/=10)t--;for(n=e[0];n>=10;n/=10)t++}return t}function co(e){for(var n="";e--;)n+="0";return n}function oW(e,n,t,i){var a,r=new e(1),o=Math.ceil(i/De+4);for(je=!1;;){if(t%2&&(r=r.times(n),FT(r.d,o)&&(a=!0)),t=Gt(t/2),t===0){t=r.d.length-1,a&&r.d[t]===0&&++r.d[t];break}n=n.times(n),FT(n.d,o)}return je=!0,r}function xT(e){return e.d[e.d.length-1]&1}function lW(e,n,t){for(var i,a=new e(n[0]),r=0;++r<n.length;)if(i=new e(n[r]),i.s)a[t](i)&&(a=i);else{a=i;break}return a}function tF(e,n){var t,i,a,r,o,l,s,d=0,c=0,u=0,f=e.constructor,p=f.rounding,h=f.precision;if(!e.d||!e.d[0]||e.e>17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(je=!1,s=h):s=n,l=new f(.03125);e.e>-2;)e=e.times(l),u+=5;for(i=Math.log(ft(2,u))/Math.LN10*2+5|0,s+=i,t=r=o=new f(1),f.precision=s;;){if(r=we(r.times(e),s,1),t=t.times(++c),l=o.plus(hn(r,t,s,1)),Ot(l.d).slice(0,s)===Ot(o.d).slice(0,s)){for(a=u;a--;)o=we(o.times(o),s,1);if(n==null)if(d<3&&Fm(o.d,s-i,p,d))f.precision=s+=10,t=r=l=new f(1),c=0,d++;else return we(o,f.precision=h,p,je=!0);else return f.precision=h,o}o=l}}function wo(e,n){var t,i,a,r,o,l,s,d,c,u,f,p=1,h=10,k=e,y=k.d,g=k.constructor,v=g.rounding,N=g.precision;if(k.s<0||!y||!y[0]||!k.e&&y[0]==1&&y.length==1)return new g(y&&!y[0]?-1/0:k.s!=1?NaN:y?0:k);if(n==null?(je=!1,c=N):c=n,g.precision=c+=h,t=Ot(y),i=t.charAt(0),Math.abs(r=k.e)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)k=k.times(e),t=Ot(k.d),i=t.charAt(0),p++;r=k.e,i>1?(k=new g("0."+t),r++):k=new g(i+"."+t.slice(1))}else return d=fy(g,c+2,N).times(r+""),k=wo(new g(i+"."+t.slice(1)),c-h).plus(d),g.precision=N,n==null?we(k,N,v,je=!0):k;for(u=k,s=o=k=hn(k.minus(1),k.plus(1),c,1),f=we(k.times(k),c,1),a=3;;){if(o=we(o.times(f),c,1),d=s.plus(hn(o,new g(a),c,1)),Ot(d.d).slice(0,c)===Ot(s.d).slice(0,c))if(s=s.times(2),r!==0&&(s=s.plus(fy(g,c+2,N).times(r+""))),s=hn(s,new g(p),c,1),n==null)if(Fm(s.d,c-h,v,l))g.precision=c+=h,d=o=k=hn(u.minus(1),u.plus(1),c,1),f=we(k.times(k),c,1),a=l=1;else return we(s,g.precision=N,v,je=!0);else return g.precision=N,s;s=d,a+=2}}function sW(e){return String(e.s*e.s/0)}function iF(e,n){var t,i,a;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;i++);for(a=n.length;n.charCodeAt(a-1)===48;--a);if(n=n.slice(i,a),n){if(a-=i,e.e=t=t-i-1,e.d=[],i=(t+1)%De,t<0&&(i+=De),i<a){for(i&&e.d.push(+n.slice(0,i)),a-=De;i<a;)e.d.push(+n.slice(i,i+=De));n=n.slice(i),i=De-n.length}else i-=a;for(;i--;)n+="0";e.d.push(+n),je&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function EDe(e,n){var t,i,a,r,o,l,s,d,c;if(n.indexOf("_")>-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),aW.test(n))return iF(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(_De.test(n))t=16,n=n.toLowerCase();else if(wDe.test(n))t=2;else if(CDe.test(n))t=8;else throw Error(Go+n);for(r=n.search(/p/i),r>0?(s=+n.slice(r+1),n=n.substring(2,r)):n=n.slice(2),r=n.indexOf("."),o=r>=0,i=e.constructor,o&&(n=n.replace(".",""),l=n.length,r=l-r,a=oW(i,new i(t),r,r*2)),d=Sh(n,t,Ca),c=d.length-1,r=c;d[r]===0;--r)d.pop();return r<0?new i(e.s*0):(e.e=$S(d,c),e.d=d,je=!1,o&&(e=hn(e,a,l*4)),s&&(e=e.times(Math.abs(s)<54?ft(2,s):df.pow(2,s))),je=!0,e)}function $De(e,n){var t,i=n.d.length;if(i<3)return n.isZero()?n:Kd(e,2,n,n);t=1.4*Math.sqrt(i),t=t>16?16:t|0,n=n.times(1/IS(5,t)),n=Kd(e,2,n,n);for(var a,r=new e(5),o=new e(16),l=new e(20);t--;)a=n.times(n),n=n.times(r.plus(a.times(o.times(a).minus(l))));return n}function Kd(e,n,t,i,a){var r,o,l,s,d=e.precision,c=Math.ceil(d/De);for(je=!1,s=t.times(t),l=new e(i);;){if(o=hn(l.times(s),new e(n++*n++),d,1),l=a?i.plus(o):i.minus(o),i=hn(o.times(s),new e(n++*n++),d,1),o=l.plus(i),o.d[c]!==void 0){for(r=c;o.d[r]===l.d[r]&&r--;);if(r==-1)break}r=l,l=i,i=o,o=r}return je=!0,o.d.length=c+1,o}function IS(e,n){for(var t=e;--n;)t*=e;return t}function dW(e,n){var t,i=n.s<0,a=Sa(e,e.precision,1),r=a.times(.5);if(n=n.abs(),n.lte(r))return _r=i?4:1,n;if(t=n.divToInt(a),t.isZero())_r=i?3:2;else{if(n=n.minus(t.times(a)),n.lte(r))return _r=xT(t)?i?2:3:i?4:1,n;_r=xT(t)?i?1:4:i?3:2}return n.minus(a).abs()}function i1(e,n,t,i){var a,r,o,l,s,d,c,u,f,p=e.constructor,h=t!==void 0;if(h?(hi(t,1,sl),i===void 0?i=p.rounding:hi(i,0,8)):(t=p.precision,i=p.rounding),!e.isFinite())c=sW(e);else{for(c=sr(e),o=c.indexOf("."),h?(a=2,n==16?t=t*4-3:n==8&&(t=t*3-2)):a=n,o>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-o,f.d=Sh(sr(f),10,a),f.e=f.d.length),u=Sh(c,10,a),r=s=u.length;u[--s]==0;)u.pop();if(!u[0])c=h?"0p+0":"0";else{if(o<0?r--:(e=new p(e),e.d=u,e.e=r,e=hn(e,f,t,i,0,a),u=e.d,r=e.e,d=eW),o=u[t],l=a/2,d=d||u[t+1]!==void 0,d=i<4?(o!==void 0||d)&&(i===0||i===(e.s<0?3:2)):o>l||o===l&&(i===4||d||i===6&&u[t-1]&1||i===(e.s<0?8:7)),u.length=t,d)for(;++u[--t]>a-1;)u[t]=0,t||(++r,u.unshift(1));for(s=u.length;!u[s-1];--s);for(o=0,c="";o<s;o++)c+=Jx.charAt(u[o]);if(h){if(s>1)if(n==16||n==8){for(o=n==16?4:3,--s;s%o;s++)c+="0";for(u=Sh(c,a,n),s=u.length;!u[s-1];--s);for(o=1,c="1.";o<s;o++)c+=Jx.charAt(u[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(r<0?"p":"p+")+r}else if(r<0){for(;++r;)c="0"+c;c="0."+c}else if(++r>s)for(r-=s;r--;)c+="0";else r<s&&(c=c.slice(0,r)+"."+c.slice(r))}c=(n==16?"0x":n==2?"0b":n==8?"0o":"")+c}return e.s<0?"-"+c:c}function FT(e,n){if(e.length>n)return e.length=n,!0}function IDe(e){return new this(e).abs()}function jDe(e){return new this(e).acos()}function TDe(e){return new this(e).acosh()}function ADe(e,n){return new this(e).plus(n)}function RDe(e){return new this(e).asin()}function MDe(e){return new this(e).asinh()}function LDe(e){return new this(e).atan()}function zDe(e){return new this(e).atanh()}function BDe(e,n){e=new this(e),n=new this(n);var t,i=this.precision,a=this.rounding,r=i+4;return!e.s||!n.s?t=new this(NaN):!e.d&&!n.d?(t=Sa(this,r,1).times(n.s>0?.25:.75),t.s=e.s):!n.d||e.isZero()?(t=n.s<0?Sa(this,i,a):new this(0),t.s=e.s):!e.d||n.isZero()?(t=Sa(this,r,1).times(.5),t.s=e.s):n.s<0?(this.precision=r,this.rounding=1,t=this.atan(hn(e,n,r,1)),n=Sa(this,r,1),this.precision=i,this.rounding=a,t=e.s<0?t.minus(n):t.plus(n)):t=this.atan(hn(e,n,r,1)),t}function VDe(e){return new this(e).cbrt()}function WDe(e){return we(e=new this(e),e.e+1,2)}function HDe(e,n,t){return new this(e).clamp(n,t)}function UDe(e){if(!e||typeof e!="object")throw Error(ES+"Object expected");var n,t,i,a=e.defaults===!0,r=["precision",1,sl,"rounding",0,8,"toExpNeg",-ad,0,"toExpPos",0,ad,"maxE",0,ad,"minE",-ad,0,"modulo",0,9];for(n=0;n<r.length;n+=3)if(t=r[n],a&&(this[t]=eF[t]),(i=e[t])!==void 0)if(Gt(i)===i&&i>=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(Go+t+": "+i);if(t="crypto",a&&(this[t]=eF[t]),(i=e[t])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(tW);else this[t]=!1;else throw Error(Go+t+": "+i);return this}function YDe(e){return new this(e).cos()}function GDe(e){return new this(e).cosh()}function cW(e){var n,t,i;function a(r){var o,l,s,d=this;if(!(d instanceof a))return new a(r);if(d.constructor=a,wT(r)){d.s=r.s,je?!r.d||r.e>a.maxE?(d.e=NaN,d.d=null):r.e<a.minE?(d.e=0,d.d=[0]):(d.e=r.e,d.d=r.d.slice()):(d.e=r.e,d.d=r.d?r.d.slice():r.d);return}if(s=typeof r,s==="number"){if(r===0){d.s=1/r<0?-1:1,d.e=0,d.d=[0];return}if(r<0?(r=-r,d.s=-1):d.s=1,r===~~r&&r<1e7){for(o=0,l=r;l>=10;l/=10)o++;je?o>a.maxE?(d.e=NaN,d.d=null):o<a.minE?(d.e=0,d.d=[0]):(d.e=o,d.d=[r]):(d.e=o,d.d=[r]);return}else if(r*0!==0){r||(d.s=NaN),d.e=NaN,d.d=null;return}return iF(d,r.toString())}else if(s!=="string")throw Error(Go+r);return(l=r.charCodeAt(0))===45?(r=r.slice(1),d.s=-1):(l===43&&(r=r.slice(1)),d.s=1),aW.test(r)?iF(d,r):EDe(d,r)}if(a.prototype=te,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=UDe,a.clone=cW,a.isDecimal=wT,a.abs=IDe,a.acos=jDe,a.acosh=TDe,a.add=ADe,a.asin=RDe,a.asinh=MDe,a.atan=LDe,a.atanh=zDe,a.atan2=BDe,a.cbrt=VDe,a.ceil=WDe,a.clamp=HDe,a.cos=YDe,a.cosh=GDe,a.div=qDe,a.exp=KDe,a.floor=XDe,a.hypot=QDe,a.ln=ZDe,a.log=JDe,a.log10=nEe,a.log2=eEe,a.max=tEe,a.min=iEe,a.mod=aEe,a.mul=rEe,a.pow=oEe,a.random=lEe,a.round=sEe,a.sign=dEe,a.sin=cEe,a.sinh=uEe,a.sqrt=mEe,a.sub=fEe,a.sum=pEe,a.tan=hEe,a.tanh=vEe,a.trunc=kEe,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(t=i[n++])||(e[t]=this[t]);return a.config(e),a}function qDe(e,n){return new this(e).div(n)}function KDe(e){return new this(e).exp()}function XDe(e){return we(e=new this(e),e.e+1,3)}function QDe(){var e,n,t=new this(0);for(je=!1,e=0;e<arguments.length;)if(n=new this(arguments[e++]),n.d)t.d&&(t=t.plus(n.times(n)));else{if(n.s)return je=!0,new this(1/0);t=n}return je=!0,t.sqrt()}function wT(e){return e instanceof df||e&&e.toStringTag===iW||!1}function ZDe(e){return new this(e).ln()}function JDe(e,n){return new this(e).log(n)}function eEe(e){return new this(e).log(2)}function nEe(e){return new this(e).log(10)}function tEe(){return lW(this,arguments,"lt")}function iEe(){return lW(this,arguments,"gt")}function aEe(e,n){return new this(e).mod(n)}function rEe(e,n){return new this(e).mul(n)}function oEe(e,n){return new this(e).pow(n)}function lEe(e){var n,t,i,a,r=0,o=new this(1),l=[];if(e===void 0?e=this.precision:hi(e,1,sl),i=Math.ceil(e/De),this.crypto)if(crypto.getRandomValues)for(n=crypto.getRandomValues(new Uint32Array(i));r<i;)a=n[r],a>=429e7?n[r]=crypto.getRandomValues(new Uint32Array(1))[0]:l[r++]=a%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(i*=4);r<i;)a=n[r]+(n[r+1]<<8)+(n[r+2]<<16)+((n[r+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(n,r):(l.push(a%1e7),r+=4);r=i/4}else throw Error(tW);else for(;r<i;)l[r++]=Math.random()*1e7|0;for(i=l[--r],e%=De,i&&e&&(a=ft(10,De-e),l[r]=(i/a|0)*a);l[r]===0;r--)l.pop();if(r<0)t=0,l=[0];else{for(t=-1;l[0]===0;t-=De)l.shift();for(i=1,a=l[0];a>=10;a/=10)i++;i<De&&(t-=De-i)}return o.e=t,o.d=l,o}function sEe(e){return we(e=new this(e),e.e+1,this.rounding)}function dEe(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function cEe(e){return new this(e).sin()}function uEe(e){return new this(e).sinh()}function mEe(e){return new this(e).sqrt()}function fEe(e,n){return new this(e).sub(n)}function pEe(){var e=0,n=arguments,t=new this(n[e]);for(je=!1;t.s&&++e<n.length;)t=t.plus(n[e]);return je=!0,we(t,this.precision,this.rounding)}function hEe(e){return new this(e).tan()}function vEe(e){return new this(e).tanh()}function kEe(e){return we(e=new this(e),e.e+1,1)}te[Symbol.for("nodejs.util.inspect.custom")]=te.toString;te[Symbol.toStringTag]="Decimal";var df=te.constructor=cW(eF);uy=new df(uy);my=new df(my);function uW(e){var n,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(t=uW(e[n]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function gEe(){for(var e,n,t=0,i="",a=arguments.length;t<a;t++)(e=arguments[t])&&(n=uW(e))&&(i&&(i+=" "),i+=n);return i}const a1="-";function yEe(e){const n=NEe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:i}=e;function a(o){const l=o.split(a1);return l[0]===""&&l.length!==1&&l.shift(),mW(l,n)||SEe(o)}function r(o,l){const s=t[o]||[];return l&&i[o]?[...s,...i[o]]:s}return{getClassGroupId:a,getConflictingClassGroupIds:r}}function mW(e,n){var o;if(e.length===0)return n.classGroupId;const t=e[0],i=n.nextPart.get(t),a=i?mW(e.slice(1),i):void 0;if(a)return a;if(n.validators.length===0)return;const r=e.join(a1);return(o=n.validators.find(({validator:l})=>l(r)))==null?void 0:o.classGroupId}const _T=/^\[(.+)\]$/;function SEe(e){if(_T.test(e)){const n=_T.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}}function NEe(e){const{theme:n,prefix:t}=e,i={nextPart:new Map,validators:[]};return xEe(Object.entries(e.classGroups),t).forEach(([r,o])=>{aF(o,i,r,n)}),i}function aF(e,n,t,i){e.forEach(a=>{if(typeof a=="string"){const r=a===""?n:CT(n,a);r.classGroupId=t;return}if(typeof a=="function"){if(bEe(a)){aF(a(i),n,t,i);return}n.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(([r,o])=>{aF(o,CT(n,r),t,i)})})}function CT(e,n){let t=e;return n.split(a1).forEach(i=>{t.nextPart.has(i)||t.nextPart.set(i,{nextPart:new Map,validators:[]}),t=t.nextPart.get(i)}),t}function bEe(e){return e.isThemeGetter}function xEe(e,n){return n?e.map(([t,i])=>{const a=i.map(r=>typeof r=="string"?n+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([o,l])=>[n+o,l])):r);return[t,a]}):e}function FEe(e){if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,i=new Map;function a(r,o){t.set(r,o),n++,n>e&&(n=0,i=t,t=new Map)}return{get(r){let o=t.get(r);if(o!==void 0)return o;if((o=i.get(r))!==void 0)return a(r,o),o},set(r,o){t.has(r)?t.set(r,o):a(r,o)}}}const fW="!";function wEe(e){const n=e.separator,t=n.length===1,i=n[0],a=n.length;return function(o){const l=[];let s=0,d=0,c;for(let k=0;k<o.length;k++){let y=o[k];if(s===0){if(y===i&&(t||o.slice(k,k+a)===n)){l.push(o.slice(d,k)),d=k+a;continue}if(y==="/"){c=k;continue}}y==="["?s++:y==="]"&&s--}const u=l.length===0?o:o.substring(d),f=u.startsWith(fW),p=f?u.substring(1):u,h=c&&c>d?c-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}}}function _Ee(e){if(e.length<=1)return e;const n=[];let t=[];return e.forEach(i=>{i[0]==="["?(n.push(...t.sort(),i),t=[]):t.push(i)}),n.push(...t.sort()),n}function CEe(e){return{cache:FEe(e.cacheSize),splitModifiers:wEe(e),...yEe(e)}}const PEe=/\s+/;function OEe(e,n){const{splitModifiers:t,getClassGroupId:i,getConflictingClassGroupIds:a}=n,r=new Set;return e.trim().split(PEe).map(o=>{const{modifiers:l,hasImportantModifier:s,baseClassName:d,maybePostfixModifierPosition:c}=t(o);let u=i(c?d.substring(0,c):d),f=!!c;if(!u){if(!c)return{isTailwindClass:!1,originalClassName:o};if(u=i(d),!u)return{isTailwindClass:!1,originalClassName:o};f=!1}const p=_Ee(l).join(":");return{isTailwindClass:!0,modifierId:s?p+fW:p,classGroupId:u,originalClassName:o,hasPostfixModifier:f}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:l,classGroupId:s,hasPostfixModifier:d}=o,c=l+s;return r.has(c)?!1:(r.add(c),a(s,d).forEach(u=>r.add(l+u)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function DEe(){let e=0,n,t,i="";for(;e<arguments.length;)(n=arguments[e++])&&(t=pW(n))&&(i&&(i+=" "),i+=t);return i}function pW(e){if(typeof e=="string")return e;let n,t="";for(let i=0;i<e.length;i++)e[i]&&(n=pW(e[i]))&&(t&&(t+=" "),t+=n);return t}function EEe(e,...n){let t,i,a,r=o;function o(s){const d=n.reduce((c,u)=>u(c),e());return t=CEe(d),i=t.cache.get,a=t.cache.set,r=l,l(s)}function l(s){const d=i(s);if(d)return d;const c=OEe(s,t);return a(s,c),c}return function(){return r(DEe.apply(null,arguments))}}function bn(e){const n=t=>t[e]||[];return n.isThemeGetter=!0,n}const hW=/^\[(?:([a-z-]+):)?(.+)\]$/i,$Ee=/^\d+\/\d+$/,IEe=new Set(["px","full","screen"]),jEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TEe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,REe=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function pr(e){return Al(e)||IEe.has(e)||$Ee.test(e)}function io(e){return wc(e,"length",YEe)}function Al(e){return!!e&&!Number.isNaN(Number(e))}function xp(e){return wc(e,"number",Al)}function nu(e){return!!e&&Number.isInteger(Number(e))}function LEe(e){return e.endsWith("%")&&Al(e.slice(0,-1))}function Le(e){return hW.test(e)}function ao(e){return jEe.test(e)}const zEe=new Set(["length","size","percentage"]);function BEe(e){return wc(e,zEe,vW)}function VEe(e){return wc(e,"position",vW)}const WEe=new Set(["image","url"]);function HEe(e){return wc(e,WEe,qEe)}function UEe(e){return wc(e,"",GEe)}function tu(){return!0}function wc(e,n,t){const i=hW.exec(e);return i?i[1]?typeof n=="string"?i[1]===n:n.has(i[1]):t(i[2]):!1}function YEe(e){return TEe.test(e)&&!AEe.test(e)}function vW(){return!1}function GEe(e){return REe.test(e)}function qEe(e){return MEe.test(e)}function KEe(){const e=bn("colors"),n=bn("spacing"),t=bn("blur"),i=bn("brightness"),a=bn("borderColor"),r=bn("borderRadius"),o=bn("borderSpacing"),l=bn("borderWidth"),s=bn("contrast"),d=bn("grayscale"),c=bn("hueRotate"),u=bn("invert"),f=bn("gap"),p=bn("gradientColorStops"),h=bn("gradientColorStopPositions"),k=bn("inset"),y=bn("margin"),g=bn("opacity"),v=bn("padding"),N=bn("saturate"),x=bn("scale"),F=bn("sepia"),_=bn("skew"),w=bn("space"),C=bn("translate"),$=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Le,n],D=()=>[Le,n],M=()=>["",pr,io],R=()=>["auto",Al,Le],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],O=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",Le],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Al,xp],U=()=>[Al,Le];return{cacheSize:500,separator:":",theme:{colors:[tu],spacing:[pr,io],blur:["none","",ao,Le],brightness:V(),borderColor:[e],borderRadius:["none","","full",ao,Le],borderSpacing:D(),borderWidth:M(),contrast:V(),grayscale:P(),hueRotate:U(),invert:P(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[LEe,io],inset:j(),margin:j(),opacity:V(),padding:D(),saturate:V(),scale:V(),sepia:P(),skew:U(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[ao]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),Le]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nu,Le]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",nu,Le]}],"grid-cols":[{"grid-cols":[tu]}],"col-start-end":[{col:["auto",{span:["full",nu,Le]},Le]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[tu]}],"row-start-end":[{row:["auto",{span:[nu,Le]},Le]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[w]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[w]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,n]}],"min-w":[{"min-w":[Le,n,"min","max","fit"]}],"max-w":[{"max-w":[Le,n,"none","full","min","max","fit","prose",{screen:[ao]},ao]}],h:[{h:[Le,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,n,"auto","min","max","fit"]}],"font-size":[{text:["base",ao,io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xp]}],"font-family":[{font:[tu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Le]}],"line-clamp":[{"line-clamp":["none",Al,xp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pr,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pr,io]}],"underline-offset":[{"underline-offset":["auto",pr,Le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),VEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HEe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[pr,Le]}],"outline-w":[{outline:[pr,io]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[pr,io]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ao,UEe]}],"shadow-color":[{shadow:[tu]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":B()}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[i]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",ao,Le]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[u]}],saturate:[{saturate:[N]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[nu,Le]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pr,io,xp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const XEe=EEe(KEe);function _c(...e){return XEe(gEe(e))}const r1=b.forwardRef(({className:e,...n},t)=>m.jsx("div",{ref:t,className:_c("rounded-xl border bg-card text-card-foreground shadow",e),...n}));r1.displayName="Card";const o1=b.forwardRef(({className:e,...n},t)=>m.jsx("div",{ref:t,className:_c("flex flex-col space-y-1.5 p-6",e),...n}));o1.displayName="CardHeader";const l1=b.forwardRef(({className:e,...n},t)=>m.jsx("h3",{ref:t,className:_c("font-semibold leading-none tracking-tight",e),...n}));l1.displayName="CardTitle";const QEe=b.forwardRef(({className:e,...n},t)=>m.jsx("p",{ref:t,className:_c("text-sm text-muted-foreground",e),...n}));QEe.displayName="CardDescription";const s1=b.forwardRef(({className:e,...n},t)=>m.jsx("div",{ref:t,className:_c("p-6 pt-0",e),...n}));s1.displayName="CardContent";const ZEe=b.forwardRef(({className:e,...n},t)=>m.jsx("div",{ref:t,className:_c(" flex items-center p-6 pt-0",e),...n}));ZEe.displayName="CardFooter";/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function cf(e){return e+.5|0}const _o=(e,n,t)=>Math.max(Math.min(e,t),n);function fu(e){return _o(cf(e*2.55),0,255)}function Bo(e){return _o(cf(e*255),0,255)}function br(e){return _o(cf(e/2.55)/100,0,1)}function PT(e){return _o(cf(e*100),0,100)}const Hi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},rF=[..."0123456789ABCDEF"],JEe=e=>rF[e&15],e2e=e=>rF[(e&240)>>4]+rF[e&15],Fp=e=>(e&240)>>4===(e&15),n2e=e=>Fp(e.r)&&Fp(e.g)&&Fp(e.b)&&Fp(e.a);function t2e(e){var n=e.length,t;return e[0]==="#"&&(n===4||n===5?t={r:255&Hi[e[1]]*17,g:255&Hi[e[2]]*17,b:255&Hi[e[3]]*17,a:n===5?Hi[e[4]]*17:255}:(n===7||n===9)&&(t={r:Hi[e[1]]<<4|Hi[e[2]],g:Hi[e[3]]<<4|Hi[e[4]],b:Hi[e[5]]<<4|Hi[e[6]],a:n===9?Hi[e[7]]<<4|Hi[e[8]]:255})),t}const i2e=(e,n)=>e<255?n(e):"";function a2e(e){var n=n2e(e)?JEe:e2e;return e?"#"+n(e.r)+n(e.g)+n(e.b)+i2e(e.a,n):void 0}const r2e=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function kW(e,n,t){const i=n*Math.min(t,1-t),a=(r,o=(r+e/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[a(0),a(8),a(4)]}function o2e(e,n,t){const i=(a,r=(a+e/60)%6)=>t-t*n*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function l2e(e,n,t){const i=kW(e,1,.5);let a;for(n+t>1&&(a=1/(n+t),n*=a,t*=a),a=0;a<3;a++)i[a]*=1-n-t,i[a]+=n;return i}function s2e(e,n,t,i,a){return e===a?(n-t)/i+(n<t?6:0):n===a?(t-e)/i+2:(e-n)/i+4}function d1(e){const t=e.r/255,i=e.g/255,a=e.b/255,r=Math.max(t,i,a),o=Math.min(t,i,a),l=(r+o)/2;let s,d,c;return r!==o&&(c=r-o,d=l>.5?c/(2-r-o):c/(r+o),s=s2e(t,i,a,c,r),s=s*60+.5),[s|0,d||0,l]}function c1(e,n,t,i){return(Array.isArray(n)?e(n[0],n[1],n[2]):e(n,t,i)).map(Bo)}function u1(e,n,t){return c1(kW,e,n,t)}function d2e(e,n,t){return c1(l2e,e,n,t)}function c2e(e,n,t){return c1(o2e,e,n,t)}function gW(e){return(e%360+360)%360}function u2e(e){const n=r2e.exec(e);let t=255,i;if(!n)return;n[5]!==i&&(t=n[6]?fu(+n[5]):Bo(+n[5]));const a=gW(+n[2]),r=+n[3]/100,o=+n[4]/100;return n[1]==="hwb"?i=d2e(a,r,o):n[1]==="hsv"?i=c2e(a,r,o):i=u1(a,r,o),{r:i[0],g:i[1],b:i[2],a:t}}function m2e(e,n){var t=d1(e);t[0]=gW(t[0]+n),t=u1(t),e.r=t[0],e.g=t[1],e.b=t[2]}function f2e(e){if(!e)return;const n=d1(e),t=n[0],i=PT(n[1]),a=PT(n[2]);return e.a<255?`hsla(${t}, ${i}%, ${a}%, ${br(e.a)})`:`hsl(${t}, ${i}%, ${a}%)`}const OT={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},DT={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function p2e(){const e={},n=Object.keys(DT),t=Object.keys(OT);let i,a,r,o,l;for(i=0;i<n.length;i++){for(o=l=n[i],a=0;a<t.length;a++)r=t[a],l=l.replace(r,OT[r]);r=parseInt(DT[o],16),e[l]=[r>>16&255,r>>8&255,r&255]}return e}let wp;function h2e(e){wp||(wp=p2e(),wp.transparent=[0,0,0,0]);const n=wp[e.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}const v2e=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function k2e(e){const n=v2e.exec(e);let t=255,i,a,r;if(n){if(n[7]!==i){const o=+n[7];t=n[8]?fu(o):_o(o*255,0,255)}return i=+n[1],a=+n[3],r=+n[5],i=255&(n[2]?fu(i):_o(i,0,255)),a=255&(n[4]?fu(a):_o(a,0,255)),r=255&(n[6]?fu(r):_o(r,0,255)),{r:i,g:a,b:r,a:t}}}function g2e(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${br(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const TN=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ms=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function y2e(e,n,t){const i=Ms(br(e.r)),a=Ms(br(e.g)),r=Ms(br(e.b));return{r:Bo(TN(i+t*(Ms(br(n.r))-i))),g:Bo(TN(a+t*(Ms(br(n.g))-a))),b:Bo(TN(r+t*(Ms(br(n.b))-r))),a:e.a+t*(n.a-e.a)}}function _p(e,n,t){if(e){let i=d1(e);i[n]=Math.max(0,Math.min(i[n]+i[n]*t,n===0?360:1)),i=u1(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function yW(e,n){return e&&Object.assign(n||{},e)}function ET(e){var n={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(n={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(n.a=Bo(e[3]))):(n=yW(e,{r:0,g:0,b:0,a:1}),n.a=Bo(n.a)),n}function S2e(e){return e.charAt(0)==="r"?k2e(e):u2e(e)}class wm{constructor(n){if(n instanceof wm)return n;const t=typeof n;let i;t==="object"?i=ET(n):t==="string"&&(i=t2e(n)||h2e(n)||S2e(n)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var n=yW(this._rgb);return n&&(n.a=br(n.a)),n}set rgb(n){this._rgb=ET(n)}rgbString(){return this._valid?g2e(this._rgb):void 0}hexString(){return this._valid?a2e(this._rgb):void 0}hslString(){return this._valid?f2e(this._rgb):void 0}mix(n,t){if(n){const i=this.rgb,a=n.rgb;let r;const o=t===r?.5:t,l=2*o-1,s=i.a-a.a,d=((l*s===-1?l:(l+s)/(1+l*s))+1)/2;r=1-d,i.r=255&d*i.r+r*a.r+.5,i.g=255&d*i.g+r*a.g+.5,i.b=255&d*i.b+r*a.b+.5,i.a=o*i.a+(1-o)*a.a,this.rgb=i}return this}interpolate(n,t){return n&&(this._rgb=y2e(this._rgb,n._rgb,t)),this}clone(){return new wm(this.rgb)}alpha(n){return this._rgb.a=Bo(n),this}clearer(n){const t=this._rgb;return t.a*=1-n,this}greyscale(){const n=this._rgb,t=cf(n.r*.3+n.g*.59+n.b*.11);return n.r=n.g=n.b=t,this}opaquer(n){const t=this._rgb;return t.a*=1+n,this}negate(){const n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return _p(this._rgb,2,n),this}darken(n){return _p(this._rgb,2,-n),this}saturate(n){return _p(this._rgb,1,n),this}desaturate(n){return _p(this._rgb,1,-n),this}rotate(n){return m2e(this._rgb,n),this}}/*!
 * Chart.js v4.4.2
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */function hr(){}const N2e=(()=>{let e=0;return()=>e++})();function Je(e){return e===null||typeof e>"u"}function wn(e){if(Array.isArray&&Array.isArray(e))return!0;const n=Object.prototype.toString.call(e);return n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"}function Ye(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function zn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ni(e,n){return zn(e)?e:n}function Re(e,n){return typeof e>"u"?n:e}const b2e=(e,n)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/n,SW=(e,n)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*n:+e;function gn(e,n,t){if(e&&typeof e.call=="function")return e.apply(t,n)}function on(e,n,t,i){let a,r,o;if(wn(e))if(r=e.length,i)for(a=r-1;a>=0;a--)n.call(t,e[a],a);else for(a=0;a<r;a++)n.call(t,e[a],a);else if(Ye(e))for(o=Object.keys(e),r=o.length,a=0;a<r;a++)n.call(t,e[o[a]],o[a])}function py(e,n){let t,i,a,r;if(!e||!n||e.length!==n.length)return!1;for(t=0,i=e.length;t<i;++t)if(a=e[t],r=n[t],a.datasetIndex!==r.datasetIndex||a.index!==r.index)return!1;return!0}function hy(e){if(wn(e))return e.map(hy);if(Ye(e)){const n=Object.create(null),t=Object.keys(e),i=t.length;let a=0;for(;a<i;++a)n[t[a]]=hy(e[t[a]]);return n}return e}function NW(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function x2e(e,n,t,i){if(!NW(e))return;const a=n[e],r=t[e];Ye(a)&&Ye(r)?_m(a,r,i):n[e]=hy(r)}function _m(e,n,t){const i=wn(n)?n:[n],a=i.length;if(!Ye(e))return e;t=t||{};const r=t.merger||x2e;let o;for(let l=0;l<a;++l){if(o=i[l],!Ye(o))continue;const s=Object.keys(o);for(let d=0,c=s.length;d<c;++d)r(s[d],e,o,t)}return e}function Lu(e,n){return _m(e,n,{merger:F2e})}function F2e(e,n,t){if(!NW(e))return;const i=n[e],a=t[e];Ye(i)&&Ye(a)?Lu(i,a):Object.prototype.hasOwnProperty.call(n,e)||(n[e]=hy(a))}const $T={"":e=>e,x:e=>e.x,y:e=>e.y};function w2e(e){const n=e.split("."),t=[];let i="";for(const a of n)i+=a,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function _2e(e){const n=w2e(e);return t=>{for(const i of n){if(i==="")break;t=t&&t[i]}return t}}function qo(e,n){return($T[n]||($T[n]=_2e(n)))(e)}function m1(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Cm=e=>typeof e<"u",Ko=e=>typeof e=="function",IT=(e,n)=>{if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0};function C2e(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const On=Math.PI,Pn=2*On,P2e=Pn+On,vy=Number.POSITIVE_INFINITY,O2e=On/180,qn=On/2,gl=On/4,jT=On*2/3,Co=Math.log10,rr=Math.sign;function zu(e,n,t){return Math.abs(e-n)<t}function TT(e){const n=Math.round(e);e=zu(e,n,e/1e3)?n:e;const t=Math.pow(10,Math.floor(Co(e))),i=e/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function D2e(e){const n=[],t=Math.sqrt(e);let i;for(i=1;i<t;i++)e%i===0&&(n.push(i),n.push(e/i));return t===(t|0)&&n.push(t),n.sort((a,r)=>a-r).pop(),n}function Xd(e){return!isNaN(parseFloat(e))&&isFinite(e)}function E2e(e,n){const t=Math.round(e);return t-n<=e&&t+n>=e}function bW(e,n,t){let i,a,r;for(i=0,a=e.length;i<a;i++)r=e[i][t],isNaN(r)||(n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))}function Na(e){return e*(On/180)}function f1(e){return e*(180/On)}function AT(e){if(!zn(e))return;let n=1,t=0;for(;Math.round(e*n)/n!==e;)n*=10,t++;return t}function xW(e,n){const t=n.x-e.x,i=n.y-e.y,a=Math.sqrt(t*t+i*i);let r=Math.atan2(i,t);return r<-.5*On&&(r+=Pn),{angle:r,distance:a}}function oF(e,n){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function $2e(e,n){return(e-n+P2e)%Pn-On}function Ci(e){return(e%Pn+Pn)%Pn}function Pm(e,n,t,i){const a=Ci(e),r=Ci(n),o=Ci(t),l=Ci(r-a),s=Ci(o-a),d=Ci(a-r),c=Ci(a-o);return a===r||a===o||i&&r===o||l>s&&d<c}function Nt(e,n,t){return Math.max(n,Math.min(t,e))}function I2e(e){return Nt(e,-32768,32767)}function Cr(e,n,t,i=1e-6){return e>=Math.min(n,t)-i&&e<=Math.max(n,t)+i}function p1(e,n,t){t=t||(o=>e[o]<n);let i=e.length-1,a=0,r;for(;i-a>1;)r=a+i>>1,t(r)?a=r:i=r;return{lo:a,hi:i}}const Pr=(e,n,t,i)=>p1(e,t,i?a=>{const r=e[a][n];return r<t||r===t&&e[a+1][n]===t}:a=>e[a][n]<t),j2e=(e,n,t)=>p1(e,t,i=>e[i][n]>=t);function T2e(e,n,t){let i=0,a=e.length;for(;i<a&&e[i]<n;)i++;for(;a>i&&e[a-1]>t;)a--;return i>0||a<e.length?e.slice(i,a):e}const FW=["push","pop","shift","splice","unshift"];function A2e(e,n){if(e._chartjs){e._chartjs.listeners.push(n);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),FW.forEach(t=>{const i="_onData"+m1(t),a=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...r){const o=a.apply(this,r);return e._chartjs.listeners.forEach(l=>{typeof l[i]=="function"&&l[i](...r)}),o}})})}function RT(e,n){const t=e._chartjs;if(!t)return;const i=t.listeners,a=i.indexOf(n);a!==-1&&i.splice(a,1),!(i.length>0)&&(FW.forEach(r=>{delete e[r]}),delete e._chartjs)}function wW(e){const n=new Set(e);return n.size===e.length?e:Array.from(n)}const _W=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function CW(e,n){let t=[],i=!1;return function(...a){t=a,i||(i=!0,_W.call(window,()=>{i=!1,e.apply(n,t)}))}}function R2e(e,n){let t;return function(...i){return n?(clearTimeout(t),t=setTimeout(e,n,i)):e.apply(this,i),n}}const h1=e=>e==="start"?"left":e==="end"?"right":"center",Lt=(e,n,t)=>e==="start"?n:e==="end"?t:(n+t)/2,M2e=(e,n,t,i)=>e===(i?"left":"right")?t:e==="center"?(n+t)/2:n;function PW(e,n,t){const i=n.length;let a=0,r=i;if(e._sorted){const{iScale:o,_parsed:l}=e,s=o.axis,{min:d,max:c,minDefined:u,maxDefined:f}=o.getUserBounds();u&&(a=Nt(Math.min(Pr(l,s,d).lo,t?i:Pr(n,s,o.getPixelForValue(d)).lo),0,i-1)),f?r=Nt(Math.max(Pr(l,o.axis,c,!0).hi+1,t?0:Pr(n,s,o.getPixelForValue(c),!0).hi+1),a,i)-a:r=i-a}return{start:a,count:r}}function OW(e){const{xScale:n,yScale:t,_scaleRanges:i}=e,a={xmin:n.min,xmax:n.max,ymin:t.min,ymax:t.max};if(!i)return e._scaleRanges=a,!0;const r=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,a),r}const Cp=e=>e===0||e===1,MT=(e,n,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-n)*Pn/t)),LT=(e,n,t)=>Math.pow(2,-10*e)*Math.sin((e-n)*Pn/t)+1,Bu={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*qn)+1,easeOutSine:e=>Math.sin(e*qn),easeInOutSine:e=>-.5*(Math.cos(On*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Cp(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Cp(e)?e:MT(e,.075,.3),easeOutElastic:e=>Cp(e)?e:LT(e,.075,.3),easeInOutElastic(e){return Cp(e)?e:e<.5?.5*MT(e*2,.1125,.45):.5+.5*LT(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let n=1.70158;return(e/=.5)<1?.5*(e*e*(((n*=1.525)+1)*e-n)):.5*((e-=2)*e*(((n*=1.525)+1)*e+n)+2)},easeInBounce:e=>1-Bu.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Bu.easeInBounce(e*2)*.5:Bu.easeOutBounce(e*2-1)*.5+.5};function v1(e){if(e&&typeof e=="object"){const n=e.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function zT(e){return v1(e)?e:new wm(e)}function AN(e){return v1(e)?e:new wm(e).saturate(.5).darken(.1).hexString()}const L2e=["x","y","borderWidth","radius","tension"],z2e=["color","borderColor","backgroundColor"];function B2e(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"}),e.set("animations",{colors:{type:"color",properties:z2e},numbers:{type:"number",properties:L2e}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}})}function V2e(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const BT=new Map;function W2e(e,n){n=n||{};const t=e+JSON.stringify(n);let i=BT.get(t);return i||(i=new Intl.NumberFormat(e,n),BT.set(t,i)),i}function uf(e,n,t){return W2e(n,t).format(e)}const DW={values(e){return wn(e)?e:""+e},numeric(e,n,t){if(e===0)return"0";const i=this.chart.options.locale;let a,r=e;if(t.length>1){const d=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(d<1e-4||d>1e15)&&(a="scientific"),r=H2e(e,t)}const o=Co(Math.abs(r)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),s={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(s,this.options.ticks.format),uf(e,i,s)},logarithmic(e,n,t){if(e===0)return"0";const i=t[n].significand||e/Math.pow(10,Math.floor(Co(e)));return[1,2,3,5,10,15].includes(i)||n>.8*t.length?DW.numeric.call(this,e,n,t):""}};function H2e(e,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var jS={formatters:DW};function U2e(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:jS.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"&&n!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"})}const os=Object.create(null),lF=Object.create(null);function Vu(e,n){if(!n)return e;const t=n.split(".");for(let i=0,a=t.length;i<a;++i){const r=t[i];e=e[r]||(e[r]=Object.create(null))}return e}function RN(e,n,t){return typeof n=="string"?_m(Vu(e,n),t):_m(Vu(e,""),n)}class Y2e{constructor(n,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,a)=>AN(a.backgroundColor),this.hoverBorderColor=(i,a)=>AN(a.borderColor),this.hoverColor=(i,a)=>AN(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(t)}set(n,t){return RN(this,n,t)}get(n){return Vu(this,n)}describe(n,t){return RN(lF,n,t)}override(n,t){return RN(os,n,t)}route(n,t,i,a){const r=Vu(this,n),o=Vu(this,i),l="_"+t;Object.defineProperties(r,{[l]:{value:r[t],writable:!0},[t]:{enumerable:!0,get(){const s=this[l],d=o[a];return Ye(s)?Object.assign({},d,s):Re(s,d)},set(s){this[l]=s}}})}apply(n){n.forEach(t=>t(this))}}var Bn=new Y2e({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[B2e,V2e,U2e]);function G2e(e){return!e||Je(e.size)||Je(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ky(e,n,t,i,a){let r=n[a];return r||(r=n[a]=e.measureText(a).width,t.push(a)),r>i&&(i=r),i}function q2e(e,n,t,i){i=i||{};let a=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==n&&(a=i.data={},r=i.garbageCollect=[],i.font=n),e.save(),e.font=n;let o=0;const l=t.length;let s,d,c,u,f;for(s=0;s<l;s++)if(u=t[s],u!=null&&!wn(u))o=ky(e,a,r,o,u);else if(wn(u))for(d=0,c=u.length;d<c;d++)f=u[d],f!=null&&!wn(f)&&(o=ky(e,a,r,o,f));e.restore();const p=r.length/2;if(p>t.length){for(s=0;s<p;s++)delete a[r[s]];r.splice(0,p)}return o}function yl(e,n,t){const i=e.currentDevicePixelRatio,a=t!==0?Math.max(t/2,.5):0;return Math.round((n-a)*i)/i+a}function VT(e,n){n=n||e.getContext("2d"),n.save(),n.resetTransform(),n.clearRect(0,0,e.width,e.height),n.restore()}function sF(e,n,t,i){EW(e,n,t,i,null)}function EW(e,n,t,i,a){let r,o,l,s,d,c,u,f;const p=n.pointStyle,h=n.rotation,k=n.radius;let y=(h||0)*O2e;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(t,i),e.rotate(y),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(k)||k<=0)){switch(e.beginPath(),p){default:a?e.ellipse(t,i,a/2,k,0,0,Pn):e.arc(t,i,k,0,Pn),e.closePath();break;case"triangle":c=a?a/2:k,e.moveTo(t+Math.sin(y)*c,i-Math.cos(y)*k),y+=jT,e.lineTo(t+Math.sin(y)*c,i-Math.cos(y)*k),y+=jT,e.lineTo(t+Math.sin(y)*c,i-Math.cos(y)*k),e.closePath();break;case"rectRounded":d=k*.516,s=k-d,o=Math.cos(y+gl)*s,u=Math.cos(y+gl)*(a?a/2-d:s),l=Math.sin(y+gl)*s,f=Math.sin(y+gl)*(a?a/2-d:s),e.arc(t-u,i-l,d,y-On,y-qn),e.arc(t+f,i-o,d,y-qn,y),e.arc(t+u,i+l,d,y,y+qn),e.arc(t-f,i+o,d,y+qn,y+On),e.closePath();break;case"rect":if(!h){s=Math.SQRT1_2*k,c=a?a/2:s,e.rect(t-c,i-s,2*c,2*s);break}y+=gl;case"rectRot":u=Math.cos(y)*(a?a/2:k),o=Math.cos(y)*k,l=Math.sin(y)*k,f=Math.sin(y)*(a?a/2:k),e.moveTo(t-u,i-l),e.lineTo(t+f,i-o),e.lineTo(t+u,i+l),e.lineTo(t-f,i+o),e.closePath();break;case"crossRot":y+=gl;case"cross":u=Math.cos(y)*(a?a/2:k),o=Math.cos(y)*k,l=Math.sin(y)*k,f=Math.sin(y)*(a?a/2:k),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-o),e.lineTo(t-f,i+o);break;case"star":u=Math.cos(y)*(a?a/2:k),o=Math.cos(y)*k,l=Math.sin(y)*k,f=Math.sin(y)*(a?a/2:k),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-o),e.lineTo(t-f,i+o),y+=gl,u=Math.cos(y)*(a?a/2:k),o=Math.cos(y)*k,l=Math.sin(y)*k,f=Math.sin(y)*(a?a/2:k),e.moveTo(t-u,i-l),e.lineTo(t+u,i+l),e.moveTo(t+f,i-o),e.lineTo(t-f,i+o);break;case"line":o=a?a/2:Math.cos(y)*k,l=Math.sin(y)*k,e.moveTo(t-o,i-l),e.lineTo(t+o,i+l);break;case"dash":e.moveTo(t,i),e.lineTo(t+Math.cos(y)*(a?a/2:k),i+Math.sin(y)*k);break;case!1:e.closePath();break}e.fill(),n.borderWidth>0&&e.stroke()}}function Or(e,n,t){return t=t||.5,!n||e&&e.x>n.left-t&&e.x<n.right+t&&e.y>n.top-t&&e.y<n.bottom+t}function TS(e,n){e.save(),e.beginPath(),e.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),e.clip()}function AS(e){e.restore()}function K2e(e,n,t,i,a){if(!n)return e.lineTo(t.x,t.y);if(a==="middle"){const r=(n.x+t.x)/2;e.lineTo(r,n.y),e.lineTo(r,t.y)}else a==="after"!=!!i?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(t.x,t.y)}function X2e(e,n,t,i){if(!n)return e.lineTo(t.x,t.y);e.bezierCurveTo(i?n.cp1x:n.cp2x,i?n.cp1y:n.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function Q2e(e,n){n.translation&&e.translate(n.translation[0],n.translation[1]),Je(n.rotation)||e.rotate(n.rotation),n.color&&(e.fillStyle=n.color),n.textAlign&&(e.textAlign=n.textAlign),n.textBaseline&&(e.textBaseline=n.textBaseline)}function Z2e(e,n,t,i,a){if(a.strikethrough||a.underline){const r=e.measureText(i),o=n-r.actualBoundingBoxLeft,l=n+r.actualBoundingBoxRight,s=t-r.actualBoundingBoxAscent,d=t+r.actualBoundingBoxDescent,c=a.strikethrough?(s+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(o,c),e.lineTo(l,c),e.stroke()}}function J2e(e,n){const t=e.fillStyle;e.fillStyle=n.color,e.fillRect(n.left,n.top,n.width,n.height),e.fillStyle=t}function ls(e,n,t,i,a,r={}){const o=wn(n)?n:[n],l=r.strokeWidth>0&&r.strokeColor!=="";let s,d;for(e.save(),e.font=a.string,Q2e(e,r),s=0;s<o.length;++s)d=o[s],r.backdrop&&J2e(e,r.backdrop),l&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),Je(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(d,t,i,r.maxWidth)),e.fillText(d,t,i,r.maxWidth),Z2e(e,t,i,d,r),i+=Number(a.lineHeight);e.restore()}function Om(e,n){const{x:t,y:i,w:a,h:r,radius:o}=n;e.arc(t+o.topLeft,i+o.topLeft,o.topLeft,1.5*On,On,!0),e.lineTo(t,i+r-o.bottomLeft),e.arc(t+o.bottomLeft,i+r-o.bottomLeft,o.bottomLeft,On,qn,!0),e.lineTo(t+a-o.bottomRight,i+r),e.arc(t+a-o.bottomRight,i+r-o.bottomRight,o.bottomRight,qn,0,!0),e.lineTo(t+a,i+o.topRight),e.arc(t+a-o.topRight,i+o.topRight,o.topRight,0,-qn,!0),e.lineTo(t+o.topLeft,i)}const e$e=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,n$e=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function t$e(e,n){const t=(""+e).match(e$e);if(!t||t[1]==="normal")return n*1.2;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100;break}return n*e}const i$e=e=>+e||0;function k1(e,n){const t={},i=Ye(n),a=i?Object.keys(n):n,r=Ye(e)?i?o=>Re(e[o],e[n[o]]):o=>e[o]:()=>e;for(const o of a)t[o]=i$e(r(o));return t}function $W(e){return k1(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ql(e){return k1(e,["topLeft","topRight","bottomLeft","bottomRight"])}function qt(e){const n=$W(e);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ht(e,n){e=e||{},n=n||Bn.font;let t=Re(e.size,n.size);typeof t=="string"&&(t=parseInt(t,10));let i=Re(e.style,n.style);i&&!(""+i).match(n$e)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const a={family:Re(e.family,n.family),lineHeight:t$e(Re(e.lineHeight,n.lineHeight),t),size:t,style:i,weight:Re(e.weight,n.weight),string:""};return a.string=G2e(a),a}function pu(e,n,t,i){let a=!0,r,o,l;for(r=0,o=e.length;r<o;++r)if(l=e[r],l!==void 0&&(n!==void 0&&typeof l=="function"&&(l=l(n),a=!1),t!==void 0&&wn(l)&&(l=l[t%l.length],a=!1),l!==void 0))return i&&!a&&(i.cacheable=!1),l}function a$e(e,n,t){const{min:i,max:a}=e,r=SW(n,(a-i)/2),o=(l,s)=>t&&l===0?0:l+s;return{min:o(i,-Math.abs(r)),max:o(a,r)}}function dl(e,n){return Object.assign(Object.create(e),n)}function g1(e,n=[""],t,i,a=()=>e[0]){const r=t||e;typeof i>"u"&&(i=AW("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:i,_getTarget:a,override:l=>g1([l,...e],n,r,i)};return new Proxy(o,{deleteProperty(l,s){return delete l[s],delete l._keys,delete e[0][s],!0},get(l,s){return jW(l,s,()=>m$e(s,n,e,l))},getOwnPropertyDescriptor(l,s){return Reflect.getOwnPropertyDescriptor(l._scopes[0],s)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,s){return HT(l).includes(s)},ownKeys(l){return HT(l)},set(l,s,d){const c=l._storage||(l._storage=a());return l[s]=c[s]=d,delete l._keys,!0}})}function Qd(e,n,t,i){const a={_cacheable:!1,_proxy:e,_context:n,_subProxy:t,_stack:new Set,_descriptors:IW(e,i),setContext:r=>Qd(e,r,t,i),override:r=>Qd(e.override(r),n,t,i)};return new Proxy(a,{deleteProperty(r,o){return delete r[o],delete e[o],!0},get(r,o,l){return jW(r,o,()=>o$e(r,o,l))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(r,o,l){return e[o]=l,delete r[o],!0}})}function IW(e,n={scriptable:!0,indexable:!0}){const{_scriptable:t=n.scriptable,_indexable:i=n.indexable,_allKeys:a=n.allKeys}=e;return{allKeys:a,scriptable:t,indexable:i,isScriptable:Ko(t)?t:()=>t,isIndexable:Ko(i)?i:()=>i}}const r$e=(e,n)=>e?e+m1(n):n,y1=(e,n)=>Ye(n)&&e!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function jW(e,n,t){if(Object.prototype.hasOwnProperty.call(e,n))return e[n];const i=t();return e[n]=i,i}function o$e(e,n,t){const{_proxy:i,_context:a,_subProxy:r,_descriptors:o}=e;let l=i[n];return Ko(l)&&o.isScriptable(n)&&(l=l$e(n,l,e,t)),wn(l)&&l.length&&(l=s$e(n,l,e,o.isIndexable)),y1(n,l)&&(l=Qd(l,a,r&&r[n],o)),l}function l$e(e,n,t,i){const{_proxy:a,_context:r,_subProxy:o,_stack:l}=t;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let s=n(r,o||i);return l.delete(e),y1(e,s)&&(s=S1(a._scopes,a,e,s)),s}function s$e(e,n,t,i){const{_proxy:a,_context:r,_subProxy:o,_descriptors:l}=t;if(typeof r.index<"u"&&i(e))return n[r.index%n.length];if(Ye(n[0])){const s=n,d=a._scopes.filter(c=>c!==s);n=[];for(const c of s){const u=S1(d,a,e,c);n.push(Qd(u,r,o&&o[e],l))}}return n}function TW(e,n,t){return Ko(e)?e(n,t):e}const d$e=(e,n)=>e===!0?n:typeof e=="string"?qo(n,e):void 0;function c$e(e,n,t,i,a){for(const r of n){const o=d$e(t,r);if(o){e.add(o);const l=TW(o._fallback,t,a);if(typeof l<"u"&&l!==t&&l!==i)return l}else if(o===!1&&typeof i<"u"&&t!==i)return null}return!1}function S1(e,n,t,i){const a=n._rootScopes,r=TW(n._fallback,t,i),o=[...e,...a],l=new Set;l.add(i);let s=WT(l,o,t,r||t,i);return s===null||typeof r<"u"&&r!==t&&(s=WT(l,o,r,s,i),s===null)?!1:g1(Array.from(l),[""],a,r,()=>u$e(n,t,i))}function WT(e,n,t,i,a){for(;t;)t=c$e(e,n,t,i,a);return t}function u$e(e,n,t){const i=e._getTarget();n in i||(i[n]={});const a=i[n];return wn(a)&&Ye(t)?t:a||{}}function m$e(e,n,t,i){let a;for(const r of n)if(a=AW(r$e(r,e),t),typeof a<"u")return y1(e,a)?S1(t,i,e,a):a}function AW(e,n){for(const t of n){if(!t)continue;const i=t[e];if(typeof i<"u")return i}}function HT(e){let n=e._keys;return n||(n=e._keys=f$e(e._scopes)),n}function f$e(e){const n=new Set;for(const t of e)for(const i of Object.keys(t).filter(a=>!a.startsWith("_")))n.add(i);return Array.from(n)}function RW(e,n,t,i){const{iScale:a}=e,{key:r="r"}=this._parsing,o=new Array(i);let l,s,d,c;for(l=0,s=i;l<s;++l)d=l+t,c=n[d],o[l]={r:a.parse(qo(c,r),d)};return o}const p$e=Number.EPSILON||1e-14,Zd=(e,n)=>n<e.length&&!e[n].skip&&e[n],MW=e=>e==="x"?"y":"x";function h$e(e,n,t,i){const a=e.skip?n:e,r=n,o=t.skip?n:t,l=oF(r,a),s=oF(o,r);let d=l/(l+s),c=s/(l+s);d=isNaN(d)?0:d,c=isNaN(c)?0:c;const u=i*d,f=i*c;return{previous:{x:r.x-u*(o.x-a.x),y:r.y-u*(o.y-a.y)},next:{x:r.x+f*(o.x-a.x),y:r.y+f*(o.y-a.y)}}}function v$e(e,n,t){const i=e.length;let a,r,o,l,s,d=Zd(e,0);for(let c=0;c<i-1;++c)if(s=d,d=Zd(e,c+1),!(!s||!d)){if(zu(n[c],0,p$e)){t[c]=t[c+1]=0;continue}a=t[c]/n[c],r=t[c+1]/n[c],l=Math.pow(a,2)+Math.pow(r,2),!(l<=9)&&(o=3/Math.sqrt(l),t[c]=a*o*n[c],t[c+1]=r*o*n[c])}}function k$e(e,n,t="x"){const i=MW(t),a=e.length;let r,o,l,s=Zd(e,0);for(let d=0;d<a;++d){if(o=l,l=s,s=Zd(e,d+1),!l)continue;const c=l[t],u=l[i];o&&(r=(c-o[t])/3,l[`cp1${t}`]=c-r,l[`cp1${i}`]=u-r*n[d]),s&&(r=(s[t]-c)/3,l[`cp2${t}`]=c+r,l[`cp2${i}`]=u+r*n[d])}}function g$e(e,n="x"){const t=MW(n),i=e.length,a=Array(i).fill(0),r=Array(i);let o,l,s,d=Zd(e,0);for(o=0;o<i;++o)if(l=s,s=d,d=Zd(e,o+1),!!s){if(d){const c=d[n]-s[n];a[o]=c!==0?(d[t]-s[t])/c:0}r[o]=l?d?rr(a[o-1])!==rr(a[o])?0:(a[o-1]+a[o])/2:a[o-1]:a[o]}v$e(e,a,r),k$e(e,r,n)}function Pp(e,n,t){return Math.max(Math.min(e,t),n)}function y$e(e,n){let t,i,a,r,o,l=Or(e[0],n);for(t=0,i=e.length;t<i;++t)o=r,r=l,l=t<i-1&&Or(e[t+1],n),r&&(a=e[t],o&&(a.cp1x=Pp(a.cp1x,n.left,n.right),a.cp1y=Pp(a.cp1y,n.top,n.bottom)),l&&(a.cp2x=Pp(a.cp2x,n.left,n.right),a.cp2y=Pp(a.cp2y,n.top,n.bottom)))}function S$e(e,n,t,i,a){let r,o,l,s;if(n.spanGaps&&(e=e.filter(d=>!d.skip)),n.cubicInterpolationMode==="monotone")g$e(e,a);else{let d=i?e[e.length-1]:e[0];for(r=0,o=e.length;r<o;++r)l=e[r],s=h$e(d,l,e[Math.min(r+1,o-(i?0:1))%o],n.tension),l.cp1x=s.previous.x,l.cp1y=s.previous.y,l.cp2x=s.next.x,l.cp2y=s.next.y,d=l}n.capBezierPoints&&y$e(e,t)}function N1(){return typeof window<"u"&&typeof document<"u"}function b1(e){let n=e.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n}function gy(e,n,t){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*n.parentNode[t])):i=e,i}const RS=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function N$e(e,n){return RS(e).getPropertyValue(n)}const b$e=["top","right","bottom","left"];function Kl(e,n,t){const i={};t=t?"-"+t:"";for(let a=0;a<4;a++){const r=b$e[a];i[r]=parseFloat(e[n+"-"+r+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const x$e=(e,n,t)=>(e>0||n>0)&&(!t||!t.shadowRoot);function F$e(e,n){const t=e.touches,i=t&&t.length?t[0]:e,{offsetX:a,offsetY:r}=i;let o=!1,l,s;if(x$e(a,r,e.target))l=a,s=r;else{const d=n.getBoundingClientRect();l=i.clientX-d.left,s=i.clientY-d.top,o=!0}return{x:l,y:s,box:o}}function Cl(e,n){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:i}=n,a=RS(t),r=a.boxSizing==="border-box",o=Kl(a,"padding"),l=Kl(a,"border","width"),{x:s,y:d,box:c}=F$e(e,t),u=o.left+(c&&l.left),f=o.top+(c&&l.top);let{width:p,height:h}=n;return r&&(p-=o.width+l.width,h-=o.height+l.height),{x:Math.round((s-u)/p*t.width/i),y:Math.round((d-f)/h*t.height/i)}}function w$e(e,n,t){let i,a;if(n===void 0||t===void 0){const r=b1(e);if(!r)n=e.clientWidth,t=e.clientHeight;else{const o=r.getBoundingClientRect(),l=RS(r),s=Kl(l,"border","width"),d=Kl(l,"padding");n=o.width-d.width-s.width,t=o.height-d.height-s.height,i=gy(l.maxWidth,r,"clientWidth"),a=gy(l.maxHeight,r,"clientHeight")}}return{width:n,height:t,maxWidth:i||vy,maxHeight:a||vy}}const Op=e=>Math.round(e*10)/10;function _$e(e,n,t,i){const a=RS(e),r=Kl(a,"margin"),o=gy(a.maxWidth,e,"clientWidth")||vy,l=gy(a.maxHeight,e,"clientHeight")||vy,s=w$e(e,n,t);let{width:d,height:c}=s;if(a.boxSizing==="content-box"){const f=Kl(a,"border","width"),p=Kl(a,"padding");d-=p.width+f.width,c-=p.height+f.height}return d=Math.max(0,d-r.width),c=Math.max(0,i?d/i:c-r.height),d=Op(Math.min(d,o,s.maxWidth)),c=Op(Math.min(c,l,s.maxHeight)),d&&!c&&(c=Op(d/2)),(n!==void 0||t!==void 0)&&i&&s.height&&c>s.height&&(c=s.height,d=Op(Math.floor(c*i))),{width:d,height:c}}function UT(e,n,t){const i=n||1,a=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==a||o.width!==r?(e.currentDevicePixelRatio=i,o.height=a,o.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const C$e=function(){let e=!1;try{const n={get passive(){return e=!0,!1}};N1()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return e}();function YT(e,n){const t=N$e(e,n),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Pl(e,n,t,i){return{x:e.x+t*(n.x-e.x),y:e.y+t*(n.y-e.y)}}function P$e(e,n,t,i){return{x:e.x+t*(n.x-e.x),y:i==="middle"?t<.5?e.y:n.y:i==="after"?t<1?e.y:n.y:t>0?n.y:e.y}}function O$e(e,n,t,i){const a={x:e.cp2x,y:e.cp2y},r={x:n.cp1x,y:n.cp1y},o=Pl(e,a,t),l=Pl(a,r,t),s=Pl(r,n,t),d=Pl(o,l,t),c=Pl(l,s,t);return Pl(d,c,t)}const D$e=function(e,n){return{x(t){return e+e+n-t},setWidth(t){n=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},E$e=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,n){return e+n},leftForLtr(e,n){return e}}};function kd(e,n,t){return e?D$e(n,t):E$e()}function LW(e,n){let t,i;(n==="ltr"||n==="rtl")&&(t=e.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",n,"important"),e.prevTextDirection=i)}function zW(e,n){n!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",n[0],n[1]))}function BW(e){return e==="angle"?{between:Pm,compare:$2e,normalize:Ci}:{between:Cr,compare:(n,t)=>n-t,normalize:n=>n}}function GT({start:e,end:n,count:t,loop:i,style:a}){return{start:e%t,end:n%t,loop:i&&(n-e+1)%t===0,style:a}}function $$e(e,n,t){const{property:i,start:a,end:r}=t,{between:o,normalize:l}=BW(i),s=n.length;let{start:d,end:c,loop:u}=e,f,p;if(u){for(d+=s,c+=s,f=0,p=s;f<p&&o(l(n[d%s][i]),a,r);++f)d--,c--;d%=s,c%=s}return c<d&&(c+=s),{start:d,end:c,loop:u,style:e.style}}function VW(e,n,t){if(!t)return[e];const{property:i,start:a,end:r}=t,o=n.length,{compare:l,between:s,normalize:d}=BW(i),{start:c,end:u,loop:f,style:p}=$$e(e,n,t),h=[];let k=!1,y=null,g,v,N;const x=()=>s(a,N,g)&&l(a,N)!==0,F=()=>l(r,g)===0||s(r,N,g),_=()=>k||x(),w=()=>!k||F();for(let C=c,$=c;C<=u;++C)v=n[C%o],!v.skip&&(g=d(v[i]),g!==N&&(k=s(g,a,r),y===null&&_()&&(y=l(g,a)===0?C:$),y!==null&&w()&&(h.push(GT({start:y,end:C,loop:f,count:o,style:p})),y=null),$=C,N=g));return y!==null&&h.push(GT({start:y,end:u,loop:f,count:o,style:p})),h}function WW(e,n){const t=[],i=e.segments;for(let a=0;a<i.length;a++){const r=VW(i[a],e.points,n);r.length&&t.push(...r)}return t}function I$e(e,n,t,i){let a=0,r=n-1;if(t&&!i)for(;a<n&&!e[a].skip;)a++;for(;a<n&&e[a].skip;)a++;for(a%=n,t&&(r+=a);r>a&&e[r%n].skip;)r--;return r%=n,{start:a,end:r}}function j$e(e,n,t,i){const a=e.length,r=[];let o=n,l=e[n],s;for(s=n+1;s<=t;++s){const d=e[s%a];d.skip||d.stop?l.skip||(i=!1,r.push({start:n%a,end:(s-1)%a,loop:i}),n=o=d.stop?s:null):(o=s,l.skip&&(n=s)),l=d}return o!==null&&r.push({start:n%a,end:o%a,loop:i}),r}function T$e(e,n){const t=e.points,i=e.options.spanGaps,a=t.length;if(!a)return[];const r=!!e._loop,{start:o,end:l}=I$e(t,a,r,i);if(i===!0)return qT(e,[{start:o,end:l,loop:r}],t,n);const s=l<o?l+a:l,d=!!e._fullLoop&&o===0&&l===a-1;return qT(e,j$e(t,o,s,d),t,n)}function qT(e,n,t,i){return!i||!i.setContext||!t?n:A$e(e,n,t,i)}function A$e(e,n,t,i){const a=e._chart.getContext(),r=KT(e.options),{_datasetIndex:o,options:{spanGaps:l}}=e,s=t.length,d=[];let c=r,u=n[0].start,f=u;function p(h,k,y,g){const v=l?-1:1;if(h!==k){for(h+=s;t[h%s].skip;)h-=v;for(;t[k%s].skip;)k+=v;h%s!==k%s&&(d.push({start:h%s,end:k%s,loop:y,style:g}),c=g,u=k%s)}}for(const h of n){u=l?u:h.start;let k=t[u%s],y;for(f=u+1;f<=h.end;f++){const g=t[f%s];y=KT(i.setContext(dl(a,{type:"segment",p0:k,p1:g,p0DataIndex:(f-1)%s,p1DataIndex:f%s,datasetIndex:o}))),R$e(y,c)&&p(u,f-1,h.loop,c),k=g,c=y}u<f-1&&p(u,f-1,h.loop,c)}return d}function KT(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function R$e(e,n){if(!n)return!1;const t=[],i=function(a,r){return v1(r)?(t.includes(r)||t.push(r),t.indexOf(r)):r};return JSON.stringify(e,i)!==JSON.stringify(n,i)}/*!
 * Chart.js v4.4.2
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */class M$e{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,i,a){const r=t.listeners[a],o=t.duration;r.forEach(l=>l({chart:n,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=_W.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((i,a)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,l=!1,s;for(;o>=0;--o)s=r[o],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(n),l=!0):(r[o]=r[r.length-1],r.pop());l&&(a.draw(),this._notify(a,i,n,"progress")),r.length||(i.running=!1,this._notify(a,i,n,"complete"),i.initial=!1),t+=r.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){const t=this._charts;let i=t.get(n);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,i)),i}listen(n,t,i){this._getAnims(n).listeners[t].push(i)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){const t=this._charts.get(n);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,a)=>Math.max(i,a._duration),0),this._refresh())}running(n){if(!this._running)return!1;const t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){const t=this._charts.get(n);if(!t||!t.items.length)return;const i=t.items;let a=i.length-1;for(;a>=0;--a)i[a].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}}var vr=new M$e;const XT="transparent",L$e={boolean(e,n,t){return t>.5?n:e},color(e,n,t){const i=zT(e||XT),a=i.valid&&zT(n||XT);return a&&a.valid?a.mix(i,t).hexString():n},number(e,n,t){return e+(n-e)*t}};class z$e{constructor(n,t,i,a){const r=t[i];a=pu([n.to,a,r,n.from]);const o=pu([n.from,r,a]);this._active=!0,this._fn=n.fn||L$e[n.type||typeof o],this._easing=Bu[n.easing]||Bu.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=i,this._from=o,this._to=a,this._promises=void 0}active(){return this._active}update(n,t,i){if(this._active){this._notify(!1);const a=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,n.duration)),this._total+=r,this._loop=!!n.loop,this._to=pu([n.to,t,a,n.from]),this._from=pu([n.from,a,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){const t=n-this._start,i=this._duration,a=this._prop,r=this._from,o=this._loop,l=this._to;let s;if(this._active=r!==l&&(o||t<i),!this._active){this._target[a]=l,this._notify(!0);return}if(t<0){this._target[a]=r;return}s=t/i%2,s=o&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[a]=this._fn(r,l,s)}wait(){const n=this._promises||(this._promises=[]);return new Promise((t,i)=>{n.push({res:t,rej:i})})}_notify(n){const t=n?"res":"rej",i=this._promises||[];for(let a=0;a<i.length;a++)i[a][t]()}}class HW{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!Ye(n))return;const t=Object.keys(Bn.animation),i=this._properties;Object.getOwnPropertyNames(n).forEach(a=>{const r=n[a];if(!Ye(r))return;const o={};for(const l of t)o[l]=r[l];(wn(r.properties)&&r.properties||[a]).forEach(l=>{(l===a||!i.has(l))&&i.set(l,o)})})}_animateOptions(n,t){const i=t.options,a=V$e(n,i);if(!a)return[];const r=this._createAnimations(a,i);return i.$shared&&B$e(n.options.$animations,i).then(()=>{n.options=i},()=>{}),r}_createAnimations(n,t){const i=this._properties,a=[],r=n.$animations||(n.$animations={}),o=Object.keys(t),l=Date.now();let s;for(s=o.length-1;s>=0;--s){const d=o[s];if(d.charAt(0)==="$")continue;if(d==="options"){a.push(...this._animateOptions(n,t));continue}const c=t[d];let u=r[d];const f=i.get(d);if(u)if(f&&u.active()){u.update(f,c,l);continue}else u.cancel();if(!f||!f.duration){n[d]=c;continue}r[d]=u=new z$e(f,n,d,c),a.push(u)}return a}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}const i=this._createAnimations(n,t);if(i.length)return vr.add(this._chart,i),!0}}function B$e(e,n){const t=[],i=Object.keys(n);for(let a=0;a<i.length;a++){const r=e[i[a]];r&&r.active()&&t.push(r.wait())}return Promise.all(t)}function V$e(e,n){if(!n)return;let t=e.options;if(!t){e.options=n;return}return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function QT(e,n){const t=e&&e.options||{},i=t.reverse,a=t.min===void 0?n:0,r=t.max===void 0?n:0;return{start:i?r:a,end:i?a:r}}function W$e(e,n,t){if(t===!1)return!1;const i=QT(e,t),a=QT(n,t);return{top:a.end,right:i.end,bottom:a.start,left:i.start}}function H$e(e){let n,t,i,a;return Ye(e)?(n=e.top,t=e.right,i=e.bottom,a=e.left):n=t=i=a=e,{top:n,right:t,bottom:i,left:a,disabled:e===!1}}function UW(e,n){const t=[],i=e._getSortedDatasetMetas(n);let a,r;for(a=0,r=i.length;a<r;++a)t.push(i[a].index);return t}function ZT(e,n,t,i={}){const a=e.keys,r=i.mode==="single";let o,l,s,d;if(n!==null){for(o=0,l=a.length;o<l;++o){if(s=+a[o],s===t){if(i.all)continue;break}d=e.values[s],zn(d)&&(r||n===0||rr(n)===rr(d))&&(n+=d)}return n}}function U$e(e){const n=Object.keys(e),t=new Array(n.length);let i,a,r;for(i=0,a=n.length;i<a;++i)r=n[i],t[i]={x:r,y:e[r]};return t}function JT(e,n){const t=e&&e.options.stacked;return t||t===void 0&&n.stack!==void 0}function Y$e(e,n,t){return`${e.id}.${n.id}.${t.stack||t.type}`}function G$e(e){const{min:n,max:t,minDefined:i,maxDefined:a}=e.getUserBounds();return{min:i?n:Number.NEGATIVE_INFINITY,max:a?t:Number.POSITIVE_INFINITY}}function q$e(e,n,t){const i=e[n]||(e[n]={});return i[t]||(i[t]={})}function eA(e,n,t,i){for(const a of n.getMatchingVisibleMetas(i).reverse()){const r=e[a.index];if(t&&r>0||!t&&r<0)return a.index}return null}function nA(e,n){const{chart:t,_cachedMeta:i}=e,a=t._stacks||(t._stacks={}),{iScale:r,vScale:o,index:l}=i,s=r.axis,d=o.axis,c=Y$e(r,o,i),u=n.length;let f;for(let p=0;p<u;++p){const h=n[p],{[s]:k,[d]:y}=h,g=h._stacks||(h._stacks={});f=g[d]=q$e(a,c,k),f[l]=y,f._top=eA(f,o,!0,i.type),f._bottom=eA(f,o,!1,i.type);const v=f._visualValues||(f._visualValues={});v[l]=y}}function MN(e,n){const t=e.scales;return Object.keys(t).filter(i=>t[i].axis===n).shift()}function K$e(e,n){return dl(e,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function X$e(e,n,t){return dl(e,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function iu(e,n){const t=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){n=n||e._parsed;for(const a of n){const r=a._stacks;if(!r||r[i]===void 0||r[i][t]===void 0)return;delete r[i][t],r[i]._visualValues!==void 0&&r[i]._visualValues[t]!==void 0&&delete r[i]._visualValues[t]}}}const LN=e=>e==="reset"||e==="none",tA=(e,n)=>n?e:Object.assign({},e),Q$e=(e,n,t)=>e&&!n.hidden&&n._stacked&&{keys:UW(t,!0),values:null};class Pa{constructor(n,t){this.chart=n,this._ctx=n.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const n=this._cachedMeta;this.configure(),this.linkScales(),n._stacked=JT(n.vScale,n),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(n){this.index!==n&&iu(this._cachedMeta),this.index=n}linkScales(){const n=this.chart,t=this._cachedMeta,i=this.getDataset(),a=(u,f,p,h)=>u==="x"?f:u==="r"?h:p,r=t.xAxisID=Re(i.xAxisID,MN(n,"x")),o=t.yAxisID=Re(i.yAxisID,MN(n,"y")),l=t.rAxisID=Re(i.rAxisID,MN(n,"r")),s=t.indexAxis,d=t.iAxisID=a(s,r,o,l),c=t.vAxisID=a(s,o,r,l);t.xScale=this.getScaleForId(r),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(l),t.iScale=this.getScaleForId(d),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(n){return this.chart.scales[n]}_getOtherScale(n){const t=this._cachedMeta;return n===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const n=this._cachedMeta;this._data&&RT(this._data,this),n._stacked&&iu(n)}_dataCheck(){const n=this.getDataset(),t=n.data||(n.data=[]),i=this._data;if(Ye(t))this._data=U$e(t);else if(i!==t){if(i){RT(i,this);const a=this._cachedMeta;iu(a),a._parsed=[]}t&&Object.isExtensible(t)&&A2e(t,this),this._syncList=[],this._data=t}}addElements(){const n=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(n.dataset=new this.datasetElementType)}buildOrUpdateElements(n){const t=this._cachedMeta,i=this.getDataset();let a=!1;this._dataCheck();const r=t._stacked;t._stacked=JT(t.vScale,t),t.stack!==i.stack&&(a=!0,iu(t),t.stack=i.stack),this._resyncElements(n),(a||r!==t._stacked)&&nA(this,t._parsed)}configure(){const n=this.chart.config,t=n.datasetScopeKeys(this._type),i=n.getOptionScopes(this.getDataset(),t,!0);this.options=n.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(n,t){const{_cachedMeta:i,_data:a}=this,{iScale:r,_stacked:o}=i,l=r.axis;let s=n===0&&t===a.length?!0:i._sorted,d=n>0&&i._parsed[n-1],c,u,f;if(this._parsing===!1)i._parsed=a,i._sorted=!0,f=a;else{wn(a[n])?f=this.parseArrayData(i,a,n,t):Ye(a[n])?f=this.parseObjectData(i,a,n,t):f=this.parsePrimitiveData(i,a,n,t);const p=()=>u[l]===null||d&&u[l]<d[l];for(c=0;c<t;++c)i._parsed[c+n]=u=f[c],s&&(p()&&(s=!1),d=u);i._sorted=s}o&&nA(this,f)}parsePrimitiveData(n,t,i,a){const{iScale:r,vScale:o}=n,l=r.axis,s=o.axis,d=r.getLabels(),c=r===o,u=new Array(a);let f,p,h;for(f=0,p=a;f<p;++f)h=f+i,u[f]={[l]:c||r.parse(d[h],h),[s]:o.parse(t[h],h)};return u}parseArrayData(n,t,i,a){const{xScale:r,yScale:o}=n,l=new Array(a);let s,d,c,u;for(s=0,d=a;s<d;++s)c=s+i,u=t[c],l[s]={x:r.parse(u[0],c),y:o.parse(u[1],c)};return l}parseObjectData(n,t,i,a){const{xScale:r,yScale:o}=n,{xAxisKey:l="x",yAxisKey:s="y"}=this._parsing,d=new Array(a);let c,u,f,p;for(c=0,u=a;c<u;++c)f=c+i,p=t[f],d[c]={x:r.parse(qo(p,l),f),y:o.parse(qo(p,s),f)};return d}getParsed(n){return this._cachedMeta._parsed[n]}getDataElement(n){return this._cachedMeta.data[n]}applyStack(n,t,i){const a=this.chart,r=this._cachedMeta,o=t[n.axis],l={keys:UW(a,!0),values:t._stacks[n.axis]._visualValues};return ZT(l,o,r.index,{mode:i})}updateRangeFromParsed(n,t,i,a){const r=i[t.axis];let o=r===null?NaN:r;const l=a&&i._stacks[t.axis];a&&l&&(a.values=l,o=ZT(a,r,this._cachedMeta.index)),n.min=Math.min(n.min,o),n.max=Math.max(n.max,o)}getMinMax(n,t){const i=this._cachedMeta,a=i._parsed,r=i._sorted&&n===i.iScale,o=a.length,l=this._getOtherScale(n),s=Q$e(t,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=G$e(l);let f,p;function h(){p=a[f];const k=p[l.axis];return!zn(p[n.axis])||c>k||u<k}for(f=0;f<o&&!(!h()&&(this.updateRangeFromParsed(d,n,p,s),r));++f);if(r){for(f=o-1;f>=0;--f)if(!h()){this.updateRangeFromParsed(d,n,p,s);break}}return d}getAllParsedValues(n){const t=this._cachedMeta._parsed,i=[];let a,r,o;for(a=0,r=t.length;a<r;++a)o=t[a][n.axis],zn(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(n){const t=this._cachedMeta,i=t.iScale,a=t.vScale,r=this.getParsed(n);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:a?""+a.getLabelForValue(r[a.axis]):""}}_update(n){const t=this._cachedMeta;this.update(n||"default"),t._clip=H$e(Re(this.options.clip,W$e(t.xScale,t.yScale,this.getMaxOverflow())))}update(n){}draw(){const n=this._ctx,t=this.chart,i=this._cachedMeta,a=i.data||[],r=t.chartArea,o=[],l=this._drawStart||0,s=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(n,r,l,s),c=l;c<l+s;++c){const u=a[c];u.hidden||(u.active&&d?o.push(u):u.draw(n,r))}for(c=0;c<o.length;++c)o[c].draw(n,r)}getStyle(n,t){const i=t?"active":"default";return n===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(n||0,i)}getContext(n,t,i){const a=this.getDataset();let r;if(n>=0&&n<this._cachedMeta.data.length){const o=this._cachedMeta.data[n];r=o.$context||(o.$context=X$e(this.getContext(),n,o)),r.parsed=this.getParsed(n),r.raw=a.data[n],r.index=r.dataIndex=n}else r=this.$context||(this.$context=K$e(this.chart.getContext(),this.index)),r.dataset=a,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=i,r}resolveDatasetElementOptions(n){return this._resolveElementOptions(this.datasetElementType.id,n)}resolveDataElementOptions(n,t){return this._resolveElementOptions(this.dataElementType.id,t,n)}_resolveElementOptions(n,t="default",i){const a=t==="active",r=this._cachedDataOpts,o=n+"-"+t,l=r[o],s=this.enableOptionSharing&&Cm(i);if(l)return tA(l,s);const d=this.chart.config,c=d.datasetElementScopeKeys(this._type,n),u=a?[`${n}Hover`,"hover",n,""]:[n,""],f=d.getOptionScopes(this.getDataset(),c),p=Object.keys(Bn.elements[n]),h=()=>this.getContext(i,a,t),k=d.resolveNamedOptions(f,p,h,u);return k.$shared&&(k.$shared=s,r[o]=Object.freeze(tA(k,s))),k}_resolveAnimations(n,t,i){const a=this.chart,r=this._cachedDataOpts,o=`animation-${t}`,l=r[o];if(l)return l;let s;if(a.options.animation!==!1){const c=this.chart.config,u=c.datasetAnimationScopeKeys(this._type,t),f=c.getOptionScopes(this.getDataset(),u);s=c.createResolver(f,this.getContext(n,i,t))}const d=new HW(a,s&&s.animations);return s&&s._cacheable&&(r[o]=Object.freeze(d)),d}getSharedOptions(n){if(n.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},n))}includeOptions(n,t){return!t||LN(n)||this.chart._animationsDisabled}_getSharedOptions(n,t){const i=this.resolveDataElementOptions(n,t),a=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(t,r)||r!==a;return this.updateSharedOptions(r,t,i),{sharedOptions:r,includeOptions:o}}updateElement(n,t,i,a){LN(a)?Object.assign(n,i):this._resolveAnimations(t,a).update(n,i)}updateSharedOptions(n,t,i){n&&!LN(t)&&this._resolveAnimations(void 0,t).update(n,i)}_setStyle(n,t,i,a){n.active=a;const r=this.getStyle(t,a);this._resolveAnimations(t,i,a).update(n,{options:!a&&this.getSharedOptions(r)||r})}removeHoverStyle(n,t,i){this._setStyle(n,i,"active",!1)}setHoverStyle(n,t,i){this._setStyle(n,i,"active",!0)}_removeDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!1)}_setDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!0)}_resyncElements(n){const t=this._data,i=this._cachedMeta.data;for(const[l,s,d]of this._syncList)this[l](s,d);this._syncList=[];const a=i.length,r=t.length,o=Math.min(r,a);o&&this.parse(0,o),r>a?this._insertElements(a,r-a,n):r<a&&this._removeElements(r,a-r)}_insertElements(n,t,i=!0){const a=this._cachedMeta,r=a.data,o=n+t;let l;const s=d=>{for(d.length+=t,l=d.length-1;l>=o;l--)d[l]=d[l-t]};for(s(r),l=n;l<o;++l)r[l]=new this.dataElementType;this._parsing&&s(a._parsed),this.parse(n,t),i&&this.updateElements(r,n,t,"reset")}updateElements(n,t,i,a){}_removeElements(n,t){const i=this._cachedMeta;if(this._parsing){const a=i._parsed.splice(n,t);i._stacked&&iu(i,a)}i.data.splice(n,t)}_sync(n){if(this._parsing)this._syncList.push(n);else{const[t,i,a]=n;this[t](i,a)}this.chart._dataChanges.push([this.index,...n])}_onDataPush(){const n=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-n,n])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(n,t){t&&this._sync(["_removeElements",n,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",n,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}fe(Pa,"defaults",{}),fe(Pa,"datasetElementType",null),fe(Pa,"dataElementType",null);function Z$e(e,n){if(!e._cache.$bar){const t=e.getMatchingVisibleMetas(n);let i=[];for(let a=0,r=t.length;a<r;a++)i=i.concat(t[a].controller.getAllParsedValues(e));e._cache.$bar=wW(i.sort((a,r)=>a-r))}return e._cache.$bar}function J$e(e){const n=e.iScale,t=Z$e(n,e.type);let i=n._length,a,r,o,l;const s=()=>{o===32767||o===-32768||(Cm(l)&&(i=Math.min(i,Math.abs(o-l)||i)),l=o)};for(a=0,r=t.length;a<r;++a)o=n.getPixelForValue(t[a]),s();for(l=void 0,a=0,r=n.ticks.length;a<r;++a)o=n.getPixelForTick(a),s();return i}function eIe(e,n,t,i){const a=t.barThickness;let r,o;return Je(a)?(r=n.min*t.categoryPercentage,o=t.barPercentage):(r=a*i,o=1),{chunk:r/i,ratio:o,start:n.pixels[e]-r/2}}function nIe(e,n,t,i){const a=n.pixels,r=a[e];let o=e>0?a[e-1]:null,l=e<a.length-1?a[e+1]:null;const s=t.categoryPercentage;o===null&&(o=r-(l===null?n.end-n.start:l-r)),l===null&&(l=r+r-o);const d=r-(r-Math.min(o,l))/2*s;return{chunk:Math.abs(l-o)/2*s/i,ratio:t.barPercentage,start:d}}function tIe(e,n,t,i){const a=t.parse(e[0],i),r=t.parse(e[1],i),o=Math.min(a,r),l=Math.max(a,r);let s=o,d=l;Math.abs(o)>Math.abs(l)&&(s=l,d=o),n[t.axis]=d,n._custom={barStart:s,barEnd:d,start:a,end:r,min:o,max:l}}function YW(e,n,t,i){return wn(e)?tIe(e,n,t,i):n[t.axis]=t.parse(e,i),n}function iA(e,n,t,i){const a=e.iScale,r=e.vScale,o=a.getLabels(),l=a===r,s=[];let d,c,u,f;for(d=t,c=t+i;d<c;++d)f=n[d],u={},u[a.axis]=l||a.parse(o[d],d),s.push(YW(f,u,r,d));return s}function zN(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function iIe(e,n,t){return e!==0?rr(e):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function aIe(e){let n,t,i,a,r;return e.horizontal?(n=e.base>e.x,t="left",i="right"):(n=e.base<e.y,t="bottom",i="top"),n?(a="end",r="start"):(a="start",r="end"),{start:t,end:i,reverse:n,top:a,bottom:r}}function rIe(e,n,t,i){let a=n.borderSkipped;const r={};if(!a){e.borderSkipped=r;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:l,reverse:s,top:d,bottom:c}=aIe(e);a==="middle"&&t&&(e.enableBorderRadius=!0,(t._top||0)===i?a=d:(t._bottom||0)===i?a=c:(r[aA(c,o,l,s)]=!0,a=d)),r[aA(a,o,l,s)]=!0,e.borderSkipped=r}function aA(e,n,t,i){return i?(e=oIe(e,n,t),e=rA(e,t,n)):e=rA(e,n,t),e}function oIe(e,n,t){return e===n?t:e===t?n:e}function rA(e,n,t){return e==="start"?n:e==="end"?t:e}function lIe(e,{inflateAmount:n},t){e.inflateAmount=n==="auto"?t===1?.33:0:n}class Nh extends Pa{parsePrimitiveData(n,t,i,a){return iA(n,t,i,a)}parseArrayData(n,t,i,a){return iA(n,t,i,a)}parseObjectData(n,t,i,a){const{iScale:r,vScale:o}=n,{xAxisKey:l="x",yAxisKey:s="y"}=this._parsing,d=r.axis==="x"?l:s,c=o.axis==="x"?l:s,u=[];let f,p,h,k;for(f=i,p=i+a;f<p;++f)k=t[f],h={},h[r.axis]=r.parse(qo(k,d),f),u.push(YW(qo(k,c),h,o,f));return u}updateRangeFromParsed(n,t,i,a){super.updateRangeFromParsed(n,t,i,a);const r=i._custom;r&&t===this._cachedMeta.vScale&&(n.min=Math.min(n.min,r.min),n.max=Math.max(n.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(n){const t=this._cachedMeta,{iScale:i,vScale:a}=t,r=this.getParsed(n),o=r._custom,l=zN(o)?"["+o.start+", "+o.end+"]":""+a.getLabelForValue(r[a.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const n=this._cachedMeta;n.stack=this.getDataset().stack}update(n){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,n)}updateElements(n,t,i,a){const r=a==="reset",{index:o,_cachedMeta:{vScale:l}}=this,s=l.getBasePixel(),d=l.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(t,a);for(let p=t;p<t+i;p++){const h=this.getParsed(p),k=r||Je(h[l.axis])?{base:s,head:s}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),g=(h._stacks||{})[l.axis],v={horizontal:d,base:k.base,enableBorderRadius:!g||zN(h._custom)||o===g._top||o===g._bottom,x:d?k.head:y.center,y:d?y.center:k.head,height:d?y.size:Math.abs(k.size),width:d?Math.abs(k.size):y.size};f&&(v.options=u||this.resolveDataElementOptions(p,n[p].active?"active":a));const N=v.options||n[p].options;rIe(v,N,g,o),lIe(v,N,c.ratio),this.updateElement(n[p],p,v,a)}}_getStacks(n,t){const{iScale:i}=this._cachedMeta,a=i.getMatchingVisibleMetas(this._type).filter(s=>s.controller.options.grouped),r=i.options.stacked,o=[],l=s=>{const d=s.controller.getParsed(t),c=d&&d[s.vScale.axis];if(Je(c)||isNaN(c))return!0};for(const s of a)if(!(t!==void 0&&l(s))&&((r===!1||o.indexOf(s.stack)===-1||r===void 0&&s.stack===void 0)&&o.push(s.stack),s.index===n))break;return o.length||o.push(void 0),o}_getStackCount(n){return this._getStacks(void 0,n).length}_getStackIndex(n,t,i){const a=this._getStacks(n,i),r=t!==void 0?a.indexOf(t):-1;return r===-1?a.length-1:r}_getRuler(){const n=this.options,t=this._cachedMeta,i=t.iScale,a=[];let r,o;for(r=0,o=t.data.length;r<o;++r)a.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const l=n.barThickness;return{min:l||J$e(t),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:n.grouped,ratio:l?1:n.categoryPercentage*n.barPercentage}}_calculateBarValuePixels(n){const{_cachedMeta:{vScale:t,_stacked:i,index:a},options:{base:r,minBarLength:o}}=this,l=r||0,s=this.getParsed(n),d=s._custom,c=zN(d);let u=s[t.axis],f=0,p=i?this.applyStack(t,s,i):u,h,k;p!==u&&(f=p-u,p=u),c&&(u=d.barStart,p=d.barEnd-d.barStart,u!==0&&rr(u)!==rr(d.barEnd)&&(f=0),f+=u);const y=!Je(r)&&!c?r:f;let g=t.getPixelForValue(y);if(this.chart.getDataVisibility(n)?h=t.getPixelForValue(f+p):h=g,k=h-g,Math.abs(k)<o){k=iIe(k,t,l)*o,u===l&&(g-=k/2);const v=t.getPixelForDecimal(0),N=t.getPixelForDecimal(1),x=Math.min(v,N),F=Math.max(v,N);g=Math.max(Math.min(g,F),x),h=g+k,i&&!c&&(s._stacks[t.axis]._visualValues[a]=t.getValueForPixel(h)-t.getValueForPixel(g))}if(g===t.getPixelForValue(l)){const v=rr(k)*t.getLineWidthForValue(l)/2;g+=v,k-=v}return{size:k,base:g,head:h,center:h+k/2}}_calculateBarIndexPixels(n,t){const i=t.scale,a=this.options,r=a.skipNull,o=Re(a.maxBarThickness,1/0);let l,s;if(t.grouped){const d=r?this._getStackCount(n):t.stackCount,c=a.barThickness==="flex"?nIe(n,t,a,d):eIe(n,t,a,d),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?n:void 0);l=c.start+c.chunk*u+c.chunk/2,s=Math.min(o,c.chunk*c.ratio)}else l=i.getPixelForValue(this.getParsed(n)[i.axis],n),s=Math.min(o,t.min*t.ratio);return{base:l-s/2,head:l+s/2,center:l,size:s}}draw(){const n=this._cachedMeta,t=n.vScale,i=n.data,a=i.length;let r=0;for(;r<a;++r)this.getParsed(r)[t.axis]!==null&&i[r].draw(this._ctx)}}fe(Nh,"id","bar"),fe(Nh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),fe(Nh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class bh extends Pa{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(n,t,i,a){const r=super.parsePrimitiveData(n,t,i,a);for(let o=0;o<r.length;o++)r[o]._custom=this.resolveDataElementOptions(o+i).radius;return r}parseArrayData(n,t,i,a){const r=super.parseArrayData(n,t,i,a);for(let o=0;o<r.length;o++){const l=t[i+o];r[o]._custom=Re(l[2],this.resolveDataElementOptions(o+i).radius)}return r}parseObjectData(n,t,i,a){const r=super.parseObjectData(n,t,i,a);for(let o=0;o<r.length;o++){const l=t[i+o];r[o]._custom=Re(l&&l.r&&+l.r,this.resolveDataElementOptions(o+i).radius)}return r}getMaxOverflow(){const n=this._cachedMeta.data;let t=0;for(let i=n.length-1;i>=0;--i)t=Math.max(t,n[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(n){const t=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:r}=t,o=this.getParsed(n),l=a.getLabelForValue(o.x),s=r.getLabelForValue(o.y),d=o._custom;return{label:i[n]||"",value:"("+l+", "+s+(d?", "+d:"")+")"}}update(n){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,n)}updateElements(n,t,i,a){const r=a==="reset",{iScale:o,vScale:l}=this._cachedMeta,{sharedOptions:s,includeOptions:d}=this._getSharedOptions(t,a),c=o.axis,u=l.axis;for(let f=t;f<t+i;f++){const p=n[f],h=!r&&this.getParsed(f),k={},y=k[c]=r?o.getPixelForDecimal(.5):o.getPixelForValue(h[c]),g=k[u]=r?l.getBasePixel():l.getPixelForValue(h[u]);k.skip=isNaN(y)||isNaN(g),d&&(k.options=s||this.resolveDataElementOptions(f,p.active?"active":a),r&&(k.options.radius=0)),this.updateElement(p,f,k,a)}}resolveDataElementOptions(n,t){const i=this.getParsed(n);let a=super.resolveDataElementOptions(n,t);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const r=a.radius;return t!=="active"&&(a.radius=0),a.radius+=Re(i&&i._custom,r),a}}fe(bh,"id","bubble"),fe(bh,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),fe(bh,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function sIe(e,n,t){let i=1,a=1,r=0,o=0;if(n<Pn){const l=e,s=l+n,d=Math.cos(l),c=Math.sin(l),u=Math.cos(s),f=Math.sin(s),p=(N,x,F)=>Pm(N,l,s,!0)?1:Math.max(x,x*t,F,F*t),h=(N,x,F)=>Pm(N,l,s,!0)?-1:Math.min(x,x*t,F,F*t),k=p(0,d,u),y=p(qn,c,f),g=h(On,d,u),v=h(On+qn,c,f);i=(k-g)/2,a=(y-v)/2,r=-(k+g)/2,o=-(y+v)/2}return{ratioX:i,ratioY:a,offsetX:r,offsetY:o}}class Rl extends Pa{constructor(n,t){super(n,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(n,t){const i=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=i;else{let r=s=>+i[s];if(Ye(i[n])){const{key:s="value"}=this._parsing;r=d=>+qo(i[d],s)}let o,l;for(o=n,l=n+t;o<l;++o)a._parsed[o]=r(o)}}_getRotation(){return Na(this.options.rotation-90)}_getCircumference(){return Na(this.options.circumference)}_getRotationExtents(){let n=Pn,t=-Pn;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const a=this.chart.getDatasetMeta(i).controller,r=a._getRotation(),o=a._getCircumference();n=Math.min(n,r),t=Math.max(t,r+o)}return{rotation:n,circumference:t-n}}update(n){const t=this.chart,{chartArea:i}=t,a=this._cachedMeta,r=a.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,l=Math.max((Math.min(i.width,i.height)-o)/2,0),s=Math.min(b2e(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:c,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:h,offsetY:k}=sIe(u,c,s),y=(i.width-o)/f,g=(i.height-o)/p,v=Math.max(Math.min(y,g)/2,0),N=SW(this.options.radius,v),x=Math.max(N*s,0),F=(N-x)/this._getVisibleDatasetWeightTotal();this.offsetX=h*N,this.offsetY=k*N,a.total=this.calculateTotal(),this.outerRadius=N-F*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-F*d,0),this.updateElements(r,0,r.length,n)}_circumference(n,t){const i=this.options,a=this._cachedMeta,r=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(n)||a._parsed[n]===null||a.data[n].hidden?0:this.calculateCircumference(a._parsed[n]*r/Pn)}updateElements(n,t,i,a){const r=a==="reset",o=this.chart,l=o.chartArea,d=o.options.animation,c=(l.left+l.right)/2,u=(l.top+l.bottom)/2,f=r&&d.animateScale,p=f?0:this.innerRadius,h=f?0:this.outerRadius,{sharedOptions:k,includeOptions:y}=this._getSharedOptions(t,a);let g=this._getRotation(),v;for(v=0;v<t;++v)g+=this._circumference(v,r);for(v=t;v<t+i;++v){const N=this._circumference(v,r),x=n[v],F={x:c+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+N,circumference:N,outerRadius:h,innerRadius:p};y&&(F.options=k||this.resolveDataElementOptions(v,x.active?"active":a)),g+=N,this.updateElement(x,v,F,a)}}calculateTotal(){const n=this._cachedMeta,t=n.data;let i=0,a;for(a=0;a<t.length;a++){const r=n._parsed[a];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(a)&&!t[a].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(n){const t=this._cachedMeta.total;return t>0&&!isNaN(n)?Pn*(Math.abs(n)/t):0}getLabelAndValue(n){const t=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=uf(t._parsed[n],i.options.locale);return{label:a[n]||"",value:r}}getMaxBorderWidth(n){let t=0;const i=this.chart;let a,r,o,l,s;if(!n){for(a=0,r=i.data.datasets.length;a<r;++a)if(i.isDatasetVisible(a)){o=i.getDatasetMeta(a),n=o.data,l=o.controller;break}}if(!n)return 0;for(a=0,r=n.length;a<r;++a)s=l.resolveDataElementOptions(a),s.borderAlign!=="inner"&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(n){let t=0;for(let i=0,a=n.length;i<a;++i){const r=this.resolveDataElementOptions(i);t=Math.max(t,r.offset||0,r.hoverOffset||0)}return t}_getRingWeightOffset(n){let t=0;for(let i=0;i<n;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(n){return Math.max(Re(this.chart.data.datasets[n].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}fe(Rl,"id","doughnut"),fe(Rl,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),fe(Rl,"descriptors",{_scriptable:n=>n!=="spacing",_indexable:n=>n!=="spacing"&&!n.startsWith("borderDash")&&!n.startsWith("hoverBorderDash")}),fe(Rl,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:i,color:a}}=n.legend.options;return t.labels.map((r,o)=>{const s=n.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:a,lineWidth:s.borderWidth,pointStyle:i,hidden:!n.getDataVisibility(o),index:o}})}return[]}},onClick(n,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}});class xh extends Pa{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(n){const t=this._cachedMeta,{dataset:i,data:a=[],_dataset:r}=t,o=this.chart._animationsDisabled;let{start:l,count:s}=PW(t,a,o);this._drawStart=l,this._drawCount=s,OW(t)&&(l=0,s=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=a;const d=this.resolveDatasetElementOptions(n);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:d},n),this.updateElements(a,l,s,n)}updateElements(n,t,i,a){const r=a==="reset",{iScale:o,vScale:l,_stacked:s,_dataset:d}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,a),f=o.axis,p=l.axis,{spanGaps:h,segment:k}=this.options,y=Xd(h)?h:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||r||a==="none",v=t+i,N=n.length;let x=t>0&&this.getParsed(t-1);for(let F=0;F<N;++F){const _=n[F],w=g?_:{};if(F<t||F>=v){w.skip=!0;continue}const C=this.getParsed(F),$=Je(C[p]),E=w[f]=o.getPixelForValue(C[f],F),j=w[p]=r||$?l.getBasePixel():l.getPixelForValue(s?this.applyStack(l,C,s):C[p],F);w.skip=isNaN(E)||isNaN(j)||$,w.stop=F>0&&Math.abs(C[f]-x[f])>y,k&&(w.parsed=C,w.raw=d.data[F]),u&&(w.options=c||this.resolveDataElementOptions(F,_.active?"active":a)),g||this.updateElement(_,F,w,a),x=C}}getMaxOverflow(){const n=this._cachedMeta,t=n.dataset,i=t.options&&t.options.borderWidth||0,a=n.data||[];if(!a.length)return i;const r=a[0].size(this.resolveDataElementOptions(0)),o=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,r,o)/2}draw(){const n=this._cachedMeta;n.dataset.updateControlPoints(this.chart.chartArea,n.iScale.axis),super.draw()}}fe(xh,"id","line"),fe(xh,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),fe(xh,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Wu extends Pa{constructor(n,t){super(n,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(n){const t=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=uf(t._parsed[n].r,i.options.locale);return{label:a[n]||"",value:r}}parseObjectData(n,t,i,a){return RW.bind(this)(n,t,i,a)}update(n){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,n)}getMinMax(){const n=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return n.data.forEach((i,a)=>{const r=this.getParsed(a).r;!isNaN(r)&&this.chart.getDataVisibility(a)&&(r<t.min&&(t.min=r),r>t.max&&(t.max=r))}),t}_updateRadius(){const n=this.chart,t=n.chartArea,i=n.options,a=Math.min(t.right-t.left,t.bottom-t.top),r=Math.max(a/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),l=(r-o)/n.getVisibleDatasetCount();this.outerRadius=r-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(n,t,i,a){const r=a==="reset",o=this.chart,s=o.options.animation,d=this._cachedMeta.rScale,c=d.xCenter,u=d.yCenter,f=d.getIndexAngle(0)-.5*On;let p=f,h;const k=360/this.countVisibleElements();for(h=0;h<t;++h)p+=this._computeAngle(h,a,k);for(h=t;h<t+i;h++){const y=n[h];let g=p,v=p+this._computeAngle(h,a,k),N=o.getDataVisibility(h)?d.getDistanceFromCenterForValue(this.getParsed(h).r):0;p=v,r&&(s.animateScale&&(N=0),s.animateRotate&&(g=v=f));const x={x:c,y:u,innerRadius:0,outerRadius:N,startAngle:g,endAngle:v,options:this.resolveDataElementOptions(h,y.active?"active":a)};this.updateElement(y,h,x,a)}}countVisibleElements(){const n=this._cachedMeta;let t=0;return n.data.forEach((i,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&t++}),t}_computeAngle(n,t,i){return this.chart.getDataVisibility(n)?Na(this.resolveDataElementOptions(n,t).angle||i):0}}fe(Wu,"id","polarArea"),fe(Wu,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),fe(Wu,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:i,color:a}}=n.legend.options;return t.labels.map((r,o)=>{const s=n.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:a,lineWidth:s.borderWidth,pointStyle:i,hidden:!n.getDataVisibility(o),index:o}})}return[]}},onClick(n,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class dF extends Rl{}fe(dF,"id","pie"),fe(dF,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Fh extends Pa{getLabelAndValue(n){const t=this._cachedMeta.vScale,i=this.getParsed(n);return{label:t.getLabels()[n],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(n,t,i,a){return RW.bind(this)(n,t,i,a)}update(n){const t=this._cachedMeta,i=t.dataset,a=t.data||[],r=t.iScale.getLabels();if(i.points=a,n!=="resize"){const o=this.resolveDatasetElementOptions(n);this.options.showLine||(o.borderWidth=0);const l={_loop:!0,_fullLoop:r.length===a.length,options:o};this.updateElement(i,void 0,l,n)}this.updateElements(a,0,a.length,n)}updateElements(n,t,i,a){const r=this._cachedMeta.rScale,o=a==="reset";for(let l=t;l<t+i;l++){const s=n[l],d=this.resolveDataElementOptions(l,s.active?"active":a),c=r.getPointPositionForValue(l,this.getParsed(l).r),u=o?r.xCenter:c.x,f=o?r.yCenter:c.y,p={x:u,y:f,angle:c.angle,skip:isNaN(u)||isNaN(f),options:d};this.updateElement(s,l,p,a)}}}fe(Fh,"id","radar"),fe(Fh,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),fe(Fh,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class wh extends Pa{getLabelAndValue(n){const t=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:r}=t,o=this.getParsed(n),l=a.getLabelForValue(o.x),s=r.getLabelForValue(o.y);return{label:i[n]||"",value:"("+l+", "+s+")"}}update(n){const t=this._cachedMeta,{data:i=[]}=t,a=this.chart._animationsDisabled;let{start:r,count:o}=PW(t,i,a);if(this._drawStart=r,this._drawCount=o,OW(t)&&(r=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:s}=t;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!s._decimated,l.points=i;const d=this.resolveDatasetElementOptions(n);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!a,options:d},n)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(i,r,o,n)}addElements(){const{showLine:n}=this.options;!this.datasetElementType&&n&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(n,t,i,a){const r=a==="reset",{iScale:o,vScale:l,_stacked:s,_dataset:d}=this._cachedMeta,c=this.resolveDataElementOptions(t,a),u=this.getSharedOptions(c),f=this.includeOptions(a,u),p=o.axis,h=l.axis,{spanGaps:k,segment:y}=this.options,g=Xd(k)?k:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||a==="none";let N=t>0&&this.getParsed(t-1);for(let x=t;x<t+i;++x){const F=n[x],_=this.getParsed(x),w=v?F:{},C=Je(_[h]),$=w[p]=o.getPixelForValue(_[p],x),E=w[h]=r||C?l.getBasePixel():l.getPixelForValue(s?this.applyStack(l,_,s):_[h],x);w.skip=isNaN($)||isNaN(E)||C,w.stop=x>0&&Math.abs(_[p]-N[p])>g,y&&(w.parsed=_,w.raw=d.data[x]),f&&(w.options=u||this.resolveDataElementOptions(x,F.active?"active":a)),v||this.updateElement(F,x,w,a),N=_}this.updateSharedOptions(u,a,c)}getMaxOverflow(){const n=this._cachedMeta,t=n.data||[];if(!this.options.showLine){let l=0;for(let s=t.length-1;s>=0;--s)l=Math.max(l,t[s].size(this.resolveDataElementOptions(s))/2);return l>0&&l}const i=n.dataset,a=i.options&&i.options.borderWidth||0;if(!t.length)return a;const r=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(a,r,o)/2}}fe(wh,"id","scatter"),fe(wh,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),fe(wh,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var dIe=Object.freeze({__proto__:null,BarController:Nh,BubbleController:bh,DoughnutController:Rl,LineController:xh,PieController:dF,PolarAreaController:Wu,RadarController:Fh,ScatterController:wh});function Sl(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class x1{constructor(n){fe(this,"options");this.options=n||{}}static override(n){Object.assign(x1.prototype,n)}init(){}formats(){return Sl()}parse(){return Sl()}format(){return Sl()}add(){return Sl()}diff(){return Sl()}startOf(){return Sl()}endOf(){return Sl()}}var cIe={_date:x1};function uIe(e,n,t,i){const{controller:a,data:r,_sorted:o}=e,l=a._cachedMeta.iScale;if(l&&n===l.axis&&n!=="r"&&o&&r.length){const s=l._reversePixels?j2e:Pr;if(i){if(a._sharedOptions){const d=r[0],c=typeof d.getRange=="function"&&d.getRange(n);if(c){const u=s(r,n,t-c),f=s(r,n,t+c);return{lo:u.lo,hi:f.hi}}}}else return s(r,n,t)}return{lo:0,hi:r.length-1}}function mf(e,n,t,i,a){const r=e.getSortedVisibleDatasetMetas(),o=t[n];for(let l=0,s=r.length;l<s;++l){const{index:d,data:c}=r[l],{lo:u,hi:f}=uIe(r[l],n,o,a);for(let p=u;p<=f;++p){const h=c[p];h.skip||i(h,d,p)}}}function mIe(e){const n=e.indexOf("x")!==-1,t=e.indexOf("y")!==-1;return function(i,a){const r=n?Math.abs(i.x-a.x):0,o=t?Math.abs(i.y-a.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function BN(e,n,t,i,a){const r=[];return!a&&!e.isPointInArea(n)||mf(e,t,n,function(l,s,d){!a&&!Or(l,e.chartArea,0)||l.inRange(n.x,n.y,i)&&r.push({element:l,datasetIndex:s,index:d})},!0),r}function fIe(e,n,t,i){let a=[];function r(o,l,s){const{startAngle:d,endAngle:c}=o.getProps(["startAngle","endAngle"],i),{angle:u}=xW(o,{x:n.x,y:n.y});Pm(u,d,c)&&a.push({element:o,datasetIndex:l,index:s})}return mf(e,t,n,r),a}function pIe(e,n,t,i,a,r){let o=[];const l=mIe(t);let s=Number.POSITIVE_INFINITY;function d(c,u,f){const p=c.inRange(n.x,n.y,a);if(i&&!p)return;const h=c.getCenterPoint(a);if(!(!!r||e.isPointInArea(h))&&!p)return;const y=l(n,h);y<s?(o=[{element:c,datasetIndex:u,index:f}],s=y):y===s&&o.push({element:c,datasetIndex:u,index:f})}return mf(e,t,n,d),o}function VN(e,n,t,i,a,r){return!r&&!e.isPointInArea(n)?[]:t==="r"&&!i?fIe(e,n,t,a):pIe(e,n,t,i,a,r)}function oA(e,n,t,i,a){const r=[],o=t==="x"?"inXRange":"inYRange";let l=!1;return mf(e,t,n,(s,d,c)=>{s[o](n[t],a)&&(r.push({element:s,datasetIndex:d,index:c}),l=l||s.inRange(n.x,n.y,a))}),i&&!l?[]:r}var hIe={evaluateInteractionItems:mf,modes:{index(e,n,t,i){const a=Cl(n,e),r=t.axis||"x",o=t.includeInvisible||!1,l=t.intersect?BN(e,a,r,i,o):VN(e,a,r,!1,i,o),s=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const c=l[0].index,u=d.data[c];u&&!u.skip&&s.push({element:u,datasetIndex:d.index,index:c})}),s):[]},dataset(e,n,t,i){const a=Cl(n,e),r=t.axis||"xy",o=t.includeInvisible||!1;let l=t.intersect?BN(e,a,r,i,o):VN(e,a,r,!1,i,o);if(l.length>0){const s=l[0].datasetIndex,d=e.getDatasetMeta(s).data;l=[];for(let c=0;c<d.length;++c)l.push({element:d[c],datasetIndex:s,index:c})}return l},point(e,n,t,i){const a=Cl(n,e),r=t.axis||"xy",o=t.includeInvisible||!1;return BN(e,a,r,i,o)},nearest(e,n,t,i){const a=Cl(n,e),r=t.axis||"xy",o=t.includeInvisible||!1;return VN(e,a,r,t.intersect,i,o)},x(e,n,t,i){const a=Cl(n,e);return oA(e,a,"x",t.intersect,i)},y(e,n,t,i){const a=Cl(n,e);return oA(e,a,"y",t.intersect,i)}}};const GW=["left","top","right","bottom"];function au(e,n){return e.filter(t=>t.pos===n)}function lA(e,n){return e.filter(t=>GW.indexOf(t.pos)===-1&&t.box.axis===n)}function ru(e,n){return e.sort((t,i)=>{const a=n?i:t,r=n?t:i;return a.weight===r.weight?a.index-r.index:a.weight-r.weight})}function vIe(e){const n=[];let t,i,a,r,o,l;for(t=0,i=(e||[]).length;t<i;++t)a=e[t],{position:r,options:{stack:o,stackWeight:l=1}}=a,n.push({index:t,box:a,pos:r,horizontal:a.isHorizontal(),weight:a.weight,stack:o&&r+o,stackWeight:l});return n}function kIe(e){const n={};for(const t of e){const{stack:i,pos:a,stackWeight:r}=t;if(!i||!GW.includes(a))continue;const o=n[i]||(n[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return n}function gIe(e,n){const t=kIe(e),{vBoxMaxWidth:i,hBoxMaxHeight:a}=n;let r,o,l;for(r=0,o=e.length;r<o;++r){l=e[r];const{fullSize:s}=l.box,d=t[l.stack],c=d&&l.stackWeight/d.weight;l.horizontal?(l.width=c?c*i:s&&n.availableWidth,l.height=a):(l.width=i,l.height=c?c*a:s&&n.availableHeight)}return t}function yIe(e){const n=vIe(e),t=ru(n.filter(d=>d.box.fullSize),!0),i=ru(au(n,"left"),!0),a=ru(au(n,"right")),r=ru(au(n,"top"),!0),o=ru(au(n,"bottom")),l=lA(n,"x"),s=lA(n,"y");return{fullSize:t,leftAndTop:i.concat(r),rightAndBottom:a.concat(s).concat(o).concat(l),chartArea:au(n,"chartArea"),vertical:i.concat(a).concat(s),horizontal:r.concat(o).concat(l)}}function sA(e,n,t,i){return Math.max(e[t],n[t])+Math.max(e[i],n[i])}function qW(e,n){e.top=Math.max(e.top,n.top),e.left=Math.max(e.left,n.left),e.bottom=Math.max(e.bottom,n.bottom),e.right=Math.max(e.right,n.right)}function SIe(e,n,t,i){const{pos:a,box:r}=t,o=e.maxPadding;if(!Ye(a)){t.size&&(e[a]-=t.size);const u=i[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?r.height:r.width),t.size=u.size/u.count,e[a]+=t.size}r.getPadding&&qW(o,r.getPadding());const l=Math.max(0,n.outerWidth-sA(o,e,"left","right")),s=Math.max(0,n.outerHeight-sA(o,e,"top","bottom")),d=l!==e.w,c=s!==e.h;return e.w=l,e.h=s,t.horizontal?{same:d,other:c}:{same:c,other:d}}function NIe(e){const n=e.maxPadding;function t(i){const a=Math.max(n[i]-e[i],0);return e[i]+=a,a}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function bIe(e,n){const t=n.maxPadding;function i(a){const r={left:0,top:0,right:0,bottom:0};return a.forEach(o=>{r[o]=Math.max(n[o],t[o])}),r}return i(e?["left","right"]:["top","bottom"])}function hu(e,n,t,i){const a=[];let r,o,l,s,d,c;for(r=0,o=e.length,d=0;r<o;++r){l=e[r],s=l.box,s.update(l.width||n.w,l.height||n.h,bIe(l.horizontal,n));const{same:u,other:f}=SIe(n,t,l,i);d|=u&&a.length,c=c||f,s.fullSize||a.push(l)}return d&&hu(a,n,t,i)||c}function Dp(e,n,t,i,a){e.top=t,e.left=n,e.right=n+i,e.bottom=t+a,e.width=i,e.height=a}function dA(e,n,t,i){const a=t.padding;let{x:r,y:o}=n;for(const l of e){const s=l.box,d=i[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/d.weight||1;if(l.horizontal){const u=n.w*c,f=d.size||s.height;Cm(d.start)&&(o=d.start),s.fullSize?Dp(s,a.left,o,t.outerWidth-a.right-a.left,f):Dp(s,n.left+d.placed,o,u,f),d.start=o,d.placed+=u,o=s.bottom}else{const u=n.h*c,f=d.size||s.width;Cm(d.start)&&(r=d.start),s.fullSize?Dp(s,r,a.top,f,t.outerHeight-a.bottom-a.top):Dp(s,r,n.top+d.placed,f,u),d.start=r,d.placed+=u,r=s.right}}n.x=r,n.y=o}var Wt={addBox(e,n){e.boxes||(e.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},e.boxes.push(n)},removeBox(e,n){const t=e.boxes?e.boxes.indexOf(n):-1;t!==-1&&e.boxes.splice(t,1)},configure(e,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(e,n,t,i){if(!e)return;const a=qt(e.options.layout.padding),r=Math.max(n-a.width,0),o=Math.max(t-a.height,0),l=yIe(e.boxes),s=l.vertical,d=l.horizontal;on(e.boxes,k=>{typeof k.beforeLayout=="function"&&k.beforeLayout()});const c=s.reduce((k,y)=>y.box.options&&y.box.options.display===!1?k:k+1,0)||1,u=Object.freeze({outerWidth:n,outerHeight:t,padding:a,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},a);qW(f,qt(i));const p=Object.assign({maxPadding:f,w:r,h:o,x:a.left,y:a.top},a),h=gIe(s.concat(d),u);hu(l.fullSize,p,u,h),hu(s,p,u,h),hu(d,p,u,h)&&hu(s,p,u,h),NIe(p),dA(l.leftAndTop,p,u,h),p.x+=p.w,p.y+=p.h,dA(l.rightAndBottom,p,u,h),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},on(l.chartArea,k=>{const y=k.box;Object.assign(y,e.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class KW{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,i){}removeEventListener(n,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,i,a){return t=Math.max(0,t||n.width),i=i||n.height,{width:t,height:Math.max(0,a?Math.floor(t/a):i)}}isAttached(n){return!0}updateConfig(n){}}class xIe extends KW{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const _h="$chartjs",FIe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cA=e=>e===null||e==="";function wIe(e,n){const t=e.style,i=e.getAttribute("height"),a=e.getAttribute("width");if(e[_h]={initial:{height:i,width:a,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",cA(a)){const r=YT(e,"width");r!==void 0&&(e.width=r)}if(cA(i))if(e.style.height==="")e.height=e.width/(n||2);else{const r=YT(e,"height");r!==void 0&&(e.height=r)}return e}const XW=C$e?{passive:!0}:!1;function _Ie(e,n,t){e&&e.addEventListener(n,t,XW)}function CIe(e,n,t){e&&e.canvas&&e.canvas.removeEventListener(n,t,XW)}function PIe(e,n){const t=FIe[e.type]||e.type,{x:i,y:a}=Cl(e,n);return{type:t,chart:n,native:e,x:i!==void 0?i:null,y:a!==void 0?a:null}}function yy(e,n){for(const t of e)if(t===n||t.contains(n))return!0}function OIe(e,n,t){const i=e.canvas,a=new MutationObserver(r=>{let o=!1;for(const l of r)o=o||yy(l.addedNodes,i),o=o&&!yy(l.removedNodes,i);o&&t()});return a.observe(document,{childList:!0,subtree:!0}),a}function DIe(e,n,t){const i=e.canvas,a=new MutationObserver(r=>{let o=!1;for(const l of r)o=o||yy(l.removedNodes,i),o=o&&!yy(l.addedNodes,i);o&&t()});return a.observe(document,{childList:!0,subtree:!0}),a}const Dm=new Map;let uA=0;function QW(){const e=window.devicePixelRatio;e!==uA&&(uA=e,Dm.forEach((n,t)=>{t.currentDevicePixelRatio!==e&&n()}))}function EIe(e,n){Dm.size||window.addEventListener("resize",QW),Dm.set(e,n)}function $Ie(e){Dm.delete(e),Dm.size||window.removeEventListener("resize",QW)}function IIe(e,n,t){const i=e.canvas,a=i&&b1(i);if(!a)return;const r=CW((l,s)=>{const d=a.clientWidth;t(l,s),d<a.clientWidth&&t()},window),o=new ResizeObserver(l=>{const s=l[0],d=s.contentRect.width,c=s.contentRect.height;d===0&&c===0||r(d,c)});return o.observe(a),EIe(e,r),o}function WN(e,n,t){t&&t.disconnect(),n==="resize"&&$Ie(e)}function jIe(e,n,t){const i=e.canvas,a=CW(r=>{e.ctx!==null&&t(PIe(r,e))},e);return _Ie(i,n,a),a}class TIe extends KW{acquireContext(n,t){const i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(wIe(n,t),i):null}releaseContext(n){const t=n.canvas;if(!t[_h])return!1;const i=t[_h].initial;["height","width"].forEach(r=>{const o=i[r];Je(o)?t.removeAttribute(r):t.setAttribute(r,o)});const a=i.style||{};return Object.keys(a).forEach(r=>{t.style[r]=a[r]}),t.width=t.width,delete t[_h],!0}addEventListener(n,t,i){this.removeEventListener(n,t);const a=n.$proxies||(n.$proxies={}),o={attach:OIe,detach:DIe,resize:IIe}[t]||jIe;a[t]=o(n,t,i)}removeEventListener(n,t){const i=n.$proxies||(n.$proxies={}),a=i[t];if(!a)return;({attach:WN,detach:WN,resize:WN}[t]||CIe)(n,t,a),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,i,a){return _$e(n,t,i,a)}isAttached(n){const t=b1(n);return!!(t&&t.isConnected)}}function AIe(e){return!N1()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?xIe:TIe}var Mp;let qr=(Mp=class{constructor(){fe(this,"x");fe(this,"y");fe(this,"active",!1);fe(this,"options");fe(this,"$animations")}tooltipPosition(n){const{x:t,y:i}=this.getProps(["x","y"],n);return{x:t,y:i}}hasValue(){return Xd(this.x)&&Xd(this.y)}getProps(n,t){const i=this.$animations;if(!t||!i)return this;const a={};return n.forEach(r=>{a[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),a}},fe(Mp,"defaults",{}),fe(Mp,"defaultRoutes"),Mp);function RIe(e,n){const t=e.options.ticks,i=MIe(e),a=Math.min(t.maxTicksLimit||i,i),r=t.major.enabled?zIe(n):[],o=r.length,l=r[0],s=r[o-1],d=[];if(o>a)return BIe(n,d,r,o/a),d;const c=LIe(r,n,a);if(o>0){let u,f;const p=o>1?Math.round((s-l)/(o-1)):null;for(Ep(n,d,c,Je(p)?0:l-p,l),u=0,f=o-1;u<f;u++)Ep(n,d,c,r[u],r[u+1]);return Ep(n,d,c,s,Je(p)?n.length:s+p),d}return Ep(n,d,c),d}function MIe(e){const n=e.options.offset,t=e._tickSize(),i=e._length/t+(n?0:1),a=e._maxLength/t;return Math.floor(Math.min(i,a))}function LIe(e,n,t){const i=VIe(e),a=n.length/t;if(!i)return Math.max(a,1);const r=D2e(i);for(let o=0,l=r.length-1;o<l;o++){const s=r[o];if(s>a)return s}return Math.max(a,1)}function zIe(e){const n=[];let t,i;for(t=0,i=e.length;t<i;t++)e[t].major&&n.push(t);return n}function BIe(e,n,t,i){let a=0,r=t[0],o;for(i=Math.ceil(i),o=0;o<e.length;o++)o===r&&(n.push(e[o]),a++,r=t[a*i])}function Ep(e,n,t,i,a){const r=Re(i,0),o=Math.min(Re(a,e.length),e.length);let l=0,s,d,c;for(t=Math.ceil(t),a&&(s=a-i,t=s/Math.floor(s/t)),c=r;c<0;)l++,c=Math.round(r+l*t);for(d=Math.max(r,0);d<o;d++)d===c&&(n.push(e[d]),l++,c=Math.round(r+l*t))}function VIe(e){const n=e.length;let t,i;if(n<2)return!1;for(i=e[0],t=1;t<n;++t)if(e[t]-e[t-1]!==i)return!1;return i}const WIe=e=>e==="left"?"right":e==="right"?"left":e,mA=(e,n,t)=>n==="top"||n==="left"?e[n]+t:e[n]-t,fA=(e,n)=>Math.min(n||e,e);function pA(e,n){const t=[],i=e.length/n,a=e.length;let r=0;for(;r<a;r+=i)t.push(e[Math.floor(r)]);return t}function HIe(e,n,t){const i=e.ticks.length,a=Math.min(n,i-1),r=e._startPixel,o=e._endPixel,l=1e-6;let s=e.getPixelForTick(a),d;if(!(t&&(i===1?d=Math.max(s-r,o-s):n===0?d=(e.getPixelForTick(1)-s)/2:d=(s-e.getPixelForTick(a-1))/2,s+=a<n?d:-d,s<r-l||s>o+l)))return s}function UIe(e,n){on(e,t=>{const i=t.gc,a=i.length/2;let r;if(a>n){for(r=0;r<a;++r)delete t.data[i[r]];i.splice(0,a)}})}function ou(e){return e.drawTicks?e.tickLength:0}function hA(e,n){if(!e.display)return 0;const t=ht(e.font,n),i=qt(e.padding);return(wn(e.text)?e.text.length:1)*t.lineHeight+i.height}function YIe(e,n){return dl(e,{scale:n,type:"scale"})}function GIe(e,n,t){return dl(e,{tick:t,index:n,type:"tick"})}function qIe(e,n,t){let i=h1(e);return(t&&n!=="right"||!t&&n==="right")&&(i=WIe(i)),i}function KIe(e,n,t,i){const{top:a,left:r,bottom:o,right:l,chart:s}=e,{chartArea:d,scales:c}=s;let u=0,f,p,h;const k=o-a,y=l-r;if(e.isHorizontal()){if(p=Lt(i,r,l),Ye(t)){const g=Object.keys(t)[0],v=t[g];h=c[g].getPixelForValue(v)+k-n}else t==="center"?h=(d.bottom+d.top)/2+k-n:h=mA(e,t,n);f=l-r}else{if(Ye(t)){const g=Object.keys(t)[0],v=t[g];p=c[g].getPixelForValue(v)-y+n}else t==="center"?p=(d.left+d.right)/2-y+n:p=mA(e,t,n);h=Lt(i,o,a),u=t==="left"?-qn:qn}return{titleX:p,titleY:h,maxWidth:f,rotation:u}}class bs extends qr{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:i,_suggestedMax:a}=this;return n=Ni(n,Number.POSITIVE_INFINITY),t=Ni(t,Number.NEGATIVE_INFINITY),i=Ni(i,Number.POSITIVE_INFINITY),a=Ni(a,Number.NEGATIVE_INFINITY),{min:Ni(n,i),max:Ni(t,a),minDefined:zn(n),maxDefined:zn(t)}}getMinMax(n){let{min:t,max:i,minDefined:a,maxDefined:r}=this.getUserBounds(),o;if(a&&r)return{min:t,max:i};const l=this.getMatchingVisibleMetas();for(let s=0,d=l.length;s<d;++s)o=l[s].controller.getMinMax(this,n),a||(t=Math.min(t,o.min)),r||(i=Math.max(i,o.max));return t=r&&t>i?i:t,i=a&&t>i?t:i,{min:Ni(t,Ni(i,t)),max:Ni(i,Ni(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){gn(this.options.beforeUpdate,[this])}update(n,t,i){const{beginAtZero:a,grace:r,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=a$e(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=l<this.ticks.length;this._convertTicksToLabels(s?pA(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=RIe(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,n=!n),this._startPixel=t,this._endPixel=i,this._reversePixels=n,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){gn(this.options.afterUpdate,[this])}beforeSetDimensions(){gn(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){gn(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),gn(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){gn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){const t=this.options.ticks;let i,a,r;for(i=0,a=n.length;i<a;i++)r=n[i],r.label=gn(t.callback,[r.value,i,n],this)}afterTickToLabelConversion(){gn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){gn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,i=fA(this.ticks.length,n.ticks.maxTicksLimit),a=t.minRotation||0,r=t.maxRotation;let o=a,l,s,d;if(!this._isVisible()||!t.display||a>=r||i<=1||!this.isHorizontal()){this.labelRotation=a;return}const c=this._getLabelSizes(),u=c.widest.width,f=c.highest.height,p=Nt(this.chart.width-u,0,this.maxWidth);l=n.offset?this.maxWidth/i:p/(i-1),u+6>l&&(l=p/(i-(n.offset?.5:1)),s=this.maxHeight-ou(n.grid)-t.padding-hA(n.title,this.chart.options.font),d=Math.sqrt(u*u+f*f),o=f1(Math.min(Math.asin(Nt((c.highest.height+6)/l,-1,1)),Math.asin(Nt(s/d,-1,1))-Math.asin(Nt(f/d,-1,1)))),o=Math.max(a,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){gn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){gn(this.options.beforeFit,[this])}fit(){const n={width:0,height:0},{chart:t,options:{ticks:i,title:a,grid:r}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const s=hA(a,t.options.font);if(l?(n.width=this.maxWidth,n.height=ou(r)+s):(n.height=this.maxHeight,n.width=ou(r)+s),i.display&&this.ticks.length){const{first:d,last:c,widest:u,highest:f}=this._getLabelSizes(),p=i.padding*2,h=Na(this.labelRotation),k=Math.cos(h),y=Math.sin(h);if(l){const g=i.mirror?0:y*u.width+k*f.height;n.height=Math.min(this.maxHeight,n.height+g+p)}else{const g=i.mirror?0:k*u.width+y*f.height;n.width=Math.min(this.maxWidth,n.width+g+p)}this._calculatePadding(d,c,y,k)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,i,a){const{ticks:{align:r,padding:o},position:l}=this.options,s=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;s?d?(f=a*n.width,p=i*t.height):(f=i*n.height,p=a*t.width):r==="start"?p=t.width:r==="end"?f=n.width:r!=="inner"&&(f=n.width/2,p=t.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((p-u+o)*this.width/(this.width-u),0)}else{let c=t.height/2,u=n.height/2;r==="start"?(c=0,u=n.height):r==="end"&&(c=t.height,u=0),this.paddingTop=c+o,this.paddingBottom=u+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){gn(this.options.afterFit,[this])}isHorizontal(){const{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,i;for(t=0,i=n.length;t<i;t++)Je(n[t].label)&&(n.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=pA(i,t)),this._labelSizes=n=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return n}_computeLabelSizes(n,t,i){const{ctx:a,_longestTextCache:r}=this,o=[],l=[],s=Math.floor(t/fA(t,i));let d=0,c=0,u,f,p,h,k,y,g,v,N,x,F;for(u=0;u<t;u+=s){if(h=n[u].label,k=this._resolveTickFontOptions(u),a.font=y=k.string,g=r[y]=r[y]||{data:{},gc:[]},v=k.lineHeight,N=x=0,!Je(h)&&!wn(h))N=ky(a,g.data,g.gc,N,h),x=v;else if(wn(h))for(f=0,p=h.length;f<p;++f)F=h[f],!Je(F)&&!wn(F)&&(N=ky(a,g.data,g.gc,N,F),x+=v);o.push(N),l.push(x),d=Math.max(N,d),c=Math.max(x,c)}UIe(r,t);const _=o.indexOf(d),w=l.indexOf(c),C=$=>({width:o[$]||0,height:l[$]||0});return{first:C(0),last:C(t-1),widest:C(_),highest:C(w),widths:o,heights:l}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);const t=this._startPixel+n*this._length;return I2e(this._alignToPixels?yl(this.chart,t,0):t)}getDecimalForPixel(n){const t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){const t=this.ticks||[];if(n>=0&&n<t.length){const i=t[n];return i.$context||(i.$context=GIe(this.getContext(),n,i))}return this.$context||(this.$context=YIe(this.chart.getContext(),this))}_tickSize(){const n=this.options.ticks,t=Na(this.labelRotation),i=Math.abs(Math.cos(t)),a=Math.abs(Math.sin(t)),r=this._getLabelSizes(),o=n.autoSkipPadding||0,l=r?r.widest.width+o:0,s=r?r.highest.height+o:0;return this.isHorizontal()?s*i>l*a?l/i:s/a:s*a<l*i?s/i:l/a}_isVisible(){const n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){const t=this.axis,i=this.chart,a=this.options,{grid:r,position:o,border:l}=a,s=r.offset,d=this.isHorizontal(),u=this.ticks.length+(s?1:0),f=ou(r),p=[],h=l.setContext(this.getContext()),k=h.display?h.width:0,y=k/2,g=function(L){return yl(i,L,k)};let v,N,x,F,_,w,C,$,E,j,D,M;if(o==="top")v=g(this.bottom),w=this.bottom-f,$=v-y,j=g(n.top)+y,M=n.bottom;else if(o==="bottom")v=g(this.top),j=n.top,M=g(n.bottom)-y,w=v+y,$=this.top+f;else if(o==="left")v=g(this.right),_=this.right-f,C=v-y,E=g(n.left)+y,D=n.right;else if(o==="right")v=g(this.left),E=n.left,D=g(n.right)-y,_=v+y,C=this.left+f;else if(t==="x"){if(o==="center")v=g((n.top+n.bottom)/2+.5);else if(Ye(o)){const L=Object.keys(o)[0],B=o[L];v=g(this.chart.scales[L].getPixelForValue(B))}j=n.top,M=n.bottom,w=v+y,$=w+f}else if(t==="y"){if(o==="center")v=g((n.left+n.right)/2);else if(Ye(o)){const L=Object.keys(o)[0],B=o[L];v=g(this.chart.scales[L].getPixelForValue(B))}_=v-y,C=_-f,E=n.left,D=n.right}const R=Re(a.ticks.maxTicksLimit,u),I=Math.max(1,Math.ceil(u/R));for(N=0;N<u;N+=I){const L=this.getContext(N),B=r.setContext(L),O=l.setContext(L),P=B.lineWidth,A=B.color,V=O.dash||[],U=O.dashOffset,oe=B.tickWidth,G=B.tickColor,ne=B.tickBorderDash||[],Z=B.tickBorderDashOffset;x=HIe(this,N,s),x!==void 0&&(F=yl(i,x,P),d?_=C=E=D=F:w=$=j=M=F,p.push({tx1:_,ty1:w,tx2:C,ty2:$,x1:E,y1:j,x2:D,y2:M,width:P,color:A,borderDash:V,borderDashOffset:U,tickWidth:oe,tickColor:G,tickBorderDash:ne,tickBorderDashOffset:Z}))}return this._ticksLength=u,this._borderValue=v,p}_computeLabelItems(n){const t=this.axis,i=this.options,{position:a,ticks:r}=i,o=this.isHorizontal(),l=this.ticks,{align:s,crossAlign:d,padding:c,mirror:u}=r,f=ou(i.grid),p=f+c,h=u?-c:p,k=-Na(this.labelRotation),y=[];let g,v,N,x,F,_,w,C,$,E,j,D,M="middle";if(a==="top")_=this.bottom-h,w=this._getXAxisLabelAlignment();else if(a==="bottom")_=this.top+h,w=this._getXAxisLabelAlignment();else if(a==="left"){const I=this._getYAxisLabelAlignment(f);w=I.textAlign,F=I.x}else if(a==="right"){const I=this._getYAxisLabelAlignment(f);w=I.textAlign,F=I.x}else if(t==="x"){if(a==="center")_=(n.top+n.bottom)/2+p;else if(Ye(a)){const I=Object.keys(a)[0],L=a[I];_=this.chart.scales[I].getPixelForValue(L)+p}w=this._getXAxisLabelAlignment()}else if(t==="y"){if(a==="center")F=(n.left+n.right)/2-p;else if(Ye(a)){const I=Object.keys(a)[0],L=a[I];F=this.chart.scales[I].getPixelForValue(L)}w=this._getYAxisLabelAlignment(f).textAlign}t==="y"&&(s==="start"?M="top":s==="end"&&(M="bottom"));const R=this._getLabelSizes();for(g=0,v=l.length;g<v;++g){N=l[g],x=N.label;const I=r.setContext(this.getContext(g));C=this.getPixelForTick(g)+r.labelOffset,$=this._resolveTickFontOptions(g),E=$.lineHeight,j=wn(x)?x.length:1;const L=j/2,B=I.color,O=I.textStrokeColor,P=I.textStrokeWidth;let A=w;o?(F=C,w==="inner"&&(g===v-1?A=this.options.reverse?"left":"right":g===0?A=this.options.reverse?"right":"left":A="center"),a==="top"?d==="near"||k!==0?D=-j*E+E/2:d==="center"?D=-R.highest.height/2-L*E+E:D=-R.highest.height+E/2:d==="near"||k!==0?D=E/2:d==="center"?D=R.highest.height/2-L*E:D=R.highest.height-j*E,u&&(D*=-1),k!==0&&!I.showLabelBackdrop&&(F+=E/2*Math.sin(k))):(_=C,D=(1-j)*E/2);let V;if(I.showLabelBackdrop){const U=qt(I.backdropPadding),oe=R.heights[g],G=R.widths[g];let ne=D-U.top,Z=0-U.left;switch(M){case"middle":ne-=oe/2;break;case"bottom":ne-=oe;break}switch(w){case"center":Z-=G/2;break;case"right":Z-=G;break;case"inner":g===v-1?Z-=G:g>0&&(Z-=G/2);break}V={left:Z,top:ne,width:G+U.width,height:oe+U.height,color:I.backdropColor}}y.push({label:x,font:$,textOffset:D,options:{rotation:k,color:B,strokeColor:O,strokeWidth:P,textAlign:A,textBaseline:M,translation:[F,_],backdrop:V}})}return y}_getXAxisLabelAlignment(){const{position:n,ticks:t}=this.options;if(-Na(this.labelRotation))return n==="top"?"left":"right";let a="center";return t.align==="start"?a="left":t.align==="end"?a="right":t.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(n){const{position:t,ticks:{crossAlign:i,mirror:a,padding:r}}=this.options,o=this._getLabelSizes(),l=n+r,s=o.widest.width;let d,c;return t==="left"?a?(c=this.right+r,i==="near"?d="left":i==="center"?(d="center",c+=s/2):(d="right",c+=s)):(c=this.right-l,i==="near"?d="right":i==="center"?(d="center",c-=s/2):(d="left",c=this.left)):t==="right"?a?(c=this.left+r,i==="near"?d="right":i==="center"?(d="center",c-=s/2):(d="left",c-=s)):(c=this.left+l,i==="near"?d="left":i==="center"?(d="center",c+=s/2):(d="right",c=this.right)):d="right",{textAlign:d,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){const{ctx:n,options:{backgroundColor:t},left:i,top:a,width:r,height:o}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(i,a,r,o),n.restore())}getLineWidthForValue(n){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const a=this.ticks.findIndex(r=>r.value===n);return a>=0?t.setContext(this.getContext(a)).lineWidth:0}drawGrid(n){const t=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n));let r,o;const l=(s,d,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(s.x,s.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(t.display)for(r=0,o=a.length;r<o;++r){const s=a[r];t.drawOnChartArea&&l({x:s.x1,y:s.y1},{x:s.x2,y:s.y2},s),t.drawTicks&&l({x:s.tx1,y:s.ty1},{x:s.tx2,y:s.ty2},{color:s.tickColor,width:s.tickWidth,borderDash:s.tickBorderDash,borderDashOffset:s.tickBorderDashOffset})}}drawBorder(){const{chart:n,ctx:t,options:{border:i,grid:a}}=this,r=i.setContext(this.getContext()),o=i.display?r.width:0;if(!o)return;const l=a.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let d,c,u,f;this.isHorizontal()?(d=yl(n,this.left,o)-o/2,c=yl(n,this.right,l)+l/2,u=f=s):(u=yl(n,this.top,o)-o/2,f=yl(n,this.bottom,l)+l/2,d=c=s),t.save(),t.lineWidth=r.width,t.strokeStyle=r.color,t.beginPath(),t.moveTo(d,u),t.lineTo(c,f),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const i=this.ctx,a=this._computeLabelArea();a&&TS(i,a);const r=this.getLabelItems(n);for(const o of r){const l=o.options,s=o.font,d=o.label,c=o.textOffset;ls(i,d,0,c,s,l)}a&&AS(i)}drawTitle(){const{ctx:n,options:{position:t,title:i,reverse:a}}=this;if(!i.display)return;const r=ht(i.font),o=qt(i.padding),l=i.align;let s=r.lineHeight/2;t==="bottom"||t==="center"||Ye(t)?(s+=o.bottom,wn(i.text)&&(s+=r.lineHeight*(i.text.length-1))):s+=o.top;const{titleX:d,titleY:c,maxWidth:u,rotation:f}=KIe(this,s,t,l);ls(n,i.text,0,0,r,{color:i.color,maxWidth:u,rotation:f,textAlign:qIe(l,t,a),textBaseline:"middle",translation:[d,c]})}draw(n){this._isVisible()&&(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){const n=this.options,t=n.ticks&&n.ticks.z||0,i=Re(n.grid&&n.grid.z,-1),a=Re(n.border&&n.border.z,0);return!this._isVisible()||this.draw!==bs.prototype.draw?[{z:t,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:t,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(n){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let r,o;for(r=0,o=t.length;r<o;++r){const l=t[r];l[i]===this.id&&(!n||l.type===n)&&a.push(l)}return a}_resolveTickFontOptions(n){const t=this.options.ticks.setContext(this.getContext(n));return ht(t.font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class $p{constructor(n,t,i){this.type=n,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){const t=Object.getPrototypeOf(n);let i;ZIe(t)&&(i=this.register(t));const a=this.items,r=n.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+n);return r in a||(a[r]=n,XIe(n,o,i),this.override&&Bn.override(n.id,n.overrides)),o}get(n){return this.items[n]}unregister(n){const t=this.items,i=n.id,a=this.scope;i in t&&delete t[i],a&&i in Bn[a]&&(delete Bn[a][i],this.override&&delete os[i])}}function XIe(e,n,t){const i=_m(Object.create(null),[t?Bn.get(t):{},Bn.get(n),e.defaults]);Bn.set(n,i),e.defaultRoutes&&QIe(n,e.defaultRoutes),e.descriptors&&Bn.describe(n,e.descriptors)}function QIe(e,n){Object.keys(n).forEach(t=>{const i=t.split("."),a=i.pop(),r=[e].concat(i).join("."),o=n[t].split("."),l=o.pop(),s=o.join(".");Bn.route(r,a,s,l)})}function ZIe(e){return"id"in e&&"defaults"in e}class JIe{constructor(){this.controllers=new $p(Pa,"datasets",!0),this.elements=new $p(qr,"elements"),this.plugins=new $p(Object,"plugins"),this.scales=new $p(bs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,i){[...t].forEach(a=>{const r=i||this._getRegistryForType(a);i||r.isForType(a)||r===this.plugins&&a.id?this._exec(n,r,a):on(a,o=>{const l=i||this._getRegistryForType(o);this._exec(n,l,o)})})}_exec(n,t,i){const a=m1(n);gn(i["before"+a],[],i),t[n](i),gn(i["after"+a],[],i)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(n))return i}return this.plugins}_get(n,t,i){const a=t.get(n);if(a===void 0)throw new Error('"'+n+'" is not a registered '+i+".");return a}}var Ua=new JIe;class eje{constructor(){this._init=[]}notify(n,t,i,a){t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install"));const r=a?this._descriptors(n).filter(a):this._descriptors(n),o=this._notify(r,n,t,i);return t==="afterDestroy"&&(this._notify(r,n,"stop"),this._notify(this._init,n,"uninstall")),o}_notify(n,t,i,a){a=a||{};for(const r of n){const o=r.plugin,l=o[i],s=[t,a,r.options];if(gn(l,s,o)===!1&&a.cancelable)return!1}return!0}invalidate(){Je(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){const i=n&&n.config,a=Re(i.options&&i.options.plugins,{}),r=nje(i);return a===!1&&!t?[]:ije(n,r,a,t)}_notifyStateChanges(n){const t=this._oldCache||[],i=this._cache,a=(r,o)=>r.filter(l=>!o.some(s=>l.plugin.id===s.plugin.id));this._notify(a(t,i),n,"stop"),this._notify(a(i,t),n,"start")}}function nje(e){const n={},t=[],i=Object.keys(Ua.plugins.items);for(let r=0;r<i.length;r++)t.push(Ua.getPlugin(i[r]));const a=e.plugins||[];for(let r=0;r<a.length;r++){const o=a[r];t.indexOf(o)===-1&&(t.push(o),n[o.id]=!0)}return{plugins:t,localIds:n}}function tje(e,n){return!n&&e===!1?null:e===!0?{}:e}function ije(e,{plugins:n,localIds:t},i,a){const r=[],o=e.getContext();for(const l of n){const s=l.id,d=tje(i[s],a);d!==null&&r.push({plugin:l,options:aje(e.config,{plugin:l,local:t[s]},d,o)})}return r}function aje(e,{plugin:n,local:t},i,a){const r=e.pluginScopeKeys(n),o=e.getOptionScopes(i,r);return t&&n.defaults&&o.push(n.defaults),e.createResolver(o,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cF(e,n){const t=Bn.datasets[e]||{};return((n.datasets||{})[e]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function rje(e,n){let t=e;return e==="_index_"?t=n:e==="_value_"&&(t=n==="x"?"y":"x"),t}function oje(e,n){return e===n?"_index_":"_value_"}function vA(e){if(e==="x"||e==="y"||e==="r")return e}function lje(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function uF(e,...n){if(vA(e))return e;for(const t of n){const i=t.axis||lje(t.position)||e.length>1&&vA(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function kA(e,n,t){if(t[n+"AxisID"]===e)return{axis:n}}function sje(e,n){if(n.data&&n.data.datasets){const t=n.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(t.length)return kA(e,"x",t[0])||kA(e,"y",t[0])}return{}}function dje(e,n){const t=os[e.type]||{scales:{}},i=n.scales||{},a=cF(e.type,n),r=Object.create(null);return Object.keys(i).forEach(o=>{const l=i[o];if(!Ye(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const s=uF(o,l,sje(o,e),Bn.scales[l.type]),d=oje(s,a),c=t.scales||{};r[o]=Lu(Object.create(null),[{axis:s},l,c[s],c[d]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,s=o.indexAxis||cF(l,n),c=(os[l]||{}).scales||{};Object.keys(c).forEach(u=>{const f=rje(u,s),p=o[f+"AxisID"]||f;r[p]=r[p]||Object.create(null),Lu(r[p],[{axis:f},i[p],c[u]])})}),Object.keys(r).forEach(o=>{const l=r[o];Lu(l,[Bn.scales[l.type],Bn.scale])}),r}function ZW(e){const n=e.options||(e.options={});n.plugins=Re(n.plugins,{}),n.scales=dje(e,n)}function JW(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function cje(e){return e=e||{},e.data=JW(e.data),ZW(e),e}const gA=new Map,eH=new Set;function Ip(e,n){let t=gA.get(e);return t||(t=n(),gA.set(e,t),eH.add(t)),t}const lu=(e,n,t)=>{const i=qo(n,t);i!==void 0&&e.add(i)};class uje{constructor(n){this._config=cje(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=JW(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){const n=this._config;this.clearCache(),ZW(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return Ip(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return Ip(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return Ip(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id,i=this.type;return Ip(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){const i=this._scopeCache;let a=i.get(n);return(!a||t)&&(a=new Map,i.set(n,a)),a}getOptionScopes(n,t,i){const{options:a,type:r}=this,o=this._cachedScopes(n,i),l=o.get(t);if(l)return l;const s=new Set;t.forEach(c=>{n&&(s.add(n),c.forEach(u=>lu(s,n,u))),c.forEach(u=>lu(s,a,u)),c.forEach(u=>lu(s,os[r]||{},u)),c.forEach(u=>lu(s,Bn,u)),c.forEach(u=>lu(s,lF,u))});const d=Array.from(s);return d.length===0&&d.push(Object.create(null)),eH.has(t)&&o.set(t,d),d}chartOptionScopes(){const{options:n,type:t}=this;return[n,os[t]||{},Bn.datasets[t]||{},{type:t},Bn,lF]}resolveNamedOptions(n,t,i,a=[""]){const r={$shared:!0},{resolver:o,subPrefixes:l}=yA(this._resolverCache,n,a);let s=o;if(fje(o,t)){r.$shared=!1,i=Ko(i)?i():i;const d=this.createResolver(n,i,l);s=Qd(o,i,d)}for(const d of t)r[d]=s[d];return r}createResolver(n,t,i=[""],a){const{resolver:r}=yA(this._resolverCache,n,i);return Ye(t)?Qd(r,t,void 0,a):r}}function yA(e,n,t){let i=e.get(n);i||(i=new Map,e.set(n,i));const a=t.join();let r=i.get(a);return r||(r={resolver:g1(n,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},i.set(a,r)),r}const mje=e=>Ye(e)&&Object.getOwnPropertyNames(e).some(n=>Ko(e[n]));function fje(e,n){const{isScriptable:t,isIndexable:i}=IW(e);for(const a of n){const r=t(a),o=i(a),l=(o||r)&&e[a];if(r&&(Ko(l)||mje(l))||o&&wn(l))return!0}return!1}var pje="4.4.2";const hje=["top","bottom","left","right","chartArea"];function SA(e,n){return e==="top"||e==="bottom"||hje.indexOf(e)===-1&&n==="x"}function NA(e,n){return function(t,i){return t[e]===i[e]?t[n]-i[n]:t[e]-i[e]}}function bA(e){const n=e.chart,t=n.options.animation;n.notifyPlugins("afterRender"),gn(t&&t.onComplete,[e],n)}function vje(e){const n=e.chart,t=n.options.animation;gn(t&&t.onProgress,[e],n)}function nH(e){return N1()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ch={},xA=e=>{const n=nH(e);return Object.values(Ch).filter(t=>t.canvas===n).pop()};function kje(e,n,t){const i=Object.keys(e);for(const a of i){const r=+a;if(r>=n){const o=e[a];delete e[a],(t>0||r>n)&&(e[r+t]=o)}}}function gje(e,n,t,i){return!t||e.type==="mouseout"?null:i?n:e}function jp(e,n,t){return e.options.clip?e[t]:n[t]}function yje(e,n){const{xScale:t,yScale:i}=e;return t&&i?{left:jp(t,n,"left"),right:jp(t,n,"right"),top:jp(i,n,"top"),bottom:jp(i,n,"bottom")}:n}class xr{static register(...n){Ua.add(...n),FA()}static unregister(...n){Ua.remove(...n),FA()}constructor(n,t){const i=this.config=new uje(t),a=nH(n),r=xA(a);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||AIe(a)),this.platform.updateConfig(i);const l=this.platform.acquireContext(a,o.aspectRatio),s=l&&l.canvas,d=s&&s.height,c=s&&s.width;if(this.id=N2e(),this.ctx=l,this.canvas=s,this.width=c,this.height=d,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new eje,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=R2e(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],Ch[this.id]=this,!l||!s){console.error("Failed to create chart: can't acquire context from the given item");return}vr.listen(this,"complete",bA),vr.listen(this,"progress",vje),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:n,maintainAspectRatio:t},width:i,height:a,_aspectRatio:r}=this;return Je(n)?t&&r?r:a?i/a:null:n}get data(){return this.config.data}set data(n){this.config.data=n}get options(){return this._options}set options(n){this.config.options=n}get registry(){return Ua}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():UT(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return VT(this.canvas,this.ctx),this}stop(){return vr.stop(this),this}resize(n,t){vr.running(this)?this._resizeBeforeDraw={width:n,height:t}:this._resize(n,t)}_resize(n,t){const i=this.options,a=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(a,n,t,r),l=i.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,UT(this,l,!0)&&(this.notifyPlugins("resize",{size:o}),gn(i.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};on(t,(i,a)=>{i.id=a})}buildOrUpdateScales(){const n=this.options,t=n.scales,i=this.scales,a=Object.keys(i).reduce((o,l)=>(o[l]=!1,o),{});let r=[];t&&(r=r.concat(Object.keys(t).map(o=>{const l=t[o],s=uF(o,l),d=s==="r",c=s==="x";return{options:l,dposition:d?"chartArea":c?"bottom":"left",dtype:d?"radialLinear":c?"category":"linear"}}))),on(r,o=>{const l=o.options,s=l.id,d=uF(s,l),c=Re(l.type,o.dtype);(l.position===void 0||SA(l.position,d)!==SA(o.dposition))&&(l.position=o.dposition),a[s]=!0;let u=null;if(s in i&&i[s].type===c)u=i[s];else{const f=Ua.getScale(c);u=new f({id:s,type:c,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(l,n)}),on(a,(o,l)=>{o||delete i[l]}),on(i,o=>{Wt.configure(this,o,o.options),Wt.addBox(this,o)})}_updateMetasets(){const n=this._metasets,t=this.data.datasets.length,i=n.length;if(n.sort((a,r)=>a.index-r.index),i>t){for(let a=t;a<i;++a)this._destroyDatasetMeta(a);n.splice(t,i-t)}this._sortedMetasets=n.slice(0).sort(NA("order","index"))}_removeUnreferencedMetasets(){const{_metasets:n,data:{datasets:t}}=this;n.length>t.length&&delete this._stacks,n.forEach((i,a)=>{t.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const n=[],t=this.data.datasets;let i,a;for(this._removeUnreferencedMetasets(),i=0,a=t.length;i<a;i++){const r=t[i];let o=this.getDatasetMeta(i);const l=r.type||this.config.type;if(o.type&&o.type!==l&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=l,o.indexAxis=r.indexAxis||cF(l,this.options),o.order=r.order||0,o.index=i,o.label=""+r.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const s=Ua.getController(l),{datasetElementType:d,dataElementType:c}=Bn.datasets[l];Object.assign(s,{dataElementType:Ua.getElement(c),datasetElementType:d&&Ua.getElement(d)}),o.controller=new s(this,i),n.push(o.controller)}}return this._updateMetasets(),n}_resetElements(){on(this.data.datasets,(n,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(n){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:n,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let d=0,c=this.data.datasets.length;d<c;d++){const{controller:u}=this.getDatasetMeta(d),f=!a&&r.indexOf(u)===-1;u.buildOrUpdateElements(f),o=Math.max(+u.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),a||on(r,d=>{d.reset()}),this._updateDatasets(n),this.notifyPlugins("afterUpdate",{mode:n}),this._layers.sort(NA("z","_idx"));const{_active:l,_lastEvent:s}=this;s?this._eventHandler(s,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){on(this.scales,n=>{Wt.removeBox(this,n)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const n=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(n.events);(!IT(t,i)||!!this._responsiveListeners!==n.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:n}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:a,count:r}of t){const o=i==="_removeElements"?-r:r;kje(n,a,o)}}_getUniformDataChanges(){const n=this._dataChanges;if(!n||!n.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=r=>new Set(n.filter(o=>o[0]===r).map((o,l)=>l+","+o.splice(1).join(","))),a=i(0);for(let r=1;r<t;r++)if(!IT(a,i(r)))return;return Array.from(a).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(n){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wt.update(this,this.width,this.height,n);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],on(this.boxes,a=>{i&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,r)=>{a._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(n){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:n,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,Ko(n)?n({datasetIndex:t}):n);this.notifyPlugins("afterDatasetsUpdate",{mode:n})}}_updateDataset(n,t){const i=this.getDatasetMeta(n),a={meta:i,index:n,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(i.controller._update(t),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(vr.has(this)?this.attached&&!vr.running(this)&&vr.start(this):(this.draw(),bA({chart:this})))}draw(){let n;if(this._resizeBeforeDraw){const{width:i,height:a}=this._resizeBeforeDraw;this._resize(i,a),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(n=0;n<t.length&&t[n].z<=0;++n)t[n].draw(this.chartArea);for(this._drawDatasets();n<t.length;++n)t[n].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(n){const t=this._sortedMetasets,i=[];let a,r;for(a=0,r=t.length;a<r;++a){const o=t[a];(!n||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const n=this.getSortedVisibleDatasetMetas();for(let t=n.length-1;t>=0;--t)this._drawDataset(n[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(n){const t=this.ctx,i=n._clip,a=!i.disabled,r=yje(n,this.chartArea),o={meta:n,index:n.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(a&&TS(t,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),n.controller.draw(),a&&AS(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(n){return Or(n,this.chartArea,this._minPadding)}getElementsAtEventForMode(n,t,i,a){const r=hIe.modes[t];return typeof r=="function"?r(this,n,i,a):[]}getDatasetMeta(n){const t=this.data.datasets[n],i=this._metasets;let a=i.filter(r=>r&&r._dataset===t).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:n,_dataset:t,_parsed:[],_sorted:!1},i.push(a)),a}getContext(){return this.$context||(this.$context=dl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(n){const t=this.data.datasets[n];if(!t)return!1;const i=this.getDatasetMeta(n);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(n,t){const i=this.getDatasetMeta(n);i.hidden=!t}toggleDataVisibility(n){this._hiddenIndices[n]=!this._hiddenIndices[n]}getDataVisibility(n){return!this._hiddenIndices[n]}_updateVisibility(n,t,i){const a=i?"show":"hide",r=this.getDatasetMeta(n),o=r.controller._resolveAnimations(void 0,a);Cm(t)?(r.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(n,i),o.update(r,{visible:i}),this.update(l=>l.datasetIndex===n?a:void 0))}hide(n,t){this._updateVisibility(n,t,!1)}show(n,t){this._updateVisibility(n,t,!0)}_destroyDatasetMeta(n){const t=this._metasets[n];t&&t.controller&&t.controller._destroy(),delete this._metasets[n]}_stop(){let n,t;for(this.stop(),vr.remove(this),n=0,t=this.data.datasets.length;n<t;++n)this._destroyDatasetMeta(n)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:n,ctx:t}=this;this._stop(),this.config.clearCache(),n&&(this.unbindEvents(),VT(n,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Ch[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...n){return this.canvas.toDataURL(...n)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const n=this._listeners,t=this.platform,i=(r,o)=>{t.addEventListener(this,r,o),n[r]=o},a=(r,o,l)=>{r.offsetX=o,r.offsetY=l,this._eventHandler(r)};on(this.options.events,r=>i(r,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const n=this._responsiveListeners,t=this.platform,i=(s,d)=>{t.addEventListener(this,s,d),n[s]=d},a=(s,d)=>{n[s]&&(t.removeEventListener(this,s,d),delete n[s])},r=(s,d)=>{this.canvas&&this.resize(s,d)};let o;const l=()=>{a("attach",l),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),i("attach",l)},t.isAttached(this.canvas)?l():o()}unbindEvents(){on(this._listeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._listeners={},on(this._responsiveListeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._responsiveListeners=void 0}updateHoverStyle(n,t,i){const a=i?"set":"remove";let r,o,l,s;for(t==="dataset"&&(r=this.getDatasetMeta(n[0].datasetIndex),r.controller["_"+a+"DatasetHoverStyle"]()),l=0,s=n.length;l<s;++l){o=n[l];const d=o&&this.getDatasetMeta(o.datasetIndex).controller;d&&d[a+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(n){const t=this._active||[],i=n.map(({datasetIndex:r,index:o})=>{const l=this.getDatasetMeta(r);if(!l)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:l.data[o],index:o}});!py(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(n,t,i){return this._plugins.notify(this,n,t,i)}isPluginEnabled(n){return this._plugins._cache.filter(t=>t.plugin.id===n).length===1}_updateHoverStyles(n,t,i){const a=this.options.hover,r=(s,d)=>s.filter(c=>!d.some(u=>c.datasetIndex===u.datasetIndex&&c.index===u.index)),o=r(t,n),l=i?n:r(n,t);o.length&&this.updateHoverStyle(o,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(n,t){const i={event:n,replay:t,cancelable:!0,inChartArea:this.isPointInArea(n)},a=o=>(o.options.events||this.options.events).includes(n.native.type);if(this.notifyPlugins("beforeEvent",i,a)===!1)return;const r=this._handleEvent(n,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(r||i.changed)&&this.render(),this}_handleEvent(n,t,i){const{_active:a=[],options:r}=this,o=t,l=this._getActiveElements(n,a,i,o),s=C2e(n),d=gje(n,this._lastEvent,i,s);i&&(this._lastEvent=null,gn(r.onHover,[n,l,this],this),s&&gn(r.onClick,[n,l,this],this));const c=!py(l,a);return(c||t)&&(this._active=l,this._updateHoverStyles(l,a,t)),this._lastEvent=d,c}_getActiveElements(n,t,i,a){if(n.type==="mouseout")return[];if(!i)return t;const r=this.options.hover;return this.getElementsAtEventForMode(n,r.mode,r,a)}}fe(xr,"defaults",Bn),fe(xr,"instances",Ch),fe(xr,"overrides",os),fe(xr,"registry",Ua),fe(xr,"version",pje),fe(xr,"getChart",xA);function FA(){return on(xr.instances,e=>e._plugins.invalidate())}function Sje(e,n,t){const{startAngle:i,pixelMargin:a,x:r,y:o,outerRadius:l,innerRadius:s}=n;let d=a/l;e.beginPath(),e.arc(r,o,l,i-d,t+d),s>a?(d=a/s,e.arc(r,o,s,t+d,i-d,!0)):e.arc(r,o,a,t+qn,i-qn),e.closePath(),e.clip()}function Nje(e){return k1(e,["outerStart","outerEnd","innerStart","innerEnd"])}function bje(e,n,t,i){const a=Nje(e.options.borderRadius),r=(t-n)/2,o=Math.min(r,i*n/2),l=s=>{const d=(t-Math.min(r,s))*i/2;return Nt(s,0,Math.min(r,d))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:Nt(a.innerStart,0,o),innerEnd:Nt(a.innerEnd,0,o)}}function Ls(e,n,t,i){return{x:t+e*Math.cos(n),y:i+e*Math.sin(n)}}function Sy(e,n,t,i,a,r){const{x:o,y:l,startAngle:s,pixelMargin:d,innerRadius:c}=n,u=Math.max(n.outerRadius+i+t-d,0),f=c>0?c+i+t+d:0;let p=0;const h=a-s;if(i){const I=c>0?c-i:0,L=u>0?u-i:0,B=(I+L)/2,O=B!==0?h*B/(B+i):h;p=(h-O)/2}const k=Math.max(.001,h*u-t/On)/u,y=(h-k)/2,g=s+y+p,v=a-y-p,{outerStart:N,outerEnd:x,innerStart:F,innerEnd:_}=bje(n,f,u,v-g),w=u-N,C=u-x,$=g+N/w,E=v-x/C,j=f+F,D=f+_,M=g+F/j,R=v-_/D;if(e.beginPath(),r){const I=($+E)/2;if(e.arc(o,l,u,$,I),e.arc(o,l,u,I,E),x>0){const P=Ls(C,E,o,l);e.arc(P.x,P.y,x,E,v+qn)}const L=Ls(D,v,o,l);if(e.lineTo(L.x,L.y),_>0){const P=Ls(D,R,o,l);e.arc(P.x,P.y,_,v+qn,R+Math.PI)}const B=(v-_/f+(g+F/f))/2;if(e.arc(o,l,f,v-_/f,B,!0),e.arc(o,l,f,B,g+F/f,!0),F>0){const P=Ls(j,M,o,l);e.arc(P.x,P.y,F,M+Math.PI,g-qn)}const O=Ls(w,g,o,l);if(e.lineTo(O.x,O.y),N>0){const P=Ls(w,$,o,l);e.arc(P.x,P.y,N,g-qn,$)}}else{e.moveTo(o,l);const I=Math.cos($)*u+o,L=Math.sin($)*u+l;e.lineTo(I,L);const B=Math.cos(E)*u+o,O=Math.sin(E)*u+l;e.lineTo(B,O)}e.closePath()}function xje(e,n,t,i,a){const{fullCircles:r,startAngle:o,circumference:l}=n;let s=n.endAngle;if(r){Sy(e,n,t,i,s,a);for(let d=0;d<r;++d)e.fill();isNaN(l)||(s=o+(l%Pn||Pn))}return Sy(e,n,t,i,s,a),e.fill(),s}function Fje(e,n,t,i,a){const{fullCircles:r,startAngle:o,circumference:l,options:s}=n,{borderWidth:d,borderJoinStyle:c,borderDash:u,borderDashOffset:f}=s,p=s.borderAlign==="inner";if(!d)return;e.setLineDash(u||[]),e.lineDashOffset=f,p?(e.lineWidth=d*2,e.lineJoin=c||"round"):(e.lineWidth=d,e.lineJoin=c||"bevel");let h=n.endAngle;if(r){Sy(e,n,t,i,h,a);for(let k=0;k<r;++k)e.stroke();isNaN(l)||(h=o+(l%Pn||Pn))}p&&Sje(e,n,h),r||(Sy(e,n,t,i,h,a),e.stroke())}class vu extends qr{constructor(t){super();fe(this,"circumference");fe(this,"endAngle");fe(this,"fullCircles");fe(this,"innerRadius");fe(this,"outerRadius");fe(this,"pixelMargin");fe(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,i,a){const r=this.getProps(["x","y"],a),{angle:o,distance:l}=xW(r,{x:t,y:i}),{startAngle:s,endAngle:d,innerRadius:c,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),p=(this.options.spacing+this.options.borderWidth)/2,k=Re(f,d-s)>=Pn||Pm(o,s,d),y=Cr(l,c+p,u+p);return k&&y}getCenterPoint(t){const{x:i,y:a,startAngle:r,endAngle:o,innerRadius:l,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:d,spacing:c}=this.options,u=(r+o)/2,f=(l+s+c+d)/2;return{x:i+Math.cos(u)*f,y:a+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:i,circumference:a}=this,r=(i.offset||0)/4,o=(i.spacing||0)/2,l=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=a>Pn?Math.floor(a/Pn):0,a===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*r,Math.sin(s)*r);const d=1-Math.sin(Math.min(On,a||0)),c=r*d;t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,xje(t,this,c,o,l),Fje(t,this,c,o,l),t.restore()}}fe(vu,"id","arc"),fe(vu,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),fe(vu,"defaultRoutes",{backgroundColor:"backgroundColor"}),fe(vu,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"});function tH(e,n,t=n){e.lineCap=Re(t.borderCapStyle,n.borderCapStyle),e.setLineDash(Re(t.borderDash,n.borderDash)),e.lineDashOffset=Re(t.borderDashOffset,n.borderDashOffset),e.lineJoin=Re(t.borderJoinStyle,n.borderJoinStyle),e.lineWidth=Re(t.borderWidth,n.borderWidth),e.strokeStyle=Re(t.borderColor,n.borderColor)}function wje(e,n,t){e.lineTo(t.x,t.y)}function _je(e){return e.stepped?K2e:e.tension||e.cubicInterpolationMode==="monotone"?X2e:wje}function iH(e,n,t={}){const i=e.length,{start:a=0,end:r=i-1}=t,{start:o,end:l}=n,s=Math.max(a,o),d=Math.min(r,l),c=a<o&&r<o||a>l&&r>l;return{count:i,start:s,loop:n.loop,ilen:d<s&&!c?i+d-s:d-s}}function Cje(e,n,t,i){const{points:a,options:r}=n,{count:o,start:l,loop:s,ilen:d}=iH(a,t,i),c=_je(r);let{move:u=!0,reverse:f}=i||{},p,h,k;for(p=0;p<=d;++p)h=a[(l+(f?d-p:p))%o],!h.skip&&(u?(e.moveTo(h.x,h.y),u=!1):c(e,k,h,f,r.stepped),k=h);return s&&(h=a[(l+(f?d:0))%o],c(e,k,h,f,r.stepped)),!!s}function Pje(e,n,t,i){const a=n.points,{count:r,start:o,ilen:l}=iH(a,t,i),{move:s=!0,reverse:d}=i||{};let c=0,u=0,f,p,h,k,y,g;const v=x=>(o+(d?l-x:x))%r,N=()=>{k!==y&&(e.lineTo(c,y),e.lineTo(c,k),e.lineTo(c,g))};for(s&&(p=a[v(0)],e.moveTo(p.x,p.y)),f=0;f<=l;++f){if(p=a[v(f)],p.skip)continue;const x=p.x,F=p.y,_=x|0;_===h?(F<k?k=F:F>y&&(y=F),c=(u*c+x)/++u):(N(),e.lineTo(x,F),h=_,u=0,k=y=F),g=F}N()}function mF(e){const n=e.options,t=n.borderDash&&n.borderDash.length;return!e._decimated&&!e._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?Pje:Cje}function Oje(e){return e.stepped?P$e:e.tension||e.cubicInterpolationMode==="monotone"?O$e:Pl}function Dje(e,n,t,i){let a=n._path;a||(a=n._path=new Path2D,n.path(a,t,i)&&a.closePath()),tH(e,n.options),e.stroke(a)}function Eje(e,n,t,i){const{segments:a,options:r}=n,o=mF(n);for(const l of a)tH(e,r,l.style),e.beginPath(),o(e,n,l,{start:t,end:t+i-1})&&e.closePath(),e.stroke()}const $je=typeof Path2D=="function";function Ije(e,n,t,i){$je&&!n.options.segment?Dje(e,n,t,i):Eje(e,n,t,i)}class Po extends qr{constructor(n){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,n&&Object.assign(this,n)}updateControlPoints(n,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const a=i.spanGaps?this._loop:this._fullLoop;S$e(this._points,i,n,a,t),this._pointsUpdated=!0}}set points(n){this._points=n,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=T$e(this,this.options.segment))}first(){const n=this.segments,t=this.points;return n.length&&t[n[0].start]}last(){const n=this.segments,t=this.points,i=n.length;return i&&t[n[i-1].end]}interpolate(n,t){const i=this.options,a=n[t],r=this.points,o=WW(this,{property:t,start:a,end:a});if(!o.length)return;const l=[],s=Oje(i);let d,c;for(d=0,c=o.length;d<c;++d){const{start:u,end:f}=o[d],p=r[u],h=r[f];if(p===h){l.push(p);continue}const k=Math.abs((a-p[t])/(h[t]-p[t])),y=s(p,h,k,i.stepped);y[t]=n[t],l.push(y)}return l.length===1?l[0]:l}pathSegment(n,t,i){return mF(this)(n,this,t,i)}path(n,t,i){const a=this.segments,r=mF(this);let o=this._loop;t=t||0,i=i||this.points.length-t;for(const l of a)o&=r(n,this,l,{start:t,end:t+i-1});return!!o}draw(n,t,i,a){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(n.save(),Ije(n,this,i,a),n.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}fe(Po,"id","line"),fe(Po,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),fe(Po,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),fe(Po,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"});function wA(e,n,t,i){const a=e.options,{[t]:r}=e.getProps([t],i);return Math.abs(n-r)<a.radius+a.hitRadius}class Ph extends qr{constructor(t){super();fe(this,"parsed");fe(this,"skip");fe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,i,a){const r=this.options,{x:o,y:l}=this.getProps(["x","y"],a);return Math.pow(t-o,2)+Math.pow(i-l,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,i){return wA(this,t,"x",i)}inYRange(t,i){return wA(this,t,"y",i)}getCenterPoint(t){const{x:i,y:a}=this.getProps(["x","y"],t);return{x:i,y:a}}size(t){t=t||this.options||{};let i=t.radius||0;i=Math.max(i,i&&t.hoverRadius||0);const a=i&&t.borderWidth||0;return(i+a)*2}draw(t,i){const a=this.options;this.skip||a.radius<.1||!Or(this,i,this.size(a)/2)||(t.strokeStyle=a.borderColor,t.lineWidth=a.borderWidth,t.fillStyle=a.backgroundColor,sF(t,a,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}fe(Ph,"id","point"),fe(Ph,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),fe(Ph,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function aH(e,n){const{x:t,y:i,base:a,width:r,height:o}=e.getProps(["x","y","base","width","height"],n);let l,s,d,c,u;return e.horizontal?(u=o/2,l=Math.min(t,a),s=Math.max(t,a),d=i-u,c=i+u):(u=r/2,l=t-u,s=t+u,d=Math.min(i,a),c=Math.max(i,a)),{left:l,top:d,right:s,bottom:c}}function Oo(e,n,t,i){return e?0:Nt(n,t,i)}function jje(e,n,t){const i=e.options.borderWidth,a=e.borderSkipped,r=$W(i);return{t:Oo(a.top,r.top,0,t),r:Oo(a.right,r.right,0,n),b:Oo(a.bottom,r.bottom,0,t),l:Oo(a.left,r.left,0,n)}}function Tje(e,n,t){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,r=ql(a),o=Math.min(n,t),l=e.borderSkipped,s=i||Ye(a);return{topLeft:Oo(!s||l.top||l.left,r.topLeft,0,o),topRight:Oo(!s||l.top||l.right,r.topRight,0,o),bottomLeft:Oo(!s||l.bottom||l.left,r.bottomLeft,0,o),bottomRight:Oo(!s||l.bottom||l.right,r.bottomRight,0,o)}}function Aje(e){const n=aH(e),t=n.right-n.left,i=n.bottom-n.top,a=jje(e,t/2,i/2),r=Tje(e,t/2,i/2);return{outer:{x:n.left,y:n.top,w:t,h:i,radius:r},inner:{x:n.left+a.l,y:n.top+a.t,w:t-a.l-a.r,h:i-a.t-a.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,r.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(a.b,a.r))}}}}function HN(e,n,t,i){const a=n===null,r=t===null,l=e&&!(a&&r)&&aH(e,i);return l&&(a||Cr(n,l.left,l.right))&&(r||Cr(t,l.top,l.bottom))}function Rje(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Mje(e,n){e.rect(n.x,n.y,n.w,n.h)}function UN(e,n,t={}){const i=e.x!==t.x?-n:0,a=e.y!==t.y?-n:0,r=(e.x+e.w!==t.x+t.w?n:0)-i,o=(e.y+e.h!==t.y+t.h?n:0)-a;return{x:e.x+i,y:e.y+a,w:e.w+r,h:e.h+o,radius:e.radius}}class Oh extends qr{constructor(n){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,n&&Object.assign(this,n)}draw(n){const{inflateAmount:t,options:{borderColor:i,backgroundColor:a}}=this,{inner:r,outer:o}=Aje(this),l=Rje(o.radius)?Om:Mje;n.save(),(o.w!==r.w||o.h!==r.h)&&(n.beginPath(),l(n,UN(o,t,r)),n.clip(),l(n,UN(r,-t,o)),n.fillStyle=i,n.fill("evenodd")),n.beginPath(),l(n,UN(r,t)),n.fillStyle=a,n.fill(),n.restore()}inRange(n,t,i){return HN(this,n,t,i)}inXRange(n,t){return HN(this,n,null,t)}inYRange(n,t){return HN(this,null,n,t)}getCenterPoint(n){const{x:t,y:i,base:a,horizontal:r}=this.getProps(["x","y","base","horizontal"],n);return{x:r?(t+a)/2:t,y:r?i:(i+a)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}}fe(Oh,"id","bar"),fe(Oh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),fe(Oh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Lje=Object.freeze({__proto__:null,ArcElement:vu,BarElement:Oh,LineElement:Po,PointElement:Ph});const fF=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],_A=fF.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function rH(e){return fF[e%fF.length]}function oH(e){return _A[e%_A.length]}function zje(e,n){return e.borderColor=rH(n),e.backgroundColor=oH(n),++n}function Bje(e,n){return e.backgroundColor=e.data.map(()=>rH(n++)),n}function Vje(e,n){return e.backgroundColor=e.data.map(()=>oH(n++)),n}function Wje(e){let n=0;return(t,i)=>{const a=e.getDatasetMeta(i).controller;a instanceof Rl?n=Bje(t,n):a instanceof Wu?n=Vje(t,n):a&&(n=zje(t,n))}}function CA(e){let n;for(n in e)if(e[n].borderColor||e[n].backgroundColor)return!0;return!1}function Hje(e){return e&&(e.borderColor||e.backgroundColor)}var Uje={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,n,t){if(!t.enabled)return;const{data:{datasets:i},options:a}=e.config,{elements:r}=a;if(!t.forceOverride&&(CA(i)||Hje(a)||r&&CA(r)))return;const o=Wje(e);i.forEach(o)}};function Yje(e,n,t,i,a){const r=a.samples||i;if(r>=t)return e.slice(n,n+t);const o=[],l=(t-2)/(r-2);let s=0;const d=n+t-1;let c=n,u,f,p,h,k;for(o[s++]=e[c],u=0;u<r-2;u++){let y=0,g=0,v;const N=Math.floor((u+1)*l)+1+n,x=Math.min(Math.floor((u+2)*l)+1,t)+n,F=x-N;for(v=N;v<x;v++)y+=e[v].x,g+=e[v].y;y/=F,g/=F;const _=Math.floor(u*l)+1+n,w=Math.min(Math.floor((u+1)*l)+1,t)+n,{x:C,y:$}=e[c];for(p=h=-1,v=_;v<w;v++)h=.5*Math.abs((C-y)*(e[v].y-$)-(C-e[v].x)*(g-$)),h>p&&(p=h,f=e[v],k=v);o[s++]=f,c=k}return o[s++]=e[d],o}function Gje(e,n,t,i){let a=0,r=0,o,l,s,d,c,u,f,p,h,k;const y=[],g=n+t-1,v=e[n].x,x=e[g].x-v;for(o=n;o<n+t;++o){l=e[o],s=(l.x-v)/x*i,d=l.y;const F=s|0;if(F===c)d<h?(h=d,u=o):d>k&&(k=d,f=o),a=(r*a+l.x)/++r;else{const _=o-1;if(!Je(u)&&!Je(f)){const w=Math.min(u,f),C=Math.max(u,f);w!==p&&w!==_&&y.push({...e[w],x:a}),C!==p&&C!==_&&y.push({...e[C],x:a})}o>0&&_!==p&&y.push(e[_]),y.push(l),c=F,r=0,h=k=d,u=f=p=o}}return y}function lH(e){if(e._decimated){const n=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function PA(e){e.data.datasets.forEach(n=>{lH(n)})}function qje(e,n){const t=n.length;let i=0,a;const{iScale:r}=e,{min:o,max:l,minDefined:s,maxDefined:d}=r.getUserBounds();return s&&(i=Nt(Pr(n,r.axis,o).lo,0,t-1)),d?a=Nt(Pr(n,r.axis,l).hi+1,i,t)-i:a=t-i,{start:i,count:a}}var Kje={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,n,t)=>{if(!t.enabled){PA(e);return}const i=e.width;e.data.datasets.forEach((a,r)=>{const{_data:o,indexAxis:l}=a,s=e.getDatasetMeta(r),d=o||a.data;if(pu([l,e.options.indexAxis])==="y"||!s.controller.supportsDecimation)return;const c=e.scales[s.xAxisID];if(c.type!=="linear"&&c.type!=="time"||e.options.parsing)return;let{start:u,count:f}=qje(s,d);const p=t.threshold||4*i;if(f<=p){lH(a);return}Je(o)&&(a._data=d,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(k){this._data=k}}));let h;switch(t.algorithm){case"lttb":h=Yje(d,u,f,i,t);break;case"min-max":h=Gje(d,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}a._decimated=h})},destroy(e){PA(e)}};function Xje(e,n,t){const i=e.segments,a=e.points,r=n.points,o=[];for(const l of i){let{start:s,end:d}=l;d=F1(s,d,a);const c=pF(t,a[s],a[d],l.loop);if(!n.segments){o.push({source:l,target:c,start:a[s],end:a[d]});continue}const u=WW(n,c);for(const f of u){const p=pF(t,r[f.start],r[f.end],f.loop),h=VW(l,a,p);for(const k of h)o.push({source:k,target:f,start:{[t]:OA(c,p,"start",Math.max)},end:{[t]:OA(c,p,"end",Math.min)}})}}return o}function pF(e,n,t,i){if(i)return;let a=n[e],r=t[e];return e==="angle"&&(a=Ci(a),r=Ci(r)),{property:e,start:a,end:r}}function Qje(e,n){const{x:t=null,y:i=null}=e||{},a=n.points,r=[];return n.segments.forEach(({start:o,end:l})=>{l=F1(o,l,a);const s=a[o],d=a[l];i!==null?(r.push({x:s.x,y:i}),r.push({x:d.x,y:i})):t!==null&&(r.push({x:t,y:s.y}),r.push({x:t,y:d.y}))}),r}function F1(e,n,t){for(;n>e;n--){const i=t[n];if(!isNaN(i.x)&&!isNaN(i.y))break}return n}function OA(e,n,t,i){return e&&n?i(e[t],n[t]):e?e[t]:n?n[t]:0}function sH(e,n){let t=[],i=!1;return wn(e)?(i=!0,t=e):t=Qje(e,n),t.length?new Po({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function DA(e){return e&&e.fill!==!1}function Zje(e,n,t){let a=e[n].fill;const r=[n];let o;if(!t)return a;for(;a!==!1&&r.indexOf(a)===-1;){if(!zn(a))return a;if(o=e[a],!o)return!1;if(o.visible)return a;r.push(a),a=o.fill}return!1}function Jje(e,n,t){const i=iTe(e);if(Ye(i))return isNaN(i.value)?!1:i;let a=parseFloat(i);return zn(a)&&Math.floor(a)===a?eTe(i[0],n,a,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function eTe(e,n,t,i){return(e==="-"||e==="+")&&(t=n+t),t===n||t<0||t>=i?!1:t}function nTe(e,n){let t=null;return e==="start"?t=n.bottom:e==="end"?t=n.top:Ye(e)?t=n.getPixelForValue(e.value):n.getBasePixel&&(t=n.getBasePixel()),t}function tTe(e,n,t){let i;return e==="start"?i=t:e==="end"?i=n.options.reverse?n.min:n.max:Ye(e)?i=e.value:i=n.getBaseValue(),i}function iTe(e){const n=e.options,t=n.fill;let i=Re(t&&t.target,t);return i===void 0&&(i=!!n.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function aTe(e){const{scale:n,index:t,line:i}=e,a=[],r=i.segments,o=i.points,l=rTe(n,t);l.push(sH({x:null,y:n.bottom},i));for(let s=0;s<r.length;s++){const d=r[s];for(let c=d.start;c<=d.end;c++)oTe(a,o[c],l)}return new Po({points:a,options:{}})}function rTe(e,n){const t=[],i=e.getMatchingVisibleMetas("line");for(let a=0;a<i.length;a++){const r=i[a];if(r.index===n)break;r.hidden||t.unshift(r.dataset)}return t}function oTe(e,n,t){const i=[];for(let a=0;a<t.length;a++){const r=t[a],{first:o,last:l,point:s}=lTe(r,n,"x");if(!(!s||o&&l)){if(o)i.unshift(s);else if(e.push(s),!l)break}}e.push(...i)}function lTe(e,n,t){const i=e.interpolate(n,t);if(!i)return{};const a=i[t],r=e.segments,o=e.points;let l=!1,s=!1;for(let d=0;d<r.length;d++){const c=r[d],u=o[c.start][t],f=o[c.end][t];if(Cr(a,u,f)){l=a===u,s=a===f;break}}return{first:l,last:s,point:i}}class dH{constructor(n){this.x=n.x,this.y=n.y,this.radius=n.radius}pathSegment(n,t,i){const{x:a,y:r,radius:o}=this;return t=t||{start:0,end:Pn},n.arc(a,r,o,t.end,t.start,!0),!i.bounds}interpolate(n){const{x:t,y:i,radius:a}=this,r=n.angle;return{x:t+Math.cos(r)*a,y:i+Math.sin(r)*a,angle:r}}}function sTe(e){const{chart:n,fill:t,line:i}=e;if(zn(t))return dTe(n,t);if(t==="stack")return aTe(e);if(t==="shape")return!0;const a=cTe(e);return a instanceof dH?a:sH(a,i)}function dTe(e,n){const t=e.getDatasetMeta(n);return t&&e.isDatasetVisible(n)?t.dataset:null}function cTe(e){return(e.scale||{}).getPointPositionForValue?mTe(e):uTe(e)}function uTe(e){const{scale:n={},fill:t}=e,i=nTe(t,n);if(zn(i)){const a=n.isHorizontal();return{x:a?i:null,y:a?null:i}}return null}function mTe(e){const{scale:n,fill:t}=e,i=n.options,a=n.getLabels().length,r=i.reverse?n.max:n.min,o=tTe(t,n,r),l=[];if(i.grid.circular){const s=n.getPointPositionForValue(0,r);return new dH({x:s.x,y:s.y,radius:n.getDistanceFromCenterForValue(o)})}for(let s=0;s<a;++s)l.push(n.getPointPositionForValue(s,o));return l}function YN(e,n,t){const i=sTe(n),{line:a,scale:r,axis:o}=n,l=a.options,s=l.fill,d=l.backgroundColor,{above:c=d,below:u=d}=s||{};i&&a.points.length&&(TS(e,t),fTe(e,{line:a,target:i,above:c,below:u,area:t,scale:r,axis:o}),AS(e))}function fTe(e,n){const{line:t,target:i,above:a,below:r,area:o,scale:l}=n,s=t._loop?"angle":n.axis;e.save(),s==="x"&&r!==a&&(EA(e,i,o.top),$A(e,{line:t,target:i,color:a,scale:l,property:s}),e.restore(),e.save(),EA(e,i,o.bottom)),$A(e,{line:t,target:i,color:r,scale:l,property:s}),e.restore()}function EA(e,n,t){const{segments:i,points:a}=n;let r=!0,o=!1;e.beginPath();for(const l of i){const{start:s,end:d}=l,c=a[s],u=a[F1(s,d,a)];r?(e.moveTo(c.x,c.y),r=!1):(e.lineTo(c.x,t),e.lineTo(c.x,c.y)),o=!!n.pathSegment(e,l,{move:o}),o?e.closePath():e.lineTo(u.x,t)}e.lineTo(n.first().x,t),e.closePath(),e.clip()}function $A(e,n){const{line:t,target:i,property:a,color:r,scale:o}=n,l=Xje(t,i,a);for(const{source:s,target:d,start:c,end:u}of l){const{style:{backgroundColor:f=r}={}}=s,p=i!==!0;e.save(),e.fillStyle=f,pTe(e,o,p&&pF(a,c,u)),e.beginPath();const h=!!t.pathSegment(e,s);let k;if(p){h?e.closePath():IA(e,i,u,a);const y=!!i.pathSegment(e,d,{move:h,reverse:!0});k=h&&y,k||IA(e,i,c,a)}e.closePath(),e.fill(k?"evenodd":"nonzero"),e.restore()}}function pTe(e,n,t){const{top:i,bottom:a}=n.chart.chartArea,{property:r,start:o,end:l}=t||{};r==="x"&&(e.beginPath(),e.rect(o,i,l-o,a-i),e.clip())}function IA(e,n,t,i){const a=n.interpolate(t,i);a&&e.lineTo(a.x,a.y)}var hTe={id:"filler",afterDatasetsUpdate(e,n,t){const i=(e.data.datasets||[]).length,a=[];let r,o,l,s;for(o=0;o<i;++o)r=e.getDatasetMeta(o),l=r.dataset,s=null,l&&l.options&&l instanceof Po&&(s={visible:e.isDatasetVisible(o),index:o,fill:Jje(l,o,i),chart:e,axis:r.controller.options.indexAxis,scale:r.vScale,line:l}),r.$filler=s,a.push(s);for(o=0;o<i;++o)s=a[o],!(!s||s.fill===!1)&&(s.fill=Zje(a,o,t.propagate))},beforeDraw(e,n,t){const i=t.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),r=e.chartArea;for(let o=a.length-1;o>=0;--o){const l=a[o].$filler;l&&(l.line.updateControlPoints(r,l.axis),i&&l.fill&&YN(e.ctx,l,r))}},beforeDatasetsDraw(e,n,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let a=i.length-1;a>=0;--a){const r=i[a].$filler;DA(r)&&YN(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,n,t){const i=n.meta.$filler;!DA(i)||t.drawTime!=="beforeDatasetDraw"||YN(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const jA=(e,n)=>{let{boxHeight:t=n,boxWidth:i=n}=e;return e.usePointStyle&&(t=Math.min(t,n),i=e.pointStyleWidth||Math.min(i,n)),{boxWidth:i,boxHeight:t,itemHeight:Math.max(n,t)}},vTe=(e,n)=>e!==null&&n!==null&&e.datasetIndex===n.datasetIndex&&e.index===n.index;class TA extends qr{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,t,i){this.maxWidth=n,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const n=this.options.labels||{};let t=gn(n.generateLabels,[this.chart],this)||[];n.filter&&(t=t.filter(i=>n.filter(i,this.chart.data))),n.sort&&(t=t.sort((i,a)=>n.sort(i,a,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:n,ctx:t}=this;if(!n.display){this.width=this.height=0;return}const i=n.labels,a=ht(i.font),r=a.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:s}=jA(i,r);let d,c;t.font=a.string,this.isHorizontal()?(d=this.maxWidth,c=this._fitRows(o,r,l,s)+10):(c=this.maxHeight,d=this._fitCols(o,a,l,s)+10),this.width=Math.min(d,n.maxWidth||this.maxWidth),this.height=Math.min(c,n.maxHeight||this.maxHeight)}_fitRows(n,t,i,a){const{ctx:r,maxWidth:o,options:{labels:{padding:l}}}=this,s=this.legendHitBoxes=[],d=this.lineWidths=[0],c=a+l;let u=n;r.textAlign="left",r.textBaseline="middle";let f=-1,p=-c;return this.legendItems.forEach((h,k)=>{const y=i+t/2+r.measureText(h.text).width;(k===0||d[d.length-1]+y+2*l>o)&&(u+=c,d[d.length-(k>0?0:1)]=0,p+=c,f++),s[k]={left:0,top:p,row:f,width:y,height:a},d[d.length-1]+=y+l}),u}_fitCols(n,t,i,a){const{ctx:r,maxHeight:o,options:{labels:{padding:l}}}=this,s=this.legendHitBoxes=[],d=this.columnSizes=[],c=o-n;let u=l,f=0,p=0,h=0,k=0;return this.legendItems.forEach((y,g)=>{const{itemWidth:v,itemHeight:N}=kTe(i,t,r,y,a);g>0&&p+N+2*l>c&&(u+=f+l,d.push({width:f,height:p}),h+=f+l,k++,f=p=0),s[g]={left:h,top:p,col:k,width:v,height:N},f=Math.max(f,v),p+=N+l}),u+=f,d.push({width:f,height:p}),u}adjustHitBoxes(){if(!this.options.display)return;const n=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:a},rtl:r}}=this,o=kd(r,this.left,this.width);if(this.isHorizontal()){let l=0,s=Lt(i,this.left+a,this.right-this.lineWidths[l]);for(const d of t)l!==d.row&&(l=d.row,s=Lt(i,this.left+a,this.right-this.lineWidths[l])),d.top+=this.top+n+a,d.left=o.leftForLtr(o.x(s),d.width),s+=d.width+a}else{let l=0,s=Lt(i,this.top+n+a,this.bottom-this.columnSizes[l].height);for(const d of t)d.col!==l&&(l=d.col,s=Lt(i,this.top+n+a,this.bottom-this.columnSizes[l].height)),d.top=s,d.left+=this.left+a,d.left=o.leftForLtr(o.x(d.left),d.width),s+=d.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const n=this.ctx;TS(n,this),this._draw(),AS(n)}}_draw(){const{options:n,columnSizes:t,lineWidths:i,ctx:a}=this,{align:r,labels:o}=n,l=Bn.color,s=kd(n.rtl,this.left,this.width),d=ht(o.font),{padding:c}=o,u=d.size,f=u/2;let p;this.drawTitle(),a.textAlign=s.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:h,boxHeight:k,itemHeight:y}=jA(o,u),g=function(_,w,C){if(isNaN(h)||h<=0||isNaN(k)||k<0)return;a.save();const $=Re(C.lineWidth,1);if(a.fillStyle=Re(C.fillStyle,l),a.lineCap=Re(C.lineCap,"butt"),a.lineDashOffset=Re(C.lineDashOffset,0),a.lineJoin=Re(C.lineJoin,"miter"),a.lineWidth=$,a.strokeStyle=Re(C.strokeStyle,l),a.setLineDash(Re(C.lineDash,[])),o.usePointStyle){const E={radius:k*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:$},j=s.xPlus(_,h/2),D=w+f;EW(a,E,j,D,o.pointStyleWidth&&h)}else{const E=w+Math.max((u-k)/2,0),j=s.leftForLtr(_,h),D=ql(C.borderRadius);a.beginPath(),Object.values(D).some(M=>M!==0)?Om(a,{x:j,y:E,w:h,h:k,radius:D}):a.rect(j,E,h,k),a.fill(),$!==0&&a.stroke()}a.restore()},v=function(_,w,C){ls(a,C.text,_,w+y/2,d,{strikethrough:C.hidden,textAlign:s.textAlign(C.textAlign)})},N=this.isHorizontal(),x=this._computeTitleHeight();N?p={x:Lt(r,this.left+c,this.right-i[0]),y:this.top+c+x,line:0}:p={x:this.left+c,y:Lt(r,this.top+x+c,this.bottom-t[0].height),line:0},LW(this.ctx,n.textDirection);const F=y+c;this.legendItems.forEach((_,w)=>{a.strokeStyle=_.fontColor,a.fillStyle=_.fontColor;const C=a.measureText(_.text).width,$=s.textAlign(_.textAlign||(_.textAlign=o.textAlign)),E=h+f+C;let j=p.x,D=p.y;s.setWidth(this.width),N?w>0&&j+E+c>this.right&&(D=p.y+=F,p.line++,j=p.x=Lt(r,this.left+c,this.right-i[p.line])):w>0&&D+F>this.bottom&&(j=p.x=j+t[p.line].width+c,p.line++,D=p.y=Lt(r,this.top+x+c,this.bottom-t[p.line].height));const M=s.x(j);if(g(M,D,_),j=M2e($,j+h+f,N?j+E:this.right,n.rtl),v(s.x(j),D,_),N)p.x+=E+c;else if(typeof _.text!="string"){const R=d.lineHeight;p.y+=cH(_,R)+c}else p.y+=F}),zW(this.ctx,n.textDirection)}drawTitle(){const n=this.options,t=n.title,i=ht(t.font),a=qt(t.padding);if(!t.display)return;const r=kd(n.rtl,this.left,this.width),o=this.ctx,l=t.position,s=i.size/2,d=a.top+s;let c,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+d,u=Lt(n.align,u,this.right-f);else{const h=this.columnSizes.reduce((k,y)=>Math.max(k,y.height),0);c=d+Lt(n.align,this.top,this.bottom-h-n.labels.padding-this._computeTitleHeight())}const p=Lt(l,u,u+f);o.textAlign=r.textAlign(h1(l)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=i.string,ls(o,t.text,p,c,i)}_computeTitleHeight(){const n=this.options.title,t=ht(n.font),i=qt(n.padding);return n.display?t.lineHeight+i.height:0}_getLegendItemAt(n,t){let i,a,r;if(Cr(n,this.left,this.right)&&Cr(t,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(a=r[i],Cr(n,a.left,a.left+a.width)&&Cr(t,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(n){const t=this.options;if(!STe(n.type,t))return;const i=this._getLegendItemAt(n.x,n.y);if(n.type==="mousemove"||n.type==="mouseout"){const a=this._hoveredItem,r=vTe(a,i);a&&!r&&gn(t.onLeave,[n,a,this],this),this._hoveredItem=i,i&&!r&&gn(t.onHover,[n,i,this],this)}else i&&gn(t.onClick,[n,i,this],this)}}function kTe(e,n,t,i,a){const r=gTe(i,e,n,t),o=yTe(a,i,n.lineHeight);return{itemWidth:r,itemHeight:o}}function gTe(e,n,t,i){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((r,o)=>r.length>o.length?r:o)),n+t.size/2+i.measureText(a).width}function yTe(e,n,t){let i=e;return typeof n.text!="string"&&(i=cH(n,t)),i}function cH(e,n){const t=e.text?e.text.length:0;return n*t}function STe(e,n){return!!((e==="mousemove"||e==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(e==="click"||e==="mouseup"))}var NTe={id:"legend",_element:TA,start(e,n,t){const i=e.legend=new TA({ctx:e.ctx,options:t,chart:e});Wt.configure(e,i,t),Wt.addBox(e,i)},stop(e){Wt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,n,t){const i=e.legend;Wt.configure(e,i,t),i.options=t},afterUpdate(e){const n=e.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(e,n){n.replay||e.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,n,t){const i=n.datasetIndex,a=t.chart;a.isDatasetVisible(i)?(a.hide(i),n.hidden=!0):(a.show(i),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const n=e.data.datasets,{labels:{usePointStyle:t,pointStyle:i,textAlign:a,color:r,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(s=>{const d=s.controller.getStyle(t?0:void 0),c=qt(d.borderWidth);return{text:n[s.index].label,fillStyle:d.backgroundColor,fontColor:r,hidden:!s.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:a||d.textAlign,borderRadius:o&&(l||d.borderRadius),datasetIndex:s.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class w1 extends qr{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,t){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=n,this.height=this.bottom=t;const a=wn(i.text)?i.text.length:1;this._padding=qt(i.padding);const r=a*ht(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const n=this.options.position;return n==="top"||n==="bottom"}_drawArgs(n){const{top:t,left:i,bottom:a,right:r,options:o}=this,l=o.align;let s=0,d,c,u;return this.isHorizontal()?(c=Lt(l,i,r),u=t+n,d=r-i):(o.position==="left"?(c=i+n,u=Lt(l,a,t),s=On*-.5):(c=r-n,u=Lt(l,t,a),s=On*.5),d=a-t),{titleX:c,titleY:u,maxWidth:d,rotation:s}}draw(){const n=this.ctx,t=this.options;if(!t.display)return;const i=ht(t.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:s,rotation:d}=this._drawArgs(r);ls(n,t.text,0,0,i,{color:t.color,maxWidth:s,rotation:d,textAlign:h1(t.align),textBaseline:"middle",translation:[o,l]})}}function bTe(e,n){const t=new w1({ctx:e.ctx,options:n,chart:e});Wt.configure(e,t,n),Wt.addBox(e,t),e.titleBlock=t}var xTe={id:"title",_element:w1,start(e,n,t){bTe(e,t)},stop(e){const n=e.titleBlock;Wt.removeBox(e,n),delete e.titleBlock},beforeUpdate(e,n,t){const i=e.titleBlock;Wt.configure(e,i,t),i.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Tp=new WeakMap;var FTe={id:"subtitle",start(e,n,t){const i=new w1({ctx:e.ctx,options:t,chart:e});Wt.configure(e,i,t),Wt.addBox(e,i),Tp.set(e,i)},stop(e){Wt.removeBox(e,Tp.get(e)),Tp.delete(e)},beforeUpdate(e,n,t){const i=Tp.get(e);Wt.configure(e,i,t),i.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ku={average(e){if(!e.length)return!1;let n,t,i=new Set,a=0,r=0;for(n=0,t=e.length;n<t;++n){const l=e[n].element;if(l&&l.hasValue()){const s=l.tooltipPosition();i.add(s.x),a+=s.y,++r}}return{x:[...i].reduce((l,s)=>l+s)/i.size,y:a/r}},nearest(e,n){if(!e.length)return!1;let t=n.x,i=n.y,a=Number.POSITIVE_INFINITY,r,o,l;for(r=0,o=e.length;r<o;++r){const s=e[r].element;if(s&&s.hasValue()){const d=s.getCenterPoint(),c=oF(n,d);c<a&&(a=c,l=s)}}if(l){const s=l.tooltipPosition();t=s.x,i=s.y}return{x:t,y:i}}};function Wa(e,n){return n&&(wn(n)?Array.prototype.push.apply(e,n):e.push(n)),e}function kr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function wTe(e,n){const{element:t,datasetIndex:i,index:a}=n,r=e.getDatasetMeta(i).controller,{label:o,value:l}=r.getLabelAndValue(a);return{chart:e,label:o,parsed:r.getParsed(a),raw:e.data.datasets[i].data[a],formattedValue:l,dataset:r.getDataset(),dataIndex:a,datasetIndex:i,element:t}}function AA(e,n){const t=e.chart.ctx,{body:i,footer:a,title:r}=e,{boxWidth:o,boxHeight:l}=n,s=ht(n.bodyFont),d=ht(n.titleFont),c=ht(n.footerFont),u=r.length,f=a.length,p=i.length,h=qt(n.padding);let k=h.height,y=0,g=i.reduce((x,F)=>x+F.before.length+F.lines.length+F.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,u&&(k+=u*d.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),g){const x=n.displayColors?Math.max(l,s.lineHeight):s.lineHeight;k+=p*x+(g-p)*s.lineHeight+(g-1)*n.bodySpacing}f&&(k+=n.footerMarginTop+f*c.lineHeight+(f-1)*n.footerSpacing);let v=0;const N=function(x){y=Math.max(y,t.measureText(x).width+v)};return t.save(),t.font=d.string,on(e.title,N),t.font=s.string,on(e.beforeBody.concat(e.afterBody),N),v=n.displayColors?o+2+n.boxPadding:0,on(i,x=>{on(x.before,N),on(x.lines,N),on(x.after,N)}),v=0,t.font=c.string,on(e.footer,N),t.restore(),y+=h.width,{width:y,height:k}}function _Te(e,n){const{y:t,height:i}=n;return t<i/2?"top":t>e.height-i/2?"bottom":"center"}function CTe(e,n,t,i){const{x:a,width:r}=i,o=t.caretSize+t.caretPadding;if(e==="left"&&a+r+o>n.width||e==="right"&&a-r-o<0)return!0}function PTe(e,n,t,i){const{x:a,width:r}=t,{width:o,chartArea:{left:l,right:s}}=e;let d="center";return i==="center"?d=a<=(l+s)/2?"left":"right":a<=r/2?d="left":a>=o-r/2&&(d="right"),CTe(d,e,n,t)&&(d="center"),d}function RA(e,n,t){const i=t.yAlign||n.yAlign||_Te(e,t);return{xAlign:t.xAlign||n.xAlign||PTe(e,n,t,i),yAlign:i}}function OTe(e,n){let{x:t,width:i}=e;return n==="right"?t-=i:n==="center"&&(t-=i/2),t}function DTe(e,n,t){let{y:i,height:a}=e;return n==="top"?i+=t:n==="bottom"?i-=a+t:i-=a/2,i}function MA(e,n,t,i){const{caretSize:a,caretPadding:r,cornerRadius:o}=e,{xAlign:l,yAlign:s}=t,d=a+r,{topLeft:c,topRight:u,bottomLeft:f,bottomRight:p}=ql(o);let h=OTe(n,l);const k=DTe(n,s,d);return s==="center"?l==="left"?h+=d:l==="right"&&(h-=d):l==="left"?h-=Math.max(c,f)+a:l==="right"&&(h+=Math.max(u,p)+a),{x:Nt(h,0,i.width-n.width),y:Nt(k,0,i.height-n.height)}}function Ap(e,n,t){const i=qt(t.padding);return n==="center"?e.x+e.width/2:n==="right"?e.x+e.width-i.right:e.x+i.left}function LA(e){return Wa([],kr(e))}function ETe(e,n,t){return dl(e,{tooltip:n,tooltipItems:t,type:"tooltip"})}function zA(e,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?e.override(t):e}const uH={beforeTitle:hr,title(e){if(e.length>0){const n=e[0],t=n.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(i>0&&n.dataIndex<i)return t[n.dataIndex]}return""},afterTitle:hr,beforeBody:hr,beforeLabel:hr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let n=e.dataset.label||"";n&&(n+=": ");const t=e.formattedValue;return Je(t)||(n+=t),n},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:hr,afterBody:hr,beforeFooter:hr,footer:hr,afterFooter:hr};function ai(e,n,t,i){const a=e[n].call(t,i);return typeof a>"u"?uH[n].call(t,i):a}class hF extends qr{constructor(n){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=n.chart,this.options=n.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&t.options.animation&&i.animations,r=new HW(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=ETe(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:i}=t,a=ai(i,"beforeTitle",this,n),r=ai(i,"title",this,n),o=ai(i,"afterTitle",this,n);let l=[];return l=Wa(l,kr(a)),l=Wa(l,kr(r)),l=Wa(l,kr(o)),l}getBeforeBody(n,t){return LA(ai(t.callbacks,"beforeBody",this,n))}getBody(n,t){const{callbacks:i}=t,a=[];return on(n,r=>{const o={before:[],lines:[],after:[]},l=zA(i,r);Wa(o.before,kr(ai(l,"beforeLabel",this,r))),Wa(o.lines,ai(l,"label",this,r)),Wa(o.after,kr(ai(l,"afterLabel",this,r))),a.push(o)}),a}getAfterBody(n,t){return LA(ai(t.callbacks,"afterBody",this,n))}getFooter(n,t){const{callbacks:i}=t,a=ai(i,"beforeFooter",this,n),r=ai(i,"footer",this,n),o=ai(i,"afterFooter",this,n);let l=[];return l=Wa(l,kr(a)),l=Wa(l,kr(r)),l=Wa(l,kr(o)),l}_createItems(n){const t=this._active,i=this.chart.data,a=[],r=[],o=[];let l=[],s,d;for(s=0,d=t.length;s<d;++s)l.push(wTe(this.chart,t[s]));return n.filter&&(l=l.filter((c,u,f)=>n.filter(c,u,f,i))),n.itemSort&&(l=l.sort((c,u)=>n.itemSort(c,u,i))),on(l,c=>{const u=zA(n.callbacks,c);a.push(ai(u,"labelColor",this,c)),r.push(ai(u,"labelPointStyle",this,c)),o.push(ai(u,"labelTextColor",this,c))}),this.labelColors=a,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(n,t){const i=this.options.setContext(this.getContext()),a=this._active;let r,o=[];if(!a.length)this.opacity!==0&&(r={opacity:0});else{const l=ku[i.position].call(this,a,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const s=this._size=AA(this,i),d=Object.assign({},l,s),c=RA(this.chart,i,d),u=MA(i,d,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,r={opacity:1,x:u.x,y:u.y,width:s.width,height:s.height,caretX:l.x,caretY:l.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),n&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,i,a){const r=this.getCaretPosition(n,i,a);t.lineTo(r.x1,r.y1),t.lineTo(r.x2,r.y2),t.lineTo(r.x3,r.y3)}getCaretPosition(n,t,i){const{xAlign:a,yAlign:r}=this,{caretSize:o,cornerRadius:l}=i,{topLeft:s,topRight:d,bottomLeft:c,bottomRight:u}=ql(l),{x:f,y:p}=n,{width:h,height:k}=t;let y,g,v,N,x,F;return r==="center"?(x=p+k/2,a==="left"?(y=f,g=y-o,N=x+o,F=x-o):(y=f+h,g=y+o,N=x-o,F=x+o),v=y):(a==="left"?g=f+Math.max(s,c)+o:a==="right"?g=f+h-Math.max(d,u)-o:g=this.caretX,r==="top"?(N=p,x=N-o,y=g-o,v=g+o):(N=p+k,x=N+o,y=g+o,v=g-o),F=N),{x1:y,x2:g,x3:v,y1:N,y2:x,y3:F}}drawTitle(n,t,i){const a=this.title,r=a.length;let o,l,s;if(r){const d=kd(i.rtl,this.x,this.width);for(n.x=Ap(this,i.titleAlign,i),t.textAlign=d.textAlign(i.titleAlign),t.textBaseline="middle",o=ht(i.titleFont),l=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,s=0;s<r;++s)t.fillText(a[s],d.x(n.x),n.y+o.lineHeight/2),n.y+=o.lineHeight+l,s+1===r&&(n.y+=i.titleMarginBottom-l)}}_drawColorBox(n,t,i,a,r){const o=this.labelColors[i],l=this.labelPointStyles[i],{boxHeight:s,boxWidth:d}=r,c=ht(r.bodyFont),u=Ap(this,"left",r),f=a.x(u),p=s<c.lineHeight?(c.lineHeight-s)/2:0,h=t.y+p;if(r.usePointStyle){const k={radius:Math.min(d,s)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},y=a.leftForLtr(f,d)+d/2,g=h+s/2;n.strokeStyle=r.multiKeyBackground,n.fillStyle=r.multiKeyBackground,sF(n,k,y,g),n.strokeStyle=o.borderColor,n.fillStyle=o.backgroundColor,sF(n,k,y,g)}else{n.lineWidth=Ye(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,n.strokeStyle=o.borderColor,n.setLineDash(o.borderDash||[]),n.lineDashOffset=o.borderDashOffset||0;const k=a.leftForLtr(f,d),y=a.leftForLtr(a.xPlus(f,1),d-2),g=ql(o.borderRadius);Object.values(g).some(v=>v!==0)?(n.beginPath(),n.fillStyle=r.multiKeyBackground,Om(n,{x:k,y:h,w:d,h:s,radius:g}),n.fill(),n.stroke(),n.fillStyle=o.backgroundColor,n.beginPath(),Om(n,{x:y,y:h+1,w:d-2,h:s-2,radius:g}),n.fill()):(n.fillStyle=r.multiKeyBackground,n.fillRect(k,h,d,s),n.strokeRect(k,h,d,s),n.fillStyle=o.backgroundColor,n.fillRect(y,h+1,d-2,s-2))}n.fillStyle=this.labelTextColors[i]}drawBody(n,t,i){const{body:a}=this,{bodySpacing:r,bodyAlign:o,displayColors:l,boxHeight:s,boxWidth:d,boxPadding:c}=i,u=ht(i.bodyFont);let f=u.lineHeight,p=0;const h=kd(i.rtl,this.x,this.width),k=function(C){t.fillText(C,h.x(n.x+p),n.y+f/2),n.y+=f+r},y=h.textAlign(o);let g,v,N,x,F,_,w;for(t.textAlign=o,t.textBaseline="middle",t.font=u.string,n.x=Ap(this,y,i),t.fillStyle=i.bodyColor,on(this.beforeBody,k),p=l&&y!=="right"?o==="center"?d/2+c:d+2+c:0,x=0,_=a.length;x<_;++x){for(g=a[x],v=this.labelTextColors[x],t.fillStyle=v,on(g.before,k),N=g.lines,l&&N.length&&(this._drawColorBox(t,n,x,h,i),f=Math.max(u.lineHeight,s)),F=0,w=N.length;F<w;++F)k(N[F]),f=u.lineHeight;on(g.after,k)}p=0,f=u.lineHeight,on(this.afterBody,k),n.y-=r}drawFooter(n,t,i){const a=this.footer,r=a.length;let o,l;if(r){const s=kd(i.rtl,this.x,this.width);for(n.x=Ap(this,i.footerAlign,i),n.y+=i.footerMarginTop,t.textAlign=s.textAlign(i.footerAlign),t.textBaseline="middle",o=ht(i.footerFont),t.fillStyle=i.footerColor,t.font=o.string,l=0;l<r;++l)t.fillText(a[l],s.x(n.x),n.y+o.lineHeight/2),n.y+=o.lineHeight+i.footerSpacing}}drawBackground(n,t,i,a){const{xAlign:r,yAlign:o}=this,{x:l,y:s}=n,{width:d,height:c}=i,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:h}=ql(a.cornerRadius);t.fillStyle=a.backgroundColor,t.strokeStyle=a.borderColor,t.lineWidth=a.borderWidth,t.beginPath(),t.moveTo(l+u,s),o==="top"&&this.drawCaret(n,t,i,a),t.lineTo(l+d-f,s),t.quadraticCurveTo(l+d,s,l+d,s+f),o==="center"&&r==="right"&&this.drawCaret(n,t,i,a),t.lineTo(l+d,s+c-h),t.quadraticCurveTo(l+d,s+c,l+d-h,s+c),o==="bottom"&&this.drawCaret(n,t,i,a),t.lineTo(l+p,s+c),t.quadraticCurveTo(l,s+c,l,s+c-p),o==="center"&&r==="left"&&this.drawCaret(n,t,i,a),t.lineTo(l,s+u),t.quadraticCurveTo(l,s,l+u,s),t.closePath(),t.fill(),a.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,i=this.$animations,a=i&&i.x,r=i&&i.y;if(a||r){const o=ku[n.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=AA(this,n),s=Object.assign({},o,this._size),d=RA(t,n,s),c=MA(n,s,d,t);(a._to!==c.x||r._to!==c.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=qt(t.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&l&&(n.save(),n.globalAlpha=i,this.drawBackground(r,n,a,t),LW(n,t.textDirection),r.y+=o.top,this.drawTitle(r,n,t),this.drawBody(r,n,t),this.drawFooter(r,n,t),zW(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const i=this._active,a=n.map(({datasetIndex:l,index:s})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[s],index:s}}),r=!py(i,a),o=this._positionChanged(a,t);(r||o)&&(this._active=a,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,r=this._active||[],o=this._getActiveElements(n,r,t,i),l=this._positionChanged(o,n),s=t||!py(o,r)||l;return s&&(this._active=o,(a.enabled||a.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),s}_getActiveElements(n,t,i,a){const r=this.options;if(n.type==="mouseout")return[];if(!a)return t.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const o=this.chart.getElementsAtEventForMode(n,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(n,t){const{caretX:i,caretY:a,options:r}=this,o=ku[r.position].call(this,n,t);return o!==!1&&(i!==o.x||a!==o.y)}}fe(hF,"positioners",ku);var $Te={id:"tooltip",_element:hF,positioners:ku,afterInit(e,n,t){t&&(e.tooltip=new hF({chart:e,options:t}))},beforeUpdate(e,n,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,n,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const n=e.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;n.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,n){if(e.tooltip){const t=n.replay;e.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,n)=>n.bodyFont.size,boxWidth:(e,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:uH},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ITe=Object.freeze({__proto__:null,Colors:Uje,Decimation:Kje,Filler:hTe,Legend:NTe,SubTitle:FTe,Title:xTe,Tooltip:$Te});const jTe=(e,n,t,i)=>(typeof n=="string"?(t=e.push(n)-1,i.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function TTe(e,n,t,i){const a=e.indexOf(n);if(a===-1)return jTe(e,n,t,i);const r=e.lastIndexOf(n);return a!==r?t:a}const ATe=(e,n)=>e===null?null:Nt(Math.round(e),0,n);function BA(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]:e}class vF extends bs{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:a,label:r}of t)i[a]===r&&i.splice(a,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Je(n))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===n?t:TTe(i,n,Re(t,n),this._addedLabels),ATe(t,i.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(i=0),t||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const n=this.min,t=this.max,i=this.options.offset,a=[];let r=this.getLabels();r=n===0&&t===r.length-1?r:r.slice(n,t+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=n;o<=t;o++)a.push({value:o});return a}getLabelForValue(n){return BA.call(this,n)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}fe(vF,"id","category"),fe(vF,"defaults",{ticks:{callback:BA}});function RTe(e,n){const t=[],{bounds:a,step:r,min:o,max:l,precision:s,count:d,maxTicks:c,maxDigits:u,includeBounds:f}=e,p=r||1,h=c-1,{min:k,max:y}=n,g=!Je(o),v=!Je(l),N=!Je(d),x=(y-k)/(u+1);let F=TT((y-k)/h/p)*p,_,w,C,$;if(F<1e-14&&!g&&!v)return[{value:k},{value:y}];$=Math.ceil(y/F)-Math.floor(k/F),$>h&&(F=TT($*F/h/p)*p),Je(s)||(_=Math.pow(10,s),F=Math.ceil(F*_)/_),a==="ticks"?(w=Math.floor(k/F)*F,C=Math.ceil(y/F)*F):(w=k,C=y),g&&v&&r&&E2e((l-o)/r,F/1e3)?($=Math.round(Math.min((l-o)/F,c)),F=(l-o)/$,w=o,C=l):N?(w=g?o:w,C=v?l:C,$=d-1,F=(C-w)/$):($=(C-w)/F,zu($,Math.round($),F/1e3)?$=Math.round($):$=Math.ceil($));const E=Math.max(AT(F),AT(w));_=Math.pow(10,Je(s)?E:s),w=Math.round(w*_)/_,C=Math.round(C*_)/_;let j=0;for(g&&(f&&w!==o?(t.push({value:o}),w<o&&j++,zu(Math.round((w+j*F)*_)/_,o,VA(o,x,e))&&j++):w<o&&j++);j<$;++j){const D=Math.round((w+j*F)*_)/_;if(v&&D>l)break;t.push({value:D})}return v&&f&&C!==l?t.length&&zu(t[t.length-1].value,l,VA(l,x,e))?t[t.length-1].value=l:t.push({value:l}):(!v||C===l)&&t.push({value:C}),t}function VA(e,n,{horizontal:t,minRotation:i}){const a=Na(i),r=(t?Math.sin(a):Math.cos(a))||.001,o=.75*n*(""+e).length;return Math.min(n/r,o)}class Ny extends bs{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Je(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:a,max:r}=this;const o=s=>a=t?a:s,l=s=>r=i?r:s;if(n){const s=rr(a),d=rr(r);s<0&&d<0?l(0):s>0&&d>0&&o(0)}if(a===r){let s=r===0?1:Math.abs(r*.05);l(r+s),n||o(a-s)}this.min=a,this.max=r}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=n,a;return i?(a=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),t=t||11),t&&(a=Math.min(t,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let i=this.getTickLimit();i=Math.max(2,i);const a={maxTicks:i,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},r=this._range||this,o=RTe(a,r);return n.bounds==="ticks"&&bW(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const n=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&n.length){const a=(i-t)/Math.max(n.length-1,1)/2;t-=a,i+=a}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(n){return uf(n,this.chart.options.locale,this.options.ticks.format)}}class kF extends Ny{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=zn(n)?n:0,this.max=zn(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,i=Na(this.options.ticks.minRotation),a=(n?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/a))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}fe(kF,"id","linear"),fe(kF,"defaults",{ticks:{callback:jS.formatters.numeric}});const Em=e=>Math.floor(Co(e)),Nl=(e,n)=>Math.pow(10,Em(e)+n);function WA(e){return e/Math.pow(10,Em(e))===1}function HA(e,n,t){const i=Math.pow(10,t),a=Math.floor(e/i);return Math.ceil(n/i)-a}function MTe(e,n){const t=n-e;let i=Em(t);for(;HA(e,n,i)>10;)i++;for(;HA(e,n,i)<10;)i--;return Math.min(i,Em(e))}function LTe(e,{min:n,max:t}){n=Ni(e.min,n);const i=[],a=Em(n);let r=MTe(n,t),o=r<0?Math.pow(10,Math.abs(r)):1;const l=Math.pow(10,r),s=a>r?Math.pow(10,a):0,d=Math.round((n-s)*o)/o,c=Math.floor((n-s)/l/10)*l*10;let u=Math.floor((d-c)/Math.pow(10,r)),f=Ni(e.min,Math.round((s+c+u*Math.pow(10,r))*o)/o);for(;f<t;)i.push({value:f,major:WA(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(r++,u=2,o=r>=0?1:o),f=Math.round((s+c+u*Math.pow(10,r))*o)/o;const p=Ni(e.max,f);return i.push({value:p,major:WA(p),significand:u}),i}class gF extends bs{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const i=Ny.prototype.parse.apply(this,[n,t]);if(i===0){this._zero=!0;return}return zn(i)&&i>0?i:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=zn(n)?Math.max(0,n):null,this.max=zn(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!zn(this._userMin)&&(this.min=n===Nl(this.min,0)?Nl(this.min,-1):Nl(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let i=this.min,a=this.max;const r=l=>i=n?i:l,o=l=>a=t?a:l;i===a&&(i<=0?(r(1),o(10)):(r(Nl(i,-1)),o(Nl(a,1)))),i<=0&&r(Nl(a,-1)),a<=0&&o(Nl(i,1)),this.min=i,this.max=a}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},i=LTe(t,this);return n.bounds==="ticks"&&bW(i,this,"value"),n.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(n){return n===void 0?"0":uf(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=Co(n),this._valueRange=Co(this.max)-Co(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(Co(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}fe(gF,"id","logarithmic"),fe(gF,"defaults",{ticks:{callback:jS.formatters.logarithmic,major:{enabled:!0}}});function yF(e){const n=e.ticks;if(n.display&&e.display){const t=qt(n.backdropPadding);return Re(n.font&&n.font.size,Bn.font.size)+t.height}return 0}function zTe(e,n,t){return t=wn(t)?t:[t],{w:q2e(e,n.string,t),h:t.length*n.lineHeight}}function UA(e,n,t,i,a){return e===i||e===a?{start:n-t/2,end:n+t/2}:e<i||e>a?{start:n-t,end:n}:{start:n,end:n+t}}function BTe(e){const n={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},n),i=[],a=[],r=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?On/r:0;for(let s=0;s<r;s++){const d=o.setContext(e.getPointLabelContext(s));a[s]=d.padding;const c=e.getPointPosition(s,e.drawingArea+a[s],l),u=ht(d.font),f=zTe(e.ctx,u,e._pointLabels[s]);i[s]=f;const p=Ci(e.getIndexAngle(s)+l),h=Math.round(f1(p)),k=UA(h,c.x,f.w,0,180),y=UA(h,c.y,f.h,90,270);VTe(t,n,p,k,y)}e.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),e._pointLabelItems=UTe(e,i,a)}function VTe(e,n,t,i,a){const r=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t));let l=0,s=0;i.start<n.l?(l=(n.l-i.start)/r,e.l=Math.min(e.l,n.l-l)):i.end>n.r&&(l=(i.end-n.r)/r,e.r=Math.max(e.r,n.r+l)),a.start<n.t?(s=(n.t-a.start)/o,e.t=Math.min(e.t,n.t-s)):a.end>n.b&&(s=(a.end-n.b)/o,e.b=Math.max(e.b,n.b+s))}function WTe(e,n,t){const i=e.drawingArea,{extra:a,additionalAngle:r,padding:o,size:l}=t,s=e.getPointPosition(n,i+a+o,r),d=Math.round(f1(Ci(s.angle+qn))),c=qTe(s.y,l.h,d),u=YTe(d),f=GTe(s.x,l.w,u);return{visible:!0,x:s.x,y:c,textAlign:u,left:f,top:c,right:f+l.w,bottom:c+l.h}}function HTe(e,n){if(!n)return!0;const{left:t,top:i,right:a,bottom:r}=e;return!(Or({x:t,y:i},n)||Or({x:t,y:r},n)||Or({x:a,y:i},n)||Or({x:a,y:r},n))}function UTe(e,n,t){const i=[],a=e._pointLabels.length,r=e.options,{centerPointLabels:o,display:l}=r.pointLabels,s={extra:yF(r)/2,additionalAngle:o?On/a:0};let d;for(let c=0;c<a;c++){s.padding=t[c],s.size=n[c];const u=WTe(e,c,s);i.push(u),l==="auto"&&(u.visible=HTe(u,d),u.visible&&(d=u))}return i}function YTe(e){return e===0||e===180?"center":e<180?"left":"right"}function GTe(e,n,t){return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function qTe(e,n,t){return t===90||t===270?e-=n/2:(t>270||t<90)&&(e-=n),e}function KTe(e,n,t){const{left:i,top:a,right:r,bottom:o}=t,{backdropColor:l}=n;if(!Je(l)){const s=ql(n.borderRadius),d=qt(n.backdropPadding);e.fillStyle=l;const c=i-d.left,u=a-d.top,f=r-i+d.width,p=o-a+d.height;Object.values(s).some(h=>h!==0)?(e.beginPath(),Om(e,{x:c,y:u,w:f,h:p,radius:s}),e.fill()):e.fillRect(c,u,f,p)}}function XTe(e,n){const{ctx:t,options:{pointLabels:i}}=e;for(let a=n-1;a>=0;a--){const r=e._pointLabelItems[a];if(!r.visible)continue;const o=i.setContext(e.getPointLabelContext(a));KTe(t,o,r);const l=ht(o.font),{x:s,y:d,textAlign:c}=r;ls(t,e._pointLabels[a],s,d+l.lineHeight/2,l,{color:o.color,textAlign:c,textBaseline:"middle"})}}function mH(e,n,t,i){const{ctx:a}=e;if(t)a.arc(e.xCenter,e.yCenter,n,0,Pn);else{let r=e.getPointPosition(0,n);a.moveTo(r.x,r.y);for(let o=1;o<i;o++)r=e.getPointPosition(o,n),a.lineTo(r.x,r.y)}}function QTe(e,n,t,i,a){const r=e.ctx,o=n.circular,{color:l,lineWidth:s}=n;!o&&!i||!l||!s||t<0||(r.save(),r.strokeStyle=l,r.lineWidth=s,r.setLineDash(a.dash),r.lineDashOffset=a.dashOffset,r.beginPath(),mH(e,t,o,i),r.closePath(),r.stroke(),r.restore())}function ZTe(e,n,t){return dl(e,{label:t,index:n,type:"pointLabel"})}class gu extends Ny{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=qt(yF(this.options)/2),t=this.width=this.maxWidth-n.width,i=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+i/2+n.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=zn(n)&&!isNaN(n)?n:0,this.max=zn(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/yF(this.options))}generateTickLabels(n){Ny.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,i)=>{const a=gn(this.options.pointLabels.callback,[t,i],this);return a||a===0?a:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const n=this.options;n.display&&n.pointLabels.display?BTe(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,i,a){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,i,a))}getIndexAngle(n){const t=Pn/(this._pointLabels.length||1),i=this.options.startAngle||0;return Ci(n*t+Na(i))}getDistanceFromCenterForValue(n){if(Je(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Je(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const i=t[n];return ZTe(this.getContext(),n,i)}}getPointPosition(n,t,i=0){const a=this.getIndexAngle(n)-qn+i;return{x:Math.cos(a)*t+this.xCenter,y:Math.sin(a)*t+this.yCenter,angle:a}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:i,right:a,bottom:r}=this._pointLabelItems[n];return{left:t,top:i,right:a,bottom:r}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const i=this.ctx;i.save(),i.beginPath(),mH(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=n,i.fill(),i.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:i,grid:a,border:r}=t,o=this._pointLabels.length;let l,s,d;if(t.pointLabels.display&&XTe(this,o),a.display&&this.ticks.forEach((c,u)=>{if(u!==0||u===0&&this.min<0){s=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(u),p=a.setContext(f),h=r.setContext(f);QTe(this,p,s,o,h)}}),i.display){for(n.save(),l=o-1;l>=0;l--){const c=i.setContext(this.getPointLabelContext(l)),{color:u,lineWidth:f}=c;!f||!u||(n.lineWidth=f,n.strokeStyle=u,n.setLineDash(c.borderDash),n.lineDashOffset=c.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),d=this.getPointPosition(l,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(d.x,d.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const a=this.getIndexAngle(0);let r,o;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(a),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((l,s)=>{if(s===0&&this.min>=0&&!t.reverse)return;const d=i.setContext(this.getContext(s)),c=ht(d.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),d.showLabelBackdrop){n.font=c.string,o=n.measureText(l.label).width,n.fillStyle=d.backdropColor;const u=qt(d.backdropPadding);n.fillRect(-o/2-u.left,-r-c.size/2-u.top,o+u.width,c.size+u.height)}ls(n,l.label,0,-r,c,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),n.restore()}drawTitle(){}}fe(gu,"id","radialLinear"),fe(gu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:jS.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}}),fe(gu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),fe(gu,"descriptors",{angleLines:{_fallback:"grid"}});const MS={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},li=Object.keys(MS);function YA(e,n){return e-n}function GA(e,n){if(Je(n))return null;const t=e._adapter,{parser:i,round:a,isoWeekday:r}=e._parseOpts;let o=n;return typeof i=="function"&&(o=i(o)),zn(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(a&&(o=a==="week"&&(Xd(r)||r===!0)?t.startOf(o,"isoWeek",r):t.startOf(o,a)),+o)}function qA(e,n,t,i){const a=li.length;for(let r=li.indexOf(e);r<a-1;++r){const o=MS[li[r]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-n)/(l*o.size))<=i)return li[r]}return li[a-1]}function JTe(e,n,t,i,a){for(let r=li.length-1;r>=li.indexOf(t);r--){const o=li[r];if(MS[o].common&&e._adapter.diff(a,i,o)>=n-1)return o}return li[t?li.indexOf(t):0]}function eAe(e){for(let n=li.indexOf(e)+1,t=li.length;n<t;++n)if(MS[li[n]].common)return li[n]}function KA(e,n,t){if(!t)e[n]=!0;else if(t.length){const{lo:i,hi:a}=p1(t,n),r=t[i]>=n?t[i]:t[a];e[r]=!0}}function nAe(e,n,t,i){const a=e._adapter,r=+a.startOf(n[0].value,i),o=n[n.length-1].value;let l,s;for(l=r;l<=o;l=+a.add(l,1,i))s=t[l],s>=0&&(n[s].major=!0);return n}function XA(e,n,t){const i=[],a={},r=n.length;let o,l;for(o=0;o<r;++o)l=n[o],a[l]=o,i.push({value:l,major:!1});return r===0||!t?i:nAe(e,i,a,t)}class $m extends bs{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t={}){const i=n.time||(n.time={}),a=this._adapter=new cIe._date(n.adapters.date);a.init(t),Lu(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:GA(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,i=n.time.unit||"day";let{min:a,max:r,minDefined:o,maxDefined:l}=this.getUserBounds();function s(d){!o&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(r=Math.max(r,d.max))}(!o||!l)&&(s(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&s(this.getMinMax(!1))),a=zn(a)&&!isNaN(a)?a:+t.startOf(Date.now(),i),r=zn(r)&&!isNaN(r)?r:+t.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],i=n[n.length-1]),{min:t,max:i}}buildTicks(){const n=this.options,t=n.time,i=n.ticks,a=i.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const r=this.min,o=this.max,l=T2e(a,r,o);return this._unit=t.unit||(i.autoSkip?qA(t.minUnit,this.min,this.max,this._getLabelCapacity(r)):JTe(this,l.length,t.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:eAe(this._unit),this.initOffsets(a),n.reverse&&l.reverse(),XA(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n=[]){let t=0,i=0,a,r;this.options.offset&&n.length&&(a=this.getDecimalForValue(n[0]),n.length===1?t=1-a:t=(this.getDecimalForValue(n[1])-a)/2,r=this.getDecimalForValue(n[n.length-1]),n.length===1?i=r:i=(r-this.getDecimalForValue(n[n.length-2]))/2);const o=n.length<3?.5:.25;t=Nt(t,0,o),i=Nt(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const n=this._adapter,t=this.min,i=this.max,a=this.options,r=a.time,o=r.unit||qA(r.minUnit,t,i,this._getLabelCapacity(t)),l=Re(a.ticks.stepSize,1),s=o==="week"?r.isoWeekday:!1,d=Xd(s)||s===!0,c={};let u=t,f,p;if(d&&(u=+n.startOf(u,"isoWeek",s)),u=+n.startOf(u,d?"day":o),n.diff(i,t,o)>1e5*l)throw new Error(t+" and "+i+" are too far apart with stepSize of "+l+" "+o);const h=a.ticks.source==="data"&&this.getDataTimestamps();for(f=u,p=0;f<i;f=+n.add(f,l,o),p++)KA(c,f,h);return(f===i||a.bounds==="ticks"||p===1)&&KA(c,f,h),Object.keys(c).sort(YA).map(k=>+k)}getLabelForValue(n){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(n,i.tooltipFormat):t.format(n,i.displayFormats.datetime)}format(n,t){const a=this.options.time.displayFormats,r=this._unit,o=t||a[r];return this._adapter.format(n,o)}_tickFormatFunction(n,t,i,a){const r=this.options,o=r.ticks.callback;if(o)return gn(o,[n,t,i],this);const l=r.time.displayFormats,s=this._unit,d=this._majorUnit,c=s&&l[s],u=d&&l[d],f=i[t],p=d&&u&&f&&f.major;return this._adapter.format(n,a||(p?u:c))}generateTickLabels(n){let t,i,a;for(t=0,i=n.length;t<i;++t)a=n[t],a.label=this._tickFormatFunction(a.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,i=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(n){const t=this._offsets,i=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,i=this.ctx.measureText(n).width,a=Na(this.isHorizontal()?t.maxRotation:t.minRotation),r=Math.cos(a),o=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:i*r+l*o,h:i*o+l*r}}_getLabelCapacity(n){const t=this.options.time,i=t.displayFormats,a=i[t.unit]||i.millisecond,r=this._tickFormatFunction(n,0,XA(this,[n],this._majorUnit),a),o=this._getLabelSize(r),l=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return l>0?l:1}getDataTimestamps(){let n=this._cache.data||[],t,i;if(n.length)return n;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(t=0,i=a.length;t<i;++t)n=n.concat(a[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,i;if(n.length)return n;const a=this.getLabels();for(t=0,i=a.length;t<i;++t)n.push(GA(this,a[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return wW(n.sort(YA))}}fe($m,"id","time"),fe($m,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Rp(e,n,t){let i=0,a=e.length-1,r,o,l,s;t?(n>=e[i].pos&&n<=e[a].pos&&({lo:i,hi:a}=Pr(e,"pos",n)),{pos:r,time:l}=e[i],{pos:o,time:s}=e[a]):(n>=e[i].time&&n<=e[a].time&&({lo:i,hi:a}=Pr(e,"time",n)),{time:r,pos:l}=e[i],{time:o,pos:s}=e[a]);const d=o-r;return d?l+(s-l)*(n-r)/d:l}class SF extends $m{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Rp(t,this.min),this._tableRange=Rp(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:i}=this,a=[],r=[];let o,l,s,d,c;for(o=0,l=n.length;o<l;++o)d=n[o],d>=t&&d<=i&&a.push(d);if(a.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,l=a.length;o<l;++o)c=a[o+1],s=a[o-1],d=a[o],Math.round((c+s)/2)!==d&&r.push({time:d,pos:o/(l-1)});return r}_generate(){const n=this.min,t=this.max;let i=super.getDataTimestamps();return(!i.includes(n)||!i.length)&&i.splice(0,0,n),(!i.includes(t)||i.length===1)&&i.push(t),i.sort((a,r)=>a-r)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?n=this.normalize(t.concat(i)):n=t.length?t:i,n=this._cache.all=n,n}getDecimalForValue(n){return(Rp(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,i=this.getDecimalForPixel(n)/t.factor-t.end;return Rp(this._table,i*this._tableRange+this._minPos,!0)}}fe(SF,"id","timeseries"),fe(SF,"defaults",$m.defaults);var tAe=Object.freeze({__proto__:null,CategoryScale:vF,LinearScale:kF,LogarithmicScale:gF,RadialLinearScale:gu,TimeScale:$m,TimeSeriesScale:SF});const iAe=[dIe,Lje,ITe,tAe];xr.register(...iAe);const aAe=({data:e,datasetsTitle:n,type:t})=>{const i=S.useRef(null),a=S.useRef(null);return S.useEffect(()=>{if(i.current){const r=i.current.getContext("2d");r&&(a.current&&a.current.destroy(),a.current=new xr(r,{type:t,data:{labels:e.map(o=>o.date),datasets:[{label:n?n[0]:"Income",data:e.map(o=>o.income??null)},{label:n?n[1]:"Outcome",data:e.map(o=>o.outcome??null)}]}}))}},[e,n,t]),m.jsx("canvas",{className:"p-10",ref:i})};function rAe({filter:e,setFilter:n,closeModal:t}){const{handleSubmit:i,control:a}=ki({defaultValues:{...e}}),r=s=>{n(s),t()};function o(){n(),t()}const l=en(new Date,"yyyy-MM-dd");return m.jsxs("form",{onSubmit:i(r),children:[m.jsx(ue,{name:"fromAnyDate",control:a,defaultValue:"2023-01-01",rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:d})=>{var c;return m.jsx(Ud,{...s,value:s.value||"",error:(c=d.error)==null?void 0:c.message,label:"From Date"})}}),m.jsx(ue,{name:"toAnyDate",control:a,defaultValue:l,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:d})=>{var c;return m.jsx(Ud,{...s,value:s.value||"",error:(c=d.error)==null?void 0:c.message,label:"To Date"})}}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:o,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})}function oAe({filter:e,setFilter:n}){const[t,i]=S.useState(!1),{get:a,set:r}=kt();function o(l){l||(l={fromDate:en(new Date,"yyyy-MM-DD"),toDate:en(new Date,"yyyy-MM-DD")}),Fc(l,e)||n(l)}return S.useEffect(()=>{const l=Fa(e??{})?null:encodeURIComponent(JSON.stringify(e)),s=a("ChargeMonthlyChartsFilters");l!==s&&r("ChargeMonthlyChartsFilters",l)},[e,a,r]),m.jsxs(m.Fragment,{children:[m.jsx(ol,{opened:t,onClose:()=>i(!1),content:m.jsx(rAe,{filter:e,setFilter:o,closeModal:()=>i(!1)})}),m.jsx(Pe,{variant:"default",onClick:()=>i(!0),size:30,children:m.jsx(rc,{size:20})})]})}const lAe=({items:e})=>m.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4 mb-10",children:e.map(n=>m.jsxs(r1,{children:[m.jsx(o1,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:m.jsx(l1,{className:"text-sm font-medium",children:n.title})}),m.jsx(s1,{children:m.jsx("div",{className:"text-2xl font-bold",children:n.number})})]},n.title))}),sAe=()=>{const{setFiltersContext:e}=S.useContext(dr),{get:n}=kt(),[t,i]=S.useState(n("ChargeMonthlyChartsFilters")?JSON.parse(decodeURIComponent(n("ChargeMonthlyChartsFilters"))):{fromDate:"2023-01-01",toDate:en(new Date,"yyyy-MM-dd")}),[{data:a,fetching:r,error:o}]=Be({query:Dke,variables:{filters:t}});S.useEffect(()=>{e(m.jsx("div",{className:"flex flex-row gap-2",children:m.jsx(oAe,{filter:{...t},setFilter:i})}))},[a,t,r,e,o]);function l(f){return new df(f).toDP(2).toNumber()}const s=S.useMemo(()=>{const f=[];a==null||a.allCharges.nodes.map(y=>{y.transactions.map(g=>{var v;[Hn.Eur,Hn.Gbp,Hn.Ils,Hn.Usd].includes((v=g.amount)==null?void 0:v.currency)&&f.push(g)})});const p=f.reduce((y,g)=>{const v=new Date(g.effectiveDate||g.eventDate),N=v.toLocaleString("default",{month:"long"}),x=v.getFullYear(),F=`${N} ${x}`;return y[F]||(y[F]=[]),y[F].push(g),y},{})??{},h=[];return Object.entries(p).map(([y,g])=>{let v=g.map(N=>{var x,F,_,w,C,$,E,j,D,M,R,I,L,B,O,P,A,V,U,oe;if(N.amount.currency===Hn.Usd)return N;if(N.amount.currency===Hn.Ils){const G=((F=(x=N.debitExchangeRates)==null?void 0:x.usd)==null?void 0:F.raw)||((w=(_=N.eventExchangeRates)==null?void 0:_.usd)==null?void 0:w.raw);if(!G)return console.log(`No rate found for transaction ${N.id}`),null;const ne=l(N.amount.raw*G);return{...N,amount:{...N.amount,raw:ne,currency:Hn.Usd,formatted:`$${ne} `}}}if(N.amount.currency===Hn.Eur){const G=(($=(C=N.debitExchangeRates)==null?void 0:C.eur)==null?void 0:$.raw)||((j=(E=N.eventExchangeRates)==null?void 0:E.eur)==null?void 0:j.raw),ne=((M=(D=N.debitExchangeRates)==null?void 0:D.usd)==null?void 0:M.raw)||((I=(R=N.eventExchangeRates)==null?void 0:R.usd)==null?void 0:I.raw);if(!G||!ne)return console.log(`No rate found for transaction ${N.id}`),null;const Z=ne/G,ce=l(N.amount.raw*Z);return{...N,amount:{...N.amount,raw:ce,currency:Hn.Usd,formatted:`$${ce} `}}}if(N.amount.currency===Hn.Gbp){const G=((B=(L=N.debitExchangeRates)==null?void 0:L.gbp)==null?void 0:B.raw)||((P=(O=N.eventExchangeRates)==null?void 0:O.gbp)==null?void 0:P.raw),ne=((V=(A=N.debitExchangeRates)==null?void 0:A.usd)==null?void 0:V.raw)||((oe=(U=N.eventExchangeRates)==null?void 0:U.usd)==null?void 0:oe.raw);if(!G||!ne)return console.log(`No rate found for transaction ${N.id}`),null;const Z=ne/G,ce=l(N.amount.raw*Z);return{...N,amount:{...N.amount,raw:ce,currency:Hn.Usd,formatted:`$${ce} `}}}return null});v=v.filter(N=>N!==null),h.push({month:y,converted:v})}),h.map(y=>{const[g,v]=y.converted.reduce(([N,x],F)=>F.amount.raw?F.amount.raw>0?[l(N+F.amount.raw),x]:F.amount.raw<0?[N,l(x-F.amount.raw)]:[N,x]:[N,x],[0,0]);return{date:y.month,income:g,outcome:v}}).sort((y,g)=>{const v=new Date(y.date),N=new Date(g.date);return v.getTime()-N.getTime()}).map(y=>{const g=new Date(y.date),v=g.toLocaleString("default",{month:"long"}),N=g.getFullYear();return{date:v+" "+N,income:y.income,outcome:y.outcome}})},[a]);if(r)return m.jsx("div",{className:"mt-40",children:m.jsx(Mi,{})});const d=s.map(f=>f.income).reduce((f,p)=>l(f+p),0),c=s.map(f=>f.outcome).reduce((f,p)=>l(f+p),0),u=l(d-c);return r?m.jsx(Mi,{}):m.jsxs(m.Fragment,{children:[m.jsxs("h1",{className:"text-2xl mb-5 font-medium",children:["Data from ",t.fromDate," to ",t.toDate," - Currency: USD"]}),m.jsx(lAe,{items:[{title:"Income",number:d.toLocaleString()},{title:"Outcome",number:c.toLocaleString()},{title:"Balance for selected period",number:u.toLocaleString()}]}),m.jsxs(r1,{children:[m.jsx(o1,{children:m.jsx(l1,{children:"Income and Outcome"})}),m.jsx(s1,{children:m.jsx(aAe,{type:"bar",datasetsTitle:["Income","Outcome"],data:s})})]})]})},dAe=[{label:"All Charges",to:"/all-charges"},{label:"Documents",to:"/documents"},{label:"Businesses",to:"/businesses"},{label:"Business Transactions",to:"/business-transactions"},{label:"Trial Balance Report",to:"/reports/trial-balance"},{label:"VAT Monthly Report",to:"/reports/vat-monthly"},{label:"Charts",to:"/charts"},{label:"Tags",to:"/tags"},{label:"Salaries",to:"/salaries"}],cAe=()=>m.jsx("header",{className:"bg-gray-200",children:m.jsxs("div",{className:"flex flex-wrap p-5 flex-col md:flex-row items-center",children:[m.jsxs(j5,{to:"/",className:"flex font-medium items-center text-gray-900 md:mb-0",children:[m.jsx(v7,{name:"logo"}),m.jsx("span",{className:"ml-3 text-xl",children:"Accounter"})]}),m.jsxs("nav",{className:"ml-5 flex justify-center gap-10",children:[dAe.map(e=>m.jsx(uAe,{to:e.to,children:e.label},e.label)),m.jsxs("div",{className:"flex flex-row gap-2",children:[m.jsx($ye,{}),m.jsx(sye,{}),m.jsx(jye,{})]})]})]})});function uAe({to:e,children:n,...t}){const i=xw(e),a=wG({path:i.pathname});return m.jsx(j5,{className:a?"rounded-md p-2 bg-gray-300":"hover:rounded-md p-2 hover:bg-gray-300",to:e,...t,children:n})}const mAe=()=>{const[{data:e,fetching:n}]=Be({query:Vke}),[t,i]=S.useState(null),{setFiltersContext:a}=S.useContext(dr);return a(null),n?m.jsx(Mi,{}):m.jsxs(m.Fragment,{children:[t&&m.jsx(ol,{modalSize:"45%",content:m.jsx(hc,{src:t}),opened:!!t,onClose:()=>i(null)}),m.jsx(mg,{stickyHeader:!0,items:(e==null?void 0:e.documents)??[],columns:[{title:"Type",value:r=>r.__typename},{title:"Image",value:r=>{var o;return r.image?m.jsx("button",{onClick:()=>i(r.image?r.image.toString():null),children:m.jsx("img",{alt:"missing img",src:(o=r.image)==null?void 0:o.toString(),height:80,width:80})}):"No image"}},{title:"File",value:r=>{var o;return r.file&&m.jsx(gS,{target:"_blank",rel:"noreferrer",herf:(o=r.file)==null?void 0:o.toString(),title:"Open Link"})}},{title:"Date",value:r=>"date"in r&&r.date?en(new Date(r.date),"dd/MM/yy"):null},{title:"Serial Number",value:r=>"serialNumber"in r?r.serialNumber:null},{title:"VAT",value:r=>{var o;return"vat"in r?(o=r.vat)==null?void 0:o.formatted:null},style:{whiteSpace:"nowrap"}},{title:"Amount",value:r=>{var o,l,s;return((s=(l=(o=r.charge)==null?void 0:o.transactions)==null?void 0:l[0])==null?void 0:s.amount.formatted)??null},style:{whiteSpace:"nowrap"}},{title:"Creditor",value:r=>{var o;return((o=r.creditor)==null?void 0:o.name)??null}},{title:"Debtor",value:r=>{var o;return((o=r.debtor)==null?void 0:o.name)??null}},{title:"Related Transaction",value:r=>{var o,l,s,d;return(s=(l=(o=r.charge)==null?void 0:o.transactions)==null?void 0:l[0])!=null&&s.id?m.jsx(mg,{items:((d=r.charge)==null?void 0:d.transactions)??[],columns:[{title:"Transaction Amount",value:c=>c==null?void 0:c.amount.formatted},{title:"Transaction Created At",value:c=>c!=null&&c.eventDate?en(new Date(c.eventDate),"dd/MM/yy"):null},{title:"Transaction Effective Date",value:c=>c!=null&&c.effectiveDate?en(new Date(c.effectiveDate),"dd/MM/yy"):null},{title:"Transaction Description",value:c=>c==null?void 0:c.sourceDescription}]}):"No Realted Transaction"},style:{whiteSpace:"nowrap"}}]})]})};function fAe({filter:e,setFilter:n,closeModal:t}){const[i,a]=S.useState(!1),{control:r,handleSubmit:o}=ki({defaultValues:{...e}}),[{data:l,fetching:s,error:d}]=Be({query:Hr}),{userContext:c}=S.useContext(Ur);S.useEffect(()=>{d&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[d]);const u=S.useMemo(()=>{var h;return((h=l==null?void 0:l.allFinancialEntities)==null?void 0:h.nodes.map(k=>({value:k.id,label:k.name})).sort((k,y)=>k.label>y.label?1:-1))??[]},[l]),f=h=>{var k,y;h.isShowZeroedAccounts=i??!1,((k=h.fromDate)==null?void 0:k.trim())===""&&(h.fromDate=void 0),((y=h.toDate)==null?void 0:y.trim())===""&&(h.toDate=void 0),n(h),t()};function p(){n({}),t()}return m.jsxs(m.Fragment,{children:[s?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:o(f),children:[m.jsx(ue,{name:"ownerIds",control:r,defaultValue:void 0,render:({field:h,fieldState:k})=>{var y;return m.jsx($r,{...h,data:u,value:h.value??[c==null?void 0:c.ownerId],disabled:s,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(y=k.error)==null?void 0:y.message})}}),m.jsx(ue,{name:"businessIDs",control:r,defaultValue:void 0,render:({field:h,fieldState:k})=>{var y;return m.jsx($r,{...h,data:u,value:h.value??void 0,disabled:s,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(y=k.error)==null?void 0:y.message})}}),m.jsx(ue,{name:"fromDate",control:r,defaultValue:e.fromDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:k})=>{var y;return m.jsx(Ln,{...h,value:!h.value||h.value==="Missing"?"":h.value,error:(y=k.error)==null?void 0:y.message,label:"From Date"})}}),m.jsx(ue,{name:"toDate",control:r,defaultValue:e.toDate,rules:{pattern:{value:Ia,message:"Date must be im format yyyy-mm-dd"}},render:({field:h,fieldState:k})=>{var y;return m.jsx(Ln,{...h,value:!h.value||h.value==="Missing"?"":h.value,error:(y=k.error)==null?void 0:y.message,label:"To Date"})}}),m.jsx(Di,{defaultChecked:e.isShowZeroedAccounts??!1,onChange:h=>a(h.currentTarget.checked),color:"gray",onLabel:m.jsx("p",{children:"show"}),offLabel:m.jsx("p",{children:"remove"}),label:"Show zeroed accounts",labelPosition:"left"}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:p,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})]})}function pAe({filter:e,setFilter:n}){const[t,i]=S.useState(!1),[a,r]=S.useState(!Fa(e)),{get:o,set:l}=kt();function s(c){return Object.entries(c??{}).filter(([f,p])=>p!==void 0&&Array.isArray(p)&&p.length>0).length>0}function d(c){Fc(c,e)||(n(c),r(s(c)))}return S.useEffect(()=>{const c=Fa(e)?null:encodeURIComponent(JSON.stringify(e)),u=o("trialBalanceReportFilters");c!==u&&l("trialBalanceReportFilters",c)},[e,o,l]),m.jsxs(m.Fragment,{children:[m.jsx(ol,{opened:t,onClose:()=>i(!1),content:m.jsx(fAe,{filter:e,setFilter:d,closeModal:()=>i(!1)})}),m.jsx(Kn,{inline:!0,size:16,disabled:!a,children:m.jsx(Pe,{variant:"default",onClick:()=>i(!0),size:30,children:m.jsx(rc,{size:20})})})]})}const hAe=({record:e,sortCodeId:n,filter:t,isAllOpened:i})=>{var d,c,u,f;const[a,r]=S.useState(i),o=((d=e==null?void 0:e.total)==null?void 0:d.raw)??0,l=((c=e==null?void 0:e.debit)==null?void 0:c.raw)??0,s=((u=e==null?void 0:e.credit)==null?void 0:u.raw)??0;return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{children:[m.jsx("td",{children:n}),m.jsx("td",{children:e.business.id}),m.jsx("td",{children:e.business.name??void 0}),m.jsxs("td",{children:[o<-.001?Tn(-1*(e.total.raw??0)):void 0,m.jsx("br",{}),l?`(${Tn(l)})`:void 0]}),m.jsxs("td",{children:[o>.001?Tn(e.total.raw??0):void 0,m.jsx("br",{}),l?`(${Tn(s)})`:void 0]}),m.jsx("td",{}),m.jsx("td",{children:m.jsx(tt,{label:"Detailed records",children:m.jsx(Pe,{variant:"default",onClick:()=>r(p=>!p),size:30,children:a||i?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})})})]},e.business.id),(a||i)&&m.jsx("tr",{children:m.jsx("td",{colSpan:7,children:m.jsx(J9,{businessID:(f=e.business)==null?void 0:f.id,filter:t})})})]})},vAe=({sortCode:e,filter:n,isAllOpened:t})=>e.records.length>0?m.jsxs(m.Fragment,{children:[m.jsx("tr",{children:m.jsx("td",{colSpan:7,children:m.jsx("span",{className:"font-bold",children:e.name})})}),e.records.sort((i,a)=>i.business.name.localeCompare(a.business.name)).map(i=>m.jsx(hAe,{record:i,sortCodeId:e.id,filter:n,isAllOpened:t},i.business.id)),m.jsx("tr",{className:"bg-gray-100",children:e.records.length>1?m.jsxs(m.Fragment,{children:[m.jsx("td",{colSpan:2,children:"Group total:"}),m.jsx("td",{colSpan:1,children:e.id}),m.jsxs("td",{colSpan:1,children:[Tn(e.debit),m.jsx("br",{}),"(",Tn(e.totalDebit),")"]}),m.jsxs("td",{colSpan:1,children:[Tn(e.credit),m.jsx("br",{}),"(",Tn(e.totalCredit),")"]}),m.jsx("td",{colSpan:1,children:Tn(e.sum)})]}):void 0})]}):null,kAe=({group:e,data:n,filter:t,isAllOpened:i})=>m.jsxs(m.Fragment,{children:[Object.values(n.sortCodes).sort((a,r)=>a.id-r.id).map((a,r)=>m.jsx(vAe,{sortCode:a,filter:t,isAllOpened:i},`${a.id} ${r}`)),m.jsxs("tr",{className:"bg-gray-100",children:[m.jsx("td",{colSpan:2,children:"Group total:"}),m.jsx("td",{colSpan:1,children:e.replaceAll("0","*")}),m.jsxs("td",{colSpan:1,children:["(",Tn(n.totalDebit),")"]}),m.jsxs("td",{colSpan:1,children:["(",Tn(n.totalCredit),")"]}),m.jsx("td",{colSpan:1,children:Tn(n.sum)})]},"group"+e)]});function gAe(e){return Math.floor(e/100)*100}const yAe=({businessTransactionsSum:e,filter:n,isAllOpened:t})=>{const i=S.useMemo(()=>{var r,o,l;const a={};for(const s of e){(r=s.business).sortCode??(r.sortCode={id:-999,name:"Misc"});const d=!s.total.raw||s.total.raw<.001&&s.total.raw>-.001;if(!n.isShowZeroedAccounts&&d)continue;const c=gAe(s.business.sortCode.id);a[c]??(a[c]={sortCodes:{},totalCredit:0,totalDebit:0,credit:0,debit:0,sum:0});const u=a[c];(o=u.sortCodes)[l=s.business.sortCode.id]??(o[l]={...s.business.sortCode,totalCredit:0,totalDebit:0,records:[],credit:0,debit:0,sum:0});const f=u.sortCodes[s.business.sortCode.id];f.totalCredit+=s.credit.raw,f.totalDebit+=s.debit.raw,f.sum+=s.total.raw,u.totalCredit+=s.credit.raw,u.totalDebit+=s.debit.raw,u.sum+=s.total.raw,s.total.raw>0?(f.credit+=s.total.raw,u.credit+=s.total.raw):(f.debit+=s.total.raw,u.debit+=s.total.raw),f.records.push(s)}return a},[e,n.isShowZeroedAccounts]);return m.jsxs(al,{highlightOnHover:!0,children:[m.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:m.jsxs("tr",{className:"bg-gray-300",children:[m.jsx("th",{children:"Sort Code"}),m.jsx("th",{children:"Account"}),m.jsx("th",{children:"Account Name"}),m.jsx("th",{children:"Debit"}),m.jsx("th",{children:"Credit"}),m.jsx("th",{children:"Total"})]})}),m.jsxs("tbody",{children:[Object.entries(i).map(([a,r])=>m.jsx(kAe,{data:r,group:a,filter:n,isAllOpened:t},a)),m.jsxs("tr",{className:"bg-gray-100",children:[m.jsx("td",{colSpan:2,children:"Report total:"}),m.jsx("td",{}),m.jsxs("td",{children:["(",Tn(Object.values(i).reduce((a,r)=>a+r.totalDebit,0)),")"]}),m.jsxs("td",{children:["(",Tn(Object.values(i).reduce((a,r)=>a+r.totalCredit,0)),")"]}),m.jsx("td",{colSpan:1,children:Tn(Object.values(i).reduce((a,r)=>a+r.sum,0))})]})]})]})},SAe=()=>{const[e,n]=S.useState(!1),{get:t}=kt(),{setFiltersContext:i}=S.useContext(dr),[a,r]=S.useState(t("trialBalanceReportFilters")?JSON.parse(decodeURIComponent(t("trialBalanceReportFilters"))):{}),[{data:o,fetching:l}]=Be({query:Wke,variables:{filters:{fromDate:a==null?void 0:a.fromDate,toDate:a==null?void 0:a.toDate,ownerIds:a==null?void 0:a.ownerIds,businessIDs:a==null?void 0:a.businessIDs}}});S.useEffect(()=>{i(m.jsxs("div",{className:"flex flex-row gap-2",children:[m.jsx(tt,{label:"Expand all accounts",children:m.jsx(Pe,{variant:"default",onClick:()=>n(d=>!d),size:30,children:e?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})})}),m.jsx(pAe,{filter:a,setFilter:r})]}))},[a,e,i]);const s=S.useMemo(()=>(o==null?void 0:o.businessTransactionsSumFromLedgerRecords.__typename)==="CommonError"?[]:(o==null?void 0:o.businessTransactionsSumFromLedgerRecords.businessTransactionsSum)??[],[o==null?void 0:o.businessTransactionsSumFromLedgerRecords]);return l?m.jsx(Mi,{}):m.jsx(yAe,{businessTransactionsSum:s,filter:a,isAllOpened:e})},NAe=({data:e,setEditChargeId:n,setInsertDocument:t,setUploadDocument:i,setMatchDocuments:a,toggleMergeCharge:r,mergeSelectedCharges:o})=>{const l=Se(lke,e),[s,d]=S.useState(!0);return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-lg font-semibold whitespace-nowrap flex flex-row gap-4",children:[m.jsx(Pe,{variant:"default",onClick:()=>d(c=>!c),size:30,children:s?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})}),"Business Trips"]}),s&&l&&m.jsx(CS,{setEditChargeId:n,setInsertDocument:t,setMatchDocuments:a,setUploadDocument:i,data:l.businessTrips,isAllOpened:!1,toggleMergeCharge:r,mergeSelectedCharges:o})]})};function fH({data:e}){const{chargeId:n,chargeAccountantReviewed:t}=Se(ske,e),[i,a]=S.useState(t??!1),{toggleChargeAccountantApproval:r}=W7();function o(l){a(l),r({chargeId:n,approved:l})}return m.jsx("td",{children:m.jsx(Di,{color:"green",checked:i,onChange:l=>o(l.currentTarget.checked)})})}const bAe=({data:e,toggleMergeCharge:n,mergeSelectedCharges:t,cumulativeVat:i,cumulativeAmount:a})=>{var s,d,c,u,f,p;const[r,o]=S.useState(!1),l=Se(dke,e);return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{className:"bg-gray-100",children:[m.jsxs("td",{className:"flex flex-col gap-1",children:[(s=l.business)==null?void 0:s.name,l.vatNumber&&m.jsx("span",{style:{fontSize:"10px",color:"darkGray"},children:l.vatNumber})]}),m.jsx("td",{children:l.image&&m.jsx("a",{href:l.image,target:"_blank",rel:"noreferrer",children:m.jsx("img",{alt:"missing img",src:l.image,height:80,width:80})})}),m.jsx("td",{children:l.documentSerial}),m.jsx("td",{children:l.documentDate}),m.jsx("td",{children:l.chargeDate}),m.jsx("td",{className:"whitespace-nowrap",children:l.amount.formatted}),m.jsx("td",{className:"whitespace-nowrap",children:(d=l.localAmount)==null?void 0:d.formatted}),m.jsx("td",{className:"whitespace-nowrap",children:(c=l.vat)==null?void 0:c.formatted}),m.jsx("td",{className:"whitespace-nowrap",children:(u=l.localVatAfterDeduction)==null?void 0:u.formatted}),m.jsx("td",{className:"whitespace-nowrap",children:(f=l.vatAfterDeduction)==null?void 0:f.formatted}),m.jsx("td",{className:"whitespace-nowrap",children:(p=l.roundedLocalVatAfterDeduction)==null?void 0:p.formatted}),m.jsxs("td",{className:"whitespace-nowrap",children:["₪ ",Tn(i,0)]}),"#"," ",m.jsxs("td",{className:"whitespace-nowrap",children:["₪ ",Tn(a,0),"#"," "]}),m.jsx(fH,{data:l}),m.jsx("td",{children:m.jsx("div",{className:"flex flex-col gap-2",children:m.jsx(x_,{toggleExpansion:o,isExpanded:r})})}),m.jsx("td",{children:m.jsx(F_,{toggleMergeSelected:()=>n(l.chargeId),mergeSelected:t.includes(l.chargeId)})})]}),r&&m.jsx("tr",{children:m.jsx("td",{colSpan:17,children:m.jsx(vs,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:m.jsx(z_,{chargeID:l.chargeId})})})})]})},xAe=({data:e,toggleMergeCharge:n,mergeSelectedCharges:t})=>{const{expenses:i}=Se(cke,e)??{expenses:[]},[a,r]=S.useState(!0);let o=0,l=0;return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-lg font-semibold whitespace-nowrap flex flex-row gap-4",children:[m.jsx(Pe,{variant:"default",onClick:()=>r(s=>!s),size:30,children:a?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})}),"Expenses"]}),a&&m.jsxs(al,{highlightOnHover:!0,children:[m.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:m.jsxs("tr",{className:"bg-gray-300",children:[m.jsx("th",{children:"Business"}),m.jsx("th",{children:"Invoice"}),m.jsx("th",{children:"Invoice Serial#"}),m.jsx("th",{children:"Invoice Date"}),m.jsx("th",{children:"Transaction Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Amount ₪"}),m.jsx("th",{children:"VAT"}),m.jsx("th",{children:"VAT ₪"}),m.jsx("th",{children:"Actual VAT"}),m.jsx("th",{children:"Rounded VAT"}),m.jsx("th",{children:"Cumulative VAT"}),m.jsx("th",{children:"Amount without VAT ₪"}),m.jsx("th",{children:"Cumulative Amount without VAT ₪"}),m.jsx("th",{children:"Accountant Approval"}),m.jsx("th",{colSpan:2,children:"Edit"})]})}),m.jsx("tbody",{children:i.map((s,d)=>{var f,p;o+=((f=s.taxReducedLocalAmount)==null?void 0:f.raw)??0;const c=o;l+=((p=s.roundedLocalVatAfterDeduction)==null?void 0:p.raw)??0;const u=l;return m.jsx(bAe,{data:s,toggleMergeCharge:n,mergeSelectedCharges:t,cumulativeVat:u,cumulativeAmount:c},d)})})]})]})},FAe=({data:e,toggleMergeCharge:n,mergeSelectedCharges:t,cumulativeAmount:i})=>{var l,s;const[a,r]=S.useState(!1),o=Se(uke,e);return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{className:"bg-gray-100",children:[m.jsxs("td",{className:"flex flex-col gap-1",children:[(l=o.business)==null?void 0:l.name,o.vatNumber&&m.jsx("span",{style:{fontSize:"10px",color:"darkGray"},children:o.vatNumber})]}),m.jsx("td",{children:o.image&&m.jsx("a",{href:o.image,target:"_blank",rel:"noreferrer",children:m.jsx("img",{alt:"missing img",src:o.image,height:80,width:80})})}),m.jsx("td",{children:o.documentSerial}),m.jsx("td",{children:o.documentDate}),m.jsx("td",{children:o.chargeDate}),m.jsx("td",{children:o.amount.formatted}),m.jsx("td",{children:(s=o.taxReducedLocalAmount)==null?void 0:s.formatted}),m.jsx("td",{children:"₪ "+Tn(i,0)}),m.jsx(fH,{data:o}),m.jsx("td",{children:m.jsx("div",{className:"flex flex-col gap-2",children:m.jsx(x_,{toggleExpansion:r,isExpanded:a})})}),m.jsx("td",{children:m.jsx(F_,{toggleMergeSelected:()=>n(o.chargeId),mergeSelected:t.includes(o.chargeId)})})]}),a&&m.jsx("tr",{children:m.jsx("td",{colSpan:11,children:m.jsx(vs,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:m.jsx(z_,{chargeID:o.chargeId})})})})]})},wAe=({data:e,toggleMergeCharge:n,mergeSelectedCharges:t})=>{const{income:i}=Se(mke,e)??{income:[]},[a,r]=S.useState(!0);let o=0;return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-lg font-semibold whitespace-nowrap flex flex-row gap-4",children:[m.jsx(Pe,{variant:"default",onClick:()=>r(l=>!l),size:30,children:a?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})}),"Income"]}),a&&m.jsxs(al,{highlightOnHover:!0,children:[m.jsx("thead",{style:{position:"sticky",top:0,zIndex:20},children:m.jsxs("tr",{className:"bg-gray-300",children:[m.jsx("th",{children:"Business"}),m.jsx("th",{children:"Invoice"}),m.jsx("th",{children:"Invoice Serial#"}),m.jsx("th",{children:"Invoice Date"}),m.jsx("th",{children:"Transaction Date"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Amount ₪"}),m.jsx("th",{children:"Cumulative Amount ₪"}),m.jsx("th",{children:"Accountant Approval"}),m.jsx("th",{colSpan:2,children:"Edit"})]})}),m.jsx("tbody",{children:i.map((l,s)=>{var c;o+=((c=l.taxReducedLocalAmount)==null?void 0:c.raw)??0;const d=o;return m.jsx(FAe,{data:l,toggleMergeCharge:n,mergeSelectedCharges:t,cumulativeAmount:d},s)})})]})]})},_Ae=({data:e,setEditChargeId:n,setInsertDocument:t,setUploadDocument:i,setMatchDocuments:a,toggleMergeCharge:r,mergeSelectedCharges:o})=>{const l=Se(fke,e),[s,d]=S.useState(!0);return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-lg font-semibold whitespace-nowrap flex flex-row gap-4",children:[m.jsx(Pe,{variant:"default",onClick:()=>d(c=>!c),size:30,children:s?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})}),"Misc Charges (which are not on the above tables)"]}),s&&l&&m.jsx(CS,{setEditChargeId:n,setInsertDocument:t,setMatchDocuments:a,setUploadDocument:i,data:l.differentMonthDoc,isAllOpened:!1,toggleMergeCharge:r,mergeSelectedCharges:o})]})},CAe=({data:e,setEditChargeId:n,setInsertDocument:t,setUploadDocument:i,setMatchDocuments:a,toggleMergeCharge:r,mergeSelectedCharges:o})=>{const l=Se(pke,e),[s,d]=S.useState(!0);return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-lg font-semibold whitespace-nowrap flex flex-row gap-4",children:[m.jsx(Pe,{variant:"default",onClick:()=>d(c=>!c),size:30,children:s?m.jsx(ja,{size:20}):m.jsx(Ta,{size:20})}),"Missing Info"]}),s&&l&&m.jsx(CS,{setEditChargeId:n,setInsertDocument:t,setMatchDocuments:a,setUploadDocument:i,data:l.missingInfo,isAllOpened:!1,toggleMergeCharge:r,mergeSelectedCharges:o})]})},PAe=({filter:{fromDate:e,toDate:n,financialEntityId:t},isLoading:i})=>{const[{data:a,fetching:r},o]=Be({query:tV(Uke),pause:!0,variables:{fromDate:e,toDate:n,financialEntityId:t}});return S.useEffect(()=>{if(a){const l=new Blob([a.pcnFile.reportContent],{type:"text/plain"}),s=window.URL.createObjectURL(l),d=document.createElement("a");d.href=s,d.download=a.pcnFile.fileName,d.click()}},[a]),m.jsx(tt,{label:"Generate and Download PCN874 File",children:m.jsx(Pe,{disabled:r||i,variant:"default",onClick:o,size:30,children:m.jsx(Aq,{size:20})})})};function OAe({filter:e,setFilter:n,closeModal:t}){const{control:i,handleSubmit:a,setValue:r}=ki({defaultValues:{...e}}),[{data:o,fetching:l,error:s}]=Be({query:Hr});S.useEffect(()=>{s&&re({title:"Error!",message:"Oh no!, we have an error fetching financial entities! 🤥"})},[s]);const d=f=>{n(f),t()};function c(){n(),t()}function u(f){const p=new Date(f.getFullYear(),f.getMonth(),1),h=new Date(f.getFullYear(),f.getMonth()+1,0);r("fromDate",en(p,"yyyy-MM-dd")),r("toDate",en(h,"yyyy-MM-dd"))}return m.jsxs(m.Fragment,{children:[l?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:a(d),children:[m.jsx(ue,{name:"financialEntityId",control:i,defaultValue:void 0,render:({field:f,fieldState:p})=>{var h,k;return m.jsx(Gn,{...f,data:((h=o==null?void 0:o.allFinancialEntities)==null?void 0:h.nodes.map(y=>({value:y.id,label:y.name})))??[],value:f.value,disabled:l,label:"Financial Entities",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(k=p.error)==null?void 0:k.message})}}),m.jsx(ue,{name:"chargesType",control:i,defaultValue:e.chargesType,render:({field:f,fieldState:p})=>{var h;return m.jsx(Gn,{...f,data:Z9,value:f.value??zo.All,label:"Charge Type",placeholder:"Filter income/expense",maxDropdownHeight:160,error:(h=p.error)==null?void 0:h.message})}}),m.jsx(_S,{defaultValue:e!=null&&e.fromDate?new Date(e.fromDate):new Date,defaultDate:e!=null&&e.fromDate?new Date(e.fromDate):new Date,onChange:u}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:c,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})]})}function DAe({filter:e,setFilter:n}){const[t,i]=S.useState(!1),{get:a,set:r}=kt(),{userContext:o}=S.useContext(Ur);function l(s){s||(s={financialEntityId:o==null?void 0:o.ownerId,fromDate:en(new Date,"yyyy-MM-01"),toDate:en(eV(new Date),"yyyy-MM-dd")}),Fc(s,e)||n(s)}return S.useEffect(()=>{const s=Fa(e??{})?null:encodeURIComponent(JSON.stringify(e)),d=a("vatMonthlyReportFilters");s!==d&&r("vatMonthlyReportFilters",s)},[e,a,r]),m.jsxs(m.Fragment,{children:[m.jsx(ol,{opened:t,onClose:()=>i(!1),content:m.jsx(OAe,{filter:e,setFilter:l,closeModal:()=>i(!1)})}),m.jsx(Pe,{variant:"default",onClick:()=>i(!0),size:30,children:m.jsx(rc,{size:20})})]})}const EAe=()=>{const{get:e}=kt(),{setFiltersContext:n}=S.useContext(dr),{userContext:t}=S.useContext(Ur),[i,a]=S.useState(e("vatMonthlyReportFilters")?JSON.parse(decodeURIComponent(e("vatMonthlyReportFilters"))):{financialEntityId:t==null?void 0:t.ownerId,fromDate:en(new Date,"yyyy-MM-01"),toDate:en(eV(new Date),"yyyy-MM-dd")}),[r,o]=S.useState([]),[l,s]=S.useState(void 0),[d,c]=S.useState(void 0),[u,f]=S.useState(void 0),[p,h]=S.useState(void 0),[{data:k,fetching:y}]=Be({query:tV(Hke),variables:{filters:i}}),g=S.useCallback(N=>{r.includes(N)?o(r.filter(x=>x!==N)):o([...r,N])},[r]);function v(){o([])}return S.useEffect(()=>{n(m.jsxs("div",{className:"flex flex-row gap-2",children:[m.jsx(PAe,{filter:i,isLoading:y}),m.jsx(DAe,{filter:{...i},setFilter:a}),m.jsx(A7,{chargeIDs:r,resetMerge:v})]}))},[k,i,y,n,r]),y?m.jsx(Mi,{}):m.jsxs("div",{className:"flex flex-col gap-4",children:[i.chargesType!==zo.Expense&&m.jsx(wAe,{data:k==null?void 0:k.vatReport,toggleMergeCharge:g,mergeSelectedCharges:r}),i.chargesType!==zo.Income&&m.jsx(xAe,{data:k==null?void 0:k.vatReport,toggleMergeCharge:g,mergeSelectedCharges:r}),m.jsx(CAe,{data:k==null?void 0:k.vatReport,setEditChargeId:h,setInsertDocument:s,setUploadDocument:f,setMatchDocuments:c,toggleMergeCharge:g,mergeSelectedCharges:r}),m.jsx(NAe,{data:k==null?void 0:k.vatReport,setEditChargeId:h,setInsertDocument:s,setUploadDocument:f,setMatchDocuments:c,toggleMergeCharge:g,mergeSelectedCharges:r}),m.jsx(_Ae,{data:k==null?void 0:k.vatReport,setEditChargeId:h,setInsertDocument:s,setUploadDocument:f,setMatchDocuments:c,toggleMergeCharge:g,mergeSelectedCharges:r}),m.jsx(R7,{chargeId:p,onDone:()=>h(void 0)}),l&&m.jsx(L7,{insertDocument:l,setInsertDocument:s}),u&&m.jsx(V7,{uploadDocument:u,setUploadDocument:f}),d&&m.jsx(B7,{chargeId:d.id,ownerId:d.ownerId,setMatchDocuments:()=>c(void 0)})]})};function NF(){const e=new Date,n=en(e,"yyyy-MM-dd"),t=en(QB(e),"yyyy-MM-dd");return{fromDate:n,toDate:t}}function $Ae({filter:e,setFilter:n,closeModal:t}){const{control:i,handleSubmit:a,setValue:r}=ki({defaultValues:{...e}}),[o,l]=S.useState([]),{userContext:s}=S.useContext(Ur),[{data:d,fetching:c,error:u}]=Be({query:bB,variables:{employerId:s==null?void 0:s.ownerId}});S.useEffect(()=>{u&&re({title:"Error!",message:"Oh no!, we have an error fetching employees! 🤥"})},[u]);const f=y=>{var g;((g=y.employeeIDs)==null?void 0:g.length)===0&&delete y.employeeIDs,n(y),t()};function p(){n({...NF()}),t()}S.useEffect(()=>{d!=null&&d.employeesByEmployerId.length&&l(d.employeesByEmployerId.filter(y=>!y.name.toLocaleLowerCase().includes("batched")).map(y=>({value:y.id,label:y.name})).sort((y,g)=>y.label>g.label?1:-1))},[d,l]);function h([y,g]){if(g){const v=new Date(g.getFullYear(),g.getMonth()+1,0);r("toDate",en(v,"yyyy-MM-dd"))}if(y){const v=new Date(y.getFullYear(),y.getMonth(),1);r("fromDate",en(v,"yyyy-MM-dd"))}}const k=NF();return m.jsxs(m.Fragment,{children:[c?m.jsx("div",{children:"Loading..."}):m.jsx("div",{}),m.jsxs("form",{onSubmit:a(f),children:[m.jsx(_S,{type:"range",numberOfColumns:2,defaultValue:[new Date((e==null?void 0:e.fromDate)??k.fromDate),new Date((e==null?void 0:e.toDate)??k.toDate)],defaultDate:new Date((e==null?void 0:e.fromDate)??k.fromDate),onChange:h}),m.jsx(ue,{name:"employeeIDs",control:i,defaultValue:e.employeeIDs,render:({field:y,fieldState:g})=>{var v;return m.jsx($r,{...y,data:o,value:y.value??[],disabled:c,label:"Employees",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:(v=g.error)==null?void 0:v.message})}}),m.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[m.jsx("button",{type:"submit",disabled:c,className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-none hover:bg-indigo-600 rounded text-lg",children:"Filter"}),m.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-none hover:bg-orange-600 rounded text-lg",onClick:p,children:"Clear"}),m.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-none hover:bg-rose-600 rounded text-lg",onClick:t,children:"Cancel"})]})]})]})}function IAe({filter:e,setFilter:n}){const[t,i]=S.useState(!1),{get:a,set:r}=kt();S.useEffect(()=>{const l=Fa(e)?null:encodeURIComponent(JSON.stringify(e)),s=a("salariesFilters");l!==s&&r("salariesFilters",l)},[e,a,r]);const o=S.useCallback(l=>{Fc(l,e)||n(l)},[e,n]);return m.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[m.jsx(ol,{opened:t,onClose:()=>i(!1),content:m.jsx($Ae,{filter:e,setFilter:o,closeModal:()=>i(!1)}),modalSize:"xl"}),m.jsx(Pe,{variant:"default",onClick:()=>i(!0),size:30,children:m.jsx(rc,{size:20})})]})}const jAe=({month:e,setInsertSalaryRecord:n})=>{const t=en(new Date(e),"MMMM yyyy");return m.jsx("tr",{tabIndex:0,className:"h-16 rounded",children:m.jsx("td",{colSpan:100,children:m.jsxs("div",{className:"flex justify-between pl-5",children:[m.jsx("p",{className:"text-lg font-bold text-gray-800",children:t}),m.jsx("div",{className:"flex items-center",children:m.jsx("div",{className:"flex flex-col",children:m.jsx(qB,{onClick:n})})})]})})})},TAe=({data:e})=>{const{employee:n,month:t}=Se(hke,e),i=en(new Date(t),"MMMM yyyy");return m.jsx("td",{className:"",children:m.jsx("div",{className:"flex items-center pl-5",children:m.jsxs("div",{className:"flex flex-col",children:[m.jsx("p",{className:"text-base font-bold text-gray-800",children:n==null?void 0:n.name}),m.jsx("p",{className:"text-base font-medium text-gray-800",children:i})]})})})},AAe=({data:e})=>{const{pensionEmployeeAmount:n,pensionEmployeePercentage:t,pensionEmployerAmount:i,pensionEmployerPercentage:a,compensationsAmount:r,compensationsPercentage:o,pensionFund:l,trainingFund:s,trainingFundEmployeeAmount:d,trainingFundEmployeePercentage:c,trainingFundEmployerAmount:u,trainingFundEmployerPercentage:f}=Se(kke,e);return m.jsx("td",{className:"pl-5",children:m.jsx("div",{className:"flex items-center",children:m.jsxs("div",{className:"flex flex-col",children:[m.jsx("p",{className:"text-md font-bold text-gray-800",children:"Pension Fund"}),m.jsx("p",{className:"text-md font-medium text-gray-800",children:l==null?void 0:l.name}),!!(n!=null&&n.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employee Part:"}),m.jsxs("p",{className:"text-sm leading-none text-gray-600 ml-2",children:[n==null?void 0:n.formatted,t&&` (${t}%)`]})]}),!!(i!=null&&i.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employer Part:"}),m.jsxs("p",{className:"text-sm leading-none text-gray-600 ml-2",children:[i==null?void 0:i.formatted,a&&` (${a}%)`]})]}),!!(r!=null&&r.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Compensations Amount:"}),m.jsxs("p",{className:"text-sm leading-none text-gray-600 ml-2",children:[r==null?void 0:r.formatted,o&&` (${o}%)`]})]}),m.jsx("p",{className:"text-md font-bold text-gray-800 mt-2",children:"Training Fund"}),m.jsx("p",{className:"text-md font-medium text-gray-800",children:s==null?void 0:s.name}),!!(d!=null&&d.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employee Part:"}),m.jsxs("p",{className:"text-sm leading-none text-gray-600 ml-2",children:[d==null?void 0:d.formatted,c&&` (${c}%)`]})]}),!!(u!=null&&u.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employer Part:"}),m.jsxs("p",{className:"text-sm leading-none text-gray-600 ml-2",children:[u==null?void 0:u.formatted,f&&` (${f}%)`]})]})]})})})},RAe=({data:e})=>{const{healthInsuranceAmount:n,socialSecurityEmployeeAmount:t,socialSecurityEmployerAmount:i,incomeTaxAmount:a,notionalExpense:r}=Se(gke,e),o=!!t||!!i;return m.jsx("td",{className:"pl-5",children:m.jsx("div",{className:"flex items-center pl-5",children:m.jsxs("div",{className:"flex flex-col",children:[o&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-md font-bold text-gray-800",children:"Social Security"}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employee Part:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:t==null?void 0:t.formatted})]}),m.jsx("p",{className:"text-md font-bold text-gray-800 mt-2",children:"Pension Fund"}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Employer Part:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:i==null?void 0:i.formatted})]})]}),!!(n!=null&&n.raw)&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-md font-bold text-gray-800 mt-2",children:"Health Insurance"}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Amount:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:n==null?void 0:n.formatted})]})]}),(!!(a!=null&&a.raw)||!!(r!=null&&r.raw))&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-md font-bold text-gray-800 mt-2",children:"Taxes"}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Income Tax:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:a==null?void 0:a.formatted})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Notional Expense:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:r==null?void 0:r.formatted})]})]})]})})})},MAe=({data:e})=>{const{baseAmount:n,directAmount:t,globalAdditionalHoursAmount:i,bonus:a,gift:r,recovery:o,vacationTakeout:l}=Se(vke,e);return m.jsx("td",{className:"pl-24",children:m.jsx("div",{className:"flex items-center",children:m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Base Amount:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:n==null?void 0:n.formatted})]}),m.jsxs("div",{className:"flex justify-between mb-2",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Global Extra Hours:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:i==null?void 0:i.formatted})]}),!!(a!=null&&a.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Bonus:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:a==null?void 0:a.formatted})]}),!!(r!=null&&r.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Gift:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:r==null?void 0:r.formatted})]}),!!(o!=null&&o.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Recovery:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:o==null?void 0:o.formatted})]}),!!(l!=null&&l.raw)&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Vacation Takeout:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:l==null?void 0:l.formatted})]}),m.jsxs("div",{className:"flex justify-between mt-2",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Direct Amount:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:t==null?void 0:t.formatted})]})]})})})},LAe=({data:e})=>{const{vacationDays:n,workDays:t,sicknessDays:i}=Se(yke,e),{added:a,taken:r,balance:o}=n??{},{balance:l}=i??{},s=!!a||!!r||!!o;return m.jsx("td",{className:"pl-5",children:m.jsx("div",{className:"flex items-center",children:m.jsxs("div",{className:"flex flex-col",children:[!!t&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-md leading-none text-gray-800",children:"Work Days:"}),m.jsx("div",{className:"flex justify-between",children:m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:t})})]}),s&&m.jsxs("div",{className:"flex flex-col",children:[m.jsx("p",{className:"text-md leading-none text-gray-800 mt-2",children:"Vacation Days:"}),!!a&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Added:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:a})]}),!!r&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Taken:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:r})]}),!!o&&m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:"Balance:"}),m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:o})]})]}),!!l&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-md leading-none text-gray-800 mt-2",children:"Sickness Days:"}),m.jsx("div",{className:"flex justify-between",children:m.jsx("p",{className:"text-sm leading-none text-gray-600 ml-2",children:l})})]})]})})})},zAe=({setEditSalaryRecord:e,data:n})=>{const t=Se(Ske,n);return m.jsxs(m.Fragment,{children:[m.jsxs("tr",{tabIndex:0,className:"h-16 border border-gray-100 hover:bg-gray-100 rounded",children:[m.jsx(TAe,{data:t}),m.jsx(MAe,{data:t}),m.jsx(AAe,{data:t}),m.jsx(RAe,{data:t}),m.jsx(LAe,{data:t}),m.jsx("td",{className:"pl-2",children:m.jsx("div",{className:"flex items-center",children:m.jsx("div",{className:"flex flex-col",children:m.jsx(yS,{onClick:e})})})})]}),m.jsx("tr",{className:"h-3"})]})},BAe=({setEditSalaryRecord:e,setInsertSalaryRecord:n,data:t})=>{const i=(t==null?void 0:t.map(a=>Se(Nke,a)))??[];return m.jsxs(m.Fragment,{children:[m.jsx("tr",{className:"h-3"}),m.jsx(jAe,{month:i[0].month,setInsertSalaryRecord:n}),m.jsx("tr",{className:"h-3"}),i.map(a=>{var r;return m.jsx(zAe,{data:a,setEditSalaryRecord:()=>{var o;return e((o=a.employee)==null?void 0:o.id)}},`${a.month} ${(r=a.employee)==null?void 0:r.id}`)})]})},VAe=({setEditSalaryRecord:e,setInsertSalaryRecord:n,data:t})=>{const i=S.useMemo(()=>{const a=(t==null?void 0:t.map(o=>Se(bke,o)))??[],r=new Map;return a.map(o=>{const{month:l}=o,s=r.get(l)??[];r.set(l,[...s,o])}),r},[t]);return m.jsx("div",{className:"sm:px-6 w-full",children:m.jsxs("div",{className:"bg-white py-4 md:py-7 px-4 md:px-8 xl:px-10",children:[m.jsxs("div",{className:"sm:flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx("div",{className:"rounded-full focus:outline-none focus:ring-2  focus:bg-indigo-50 focus:ring-indigo-800",children:m.jsx("div",{className:"py-2 px-8 bg-indigo-100 text-indigo-700 rounded-full",children:m.jsx("p",{children:"All"})})}),m.jsx("div",{className:"rounded-full focus:outline-none focus:ring-2 focus:bg-indigo-50 focus:ring-indigo-800 ml-4 sm:ml-8",children:m.jsx("div",{className:"py-2 px-8 text-gray-600 hover:text-indigo-700 hover:bg-indigo-100 rounded-full ",children:m.jsx("p",{children:"Done"})})}),m.jsx("div",{className:"rounded-full focus:outline-none focus:ring-2 focus:bg-indigo-50 focus:ring-indigo-800 ml-4 sm:ml-8",children:m.jsx("div",{className:"py-2 px-8 text-gray-600 hover:text-indigo-700 hover:bg-indigo-100 rounded-full ",children:m.jsx("p",{children:"Pending"})})})]}),m.jsx("button",{className:"focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600 mt-4 sm:mt-0 inline-flex items-start justify-start px-6 py-3 bg-indigo-700 hover:bg-indigo-600 focus:outline-none rounded",children:m.jsx("p",{className:"text-sm font-medium leading-none text-white",children:"Add Task"})})]}),m.jsx("div",{className:"mt-7 overflow-x-auto",children:m.jsx("table",{className:"w-full whitespace-nowrap",children:m.jsx("tbody",{children:Array.from(i).map(([a,r])=>m.jsx(BAe,{data:r,setEditSalaryRecord:o=>e(o?{month:a,employeeId:o}:void 0),setInsertSalaryRecord:()=>n({month:a})},a))})})})]})})},WAe=()=>{const{setFiltersContext:e}=S.useContext(dr),[n,t]=S.useState(void 0),[i,a]=S.useState(void 0),{get:r}=kt(),[o,l]=S.useState(r("salariesFilters")?JSON.parse(decodeURIComponent(r("salariesFilters"))):{...NF()}),[{data:s,fetching:d}]=Be({query:Yke,variables:{...o}});return S.useEffect(()=>{e(m.jsxs("div",{className:"flex flex-row gap-x-5",children:[m.jsx(IAe,{filter:o,setFilter:l}),m.jsx(qB,{variant:"default",onClick:()=>a({})})]}))},[s,d,o,e,l]),m.jsxs(m.Fragment,{children:[d?m.jsx(Mi,{}):m.jsx(VAe,{setEditSalaryRecord:t,setInsertSalaryRecord:a,data:s==null?void 0:s.salaryRecordsByDates}),m.jsx(jFe,{recordVariables:n,onDone:()=>t(void 0)}),i&&m.jsx(HFe,{insertSalaryRecordParams:i,setInsertSalaryRecord:a})]})},HAe=()=>{const[{fetching:e},n]=at(Gke);return{fetching:e,addTag:t=>new Promise((i,a)=>n(t).then(r=>{var o;return r.error?(console.error(`Error adding new tag [${t.tag}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):(o=r.data)!=null&&o.addTag?(re({title:"Tag Added!",message:`"${t.tag}" tag was successfully added`}),i()):(console.error(`Error adding new tag [${t.tag}]`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))}))}},UAe=()=>{const[{fetching:e},n]=at(Zke);return{fetching:e,deleteTag:t=>new Promise((i,a)=>n(t).then(r=>{var o;return r.error?(console.error(`Error deleting new tag [${t.tag}]: ${r.error}`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a(r.error.message)):(o=r.data)!=null&&o.deleteTag?(re({title:"Tag Deleted!",message:`"${t.tag}" tag was successfully removed`}),i()):(console.error(`Error deleting new tag [${t.tag}]`),re({title:"Error!",message:"Oh no!, we have an error! 🤥"}),a("No data returned"))}))}},YAe=()=>{const{setFiltersContext:e}=S.useContext(dr),[n,t]=S.useState(""),[{data:i,fetching:a},r]=Be({query:v_}),{addTag:o}=HAe(),{deleteTag:l}=UAe();e(null);const s=(i==null?void 0:i.allTags.map(u=>u.name))??[],d=S.useCallback(u=>{u.length>2&&o({tag:u}).then(()=>{r()})},[o,r]),c=S.useCallback(u=>{l({tag:u}).then(()=>{r()})},[l,r]);return m.jsx("div",{className:"text-gray-600 body-font",children:m.jsx("div",{className:"container md:px-5 px-2 md:py-12 py-2 mx-auto",children:a?m.jsx(Mi,{}):m.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[m.jsx("p",{className:"text-red-500",children:"Not working ATM :( (as enums are not easily manipulated on SQL DB)"}),s==null?void 0:s.map(u=>m.jsxs("div",{className:" flex items-center gap-2 text-gray-600 mb-2",children:[m.jsx("div",{className:"w-full mt-1 relative rounded-md shadow-sm",children:u}),m.jsx(Pe,{onClick:()=>c(u),children:m.jsx(M5,{size:20})})]},u)),m.jsxs("div",{className:" flex items-center gap-2 text-gray-600 mb-2",children:[m.jsx("div",{className:"w-full mt-1 relative rounded-md shadow-sm",children:m.jsx(Ud,{value:n,onChange:u=>t(u.currentTarget.value),placeholder:"Add new tag",withAsterisk:!0})}),m.jsx(Pe,{disabled:n.length<2,onClick:()=>d(n),children:m.jsx(Fw,{size:20})})]})]})})})};function GAe(){const[e,n]=S.useState(null);return m.jsxs(dr.Provider,{value:{filtersContext:e,setFiltersContext:n},children:[m.jsx(cAe,{}),m.jsxs(I5,{children:[m.jsx(ri,{path:"/",element:m.jsx(bT,{})}),m.jsx(ri,{path:"/all-charges",element:m.jsx(bT,{})}),m.jsx(ri,{path:"/businesses",element:m.jsx(FDe,{})}),m.jsx(ri,{path:"/business-transactions",element:m.jsx(yDe,{})}),m.jsx(ri,{path:"/charts",element:m.jsx(sAe,{})}),m.jsx(ri,{path:"/documents",element:m.jsx(mAe,{})}),m.jsx(ri,{path:"/reports/trial-balance",element:m.jsx(SAe,{})}),m.jsx(ri,{path:"/reports/vat-monthly",element:m.jsx(EAe,{})}),m.jsx(ri,{path:"/salaries",element:m.jsx(WAe,{})}),m.jsx(ri,{path:"/tags",element:m.jsx(YAe,{})}),m.jsx(ri,{path:"*",element:m.jsx("main",{className:"p-4",children:m.jsx("p",{children:"404: There's nothing here!"})})})]}),m.jsx(KFe,{children:e})]})}var LS=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zS=typeof window>"u"||"Deno"in window;function ha(){}function qAe(e,n){return typeof e=="function"?e(n):e}function KAe(e){return typeof e=="number"&&e>=0&&e!==1/0}function XAe(e,n){return Math.max(e+(n||0)-Date.now(),0)}function QA(e,n){const{type:t="all",exact:i,fetchStatus:a,predicate:r,queryKey:o,stale:l}=e;if(o){if(i){if(n.queryHash!==_1(o,n.options))return!1}else if(!jm(n.queryKey,o))return!1}if(t!=="all"){const s=n.isActive();if(t==="active"&&!s||t==="inactive"&&s)return!1}return!(typeof l=="boolean"&&n.isStale()!==l||a&&a!==n.state.fetchStatus||r&&!r(n))}function ZA(e,n){const{exact:t,status:i,predicate:a,mutationKey:r}=e;if(r){if(!n.options.mutationKey)return!1;if(t){if(Im(n.options.mutationKey)!==Im(r))return!1}else if(!jm(n.options.mutationKey,r))return!1}return!(i&&n.state.status!==i||a&&!a(n))}function _1(e,n){return((n==null?void 0:n.queryKeyHashFn)||Im)(e)}function Im(e){return JSON.stringify(e,(n,t)=>bF(t)?Object.keys(t).sort().reduce((i,a)=>(i[a]=t[a],i),{}):t)}function jm(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?!Object.keys(n).some(t=>!jm(e[t],n[t])):!1}function pH(e,n){if(e===n)return e;const t=JA(e)&&JA(n);if(t||bF(e)&&bF(n)){const i=t?e:Object.keys(e),a=i.length,r=t?n:Object.keys(n),o=r.length,l=t?[]:{};let s=0;for(let d=0;d<o;d++){const c=t?d:r[d];!t&&e[c]===void 0&&n[c]===void 0&&i.includes(c)?(l[c]=void 0,s++):(l[c]=pH(e[c],n[c]),l[c]===e[c]&&e[c]!==void 0&&s++)}return a===o&&s===a?e:l}return n}function JA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bF(e){if(!eR(e))return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(!eR(t)||!t.hasOwnProperty("isPrototypeOf"))}function eR(e){return Object.prototype.toString.call(e)==="[object Object]"}function QAe(e){return new Promise(n=>{setTimeout(n,e)})}function ZAe(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?pH(e,n):n}function JAe(e,n,t=0){const i=[...e,n];return t&&i.length>t?i.slice(1):i}function eRe(e,n,t=0){const i=[n,...e];return t&&i.length>t?i.slice(0,-1):i}var C1=Symbol(),Ml,fo,gd,tR,nRe=(tR=class extends LS{constructor(){super();Ke(this,Ml,void 0);Ke(this,fo,void 0);Ke(this,gd,void 0);Ie(this,gd,n=>{if(!zS&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){X(this,fo)||this.setEventListener(X(this,gd))}onUnsubscribe(){var n;this.hasListeners()||((n=X(this,fo))==null||n.call(this),Ie(this,fo,void 0))}setEventListener(n){var t;Ie(this,gd,n),(t=X(this,fo))==null||t.call(this),Ie(this,fo,n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(n){X(this,Ml)!==n&&(Ie(this,Ml,n),this.onFocus())}onFocus(){this.listeners.forEach(n=>{n()})}isFocused(){var n;return typeof X(this,Ml)=="boolean"?X(this,Ml):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ml=new WeakMap,fo=new WeakMap,gd=new WeakMap,tR),xF=new nRe,yd,po,Sd,iR,tRe=(iR=class extends LS{constructor(){super();Ke(this,yd,!0);Ke(this,po,void 0);Ke(this,Sd,void 0);Ie(this,Sd,n=>{if(!zS&&window.addEventListener){const t=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}})}onSubscribe(){X(this,po)||this.setEventListener(X(this,Sd))}onUnsubscribe(){var n;this.hasListeners()||((n=X(this,po))==null||n.call(this),Ie(this,po,void 0))}setEventListener(n){var t;Ie(this,Sd,n),(t=X(this,po))==null||t.call(this),Ie(this,po,n(this.setOnline.bind(this)))}setOnline(n){X(this,yd)!==n&&(Ie(this,yd,n),this.listeners.forEach(i=>{i(n)}))}isOnline(){return X(this,yd)}},yd=new WeakMap,po=new WeakMap,Sd=new WeakMap,iR),by=new tRe;function iRe(e){return Math.min(1e3*2**e,3e4)}function P1(e){return(e??"online")==="online"?by.isOnline():!0}var hH=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function GN(e){return e instanceof hH}function vH(e){let n=!1,t=0,i=!1,a,r,o;const l=new Promise((y,g)=>{r=y,o=g}),s=y=>{var g;i||(p(new hH(y)),(g=e.abort)==null||g.call(e))},d=()=>{n=!0},c=()=>{n=!1},u=()=>!xF.isFocused()||e.networkMode!=="always"&&!by.isOnline(),f=y=>{var g;i||(i=!0,(g=e.onSuccess)==null||g.call(e,y),a==null||a(),r(y))},p=y=>{var g;i||(i=!0,(g=e.onError)==null||g.call(e,y),a==null||a(),o(y))},h=()=>new Promise(y=>{var g;a=v=>{const N=i||!u();return N&&y(v),N},(g=e.onPause)==null||g.call(e)}).then(()=>{var y;a=void 0,i||(y=e.onContinue)==null||y.call(e)}),k=()=>{if(i)return;let y;try{y=e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(f).catch(g=>{var _;if(i)return;const v=e.retry??(zS?0:3),N=e.retryDelay??iRe,x=typeof N=="function"?N(t,g):N,F=v===!0||typeof v=="number"&&t<v||typeof v=="function"&&v(t,g);if(n||!F){p(g);return}t++,(_=e.onFail)==null||_.call(e,t,g),QAe(x).then(()=>{if(u())return h()}).then(()=>{n?p(g):k()})})};return P1(e.networkMode)?k():h().then(k),{promise:l,cancel:s,continue:()=>(a==null?void 0:a())?l:Promise.resolve(),cancelRetry:d,continueRetry:c}}function aRe(){let e=[],n=0,t=f=>{f()},i=f=>{f()},a=f=>setTimeout(f,0);const r=f=>{a=f},o=f=>{let p;n++;try{p=f()}finally{n--,n||d()}return p},l=f=>{n?e.push(f):a(()=>{t(f)})},s=f=>(...p)=>{l(()=>{f(...p)})},d=()=>{const f=e;e=[],f.length&&a(()=>{i(()=>{f.forEach(p=>{t(p)})})})};return{batch:o,batchCalls:s,schedule:l,setNotifyFunction:f=>{t=f},setBatchNotifyFunction:f=>{i=f},setScheduler:r}}var Qt=aRe(),Ll,aR,kH=(aR=class{constructor(){Ke(this,Ll,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),KAe(this.gcTime)&&Ie(this,Ll,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zS?1/0:5*60*1e3))}clearGcTimeout(){X(this,Ll)&&(clearTimeout(X(this,Ll)),Ie(this,Ll,void 0))}},Ll=new WeakMap,aR),Nd,bd,Yi,ho,Gi,gt,Tm,zl,xd,Dh,va,gr,rR,rRe=(rR=class extends kH{constructor(n){super();Ke(this,xd);Ke(this,va);Ke(this,Nd,void 0);Ke(this,bd,void 0);Ke(this,Yi,void 0);Ke(this,ho,void 0);Ke(this,Gi,void 0);Ke(this,gt,void 0);Ke(this,Tm,void 0);Ke(this,zl,void 0);Ie(this,zl,!1),Ie(this,Tm,n.defaultOptions),ot(this,xd,Dh).call(this,n.options),Ie(this,gt,[]),Ie(this,Yi,n.cache),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ie(this,Nd,n.state||oRe(this.options)),this.state=X(this,Nd),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!X(this,gt).length&&this.state.fetchStatus==="idle"&&X(this,Yi).remove(this)}setData(n,t){const i=ZAe(this.state.data,n,this.options);return ot(this,va,gr).call(this,{data:i,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),i}setState(n,t){ot(this,va,gr).call(this,{type:"setState",state:n,setStateOptions:t})}cancel(n){var i;const t=X(this,ho);return(i=X(this,Gi))==null||i.cancel(n),t?t.then(ha).catch(ha):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,Nd))}isActive(){return X(this,gt).some(n=>n.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||this.state.data===void 0||X(this,gt).some(n=>n.getCurrentResult().isStale)}isStaleByTime(n=0){return this.state.isInvalidated||this.state.data===void 0||!XAe(this.state.dataUpdatedAt,n)}onFocus(){var t;const n=X(this,gt).find(i=>i.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(t=X(this,Gi))==null||t.continue()}onOnline(){var t;const n=X(this,gt).find(i=>i.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(t=X(this,Gi))==null||t.continue()}addObserver(n){X(this,gt).includes(n)||(X(this,gt).push(n),this.clearGcTimeout(),X(this,Yi).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){X(this,gt).includes(n)&&(Ie(this,gt,X(this,gt).filter(t=>t!==n)),X(this,gt).length||(X(this,Gi)&&(X(this,zl)?X(this,Gi).cancel({revert:!0}):X(this,Gi).cancelRetry()),this.scheduleGc()),X(this,Yi).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return X(this,gt).length}invalidate(){this.state.isInvalidated||ot(this,va,gr).call(this,{type:"invalidate"})}fetch(n,t){var d,c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(X(this,ho))return(d=X(this,Gi))==null||d.continueRetry(),X(this,ho)}if(n&&ot(this,xd,Dh).call(this,n),!this.options.queryFn){const p=X(this,gt).find(h=>h.options.queryFn);p&&ot(this,xd,Dh).call(this,p.options)}const i=new AbortController,a={queryKey:this.queryKey,meta:this.meta},r=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Ie(this,zl,!0),i.signal)})};r(a);const o=()=>!this.options.queryFn||this.options.queryFn===C1?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(Ie(this,zl,!1),this.options.persister?this.options.persister(this.options.queryFn,a,this):this.options.queryFn(a)),l={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};r(l),(c=this.options.behavior)==null||c.onFetch(l,this),Ie(this,bd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&ot(this,va,gr).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const s=p=>{var h,k,y,g;GN(p)&&p.silent||ot(this,va,gr).call(this,{type:"error",error:p}),GN(p)||((k=(h=X(this,Yi).config).onError)==null||k.call(h,p,this),(g=(y=X(this,Yi).config).onSettled)==null||g.call(y,this.state.data,p,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Ie(this,Gi,vH({fn:l.fetchFn,abort:i.abort.bind(i),onSuccess:p=>{var h,k,y,g;if(p===void 0){s(new Error(`${this.queryHash} data is undefined`));return}this.setData(p),(k=(h=X(this,Yi).config).onSuccess)==null||k.call(h,p,this),(g=(y=X(this,Yi).config).onSettled)==null||g.call(y,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:s,onFail:(p,h)=>{ot(this,va,gr).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{ot(this,va,gr).call(this,{type:"pause"})},onContinue:()=>{ot(this,va,gr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode})),Ie(this,ho,X(this,Gi).promise),X(this,ho)}},Nd=new WeakMap,bd=new WeakMap,Yi=new WeakMap,ho=new WeakMap,Gi=new WeakMap,gt=new WeakMap,Tm=new WeakMap,zl=new WeakMap,xd=new WeakSet,Dh=function(n){this.options={...X(this,Tm),...n},this.updateGcTime(this.options.gcTime)},va=new WeakSet,gr=function(n){const t=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:n.meta??null,fetchStatus:P1(this.options.networkMode)?"fetching":"paused",...i.data===void 0&&{error:null,status:"pending"}};case"success":return{...i,data:n.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=n.error;return GN(a)&&a.revert&&X(this,bd)?{...X(this,bd),fetchStatus:"idle"}:{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=t(this.state),Qt.batch(()=>{X(this,gt).forEach(i=>{i.onQueryUpdate()}),X(this,Yi).notify({query:this,type:"updated",action:n})})},rR);function oRe(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,i=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ya,oR,lRe=(oR=class extends LS{constructor(n={}){super();Ke(this,Ya,void 0);this.config=n,Ie(this,Ya,new Map)}build(n,t,i){const a=t.queryKey,r=t.queryHash??_1(a,t);let o=this.get(r);return o||(o=new rRe({cache:this,queryKey:a,queryHash:r,options:n.defaultQueryOptions(t),state:i,defaultOptions:n.getQueryDefaults(a)}),this.add(o)),o}add(n){X(this,Ya).has(n.queryHash)||(X(this,Ya).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=X(this,Ya).get(n.queryHash);t&&(n.destroy(),t===n&&X(this,Ya).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Qt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return X(this,Ya).get(n)}getAll(){return[...X(this,Ya).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(i=>QA(t,i))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(i=>QA(n,i)):t}notify(n){Qt.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ya=new WeakMap,oR),Ga,Am,bi,Fd,qa,ro,lR,sRe=(lR=class extends kH{constructor(n){super();Ke(this,qa);Ke(this,Ga,void 0);Ke(this,Am,void 0);Ke(this,bi,void 0);Ke(this,Fd,void 0);this.mutationId=n.mutationId,Ie(this,Am,n.defaultOptions),Ie(this,bi,n.mutationCache),Ie(this,Ga,[]),this.state=n.state||dRe(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options={...X(this,Am),...n},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){X(this,Ga).includes(n)||(X(this,Ga).push(n),this.clearGcTimeout(),X(this,bi).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ie(this,Ga,X(this,Ga).filter(t=>t!==n)),this.scheduleGc(),X(this,bi).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){X(this,Ga).length||(this.state.status==="pending"?this.scheduleGc():X(this,bi).remove(this))}continue(){var n;return((n=X(this,Fd))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var a,r,o,l,s,d,c,u,f,p,h,k,y,g,v,N,x,F,_,w;const t=()=>(Ie(this,Fd,vH({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(C,$)=>{ot(this,qa,ro).call(this,{type:"failed",failureCount:C,error:$})},onPause:()=>{ot(this,qa,ro).call(this,{type:"pause"})},onContinue:()=>{ot(this,qa,ro).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),X(this,Fd).promise),i=this.state.status==="pending";try{if(!i){ot(this,qa,ro).call(this,{type:"pending",variables:n}),await((r=(a=X(this,bi).config).onMutate)==null?void 0:r.call(a,n,this));const $=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,n));$!==this.state.context&&ot(this,qa,ro).call(this,{type:"pending",context:$,variables:n})}const C=await t();return await((d=(s=X(this,bi).config).onSuccess)==null?void 0:d.call(s,C,n,this.state.context,this)),await((u=(c=this.options).onSuccess)==null?void 0:u.call(c,C,n,this.state.context)),await((p=(f=X(this,bi).config).onSettled)==null?void 0:p.call(f,C,null,this.state.variables,this.state.context,this)),await((k=(h=this.options).onSettled)==null?void 0:k.call(h,C,null,n,this.state.context)),ot(this,qa,ro).call(this,{type:"success",data:C}),C}catch(C){try{throw await((g=(y=X(this,bi).config).onError)==null?void 0:g.call(y,C,n,this.state.context,this)),await((N=(v=this.options).onError)==null?void 0:N.call(v,C,n,this.state.context)),await((F=(x=X(this,bi).config).onSettled)==null?void 0:F.call(x,void 0,C,this.state.variables,this.state.context,this)),await((w=(_=this.options).onSettled)==null?void 0:w.call(_,void 0,C,n,this.state.context)),C}finally{ot(this,qa,ro).call(this,{type:"error",error:C})}}}},Ga=new WeakMap,Am=new WeakMap,bi=new WeakMap,Fd=new WeakMap,qa=new WeakSet,ro=function(n){const t=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!P1(this.options.networkMode),status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qt.batch(()=>{X(this,Ga).forEach(i=>{i.onMutationUpdate(n)}),X(this,bi).notify({mutation:this,type:"updated",action:n})})},lR);function dRe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qi,Rm,Bl,sR,cRe=(sR=class extends LS{constructor(n={}){super();Ke(this,qi,void 0);Ke(this,Rm,void 0);Ke(this,Bl,void 0);this.config=n,Ie(this,qi,[]),Ie(this,Rm,0)}build(n,t,i){const a=new sRe({mutationCache:this,mutationId:++gf(this,Rm)._,options:n.defaultMutationOptions(t),state:i});return this.add(a),a}add(n){X(this,qi).push(n),this.notify({type:"added",mutation:n})}remove(n){Ie(this,qi,X(this,qi).filter(t=>t!==n)),this.notify({type:"removed",mutation:n})}clear(){Qt.batch(()=>{X(this,qi).forEach(n=>{this.remove(n)})})}getAll(){return X(this,qi)}find(n){const t={exact:!0,...n};return X(this,qi).find(i=>ZA(t,i))}findAll(n={}){return X(this,qi).filter(t=>ZA(n,t))}notify(n){Qt.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){return Ie(this,Bl,(X(this,Bl)??Promise.resolve()).then(()=>{const n=X(this,qi).filter(t=>t.state.isPaused);return Qt.batch(()=>n.reduce((t,i)=>t.then(()=>i.continue().catch(ha)),Promise.resolve()))}).then(()=>{Ie(this,Bl,void 0)})),X(this,Bl)}},qi=new WeakMap,Rm=new WeakMap,Bl=new WeakMap,sR);function uRe(e){return{onFetch:(n,t)=>{const i=async()=>{var h,k,y,g,v;const a=n.options,r=(y=(k=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:k.fetchMore)==null?void 0:y.direction,o=((g=n.state.data)==null?void 0:g.pages)||[],l=((v=n.state.data)==null?void 0:v.pageParams)||[],s={pages:[],pageParams:[]};let d=!1;const c=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(n.signal.aborted?d=!0:n.signal.addEventListener("abort",()=>{d=!0}),n.signal)})},u=n.options.queryFn&&n.options.queryFn!==C1?n.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${n.options.queryHash}'`)),f=async(N,x,F)=>{if(d)return Promise.reject();if(x==null&&N.pages.length)return Promise.resolve(N);const _={queryKey:n.queryKey,pageParam:x,direction:F?"backward":"forward",meta:n.options.meta};c(_);const w=await u(_),{maxPages:C}=n.options,$=F?eRe:JAe;return{pages:$(N.pages,w,C),pageParams:$(N.pageParams,x,C)}};let p;if(r&&o.length){const N=r==="backward",x=N?mRe:nR,F={pages:o,pageParams:l},_=x(a,F);p=await f(F,_,N)}else{p=await f(s,l[0]??a.initialPageParam);const N=e??o.length;for(let x=1;x<N;x++){const F=nR(a,p);p=await f(p,F)}}return p};n.options.persister?n.fetchFn=()=>{var a,r;return(r=(a=n.options).persister)==null?void 0:r.call(a,i,{queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=i}}}function nR(e,{pages:n,pageParams:t}){const i=n.length-1;return e.getNextPageParam(n[i],n,t[i],t)}function mRe(e,{pages:n,pageParams:t}){var i;return(i=e.getPreviousPageParam)==null?void 0:i.call(e,n[0],n,t[0],t)}var ct,vo,ko,wd,_d,go,Cd,Pd,dR,fRe=(dR=class{constructor(e={}){Ke(this,ct,void 0);Ke(this,vo,void 0);Ke(this,ko,void 0);Ke(this,wd,void 0);Ke(this,_d,void 0);Ke(this,go,void 0);Ke(this,Cd,void 0);Ke(this,Pd,void 0);Ie(this,ct,e.queryCache||new lRe),Ie(this,vo,e.mutationCache||new cRe),Ie(this,ko,e.defaultOptions||{}),Ie(this,wd,new Map),Ie(this,_d,new Map),Ie(this,go,0)}mount(){gf(this,go)._++,X(this,go)===1&&(Ie(this,Cd,xF.subscribe(()=>{xF.isFocused()&&(this.resumePausedMutations(),X(this,ct).onFocus())})),Ie(this,Pd,by.subscribe(e=>{e&&(this.resumePausedMutations(),X(this,ct).onOnline())})))}unmount(){var e,n;gf(this,go)._--,X(this,go)===0&&((e=X(this,Cd))==null||e.call(this),Ie(this,Cd,void 0),(n=X(this,Pd))==null||n.call(this),Ie(this,Pd,void 0))}isFetching(e){return X(this,ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,vo).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=X(this,ct).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.getQueryData(e.queryKey);return n!==void 0?Promise.resolve(n):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:n,state:t})=>{const i=t.data;return[n,i]})}setQueryData(e,n,t){const i=this.defaultQueryOptions({queryKey:e}),a=X(this,ct).get(i.queryHash),r=a==null?void 0:a.state.data,o=qAe(n,r);if(o!==void 0)return X(this,ct).build(this,i).setData(o,{...t,manual:!0})}setQueriesData(e,n,t){return Qt.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=X(this,ct).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=X(this,ct);Qt.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=X(this,ct),i={type:"active",...e};return Qt.batch(()=>(t.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries(i,n)))}cancelQueries(e={},n={}){const t={revert:!0,...n},i=Qt.batch(()=>X(this,ct).findAll(e).map(a=>a.cancel(t)));return Promise.all(i).then(ha).catch(ha)}invalidateQueries(e={},n={}){return Qt.batch(()=>{if(X(this,ct).findAll(e).forEach(i=>{i.invalidate()}),e.refetchType==="none")return Promise.resolve();const t={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(t,n)})}refetchQueries(e={},n){const t={...n,cancelRefetch:(n==null?void 0:n.cancelRefetch)??!0},i=Qt.batch(()=>X(this,ct).findAll(e).filter(a=>!a.isDisabled()).map(a=>{let r=a.fetch(void 0,t);return t.throwOnError||(r=r.catch(ha)),a.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(ha)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=X(this,ct).build(this,n);return t.isStaleByTime(n.staleTime)?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ha).catch(ha)}fetchInfiniteQuery(e){return e.behavior=uRe(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ha).catch(ha)}resumePausedMutations(){return by.isOnline()?X(this,vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,ct)}getMutationCache(){return X(this,vo)}getDefaultOptions(){return X(this,ko)}setDefaultOptions(e){Ie(this,ko,e)}setQueryDefaults(e,n){X(this,wd).set(Im(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...X(this,wd).values()];let t={};return n.forEach(i=>{jm(e,i.queryKey)&&(t={...t,...i.defaultOptions})}),t}setMutationDefaults(e,n){X(this,_d).set(Im(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...X(this,_d).values()];let t={};return n.forEach(i=>{jm(e,i.mutationKey)&&(t={...t,...i.defaultOptions})}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...X(this,ko).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=_1(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.enabled!==!0&&n.queryFn===C1&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,ko).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,ct).clear(),X(this,vo).clear()}},ct=new WeakMap,vo=new WeakMap,ko=new WeakMap,wd=new WeakMap,_d=new WeakMap,go=new WeakMap,Cd=new WeakMap,Pd=new WeakMap,dR),pRe=S.createContext(void 0),hRe=({client:e,children:n})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(pRe.Provider,{value:e,children:n}));const vRe=()=>{S.useEffect(()=>{is.logout()},[]);const e=nl(),{message:n=""}=e.state??{},[t,i]=S.useState(""),[a,r]=S.useState(""),[o,l]=S.useState(n),[s,d]=S.useState(!1),[c,u]=S.useState(!1),f=ac();function p(k){const{name:y,value:g}=k.target;switch(y){case"username":i(g);break;case"password":r(g);break}}function h(k){if(k.preventDefault(),d(!0),!(t&&a)){l(o);return}u(!0),is.login(t,a).then(y=>{f("/")},y=>{l(y),u(!1)})}return m.jsx("div",{className:"flex flex-row justify-center",children:m.jsx("form",{name:"login",onSubmit:h,className:"p-8 max-w-96",children:m.jsxs(kx,{shadow:"sm",padding:"lg",radius:"md",withBorder:!0,children:[m.jsx(Ud,{size:"sm",name:"username",value:t,onChange:p,label:"Username",placeholder:"username",error:s&&!t?"Username is required":void 0}),m.jsx(X8,{name:"password",value:a,onChange:p,label:"Password",placeholder:"password",error:s&&!a?"Password is required":void 0}),m.jsx(lle,{variant:"outline",color:"blue",fullWidth:!0,mt:"md",radius:"md",type:"submit",rightIcon:c?m.jsx(ti,{}):void 0,children:"Login"}),o&&m.jsx("div",{className:"alert alert-danger",children:o})]})})})},kRe=({children:e})=>{const{isLoggedIn:n}=is,t=ac(),i=n();return S.useEffect(()=>{i||t("/login")},[i,t]),m.jsxs(I5,{children:[m.jsx(ri,{path:"/login",element:m.jsx(vRe,{})}),m.jsx(ri,{path:"*",element:e})]})};var qN=(e,n)=>dv(e.kind,e,{...e.context,authAttempt:n});function gRe(e){return({client:n,forward:t})=>{var i=new Set,a=qb(),r=qb(),o=new Map;function l(){d=void 0;var u=o;o=new Map,u.forEach(a.next)}function s(u){d=void 0;var f=o;o=new Map,f.forEach(p=>{r.next(X5(p,u))})}var d,c=null;return u=>{function f(){d=Promise.resolve().then(()=>e({mutate(g,v,N){var x=n.createRequestOperation("mutation",ud(g,v),N);return Cw(By(1)(di(F=>F.operation.key===x.key&&x.context._instance===F.operation.context._instance)(Gb(()=>{var F=h(x);i.add(F.context._instance),a.next(F)})(y))))},appendHeaders(g,v){var N=typeof g.context.fetchOptions=="function"?g.context.fetchOptions():g.context.fetchOptions||{};return dv(g.kind,g,{...g.context,fetchOptions:{...N,headers:{...N.headers,...v}}})}})).then(g=>{g&&(c=g),l()}).catch(g=>{s(g)})}f();function p(g){o.set(g.key,qN(g,!0)),c&&!d&&(d=c.refreshAuth().then(l).catch(s))}function h(g){return c?c.addAuthToOperation(g):g}var k=di(Boolean)(Yb(g=>g.kind==="teardown"?(o.delete(g.key),g):g.context._instance&&i.has(g.context._instance)?g:g.context.authAttempt?h(g):d||!c?(d||f(),o.has(g.key)||o.set(g.key,qN(g,!1)),null):function(N){return!N.context.authAttempt&&c&&c.willAuthError&&c.willAuthError(N)}(g)?(p(g),null):h(qN(g,!1)))(cm([a.source,u]))),y=t(k);return cm([r.source,di(g=>!i.has(g.operation.context._instance)&&g.error&&function(N){return c&&c.didAuthError&&c.didAuthError(N.error,N.operation)}(g)&&!g.operation.context.authAttempt?(p(g.operation),!1):(i.has(g.operation.context._instance)&&i.delete(g.operation.context._instance),!0))(y)])}}}function yRe(){return{token:is.authToken()}}function SRe({children:e}){const{isLoggedIn:n}=is,t=ac(),i=n(),a=S.useMemo(()=>{if(!i)return null;let r;switch("production"){case"production":{r="https://accounter.onrender.com/graphql";break}case"staging":{r="https://accounter-staging.onrender.com/graphql";break}default:{r="http://localhost:4000/graphql";break}}return JK({url:r,exchanges:[XK({onResult(o){var s,d;(((s=o==null?void 0:o.error)==null?void 0:s.graphQLErrors.some(c=>{var u;return((u=c.extensions)==null?void 0:u.code)==="FORBIDDEN"}))||((d=o==null?void 0:o.error)==null?void 0:d.response.status)===401)&&t("/login",{state:{message:"You are not authorized to access this page"}})}}),gRe(async o=>{const{token:l}=yRe();return{addAuthToOperation(s){return l?o.appendHeaders(s,{Authorization:l}):s},didAuthError(s,d){return s.response.status===401||s.graphQLErrors.some(c=>{var u;return((u=c.extensions)==null?void 0:u.code)==="FORBIDDEN"})},async refreshAuth(){is.logout()}}}),qK]})},[i,t]);return S.useEffect(()=>{a||t("/login")},[a,t]),a?m.jsx(eX,{value:a,children:e}):m.jsx(zG,{to:"/login",state:{prevPath:window.location.pathname}})}const NRe=new fRe;function bRe({children:e}){return m.jsxs(jL,{withNormalizeCSS:!0,withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:[m.jsx(ks,{}),m.jsx(kRe,{children:m.jsx(SRe,{children:m.jsx(hRe,{client:NRe,children:m.jsx(kge,{children:e})})})})]})}const xRe=document.getElementById("root"),FRe=x5(xRe);FRe.render(m.jsx(S.StrictMode,{children:m.jsx(qG,{children:m.jsx(bRe,{children:m.jsx(GAe,{})})})}));